1
0

wa_ipc.h 36 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127
  1. /*
  2. LICENSE
  3. -------
  4. Copyright 2005 Nullsoft, Inc.
  5. All rights reserved.
  6. Redistribution and use in source and binary forms, with or without modification,
  7. are permitted provided that the following conditions are met:
  8. * Redistributions of source code must retain the above copyright notice,
  9. this list of conditions and the following disclaimer.
  10. * Redistributions in binary form must reproduce the above copyright notice,
  11. this list of conditions and the following disclaimer in the documentation
  12. and/or other materials provided with the distribution.
  13. * Neither the name of Nullsoft nor the names of its contributors may be used to
  14. endorse or promote products derived from this software without specific prior written permission.
  15. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
  16. IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  17. FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
  18. CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  19. DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  20. DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
  21. IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  22. OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  23. */
  24. #ifndef _WA_IPC_H_
  25. #define _WA_IPC_H_
  26. /*
  27. ** This is the modern replacement for the classic 'frontend.h'. Most of these
  28. ** updates are designed for in-process use, i.e. from a plugin.
  29. **
  30. */
  31. /* message used to sent many messages to winamp's main window.
  32. ** most all of the IPC_* messages involve sending the message in the form of:
  33. ** result = SendMessage(hwnd_winamp,WM_WA_IPC,(parameter),IPC_*);
  34. */
  35. #define WM_WA_IPC WM_USER
  36. /* but some of them use WM_COPYDATA. be afraid.
  37. */
  38. #define IPC_GETVERSION 0
  39. /* int version = SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETVERSION);
  40. **
  41. ** Version will be 0x20yx for winamp 2.yx. versions previous to Winamp 2.0
  42. ** typically (but not always) use 0x1zyx for 1.zx versions. Weird, I know.
  43. */
  44. #define IPC_GETREGISTEREDVERSION 770
  45. typedef struct {
  46. char *filename;
  47. char *title;
  48. int length;
  49. } enqueueFileWithMetaStruct; // send this to a IPC_PLAYFILE in a non WM_COPYDATA,
  50. // and you get the nice desired result. if title is NULL, it is treated as a "thing",
  51. // otherwise it's assumed to be a file (for speed)
  52. #define IPC_PLAYFILE 100 // dont be fooled, this is really the same as enqueufile
  53. #define IPC_ENQUEUEFILE 100
  54. /* sent as a WM_COPYDATA, with IPC_PLAYFILE as the dwData, and the string to play
  55. ** as the lpData. Just enqueues, does not clear the playlist or change the playback
  56. ** state.
  57. */
  58. #define IPC_DELETE 101
  59. #define IPC_DELETE_INT 1101 // don't use this, it's used internally by winamp when
  60. // dealing with some lame explorer issues.
  61. /* SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_DELETE);
  62. ** Use IPC_DELETE to clear Winamp's internal playlist.
  63. */
  64. #define IPC_STARTPLAY 102 // starts playback. almost like hitting play in Winamp.
  65. #define IPC_STARTPLAY_INT 1102 // used internally, don't bother using it (won't be any fun)
  66. #define IPC_CHDIR 103
  67. /* sent as a WM_COPYDATA, with IPC_CHDIR as the dwData, and the directory to change to
  68. ** as the lpData.
  69. */
  70. #define IPC_ISPLAYING 104
  71. /* int res = SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_ISPLAYING);
  72. ** If it returns 1, it is playing. if it returns 3, it is paused,
  73. ** if it returns 0, it is not playing.
  74. */
  75. #define IPC_GETOUTPUTTIME 105
  76. /* int res = SendMessage(hwnd_winamp,WM_WA_IPC,mode,IPC_GETOUTPUTTIME);
  77. ** returns the position in milliseconds of the current track (mode = 0),
  78. ** or the track length, in seconds (mode = 1). Returns -1 if not playing or error.
  79. */
  80. #define IPC_JUMPTOTIME 106
  81. /* (requires Winamp 1.60+)
  82. ** SendMessage(hwnd_winamp,WM_WA_IPC,ms,IPC_JUMPTOTIME);
  83. ** IPC_JUMPTOTIME sets the position in milliseconds of the
  84. ** current song (approximately).
  85. ** Returns -1 if not playing, 1 on eof, or 0 if successful
  86. */
  87. #define IPC_GETMODULENAME 109
  88. #define IPC_EX_ISRIGHTEXE 666
  89. /* usually shouldnt bother using these, but here goes:
  90. ** send a WM_COPYDATA with IPC_GETMODULENAME, and an internal
  91. ** flag gets set, which if you send a normal WM_WA_IPC message with
  92. ** IPC_EX_ISRIGHTEXE, it returns whether or not that filename
  93. ** matches. lame, I know.
  94. */
  95. #define IPC_WRITEPLAYLIST 120
  96. /* (requires Winamp 1.666+)
  97. ** SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_WRITEPLAYLIST);
  98. **
  99. ** IPC_WRITEPLAYLIST writes the current playlist to <winampdir>\\Winamp.m3u,
  100. ** and returns the current playlist position.
  101. ** Kinda obsoleted by some of the 2.x new stuff, but still good for when
  102. ** using a front-end (instead of a plug-in)
  103. */
  104. #define IPC_SETPLAYLISTPOS 121
  105. /* (requires Winamp 2.0+)
  106. ** SendMessage(hwnd_winamp,WM_WA_IPC,position,IPC_SETPLAYLISTPOS)
  107. ** IPC_SETPLAYLISTPOS sets the playlist position to 'position'. It
  108. ** does not change playback or anything, it just sets position, and
  109. ** updates the view if necessary
  110. */
  111. #define IPC_SETVOLUME 122
  112. /* (requires Winamp 2.0+)
  113. ** SendMessage(hwnd_winamp,WM_WA_IPC,volume,IPC_SETVOLUME);
  114. ** IPC_SETVOLUME sets the volume of Winamp (from 0-255).
  115. */
  116. #define IPC_SETPANNING 123
  117. /* (requires Winamp 2.0+)
  118. ** SendMessage(hwnd_winamp,WM_WA_IPC,panning,IPC_SETPANNING);
  119. ** IPC_SETPANNING sets the panning of Winamp (from 0 (left) to 255 (right)).
  120. */
  121. #define IPC_GETLISTLENGTH 124
  122. /* (requires Winamp 2.0+)
  123. ** int length = SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETLISTLENGTH);
  124. ** IPC_GETLISTLENGTH returns the length of the current playlist, in
  125. ** tracks.
  126. */
  127. #define IPC_GETLISTPOS 125
  128. /* (requires Winamp 2.05+)
  129. ** int pos=SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETLISTPOS);
  130. ** IPC_GETLISTPOS returns the playlist position. A lot like IPC_WRITEPLAYLIST
  131. ** only faster since it doesn't have to write out the list. Heh, silly me.
  132. */
  133. #define IPC_GETINFO 126
  134. /* (requires Winamp 2.05+)
  135. ** int inf=SendMessage(hwnd_winamp,WM_WA_IPC,mode,IPC_GETINFO);
  136. ** IPC_GETINFO returns info about the current playing song. The value
  137. ** it returns depends on the value of 'mode'.
  138. ** Mode Meaning
  139. ** ------------------
  140. ** 0 Samplerate (i.e. 44100)
  141. ** 1 Bitrate (i.e. 128)
  142. ** 2 Channels (i.e. 2)
  143. ** 3 (5+) Video LOWORD=w HIWORD=h
  144. ** 4 (5+) > 65536, string (video description)
  145. */
  146. #define IPC_GETEQDATA 127
  147. /* (requires Winamp 2.05+)
  148. ** int data=SendMessage(hwnd_winamp,WM_WA_IPC,pos,IPC_GETEQDATA);
  149. ** IPC_GETEQDATA queries the status of the EQ.
  150. ** The value returned depends on what 'pos' is set to:
  151. ** Value Meaning
  152. ** ------------------
  153. ** 0-9 The 10 bands of EQ data. 0-63 (+20db - -20db)
  154. ** 10 The preamp value. 0-63 (+20db - -20db)
  155. ** 11 Enabled. zero if disabled, nonzero if enabled.
  156. ** 12 Autoload. zero if disabled, nonzero if enabled.
  157. */
  158. #define IPC_SETEQDATA 128
  159. /* (requires Winamp 2.05+)
  160. ** SendMessage(hwnd_winamp,WM_WA_IPC,pos,IPC_GETEQDATA);
  161. ** SendMessage(hwnd_winamp,WM_WA_IPC,value,IPC_SETEQDATA);
  162. ** IPC_SETEQDATA sets the value of the last position retrieved
  163. ** by IPC_GETEQDATA. This is pretty lame, and we should provide
  164. ** an extended version that lets you do a MAKELPARAM(pos,value).
  165. ** someday...
  166. new (2.92+):
  167. if the high byte is set to 0xDB, then the third byte specifies
  168. which band, and the bottom word specifies the value.
  169. */
  170. #define IPC_ADDBOOKMARK 129
  171. /* (requires Winamp 2.4+)
  172. ** Sent as a WM_COPYDATA, using IPC_ADDBOOKMARK, adds the specified
  173. ** file/url to the Winamp bookmark list.
  174. */
  175. /*
  176. In winamp 5+, we use this as a normal WM_WA_IPC and the string:
  177. "filename\0title\0"
  178. to notify the library/bookmark editor that a bookmark
  179. was added. Note that using this message in this context does not
  180. actually add the bookmark.
  181. do not use :)
  182. */
  183. #define IPC_INSTALLPLUGIN 130
  184. /* not implemented, but if it was you could do a WM_COPYDATA with
  185. ** a path to a .wpz, and it would install it.
  186. */
  187. #define IPC_RESTARTWINAMP 135
  188. /* (requires Winamp 2.2+)
  189. ** SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_RESTARTWINAMP);
  190. ** IPC_RESTARTWINAMP will restart Winamp (isn't that obvious ? :)
  191. */
  192. #define IPC_ISFULLSTOP 400
  193. /* (requires winamp 2.7+ I think)
  194. ** ret=SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_ISFULLSTOP);
  195. ** useful for when you're an output plugin, and you want to see
  196. ** if the stop/close is a full stop, or just between tracks.
  197. ** returns nonzero if it's full, zero if it's just a new track.
  198. */
  199. #define IPC_INETAVAILABLE 242
  200. /* (requires Winamp 2.05+)
  201. ** val=SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_INETAVAILABLE);
  202. ** IPC_INETAVAILABLE will return 1 if the Internet connection is available for Winamp.
  203. */
  204. #define IPC_UPDTITLE 243
  205. /* (requires Winamp 2.2+)
  206. ** SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_UPDTITLE);
  207. ** IPC_UPDTITLE will ask Winamp to update the informations about the current title.
  208. */
  209. #define IPC_REFRESHPLCACHE 247
  210. /* (requires Winamp 2.2+)
  211. ** SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_REFRESHPLCACHE);
  212. ** IPC_REFRESHPLCACHE will flush the playlist cache buffer.
  213. ** (send this if you want it to go refetch titles for tracks)
  214. */
  215. #define IPC_GET_SHUFFLE 250
  216. /* (requires Winamp 2.4+)
  217. ** val=SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GET_SHUFFLE);
  218. **
  219. ** IPC_GET_SHUFFLE returns the status of the Shuffle option (1 if set)
  220. */
  221. #define IPC_GET_REPEAT 251
  222. /* (requires Winamp 2.4+)
  223. ** val=SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GET_REPEAT);
  224. **
  225. ** IPC_GET_REPEAT returns the status of the Repeat option (1 if set)
  226. */
  227. #define IPC_SET_SHUFFLE 252
  228. /* (requires Winamp 2.4+)
  229. ** SendMessage(hwnd_winamp,WM_WA_IPC,value,IPC_SET_SHUFFLE);
  230. **
  231. ** IPC_SET_SHUFFLE sets the status of the Shuffle option (1 to turn it on)
  232. */
  233. #define IPC_SET_REPEAT 253
  234. /* (requires Winamp 2.4+)
  235. ** SendMessage(hwnd_winamp,WM_WA_IPC,value,IPC_SET_REPEAT);
  236. **
  237. ** IPC_SET_REPEAT sets the status of the Repeat option (1 to turn it on)
  238. */
  239. #define IPC_ENABLEDISABLE_ALL_WINDOWS 259 // 0xdeadbeef to disable
  240. /* (requires Winamp 2.9+)
  241. ** SendMessage(hwnd_winamp,WM_WA_IPC,enable?0:0xdeadbeef,IPC_MBOPENREAL);
  242. ** sending with 0xdeadbeef as the param disables all winamp windows,
  243. ** any other values will enable all winamp windows.
  244. */
  245. #define IPC_GETWND 260
  246. /* (requires Winamp 2.9+)
  247. ** HWND h=SendMessage(hwnd_winamp,WM_WA_IPC,IPC_GETWND_xxx,IPC_GETWND);
  248. ** returns the HWND of the window specified.
  249. */
  250. #define IPC_GETWND_EQ 0 // use one of these for the param
  251. #define IPC_GETWND_PE 1
  252. #define IPC_GETWND_MB 2
  253. #define IPC_GETWND_VIDEO 3
  254. #define IPC_ISWNDVISIBLE 261 // same param as IPC_GETWND
  255. /************************************************************************
  256. ***************** in-process only (WE LOVE PLUGINS)
  257. ************************************************************************/
  258. #define IPC_SETSKIN 200
  259. /* (requires Winamp 2.04+, only usable from plug-ins (not external apps))
  260. ** SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)"skinname",IPC_SETSKIN);
  261. ** IPC_SETSKIN sets the current skin to "skinname". Note that skinname
  262. ** can be the name of a skin, a skin .zip file, with or without path.
  263. ** If path isn't specified, the default search path is the winamp skins
  264. ** directory.
  265. */
  266. #define IPC_GETSKIN 201
  267. /* (requires Winamp 2.04+, only usable from plug-ins (not external apps))
  268. ** SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)skinname_buffer,IPC_GETSKIN);
  269. ** IPC_GETSKIN puts the directory where skin bitmaps can be found
  270. ** into skinname_buffer.
  271. ** skinname_buffer must be MAX_PATH characters in length.
  272. ** When using a .zip'd skin file, it'll return a temporary directory
  273. ** where the ZIP was decompressed.
  274. */
  275. #define IPC_EXECPLUG 202
  276. /* (requires Winamp 2.04+, only usable from plug-ins (not external apps))
  277. ** SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)"vis_file.dll",IPC_EXECPLUG);
  278. ** IPC_EXECPLUG executes a visualization plug-in pointed to by WPARAM.
  279. ** the format of this string can be:
  280. ** "vis_whatever.dll"
  281. ** "vis_whatever.dll,0" // (first mod, file in winamp plug-in dir)
  282. ** "C:\\dir\\vis_whatever.dll,1"
  283. */
  284. #define IPC_GETPLAYLISTFILE 211
  285. /* (requires Winamp 2.04+, only usable from plug-ins (not external apps))
  286. ** char *name=SendMessage(hwnd_winamp,WM_WA_IPC,index,IPC_GETPLAYLISTFILE);
  287. ** IPC_GETPLAYLISTFILE gets the filename of the playlist entry [index].
  288. ** returns a pointer to it. returns NULL on error.
  289. */
  290. #define IPC_GETPLAYLISTTITLE 212
  291. /* (requires Winamp 2.04+, only usable from plug-ins (not external apps))
  292. ** char *name=SendMessage(hwnd_winamp,WM_WA_IPC,index,IPC_GETPLAYLISTTITLE);
  293. **
  294. ** IPC_GETPLAYLISTTITLE gets the title of the playlist entry [index].
  295. ** returns a pointer to it. returns NULL on error.
  296. */
  297. #define IPC_GETHTTPGETTER 240
  298. /* retrieves a function pointer to a HTTP retrieval function.
  299. ** if this is unsupported, returns 1 or 0.
  300. ** the function should be:
  301. ** int (*httpRetrieveFile)(HWND hwnd, char *url, char *file, char *dlgtitle);
  302. ** if you call this function, with a parent window, a URL, an output file, and a dialog title,
  303. ** it will return 0 on successful download, 1 on error.
  304. */
  305. #define IPC_MBOPEN 241
  306. /* (requires Winamp 2.05+)
  307. ** SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_MBOPEN);
  308. ** SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)url,IPC_MBOPEN);
  309. ** IPC_MBOPEN will open a new URL in the minibrowser. if url is NULL, it will open the Minibrowser window.
  310. */
  311. #define IPC_CHANGECURRENTFILE 245
  312. /* (requires Winamp 2.05+)
  313. ** SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)file,IPC_CHANGECURRENTFILE);
  314. ** IPC_CHANGECURRENTFILE will set the current playlist item.
  315. */
  316. #define IPC_GETMBURL 246
  317. /* (requires Winamp 2.2+)
  318. ** char buffer[4096]; // Urls can be VERY long
  319. ** SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)buffer,IPC_GETMBURL);
  320. ** IPC_GETMBURL will retrieve the current Minibrowser URL into buffer.
  321. ** buffer must be at least 4096 bytes long.
  322. */
  323. #define IPC_MBBLOCK 248
  324. /* (requires Winamp 2.4+)
  325. ** SendMessage(hwnd_winamp,WM_WA_IPC,value,IPC_MBBLOCK);
  326. **
  327. ** IPC_MBBLOCK will block the Minibrowser from updates if value is set to 1
  328. */
  329. #define IPC_MBOPENREAL 249
  330. /* (requires Winamp 2.4+)
  331. ** SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)url,IPC_MBOPENREAL);
  332. **
  333. ** IPC_MBOPENREAL works the same as IPC_MBOPEN except that it will works even if
  334. ** IPC_MBBLOCK has been set to 1
  335. */
  336. #define IPC_ADJUST_OPTIONSMENUPOS 280
  337. /* (requires Winamp 2.9+)
  338. ** int newpos=SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)adjust_offset,IPC_ADJUST_OPTIONSMENUPOS);
  339. ** moves where winamp expects the Options menu in the main menu. Useful if you wish to insert a
  340. ** menu item above the options/skins/vis menus.
  341. */
  342. #define IPC_GET_HMENU 281
  343. /* (requires Winamp 2.9+)
  344. ** HMENU hMenu=SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)0,IPC_GET_HMENU);
  345. ** values for data:
  346. ** 0 : main popup menu
  347. ** 1 : main menubar file menu
  348. ** 2 : main menubar options menu
  349. ** 3 : main menubar windows menu
  350. ** 4 : main menubar help menu
  351. ** other values will return NULL.
  352. */
  353. #define IPC_GET_EXTENDED_FILE_INFO 290 //pass a pointer to the following struct in wParam
  354. #define IPC_GET_EXTENDED_FILE_INFO_HOOKABLE 296
  355. /* (requires Winamp 2.9+)
  356. ** to use, create an extendedFileInfoStruct, point the values filename and metadata to the
  357. ** filename and metadata field you wish to query, and ret to a buffer, with retlen to the
  358. ** length of that buffer, and then SendMessage(hwnd_winamp,WM_WA_IPC,&struct,IPC_GET_EXTENDED_FILE_INFO);
  359. ** the results should be in the buffer pointed to by ret.
  360. ** returns 1 if the decoder supports a getExtendedFileInfo method
  361. */
  362. typedef struct {
  363. char *filename;
  364. char *metadata;
  365. char *ret;
  366. int retlen;
  367. } extendedFileInfoStruct;
  368. #define IPC_GET_BASIC_FILE_INFO 291 //pass a pointer to the following struct in wParam
  369. typedef struct {
  370. char *filename;
  371. 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)
  372. // filled in by winamp
  373. int length;
  374. char *title;
  375. int titlelen;
  376. } basicFileInfoStruct;
  377. #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
  378. #define IPC_INFOBOX 293
  379. typedef struct {
  380. HWND parent;
  381. char *filename;
  382. } infoBoxParam;
  383. #define IPC_SET_EXTENDED_FILE_INFO 294 //pass a pointer to the a extendedFileInfoStruct in wParam
  384. /* (requires Winamp 2.9+)
  385. ** to use, create an extendedFileInfoStruct, point the values filename and metadata to the
  386. ** filename and metadata field you wish to write in ret. (retlen is not used). and then
  387. ** SendMessage(hwnd_winamp,WM_WA_IPC,&struct,IPC_SET_EXTENDED_FILE_INFO);
  388. ** returns 1 if the metadata is supported
  389. ** Call IPC_WRITE_EXTENDED_FILE_INFO once you're done setting all the metadata you want to update
  390. */
  391. #define IPC_WRITE_EXTENDED_FILE_INFO 295
  392. /* (requires Winamp 2.9+)
  393. ** writes all the metadata set thru IPC_SET_EXTENDED_FILE_INFO to the file
  394. ** returns 1 if the file has been successfully updated, 0 if error
  395. */
  396. #define IPC_FORMAT_TITLE 297
  397. typedef struct
  398. {
  399. char *spec; // NULL=default winamp spec
  400. void *p;
  401. char *out;
  402. int out_len;
  403. char * (*TAGFUNC)(char * tag, void * p); //return 0 if not found
  404. void (*TAGFREEFUNC)(char * tag,void * p);
  405. } waFormatTitle;
  406. #define IPC_GETUNCOMPRESSINTERFACE 331
  407. /* returns a function pointer to uncompress().
  408. ** int (*uncompress)(unsigned char *dest, unsigned long *destLen, const unsigned char *source, unsigned long sourceLen);
  409. ** right out of zlib, useful for decompressing zlibbed data.
  410. ** if you pass the parm of 0x10100000, it will return a wa_inflate_struct * to an inflate API.
  411. */
  412. typedef struct {
  413. int (*inflateReset)(void *strm);
  414. int (*inflateInit_)(void *strm,const char *version, int stream_size);
  415. int (*inflate)(void *strm, int flush);
  416. int (*inflateEnd)(void *strm);
  417. unsigned long (*crc32)(unsigned long crc, const unsigned char *buf, unsigned int len);
  418. } wa_inflate_struct;
  419. #define IPC_ADD_PREFS_DLG 332
  420. #define IPC_REMOVE_PREFS_DLG 333
  421. /* (requires Winamp 2.9+)
  422. ** to use, allocate a prefsDlgRec structure (either on the heap or some global
  423. ** data, but NOT on the stack), initialze the members:
  424. ** hInst to the DLL instance where the resource is located
  425. ** dlgID to the ID of the dialog,
  426. ** proc to the window procedure for the dialog
  427. ** name to the name of the prefs page in the prefs.
  428. ** where to 0 (eventually we may add more options)
  429. ** then, SendMessage(hwnd_winamp,WM_WA_IPC,&prefsRec,IPC_ADD_PREFS_DLG);
  430. **
  431. ** you can also IPC_REMOVE_PREFS_DLG with the address of the same prefsRec,
  432. ** but you shouldn't really ever have to.
  433. **
  434. */
  435. #define IPC_OPENPREFSTOPAGE 380 // pass an id of a builtin page, or a &prefsDlgRec of prefs page to open
  436. typedef struct _prefsDlgRec {
  437. HINSTANCE hInst;
  438. int dlgID;
  439. void *proc;
  440. char *name;
  441. int where; // 0 for options, 1 for plugins, 2 for skins, 3 for bookmarks, 4 for prefs
  442. int _id;
  443. struct _prefsDlgRec *next;
  444. } prefsDlgRec;
  445. #define IPC_GETINIFILE 334 // returns a pointer to winamp.ini
  446. #define IPC_GETINIDIRECTORY 335 // returns a pointer to the directory to put config files in (if you dont want to use winamp.ini)
  447. #define IPC_SPAWNBUTTONPOPUP 361 // param =
  448. // 0 = eject
  449. // 1 = previous
  450. // 2 = next
  451. // 3 = pause
  452. // 4 = play
  453. // 5 = stop
  454. #define IPC_OPENURLBOX 360 // pass a HWND to a parent, returns a HGLOBAL that needs to be freed with GlobalFree(), if successful
  455. #define IPC_OPENFILEBOX 362 // pass a HWND to a parent
  456. #define IPC_OPENDIRBOX 363 // pass a HWND to a parent
  457. // pass an HWND to a parent. call this if you take over the whole UI so that the dialogs are not appearing on the
  458. // bottom right of the screen since the main winamp window is at 3000x3000, call again with NULL to reset
  459. #define IPC_SETDIALOGBOXPARENT 364
  460. // pass 0 for a copy of the skin HBITMAP
  461. // pass 1 for name of font to use for playlist editor likeness
  462. // pass 2 for font charset
  463. // pass 3 for font size
  464. #define IPC_GET_GENSKINBITMAP 503
  465. #define IPC_GET_EMBEDIF 505 // pass an embedWindowState
  466. // returns an HWND embedWindow(embedWindowState *); if the data is NULL, otherwise returns the HWND directly
  467. typedef struct
  468. {
  469. HWND me; //hwnd of the window
  470. int flags;
  471. RECT r;
  472. void *user_ptr; // for application use
  473. int extra_data[64]; // for internal winamp use
  474. } embedWindowState;
  475. #define EMBED_FLAGS_NORESIZE 1 // set this bit in embedWindowState.flags to keep window from being resizable
  476. #define EMBED_FLAGS_NOTRANSPARENCY 2 // set this bit in embedWindowState.flags to make gen_ff turn transparency off for this wnd
  477. #define IPC_EMBED_ENUM 532
  478. typedef struct embedEnumStruct
  479. {
  480. int (*enumProc)(embedWindowState *ws, struct embedEnumStruct *param); // return 1 to abort
  481. int user_data; // or more :)
  482. } embedEnumStruct;
  483. // pass
  484. #define IPC_EMBED_ISVALID 533
  485. #define IPC_CONVERTFILE 506
  486. /* (requires Winamp 2.92+)
  487. ** Converts a given file to a different format (PCM, MP3, etc...)
  488. ** To use, pass a pointer to a waFileConvertStruct struct
  489. ** This struct can be either on the heap or some global
  490. ** data, but NOT on the stack. At least, until the conversion is done.
  491. **
  492. ** eg: SendMessage(hwnd_winamp,WM_WA_IPC,&myConvertStruct,IPC_CONVERTFILE);
  493. **
  494. ** Return value:
  495. ** 0: Can't start the conversion. Look at myConvertStruct->error for details.
  496. ** 1: Conversion started. Status messages will be sent to the specified callbackhwnd.
  497. ** Be sure to call IPC_CONVERTFILE_END when your callback window receives the
  498. ** IPC_CB_CONVERT_DONE message.
  499. */
  500. typedef struct
  501. {
  502. char *sourcefile; // "c:\\source.mp3"
  503. char *destfile; // "c:\\dest.pcm"
  504. int destformat[8]; // like 'PCM ',srate,nch,bps
  505. HWND callbackhwnd; // window that will receive the IPC_CB_CONVERT notification messages
  506. //filled in by winamp.exe
  507. char *error; //if IPC_CONVERTFILE returns 0, the reason will be here
  508. int bytes_done; //you can look at both of these values for speed statistics
  509. int bytes_total;
  510. int bytes_out;
  511. int killswitch; // don't set it manually, use IPC_CONVERTFILE_END
  512. int extra_data[64]; // for internal winamp use
  513. } convertFileStruct;
  514. #define IPC_CONVERTFILE_END 507
  515. /* (requires Winamp 2.92+)
  516. ** Stop/ends a convert process started from IPC_CONVERTFILE
  517. ** You need to call this when you receive the IPC_CB_CONVERTDONE message or when you
  518. ** want to abort a conversion process
  519. **
  520. ** eg: SendMessage(hwnd_winamp,WM_WA_IPC,&myConvertStruct,IPC_CONVERTFILE_END);
  521. **
  522. ** No return value
  523. */
  524. typedef struct {
  525. HWND hwndParent;
  526. int format;
  527. //filled in by winamp.exe
  528. HWND hwndConfig;
  529. int extra_data[8];
  530. } convertConfigStruct;
  531. #define IPC_CONVERT_CONFIG 508
  532. #define IPC_CONVERT_CONFIG_END 509
  533. typedef struct
  534. {
  535. void (*enumProc)(int user_data, const char *desc, int fourcc);
  536. int user_data;
  537. } converterEnumFmtStruct;
  538. #define IPC_CONVERT_CONFIG_ENUMFMTS 510
  539. /* (requires Winamp 2.92+)
  540. */
  541. typedef struct
  542. {
  543. char cdletter;
  544. char *playlist_file;
  545. HWND callback_hwnd;
  546. //filled in by winamp.exe
  547. char *error;
  548. } burnCDStruct;
  549. #define IPC_BURN_CD 511
  550. /* (requires Winamp 5.0+)
  551. */
  552. typedef struct
  553. {
  554. convertFileStruct *cfs;
  555. int priority;
  556. } convertSetPriority;
  557. #define IPC_CONVERT_SET_PRIORITY 512
  558. typedef struct
  559. {
  560. char *filename;
  561. char *title; // 2048 bytes
  562. int length;
  563. int force_useformatting; // can set this to 1 if you want to force a url to use title formatting shit
  564. } waHookTitleStruct;
  565. // return TRUE if you hook this
  566. #define IPC_HOOK_TITLES 850
  567. #define IPC_GETSADATAFUNC 800
  568. // 0: returns a char *export_sa_get() that returns 150 bytes of data
  569. // 1: returns a export_sa_setreq(int want);
  570. #define IPC_ISMAINWNDVISIBLE 900
  571. #define IPC_SETPLEDITCOLORS 920
  572. typedef struct
  573. {
  574. int numElems;
  575. int *elems;
  576. HBITMAP bm; // set if you want to override
  577. } waSetPlColorsStruct;
  578. // the following IPC use waSpawnMenuParms as parameter
  579. #define IPC_SPAWNEQPRESETMENU 933
  580. #define IPC_SPAWNFILEMENU 934 //menubar
  581. #define IPC_SPAWNOPTIONSMENU 935 //menubar
  582. #define IPC_SPAWNWINDOWSMENU 936 //menubar
  583. #define IPC_SPAWNHELPMENU 937 //menubar
  584. #define IPC_SPAWNPLAYMENU 938 //menubar
  585. #define IPC_SPAWNPEFILEMENU 939 //menubar
  586. #define IPC_SPAWNPEPLAYLISTMENU 940 //menubar
  587. #define IPC_SPAWNPESORTMENU 941 //menubar
  588. #define IPC_SPAWNPEHELPMENU 942 //menubar
  589. #define IPC_SPAWNMLFILEMENU 943 //menubar
  590. #define IPC_SPAWNMLVIEWMENU 944 //menubar
  591. #define IPC_SPAWNMLHELPMENU 945 //menubar
  592. #define IPC_SPAWNPELISTOFPLAYLISTS 946
  593. typedef struct
  594. {
  595. HWND wnd;
  596. int xpos; // in screen coordinates
  597. int ypos;
  598. } waSpawnMenuParms;
  599. // waSpawnMenuParms2 is used by the menubar submenus
  600. typedef struct
  601. {
  602. HWND wnd;
  603. int xpos; // in screen coordinates
  604. int ypos;
  605. int width;
  606. int height;
  607. } waSpawnMenuParms2;
  608. // system tray sends this (you might want to simulate it)
  609. #define WM_WA_SYSTRAY WM_USER+1
  610. // input plugins send this when they are done playing back
  611. #define WM_WA_MPEG_EOF WM_USER+2
  612. //// video stuff
  613. #define IPC_IS_PLAYING_VIDEO 501 // returns >1 if playing, 0 if not, 1 if old version (so who knows):)
  614. #define IPC_GET_IVIDEOOUTPUT 500 // see below for IVideoOutput interface
  615. #define VIDEO_MAKETYPE(A,B,C,D) ((A) | ((B)<<8) | ((C)<<16) | ((D)<<24))
  616. #define VIDUSER_SET_INFOSTRING 0x1000
  617. #define VIDUSER_GET_VIDEOHWND 0x1001
  618. #define VIDUSER_SET_VFLIP 0x1002
  619. #define VIDUSER_SET_TRACKSELINTERFACE 0x1003 // give your ITrackSelector interface as param2
  620. #ifndef NO_IVIDEO_DECLARE
  621. #ifdef __cplusplus
  622. class VideoOutput;
  623. class SubsItem;
  624. typedef struct {
  625. unsigned char* baseAddr;
  626. long rowBytes;
  627. } YV12_PLANE;
  628. typedef struct {
  629. YV12_PLANE y;
  630. YV12_PLANE u;
  631. YV12_PLANE v;
  632. } YV12_PLANES;
  633. class IVideoOutput
  634. {
  635. public:
  636. virtual ~IVideoOutput() { }
  637. virtual int open(int w, int h, int vflip, double aspectratio, unsigned int fmt)=0;
  638. virtual void setcallback(LRESULT (*msgcallback)(void *token, HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam), void *token) { }
  639. virtual void close()=0;
  640. virtual void draw(void *frame)=0;
  641. virtual void drawSubtitle(SubsItem *item) { }
  642. virtual void showStatusMsg(const char *text) { }
  643. virtual int get_latency() { return 0; }
  644. virtual void notifyBufferState(int bufferstate) { } /* 0-255*/
  645. virtual int extended(int param1, int param2, int param3) { return 0; } // Dispatchable, eat this!
  646. };
  647. class ITrackSelector
  648. {
  649. public:
  650. virtual int getNumAudioTracks()=0;
  651. virtual void enumAudioTrackName(int n, const char *buf, int size)=0;
  652. virtual int getCurAudioTrack()=0;
  653. virtual int getNumVideoTracks()=0;
  654. virtual void enumVideoTrackName(int n, const char *buf, int size)=0;
  655. virtual int getCurVideoTrack()=0;
  656. virtual void setAudioTrack(int n)=0;
  657. virtual void setVideoTrack(int n)=0;
  658. };
  659. #endif //cplusplus
  660. #endif//NO_IVIDEO_DECLARE
  661. // these messages are callbacks that you can grab by subclassing the winamp window
  662. // wParam =
  663. #define IPC_CB_WND_EQ 0 // use one of these for the param
  664. #define IPC_CB_WND_PE 1
  665. #define IPC_CB_WND_MB 2
  666. #define IPC_CB_WND_VIDEO 3
  667. #define IPC_CB_WND_MAIN 4
  668. #define IPC_CB_ONSHOWWND 600
  669. #define IPC_CB_ONHIDEWND 601
  670. #define IPC_CB_GETTOOLTIP 602
  671. #define IPC_CB_MISC 603
  672. #define IPC_CB_MISC_TITLE 0
  673. #define IPC_CB_MISC_VOLUME 1 // volume/pan
  674. #define IPC_CB_MISC_STATUS 2
  675. #define IPC_CB_MISC_EQ 3
  676. #define IPC_CB_MISC_INFO 4
  677. #define IPC_CB_MISC_VIDEOINFO 5
  678. #define IPC_CB_CONVERT_STATUS 604 // param value goes from 0 to 100 (percent)
  679. #define IPC_CB_CONVERT_DONE 605
  680. #define IPC_ADJUST_FFWINDOWSMENUPOS 606
  681. /* (requires Winamp 2.9+)
  682. ** int newpos=SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)adjust_offset,IPC_ADJUST_FFWINDOWSMENUPOS);
  683. ** moves where winamp expects the freeform windows in the menubar windows main menu. Useful if you wish to insert a
  684. ** menu item above extra freeform windows.
  685. */
  686. #define IPC_ISDOUBLESIZE 608
  687. #define IPC_ADJUST_FFOPTIONSMENUPOS 609
  688. /* (requires Winamp 2.9+)
  689. ** int newpos=SendMessage(hwnd_winamp,WM_WA_IPC,(WPARAM)adjust_offset,IPC_ADJUST_FFOPTIONSMENUPOS);
  690. ** moves where winamp expects the freeform preferences item in the menubar windows main menu. Useful if you wish to insert a
  691. ** menu item above preferences item.
  692. */
  693. #define IPC_GETTIMEDISPLAYMODE 610 // returns 0 if displaying elapsed time or 1 if displaying remaining time
  694. #define IPC_SETVISWND 611 // param is hwnd, setting this allows you to receive ID_VIS_NEXT/PREVOUS/RANDOM/FS wm_commands
  695. #define ID_VIS_NEXT 40382
  696. #define ID_VIS_PREV 40383
  697. #define ID_VIS_RANDOM 40384
  698. #define ID_VIS_FS 40389
  699. #define ID_VIS_CFG 40390
  700. #define ID_VIS_MENU 40391
  701. #define IPC_GETVISWND 612 // returns the vis cmd handler hwnd
  702. #define IPC_ISVISRUNNING 613
  703. #define IPC_CB_VISRANDOM 628 // param is status of random
  704. #define IPC_SETIDEALVIDEOSIZE 614 // sent by winamp to winamp, trap it if you need it. width=HIWORD(param), height=LOWORD(param)
  705. #define IPC_GETSTOPONVIDEOCLOSE 615
  706. #define IPC_SETSTOPONVIDEOCLOSE 616
  707. typedef struct {
  708. HWND hwnd;
  709. int uMsg;
  710. int wParam;
  711. int lParam;
  712. } transAccelStruct;
  713. #define IPC_TRANSLATEACCELERATOR 617
  714. typedef struct {
  715. int cmd;
  716. int x;
  717. int y;
  718. int align;
  719. } windowCommand; // send this as param to an IPC_PLCMD, IPC_MBCMD, IPC_VIDCMD
  720. #define IPC_CB_ONTOGGLEAOT 618
  721. #define IPC_GETPREFSWND 619
  722. #define IPC_SET_PE_WIDTHHEIGHT 620 // data is a pointer to a POINT structure that holds width & height
  723. #define IPC_GETLANGUAGEPACKINSTANCE 621
  724. #define IPC_CB_PEINFOTEXT 622 // data is a string, ie: "04:21/45:02"
  725. #define IPC_CB_OUTPUTCHANGED 623 // output plugin was changed in config
  726. #define IPC_GETOUTPUTPLUGIN 625
  727. #define IPC_SETDRAWBORDERS 626
  728. #define IPC_DISABLESKINCURSORS 627
  729. #define IPC_CB_RESETFONT 629
  730. #define IPC_IS_FULLSCREEN 630 // returns 1 if video or vis is in fullscreen mode
  731. #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
  732. #define IPC_SHOW_NOTIFICATION 632
  733. #define IPC_GETSKININFO 633
  734. #define IPC_GET_MANUALPLADVANCE 634
  735. /* (requires Winamp 5.03+)
  736. ** val=SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GET_MANUALPLADVANCE);
  737. **
  738. ** IPC_GET_MANUALPLADVANCE returns the status of the Manual Playlist Advance (1 if set)
  739. */
  740. #define IPC_SET_MANUALPLADVANCE 635
  741. /* (requires Winamp 5.03+)
  742. ** SendMessage(hwnd_winamp,WM_WA_IPC,value,IPC_SET_MANUALPLADVANCE);
  743. **
  744. ** IPC_SET_MANUALPLADVANCE sets the status of the Manual Playlist Advance option (1 to turn it on)
  745. */
  746. #define IPC_GET_NEXT_PLITEM 636
  747. /* (requires Winamp 5.04+)
  748. ** SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_EOF_GET_NEXT_PLITEM);
  749. **
  750. ** Sent to Winamp's main window when an item has just finished playback or the next button has been pressed and
  751. ** requesting the new playlist item number to go to.
  752. ** Mainly used by gen_jumpex. Subclass this message in your application to return the new item number.
  753. ** -1 for normal winamp operation (default) or the new item number in the playlist to play.
  754. */
  755. #define IPC_GET_PREVIOUS_PLITEM 637
  756. /* (requires Winamp 5.04+)
  757. ** SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_EOF_GET_PREVIOUS_PLITEM);
  758. **
  759. ** Sent to Winamp's main window when the previous button has been pressed and Winamp is requesting the new playlist item number to go to.
  760. ** Mainly used by gen_jumpex. Subclass this message in your application to return the new item number.
  761. ** -1 for normal winamp operation (default) or the new item number in the playlist to play.
  762. */
  763. #define IPC_IS_WNDSHADE 638
  764. /* (requires Winamp 5.04+)
  765. ** SendMessage(hwnd_winamp,WM_WA_IPC,wnd,IPC_IS_WNDSHADE);
  766. **
  767. ** 'wnd' is window id as defined for IPC_GETWND, or -1 for main window
  768. ** Returns 1 if wnd is set to winshade mode, or 0 if it is not
  769. */
  770. #define IPC_SETRATING 639
  771. /* (requires Winamp 5.04+ with ML)
  772. ** SendMessage(hwnd_winamp,WM_WA_IPC,rating,IPC_SETRATING);
  773. ** 'rating' is an int value from 0 (no rating) to 5
  774. */
  775. #define IPC_GETRATING 640
  776. /* (requires Winamp 5.04+ with ML)
  777. ** SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETRATING);
  778. ** returns the current item's rating
  779. */
  780. #define IPC_GETNUMAUDIOTRACKS 641
  781. /* (requires Winamp 5.04+)
  782. ** int n = SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETNUMAUDIOTRACKS);
  783. ** returns the number of audio tracks for the currently playing item
  784. */
  785. #define IPC_GETNUMVIDEOTRACKS 642
  786. /* (requires Winamp 5.04+)
  787. ** int n = SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETNUMVIDEOTRACKS);
  788. ** returns the number of video tracks for the currently playing item
  789. */
  790. #define IPC_GETAUDIOTRACK 643
  791. /* (requires Winamp 5.04+)
  792. ** int cur = SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETAUDIOTRACK);
  793. ** returns the id of the current audio track for the currently playing item
  794. */
  795. #define IPC_GETVIDEOTRACK 644
  796. /* (requires Winamp 5.04+)
  797. ** int cur = SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_GETVIDEOTRACK);
  798. ** returns the id of the current video track for the currently playing item
  799. */
  800. #define IPC_SETAUDIOTRACK 645
  801. /* (requires Winamp 5.04+)
  802. ** SendMessage(hwnd_winamp,WM_WA_IPC,track,IPC_SETAUDIOTRACK);
  803. ** switch the currently playing item to a new audio track
  804. */
  805. #define IPC_SETVIDEOTRACK 646
  806. /* (requires Winamp 5.04+)
  807. ** SendMessage(hwnd_winamp,WM_WA_IPC,track,IPC_SETVIDEOTRACK);
  808. ** switch the currently playing item to a new video track
  809. */
  810. #define IPC_PUSH_DISABLE_EXIT 647
  811. /* (requires Winamp 5.04+)
  812. ** SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_PUSH_DISABLE_EXIT );
  813. ** lets you disable or re-enable the UI exit functions (close button,
  814. ** context menu, alt-f4).
  815. ** call IPC_POP_DISABLE_EXIT when you are done doing whatever required
  816. ** preventing exit
  817. */
  818. #define IPC_POP_DISABLE_EXIT 648
  819. /* (requires Winamp 5.04+)
  820. ** SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_POP_DISABLE_EXIT );
  821. ** see IPC_PUSH_DISABLE_EXIT
  822. */
  823. #define IPC_IS_EXIT_ENABLED 649
  824. /* (requires Winamp 5.04+)
  825. ** SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_IS_EXIT_ENABLED);
  826. ** returns 0 if exit is disabled, 1 otherwise
  827. */
  828. #define IPC_IS_AOT 650
  829. /* (requires Winamp 5.04+)
  830. ** SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_IS_AOT);
  831. ** returns status of always on top flag. note: this may not match the actual
  832. ** TOPMOST window flag while another fullscreen application is focused
  833. */
  834. #define IPC_USES_RECYCLEBIN 651
  835. /*
  836. ** SendMessage(hwnd_winamp,WM_WA_IPC,0,IPC_USES_RECYCLEBIN);
  837. ** returns 1 if deleted files should be sent to the recycle bin.
  838. ** returns 0 if deleted files should be deleted permanently.
  839. **
  840. ** You should check for this option if your plugin deletes files
  841. ** so that your setting matches the winamp setting
  842. */
  843. // >>>>>>>>>>> Next is 652
  844. #define IPC_PLCMD 1000
  845. #define PLCMD_ADD 0
  846. #define PLCMD_REM 1
  847. #define PLCMD_SEL 2
  848. #define PLCMD_MISC 3
  849. #define PLCMD_LIST 4
  850. #define IPC_MBCMD 1001
  851. #define MBCMD_BACK 0
  852. #define MBCMD_FORWARD 1
  853. #define MBCMD_STOP 2
  854. #define MBCMD_RELOAD 3
  855. #define MBCMD_MISC 4
  856. #define IPC_VIDCMD 1002
  857. #define VIDCMD_FULLSCREEN 0
  858. #define VIDCMD_1X 1
  859. #define VIDCMD_2X 2
  860. #define VIDCMD_LIB 3
  861. #define VIDPOPUP_MISC 4
  862. #define IPC_MBURL 1003 //sets the URL
  863. #define IPC_MBGETCURURL 1004 //copies the current URL into wParam (have a 4096 buffer ready)
  864. #define IPC_MBGETDESC 1005 //copies the current URL description into wParam (have a 4096 buffer ready)
  865. #define IPC_MBCHECKLOCFILE 1006 //checks that the link file is up to date (otherwise updates it). wParam=parent HWND
  866. #define IPC_MBREFRESH 1007 //refreshes the "now playing" view in the library
  867. #define IPC_MBGETDEFURL 1008 //copies the default URL into wParam (have a 4096 buffer ready)
  868. #define IPC_STATS_LIBRARY_ITEMCNT 1300 // updates library count status
  869. // IPC 2000-3000 reserved for freeform messages, see gen_ff/ff_ipc.h
  870. #define IPC_FF_FIRST 2000
  871. #define IPC_FF_LAST 3000
  872. #define IPC_GETDROPTARGET 3001
  873. #define IPC_PLAYLIST_MODIFIED 3002 // sent to main wnd whenever the playlist is modified
  874. #define IPC_PLAYING_FILE 3003 // sent to main wnd with the file as parm whenever a file is played
  875. #define IPC_FILE_TAG_MAY_HAVE_UPDATED 3004 // sent to main wnd with the file as parm whenever a file tag might be updated
  876. #define IPC_ALLOW_PLAYTRACKING 3007
  877. // send nonzero to allow, zero to disallow
  878. #define IPC_HOOK_OKTOQUIT 3010 // return 0 to abort a quit, nonzero if quit is OK
  879. #define IPC_WRITECONFIG 3011 // pass 2 to write all, 1 to write playlist + common, 0 to write common+less common
  880. #define IPC_TOGGLE_RESIZE 3012 // USE THIS TO TOGGLE RESIZING OFF/ON BP.
  881. // USE THIS TO PASS A URL TO AD WINDOW bp
  882. #define IPC_SHOW_AD_URL 3013 // pass the URL (char *) in lparam
  883. #define IPC_SHOW_HWND 3014 // HWND of AdBox is in lparam
  884. // pass a string to be the name to register, and returns a value > 65536, which is a unique value you can use
  885. // for custom WM_WA_IPC messages.
  886. #define IPC_REGISTER_WINAMP_IPCMESSAGE 65536
  887. #endif//_WA_IPC_H_