Define macros for LPC limits:
[reactos.git] / reactos / include / uxtheme.h
1 #ifndef _UXTHEME_H_
2 #define _UXTHEME_H_
3
4 #include <commctrl.h>
5
6 #if !defined(THEMEAPI)
7 # if !defined(_UXTHEME_)
8 # define THEMEAPI EXTERN_C DECLSPEC_IMPORT HRESULT STDAPICALLTYPE
9 # define THEMEAPI_(type) EXTERN_C DECLSPEC_IMPORT type STDAPICALLTYPE
10 # else
11 # define THEMEAPI STDAPI
12 # define THEMEAPI_(type) STDAPI_(type)
13 # endif
14 #endif
15
16 typedef HANDLE HTHEME;
17
18 THEMEAPI_(HTHEME) OpenThemeData
19 (
20 IN HWND hwnd,
21 IN LPCWSTR pszClassList
22 );
23
24 THEMEAPI CloseThemeData
25 (
26 IN HTHEME hTheme
27 );
28
29 THEMEAPI DrawThemeBackground
30 (
31 IN HTHEME hTheme,
32 IN HDC hdc,
33 IN int iPartId,
34 IN int iStateId,
35 IN const RECT * pRect,
36 IN OPTIONAL const RECT * pClipRect
37 );
38
39 #define DTT_GRAYED (1)
40
41 THEMEAPI DrawThemeText
42 (
43 IN HTHEME hTheme,
44 IN HDC hdc,
45 IN int iPartId,
46 IN int iStateId,
47 IN LPCWSTR pszText,
48 IN int iCharCount,
49 IN DWORD dwTextFlags,
50 IN DWORD dwTextFlags2,
51 IN const RECT *pRect
52 );
53
54 THEMEAPI GetThemeBackgroundContentRect
55 (
56 IN HTHEME hTheme,
57 IN OPTIONAL HDC hdc,
58 IN int iPartId,
59 IN int iStateId,
60 IN const RECT * pBoundingRect,
61 OUT RECT * pContentRect
62 );
63
64 THEMEAPI GetThemeBackgroundExtent
65 (
66 IN HTHEME hTheme,
67 IN OPTIONAL HDC hdc,
68 IN int iPartId,
69 IN int iStateId,
70 IN const RECT * pContentRect,
71 OUT RECT * pExtentRect
72 );
73
74 enum THEMESIZE
75 {
76 TS_MIN,
77 TS_TRUE,
78 TS_DRAW,
79 };
80
81 THEMEAPI GetThemePartSize
82 (
83 IN HTHEME hTheme,
84 IN HDC hdc,
85 IN int iPartId,
86 IN int iStateId,
87 IN OPTIONAL RECT * prc,
88 IN enum THEMESIZE eSize,
89 OUT SIZE * psz
90 );
91
92 THEMEAPI GetThemeTextExtent
93 (
94 IN HTHEME hTheme,
95 IN HDC hdc,
96 IN int iPartId,
97 IN int iStateId,
98 IN LPCWSTR pszText,
99 IN int iCharCount,
100 IN DWORD dwTextFlags,
101 IN OPTIONAL const RECT * pBoundingRect,
102 OUT RECT * pExtentRect
103 );
104
105 THEMEAPI GetThemeTextMetrics
106 (
107 IN HTHEME hTheme,
108 IN OPTIONAL HDC hdc,
109 IN int iPartId,
110 IN int iStateId,
111 OUT TEXTMETRIC * ptm
112 );
113
114 THEMEAPI GetThemeBackgroundRegion
115 (
116 IN HTHEME hTheme,
117 IN OPTIONAL HDC hdc,
118 IN int iPartId,
119 IN int iStateId,
120 IN const RECT * pRect,
121 OUT HRGN * pRegion
122 );
123
124 #define HTTB_BACKGROUNDSEG (0x00000000)
125 #define HTTB_FIXEDBORDER (0x00000002)
126 #define HTTB_CAPTION (0x00000004)
127 #define HTTB_RESIZINGBORDER_LEFT (0x00000010)
128 #define HTTB_RESIZINGBORDER_TOP (0x00000020)
129 #define HTTB_RESIZINGBORDER_RIGHT (0x00000040)
130 #define HTTB_RESIZINGBORDER_BOTTOM (0x00000080)
131 #define HTTB_SIZINGTEMPLATE (0x00000100)
132 #define HTTB_SYSTEMSIZINGMARGINS (0x00000200)
133
134 #define HTTB_RESIZINGBORDER \
135 ( \
136 HTTB_RESIZINGBORDER_LEFT | \
137 HTTB_RESIZINGBORDER_TOP | \
138 HTTB_RESIZINGBORDER_RIGHT | \
139 HTTB_RESIZINGBORDER_BOTTOM \
140 )
141
142 THEMEAPI HitTestThemeBackground
143 (
144 IN HTHEME hTheme,
145 IN OPTIONAL HDC hdc,
146 IN int iPartId,
147 IN int iStateId,
148 IN DWORD dwOptions,
149 IN const RECT * pRect,
150 IN OPTIONAL HRGN hrgn,
151 IN POINT ptTest,
152 OUT WORD * pwHitTestCode
153 );
154
155 THEMEAPI DrawThemeEdge
156 (
157 IN HTHEME hTheme,
158 IN HDC hdc,
159 IN int iPartId,
160 IN int iStateId,
161 IN const RECT * pDestRect,
162 IN UINT uEdge,
163 IN UINT uFlags,
164 OUT OPTIONAL RECT * pContentRect
165 );
166
167 THEMEAPI DrawThemeIcon
168 (
169 IN HTHEME hTheme,
170 IN HDC hdc,
171 IN int iPartId,
172 IN int iStateId,
173 IN const RECT * pRect,
174 IN HIMAGELIST himl,
175 int iImageIndex
176 );
177
178 THEMEAPI_(BOOL) IsThemePartDefined
179 (
180 IN HTHEME hTheme,
181 IN int iPartId,
182 IN int iStateId
183 );
184
185 THEMEAPI_(BOOL) IsThemeBackgroundPartiallyTransparent
186 (
187 IN HTHEME hTheme,
188 IN int iPartId,
189 IN int iStateId
190 );
191
192 THEMEAPI GetThemeColor
193 (
194 IN HTHEME hTheme,
195 IN int iPartId,
196 IN int iStateId,
197 IN int iPropId,
198 OUT COLORREF * pColor
199 );
200
201 THEMEAPI GetThemeMetric
202 (
203 IN HTHEME hTheme,
204 IN OPTIONAL HDC hdc,
205 IN int iPartId,
206 IN int iStateId,
207 IN int iPropId,
208 OUT int * piVal
209 );
210
211 THEMEAPI GetThemeString
212 (
213 IN HTHEME hTheme,
214 IN int iPartId,
215 IN int iStateId,
216 IN int iPropId,
217 OUT LPWSTR pszBuff,
218 IN int cchMaxBuffChars
219 );
220
221 THEMEAPI GetThemeBool
222 (
223 IN HTHEME hTheme,
224 IN int iPartId,
225 IN int iStateId,
226 IN int iPropId,
227 OUT BOOL * pfVal
228 );
229
230 THEMEAPI GetThemeInt
231 (
232 IN HTHEME hTheme,
233 IN int iPartId,
234 IN int iStateId,
235 IN int iPropId,
236 OUT int * piVal
237 );
238
239 THEMEAPI GetThemeEnumValue
240 (
241 IN HTHEME hTheme,
242 IN int iPartId,
243 IN int iStateId,
244 IN int iPropId,
245 OUT int * piVal
246 );
247
248 THEMEAPI GetThemePosition
249 (
250 IN HTHEME hTheme,
251 IN int iPartId,
252 IN int iStateId,
253 IN int iPropId,
254 OUT POINT * pPoint
255 );
256
257 THEMEAPI GetThemeFont
258 (
259 IN HTHEME hTheme,
260 IN OPTIONAL HDC hdc,
261 IN int iPartId,
262 IN int iStateId,
263 IN int iPropId,
264 OUT LOGFONT * pFont
265 );
266
267 THEMEAPI GetThemeRect
268 (
269 IN HTHEME hTheme,
270 IN int iPartId,
271 IN int iStateId,
272 IN int iPropId,
273 OUT RECT * pRect
274 );
275
276 typedef struct _MARGINS
277 {
278 int cxLeftWidth;
279 int cxRightWidth;
280 int cyTopHeight;
281 int cyBottomHeight;
282 }
283 MARGINS, * PMARGINS;
284
285 THEMEAPI GetThemeMargins
286 (
287 IN HTHEME hTheme,
288 IN OPTIONAL HDC hdc,
289 IN int iPartId,
290 IN int iStateId,
291 IN int iPropId,
292 IN OPTIONAL RECT * prc,
293 OUT MARGINS * pMargins
294 );
295
296 #define MAX_INTLIST_COUNT (10)
297
298 typedef struct _INTLIST
299 {
300 int iValueCount;
301 int iValues[MAX_INTLIST_COUNT];
302 }
303 INTLIST, * PINTLIST;
304
305 THEMEAPI GetThemeIntList
306 (
307 IN HTHEME hTheme,
308 IN int iPartId,
309 IN int iStateId,
310 IN int iPropId,
311 OUT INTLIST * pIntList
312 );
313
314 enum PROPERTYORIGIN
315 {
316 PO_STATE,
317 PO_PART,
318 PO_CLASS,
319 PO_GLOBAL,
320 PO_NOTFOUND
321 };
322
323 THEMEAPI GetThemePropertyOrigin
324 (
325 IN HTHEME hTheme,
326 IN int iPartId,
327 IN int iStateId,
328 IN int iPropId,
329 OUT enum PROPERTYORIGIN * pOrigin
330 );
331
332 THEMEAPI SetWindowTheme
333 (
334 IN HWND hwnd,
335 IN LPCWSTR pszSubAppName,
336 IN LPCWSTR pszSubIdList
337 );
338
339 THEMEAPI GetThemeFilename
340 (
341 IN HTHEME hTheme,
342 IN int iPartId,
343 IN int iStateId,
344 IN int iPropId,
345 OUT LPWSTR pszThemeFileName,
346 IN int cchMaxBuffChars
347 );
348
349 THEMEAPI_(COLORREF) GetThemeSysColor
350 (
351 IN HTHEME hTheme,
352 IN int iColorId
353 );
354
355 THEMEAPI_(HBRUSH) GetThemeSysColorBrush
356 (
357 IN HTHEME hTheme,
358 IN int iColorId
359 );
360
361 THEMEAPI_(BOOL) GetThemeSysBool
362 (
363 IN HTHEME hTheme,
364 IN int iBoolId
365 );
366
367 THEMEAPI_(int) GetThemeSysSize
368 (
369 IN HTHEME hTheme,
370 IN int iSizeId
371 );
372
373 THEMEAPI GetThemeSysFont
374 (
375 IN HTHEME hTheme,
376 IN int iFontId,
377 OUT LOGFONT * plf
378 );
379
380 THEMEAPI GetThemeSysString
381 (
382 IN HTHEME hTheme,
383 IN int iStringId,
384 OUT LPWSTR pszStringBuff,
385 IN int cchMaxStringChars
386 );
387
388 THEMEAPI GetThemeSysInt
389 (
390 IN HTHEME hTheme,
391 IN int iIntId,
392 IN int * piValue
393 );
394
395 THEMEAPI_(BOOL) IsThemeActive(void);
396
397 THEMEAPI_(BOOL) IsAppThemed(void);
398
399 THEMEAPI_(HTHEME) GetWindowTheme
400 (
401 IN HWND hwnd
402 );
403
404 #define ETDT_DISABLE (0x00000001)
405 #define ETDT_ENABLE (0x00000002)
406 #define ETDT_USETABTEXTURE (0x00000004)
407 #define ETDT_ENABLETAB (ETDT_ENABLE | ETDT_USETABTEXTURE)
408
409 THEMEAPI EnableThemeDialogTexture
410 (
411 IN HWND hwnd,
412 IN DWORD dwFlags
413 );
414
415 THEMEAPI_(BOOL) IsThemeDialogTextureEnabled
416 (
417 IN HWND hwnd
418 );
419
420 #define STAP_ALLOW_NONCLIENT (0x00000001)
421 #define STAP_ALLOW_CONTROLS (0x00000002)
422 #define STAP_ALLOW_WEBCONTENT (0x00000004)
423
424 THEMEAPI_(DWORD) GetThemeAppProperties(void);
425
426 THEMEAPI_(void) SetThemeAppProperties
427 (
428 IN DWORD dwFlags
429 );
430
431 THEMEAPI GetCurrentThemeName
432 (
433 OUT LPWSTR pszThemeFileName,
434 IN int cchMaxNameChars,
435 OUT OPTIONAL LPWSTR pszColorBuff,
436 IN int cchMaxColorChars,
437 OUT OPTIONAL LPWSTR pszSizeBuff,
438 IN int cchMaxSizeChars
439 );
440
441 #define SZ_THDOCPROP_DISPLAYNAME L"DisplayName"
442 #define SZ_THDOCPROP_CANONICALNAME L"ThemeName"
443 #define SZ_THDOCPROP_TOOLTIP L"ToolTip"
444 #define SZ_THDOCPROP_AUTHOR L"author"
445
446 THEMEAPI GetThemeDocumentationProperty
447 (
448 IN LPCWSTR pszThemeName,
449 IN LPCWSTR pszPropertyName,
450 OUT LPWSTR pszValueBuff,
451 IN int cchMaxValChars
452 );
453
454 THEMEAPI DrawThemeParentBackground
455 (
456 IN HWND hwnd,
457 IN HDC hdc,
458 IN OPTIONAL RECT * prc
459 );
460
461 THEMEAPI EnableTheming
462 (
463 IN BOOL fEnable
464 );
465
466 #endif
467
468 /* EOF */