uxthemep.h 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. /*
  2. * Win32 5.1 theme definitions
  3. *
  4. * Copyright (C) 2003 Kevin Koltzau
  5. *
  6. * Originally written for the Wine project, and issued under
  7. * the wxWindows licence by kind permission of the author.
  8. *
  9. * Licence: wxWindows licence
  10. */
  11. #ifndef __WINE_UXTHEME_H
  12. #define __WINE_UXTHEME_H
  13. #include "wx/msw/wrapcctl.h"
  14. typedef HANDLE HTHEME;
  15. HRESULT WINAPI CloseThemeData(HTHEME hTheme);
  16. HRESULT WINAPI DrawThemeBackground(HTHEME,HDC,int,int,const RECT*,const RECT*);
  17. #define DTBG_CLIPRECT 0x00000001
  18. #define DTBG_DRAWSOLID 0x00000002
  19. #define DTBG_OMITBORDER 0x00000004
  20. #define DTBG_OMITCONTENT 0x00000008
  21. #define DTBG_COMPUTINGREGION 0x00000010
  22. #define DTBG_MIRRORDC 0x00000020
  23. typedef struct _DTBGOPTS {
  24. DWORD dwSize;
  25. DWORD dwFlags;
  26. RECT rcClip;
  27. } DTBGOPTS, *PDTBGOPTS;
  28. HRESULT WINAPI DrawThemeBackgroundEx(HTHEME,HDC,int,int,const RECT*,
  29. const DTBGOPTS*);
  30. HRESULT WINAPI DrawThemeEdge(HTHEME,HDC,int,int,const RECT*,UINT,UINT,
  31. RECT*);
  32. HRESULT WINAPI DrawThemeIcon(HTHEME,HDC,int,int,const RECT*,HIMAGELIST,int);
  33. HRESULT WINAPI DrawThemeParentBackground(HWND,HDC,RECT*);
  34. #define DTT_GRAYED 0x1
  35. HRESULT WINAPI DrawThemeText(HTHEME,HDC,int,int,LPCWSTR,int,DWORD,DWORD,
  36. const RECT*);
  37. #define ETDT_DISABLE 0x00000001
  38. #define ETDT_ENABLE 0x00000002
  39. #define ETDT_USETABTEXTURE 0x00000004
  40. #define ETDT_ENABLETAB (ETDT_ENABLE|ETDT_USETABTEXTURE)
  41. HRESULT WINAPI EnableThemeDialogTexture(HWND,DWORD);
  42. HRESULT WINAPI EnableTheming(BOOL);
  43. HRESULT WINAPI GetCurrentThemeName(LPWSTR,int,LPWSTR,int,LPWSTR,int);
  44. #define STAP_ALLOW_NONCLIENT (1<<0)
  45. #define STAP_ALLOW_CONTROLS (1<<1)
  46. #define STAP_ALLOW_WEBCONTENT (1<<2)
  47. DWORD WINAPI GetThemeAppProperties(void);
  48. HRESULT WINAPI GetThemeBackgroundContentRect(HTHEME,HDC,int,int,
  49. const RECT*,RECT*);
  50. HRESULT WINAPI GetThemeBackgroundExtent(HTHEME,HDC,int,int,const RECT*,RECT*);
  51. HRESULT WINAPI GetThemeBackgroundRegion(HTHEME,HDC,int,int,const RECT*,HRGN*);
  52. HRESULT WINAPI GetThemeBool(HTHEME,int,int,int,BOOL*);
  53. HRESULT WINAPI GetThemeColor(HTHEME,int,int,int,COLORREF*);
  54. #if defined(__GNUC__)
  55. # define SZ_THDOCPROP_DISPLAYNAME (const WCHAR []){ 'D','i','s','p','l','a','y','N','a','m','e',0 }
  56. # define SZ_THDOCPROP_CANONICALNAME (const WCHAR []){ 'T','h','e','m','e','N','a','m','e',0 }
  57. # define SZ_THDOCPROP_TOOLTIP (const WCHAR []){ 'T','o','o','l','T','i','p',0 }
  58. # define SZ_THDOCPROP_AUTHOR (const WCHAR []){ 'a','u','t','h','o','r',0 }
  59. #else /* lif defined(_MSC_VER) */
  60. # define SZ_THDOCPROP_DISPLAYNAME L"DisplayName"
  61. # define SZ_THDOCPROP_CANONICALNAME L"ThemeName"
  62. # define SZ_THDOCPROP_TOOLTIP L"ToolTip"
  63. # define SZ_THDOCPROP_AUTHOR L"author"
  64. /*
  65. #else
  66. static const WCHAR SZ_THDOCPROP_DISPLAYNAME[] = { 'D','i','s','p','l','a','y','N','a','m','e',0 };
  67. static const WCHAR SZ_THDOCPROP_CANONICALNAME[] = { 'T','h','e','m','e','N','a','m','e',0 };
  68. static const WCHAR SZ_THDOCPROP_TOOLTIP[] = { 'T','o','o','l','T','i','p',0 };
  69. static const WCHAR SZ_THDOCPROP_AUTHOR[] = { 'a','u','t','h','o','r',0 };
  70. */
  71. #endif
  72. HRESULT WINAPI GetThemeDocumentationProperty(LPCWSTR,LPCWSTR,LPWSTR,int);
  73. HRESULT WINAPI GetThemeEnumValue(HTHEME,int,int,int,int*);
  74. HRESULT WINAPI GetThemeFilename(HTHEME,int,int,int,LPWSTR,int);
  75. HRESULT WINAPI GetThemeFont(HTHEME,HDC,int,int,int,LOGFONTW*);
  76. HRESULT WINAPI GetThemeInt(HTHEME,int,int,int,int*);
  77. #define MAX_INTLIST_COUNT 10
  78. typedef struct _INTLIST {
  79. int iValueCount;
  80. int iValues[MAX_INTLIST_COUNT];
  81. } INTLIST, *PINTLIST;
  82. HRESULT WINAPI GetThemeIntList(HTHEME,int,int,int,INTLIST*);
  83. typedef struct _MARGINS {
  84. int cxLeftWidth;
  85. int cxRightWidth;
  86. int cyTopHeight;
  87. int cyBottomHeight;
  88. } MARGINS, *PMARGINS;
  89. HRESULT WINAPI GetThemeMargins(HTHEME,HDC,int,int,int,RECT*,MARGINS*);
  90. HRESULT WINAPI GetThemeMetric(HTHEME,HDC,int,int,int,int*);
  91. typedef enum {
  92. TS_MIN,
  93. TS_TRUE,
  94. TS_DRAW
  95. } THEMESIZE;
  96. HRESULT WINAPI GetThemePartSize(HTHEME,HDC,int,int,RECT*,THEMESIZE,SIZE*);
  97. HRESULT WINAPI GetThemePosition(HTHEME,int,int,int,POINT*);
  98. typedef enum {
  99. PO_STATE,
  100. PO_PART,
  101. PO_CLASS,
  102. PO_GLOBAL,
  103. PO_NOTFOUND
  104. } PROPERTYORIGIN;
  105. HRESULT WINAPI GetThemePropertyOrigin(HTHEME,int,int,int,PROPERTYORIGIN*);
  106. HRESULT WINAPI GetThemeRect(HTHEME,int,int,int,RECT*);
  107. HRESULT WINAPI GetThemeString(HTHEME,int,int,int,LPWSTR,int);
  108. BOOL WINAPI GetThemeSysBool(HTHEME,int);
  109. COLORREF WINAPI GetThemeSysColor(HTHEME,int);
  110. HBRUSH WINAPI GetThemeSysColorBrush(HTHEME,int);
  111. HRESULT WINAPI GetThemeSysFont(HTHEME,int,LOGFONTW*);
  112. HRESULT WINAPI GetThemeSysInt(HTHEME,int,int*);
  113. int WINAPI GetThemeSysSize(HTHEME,int);
  114. HRESULT WINAPI GetThemeSysString(HTHEME,int,LPWSTR,int);
  115. HRESULT WINAPI GetThemeTextExtent(HTHEME,HDC,int,int,LPCWSTR,int,DWORD,
  116. const RECT*,RECT*);
  117. HRESULT WINAPI GetThemeTextMetrics(HTHEME,HDC,int,int,TEXTMETRICW*);
  118. HTHEME WINAPI GetWindowTheme(HWND);
  119. #define HTTB_BACKGROUNDSEG 0x0000
  120. #define HTTB_FIXEDBORDER 0x0002
  121. #define HTTB_CAPTION 0x0004
  122. #define HTTB_RESIZINGBORDER_LEFT 0x0010
  123. #define HTTB_RESIZINGBORDER_TOP 0x0020
  124. #define HTTB_RESIZINGBORDER_RIGHT 0x0040
  125. #define HTTB_RESIZINGBORDER_BOTTOM 0x0080
  126. #define HTTB_RESIZINGBORDER \
  127. (HTTB_RESIZINGBORDER_LEFT|HTTB_RESIZINGBORDER_TOP|\
  128. HTTB_RESIZINGBORDER_RIGHT|HTTB_RESIZINGBORDER_BOTTOM)
  129. #define HTTB_SIZINGTEMPLATE 0x0100
  130. #define HTTB_SYSTEMSIZINGMARGINS 0x0200
  131. HRESULT WINAPI HitTestThemeBackground(HTHEME,HDC,int,int,DWORD,const RECT*,
  132. HRGN,POINT,WORD*);
  133. BOOL WINAPI IsAppThemed(void);
  134. BOOL WINAPI IsThemeActive(void);
  135. BOOL WINAPI IsThemeBackgroundPartiallyTransparent(HTHEME,int,int);
  136. BOOL WINAPI IsThemeDialogTextureEnabled(void);
  137. BOOL WINAPI IsThemePartDefined(HTHEME,int,int);
  138. HTHEME WINAPI OpenThemeData(HWND,LPCWSTR);
  139. void WINAPI SetThemeAppProperties(DWORD);
  140. HRESULT WINAPI SetWindowTheme(HWND,LPCWSTR,LPCWSTR);
  141. #endif