rtoss - Diff between revs 181 and 182

Subversion Repositories:
Rev:
Show entire file - Ignore whitespace
Rev 181 Rev 182
Line 1... Line 1...
1 /* 1 /*
2 ** Copyright (C) 2003 Nullsoft, Inc. -  
-   2 ** Copyright (C) 1997-2008 Nullsoft, Inc.
3 ** 3 **
4 ** This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held 4 ** This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held
5 ** liable for any damages arising from the use of this software. 5 ** liable for any damages arising from the use of this software.
6 ** 6 **
7 ** Permission is granted to anyone to use this software for any purpose, including commercial applications, and to 7 ** Permission is granted to anyone to use this software for any purpose, including commercial applications, and to
Line 17... Line 17...
17 */ 17 */
18 18
19 #ifndef _WA_IPC_H_ 19 #ifndef _WA_IPC_H_
20 #define _WA_IPC_H_ 20 #define _WA_IPC_H_
21 21
-   22 #include <windows.h>
-   23 #include <stddef.h>
-   24 #if (_MSC_VER <= 1200)
-   25 typedef int intptr_t;
-   26 #endif
22 /* 27 /*
23 ** This is the modern replacement for the classic 'frontend.h'. Most of these 28 ** This is the modern replacement for the classic 'frontend.h'. Most of these
24 ** updates are designed for in-process use, i.e. from a plugin. 29 ** updates are designed for in-process use, i.e. from a plugin.
25 ** 30 **
26 */ 31 */
27 32
28 /* message used to sent many messages to winamp's main window. -  
29 ** most all of the IPC_* messages involve sending the message in the form of: -  
30 **   result = SendMessage(hwnd_winamp,WM_WA_IPC,(parameter),IPC_*); -  
-   33 /* Most of the IPC_* messages involve sending the message in the form of:
-   34 ** result = SendMessage(hwnd_winamp,WM_WA_IPC,(parameter),IPC_*);
-   35 ** Where different then this is specified (typically with WM_COPYDATA variants)
-   36 **
-   37 ** When you use SendMessage(hwnd_winamp,WM_WA_IPC,(parameter),IPC_*) and specify a IPC_*
-   38 ** which is not currently implemented/supported by the Winamp version being used then it
-   39 ** will return 1 for 'result'. This is a good way of helping to check if an api being
-   40 ** used which returns a function pointer, etc is even going to be valid.
31 */ 41 */
-   42
32 #define WM_WA_IPC WM_USER 43 #define WM_WA_IPC WM_USER
33 /* but some of them use WM_COPYDATA. be afraid. -  
34 */ -  
-   44
-   45 #define WINAMP_VERSION_MAJOR(winampVersion) ((winampVersion & 0x0000FF00) >> 12)
-   46 #define WINAMP_VERSION_MINOR(winampVersion) (winampVersion & 0x000000FF)  // returns, i.e. 0x12 for 5.12 and 0x10 for 5.1...
-   47
35 48
36 #define IPC_GETVERSION 0 49 #define IPC_GETVERSION 0
37 /* int version = SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETVERSION); 50 /* int version = SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETVERSION);
38 ** 51 **
39 ** Version will be 0x20yx for winamp 2.yx. versions previous to Winamp 2.0 -  
40 ** typically (but not always) use 0x1zyx for 1.zx versions. Weird, I know. -  
-   52 ** The version returned will be 0x20yx for Winamp 2.yx.
-   53 ** Versions previous to Winamp 2.0 typically (but not always) use 0x1zyx for 1.zx.
-   54 ** Just a bit weird but that's the way it goes.
-   55 **
-   56 ** For Winamp 5.x it uses the format 0x50yx for Winamp 5.yx
-   57 ** e.g.   5.01 -> 0x5001
-   58 **        5.09 -> 0x5009
-   59 **        5.1  -> 0x5010
-   60 **
-   61 ** Notes: For 5.02 this api will return the same value as for a 5.01 build.
-   62 **        For 5.07 this api will return the same value as for a 5.06 build.
41 */ 63 */
-   64
-   65
-   66 #define IPC_GETVERSIONSTRING 1
-   67
42 68
43 #define IPC_GETREGISTEREDVERSION 770 69 #define IPC_GETREGISTEREDVERSION 770
-   70 /* (requires Winamp 5.0+)
-   71 ** SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETREGISTEREDVERSION);
-   72 **
-   73 ** This will open the Winamp Preferences and show the Winamp Pro page.
-   74 */
44 75
45 76
46 typedef struct { 77 typedef struct {
47   char *filename; -  
48   char *title; -  
-   78   const char *filename;
-   79   const char *title;
49   int length; 80   int length;
50 } enqueueFileWithMetaStruct; // send this to a IPC_PLAYFILE in a non WM_COPYDATA, 81 } enqueueFileWithMetaStruct; // send this to a IPC_PLAYFILE in a non WM_COPYDATA,
51 // and you get the nice desired result. if title is NULL, it is treated as a "thing", 82 // and you get the nice desired result. if title is NULL, it is treated as a "thing",
52 // otherwise it's assumed to be a file (for speed) 83 // otherwise it's assumed to be a file (for speed)
-   84
-   85 typedef struct {
-   86   const wchar_t *filename;
-   87   const wchar_t *title;
-   88   int length;
-   89 } enqueueFileWithMetaStructW;
53 90
54 #define IPC_PLAYFILE 100  // dont be fooled, this is really the same as enqueufile 91 #define IPC_PLAYFILE 100  // dont be fooled, this is really the same as enqueufile
55 #define IPC_ENQUEUEFILE 100 92 #define IPC_ENQUEUEFILE 100
56 /* sent as a WM_COPYDATA, with IPC_PLAYFILE as the dwData, and the string to play -  
57 ** as the lpData. Just enqueues, does not clear the playlist or change the playback -  
58 ** state. -  
-   93 #define IPC_PLAYFILEW 1100
-   94 #define IPC_ENQUEUEFILEW 1100
-   95 /* This is sent as a WM_COPYDATA with IPC_PLAYFILE as the dwData member and the string
-   96 ** of the file / playlist to be enqueued into the playlist editor as the lpData member.
-   97 ** This will just enqueue the file or files since you can use this to enqueue a playlist.
-   98 ** It will not clear the current playlist or change the playback state.
-   99 **
-   100 ** COPYDATASTRUCT cds = {0};
-   101 **   cds.dwData = IPC_ENQUEUEFILE;
-   102 **   cds.lpData = (void*)"c:\\test\\folder\\test.mp3";
-   103 **   cds.cbData = lstrlen((char*)cds.lpData)+1;  // include space for null char
-   104 **   SendMessage(hwnd_winamp,WM_COPYDATA,0,(LPARAM)&cds);
-   105 **
-   106 **
-   107 ** With 2.9+ and all of the 5.x versions you can send this as a normal WM_WA_IPC
-   108 ** (non WM_COPYDATA) with an enqueueFileWithMetaStruct as the param.
-   109 ** If the title member is null then it is treated as a "thing" otherwise it will be
-   110 ** assumed to be a file (for speed).
-   111 **
-   112 ** enqueueFileWithMetaStruct eFWMS = {0};
-   113 **   eFWMS.filename = "c:\\test\\folder\\test.mp3";
-   114 **   eFWMS.title = "Whipping Good";
-   115 **   eFWMS.length = 300;  // this is the number of seconds for the track
-   116 **   SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)&eFWMS,IPC_ENQUEUEFILE);
59 */ 117 */
60 118
61 119
62 #define IPC_DELETE 101 120 #define IPC_DELETE 101
63 #define IPC_DELETE_INT 1101 // don't use this, it's used internally by winamp when -  
64                             // dealing with some lame explorer issues. -  
-   121 #define IPC_DELETE_INT 1101
65 /* SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_DELETE); 122 /* SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_DELETE);
66 ** Use IPC_DELETE to clear Winamp's internal playlist. -  
-   123 ** Use this api to clear Winamp's internal playlist.
-   124 ** You should not need to use IPC_DELETE_INT since it is used internally by Winamp when
-   125 ** it is dealing with some lame Windows Explorer issues (hard to believe that!).
67 */ 126 */
68 127
69 128
70 #define IPC_STARTPLAY 102   // starts playback. almost like hitting play in Winamp. -  
71 #define IPC_STARTPLAY_INT 1102 // used internally, don't bother using it (won't be any fun) -  
-   129 #define IPC_STARTPLAY 102  
-   130 #define IPC_STARTPLAY_INT 1102
-   131 /* SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_STARTPLAY);
-   132 ** Sending this will start playback and is almost the same as hitting the play button.
-   133 ** The IPC_STARTPLAY_INT version is used internally and you should not need to use it
-   134 ** since it won't be any fun.
-   135 */
72 136
73 137
74 #define IPC_CHDIR 103 138 #define IPC_CHDIR 103
75 /* sent as a WM_COPYDATA, with IPC_CHDIR as the dwData, and the directory to change to -  
76 ** as the lpData. -  
-   139 /* This is sent as a WM_COPYDATA type message with IPC_CHDIR as the dwData value and the
-   140 ** directory you want to change to as the lpData member.
-   141 **
-   142 ** COPYDATASTRUCT cds = {0};
-   143 **   cds.dwData = IPC_CHDIR;
-   144 **   cds.lpData = (void*)"c:\\download";
-   145 **   cds.cbData = lstrlen((char*)cds.lpData)+1; // include space for null char
-   146 **   SendMessage(hwnd_winamp,WM_COPYDATA,0,(LPARAM)&cds);
-   147 **
-   148 ** The above example will make Winamp change to the directory 'C:\download'.
77 */ 149 */
78 150
79 151
80 #define IPC_ISPLAYING 104 152 #define IPC_ISPLAYING 104
81 /* int res = SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_ISPLAYING); 153 /* int res = SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_ISPLAYING);
82 ** If it returns 1, it is playing. if it returns 3, it is paused, -  
83 ** if it returns 0, it is not playing. -  
-   154 ** This is sent to retrieve the current playback state of Winamp.
-   155 ** If it returns 1, Winamp is playing.
-   156 ** If it returns 3, Winamp is paused.
-   157 ** If it returns 0, Winamp is not playing.
84 */ 158 */
85 159
86 160
87 #define IPC_GETOUTPUTTIME 105 161 #define IPC_GETOUTPUTTIME 105
88 /* int res = SendMessage(hwnd_winamp,WM_WA_IPC,mode,IPC_GETOUTPUTTIME); 162 /* int res = SendMessage(hwnd_winamp,WM_WA_IPC,mode,IPC_GETOUTPUTTIME);
89 ** returns the position in milliseconds of the current track (mode = 0), -  
90 ** or the track length, in seconds (mode = 1). Returns -1 if not playing or error. -  
-   163 ** This api can return two different sets of information about current playback status.
-   164 **
-   165 ** If mode = 0 then it will return the position (in ms) of the currently playing track.
-   166 ** Will return -1 if Winamp is not playing.
-   167 **
-   168 ** If mode = 1 then it will return the current track length (in seconds).
-   169 ** Will return -1 if there are no tracks (or possibly if Winamp cannot get the length).
-   170 **
-   171 ** If mode = 2 then it will return the current track length (in milliseconds).
-   172 ** Will return -1 if there are no tracks (or possibly if Winamp cannot get the length).
91 */ 173 */
92 174
93 175
94 #define IPC_JUMPTOTIME 106 176 #define IPC_JUMPTOTIME 106
95 /* (requires Winamp 1.60+) 177 /* (requires Winamp 1.60+)
96 ** SendMessage(hwnd_winamp,WM_WA_IPC,ms,IPC_JUMPTOTIME); 178 ** SendMessage(hwnd_winamp,WM_WA_IPC,ms,IPC_JUMPTOTIME);
97 ** IPC_JUMPTOTIME sets the position in milliseconds of the -  
98 ** current song (approximately). -  
99 ** Returns -1 if not playing, 1 on eof, or 0 if successful -  
-   179 ** This api sets the current position (in milliseconds) for the currently playing song.
-   180 ** The resulting playback position may only be an approximate time since some playback
-   181 ** formats do not provide exact seeking e.g. mp3
-   182 ** This returns -1 if Winamp is not playing, 1 on end of file, or 0 if it was successful.
100 */ 183 */
-   184
101 185
102 #define IPC_GETMODULENAME 109 186 #define IPC_GETMODULENAME 109
103 #define IPC_EX_ISRIGHTEXE 666 187 #define IPC_EX_ISRIGHTEXE 666
104 /* usually shouldnt bother using these, but here goes: 188 /* usually shouldnt bother using these, but here goes:
105 ** send a WM_COPYDATA with IPC_GETMODULENAME, and an internal 189 ** send a WM_COPYDATA with IPC_GETMODULENAME, and an internal
106 ** flag gets set, which if you send a normal WM_WA_IPC message with 190 ** flag gets set, which if you send a normal WM_WA_IPC message with
107 ** IPC_EX_ISRIGHTEXE, it returns whether or not that filename 191 ** IPC_EX_ISRIGHTEXE, it returns whether or not that filename
108 ** matches. lame, I know. 192 ** matches. lame, I know.
109 */ 193 */
-   194
110 195
111 #define IPC_WRITEPLAYLIST 120 196 #define IPC_WRITEPLAYLIST 120
112 /* (requires Winamp 1.666+) 197 /* (requires Winamp 1.666+)
113 ** SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_WRITEPLAYLIST); -  
-   198 ** int cur = SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_WRITEPLAYLIST);
114 ** 199 **
115 ** IPC_WRITEPLAYLIST writes the current playlist to <winampdir>\\Winamp.m3u, -  
116 ** and returns the current playlist position. -  
117 ** Kinda obsoleted by some of the 2.x new stuff, but still good for when -  
118 ** using a front-end (instead of a plug-in) -  
-   200 ** IPC_WRITEPLAYLIST will write the current playlist to '<winampdir>\\Winamp.m3u' and
-   201 ** will also return the current playlist position (see IPC_GETLISTPOS).
-   202 **
-   203 ** This is kinda obsoleted by some of the newer 2.x api items but it still is good for
-   204 ** use with a front-end program (instead of a plug-in) and you want to see what is in the
-   205 ** current playlist.
-   206 **
-   207 ** This api will only save out extended file information in the #EXTINF entry if Winamp
-   208 ** has already read the data such as if the file was played of scrolled into view. If
-   209 ** Winamp has not read the data then you will only find the file with its filepath entry
-   210 ** (as is the base requirements for a m3u playlist).
119 */ 211 */
120 212
121 213
122 #define IPC_SETPLAYLISTPOS 121 214 #define IPC_SETPLAYLISTPOS 121
123 /* (requires Winamp 2.0+) 215 /* (requires Winamp 2.0+)
124 ** SendMessage(hwnd_winamp,WM_WA_IPC,position,IPC_SETPLAYLISTPOS) 216 ** SendMessage(hwnd_winamp,WM_WA_IPC,position,IPC_SETPLAYLISTPOS)
125 ** IPC_SETPLAYLISTPOS sets the playlist position to 'position'. It -  
126 ** does not change playback or anything, it just sets position, and -  
127 ** updates the view if necessary -  
-   217 ** IPC_SETPLAYLISTPOS sets the playlist position to the specified 'position'.
-   218 ** It will not change playback status or anything else. It will just set the current
-   219 ** position in the playlist and will update the playlist view if necessary.
-   220 **
-   221 ** If you use SendMessage(hwnd_winamp,WM_COMMAND,MAKEWPARAM(WINAMP_BUTTON2,0),0);
-   222 ** after using IPC_SETPLAYLISTPOS then Winamp will start playing the file at 'position'.
128 */ 223 */
129 224
130 225
131 #define IPC_SETVOLUME 122 226 #define IPC_SETVOLUME 122
132 /* (requires Winamp 2.0+) 227 /* (requires Winamp 2.0+)
133 ** SendMessage(hwnd_winamp,WM_WA_IPC,volume,IPC_SETVOLUME); 228 ** SendMessage(hwnd_winamp,WM_WA_IPC,volume,IPC_SETVOLUME);
134 ** IPC_SETVOLUME sets the volume of Winamp (from 0-255). -  
-   229 ** IPC_SETVOLUME sets the volume of Winamp (between the range of 0 to 255).
-   230 **
-   231 ** If you pass 'volume' as -666 then the message will return the current volume.
-   232 ** int curvol = SendMessage(hwnd_winamp,WM_WA_IPC,-666,IPC_SETVOLUME);
-   233 */
-   234
-   235
-   236 #define IPC_GETVOLUME(hwnd_winamp) SendMessage(hwnd_winamp,WM_WA_IPC,-666,IPC_SETVOLUME)
-   237 /* (requires Winamp 2.0+)
-   238 ** int curvol = IPC_GETVOLUME(hwnd_winamp);
-   239 ** This will return the current volume of Winamp or
135 */ 240 */
136 241
137 242
138 #define IPC_SETPANNING 123 243 #define IPC_SETPANNING 123
139 /* (requires Winamp 2.0+) 244 /* (requires Winamp 2.0+)
140 ** SendMessage(hwnd_winamp,WM_WA_IPC,panning,IPC_SETPANNING); 245 ** SendMessage(hwnd_winamp,WM_WA_IPC,panning,IPC_SETPANNING);
141 ** IPC_SETPANNING sets the panning of Winamp (from 0 (left) to 255 (right)). -  
-   246 ** IPC_SETPANNING sets the panning of Winamp from 0 (left) to 255 (right).
-   247 **
-   248 ** At least in 5.x+ this works from -127 (left) to 127 (right).
-   249 **
-   250 ** If you pass 'panning' as -666 to this api then it will return the current panning.
-   251 ** int curpan = SendMessage(hwnd_winamp,WM_WA_IPC,-666,IPC_SETPANNING);
142 */ 252 */
143 253
144 254
145 #define IPC_GETLISTLENGTH 124 255 #define IPC_GETLISTLENGTH 124
146 /* (requires Winamp 2.0+) 256 /* (requires Winamp 2.0+)
147 ** int length = SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETLISTLENGTH); 257 ** int length = SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETLISTLENGTH);
148 ** IPC_GETLISTLENGTH returns the length of the current playlist, in -  
149 ** tracks. -  
-   258 ** IPC_GETLISTLENGTH returns the length of the current playlist as the number of tracks.
150 */ 259 */
151 260
152 261
153 #define IPC_GETLISTPOS 125 262 #define IPC_GETLISTPOS 125
154 /* (requires Winamp 2.05+) 263 /* (requires Winamp 2.05+)
155 ** int pos=SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETLISTPOS); 264 ** int pos=SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETLISTPOS);
156 ** IPC_GETLISTPOS returns the playlist position. A lot like IPC_WRITEPLAYLIST -  
157 ** only faster since it doesn't have to write out the list. Heh, silly me. -  
-   265 ** IPC_GETLISTPOS returns the current playlist position (which is shown in the playlist
-   266 ** editor as a differently coloured text entry e.g is yellow for the classic skin).
-   267 **
-   268 ** This api is a lot like IPC_WRITEPLAYLIST but a lot faster since it does not have to
-   269 ** write out the whole of the current playlist first.
158 */ 270 */
159 271
160 272
161 #define IPC_GETINFO 126 273 #define IPC_GETINFO 126
162 /* (requires Winamp 2.05+) 274 /* (requires Winamp 2.05+)
163 ** int inf=SendMessage(hwnd_winamp,WM_WA_IPC,mode,IPC_GETINFO); 275 ** int inf=SendMessage(hwnd_winamp,WM_WA_IPC,mode,IPC_GETINFO);
164 ** IPC_GETINFO returns info about the current playing song. The value 276 ** IPC_GETINFO returns info about the current playing song. The value
165 ** it returns depends on the value of 'mode'. 277 ** it returns depends on the value of 'mode'.
166 ** Mode      Meaning 278 ** Mode      Meaning
167 ** ------------------ 279 ** ------------------
168 ** 0         Samplerate (i.e. 44100) -  
-   280 ** 0         Samplerate, in kilohertz (i.e. 44)
169 ** 1         Bitrate  (i.e. 128) 281 ** 1         Bitrate  (i.e. 128)
170 ** 2         Channels (i.e. 2) 282 ** 2         Channels (i.e. 2)
171 ** 3 (5+)    Video LOWORD=w HIWORD=h 283 ** 3 (5+)    Video LOWORD=w HIWORD=h
172 ** 4 (5+)    > 65536, string (video description) 284 ** 4 (5+)    > 65536, string (video description)
-   285 ** 5 (5.25+) Samplerate, in hertz (i.e. 44100)
173 */ 286 */
174 287
175 288
176 #define IPC_GETEQDATA 127 289 #define IPC_GETEQDATA 127
177 /* (requires Winamp 2.05+) 290 /* (requires Winamp 2.05+)
Line 198... Line 311...
198 311
199   new (2.92+): 312   new (2.92+):
200     if the high byte is set to 0xDB, then the third byte specifies 313     if the high byte is set to 0xDB, then the third byte specifies
201     which band, and the bottom word specifies the value. 314     which band, and the bottom word specifies the value.
202 */ 315 */
-   316
203 317
204 #define IPC_ADDBOOKMARK 129 318 #define IPC_ADDBOOKMARK 129
-   319 #define IPC_ADDBOOKMARKW 131
205 /* (requires Winamp 2.4+) 320 /* (requires Winamp 2.4+)
206 ** Sent as a WM_COPYDATA, using IPC_ADDBOOKMARK, adds the specified -  
207 ** file/url to the Winamp bookmark list. -  
208 */ -  
209 /* -  
210 In winamp 5+, we use this as a normal WM_WA_IPC and the string: -  
211 -  
212   "filename\0title\0" -  
213 -  
214   to notify the library/bookmark editor that a bookmark -  
215 was added. Note that using this message in this context does not -  
216 actually add the bookmark. -  
217 do not use :) -  
-   321 ** This is sent as a WM_COPYDATA using IPC_ADDBOOKMARK as the dwData value and the
-   322 ** directory you want to change to as the lpData member. This will add the specified
-   323 ** file / url to the Winamp bookmark list.
-   324 **
-   325 ** COPYDATASTRUCT cds = {0};
-   326 **   cds.dwData = IPC_ADDBOOKMARK;
-   327 **   cds.lpData = (void*)"http://www.blah.com/listen.pls";
-   328 **   cds.cbData = lstrlen((char*)cds.lpData)+1; // include space for null char
-   329 **   SendMessage(hwnd_winamp,WM_COPYDATA,0,(LPARAM)&cds);
-   330 **
-   331 **
-   332 ** In Winamp 5.0+ we use this as a normal WM_WA_IPC and the string is null separated as
-   333 ** the filename and then the title of the entry.
-   334 **
-   335 ** SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)(char*)"filename\0title\0",IPC_ADDBOOKMARK);
-   336 **
-   337 ** This will notify the library / bookmark editor that a bookmark was added.
-   338 ** Note that using this message in this context does not actually add the bookmark.
-   339 ** Do not use, it is essentially just a notification type message :)
218 */ 340 */
219 341
220 342
221 #define IPC_INSTALLPLUGIN 130 343 #define IPC_INSTALLPLUGIN 130
222 /* not implemented, but if it was you could do a WM_COPYDATA with -  
223 ** a path to a .wpz, and it would install it. -  
-   344 /* This is not implemented (and is very unlikely to be done due to safety concerns).
-   345 ** If it was then you could do a WM_COPYDATA with a path to a .wpz and it would then
-   346 ** install the plugin for you.
-   347 **
-   348 ** COPYDATASTRUCT cds = {0};
-   349 **   cds.dwData = IPC_INSTALLPLUGIN;
-   350 **   cds.lpData = (void*)"c:\\path\\to\\file.wpz";
-   351 **   cds.cbData = lstrlen((char*)cds.lpData)+1; // include space for null char
-   352 **   SendMessage(hwnd_winamp,WM_COPYDATA,0,(LPARAM)&cds);
224 */ 353 */
225 354
226 355
227 #define IPC_RESTARTWINAMP 135 356 #define IPC_RESTARTWINAMP 135
228 /* (requires Winamp 2.2+) 357 /* (requires Winamp 2.2+)
229 ** SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_RESTARTWINAMP); 358 ** SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_RESTARTWINAMP);
230 ** IPC_RESTARTWINAMP will restart Winamp (isn't that obvious ? :) -  
-   359 ** IPC_RESTARTWINAMP will restart Winamp (isn't that obvious ? :) )
-   360 ** If this fails to make Winamp start after closing then there is a good chance one (or
-   361 ** more) of the currently installed plugins caused Winamp to crash on exit (either as a
-   362 ** silent crash or a full crash log report before it could call itself start again.
231 */ 363 */
232 364
233 365
234 #define IPC_ISFULLSTOP 400 366 #define IPC_ISFULLSTOP 400
235 /* (requires winamp 2.7+ I think) 367 /* (requires winamp 2.7+ I think)
236 ** ret=SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_ISFULLSTOP); -  
237 ** useful for when you're an output plugin, and you want to see -  
238 ** if the stop/close is a full stop, or just between tracks. -  
239 ** returns nonzero if it's full, zero if it's just a new track. -  
-   368 ** int ret=SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_ISFULLSTOP);
-   369 ** This is useful for when you're an output plugin and you want to see if the stop/close
-   370 ** happening is a full stop or if you are just between tracks. This returns non zero if
-   371 ** it is a full stop or zero if it is just a new track.
-   372 ** benski> i think it's actually the other way around -
-   373 **         !0 for EOF and 0 for user pressing stop
240 */ 374 */
241 375
242 376
243 #define IPC_INETAVAILABLE 242 377 #define IPC_INETAVAILABLE 242
244 /* (requires Winamp 2.05+) 378 /* (requires Winamp 2.05+)
245 ** val=SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_INETAVAILABLE); -  
246 ** IPC_INETAVAILABLE will return 1 if the Internet connection is available for Winamp. -  
-   379 ** int val=SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_INETAVAILABLE);
-   380 ** IPC_INETAVAILABLE will return 1 if an Internet connection is available for Winamp and
-   381 ** relates to the internet connection type setting on the main general preferences page
-   382 ** in the Winamp preferences.
247 */ 383 */
248 384
249 385
250 #define IPC_UPDTITLE 243 386 #define IPC_UPDTITLE 243
251 /* (requires Winamp 2.2+) 387 /* (requires Winamp 2.2+)
252 ** SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_UPDTITLE); 388 ** SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_UPDTITLE);
253 ** IPC_UPDTITLE will ask Winamp to update the informations about the current title. -  
-   389 ** IPC_UPDTITLE will ask Winamp to update the information about the current title and
-   390 ** causes GetFileInfo(..) in the input plugin associated with the current playlist entry
-   391 ** to be called. This can be called such as when an input plugin is buffering a file so
-   392 ** that it can cause the buffer percentage to appear in the playlist.
254 */ 393 */
255 394
256 395
257 #define IPC_REFRESHPLCACHE 247 396 #define IPC_REFRESHPLCACHE 247
258 /* (requires Winamp 2.2+) 397 /* (requires Winamp 2.2+)
259 ** SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_REFRESHPLCACHE); 398 ** SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_REFRESHPLCACHE);
260 ** IPC_REFRESHPLCACHE will flush the playlist cache buffer. -  
261 ** (send this if you want it to go refetch titles for tracks) -  
-   399 ** IPC_REFRESHPLCACHE will flush the playlist cache buffer and you send this if you want
-   400 ** Winamp to go refetch the titles for all of the entries in the current playlist.
-   401 **
-   402 ** 5.3+: pass a wchar_t * string in wParam, and it'll do a strnicmp() before clearing the cache
262 */ 403 */
263 404
264 405
265 #define IPC_GET_SHUFFLE 250 406 #define IPC_GET_SHUFFLE 250
266 /* (requires Winamp 2.4+) 407 /* (requires Winamp 2.4+)
267 ** val=SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GET_SHUFFLE); -  
268 ** -  
269 ** IPC_GET_SHUFFLE returns the status of the Shuffle option (1 if set) -  
-   408 ** int val=SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GET_SHUFFLE);
-   409 ** IPC_GET_SHUFFLE returns the status of the shuffle option.
-   410 ** If set then it will return 1 and if not set then it will return 0.
270 */ 411 */
271 412
272 413
273 #define IPC_GET_REPEAT 251 414 #define IPC_GET_REPEAT 251
274 /* (requires Winamp 2.4+) 415 /* (requires Winamp 2.4+)
275 ** val=SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GET_REPEAT); -  
276 ** -  
277 ** IPC_GET_REPEAT returns the status of the Repeat option (1 if set) -  
-   416 ** int val=SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GET_REPEAT);
-   417 ** IPC_GET_REPEAT returns the status of the repeat option.
-   418 ** If set then it will return 1 and if not set then it will return 0.
278 */ 419 */
279 420
280 421
281 #define IPC_SET_SHUFFLE 252 422 #define IPC_SET_SHUFFLE 252
282 /* (requires Winamp 2.4+) 423 /* (requires Winamp 2.4+)
283 ** SendMessage(hwnd_winamp,WM_WA_IPC,value,IPC_SET_SHUFFLE); 424 ** SendMessage(hwnd_winamp,WM_WA_IPC,value,IPC_SET_SHUFFLE);
284 ** -  
285 ** IPC_SET_SHUFFLE sets the status of the Shuffle option (1 to turn it on) -  
-   425 ** IPC_SET_SHUFFLE sets the status of the shuffle option.
-   426 ** If 'value' is 1 then shuffle is turned on.
-   427 ** If 'value' is 0 then shuffle is turned off.
286 */ 428 */
287 429
288 430
289 #define IPC_SET_REPEAT 253 431 #define IPC_SET_REPEAT 253
290 /* (requires Winamp 2.4+) 432 /* (requires Winamp 2.4+)
291 ** SendMessage(hwnd_winamp,WM_WA_IPC,value,IPC_SET_REPEAT); 433 ** SendMessage(hwnd_winamp,WM_WA_IPC,value,IPC_SET_REPEAT);
292 ** -  
293 ** IPC_SET_REPEAT sets the status of the Repeat option (1 to turn it on) -  
-   434 ** IPC_SET_REPEAT sets the status of the repeat option.
-   435 ** If 'value' is 1 then shuffle is turned on.
-   436 ** If 'value' is 0 then shuffle is turned off.
294 */ 437 */
295 438
296 439
297 #define IPC_ENABLEDISABLE_ALL_WINDOWS 259 // 0xdeadbeef to disable 440 #define IPC_ENABLEDISABLE_ALL_WINDOWS 259 // 0xdeadbeef to disable
298 /* (requires Winamp 2.9+) 441 /* (requires Winamp 2.9+)
299 ** SendMessage(hwnd_winamp,WM_WA_IPC,enable?0:0xdeadbeef,IPC_MBOPENREAL); -  
300 ** sending with 0xdeadbeef as the param disables all winamp windows, -  
301 ** any other values will enable all winamp windows. -  
-   442 ** SendMessage(hwnd_winamp,WM_WA_IPC,(enable?0:0xdeadbeef),IPC_ENABLEDISABLE_ALL_WINDOWS);
-   443 ** Sending this message with 0xdeadbeef as the param will disable all winamp windows and
-   444 ** any other values will enable all of the Winamp windows again. When disabled you won't
-   445 ** get any response on clicking or trying to do anything to the Winamp windows. If the
-   446 ** taskbar icon is shown then you may still have control ;)
302 */ 447 */
303 448
304 449
305 #define IPC_GETWND 260 450 #define IPC_GETWND 260
306 /* (requires Winamp 2.9+) 451 /* (requires Winamp 2.9+)
Line 310... Line 455...
310   #define IPC_GETWND_EQ 0 // use one of these for the param 455   #define IPC_GETWND_EQ 0 // use one of these for the param
311   #define IPC_GETWND_PE 1 456   #define IPC_GETWND_PE 1
312   #define IPC_GETWND_MB 2 457   #define IPC_GETWND_MB 2
313   #define IPC_GETWND_VIDEO 3 458   #define IPC_GETWND_VIDEO 3
314 #define IPC_ISWNDVISIBLE 261 // same param as IPC_GETWND 459 #define IPC_ISWNDVISIBLE 261 // same param as IPC_GETWND
315 -  
316 -  
317 460
318 461
319 /************************************************************************ 462 /************************************************************************
320 ***************** in-process only (WE LOVE PLUGINS) 463 ***************** in-process only (WE LOVE PLUGINS)
321 ************************************************************************/ 464 ************************************************************************/
322 465
323 -  
-   466 #define IPC_SETSKINW 199
324 #define IPC_SETSKIN 200 467 #define IPC_SETSKIN 200
325 /* (requires Winamp 2.04+, only usable from plug-ins (not external apps)) 468 /* (requires Winamp 2.04+, only usable from plug-ins (not external apps))
326 ** SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)"skinname",IPC_SETSKIN); 469 ** SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)"skinname",IPC_SETSKIN);
327 ** IPC_SETSKIN sets the current skin to "skinname". Note that skinname 470 ** IPC_SETSKIN sets the current skin to "skinname". Note that skinname
328 ** can be the name of a skin, a skin .zip file, with or without path. 471 ** can be the name of a skin, a skin .zip file, with or without path.
Line 330... Line 473...
330 ** directory. 473 ** directory.
331 */ 474 */
332 475
333 476
334 #define IPC_GETSKIN 201 477 #define IPC_GETSKIN 201
-   478 #define IPC_GETSKINW 1201
335 /* (requires Winamp 2.04+, only usable from plug-ins (not external apps)) 479 /* (requires Winamp 2.04+, only usable from plug-ins (not external apps))
336 ** SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)skinname_buffer,IPC_GETSKIN); 480 ** SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)skinname_buffer,IPC_GETSKIN);
337 ** IPC_GETSKIN puts the directory where skin bitmaps can be found 481 ** IPC_GETSKIN puts the directory where skin bitmaps can be found
338 ** into  skinname_buffer. 482 ** into  skinname_buffer.
339 ** skinname_buffer must be MAX_PATH characters in length. 483 ** skinname_buffer must be MAX_PATH characters in length.
Line 352... Line 496...
352 ** "C:\\dir\\vis_whatever.dll,1" 496 ** "C:\\dir\\vis_whatever.dll,1"
353 */ 497 */
354 498
355 499
356 #define IPC_GETPLAYLISTFILE 211 500 #define IPC_GETPLAYLISTFILE 211
-   501 #define IPC_GETPLAYLISTFILEW 214
357 /* (requires Winamp 2.04+, only usable from plug-ins (not external apps)) 502 /* (requires Winamp 2.04+, only usable from plug-ins (not external apps))
358 ** char *name=SendMessage(hwnd_winamp,WM_WA_IPC,index,IPC_GETPLAYLISTFILE); 503 ** char *name=SendMessage(hwnd_winamp,WM_WA_IPC,index,IPC_GETPLAYLISTFILE);
359 ** IPC_GETPLAYLISTFILE gets the filename of the playlist entry [index]. 504 ** IPC_GETPLAYLISTFILE gets the filename of the playlist entry [index].
360 ** returns a pointer to it. returns NULL on error. 505 ** returns a pointer to it. returns NULL on error.
361 */ 506 */
362 507
363 508
364 #define IPC_GETPLAYLISTTITLE 212 509 #define IPC_GETPLAYLISTTITLE 212
-   510 #define IPC_GETPLAYLISTTITLEW 213
365 /* (requires Winamp 2.04+, only usable from plug-ins (not external apps)) 511 /* (requires Winamp 2.04+, only usable from plug-ins (not external apps))
366 ** char *name=SendMessage(hwnd_winamp,WM_WA_IPC,index,IPC_GETPLAYLISTTITLE); 512 ** char *name=SendMessage(hwnd_winamp,WM_WA_IPC,index,IPC_GETPLAYLISTTITLE);
367 ** 513 **
368 ** IPC_GETPLAYLISTTITLE gets the title of the playlist entry [index]. 514 ** IPC_GETPLAYLISTTITLE gets the title of the playlist entry [index].
369 ** returns a pointer to it. returns NULL on error. 515 ** returns a pointer to it. returns NULL on error.
Line 376... Line 522...
376 ** the function should be: 522 ** the function should be:
377 ** int (*httpRetrieveFile)(HWND hwnd, char *url, char *file, char *dlgtitle); 523 ** int (*httpRetrieveFile)(HWND hwnd, char *url, char *file, char *dlgtitle);
378 ** if you call this function, with a parent window, a URL, an output file, and a dialog title, 524 ** if you call this function, with a parent window, a URL, an output file, and a dialog title,
379 ** it will return 0 on successful download, 1 on error. 525 ** it will return 0 on successful download, 1 on error.
380 */ 526 */
-   527
-   528
-   529 #define IPC_GETHTTPGETTERW 1240
-   530 /* int (*httpRetrieveFileW)(HWND hwnd, char *url, wchar_t *file, wchar_t *dlgtitle); */
381 531
382 532
383 #define IPC_MBOPEN 241 533 #define IPC_MBOPEN 241
384 /* (requires Winamp 2.05+) 534 /* (requires Winamp 2.05+)
385 ** SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_MBOPEN); 535 ** SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_MBOPEN);
386 ** SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)url,IPC_MBOPEN); 536 ** SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)url,IPC_MBOPEN);
387 ** IPC_MBOPEN will open a new URL in the minibrowser. if url is NULL, it will open the Minibrowser window. 537 ** IPC_MBOPEN will open a new URL in the minibrowser. if url is NULL, it will open the Minibrowser window.
388 */ 538 */
389 -  
390 539
391 540
392 #define IPC_CHANGECURRENTFILE 245 541 #define IPC_CHANGECURRENTFILE 245
393 /* (requires Winamp 2.05+) 542 /* (requires Winamp 2.05+)
394 ** SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)file,IPC_CHANGECURRENTFILE); 543 ** SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)file,IPC_CHANGECURRENTFILE);
395 ** IPC_CHANGECURRENTFILE will set the current playlist item. 544 ** IPC_CHANGECURRENTFILE will set the current playlist item.
-   545 */
-   546
-   547
-   548 #define IPC_CHANGECURRENTFILEW 1245
-   549 /* (requires Winamp 5.3+)
-   550 ** SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)file,IPC_CHANGECURRENTFILEW);
-   551 ** IPC_CHANGECURRENTFILEW will set the current playlist item.
396 */ 552 */
397 553
398 554
399 #define IPC_GETMBURL 246 555 #define IPC_GETMBURL 246
400 /* (requires Winamp 2.2+) 556 /* (requires Winamp 2.2+)
Line 409... Line 565...
409 /* (requires Winamp 2.4+) 565 /* (requires Winamp 2.4+)
410 ** SendMessage(hwnd_winamp,WM_WA_IPC,value,IPC_MBBLOCK); 566 ** SendMessage(hwnd_winamp,WM_WA_IPC,value,IPC_MBBLOCK);
411 ** 567 **
412 ** IPC_MBBLOCK will block the Minibrowser from updates if value is set to 1 568 ** IPC_MBBLOCK will block the Minibrowser from updates if value is set to 1
413 */ 569 */
-   570
414 571
415 #define IPC_MBOPENREAL 249 572 #define IPC_MBOPENREAL 249
416 /* (requires Winamp 2.4+) 573 /* (requires Winamp 2.4+)
417 ** SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)url,IPC_MBOPENREAL); 574 ** SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)url,IPC_MBOPENREAL);
418 ** 575 **
419 ** IPC_MBOPENREAL works the same as IPC_MBOPEN except that it will works even if 576 ** IPC_MBOPENREAL works the same as IPC_MBOPEN except that it will works even if
420 ** IPC_MBBLOCK has been set to 1 577 ** IPC_MBBLOCK has been set to 1
421 */ 578 */
-   579
422 580
423 #define IPC_ADJUST_OPTIONSMENUPOS 280 581 #define IPC_ADJUST_OPTIONSMENUPOS 280
424 /* (requires Winamp 2.9+) 582 /* (requires Winamp 2.9+)
425 ** int newpos=SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)adjust_offset,IPC_ADJUST_OPTIONSMENUPOS); 583 ** int newpos=SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)adjust_offset,IPC_ADJUST_OPTIONSMENUPOS);
426 ** moves where winamp expects the Options menu in the main menu. Useful if you wish to insert a 584 ** moves where winamp expects the Options menu in the main menu. Useful if you wish to insert a
427 ** menu item above the options/skins/vis menus. 585 ** menu item above the options/skins/vis menus.
428 */ 586 */
-   587
429 588
430 #define IPC_GET_HMENU 281 589 #define IPC_GET_HMENU 281
431 /* (requires Winamp 2.9+) 590 /* (requires Winamp 2.9+)
432 ** HMENU hMenu=SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)0,IPC_GET_HMENU); 591 ** HMENU hMenu=SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)0,IPC_GET_HMENU);
433 ** values for data: 592 ** values for data:
Line 436... Line 595...
436 ** 2 : main menubar options menu 595 ** 2 : main menubar options menu
437 ** 3 : main menubar windows menu 596 ** 3 : main menubar windows menu
438 ** 4 : main menubar help menu 597 ** 4 : main menubar help menu
439 ** other values will return NULL. 598 ** other values will return NULL.
440 */ 599 */
-   600
441 601
442 #define IPC_GET_EXTENDED_FILE_INFO 290 //pass a pointer to the following struct in wParam 602 #define IPC_GET_EXTENDED_FILE_INFO 290 //pass a pointer to the following struct in wParam
443 #define IPC_GET_EXTENDED_FILE_INFO_HOOKABLE 296 603 #define IPC_GET_EXTENDED_FILE_INFO_HOOKABLE 296
444 /* (requires Winamp 2.9+) 604 /* (requires Winamp 2.9+)
445 ** to use, create an extendedFileInfoStruct, point the values filename and metadata to the 605 ** to use, create an extendedFileInfoStruct, point the values filename and metadata to the
Line 447... Line 607...
447 ** length of that buffer, and then SendMessage(hwnd_winamp,WM_WA_IPC,&struct,IPC_GET_EXTENDED_FILE_INFO); 607 ** length of that buffer, and then SendMessage(hwnd_winamp,WM_WA_IPC,&struct,IPC_GET_EXTENDED_FILE_INFO);
448 ** the results should be in the buffer pointed to by ret. 608 ** the results should be in the buffer pointed to by ret.
449 ** returns 1 if the decoder supports a getExtendedFileInfo method 609 ** returns 1 if the decoder supports a getExtendedFileInfo method
450 */ 610 */
451 typedef struct { 611 typedef struct {
452   char *filename; -  
453   char *metadata; -  
-   612   const char *filename;
-   613   const char *metadata;
454   char *ret; 614   char *ret;
455   int retlen; -  
-   615   size_t retlen;
456 } extendedFileInfoStruct; 616 } extendedFileInfoStruct;
-   617
457 618
458 #define IPC_GET_BASIC_FILE_INFO 291 //pass a pointer to the following struct in wParam 619 #define IPC_GET_BASIC_FILE_INFO 291 //pass a pointer to the following struct in wParam
459 typedef struct { 620 typedef struct {
460   char *filename; -  
-   621   const char *filename;
461 622
462   int quickCheck; // set to 0 to always get, 1 for quick, 2 for default (if 2, quickCheck will be set to 0 if quick wasnot used) 623   int quickCheck; // set to 0 to always get, 1 for quick, 2 for default (if 2, quickCheck will be set to 0 if quick wasnot used)
463 624
464   // filled in by winamp 625   // filled in by winamp
465   int length; 626   int length;
466   char *title; 627   char *title;
467   int titlelen; 628   int titlelen;
468 } basicFileInfoStruct; 629 } basicFileInfoStruct;
-   630
-   631
-   632 #define IPC_GET_BASIC_FILE_INFOW 1291 //pass a pointer to the following struct in wParam
-   633 typedef struct {
-   634   const wchar_t *filename;
-   635
-   636   int quickCheck; // set to 0 to always get, 1 for quick, 2 for default (if 2, quickCheck will be set to 0 if quick wasnot used)
-   637
-   638   // filled in by winamp
-   639   int length;
-   640   wchar_t *title;
-   641   int titlelen;
-   642 } basicFileInfoStructW;
-   643
469 644
470 #define IPC_GET_EXTLIST 292 //returns doublenull delimited. GlobalFree() it when done. if data is 0, returns raw extlist, if 1, returns something suitable for getopenfilename 645 #define IPC_GET_EXTLIST 292 //returns doublenull delimited. GlobalFree() it when done. if data is 0, returns raw extlist, if 1, returns something suitable for getopenfilename
-   646 #define IPC_GET_EXTLISTW 1292 // wide char version of above
-   647
471 648
472 #define IPC_INFOBOX 293 649 #define IPC_INFOBOX 293
473 typedef struct { 650 typedef struct {
474   HWND parent; 651   HWND parent;
475   char *filename; 652   char *filename;
476 } infoBoxParam; 653 } infoBoxParam;
-   654
-   655
-   656 #define IPC_INFOBOXW 1293
-   657 typedef struct {
-   658   HWND parent;
-   659   const wchar_t *filename;
-   660 } infoBoxParamW;
-   661
477 662
478 #define IPC_SET_EXTENDED_FILE_INFO 294 //pass a pointer to the a extendedFileInfoStruct in wParam 663 #define IPC_SET_EXTENDED_FILE_INFO 294 //pass a pointer to the a extendedFileInfoStruct in wParam
479 /* (requires Winamp 2.9+) 664 /* (requires Winamp 2.9+)
480 ** to use, create an extendedFileInfoStruct, point the values filename and metadata to the 665 ** to use, create an extendedFileInfoStruct, point the values filename and metadata to the
481 ** filename and metadata field you wish to write in ret. (retlen is not used). and then 666 ** filename and metadata field you wish to write in ret. (retlen is not used). and then
482 ** SendMessage(hwnd_winamp,WM_WA_IPC,&struct,IPC_SET_EXTENDED_FILE_INFO); 667 ** SendMessage(hwnd_winamp,WM_WA_IPC,&struct,IPC_SET_EXTENDED_FILE_INFO);
483 ** returns 1 if the metadata is supported 668 ** returns 1 if the metadata is supported
484 ** Call IPC_WRITE_EXTENDED_FILE_INFO once you're done setting all the metadata you want to update 669 ** Call IPC_WRITE_EXTENDED_FILE_INFO once you're done setting all the metadata you want to update
485 */ 670 */
-   671
486 672
487 #define IPC_WRITE_EXTENDED_FILE_INFO 295 673 #define IPC_WRITE_EXTENDED_FILE_INFO 295
488 /* (requires Winamp 2.9+) 674 /* (requires Winamp 2.9+)
489 ** writes all the metadata set thru IPC_SET_EXTENDED_FILE_INFO to the file 675 ** writes all the metadata set thru IPC_SET_EXTENDED_FILE_INFO to the file
490 ** returns 1 if the file has been successfully updated, 0 if error 676 ** returns 1 if the file has been successfully updated, 0 if error
491 */ 677 */
-   678
492 679
493 #define IPC_FORMAT_TITLE 297 680 #define IPC_FORMAT_TITLE 297
494 typedef struct 681 typedef struct
495 { 682 {
496   char *spec; // NULL=default winamp spec 683   char *spec; // NULL=default winamp spec
497   void *p; 684   void *p;
498 685
499   char *out; 686   char *out;
500   int out_len; 687   int out_len;
501 688
502   char * (*TAGFUNC)(char * tag, void * p); //return 0 if not found -  
-   689   char * (*TAGFUNC)(const char * tag, void * p); //return 0 if not found
503   void (*TAGFREEFUNC)(char * tag,void * p); 690   void (*TAGFREEFUNC)(char * tag,void * p);
504 } waFormatTitle; 691 } waFormatTitle;
505 692
506 #define IPC_GETUNCOMPRESSINTERFACE 331 -  
507 /* returns a function pointer to uncompress(). -  
508 ** int (*uncompress)(unsigned char *dest, unsigned long *destLen, const unsigned char *source, unsigned long sourceLen); -  
509 ** right out of zlib, useful for decompressing zlibbed data. -  
510 ** if you pass the parm of 0x10100000, it will return a wa_inflate_struct * to an inflate API. -  
511 */ -  
-   693
-   694 #define IPC_FORMAT_TITLE_EXTENDED 298 // similiar to IPC_FORMAT_TITLE, but falls back to Winamp's %tags% if your passed tag function doesn't handle it
-   695 typedef struct
-   696 {
-   697   const wchar_t *filename;
-   698   int useExtendedInfo; // set to 1 if you want the Title Formatter to query the input plugins for any tags that your tag function fails on
-   699   const wchar_t *spec; // NULL=default winamp spec
-   700   void *p;
-   701
-   702   wchar_t *out;
-   703   int out_len;
-   704
-   705   wchar_t * (*TAGFUNC)(const wchar_t * tag, void * p); //return 0 if not found, -1 for empty tag
-   706   void (*TAGFREEFUNC)(wchar_t *tag, void *p);
-   707 } waFormatTitleExtended;
-   708
-   709
-   710 #define IPC_COPY_EXTENDED_FILE_INFO 299
-   711 typedef struct
-   712 {
-   713   const char *source;
-   714   const char *dest;
-   715 } copyFileInfoStruct;
-   716
-   717
-   718 #define IPC_COPY_EXTENDED_FILE_INFOW 1299
-   719 typedef struct
-   720 {
-   721   const wchar_t *source;
-   722   const wchar_t *dest;
-   723 } copyFileInfoStructW;
-   724
512 725
513 typedef struct { 726 typedef struct {
514   int (*inflateReset)(void *strm); 727   int (*inflateReset)(void *strm);
515   int (*inflateInit_)(void *strm,const char *version, int stream_size); 728   int (*inflateInit_)(void *strm,const char *version, int stream_size);
516   int (*inflate)(void *strm, int flush); 729   int (*inflate)(void *strm, int flush);
517   int (*inflateEnd)(void *strm); 730   int (*inflateEnd)(void *strm);
518   unsigned long (*crc32)(unsigned long crc, const unsigned  char *buf, unsigned int len); 731   unsigned long (*crc32)(unsigned long crc, const unsigned  char *buf, unsigned int len);
519 } wa_inflate_struct; 732 } wa_inflate_struct;
520 733
-   734 #define IPC_GETUNCOMPRESSINTERFACE 331
-   735 /* returns a function pointer to uncompress().
-   736 ** int (*uncompress)(unsigned char *dest, unsigned long *destLen, const unsigned char *source, unsigned long sourceLen);
-   737 ** right out of zlib, useful for decompressing zlibbed data.
-   738 ** if you pass the parm of 0x10100000, it will return a wa_inflate_struct * to an inflate API.
-   739 */
-   740
-   741
-   742 typedef struct _prefsDlgRec {
-   743   HINSTANCE hInst;  // dll instance containing the dialog resource
-   744   int dlgID;        // resource identifier of the dialog
-   745   void *proc;       // window proceedure for handling the dialog defined as
-   746                     // LRESULT CALLBACK PrefsPage(HWND,UINT,WPARAM,LPARAM)
-   747
-   748   char *name;       // name shown for the prefs page in the treelist
-   749   intptr_t where;   // section in the treelist the prefs page is to be added to
-   750                     // 0 for General Preferences
-   751                     // 1 for Plugins
-   752                     // 2 for Skins
-   753                     // 3 for Bookmarks (no longer in the 5.0+ prefs)
-   754                     // 4 for Prefs     (the old 'Setup' section - no longer in 5.0+)
-   755
-   756   intptr_t _id;
-   757   struct _prefsDlgRec *next; // no longer implemented as a linked list, now used by Winamp for other means
-   758 } prefsDlgRec;
-   759
-   760 typedef struct _prefsDlgRecW {
-   761   HINSTANCE hInst;  // dll instance containing the dialog resource
-   762   int dlgID;        // resource identifier of the dialog
-   763   void *proc;       // window proceedure for handling the dialog defined as
-   764                     // LRESULT CALLBACK PrefsPage(HWND,UINT,WPARAM,LPARAM)
-   765
-   766   wchar_t *name;    // name shown for the prefs page in the treelist
-   767   intptr_t where;   // section in the treelist the prefs page is to be added to
-   768                     // 0 for General Preferences
-   769                     // 1 for Plugins
-   770                     // 2 for Skins
-   771                     // 3 for Bookmarks (no longer in the 5.0+ prefs)
-   772                     // 4 for Prefs     (the old 'Setup' section - no longer in 5.0+)
-   773
-   774   intptr_t _id;
-   775   struct _prefsDlgRec *next; // no longer implemented as a linked list, now used by Winamp for other means
-   776 } prefsDlgRecW;
521 777
522 #define IPC_ADD_PREFS_DLG 332 778 #define IPC_ADD_PREFS_DLG 332
-   779 #define IPC_ADD_PREFS_DLGW 1332
523 #define IPC_REMOVE_PREFS_DLG 333 780 #define IPC_REMOVE_PREFS_DLG 333
524 /* (requires Winamp 2.9+) 781 /* (requires Winamp 2.9+)
525 ** to use, allocate a prefsDlgRec structure (either on the heap or some global -  
526 ** data, but NOT on the stack), initialze the members: -  
527 ** hInst to the DLL instance where the resource is located -  
528 ** dlgID to the ID of the dialog, -  
529 ** proc to the window procedure for the dialog -  
530 ** name to the name of the prefs page in the prefs. -  
531 ** where to 0 (eventually we may add more options) -  
532 ** then, SendMessage(hwnd_winamp,WM_WA_IPC,&prefsRec,IPC_ADD_PREFS_DLG); -  
-   782 ** SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)&prefsRec,IPC_ADD_PREFS_DLG);
-   783 ** SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)&prefsRec,IPC_REMOVE_PREFS_DLG);
533 ** 784 **
534 ** you can also IPC_REMOVE_PREFS_DLG with the address of the same prefsRec, -  
535 ** but you shouldn't really ever have to. -  
-   785 ** IPC_ADD_PREFS_DLG:
-   786 ** To use this you need to allocate a prefsDlgRec structure (either on the heap or with
-   787 ** some global data but NOT on the stack) and then initialise the members of the structure
-   788 ** (see the definition of the prefsDlgRec structure above).
536 ** 789 **
-   790 **   hInst  -  dll instance of where the dialog resource is located.
-   791 **   dlgID  -  id of the dialog resource.
-   792 **   proc   -  dialog window procedure for the prefs dialog.
-   793 **   name   -  name of the prefs page as shown in the preferences list.
-   794 **   where  -  see above for the valid locations the page can be added.
-   795 **
-   796 ** Then you do SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)&prefsRec,IPC_ADD_PREFS_DLG);
-   797 **
-   798 ** example:
-   799 **
-   800 ** prefsDlgRec* prefsRec = 0;
-   801 **   prefsRec = GlobalAlloc(GPTR,sizeof(prefsDlgRec));
-   802 **   prefsRec->hInst = hInst;
-   803 **   prefsRec->dlgID = IDD_PREFDIALOG;
-   804 **   prefsRec->name = "Pref Page";
-   805 **   prefsRec->where = 0;
-   806 **   prefsRec->proc = PrefsPage;
-   807 **   SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)&prefsRec,IPC_ADD_PREFS_DLG);
-   808 **
-   809 **
-   810 ** IPC_REMOVE_PREFS_DLG:
-   811 ** To use you pass the address of the same prefsRec you used when adding the prefs page
-   812 ** though you shouldn't really ever have to do this but it's good to clean up after you
-   813 ** when you're plugin is being unloaded.
-   814 **
-   815 ** SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)&prefsRec,IPC_REMOVE_PREFS_DLG);
-   816 **
-   817 ** IPC_ADD_PREFS_DLGW
-   818 ** requires Winamp 5.53+
537 */ 819 */
538 #define IPC_OPENPREFSTOPAGE 380 // pass an id of a builtin page, or a &prefsDlgRec of prefs page to open -  
539 820
540 typedef struct _prefsDlgRec { -  
541   HINSTANCE hInst; -  
542   int dlgID; -  
543   void *proc; -  
544 821
545   char *name; -  
546   int where; // 0 for options, 1 for plugins, 2 for skins, 3 for bookmarks, 4 for prefs -  
-   822 #define IPC_OPENPREFSTOPAGE 380
-   823 /* SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)&prefsRec,IPC_OPENPREFSTOPAGE);
-   824 **
-   825 ** There are two ways of opening a preferences page.
-   826 **
-   827 ** The first is to pass an id of a builtin preferences page (see below for ids) or a
-   828 ** &prefsDlgRec of the preferences page to open and this is normally done if you are
-   829 ** opening a prefs page you added yourself.
-   830 **
-   831 ** If the page id does not or the &prefsRec is not valid then the prefs dialog will be
-   832 ** opened to the first page available (usually the Winamp Pro page).
-   833 **
-   834 ** (requires Winamp 5.04+)
-   835 ** Passing -1 for param will open the preferences dialog to the last page viewed.
-   836 **
-   837 ** Note: v5.0 to 5.03 had a bug in this api
-   838 **      
-   839 ** On the first call then the correct prefs page would be opened to but on the next call
-   840 ** the prefs dialog would be brought to the front but the page would not be changed to the
-   841 ** specified.
-   842 ** In 5.04+ it will change to the prefs page specified if the prefs dialog is already open.
-   843 */
547 844
-   845 /* Builtin Preference page ids (valid for 5.0+)
-   846 ** (stored in the lParam member of the TVITEM structure from the tree item)
-   847 **
-   848 ** These can be useful if you want to detect a specific prefs page and add things to it
-   849 ** yourself or something like that ;)
-   850 **
-   851 ** Winamp Pro           20
-   852 ** General Preferences  0
-   853 ** File Types           1
-   854 ** Playlist             23
-   855 ** Titles               21
-   856 ** Playback             42 (added in 5.25)
-   857 ** Station Info         41 (added in 5.11 & removed in 5.5)
-   858 ** Video                24
-   859 ** Localization         25 (added in 5.5)
-   860 ** Skins                40
-   861 ** Classic Skins        22
-   862 ** Plugins              30
-   863 ** Input                31
-   864 ** Output               32
-   865 ** Visualisation        33
-   866 ** DSP/Effect           34
-   867 ** General Purpose      35
-   868 **
-   869 ** Note:
-   870 ** Custom page ids begin from 60
-   871 ** The value of the normal custom pages (Global Hotkeys, Jump To File, etc) is not
-   872 ** guaranteed since it depends on the order in which the plugins are loaded which can
-   873 ** change on different systems.
-   874 **
-   875 ** Global Hotkeys, Jump To File, Media Library (under General Preferences and child pages),
-   876 ** Media Library (under Plugins), Portables, CD Ripping and Modern Skins are custom pages
-   877 ** created by the plugins shipped with Winamp.
-   878 */
548 879
549   int _id; -  
550   struct _prefsDlgRec *next; -  
551 } prefsDlgRec; -  
552 880
-   881 #define IPC_GETINIFILE 334
-   882 /* (requires Winamp 2.9+)
-   883 ** char *ini=(char*)SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETINIFILE);
-   884 ** This returns a pointer to the full file path of winamp.ini.
-   885 **
-   886 ** char ini_path[MAX_PATH] = {0};
-   887 **
-   888 ** void GetIniFilePath(HWND hwnd){
-   889 **   if(SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETVERSION) >= 0x2900){
-   890 **     // this gets the string of the full ini file path
-   891 **     lstrcpyn(ini_path,(char*)SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETINIFILE),sizeof(ini_path));
-   892 **   }
-   893 **   else{
-   894 **   char* p = ini_path;
-   895 **     p += GetModuleFileName(0,ini_path,sizeof(ini_path)) - 1;
-   896 **     while(p && *p != '.'){p--;}
-   897 **     lstrcpyn(p+1,"ini",sizeof(ini_path));
-   898 **   }
-   899 ** }
-   900 */
-   901
-   902
-   903 #define IPC_GETINIDIRECTORY 335
-   904 /* (requires Winamp 2.9+)
-   905 ** char *dir=(char*)SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETINIDIRECTORY);
-   906 ** This returns a pointer to the directory where winamp.ini can be found and is
-   907 ** useful if you want store config files but you don't want to use winamp.ini.
-   908 */
-   909
-   910
-   911 #define IPC_GETPLUGINDIRECTORY 336
-   912 /* (requires Winamp 5.11+)
-   913 ** char *plugdir=(char*)SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETPLUGINDIRECTORY);
-   914 ** This returns a pointer to the directory where Winamp has its plugins stored and is
-   915 ** useful if you want store config files in plugins.ini in the plugins folder or for
-   916 ** accessing any local files in the plugins folder.
-   917 */
-   918
-   919
-   920 #define IPC_GETM3UDIRECTORY 337
-   921 /* (requires Winamp 5.11+)
-   922 ** char *m3udir=(char*)SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETM3UDIRECTORY);
-   923 ** This returns a pointer to the directory where winamp.m3u (and winamp.m3u8 if supported) is stored in.
-   924 */
-   925
-   926
-   927 #define IPC_GETM3UDIRECTORYW 338
-   928 /* (requires Winamp 5.3+)
-   929 ** wchar_t *m3udirW=(wchar_t*)SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETM3UDIRECTORYW);
-   930 ** This returns a pointer to the directory where winamp.m3u (and winamp.m3u8 if supported) is stored in.
-   931 */
553 932
554 #define IPC_GETINIFILE 334 // returns a pointer to winamp.ini -  
555 #define IPC_GETINIDIRECTORY 335 // returns a pointer to the directory to put config files in (if you dont want to use winamp.ini) -  
556 933
557 #define IPC_SPAWNBUTTONPOPUP 361 // param = 934 #define IPC_SPAWNBUTTONPOPUP 361 // param =
558 // 0 = eject 935 // 0 = eject
559 // 1 = previous 936 // 1 = previous
560 // 2 = next 937 // 2 = next
561 // 3 = pause 938 // 3 = pause
562 // 4 = play 939 // 4 = play
563 // 5 = stop 940 // 5 = stop
564 941
565 #define IPC_OPENURLBOX 360 // pass a HWND to a parent, returns a HGLOBAL that needs to be freed with GlobalFree(), if successful -  
566 #define IPC_OPENFILEBOX 362 // pass a HWND to a parent -  
567 #define IPC_OPENDIRBOX 363 // pass a HWND to a parent -  
568 942
569 // pass an HWND to a parent. call this if you take over the whole UI so that the dialogs are not appearing on the -  
570 // bottom right of the screen since the main winamp window is at 3000x3000, call again with NULL to reset -  
571 #define IPC_SETDIALOGBOXPARENT 364 -  
-   943 #define IPC_OPENURLBOX 360
-   944 /* (requires Winamp 5.0+)
-   945 ** HGLOBAL hglobal = (HGLOBAL)SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)(HWND)parent,IPC_OPENURLBOX);
-   946 ** You pass a hwnd for the dialog to be parented to (which modern skin support uses).
-   947 ** This will return a HGLOBAL that needs to be freed with GlobalFree() if this worked.
-   948 */
-   949
-   950
-   951 #define IPC_OPENFILEBOX 362
-   952 /* (requires Winamp 5.0+)
-   953 ** SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)(HWND)parent,IPC_OPENFILEBOX);
-   954 ** You pass a hwnd for the dialog to be parented to (which modern skin support uses).
-   955 */
-   956
-   957
-   958 #define IPC_OPENDIRBOX 363
-   959 /* (requires Winamp 5.0+)
-   960 ** SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)(HWND)parent,IPC_OPENDIRBOX);
-   961 ** You pass a hwnd for the dialog to be parented to (which modern skin support uses).
-   962 */
-   963
-   964
-   965 #define IPC_SETDIALOGBOXPARENT 364
-   966 /* (requires Winamp 5.0+)
-   967 ** SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)(HWND)parent,IPC_SETDIALOGBOXPARENT);
-   968 ** Pass 'parent' as the window which will be used as the parent for a number of the built
-   969 ** in Winamp dialogs and is useful when you are taking over the whole of the UI so that
-   970 ** the dialogs will not appear at the bottom right of the screen since the main winamp
-   971 ** window is located at 3000x3000 by gen_ff when this is used.  Call this again with
-   972 ** parent = null to reset the parent back to the orginal Winamp window.
-   973 */
-   974
-   975 #define IPC_GETDIALOGBOXPARENT 365
-   976 /* (requires Winamp 5.51+)
-   977 ** HWND hwndParent = SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)0, IPC_GETDIALOGBOXPARENT);
-   978 ** hwndParent can/must be passed to all modal dialogs (including MessageBox) thats uses winamp as a parent
-   979 */
-   980
-   981 #define IPC_UPDATEDIALOGBOXPARENT 366
-   982 /* (requires Winamp 5.53+)
-   983 ** if you previous called IPC_SETDIALOGBOXPARENT, call this every time your window resizes
-   984 */
-   985
-   986 #define IPC_DRO_MIN 401 // reserved for DrO
-   987 #define IPC_SET_JTF_COMPARATOR 409
-   988 /* pass me an int (__cdecl *)(const char *, const char *) in wParam */
-   989 #define IPC_SET_JTF_COMPARATOR_W 410
-   990 /* pass me an int (__cdecl *)(const wchar_t *, const wchar_t *) in wParam ... maybe someday :) */
-   991 #define IPC_SET_JTF_DRAWTEXT 416
572 992
-   993 #define IPC_DRO_MAX 499
573 994
574 995
575 // pass 0 for a copy of the skin HBITMAP 996 // pass 0 for a copy of the skin HBITMAP
576 // pass 1 for name of font to use for playlist editor likeness 997 // pass 1 for name of font to use for playlist editor likeness
577 // pass 2 for font charset 998 // pass 2 for font charset
578 // pass 3 for font size 999 // pass 3 for font size
579 #define IPC_GET_GENSKINBITMAP 503 1000 #define IPC_GET_GENSKINBITMAP 503
580 1001
581 1002
582 #define IPC_GET_EMBEDIF 505 // pass an embedWindowState -  
583 // returns an HWND embedWindow(embedWindowState *); if the data is NULL, otherwise returns the HWND directly -  
584 typedef struct 1003 typedef struct
585 { 1004 {
586   HWND me; //hwnd of the window 1005   HWND me; //hwnd of the window
587 1006
588   int flags; -  
-   1007   #define EMBED_FLAGS_NORESIZE 0x1
-   1008   // set this bit to keep window from being resizable
589 1009
590   RECT r; -  
-   1010   #define EMBED_FLAGS_NOTRANSPARENCY 0x2
-   1011   // set this bit to make gen_ff turn transparency off for this window
591 1012
592   void *user_ptr; // for application use -  
-   1013   #define EMBED_FLAGS_NOWINDOWMENU 0x4
-   1014   // set this bit to prevent gen_ff from automatically adding your window to the right-click menu
593 1015
594   int extra_data[64]; // for internal winamp use -  
-   1016   #define EMBED_FLAGS_GUID 0x8
-   1017   // (5.31+) call SET_EMBED_GUID(yourEmbedWindowStateStruct, GUID) to define a GUID for this window
-   1018
-   1019   #define SET_EMBED_GUID(windowState, windowGUID) { windowState->flags |= EMBED_FLAGS_GUID; *((GUID *)&windowState->extra_data[4])=windowGUID; }
-   1020   #define GET_EMBED_GUID(windowState) (*((GUID *)&windowState->extra_data[4]))
-   1021
-   1022   int flags;  // see above
-   1023
-   1024   RECT r;
-   1025   void *user_ptr;       // for application use
-   1026   int extra_data[64];   // for internal winamp use
595 } embedWindowState; 1027 } embedWindowState;
596 1028
597 #define EMBED_FLAGS_NORESIZE 1 // set this bit in embedWindowState.flags to keep window from being resizable -  
598 #define EMBED_FLAGS_NOTRANSPARENCY 2 // set this bit in embedWindowState.flags to make gen_ff turn transparency off for this wnd -  
-   1029 #define IPC_GET_EMBEDIF 505
-   1030 /* (requires Winamp 2.9+)
-   1031 ** HWND myframe = (HWND)SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)&wa_wnd,IPC_GET_EMBEDIF);
-   1032 **
-   1033 ** or
-   1034 **
-   1035 ** HWND myframe = 0;
-   1036 ** HWND (*embed)(embedWindowState *params)=0;
-   1037 **   *(void**)&embed = (void*)SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GET_EMBEDIF);
-   1038 **   myframe = embed(&wa_wnd);
-   1039 **
-   1040 ** You pass an embedWindowState* and it will return a hwnd for the frame window or if you
-   1041 ** pass wParam as null then it will return a HWND embedWindow(embedWindowState *);
-   1042 */
-   1043
-   1044 #define IPC_SKINWINDOW  534
-   1045
-   1046 typedef struct __SKINWINDOWPARAM
-   1047 {
-   1048         HWND hwndToSkin;
-   1049         GUID windowGuid;
-   1050 } SKINWINDOWPARAM;
-   1051
599 1052
600 1053
601 #define IPC_EMBED_ENUM 532 1054 #define IPC_EMBED_ENUM 532
602 typedef struct embedEnumStruct 1055 typedef struct embedEnumStruct
603 { 1056 {
604   int (*enumProc)(embedWindowState *ws, struct embedEnumStruct *param); // return 1 to abort 1057   int (*enumProc)(embedWindowState *ws, struct embedEnumStruct *param); // return 1 to abort
605   int user_data; // or more :) 1058   int user_data; // or more :)
606 } embedEnumStruct; 1059 } embedEnumStruct;
607   // pass 1060   // pass
-   1061
608 1062
609 #define IPC_EMBED_ISVALID 533 1063 #define IPC_EMBED_ISVALID 533
-   1064 /* (requires Winamp 2.9+)
-   1065 ** int valid = SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)embedhwnd,IPC_EMBED_ISVALID);
-   1066 ** Pass a hwnd in the wParam to this to check if the hwnd is a valid embed window or not.
-   1067 */
-   1068
610 1069
611 #define IPC_CONVERTFILE 506 1070 #define IPC_CONVERTFILE 506
612 /* (requires Winamp 2.92+) 1071 /* (requires Winamp 2.92+)
613 ** Converts a given file to a different format (PCM, MP3, etc...) 1072 ** Converts a given file to a different format (PCM, MP3, etc...)
614 ** To use, pass a pointer to a waFileConvertStruct struct 1073 ** To use, pass a pointer to a waFileConvertStruct struct
Line 625... Line 1084...
625 */ 1084 */
626 typedef struct 1085 typedef struct
627 { 1086 {
628   char *sourcefile;  // "c:\\source.mp3" 1087   char *sourcefile;  // "c:\\source.mp3"
629   char *destfile;    // "c:\\dest.pcm" 1088   char *destfile;    // "c:\\dest.pcm"
630   int destformat[8]; // like 'PCM ',srate,nch,bps -  
-   1089   intptr_t destformat[8]; // like 'PCM ',srate,nch,bps.
-   1090   //hack alert! you can set destformat[6]=mmioFOURCC('I','N','I',' '); and destformat[7]=(int)my_ini_file; (where my_ini_file is a char*)
631   HWND callbackhwnd; // window that will receive the IPC_CB_CONVERT notification messages 1091   HWND callbackhwnd; // window that will receive the IPC_CB_CONVERT notification messages
632   1092  
633   //filled in by winamp.exe 1093   //filled in by winamp.exe
634   char *error;        //if IPC_CONVERTFILE returns 0, the reason will be here 1094   char *error;        //if IPC_CONVERTFILE returns 0, the reason will be here
635 1095
636   int bytes_done;     //you can look at both of these values for speed statistics 1096   int bytes_done;     //you can look at both of these values for speed statistics
637   int bytes_total; 1097   int bytes_total;
638   int bytes_out; 1098   int bytes_out;
639 1099
640   int killswitch;     // don't set it manually, use IPC_CONVERTFILE_END 1100   int killswitch;     // don't set it manually, use IPC_CONVERTFILE_END
641   int extra_data[64]; // for internal winamp use -  
-   1101   intptr_t extra_data[64]; // for internal winamp use
642 } convertFileStruct; 1102 } convertFileStruct;
-   1103
-   1104
-   1105 #define IPC_CONVERTFILEW 515
-   1106 // (requires Winamp 5.36+)
-   1107 typedef struct
-   1108 {
-   1109   wchar_t *sourcefile;  // "c:\\source.mp3"
-   1110   wchar_t *destfile;    // "c:\\dest.pcm"
-   1111   intptr_t destformat[8]; // like 'PCM ',srate,nch,bps.
-   1112   //hack alert! you can set destformat[6]=mmioFOURCC('I','N','I',' '); and destformat[7]=(int)my_ini_file; (where my_ini_file is a char*)
-   1113   HWND callbackhwnd; // window that will receive the IPC_CB_CONVERT notification messages
-   1114  
-   1115   //filled in by winamp.exe
-   1116   wchar_t *error;        //if IPC_CONVERTFILE returns 0, the reason will be here
-   1117
-   1118   int bytes_done;     //you can look at both of these values for speed statistics
-   1119   int bytes_total;
-   1120   int bytes_out;
-   1121
-   1122   int killswitch;     // don't set it manually, use IPC_CONVERTFILE_END
-   1123   intptr_t extra_data[64]; // for internal winamp use
-   1124 } convertFileStructW;
-   1125
643 1126
644 #define IPC_CONVERTFILE_END 507 1127 #define IPC_CONVERTFILE_END 507
645 /* (requires Winamp 2.92+) 1128 /* (requires Winamp 2.92+)
646 ** Stop/ends a convert process started from IPC_CONVERTFILE 1129 ** Stop/ends a convert process started from IPC_CONVERTFILE
647 ** You need to call this when you receive the IPC_CB_CONVERTDONE message or when you 1130 ** You need to call this when you receive the IPC_CB_CONVERTDONE message or when you
Line 649... Line 1132...
649 ** 1132 **
650 ** eg: SendMessage(hwnd_winamp,WM_WA_IPC,&myConvertStruct,IPC_CONVERTFILE_END); 1133 ** eg: SendMessage(hwnd_winamp,WM_WA_IPC,&myConvertStruct,IPC_CONVERTFILE_END);
651 ** 1134 **
652 ** No return value 1135 ** No return value
653 */ 1136 */
-   1137
-   1138
-   1139 #define IPC_CONVERTFILEW_END 516
-   1140 // (requires Winamp 5.36+)
654 1141
655 typedef struct { 1142 typedef struct {
656   HWND hwndParent; 1143   HWND hwndParent;
657   int format; 1144   int format;
658 1145
659   //filled in by winamp.exe 1146   //filled in by winamp.exe
660   HWND hwndConfig; 1147   HWND hwndConfig;
661   int extra_data[8]; 1148   int extra_data[8];
-   1149   //hack alert! you can set extra_data[6]=mmioFOURCC('I','N','I',' '); and extra_data[7]=(int)my_ini_file; (where my_ini_file is a char*)
662 } convertConfigStruct; 1150 } convertConfigStruct;
-   1151
-   1152
663 #define IPC_CONVERT_CONFIG 508 1153 #define IPC_CONVERT_CONFIG 508
664 #define IPC_CONVERT_CONFIG_END 509 1154 #define IPC_CONVERT_CONFIG_END 509
665 1155
666 typedef struct 1156 typedef struct
667 { 1157 {
668   void (*enumProc)(int user_data, const char *desc, int fourcc); -  
669   int user_data; -  
-   1158   void (*enumProc)(intptr_t user_data, const char *desc, int fourcc);
-   1159   intptr_t user_data;
670 } converterEnumFmtStruct; 1160 } converterEnumFmtStruct;
671 #define IPC_CONVERT_CONFIG_ENUMFMTS 510 1161 #define IPC_CONVERT_CONFIG_ENUMFMTS 510
672 /* (requires Winamp 2.92+) 1162 /* (requires Winamp 2.92+)
673 */ 1163 */
674 -  
675 1164
676 typedef struct 1165 typedef struct
677 { 1166 {
678   char cdletter; 1167   char cdletter;
679   char *playlist_file; 1168   char *playlist_file;
Line 689... Line 1178...
689 typedef struct 1178 typedef struct
690 { 1179 {
691   convertFileStruct *cfs; 1180   convertFileStruct *cfs;
692   int priority; 1181   int priority;
693 } convertSetPriority; 1182 } convertSetPriority;
-   1183
-   1184
694 #define IPC_CONVERT_SET_PRIORITY 512 1185 #define IPC_CONVERT_SET_PRIORITY 512
695 1186
696 typedef struct 1187 typedef struct
697 { 1188 {
698   char *filename; -  
-   1189   convertFileStructW *cfs;
-   1190   int priority;
-   1191 } convertSetPriorityW;
-   1192
-   1193
-   1194 #define IPC_CONVERT_SET_PRIORITYW 517
-   1195 // (requires Winamp 5.36+)
-   1196
-   1197 typedef struct
-   1198 {
-   1199   unsigned int format; //fourcc value
-   1200   char *item; // config item, eg "bitrate"
-   1201   char *data; // buffer to recieve, or buffer that contains the data
-   1202   int len; // length of the data buffer (only used when getting a config item)
-   1203   char *configfile; // config file to read from
-   1204 } convertConfigItem;
-   1205
-   1206
-   1207 #define IPC_CONVERT_CONFIG_SET_ITEM 513 // returns TRUE if successful
-   1208 #define IPC_CONVERT_CONFIG_GET_ITEM 514 // returns TRUE if successful
-   1209
-   1210
-   1211 typedef struct
-   1212 {
-   1213   const char *filename;
699   char *title; // 2048 bytes 1214   char *title; // 2048 bytes
700   int length; 1215   int length;
701   int force_useformatting; // can set this to 1 if you want to force a url to use title formatting shit 1216   int force_useformatting; // can set this to 1 if you want to force a url to use title formatting shit
702 } waHookTitleStruct; 1217 } waHookTitleStruct;
703 // return TRUE if you hook this -  
-   1218
704 #define IPC_HOOK_TITLES 850 1219 #define IPC_HOOK_TITLES 850
-   1220 /* (requires Winamp 5.0+)
-   1221 ** If you hook this message and modify the information then make sure to return TRUE.
-   1222 ** If you don't hook the message then make sure you pass it on through the subclass chain.
-   1223 **
-   1224 ** LRESULT CALLBACK WinampWndProc(HWND hwnd, UINT umsg, WPARAM wParam, LPARAM lParam)
-   1225 ** {
-   1226 **   LRESULT ret = CallWindowProc((WNDPROC)WinampProc,hwnd,umsg,wParam,lParam);
-   1227 **
-   1228 **   if(message==WM_WA_IPC && lParam==IPC_HOOK_TITLES)
-   1229 **   {
-   1230 **     waHookTitleStruct *ht = (waHookTitleStruct *) wParam;
-   1231 **     // Doing ATF stuff with ht->title, whatever...
-   1232 **     return TRUE;
-   1233 **   }
-   1234 **   return ret;
-   1235 ** }
-   1236 */
-   1237
-   1238 typedef struct
-   1239 {
-   1240   const wchar_t *filename;
-   1241   wchar_t *title; // 2048 characters
-   1242   int length;
-   1243   int force_useformatting; // can set this to 1 if you want to force a url to use title formatting shit
-   1244 } waHookTitleStructW;
-   1245 #define IPC_HOOK_TITLESW 851
-   1246 /* (requires Winamp 5.3+)
-   1247 ** See information on IPC_HOOK_TITLES for how to process this.
-   1248 */
-   1249
705 1250
706 #define IPC_GETSADATAFUNC 800 1251 #define IPC_GETSADATAFUNC 800
707 // 0: returns a char *export_sa_get() that returns 150 bytes of data 1252 // 0: returns a char *export_sa_get() that returns 150 bytes of data
708 // 1: returns a export_sa_setreq(int want); 1253 // 1: returns a export_sa_setreq(int want);
-   1254
-   1255
-   1256 #define IPC_GETVUDATAFUNC 801
-   1257 // 0: returns a int export_vu_get(int channel) that returns 0-255 (or -1 for bad channel)
-   1258
709 1259
710 #define IPC_ISMAINWNDVISIBLE 900 1260 #define IPC_ISMAINWNDVISIBLE 900
-   1261 /* (requires Winamp 5.0+)
-   1262 ** int visible=SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_ISMAINWNDVISIBLE);
-   1263 ** You send this to Winamp to query if the main window is visible or not such as by
-   1264 ** unchecking the option in the main right-click menu. If the main window is visible then
-   1265 ** this will return 1 otherwise it returns 0.
-   1266 */
711 1267
712 1268
713 #define IPC_SETPLEDITCOLORS 920 -  
714 typedef struct 1269 typedef struct
715 { 1270 {
716   int numElems; 1271   int numElems;
717   int *elems; 1272   int *elems;
718   HBITMAP bm; // set if you want to override 1273   HBITMAP bm; // set if you want to override
719 } waSetPlColorsStruct; 1274 } waSetPlColorsStruct;
720 1275
-   1276 #define IPC_SETPLEDITCOLORS 920
-   1277 /* (requires Winamp 5.0+)
-   1278 ** This is sent by gen_ff when a modern skin is being loaded to set the colour scheme for
-   1279 ** the playlist editor. When sent numElems is usually 6 and matches with the 6 possible
-   1280 ** colours which are provided be pledit.txt from the classic skins. The elems array is
-   1281 ** defined as follows:
-   1282 **
-   1283 ** elems = 0  =>  normal text
-   1284 ** elems = 1  =>  current text
-   1285 ** elems = 2  =>  normal background
-   1286 ** elems = 3  =>  selected background
-   1287 ** elems = 4  =>  minibroswer foreground
-   1288 ** elems = 5  =>  minibroswer background
-   1289 **
-   1290 ** if(uMsg == WM_WA_IPC && lParam == IPC_SETPLEDITCOLORS)
-   1291 ** {
-   1292 **   waSetPlColorsStruct* colStr = (waSetPlColorsStruct*)wp;
-   1293 **   if(colStr)
-   1294 **   {
-   1295 **      // set or inspect the colours being used (basically for gen_ff's benefit)
-   1296 **   }
-   1297 ** }
-   1298 */
721 1299
722 // the following IPC use waSpawnMenuParms as parameter -  
723 #define IPC_SPAWNEQPRESETMENU 933 -  
724 #define IPC_SPAWNFILEMENU 934 //menubar -  
725 #define IPC_SPAWNOPTIONSMENU 935 //menubar -  
726 #define IPC_SPAWNWINDOWSMENU 936 //menubar -  
727 #define IPC_SPAWNHELPMENU 937 //menubar -  
728 #define IPC_SPAWNPLAYMENU 938 //menubar -  
729 #define IPC_SPAWNPEFILEMENU 939 //menubar -  
730 #define IPC_SPAWNPEPLAYLISTMENU 940 //menubar -  
731 #define IPC_SPAWNPESORTMENU 941 //menubar -  
732 #define IPC_SPAWNPEHELPMENU 942 //menubar -  
733 #define IPC_SPAWNMLFILEMENU 943 //menubar -  
734 #define IPC_SPAWNMLVIEWMENU 944 //menubar -  
735 #define IPC_SPAWNMLHELPMENU 945 //menubar -  
736 #define IPC_SPAWNPELISTOFPLAYLISTS 946 -  
737 1300
738 typedef struct 1301 typedef struct
739 { 1302 {
740   HWND wnd; 1303   HWND wnd;
741   int xpos; // in screen coordinates 1304   int xpos; // in screen coordinates
Line 749... Line 1312...
749   int xpos; // in screen coordinates 1312   int xpos; // in screen coordinates
750   int ypos; 1313   int ypos;
751   int width; 1314   int width;
752   int height; 1315   int height;
753 } waSpawnMenuParms2; 1316 } waSpawnMenuParms2;
-   1317
-   1318 // the following IPC use waSpawnMenuParms as parameter
-   1319 #define IPC_SPAWNEQPRESETMENU 933
-   1320 #define IPC_SPAWNFILEMENU 934 //menubar
-   1321 #define IPC_SPAWNOPTIONSMENU 935 //menubar
-   1322 #define IPC_SPAWNWINDOWSMENU 936 //menubar
-   1323 #define IPC_SPAWNHELPMENU 937 //menubar
-   1324 #define IPC_SPAWNPLAYMENU 938 //menubar
-   1325 #define IPC_SPAWNPEFILEMENU 939 //menubar
-   1326 #define IPC_SPAWNPEPLAYLISTMENU 940 //menubar
-   1327 #define IPC_SPAWNPESORTMENU 941 //menubar
-   1328 #define IPC_SPAWNPEHELPMENU 942 //menubar
-   1329 #define IPC_SPAWNMLFILEMENU 943 //menubar
-   1330 #define IPC_SPAWNMLVIEWMENU 944 //menubar
-   1331 #define IPC_SPAWNMLHELPMENU 945 //menubar
-   1332 #define IPC_SPAWNPELISTOFPLAYLISTS 946
754 1333
755 1334
756 // system tray sends this (you might want to simulate it) -  
757 #define WM_WA_SYSTRAY WM_USER+1 1335 #define WM_WA_SYSTRAY WM_USER+1
-   1336 /* This is sent by the system tray when an event happens (you might want to simulate it).
-   1337 **
-   1338 ** if(uMsg == WM_WA_SYSTRAY)
-   1339 ** {
-   1340 **   switch(lParam)
-   1341 **   {
-   1342 **     // process the messages sent from the tray
-   1343 **   }
-   1344 ** }
-   1345 */
758 1346
759 // input plugins send this when they are done playing back -  
760 #define WM_WA_MPEG_EOF WM_USER+2 -  
761 1347
-   1348 #define WM_WA_MPEG_EOF WM_USER+2
-   1349 /* Input plugins send this when they are done playing back the current file to inform
-   1350 ** Winamp or anyother installed plugins that the current
-   1351 **
-   1352 ** if(uMsg == WM_WA_MPEG_EOF)
-   1353 ** {
-   1354 **   // do what is needed here
-   1355 ** }
-   1356 */
762 1357
763 1358
764 //// video stuff 1359 //// video stuff
765 1360
766 #define IPC_IS_PLAYING_VIDEO 501 // returns >1 if playing, 0 if not, 1 if old version (so who knows):) 1361 #define IPC_IS_PLAYING_VIDEO 501 // returns >1 if playing, 0 if not, 1 if old version (so who knows):)
767 #define IPC_GET_IVIDEOOUTPUT 500 // see below for IVideoOutput interface 1362 #define IPC_GET_IVIDEOOUTPUT 500 // see below for IVideoOutput interface
768 #define VIDEO_MAKETYPE(A,B,C,D) ((A) | ((B)<<8) | ((C)<<16) | ((D)<<24)) 1363 #define VIDEO_MAKETYPE(A,B,C,D) ((A) | ((B)<<8) | ((C)<<16) | ((D)<<24))
769 #define VIDUSER_SET_INFOSTRING 0x1000 1364 #define VIDUSER_SET_INFOSTRING 0x1000
770 #define VIDUSER_GET_VIDEOHWND  0x1001 1365 #define VIDUSER_GET_VIDEOHWND  0x1001
771 #define VIDUSER_SET_VFLIP      0x1002 1366 #define VIDUSER_SET_VFLIP      0x1002
-   1367 #define VIDUSER_SET_TRACKSELINTERFACE 0x1003 // give your ITrackSelector interface as param2
-   1368 #define VIDUSER_OPENVIDEORENDERER 0x1004
-   1369 #define VIDUSER_CLOSEVIDEORENDERER 0x1005
-   1370 #define VIDUSER_GETPOPUPMENU 0x1006
-   1371 #define VIDUSER_SET_INFOSTRINGW 0x1007
-   1372
-   1373 typedef struct
-   1374 {
-   1375   int w;
-   1376   int h;
-   1377   int vflip;
-   1378   double aspectratio;
-   1379   unsigned int fmt;
-   1380 } VideoOpenStruct;
772 1381
773 #ifndef NO_IVIDEO_DECLARE 1382 #ifndef NO_IVIDEO_DECLARE
774 #ifdef __cplusplus 1383 #ifdef __cplusplus
775 1384
776 class VideoOutput; 1385 class VideoOutput;
777 class SubsItem; 1386 class SubsItem;
778 1387
779 typedef struct { -  
780         unsigned char*  baseAddr; -  
781         long                    rowBytes; -  
782 } YV12_PLANE; -  
-   1388 #ifndef _NSV_DEC_IF_H_
-   1389 struct YV12_PLANE {
-   1390   unsigned char* baseAddr;
-   1391   long rowBytes;
-   1392 } ;
783 1393
784 typedef struct { -  
785         YV12_PLANE      y; -  
786         YV12_PLANE      u; -  
787         YV12_PLANE      v; -  
788 } YV12_PLANES; -  
-   1394 struct YV12_PLANES {
-   1395   YV12_PLANE y;
-   1396   YV12_PLANE u;
-   1397   YV12_PLANE v;
-   1398 };
-   1399 #endif
789 1400
790 class IVideoOutput 1401 class IVideoOutput
791 { 1402 {
792   public: 1403   public:
793     virtual ~IVideoOutput() { } 1404     virtual ~IVideoOutput() { }
794     virtual int open(int w, int h, int vflip, double aspectratio, unsigned int fmt)=0; 1405     virtual int open(int w, int h, int vflip, double aspectratio, unsigned int fmt)=0;
795     virtual void setcallback(LRESULT (*msgcallback)(void *token, HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam), void *token) { } -  
-   1406     virtual void setcallback(LRESULT (*msgcallback)(void *token, HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam), void *token) { (void)token; (void)msgcallback; /* to eliminate warning C4100 */ }
796     virtual void close()=0; 1407     virtual void close()=0;
797     virtual void draw(void *frame)=0; 1408     virtual void draw(void *frame)=0;
798     virtual void drawSubtitle(SubsItem *item) { } -  
799     virtual void showStatusMsg(const char *text) { } -  
-   1409     virtual void drawSubtitle(SubsItem *item) {UNREFERENCED_PARAMETER(item);  }
-   1410     virtual void showStatusMsg(const char *text) {UNREFERENCED_PARAMETER(text);  }
800     virtual int get_latency() { return 0; } 1411     virtual int get_latency() { return 0; }
801     virtual void notifyBufferState(int bufferstate) { } /* 0-255*/ -  
-   1412     virtual void notifyBufferState(int bufferstate) { UNREFERENCED_PARAMETER(bufferstate); } /* 0-255*/
-   1413         virtual INT_PTR extended(INT_PTR param1, INT_PTR param2, INT_PTR param3) { UNREFERENCED_PARAMETER(param1); UNREFERENCED_PARAMETER(param2); UNREFERENCED_PARAMETER(param3); return 0; } // Dispatchable, eat this!
-   1414 };
802 1415
803     virtual int extended(int param1, int param2, int param3) { return 0; } // Dispatchable, eat this! -  
-   1416 class ITrackSelector
-   1417 {
-   1418   public:
-   1419     virtual int getNumAudioTracks()=0;
-   1420     virtual void enumAudioTrackName(int n, const char *buf, int size)=0;
-   1421     virtual int getCurAudioTrack()=0;
-   1422     virtual int getNumVideoTracks()=0;
-   1423     virtual void enumVideoTrackName(int n, const char *buf, int size)=0;
-   1424     virtual int getCurVideoTrack()=0;
-   1425
-   1426     virtual void setAudioTrack(int n)=0;
-   1427     virtual void setVideoTrack(int n)=0;
804 }; 1428 };
-   1429
805 #endif //cplusplus 1430 #endif //cplusplus
806 #endif//NO_IVIDEO_DECLARE 1431 #endif//NO_IVIDEO_DECLARE
807 1432
808 // these messages are callbacks that you can grab by subclassing the winamp window 1433 // these messages are callbacks that you can grab by subclassing the winamp window
809 1434
Line 818... Line 1443...
818 #define IPC_CB_ONHIDEWND 601 1443 #define IPC_CB_ONHIDEWND 601
819 1444
820 #define IPC_CB_GETTOOLTIP 602 1445 #define IPC_CB_GETTOOLTIP 602
821 1446
822 #define IPC_CB_MISC 603 1447 #define IPC_CB_MISC 603
823     #define IPC_CB_MISC_TITLE 0 -  
-   1448     #define IPC_CB_MISC_TITLE 0  // start of playing/stop/pause
824     #define IPC_CB_MISC_VOLUME 1 // volume/pan 1449     #define IPC_CB_MISC_VOLUME 1 // volume/pan
825     #define IPC_CB_MISC_STATUS 2 -  
-   1450     #define IPC_CB_MISC_STATUS 2 // start playing/stop/pause/ffwd/rwd
826     #define IPC_CB_MISC_EQ 3 1451     #define IPC_CB_MISC_EQ 3
827     #define IPC_CB_MISC_INFO 4 1452     #define IPC_CB_MISC_INFO 4
828     #define IPC_CB_MISC_VIDEOINFO 5 1453     #define IPC_CB_MISC_VIDEOINFO 5
-   1454     #define IPC_CB_MISC_TITLE_RATING 6 // (5.5+ for when the rating is changed via the songticker menu on current file)
-   1455
-   1456 /* Example of using IPC_CB_MISC_STATUS to detect the start of track playback with 5.x
-   1457 **
-   1458 ** if(lParam == IPC_CB_MISC && wParam == IPC_CB_MISC_STATUS)
-   1459 ** {
-   1460 **   if(SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_ISPLAYING) == 1 &&
-   1461 **      !SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETOUTPUTTIME))
-   1462 **   {
-   1463 **     char* file = (char*)SendMessage(hwnd_winamp,WM_WA_IPC,
-   1464 **                  SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETLISTPOS),IPC_GETPLAYLISTFILE);
-   1465 **     // only output if a valid file was found
-   1466 **     if(file)
-   1467 **     {
-   1468 **       MessageBox(hwnd_winamp,file,"starting",0);
-   1469 **       // or do something else that you need to do
-   1470 **     }
-   1471 **   }
-   1472 ** }
-   1473 */
-   1474
829 1475
830 #define IPC_CB_CONVERT_STATUS 604 // param value goes from 0 to 100 (percent) 1476 #define IPC_CB_CONVERT_STATUS 604 // param value goes from 0 to 100 (percent)
831 #define IPC_CB_CONVERT_DONE   605 1477 #define IPC_CB_CONVERT_DONE   605
-   1478
832 1479
833 #define IPC_ADJUST_FFWINDOWSMENUPOS 606 1480 #define IPC_ADJUST_FFWINDOWSMENUPOS 606
834 /* (requires Winamp 2.9+) 1481 /* (requires Winamp 2.9+)
835 ** int newpos=SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)adjust_offset,IPC_ADJUST_FFWINDOWSMENUPOS); 1482 ** int newpos=SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)adjust_offset,IPC_ADJUST_FFWINDOWSMENUPOS);
836 ** moves where winamp expects the freeform windows in the menubar windows main menu. Useful if you wish to insert a -  
837 ** menu item above extra freeform windows. -  
-   1483 ** This will move where Winamp expects the freeform windows in the menubar windows main
-   1484 ** menu. This is useful if you wish to insert a menu item above extra freeform windows.
838 */ 1485 */
-   1486
839 1487
840 #define IPC_ISDOUBLESIZE 608 1488 #define IPC_ISDOUBLESIZE 608
-   1489 /* (requires Winamp 5.0+)
-   1490 ** int dsize=SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_ISDOUBLESIZE);
-   1491 ** You send this to Winamp to query if the double size mode is enabled or not.
-   1492 ** If it is on then this will return 1 otherwise it will return 0.
-   1493 */
-   1494
841 1495
842 #define IPC_ADJUST_FFOPTIONSMENUPOS 609 1496 #define IPC_ADJUST_FFOPTIONSMENUPOS 609
843 /* (requires Winamp 2.9+) 1497 /* (requires Winamp 2.9+)
844 ** int newpos=SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)adjust_offset,IPC_ADJUST_FFOPTIONSMENUPOS); 1498 ** int newpos=SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)adjust_offset,IPC_ADJUST_FFOPTIONSMENUPOS);
845 ** moves where winamp expects the freeform preferences item in the menubar windows main menu. Useful if you wish to insert a -  
846 ** menu item above preferences item. -  
-   1499 ** moves where winamp expects the freeform preferences item in the menubar windows main
-   1500 ** menu. This is useful if you wish to insert a menu item above the preferences item.
-   1501 **
-   1502 ** Note: This setting was ignored by gen_ff until it was fixed in 5.1
-   1503 **       gen_ff would assume thatthe menu position was 11 in all cases and so when you
-   1504 **       had two plugins attempting to add entries into the main right click menu it
-   1505 **       would cause the 'colour themes' submenu to either be incorrectly duplicated or
-   1506 **       to just disappear.instead.
847 */ 1507 */
848 1508
849 #define IPC_GETTIMEDISPLAYMODE 610 // returns 0 if displaying elapsed time or 1 if displaying remaining time -  
850 1509
851 #define IPC_SETVISWND 611 // param is hwnd, setting this allows you to receive ID_VIS_NEXT/PREVOUS/RANDOM/FS wm_commands -  
-   1510 #define IPC_GETTIMEDISPLAYMODE 610
-   1511 /* (requires Winamp 5.0+)
-   1512 ** int mode=SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETTIMEDISPLAYMODE);
-   1513 ** This will return the status of the time display i.e. shows time elapsed or remaining.
-   1514 ** This returns 0 if Winamp is displaying time elapsed or 1 for the time remaining.
-   1515 */
-   1516
-   1517
-   1518 #define IPC_SETVISWND 611
-   1519 /* (requires Winamp 5.0+)
-   1520 ** int viswnd=(HWND)SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)(HWND)viswnd,IPC_SETVISWND);
-   1521 ** This allows you to set a window to receive the following message commands (which are
-   1522 ** used as part of the modern skin integration).
-   1523 ** When you have finished or your visualisation is closed then send wParam as zero to
-   1524 ** ensure that things are correctly tidied up.
-   1525 */
-   1526
-   1527 /* The following messages are received as the LOWORD(wParam) of the WM_COMMAND message.
-   1528 ** See %SDK%\winamp\wa5vis.txt for more info about visualisation integration in Winamp.
-   1529 */
852 #define ID_VIS_NEXT                     40382 1530 #define ID_VIS_NEXT                     40382
853 #define ID_VIS_PREV                     40383 1531 #define ID_VIS_PREV                     40383
854 #define ID_VIS_RANDOM                   40384 1532 #define ID_VIS_RANDOM                   40384
855 #define ID_VIS_FS                       40389 1533 #define ID_VIS_FS                       40389
856 #define ID_VIS_CFG                      40390 1534 #define ID_VIS_CFG                      40390
857 #define ID_VIS_MENU                     40391 1535 #define ID_VIS_MENU                     40391
858 1536
859 #define IPC_GETVISWND 612 // returns the vis cmd handler hwnd -  
-   1537
-   1538 #define IPC_GETVISWND 612
-   1539 /* (requires Winamp 5.0+)
-   1540 ** int viswnd=(HWND)SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETVISWND);
-   1541 ** This returns a HWND to the visualisation command handler window if set by IPC_SETVISWND.
-   1542 */
-   1543
-   1544
860 #define IPC_ISVISRUNNING 613 1545 #define IPC_ISVISRUNNING 613
-   1546 /* (requires Winamp 5.0+)
-   1547 ** int visrunning=SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_ISVISRUNNING);
-   1548 ** This will return 1 if a visualisation is currently running and 0 if one is not running.
-   1549 */
-   1550
-   1551
861 #define IPC_CB_VISRANDOM 628 // param is status of random 1552 #define IPC_CB_VISRANDOM 628 // param is status of random
862 1553
863 #define IPC_SETIDEALVIDEOSIZE 614 // sent by winamp to winamp, trap it if you need it. width=HIWORD(param), height=LOWORD(param) -  
-   1554
-   1555 #define IPC_SETIDEALVIDEOSIZE 614
-   1556 /* (requires Winamp 5.0+)
-   1557 ** This is sent by Winamp back to itself so it can be trapped and adjusted as needed with
-   1558 ** the desired width in HIWORD(wParam) and the desired height in LOWORD(wParam).
-   1559 **
-   1560 ** if(uMsg == WM_WA_IPC){
-   1561 **   if(lParam == IPC_SETIDEALVIDEOSIZE){
-   1562 **      wParam = MAKEWPARAM(height,width);
-   1563 **   }
-   1564 ** }
-   1565 */
-   1566
864 1567
865 #define IPC_GETSTOPONVIDEOCLOSE 615 1568 #define IPC_GETSTOPONVIDEOCLOSE 615
-   1569 /* (requires Winamp 5.0+)
-   1570 ** int sovc=SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETSTOPONVIDEOCLOSE);
-   1571 ** This will return 1 if 'stop on video close' is enabled and 0 if it is disabled.
-   1572 */
-   1573
-   1574
866 #define IPC_SETSTOPONVIDEOCLOSE 616 1575 #define IPC_SETSTOPONVIDEOCLOSE 616
-   1576 /* (requires Winamp 5.0+)
-   1577 ** int sovc=SendMessage(hwnd_winamp,WM_WA_IPC,enabled,IPC_SETSTOPONVIDEOCLOSE);
-   1578 ** Set enabled to 1 to enable and 0 to disable the 'stop on video close' option.
-   1579 */
-   1580
867 1581
868 typedef struct { 1582 typedef struct {
869   HWND hwnd; 1583   HWND hwnd;
870   int uMsg; 1584   int uMsg;
871   int wParam; -  
872   int lParam; -  
-   1585   WPARAM wParam;
-   1586   LPARAM lParam;
873 } transAccelStruct; 1587 } transAccelStruct;
874 1588
875 #define IPC_TRANSLATEACCELERATOR 617 1589 #define IPC_TRANSLATEACCELERATOR 617
-   1590 /* (requires Winamp 5.0+)
-   1591 ** (deprecated as of 5.53x+)
-   1592 */
876 1593
877 typedef struct { 1594 typedef struct {
878   int cmd; 1595   int cmd;
879   int x; 1596   int x;
880   int y; 1597   int y;
881   int align; 1598   int align;
882 } windowCommand; // send this as param to an IPC_PLCMD, IPC_MBCMD, IPC_VIDCMD 1599 } windowCommand; // send this as param to an IPC_PLCMD, IPC_MBCMD, IPC_VIDCMD
-   1600
883 1601
884 #define IPC_CB_ONTOGGLEAOT 618 1602 #define IPC_CB_ONTOGGLEAOT 618
-   1603
885 1604
886 #define IPC_GETPREFSWND 619 1605 #define IPC_GETPREFSWND 619
-   1606 /* (requires Winamp 5.0+)
-   1607 ** HWND prefs = (HWND)SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETPREFSWND);
-   1608 ** This will return a handle to the preferences dialog if it is open otherwise it will
-   1609 ** return zero. A simple check with the OS api IsWindow(..) is a good test if it's valid.
-   1610 **
-   1611 ** e.g.  this will open (or close if already open) the preferences dialog and show if we
-   1612 **       managed to get a valid
-   1613 ** SendMessage(hwnd_winamp,WM_COMMAND,MAKEWPARAM(WINAMP_OPTIONS_PREFS,0),0);
-   1614 ** MessageBox(hwnd_winamp,(IsWindow((HWND)SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETPREFSWND))?"Valid":"Not Open"),0,MB_OK);
-   1615 */
-   1616
-   1617
-   1618 #define IPC_SET_PE_WIDTHHEIGHT 620
-   1619 /* (requires Winamp 5.0+)
-   1620 ** SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)&point,IPC_SET_PE_WIDTHHEIGHT);
-   1621 ** You pass a pointer to a POINT structure which holds the width and height and Winamp
-   1622 ** will set the playlist editor to that size (this is used by gen_ff on skin changes).
-   1623 ** There does not appear to be any bounds limiting with this so it is possible to create
-   1624 ** a zero size playlist editor window (which is a pretty silly thing to do).
-   1625 */
887 1626
888 #define IPC_SET_PE_WIDTHHEIGHT 620 // data is a pointer to a POINT structure that holds width & height -  
889 1627
890 #define IPC_GETLANGUAGEPACKINSTANCE 621 1628 #define IPC_GETLANGUAGEPACKINSTANCE 621
-   1629 /* (requires Winamp 5.0+)
-   1630 ** HINSTANCE hInst = (HINSTANCE)SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETLANGUAGEPACKINSTANCE);
-   1631 ** This will return the HINSTANCE to the currently used language pack file for winamp.exe
-   1632 **
-   1633 ** (5.5+)
-   1634 ** If you pass 1 in wParam then you will have zero returned if a language pack is in use.
-   1635 ** if(!SendMessage(hwnd_winamp,WM_WA_IPC,1,IPC_GETLANGUAGEPACKINSTANCE)){
-   1636 **   // winamp is currently using a language pack
-   1637 ** }
-   1638 **
-   1639 ** If you pass 2 in wParam then you will get the path to the language pack folder.
-   1640 ** wchar_t* lngpackfolder = (wchar_t*)SendMessage(hwnd_winamp,WM_WA_IPC,2,IPC_GETLANGUAGEPACKINSTANCE);
-   1641 **
-   1642 ** If you pass 3 in wParam then you will get the path to the currently extracted language pack.
-   1643 ** wchar_t* lngpack = (wchar_t*)SendMessage(hwnd_winamp,WM_WA_IPC,3,IPC_GETLANGUAGEPACKINSTANCE);
-   1644 **
-   1645 ** If you pass 4 in wParam then you will get the name of the currently used language pack.
-   1646 ** wchar_t* lngname = (char*)SendMessage(hwnd_winamp,WM_WA_IPC,4,IPC_GETLANGUAGEPACKINSTANCE);
-   1647 */
-   1648 #define LANG_IDENT_STR 0
-   1649 #define LANG_LANG_CODE 1
-   1650 #define LANG_COUNTRY_CODE 2
-   1651 /*
-   1652 ** (5.51+)
-   1653 ** If you pass 5 in LOWORD(wParam) then you will get the ident string/code string
-   1654 ** (based on the param passed in the HIWORD(wParam) of the currently used language pack.
-   1655 ** The string returned with LANG_IDENT_STR is used to represent the language that the
-   1656 ** language pack is intended for following ISO naming conventions for consistancy.
-   1657 **
-   1658 ** wchar_t* ident_str = (wchar_t*)SendMessage(hwnd_winamp,WM_WA_IPC,MAKEWPARAM(5,LANG_XXX),IPC_GETLANGUAGEPACKINSTANCE);
-   1659 **
-   1660 ** e.g.
-   1661 ** For the default language it will return the following for the different LANG_XXX codes
-   1662 **    LANG_IDENT_STR ->     "en-US" (max buffer size of this is 9 wchar_t)
-   1663 **    LANG_LANG_CODE ->     "en"    (language code)
-   1664 **    LANG_COUNTRY_CODE ->  "US"    (country code)
-   1665 **
-   1666 ** On pre 5.51 installs you can get LANG_IDENT_STR using the following method
-   1667 ** (you'll have to custom process the string returned if you want the langugage or country but that's easy ;) )
-   1668 **
-   1669 ** #define LANG_PACK_LANG_ID 65534 (if you don't have lang.h)
-   1670 ** HINSTANCE hInst = (HINSTANCE)SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETLANGUAGEPACKINSTANCE);
-   1671 ** TCHAR buffer[9] = {0};
-   1672 ** LoadString(hInst,LANG_PACK_LANG_ID,buffer,sizeof(buffer));
-   1673 **
-   1674 **
-   1675 **
-   1676 ** The following example shows how using the basic api will allow you to load the playlist
-   1677 ** context menu resource from the currently loaded language pack or it will fallback to
-   1678 ** the default winamp.exe instance.
-   1679 **
-   1680 ** HINSTANCE lang = (HINSTANCE)SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETLANGUAGEPACKINSTANCE);
-   1681 ** HMENU popup = GetSubMenu(GetSubMenu((LoadMenu(lang?lang:GetModuleHandle(0),MAKEINTRESOURCE(101))),2),5);
-   1682 **   // do processing as needed on the menu before displaying it
-   1683 **   TrackPopupMenuEx(orig,TPM_LEFTALIGN|TPM_LEFTBUTTON|TPM_RIGHTBUTTON,rc.left,rc.bottom,hwnd_owner,0);
-   1684 **   DestroyMenu(popup);
-   1685 **
-   1686 ** If you need a specific menu handle then look at IPC_GET_HMENU for more information.
-   1687 */
-   1688
891 1689
892 #define IPC_CB_PEINFOTEXT 622 // data is a string, ie: "04:21/45:02" 1690 #define IPC_CB_PEINFOTEXT 622 // data is a string, ie: "04:21/45:02"
-   1691
893 1692
894 #define IPC_CB_OUTPUTCHANGED 623 // output plugin was changed in config 1693 #define IPC_CB_OUTPUTCHANGED 623 // output plugin was changed in config
-   1694
895 1695
896 #define IPC_GETOUTPUTPLUGIN 625 1696 #define IPC_GETOUTPUTPLUGIN 625
-   1697 /* (requires Winamp 5.0+)
-   1698 ** char* outdll = (char*)SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETOUTPUTPLUGIN);
-   1699 ** This returns a string of the current output plugin's dll name.
-   1700 ** e.g. if the directsound plugin was selected then this would return 'out_ds.dll'.
-   1701 */
-   1702
897 1703
898 #define IPC_SETDRAWBORDERS 626 1704 #define IPC_SETDRAWBORDERS 626
-   1705 /* (requires Winamp 5.0+)
-   1706 ** SendMessage(hwnd_winamp,WM_WA_IPC,enabled,IPC_SETDRAWBORDERS);
-   1707 ** Set enabled to 1 to enable and 0 to disable drawing of the playlist editor and winamp
-   1708 ** gen class windows (used by gen_ff to allow it to draw its own window borders).
-   1709 */
-   1710
-   1711
899 #define IPC_DISABLESKINCURSORS 627 1712 #define IPC_DISABLESKINCURSORS 627
-   1713 /* (requires Winamp 5.0+)
-   1714 ** SendMessage(hwnd_winamp,WM_WA_IPC,enabled,IPC_DISABLESKINCURSORS);
-   1715 ** Set enabled to 1 to enable and 0 to disable the use of skinned cursors.
-   1716 */
-   1717
-   1718
-   1719 #define IPC_GETSKINCURSORS 628
-   1720 /* (requires Winamp 5.36+)
-   1721 ** data = (WACURSOR)cursorId. (check wa_dlg.h for values)
-   1722 */
-   1723
-   1724
900 #define IPC_CB_RESETFONT 629 1725 #define IPC_CB_RESETFONT 629
901 1726
902 #define IPC_IS_FULLSCREEN 630 // returns 1 if video or vis is in fullscreen mode -  
903 #define IPC_SET_VIS_FS_FLAG 631 // a vis should send this message with 1/as param to notify winamp that it has gone to or has come back from fullscreen mode -  
-   1727
-   1728 #define IPC_IS_FULLSCREEN 630
-   1729 /* (requires Winamp 5.0+)
-   1730 ** int val=SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_IS_FULLSCREEN);
-   1731 ** This will return 1 if the video or visualisation is in fullscreen mode or 0 otherwise.
-   1732 */
-   1733
-   1734
-   1735 #define IPC_SET_VIS_FS_FLAG 631
-   1736 /* (requires Winamp 5.0+)
-   1737 ** A vis should send this message with 1/as param to notify winamp that it has gone to or has come back from fullscreen mode
-   1738 */
-   1739
904 1740
905 #define IPC_SHOW_NOTIFICATION 632 1741 #define IPC_SHOW_NOTIFICATION 632
-   1742
906 1743
907 #define IPC_GETSKININFO 633 1744 #define IPC_GETSKININFO 633
-   1745 #define IPC_GETSKININFOW 1633
-   1746 /* (requires Winamp 5.0+)
-   1747 ** This is a notification message sent to the main Winamp window by itself whenever it
-   1748 ** needs to get information to be shown about the current skin in the 'Current skin
-   1749 ** information' box on the main Skins page in the Winamp preferences.
-   1750 **
-   1751 ** When this notification is received and the current skin is one you are providing the
-   1752 ** support for then you return a valid buffer for Winamp to be able to read from with
-   1753 ** information about it such as the name of the skin file.
-   1754 **
-   1755 ** if(uMsg == WM_WA_IPC && lParam == IPC_GETSKININFO){
-   1756 **   if(is_our_skin()){
-   1757 **      return is_our_skin_name();
-   1758 **   }
-   1759 ** }
-   1760 */
-   1761
-   1762
-   1763 #define IPC_GET_MANUALPLADVANCE 634
-   1764 /* (requires Winamp 5.03+)
-   1765 ** int val=SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GET_MANUALPLADVANCE);
-   1766 ** IPC_GET_MANUALPLADVANCE returns the status of the Manual Playlist Advance.
-   1767 ** If enabled this will return 1 otherwise it will return 0.
-   1768 */
-   1769
-   1770
-   1771 #define IPC_SET_MANUALPLADVANCE 635
-   1772 /* (requires Winamp 5.03+)
-   1773 ** SendMessage(hwnd_winamp,WM_WA_IPC,value,IPC_SET_MANUALPLADVANCE);
-   1774 ** IPC_SET_MANUALPLADVANCE sets the status of the Manual Playlist Advance option.
-   1775 ** Set value = 1 to turn it on and value = 0 to turn it off.
-   1776 */
-   1777
-   1778
-   1779 #define IPC_GET_NEXT_PLITEM 636
-   1780 /* (requires Winamp 5.04+)
-   1781 ** SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_EOF_GET_NEXT_PLITEM);
-   1782 **
-   1783 ** Sent to Winamp's main window when an item has just finished playback or the next
-   1784 ** button has been pressed and requesting the new playlist item number to go to.
-   1785 **
-   1786 ** Subclass this message in your application to return the new item number.
-   1787 ** Return -1 for normal Winamp operation (default) or the new item number in
-   1788 ** the playlist to be played instead of the originally selected next track.
-   1789 **
-   1790 ** This is primarily provided for the JTFE plugin (gen_jumpex.dll).
-   1791 */
-   1792
-   1793
-   1794 #define IPC_GET_PREVIOUS_PLITEM 637
-   1795 /* (requires Winamp 5.04+)
-   1796 ** SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_EOF_GET_PREVIOUS_PLITEM);
-   1797 **
-   1798 ** Sent to Winamp's main window when the previous button has been pressed and Winamp is
-   1799 ** requesting the new playlist item number to go to.
-   1800 **
-   1801 ** Return -1 for normal Winamp operation (default) or the new item number in
-   1802 ** the playlist to be played instead of the originally selected previous track.
-   1803 **
-   1804 ** This is primarily provided for the JTFE plugin (gen_jumpex.dll).
-   1805 */
-   1806
-   1807
-   1808 #define IPC_IS_WNDSHADE 638
-   1809 /* (requires Winamp 5.04+)
-   1810 ** int is_shaded=SendMessage(hwnd_winamp,WM_WA_IPC,wnd,IPC_IS_WNDSHADE);
-   1811 ** Pass 'wnd' as an id as defined for IPC_GETWND or pass -1 to query the status of the
-   1812 ** main window. This returns 1 if the window is in winshade mode and 0 if it is not.
-   1813 ** Make sure you only test for this on a 5.04+ install otherwise you get a false result.
-   1814 ** (See the notes about unhandled WM_WA_IPC messages).
-   1815 */
-   1816
-   1817
-   1818 #define IPC_SETRATING 639
-   1819 /* (requires Winamp 5.04+ with ML)
-   1820 ** int rating=SendMessage(hwnd_winamp,WM_WA_IPC,rating,IPC_SETRATING);
-   1821 ** This will allow you to set the 'rating' on the current playlist entry where 'rating'
-   1822 ** is an integer value from 0 (no rating) to 5 (5 stars).
-   1823 **
-   1824 ** The following example should correctly allow you to set the rating for any specified
-   1825 ** playlist entry assuming of course that you're trying to get a valid playlist entry.
-   1826 **
-   1827 ** void SetPlaylistItemRating(int item_to_set, int rating_to_set){
-   1828 ** int cur_pos=SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETLISTPOS);
-   1829 **   SendMessage(hwnd_winamp,WM_WA_IPC,item_to_set,IPC_SETPLAYLISTPOS);
-   1830 **   SendMessage(hwnd_winamp,WM_WA_IPC,rating_to_set,IPC_SETRATING);
-   1831 **   SendMessage(hwnd_winamp,WM_WA_IPC,cur_pos,IPC_SETPLAYLISTPOS);
-   1832 ** }
-   1833 */
-   1834
-   1835
-   1836 #define IPC_GETRATING 640
-   1837 /* (requires Winamp 5.04+ with ML)
-   1838 ** int rating=SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETRATING);
-   1839 ** This returns the current playlist entry's rating between 0 (no rating) to 5 (5 stars).
-   1840 **
-   1841 ** The following example should correctly allow you to get the rating for any specified
-   1842 ** playlist entry assuming of course that you're trying to get a valid playlist entry.
-   1843 **
-   1844 ** int GetPlaylistItemRating(int item_to_get, int rating_to_set){
-   1845 ** int cur_pos=SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETLISTPOS), rating = 0;
-   1846 **   SendMessage(hwnd_winamp,WM_WA_IPC,item_to_get,IPC_SETPLAYLISTPOS);
-   1847 **   rating = SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETRATING);
-   1848 **   SendMessage(hwnd_winamp,WM_WA_IPC,cur_pos,IPC_SETPLAYLISTPOS);
-   1849 **   return rating;
-   1850 ** }
-   1851 */
-   1852
-   1853
-   1854 #define IPC_GETNUMAUDIOTRACKS 641
-   1855 /* (requires Winamp 5.04+)
-   1856 ** int n = SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETNUMAUDIOTRACKS);
-   1857 ** This will return the number of audio tracks available from the currently playing item.
-   1858 */
-   1859
-   1860
-   1861 #define IPC_GETNUMVIDEOTRACKS 642
-   1862 /* (requires Winamp 5.04+)
-   1863 ** int n = SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETNUMVIDEOTRACKS);
-   1864 ** This will return the number of video tracks available from the currently playing item.
-   1865 */
-   1866
-   1867
-   1868 #define IPC_GETAUDIOTRACK 643
-   1869 /* (requires Winamp 5.04+)
-   1870 ** int cur = SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETAUDIOTRACK);
-   1871 ** This will return the id of the current audio track for the currently playing item.
-   1872 */
-   1873
-   1874
-   1875 #define IPC_GETVIDEOTRACK 644
-   1876 /* (requires Winamp 5.04+)
-   1877 ** int cur = SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETVIDEOTRACK);
-   1878 ** This will return the id of the current video track for the currently playing item.
-   1879 */
-   1880
-   1881
-   1882 #define IPC_SETAUDIOTRACK 645
-   1883 /* (requires Winamp 5.04+)
-   1884 ** SendMessage(hwnd_winamp,WM_WA_IPC,track,IPC_SETAUDIOTRACK);
-   1885 ** This allows you to switch to a new audio track (if supported) in the current playing file.
-   1886 */
-   1887
-   1888
-   1889 #define IPC_SETVIDEOTRACK 646
-   1890 /* (requires Winamp 5.04+)
-   1891 ** SendMessage(hwnd_winamp,WM_WA_IPC,track,IPC_SETVIDEOTRACK);
-   1892 ** This allows you to switch to a new video track (if supported) in the current playing file.
-   1893 */
-   1894
-   1895
-   1896 #define IPC_PUSH_DISABLE_EXIT 647
-   1897 /* (requires Winamp 5.04+)
-   1898 ** SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_PUSH_DISABLE_EXIT);
-   1899 ** This will let you disable or re-enable the UI exit functions (close button, context
-   1900 ** menu, alt-f4). Remember to call IPC_POP_DISABLE_EXIT when you are done doing whatever
-   1901 ** was required that needed to prevent exit otherwise you have to kill the Winamp process.
-   1902 */
-   1903
-   1904
-   1905 #define IPC_POP_DISABLE_EXIT  648
-   1906 /* (requires Winamp 5.04+)
-   1907 ** SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_POP_DISABLE_EXIT);
-   1908 ** See IPC_PUSH_DISABLE_EXIT
-   1909 */
-   1910
-   1911
-   1912 #define IPC_IS_EXIT_ENABLED 649
-   1913 /* (requires Winamp 5.04+)
-   1914 ** SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_IS_EXIT_ENABLED);
-   1915 ** This will return 0 if the 'exit' option of Winamp's menu is disabled and 1 otherwise.
-   1916 */
-   1917
-   1918
-   1919 #define IPC_IS_AOT 650
-   1920 /* (requires Winamp 5.04+)
-   1921 ** SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_IS_AOT);
-   1922 ** This will return the status of the always on top flag.
-   1923 ** Note: This may not match the actual TOPMOST window flag while another fullscreen
-   1924 ** application is focused if the user has the 'Disable always on top while fullscreen
-   1925 ** applications are focused' option under the  General Preferences page is checked.
-   1926 */
-   1927
-   1928
-   1929 #define IPC_USES_RECYCLEBIN 651
-   1930 /* (requires Winamp 5.09+)
-   1931 ** int use_bin=SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_USES_RECYCLEBIN);
-   1932 ** This will return 1 if the deleted file should be sent to the recycle bin or
-   1933 ** 0 if deleted files should be deleted permanently (default action for < 5.09).
-   1934 **
-   1935 ** Note: if you use this on pre 5.09 installs of Winamp then it will return 1 which is
-   1936 ** not correct but is due to the way that SendMessage(..) handles un-processed messages.
-   1937 ** Below is a quick case for checking if the returned value is correct.
-   1938 **
-   1939 ** if(SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_USES_RECYCLEBIN) &&
-   1940 **    SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETVERSION)>=0x5009)
-   1941 ** {
-   1942 **   // can safely follow the option to recycle the file
-   1943 ** }
-   1944 ** else
-   1945 *  {
-   1946 **   // need to do a permanent delete of the file
-   1947 ** }
-   1948 */
-   1949
-   1950
-   1951 #define IPC_FLUSHAUDITS 652
-   1952 /*
-   1953 ** SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_FLUSHAUDITS);
-   1954 **
-   1955 ** Will flush any pending audits in the global audits queue
-   1956 **
-   1957 */
-   1958
-   1959 #define IPC_GETPLAYITEM_START 653
-   1960 #define IPC_GETPLAYITEM_END   654
-   1961
-   1962
-   1963 #define IPC_GETVIDEORESIZE 655
-   1964 #define IPC_SETVIDEORESIZE 656
-   1965
-   1966
-   1967 #define IPC_INITIAL_SHOW_STATE 657
-   1968 /* (requires Winamp 5.36+)
-   1969 ** int show_state = SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_INITIAL_SHOW_STATE);
-   1970 ** returns the processed value of nCmdShow when Winamp was started
-   1971 ** (see MSDN documentation the values passed to WinMain(..) for what this should be)
-   1972 **
-   1973 ** e.g.
-   1974 ** if(SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_INITIAL_SHOW_STATE) == SW_SHOWMINIMIZED){
-   1975 **   // we are starting minimised so process as needed (keep our window hidden)
-   1976 ** }
-   1977 **
-   1978 ** Useful for seeing if winamp was run minimised on startup so you can act accordingly.
-   1979 ** On pre-5.36 versions this will effectively return SW_NORMAL/SW_SHOWNORMAL due to the
-   1980 ** handling of unknown apis returning 1 from Winamp.
-   1981 */
908 1982
909 // >>>>>>>>>>> Next is 634 -  
-   1983 // >>>>>>>>>>> Next is 658
910 1984
911 #define IPC_PLCMD  1000 1985 #define IPC_PLCMD  1000
912 1986
913 #define PLCMD_ADD  0 1987 #define PLCMD_ADD  0
914 #define PLCMD_REM  1 1988 #define PLCMD_REM  1
915 #define PLCMD_SEL  2 1989 #define PLCMD_SEL  2
916 #define PLCMD_MISC 3 1990 #define PLCMD_MISC 3
917 #define PLCMD_LIST 4 1991 #define PLCMD_LIST 4
918 1992
919 #define IPC_MBCMD  1001 -  
-   1993 //#define IPC_MBCMD  1001
920 1994
921 #define MBCMD_BACK    0 1995 #define MBCMD_BACK    0
922 #define MBCMD_FORWARD 1 1996 #define MBCMD_FORWARD 1
923 #define MBCMD_STOP    2 1997 #define MBCMD_STOP    2
924 #define MBCMD_RELOAD  3 1998 #define MBCMD_RELOAD  3
Line 930... Line 2004...
930 #define VIDCMD_1X         1 2004 #define VIDCMD_1X         1
931 #define VIDCMD_2X         2 2005 #define VIDCMD_2X         2
932 #define VIDCMD_LIB        3 2006 #define VIDCMD_LIB        3
933 #define VIDPOPUP_MISC     4 2007 #define VIDPOPUP_MISC     4
934 2008
935 #define IPC_MBURL       1003 //sets the URL -  
936 #define IPC_MBGETCURURL 1004 //copies the current URL into wParam (have a 4096 buffer ready) -  
937 #define IPC_MBGETDESC   1005 //copies the current URL description into wParam (have a 4096 buffer ready) -  
938 #define IPC_MBCHECKLOCFILE 1006 //checks that the link file is up to date (otherwise updates it). wParam=parent HWND -  
939 #define IPC_MBREFRESH   1007 //refreshes the "now playing" view in the library -  
940 #define IPC_MBGETDEFURL 1008 //copies the default URL into wParam (have a 4096 buffer ready) -  
-   2009 //#define IPC_MBURL       1003 //sets the URL
-   2010 //#define IPC_MBGETCURURL 1004 //copies the current URL into wParam (have a 4096 buffer ready)
-   2011 //#define IPC_MBGETDESC   1005 //copies the current URL description into wParam (have a 4096 buffer ready)
-   2012 //#define IPC_MBCHECKLOCFILE 1006 //checks that the link file is up to date (otherwise updates it). wParam=parent HWND
-   2013 //#define IPC_MBREFRESH   1007 //refreshes the "now playing" view in the library
-   2014 //#define IPC_MBGETDEFURL 1008 //copies the default URL into wParam (have a 4096 buffer ready)
941 2015
942 #define IPC_STATS_LIBRARY_ITEMCNT 1300 // updates library count status 2016 #define IPC_STATS_LIBRARY_ITEMCNT 1300 // updates library count status
943 2017
944 // IPC 2000-3000 reserved for freeform messages, see gen_ff/ff_ipc.h -  
-   2018 /*
-   2019 ** IPC's in the message range 2000 - 3000 are reserved internally for freeform messages.
-   2020 ** These messages are taken from ff_ipc.h which is part of the Modern skin integration.
-   2021 */
-   2022
945 #define IPC_FF_FIRST 2000 2023 #define IPC_FF_FIRST 2000
-   2024
-   2025 #define IPC_FF_COLOURTHEME_CHANGE IPC_FF_ONCOLORTHEMECHANGED
-   2026 #define IPC_FF_ONCOLORTHEMECHANGED IPC_FF_FIRST + 3
-   2027 /*
-   2028 ** This is a notification message sent when the user changes the colour theme in a Modern
-   2029 ** skin and can also be detected when the Modern skin is first loaded as the gen_ff plugin
-   2030 ** applies relevant settings and styles (like the colour theme).
-   2031 **
-   2032 ** The value of wParam is the name of the new color theme being switched to.
-   2033 ** SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)(const char*)colour_theme_name,IPC_FF_ONCOLORTHEMECHANGED);
-   2034 **
-   2035 ** (IPC_FF_COLOURTHEME_CHANGE is the name i (DrO) was using before getting a copy of
-   2036 ** ff_ipc.h with the proper name in it).
-   2037 */
-   2038
-   2039
-   2040 #define IPC_FF_ISMAINWND IPC_FF_FIRST + 4
-   2041 /*
-   2042 ** int ismainwnd = (HWND)SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)(HWND)test_wnd,IPC_FF_ISMAINWND);
-   2043 **
-   2044 ** This allows you to determine if the window handle passed to it is a modern skin main
-   2045 ** window or not. If it is a main window or any of its windowshade variants then it will
-   2046 ** return 1.
-   2047 **
-   2048 ** Because of the way modern skins are implemented, it is possible for this message to
-   2049 ** return a positive test result for a number of window handles within the current Winamp
-   2050 ** process. This appears to be because you can have a visible main window, a compact main
-   2051 ** window and also a winshaded version.
-   2052 **
-   2053 ** The following code example below is one way of seeing how this api works since it will
-   2054 ** enumerate all windows related to Winamp at the time and allows you to process as
-   2055 ** required when a detection happens.
-   2056 **
-   2057 **
-   2058 ** EnumThreadWindows(GetCurrentThreadId(),enumWndProc,0);
-   2059 **
-   2060 ** BOOL CALLBACK enumWndProc(HWND hwnd, LPARAM lParam){
-   2061 **
-   2062 **   if(SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)hwnd,IPC_FF_ISMAINWND)){
-   2063 **     // do processing in here
-   2064 **     // or continue the enum for other main windows (if they exist)
-   2065 **     // and just comment out the line below
-   2066 **     return 0;
-   2067 **   }
-   2068 **   return 1;
-   2069 ** }
-   2070 */
-   2071
-   2072
-   2073 #define IPC_FF_GETCONTENTWND IPC_FF_FIRST + 5
-   2074 /*
-   2075 ** HWND wa2embed = (HWND)SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)(HWND)test_wnd,IPC_FF_GETCONTENTWND);
-   2076 **
-   2077 ** This will return the Winamp 2 window that is embedded in the window's container
-   2078 ** i.e. if hwnd is the playlist editor windowshade hwnd then it will return the Winamp 2
-   2079 **      playlist editor hwnd.
-   2080 **
-   2081 ** If no content is found such as the window has nothing embedded then this will return
-   2082 ** the hwnd passed to it.
-   2083 */
-   2084
-   2085
-   2086 #define IPC_FF_NOTIFYHOTKEY IPC_FF_FIRST + 6
-   2087 /*
-   2088 ** This is a notification message sent when the user uses a global hotkey combination
-   2089 ** which had been registered with the gen_hotkeys plugin.
-   2090 **
-   2091 ** The value of wParam is the description of the hotkey as passed to gen_hotkeys.
-   2092 ** SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)(const char*)hotkey_desc,IPC_FF_NOTIFYHOTKEY);
-   2093 */
-   2094
946 #define IPC_FF_LAST  3000 2095 #define IPC_FF_LAST  3000
-   2096
-   2097
-   2098 /*
-   2099 ** General IPC messages in Winamp
-   2100 **
-   2101 ** All notification messages appear in the lParam of the main window message proceedure.
-   2102 */
-   2103
947 2104
948 #define IPC_GETDROPTARGET 3001 2105 #define IPC_GETDROPTARGET 3001
-   2106 /* (requires Winamp 5.0+)
-   2107 ** IDropTarget* IDrop = (IDropTarget*)SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETDROPTARGET);
-   2108 **
-   2109 ** You call this to retrieve a copy of the IDropTarget interface which Winamp created for
-   2110 ** handling external drag and drop operations on to it's Windows. This is only really
-   2111 ** useful if you're providing an alternate interface and want your Windows to provide the
-   2112 ** same drag and drop support as Winamp normally provides the user. Check out MSDN or
-   2113 ** your prefered search facility for more information about the IDropTarget interface and
-   2114 ** what's needed to handle it in your own instance.
-   2115 */
949 2116
950 #define IPC_PLAYLIST_MODIFIED 3002 // sent to main wnd whenever the playlist is modified -  
951 2117
952 #define IPC_PLAYING_FILE 3003 // sent to main wnd with the file as parm whenever a file is played -  
953 #define IPC_FILE_TAG_MAY_HAVE_UPDATED 3004 // sent to main wnd with the file as parm whenever a file tag might be updated -  
-   2118 #define IPC_PLAYLIST_MODIFIED 3002
-   2119 /* (requires Winamp 5.0+)
-   2120 ** This is a notification message sent to the main Winamp window whenever the playlist is
-   2121 ** modified in any way e.g. the addition/removal of a playlist entry.
-   2122 **
-   2123 ** It is not a good idea to do large amounts of processing in this notification since it
-   2124 ** will slow down Winamp as playlist entries are modified (especially when you're adding
-   2125 ** in a large playlist).
-   2126 **
-   2127 ** if(uMsg == WM_WA_IPC && lParam == IPC_PLAYLIST_MODIFIED)
-   2128 ** {
-   2129 **   // do what you need to do here
-   2130 ** }
-   2131 */
-   2132
-   2133
-   2134 #define IPC_PLAYING_FILE 3003
-   2135 /* (requires Winamp 5.0+)
-   2136 ** This is a notification message sent to the main Winamp window when playback begins for
-   2137 ** a file. This passes the full filepath in the wParam of the message received.
-   2138 **
-   2139 ** if(uMsg == WM_WA_IPC && lParam == IPC_PLAYING_FILE)
-   2140 ** {
-   2141 **   // do what you need to do here, e.g.
-   2142 **   process_file((char*)wParam);
-   2143 ** }
-   2144 */
-   2145
-   2146
-   2147 #define IPC_PLAYING_FILEW 13003
-   2148 /* (requires Winamp 5.0+)
-   2149 ** This is a notification message sent to the main Winamp window when playback begins for
-   2150 ** a file. This passes the full filepath in the wParam of the message received.
-   2151 **
-   2152 ** if(uMsg == WM_WA_IPC && lParam == IPC_PLAYING_FILEW)
-   2153 ** {
-   2154 **   // do what you need to do here, e.g.
-   2155 **   process_file((wchar_t*)wParam);
-   2156 ** }
-   2157 */
-   2158
-   2159
-   2160 #define IPC_FILE_TAG_MAY_HAVE_UPDATED 3004
-   2161 #define IPC_FILE_TAG_MAY_HAVE_UPDATEDW 3005
-   2162 /* (requires Winamp 5.0+)
-   2163 ** This is a notification message sent to the main Winamp window when a file's tag
-   2164 ** (e.g. id3) may have been updated. This appears to be sent when the InfoBox(..) function
-   2165 ** of the associated input plugin returns a 1 (which is the file information dialog/editor
-   2166 ** call normally).
-   2167 **
-   2168 ** if(uMsg == WM_WA_IPC && lParam == IPC_FILE_TAG_MAY_HAVE_UPDATED)
-   2169 ** {
-   2170 **   // do what you need to do here, e.g.
-   2171 **   update_info_on_file_update((char*)wParam);
-   2172 ** }
-   2173 */
954 2174
955 2175
956 #define IPC_ALLOW_PLAYTRACKING 3007 2176 #define IPC_ALLOW_PLAYTRACKING 3007
957 // send nonzero to allow, zero to disallow -  
-   2177 /* (requires Winamp 5.0+)
-   2178 ** SendMessage(hwnd_winamp,WM_WA_IPC,allow,IPC_ALLOW_PLAYTRACKING);
-   2179 ** Send allow as nonzero to allow play tracking and zero to disable the mode.
-   2180 */
958 2181
959 #define IPC_HOOK_OKTOQUIT 3010 // return 0 to abort a quit, nonzero if quit is OK -  
960 2182
961 #define IPC_WRITECONFIG 3011 // pass 2 to write all, 1 to write playlist + common, 0 to write common+less common -  
-   2183 #define IPC_HOOK_OKTOQUIT 3010
-   2184 /* (requires Winamp 5.0+)
-   2185 ** This is a notification message sent to the main Winamp window asking if it's okay to
-   2186 ** close or not. Return zero to prevent Winamp from closing or return anything non-zero
-   2187 ** to allow Winamp to close.
-   2188 **
-   2189 ** The best implementation of this option is to let the message pass through to the
-   2190 ** original window proceedure since another plugin may want to have a say in the matter
-   2191 ** with regards to Winamp closing.
-   2192 **
-   2193 ** if(uMsg == WM_WA_IPC && lParam == IPC_HOOK_OKTOQUIT)
-   2194 ** {
-   2195 **   // do what you need to do here, e.g.
-   2196 **   if(no_shut_down())
-   2197 **   {
-   2198 **     return 1;
-   2199 **   }
-   2200 ** }
-   2201 */
962 2202
963 // pass a string to be the name to register, and returns a value > 65536, which is a unique value you can use -  
964 // for custom WM_WA_IPC messages. -  
965 #define IPC_REGISTER_WINAMP_IPCMESSAGE 65536 -  
966 2203
967 /**************************************************************************/ -  
-   2204 #define IPC_WRITECONFIG 3011
-   2205 /* (requires Winamp 5.0+)
-   2206 ** SendMessage(hwnd_winamp,WM_WA_IPC,write_type,IPC_WRITECONFIG);
-   2207 **
-   2208 ** Send write_type as 2 to write all config settings and the current playlist.
-   2209 **
-   2210 ** Send write_type as 1 to write the playlist and common settings.
-   2211 ** This won't save the following ini settings::
-   2212 **
-   2213 **   defext, titlefmt, proxy, visplugin_name, dspplugin_name, check_ft_startup,
-   2214 **   visplugin_num, pe_fontsize, visplugin_priority, visplugin_autoexec, dspplugin_num,
-   2215 **   sticon, splash, taskbar, dropaotfs, ascb_new, ttips, riol, minst, whichicon,
-   2216 **   whichicon2, addtolist, snap, snaplen, parent, hilite, disvis, rofiob, shownumsinpl,
-   2217 **   keeponscreen, eqdsize, usecursors, fixtitles, priority, shuffle_morph_rate,
-   2218 **   useexttitles, bifont, inet_mode, ospb, embedwnd_freesize, no_visseh
-   2219 ** (the above was valid for 5.1)
-   2220 **
-   2221 ** Send write_type as 0 to write the common and less common settings and no playlist.
-   2222 */
968 2223
969 /* -  
970 ** Finally there are some WM_COMMAND messages that you can use to send -  
971 ** Winamp misc commands. -  
972 ** -  
973 ** To send these, use: -  
-   2224
-   2225 #define IPC_UPDATE_URL 3012
-   2226 // pass the URL (char *) in lparam, will be free()'d on done.
-   2227
-   2228
-   2229 #define IPC_GET_RANDFUNC 3015 // returns a function to get a random number
-   2230 /* (requires Winamp 5.1+)
-   2231 ** int (*randfunc)(void) = (int(*)(void))SendMessage(plugin.hwndParent,WM_WA_IPC,0,IPC_GET_RANDFUNC);
-   2232 ** if(randfunc && randfunc != 1){
-   2233 **   randfunc();
-   2234 ** }
974 ** 2235 **
975 ** SendMessage(hwnd_winamp, WM_COMMAND,command_name,0); -  
-   2236 ** This will return a positive 32-bit number (essentially 31-bit).
-   2237 ** The check for a returned value of 1 is because that's the default return value from
-   2238 ** SendMessage(..) when it is not handled so is good to check for it in this situation.
976 */ 2239 */
977 2240
978 #define WINAMP_OPTIONS_EQ               40036 // toggles the EQ window -  
979 #define WINAMP_OPTIONS_PLEDIT           40040 // toggles the playlist window -  
980 #define WINAMP_VOLUMEUP                 40058 // turns the volume up a little -  
981 #define WINAMP_VOLUMEDOWN               40059 // turns the volume down a little -  
982 #define WINAMP_FFWD5S                   40060 // fast forwards 5 seconds -  
983 #define WINAMP_REW5S                    40061 // rewinds 5 seconds -  
984 2241
985 // the following are the five main control buttons, with optionally shift -  
986 // or control pressed -  
987 // (for the exact functions of each, just try it out) -  
988 #define WINAMP_BUTTON1                  40044 -  
989 #define WINAMP_BUTTON2                  40045 -  
990 #define WINAMP_BUTTON3                  40046 -  
991 #define WINAMP_BUTTON4                  40047 -  
992 #define WINAMP_BUTTON5                  40048 -  
993 #define WINAMP_BUTTON1_SHIFT            40144 -  
994 #define WINAMP_BUTTON2_SHIFT            40145 -  
995 #define WINAMP_BUTTON3_SHIFT            40146 -  
996 #define WINAMP_BUTTON4_SHIFT            40147 -  
997 #define WINAMP_BUTTON5_SHIFT            40148 -  
998 #define WINAMP_BUTTON1_CTRL             40154 -  
999 #define WINAMP_BUTTON2_CTRL             40155 -  
1000 #define WINAMP_BUTTON3_CTRL             40156 -  
1001 #define WINAMP_BUTTON4_CTRL             40157 -  
1002 #define WINAMP_BUTTON5_CTRL             40158 -  
-   2242 #define IPC_METADATA_CHANGED 3017
-   2243 /* (requires Winamp 5.1+)
-   2244 ** int changed=SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)(char*)field,IPC_METADATA_CHANGED);
-   2245 ** a plugin can SendMessage this to winamp if internal metadata has changes.
-   2246 ** wParam should be a char * of what field changed
-   2247 **
-   2248 ** Currently used for internal actions (and very few at that) the intent of this api is
-   2249 ** to allow a plugin to call it when metadata has changed in the current playlist entry
-   2250 ** e.g.a new id3v2 tag was found in a stream
-   2251 **
-   2252 ** The wparam value can either be NULL or a pointer to an ansi string for the metadata
-   2253 ** which has changed. This can be thought of as an advanced version of IPC_UPDTITLE and
-   2254 ** could be used to allow for update of the current title when a specific tag changed.
-   2255 **
-   2256 ** Not recommended to be used since there is not the complete handling implemented in
-   2257 ** Winamp for it at the moment.
-   2258 */
1003 2259
1004 #define WINAMP_FILE_PLAY                40029 // pops up the load file(s) box -  
1005 #define WINAMP_FILE_DIR                 40187 // pops up the load directory box -  
1006 #define WINAMP_OPTIONS_PREFS            40012 // pops up the preferences -  
1007 #define WINAMP_OPTIONS_AOT              40019 // toggles always on top -  
1008 #define WINAMP_HELP_ABOUT               40041 // pops up the about box :) -  
1009 2260
1010 #define ID_MAIN_PLAY_AUDIOCD1           40323 // starts playing the audio CD in the first CD reader -  
1011 #define ID_MAIN_PLAY_AUDIOCD2           40323 // plays the 2nd -  
1012 #define ID_MAIN_PLAY_AUDIOCD3           40323 // plays the 3nd -  
1013 #define ID_MAIN_PLAY_AUDIOCD4           40323 // plays the 4nd -  
-   2261 #define IPC_SKIN_CHANGED 3018
-   2262 /* (requires Winamp 5.1+)
-   2263 ** This is a notification message sent to the main Winamp window by itself whenever
-   2264 ** the skin in use is changed. There is no information sent by the wParam for this.
-   2265 **
-   2266 ** if(message == WM_WA_IPC && lparam == IPC_SKIN_CHANGED)
-   2267 ** {
-   2268 **   // do what you need to do to handle skin changes, e.g. call WADlg_init(hwnd_winamp);
-   2269 ** }
-   2270 */
1014 2271
1015 // IDs 42000 to 45000 are reserved for gen_ff -  
1016 // IDs from 45000 to 57000 are reserved for library -  
1017 2272
1018 #endif//_WA_IPC_H_ -  
-   2273 #define IPC_REGISTER_LOWORD_COMMAND 3019
-   2274 /* (requires Winamp 5.1+)
-   2275 ** WORD id = SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_REGISTER_LOWORD_COMMAND);
-   2276 ** This will assign you a unique id for making your own commands such as for extra menu
-   2277 ** entries. The starting value returned by this message will potentially change as and
-   2278 ** when the main resource file of Winamp is updated with extra data so assumptions cannot
-   2279 ** be made on what will be returned and plugin loading order will affect things as well.
1019 2280
1020 /* -  
1021 ** EOF.. Enjoy. -  
1022 */ 2281 ** 5.33+
-   2282 ** If you want to reserve more than one id, you can pass the number of ids required in wParam
-   2283 */
-   2284
-   2285
-   2286 #define IPC_GET_DISPATCH_OBJECT 3020  // gets winamp main IDispatch * (for embedded webpages)
-   2287 #define IPC_GET_UNIQUE_DISPATCH_ID 3021 // gives you a unique dispatch ID that won't conflict with anything in winamp's IDispatch *
-   2288 #define IPC_ADD_DISPATCH_OBJECT 3022 // add your own dispatch object into winamp's.  This lets embedded webpages access your functions
-   2289 // pass a pointer to DispatchInfo (see below).  Winamp makes a copy of all this data so you can safely delete it later
-   2290 typedef struct
-   2291 {
-   2292   wchar_t *name; // filled in by plugin, make sure it's a unicode string!! (i.e. L"myObject" instead of "myObject).
-   2293   struct IDispatch *dispatch; // filled in by plugin
-   2294   DWORD id; // filled in by winamp on return
-   2295 } DispatchInfo;
-   2296
-   2297 // see IPC_JSAPI2_GET_DISPATCH_OBJECT for version 2 of the Dispatchable scripting interface
-   2298
-   2299 #define IPC_GET_PROXY_STRING 3023
-   2300 /* (requires Winamp 5.11+)
-   2301 ** char* proxy_string=(char*)SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GET_PROXY_STRING);
-   2302 ** This will return the same string as is shown on the General Preferences page.
-   2303 */
-   2304
-   2305
-   2306 #define IPC_USE_REGISTRY 3024
-   2307 /* (requires Winamp 5.11+)
-   2308 ** int reg_enabled=SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_USE_REGISTRY);
-   2309 ** This will return 0 if you should leave your grubby hands off the registry (i.e. for
-   2310 ** lockdown mode). This is useful if Winamp is run from a USB drive and you can't alter
-   2311 ** system settings, etc.
-   2312 */
-   2313
-   2314
-   2315 #define IPC_GET_API_SERVICE 3025
-   2316 /* (requires Winamp 5.12+)
-   2317 ** api_service* api_service = (api_service)SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GET_API_SERVICE);
-   2318 ** This api will return Winamp's api_service pointer (which is what Winamp3 used, heh).
-   2319 ** If this api is not supported in the Winamp version that is being used at the time then
-   2320 ** the returned value from this api will be 1 which is a good version check.
-   2321 **
-   2322 ** As of 5.12 there is support for .w5s plugins which reside in %WinampDir%\System and
-   2323 ** are intended for common code that can be shared amongst other plugins e.g. jnetlib.w5s
-   2324 ** which contains jnetlib in one instance instead of being duplicated multiple times in
-   2325 ** all of the plugins which need internet access.
-   2326 **
-   2327 ** Details on the .w5s specifications will come at some stage (possibly).
-   2328 */
-   2329
-   2330
-   2331 typedef struct {
-   2332   const wchar_t *filename;
-   2333   const wchar_t *metadata;
-   2334   wchar_t *ret;
-   2335   size_t retlen;
-   2336 } extendedFileInfoStructW;
-   2337
-   2338 #define IPC_GET_EXTENDED_FILE_INFOW 3026
-   2339 /* (requires Winamp 5.13+)
-   2340 ** Pass a pointer to the above struct in wParam
-   2341 */
-   2342
-   2343
-   2344 #define IPC_GET_EXTENDED_FILE_INFOW_HOOKABLE 3027
-   2345 #define IPC_SET_EXTENDED_FILE_INFOW 3028
-   2346 /* (requires Winamp 5.13+)
-   2347 ** Pass a pointer to the above struct in wParam
-   2348 */
-   2349
-   2350
-   2351 #define IPC_PLAYLIST_GET_NEXT_SELECTED 3029
-   2352 /* (requires 5.2+)
-   2353 ** int pl_item = SendMessage(hwnd_winamp,WM_WA_IPC,start,IPC_PLAYLIST_GET_NEXT_SELECTED);
-   2354 **
-   2355 ** This works just like the ListView_GetNextItem(..) macro for ListView controls.
-   2356 ** 'start' is the index of the playlist item that you want to begin the search after or
-   2357 ** set this as -1 for the search to begin with the first item of the current playlist.
-   2358 **
-   2359 ** This will return the index of the selected playlist according to the 'start' value or
-   2360 ** it returns -1 if there is no selection or no more selected items according to 'start'.
-   2361 **
-   2362 ** Quick example:
-   2363 **
-   2364 ** int sel = -1;
-   2365 ** // keep incrementing the start of the search so we get all of the selected entries
-   2366 ** while((sel = SendMessage(hwnd_winamp,WM_WA_IPC,sel,IPC_PLAYLIST_GET_NEXT_SELECTED))!=-1){
-   2367 **   // show the playlist file entry of the selected item(s) if there were any
-   2368 **   MessageBox(hwnd_winamp,(char*)SendMessage(hwnd_winamp,WM_WA_IPC,sel,IPC_GETPLAYLISTFILE),0,0);
-   2369 ** }
-   2370 */
-   2371
-   2372
-   2373 #define IPC_PLAYLIST_GET_SELECTED_COUNT 3030
-   2374 /* (requires 5.2+)
-   2375 ** int selcnt = SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_PLAYLIST_GET_SELECTED_COUNT);
-   2376 ** This will return the number of selected playlist entries.
-   2377 */
-   2378
-   2379
-   2380 #define IPC_GET_PLAYING_FILENAME 3031
-   2381 // returns wchar_t * of the currently playing filename
-   2382
-   2383 #define IPC_OPEN_URL 3032
-   2384 // send either ANSI or Unicode string (it'll figure it out, but it MUST start with "h"!, so don't send ftp:// or anything funny)
-   2385 // you can also send this one from another process via WM_COPYDATA (unicode only)
-   2386
-   2387
-   2388 #define IPC_USE_UXTHEME_FUNC 3033
-   2389 /* (requires Winamp 5.35+)
-   2390 ** int ret = SendMessage(hwnd_winamp,WM_WA_IPC,param,IPC_USE_UXTHEME_FUNC);
-   2391 ** param can be IPC_ISWINTHEMEPRESENT or IPC_ISAEROCOMPOSITIONACTIVE or a valid hwnd.
-   2392 **
-   2393 ** If you pass a hwnd then it will apply EnableThemeDialogTexture(ETDT_ENABLETAB)
-   2394 ** so your tabbed dialogs can use the correct theme (on supporting OSes ie XP+).
-   2395 **
-   2396 ** Otherwise this will return a value based on the param passed (as defined below).
-   2397 ** For compatability, the return value will be zero on success (as 1 is returned
-   2398 ** for unsupported ipc calls on older Winamp versions)
-   2399 */
-   2400   #define IPC_ISWINTHEMEPRESENT 0
-   2401 /* This will return 0 if uxtheme.dll is present
-   2402 ** int isthemethere = !SendMessage(hwnd_winamp,WM_WA_IPC,IPC_ISWINTHEMEPRESENT,IPC_USE_UXTHEME_FUNC);
-   2403 */
-   2404   #define IPC_ISAEROCOMPOSITIONACTIVE 1
-   2405 /* This will return 0 if aero composition is active
-   2406 ** int isaero = !SendMessage(hwnd_winamp,WM_WA_IPC,IPC_ISAEROCOMPOSITIONACTIVE,IPC_USE_UXTHEME_FUNC);
-   2407 */
-   2408
-   2409
-   2410 #define IPC_GET_PLAYING_TITLE 3034
-   2411 // returns wchar_t * of the current title
-   2412
-   2413
-   2414 #define IPC_CANPLAY 3035
-   2415 // pass const wchar_t *, returns an in_mod * or 0
-   2416
-   2417
-   2418 typedef struct {
-   2419   // fill these in...
-   2420   size_t size; // init to sizeof(artFetchData)
-   2421   HWND parent; // parent window of the dialogue
-   2422
-   2423   // fill as much of these in as you can, otherwise leave them 0
-   2424   const wchar_t *artist;
-   2425   const wchar_t *album;
-   2426   int year, amgArtistId, amgAlbumId;
-   2427
-   2428   int showCancelAll; // if set to 1, this shows a "Cancel All" button on the dialogue
-   2429
-   2430   // winamp will fill these in if the call returns successfully:
-   2431   void* imgData; // a buffer filled with compressed image data. free with WASABI_API_MEMMGR->sysFree()
-   2432   int imgDataLen; // the size of the buffer
-   2433   wchar_t type[10]; // eg: "jpg"
-   2434   const wchar_t *gracenoteFileId; // if you know it
-   2435 } artFetchData;
-   2436
-   2437 #define IPC_FETCH_ALBUMART 3036
-   2438 /* pass an artFetchData*. This will show a dialog guiding the use through choosing art, and return when it's finished
-   2439 ** return values:
-   2440 ** 1: error showing dialog
-   2441 ** 0: success
-   2442 ** -1: cancel was pressed
-   2443 ** -2: cancel all was pressed
-   2444 */
-   2445
-   2446 #define IPC_JSAPI2_GET_DISPATCH_OBJECT 3037
-   2447 /* pass your service's unique ID, as a wchar_t * string, in wParam
-   2448 ** Winamp will copy the string, so don't worry about keeping it around
-   2449 ** An IDispatch * object will be returned (cast the return value from SendMessage)
-   2450 ** This IDispatch can be used for scripting/automation/VB interaction
-   2451 ** Pass to IE via IDocHostUIHandler::GetExternal and it will become window.external in javscript
-   2452 */
-   2453
-   2454 #define IPC_REGISTER_WINAMP_IPCMESSAGE 65536
-   2455 /* (requires Winamp 5.0+)
-   2456 ** DWORD id = SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)name,IPC_REGISTER_WINAMP_IPCMESSAGE);
-   2457 ** The value 'id' returned is > 65536 and is incremented on subsequent calls for unique
-   2458 ** 'name' values passed to it. By using the same 'name' in different plugins will allow a
-   2459 ** common runtime api to be provided for the currently running instance of Winamp
-   2460 ** e.g.
-   2461 **   PostMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)my_param,registered_ipc);
-   2462 ** Have a look at wa_hotkeys.h for an example on how this api is used in practice for a
-   2463 ** custom WM_WA_IPC message.
-   2464 **
-   2465 ** if(uMsg == WM_WA_IPC && lParam == id_from_register_winamp_ipcmessage){
-   2466 **   // do things
-   2467 ** }
-   2468 */
-   2469
-   2470 #endif//_WA_IPC_H_