msxml3/tests: Add test saving XML with non-english characters.
[wine.git] / include / uxtheme.h
blobb44e06de611fe9ffd6448370ad5477e892eda77b
1 /*
2 * Win32 5.1 theme definitions
4 * Copyright (C) 2003 Kevin Koltzau
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #ifndef __WINE_UXTHEME_H
22 #define __WINE_UXTHEME_H
24 #include <commctrl.h>
26 typedef HANDLE HTHEME;
28 HRESULT WINAPI CloseThemeData(HTHEME hTheme);
29 HRESULT WINAPI DrawThemeBackground(HTHEME,HDC,int,int,const RECT*,const RECT*);
31 #define DTBG_CLIPRECT 0x00000001
32 #define DTBG_DRAWSOLID 0x00000002
33 #define DTBG_OMITBORDER 0x00000004
34 #define DTBG_OMITCONTENT 0x00000008
35 #define DTBG_COMPUTINGREGION 0x00000010
36 #define DTBG_MIRRORDC 0x00000020
38 typedef struct _DTBGOPTS {
39 DWORD dwSize;
40 DWORD dwFlags;
41 RECT rcClip;
42 } DTBGOPTS, *PDTBGOPTS;
44 HRESULT WINAPI DrawThemeBackgroundEx(HTHEME,HDC,int,int,const RECT*,
45 const DTBGOPTS*);
46 HRESULT WINAPI DrawThemeEdge(HTHEME,HDC,int,int,const RECT*,UINT,UINT,
47 RECT*);
48 HRESULT WINAPI DrawThemeIcon(HTHEME,HDC,int,int,const RECT*,HIMAGELIST,int);
49 HRESULT WINAPI DrawThemeParentBackground(HWND,HDC,RECT*);
51 #define DTT_GRAYED 0x1
53 HRESULT WINAPI DrawThemeText(HTHEME,HDC,int,int,LPCWSTR,int,DWORD,DWORD,
54 const RECT*);
56 /* DTTOPTS.dwFlags bits */
57 #define DTT_TEXTCOLOR 0x00000001
58 #define DTT_BORDERCOLOR 0x00000002
59 #define DTT_SHADOWCOLOR 0x00000004
60 #define DTT_SHADOWTYPE 0x00000008
61 #define DTT_SHADOWOFFSET 0x00000010
62 #define DTT_BORDERSIZE 0x00000020
63 #define DTT_FONTPROP 0x00000040
64 #define DTT_COLORPROP 0x00000080
65 #define DTT_STATEID 0x00000100
66 #define DTT_CALCRECT 0x00000200
67 #define DTT_APPLYOVERLAY 0x00000400
68 #define DTT_GLOWSIZE 0x00000800
69 #define DTT_CALLBACK 0x00001000
70 #define DTT_COMPOSITED 0x00002000
71 #define DTT_VALIDBITS 0x00003fff
73 typedef int (WINAPI *DTT_CALLBACK_PROC)(HDC,LPWSTR,int,RECT*,UINT,LPARAM);
75 typedef struct _DTTOPTS {
76 DWORD dwSize;
77 DWORD dwFlags;
78 COLORREF crText;
79 COLORREF crBorder;
80 COLORREF crShadow;
81 int iTextShadowType;
82 POINT ptShadowOffset;
83 int iBorderSize;
84 int iFontPropId;
85 int iColorPropId;
86 int iStateId;
87 BOOL fApplyOverlay;
88 int iGlowSize;
89 DTT_CALLBACK_PROC pfnDrawTextCallback;
90 LPARAM lParam;
91 } DTTOPTS, *PDTTOPTS;
93 HRESULT WINAPI DrawThemeTextEx(HTHEME,HDC,int,int,LPCWSTR,int,DWORD,RECT*,
94 const DTTOPTS*);
96 #define ETDT_DISABLE 0x00000001
97 #define ETDT_ENABLE 0x00000002
98 #define ETDT_USETABTEXTURE 0x00000004
99 #define ETDT_USEAEROWIZARDTABTEXTURE 0x00000008
100 #define ETDT_ENABLETAB (ETDT_ENABLE|ETDT_USETABTEXTURE)
101 #define ETDT_ENABLEAEROWIZARDTAB (ETDT_ENABLE|ETDT_USEAEROWIZARDTABTEXTURE)
102 #define ETDT_VALIDBITS (ETDT_DISABLE|ETDT_ENABLE|ETDT_USETABTEXTURE|ETDT_USEAEROWIZARDTABTEXTURE)
104 HRESULT WINAPI EnableThemeDialogTexture(HWND,DWORD);
105 HRESULT WINAPI EnableTheming(BOOL);
106 HRESULT WINAPI GetCurrentThemeName(LPWSTR,int,LPWSTR,int,LPWSTR,int);
108 #define STAP_ALLOW_NONCLIENT (1<<0)
109 #define STAP_ALLOW_CONTROLS (1<<1)
110 #define STAP_ALLOW_WEBCONTENT (1<<2)
112 DWORD WINAPI GetThemeAppProperties(void);
113 HRESULT WINAPI GetThemeBackgroundContentRect(HTHEME,HDC,int,int,
114 const RECT*,RECT*);
115 HRESULT WINAPI GetThemeBackgroundExtent(HTHEME,HDC,int,int,const RECT*,RECT*);
116 HRESULT WINAPI GetThemeBackgroundRegion(HTHEME,HDC,int,int,const RECT*,HRGN*);
117 HRESULT WINAPI GetThemeBool(HTHEME,int,int,int,BOOL*);
118 HRESULT WINAPI GetThemeColor(HTHEME,int,int,int,COLORREF*);
120 #if defined(_MSC_VER) || defined(__MINGW32__)
121 # define SZ_THDOCPROP_DISPLAYNAME L"DisplayName"
122 # define SZ_THDOCPROP_CANONICALNAME L"ThemeName"
123 # define SZ_THDOCPROP_TOOLTIP L"ToolTip"
124 # define SZ_THDOCPROP_AUTHOR L"author"
125 #else
126 static const WCHAR SZ_THDOCPROP_DISPLAYNAME[] = { 'D','i','s','p','l','a','y','N','a','m','e',0 };
127 static const WCHAR SZ_THDOCPROP_CANONICALNAME[] = { 'T','h','e','m','e','N','a','m','e',0 };
128 static const WCHAR SZ_THDOCPROP_TOOLTIP[] = { 'T','o','o','l','T','i','p',0 };
129 static const WCHAR SZ_THDOCPROP_AUTHOR[] = { 'a','u','t','h','o','r',0 };
130 #endif
132 HRESULT WINAPI GetThemeDocumentationProperty(LPCWSTR,LPCWSTR,LPWSTR,int);
133 HRESULT WINAPI GetThemeEnumValue(HTHEME,int,int,int,int*);
134 HRESULT WINAPI GetThemeFilename(HTHEME,int,int,int,LPWSTR,int);
135 HRESULT WINAPI GetThemeFont(HTHEME,HDC,int,int,int,LOGFONTW*);
136 HRESULT WINAPI GetThemeInt(HTHEME,int,int,int,int*);
138 /* MAX_INTLIST_COUNT was 10 before Vista */
139 #define MAX_INTLIST_COUNT 402
140 typedef struct _INTLIST {
141 int iValueCount;
142 int iValues[MAX_INTLIST_COUNT];
143 } INTLIST, *PINTLIST;
145 HRESULT WINAPI GetThemeIntList(HTHEME,int,int,int,INTLIST*);
147 typedef struct _MARGINS {
148 int cxLeftWidth;
149 int cxRightWidth;
150 int cyTopHeight;
151 int cyBottomHeight;
152 } MARGINS, *PMARGINS;
154 HRESULT WINAPI GetThemeMargins(HTHEME,HDC,int,int,int,RECT*,MARGINS*);
155 HRESULT WINAPI GetThemeMetric(HTHEME,HDC,int,int,int,int*);
157 typedef enum {
158 TS_MIN,
159 TS_TRUE,
160 TS_DRAW
161 } THEMESIZE;
163 HRESULT WINAPI GetThemePartSize(HTHEME,HDC,int,int,RECT*,THEMESIZE,SIZE*);
164 HRESULT WINAPI GetThemePosition(HTHEME,int,int,int,POINT*);
166 typedef enum {
167 PO_STATE,
168 PO_PART,
169 PO_CLASS,
170 PO_GLOBAL,
171 PO_NOTFOUND
172 } PROPERTYORIGIN;
174 HRESULT WINAPI GetThemePropertyOrigin(HTHEME,int,int,int,PROPERTYORIGIN*);
175 HRESULT WINAPI GetThemeRect(HTHEME,int,int,int,RECT*);
176 HRESULT WINAPI GetThemeString(HTHEME,int,int,int,LPWSTR,int);
177 BOOL WINAPI GetThemeSysBool(HTHEME,int);
178 COLORREF WINAPI GetThemeSysColor(HTHEME,int);
179 HBRUSH WINAPI GetThemeSysColorBrush(HTHEME,int);
180 HRESULT WINAPI GetThemeSysFont(HTHEME,int,LOGFONTW*);
181 HRESULT WINAPI GetThemeSysInt(HTHEME,int,int*);
182 int WINAPI GetThemeSysSize(HTHEME,int);
183 HRESULT WINAPI GetThemeSysString(HTHEME,int,LPWSTR,int);
184 HRESULT WINAPI GetThemeTextExtent(HTHEME,HDC,int,int,LPCWSTR,int,DWORD,
185 const RECT*,RECT*);
186 HRESULT WINAPI GetThemeTextMetrics(HTHEME,HDC,int,int,TEXTMETRICW*);
187 HRESULT WINAPI GetThemeTransitionDuration(HTHEME,int,int,int,int,DWORD*);
188 HTHEME WINAPI GetWindowTheme(HWND);
190 #define HTTB_BACKGROUNDSEG 0x0000
191 #define HTTB_FIXEDBORDER 0x0002
192 #define HTTB_CAPTION 0x0004
193 #define HTTB_RESIZINGBORDER_LEFT 0x0010
194 #define HTTB_RESIZINGBORDER_TOP 0x0020
195 #define HTTB_RESIZINGBORDER_RIGHT 0x0040
196 #define HTTB_RESIZINGBORDER_BOTTOM 0x0080
197 #define HTTB_RESIZINGBORDER \
198 (HTTB_RESIZINGBORDER_LEFT|HTTB_RESIZINGBORDER_TOP|\
199 HTTB_RESIZINGBORDER_RIGHT|HTTB_RESIZINGBORDER_BOTTOM)
200 #define HTTB_SIZINGTEMPLATE 0x0100
201 #define HTTB_SYSTEMSIZINGMARGINS 0x0200
203 #define OTD_FORCE_RECT_SIZING 0x0001
204 #define OTD_NONCLIENT 0x0002
205 #define OTD_VALIDBITS (OTD_FORCE_RECT_SIZING | OTD_NONCLIENT)
207 enum WINDOWTHEMEATTRIBUTETYPE { WTA_NONCLIENT = 1 };
209 HRESULT WINAPI HitTestThemeBackground(HTHEME,HDC,int,int,DWORD,const RECT*,
210 HRGN,POINT,WORD*);
211 BOOL WINAPI IsAppThemed(void);
212 BOOL WINAPI IsCompositionActive(void);
213 BOOL WINAPI IsThemeActive(void);
214 BOOL WINAPI IsThemeBackgroundPartiallyTransparent(HTHEME,int,int);
215 BOOL WINAPI IsThemeDialogTextureEnabled(HWND);
216 BOOL WINAPI IsThemePartDefined(HTHEME,int,int);
217 HTHEME WINAPI OpenThemeData(HWND,LPCWSTR);
218 HTHEME WINAPI OpenThemeDataEx(HWND,LPCWSTR,DWORD);
219 HTHEME WINAPI OpenThemeDataForDpi(HWND,LPCWSTR,UINT);
220 void WINAPI SetThemeAppProperties(DWORD);
221 HRESULT WINAPI SetWindowTheme(HWND,LPCWSTR,LPCWSTR);
222 HRESULT WINAPI SetWindowThemeAttribute(HWND,enum WINDOWTHEMEATTRIBUTETYPE,PVOID,DWORD);
224 /* Double-buffered Drawing API */
226 typedef HANDLE HPAINTBUFFER;
228 HRESULT WINAPI BufferedPaintInit(VOID);
229 HRESULT WINAPI BufferedPaintUnInit(VOID);
231 typedef enum _BP_BUFFERFORMAT
233 BPBF_COMPATIBLEBITMAP,
234 BPBF_DIB,
235 BPBF_TOPDOWNDIB,
236 BPBF_TOPDOWNMONODIB
237 } BP_BUFFERFORMAT;
239 typedef struct _BP_PAINTPARAMS
241 DWORD cbSize;
242 DWORD dwFlags;
243 const RECT *prcExclude;
244 const BLENDFUNCTION *pBlendFunction;
245 } BP_PAINTPARAMS, *PBP_PAINTPARAMS;
247 HPAINTBUFFER WINAPI BeginBufferedPaint(HDC, const RECT *, BP_BUFFERFORMAT,
248 BP_PAINTPARAMS *,HDC *);
250 HRESULT WINAPI EndBufferedPaint(HPAINTBUFFER, BOOL);
252 HRESULT WINAPI BufferedPaintClear(HPAINTBUFFER, const RECT *);
253 HRESULT WINAPI BufferedPaintSetAlpha(HPAINTBUFFER, const RECT *, BYTE);
254 HRESULT WINAPI GetBufferedPaintBits(HPAINTBUFFER, RGBQUAD **, int *);
255 HDC WINAPI GetBufferedPaintDC(HPAINTBUFFER);
256 HDC WINAPI GetBufferedPaintTargetDC(HPAINTBUFFER);
257 HRESULT WINAPI GetBufferedPaintTargetRect(HPAINTBUFFER, RECT *prc);
259 /* double-buffered animation functions */
261 typedef HANDLE HANIMATIONBUFFER;
263 typedef enum _BP_ANIMATIONSTYLE
265 BPAS_NONE,
266 BPAS_LINEAR,
267 BPAS_CUBIC,
268 BPAS_SINE
269 } BP_ANIMATIONSTYLE;
271 typedef struct _BP_ANIMATIONPARAMS
273 DWORD cbSize;
274 DWORD dwFlags;
275 BP_ANIMATIONSTYLE style;
276 DWORD dwDuration;
277 } BP_ANIMATIONPARAMS, *PBP_ANIMATIONPARAMS;
279 HANIMATIONBUFFER WINAPI BeginBufferedAnimation(HWND, HDC, const RECT *,
280 BP_BUFFERFORMAT, BP_PAINTPARAMS *,
281 BP_ANIMATIONPARAMS *, HDC *, HDC *);
283 BOOL WINAPI BufferedPaintRenderAnimation(HWND, HDC);
284 HRESULT WINAPI BufferedPaintStopAllAnimations(HWND);
285 HRESULT WINAPI EndBufferedAnimation(HANIMATIONBUFFER, BOOL);
287 #endif