Added 2 stubs.
[wine] / include / winspool.h
1 /* Definitions for printing
2  *
3  * Copyright 1998 Huw Davies, Andreas Mohr
4  *
5  * Portions Copyright (c) 1999 Corel Corporation 
6  *                             (Paul Quinn, Albert Den Haan)
7  */
8 #ifndef __WINE_WINSPOOL_H
9 #define __WINE_WINSPOOL_H
10
11 #include "windef.h"
12 #include "winbase.h"
13 #include "wingdi.h"
14
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18
19 /* DEFINES */
20
21 #define PRINTER_ATTRIBUTE_QUEUED         0x00000001
22 #define PRINTER_ATTRIBUTE_DIRECT         0x00000002
23 #define PRINTER_ATTRIBUTE_DEFAULT        0x00000004
24 #define PRINTER_ATTRIBUTE_SHARED         0x00000008
25 #define PRINTER_ATTRIBUTE_NETWORK        0x00000010
26 #define PRINTER_ATTRIBUTE_HIDDEN         0x00000020
27 #define PRINTER_ATTRIBUTE_LOCAL          0x00000040
28
29 #define PRINTER_ATTRIBUTE_ENABLE_DEVQ       0x00000080
30 #define PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS   0x00000100
31 #define PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST 0x00000200
32
33 #define PRINTER_ATTRIBUTE_WORK_OFFLINE   0x00000400
34 #define PRINTER_ATTRIBUTE_ENABLE_BIDI    0x00000800
35
36 #define PRINTER_ENUM_DEFAULT     0x00000001
37 #define PRINTER_ENUM_LOCAL       0x00000002
38 #define PRINTER_ENUM_CONNECTIONS 0x00000004
39 #define PRINTER_ENUM_FAVORITE    0x00000004
40 #define PRINTER_ENUM_NAME        0x00000008
41 #define PRINTER_ENUM_REMOTE      0x00000010
42 #define PRINTER_ENUM_SHARED      0x00000020
43 #define PRINTER_ENUM_NETWORK     0x00000040
44
45 #define PRINTER_ENUM_EXPAND      0x00004000
46 #define PRINTER_ENUM_CONTAINER   0x00008000
47
48 #define PRINTER_ENUM_ICONMASK    0x00ff0000
49 #define PRINTER_ENUM_ICON1       0x00010000
50 #define PRINTER_ENUM_ICON2       0x00020000
51 #define PRINTER_ENUM_ICON3       0x00040000
52 #define PRINTER_ENUM_ICON4       0x00080000
53 #define PRINTER_ENUM_ICON5       0x00100000
54 #define PRINTER_ENUM_ICON6       0x00200000
55 #define PRINTER_ENUM_ICON7       0x00400000
56 #define PRINTER_ENUM_ICON8       0x00800000
57
58 /* TYPES */
59 typedef struct _PRINTER_DEFAULTSA {
60   LPSTR        pDatatype;
61   LPDEVMODEA pDevMode;
62   ACCESS_MASK  DesiredAccess;
63 } PRINTER_DEFAULTSA, *LPPRINTER_DEFAULTSA;
64
65 typedef struct _PRINTER_DEFAULTSW {
66   LPWSTR       pDatatype;
67   LPDEVMODEW pDevMode;
68   ACCESS_MASK  DesiredAccess;
69 } PRINTER_DEFAULTSW, *LPPRINTER_DEFAULTSW;
70
71 DECL_WINELIB_TYPE_AW(PRINTER_DEFAULTS)
72 DECL_WINELIB_TYPE_AW(LPPRINTER_DEFAULTS)
73
74 typedef struct _DRIVER_INFO_1A {
75   LPSTR     pName;
76 } DRIVER_INFO_1A, *PDRIVER_INFO_1A, *LPDRIVER_INFO_1A;
77
78 typedef struct _DRIVER_INFO_1W {
79   LPWSTR    pName;
80 } DRIVER_INFO_1W, *PDRIVER_INFO_1W, *LPDRIVER_INFO_1W;
81
82 DECL_WINELIB_TYPE_AW(DRIVER_INFO_1)
83 DECL_WINELIB_TYPE_AW(PDRIVER_INFO_1)
84 DECL_WINELIB_TYPE_AW(LPDRIVER_INFO_1)
85
86 typedef struct _DRIVER_INFO_2A {
87   DWORD   cVersion;
88   LPSTR     pName;
89   LPSTR     pEnvironment;
90   LPSTR     pDriverPath;
91   LPSTR     pDataFile; 
92   LPSTR     pConfigFile;
93 } DRIVER_INFO_2A, *PDRIVER_INFO_2A, *LPDRIVER_INFO_2A;
94
95 typedef struct _DRIVER_INFO_2W {
96   DWORD   cVersion;
97   LPWSTR    pName;     
98   LPWSTR    pEnvironment;
99   LPWSTR    pDriverPath;
100   LPWSTR    pDataFile; 
101   LPWSTR    pConfigFile;
102 } DRIVER_INFO_2W, *PDRIVER_INFO_2W, *LPDRIVER_INFO_2W;
103
104 DECL_WINELIB_TYPE_AW(DRIVER_INFO_2)
105 DECL_WINELIB_TYPE_AW(PDRIVER_INFO_2)
106 DECL_WINELIB_TYPE_AW(LPDRIVER_INFO_2)
107
108 typedef struct _DRIVER_INFO_3A {
109   DWORD cVersion;
110   LPSTR pName;
111   LPSTR pEnvironment;
112   LPSTR pDriverPath;
113   LPSTR pDataFile;
114   LPSTR pConfigFile;
115   LPSTR pHelpFile;
116   LPSTR pDependentFiles;
117   LPSTR pMonitorName;
118   LPSTR pDefaultDataType;
119 } DRIVER_INFO_3A, *PDRIVER_INFO_3A, *LPDRIVER_INFO_3A;
120
121 typedef struct _DRIVER_INFO_3W {
122   DWORD cVersion;
123   LPWSTR pName;
124   LPWSTR pEnvironment;
125   LPWSTR pDriverPath;
126   LPWSTR pDataFile;
127   LPWSTR pConfigFile;
128   LPWSTR pHelpFile;
129   LPWSTR pDependentFiles;
130   LPWSTR pMonitorName;
131   LPWSTR pDefaultDataType;
132 } DRIVER_INFO_3W, *PDRIVER_INFO_3W, *LPDRIVER_INFO_3W;
133
134 DECL_WINELIB_TYPE_AW(DRIVER_INFO_3)
135 DECL_WINELIB_TYPE_AW(PDRIVER_INFO_3)
136 DECL_WINELIB_TYPE_AW(LPDRIVER_INFO_3)
137
138 typedef struct _PRINTER_INFO_1A {
139   DWORD   Flags;
140   LPSTR   pDescription;
141   LPSTR   pName;
142   LPSTR   pComment;
143 } PRINTER_INFO_1A, *PPRINTER_INFO_1A, *LPPRINTER_INFO_1A;
144
145 typedef struct _PRINTER_INFO_1W {
146   DWORD   Flags;
147   LPWSTR  pDescription;
148   LPWSTR  pName;
149   LPWSTR  pComment;
150 } PRINTER_INFO_1W, *PPRINTER_INFO_1W, *LPPRINTER_INFO_1W;
151
152 DECL_WINELIB_TYPE_AW(PRINTER_INFO_1)
153 DECL_WINELIB_TYPE_AW(PPRINTER_INFO_1)
154 DECL_WINELIB_TYPE_AW(LPPRINTER_INFO_1)
155
156 /* FIXME: winspool.h declares some structure members with the name Status.
157  * unfortunatly <X11/ICE/ICElib.h> #defines Status to the type 'int' 
158  * therfore the following hack */
159 #ifndef Status
160
161 typedef struct _PRINTER_INFO_2A {
162   LPSTR     pServerName;
163   LPSTR     pPrinterName;
164   LPSTR     pShareName;
165   LPSTR     pPortName;
166   LPSTR     pDriverName;
167   LPSTR     pComment;
168   LPSTR     pLocation;
169   LPDEVMODEA pDevMode;
170   LPSTR     pSepFile;
171   LPSTR     pPrintProcessor;
172   LPSTR     pDatatype;
173   LPSTR     pParameters;
174   PSECURITY_DESCRIPTOR pSecurityDescriptor;
175   DWORD   Attributes;
176   DWORD   Priority;
177   DWORD   DefaultPriority;
178   DWORD   StartTime;
179   DWORD   UntilTime;
180   DWORD   Status;
181   DWORD   cJobs;
182   DWORD   AveragePPM;
183 } PRINTER_INFO_2A, *PPRINTER_INFO_2A, *LPPRINTER_INFO_2A;
184
185 typedef struct _PRINTER_INFO_2W {
186   LPWSTR    pServerName;
187   LPWSTR    pPrinterName;
188   LPWSTR    pShareName;
189   LPWSTR    pPortName;
190   LPWSTR    pDriverName;
191   LPWSTR    pComment;
192   LPWSTR    pLocation;
193   LPDEVMODEW pDevMode;
194   LPWSTR    pSepFile;
195   LPWSTR    pPrintProcessor;
196   LPWSTR    pDatatype;
197   LPWSTR    pParameters;
198   PSECURITY_DESCRIPTOR pSecurityDescriptor;
199   DWORD   Attributes;
200   DWORD   Priority;
201   DWORD   DefaultPriority;
202   DWORD   StartTime;
203   DWORD   UntilTime;
204   DWORD   Status;
205   DWORD   cJobs;
206   DWORD   AveragePPM;
207 } PRINTER_INFO_2W, *PPRINTER_INFO_2W, *LPPRINTER_INFO_2W;
208
209 DECL_WINELIB_TYPE_AW(PRINTER_INFO_2)
210 DECL_WINELIB_TYPE_AW(PPRINTER_INFO_2)
211 DECL_WINELIB_TYPE_AW(LPPRINTER_INFO_2)
212
213 typedef struct _PRINTER_INFO_4A {
214   LPSTR     pPrinterName;
215   LPSTR     pServerName;
216   DWORD     Attributes;
217 } PRINTER_INFO_4A, *PPRINTER_INFO_4A, *LPPRINTER_INFO_4A;
218
219 typedef struct _PRINTER_INFO_4W {
220   LPWSTR     pPrinterName;
221   LPWSTR     pServerName;
222   DWORD     Attributes;
223 } PRINTER_INFO_4W, *PPRINTER_INFO_4W, *LPPRINTER_INFO_4W;
224
225 DECL_WINELIB_TYPE_AW(PRINTER_INFO_4)
226 DECL_WINELIB_TYPE_AW(PPRINTER_INFO_4)
227 DECL_WINELIB_TYPE_AW(LPPRINTER_INFO_4)
228
229 typedef struct _PRINTER_INFO_5A {
230   LPSTR     pPrinterName;
231   LPSTR     pPortName;
232   DWORD     Attributes;
233   DWORD     DeviceNotSelectedTimeOut;
234   DWORD     TransmissionRetryTimeout;
235 } PRINTER_INFO_5A, *PPRINTER_INFO_5A, *LPPRINTER_INFO_5A;
236
237 typedef struct _PRINTER_INFO_5W {
238   LPWSTR    pPrinterName;
239   LPWSTR    pPortName;
240   DWORD     Attributes;
241   DWORD     DeviceNotSelectedTimeOut;
242   DWORD     TransmissionRetryTimeout;
243 } PRINTER_INFO_5W, *PPRINTER_INFO_5W, *LPPRINTER_INFO_5W;
244
245 DECL_WINELIB_TYPE_AW(PRINTER_INFO_5)
246 DECL_WINELIB_TYPE_AW(PPRINTER_INFO_5)
247 DECL_WINELIB_TYPE_AW(LPPRINTER_INFO_5)
248
249 #endif /* Status */
250
251 /* DECLARATIONS */
252 INT WINAPI DeviceCapabilitiesA(LPCSTR pDevice,LPCSTR pPort,WORD fwCapability,
253                                LPSTR pOutput, LPDEVMODEA pDevMode);
254 INT WINAPI DeviceCapabilitiesW(LPCWSTR pDevice, LPCWSTR pPort,
255                                WORD fwCapability, LPWSTR pOutput,
256                                const DEVMODEW *pDevMode);
257
258 #define DeviceCapabilities WINELIB_NAME_AW(DeviceCapabilities)
259
260 LONG WINAPI DocumentPropertiesA(HWND hWnd,HANDLE hPrinter,
261                                 LPSTR pDeviceName, LPDEVMODEA pDevModeOutput,
262                                   LPDEVMODEA pDevModeInput,DWORD fMode );
263 LONG WINAPI DocumentPropertiesW(HWND hWnd, HANDLE hPrinter,
264                                   LPWSTR pDeviceName,
265                                   LPDEVMODEW pDevModeOutput,
266                                   LPDEVMODEW pDevModeInput, DWORD fMode);
267
268 #define DocumentProperties WINELIB_NAME_AW(DocumentProperties)
269
270 BOOL WINAPI OpenPrinterA(LPSTR lpPrinterName,HANDLE *phPrinter,
271                              LPPRINTER_DEFAULTSA pDefault);
272 BOOL WINAPI OpenPrinterW(LPWSTR lpPrinterName,HANDLE *phPrinter,
273                              LPPRINTER_DEFAULTSW pDefault);
274
275 #define OpenPrinter WINELIB_NAME_AW(OpenPrinter)
276
277 BOOL WINAPI ClosePrinter (HANDLE phPrinter);
278
279 BOOL  WINAPI EnumPrintersA(DWORD dwType, LPSTR lpszName,
280                                DWORD dwLevel, LPBYTE lpbPrinters,
281                                DWORD cbBuf, LPDWORD lpdwNeeded,
282                                LPDWORD lpdwReturned);
283 BOOL  WINAPI EnumPrintersW(DWORD dwType, LPWSTR lpszName,
284                                DWORD dwLevel, LPBYTE lpbPrinters,
285                                DWORD cbBuf, LPDWORD lpdwNeeded,
286                                LPDWORD lpdwReturned);
287 #define EnumPrinters WINELIB_NAME_AW(EnumPrinters)
288
289 BOOL WINAPI PrinterProperties(HWND hWnd, HANDLE hPrinter);
290
291 BOOL WINAPI GetPrinterDriverDirectoryA(LPSTR,LPSTR,DWORD,LPBYTE,DWORD,LPDWORD);
292 BOOL WINAPI GetPrinterDriverDirectoryW(LPWSTR,LPWSTR,DWORD,LPBYTE,DWORD,LPDWORD);
293 #define GetPrinterDriverDirectory WINELIB_NAME_AW(GetPrinterDriverDirectory)
294
295 #ifdef __cplusplus
296 } /* extern "C" */
297 #endif
298
299 #endif  /* __WINE_WINSPOOL_H */
300