]> git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/uxthemep.h
supporting clang memory management annotations
[wxWidgets.git] / include / wx / msw / uxthemep.h
1 /*
2 * Win32 5.1 theme definitions
3 *
4 * Copyright (C) 2003 Kevin Koltzau
5 *
6 * Originally written for the Wine project, and issued under
7 * the wxWindows licence by kind permission of the author.
8 *
9 * Licence: wxWindows licence
10 */
11
12 #ifndef __WINE_UXTHEME_H
13 #define __WINE_UXTHEME_H
14
15 #include "wx/msw/wrapcctl.h"
16
17 typedef HANDLE HTHEME;
18
19 HRESULT WINAPI CloseThemeData(HTHEME hTheme);
20 HRESULT WINAPI DrawThemeBackground(HTHEME,HDC,int,int,const RECT*,const RECT*);
21
22 #define DTBG_CLIPRECT 0x00000001
23 #define DTBG_DRAWSOLID 0x00000002
24 #define DTBG_OMITBORDER 0x00000004
25 #define DTBG_OMITCONTENT 0x00000008
26 #define DTBG_COMPUTINGREGION 0x00000010
27 #define DTBG_MIRRORDC 0x00000020
28
29 typedef struct _DTBGOPTS {
30 DWORD dwSize;
31 DWORD dwFlags;
32 RECT rcClip;
33 } DTBGOPTS, *PDTBGOPTS;
34
35 HRESULT WINAPI DrawThemeBackgroundEx(HTHEME,HDC,int,int,const RECT*,
36 const DTBGOPTS*);
37 HRESULT WINAPI DrawThemeEdge(HTHEME,HDC,int,int,const RECT*,UINT,UINT,
38 RECT*);
39 HRESULT WINAPI DrawThemeIcon(HTHEME,HDC,int,int,const RECT*,HIMAGELIST,int);
40 HRESULT WINAPI DrawThemeParentBackground(HWND,HDC,RECT*);
41
42 #define DTT_GRAYED 0x1
43
44 HRESULT WINAPI DrawThemeText(HTHEME,HDC,int,int,LPCWSTR,int,DWORD,DWORD,
45 const RECT*);
46
47 #define ETDT_DISABLE 0x00000001
48 #define ETDT_ENABLE 0x00000002
49 #define ETDT_USETABTEXTURE 0x00000004
50 #define ETDT_ENABLETAB (ETDT_ENABLE|ETDT_USETABTEXTURE)
51
52 HRESULT WINAPI EnableThemeDialogTexture(HWND,DWORD);
53 HRESULT WINAPI EnableTheming(BOOL);
54 HRESULT WINAPI GetCurrentThemeName(LPWSTR,int,LPWSTR,int,LPWSTR,int);
55
56 #define STAP_ALLOW_NONCLIENT (1<<0)
57 #define STAP_ALLOW_CONTROLS (1<<1)
58 #define STAP_ALLOW_WEBCONTENT (1<<2)
59
60 DWORD WINAPI GetThemeAppProperties(void);
61 HRESULT WINAPI GetThemeBackgroundContentRect(HTHEME,HDC,int,int,
62 const RECT*,RECT*);
63 HRESULT WINAPI GetThemeBackgroundExtent(HTHEME,HDC,int,int,const RECT*,RECT*);
64 HRESULT WINAPI GetThemeBackgroundRegion(HTHEME,HDC,int,int,const RECT*,HRGN*);
65 HRESULT WINAPI GetThemeBool(HTHEME,int,int,int,BOOL*);
66 HRESULT WINAPI GetThemeColor(HTHEME,int,int,int,COLORREF*);
67
68 #if defined(__GNUC__)
69 # define SZ_THDOCPROP_DISPLAYNAME (const WCHAR []){ 'D','i','s','p','l','a','y','N','a','m','e',0 }
70 # define SZ_THDOCPROP_CANONICALNAME (const WCHAR []){ 'T','h','e','m','e','N','a','m','e',0 }
71 # define SZ_THDOCPROP_TOOLTIP (const WCHAR []){ 'T','o','o','l','T','i','p',0 }
72 # define SZ_THDOCPROP_AUTHOR (const WCHAR []){ 'a','u','t','h','o','r',0 }
73 #else /* lif defined(_MSC_VER) */
74 # define SZ_THDOCPROP_DISPLAYNAME L"DisplayName"
75 # define SZ_THDOCPROP_CANONICALNAME L"ThemeName"
76 # define SZ_THDOCPROP_TOOLTIP L"ToolTip"
77 # define SZ_THDOCPROP_AUTHOR L"author"
78 /*
79 #else
80 static const WCHAR SZ_THDOCPROP_DISPLAYNAME[] = { 'D','i','s','p','l','a','y','N','a','m','e',0 };
81 static const WCHAR SZ_THDOCPROP_CANONICALNAME[] = { 'T','h','e','m','e','N','a','m','e',0 };
82 static const WCHAR SZ_THDOCPROP_TOOLTIP[] = { 'T','o','o','l','T','i','p',0 };
83 static const WCHAR SZ_THDOCPROP_AUTHOR[] = { 'a','u','t','h','o','r',0 };
84 */
85 #endif
86
87 HRESULT WINAPI GetThemeDocumentationProperty(LPCWSTR,LPCWSTR,LPWSTR,int);
88 HRESULT WINAPI GetThemeEnumValue(HTHEME,int,int,int,int*);
89 HRESULT WINAPI GetThemeFilename(HTHEME,int,int,int,LPWSTR,int);
90 HRESULT WINAPI GetThemeFont(HTHEME,HDC,int,int,int,LOGFONTW*);
91 HRESULT WINAPI GetThemeInt(HTHEME,int,int,int,int*);
92
93 #define MAX_INTLIST_COUNT 10
94 typedef struct _INTLIST {
95 int iValueCount;
96 int iValues[MAX_INTLIST_COUNT];
97 } INTLIST, *PINTLIST;
98
99 HRESULT WINAPI GetThemeIntList(HTHEME,int,int,int,INTLIST*);
100
101 typedef struct _MARGINS {
102 int cxLeftWidth;
103 int cxRightWidth;
104 int cyTopHeight;
105 int cyBottomHeight;
106 } MARGINS, *PMARGINS;
107
108 HRESULT WINAPI GetThemeMargins(HTHEME,HDC,int,int,int,RECT*,MARGINS*);
109 HRESULT WINAPI GetThemeMetric(HTHEME,HDC,int,int,int,int*);
110
111 typedef enum {
112 TS_MIN,
113 TS_TRUE,
114 TS_DRAW
115 } THEMESIZE;
116
117 HRESULT WINAPI GetThemePartSize(HTHEME,HDC,int,int,RECT*,THEMESIZE,SIZE*);
118 HRESULT WINAPI GetThemePosition(HTHEME,int,int,int,POINT*);
119
120 typedef enum {
121 PO_STATE,
122 PO_PART,
123 PO_CLASS,
124 PO_GLOBAL,
125 PO_NOTFOUND
126 } PROPERTYORIGIN;
127
128 HRESULT WINAPI GetThemePropertyOrigin(HTHEME,int,int,int,PROPERTYORIGIN*);
129 HRESULT WINAPI GetThemeRect(HTHEME,int,int,int,RECT*);
130 HRESULT WINAPI GetThemeString(HTHEME,int,int,int,LPWSTR,int);
131 BOOL WINAPI GetThemeSysBool(HTHEME,int);
132 COLORREF WINAPI GetThemeSysColor(HTHEME,int);
133 HBRUSH WINAPI GetThemeSysColorBrush(HTHEME,int);
134 HRESULT WINAPI GetThemeSysFont(HTHEME,int,LOGFONTW*);
135 HRESULT WINAPI GetThemeSysInt(HTHEME,int,int*);
136 int WINAPI GetThemeSysSize(HTHEME,int);
137 HRESULT WINAPI GetThemeSysString(HTHEME,int,LPWSTR,int);
138 HRESULT WINAPI GetThemeTextExtent(HTHEME,HDC,int,int,LPCWSTR,int,DWORD,
139 const RECT*,RECT*);
140 HRESULT WINAPI GetThemeTextMetrics(HTHEME,HDC,int,int,TEXTMETRICW*);
141 HTHEME WINAPI GetWindowTheme(HWND);
142
143 #define HTTB_BACKGROUNDSEG 0x0000
144 #define HTTB_FIXEDBORDER 0x0002
145 #define HTTB_CAPTION 0x0004
146 #define HTTB_RESIZINGBORDER_LEFT 0x0010
147 #define HTTB_RESIZINGBORDER_TOP 0x0020
148 #define HTTB_RESIZINGBORDER_RIGHT 0x0040
149 #define HTTB_RESIZINGBORDER_BOTTOM 0x0080
150 #define HTTB_RESIZINGBORDER \
151 (HTTB_RESIZINGBORDER_LEFT|HTTB_RESIZINGBORDER_TOP|\
152 HTTB_RESIZINGBORDER_RIGHT|HTTB_RESIZINGBORDER_BOTTOM)
153 #define HTTB_SIZINGTEMPLATE 0x0100
154 #define HTTB_SYSTEMSIZINGMARGINS 0x0200
155
156 HRESULT WINAPI HitTestThemeBackground(HTHEME,HDC,int,int,DWORD,const RECT*,
157 HRGN,POINT,WORD*);
158 BOOL WINAPI IsAppThemed(void);
159 BOOL WINAPI IsThemeActive(void);
160 BOOL WINAPI IsThemeBackgroundPartiallyTransparent(HTHEME,int,int);
161 BOOL WINAPI IsThemeDialogTextureEnabled(void);
162 BOOL WINAPI IsThemePartDefined(HTHEME,int,int);
163 HTHEME WINAPI OpenThemeData(HWND,LPCWSTR);
164 void WINAPI SetThemeAppProperties(DWORD);
165 HRESULT WINAPI SetWindowTheme(HWND,LPCWSTR,LPCWSTR);
166
167
168 #endif
169