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