ReactOS  0.4.13-dev-247-g0f29b3f
uxtheme.h
Go to the documentation of this file.
1 #ifndef _UXTHEME_H
2 #define _UXTHEME_H
3 
4 #include <commctrl.h>
5 
6 #ifdef __cplusplus
7 extern "C" {
8 #endif
9 
10 #if (_WIN32_WINNT >= 0x0501)
11 #define DTBG_CLIPRECT 0x00000001
12 #define DTBG_DRAWSOLID 0x00000002
13 #define DTBG_OMITBORDER 0x00000004
14 #define DTBG_OMITCONTENT 0x00000008
15 #define DTBG_COMPUTINGREGION 0x00000010
16 #define DTBG_MIRRORDC 0x00000020
17 #define DTT_GRAYED 0x00000001
18 #define ETDT_DISABLE 0x00000001
19 #define ETDT_ENABLE 0x00000002
20 #define ETDT_USETABTEXTURE 0x00000004
21 #define ETDT_ENABLETAB (ETDT_ENABLE | ETDT_USETABTEXTURE)
22 #define STAP_ALLOW_NONCLIENT 0x00000001
23 #define STAP_ALLOW_CONTROLS 0x00000002
24 #define STAP_ALLOW_WEBCONTENT 0x00000004
25 #define HTTB_BACKGROUNDSEG 0x0000
26 #define HTTB_FIXEDBORDER 0x0002
27 #define HTTB_CAPTION 0x0004
28 #define HTTB_RESIZINGBORDER_LEFT 0x0010
29 #define HTTB_RESIZINGBORDER_TOP 0x0020
30 #define HTTB_RESIZINGBORDER_RIGHT 0x0040
31 #define HTTB_RESIZINGBORDER_BOTTOM 0x0080
32 #define HTTB_RESIZINGBORDER (HTTB_RESIZINGBORDER_LEFT|HTTB_RESIZINGBORDER_TOP|HTTB_RESIZINGBORDER_RIGHT|HTTB_RESIZINGBORDER_BOTTOM)
33 #define HTTB_SIZINGTEMPLATE 0x0100
34 #define HTTB_SYSTEMSIZINGMARGINS 0x0200
35 
36 #define OTD_FORCE_RECT_SIZING 0x0001
37 #define OTD_NONCLIENT 0x0002
38 #define OTD_VALIDBITS (OTD_FORCE_RECT_SIZING | OTD_NONCLIENT)
39 
40 typedef HANDLE HPAINTBUFFER;
41 typedef HANDLE HTHEME;
42 
43 typedef enum _BP_BUFFERFORMAT
44 {
46  BPBF_DIB,
47  BPBF_TOPDOWNDIB,
48  BPBF_TOPDOWNMONODIB
50 
51 typedef struct _BP_PAINTPARAMS
52 {
53  DWORD cbSize;
54  DWORD dwFlags;
55  const RECT *prcExclude;
56  const BLENDFUNCTION *pBlendFunction;
57 } BP_PAINTPARAMS, *PBP_PAINTPARAMS;
58 
59 typedef enum PROPERTYORIGIN {
60  PO_STATE = 0,
61  PO_PART = 1,
62  PO_CLASS = 2,
63  PO_GLOBAL = 3,
64  PO_NOTFOUND = 4
65 } PROPERTYORIGIN;
66 
67 typedef enum THEMESIZE {
68  TS_MIN,
69  TS_TRUE,
70  TS_DRAW
71 } THEMESIZE;
72 
73 typedef struct _DTBGOPTS {
74  DWORD dwSize;
75  DWORD dwFlags;
76  RECT rcClip;
77 } DTBGOPTS, *PDTBGOPTS;
78 
79 #define MAX_INTLIST_COUNT 10
80 
81 typedef struct _INTLIST {
82  int iValueCount;
83  int iValues[MAX_INTLIST_COUNT];
84 } INTLIST, *PINTLIST;
85 
86 typedef struct _MARGINS {
87  int cxLeftWidth;
88  int cxRightWidth;
89  int cyTopHeight;
90  int cyBottomHeight;
91 } MARGINS, *PMARGINS;
92 
94 HRESULT WINAPI DrawThemeBackground(HTHEME,HDC,int,int,const RECT*,const RECT*);
95 HRESULT WINAPI DrawThemeBackgroundEx(HTHEME,HDC,int,int,const RECT*,const DTBGOPTS*);
106 HRESULT WINAPI GetThemeBackgroundRegion(HTHEME,HDC,int,int,const RECT*,HRGN*);
107 HRESULT WINAPI GetThemeBool(HTHEME,int,int,int,BOOL*);
110 HRESULT WINAPI GetThemeEnumValue(HTHEME,int,int,int,int*);
111 HRESULT WINAPI GetThemeFilename(HTHEME,int,int,int,LPWSTR,int);
113 HRESULT WINAPI GetThemeInt(HTHEME,int,int,int,int*);
114 HRESULT WINAPI GetThemeIntList(HTHEME,int,int,int,INTLIST*);
116 HRESULT WINAPI GetThemeMetric(HTHEME,HDC,int,int,int,int*);
117 HRESULT WINAPI GetThemePartSize(HTHEME,HDC,int,int,RECT*,THEMESIZE,SIZE*);
119 HRESULT WINAPI GetThemePropertyOrigin(HTHEME,int,int,int,PROPERTYORIGIN*);
120 HRESULT WINAPI GetThemeRect(HTHEME,int,int,int,RECT*);
121 HRESULT WINAPI GetThemeString(HTHEME,int,int,int,LPWSTR,int);
127 int WINAPI GetThemeSysSize(HTHEME,int);
133 BOOL WINAPI IsAppThemed(void);
142 #endif
143 
144 #ifdef __cplusplus
145 }
146 #endif
147 #endif
HRESULT WINAPI GetThemePartSize(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, RECT *prc, THEMESIZE eSize, SIZE *psz)
Definition: draw.c:1777
int WINAPI GetThemeSysSize(HTHEME hTheme, int iSizeID)
Definition: metric.c:154
HRESULT WINAPI DrawThemeBackgroundEx(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, const RECT *pRect, const DTBGOPTS *pOptions)
Definition: draw.c:740
HRESULT WINAPI GetThemePropertyOrigin(HTHEME hTheme, int iPartId, int iStateId, int iPropId, PROPERTYORIGIN *pOrigin)
Definition: property.c:280
HRESULT WINAPI GetThemeBackgroundRegion(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, const RECT *pRect, HRGN *pRegion)
Definition: draw.c:1724
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
static const RECT BP_BUFFERFORMAT
Definition: system.c:30
HRESULT WINAPI GetThemeEnumValue(HTHEME hTheme, int iPartId, int iStateId, int iPropId, int *piVal)
Definition: property.c:63
HRESULT WINAPI DrawThemeEdge(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, const RECT *pDestRect, UINT uEdge, UINT uFlags, RECT *pContentRect)
Definition: draw.c:1342
static HDC
Definition: imagelist.c:92
HRESULT WINAPI GetThemeSysInt(HTHEME hTheme, int iIntID, int *piValue)
Definition: metric.c:134
BOOL WINAPI IsThemePartDefined(HTHEME hTheme, int iPartId, int iStateId)
Definition: system.c:987
HRESULT WINAPI GetThemePosition(HTHEME hTheme, int iPartId, int iStateId, int iPropId, POINT *pPoint)
Definition: property.c:162
DWORD WINAPI GetThemeAppProperties(void)
Definition: system.c:933
static HTHEME(WINAPI *pOpenThemeDataEx)(HWND
HRESULT WINAPI GetThemeTextExtent(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, LPCWSTR pszText, int iCharCount, DWORD dwTextFlags, const RECT *pBoundingRect, RECT *pExtentRect)
Definition: draw.c:1809
HRESULT WINAPI GetThemeBool(HTHEME hTheme, int iPartId, int iStateId, int iPropId, BOOL *pfVal)
Definition: property.c:26
HRESULT WINAPI GetThemeFilename(HTHEME hTheme, int iPartId, int iStateId, int iPropId, LPWSTR pszThemeFilename, int cchMaxBuffChars)
Definition: property.c:89
static HPAINTBUFFER(WINAPI *pBeginBufferedPaint)(HDC
HRESULT WINAPI GetThemeFont(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, int iPropId, LOGFONTW *pFont)
Definition: property.c:108
BOOL WINAPI IsThemeDialogTextureEnabled(HWND hwnd)
Definition: draw.c:56
HRESULT WINAPI GetThemeDocumentationProperty(LPCWSTR pszThemeName, LPCWSTR pszPropertyName, LPWSTR pszValueBuff, int cchMaxValChars)
Definition: system.c:1010
HRESULT WINAPI HitTestThemeBackground(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, DWORD dwOptions, const RECT *pRect, HRGN hrgn, POINT ptTest, WORD *pwHitTestCode)
Definition: system.c:973
HRESULT WINAPI GetThemeString(HTHEME hTheme, int iPartId, int iStateId, int iPropId, LPWSTR pszBuff, int cchMaxBuffChars)
Definition: property.c:198
HRESULT WINAPI DrawThemeBackground(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, const RECT *pRect, const RECT *pClipRect)
Definition: draw.c:128
HRESULT WINAPI EnableTheming(BOOL fEnable)
Definition: system.c:642
Definition: misc.c:279
BOOL WINAPI IsThemeBackgroundPartiallyTransparent(HTHEME hTheme, int iPartId, int iStateId)
Definition: draw.c:1883
HBRUSH WINAPI GetThemeSysColorBrush(HTHEME hTheme, int iColorID)
Definition: metric.c:82
HRESULT WINAPI DrawThemeIcon(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, const RECT *pRect, HIMAGELIST himl, int iImageIndex)
Definition: draw.c:1362
unsigned int BOOL
Definition: ntddk_ex.h:94
HRESULT WINAPI GetThemeSysFont(HTHEME hTheme, int iFontID, LOGFONTW *plf)
Definition: metric.c:91
BOOL WINAPI IsAppThemed(void)
Definition: system.c:596
struct _MARGINS MARGINS
int cyBottomHeight
Definition: misc.c:283
void WINAPI SetThemeAppProperties(DWORD dwFlags)
Definition: system.c:941
HRESULT WINAPI SetWindowTheme(_In_ HWND hwnd, _In_ LPCWSTR pszSubAppName, _In_ LPCWSTR pszSubIdList)
Definition: uxthemesupp.c:69
HRESULT WINAPI GetThemeTextMetrics(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, TEXTMETRICW *ptm)
Definition: draw.c:1849
HRESULT WINAPI GetThemeBackgroundExtent(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, const RECT *pContentRect, RECT *pExtentRect)
Definition: draw.c:1528
HRESULT WINAPI DrawThemeParentBackground(HWND hwnd, HDC hdc, RECT *prc)
Definition: draw.c:72
int cyTopHeight
Definition: misc.c:282
LONG HRESULT
Definition: typedefs.h:77
HTHEME WINAPI OpenThemeDataEx(HWND hwnd, LPCWSTR pszClassList, DWORD flags)
Definition: system.c:819
DWORD COLORREF
Definition: windef.h:285
HRESULT WINAPI EnableThemeDialogTexture(_In_ HWND hwnd, _In_ DWORD dwFlags)
Definition: uxthemesupp.c:55
int cxLeftWidth
Definition: misc.c:280
#define WINAPI
Definition: msvc.h:8
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned long DWORD
Definition: ntddk_ex.h:95
HTHEME WINAPI OpenThemeData(HWND hwnd, LPCWSTR classlist)
Definition: system.c:835
HRESULT WINAPI GetThemeMetric(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, int iPropId, int *piVal)
Definition: property.c:236
HTHEME WINAPI GetWindowTheme(HWND hwnd)
Definition: system.c:851
COLORREF WINAPI GetThemeSysColor(HTHEME hTheme, int iColorID)
Definition: metric.c:58
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
HRESULT WINAPI GetThemeColor(HTHEME hTheme, int iPartId, int iStateId, int iPropId, COLORREF *pColor)
Definition: property.c:45
HRESULT WINAPI GetThemeMargins(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, int iPropId, RECT *prc, MARGINS *pMargins)
Definition: property.c:216
HRESULT WINAPI GetCurrentThemeName(LPWSTR pszThemeFileName, int dwMaxNameChars, LPWSTR pszColorBuff, int cchMaxColorChars, LPWSTR pszSizeBuff, int cchMaxSizeChars)
Definition: system.c:894
unsigned int UINT
Definition: ndis.h:50
HRESULT WINAPI GetThemeBackgroundContentRect(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, const RECT *pBoundingRect, RECT *pContentRect)
Definition: draw.c:1479
HRESULT WINAPI GetThemeRect(HTHEME hTheme, int iPartId, int iStateId, int iPropId, RECT *pRect)
Definition: property.c:180
BOOL WINAPI IsThemeActive(void)
Definition: system.c:606
HRESULT WINAPI GetThemeSysString(HTHEME hTheme, int iStringID, LPWSTR pszStringBuff, int cchMaxStringChars)
Definition: metric.c:205
#define BPBF_COMPATIBLEBITMAP
Definition: treelist.c:133
struct _MARGINS * PMARGINS
int cxRightWidth
Definition: misc.c:281
HRESULT WINAPI GetThemeIntList(HTHEME hTheme, int iPartId, int iStateId, int iPropId, INTLIST *pIntList)
Definition: property.c:144
WCHAR * LPWSTR
Definition: xmlstorage.h:184
BOOL WINAPI GetThemeSysBool(HTHEME hTheme, int iBoolID)
Definition: metric.c:26
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
Definition: env.c:54
HRESULT WINAPI CloseThemeData(HTHEME hTheme)
Definition: system.c:950
HRESULT WINAPI GetThemeInt(HTHEME hTheme, int iPartId, int iStateId, int iPropId, int *piVal)
Definition: property.c:126
HRESULT WINAPI DrawThemeText(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, LPCWSTR pszText, int iCharCount, DWORD dwTextFlags, DWORD dwTextFlags2, const RECT *pRect)
Definition: draw.c:1377