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