riched20: Implement Start/End properties for ranges.
[wine.git] / include / uxtheme.h
blobe167d80aa519ae0097a36e2d794c7074f64dbdae
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 #define ETDT_DISABLE 0x00000001
57 #define ETDT_ENABLE 0x00000002
58 #define ETDT_USETABTEXTURE 0x00000004
59 #define ETDT_ENABLETAB (ETDT_ENABLE|ETDT_USETABTEXTURE)
61 HRESULT WINAPI EnableThemeDialogTexture(HWND,DWORD);
62 HRESULT WINAPI EnableTheming(BOOL);
63 HRESULT WINAPI GetCurrentThemeName(LPWSTR,int,LPWSTR,int,LPWSTR,int);
65 #define STAP_ALLOW_NONCLIENT (1<<0)
66 #define STAP_ALLOW_CONTROLS (1<<1)
67 #define STAP_ALLOW_WEBCONTENT (1<<2)
69 DWORD WINAPI GetThemeAppProperties(void);
70 HRESULT WINAPI GetThemeBackgroundContentRect(HTHEME,HDC,int,int,
71 const RECT*,RECT*);
72 HRESULT WINAPI GetThemeBackgroundExtent(HTHEME,HDC,int,int,const RECT*,RECT*);
73 HRESULT WINAPI GetThemeBackgroundRegion(HTHEME,HDC,int,int,const RECT*,HRGN*);
74 HRESULT WINAPI GetThemeBool(HTHEME,int,int,int,BOOL*);
75 HRESULT WINAPI GetThemeColor(HTHEME,int,int,int,COLORREF*);
77 #if defined(__GNUC__)
78 # define SZ_THDOCPROP_DISPLAYNAME (const WCHAR []){ 'D','i','s','p','l','a','y','N','a','m','e',0 }
79 # define SZ_THDOCPROP_CANONICALNAME (const WCHAR []){ 'T','h','e','m','e','N','a','m','e',0 }
80 # define SZ_THDOCPROP_TOOLTIP (const WCHAR []){ 'T','o','o','l','T','i','p',0 }
81 # define SZ_THDOCPROP_AUTHOR (const WCHAR []){ 'a','u','t','h','o','r',0 }
82 #elif defined(_MSC_VER)
83 # define SZ_THDOCPROP_DISPLAYNAME L"DisplayName"
84 # define SZ_THDOCPROP_CANONICALNAME L"ThemeName"
85 # define SZ_THDOCPROP_TOOLTIP L"ToolTip"
86 # define SZ_THDOCPROP_AUTHOR L"author"
87 #else
88 static const WCHAR SZ_THDOCPROP_DISPLAYNAME[] = { 'D','i','s','p','l','a','y','N','a','m','e',0 };
89 static const WCHAR SZ_THDOCPROP_CANONICALNAME[] = { 'T','h','e','m','e','N','a','m','e',0 };
90 static const WCHAR SZ_THDOCPROP_TOOLTIP[] = { 'T','o','o','l','T','i','p',0 };
91 static const WCHAR SZ_THDOCPROP_AUTHOR[] = { 'a','u','t','h','o','r',0 };
92 #endif
94 HRESULT WINAPI GetThemeDocumentationProperty(LPCWSTR,LPCWSTR,LPWSTR,int);
95 HRESULT WINAPI GetThemeEnumValue(HTHEME,int,int,int,int*);
96 HRESULT WINAPI GetThemeFilename(HTHEME,int,int,int,LPWSTR,int);
97 HRESULT WINAPI GetThemeFont(HTHEME,HDC,int,int,int,LOGFONTW*);
98 HRESULT WINAPI GetThemeInt(HTHEME,int,int,int,int*);
100 /* MAX_INTLIST_COUNT was 10 before Vista */
101 #define MAX_INTLIST_COUNT 402
102 typedef struct _INTLIST {
103 int iValueCount;
104 int iValues[MAX_INTLIST_COUNT];
105 } INTLIST, *PINTLIST;
107 HRESULT WINAPI GetThemeIntList(HTHEME,int,int,int,INTLIST*);
109 typedef struct _MARGINS {
110 int cxLeftWidth;
111 int cxRightWidth;
112 int cyTopHeight;
113 int cyBottomHeight;
114 } MARGINS, *PMARGINS;
116 HRESULT WINAPI GetThemeMargins(HTHEME,HDC,int,int,int,RECT*,MARGINS*);
117 HRESULT WINAPI GetThemeMetric(HTHEME,HDC,int,int,int,int*);
119 typedef enum {
120 TS_MIN,
121 TS_TRUE,
122 TS_DRAW
123 } THEMESIZE;
125 HRESULT WINAPI GetThemePartSize(HTHEME,HDC,int,int,RECT*,THEMESIZE,SIZE*);
126 HRESULT WINAPI GetThemePosition(HTHEME,int,int,int,POINT*);
128 typedef enum {
129 PO_STATE,
130 PO_PART,
131 PO_CLASS,
132 PO_GLOBAL,
133 PO_NOTFOUND
134 } PROPERTYORIGIN;
136 HRESULT WINAPI GetThemePropertyOrigin(HTHEME,int,int,int,PROPERTYORIGIN*);
137 HRESULT WINAPI GetThemeRect(HTHEME,int,int,int,RECT*);
138 HRESULT WINAPI GetThemeString(HTHEME,int,int,int,LPWSTR,int);
139 BOOL WINAPI GetThemeSysBool(HTHEME,int);
140 COLORREF WINAPI GetThemeSysColor(HTHEME,int);
141 HBRUSH WINAPI GetThemeSysColorBrush(HTHEME,int);
142 HRESULT WINAPI GetThemeSysFont(HTHEME,int,LOGFONTW*);
143 HRESULT WINAPI GetThemeSysInt(HTHEME,int,int*);
144 int WINAPI GetThemeSysSize(HTHEME,int);
145 HRESULT WINAPI GetThemeSysString(HTHEME,int,LPWSTR,int);
146 HRESULT WINAPI GetThemeTextExtent(HTHEME,HDC,int,int,LPCWSTR,int,DWORD,
147 const RECT*,RECT*);
148 HRESULT WINAPI GetThemeTextMetrics(HTHEME,HDC,int,int,TEXTMETRICW*);
149 HRESULT WINAPI GetThemeTransitionDuration(HTHEME,int,int,int,int,DWORD*);
150 HTHEME WINAPI GetWindowTheme(HWND);
152 #define HTTB_BACKGROUNDSEG 0x0000
153 #define HTTB_FIXEDBORDER 0x0002
154 #define HTTB_CAPTION 0x0004
155 #define HTTB_RESIZINGBORDER_LEFT 0x0010
156 #define HTTB_RESIZINGBORDER_TOP 0x0020
157 #define HTTB_RESIZINGBORDER_RIGHT 0x0040
158 #define HTTB_RESIZINGBORDER_BOTTOM 0x0080
159 #define HTTB_RESIZINGBORDER \
160 (HTTB_RESIZINGBORDER_LEFT|HTTB_RESIZINGBORDER_TOP|\
161 HTTB_RESIZINGBORDER_RIGHT|HTTB_RESIZINGBORDER_BOTTOM)
162 #define HTTB_SIZINGTEMPLATE 0x0100
163 #define HTTB_SYSTEMSIZINGMARGINS 0x0200
165 #define OTD_FORCE_RECT_SIZING 0x0001
166 #define OTD_NONCLIENT 0x0002
167 #define OTD_VALIDBITS (OTD_FORCE_RECT_SIZING | OTD_NONCLIENT)
169 HRESULT WINAPI HitTestThemeBackground(HTHEME,HDC,int,int,DWORD,const RECT*,
170 HRGN,POINT,WORD*);
171 BOOL WINAPI IsAppThemed(void);
172 BOOL WINAPI IsThemeActive(void);
173 BOOL WINAPI IsThemeBackgroundPartiallyTransparent(HTHEME,int,int);
174 BOOL WINAPI IsThemeDialogTextureEnabled(HWND);
175 BOOL WINAPI IsThemePartDefined(HTHEME,int,int);
176 HTHEME WINAPI OpenThemeData(HWND,LPCWSTR);
177 HTHEME WINAPI OpenThemeDataEx(HWND,LPCWSTR,DWORD);
178 void WINAPI SetThemeAppProperties(DWORD);
179 HRESULT WINAPI SetWindowTheme(HWND,LPCWSTR,LPCWSTR);
182 /* Double-buffered Drawing API */
184 typedef HANDLE HPAINTBUFFER;
186 HRESULT WINAPI BufferedPaintInit(VOID);
187 HRESULT WINAPI BufferedPaintUnInit(VOID);
189 typedef enum _BP_BUFFERFORMAT
191 BPBF_COMPATIBLEBITMAP,
192 BPBF_DIB,
193 BPBF_TOPDOWNDIB,
194 BPBF_TOPDOWNMONODIB
195 } BP_BUFFERFORMAT;
197 typedef struct _BP_PAINTPARAMS
199 DWORD cbSize;
200 DWORD dwFlags;
201 const RECT *prcExclude;
202 const BLENDFUNCTION *pBlendFunction;
203 } BP_PAINTPARAMS, *PBP_PAINTPARAMS;
205 HPAINTBUFFER WINAPI BeginBufferedPaint(HDC, const RECT *, BP_BUFFERFORMAT,
206 BP_PAINTPARAMS *,HDC *);
208 HRESULT WINAPI EndBufferedPaint(HPAINTBUFFER, BOOL);
210 HRESULT WINAPI BufferedPaintClear(HPAINTBUFFER, const RECT *);
211 HRESULT WINAPI BufferedPaintSetAlpha(HPAINTBUFFER, const RECT *, BYTE);
212 HRESULT WINAPI GetBufferedPaintBits(HPAINTBUFFER, RGBQUAD **, int *);
213 HDC WINAPI GetBufferedPaintDC(HPAINTBUFFER);
214 HDC WINAPI GetBufferedPaintTargetDC(HPAINTBUFFER);
215 HRESULT WINAPI GetBufferedPaintTargetRect(HPAINTBUFFER, RECT *prc);
217 /* double-buffered animation functions */
219 typedef HANDLE HANIMATIONBUFFER;
221 typedef enum _BP_ANIMATIONSTYLE
223 BPAS_NONE,
224 BPAS_LINEAR,
225 BPAS_CUBIC,
226 BPAS_SINE
227 } BP_ANIMATIONSTYLE;
229 typedef struct _BP_ANIMATIONPARAMS
231 DWORD cbSize;
232 DWORD dwFlags;
233 BP_ANIMATIONSTYLE style;
234 DWORD dwDuration;
235 } BP_ANIMATIONPARAMS, *PBP_ANIMATIONPARAMS;
237 HANIMATIONBUFFER WINAPI BeginBufferedAnimation(HWND, HDC, const RECT *,
238 BP_BUFFERFORMAT, BP_PAINTPARAMS *,
239 BP_ANIMATIONPARAMS *, HDC *, HDC *);
241 BOOL WINAPI BufferedPaintRenderAnimation(HWND, HDC);
242 HRESULT WINAPI BufferedPaintStopAllAnimations(HWND);
243 HRESULT WINAPI EndBufferedAnimation(HANIMATIONBUFFER, BOOL);
245 #endif