winex11: Keep the result string in the IME UI window procedure.
[wine.git] / include / uxtheme.h
blob374b5302d3615e4de3d7c028ff8d3842d59ac01c
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_ENABLETAB (ETDT_ENABLE|ETDT_USETABTEXTURE)
101 HRESULT WINAPI EnableThemeDialogTexture(HWND,DWORD);
102 HRESULT WINAPI EnableTheming(BOOL);
103 HRESULT WINAPI GetCurrentThemeName(LPWSTR,int,LPWSTR,int,LPWSTR,int);
105 #define STAP_ALLOW_NONCLIENT (1<<0)
106 #define STAP_ALLOW_CONTROLS (1<<1)
107 #define STAP_ALLOW_WEBCONTENT (1<<2)
109 DWORD WINAPI GetThemeAppProperties(void);
110 HRESULT WINAPI GetThemeBackgroundContentRect(HTHEME,HDC,int,int,
111 const RECT*,RECT*);
112 HRESULT WINAPI GetThemeBackgroundExtent(HTHEME,HDC,int,int,const RECT*,RECT*);
113 HRESULT WINAPI GetThemeBackgroundRegion(HTHEME,HDC,int,int,const RECT*,HRGN*);
114 HRESULT WINAPI GetThemeBool(HTHEME,int,int,int,BOOL*);
115 HRESULT WINAPI GetThemeColor(HTHEME,int,int,int,COLORREF*);
117 #if defined(__GNUC__)
118 # define SZ_THDOCPROP_DISPLAYNAME (const WCHAR []){ 'D','i','s','p','l','a','y','N','a','m','e',0 }
119 # define SZ_THDOCPROP_CANONICALNAME (const WCHAR []){ 'T','h','e','m','e','N','a','m','e',0 }
120 # define SZ_THDOCPROP_TOOLTIP (const WCHAR []){ 'T','o','o','l','T','i','p',0 }
121 # define SZ_THDOCPROP_AUTHOR (const WCHAR []){ 'a','u','t','h','o','r',0 }
122 #elif defined(_MSC_VER)
123 # define SZ_THDOCPROP_DISPLAYNAME L"DisplayName"
124 # define SZ_THDOCPROP_CANONICALNAME L"ThemeName"
125 # define SZ_THDOCPROP_TOOLTIP L"ToolTip"
126 # define SZ_THDOCPROP_AUTHOR L"author"
127 #else
128 static const WCHAR SZ_THDOCPROP_DISPLAYNAME[] = { 'D','i','s','p','l','a','y','N','a','m','e',0 };
129 static const WCHAR SZ_THDOCPROP_CANONICALNAME[] = { 'T','h','e','m','e','N','a','m','e',0 };
130 static const WCHAR SZ_THDOCPROP_TOOLTIP[] = { 'T','o','o','l','T','i','p',0 };
131 static const WCHAR SZ_THDOCPROP_AUTHOR[] = { 'a','u','t','h','o','r',0 };
132 #endif
134 HRESULT WINAPI GetThemeDocumentationProperty(LPCWSTR,LPCWSTR,LPWSTR,int);
135 HRESULT WINAPI GetThemeEnumValue(HTHEME,int,int,int,int*);
136 HRESULT WINAPI GetThemeFilename(HTHEME,int,int,int,LPWSTR,int);
137 HRESULT WINAPI GetThemeFont(HTHEME,HDC,int,int,int,LOGFONTW*);
138 HRESULT WINAPI GetThemeInt(HTHEME,int,int,int,int*);
140 /* MAX_INTLIST_COUNT was 10 before Vista */
141 #define MAX_INTLIST_COUNT 402
142 typedef struct _INTLIST {
143 int iValueCount;
144 int iValues[MAX_INTLIST_COUNT];
145 } INTLIST, *PINTLIST;
147 HRESULT WINAPI GetThemeIntList(HTHEME,int,int,int,INTLIST*);
149 typedef struct _MARGINS {
150 int cxLeftWidth;
151 int cxRightWidth;
152 int cyTopHeight;
153 int cyBottomHeight;
154 } MARGINS, *PMARGINS;
156 HRESULT WINAPI GetThemeMargins(HTHEME,HDC,int,int,int,RECT*,MARGINS*);
157 HRESULT WINAPI GetThemeMetric(HTHEME,HDC,int,int,int,int*);
159 typedef enum {
160 TS_MIN,
161 TS_TRUE,
162 TS_DRAW
163 } THEMESIZE;
165 HRESULT WINAPI GetThemePartSize(HTHEME,HDC,int,int,RECT*,THEMESIZE,SIZE*);
166 HRESULT WINAPI GetThemePosition(HTHEME,int,int,int,POINT*);
168 typedef enum {
169 PO_STATE,
170 PO_PART,
171 PO_CLASS,
172 PO_GLOBAL,
173 PO_NOTFOUND
174 } PROPERTYORIGIN;
176 HRESULT WINAPI GetThemePropertyOrigin(HTHEME,int,int,int,PROPERTYORIGIN*);
177 HRESULT WINAPI GetThemeRect(HTHEME,int,int,int,RECT*);
178 HRESULT WINAPI GetThemeString(HTHEME,int,int,int,LPWSTR,int);
179 BOOL WINAPI GetThemeSysBool(HTHEME,int);
180 COLORREF WINAPI GetThemeSysColor(HTHEME,int);
181 HBRUSH WINAPI GetThemeSysColorBrush(HTHEME,int);
182 HRESULT WINAPI GetThemeSysFont(HTHEME,int,LOGFONTW*);
183 HRESULT WINAPI GetThemeSysInt(HTHEME,int,int*);
184 int WINAPI GetThemeSysSize(HTHEME,int);
185 HRESULT WINAPI GetThemeSysString(HTHEME,int,LPWSTR,int);
186 HRESULT WINAPI GetThemeTextExtent(HTHEME,HDC,int,int,LPCWSTR,int,DWORD,
187 const RECT*,RECT*);
188 HRESULT WINAPI GetThemeTextMetrics(HTHEME,HDC,int,int,TEXTMETRICW*);
189 HRESULT WINAPI GetThemeTransitionDuration(HTHEME,int,int,int,int,DWORD*);
190 HTHEME WINAPI GetWindowTheme(HWND);
192 #define HTTB_BACKGROUNDSEG 0x0000
193 #define HTTB_FIXEDBORDER 0x0002
194 #define HTTB_CAPTION 0x0004
195 #define HTTB_RESIZINGBORDER_LEFT 0x0010
196 #define HTTB_RESIZINGBORDER_TOP 0x0020
197 #define HTTB_RESIZINGBORDER_RIGHT 0x0040
198 #define HTTB_RESIZINGBORDER_BOTTOM 0x0080
199 #define HTTB_RESIZINGBORDER \
200 (HTTB_RESIZINGBORDER_LEFT|HTTB_RESIZINGBORDER_TOP|\
201 HTTB_RESIZINGBORDER_RIGHT|HTTB_RESIZINGBORDER_BOTTOM)
202 #define HTTB_SIZINGTEMPLATE 0x0100
203 #define HTTB_SYSTEMSIZINGMARGINS 0x0200
205 #define OTD_FORCE_RECT_SIZING 0x0001
206 #define OTD_NONCLIENT 0x0002
207 #define OTD_VALIDBITS (OTD_FORCE_RECT_SIZING | OTD_NONCLIENT)
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 void WINAPI SetThemeAppProperties(DWORD);
220 HRESULT WINAPI SetWindowTheme(HWND,LPCWSTR,LPCWSTR);
223 /* Double-buffered Drawing API */
225 typedef HANDLE HPAINTBUFFER;
227 HRESULT WINAPI BufferedPaintInit(VOID);
228 HRESULT WINAPI BufferedPaintUnInit(VOID);
230 typedef enum _BP_BUFFERFORMAT
232 BPBF_COMPATIBLEBITMAP,
233 BPBF_DIB,
234 BPBF_TOPDOWNDIB,
235 BPBF_TOPDOWNMONODIB
236 } BP_BUFFERFORMAT;
238 typedef struct _BP_PAINTPARAMS
240 DWORD cbSize;
241 DWORD dwFlags;
242 const RECT *prcExclude;
243 const BLENDFUNCTION *pBlendFunction;
244 } BP_PAINTPARAMS, *PBP_PAINTPARAMS;
246 HPAINTBUFFER WINAPI BeginBufferedPaint(HDC, const RECT *, BP_BUFFERFORMAT,
247 BP_PAINTPARAMS *,HDC *);
249 HRESULT WINAPI EndBufferedPaint(HPAINTBUFFER, BOOL);
251 HRESULT WINAPI BufferedPaintClear(HPAINTBUFFER, const RECT *);
252 HRESULT WINAPI BufferedPaintSetAlpha(HPAINTBUFFER, const RECT *, BYTE);
253 HRESULT WINAPI GetBufferedPaintBits(HPAINTBUFFER, RGBQUAD **, int *);
254 HDC WINAPI GetBufferedPaintDC(HPAINTBUFFER);
255 HDC WINAPI GetBufferedPaintTargetDC(HPAINTBUFFER);
256 HRESULT WINAPI GetBufferedPaintTargetRect(HPAINTBUFFER, RECT *prc);
258 /* double-buffered animation functions */
260 typedef HANDLE HANIMATIONBUFFER;
262 typedef enum _BP_ANIMATIONSTYLE
264 BPAS_NONE,
265 BPAS_LINEAR,
266 BPAS_CUBIC,
267 BPAS_SINE
268 } BP_ANIMATIONSTYLE;
270 typedef struct _BP_ANIMATIONPARAMS
272 DWORD cbSize;
273 DWORD dwFlags;
274 BP_ANIMATIONSTYLE style;
275 DWORD dwDuration;
276 } BP_ANIMATIONPARAMS, *PBP_ANIMATIONPARAMS;
278 HANIMATIONBUFFER WINAPI BeginBufferedAnimation(HWND, HDC, const RECT *,
279 BP_BUFFERFORMAT, BP_PAINTPARAMS *,
280 BP_ANIMATIONPARAMS *, HDC *, HDC *);
282 BOOL WINAPI BufferedPaintRenderAnimation(HWND, HDC);
283 HRESULT WINAPI BufferedPaintStopAllAnimations(HWND);
284 HRESULT WINAPI EndBufferedAnimation(HANIMATIONBUFFER, BOOL);
286 #endif