- Bugfix: Styles were evaluated as expressions. The NOT in combination
[wine.git] / include / prsht.h
blobd9d6ce74fed8e61c7591ddea70506840bd6b97a0
1 #ifndef __WINE_PRSHT_H
2 #define __WINE_PRSHT_H
4 #include "winuser.h"
6 #ifdef __cplusplus
7 extern "C" {
8 #endif
12 * Property sheet support (callback procs)
16 #define WC_PROPSHEETA "SysPropertySheet"
17 #define WC_PROPSHEETW L"SysPropertySheet"
18 #define WC_PROPSHEET WINELIB_NAME_AW(WC_PROPSHEET)
20 struct _PROPSHEETPAGEA; /** need to forward declare those structs **/
21 struct _PROPSHEETPAGEW;
22 struct _PSP;
23 typedef struct _PSP *HPROPSHEETPAGE;
26 typedef UINT (CALLBACK *LPFNPSPCALLBACKA)(HWND, UINT, struct _PROPSHEETPAGEA*);
27 typedef UINT (CALLBACK *LPFNPSPCALLBACKW)(HWND, UINT, struct _PROPSHEETPAGEW*);
28 typedef INT (CALLBACK *PFNPROPSHEETCALLBACK)(HWND, UINT, LPARAM);
29 typedef BOOL (CALLBACK *LPFNADDPROPSHEETPAGE)(HPROPSHEETPAGE, LPARAM);
30 typedef BOOL (CALLBACK *LPFNADDPROPSHEETPAGES)(LPVOID, LPFNADDPROPSHEETPAGE, LPARAM);
33 * Property sheet support (structures)
35 typedef struct _PROPSHEETPAGEA
37 DWORD dwSize;
38 DWORD dwFlags;
39 HINSTANCE hInstance;
40 union
42 LPCSTR pszTemplate;
43 LPCDLGTEMPLATEA pResource;
44 }DUMMYUNIONNAME1;
45 union
47 HICON hIcon;
48 LPCSTR pszIcon;
49 }DUMMYUNIONNAME2;
50 LPCSTR pszTitle;
51 DLGPROC pfnDlgProc;
52 LPARAM lParam;
53 LPFNPSPCALLBACKA pfnCallback;
54 UINT* pcRefParent;
55 LPCWSTR pszHeaderTitle;
56 LPCWSTR pszHeaderSubTitle;
57 } PROPSHEETPAGEA, *LPPROPSHEETPAGEA;
59 typedef const PROPSHEETPAGEA *LPCPROPSHEETPAGEA;
61 typedef struct _PROPSHEETPAGEW
63 DWORD dwSize;
64 DWORD dwFlags;
65 HINSTANCE hInstance;
66 union
68 LPCWSTR pszTemplate;
69 LPCDLGTEMPLATEW pResource;
70 }DUMMYUNIONNAME1;
71 union
73 HICON hIcon;
74 LPCWSTR pszIcon;
75 }DUMMYUNIONNAME2;
76 LPCWSTR pszTitle;
77 DLGPROC pfnDlgProc;
78 LPARAM lParam;
79 LPFNPSPCALLBACKW pfnCallback;
80 UINT* pcRefParent;
81 LPCWSTR pszHeaderTitle;
82 LPCWSTR pszHeaderSubTitle;
83 } PROPSHEETPAGEW, *LPPROPSHEETPAGEW;
85 typedef const PROPSHEETPAGEW *LPCPROPSHEETPAGEW;
88 typedef struct _PROPSHEETHEADERA
90 DWORD dwSize;
91 DWORD dwFlags;
92 HWND hwndParent;
93 HINSTANCE hInstance;
94 union
96 HICON hIcon;
97 LPCSTR pszIcon;
98 }DUMMYUNIONNAME1;
99 LPCSTR pszCaption;
100 UINT nPages;
101 union
103 UINT nStartPage;
104 LPCSTR pStartPage;
105 }DUMMYUNIONNAME2;
106 union
108 LPCPROPSHEETPAGEA ppsp;
109 HPROPSHEETPAGE* phpage;
110 }DUMMYUNIONNAME3;
111 PFNPROPSHEETCALLBACK pfnCallback;
112 union
114 HBITMAP hbmWatermark;
115 LPCSTR pszbmWatermark;
116 }DUMMYUNIONNAME4;
117 HPALETTE hplWatermark;
118 union
120 HBITMAP hbmHeader;
121 LPCSTR pszbmHeader;
122 }DUMMYUNIONNAME5;
123 } PROPSHEETHEADERA, *LPPROPSHEETHEADERA;
125 typedef const PROPSHEETHEADERA *LPCPROPSHEETHEADERA;
127 typedef struct _PROPSHEETHEADERW
129 DWORD dwSize;
130 DWORD dwFlags;
131 HWND hwndParent;
132 HINSTANCE hInstance;
133 union
135 HICON hIcon;
136 LPCSTR pszIcon;
137 }DUMMYUNIONNAME1;
138 LPCWSTR pszCaption;
139 UINT nPages;
140 union
142 UINT nStartPage;
143 LPCWSTR pStartPage;
144 }DUMMYUNIONNAME2;
145 union
147 LPCPROPSHEETPAGEW ppsp;
148 HPROPSHEETPAGE* phpage;
149 }DUMMYUNIONNAME3;
150 PFNPROPSHEETCALLBACK pfnCallback;
151 union
153 HBITMAP hbmWatermark;
154 LPCWSTR pszbmWatermark;
155 }DUMMYUNIONNAME4;
156 HPALETTE hplWatermark;
157 union
159 HBITMAP hbmHeader;
160 LPCWSTR pszbmHeader;
161 }DUMMYUNIONNAME5;
162 } PROPSHEETHEADERW, *LPPROPSHEETHEADERW;
164 typedef const PROPSHEETHEADERW *LPCPROPSHEETHEADERW;
168 * Property sheet support (methods)
170 INT WINAPI PropertySheetA(LPCPROPSHEETHEADERA);
171 INT WINAPI PropertySheetW(LPCPROPSHEETHEADERW);
172 #define PropertySheet WINELIB_NAME_AW(PropertySheet)
173 HPROPSHEETPAGE WINAPI CreatePropertySheetPageA(LPCPROPSHEETPAGEA);
174 HPROPSHEETPAGE WINAPI CreatePropertySheetPageW(LPCPROPSHEETPAGEW);
175 #define CreatePropertySheetPage WINELIB_NAME_AW(CreatePropertySheetPage)
176 BOOL WINAPI DestroyPropertySheetPage(HPROPSHEETPAGE hPropPage);
179 * Property sheet support (UNICODE-WineLib)
182 DECL_WINELIB_TYPE_AW(PROPSHEETPAGE)
183 DECL_WINELIB_TYPE_AW(LPPROPSHEETPAGE)
184 DECL_WINELIB_TYPE_AW(LPCPROPSHEETPAGE)
185 DECL_WINELIB_TYPE_AW(PROPSHEETHEADER)
186 DECL_WINELIB_TYPE_AW(LPPROPSHEETHEADER)
187 DECL_WINELIB_TYPE_AW(LPCPROPSHEETHEADER)
188 DECL_WINELIB_TYPE_AW(LPFNPSPCALLBACK)
192 * Property sheet support (defines)
194 #define PSP_DEFAULT 0x0000
195 #define PSP_DLGINDIRECT 0x0001
196 #define PSP_USEHICON 0x0002
197 #define PSP_USEICONID 0x0004
198 #define PSP_USETITLE 0x0008
199 #define PSP_RTLREADING 0x0010
201 #define PSP_HASHELP 0x0020
202 #define PSP_USEREFPARENT 0x0040
203 #define PSP_USECALLBACK 0x0080
206 #define PSPCB_RELEASE 1
207 #define PSPCB_CREATE 2
209 #define PSH_DEFAULT 0x0000
210 #define PSH_PROPTITLE 0x0001
211 #define PSH_USEHICON 0x0002
212 #define PSH_USEICONID 0x0004
213 #define PSH_PROPSHEETPAGE 0x0008
214 #define PSH_WIZARD 0x0020
215 #define PSH_USEPSTARTPAGE 0x0040
216 #define PSH_NOAPPLYNOW 0x0080
217 #define PSH_USECALLBACK 0x0100
218 #define PSH_HASHELP 0x0200
219 #define PSH_MODELESS 0x0400
220 #define PSH_RTLREADING 0x0800
222 #define PSCB_INITIALIZED 1
223 #define PSCB_PRECREATE 2
225 #define PSN_FIRST (0U-200U)
226 #define PSN_LAST (0U-299U)
229 #define PSN_SETACTIVE (PSN_FIRST-0)
230 #define PSN_KILLACTIVE (PSN_FIRST-1)
231 /* #define PSN_VALIDATE (PSN_FIRST-1) */
232 #define PSN_APPLY (PSN_FIRST-2)
233 #define PSN_RESET (PSN_FIRST-3)
234 /* #define PSN_CANCEL (PSN_FIRST-3) */
235 #define PSN_HELP (PSN_FIRST-5)
236 #define PSN_WIZBACK (PSN_FIRST-6)
237 #define PSN_WIZNEXT (PSN_FIRST-7)
238 #define PSN_WIZFINISH (PSN_FIRST-8)
239 #define PSN_QUERYCANCEL (PSN_FIRST-9)
241 #define PSNRET_NOERROR 0
242 #define PSNRET_INVALID 1
243 #define PSNRET_INVALID_NOCHANGEPAGE 2
246 #define PSM_SETCURSEL (WM_USER + 101)
247 #define PSM_REMOVEPAGE (WM_USER + 102)
248 #define PSM_ADDPAGE (WM_USER + 103)
249 #define PSM_CHANGED (WM_USER + 104)
250 #define PSM_RESTARTWINDOWS (WM_USER + 105)
251 #define PSM_REBOOTSYSTEM (WM_USER + 106)
252 #define PSM_CANCELTOCLOSE (WM_USER + 107)
253 #define PSM_QUERYSIBLINGS (WM_USER + 108)
254 #define PSM_UNCHANGED (WM_USER + 109)
255 #define PSM_APPLY (WM_USER + 110)
256 #define PSM_SETTITLEA (WM_USER + 111)
257 #define PSM_SETTITLEW (WM_USER + 120)
258 #define PSM_SETTITLE WINELIB_NAME_AW(PSM_SETTITLE)
259 #define PSM_SETWIZBUTTONS (WM_USER + 112)
260 #define PSM_PRESSBUTTON (WM_USER + 113)
261 #define PSM_SETCURSELID (WM_USER + 114)
262 #define PSM_SETFINISHTEXTA (WM_USER + 115)
263 #define PSM_SETFINISHTEXTW (WM_USER + 121)
264 #define PSM_SETFINISHTEXT WINELIB_NAME_AW(PSM_SETFINISHTEXT)
265 #define PSM_GETTABCONTROL (WM_USER + 116)
266 #define PSM_ISDIALOGMESSAGE (WM_USER + 117)
267 #define PSM_GETCURRENTPAGEHWND (WM_USER + 118)
269 #define PSWIZB_BACK 0x00000001
270 #define PSWIZB_NEXT 0x00000002
271 #define PSWIZB_FINISH 0x00000004
272 #define PSWIZB_DISABLEDFINISH 0x00000008
274 #define PSBTN_BACK 0
275 #define PSBTN_NEXT 1
276 #define PSBTN_FINISH 2
277 #define PSBTN_OK 3
278 #define PSBTN_APPLYNOW 4
279 #define PSBTN_CANCEL 5
280 #define PSBTN_HELP 6
281 #define PSBTN_MAX 6
283 #define ID_PSRESTARTWINDOWS 0x2
284 #define ID_PSREBOOTSYSTEM (ID_PSRESTARTWINDOWS | 0x1)
287 #define WIZ_CXDLG 276
288 #define WIZ_CYDLG 140
290 #define WIZ_CXBMP 80
292 #define WIZ_BODYX 92
293 #define WIZ_BODYCX 184
295 #define PROP_SM_CXDLG 212
296 #define PROP_SM_CYDLG 188
298 #define PROP_MED_CXDLG 227
299 #define PROP_MED_CYDLG 215
301 #define PROP_LG_CXDLG 252
302 #define PROP_LG_CYDLG 218
305 * Property sheet support (macros)
308 #define PropSheet_SetCurSel(hDlg, hpage, index) \
309 SendMessageA(hDlg, PSM_SETCURSEL, (WPARAM)index, (LPARAM)hpage)
311 #define PropSheet_RemovePage(hDlg, index, hpage) \
312 SNDMSG(hDlg, PSM_REMOVEPAGE, index, (LPARAM)hpage)
314 #define PropSheet_AddPage(hDlg, hpage) \
315 SNDMSG(hDlg, PSM_ADDPAGE, 0, (LPARAM)hpage)
317 #define PropSheet_Changed(hDlg, hwnd) \
318 SNDMSG(hDlg, PSM_CHANGED, (WPARAM)hwnd, 0L)
320 #define PropSheet_RestartWindows(hDlg) \
321 SNDMSG(hDlg, PSM_RESTARTWINDOWS, 0, 0L)
323 #define PropSheet_RebootSystem(hDlg) \
324 SNDMSG(hDlg, PSM_REBOOTSYSTEM, 0, 0L)
326 #define PropSheet_CancelToClose(hDlg) \
327 PostMessage(hDlg, PSM_CANCELTOCLOSE, 0, 0L)
329 #define PropSheet_QuerySiblings(hDlg, wParam, lParam) \
330 SNDMSG(hDlg, PSM_QUERYSIBLINGS, wParam, lParam)
332 #define PropSheet_UnChanged(hDlg, hwnd) \
333 SNDMSG(hDlg, PSM_UNCHANGED, (WPARAM)hwnd, 0L)
335 #define PropSheet_Apply(hDlg) \
336 SNDMSG(hDlg, PSM_APPLY, 0, 0L)
338 #define PropSheet_SetTitle(hDlg, wStyle, lpszText)\
339 SNDMSG(hDlg, PSM_SETTITLE, wStyle, (LPARAM)(LPCTSTR)lpszText)
341 #define PropSheet_SetWizButtons(hDlg, dwFlags) \
342 PostMessage(hDlg, PSM_SETWIZBUTTONS, 0, (LPARAM)dwFlags)
344 #define PropSheet_PressButton(hDlg, iButton) \
345 PostMessage(hDlg, PSM_PRESSBUTTON, (WPARAM)iButton, 0)
347 #define PropSheet_SetCurSelByID(hDlg, id) \
348 SNDMSG(hDlg, PSM_SETCURSELID, 0, (LPARAM)id)
350 #define PropSheet_SetFinishText(hDlg, lpszText) \
351 SNDMSG(hDlg, PSM_SETFINISHTEXT, 0, (LPARAM)lpszText)
353 #define PropSheet_GetTabControl(hDlg) \
354 (HWND)SNDMSG(hDlg, PSM_GETTABCONTROL, 0, 0)
356 #define PropSheet_IsDialogMessage(hDlg, pMsg) \
357 (BOOL)SNDMSG(hDlg, PSM_ISDIALOGMESSAGE, 0, (LPARAM)pMsg)
359 #define PropSheet_GetCurrentPageHwnd(hDlg) \
360 (HWND)SNDMSG(hDlg, PSM_GETCURRENTPAGEHWND, 0, 0L)
363 #ifdef __cplusplus
365 #endif
367 #endif /* __WINE_PRSHT_H */