2
** Copyright (C) 2003 Nullsoft, Inc.
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.
7
** Permission is granted to anyone to use this software for any purpose, including commercial applications, and to
8
** alter it and redistribute it freely, subject to the following restrictions:
10
** 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software.
11
** If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
13
** 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
15
** 3. This notice may not be removed or altered from any source distribution.
23
** 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.
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_*);
32
#define WM_WA_IPC WM_USER
33
/* but some of them use WM_COPYDATA. be afraid.
36
#define IPC_GETVERSION 0
37
/* int version = SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETVERSION);
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.
43
#define IPC_GETREGISTEREDVERSION 770
50
} 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",
52
// otherwise it's assumed to be a file (for speed)
54
#define IPC_PLAYFILE 100 // dont be fooled, this is really the same as enqueufile
55
#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
62
#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.
65
/* SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_DELETE);
66
** Use IPC_DELETE to clear Winamp's internal playlist.
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)
75
/* sent as a WM_COPYDATA, with IPC_CHDIR as the dwData, and the directory to change to
80
#define IPC_ISPLAYING 104
81
/* 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.
87
#define IPC_GETOUTPUTTIME 105
88
/* 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.
94
#define IPC_JUMPTOTIME 106
95
/* (requires Winamp 1.60+)
96
** 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
102
#define IPC_GETMODULENAME 109
103
#define IPC_EX_ISRIGHTEXE 666
104
/* usually shouldnt bother using these, but here goes:
105
** 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
107
** IPC_EX_ISRIGHTEXE, it returns whether or not that filename
108
** matches. lame, I know.
111
#define IPC_WRITEPLAYLIST 120
112
/* (requires Winamp 1.666+)
113
** SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_WRITEPLAYLIST);
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)
122
#define IPC_SETPLAYLISTPOS 121
123
/* (requires Winamp 2.0+)
124
** 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
131
#define IPC_SETVOLUME 122
132
/* (requires Winamp 2.0+)
133
** SendMessage(hwnd_winamp,WM_WA_IPC,volume,IPC_SETVOLUME);
134
** IPC_SETVOLUME sets the volume of Winamp (from 0-255).
138
#define IPC_SETPANNING 123
139
/* (requires Winamp 2.0+)
140
** SendMessage(hwnd_winamp,WM_WA_IPC,panning,IPC_SETPANNING);
141
** IPC_SETPANNING sets the panning of Winamp (from 0 (left) to 255 (right)).
145
#define IPC_GETLISTLENGTH 124
146
/* (requires Winamp 2.0+)
147
** int length = SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETLISTLENGTH);
148
** IPC_GETLISTLENGTH returns the length of the current playlist, in
153
#define IPC_GETLISTPOS 125
154
/* (requires Winamp 2.05+)
155
** 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.
161
#define IPC_GETINFO 126
162
/* (requires Winamp 2.05+)
163
** int inf=SendMessage(hwnd_winamp,WM_WA_IPC,mode,IPC_GETINFO);
164
** IPC_GETINFO returns info about the current playing song. The value
165
** it returns depends on the value of 'mode'.
167
** ------------------
168
** 0 Samplerate (i.e. 44100)
169
** 1 Bitrate (i.e. 128)
170
** 2 Channels (i.e. 2)
171
** 3 (5+) Video LOWORD=w HIWORD=h
172
** 4 (5+) > 65536, string (video description)
176
#define IPC_GETEQDATA 127
177
/* (requires Winamp 2.05+)
178
** int data=SendMessage(hwnd_winamp,WM_WA_IPC,pos,IPC_GETEQDATA);
179
** IPC_GETEQDATA queries the status of the EQ.
180
** The value returned depends on what 'pos' is set to:
182
** ------------------
183
** 0-9 The 10 bands of EQ data. 0-63 (+20db - -20db)
184
** 10 The preamp value. 0-63 (+20db - -20db)
185
** 11 Enabled. zero if disabled, nonzero if enabled.
186
** 12 Autoload. zero if disabled, nonzero if enabled.
190
#define IPC_SETEQDATA 128
191
/* (requires Winamp 2.05+)
192
** SendMessage(hwnd_winamp,WM_WA_IPC,pos,IPC_GETEQDATA);
193
** SendMessage(hwnd_winamp,WM_WA_IPC,value,IPC_SETEQDATA);
194
** IPC_SETEQDATA sets the value of the last position retrieved
195
** by IPC_GETEQDATA. This is pretty lame, and we should provide
196
** an extended version that lets you do a MAKELPARAM(pos,value).
200
if the high byte is set to 0xDB, then the third byte specifies
201
which band, and the bottom word specifies the value.
204
#define IPC_ADDBOOKMARK 129
205
/* (requires Winamp 2.4+)
206
** Sent as a WM_COPYDATA, using IPC_ADDBOOKMARK, adds the specified
207
** file/url to the Winamp bookmark list.
210
In winamp 5+, we use this as a normal WM_WA_IPC and the string:
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.
221
#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.
227
#define IPC_RESTARTWINAMP 135
228
/* (requires Winamp 2.2+)
229
** SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_RESTARTWINAMP);
230
** IPC_RESTARTWINAMP will restart Winamp (isn't that obvious ? :)
234
#define IPC_ISFULLSTOP 400
235
/* (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.
243
#define IPC_INETAVAILABLE 242
244
/* (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.
250
#define IPC_UPDTITLE 243
251
/* (requires Winamp 2.2+)
252
** SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_UPDTITLE);
253
** IPC_UPDTITLE will ask Winamp to update the informations about the current title.
257
#define IPC_REFRESHPLCACHE 247
258
/* (requires Winamp 2.2+)
259
** 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)
265
#define IPC_GET_SHUFFLE 250
266
/* (requires Winamp 2.4+)
267
** val=SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GET_SHUFFLE);
269
** IPC_GET_SHUFFLE returns the status of the Shuffle option (1 if set)
273
#define IPC_GET_REPEAT 251
274
/* (requires Winamp 2.4+)
275
** val=SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GET_REPEAT);
277
** IPC_GET_REPEAT returns the status of the Repeat option (1 if set)
281
#define IPC_SET_SHUFFLE 252
282
/* (requires Winamp 2.4+)
283
** SendMessage(hwnd_winamp,WM_WA_IPC,value,IPC_SET_SHUFFLE);
285
** IPC_SET_SHUFFLE sets the status of the Shuffle option (1 to turn it on)
289
#define IPC_SET_REPEAT 253
290
/* (requires Winamp 2.4+)
291
** SendMessage(hwnd_winamp,WM_WA_IPC,value,IPC_SET_REPEAT);
293
** IPC_SET_REPEAT sets the status of the Repeat option (1 to turn it on)
297
#define IPC_ENABLEDISABLE_ALL_WINDOWS 259 // 0xdeadbeef to disable
298
/* (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.
305
#define IPC_GETWND 260
306
/* (requires Winamp 2.9+)
307
** HWND h=SendMessage(hwnd_winamp,WM_WA_IPC,IPC_GETWND_xxx,IPC_GETWND);
308
** returns the HWND of the window specified.
310
#define IPC_GETWND_EQ 0 // use one of these for the param
311
#define IPC_GETWND_PE 1
312
#define IPC_GETWND_MB 2
313
#define IPC_GETWND_VIDEO 3
314
#define IPC_ISWNDVISIBLE 261 // same param as IPC_GETWND
319
/************************************************************************
320
***************** in-process only (WE LOVE PLUGINS)
321
************************************************************************/
324
#define IPC_SETSKIN 200
325
/* (requires Winamp 2.04+, only usable from plug-ins (not external apps))
326
** SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)"skinname",IPC_SETSKIN);
327
** 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.
329
** If path isn't specified, the default search path is the winamp skins
334
#define IPC_GETSKIN 201
335
/* (requires Winamp 2.04+, only usable from plug-ins (not external apps))
336
** SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)skinname_buffer,IPC_GETSKIN);
337
** IPC_GETSKIN puts the directory where skin bitmaps can be found
338
** into skinname_buffer.
339
** skinname_buffer must be MAX_PATH characters in length.
340
** When using a .zip'd skin file, it'll return a temporary directory
341
** where the ZIP was decompressed.
345
#define IPC_EXECPLUG 202
346
/* (requires Winamp 2.04+, only usable from plug-ins (not external apps))
347
** SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)"vis_file.dll",IPC_EXECPLUG);
348
** IPC_EXECPLUG executes a visualization plug-in pointed to by WPARAM.
349
** the format of this string can be:
350
** "vis_whatever.dll"
351
** "vis_whatever.dll,0" // (first mod, file in winamp plug-in dir)
352
** "C:\\dir\\vis_whatever.dll,1"
356
#define IPC_GETPLAYLISTFILE 211
357
/* (requires Winamp 2.04+, only usable from plug-ins (not external apps))
358
** char *name=SendMessage(hwnd_winamp,WM_WA_IPC,index,IPC_GETPLAYLISTFILE);
359
** IPC_GETPLAYLISTFILE gets the filename of the playlist entry [index].
360
** returns a pointer to it. returns NULL on error.
364
#define IPC_GETPLAYLISTTITLE 212
365
/* (requires Winamp 2.04+, only usable from plug-ins (not external apps))
366
** char *name=SendMessage(hwnd_winamp,WM_WA_IPC,index,IPC_GETPLAYLISTTITLE);
368
** IPC_GETPLAYLISTTITLE gets the title of the playlist entry [index].
369
** returns a pointer to it. returns NULL on error.
373
#define IPC_GETHTTPGETTER 240
374
/* retrieves a function pointer to a HTTP retrieval function.
375
** if this is unsupported, returns 1 or 0.
376
** the function should be:
377
** 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,
379
** it will return 0 on successful download, 1 on error.
383
#define IPC_MBOPEN 241
384
/* (requires Winamp 2.05+)
385
** SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_MBOPEN);
386
** 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.
392
#define IPC_CHANGECURRENTFILE 245
393
/* (requires Winamp 2.05+)
394
** SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)file,IPC_CHANGECURRENTFILE);
395
** IPC_CHANGECURRENTFILE will set the current playlist item.
399
#define IPC_GETMBURL 246
400
/* (requires Winamp 2.2+)
401
** char buffer[4096]; // Urls can be VERY long
402
** SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)buffer,IPC_GETMBURL);
403
** IPC_GETMBURL will retrieve the current Minibrowser URL into buffer.
404
** buffer must be at least 4096 bytes long.
408
#define IPC_MBBLOCK 248
409
/* (requires Winamp 2.4+)
410
** SendMessage(hwnd_winamp,WM_WA_IPC,value,IPC_MBBLOCK);
412
** IPC_MBBLOCK will block the Minibrowser from updates if value is set to 1
415
#define IPC_MBOPENREAL 249
416
/* (requires Winamp 2.4+)
417
** SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)url,IPC_MBOPENREAL);
419
** IPC_MBOPENREAL works the same as IPC_MBOPEN except that it will works even if
420
** IPC_MBBLOCK has been set to 1
423
#define IPC_ADJUST_OPTIONSMENUPOS 280
424
/* (requires Winamp 2.9+)
425
** 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
427
** menu item above the options/skins/vis menus.
430
#define IPC_GET_HMENU 281
431
/* (requires Winamp 2.9+)
432
** HMENU hMenu=SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)0,IPC_GET_HMENU);
434
** 0 : main popup menu
435
** 1 : main menubar file menu
436
** 2 : main menubar options menu
437
** 3 : main menubar windows menu
438
** 4 : main menubar help menu
439
** other values will return NULL.
442
#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
444
/* (requires Winamp 2.9+)
445
** to use, create an extendedFileInfoStruct, point the values filename and metadata to the
446
** filename and metadata field you wish to query, and ret to a buffer, with retlen to the
447
** 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.
449
** returns 1 if the decoder supports a getExtendedFileInfo method
456
} extendedFileInfoStruct;
458
#define IPC_GET_BASIC_FILE_INFO 291 //pass a pointer to the following struct in wParam
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)
464
// filled in by winamp
468
} basicFileInfoStruct;
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
472
#define IPC_INFOBOX 293
478
#define IPC_SET_EXTENDED_FILE_INFO 294 //pass a pointer to the a extendedFileInfoStruct in wParam
479
/* (requires Winamp 2.9+)
480
** 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
482
** SendMessage(hwnd_winamp,WM_WA_IPC,&struct,IPC_SET_EXTENDED_FILE_INFO);
483
** 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
487
#define IPC_WRITE_EXTENDED_FILE_INFO 295
488
/* (requires Winamp 2.9+)
489
** 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
493
#define IPC_FORMAT_TITLE 297
496
char *spec; // NULL=default winamp spec
502
char * (*TAGFUNC)(char * tag, void * p); //return 0 if not found
503
void (*TAGFREEFUNC)(char * tag,void * p);
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.
514
int (*inflateReset)(void *strm);
515
int (*inflateInit_)(void *strm,const char *version, int stream_size);
516
int (*inflate)(void *strm, int flush);
517
int (*inflateEnd)(void *strm);
518
unsigned long (*crc32)(unsigned long crc, const unsigned char *buf, unsigned int len);
522
#define IPC_ADD_PREFS_DLG 332
523
#define IPC_REMOVE_PREFS_DLG 333
524
/* (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);
534
** you can also IPC_REMOVE_PREFS_DLG with the address of the same prefsRec,
535
** but you shouldn't really ever have to.
538
#define IPC_OPENPREFSTOPAGE 380 // pass an id of a builtin page, or a &prefsDlgRec of prefs page to open
540
typedef struct _prefsDlgRec {
546
int where; // 0 for options, 1 for plugins, 2 for skins, 3 for bookmarks, 4 for prefs
550
struct _prefsDlgRec *next;
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)
557
#define IPC_SPAWNBUTTONPOPUP 361 // param =
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
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
575
// pass 0 for a copy of the skin HBITMAP
576
// pass 1 for name of font to use for playlist editor likeness
577
// pass 2 for font charset
578
// pass 3 for font size
579
#define IPC_GET_GENSKINBITMAP 503
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
586
HWND me; //hwnd of the window
592
void *user_ptr; // for application use
594
int extra_data[64]; // for internal winamp use
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
601
#define IPC_EMBED_ENUM 532
602
typedef struct embedEnumStruct
604
int (*enumProc)(embedWindowState *ws, struct embedEnumStruct *param); // return 1 to abort
605
int user_data; // or more :)
609
#define IPC_EMBED_ISVALID 533
611
#define IPC_CONVERTFILE 506
612
/* (requires Winamp 2.92+)
613
** Converts a given file to a different format (PCM, MP3, etc...)
614
** To use, pass a pointer to a waFileConvertStruct struct
615
** This struct can be either on the heap or some global
616
** data, but NOT on the stack. At least, until the conversion is done.
618
** eg: SendMessage(hwnd_winamp,WM_WA_IPC,&myConvertStruct,IPC_CONVERTFILE);
621
** 0: Can't start the conversion. Look at myConvertStruct->error for details.
622
** 1: Conversion started. Status messages will be sent to the specified callbackhwnd.
623
** Be sure to call IPC_CONVERTFILE_END when your callback window receives the
624
** IPC_CB_CONVERT_DONE message.
628
char *sourcefile; // "c:\\source.mp3"
629
char *destfile; // "c:\\dest.pcm"
630
int destformat[8]; // like 'PCM ',srate,nch,bps
631
HWND callbackhwnd; // window that will receive the IPC_CB_CONVERT notification messages
633
//filled in by winamp.exe
634
char *error; //if IPC_CONVERTFILE returns 0, the reason will be here
636
int bytes_done; //you can look at both of these values for speed statistics
640
int killswitch; // don't set it manually, use IPC_CONVERTFILE_END
641
int extra_data[64]; // for internal winamp use
644
#define IPC_CONVERTFILE_END 507
645
/* (requires Winamp 2.92+)
646
** 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
648
** want to abort a conversion process
650
** eg: SendMessage(hwnd_winamp,WM_WA_IPC,&myConvertStruct,IPC_CONVERTFILE_END);
659
//filled in by winamp.exe
662
} convertConfigStruct;
663
#define IPC_CONVERT_CONFIG 508
664
#define IPC_CONVERT_CONFIG_END 509
668
void (*enumProc)(int user_data, const char *desc, int fourcc);
670
} converterEnumFmtStruct;
671
#define IPC_CONVERT_CONFIG_ENUMFMTS 510
672
/* (requires Winamp 2.92+)
682
//filled in by winamp.exe
685
#define IPC_BURN_CD 511
686
/* (requires Winamp 5.0+)
691
convertFileStruct *cfs;
693
} convertSetPriority;
694
#define IPC_CONVERT_SET_PRIORITY 512
699
char *title; // 2048 bytes
701
int force_useformatting; // can set this to 1 if you want to force a url to use title formatting shit
703
// return TRUE if you hook this
704
#define IPC_HOOK_TITLES 850
706
#define IPC_GETSADATAFUNC 800
707
// 0: returns a char *export_sa_get() that returns 150 bytes of data
708
// 1: returns a export_sa_setreq(int want);
710
#define IPC_ISMAINWNDVISIBLE 900
713
#define IPC_SETPLEDITCOLORS 920
718
HBITMAP bm; // set if you want to override
719
} waSetPlColorsStruct;
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
741
int xpos; // in screen coordinates
745
// waSpawnMenuParms2 is used by the menubar submenus
749
int xpos; // in screen coordinates
756
// system tray sends this (you might want to simulate it)
757
#define WM_WA_SYSTRAY WM_USER+1
759
// input plugins send this when they are done playing back
760
#define WM_WA_MPEG_EOF WM_USER+2
766
#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
768
#define VIDEO_MAKETYPE(A,B,C,D) ((A) | ((B)<<8) | ((C)<<16) | ((D)<<24))
769
#define VIDUSER_SET_INFOSTRING 0x1000
770
#define VIDUSER_GET_VIDEOHWND 0x1001
771
#define VIDUSER_SET_VFLIP 0x1002
773
#ifndef NO_IVIDEO_DECLARE
780
unsigned char* baseAddr;
793
virtual ~IVideoOutput() { }
794
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) { }
796
virtual void close()=0;
797
virtual void draw(void *frame)=0;
798
virtual void drawSubtitle(SubsItem *item) { }
799
virtual void showStatusMsg(const char *text) { }
800
virtual int get_latency() { return 0; }
801
virtual void notifyBufferState(int bufferstate) { } /* 0-255*/
803
virtual int extended(int param1, int param2, int param3) { return 0; } // Dispatchable, eat this!
806
#endif//NO_IVIDEO_DECLARE
808
// these messages are callbacks that you can grab by subclassing the winamp window
811
#define IPC_CB_WND_EQ 0 // use one of these for the param
812
#define IPC_CB_WND_PE 1
813
#define IPC_CB_WND_MB 2
814
#define IPC_CB_WND_VIDEO 3
815
#define IPC_CB_WND_MAIN 4
817
#define IPC_CB_ONSHOWWND 600
818
#define IPC_CB_ONHIDEWND 601
820
#define IPC_CB_GETTOOLTIP 602
822
#define IPC_CB_MISC 603
823
#define IPC_CB_MISC_TITLE 0
824
#define IPC_CB_MISC_VOLUME 1 // volume/pan
825
#define IPC_CB_MISC_STATUS 2
826
#define IPC_CB_MISC_EQ 3
827
#define IPC_CB_MISC_INFO 4
828
#define IPC_CB_MISC_VIDEOINFO 5
830
#define IPC_CB_CONVERT_STATUS 604 // param value goes from 0 to 100 (percent)
831
#define IPC_CB_CONVERT_DONE 605
833
#define IPC_ADJUST_FFWINDOWSMENUPOS 606
834
/* (requires Winamp 2.9+)
835
** 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.
840
#define IPC_ISDOUBLESIZE 608
842
#define IPC_ADJUST_FFOPTIONSMENUPOS 609
843
/* (requires Winamp 2.9+)
844
** 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.
849
#define IPC_GETTIMEDISPLAYMODE 610 // returns 0 if displaying elapsed time or 1 if displaying remaining time
851
#define IPC_SETVISWND 611 // param is hwnd, setting this allows you to receive ID_VIS_NEXT/PREVOUS/RANDOM/FS wm_commands
852
#define ID_VIS_NEXT 40382
853
#define ID_VIS_PREV 40383
854
#define ID_VIS_RANDOM 40384
855
#define ID_VIS_FS 40389
856
#define ID_VIS_CFG 40390
857
#define ID_VIS_MENU 40391
859
#define IPC_GETVISWND 612 // returns the vis cmd handler hwnd
860
#define IPC_ISVISRUNNING 613
861
#define IPC_CB_VISRANDOM 628 // param is status of random
863
#define IPC_SETIDEALVIDEOSIZE 614 // sent by winamp to winamp, trap it if you need it. width=HIWORD(param), height=LOWORD(param)
865
#define IPC_GETSTOPONVIDEOCLOSE 615
866
#define IPC_SETSTOPONVIDEOCLOSE 616
875
#define IPC_TRANSLATEACCELERATOR 617
882
} windowCommand; // send this as param to an IPC_PLCMD, IPC_MBCMD, IPC_VIDCMD
884
#define IPC_CB_ONTOGGLEAOT 618
886
#define IPC_GETPREFSWND 619
888
#define IPC_SET_PE_WIDTHHEIGHT 620 // data is a pointer to a POINT structure that holds width & height
890
#define IPC_GETLANGUAGEPACKINSTANCE 621
892
#define IPC_CB_PEINFOTEXT 622 // data is a string, ie: "04:21/45:02"
894
#define IPC_CB_OUTPUTCHANGED 623 // output plugin was changed in config
896
#define IPC_GETOUTPUTPLUGIN 625
898
#define IPC_SETDRAWBORDERS 626
899
#define IPC_DISABLESKINCURSORS 627
900
#define IPC_CB_RESETFONT 629
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
905
#define IPC_SHOW_NOTIFICATION 632
907
#define IPC_GETSKININFO 633
909
// >>>>>>>>>>> Next is 634
911
#define IPC_PLCMD 1000
919
#define IPC_MBCMD 1001
922
#define MBCMD_FORWARD 1
924
#define MBCMD_RELOAD 3
927
#define IPC_VIDCMD 1002
929
#define VIDCMD_FULLSCREEN 0
933
#define VIDPOPUP_MISC 4
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)
942
#define IPC_STATS_LIBRARY_ITEMCNT 1300 // updates library count status
944
// IPC 2000-3000 reserved for freeform messages, see gen_ff/ff_ipc.h
945
#define IPC_FF_FIRST 2000
946
#define IPC_FF_LAST 3000
948
#define IPC_GETDROPTARGET 3001
950
#define IPC_PLAYLIST_MODIFIED 3002 // sent to main wnd whenever the playlist is modified
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
956
#define IPC_ALLOW_PLAYTRACKING 3007
957
// send nonzero to allow, zero to disallow
959
#define IPC_HOOK_OKTOQUIT 3010 // return 0 to abort a quit, nonzero if quit is OK
961
#define IPC_WRITECONFIG 3011 // pass 2 to write all, 1 to write playlist + common, 0 to write common+less common
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
967
/**************************************************************************/
970
** Finally there are some WM_COMMAND messages that you can use to send
971
** Winamp misc commands.
973
** To send these, use:
975
** SendMessage(hwnd_winamp, WM_COMMAND,command_name,0);
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
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
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 :)
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
1015
// IDs 42000 to 45000 are reserved for gen_ff
1016
// IDs from 45000 to 57000 are reserved for library
b'\\ No newline at end of file'