Frontend

  • November 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Frontend as PDF for free.

More details

  • Words: 904
  • Pages: 4
#define wm_wa_ipc wm_user // messages are sent to the winamp window using: //result = sendmessage(hwnd_winamp,wm_wa_ipc,command_data,command); /* messages available to send */ #define ipc_getversion 0 /* ipc_getversion is sent to the window, and the return value is the version version 1.55 = 0x1551 version 1.6b = 0x16a0 version 1.60 = 0x16af version 1.61 = 0x16b0 version 1.62 = 0x16b1 version 1.64 = 0x16b3 version 1.666 = 0x16b4 version 1.69 = 0x16b5 version 1.7x = 0x170x version 1.8x = 0x180x version 1.9x = 0x190x version 2.0x = 0x200x the command_data parameter is 0. so, if (sendmessage(hwnd_winamp,wm_wa_ipc,0,ipc_getversion) != 0x1551) messagebox(null,"error, winamp 1.55 not found","warning",mb_ok); */ #define ipc_playfile 100 /* ipc_playfile is sent to the window for each char of a null terminated string of a file to add to the playlist (it doesn't change the playing status). note, if you pass a file with the extension ".m3u" it will be treated as a playlist. for example: char *file = "c:\\download\\booga.mp3"; int x; for (x = 0; x <= strlen(file); x ++) postmessage(hwnd_winamp,wm_wa_ipc,(lparam)file[x], ipc_playfile); will add "c:\download\booga.mp3" to the end of the playlist --- superceeded in winamp 1.7: copydatastruct cds; cds.dwdata = ipc_playfile; cds.lpdata = (void *) file; cds.cbdata = strlen((char *) cds.lpdata)+1; sendmessage(hwnd,wm_copydata,(wparam)null,(lparam)&cds); */ #define ipc_delete 101 /* ipc_delete deletes the internal winamp playlist. sendmessage(hwnd_winamp,wm_wa_ipc,0,ipc_delete); */

#define ipc_startplay 102 /* ipc_startplay starts the playing. sendmessage(hwnd_winamp,wm_wa_ipc,0,ipc_startplay); */ #define ipc_chdir 103 /* ipc_chdir is sent to the window for each char of a null terminated string of a directory to change to for example: char *dir = "c:\\download"; int x; for (x = 0; x <= strlen(file); x ++) postmessage(hwnd_winamp,wm_wa_ipc,(lparam)dir[x],ipc_playfile); will change the winamp process to "c:\download" (useful for relative pathnames and loading playlists) --- superceeded in winamp 1.7: copydatastruct cds; cds.dwdata = ipc_chdir; cds.lpdata = (void *) dir; cds.cbdata = strlen((char *) cds.lpdata)+1; sendmessage(hwnd,wm_copydata,(wparam)null,(lparam)&cds); */ #define ipc_isplaying 104 /* ipc_isplaying returns the status of playback. if it returns 1, it is playing. if it returns 3, it is paused, if it returns 0, it is not playing. if it returns something other than 1,3,or 0, something is screwed. isplaying = sendmessage(hwnd_winamp,wm_wa_ipc,0,ipc_isplaying); */ #define ipc_getoutputtime 105 /* ipc_getoutputtime returns the position in milliseconds of the current song (lparam = 0), or the song length, in seconds (lparam = 1). returns -1 if not playing or error.

*/

song_pos = sendmessage(hwnd_winamp,wm_wa_ipc,0,ipc_getoutputtime); song_len = sendmessage(hwnd_winamp,wm_wa_ipc,1,ipc_getoutputtime);

#define ipc_jumptotime 106 /* *only available in v1.60+* ipc_jumptotime sets the position in milliseconds of the current song (approximately) returns -1 if not playing, 1 on eof, or 0 if successful sendmessage(hwnd_winamp,wm_wa_ipc,new_song_pos,ipc_jumptotime); */ #define ipc_writeplaylist 120 /*

*/

*only available in v1.666+* ipc_writeplaylist writes the current playlist to <winampdir>\\winamp.pl int cursong = sendmessage(hwnd_winamp,wm_wa_ipc,0,ipc_writeplaylist); (cursong is the index of the current song in the playlist)

// winamp 2.0+ (pre2 0902+) #define ipc_setplaylistpos 121 /* 2.0 + ... wparam == playlist position */ #define ipc_setvolume 122 /* 2.0 + ... wparam == volume 0-255 */ #define ipc_setpanning 123 /* 2.0 + ... wparam == pannign 0-255 */ #define ipc_getlistlength 124 /* 2.0 + ... returns playlist length in tracks */ // winamp 2.04+, in-process (plug-in or other) only. #define ipc_setskin 200 // wparam == pointer to skin name, skin directory, or skin // .zip, or skin .zip w/ directory #define ipc_getskin 201 // wparam == pointer to buffer of max_path length to recieve skin directory // for .zip files this is usually c:\temp\_waskin or something. // return value: pointer to skin name or zip file name. #define ipc_execplug 202 // wparam == visualization plug-in to execute. format is either: // "vis_whatever.dll" // "vis_whatever.dll,0" // (first mod, file in winamp plug-in dir) // "c:\\dir\\vis_whatever.dll,1" #define ipc_getplaylistfile 211 // wparam == index into playlist. returns pointer to the filename of the item, // null or an empty string on error #define ipc_getplaylisttitle 212 // wparam == index into playlist. returns pointer to the title of the item, // null or an empty string on error // 2.05+ #define ipc_getlistpos 125 // returns list pos #define ipc_getinfo 126 // returns srate if wparam==0, brate if wparam==1, nch if wparam == 2 #define ipc_geteqdata 127 // get eq item wparam (10 = preamp, 11=enabled,12=autoload, 0-9 = eq).. range is 0 (+20db) to 63 (-20db) #define ipc_seteqdata 128 // set data.. use after ipc_geteqdata // these might change in the future :) //also, you can send standard wm_command messages to the winamp window (for other controls), including // send using sendmessage(hwnd_winamp,wm_command,winamp_options_eq/*orwhatever*/,0); // toggles the eq window #define winamp_options_eq

40036

// toggles the playlist window #define winamp_options_pledit 40040 // turns the volume up a little #define winamp_volumeup 40058 // turns the volume down a little #define winamp_volumedown 40059 // fast forwards 5 seconds #define winamp_ffwd5s 40060 // rewinds 5 seconds #define winamp_rew5s 40061 // the following are the five main control buttons, with optionally shift or control pressed // (for the exact functions of each, just try it out) #define winamp_button1 40044 #define winamp_button2 40045 #define winamp_button3 40046 #define winamp_button4 40047 #define winamp_button5 40048 #define winamp_button1_shift 40144 #define winamp_button2_shift 40145 #define winamp_button3_shift 40146 #define winamp_button4_shift 40147 #define winamp_button5_shift 40148 #define winamp_button1_ctrl 40154 #define winamp_button2_ctrl 40155 #define winamp_button3_ctrl 40156 #define winamp_button4_ctrl 40157 #define winamp_button5_ctrl 40158 // always goes to the previous song (unlike button 1), 1.666+ #define winamp_prevsong 40198 // pops up the load file(s) box #define winamp_file_play // pops up the preferences #define winamp_options_prefs // toggles always on top #define winamp_options_aot // pops up the about box :) #define winamp_help_about

40029 40012 40019 40041

Related Documents