ifc_skinnedmenu.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #ifndef NULLSOFT_WINAMP_SKINNED_MENU_INTERFACE_HEADER
  2. #define NULLSOFT_WINAMP_SKINNED_MENU_INTERFACE_HEADER
  3. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  4. #pragma once
  5. #endif
  6. // {6623F790-D4D9-43f4-9AFD-980360FB0EED}
  7. static const GUID IFC_SkinnedMenu =
  8. { 0x6623f790, 0xd4d9, 0x43f4, { 0x9a, 0xfd, 0x98, 0x3, 0x60, 0xfb, 0xe, 0xed } };
  9. #include <bfc/dispatch.h>
  10. class ifc_menucustomizer;
  11. #define ForceNoSkinnedMenu ((ifc_menucustomizer*)1)
  12. class __declspec(novtable) ifc_skinnedmenu : public Dispatchable
  13. {
  14. protected:
  15. ifc_skinnedmenu() {}
  16. ~ifc_skinnedmenu() {}
  17. public:
  18. BOOL TrackPopup(HMENU hMenu, UINT fuFlags, INT x, INT y, HWND hwnd, LPTPMPARAMS lptpm, ifc_menucustomizer *customizer);
  19. HRESULT IsEnabled(void);
  20. HANDLE InitPopupHook(HWND hwnd, ifc_menucustomizer *customizer);
  21. HRESULT RemovePopupHook(HANDLE popupHook);
  22. public:
  23. DISPATCH_CODES
  24. {
  25. API_TRACKPOPUP = 10,
  26. API_ISENABLED = 20,
  27. API_INITPOPUPHOOK = 30,
  28. API_REMOVEPOPUPHOOK = 40,
  29. };
  30. };
  31. inline BOOL ifc_skinnedmenu::TrackPopup(HMENU hMenu, UINT fuFlags, INT x, INT y, HWND hwnd, LPTPMPARAMS lptpm, ifc_menucustomizer *customizer)
  32. {
  33. return _call(API_TRACKPOPUP, (BOOL)FALSE, hMenu, fuFlags, x, y, hwnd, lptpm, customizer);
  34. }
  35. inline HRESULT ifc_skinnedmenu::IsEnabled(void)
  36. {
  37. return _call(API_ISENABLED, (BOOL)FALSE);
  38. }
  39. inline HANDLE ifc_skinnedmenu::InitPopupHook(HWND hwnd, ifc_menucustomizer *customizer)
  40. {
  41. return _call(API_INITPOPUPHOOK, (HANDLE)NULL, hwnd, customizer);
  42. }
  43. inline HRESULT ifc_skinnedmenu::RemovePopupHook(HANDLE popupHook)
  44. {
  45. return _call(API_REMOVEPOPUPHOOK, (HRESULT)E_NOTIMPL, popupHook);
  46. }
  47. #endif // NULLSOFT_WINAMP_SKINNED_MENU_INTERFACE_HEADER