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