menufucker.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #ifndef _NULLSOFT_GEN_ML_MENUFUCKER_H_
  2. #define _NULLSOFT_GEN_ML_MENUFUCKER_H_
  3. #include "ml.h"
  4. #include "../playlist/ifc_playlist.h"
  5. /*
  6. there are two IPC messages, both sent to your ml plugins messageproc. Get the message IDs by doing:
  7. ML_IPC_MENUFUCKER_BUILD = SendMessage(plugin.hwndWinampParent, WM_WA_IPC, (WPARAM)&"menufucker_build", IPC_REGISTER_WINAMP_IPCMESSAGE);
  8. ML_IPC_MENUFUCKER_RESULT = SendMessage(plugin.hwndWinampParent, WM_WA_IPC, (WPARAM)&"menufucker_result", IPC_REGISTER_WINAMP_IPCMESSAGE);
  9. ML_IPC_MENUFUCKER_BUILD:
  10. This is sent just before the menu is shown. param1 is a pointer to a menufucker_t struct.
  11. Do what you like to the menu, if you add anything, give it the id nextidx, and increment nextidx
  12. ML_IPC_MENUFUCKER_RESULT:
  13. param1 is a pointer to a menufucker_t struct, param2 is the id of the menu item selected
  14. */
  15. #define MENU_MEDIAVIEW 0
  16. #define MENU_MLPLAYLIST 1
  17. #define MENU_PLAYLIST 2
  18. #define MENU_SONGTICKER 3
  19. typedef struct {
  20. size_t size;
  21. int type;
  22. HMENU menu;
  23. int nextidx;
  24. int maxidx;
  25. union {
  26. struct {
  27. HWND list;
  28. itemRecordListW *items;
  29. } mediaview; // valid if type==MENU_MEDIAVIEW
  30. struct {
  31. HWND list;
  32. ifc_playlist * pl;
  33. } mlplaylist; // valid if type==MENU_MLPLAYLIST
  34. } extinf;
  35. } menufucker_t;
  36. #endif // _NULLSOFT_GEN_ML_MENUFUCKER_H_