]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/msw/uxthemep.h
Implement HasSelection for the OSX WebKit backend.
[wxWidgets.git] / include / wx / msw / uxthemep.h
... / ...
CommitLineData
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
17typedef HANDLE HTHEME;
18
19HRESULT WINAPI CloseThemeData(HTHEME hTheme);
20HRESULT 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
29typedef struct _DTBGOPTS {
30 DWORD dwSize;
31 DWORD dwFlags;
32 RECT rcClip;
33} DTBGOPTS, *PDTBGOPTS;
34
35HRESULT WINAPI DrawThemeBackgroundEx(HTHEME,HDC,int,int,const RECT*,
36 const DTBGOPTS*);
37HRESULT WINAPI DrawThemeEdge(HTHEME,HDC,int,int,const RECT*,UINT,UINT,
38 RECT*);
39HRESULT WINAPI DrawThemeIcon(HTHEME,HDC,int,int,const RECT*,HIMAGELIST,int);
40HRESULT WINAPI DrawThemeParentBackground(HWND,HDC,RECT*);
41
42#define DTT_GRAYED 0x1
43
44HRESULT 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
52HRESULT WINAPI EnableThemeDialogTexture(HWND,DWORD);
53HRESULT WINAPI EnableTheming(BOOL);
54HRESULT 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
60DWORD WINAPI GetThemeAppProperties(void);
61HRESULT WINAPI GetThemeBackgroundContentRect(HTHEME,HDC,int,int,
62 const RECT*,RECT*);
63HRESULT WINAPI GetThemeBackgroundExtent(HTHEME,HDC,int,int,const RECT*,RECT*);
64HRESULT WINAPI GetThemeBackgroundRegion(HTHEME,HDC,int,int,const RECT*,HRGN*);
65HRESULT WINAPI GetThemeBool(HTHEME,int,int,int,BOOL*);
66HRESULT 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
80static const WCHAR SZ_THDOCPROP_DISPLAYNAME[] = { 'D','i','s','p','l','a','y','N','a','m','e',0 };
81static const WCHAR SZ_THDOCPROP_CANONICALNAME[] = { 'T','h','e','m','e','N','a','m','e',0 };
82static const WCHAR SZ_THDOCPROP_TOOLTIP[] = { 'T','o','o','l','T','i','p',0 };
83static const WCHAR SZ_THDOCPROP_AUTHOR[] = { 'a','u','t','h','o','r',0 };
84*/
85#endif
86
87HRESULT WINAPI GetThemeDocumentationProperty(LPCWSTR,LPCWSTR,LPWSTR,int);
88HRESULT WINAPI GetThemeEnumValue(HTHEME,int,int,int,int*);
89HRESULT WINAPI GetThemeFilename(HTHEME,int,int,int,LPWSTR,int);
90HRESULT WINAPI GetThemeFont(HTHEME,HDC,int,int,int,LOGFONTW*);
91HRESULT WINAPI GetThemeInt(HTHEME,int,int,int,int*);
92
93#define MAX_INTLIST_COUNT 10
94typedef struct _INTLIST {
95 int iValueCount;
96 int iValues[MAX_INTLIST_COUNT];
97} INTLIST, *PINTLIST;
98
99HRESULT WINAPI GetThemeIntList(HTHEME,int,int,int,INTLIST*);
100
101typedef struct _MARGINS {
102 int cxLeftWidth;
103 int cxRightWidth;
104 int cyTopHeight;
105 int cyBottomHeight;
106} MARGINS, *PMARGINS;
107
108HRESULT WINAPI GetThemeMargins(HTHEME,HDC,int,int,int,RECT*,MARGINS*);
109HRESULT WINAPI GetThemeMetric(HTHEME,HDC,int,int,int,int*);
110
111typedef enum {
112 TS_MIN,
113 TS_TRUE,
114 TS_DRAW
115} THEMESIZE;
116
117HRESULT WINAPI GetThemePartSize(HTHEME,HDC,int,int,RECT*,THEMESIZE,SIZE*);
118HRESULT WINAPI GetThemePosition(HTHEME,int,int,int,POINT*);
119
120typedef enum {
121 PO_STATE,
122 PO_PART,
123 PO_CLASS,
124 PO_GLOBAL,
125 PO_NOTFOUND
126} PROPERTYORIGIN;
127
128HRESULT WINAPI GetThemePropertyOrigin(HTHEME,int,int,int,PROPERTYORIGIN*);
129HRESULT WINAPI GetThemeRect(HTHEME,int,int,int,RECT*);
130HRESULT WINAPI GetThemeString(HTHEME,int,int,int,LPWSTR,int);
131BOOL WINAPI GetThemeSysBool(HTHEME,int);
132COLORREF WINAPI GetThemeSysColor(HTHEME,int);
133HBRUSH WINAPI GetThemeSysColorBrush(HTHEME,int);
134HRESULT WINAPI GetThemeSysFont(HTHEME,int,LOGFONTW*);
135HRESULT WINAPI GetThemeSysInt(HTHEME,int,int*);
136int WINAPI GetThemeSysSize(HTHEME,int);
137HRESULT WINAPI GetThemeSysString(HTHEME,int,LPWSTR,int);
138HRESULT WINAPI GetThemeTextExtent(HTHEME,HDC,int,int,LPCWSTR,int,DWORD,
139 const RECT*,RECT*);
140HRESULT WINAPI GetThemeTextMetrics(HTHEME,HDC,int,int,TEXTMETRICW*);
141HTHEME 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
156HRESULT WINAPI HitTestThemeBackground(HTHEME,HDC,int,int,DWORD,const RECT*,
157 HRGN,POINT,WORD*);
158BOOL WINAPI IsAppThemed(void);
159BOOL WINAPI IsThemeActive(void);
160BOOL WINAPI IsThemeBackgroundPartiallyTransparent(HTHEME,int,int);
161BOOL WINAPI IsThemeDialogTextureEnabled(void);
162BOOL WINAPI IsThemePartDefined(HTHEME,int,int);
163HTHEME WINAPI OpenThemeData(HWND,LPCWSTR);
164void WINAPI SetThemeAppProperties(DWORD);
165HRESULT WINAPI SetWindowTheme(HWND,LPCWSTR,LPCWSTR);
166
167
168#endif
169