summary refs log tree commit diff stats
path: root/plugins/winamp
AgeCommit message (Collapse)Author
2012-10-30Now some final cleanup (I hope)Berke Viktor
2012-10-30Rebranding for the rest of plugin*Berke Viktor
2012-10-30Rebranding for XCHAT_EAT_*Berke Viktor
2012-10-30Rebranding for XCHAT_PRI_*Berke Viktor
2012-10-30Remove hexchat-plugin.h duplicateBerke Viktor
2012-10-24A lot more rebrandingBerke Viktor
2012-10-21Move warning level to property sheetBerke Viktor
2012-10-03Revert to VS2010 part4Berke Viktor
2012-10-02Use explicit project names, output filenames depend on themBerke Viktor
2012-10-02Oops, wrong find'n'replaceBerke Viktor
2012-10-02Remove hardcoding as much as possibleBerke Viktor
2012-10-02Change platform toolset to Visual Studio 2012Berke Viktor
2012-10-02Add XP (WDK) solution as a fallback optionBerke Viktor
2012-07-21Add _AMD64_ definition for x64 builds, make Visual Studio even happierBerke Viktor
2012-07-21Add trailing backslashes to Output and Intermediate directories, make Visual ↵Berke Viktor
Studio happy
2012-07-14get rid of *.user files and ignore themxhmikosr
2012-07-13Rename DLL files, rename X-SASL to SASLBerke Viktor
2012-07-13Update plugin descriptions and names, tooBerke Viktor
2012-07-13Rename files, delete old windows makefilesBerke Viktor
2012-07-11Rebranding on the file levelBerke Viktor
2012-06-15Add .user files and .gitignoreBerke Viktor
2012-06-15Add x64 support to the VS solutionBerke Viktor
2012-06-15LOTS of fixes to the VS solutionBerke Viktor
2012-06-10Add all plugins to solution except WMPABerke Viktor
2011-02-28add wdk changes to named branchberkeviktor@aol.com
2011-02-24nuke the repoberkeviktor@aol.com
2011-01-26fix menu item deletion upon unloadberkeviktor@aol.com
2011-01-10some capitalization consistency for the menuberkeviktor@aol.com
2010-10-29update wdk distribution to use relative paths where possibleberkeviktor@aol.com
2010-10-21even more cosmeticsberkeviktor@aol.com
2010-10-21some cosmeticsberkeviktor@aol.com
2010-10-20fix escape characterberkeviktor@aol.com
2010-10-21bump winamp plugin versionberkeviktor@aol.com
2010-10-21menu entry and icon for winam pluginberkeviktor@aol.com
2010-10-09change winamp command nameberkeviktor@aol.com
2010-10-09replace easywinampcontrol with winampberkeviktor@aol.com
an>!stricmp("PAUSE", word[2])) { if (SendMessage(hwndWinamp,WM_USER, 0, 104)) { SendMessage(hwndWinamp, WM_COMMAND, 40046, 0); if (SendMessage(hwndWinamp, WM_USER, 0, 104) == PLAYING) hexchat_printf(ph, "Winamp: playing"); else hexchat_printf(ph, "Winamp: paused"); } } else if (!stricmp("STOP", word[2])) { SendMessage(hwndWinamp, WM_COMMAND, 40047, 0); hexchat_printf(ph, "Winamp: stopped"); } else if (!stricmp("PLAY", word[2])) { SendMessage(hwndWinamp, WM_COMMAND, 40045, 0); hexchat_printf(ph, "Winamp: playing"); } else if (!stricmp("NEXT", word[2])) { SendMessage(hwndWinamp, WM_COMMAND, 40048, 0); hexchat_printf(ph, "Winamp: next playlist entry"); } else if (!stricmp("PREV", word[2])) { SendMessage(hwndWinamp, WM_COMMAND, 40044, 0); hexchat_printf(ph, "Winamp: previous playlist entry"); } else if (!stricmp("START", word[2])) { SendMessage(hwndWinamp, WM_COMMAND, 40154, 0); hexchat_printf(ph, "Winamp: playlist start"); } else if (!word_eol[2][0]) { wchar_t wcurrent_play[2048]; char *current_play, *p; int len = GetWindowTextW(hwndWinamp, wcurrent_play, G_N_ELEMENTS(wcurrent_play)); current_play = g_utf16_to_utf8 (wcurrent_play, len, NULL, NULL, NULL); if (!current_play) { hexchat_print (ph, "Winamp: Error getting song information."); return HEXCHAT_EAT_ALL; } if (strchr(current_play, '-')) { /* Remove any trailing text and whitespace */ p = current_play + strlen(current_play) - 8; while (p >= current_play) { if (!strnicmp(p, "- Winamp", 8)) break; p--; } if (p >= current_play) p--; while (p >= current_play && *p == ' ') p--; *++p = '\0'; /* Ignore any leading track number */ p = strstr (current_play, ". "); if (p) p += 2; else p = current_play; if (*p != '\0') hexchat_commandf (ph, "me is now playing: %s", p); else hexchat_print (ph, "Winamp: No song information found."); g_free (current_play); } else hexchat_print(ph, "Winamp: Nothing being played."); } else hexchat_printf(ph, "Usage: /WINAMP [PAUSE|PLAY|STOP|NEXT|PREV|START]\n"); } else { hexchat_print(ph, "Winamp not found.\n"); } return HEXCHAT_EAT_ALL; } int hexchat_plugin_init(hexchat_plugin *plugin_handle, char **plugin_name, char **plugin_desc, char **plugin_version, char *arg) { /* we need to save this for use with any hexchat_* functions */ ph = plugin_handle; *plugin_name = "Winamp"; *plugin_desc = "Winamp plugin for HexChat"; *plugin_version = "0.6"; hexchat_hook_command (ph, "WINAMP", HEXCHAT_PRI_NORM, winamp, "Usage: /WINAMP [PAUSE|PLAY|STOP|NEXT|PREV|START] - control Winamp or show what's currently playing", 0); hexchat_command (ph, "MENU -ishare\\music.png ADD \"Window/Display Current Song (Winamp)\" \"WINAMP\""); hexchat_print (ph, "Winamp plugin loaded\n"); return 1; /* return 1 for success */ } int hexchat_plugin_deinit(void) { hexchat_command (ph, "MENU DEL \"Window/Display Current Song (Winamp)\""); hexchat_print (ph, "Winamp plugin unloaded\n"); return 1; }