Moved the pthread emulation into the main binary so that we don't need
[wine] / include / uxtheme.h
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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  */
20
21 #ifndef __WINE_UXTHEME_H
22 #define __WINE_UXTHEME_H
23
24 #include <commctrl.h>
25
26 typedef HANDLE HTHEME;
27
28 HRESULT WINAPI CloseThemeData(HTHEME hTheme);
29 HRESULT WINAPI DrawThemeBackground(HTHEME,HDC,int,int,const RECT*,const RECT*);
30
31 typedef struct _DTBGOPTS {
32     DWORD dwSize;
33     DWORD dwFlags;
34     RECT rcClip;
35 } DTBGOPTS, *PDTBGOPTS;
36
37 HRESULT WINAPI DrawThemeBackgroundEx(HTHEME,HDC,int,int,const RECT*,
38                                      const DTBGOPTS*);
39 HRESULT WINAPI DrawThemeEdge(HTHEME,HDC,int,int,const RECT*,UINT,UINT,
40                              RECT*);
41 HRESULT WINAPI DrawThemeIcon(HTHEME,HDC,int,int,const RECT*,HIMAGELIST,int);
42 HRESULT WINAPI DrawThemeParentBackground(HWND,HDC,RECT*);
43
44 #define DTT_GRAYED      0x1
45
46 HRESULT WINAPI DrawThemeText(HTHEME,HDC,int,int,LPCWSTR,int,DWORD,DWORD,
47                              const RECT*);
48
49 #define ETDT_DISABLE       0x00000001
50 #define ETDT_ENABLE        0x00000002
51 #define ETDT_USETABTEXTURE 0x00000004
52 #define ETDT_ENABLETAB     (ETDT_ENABLE|ETDT_USETABTEXTURE)
53
54 HRESULT WINAPI EnableThemeDialogTexture(HWND,DWORD);
55 HRESULT WINAPI EnableTheming(BOOL);
56 HRESULT WINAPI GetCurrentThemeName(LPWSTR,int,LPWSTR,int,LPWSTR,int);
57
58 #define STAP_ALLOW_NONCLIENT    (1<<0)
59 #define STAP_ALLOW_CONTROLS     (1<<1)
60 #define STAP_ALLOW_WEBCONTENT   (1<<2)
61
62 DWORD WINAPI GetThemeAppProperties();
63 HRESULT WINAPI GetThemeBackgroundContentRect(HTHEME,HDC,int,int,
64                                              const RECT*,RECT*);
65 HRESULT WINAPI GetThemeBackgroundExtent(HTHEME,HDC,int,int,const RECT*,RECT*);
66 HRESULT WINAPI GetThemeBackgroundRegion(HTHEME,HDC,int,int,const RECT*,HRGN*);
67 HRESULT WINAPI GetThemeBool(HTHEME,int,int,int,BOOL*);
68 HRESULT WINAPI GetThemeColor(HTHEME,int,int,int,COLORREF*);
69
70 #define SZ_THDOCPROP_DISPLAYNAME   L"DisplayName"
71 #define SZ_THDOCPROP_CANONICALNAME L"ThemeName"
72 #define SZ_THDOCPROP_TOOLTIP       L"ToolTip"
73 #define SZ_THDOCPROP_AUTHOR        L"author"
74
75 HRESULT WINAPI GetThemeDocumentationProperty(LPCWSTR,LPCWSTR,LPWSTR,int);
76 HRESULT WINAPI GetThemeEnumValue(HTHEME,int,int,int,int*);
77 HRESULT WINAPI GetThemeFilename(HTHEME,int,int,int,LPWSTR,int);
78 HRESULT WINAPI GetThemeFont(HTHEME,HDC,int,int,int,LOGFONTW*);
79 HRESULT WINAPI GetThemeInt(HTHEME,int,int,int,int*);
80
81 #define MAX_INTLIST_COUNT 10
82 typedef struct _INTLIST {
83     int iValueCount;
84     int iValues[MAX_INTLIST_COUNT];
85 } INTLIST, *PINTLIST;
86
87 HRESULT WINAPI GetThemeIntList(HTHEME,int,int,int,INTLIST*);
88
89 typedef struct _MARGINS {
90     int cxLeftWidth;
91     int cxRightWidth;
92     int cyTopHeight;
93     int cyBottomHeight;
94 } MARGINS, *PMARGINS;
95
96 HRESULT WINAPI GetThemeMargins(HTHEME,HDC,int,int,int,RECT*,MARGINS*);
97 HRESULT WINAPI GetThemeMetric(HTHEME,HDC,int,int,int,int*);
98
99 typedef enum {
100     TS_MIN,
101     TS_TRUE,
102     TS_DRAW
103 } THEMESIZE;
104
105 HRESULT WINAPI GetThemePartSize(HTHEME,HDC,int,int,RECT*,THEMESIZE,SIZE*);
106 HRESULT WINAPI GetThemePosition(HTHEME,int,int,int,POINT*);
107
108 typedef enum {
109     PO_STATE,
110     PO_PART,
111     PO_CLASS,
112     PO_GLOBAL,
113     PO_NOTFOUND
114 } PROPERTYORIGIN;
115
116 HRESULT WINAPI GetThemePropertyOrigin(HTHEME,int,int,int,PROPERTYORIGIN*);
117 HRESULT WINAPI GetThemeRect(HTHEME,int,int,int,RECT*);
118 HRESULT WINAPI GetThemeString(HTHEME,int,int,int,LPWSTR,int);
119 BOOL WINAPI GetThemeSysBool(HTHEME,int);
120 COLORREF WINAPI GetThemeSysColor(HTHEME,int);
121 HBRUSH WINAPI GetThemeSysColorBrush(HTHEME,int);
122 HRESULT WINAPI GetThemeSysFont(HTHEME,int,LOGFONTW*);
123 HRESULT WINAPI GetThemeSysInt(HTHEME,int,int*);
124 int WINAPI GetThemeSysSize(HTHEME,int);
125 HRESULT WINAPI GetThemeSysString(HTHEME,int,LPWSTR,int);
126 HRESULT WINAPI GetThemeTextExtent(HTHEME,HDC,int,int,LPCWSTR,int,DWORD,
127                                   const RECT*,RECT*);
128 HRESULT WINAPI GetThemeTextMetrics(HTHEME,HDC,int,int,TEXTMETRICW*);
129 HTHEME WINAPI GetWindowTheme(HWND);
130
131 #define HTTB_BACKGROUNDSEG          0x0000
132 #define HTTB_FIXEDBORDER            0x0002
133 #define HTTB_CAPTION                0x0004
134 #define HTTB_RESIZINGBORDER_LEFT    0x0010
135 #define HTTB_RESIZINGBORDER_TOP     0x0020
136 #define HTTB_RESIZINGBORDER_RIGHT   0x0040
137 #define HTTB_RESIZINGBORDER_BOTTOM  0x0080
138 #define HTTB_RESIZINGBORDER \
139     (HTTB_RESIZINGBORDER_LEFT|HTTB_RESIZINGBORDER_TOP|\
140      HTTB_RESIZINGBORDER_RIGHT|HTTB_RESIZINGBORDER_BOTTOM)
141 #define HTTB_SIZINGTEMPLATE         0x0100
142 #define HTTB_SYSTEMSIZINGMARGINS    0x0200
143
144 HRESULT WINAPI HitTestThemeBackground(HTHEME,HDC,int,int,DWORD,const RECT*,
145                                       HRGN,POINT,WORD*);
146 BOOL WINAPI IsAppThemed();
147 BOOL WINAPI IsThemeActive();
148 BOOL WINAPI IsThemeBackgroundPartiallyTransparent(HTHEME,int,int);
149 BOOL WINAPI IsThemeDialogTextureEnabled();
150 BOOL WINAPI IsThemePartDefined(HTHEME,int,int);
151 HTHEME WINAPI OpenThemeData(HWND,LPCWSTR);
152 void WINAPI SetThemeAppProperties(DWORD);
153 HRESULT WINAPI SetWindowTheme(HWND,LPCWSTR,LPCWSTR);
154
155
156 #endif