source: trunk/include/win/winspool.h@ 5200

Last change on this file since 5200 was 1546, checked in by sandervl, 26 years ago

header updates

File size: 13.2 KB
Line 
1/* $Id: winspool.h,v 1.2 1999-11-02 19:06:43 sandervl Exp $ */
2/* Definitions for printing
3 *
4 * Copyright 1998 Huw Davies, Andreas Mohr
5 *
6 * Portions Copyright (c) 1999 Corel Corporation
7 * (Paul Quinn, Albert Den Haan)
8 */
9#ifndef __WINE_WINSPOOL_H
10#define __WINE_WINSPOOL_H
11
12#include "windef.h"
13#include "winbase.h"
14#include "wingdi.h"
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
20/* DEFINES */
21
22#define PRINTER_ATTRIBUTE_QUEUED 0x00000001
23#define PRINTER_ATTRIBUTE_DIRECT 0x00000002
24#define PRINTER_ATTRIBUTE_DEFAULT 0x00000004
25#define PRINTER_ATTRIBUTE_SHARED 0x00000008
26#define PRINTER_ATTRIBUTE_NETWORK 0x00000010
27#define PRINTER_ATTRIBUTE_HIDDEN 0x00000020
28#define PRINTER_ATTRIBUTE_LOCAL 0x00000040
29
30#define PRINTER_ATTRIBUTE_ENABLE_DEVQ 0x00000080
31#define PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS 0x00000100
32#define PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST 0x00000200
33
34#define PRINTER_ATTRIBUTE_WORK_OFFLINE 0x00000400
35#define PRINTER_ATTRIBUTE_ENABLE_BIDI 0x00000800
36
37#define PRINTER_ENUM_DEFAULT 0x00000001
38#define PRINTER_ENUM_LOCAL 0x00000002
39#define PRINTER_ENUM_CONNECTIONS 0x00000004
40#define PRINTER_ENUM_FAVORITE 0x00000004
41#define PRINTER_ENUM_NAME 0x00000008
42#define PRINTER_ENUM_REMOTE 0x00000010
43#define PRINTER_ENUM_SHARED 0x00000020
44#define PRINTER_ENUM_NETWORK 0x00000040
45
46#define PRINTER_ENUM_EXPAND 0x00004000
47#define PRINTER_ENUM_CONTAINER 0x00008000
48
49#define PRINTER_ENUM_ICONMASK 0x00ff0000
50#define PRINTER_ENUM_ICON1 0x00010000
51#define PRINTER_ENUM_ICON2 0x00020000
52#define PRINTER_ENUM_ICON3 0x00040000
53#define PRINTER_ENUM_ICON4 0x00080000
54#define PRINTER_ENUM_ICON5 0x00100000
55#define PRINTER_ENUM_ICON6 0x00200000
56#define PRINTER_ENUM_ICON7 0x00400000
57#define PRINTER_ENUM_ICON8 0x00800000
58
59
60/* various printer statuses */
61#define PRINTER_STATUS_PAUSED 0x00000001
62#define PRINTER_STATUS_ERROR 0x00000002
63#define PRINTER_STATUS_PENDING_DELETION 0x00000004
64#define PRINTER_STATUS_PAPER_JAM 0x00000008
65#define PRINTER_STATUS_PAPER_OUT 0x00000010
66#define PRINTER_STATUS_MANUAL_FEED 0x00000020
67#define PRINTER_STATUS_PAPER_PROBLEM 0x00000040
68#define PRINTER_STATUS_OFFLINE 0x00000080
69#define PRINTER_STATUS_IO_ACTIVE 0x00000100
70#define PRINTER_STATUS_BUSY 0x00000200
71#define PRINTER_STATUS_PRINTING 0x00000400
72#define PRINTER_STATUS_OUTPUT_BIN_FULL 0x00000800
73#define PRINTER_STATUS_NOT_AVAILABLE 0x00001000
74#define PRINTER_STATUS_WAITING 0x00002000
75#define PRINTER_STATUS_PROCESSING 0x00004000
76#define PRINTER_STATUS_INITIALIZING 0x00008000
77#define PRINTER_STATUS_WARMING_UP 0x00010000
78#define PRINTER_STATUS_TONER_LOW 0x00020000
79#define PRINTER_STATUS_NO_TONER 0x00040000
80#define PRINTER_STATUS_PAGE_PUNT 0x00080000
81#define PRINTER_STATUS_USER_INTERVENTION 0x00100000
82#define PRINTER_STATUS_OUT_OF_MEMORY 0x00200000
83#define PRINTER_STATUS_DOOR_OPEN 0x00400000
84#define PRINTER_STATUS_SERVER_UNKNOWN 0x00800000
85#define PRINTER_STATUS_POWER_SAVE 0x01000000
86
87/* TYPES */
88typedef struct _PRINTER_DEFAULTSA {
89 LPSTR pDatatype;
90 LPDEVMODEA pDevMode;
91 ACCESS_MASK DesiredAccess;
92} PRINTER_DEFAULTSA, *LPPRINTER_DEFAULTSA;
93
94typedef struct _PRINTER_DEFAULTSW {
95 LPWSTR pDatatype;
96 LPDEVMODEW pDevMode;
97 ACCESS_MASK DesiredAccess;
98} PRINTER_DEFAULTSW, *LPPRINTER_DEFAULTSW;
99
100DECL_WINELIB_TYPE_AW(PRINTER_DEFAULTS)
101DECL_WINELIB_TYPE_AW(LPPRINTER_DEFAULTS)
102
103typedef struct _DRIVER_INFO_1A {
104 LPSTR pName;
105} DRIVER_INFO_1A, *PDRIVER_INFO_1A, *LPDRIVER_INFO_1A;
106
107typedef struct _DRIVER_INFO_1W {
108 LPWSTR pName;
109} DRIVER_INFO_1W, *PDRIVER_INFO_1W, *LPDRIVER_INFO_1W;
110
111DECL_WINELIB_TYPE_AW(DRIVER_INFO_1)
112DECL_WINELIB_TYPE_AW(PDRIVER_INFO_1)
113DECL_WINELIB_TYPE_AW(LPDRIVER_INFO_1)
114
115typedef struct _DRIVER_INFO_2A {
116 DWORD cVersion;
117 LPSTR pName;
118 LPSTR pEnvironment;
119 LPSTR pDriverPath;
120 LPSTR pDataFile;
121 LPSTR pConfigFile;
122} DRIVER_INFO_2A, *PDRIVER_INFO_2A, *LPDRIVER_INFO_2A;
123
124typedef struct _DRIVER_INFO_2W {
125 DWORD cVersion;
126 LPWSTR pName;
127 LPWSTR pEnvironment;
128 LPWSTR pDriverPath;
129 LPWSTR pDataFile;
130 LPWSTR pConfigFile;
131} DRIVER_INFO_2W, *PDRIVER_INFO_2W, *LPDRIVER_INFO_2W;
132
133DECL_WINELIB_TYPE_AW(DRIVER_INFO_2)
134DECL_WINELIB_TYPE_AW(PDRIVER_INFO_2)
135DECL_WINELIB_TYPE_AW(LPDRIVER_INFO_2)
136
137typedef struct _DRIVER_INFO_3A {
138 DWORD cVersion;
139 LPSTR pName;
140 LPSTR pEnvironment;
141 LPSTR pDriverPath;
142 LPSTR pDataFile;
143 LPSTR pConfigFile;
144 LPSTR pHelpFile;
145 LPSTR pDependentFiles;
146 LPSTR pMonitorName;
147 LPSTR pDefaultDataType;
148} DRIVER_INFO_3A, *PDRIVER_INFO_3A, *LPDRIVER_INFO_3A;
149
150typedef struct _DRIVER_INFO_3W {
151 DWORD cVersion;
152 LPWSTR pName;
153 LPWSTR pEnvironment;
154 LPWSTR pDriverPath;
155 LPWSTR pDataFile;
156 LPWSTR pConfigFile;
157 LPWSTR pHelpFile;
158 LPWSTR pDependentFiles;
159 LPWSTR pMonitorName;
160 LPWSTR pDefaultDataType;
161} DRIVER_INFO_3W, *PDRIVER_INFO_3W, *LPDRIVER_INFO_3W;
162
163DECL_WINELIB_TYPE_AW(DRIVER_INFO_3)
164DECL_WINELIB_TYPE_AW(PDRIVER_INFO_3)
165DECL_WINELIB_TYPE_AW(LPDRIVER_INFO_3)
166
167typedef struct _PRINTER_INFO_1A {
168 DWORD Flags;
169 LPSTR pDescription;
170 LPSTR pName;
171 LPSTR pComment;
172} PRINTER_INFO_1A, *PPRINTER_INFO_1A, *LPPRINTER_INFO_1A;
173
174typedef struct _PRINTER_INFO_1W {
175 DWORD Flags;
176 LPWSTR pDescription;
177 LPWSTR pName;
178 LPWSTR pComment;
179} PRINTER_INFO_1W, *PPRINTER_INFO_1W, *LPPRINTER_INFO_1W;
180
181DECL_WINELIB_TYPE_AW(PRINTER_INFO_1)
182DECL_WINELIB_TYPE_AW(PPRINTER_INFO_1)
183DECL_WINELIB_TYPE_AW(LPPRINTER_INFO_1)
184
185/* FIXME: winspool.h declares some structure members with the name Status.
186 * unfortunatly <X11/ICE/ICElib.h> #defines Status to the type 'int'
187 * therfore the following hack */
188#ifndef Status
189
190typedef struct _PRINTER_INFO_2A {
191 LPSTR pServerName;
192 LPSTR pPrinterName;
193 LPSTR pShareName;
194 LPSTR pPortName;
195 LPSTR pDriverName;
196 LPSTR pComment;
197 LPSTR pLocation;
198 LPDEVMODEA pDevMode;
199 LPSTR pSepFile;
200 LPSTR pPrintProcessor;
201 LPSTR pDatatype;
202 LPSTR pParameters;
203 PSECURITY_DESCRIPTOR pSecurityDescriptor;
204 DWORD Attributes;
205 DWORD Priority;
206 DWORD DefaultPriority;
207 DWORD StartTime;
208 DWORD UntilTime;
209 DWORD Status;
210 DWORD cJobs;
211 DWORD AveragePPM;
212} PRINTER_INFO_2A, *PPRINTER_INFO_2A, *LPPRINTER_INFO_2A;
213
214typedef struct _PRINTER_INFO_2W {
215 LPWSTR pServerName;
216 LPWSTR pPrinterName;
217 LPWSTR pShareName;
218 LPWSTR pPortName;
219 LPWSTR pDriverName;
220 LPWSTR pComment;
221 LPWSTR pLocation;
222 LPDEVMODEW pDevMode;
223 LPWSTR pSepFile;
224 LPWSTR pPrintProcessor;
225 LPWSTR pDatatype;
226 LPWSTR pParameters;
227 PSECURITY_DESCRIPTOR pSecurityDescriptor;
228 DWORD Attributes;
229 DWORD Priority;
230 DWORD DefaultPriority;
231 DWORD StartTime;
232 DWORD UntilTime;
233 DWORD Status;
234 DWORD cJobs;
235 DWORD AveragePPM;
236} PRINTER_INFO_2W, *PPRINTER_INFO_2W, *LPPRINTER_INFO_2W;
237
238DECL_WINELIB_TYPE_AW(PRINTER_INFO_2)
239DECL_WINELIB_TYPE_AW(PPRINTER_INFO_2)
240DECL_WINELIB_TYPE_AW(LPPRINTER_INFO_2)
241
242typedef struct _PRINTER_INFO_4A {
243 LPSTR pPrinterName;
244 LPSTR pServerName;
245 DWORD Attributes;
246} PRINTER_INFO_4A, *PPRINTER_INFO_4A, *LPPRINTER_INFO_4A;
247
248typedef struct _PRINTER_INFO_4W {
249 LPWSTR pPrinterName;
250 LPWSTR pServerName;
251 DWORD Attributes;
252} PRINTER_INFO_4W, *PPRINTER_INFO_4W, *LPPRINTER_INFO_4W;
253
254DECL_WINELIB_TYPE_AW(PRINTER_INFO_4)
255DECL_WINELIB_TYPE_AW(PPRINTER_INFO_4)
256DECL_WINELIB_TYPE_AW(LPPRINTER_INFO_4)
257
258typedef struct _PRINTER_INFO_5A {
259 LPSTR pPrinterName;
260 LPSTR pPortName;
261 DWORD Attributes;
262 DWORD DeviceNotSelectedTimeOut;
263 DWORD TransmissionRetryTimeout;
264} PRINTER_INFO_5A, *PPRINTER_INFO_5A, *LPPRINTER_INFO_5A;
265
266typedef struct _PRINTER_INFO_5W {
267 LPWSTR pPrinterName;
268 LPWSTR pPortName;
269 DWORD Attributes;
270 DWORD DeviceNotSelectedTimeOut;
271 DWORD TransmissionRetryTimeout;
272} PRINTER_INFO_5W, *PPRINTER_INFO_5W, *LPPRINTER_INFO_5W;
273
274DECL_WINELIB_TYPE_AW(PRINTER_INFO_5)
275DECL_WINELIB_TYPE_AW(PPRINTER_INFO_5)
276DECL_WINELIB_TYPE_AW(LPPRINTER_INFO_5)
277
278typedef struct _JOB_INFO_1A {
279 DWORD JobID;
280 LPSTR pPrinterName;
281 LPSTR pMachineName;
282 LPSTR pUserName;
283 LPSTR pDocument;
284 LPSTR pDatatype;
285 LPSTR pStatus;
286 DWORD Status;
287 DWORD Priority;
288 DWORD Position;
289 DWORD TotalPages;
290 DWORD PagesPrinted;
291 SYSTEMTIME Submitted;
292} JOB_INFO_1A, *PJOB_INFO_1A, *LPJOB_INFO_1A;
293
294typedef struct _JOB_INFO_1W {
295 DWORD JobID;
296 LPWSTR pPrinterName;
297 LPWSTR pMachineName;
298 LPWSTR pUserName;
299 LPWSTR pDocument;
300 LPWSTR pDatatype;
301 LPWSTR pStatus;
302 DWORD Status;
303 DWORD Priority;
304 DWORD Position;
305 DWORD TotalPages;
306 DWORD PagesPrinted;
307 SYSTEMTIME Submitted;
308} JOB_INFO_1W, *PJOB_INFO_1W, *LPJOB_INFO_1W;
309
310DECL_WINELIB_TYPE_AW(JOB_INFO_1)
311DECL_WINELIB_TYPE_AW(PJOB_INFO_1)
312DECL_WINELIB_TYPE_AW(LPJOB_INFO_1)
313
314typedef struct _JOB_INFO_2A {
315 DWORD JobID;
316 LPSTR pPrinterName;
317 LPSTR pMachineName;
318 LPSTR pUserName;
319 LPSTR pDocument;
320 LPSTR pNotifyName;
321 LPSTR pDatatype;
322 LPSTR pPrintProcessor;
323 LPSTR pParameters;
324 LPSTR pDriverName;
325 LPDEVMODEA pDevMode;
326 LPSTR pStatus;
327 PSECURITY_DESCRIPTOR pSecurityDescriptor;
328 DWORD Status;
329 DWORD Priority;
330 DWORD Position;
331 DWORD StartTime;
332 DWORD UntilTime;
333 DWORD TotalPages;
334 DWORD Size;
335 SYSTEMTIME Submitted;
336 DWORD Time;
337 DWORD PagesPrinted;
338} JOB_INFO_2A, *PJOB_INFO_2A, *LPJOB_INFO_2A;
339
340typedef struct _JOB_INFO_2W {
341 DWORD JobID;
342 LPWSTR pPrinterName;
343 LPWSTR pMachineName;
344 LPWSTR pUserName;
345 LPWSTR pDocument;
346 LPWSTR pNotifyName;
347 LPWSTR pDatatype;
348 LPWSTR pPrintProcessor;
349 LPWSTR pParameters;
350 LPWSTR pDriverName;
351 LPDEVMODEW pDevMode;
352 LPWSTR pStatus;
353 PSECURITY_DESCRIPTOR pSecurityDescriptor;
354 DWORD Status;
355 DWORD Priority;
356 DWORD Position;
357 DWORD StartTime;
358 DWORD UntilTime;
359 DWORD TotalPages;
360 DWORD Size;
361 SYSTEMTIME Submitted;
362 DWORD Time;
363 DWORD PagesPrinted;
364} JOB_INFO_2W, *PJOB_INFO_2W, *LPJOB_INFO_2W;
365
366DECL_WINELIB_TYPE_AW(JOB_INFO_2)
367DECL_WINELIB_TYPE_AW(PJOB_INFO_2)
368DECL_WINELIB_TYPE_AW(LPJOB_INFO_2)
369typedef struct _PRINTER_NOTIFY_INFO_DATA {
370 WORD Type;
371 WORD Field;
372 DWORD Reserved;
373 DWORD Id;
374 union {
375 DWORD adwData[2];
376 struct {
377 DWORD cbBuf;
378 LPVOID pBuf;
379 } Data;
380 } NotifyData;
381
382} PRINTER_NOTIFY_INFO_DATA, *PPRINTER_NOTIFY_INFO_DATA, *LPPRINTER_NOTIFY_INFO_DATA;
383
384typedef struct _PRINTER_NOTIFY_INFO {
385 DWORD Version;
386 DWORD Flags;
387 DWORD Count;
388 PRINTER_NOTIFY_INFO_DATA aData[1];
389} PRINTER_NOTIFY_INFO, *PPRINTER_NOTIFY_INFO, *LPPRINTER_NOTIFY_INFO;
390
391
392#endif /* Status */
393
394
395
396/* DECLARATIONS */
397INT WINAPI DeviceCapabilitiesA(LPCSTR pDevice,LPCSTR pPort,WORD fwCapability,
398 LPSTR pOutput, LPDEVMODEA pDevMode);
399INT WINAPI DeviceCapabilitiesW(LPCWSTR pDevice, LPCWSTR pPort,
400 WORD fwCapability, LPWSTR pOutput,
401 const DEVMODEW *pDevMode);
402
403#define DeviceCapabilities WINELIB_NAME_AW(DeviceCapabilities)
404
405LONG WINAPI DocumentPropertiesA(HWND hWnd,HANDLE hPrinter,
406 LPSTR pDeviceName, LPDEVMODEA pDevModeOutput,
407 LPDEVMODEA pDevModeInput,DWORD fMode );
408LONG WINAPI DocumentPropertiesW(HWND hWnd, HANDLE hPrinter,
409 LPWSTR pDeviceName,
410 LPDEVMODEW pDevModeOutput,
411 LPDEVMODEW pDevModeInput, DWORD fMode);
412
413#define DocumentProperties WINELIB_NAME_AW(DocumentProperties)
414
415BOOL WINAPI OpenPrinterA(LPSTR lpPrinterName,HANDLE *phPrinter,
416 LPPRINTER_DEFAULTSA pDefault);
417BOOL WINAPI OpenPrinterW(LPWSTR lpPrinterName,HANDLE *phPrinter,
418 LPPRINTER_DEFAULTSW pDefault);
419
420#define OpenPrinter WINELIB_NAME_AW(OpenPrinter)
421
422BOOL WINAPI ClosePrinter (HANDLE phPrinter);
423
424BOOL WINAPI EnumJobsA(HANDLE hPrinter, DWORD FirstJob, DWORD NoJobs,
425 DWORD Level, LPBYTE pJob, DWORD cbBuf, LPDWORD pcbNeeded,
426 LPDWORD pcReturned);
427BOOL WINAPI EnumJobsW(HANDLE hPrinter, DWORD FirstJob, DWORD NoJobs,
428 DWORD Level, LPBYTE pJob, DWORD cbBuf, LPDWORD pcbNeeded,
429 LPDWORD pcReturned);
430#define EnumJobs WINELIB_NAME_AW(EnumJobs)
431
432BOOL WINAPI EnumPrintersA(DWORD dwType, LPSTR lpszName,
433 DWORD dwLevel, LPBYTE lpbPrinters,
434 DWORD cbBuf, LPDWORD lpdwNeeded,
435 LPDWORD lpdwReturned);
436BOOL WINAPI EnumPrintersW(DWORD dwType, LPWSTR lpszName,
437 DWORD dwLevel, LPBYTE lpbPrinters,
438 DWORD cbBuf, LPDWORD lpdwNeeded,
439 LPDWORD lpdwReturned);
440#define EnumPrinters WINELIB_NAME_AW(EnumPrinters)
441
442BOOL WINAPI PrinterProperties(HWND hWnd, HANDLE hPrinter);
443
444BOOL WINAPI GetPrinterDriverDirectoryA(LPSTR,LPSTR,DWORD,LPBYTE,DWORD,LPDWORD);
445BOOL WINAPI GetPrinterDriverDirectoryW(LPWSTR,LPWSTR,DWORD,LPBYTE,DWORD,LPDWORD);
446#define GetPrinterDriverDirectory WINELIB_NAME_AW(GetPrinterDriverDirectory)
447
448BOOL WINAPI GetPrinterDriverA(HANDLE hPrinter, LPSTR pEnvironment,
449 DWORD Level, LPBYTE pDriverInfo,
450 DWORD cbBuf, LPDWORD pcbNeeded);
451BOOL WINAPI GetPrinterDriverW(HANDLE hPrinter, LPWSTR pEnvironment,
452 DWORD Level, LPBYTE pDriverInfo,
453 DWORD cbBuf, LPDWORD pcbNeeded);
454#define GetPrinterDriver WINELIB_NAME_AW(GetPrinterDriver)
455
456#ifdef __cplusplus
457} /* extern "C" */
458#endif
459
460#endif /* __WINE_WINSPOOL_H */
461
Note: See TracBrowser for help on using the repository browser.