wa_hotkeys.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #ifndef WA_HOTKEYS
  2. #define WA_HOTKEYS
  3. //#define IPC_GEN_HOTKEYS_ADD xxxx //pass a genHotkeysAddStruct * struct in data
  4. //
  5. //To get the IPC_GEN_HOTKEYS_ADD IPC number, do this:
  6. //
  7. // genhotkeys_add_ipc=SendMessage(winampWindow,WM_WA_IPC,(WPARAM)&"GenHotkeysAdd",IPC_REGISTER_WINAMP_IPCMESSAGE);
  8. //
  9. //Then you can use:
  10. //
  11. // PostMessage(winampWindow,WM_WA_IPC,(WPARAM)&myGenHotkeysAddStruct,genhotkeys_add_ipc);
  12. //
  13. //flags for the genHotkeysAddStruct struct
  14. #define HKF_BRING_TO_FRONT 0x1 // calls SetForegroundWindow before sending the message
  15. #define HKF_HWND_WPARAM 0x2 // sets wParam with Winamp's window handle
  16. #define HKF_COPY 0x4 // copies returned text to the clipboard
  17. #define HKF_PLPOS_WPARAM 0x8 // sets wParam with current pledit position
  18. #define HKF_ISPLAYING_WL 0x10 // sets wParam to genHotkeysAddStruct's wParam if playing, lParam if not
  19. // uses IPC_ISPLAYING to check if playing
  20. #define HKF_SHOWHIDE 0x20 // brings Winamp to front or minimizes Winamp if already at front
  21. #define HKF_NOSENDMSG 0x40 // don't send any message to the winamp window
  22. #define HKF_DISABLED 0x80000000
  23. typedef struct {
  24. char *name; //name that will appear in the Global Hotkeys preferences panel
  25. DWORD flags; //one or more flags from above
  26. UINT uMsg; //message that will be sent to winamp's main window (must always be !=NULL)
  27. WPARAM wParam; //wParam that will be sent to winamp's main window
  28. LPARAM lParam; //lParam that will be sent to winamp's main window
  29. char *id; //unique string to identify this command - case insensitive
  30. HWND wnd; //set the HWND to send message (or 0 for main winamp window)
  31. int extended[6]; //for future extension - always set to zero!
  32. } genHotkeysAddStruct;
  33. #endif