ReactOS 0.4.16-dev-1339-gd8bfa93
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
7extern "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// Vista+
19#define DTT_TEXTCOLOR 0x00000001
20#define DTT_BORDERCOLOR 0x00000002
21#define DTT_SHADOWCOLOR 0x00000004
22#define DTT_SHADOWTYPE 0x00000008
23#define DTT_SHADOWOFFSET 0x00000010
24#define DTT_BORDERSIZE 0x00000020
25#define DTT_FONTPROP 0x00000040
26#define DTT_COLORPROP 0x00000080
27#define DTT_STATEID 0x00000100
28#define DTT_CALCRECT 0x00000200
29#define DTT_APPLYOVERLAY 0x00000400
30#define DTT_GLOWSIZE 0x00000800
31#define DTT_CALLBACK 0x00001000
32#define DTT_COMPOSITED 0x00002000
33#define DTT_VALIDBITS 0x00003fff
34
35#define ETDT_DISABLE 0x00000001
36#define ETDT_ENABLE 0x00000002
37#define ETDT_USETABTEXTURE 0x00000004
38#define ETDT_ENABLETAB (ETDT_ENABLE | ETDT_USETABTEXTURE)
39#define STAP_ALLOW_NONCLIENT 0x00000001
40#define STAP_ALLOW_CONTROLS 0x00000002
41#define STAP_ALLOW_WEBCONTENT 0x00000004
42#define HTTB_BACKGROUNDSEG 0x0000
43#define HTTB_FIXEDBORDER 0x0002
44#define HTTB_CAPTION 0x0004
45#define HTTB_RESIZINGBORDER_LEFT 0x0010
46#define HTTB_RESIZINGBORDER_TOP 0x0020
47#define HTTB_RESIZINGBORDER_RIGHT 0x0040
48#define HTTB_RESIZINGBORDER_BOTTOM 0x0080
49#define HTTB_RESIZINGBORDER (HTTB_RESIZINGBORDER_LEFT|HTTB_RESIZINGBORDER_TOP|HTTB_RESIZINGBORDER_RIGHT|HTTB_RESIZINGBORDER_BOTTOM)
50#define HTTB_SIZINGTEMPLATE 0x0100
51#define HTTB_SYSTEMSIZINGMARGINS 0x0200
52
53#define OTD_FORCE_RECT_SIZING 0x0001
54#define OTD_NONCLIENT 0x0002
55#define OTD_VALIDBITS (OTD_FORCE_RECT_SIZING | OTD_NONCLIENT)
56
57typedef HANDLE HPAINTBUFFER;
58typedef HANDLE HTHEME;
59// Vista+
60typedef HANDLE HANIMATIONBUFFER;
61typedef int (WINAPI *DTT_CALLBACK_PROC)(HDC,LPWSTR,int,RECT*,UINT,LPARAM);
62
63typedef enum _BP_BUFFERFORMAT
64{
66 BPBF_DIB,
67 BPBF_TOPDOWNDIB,
68 BPBF_TOPDOWNMONODIB
70
71
72typedef struct _BP_PAINTPARAMS
73{
74 DWORD cbSize;
76 const RECT *prcExclude;
77 const BLENDFUNCTION *pBlendFunction;
78} BP_PAINTPARAMS, *PBP_PAINTPARAMS;
79
80typedef enum PROPERTYORIGIN {
81 PO_STATE = 0,
82 PO_PART = 1,
83 PO_CLASS = 2,
84 PO_GLOBAL = 3,
85 PO_NOTFOUND = 4
86} PROPERTYORIGIN;
87
88typedef enum THEMESIZE {
89 TS_MIN,
90 TS_TRUE,
91 TS_DRAW
92} THEMESIZE;
93
94// Vista+
95
96typedef enum _BP_ANIMATIONSTYLE
97{
98 BPAS_NONE,
99 BPAS_LINEAR,
100 BPAS_CUBIC,
101 BPAS_SINE
102} BP_ANIMATIONSTYLE;
103enum WINDOWTHEMEATTRIBUTETYPE
104{
105 WTA_NONCLIENT = 1
106};
107
108
109typedef struct _DTBGOPTS {
112 RECT rcClip;
113} DTBGOPTS, *PDTBGOPTS;
114
115#define MAX_INTLIST_COUNT 10
116
117typedef struct _INTLIST {
118 int iValueCount;
119 int iValues[MAX_INTLIST_COUNT];
120} INTLIST, *PINTLIST;
121
122typedef struct _MARGINS {
123 int cxLeftWidth;
124 int cxRightWidth;
125 int cyTopHeight;
126 int cyBottomHeight;
127} MARGINS, *PMARGINS;
128
129// Vista+
130typedef struct _DTTOPTS {
133 COLORREF crText;
134 COLORREF crBorder;
135 COLORREF crShadow;
136 int iTextShadowType;
137 POINT ptShadowOffset;
138 int iBorderSize;
139 int iFontPropId;
140 int iColorPropId;
141 int iStateId;
142 BOOL fApplyOverlay;
143 int iGlowSize;
144 DTT_CALLBACK_PROC pfnDrawTextCallback;
146} DTTOPTS, *PDTTOPTS;
147
148typedef struct _BP_ANIMATIONPARAMS
149{
150 DWORD cbSize;
152 BP_ANIMATIONSTYLE style;
153 DWORD dwDuration;
154} BP_ANIMATIONPARAMS, *PBP_ANIMATIONPARAMS;
155
157HRESULT WINAPI DrawThemeBackground(HTHEME,HDC,int,int,const RECT*,const RECT*);
158HRESULT WINAPI DrawThemeBackgroundEx(HTHEME,HDC,int,int,const RECT*,const DTBGOPTS*);
173HRESULT WINAPI GetThemeEnumValue(HTHEME,int,int,int,int*);
176HRESULT WINAPI GetThemeInt(HTHEME,int,int,int,int*);
177HRESULT WINAPI GetThemeIntList(HTHEME,int,int,int,INTLIST*);
179HRESULT WINAPI GetThemeMetric(HTHEME,HDC,int,int,int,int*);
180HRESULT WINAPI GetThemePartSize(HTHEME,HDC,int,int,RECT*,THEMESIZE,SIZE*);
182HRESULT WINAPI GetThemePropertyOrigin(HTHEME,int,int,int,PROPERTYORIGIN*);
184HRESULT WINAPI GetThemeString(HTHEME,int,int,int,LPWSTR,int);
205
206/* Undocumented and not exported in Windows XP/2003
207 * In public headers since Vista+ */
209WINAPI
211 _In_ HTHEME hTheme,
212 _In_ HDC hdc,
213 _In_ int iPartId,
214 _In_ int iStateId,
215 _In_ LPCWSTR pszText,
216 _In_ int iCharCount,
217 _In_ DWORD dwTextFlags,
218 _Inout_ LPRECT pRect,
219 _In_ const DTTOPTS *options
220);
221
222// Vista+
226 BP_PAINTPARAMS *,HDC *);
234HANIMATIONBUFFER WINAPI BeginBufferedAnimation(HWND, HDC, const RECT *,
235 BP_BUFFERFORMAT, BP_PAINTPARAMS *,
236 BP_ANIMATIONPARAMS *, HDC *, HDC *);
239HRESULT WINAPI EndBufferedAnimation(HANIMATIONBUFFER, BOOL);
240#endif
241
242#ifdef __cplusplus
243}
244#endif
245#endif
@ TS_TRUE
Arabic default style
Definition: afstyles.h:94
LPARAM lParam
Definition: combotst.c:139
HDC WINAPI GetBufferedPaintDC(HPAINTBUFFER bufferhandle)
Definition: buffer.c:206
HRESULT WINAPI GetBufferedPaintBits(HPAINTBUFFER bufferhandle, RGBQUAD **bits, int *width)
Definition: buffer.c:185
HRESULT WINAPI EndBufferedAnimation(HANIMATIONBUFFER hbpAnimation, BOOL fUpdateTarget)
Definition: buffer.c:283
HRESULT WINAPI BufferedPaintSetAlpha(HPAINTBUFFER hBufferedPaint, const RECT *prc, BYTE alpha)
Definition: buffer.c:176
HRESULT WINAPI BufferedPaintUnInit(VOID)
Definition: buffer.c:57
HRESULT WINAPI BufferedPaintStopAllAnimations(HWND hwnd)
Definition: buffer.c:273
BOOL WINAPI BufferedPaintRenderAnimation(HWND hwnd, HDC hdcTarget)
Definition: buffer.c:263
HRESULT WINAPI BufferedPaintClear(HPAINTBUFFER hBufferedPaint, const RECT *prc)
Definition: buffer.c:167
HDC WINAPI GetBufferedPaintTargetDC(HPAINTBUFFER bufferhandle)
Definition: buffer.c:218
HRESULT WINAPI GetBufferedPaintTargetRect(HPAINTBUFFER bufferhandle, RECT *rect)
Definition: buffer.c:230
HRESULT WINAPI EndBufferedPaint(HPAINTBUFFER bufferhandle, BOOL update)
Definition: buffer.c:141
HPAINTBUFFER WINAPI BeginBufferedPaint(HDC targetdc, const RECT *rect, BP_BUFFERFORMAT format, BP_PAINTPARAMS *params, HDC *retdc)
Definition: buffer.c:66
HANIMATIONBUFFER WINAPI BeginBufferedAnimation(HWND hwnd, HDC hdcTarget, const RECT *rcTarget, BP_BUFFERFORMAT dwFormat, BP_PAINTPARAMS *pPaintParams, BP_ANIMATIONPARAMS *pAnimationParams, HDC *phdcFrom, HDC *phdcTo)
Definition: buffer.c:249
HRESULT WINAPI BufferedPaintInit(VOID)
Definition: buffer.c:48
HRESULT WINAPI DrawThemeEdge(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, const RECT *pDestRect, UINT uEdge, UINT uFlags, RECT *pContentRect)
Definition: draw.c:1342
BOOL WINAPI IsThemeDialogTextureEnabled(HWND hwnd)
Definition: draw.c:56
HRESULT WINAPI DrawThemeTextEx(_In_ HTHEME hTheme, _In_ HDC hdc, _In_ int iPartId, _In_ int iStateId, _In_ LPCWSTR pszText, _In_ int iCharCount, _In_ DWORD dwTextFlags, _Inout_ LPRECT pRect, _In_ const DTTOPTS *options)
Definition: draw.c:1379
HRESULT WINAPI DrawThemeIcon(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, const RECT *pRect, HIMAGELIST himl, int iImageIndex)
Definition: draw.c:1362
HRESULT WINAPI DrawThemeBackground(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, const RECT *pRect, const RECT *pClipRect)
Definition: draw.c:128
BOOL WINAPI IsThemeBackgroundPartiallyTransparent(HTHEME hTheme, int iPartId, int iStateId)
Definition: draw.c:1927
HRESULT WINAPI GetThemePartSize(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, RECT *prc, THEMESIZE eSize, SIZE *psz)
Definition: draw.c:1821
HRESULT WINAPI GetThemeBackgroundExtent(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, const RECT *pContentRect, RECT *pExtentRect)
Definition: draw.c:1572
HRESULT WINAPI GetThemeBackgroundRegion(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, const RECT *pRect, HRGN *pRegion)
Definition: draw.c:1768
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:1500
HRESULT WINAPI DrawThemeParentBackground(HWND hwnd, HDC hdc, RECT *prc)
Definition: draw.c:72
HRESULT WINAPI GetThemeTextMetrics(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, TEXTMETRICW *ptm)
Definition: draw.c:1893
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:1853
HRESULT WINAPI GetThemeBackgroundContentRect(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, const RECT *pBoundingRect, RECT *pContentRect)
Definition: draw.c:1523
HRESULT WINAPI DrawThemeBackgroundEx(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, const RECT *pRect, const DTBGOPTS *pOptions)
Definition: draw.c:740
COLORREF WINAPI GetThemeSysColor(HTHEME hTheme, int iColorID)
Definition: metric.c:58
HRESULT WINAPI GetThemeSysFont(HTHEME hTheme, int iFontID, LOGFONTW *plf)
Definition: metric.c:91
HBRUSH WINAPI GetThemeSysColorBrush(HTHEME hTheme, int iColorID)
Definition: metric.c:82
HRESULT WINAPI GetThemeSysInt(HTHEME hTheme, int iIntID, int *piValue)
Definition: metric.c:134
HRESULT WINAPI GetThemeSysString(HTHEME hTheme, int iStringID, LPWSTR pszStringBuff, int cchMaxStringChars)
Definition: metric.c:205
int WINAPI GetThemeSysSize(HTHEME hTheme, int iSizeID)
Definition: metric.c:154
BOOL WINAPI GetThemeSysBool(HTHEME hTheme, int iBoolID)
Definition: metric.c:26
HRESULT WINAPI GetThemeMetric(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, int iPropId, int *piVal)
Definition: property.c:236
HRESULT WINAPI GetThemePosition(HTHEME hTheme, int iPartId, int iStateId, int iPropId, POINT *pPoint)
Definition: property.c:162
HRESULT WINAPI GetThemeIntList(HTHEME hTheme, int iPartId, int iStateId, int iPropId, INTLIST *pIntList)
Definition: property.c:144
HRESULT WINAPI GetThemeRect(HTHEME hTheme, int iPartId, int iStateId, int iPropId, RECT *pRect)
Definition: property.c:180
HRESULT WINAPI GetThemeBool(HTHEME hTheme, int iPartId, int iStateId, int iPropId, BOOL *pfVal)
Definition: property.c:26
HRESULT WINAPI GetThemeFont(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, int iPropId, LOGFONTW *pFont)
Definition: property.c:108
HRESULT WINAPI GetThemeInt(HTHEME hTheme, int iPartId, int iStateId, int iPropId, int *piVal)
Definition: property.c:126
HRESULT WINAPI GetThemePropertyOrigin(HTHEME hTheme, int iPartId, int iStateId, int iPropId, PROPERTYORIGIN *pOrigin)
Definition: property.c:280
HRESULT WINAPI GetThemeMargins(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, int iPropId, RECT *prc, MARGINS *pMargins)
Definition: property.c:216
HRESULT WINAPI GetThemeEnumValue(HTHEME hTheme, int iPartId, int iStateId, int iPropId, int *piVal)
Definition: property.c:63
HRESULT WINAPI GetThemeFilename(HTHEME hTheme, int iPartId, int iStateId, int iPropId, LPWSTR pszThemeFilename, int cchMaxBuffChars)
Definition: property.c:89
HRESULT WINAPI GetThemeString(HTHEME hTheme, int iPartId, int iStateId, int iPropId, LPWSTR pszBuff, int cchMaxBuffChars)
Definition: property.c:198
HRESULT WINAPI GetThemeColor(HTHEME hTheme, int iPartId, int iStateId, int iPropId, COLORREF *pColor)
Definition: property.c:45
HRESULT WINAPI GetThemeDocumentationProperty(LPCWSTR pszThemeName, LPCWSTR pszPropertyName, LPWSTR pszValueBuff, int cchMaxValChars)
Definition: system.c:1087
void WINAPI SetThemeAppProperties(DWORD dwFlags)
Definition: system.c:1018
HRESULT WINAPI EnableTheming(BOOL fEnable)
Definition: system.c:688
DWORD WINAPI GetThemeAppProperties(void)
Definition: system.c:1010
HTHEME WINAPI OpenThemeDataEx(HWND hwnd, LPCWSTR pszClassList, DWORD flags)
Definition: system.c:865
HRESULT WINAPI GetCurrentThemeName(LPWSTR pszThemeFileName, int dwMaxNameChars, LPWSTR pszColorBuff, int cchMaxColorChars, LPWSTR pszSizeBuff, int cchMaxSizeChars)
Definition: system.c:971
BOOL WINAPI IsThemePartDefined(HTHEME hTheme, int iPartId, int iStateId)
Definition: system.c:1064
HTHEME WINAPI GetWindowTheme(HWND hwnd)
Definition: system.c:911
BOOL WINAPI IsThemeActive(void)
Definition: system.c:621
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:1050
HRESULT WINAPI CloseThemeData(HTHEME hTheme)
Definition: system.c:1027
HTHEME WINAPI OpenThemeData(HWND hwnd, LPCWSTR pszClassList)
Definition: system.c:881
BOOL WINAPI IsAppThemed(void)
Definition: system.c:611
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
ULONG RGBQUAD
Definition: precomp.h:59
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned short WORD
Definition: ntddk_ex.h:93
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
Definition: env.c:56
HDC hdc
Definition: main.c:9
static HDC
Definition: imagelist.c:88
static const RECT BP_BUFFERFORMAT
Definition: system.c:30
static HTHEME(WINAPI *pOpenThemeDataEx)(HWND
static HPAINTBUFFER(WINAPI *pBeginBufferedPaint)(HDC
unsigned int UINT
Definition: ndis.h:50
#define _Inout_
Definition: no_sal2.h:162
#define _In_
Definition: no_sal2.h:158
_Out_ LPRECT prc
Definition: ntgdi.h:1658
Definition: misc.c:279
int cyBottomHeight
Definition: misc.c:283
int cyTopHeight
Definition: misc.c:282
int cxRightWidth
Definition: misc.c:281
int cxLeftWidth
Definition: misc.c:280
#define BPBF_COMPATIBLEBITMAP
Definition: treelist.c:133
HRESULT WINAPI EnableThemeDialogTexture(_In_ HWND hwnd, _In_ DWORD dwFlags)
Definition: uxthemesupp.c:55
HRESULT WINAPI SetWindowTheme(_In_ HWND hwnd, _In_ LPCWSTR pszSubAppName, _In_ LPCWSTR pszSubIdList)
Definition: uxthemesupp.c:69
struct _MARGINS * PMARGINS
struct _MARGINS MARGINS
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176
LONG_PTR LPARAM
Definition: windef.h:208
DWORD COLORREF
Definition: windef.h:300
#define WINAPI
Definition: msvc.h:6
WCHAR * LPWSTR
Definition: xmlstorage.h:184
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
unsigned char BYTE
Definition: xxhash.c:193