1
0

windowsTheme.h 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. #ifndef NULLOSFT_WINAMP_WINDOWTHEME_HEADER
  2. #define NULLOSFT_WINAMP_WINDOWTHEME_HEADER
  3. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  4. #pragma once
  5. #endif
  6. #include <wtypes.h>
  7. #define E_WINTHEME_NOTLOADED MAKE_HRESULT(0, FACILITY_ITF, 0x0201) // library not loaded
  8. #define E_WINTHEME_LOADFAILED MAKE_HRESULT(1, FACILITY_ITF, 0x0202) // library load failed
  9. #define E_WINTHEME_BADFUNCTION MAKE_HRESULT(1, FACILITY_ITF, 0x0203) // function was not loaded
  10. //---------------------------------------------------------------------------
  11. // NOTE: PartId's and StateId's used in the theme API are defined in the
  12. // hdr file <tmschema.h> using the TM_PART and TM_STATE macros. For
  13. // example, "TM_PART(BP, PUSHBUTTON)" defines the PartId "BP_PUSHBUTTON".
  14. // UxTheme
  15. typedef HANDLE UXTHEME;
  16. typedef enum UXTHEMESIZE
  17. {
  18. TS_MIN, // minimum size
  19. TS_TRUE, // size without stretching
  20. TS_DRAW, // size that theme mgr will use to draw part
  21. };
  22. #ifndef ETDT_ENABLE
  23. #define ETDT_DISABLE 0x00000001
  24. #define ETDT_ENABLE 0x00000002
  25. #define ETDT_USETABTEXTURE 0x00000004
  26. #define ETDT_USEAEROWIZARDTABTEXTURE 0x00000008
  27. #define ETDT_ENABLETAB (ETDT_ENABLE | ETDT_USETABTEXTURE)
  28. #define ETDT_ENABLEAEROWIZARDTAB (ETDT_ENABLE | ETDT_USEAEROWIZARDTABTEXTURE)
  29. #define ETDT_VALIDBITS (ETDT_DISABLE | ETDT_ENABLE | ETDT_USETABTEXTURE | ETDT_USEAEROWIZARDTABTEXTURE)
  30. #endif //ETDT_ENABLE
  31. HRESULT STDAPICALLTYPE UxTheme_LoadLibrary(void);
  32. HRESULT STDAPICALLTYPE UxTheme_GetLoadResult(void);
  33. HRESULT STDAPICALLTYPE UxTheme_IsThemeActive(void);
  34. UXTHEME STDAPICALLTYPE UxOpenThemeData(HWND hwnd, LPCWSTR pszClassList);
  35. HRESULT STDAPICALLTYPE UxCloseThemeData(UXTHEME hTheme);
  36. HRESULT STDAPICALLTYPE UxDrawThemeBackground(UXTHEME hTheme, HDC hdc, int iPartId, int iStateId,
  37. const RECT *pRect, OPTIONAL const RECT *pClipRect);
  38. HRESULT STDAPICALLTYPE UxDrawThemeParentBackground(HWND hwnd, HDC hdc, const RECT *prc);
  39. HRESULT STDAPICALLTYPE UxDrawThemeParentBackgroundEx(HWND hwnd, HDC hdc, DWORD dwFlags, const RECT *prc);
  40. HRESULT STDAPICALLTYPE UxDrawThemeText(UXTHEME hTheme, HDC hdc, int iPartId, int iStateId, LPCWSTR pszText,
  41. int iCharCount, DWORD dwTextFlags, DWORD dwTextFlags2, const RECT *pRect);
  42. COLORREF STDAPICALLTYPE UxGetThemeSysColor(UXTHEME hTheme, int iColorID);
  43. HRESULT STDAPICALLTYPE UxGetThemeColor(UXTHEME hTheme, int iPartId, int iStateId, int iPropId, COLORREF *pColor);
  44. HRESULT STDAPICALLTYPE UxGetThemeInt(UXTHEME hTheme, int iPartId, int iStateId, int iPropId, int *piVal);
  45. HRESULT STDAPICALLTYPE UxGetThemeMetric(UXTHEME hTheme, HDC hdc, int iPartId, int iStateId, int iPropId, int *piVal);
  46. HRESULT STDAPICALLTYPE UxGetThemePartSize(UXTHEME hTheme, HDC hdc, int iPartId, int iStateId, LPCRECT prc, UXTHEMESIZE eSize, SIZE *psz);
  47. HRESULT STDAPICALLTYPE UxGetThemeBackgroundContentRect(UXTHEME hTheme, HDC hdc, int iPartId, int iStateId, LPCRECT pBoundingRect, LPRECT pContentRect);
  48. HRESULT STDAPICALLTYPE UxSetWindowTheme(HWND hwnd, LPCWSTR pszSubAppName, LPCWSTR pszSubIdList);
  49. BOOL STDAPICALLTYPE UxIsAppThemed(void);
  50. BOOL STDAPICALLTYPE UxIsThemeActive(void);
  51. BOOL STDAPICALLTYPE UxIsThemeBackgroundPartiallyTransparent(UXTHEME hTheme, int iPartId, int iStateId);
  52. HRESULT STDAPICALLTYPE UxEnableThemeDialogTexture(HWND hwnd, DWORD dwFlags);
  53. #endif //NULLOSFT_WINAMP_WINDOWTHEME_HEADER