1
0

main.h 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. #ifndef _MAIN_H
  2. #define _MAIN_H
  3. #include <windows.h>
  4. #include <windowsx.h>
  5. #include <commctrl.h>
  6. #include "../winamp/wa_dlg.h"
  7. #include "../winamp/wa_ipc.h"
  8. #include "./itemlist.h"
  9. #include "./config.h"
  10. #include "../winamp/gen.h"
  11. #include "../Agave/Config/ifc_configitem.h"
  12. #define PLUGIN_VERSION 0x0378
  13. #include "./ml.h"
  14. #include "./skinning.h"
  15. #include "../nu/trace.h"
  16. #define WA_MENUITEM_ID 23123
  17. #define WINAMP_VIDEO_TVBUTTON 40338 // we hook this =)
  18. #define WINAMP_LIGHTNING_CLICK 40339 // this three
  19. #define WINAMP_NEXT_WINDOW 40063
  20. #define WINAMP_SHOWLIBRARY 40379
  21. #define WINAMP_CLOSELIBRARY 40380
  22. #define CSTR_INVARIANT MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT)
  23. #define MSGRESULT(__hwnd, __result) { SetWindowLongPtrW((__hwnd), DWLP_MSGRESULT, ((LONGX86)(LONG_PTR)(__result))); return TRUE; }
  24. #ifndef LONGX86
  25. #ifdef _WIN64
  26. #define LONGX86 LONG_PTR
  27. #else /*_WIN64*/
  28. #define LONGX86 LONG
  29. #endif /*_WIN64*/
  30. #endif // LONGX86
  31. BOOL FlickerFixWindow(HWND hwnd, INT mode);
  32. extern "C" winampGeneralPurposePlugin plugin;
  33. extern "C" int getFileInfo(const char *filename, const char *metadata, char *dest, int len);
  34. extern LARGE_INTEGER freq;
  35. extern int profile;
  36. extern HCURSOR hDragNDropCursor;
  37. extern wchar_t WINAMP_INI[MAX_PATH], WINAMP_INI_DIR[MAX_PATH];
  38. extern wchar_t pluginPath[];
  39. extern C_Config *g_config;
  40. extern HMENU g_context_menus;
  41. extern HWND g_PEWindow, g_hwnd, prefsWnd;
  42. extern int g_safeMode, sneak;
  43. extern int config_use_ff_scrollbars;
  44. extern int config_use_alternate_colors;
  45. extern C_Config *g_view_metaconf;
  46. void main_playItemRecordList (itemRecordList *obj, int enqueue, int startplaying=1);
  47. void main_playItemRecordListW(itemRecordListW *obj, int enqueue, int startplaying=1);
  48. int handleDragDropMove(HWND hwndDlg, int type, POINT p, int do_cursors);
  49. void MLVisibleChanged(BOOL fVisible);
  50. INT MediaLibrary_TrackPopupEx(HMENU hMenu, UINT fuFlags, INT x, INT y, HWND hwnd, LPTPMPARAMS lptpm, HMLIMGLST hmlil,
  51. INT width, UINT skinStyle, MENUCUSTOMIZEPROC customProc, ULONG_PTR customParam);
  52. INT MediaLibrary_TrackPopup(HMENU hMenu, UINT fuFlags, INT x, INT y, HWND hwnd);
  53. HANDLE MediaLibrary_InitSkinnedPopupHook(HWND hwnd, HMLIMGLST hmlil, INT width, UINT skinStyle,
  54. MENUCUSTOMIZEPROC customProc, ULONG_PTR customParam);
  55. BOOL
  56. MediaLibrary_OpenUrl(HWND ownerWindow, const wchar_t *url, BOOL forceExternal);
  57. BOOL
  58. MediaLibrary_OpenHelpUrl(const wchar_t *helpUrl);
  59. /*
  60. //gracenote.cpp
  61. void gracenoteInit();
  62. int gracenoteQueryFile(const char *filename);
  63. void gracenoteCancelRequest();
  64. int gracenoteDoTimerStuff();
  65. void gracenoteSetValues(char *artist, char *album, char *title);
  66. char *gracenoteGetTuid();
  67. int gracenoteIsWorking();
  68. */
  69. //listheader.cpp
  70. INT_PTR handleListViewHeaderMsgs(HWND hwndDlg,
  71. HWND headerWnd,
  72. HWND listWnd,
  73. UINT uMsg,
  74. WPARAM wParam,
  75. LPARAM lParam,
  76. BOOL sortShow,
  77. BOOL sortAscending,
  78. int sortIndex);
  79. INT_PTR handleListViewHeaderPaintMsgs(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
  80. //plugin.cpp
  81. void loadMlPlugins();
  82. void unloadMlPlugins();
  83. INT_PTR pluginHandleIpcMessage(HWND hwndML, int msg, INT_PTR param);
  84. INT_PTR plugin_SendMessage(int message_type, INT_PTR param1, INT_PTR param2, INT_PTR param3);
  85. INT_PTR CALLBACK PluginsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam,LPARAM lParam);
  86. //prefs.cpp
  87. INT_PTR CALLBACK PrefsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam,LPARAM lParam);
  88. void refreshPrefs(INT_PTR screen);
  89. void openPrefs(INT_PTR screen); //-1 for default
  90. void FixAmps(char *str, size_t len);
  91. LPWSTR FixAmpsW(LPWSTR pszText, INT cchMaxText);
  92. //view_devices.cpp
  93. INT_PTR CALLBACK view_devicesDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam,LPARAM lParam);
  94. // webinfo_dlg
  95. HWND CreateWebInfoWindow(HWND hwndParent, UINT uMsgQuery, INT x, INT y, INT cx, INT cy, INT ctrlId);
  96. extern int winampVersion;
  97. void toggleVisible(int closecb = 0);
  98. bool IsVisible();
  99. void myOpenURLWithFallback(HWND hwnd, wchar_t *loc, wchar_t *fallbackLoc);
  100. bool IsVista();
  101. void SkinnedScrollWnd_Init();
  102. void SkinnedScrollWnd_Quit();
  103. class ifc_configitem;
  104. extern ifc_configitem *ieDisableSEH;
  105. #endif