Main.h 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179
  1. #ifndef _MAIN_H_
  2. #define _MAIN_H_
  3. #ifdef __cplusplus
  4. //#pragma warning(error:4311)
  5. extern "C"
  6. {
  7. #endif
  8. #include <windows.h>
  9. //#include <windowsx.h>
  10. #include "wasabicfg.h"
  11. #include "wa_ipc.h"
  12. #include "config.h"
  13. #include "dpi.h"
  14. #ifndef __cplusplus
  15. #include "Plush/plush.h"
  16. #endif
  17. #define APSTUDIO_INVOKED
  18. #include "resource.h"
  19. #include <mbstring.h>
  20. #include <shlwapi.h>
  21. #include <stdio.h>
  22. #include <strsafe.h>
  23. #include <shlobj.h>
  24. #include <commctrl.h>
  25. #include <shobjidl.h>
  26. #include <shellapi.h>
  27. #include "in2.h"
  28. #include "strutil.h"
  29. #include "../nu/trace.h"
  30. #ifndef NO_INPLACE_RESOLVE
  31. #if defined(_WIN64)
  32. #include "../Elevator/IFileTypeRegistrar_64.h"
  33. #else
  34. #include "../Elevator/IFileTypeRegistrar_32.h"
  35. #endif
  36. #endif
  37. /* configuration */
  38. //#undef MAX_PATH
  39. //#define MAX_PATH 512
  40. #define OFFSCREEN_Y_POS -30000
  41. #define MAX_URL 4096
  42. extern HINSTANCE language_pack_instance;
  43. #define UPDATE_DISPLAY_TIMER 38
  44. #define STATS_TIMER 64
  45. #define SPLASH_DELAY 2000
  46. #define APP_NAME "Winamp"
  47. #ifdef __alpha
  48. #define APP_VERSION_PLATFORM "(AXP)"
  49. #elif defined(_WIN64)
  50. #define APP_VERSION_PLATFORM "(x64)"
  51. #elif defined(_WIN32_WINCE)
  52. #define APP_VERSION_PLATFORM "(CE)"
  53. #else
  54. #define APP_VERSION_PLATFORM "(x86)"
  55. #endif
  56. extern const char app_name[], app_version[], app_version_string[];
  57. #define BIGINT 1000000000
  58. #define MAINMENU_OPTIONS_BASE (11+g_mm_optionsbase_adj)
  59. #define WINDOWMENU_FFWINDOWS_BASE (3+g_mm_ffwindowsbase_adj)
  60. #define HIDDEN_TRAP -33
  61. #define WINDOW_WIDTH 275
  62. #define WINDOW_HEIGHT 116
  63. #define FALLBACK_FONT L"Arial"
  64. //#define DEFAULT_FONT "Arial Unicode MS"
  65. #define DEFAULT_FONT L"Arial"
  66. //extern prefsDlgRec *g_piprefsdlgs;
  67. #define CAPTION_SIZE (MAX_PATH+128)
  68. #define AUDITSIZE 10
  69. //#define CLASSIC_SKIN_NAME L"Winamp Classic"
  70. #define MODERN_SKIN_NAME L"Winamp Modern"
  71. #define BENTO_SKIN_NAME L"Bento"
  72. #define BIG_BENTO_SKIN_NAME L"Big Bento"
  73. /***********************
  74. *** about.c
  75. */
  76. void about_dialog(void);
  77. extern int about_lastpage;
  78. extern HWND about_hwnd;
  79. /***********************
  80. *** about2.c
  81. */
  82. void About2_Start(HWND hwndParent);
  83. void About2_Kill();
  84. /***********************
  85. *** bookmark.c
  86. */
  87. void Bookmark_additem(wchar_t *fn, wchar_t *ft);
  88. void Bookmark_AddCommandline(wchar_t *commandLine);
  89. /***********************
  90. *** burn.cpp
  91. */
  92. int burn_start(burnCDStruct *param);
  93. unsigned int burn_doBurn(char *cmdline, HWND winampWnd, HINSTANCE winampInstance);
  94. /***********************
  95. *** config.c
  96. */
  97. // configuration variables/with defaults
  98. #ifndef NO_INPLACE_RESOLVE
  99. int GetRegistrar(IFileTypeRegistrar **registrar, BOOL use_fallback);
  100. #endif
  101. void init_config();
  102. void setup_config(void);
  103. void config_write(int);
  104. void config_read(int);
  105. BOOL config_setup_filetypes(int mode);
  106. void config_adddesktop(void);
  107. int config_isregistered(wchar_t *);
  108. BOOL config_registermediaplayer(DWORD accessEnabled);
  109. BOOL config_register_capability(wchar_t *ext, int mode);
  110. void config_register(wchar_t *ext, int reg);
  111. void config_setinifile(wchar_t *inifile);
  112. void config_setinidir(const wchar_t *inidir);
  113. void config_setm3udir(const wchar_t *m3udir);
  114. void config_setm3ubase(const wchar_t *m3ubase);
  115. void config_load_langpack_var(void);
  116. void config_save_langpack_var(void);
  117. int config_isdircontext(void);
  118. BOOL config_setup_filetype(const wchar_t *winamp_file, const wchar_t *name, BOOL use_fallback);
  119. BOOL config_adddircontext(BOOL use_fallback);
  120. int config_iscdplayer(void);
  121. BOOL config_removedircontext(BOOL use_fallback);
  122. BOOL config_regcdplayer(int reg, int mode);
  123. void config_remove_winamp_keys(void);
  124. void config_agent_add(void);
  125. void config_agent_remove(void);
  126. void regmimetype(const wchar_t *mtype, const wchar_t *programname, const wchar_t *ext, int nsonly);
  127. void RemoveRegistrar();
  128. /***********************
  129. *** convert.cpp
  130. */
  131. int convert_file(convertFileStruct *cfs);
  132. void convert_end(convertFileStruct *cfs);
  133. int convert_fileW(convertFileStructW *cfs);
  134. void convert_endW(convertFileStructW *cfs);
  135. HWND convert_config(convertConfigStruct *ccs);
  136. void convert_config_end(convertConfigStruct *ccs);
  137. void convert_enumfmts(converterEnumFmtStruct *cefs);
  138. void convert_setPriority(convertSetPriority *csp);
  139. void convert_setPriorityW(convertSetPriorityW *csp);
  140. int convert_setConfigItem(convertConfigItem *cci);
  141. int convert_getConfigItem(convertConfigItem *cci);
  142. int convert_file_test(convertFileStructW *cfs);
  143. /***********************
  144. *** dde.c
  145. */
  146. int dde_addstart(HWND hwnd);
  147. void dde_delstart(void);
  148. int dde_isquicklaunchavailable(void);
  149. void dde_addquicklaunch(HWND hwnd);
  150. void dde_adddesktop(HWND hwnd);
  151. void dde_remdesktop(void);
  152. void dde_remquicklaunch(void);
  153. /***********************
  154. *** dock.c
  155. */
  156. void FixMainWindowRect(RECT *r);
  157. void EstMainWindowRect(RECT *r);
  158. void EstEQWindowRect(RECT *r);
  159. void EstPLWindowRect(RECT *r);
  160. void EstVidWindowRect(RECT *r);
  161. void SetVidWindowRect(RECT *r);
  162. void SetMainWindowRect(RECT *r);
  163. void SetEQWindowRect(RECT *r);
  164. void SetPLWindowRect(RECT *r);
  165. void MoveRect(RECT *r, int x, int y);
  166. int IsWindowAttached(RECT rc, RECT rc2);
  167. void SnapWindowToWindow(RECT *rcSrc, RECT rcDest);
  168. void AdjustSnap(RECT old1, RECT old2, RECT *new1, RECT *new2);
  169. int IsPointInRect(int x, int y, RECT *r);
  170. void FixOverlaps(RECT *r1, RECT *r2);
  171. /***********************
  172. *** draw.c
  173. */
  174. extern int (WINAPI *jtf_drawtext)(HDC, LPCWSTR, int, LPRECT, UINT);
  175. void draw_set_plbm(HBITMAP);
  176. extern int pe_fontheight;
  177. extern HPALETTE draw_hpal;
  178. void draw_firstinit(void);
  179. void draw_finalquit(void);
  180. void draw_init(void);
  181. void draw_paint(HWND hwnd);
  182. void draw_printclient(HDC hdc, LPARAM drawingOptions);
  183. void draw_kill(void);
  184. void draw_clear(void);
  185. void draw_monostereo(int value); // 0 is neither, 1 is mono, 2 is stereo
  186. void draw_shuffle(int on, int pressed);
  187. void draw_repeat(int on, int pressed);
  188. void draw_eqplbut(int eqon, int eqpressed, int plon, int plpressed);
  189. void draw_volumebar(int volume, int pressed); // volume is 0-51
  190. void draw_panbar(int volume, int pressed);
  191. void draw_songname(const wchar_t *name, int *position, int songlen);
  192. void draw_positionbar(int position, int pressed); // position is 0-256
  193. void draw_bitmixrate(int bitrate, int mixrate);
  194. void draw_buttonbar(int buttonpressed); // starts at 0 with leftmost, -1 = no button
  195. void draw_playicon(int whichicon); // 0 = none, 1 = play, 2 = stop, 4 = pause
  196. void draw_time(int minutes, int seconds, int clear);
  197. void draw_sa(unsigned char *values, int draw); // array of 12 bands, starting with leftmost, of 0..7
  198. void draw_tbuttons(int b1, int b2, int b3, int b4);
  199. void draw_setnoupdate(int);
  200. void draw_tbar(int active, int windowshade, int egg);
  201. void draw_eject(int pressed);
  202. void draw_clutterbar(int enable);
  203. void update_volume_text(int songlen);
  204. void update_panning_text(int songlen);
  205. /*****************
  206. *** draw_eq.c
  207. */
  208. extern int eq_init;
  209. void draw_eq_init();
  210. void draw_eq_kill();
  211. void draw_paint_eq(HWND hwnd);
  212. void draw_printclient_eq(HDC hdc, LPARAM /*drawingOptions*/);
  213. void draw_eq_tbutton(int b3, int wsb);
  214. void draw_eq_slid(int which, int pos, int pressed); // left to right, 0-64
  215. void draw_eq_tbar(int active);
  216. void draw_eq_onauto(int on, int autoon, int onpressed, int autopressed);
  217. void draw_eq_presets(int pressed);
  218. void draw_eq_graphthingy(void);
  219. /*****************
  220. *** draw_pe.c
  221. *** for functions that accept HDC as the first parameter,
  222. *** hdc can be NULL, and it will use the Window DC
  223. */
  224. extern int pe_init;
  225. void draw_pe_init();
  226. void draw_pe_kill();
  227. void draw_pe_tbutton(int b2, int b3, int b2_ws);
  228. void draw_paint_pe(HWND hwnd);
  229. void draw_printclient_pe(HWND hwnd, HDC hdc, LPARAM drawingOptions);
  230. void draw_reinit_plfont(int notifyOthers);
  231. void draw_pe_tbar(HWND hwnd, HDC hdc, int state);
  232. void draw_pe_vslide(HWND hwnd, HDC hdc, int pushed, int pos); // pos 0..100
  233. void draw_pe_timedisp(HDC hdc, int minutes, int seconds, int tlm, int clear);
  234. void draw_pe_addbut(int which); // -1 = none, 0 = file, 1 = dir, 2 = loc
  235. void draw_pe_rembut(int which); // -1 = none, 0 = sel, 1 = crop, 2 = all
  236. void draw_pe_selbut(int which); // -1 = none, 0 = all, 1 = none, 2=inv
  237. void draw_pe_miscbut(int which); // -1 = none, 0 = inf, 1 = sort, 2=misc
  238. void draw_pe_iobut(int which); // -1 = none, 0 = load, 1=save, 2=clear
  239. /*****************
  240. *** draw_vw.c
  241. */
  242. extern int vw_init;
  243. void draw_vw_init();
  244. void draw_vw_kill();
  245. void draw_vw_tbar(int state);
  246. void draw_vw(HDC hdcout);
  247. void draw_paint_vw(HWND hwnd);
  248. void draw_vw_tbutton(int b3);
  249. void draw_vw_mbuts(int whichb);
  250. void draw_vw_info(wchar_t *t, int erase);
  251. /*****************
  252. *** dsp.c
  253. */
  254. void dsp_init(void);
  255. void dsp_quit(void);
  256. int dsp_dosamples(short int *samples, int numsamples, int bps, int nch, int srate);
  257. int dsp_isactive(void);
  258. /*****************
  259. *** eq.c
  260. */
  261. extern unsigned char eq_tab[10];
  262. void eq_dialog(HWND, int);
  263. void eq_autoload(const char *mp3fn);
  264. LRESULT CALLBACK EQ_WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
  265. /*****************
  266. *** embedwnd.cpp
  267. */
  268. #ifdef __cplusplus
  269. typedef struct _EMBEDWND
  270. {
  271. HWND hLastFocus;
  272. } EMBEDWND;
  273. #include "../nu/CGlobalAtom.h"
  274. static CGlobalAtom EMBEDWND_PROPW(L"EMBDEWND");
  275. #define GetEmbedWnd(__hwnd) ((EMBEDWND*)GetPropW(__hwnd, EMBEDWND_PROPW))
  276. #endif
  277. extern LRESULT CALLBACK emb_WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
  278. extern HWND embedWindow(embedWindowState *state);
  279. extern void SnapWindowToAllWindows(RECT *outrc, HWND hwndNoSnap);
  280. extern BOOL SnapToScreen(RECT *outrc);
  281. extern CRITICAL_SECTION embedcs;
  282. extern embedWindowState *embedwndlist; // linked list
  283. extern int embedwndlist_cnt;
  284. #define EMBED_STATE_EXTRA_LINK 0
  285. #define EMBED_STATE_EXTRA_ATTACHED 1
  286. #define EMBED_STATE_EXTRA_GUID 4 // note this reserved 5-7 also
  287. #define EMBED_STATE_EXTRA_REPARENTING 62
  288. #define EMBED_STATE_EXTRA_FFROOTWND 63
  289. /*****************
  290. *** equi.c
  291. */
  292. extern int minimize_hack_winamp;
  293. extern int do_volbar_active, do_panbar_active;
  294. void eq_ui_handlecursor(void);
  295. void equi_handlemouseevent(int x, int y, int type, int stats);
  296. void ui_handlecursor(void);
  297. BOOL DoTrackPopup(HMENU hMenu, UINT fuFlags, int x, int y, HWND hwnd);
  298. /*****************
  299. *** gen.cpp
  300. */
  301. void load_genplugins();
  302. void unload_genplugins();
  303. /*****************
  304. *** html.c
  305. */
  306. void doHtmlPlaylist(void);
  307. /*****************
  308. *** http.c
  309. */
  310. int httpRetrieveFile(HWND hwnd, const char *url, char *file, char *dlgtitle);
  311. int httpRetrieveFileW(HWND hwnd, const char *url, const wchar_t *file, const wchar_t *dlgtitle);
  312. /*****************
  313. *** in.c
  314. */
  315. extern In_Module *in_mod;
  316. int in_init();
  317. void in_deinit();
  318. In_Module *in_setmod(wchar_t *filename);
  319. In_Module *in_setmod_noplay(const wchar_t *filename, int *start_offs); // starts at *start_offs, sets *start_offs with the value of the module used
  320. char *in_getfltstr(void);
  321. wchar_t *in_getfltstrW(BOOL skip);
  322. char *in_getextlist(void);
  323. wchar_t *in_getextlistW();
  324. int in_getouttime(void);
  325. int in_getlength(void);
  326. void in_pause(int p);
  327. int in_seek(int time_in_ms);
  328. int in_open(const wchar_t *fn);
  329. void in_setvol(int v);
  330. void in_setpan(int p);
  331. void in_close(void);
  332. int in_infobox(HWND hwnd, const wchar_t *fn);
  333. int in_get_extended_fileinfoW(const wchar_t *fn, const wchar_t *metadata, wchar_t *dest, size_t destlen);
  334. int in_get_extended_fileinfo(const char *fn, const char *metadata, char *dest, size_t destlen);
  335. int in_set_extended_fileinfo(const char *fn, const char *metadata, char *dest);
  336. int in_set_extended_fileinfoW(const wchar_t *fn, const wchar_t *metadata, wchar_t *data);
  337. int in_write_extended_fileinfo();
  338. void eq_set(int on, char data[10], int preamp);
  339. void in_flush(int ms);
  340. /**************
  341. *** jump.c
  342. */
  343. void SetJumpComparator(void *functionPtr);
  344. void SetJumpComparatorW(void *functionPtr);
  345. int jump_dialog(HWND hwnd);
  346. int jump_file_dialog(HWND hwnd);
  347. /***************
  348. *** m3u.c
  349. */
  350. int savem3ufn(const wchar_t *filename, int rel, int useBase);
  351. /* main.c */
  352. #include "buildType.h"
  353. #ifndef WM_MOUSEWHEEL
  354. #define WM_MOUSEWHEEL 0x20A
  355. #endif
  356. extern UINT songChangeBroadcastMessage;
  357. extern HMENU main_menu, top_menu, systray_menu, g_submenus_bookmarks1,
  358. g_submenus_bookmarks2, g_submenus_skins1, g_submenus_skins2,
  359. g_submenus_vis, g_submenus_options, g_submenus_lang,
  360. g_submenus_play, v5_top_menu;
  361. extern int unique_loword_command;
  362. extern int g_submenus_lang_id;
  363. extern char g_audiocdletter[];
  364. extern int g_audiocdletters;
  365. extern int g_dropaot_timer_set;
  366. extern int is_install;
  367. extern int g_fsapp;
  368. extern int g_restoreaot_timer_set;
  369. extern int bNoHwndOther;
  370. extern int g_safeMode;
  371. void tealike_crappy_code(unsigned long v[2], unsigned long k[4]);
  372. void UpdateAudioCDMenus(HMENU hmenu);
  373. void MoveOffscreen(HWND hwnd);
  374. void ResolveEnvironmentVariables(wchar_t *string, size_t stringSize);
  375. extern int g_main_created;
  376. extern int g_noreg;
  377. extern wchar_t szAppName[64]; // window class name, generated on the fly.
  378. extern int g_fullstop;
  379. extern int vis_fullscreen;
  380. extern int stat_isit; // used for faster version checking
  381. extern int g_mm_ffoptionsbase_adj;
  382. extern int no_notify_play;
  383. extern int last_no_notify_play;
  384. extern int disable_skin_cursors;
  385. extern int disable_skin_borders;
  386. extern int g_exit_disabled;
  387. extern UINT g_scrollMsg;
  388. LRESULT CALLBACK Main_WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
  389. extern int Ipc_WindowToggle(INT_PTR which, INT_PTR how);
  390. extern int eggstat;
  391. extern int last_brate, g_need_titleupd, g_need_infoupd;
  392. extern int g_stopaftercur;
  393. extern int g_has_deleted_current;
  394. extern int g_has_video_plugin, g_no_video_loaded;
  395. extern char *audits[AUDITSIZE];
  396. extern int audit_ptr;
  397. extern HWND hTooltipWindow, hEQTooltipWindow, hVideoTooltipWindow, hPLTooltipWindow/*, hPL2TooltipWindow*/;
  398. extern HWND hMainWindow, hEQWindow, hPLWindow, /*hMBWindow, */hVideoWindow;
  399. extern HINSTANCE hMainInstance;
  400. extern HANDLE hMainThread;
  401. extern DWORD mainThreadId;
  402. extern int paused;
  403. extern int playing;
  404. extern wchar_t caption[CAPTION_SIZE];
  405. extern wchar_t FileName[FILENAME_SIZE];
  406. extern wchar_t FileTitle[FILETITLE_SIZE];
  407. extern wchar_t FileTitleNum[FILETITLE_SIZE];
  408. extern char *app_date;
  409. extern int g_srate, g_brate, g_nch, g_srate_exact;
  410. extern int g_mm_optionsbase_adj;
  411. extern int g_mm_ffwindowsbase_adj;
  412. extern HWND g_dialog_box_parent;
  413. extern int g_restartonquit;
  414. extern char playlist_custom_font[128];
  415. extern wchar_t playlist_custom_fontW[128];
  416. extern int config_custom_plfont;
  417. extern int disable_skin_cursors;
  418. LRESULT sendMlIpc(int msg, WPARAM param);
  419. extern HWND hExternalVisWindow;
  420. int CALLBACK WINAPI BrowseCallbackProc( HWND hwnd, UINT uMsg, LPARAM lParam, LPARAM lpData);
  421. int CALLBACK WINAPI BrowseCallbackProc_Download(HWND hwnd, UINT uMsg, LPARAM lParam, LPARAM lpData);
  422. BOOL CALLBACK browseEnumProc(HWND hwnd, LPARAM lParam);
  423. int Main_OnClose(HWND hwnd);
  424. #define DIALOG_PARENT(w) (g_dialog_box_parent?g_dialog_box_parent:w)
  425. int CreateMainWindow();
  426. void BuildAppName();
  427. WPARAM WinampMessageLoop();
  428. /***************
  429. *** metrics.c
  430. */
  431. #define METRICS_EMAIL 0x0001
  432. #define METRICS_COUNTRY 0x0002
  433. #define METRICS_ANNOUNCEMENTS 0x0003
  434. #define METRICS_GENDER 0x0004
  435. INT GetMetricsValueW(const char *data, const char *pszType, void *pDest, int cbDest);
  436. BOOL SetMetricsValueW(const char *data, const char *pszType, const void *pVal, int cbVal);
  437. BOOL SendMetrics(const char *data, HWND hwndParent);
  438. INT GetMetricsSize(const char *data);
  439. /***************
  440. *** verchk.c
  441. */
  442. void newversioncheck(void);
  443. void Ping(const char *url);
  444. /***************
  445. *** ole.cpp
  446. */
  447. void InitDragDrops();
  448. void UninitDragDrops();
  449. void Ole_initDragDrop(void);
  450. void Ole_uninitDragDrop(void);
  451. void *Ole_getDropTarget(void);
  452. /***************
  453. *** options.c
  454. */
  455. #define PREFS_UNICODE ((_prefsDlgRec *)1)
  456. #define PREFS_ACP ((_prefsDlgRec *)0)
  457. extern int g_taskbar_dirty;
  458. extern intptr_t prefs_last_page;
  459. extern RECT prefs_rect, alt3_rect, ctrle_rect, about_rect,
  460. loc_rect, time_rect, load_rect, editinfo_rect;
  461. extern HWND prefs_hwnd;
  462. void prefs_dialog(int modal);
  463. void prefs_liveDlgAdd(prefsDlgRec * p);
  464. void prefs_liveDlgRemove(prefsDlgRec * p);
  465. void prefs_liveDlgUpdate(prefsDlgRec * p);
  466. void SetDialogBoxFromFile(FILE *fp, HWND hwndDlg, int id);
  467. /***************
  468. *** options_playlist.cpp
  469. */
  470. void UpdatePlaylistFontSizeText(void);
  471. void UpdateManualAdvanceState(void);
  472. /***************
  473. *** options_skin.cpp
  474. */
  475. typedef struct _ENUMSKIN
  476. {
  477. const wchar_t *pszFileName;
  478. const wchar_t *pszName;
  479. int nType;
  480. int bActive;
  481. } ENUMSKIN;
  482. #define SKIN_FILETYPE_EMBED 3
  483. #define SKIN_FILETYPE_DIR 0
  484. #define SKIN_FILETYPE_ZIP 1
  485. #define SKIN_FILETYPE_WSZ 2
  486. #define SKIN_FILETYPE_WAL 4
  487. typedef int (CALLBACK *ENUMSKINPROC)(ENUMSKIN* /*pes*/, void * /*user*/); // return 0 to stop enumeration
  488. int EnumerateSkins(ENUMSKINPROC fnEnumSkin, void *user);
  489. /***************
  490. *** options_general.cpp
  491. */
  492. typedef struct _ENUMLANG
  493. {
  494. const wchar_t *pszFileName;
  495. const wchar_t *pszName;
  496. int nType;
  497. int bActive;
  498. } ENUMLANG;
  499. //#define LANG_FILETYPE_LNG 1 // DEPRECATED: no longer a supported type
  500. #define LANG_FILETYPE_WLZ 2
  501. #define LANG_FILETYPE_EMBED 3
  502. #define LANG_FILETYPE_ZIP 4 // added 5.66
  503. #define LANG_FILETYPE_DIR 0 // added 5.66
  504. typedef int (CALLBACK *ENUMLANGPROC)(ENUMLANG* /*pel*/, void * /*user*/); // return 0 to stop enumeration
  505. int EnumerateLanguages(ENUMLANGPROC fnEnumLang, void *user);
  506. void LangSwitchToLangPrompt(HWND hwndDlg, wchar_t* newLang);
  507. /***************
  508. *** out.c
  509. */
  510. extern Out_Module *out_modules[32];
  511. extern Out_Module *out_mod;
  512. void out_init();
  513. void out_deinit();
  514. void out_setwnd();
  515. void out_changed(HINSTANCE hLib, int enabled);
  516. /***************
  517. *** peui.c
  518. */
  519. void peui_handlemouseevent(HWND hwnd, int x, int y, int type, int stats);
  520. void pe_ui_handlecursor(HWND hwnd);
  521. /****************
  522. *** play.c
  523. */
  524. void getNewFile(int, HWND, const wchar_t *);
  525. LRESULT getNewLocation(int, HWND); // if the int param is -1, returns a HGLOBAL to the thing instead of acting on it
  526. void StartPlaying();
  527. void StopPlaying(int);
  528. void PausePlaying();
  529. void UnPausePlaying();
  530. void PlayThing(const char *thing, int clearlist);
  531. void BeginPlayback();
  532. /***************
  533. *** playlist.c
  534. */
  535. __declspec(dllexport) extern wchar_t *(*plstring_wcsdup)(const wchar_t *str);
  536. __declspec(dllexport) extern wchar_t *(*plstring_malloc)(size_t str_size);
  537. __declspec(dllexport) extern void (*plstring_release)(wchar_t *str);
  538. __declspec(dllexport) extern void (*plstring_retain)(wchar_t *str);
  539. int LoadPlaylistByExtension(const wchar_t *fn, const wchar_t *ext, int whattodo, int useBase);
  540. int PlayList_getitem2W(int position, wchar_t *filename, wchar_t *filetitle);
  541. int PlayList_getitem_jtfW(int position, wchar_t *str);
  542. void PlayList_getcurrent_tupdate(wchar_t *FileName, wchar_t *FileTitle);
  543. int IsPlaylistExtension(const wchar_t *extension);
  544. int IsPlaylistExtensionA(const char *extension);
  545. int LoadPlaylist(const wchar_t *filename, int whattodo, int doMIMEcheck); // returns -1 if not a playlist, 0 on success, 1 on failure
  546. void plstring_init();
  547. extern wchar_t playlistStr[19];
  548. void PlayList_UpdateTitle(const wchar_t *filename);
  549. int PlayList_GetNextSelected(int start);
  550. int PlayList_GetSelectedCount();
  551. void PlayList_updateitem(int position);
  552. void PlayList_getcurrent_onstop(wchar_t *filename, wchar_t *filetitle);
  553. int PlayList_gethidden(int pos);
  554. int PlayList_ishidden(int pos);
  555. int PlayList_alldone(int pos);
  556. int PlayList_hasanycurtain(int pos);
  557. int PlayList_current_hidden(void);
  558. const char *PlayList_getcurtain(int pos);
  559. const char *PlayList_getExtInf( int pos );
  560. //const char *PlayList_getbrowser(int pos);
  561. void PlayList_resetcurrent(void);
  562. int PlayList_getitem(int position, wchar_t *filename, wchar_t *filetitle);
  563. int PlayList_getitem2(int position, char *filename, char *filetitle);
  564. int PlayList_getitem3(int position, char *filetitle, char *filelength);
  565. int PlayList_getitem3W(int position, wchar_t *filetitle, wchar_t *filelength);
  566. int PlayList_getitem_pl(int position, wchar_t *);
  567. int PlayList_getlength(void);
  568. int PlayList_deleteitem(int item);
  569. void PlayList_delete(void);
  570. void PlayList_destroy(void);
  571. void PlayList_append(const wchar_t *filename, int is_nde_string);
  572. void PlayList_appendthing(const wchar_t *url, int doMIMEcheck, int is_nde_string);
  573. void PlayList_append_withinfo(const wchar_t *filename, const wchar_t *title, const wchar_t *ext, int length, int is_nde_string);
  574. void PlayList_append_withinfo_curtain(const wchar_t *filename, const wchar_t *title, int length, char *curtain, const wchar_t *ext, int is_nde_string);
  575. void PlayList_append_withinfo_hidden(const wchar_t *filename, const wchar_t *title, int length, char *curtain/*, char *browser*/);
  576. void PlayList_getcurrent(wchar_t *filename, wchar_t *filetitle, wchar_t *filetitlenum);
  577. void PlayList_GetCurrentTitle(wchar_t *filetitle, int cchLen);
  578. void PlayList_setcurrent(const wchar_t *filename, wchar_t *filetitle);
  579. void PlayList_swap(int e1, int e2);
  580. int PlayList_setposition(int pos);
  581. int PlayList_advance(int byval);
  582. int PlayList_getPosition();
  583. int PlayList_getNextPosition();
  584. void PlayList_addfromdlg(const wchar_t *fns); // replace with api_playlistmanager
  585. void PlayList_refreshtitle(void);
  586. wchar_t *PlayList_gettitle(const wchar_t *filename, int useID3);
  587. const wchar_t *PlayList_GetCachedTitle(const wchar_t *filename);
  588. int PlayList_randpos(int);
  589. void PlayList_randomize(void);
  590. void PlayList_reverse(void);
  591. void PlayList_sort(int, int start_p);
  592. void PlayList_adddir(const wchar_t *path, int recurse); // returns 0 if path was invalid // replace with api_playlistmanager
  593. void PlayList_updaterandpos(void);
  594. void PlayList_makerelative(const wchar_t *listfile, wchar_t *filename, int useBase);
  595. int PlayList_getsonglength(int x);
  596. int PlayList_gettotallength(void);
  597. int PlayList_getcurrentlength(void);
  598. int PlayList_getselect(int);
  599. int PlayList_getselect2(int x, wchar_t *filename);
  600. void PlayList_setselect(int, int);
  601. void PlayList_setlastlen(int x);
  602. void PlayList_setitem(int x, const wchar_t *filename, wchar_t *filetitle);
  603. void PlayList_saveend(int start);
  604. void PlayList_restoreend(void);
  605. void PlayList_setcached(int x, int cached);
  606. int PlayList_getcached(int x);
  607. void PlayList_SetLastItem_RepeatCount( int count);
  608. int PlayList_getrepeatcount(int pos);
  609. void PlayList_terminate_lasthidden(void);
  610. void PlayList_SetLastItem_Range(unsigned long starttime, unsigned long endtime);
  611. unsigned long PlayList_GetItem_Start(int pos);
  612. unsigned long PlayList_GetItem_End(int pos);
  613. void PlayList_insert(int position, const wchar_t *filename);
  614. /**************
  615. *** pledit.c
  616. */
  617. LRESULT CALLBACK PE_WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
  618. void pleditDlg(HWND, int);
  619. void plEditRefresh(void);
  620. void plEditSelect(int song);
  621. extern int pledit_disp_offs;
  622. void PE_Cmd(windowCommand *wc);
  623. /***************
  624. *** pls.c
  625. */
  626. void saveplsfn(const wchar_t *fn);
  627. int loadpls(HWND, int);
  628. int savepls(HWND hwnd);
  629. /************************
  630. *** sa.c
  631. */
  632. extern volatile int sa_curmode;
  633. void SpectralAnalyzer_Create();
  634. void SpectralAnalyzer_Destroy();
  635. void sa_setthread(int enabled);
  636. void sa_deinit(void);
  637. void sa_init(int numframes);
  638. int sa_add(char *values, int timestamp, int csa);
  639. char *sa_get(int timestamp, int csa, char data[75*2 + 8]);
  640. /************************
  641. *** set.c
  642. */
  643. void set_caption(int alt_cb, wchar_t *format, ...);
  644. void set_aot(int);
  645. void set_priority(void);
  646. void set_taskbar(void);
  647. void set_visopts(void);
  648. void do_caption_autoscroll(void);
  649. void set_pl_wnd_tooltip(void);
  650. void set_vid_wnd_tooltip(void);
  651. /***********************
  652. *** shell.cpp
  653. */
  654. HRESULT ResolveShortCut(HWND hwnd, LPCWSTR pszShortcutFile, LPWSTR pszPath);
  655. //void CreateShortCut(HWND hwnd, LPCSTR pszShortcutFile, LPCSTR pszExe, LPCSTR, int);
  656. void Shell_Free(void *p);
  657. /************************
  658. *** skins.c
  659. */
  660. BOOL _cleanupDirW(const wchar_t *dir);
  661. extern int g_skinloadedmanually, g_skinmissinggenff;
  662. void CreateDirectoryForFileW(wchar_t *fn, wchar_t *base); // shared for use with wlz files
  663. void Skin_Random(void);
  664. void Skin_Load(void);
  665. void Skin_CleanupZip(void);
  666. void Skin_CleanupAfterCrash(void);
  667. BOOL Skin_Check_Modern_Support();
  668. int Skin_GetRegionPointList(int eq, int **points, int **counts);
  669. /* The indices of Skin_PLColors:
  670. 0 - text color - playlist
  671. 1 - text color - currently playing playlist entry
  672. 2 - background color - playlist
  673. 3 - background color - selected playlist entry
  674. 4 - text color - video window info, minibrowser info
  675. 5 - background - video window info, minibrowser info */
  676. extern int Skin_PLColors[6], Skin_UseGenNums;
  677. extern char Skin_PLFont[128];
  678. extern wchar_t Skin_PLFontW[128];
  679. extern HWND skin_hwnd;
  680. #define N_CURSORS 29
  681. extern HCURSOR Skin_Cursors[N_CURSORS];
  682. /*************************
  683. *** splash.c
  684. */
  685. void splashDlg(int wait_in_ms);
  686. /*************************
  687. *** stats.c
  688. */
  689. void Stats_OnPlay(const wchar_t *playstring);
  690. void stats_write(void); // sets some final stats and writes to disk
  691. void stats_getuidstr(char *str);
  692. void stats_init();
  693. void stats_save(); // just writes to disk
  694. /***********************
  695. *** systray.c
  696. */
  697. extern int systray_intray;
  698. void systray_minimize(wchar_t *tip);
  699. void systray_restore(void);
  700. /* ui.c */
  701. extern int ui_songposition;
  702. extern int ui_songposition_dir;
  703. extern int ui_songposition_tts;
  704. extern int do_posbar_active;
  705. void ui_doscrolling();
  706. void ui_handlemouseevent(int x, int y, int type, int stats); // x,y, -1=up,0=move,1=down, stats = kbstats
  707. void ui_reset();
  708. void ui_drawtime(int time_elapsed, int mode); // mode=0 means called from timer, mode=1 forced
  709. /***********************
  710. *** util.c
  711. */
  712. LPCWSTR RepairMutlilineString(LPWSTR pszBuffer, INT cchBufferMax);
  713. void recent_add(const wchar_t *loc);
  714. int IsUrl(const char *url);
  715. //int IsCharSpace(char digit);
  716. //int IsCharSpaceW(wchar_t digit);
  717. int IsCharDigit(char digit);
  718. int IsCharDigitW(wchar_t digit);
  719. void mbprintf(char *file, int line, char *format, ...);
  720. void link_handledraw(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
  721. LRESULT link_handlecursor(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
  722. void link_startsubclass(HWND hwndDlg, UINT id);
  723. void myOpenURL(HWND, const wchar_t *url);
  724. void myOpenURLWithFallback(HWND, wchar_t *url, wchar_t *fallbackUrl);
  725. char *my_strdup(char *s);
  726. int geticonid(int x);
  727. int isInetAvailable(void);
  728. unsigned int getDay(void);
  729. const wchar_t *scanstr_backcW(const wchar_t *str, const wchar_t *toscan, const wchar_t *defval);
  730. void getViewport(RECT *r, HWND wnd, int full, RECT *sr);
  731. BOOL windowOffScreen(HWND hwnd, POINT pt);
  732. LPCWSTR BuildFullPath(LPCWSTR pszPathRoot, LPCWSTR pszPath, LPWSTR pszDest, INT cchDest); //
  733. INT ComparePath(LPCWSTR pszPath1, LPCWSTR pszPath2, LPCWSTR pszPathRoot); //
  734. BOOL DisabledWindow_OnMouseClick(HWND hwnd); // call it in WM_SETCURSOR
  735. /***************
  736. *** functions related to uxtheme.dll
  737. */
  738. #define ETDT_DISABLE 0x01
  739. #define ETDT_ENABLE 0x02
  740. #define ETDT_USETABTEXTURE 0x04
  741. #define ETDT_ENABLETAB (ETDT_ENABLE | ETDT_USETABTEXTURE)
  742. #define ETDT_USEAEROWIZARDTABTEXTURE 0x08
  743. #define ETDT_ENABLEAEROWIZARDTAB (ETDT_ENABLE | ETDT_USEAEROWIZARDTABTEXTURE)
  744. #define ETDT_VALIDBITS (ETDT_DISABLE | ETDT_ENABLE | ETDT_USETABTEXTURE | ETDT_USEAEROWIZARDTABTEXTURE)
  745. int IsWinXPTheme(void);
  746. void DoWinXPStyle(HWND tab);
  747. int IsAero(void);
  748. BOOL IsVista(void);
  749. BOOL IsVistaOrLower(void);
  750. BOOL IsWin8(void);
  751. HRESULT WAEnableThemeDialogTexture(HWND hwnd, DWORD dwFlags);
  752. /***************
  753. *** lang.cpp
  754. */
  755. HINSTANCE Lang_InitLangSupport(HINSTANCE, const GUID);
  756. void Lang_FollowUserDecimalLocale(void);
  757. void Lang_CleanupZip(void);
  758. void Lang_CleanupAfterCrash(void);
  759. void Lang_EndLangSupport(void);
  760. HINSTANCE Lang_FakeWinampLangHInst(HINSTANCE adjustedHInst);
  761. void Lang_LocaliseAgentOnTheFly(BOOL refresh);
  762. int extract_wlz_to_dir(wchar_t* readme_only_wlz_extraction, BOOL *skip);
  763. char *getString(UINT uID, char *str, size_t maxlen);
  764. wchar_t *getGUIDstr(const GUID, wchar_t *target);
  765. int LPMessageBox(HWND parent, UINT idMessage, UINT idTitle, UINT type);
  766. wchar_t *getStringW(UINT uID, wchar_t *str, size_t maxlen);
  767. #define LPCreateDialog(id, parent, proc) \
  768. LPCreateDialogParam(id, parent, (DLGPROC)proc, 0)
  769. HWND LPCreateDialogParam(int id, HWND parent, DLGPROC proc, LPARAM param);
  770. #define LPDialogBox(id, parent, proc) \
  771. LPDialogBoxParam(id, parent, (DLGPROC)proc, 0)
  772. INT_PTR LPDialogBoxParam(int id, HWND parent, DLGPROC proc, LPARAM param);
  773. #define LPDialogBoxW(id, parent, proc) \
  774. LPDialogBoxParamW(id, parent, (DLGPROC)proc, 0)
  775. INT_PTR LPDialogBoxParamW(int id, HWND parent, DLGPROC proc, LPARAM param);
  776. #define LPCreateDialogW(id, parent, proc) \
  777. LPCreateDialogParamW(id, parent, (DLGPROC)proc, 0)
  778. HWND LPCreateDialogParamW(int id, HWND parent, DLGPROC proc, LPARAM param);
  779. HMENU LPLoadMenu(UINT id);
  780. /***************
  781. *** video.cpp
  782. */
  783. extern int g_video_numaudiotracks;
  784. extern int g_video_curaudiotrack;
  785. void Browser_Create();
  786. void Browser_Destroy();
  787. extern wchar_t vidoutbuf_save[1024];
  788. extern int is_fullscreen_video;
  789. int ShowVideoWindow(int init_state);
  790. void HideVideoWindow(int autoStop);
  791. LRESULT CALLBACK video_WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
  792. int video_isVideoPlaying();
  793. int videoIsFullscreen();
  794. void videoToggleFullscreen();
  795. void videoForceFullscreenOff();
  796. HWND video_Create();
  797. /***************
  798. *** video_ipc.cpp
  799. */
  800. int WINAPI VideoIPCProcedure(int which, WPARAM data, LRESULT *returnValue);
  801. /***
  802. ** videoui.c
  803. */
  804. void videoui_handlemouseevent(int x, int y, int type, int stats);
  805. /***********************
  806. *** vis.c
  807. */
  808. int vis_running();
  809. void vis_start(HWND, wchar_t*);
  810. void vis_stop();
  811. void vsa_init(int numframes);
  812. void vsa_deinit(void);
  813. void vis_setinfo(int srate, int nch);
  814. int vsa_getmode(int *sp, int *wa);
  815. void vis_setprio(void);
  816. int vsa_add(void *data, int timestamp);
  817. int sa_add(char *values, int timestamp, int csa);
  818. void sa_addpcmdata(void *PCMData, int nch, int bps, int timestamp);
  819. void vsa_addpcmdata(void *PCMData, int nch, int bps, int timestamp);
  820. LRESULT CALLBACK VIS_WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
  821. extern HWND hVisWindow, hPLVisWindow;
  822. void vis_setextwindow(HWND hwnd);
  823. /***********************
  824. *** rand.cpp
  825. */
  826. int warand();
  827. float warandf();
  828. /*******************
  829. *** ipc.cpp
  830. */
  831. LRESULT Main_OnIPC(HWND hwnd, int which, WPARAM data);
  832. LRESULT wa_register_ipc(WPARAM data);
  833. /*******************
  834. *** fullscreen.cpp
  835. */
  836. void BeginFullscreenAppMonitor();
  837. void EndFullscreenAppMonitor();
  838. void restoreAOT();
  839. void dropAOT();
  840. /*******************
  841. *** main_mouse.cpp
  842. */
  843. int Main_OnRButtonUp(HWND hwnd, int x, int y, UINT flags);
  844. int Main_OnLButtonUp(HWND hwnd, int x, int y, UINT flags);
  845. int Main_OnCaptureChanged(HWND hwnd);
  846. int Main_OnLButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT keyFlags);
  847. int Main_OnLButtonDblClk(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT keyFlags);
  848. int Main_OnMouseMove(HWND hwnd, int x, int y, UINT keyFlags);
  849. /*******************
  850. *** main_nonclient.cpp
  851. */
  852. UINT Main_OnNCHitTest(HWND hwnd, int x, int y);
  853. BOOL Main_OnNCActivate(HWND hwnd, BOOL fActive, HWND hwndActDeact, BOOL fMinimized);
  854. UINT Main_OnNCCalcSize(HWND hwnd, BOOL fCalcValidRects, NCCALCSIZE_PARAMS * lpcsp);
  855. /*******************
  856. *** main_display.cpp
  857. */
  858. int Main_OnGetText(wchar_t *text, int sizeCch);
  859. int Main_OnDisplayChange(HWND hwnd);
  860. int Main_OnQueryNewPalette(HWND hwnd);
  861. int Main_OnPaletteChanged(HWND hwnd, HWND hwndPaletteChange);
  862. /*******************
  863. *** main_buttons.cpp
  864. */
  865. int Main_OnButton1(HWND hwnd, int id, HWND hwndCtl, UINT codeNotify);
  866. int Main_OnButton2(HWND hwnd, int id, HWND hwndCtl, UINT codeNotify);
  867. int Main_OnButton3(HWND hwnd, int id, HWND hwndCtl, UINT codeNotify);
  868. int Main_OnButton4(HWND hwnd, int id, HWND hwndCtl, UINT codeNotify);
  869. int Main_OnButton5(HWND hwnd, int id, HWND hwndCtl, UINT codeNotify);
  870. /*******************
  871. *** main_close.cpp
  872. */
  873. void Main_OnEndSession(HWND hwnd, BOOL fEnding);
  874. int Main_OnClose(HWND hwnd);
  875. int Main_OnDestroy(HWND hwnd);
  876. /*******************
  877. *** main_init.cpp
  878. */
  879. void RegisterWinamp();
  880. BOOL InitApplication(HINSTANCE hInstance);
  881. BOOL InitInstance(HINSTANCE hInstance, int nCmdShow);
  882. /*******************
  883. *** browser.cpp
  884. */
  885. /*
  886. void LaunchBrowser(const char *url);
  887. void OpenBrowser();
  888. void Browser_toggleVisible(int showing);
  889. void CloseBrowser();
  890. void Browser_init();
  891. void Browser_kill();
  892. */
  893. /*******************
  894. *** ExternalCOM.cpp
  895. */
  896. DISPID __cdecl JSAPI1_GenerateUniqueDispatchId();
  897. HRESULT __cdecl JSAPI1_Initialize();
  898. HRESULT __cdecl JSAPI1_Uninitialize();
  899. HRESULT __cdecl JSAPI1_SkinChanged();
  900. HRESULT __cdecl JSAPI1_CurrentTitleChanged();
  901. /*******************
  902. *** SkinUtils.cpp
  903. */
  904. const char *GetFontName();
  905. const wchar_t *GetFontNameW();
  906. int GetFontSize();
  907. /***
  908. *** ASXv2.cpp
  909. */
  910. void loadasxv2fn(const wchar_t *filename, int whattodo);
  911. /*******************
  912. *** Wasabi.cpp
  913. */
  914. void Wasabi_Load();
  915. void Wasabi_Unload();
  916. void Wasabi_FindSystemServices();
  917. void Wasabi_ForgetSystemServices();
  918. /*******************
  919. *** W5S.cpp
  920. */
  921. void w5s_init();
  922. void w5s_deinit();
  923. /*******************
  924. *** vu.cpp
  925. */
  926. void vu_init(int numframes, int srate);
  927. void vu_deinit();
  928. void VU_Create();
  929. void VU_Destroy();
  930. int vu_add(char *values, int timestamp);
  931. int export_vu_get(int channel);
  932. void calcVuData(unsigned char *out, char *data, const int channels, const int bits);
  933. // PlayQueue.cpp
  934. int PlayQueue_OnEOF();
  935. // paths.cpp
  936. BOOL UtilGetSpecialFolderPath(HWND hwnd, TCHAR *path, int folder);
  937. // cmdline.cpp
  938. void GetParameter(const wchar_t *commandLine, wchar_t *yourBuffer, size_t yourBufferSize);
  939. // unsorted
  940. void readwrite_client_uid(int isWrite, wchar_t uid_str[64]);
  941. BOOL read_compatmode();
  942. extern char metric_plugin_list[];
  943. char *export_sa_get_deprecated();
  944. char *export_sa_get(char data[75*2 + 8]);
  945. void export_sa_setreq(int);
  946. extern HWND jump_hwnd, jump_hwnd2;
  947. wchar_t *remove_urlcodesW(wchar_t *p);
  948. int PlayList_get_lastlen();
  949. HBITMAP draw_LBitmap(LPCTSTR bmname, const wchar_t *filename);
  950. extern void draw_mb_info(char *t, int erase);
  951. extern void FormString(char *in, char *out, int maxlen);
  952. extern int plmodified, plcleared, plneedsave;
  953. extern int g_has_deleted_current;
  954. void peui_reset(HWND hwnd);
  955. extern int volatile sa_override;
  956. extern int deferring_show;
  957. extern int g_showcode;
  958. extern int eq_startuphack, pe_startuphack;
  959. extern int g_skinloadedmanually;
  960. void vis_init();
  961. void resizeMediaWnd (HWND hwnd);
  962. extern int g_skinloadedmanually;
  963. int writeEQfile_init(wchar_t *file, char *name, unsigned char *tab);
  964. extern int playlist_open(HWND hwnd);
  965. extern int setPlRating(int rating);
  966. extern int setCurrentRating(int rating);
  967. extern int got_ml;
  968. int peui_isrbuttoncaptured();
  969. extern void makeurlcodes(char *in, char *out);
  970. extern HIMAGELIST toolbarIcons;
  971. extern struct ITaskbarList3* pTaskbar3;
  972. void OnTaskbarButtonCreated(BOOL force);
  973. LRESULT Main_OnCreate(HWND hwnd, LPCREATESTRUCT lpCreateStruct);
  974. LRESULT Main_OnWASystray(HWND hwnd, int id);
  975. LRESULT Main_OnWAMPEGEOF(HWND hwnd);
  976. LRESULT Main_OnSize(HWND hwnd, UINT state, int cx, int cy);
  977. LRESULT Main_OnTimer(HWND hwnd, UINT id);
  978. LRESULT Main_OnDropFiles(HWND hwnd, HDROP hdrop);
  979. LRESULT Main_OnCopyData(HWND hwnd, COPYDATASTRUCT *cds);
  980. extern int m_converting;
  981. void DoInstall(int is_install);
  982. wchar_t *ParseParameters(wchar_t *lpszCmdParam, int *bAdd, int *bBookmark, int *bHandle, int *nCmdShow, int *bCommand, int *bCmdParam, int *bAllowCompat);
  983. #ifdef BETA
  984. void ParseParametersExpired(wchar_t *lpszCmdParam);
  985. #endif
  986. void reg_associated_filetypes(int force);
  987. wchar_t *FindNextCommand(wchar_t *cmdLine);
  988. void parseCmdLine(wchar_t *cmdline, HWND hwnd);
  989. wchar_t *CheckFileBase(wchar_t *lpszCmdParam, HWND hwnd_other, int *exit, int mode);
  990. #define CheckSkin(lpszCmdParam, hwnd_other, exit) CheckFileBase(lpszCmdParam, hwnd_other, exit, 0)
  991. #define CheckLang(lpszCmdParam, hwnd_other, exit) CheckFileBase(lpszCmdParam, hwnd_other, exit, 1)
  992. void LoadPathsIni();
  993. LRESULT Main_OnCommand(HWND hwnd, int id, HWND hwndCtl, UINT codeNotify);
  994. extern int g_BookmarkTop, g_SkinTop, g_LangTop;
  995. extern int g_open_ml_item_in_pe;
  996. void RegisterConfigGroups();
  997. void CopyExtendedFileInfo(const wchar_t *source, const wchar_t *destination);
  998. int ResizeComboBoxDropDown(HWND hwndDlg, UINT id, const char* str, int width);
  999. int ResizeComboBoxDropDownW(HWND hwndDlg, UINT id, const wchar_t *str, int width);
  1000. // creditsrend.c
  1001. void render_togglecredits();
  1002. void render_quit(void);
  1003. void render_render(unsigned char *framebuffer, HDC hdc);
  1004. void render_init(int w, int h, char *pal);
  1005. // InW.cpp
  1006. int InW_IsOurFile(In_Module *mod, const wchar_t *filename);
  1007. int InW_Play(In_Module *mod, const wchar_t *filename);
  1008. int InW_InfoBox(In_Module *mod, const wchar_t *filename, HWND parent);
  1009. void InW_GetFileInfo(In_Module *mod, const wchar_t *filename, wchar_t *title, int *length);
  1010. // conversions.cpp
  1011. void Float32_To_Int16_Clip(void *destinationBuffer, signed int destinationStride, void *sourceBuffer, signed int sourceStride, unsigned int count);
  1012. void Float32_To_Int24_Clip(void *destinationBuffer, signed int destinationStride, void *sourceBuffer, signed int sourceStride, unsigned int count);
  1013. HANDLE DuplicateCurrentThread();
  1014. /* dwm.cpp */
  1015. extern BOOL atti_present;
  1016. void DisableVistaPreview();
  1017. void DoTheVistaVideoDance();
  1018. void RegisterThumbnailTab(HWND hWnd);
  1019. void UnregisterThumbnailTab(HWND hWnd);
  1020. void OnIconicThumbnail(int width, int height);
  1021. void OnThumbnailPreview();
  1022. void RefreshIconicThumbnail();
  1023. /* handler.cpp */
  1024. int HandleFilename(const wchar_t *filename);
  1025. /* IVideoD3DOSD.cpp */
  1026. HMODULE FindD3DX9();
  1027. /* AlbumArt.cpp */
  1028. void CleanNameForPath(wchar_t *name);
  1029. /* application.cpp */
  1030. BOOL IsDirectMouseWheelMessage(const UINT uMsg);
  1031. BOOL DirectMouseWheel_EnableConvertToMouseWheel(HWND hwnd, BOOL enable);
  1032. BOOL DirectMouseWheel_IsConvertToMouseWheelEnabled(HWND hwnd);
  1033. BOOL DirectMouseWheel_ProcessDialogMessage(HWND hwnd, unsigned int uMsg, WPARAM wParam, LPARAM lParam, const int controls[], int controlslen);
  1034. HWND ActiveChildWindowFromPoint(HWND hwnd, POINTS cursor_s, const int *controls, size_t controlsCount);
  1035. #ifdef __cplusplus
  1036. } // extern "C"
  1037. #endif
  1038. #endif