Porting fixes.
[wine.git] / dlls / commdlg / cdlg.h
blob5c7f67f6d931b902e27f4686556915c01c55aaeb
1 /*
2 * Common Dialog Boxes interface (32 bit)
4 * Copyright 1998 Bertho A. Stultiens
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 #ifndef _WINE_DLL_CDLG_H
22 #define _WINE_DLL_CDLG_H
24 #define COM_NO_WINDOWS_H
25 #include "dlgs.h"
26 #include "wine/windef16.h"
27 #include "wownt32.h"
29 /*---------------- 16-bit ----------------*/
30 extern HINSTANCE16 COMMDLG_hInstance;
31 extern HINSTANCE COMMDLG_hInstance32;
33 /*---------------- 32-bit ----------------*/
35 /* Common dialogs implementation globals */
36 #define COMDLG32_Atom ((ATOM)0xa000) /* MS uses this one to identify props */
38 extern HINSTANCE COMDLG32_hInstance;
40 void COMDLG32_SetCommDlgExtendedError(DWORD err);
41 LPVOID COMDLG32_AllocMem(int size);
43 /* handle<-handle16 conversion */
44 #define HINSTANCE_32(h16) ((HINSTANCE)(ULONG_PTR)(h16))
46 /* Find/Replace local definitions */
48 #define FR_WINE_UNICODE 0x80000000
49 #define FR_WINE_REPLACE 0x40000000
51 typedef struct {
52 FINDREPLACEA fr; /* Internally used structure */
53 union {
54 FINDREPLACEA *fra; /* Reference to the user supplied structure */
55 FINDREPLACEW *frw;
56 } user_fr;
57 } COMDLG32_FR_Data;
59 #define PD32_PRINT_TITLE 7000
61 #define PD32_VALUE_UREADABLE 1104
62 #define PD32_INVALID_PAGE_RANGE 1105
63 #define PD32_FROM_NOT_ABOVE_TO 1106
64 #define PD32_MARGINS_OVERLAP 1107
65 #define PD32_NR_OF_COPIES_EMPTY 1108
66 #define PD32_TOO_LARGE_COPIES 1109
67 #define PD32_PRINT_ERROR 1110
68 #define PD32_NO_DEFAULT_PRINTER 1111
69 #define PD32_CANT_FIND_PRINTER 1112
70 #define PD32_OUT_OF_MEMORY 1113
71 #define PD32_GENERIC_ERROR 1114
72 #define PD32_DRIVER_UNKNOWN 1115
74 #define PD32_PRINTER_STATUS_READY 1536
75 #define PD32_PRINTER_STATUS_PAUSED 1537
76 #define PD32_PRINTER_STATUS_ERROR 1538
77 #define PD32_PRINTER_STATUS_PENDING_DELETION 1539
78 #define PD32_PRINTER_STATUS_PAPER_JAM 1540
79 #define PD32_PRINTER_STATUS_PAPER_OUT 1541
80 #define PD32_PRINTER_STATUS_MANUAL_FEED 1542
81 #define PD32_PRINTER_STATUS_PAPER_PROBLEM 1543
82 #define PD32_PRINTER_STATUS_OFFLINE 1544
83 #define PD32_PRINTER_STATUS_IO_ACTIVE 1545
84 #define PD32_PRINTER_STATUS_BUSY 1546
85 #define PD32_PRINTER_STATUS_PRINTING 1547
86 #define PD32_PRINTER_STATUS_OUTPUT_BIN_FULL 1548
87 #define PD32_PRINTER_STATUS_NOT_AVAILABLE 1549
88 #define PD32_PRINTER_STATUS_WAITING 1550
89 #define PD32_PRINTER_STATUS_PROCESSING 1551
90 #define PD32_PRINTER_STATUS_INITIALIZING 1552
91 #define PD32_PRINTER_STATUS_WARMING_UP 1553
92 #define PD32_PRINTER_STATUS_TONER_LOW 1554
93 #define PD32_PRINTER_STATUS_NO_TONER 1555
94 #define PD32_PRINTER_STATUS_PAGE_PUNT 1556
95 #define PD32_PRINTER_STATUS_USER_INTERVENTION 1557
96 #define PD32_PRINTER_STATUS_OUT_OF_MEMORY 1558
97 #define PD32_PRINTER_STATUS_DOOR_OPEN 1559
98 #define PD32_PRINTER_STATUS_SERVER_UNKNOWN 1560
99 #define PD32_PRINTER_STATUS_POWER_SAVE 1561
101 #define PD32_DEFAULT_PRINTER 1582
102 #define PD32_NR_OF_DOCUMENTS_IN_QUEUE 1583
103 #define PD32_PRINT_ALL_X_PAGES 1584
104 #define PD32_MARGINS_IN_INCHES 1585
105 #define PD32_MARGINS_IN_MILIMETERS 1586
106 #define PD32_MILIMETERS 1587
108 /* Charset names string IDs */
110 #define IDS_CHARSET_ANSI 200
111 #define IDS_CHARSET_SYMBOL 201
112 #define IDS_CHARSET_SHIFTJIS 202
113 #define IDS_CHARSET_HANGUL 203
114 #define IDS_CHARSET_GREEK 204
115 #define IDS_CHARSET_TURKISH 205
116 #define IDS_CHARSET_HEBREW 206
117 #define IDS_CHARSET_ARABIC 207
118 #define IDS_CHARSET_BALTIC 208
119 #define IDS_CHARSET_VIETNAMESE 209
120 #define IDS_CHARSET_RUSSIAN 210
121 #define IDS_CHARSET_EE 211
122 #define IDS_CHARSET_THAI 212
123 #define IDS_CHARSET_JOHAB 213
124 #define IDS_CHARSET_OEM 214
126 /* Color names string IDs */
128 #define IDS_COLOR_BLACK 1040
129 #define IDS_COLOR_MAROON 1041
130 #define IDS_COLOR_GREEN 1042
131 #define IDS_COLOR_OLIVE 1043
132 #define IDS_COLOR_NAVY 1044
133 #define IDS_COLOR_PURPLE 1045
134 #define IDS_COLOR_TEAL 1046
135 #define IDS_COLOR_GRAY 1047
136 #define IDS_COLOR_SILVER 1048
137 #define IDS_COLOR_RED 1049
138 #define IDS_COLOR_LIME 1050
139 #define IDS_COLOR_YELLOW 1051
140 #define IDS_COLOR_BLUE 1052
141 #define IDS_COLOR_FUCHSIA 1053
142 #define IDS_COLOR_AQUA 1054
143 #define IDS_COLOR_WHITE 1055
145 #include "commctrl.h"
146 #include "shlobj.h"
147 #include "shellapi.h"
149 /* ITEMIDLIST */
151 extern LPITEMIDLIST (WINAPI *COMDLG32_PIDL_ILClone) (LPCITEMIDLIST);
152 extern LPITEMIDLIST (WINAPI *COMDLG32_PIDL_ILCombine)(LPCITEMIDLIST,LPCITEMIDLIST);
153 extern LPITEMIDLIST (WINAPI *COMDLG32_PIDL_ILGetNext)(LPITEMIDLIST);
154 extern BOOL (WINAPI *COMDLG32_PIDL_ILRemoveLastID)(LPCITEMIDLIST);
155 extern BOOL (WINAPI *COMDLG32_PIDL_ILIsEqual)(LPCITEMIDLIST, LPCITEMIDLIST);
157 /* SHELL */
158 extern LPVOID (WINAPI *COMDLG32_SHAlloc)(DWORD);
159 extern DWORD (WINAPI *COMDLG32_SHFree)(LPVOID);
160 extern BOOL (WINAPI *COMDLG32_SHGetFolderPathA)(HWND,int,HANDLE,DWORD,LPSTR);
161 extern BOOL (WINAPI *COMDLG32_SHGetFolderPathW)(HWND,int,HANDLE,DWORD,LPWSTR);
163 extern BOOL WINAPI GetFileDialog95A(LPOPENFILENAMEA ofn,UINT iDlgType);
164 extern BOOL WINAPI GetFileDialog95W(LPOPENFILENAMEW ofn,UINT iDlgType);
166 /* 16 bit api */
168 #include "pshpack1.h"
170 typedef UINT16 (CALLBACK *LPOFNHOOKPROC16)(HWND16,UINT16,WPARAM16,LPARAM);
172 typedef struct {
173 DWORD lStructSize;
174 HWND16 hwndOwner;
175 HINSTANCE16 hInstance;
176 SEGPTR lpstrFilter;
177 SEGPTR lpstrCustomFilter;
178 DWORD nMaxCustFilter;
179 DWORD nFilterIndex;
180 SEGPTR lpstrFile;
181 DWORD nMaxFile;
182 SEGPTR lpstrFileTitle;
183 DWORD nMaxFileTitle;
184 SEGPTR lpstrInitialDir;
185 SEGPTR lpstrTitle;
186 DWORD Flags;
187 UINT16 nFileOffset;
188 UINT16 nFileExtension;
189 SEGPTR lpstrDefExt;
190 LPARAM lCustData;
191 LPOFNHOOKPROC16 lpfnHook;
192 SEGPTR lpTemplateName;
193 } OPENFILENAME16,*LPOPENFILENAME16;
195 typedef UINT16 (CALLBACK *LPCCHOOKPROC16) (HWND16, UINT16, WPARAM16, LPARAM);
197 typedef struct {
198 DWORD lStructSize;
199 HWND16 hwndOwner;
200 HWND16 hInstance;
201 COLORREF rgbResult;
202 SEGPTR lpCustColors;
203 DWORD Flags;
204 LPARAM lCustData;
205 LPCCHOOKPROC16 lpfnHook;
206 SEGPTR lpTemplateName;
207 } CHOOSECOLOR16;
208 typedef CHOOSECOLOR16 *LPCHOOSECOLOR16;
210 typedef UINT16 (CALLBACK *LPFRHOOKPROC16)(HWND16,UINT16,WPARAM16,LPARAM);
211 typedef struct {
212 DWORD lStructSize; /* size of this struct 0x20 */
213 HWND16 hwndOwner; /* handle to owner's window */
214 HINSTANCE16 hInstance; /* instance handle of.EXE that */
215 /* contains cust. dlg. template */
216 DWORD Flags; /* one or more of the FR_?? */
217 SEGPTR lpstrFindWhat; /* ptr. to search string */
218 SEGPTR lpstrReplaceWith; /* ptr. to replace string */
219 UINT16 wFindWhatLen; /* size of find buffer */
220 UINT16 wReplaceWithLen; /* size of replace buffer */
221 LPARAM lCustData; /* data passed to hook fn. */
222 LPFRHOOKPROC16 lpfnHook;
223 SEGPTR lpTemplateName; /* custom template name */
224 } FINDREPLACE16, *LPFINDREPLACE16;
226 typedef UINT16 (CALLBACK *LPCFHOOKPROC16)(HWND16,UINT16,WPARAM16,LPARAM);
227 typedef struct
229 DWORD lStructSize;
230 HWND16 hwndOwner; /* caller's window handle */
231 HDC16 hDC; /* printer DC/IC or NULL */
232 SEGPTR lpLogFont; /* ptr. to a LOGFONT struct */
233 short iPointSize; /* 10 * size in points of selected font */
234 DWORD Flags; /* enum. type flags */
235 COLORREF rgbColors; /* returned text color */
236 LPARAM lCustData; /* data passed to hook fn. */
237 LPCFHOOKPROC16 lpfnHook;
238 SEGPTR lpTemplateName; /* custom template name */
239 HINSTANCE16 hInstance; /* instance handle of.EXE that */
240 /* contains cust. dlg. template */
241 SEGPTR lpszStyle; /* return the style field here */
242 /* must be LF_FACESIZE or bigger */
243 UINT16 nFontType; /* same value reported to the */
244 /* EnumFonts callback with the */
245 /* extra FONTTYPE_ bits added */
246 short nSizeMin; /* minimum pt size allowed & */
247 short nSizeMax; /* max pt size allowed if */
248 /* CF_LIMITSIZE is used */
249 } CHOOSEFONT16, *LPCHOOSEFONT16;
252 typedef UINT16 (CALLBACK *LPPRINTHOOKPROC16) (HWND16, UINT16, WPARAM16, LPARAM);
253 typedef UINT16 (CALLBACK *LPSETUPHOOKPROC16) (HWND16, UINT16, WPARAM16, LPARAM);
254 typedef struct
256 DWORD lStructSize;
257 HWND16 hwndOwner;
258 HGLOBAL16 hDevMode;
259 HGLOBAL16 hDevNames;
260 HDC16 hDC;
261 DWORD Flags;
262 WORD nFromPage;
263 WORD nToPage;
264 WORD nMinPage;
265 WORD nMaxPage;
266 WORD nCopies;
267 HINSTANCE16 hInstance;
268 LPARAM lCustData;
269 LPPRINTHOOKPROC16 lpfnPrintHook;
270 LPSETUPHOOKPROC16 lpfnSetupHook;
271 SEGPTR lpPrintTemplateName;
272 SEGPTR lpSetupTemplateName;
273 HGLOBAL16 hPrintTemplate;
274 HGLOBAL16 hSetupTemplate;
275 } PRINTDLG16, *LPPRINTDLG16;
277 BOOL16 WINAPI ChooseColor16(LPCHOOSECOLOR16 lpChCol);
278 HWND16 WINAPI FindText16( SEGPTR find);
279 INT16 WINAPI GetFileTitle16(LPCSTR lpFile, LPSTR lpTitle, UINT16 cbBuf);
280 BOOL16 WINAPI GetOpenFileName16(SEGPTR ofn);
281 BOOL16 WINAPI GetSaveFileName16(SEGPTR ofn);
282 BOOL16 WINAPI PrintDlg16( LPPRINTDLG16 print);
283 HWND16 WINAPI ReplaceText16( SEGPTR find);
284 BOOL16 WINAPI ChooseFont16(LPCHOOSEFONT16);
286 #include "poppack.h"
288 #endif /* _WINE_DLL_CDLG_H */