ifc_winamphook.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. #ifndef NULLSOFT_WINAMP_HOOK_INTERFACE_HEADER
  2. #define NULLSOFT_WINAMP_HOOK_INTERFACE_HEADER
  3. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  4. #pragma once
  5. #endif
  6. // {EB225B60-14C1-424f-B8EA-A8EDE3AD82A9}
  7. static const GUID IFC_WinampHook =
  8. { 0xeb225b60, 0x14c1, 0x424f, { 0xb8, 0xea, 0xa8, 0xed, 0xe3, 0xad, 0x82, 0xa9 } };
  9. #include <bfc/dispatch.h>
  10. class __declspec(novtable) ifc_winamphook: public Dispatchable
  11. {
  12. protected:
  13. ifc_winamphook() {}
  14. ~ifc_winamphook() {}
  15. public:
  16. HRESULT IsQuitAllowed(void); // return S_FALSE to block
  17. HRESULT ResetFont(void);
  18. HRESULT SkinChanging(void);
  19. HRESULT SkinChanged(const wchar_t *skinName);
  20. HRESULT FileMetaChange(const wchar_t *fileName);
  21. HRESULT SysColorChange(void);
  22. HRESULT SkinColorChange(const wchar_t *colorTheme);
  23. public:
  24. DISPATCH_CODES
  25. {
  26. API_ISQUITALLOWED = 10,
  27. API_RESETFONT = 20,
  28. API_SKINCHANGING = 30,
  29. API_SKINCHANGED = 40,
  30. API_FILEMETACHANGE = 50,
  31. API_SYSCOLORCHANGE = 60,
  32. API_SKINCOLORCHANGE = 70
  33. };
  34. };
  35. inline HRESULT ifc_winamphook::IsQuitAllowed(void)
  36. {
  37. return _call(API_ISQUITALLOWED, (HRESULT)E_NOTIMPL);
  38. }
  39. inline HRESULT ifc_winamphook::ResetFont(void)
  40. {
  41. return _call(API_RESETFONT, (HRESULT)E_NOTIMPL);
  42. }
  43. inline HRESULT ifc_winamphook::SkinChanging(void)
  44. {
  45. return _call(API_SKINCHANGING, (HRESULT)E_NOTIMPL);
  46. }
  47. inline HRESULT ifc_winamphook::SkinChanged(const wchar_t *skinName)
  48. {
  49. return _call(API_SKINCHANGED, (HRESULT)E_NOTIMPL, skinName);
  50. }
  51. inline HRESULT ifc_winamphook::FileMetaChange(const wchar_t *fileName)
  52. {
  53. return _call(API_FILEMETACHANGE, (HRESULT)E_NOTIMPL, fileName);
  54. }
  55. inline HRESULT ifc_winamphook::SysColorChange(void)
  56. {
  57. return _call(API_SYSCOLORCHANGE, (HRESULT)E_NOTIMPL);
  58. }
  59. inline HRESULT ifc_winamphook::SkinColorChange(const wchar_t *colorTheme)
  60. {
  61. return _call(API_SKINCOLORCHANGE, (HRESULT)E_NOTIMPL, colorTheme);
  62. }
  63. #endif // NULLSOFT_WINAMP_HOOK_INTERFACE_HEADER