1 | /*
|
---|
2 | * Win32 5.1 theme definitions
|
---|
3 | *
|
---|
4 | * Copyright (C) 2003 Kevin Koltzau
|
---|
5 | *
|
---|
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.
|
---|
10 | *
|
---|
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.
|
---|
15 | *
|
---|
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
|
---|
19 | */
|
---|
20 |
|
---|
21 | /*
|
---|
22 | * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
|
---|
23 | * other than GPL or LGPL is available it will apply instead, Sun elects to use only
|
---|
24 | * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
|
---|
25 | * a choice of LGPL license versions is made available with the language indicating
|
---|
26 | * that LGPLv2 or any later version may be used, or where a choice of which version
|
---|
27 | * of the LGPL is applied is otherwise unspecified.
|
---|
28 | */
|
---|
29 |
|
---|
30 | #ifndef __WINE_UXTHEME_H
|
---|
31 | #define __WINE_UXTHEME_H
|
---|
32 |
|
---|
33 | #include <commctrl.h>
|
---|
34 |
|
---|
35 | typedef HANDLE HTHEME;
|
---|
36 |
|
---|
37 | HRESULT WINAPI CloseThemeData(HTHEME hTheme);
|
---|
38 | HRESULT WINAPI DrawThemeBackground(HTHEME,HDC,int,int,const RECT*,const RECT*);
|
---|
39 |
|
---|
40 | #define DTBG_CLIPRECT 0x00000001
|
---|
41 | #define DTBG_DRAWSOLID 0x00000002
|
---|
42 | #define DTBG_OMITBORDER 0x00000004
|
---|
43 | #define DTBG_OMITCONTENT 0x00000008
|
---|
44 | #define DTBG_COMPUTINGREGION 0x00000010
|
---|
45 | #define DTBG_MIRRORDC 0x00000020
|
---|
46 |
|
---|
47 | typedef struct _DTBGOPTS {
|
---|
48 | DWORD dwSize;
|
---|
49 | DWORD dwFlags;
|
---|
50 | RECT rcClip;
|
---|
51 | } DTBGOPTS, *PDTBGOPTS;
|
---|
52 |
|
---|
53 | HRESULT WINAPI DrawThemeBackgroundEx(HTHEME,HDC,int,int,const RECT*,
|
---|
54 | const DTBGOPTS*);
|
---|
55 | HRESULT WINAPI DrawThemeEdge(HTHEME,HDC,int,int,const RECT*,UINT,UINT,
|
---|
56 | RECT*);
|
---|
57 | HRESULT WINAPI DrawThemeIcon(HTHEME,HDC,int,int,const RECT*,HIMAGELIST,int);
|
---|
58 | HRESULT WINAPI DrawThemeParentBackground(HWND,HDC,RECT*);
|
---|
59 |
|
---|
60 | #define DTT_GRAYED 0x1
|
---|
61 |
|
---|
62 | HRESULT WINAPI DrawThemeText(HTHEME,HDC,int,int,LPCWSTR,int,DWORD,DWORD,
|
---|
63 | const RECT*);
|
---|
64 |
|
---|
65 | #define ETDT_DISABLE 0x00000001
|
---|
66 | #define ETDT_ENABLE 0x00000002
|
---|
67 | #define ETDT_USETABTEXTURE 0x00000004
|
---|
68 | #define ETDT_ENABLETAB (ETDT_ENABLE|ETDT_USETABTEXTURE)
|
---|
69 |
|
---|
70 | HRESULT WINAPI EnableThemeDialogTexture(HWND,DWORD);
|
---|
71 | HRESULT WINAPI EnableTheming(BOOL);
|
---|
72 | HRESULT WINAPI GetCurrentThemeName(LPWSTR,int,LPWSTR,int,LPWSTR,int);
|
---|
73 |
|
---|
74 | #define STAP_ALLOW_NONCLIENT (1<<0)
|
---|
75 | #define STAP_ALLOW_CONTROLS (1<<1)
|
---|
76 | #define STAP_ALLOW_WEBCONTENT (1<<2)
|
---|
77 |
|
---|
78 | DWORD WINAPI GetThemeAppProperties(void);
|
---|
79 | HRESULT WINAPI GetThemeBackgroundContentRect(HTHEME,HDC,int,int,
|
---|
80 | const RECT*,RECT*);
|
---|
81 | HRESULT WINAPI GetThemeBackgroundExtent(HTHEME,HDC,int,int,const RECT*,RECT*);
|
---|
82 | HRESULT WINAPI GetThemeBackgroundRegion(HTHEME,HDC,int,int,const RECT*,HRGN*);
|
---|
83 | HRESULT WINAPI GetThemeBool(HTHEME,int,int,int,BOOL*);
|
---|
84 | HRESULT WINAPI GetThemeColor(HTHEME,int,int,int,COLORREF*);
|
---|
85 |
|
---|
86 | #if defined(__GNUC__)
|
---|
87 | # define SZ_THDOCPROP_DISPLAYNAME (const WCHAR []){ 'D','i','s','p','l','a','y','N','a','m','e',0 }
|
---|
88 | # define SZ_THDOCPROP_CANONICALNAME (const WCHAR []){ 'T','h','e','m','e','N','a','m','e',0 }
|
---|
89 | # define SZ_THDOCPROP_TOOLTIP (const WCHAR []){ 'T','o','o','l','T','i','p',0 }
|
---|
90 | # define SZ_THDOCPROP_AUTHOR (const WCHAR []){ 'a','u','t','h','o','r',0 }
|
---|
91 | #elif defined(_MSC_VER)
|
---|
92 | # define SZ_THDOCPROP_DISPLAYNAME L"DisplayName"
|
---|
93 | # define SZ_THDOCPROP_CANONICALNAME L"ThemeName"
|
---|
94 | # define SZ_THDOCPROP_TOOLTIP L"ToolTip"
|
---|
95 | # define SZ_THDOCPROP_AUTHOR L"author"
|
---|
96 | #else
|
---|
97 | static const WCHAR SZ_THDOCPROP_DISPLAYNAME[] = { 'D','i','s','p','l','a','y','N','a','m','e',0 };
|
---|
98 | static const WCHAR SZ_THDOCPROP_CANONICALNAME[] = { 'T','h','e','m','e','N','a','m','e',0 };
|
---|
99 | static const WCHAR SZ_THDOCPROP_TOOLTIP[] = { 'T','o','o','l','T','i','p',0 };
|
---|
100 | static const WCHAR SZ_THDOCPROP_AUTHOR[] = { 'a','u','t','h','o','r',0 };
|
---|
101 | #endif
|
---|
102 |
|
---|
103 | HRESULT WINAPI GetThemeDocumentationProperty(LPCWSTR,LPCWSTR,LPWSTR,int);
|
---|
104 | HRESULT WINAPI GetThemeEnumValue(HTHEME,int,int,int,int*);
|
---|
105 | HRESULT WINAPI GetThemeFilename(HTHEME,int,int,int,LPWSTR,int);
|
---|
106 | HRESULT WINAPI GetThemeFont(HTHEME,HDC,int,int,int,LOGFONTW*);
|
---|
107 | HRESULT WINAPI GetThemeInt(HTHEME,int,int,int,int*);
|
---|
108 |
|
---|
109 | #define MAX_INTLIST_COUNT 10
|
---|
110 | typedef struct _INTLIST {
|
---|
111 | int iValueCount;
|
---|
112 | int iValues[MAX_INTLIST_COUNT];
|
---|
113 | } INTLIST, *PINTLIST;
|
---|
114 |
|
---|
115 | HRESULT WINAPI GetThemeIntList(HTHEME,int,int,int,INTLIST*);
|
---|
116 |
|
---|
117 | typedef struct _MARGINS {
|
---|
118 | int cxLeftWidth;
|
---|
119 | int cxRightWidth;
|
---|
120 | int cyTopHeight;
|
---|
121 | int cyBottomHeight;
|
---|
122 | } MARGINS, *PMARGINS;
|
---|
123 |
|
---|
124 | HRESULT WINAPI GetThemeMargins(HTHEME,HDC,int,int,int,RECT*,MARGINS*);
|
---|
125 | HRESULT WINAPI GetThemeMetric(HTHEME,HDC,int,int,int,int*);
|
---|
126 |
|
---|
127 | typedef enum {
|
---|
128 | TS_MIN,
|
---|
129 | TS_TRUE,
|
---|
130 | TS_DRAW
|
---|
131 | } THEMESIZE;
|
---|
132 |
|
---|
133 | HRESULT WINAPI GetThemePartSize(HTHEME,HDC,int,int,RECT*,THEMESIZE,SIZE*);
|
---|
134 | HRESULT WINAPI GetThemePosition(HTHEME,int,int,int,POINT*);
|
---|
135 |
|
---|
136 | typedef enum {
|
---|
137 | PO_STATE,
|
---|
138 | PO_PART,
|
---|
139 | PO_CLASS,
|
---|
140 | PO_GLOBAL,
|
---|
141 | PO_NOTFOUND
|
---|
142 | } PROPERTYORIGIN;
|
---|
143 |
|
---|
144 | HRESULT WINAPI GetThemePropertyOrigin(HTHEME,int,int,int,PROPERTYORIGIN*);
|
---|
145 | HRESULT WINAPI GetThemeRect(HTHEME,int,int,int,RECT*);
|
---|
146 | HRESULT WINAPI GetThemeString(HTHEME,int,int,int,LPWSTR,int);
|
---|
147 | BOOL WINAPI GetThemeSysBool(HTHEME,int);
|
---|
148 | COLORREF WINAPI GetThemeSysColor(HTHEME,int);
|
---|
149 | HBRUSH WINAPI GetThemeSysColorBrush(HTHEME,int);
|
---|
150 | HRESULT WINAPI GetThemeSysFont(HTHEME,int,LOGFONTW*);
|
---|
151 | HRESULT WINAPI GetThemeSysInt(HTHEME,int,int*);
|
---|
152 | int WINAPI GetThemeSysSize(HTHEME,int);
|
---|
153 | HRESULT WINAPI GetThemeSysString(HTHEME,int,LPWSTR,int);
|
---|
154 | HRESULT WINAPI GetThemeTextExtent(HTHEME,HDC,int,int,LPCWSTR,int,DWORD,
|
---|
155 | const RECT*,RECT*);
|
---|
156 | HRESULT WINAPI GetThemeTextMetrics(HTHEME,HDC,int,int,TEXTMETRICW*);
|
---|
157 | HTHEME WINAPI GetWindowTheme(HWND);
|
---|
158 |
|
---|
159 | #define HTTB_BACKGROUNDSEG 0x0000
|
---|
160 | #define HTTB_FIXEDBORDER 0x0002
|
---|
161 | #define HTTB_CAPTION 0x0004
|
---|
162 | #define HTTB_RESIZINGBORDER_LEFT 0x0010
|
---|
163 | #define HTTB_RESIZINGBORDER_TOP 0x0020
|
---|
164 | #define HTTB_RESIZINGBORDER_RIGHT 0x0040
|
---|
165 | #define HTTB_RESIZINGBORDER_BOTTOM 0x0080
|
---|
166 | #define HTTB_RESIZINGBORDER \
|
---|
167 | (HTTB_RESIZINGBORDER_LEFT|HTTB_RESIZINGBORDER_TOP|\
|
---|
168 | HTTB_RESIZINGBORDER_RIGHT|HTTB_RESIZINGBORDER_BOTTOM)
|
---|
169 | #define HTTB_SIZINGTEMPLATE 0x0100
|
---|
170 | #define HTTB_SYSTEMSIZINGMARGINS 0x0200
|
---|
171 |
|
---|
172 | HRESULT WINAPI HitTestThemeBackground(HTHEME,HDC,int,int,DWORD,const RECT*,
|
---|
173 | HRGN,POINT,WORD*);
|
---|
174 | BOOL WINAPI IsAppThemed(void);
|
---|
175 | BOOL WINAPI IsThemeActive(void);
|
---|
176 | BOOL WINAPI IsThemeBackgroundPartiallyTransparent(HTHEME,int,int);
|
---|
177 | BOOL WINAPI IsThemeDialogTextureEnabled(HWND);
|
---|
178 | BOOL WINAPI IsThemePartDefined(HTHEME,int,int);
|
---|
179 | HTHEME WINAPI OpenThemeData(HWND,LPCWSTR);
|
---|
180 | void WINAPI SetThemeAppProperties(DWORD);
|
---|
181 | HRESULT WINAPI SetWindowTheme(HWND,LPCWSTR,LPCWSTR);
|
---|
182 |
|
---|
183 |
|
---|
184 | /* Double-buffered Drawing API */
|
---|
185 |
|
---|
186 | typedef HANDLE HPAINTBUFFER;
|
---|
187 |
|
---|
188 | HRESULT WINAPI BufferedPaintInit(VOID);
|
---|
189 | HRESULT WINAPI BufferedPaintUnInit(VOID);
|
---|
190 |
|
---|
191 | typedef enum _BP_BUFFERFORMAT
|
---|
192 | {
|
---|
193 | BPBF_COMPATIBLEBITMAP,
|
---|
194 | BPBF_DIB,
|
---|
195 | BPBF_TOPDOWNDIB,
|
---|
196 | BPBF_TOPDOWNMONODIB
|
---|
197 | } BP_BUFFERFORMAT;
|
---|
198 |
|
---|
199 | typedef struct _BP_PAINTPARAMS
|
---|
200 | {
|
---|
201 | DWORD cbSize;
|
---|
202 | DWORD dwFlags;
|
---|
203 | const RECT *prcExclude;
|
---|
204 | const BLENDFUNCTION *pBlendFunction;
|
---|
205 | } BP_PAINTPARAMS, *PBP_PAINTPARAMS;
|
---|
206 |
|
---|
207 | HPAINTBUFFER WINAPI BeginBufferedPaint(HDC, const RECT *, BP_BUFFERFORMAT,
|
---|
208 | BP_PAINTPARAMS *,HDC *);
|
---|
209 |
|
---|
210 | HRESULT WINAPI EndBufferedPaint(HPAINTBUFFER, BOOL);
|
---|
211 |
|
---|
212 | #endif
|
---|