- fixed reported bugs
[wine.git] / dlls / commdlg / cdlg.h
blob79121f68e62b52723dc86cadecd2bf5f9830a71a
1 /*
2 * Common Dialog Boxes interface (32 bit)
4 * Copyright 1998 Bertho A. Stultiens
5 */
7 #ifndef _WINE_DLL_CDLG_H
8 #define _WINE_DLL_CDLG_H
10 #include "dlgs.h"
12 /*---------------- 16-bit ----------------*/
13 extern HINSTANCE16 COMMDLG_hInstance;
14 extern HINSTANCE COMMDLG_hInstance32;
16 /*---------------- 32-bit ----------------*/
18 /* Common dialogs implementation globals */
19 #define COMDLG32_Atom ((ATOM)0xa000) /* MS uses this one to identify props */
21 extern HINSTANCE COMDLG32_hInstance;
23 void COMDLG32_SetCommDlgExtendedError(DWORD err);
24 LPVOID COMDLG32_AllocMem(int size);
28 /* Find/Replace local definitions */
30 #define FR_WINE_UNICODE 0x80000000
31 #define FR_WINE_REPLACE 0x40000000
33 typedef struct {
34 FINDREPLACEA fr; /* Internally used structure */
35 union {
36 FINDREPLACEA *fra; /* Reference to the user supplied structure */
37 FINDREPLACEW *frw;
38 } user_fr;
39 } COMDLG32_FR_Data;
41 #define PD32_PRINT_TITLE 7000
43 #define PD32_VALUE_UREADABLE 1104
44 #define PD32_INVALID_PAGE_RANGE 1105
45 #define PD32_FROM_NOT_ABOVE_TO 1106
46 #define PD32_MARGINS_OVERLAP 1107
47 #define PD32_NR_OF_COPIES_EMPTY 1108
48 #define PD32_TOO_LARGE_COPIES 1109
49 #define PD32_PRINT_ERROR 1110
50 #define PD32_NO_DEFAULT_PRINTER 1111
51 #define PD32_CANT_FIND_PRINTER 1112
52 #define PD32_OUT_OF_MEMORY 1113
53 #define PD32_GENERIC_ERROR 1114
54 #define PD32_DRIVER_UNKNOWN 1115
56 #define PD32_PRINTER_STATUS_READY 1536
57 #define PD32_PRINTER_STATUS_PAUSED 1537
58 #define PD32_PRINTER_STATUS_ERROR 1538
59 #define PD32_PRINTER_STATUS_PENDING_DELETION 1539
60 #define PD32_PRINTER_STATUS_PAPER_JAM 1540
61 #define PD32_PRINTER_STATUS_PAPER_OUT 1541
62 #define PD32_PRINTER_STATUS_MANUAL_FEED 1542
63 #define PD32_PRINTER_STATUS_PAPER_PROBLEM 1543
64 #define PD32_PRINTER_STATUS_OFFLINE 1544
65 #define PD32_PRINTER_STATUS_IO_ACTIVE 1545
66 #define PD32_PRINTER_STATUS_BUSY 1546
67 #define PD32_PRINTER_STATUS_PRINTING 1547
68 #define PD32_PRINTER_STATUS_OUTPUT_BIN_FULL 1548
69 #define PD32_PRINTER_STATUS_NOT_AVAILABLE 1549
70 #define PD32_PRINTER_STATUS_WAITING 1550
71 #define PD32_PRINTER_STATUS_PROCESSING 1551
72 #define PD32_PRINTER_STATUS_INITIALIZING 1552
73 #define PD32_PRINTER_STATUS_WARMING_UP 1553
74 #define PD32_PRINTER_STATUS_TONER_LOW 1554
75 #define PD32_PRINTER_STATUS_NO_TONER 1555
76 #define PD32_PRINTER_STATUS_PAGE_PUNT 1556
77 #define PD32_PRINTER_STATUS_USER_INTERVENTION 1557
78 #define PD32_PRINTER_STATUS_OUT_OF_MEMORY 1558
79 #define PD32_PRINTER_STATUS_DOOR_OPEN 1559
80 #define PD32_PRINTER_STATUS_SERVER_UNKNOWN 1560
81 #define PD32_PRINTER_STATUS_POWER_SAVE 1561
83 #define PD32_DEFAULT_PRINTER 1582
84 #define PD32_NR_OF_DOCUMENTS_IN_QUEUE 1583
85 #define PD32_PRINT_ALL_X_PAGES 1584
86 #define PD32_MARGINS_IN_INCHES 1585
87 #define PD32_MARGINS_IN_MILIMETERS 1586
88 #define PD32_MILIMETERS 1587
90 #include "commctrl.h"
91 #include "wine/undocshell.h"
92 #include "shellapi.h"
94 /* IMAGELIST */
95 extern BOOL (WINAPI* COMDLG32_ImageList_Draw) (HIMAGELIST himl, int i, HDC hdcDest, int x, int y, UINT fStyle);
97 /* ITEMIDLIST */
99 extern LPITEMIDLIST (WINAPI *COMDLG32_PIDL_ILClone) (LPCITEMIDLIST);
100 extern LPITEMIDLIST (WINAPI *COMDLG32_PIDL_ILCombine)(LPCITEMIDLIST,LPCITEMIDLIST);
101 extern LPITEMIDLIST (WINAPI *COMDLG32_PIDL_ILGetNext)(LPITEMIDLIST);
102 extern BOOL (WINAPI *COMDLG32_PIDL_ILRemoveLastID)(LPCITEMIDLIST);
103 extern BOOL (WINAPI *COMDLG32_PIDL_ILIsEqual)(LPCITEMIDLIST, LPCITEMIDLIST);
105 /* SHELL */
106 extern BOOL (WINAPI *COMDLG32_SHGetPathFromIDListA) (LPCITEMIDLIST,LPSTR);
107 extern HRESULT (WINAPI *COMDLG32_SHGetSpecialFolderLocation)(HWND,INT,LPITEMIDLIST *);
108 extern DWORD (WINAPI *COMDLG32_SHGetDesktopFolder)(IShellFolder **);
109 extern DWORD (WINAPI *COMDLG32_SHGetFileInfoA)(LPCSTR,DWORD,SHFILEINFOA*,UINT,UINT);
110 extern LPVOID (WINAPI *COMDLG32_SHAlloc)(DWORD);
111 extern DWORD (WINAPI *COMDLG32_SHFree)(LPVOID);
112 extern HRESULT (WINAPI *COMDLG32_SHGetDataFromIDListA)(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, int nFormat, LPVOID dest, int len);
113 extern BOOL (WINAPI *COMDLG32_SHGetFolderPathA)(HWND,int,HANDLE,DWORD,LPSTR);
116 /* PATH */
117 extern BOOL (WINAPI *COMDLG32_PathIsRootA)(LPCSTR x);
118 extern LPSTR (WINAPI *COMDLG32_PathFindFileNameA)(LPCSTR path);
119 extern DWORD (WINAPI *COMDLG32_PathRemoveFileSpecA)(LPSTR fn);
120 extern BOOL (WINAPI *COMDLG32_PathMatchSpecW)(LPCWSTR x, LPCWSTR y);
121 extern LPSTR (WINAPI *COMDLG32_PathAddBackslashA)(LPSTR path);
122 extern BOOL (WINAPI *COMDLG32_PathCanonicalizeA)(LPSTR pszBuf, LPCSTR pszPath);
123 extern int (WINAPI *COMDLG32_PathGetDriveNumberA)(LPCSTR lpszPath);
124 extern BOOL (WINAPI *COMDLG32_PathIsRelativeA) (LPCSTR lpszPath);
125 extern LPSTR (WINAPI *COMDLG32_PathFindNextComponentA)(LPCSTR pszPath);
126 extern LPWSTR (WINAPI *COMDLG32_PathAddBackslashW)(LPWSTR lpszPath);
127 extern LPSTR (WINAPI *COMDLG32_PathFindExtensionA)(LPCVOID lpszPath);
128 extern BOOL (WINAPI *COMDLG32_PathAddExtensionA)(LPSTR pszPath,LPCSTR pszExtension);
131 extern BOOL WINAPI GetFileDialog95A(LPOPENFILENAMEA ofn,UINT iDlgType);
132 extern BOOL WINAPI GetFileDialog95W(LPOPENFILENAMEW ofn,UINT iDlgType);
134 /* 16 bit api */
136 #include "pshpack1.h"
138 typedef UINT16 (CALLBACK *LPOFNHOOKPROC16)(HWND16,UINT16,WPARAM16,LPARAM);
140 typedef struct {
141 DWORD lStructSize;
142 HWND16 hwndOwner;
143 HINSTANCE16 hInstance;
144 SEGPTR lpstrFilter;
145 SEGPTR lpstrCustomFilter;
146 DWORD nMaxCustFilter;
147 DWORD nFilterIndex;
148 SEGPTR lpstrFile;
149 DWORD nMaxFile;
150 SEGPTR lpstrFileTitle;
151 DWORD nMaxFileTitle;
152 SEGPTR lpstrInitialDir;
153 SEGPTR lpstrTitle;
154 DWORD Flags;
155 UINT16 nFileOffset;
156 UINT16 nFileExtension;
157 SEGPTR lpstrDefExt;
158 LPARAM lCustData;
159 LPOFNHOOKPROC16 lpfnHook;
160 SEGPTR lpTemplateName;
161 } OPENFILENAME16,*LPOPENFILENAME16;
163 typedef UINT16 (CALLBACK *LPCCHOOKPROC16) (HWND16, UINT16, WPARAM16, LPARAM);
165 typedef struct {
166 DWORD lStructSize;
167 HWND16 hwndOwner;
168 HWND16 hInstance;
169 COLORREF rgbResult;
170 COLORREF *lpCustColors;
171 DWORD Flags;
172 LPARAM lCustData;
173 LPCCHOOKPROC16 lpfnHook;
174 SEGPTR lpTemplateName;
175 } CHOOSECOLOR16;
176 typedef CHOOSECOLOR16 *LPCHOOSECOLOR16;
178 typedef UINT16 (CALLBACK *LPFRHOOKPROC16)(HWND16,UINT16,WPARAM16,LPARAM);
179 typedef struct {
180 DWORD lStructSize; /* size of this struct 0x20 */
181 HWND16 hwndOwner; /* handle to owner's window */
182 HINSTANCE16 hInstance; /* instance handle of.EXE that */
183 /* contains cust. dlg. template */
184 DWORD Flags; /* one or more of the FR_?? */
185 SEGPTR lpstrFindWhat; /* ptr. to search string */
186 SEGPTR lpstrReplaceWith; /* ptr. to replace string */
187 UINT16 wFindWhatLen; /* size of find buffer */
188 UINT16 wReplaceWithLen; /* size of replace buffer */
189 LPARAM lCustData; /* data passed to hook fn. */
190 LPFRHOOKPROC16 lpfnHook;
191 SEGPTR lpTemplateName; /* custom template name */
192 } FINDREPLACE16, *LPFINDREPLACE16;
194 typedef UINT16 (CALLBACK *LPCFHOOKPROC16)(HWND16,UINT16,WPARAM16,LPARAM);
195 typedef struct
197 DWORD lStructSize;
198 HWND16 hwndOwner; /* caller's window handle */
199 HDC16 hDC; /* printer DC/IC or NULL */
200 SEGPTR lpLogFont; /* ptr. to a LOGFONT struct */
201 short iPointSize; /* 10 * size in points of selected font */
202 DWORD Flags; /* enum. type flags */
203 COLORREF rgbColors; /* returned text color */
204 LPARAM lCustData; /* data passed to hook fn. */
205 LPCFHOOKPROC16 lpfnHook;
206 SEGPTR lpTemplateName; /* custom template name */
207 HINSTANCE16 hInstance; /* instance handle of.EXE that */
208 /* contains cust. dlg. template */
209 SEGPTR lpszStyle; /* return the style field here */
210 /* must be LF_FACESIZE or bigger */
211 UINT16 nFontType; /* same value reported to the */
212 /* EnumFonts callback with the */
213 /* extra FONTTYPE_ bits added */
214 short nSizeMin; /* minimum pt size allowed & */
215 short nSizeMax; /* max pt size allowed if */
216 /* CF_LIMITSIZE is used */
217 } CHOOSEFONT16, *LPCHOOSEFONT16;
220 typedef UINT16 (CALLBACK *LPPRINTHOOKPROC16) (HWND16, UINT16, WPARAM16, LPARAM);
221 typedef UINT16 (CALLBACK *LPSETUPHOOKPROC16) (HWND16, UINT16, WPARAM16, LPARAM);
222 typedef struct
224 DWORD lStructSize;
225 HWND16 hwndOwner;
226 HGLOBAL16 hDevMode;
227 HGLOBAL16 hDevNames;
228 HDC16 hDC;
229 DWORD Flags;
230 WORD nFromPage;
231 WORD nToPage;
232 WORD nMinPage;
233 WORD nMaxPage;
234 WORD nCopies;
235 HINSTANCE16 hInstance;
236 LPARAM lCustData;
237 LPPRINTHOOKPROC16 lpfnPrintHook;
238 LPSETUPHOOKPROC16 lpfnSetupHook;
239 SEGPTR lpPrintTemplateName;
240 SEGPTR lpSetupTemplateName;
241 HGLOBAL16 hPrintTemplate;
242 HGLOBAL16 hSetupTemplate;
243 } PRINTDLG16, *LPPRINTDLG16;
245 BOOL16 WINAPI ChooseColor16(LPCHOOSECOLOR16 lpChCol);
246 HWND16 WINAPI FindText16( SEGPTR find);
247 INT16 WINAPI GetFileTitle16(LPCSTR lpFile, LPSTR lpTitle, UINT16 cbBuf);
248 BOOL16 WINAPI GetOpenFileName16(SEGPTR ofn);
249 BOOL16 WINAPI GetSaveFileName16(SEGPTR ofn);
250 BOOL16 WINAPI PrintDlg16( LPPRINTDLG16 print);
251 HWND16 WINAPI ReplaceText16( SEGPTR find);
252 BOOL16 WINAPI ChooseFont16(LPCHOOSEFONT16);
254 #include "poppack.h"
256 #endif /* _WINE_DLL_CDLG_H */