summary refs log blame commit diff stats
path: root/src/fe-gtk/pixmaps.h
blob: 7241fa846880e884f2f83d227becc3cb3ed4b0fa (plain) (tree)


















                                                                            


                         






                                    


                                     
 



                                   
 


                              

                                                     

      
/* HexChat
 * Copyright (C) 1998-2010 Peter Zelezny.
 * Copyright (C) 2009-2013 Berke Viktor.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
 */

#ifndef HEXCHAT_PIXMAPS_H
#define HEXCHAT_PIXMAPS_H

extern GdkPixbuf *pix_ulist_voice;
extern GdkPixbuf *pix_ulist_halfop;
extern GdkPixbuf *pix_ulist_op;
extern GdkPixbuf *pix_ulist_owner;
extern GdkPixbuf *pix_ulist_founder;
extern GdkPixbuf *pix_ulist_netop;

extern GdkPixbuf *pix_tray_fileoffer;
extern GdkPixbuf *pix_tray_highlight;
extern GdkPixbuf *pix_tray_message;

extern GdkPixbuf *pix_tree_channel;
extern GdkPixbuf *pix_tree_dialog;
extern GdkPixbuf *pix_tree_server;
extern GdkPixbuf *pix_tree_util;

extern GdkPixbuf *pix_book;
extern GdkPixbuf *pix_hexchat;

extern GdkPixmap *pixmap_load_from_file (char *file);
extern void pixmaps_init (void);

#endif
n>{ zero[0] = 0; } else { g_free(tTitle); hexchat_print(ph, "pattern not found"); return HEXCHAT_EAT_ALL; } if ((tTitle[1]==':')&&(tTitle[2]=='\\')){ //hexchat_print(ph,"seams to be full path"); if (endsWith(tTitle,".mp3")==1){ //hexchat_print(ph,"seams to be a mp3 file"); info = readHeader(tTitle); if ((info.artist!=NULL)&&(strcmp(info.artist,"")!=0)){ char *mode=MODES[info.mode]; //hexchat_printf(ph,"mode: %s\n",mode); char *mp3Line=randomLine(mp3Theme); mp3Line=replace(mp3Line,"%art",info.artist); mp3Line=replace(mp3Line,"%tit",info.title); mp3Line=replace(mp3Line,"%alb",info.album); mp3Line=replace(mp3Line,"%com",info.comment); mp3Line=replace(mp3Line,"%gen",info.genre); //mp3Line=replace(mp3Line,"%time",pos); //mp3Line=replace(mp3Line,"%length",len); //mp3Line=replace(mp3Line,"%ver",waVers); //mp3Line=intReplace(mp3Line,"%br",br); //mp3Line=intReplace(mp3Line,"%frq",frq); mp3Line=intReplace(mp3Line,"%br",info.bitrate); mp3Line=intReplace(mp3Line,"%frq",info.freq); mp3Line=replace(mp3Line,"%mode",mode); //mp3Line=replace(mp3Line,"%size",size); //mp3Line=intReplace(mp3Line,"%perc",perc); //mp3Line=replace(mp3Line,"%plTitle",title); mp3Line=replace(mp3Line,"%file",tTitle); g_free(tTitle); hexchat_command(ph, mp3Line); return HEXCHAT_EAT_ALL; } } if (endsWith(tTitle,".ogg")==1){ hexchat_printf(ph,"Ogg detected\n"); info = getOggHeader(tTitle); if (info.artist!=NULL){ char *cbr; if (info.cbr==1) cbr="CBR"; else cbr="VBR"; oggLine=randomLine(oggTheme); //if (cue==1) oggLine=cueLine; //hexchat_printf(ph,"ogg-line: %s\n",oggLine); oggLine=replace(oggLine,"%art",info.artist); oggLine=replace(oggLine,"%tit",info.title); oggLine=replace(oggLine,"%alb",info.album); oggLine=replace(oggLine,"%com",info.comment); oggLine=replace(oggLine,"%gen",info.genre); //oggLine=replace(oggLine,"%time",pos); //oggLine=replace(oggLine,"%length",len); //oggLine=replace(oggLine,"%ver",waVers); oggLine=intReplace(oggLine,"%chan",info.mode); oggLine=replace(oggLine,"%cbr",cbr); oggLine=intReplace(oggLine,"%br",info.bitrate/1000);//br); oggLine=intReplace(oggLine,"%frq",info.freq); //oggLine=replace(oggLine,"%size",size); //oggLine=intReplace(oggLine,"%perc",perc); //oggLine=replace(oggLine,"%plTitle",title); oggLine=replace(oggLine,"%file",tTitle); g_free(tTitle); hexchat_command(ph, oggLine); return HEXCHAT_EAT_ALL; } } } line=randomLine(titleTheme); line=replace(line,"%title", tTitle); g_free(tTitle); hexchat_command(ph, line); return HEXCHAT_EAT_ALL; } int hexchat_plugin_init(hexchat_plugin *plugin_handle, char **plugin_name, char **plugin_desc, char **plugin_version, char *arg){ ph = plugin_handle; *plugin_name = "mpcInfo"; *plugin_desc = "Information-Script for Media Player Classic"; *plugin_version=VERSION; hexchat_hook_command(ph, "mpc", HEXCHAT_PRI_NORM, mpc_tell,"no help text", 0); hexchat_hook_command(ph, "mpc_themes", HEXCHAT_PRI_NORM, print_themes,"no help text", 0); hexchat_hook_command(ph, "mpc_reloadthemes", HEXCHAT_PRI_NORM, mpc_themeReload,"no help text", 0); hexchat_command (ph, "MENU -ishare\\music.png ADD \"Window/Display Current Song (MPC)\" \"MPC\""); themeInit(); loadThemes(); hexchat_printf(ph, "%s plugin loaded\n", *plugin_name); return 1; } int hexchat_plugin_deinit (void) { hexchat_command (ph, "MENU DEL \"Window/Display Current Song (MPC)\""); hexchat_print (ph, "mpcInfo plugin unloaded\n"); return 1; }