Changed pidl structure to match the pidl's used in lnk-files.
[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 "wintypes.h"
12 #include "winbase.h"
13 #include "wingdi.h"
14
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18
19 /* DEFINES */
20 #define INT_PD_DEFAULT_DEVMODE  1
21 #define INT_PD_DEFAULT_MODEL    2
22
23 #define PRINTER_ATTRIBUTE_QUEUED         0x00000001
24 #define PRINTER_ATTRIBUTE_DIRECT         0x00000002
25 #define PRINTER_ATTRIBUTE_DEFAULT        0x00000004
26 #define PRINTER_ATTRIBUTE_SHARED         0x00000008
27 #define PRINTER_ATTRIBUTE_NETWORK        0x00000010
28 #define PRINTER_ATTRIBUTE_HIDDEN         0x00000020
29 #define PRINTER_ATTRIBUTE_LOCAL          0x00000040
30
31 #define PRINTER_ATTRIBUTE_ENABLE_DEVQ       0x00000080
32 #define PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS   0x00000100
33 #define PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST 0x00000200
34
35 #define PRINTER_ATTRIBUTE_WORK_OFFLINE   0x00000400
36 #define PRINTER_ATTRIBUTE_ENABLE_BIDI    0x00000800
37
38 #define PRINTER_ENUM_DEFAULT     0x00000001
39 #define PRINTER_ENUM_LOCAL       0x00000002
40 #define PRINTER_ENUM_CONNECTIONS 0x00000004
41 #define PRINTER_ENUM_FAVORITE    0x00000004
42 #define PRINTER_ENUM_NAME        0x00000008
43 #define PRINTER_ENUM_REMOTE      0x00000010
44 #define PRINTER_ENUM_SHARED      0x00000020
45 #define PRINTER_ENUM_NETWORK     0x00000040
46
47 #define PRINTER_ENUM_EXPAND      0x00004000
48 #define PRINTER_ENUM_CONTAINER   0x00008000
49
50 #define PRINTER_ENUM_ICONMASK    0x00ff0000
51 #define PRINTER_ENUM_ICON1       0x00010000
52 #define PRINTER_ENUM_ICON2       0x00020000
53 #define PRINTER_ENUM_ICON3       0x00040000
54 #define PRINTER_ENUM_ICON4       0x00080000
55 #define PRINTER_ENUM_ICON5       0x00100000
56 #define PRINTER_ENUM_ICON6       0x00200000
57 #define PRINTER_ENUM_ICON7       0x00400000
58 #define PRINTER_ENUM_ICON8       0x00800000
59
60 /* TYPES */
61 typedef struct _PRINTER_DEFAULTS32A {
62   LPSTR        pDatatype;
63   LPDEVMODE32A pDevMode;
64   ACCESS_MASK  DesiredAccess;
65 } PRINTER_DEFAULTS32A, *LPPRINTER_DEFAULTS32A;
66
67 typedef struct _PRINTER_DEFAULTS32W {
68   LPWSTR       pDatatype;
69   LPDEVMODE32W pDevMode;
70   ACCESS_MASK  DesiredAccess;
71 } PRINTER_DEFAULTS32W, *LPPRINTER_DEFAULTS32W;
72
73 DECL_WINELIB_TYPE_AW(PRINTER_DEFAULTS)
74 DECL_WINELIB_TYPE_AW(LPPRINTER_DEFAULTS)
75
76 typedef struct _DRIVER_INFO_132A {
77   LPSTR     pName;
78 } DRIVER_INFO_132A, *PDRIVER_INFO_132A, *LPDRIVER_INFO_132A;
79
80 typedef struct _DRIVER_INFO_132W {
81   LPWSTR    pName;
82 } DRIVER_INFO_132W, *PDRIVER_INFO_132W, *LPDRIVER_INFO_132W;
83
84 DECL_WINELIB_TYPE_AW(DRIVER_INFO_1)
85 DECL_WINELIB_TYPE_AW(PDRIVER_INFO_1)
86 DECL_WINELIB_TYPE_AW(LPDRIVER_INFO_1)
87
88 typedef struct _DRIVER_INFO_232A {
89   DWORD   cVersion;
90   LPSTR     pName;
91   LPSTR     pEnvironment;
92   LPSTR     pDriverPath;
93   LPSTR     pDataFile; 
94   LPSTR     pConfigFile;
95 } DRIVER_INFO_232A, *PDRIVER_INFO_232A, *LPDRIVER_INFO_232A;
96
97 typedef struct _DRIVER_INFO_232W {
98   DWORD   cVersion;
99   LPWSTR    pName;     
100   LPWSTR    pEnvironment;
101   LPWSTR    pDriverPath;
102   LPWSTR    pDataFile; 
103   LPWSTR    pConfigFile;
104 } DRIVER_INFO_232W, *PDRIVER_INFO_232W, *LPDRIVER_INFO_232W;
105
106 DECL_WINELIB_TYPE_AW(DRIVER_INFO_2)
107 DECL_WINELIB_TYPE_AW(PDRIVER_INFO_2)
108 DECL_WINELIB_TYPE_AW(LPDRIVER_INFO_2)
109
110 typedef struct _PRINTER_INFO_132A {
111   DWORD   Flags;
112   LPSTR   pDescription;
113   LPSTR   pName;
114   LPSTR   pComment;
115 } PRINTER_INFO_132A, *PPRINTER_INFO_132A, *LPPRINTER_INFO_132A;
116
117 typedef struct _PRINTER_INFO_132W {
118   DWORD   Flags;
119   LPWSTR  pDescription;
120   LPWSTR  pName;
121   LPWSTR  pComment;
122 } PRINTER_INFO_132W, *PPRINTER_INFO_132W, *LPPRINTER_INFO_132W;
123
124 DECL_WINELIB_TYPE_AW(PRINTER_INFO_1)
125 DECL_WINELIB_TYPE_AW(PPRINTER_INFO_1)
126 DECL_WINELIB_TYPE_AW(LPPRINTER_INFO_1)
127
128 /* FIXME: winspool.h declares some structure members with the name Status.
129  * unfortunatly <X11/ICE/ICElib.h> #defines Status to the type 'int' 
130  * therfore the following hack */
131 #ifndef Status
132
133 typedef struct _PRINTER_INFO_232A {
134   LPSTR     pServerName;
135   LPSTR     pPrinterName;
136   LPSTR     pShareName;
137   LPSTR     pPortName;
138   LPSTR     pDriverName;
139   LPSTR     pComment;
140   LPSTR     pLocation;
141   LPDEVMODE32A pDevMode;
142   LPSTR     pSepFile;
143   LPSTR     pPrintProcessor;
144   LPSTR     pDatatype;
145   LPSTR     pParameters;
146   PSECURITY_DESCRIPTOR pSecurityDescriptor;
147   DWORD   Attributes;
148   DWORD   Priority;
149   DWORD   DefaultPriority;
150   DWORD   StartTime;
151   DWORD   UntilTime;
152   DWORD   Status;
153   DWORD   cJobs;
154   DWORD   AveragePPM;
155 } PRINTER_INFO_232A, *PPRINTER_INFO_232A, *LPPRINTER_INFO_232A;
156
157 typedef struct _PRINTER_INFO_232W {
158   LPWSTR    pServerName;
159   LPWSTR    pPrinterName;
160   LPWSTR    pShareName;
161   LPWSTR    pPortName;
162   LPWSTR    pDriverName;
163   LPWSTR    pComment;
164   LPWSTR    pLocation;
165   LPDEVMODE32W pDevMode;
166   LPWSTR    pSepFile;
167   LPWSTR    pPrintProcessor;
168   LPWSTR    pDatatype;
169   LPWSTR    pParameters;
170   PSECURITY_DESCRIPTOR pSecurityDescriptor;
171   DWORD   Attributes;
172   DWORD   Priority;
173   DWORD   DefaultPriority;
174   DWORD   StartTime;
175   DWORD   UntilTime;
176   DWORD   Status;
177   DWORD   cJobs;
178   DWORD   AveragePPM;
179 } PRINTER_INFO_232W, *PPRINTER_INFO_232W, *LPPRINTER_INFO_232W;
180
181 DECL_WINELIB_TYPE_AW(PRINTER_INFO_2)
182 DECL_WINELIB_TYPE_AW(PPRINTER_INFO_2)
183 DECL_WINELIB_TYPE_AW(LPPRINTER_INFO_2)
184
185 #endif /* Status */
186
187 /* DECLARATIONS */
188 DWORD WINAPI DrvGetPrinterData(LPSTR lpPrinter, LPSTR lpProfile,
189           LPDWORD lpType, LPBYTE lpPrinterData, int cbData, LPDWORD lpNeeded);
190 DWORD WINAPI DrvSetPrinterData(LPSTR lpPrinter, LPSTR lpProfile,
191           DWORD lpType, LPBYTE lpPrinterData, DWORD dwSize);
192 HANDLE16 WINAPI OpenJob(LPSTR lpOutput, LPSTR lpTitle, HDC16 hDC);
193 int WINAPI CloseJob(HANDLE16 hJob);
194 int WINAPI WriteSpool(HANDLE16 hJob, LPSTR lpData, WORD cch);
195 int WINAPI DeleteJob(HANDLE16 hJob, WORD wNotUsed);
196 int WINAPI StartSpoolPage(HANDLE16 hJob);
197 int WINAPI EndSpoolPage(HANDLE16 hJob);
198 DWORD WINAPI GetSpoolJob(int nOption, LONG param);
199 int WINAPI WriteDialog(HANDLE16 hJob, LPSTR lpMsg, WORD cchMsg);
200
201 INT32 WINAPI DeviceCapabilities32A(LPCSTR printer,LPCSTR target,WORD z,
202                                    LPSTR a,LPDEVMODE32A b);
203 INT32 WINAPI DeviceCapabilities32W(LPCWSTR pDevice, LPCWSTR pPort,
204                                    WORD fwCapability, LPWSTR pOutput,
205                                    const DEVMODE32W *pDevMode);
206
207 #define DeviceCapabilities WINELIB_NAME_AW(DeviceCapabilities)
208
209 LONG WINAPI DocumentProperties32A(HWND32 hWnd,HANDLE32 hPrinter,
210                                 LPSTR pDeviceName, LPDEVMODE32A pDevModeOutput,
211                                   LPDEVMODE32A pDevModeInput,DWORD fMode );
212 LONG WINAPI DocumentProperties32W(HWND32 hWnd, HANDLE32 hPrinter,
213                                   LPWSTR pDeviceName,
214                                   LPDEVMODE32W pDevModeOutput,
215                                   LPDEVMODE32W pDevModeInput, DWORD fMode);
216
217 #define DocumentProperties WINELIB_NAME_AW(DocumentProperties)
218
219 BOOL32 WINAPI OpenPrinter32A(LPSTR lpPrinterName,HANDLE32 *phPrinter,
220                              LPPRINTER_DEFAULTS32A pDefault);
221 BOOL32 WINAPI OpenPrinter32W(LPWSTR lpPrinterName,HANDLE32 *phPrinter,
222                              LPPRINTER_DEFAULTS32W pDefault);
223
224 #define OpenPrinter WINELIB_NAME_AW(OpenPrinter)
225
226 BOOL32 WINAPI ClosePrinter32 (HANDLE32 phPrinter);
227
228 #define ClosePrinter WINELIB_NAME(ClosePrinter)
229
230 #ifdef __cplusplus
231 } // extern "C"
232 #endif
233
234 #endif  /* __WINE_WINSPOOL_H */
235