1
0

ifc_skinhelper.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. #ifndef NULLSOFT_WINAMP_SKIN_HELPER_INTERFACE_HEADER
  2. #define NULLSOFT_WINAMP_SKIN_HELPER_INTERFACE_HEADER
  3. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  4. #pragma once
  5. #endif
  6. // {DC98C56E-F649-469e-82DC-234FAA8083C1}
  7. static const GUID IFC_SkinHelper =
  8. { 0xdc98c56e, 0xf649, 0x469e, { 0x82, 0xdc, 0x23, 0x4f, 0xaa, 0x80, 0x83, 0xc1 } };
  9. #include <bfc/dispatch.h>
  10. typedef struct embedWindowState embedWindowState;
  11. typedef int (CALLBACK *FFCALLBACK)(embedWindowState* /*windowState*/, INT /*eventId*/, LPARAM /*param*/);
  12. class __declspec(novtable) ifc_skinhelper : public Dispatchable
  13. {
  14. protected:
  15. ifc_skinhelper() {}
  16. ~ifc_skinhelper() {}
  17. public:
  18. HRESULT GetColor(UINT colorIndex, COLORREF *pColor);
  19. HRESULT GetColorEx(UINT uObject, UINT uPart, UINT uState, COLORREF *pColor);
  20. HRESULT GetBrush(UINT colorIndex, HBRUSH *pBrush);
  21. HFONT GetFont(void);
  22. HRESULT SkinWindow(HWND hwnd, const GUID *windowGuid, UINT flagsEx, FFCALLBACK callbackFF);
  23. HRESULT SkinControl(HWND hwnd, UINT type, UINT style);
  24. HRESULT UnskinWindow(HWND hwnd);
  25. HRESULT GetHostCss(OLECHAR **ppchHostCss);
  26. public:
  27. DISPATCH_CODES
  28. {
  29. API_GETCOLOR = 10,
  30. API_GETCOLOREX = 20,
  31. API_GETBRUSH = 30,
  32. API_GETFONT = 40,
  33. API_SKINWINDOW = 50,
  34. API_SKINCONTROL = 60,
  35. API_UNSKINWINDOW = 70,
  36. };
  37. };
  38. inline HRESULT ifc_skinhelper::GetColor(UINT colorIndex, COLORREF *pColor)
  39. {
  40. return _call(API_GETCOLOR, (HRESULT)E_NOTIMPL, colorIndex, pColor);
  41. }
  42. inline HRESULT ifc_skinhelper::GetColorEx(UINT uObject, UINT uPart, UINT uState, COLORREF *pColor)
  43. {
  44. return _call(API_GETCOLOREX, (HRESULT)E_NOTIMPL, uObject, uPart, uState, pColor);
  45. }
  46. inline HRESULT ifc_skinhelper::GetBrush(UINT colorIndex, HBRUSH *pBrush)
  47. {
  48. return _call(API_GETBRUSH, (HRESULT)E_NOTIMPL, colorIndex, pBrush);
  49. }
  50. inline HFONT ifc_skinhelper::GetFont()
  51. {
  52. return _call(API_GETFONT, (HFONT)NULL);
  53. }
  54. inline HRESULT ifc_skinhelper::SkinWindow(HWND hwnd, const GUID *windowGuid, UINT flagsEx, FFCALLBACK callbackFF)
  55. {
  56. return _call(API_SKINWINDOW, (HRESULT)E_NOTIMPL, hwnd, windowGuid, flagsEx, callbackFF);
  57. }
  58. inline HRESULT ifc_skinhelper::SkinControl(HWND hwnd, UINT type, UINT style)
  59. {
  60. return _call(API_SKINCONTROL, (HRESULT)E_NOTIMPL, hwnd, type, style);
  61. }
  62. inline HRESULT ifc_skinhelper::UnskinWindow(HWND hwnd)
  63. {
  64. return _call(API_UNSKINWINDOW, (HRESULT)E_NOTIMPL);
  65. }
  66. #endif // NULLSOFT_WINAMP_SKIN_HELPER_INTERFACE_HEADER