1 /* Definitions for printing
3 * Copyright 1998 Huw Davies, Andreas Mohr
5 * Portions Copyright (c) 1999 Corel Corporation
6 * (Paul Quinn, Albert Den Haan)
8 #ifndef __WINE_WINSPOOL_H
9 #define __WINE_WINSPOOL_H
20 #define INT_PD_DEFAULT_DEVMODE 1
21 #define INT_PD_DEFAULT_MODEL 2
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
31 #define PRINTER_ATTRIBUTE_ENABLE_DEVQ 0x00000080
32 #define PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS 0x00000100
33 #define PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST 0x00000200
35 #define PRINTER_ATTRIBUTE_WORK_OFFLINE 0x00000400
36 #define PRINTER_ATTRIBUTE_ENABLE_BIDI 0x00000800
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
47 #define PRINTER_ENUM_EXPAND 0x00004000
48 #define PRINTER_ENUM_CONTAINER 0x00008000
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
61 typedef struct _PRINTER_DEFAULTSA
{
64 ACCESS_MASK DesiredAccess
;
65 } PRINTER_DEFAULTSA
, *LPPRINTER_DEFAULTSA
;
67 typedef struct _PRINTER_DEFAULTSW
{
70 ACCESS_MASK DesiredAccess
;
71 } PRINTER_DEFAULTSW
, *LPPRINTER_DEFAULTSW
;
73 DECL_WINELIB_TYPE_AW(PRINTER_DEFAULTS
)
74 DECL_WINELIB_TYPE_AW(LPPRINTER_DEFAULTS
)
76 typedef struct _DRIVER_INFO_1A
{
78 } DRIVER_INFO_1A
, *PDRIVER_INFO_1A
, *LPDRIVER_INFO_1A
;
80 typedef struct _DRIVER_INFO_1W
{
82 } DRIVER_INFO_1W
, *PDRIVER_INFO_1W
, *LPDRIVER_INFO_1W
;
84 DECL_WINELIB_TYPE_AW(DRIVER_INFO_1
)
85 DECL_WINELIB_TYPE_AW(PDRIVER_INFO_1
)
86 DECL_WINELIB_TYPE_AW(LPDRIVER_INFO_1
)
88 typedef struct _DRIVER_INFO_2A
{
95 } DRIVER_INFO_2A
, *PDRIVER_INFO_2A
, *LPDRIVER_INFO_2A
;
97 typedef struct _DRIVER_INFO_2W
{
104 } DRIVER_INFO_2W
, *PDRIVER_INFO_2W
, *LPDRIVER_INFO_2W
;
106 DECL_WINELIB_TYPE_AW(DRIVER_INFO_2
)
107 DECL_WINELIB_TYPE_AW(PDRIVER_INFO_2
)
108 DECL_WINELIB_TYPE_AW(LPDRIVER_INFO_2
)
110 typedef struct _PRINTER_INFO_1A
{
115 } PRINTER_INFO_1A
, *PPRINTER_INFO_1A
, *LPPRINTER_INFO_1A
;
117 typedef struct _PRINTER_INFO_1W
{
122 } PRINTER_INFO_1W
, *PPRINTER_INFO_1W
, *LPPRINTER_INFO_1W
;
124 DECL_WINELIB_TYPE_AW(PRINTER_INFO_1
)
125 DECL_WINELIB_TYPE_AW(PPRINTER_INFO_1
)
126 DECL_WINELIB_TYPE_AW(LPPRINTER_INFO_1
)
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 */
133 typedef struct _PRINTER_INFO_2A
{
143 LPSTR pPrintProcessor
;
146 PSECURITY_DESCRIPTOR pSecurityDescriptor
;
149 DWORD DefaultPriority
;
155 } PRINTER_INFO_2A
, *PPRINTER_INFO_2A
, *LPPRINTER_INFO_2A
;
157 typedef struct _PRINTER_INFO_2W
{
167 LPWSTR pPrintProcessor
;
170 PSECURITY_DESCRIPTOR pSecurityDescriptor
;
173 DWORD DefaultPriority
;
179 } PRINTER_INFO_2W
, *PPRINTER_INFO_2W
, *LPPRINTER_INFO_2W
;
181 DECL_WINELIB_TYPE_AW(PRINTER_INFO_2
)
182 DECL_WINELIB_TYPE_AW(PPRINTER_INFO_2
)
183 DECL_WINELIB_TYPE_AW(LPPRINTER_INFO_2
)
188 DWORD WINAPI
DrvGetPrinterData16(LPSTR lpPrinter
, LPSTR lpProfile
,
189 LPDWORD lpType
, LPBYTE lpPrinterData
, int cbData
, LPDWORD lpNeeded
);
190 DWORD WINAPI
DrvSetPrinterData16(LPSTR lpPrinter
, LPSTR lpProfile
,
191 DWORD lpType
, LPBYTE lpPrinterData
, DWORD dwSize
);
192 HANDLE16 WINAPI
OpenJob16(LPSTR lpOutput
, LPSTR lpTitle
, HDC16 hDC
);
193 int WINAPI
CloseJob16(HANDLE16 hJob
);
194 int WINAPI
WriteSpool16(HANDLE16 hJob
, LPSTR lpData
, WORD cch
);
195 int WINAPI
DeleteJob16(HANDLE16 hJob
, WORD wNotUsed
);
196 int WINAPI
StartSpoolPage16(HANDLE16 hJob
);
197 int WINAPI
EndSpoolPage16(HANDLE16 hJob
);
198 DWORD WINAPI
GetSpoolJob16(int nOption
, LONG param
);
199 int WINAPI
WriteDialog16(HANDLE16 hJob
, LPSTR lpMsg
, WORD cchMsg
);
201 INT WINAPI
DeviceCapabilitiesA(LPCSTR printer
,LPCSTR target
,WORD z
,
202 LPSTR a
,LPDEVMODEA b
);
203 INT WINAPI
DeviceCapabilitiesW(LPCWSTR pDevice
, LPCWSTR pPort
,
204 WORD fwCapability
, LPWSTR pOutput
,
205 const DEVMODEW
*pDevMode
);
207 #define DeviceCapabilities WINELIB_NAME_AW(DeviceCapabilities)
209 LONG WINAPI
DocumentPropertiesA(HWND hWnd
,HANDLE hPrinter
,
210 LPSTR pDeviceName
, LPDEVMODEA pDevModeOutput
,
211 LPDEVMODEA pDevModeInput
,DWORD fMode
);
212 LONG WINAPI
DocumentPropertiesW(HWND hWnd
, HANDLE hPrinter
,
214 LPDEVMODEW pDevModeOutput
,
215 LPDEVMODEW pDevModeInput
, DWORD fMode
);
217 #define DocumentProperties WINELIB_NAME_AW(DocumentProperties)
219 BOOL WINAPI
OpenPrinterA(LPSTR lpPrinterName
,HANDLE
*phPrinter
,
220 LPPRINTER_DEFAULTSA pDefault
);
221 BOOL WINAPI
OpenPrinterW(LPWSTR lpPrinterName
,HANDLE
*phPrinter
,
222 LPPRINTER_DEFAULTSW pDefault
);
224 #define OpenPrinter WINELIB_NAME_AW(OpenPrinter)
226 BOOL WINAPI
ClosePrinter (HANDLE phPrinter
);
233 #endif /* __WINE_WINSPOOL_H */