1999-02-10 07:52:57 +01:00
|
|
|
/* Definitions for printing
|
|
|
|
*
|
|
|
|
* Copyright 1998 Huw Davies, Andreas Mohr
|
|
|
|
*
|
|
|
|
* Portions Copyright (c) 1999 Corel Corporation
|
|
|
|
* (Paul Quinn, Albert Den Haan)
|
|
|
|
*/
|
|
|
|
#ifndef __WINE_WINSPOOL_H
|
|
|
|
#define __WINE_WINSPOOL_H
|
|
|
|
|
1999-03-14 17:35:05 +01:00
|
|
|
#include "windef.h"
|
1999-02-17 14:51:06 +01:00
|
|
|
#include "winbase.h"
|
|
|
|
#include "wingdi.h"
|
1999-02-10 07:52:57 +01:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* DEFINES */
|
|
|
|
|
|
|
|
#define PRINTER_ATTRIBUTE_QUEUED 0x00000001
|
|
|
|
#define PRINTER_ATTRIBUTE_DIRECT 0x00000002
|
|
|
|
#define PRINTER_ATTRIBUTE_DEFAULT 0x00000004
|
|
|
|
#define PRINTER_ATTRIBUTE_SHARED 0x00000008
|
|
|
|
#define PRINTER_ATTRIBUTE_NETWORK 0x00000010
|
|
|
|
#define PRINTER_ATTRIBUTE_HIDDEN 0x00000020
|
|
|
|
#define PRINTER_ATTRIBUTE_LOCAL 0x00000040
|
|
|
|
|
|
|
|
#define PRINTER_ATTRIBUTE_ENABLE_DEVQ 0x00000080
|
|
|
|
#define PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS 0x00000100
|
|
|
|
#define PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST 0x00000200
|
|
|
|
|
|
|
|
#define PRINTER_ATTRIBUTE_WORK_OFFLINE 0x00000400
|
|
|
|
#define PRINTER_ATTRIBUTE_ENABLE_BIDI 0x00000800
|
|
|
|
|
|
|
|
#define PRINTER_ENUM_DEFAULT 0x00000001
|
|
|
|
#define PRINTER_ENUM_LOCAL 0x00000002
|
|
|
|
#define PRINTER_ENUM_CONNECTIONS 0x00000004
|
|
|
|
#define PRINTER_ENUM_FAVORITE 0x00000004
|
|
|
|
#define PRINTER_ENUM_NAME 0x00000008
|
|
|
|
#define PRINTER_ENUM_REMOTE 0x00000010
|
|
|
|
#define PRINTER_ENUM_SHARED 0x00000020
|
|
|
|
#define PRINTER_ENUM_NETWORK 0x00000040
|
|
|
|
|
|
|
|
#define PRINTER_ENUM_EXPAND 0x00004000
|
|
|
|
#define PRINTER_ENUM_CONTAINER 0x00008000
|
|
|
|
|
|
|
|
#define PRINTER_ENUM_ICONMASK 0x00ff0000
|
|
|
|
#define PRINTER_ENUM_ICON1 0x00010000
|
|
|
|
#define PRINTER_ENUM_ICON2 0x00020000
|
|
|
|
#define PRINTER_ENUM_ICON3 0x00040000
|
|
|
|
#define PRINTER_ENUM_ICON4 0x00080000
|
|
|
|
#define PRINTER_ENUM_ICON5 0x00100000
|
|
|
|
#define PRINTER_ENUM_ICON6 0x00200000
|
|
|
|
#define PRINTER_ENUM_ICON7 0x00400000
|
|
|
|
#define PRINTER_ENUM_ICON8 0x00800000
|
|
|
|
|
|
|
|
/* TYPES */
|
1999-02-26 12:11:13 +01:00
|
|
|
typedef struct _PRINTER_DEFAULTSA {
|
1999-02-10 07:52:57 +01:00
|
|
|
LPSTR pDatatype;
|
1999-02-26 12:11:13 +01:00
|
|
|
LPDEVMODEA pDevMode;
|
1999-02-10 07:52:57 +01:00
|
|
|
ACCESS_MASK DesiredAccess;
|
1999-02-26 12:11:13 +01:00
|
|
|
} PRINTER_DEFAULTSA, *LPPRINTER_DEFAULTSA;
|
1999-02-10 07:52:57 +01:00
|
|
|
|
1999-02-26 12:11:13 +01:00
|
|
|
typedef struct _PRINTER_DEFAULTSW {
|
1999-02-10 07:52:57 +01:00
|
|
|
LPWSTR pDatatype;
|
1999-02-26 12:11:13 +01:00
|
|
|
LPDEVMODEW pDevMode;
|
1999-02-10 07:52:57 +01:00
|
|
|
ACCESS_MASK DesiredAccess;
|
1999-02-26 12:11:13 +01:00
|
|
|
} PRINTER_DEFAULTSW, *LPPRINTER_DEFAULTSW;
|
1999-02-10 07:52:57 +01:00
|
|
|
|
|
|
|
DECL_WINELIB_TYPE_AW(PRINTER_DEFAULTS)
|
|
|
|
DECL_WINELIB_TYPE_AW(LPPRINTER_DEFAULTS)
|
|
|
|
|
1999-02-26 12:11:13 +01:00
|
|
|
typedef struct _DRIVER_INFO_1A {
|
1999-02-10 07:52:57 +01:00
|
|
|
LPSTR pName;
|
1999-02-26 12:11:13 +01:00
|
|
|
} DRIVER_INFO_1A, *PDRIVER_INFO_1A, *LPDRIVER_INFO_1A;
|
1999-02-10 07:52:57 +01:00
|
|
|
|
1999-02-26 12:11:13 +01:00
|
|
|
typedef struct _DRIVER_INFO_1W {
|
1999-02-10 07:52:57 +01:00
|
|
|
LPWSTR pName;
|
1999-02-26 12:11:13 +01:00
|
|
|
} DRIVER_INFO_1W, *PDRIVER_INFO_1W, *LPDRIVER_INFO_1W;
|
1999-02-10 07:52:57 +01:00
|
|
|
|
|
|
|
DECL_WINELIB_TYPE_AW(DRIVER_INFO_1)
|
|
|
|
DECL_WINELIB_TYPE_AW(PDRIVER_INFO_1)
|
|
|
|
DECL_WINELIB_TYPE_AW(LPDRIVER_INFO_1)
|
|
|
|
|
1999-02-26 12:11:13 +01:00
|
|
|
typedef struct _DRIVER_INFO_2A {
|
1999-02-10 07:52:57 +01:00
|
|
|
DWORD cVersion;
|
|
|
|
LPSTR pName;
|
|
|
|
LPSTR pEnvironment;
|
|
|
|
LPSTR pDriverPath;
|
|
|
|
LPSTR pDataFile;
|
|
|
|
LPSTR pConfigFile;
|
1999-02-26 12:11:13 +01:00
|
|
|
} DRIVER_INFO_2A, *PDRIVER_INFO_2A, *LPDRIVER_INFO_2A;
|
1999-02-10 07:52:57 +01:00
|
|
|
|
1999-02-26 12:11:13 +01:00
|
|
|
typedef struct _DRIVER_INFO_2W {
|
1999-02-10 07:52:57 +01:00
|
|
|
DWORD cVersion;
|
|
|
|
LPWSTR pName;
|
|
|
|
LPWSTR pEnvironment;
|
|
|
|
LPWSTR pDriverPath;
|
|
|
|
LPWSTR pDataFile;
|
|
|
|
LPWSTR pConfigFile;
|
1999-02-26 12:11:13 +01:00
|
|
|
} DRIVER_INFO_2W, *PDRIVER_INFO_2W, *LPDRIVER_INFO_2W;
|
1999-02-10 07:52:57 +01:00
|
|
|
|
|
|
|
DECL_WINELIB_TYPE_AW(DRIVER_INFO_2)
|
|
|
|
DECL_WINELIB_TYPE_AW(PDRIVER_INFO_2)
|
|
|
|
DECL_WINELIB_TYPE_AW(LPDRIVER_INFO_2)
|
|
|
|
|
1999-05-22 20:53:56 +02:00
|
|
|
typedef struct _DRIVER_INFO_3A {
|
|
|
|
DWORD cVersion;
|
|
|
|
LPSTR pName;
|
|
|
|
LPSTR pEnvironment;
|
|
|
|
LPSTR pDriverPath;
|
|
|
|
LPSTR pDataFile;
|
|
|
|
LPSTR pConfigFile;
|
|
|
|
LPSTR pHelpFile;
|
|
|
|
LPSTR pDependentFiles;
|
|
|
|
LPSTR pMonitorName;
|
|
|
|
LPSTR pDefaultDataType;
|
|
|
|
} DRIVER_INFO_3A, *PDRIVER_INFO_3A, *LPDRIVER_INFO_3A;
|
|
|
|
|
|
|
|
typedef struct _DRIVER_INFO_3W {
|
|
|
|
DWORD cVersion;
|
|
|
|
LPWSTR pName;
|
|
|
|
LPWSTR pEnvironment;
|
|
|
|
LPWSTR pDriverPath;
|
|
|
|
LPWSTR pDataFile;
|
|
|
|
LPWSTR pConfigFile;
|
|
|
|
LPWSTR pHelpFile;
|
|
|
|
LPWSTR pDependentFiles;
|
|
|
|
LPWSTR pMonitorName;
|
|
|
|
LPWSTR pDefaultDataType;
|
|
|
|
} DRIVER_INFO_3W, *PDRIVER_INFO_3W, *LPDRIVER_INFO_3W;
|
|
|
|
|
|
|
|
DECL_WINELIB_TYPE_AW(DRIVER_INFO_3)
|
|
|
|
DECL_WINELIB_TYPE_AW(PDRIVER_INFO_3)
|
|
|
|
DECL_WINELIB_TYPE_AW(LPDRIVER_INFO_3)
|
|
|
|
|
1999-02-26 12:11:13 +01:00
|
|
|
typedef struct _PRINTER_INFO_1A {
|
1999-02-10 07:52:57 +01:00
|
|
|
DWORD Flags;
|
|
|
|
LPSTR pDescription;
|
|
|
|
LPSTR pName;
|
|
|
|
LPSTR pComment;
|
1999-02-26 12:11:13 +01:00
|
|
|
} PRINTER_INFO_1A, *PPRINTER_INFO_1A, *LPPRINTER_INFO_1A;
|
1999-02-10 07:52:57 +01:00
|
|
|
|
1999-02-26 12:11:13 +01:00
|
|
|
typedef struct _PRINTER_INFO_1W {
|
1999-02-10 07:52:57 +01:00
|
|
|
DWORD Flags;
|
|
|
|
LPWSTR pDescription;
|
|
|
|
LPWSTR pName;
|
|
|
|
LPWSTR pComment;
|
1999-02-26 12:11:13 +01:00
|
|
|
} PRINTER_INFO_1W, *PPRINTER_INFO_1W, *LPPRINTER_INFO_1W;
|
1999-02-10 07:52:57 +01:00
|
|
|
|
|
|
|
DECL_WINELIB_TYPE_AW(PRINTER_INFO_1)
|
|
|
|
DECL_WINELIB_TYPE_AW(PPRINTER_INFO_1)
|
|
|
|
DECL_WINELIB_TYPE_AW(LPPRINTER_INFO_1)
|
|
|
|
|
|
|
|
/* FIXME: winspool.h declares some structure members with the name Status.
|
|
|
|
* unfortunatly <X11/ICE/ICElib.h> #defines Status to the type 'int'
|
|
|
|
* therfore the following hack */
|
|
|
|
#ifndef Status
|
|
|
|
|
1999-02-26 12:11:13 +01:00
|
|
|
typedef struct _PRINTER_INFO_2A {
|
1999-02-10 07:52:57 +01:00
|
|
|
LPSTR pServerName;
|
|
|
|
LPSTR pPrinterName;
|
|
|
|
LPSTR pShareName;
|
|
|
|
LPSTR pPortName;
|
|
|
|
LPSTR pDriverName;
|
|
|
|
LPSTR pComment;
|
|
|
|
LPSTR pLocation;
|
1999-02-26 12:11:13 +01:00
|
|
|
LPDEVMODEA pDevMode;
|
1999-02-10 07:52:57 +01:00
|
|
|
LPSTR pSepFile;
|
|
|
|
LPSTR pPrintProcessor;
|
|
|
|
LPSTR pDatatype;
|
|
|
|
LPSTR pParameters;
|
|
|
|
PSECURITY_DESCRIPTOR pSecurityDescriptor;
|
|
|
|
DWORD Attributes;
|
|
|
|
DWORD Priority;
|
|
|
|
DWORD DefaultPriority;
|
|
|
|
DWORD StartTime;
|
|
|
|
DWORD UntilTime;
|
|
|
|
DWORD Status;
|
|
|
|
DWORD cJobs;
|
|
|
|
DWORD AveragePPM;
|
1999-02-26 12:11:13 +01:00
|
|
|
} PRINTER_INFO_2A, *PPRINTER_INFO_2A, *LPPRINTER_INFO_2A;
|
1999-02-10 07:52:57 +01:00
|
|
|
|
1999-02-26 12:11:13 +01:00
|
|
|
typedef struct _PRINTER_INFO_2W {
|
1999-02-10 07:52:57 +01:00
|
|
|
LPWSTR pServerName;
|
|
|
|
LPWSTR pPrinterName;
|
|
|
|
LPWSTR pShareName;
|
|
|
|
LPWSTR pPortName;
|
|
|
|
LPWSTR pDriverName;
|
|
|
|
LPWSTR pComment;
|
|
|
|
LPWSTR pLocation;
|
1999-02-26 12:11:13 +01:00
|
|
|
LPDEVMODEW pDevMode;
|
1999-02-10 07:52:57 +01:00
|
|
|
LPWSTR pSepFile;
|
|
|
|
LPWSTR pPrintProcessor;
|
|
|
|
LPWSTR pDatatype;
|
|
|
|
LPWSTR pParameters;
|
|
|
|
PSECURITY_DESCRIPTOR pSecurityDescriptor;
|
|
|
|
DWORD Attributes;
|
|
|
|
DWORD Priority;
|
|
|
|
DWORD DefaultPriority;
|
|
|
|
DWORD StartTime;
|
|
|
|
DWORD UntilTime;
|
|
|
|
DWORD Status;
|
|
|
|
DWORD cJobs;
|
|
|
|
DWORD AveragePPM;
|
1999-02-26 12:11:13 +01:00
|
|
|
} PRINTER_INFO_2W, *PPRINTER_INFO_2W, *LPPRINTER_INFO_2W;
|
1999-02-10 07:52:57 +01:00
|
|
|
|
|
|
|
DECL_WINELIB_TYPE_AW(PRINTER_INFO_2)
|
|
|
|
DECL_WINELIB_TYPE_AW(PPRINTER_INFO_2)
|
|
|
|
DECL_WINELIB_TYPE_AW(LPPRINTER_INFO_2)
|
|
|
|
|
1999-03-22 13:40:24 +01:00
|
|
|
typedef struct _PRINTER_INFO_4A {
|
|
|
|
LPSTR pPrinterName;
|
|
|
|
LPSTR pServerName;
|
|
|
|
DWORD Attributes;
|
|
|
|
} PRINTER_INFO_4A, *PPRINTER_INFO_4A, *LPPRINTER_INFO_4A;
|
|
|
|
|
|
|
|
typedef struct _PRINTER_INFO_4W {
|
|
|
|
LPWSTR pPrinterName;
|
|
|
|
LPWSTR pServerName;
|
|
|
|
DWORD Attributes;
|
|
|
|
} PRINTER_INFO_4W, *PPRINTER_INFO_4W, *LPPRINTER_INFO_4W;
|
|
|
|
|
|
|
|
DECL_WINELIB_TYPE_AW(PRINTER_INFO_4)
|
|
|
|
DECL_WINELIB_TYPE_AW(PPRINTER_INFO_4)
|
|
|
|
DECL_WINELIB_TYPE_AW(LPPRINTER_INFO_4)
|
|
|
|
|
|
|
|
typedef struct _PRINTER_INFO_5A {
|
|
|
|
LPSTR pPrinterName;
|
|
|
|
LPSTR pPortName;
|
|
|
|
DWORD Attributes;
|
|
|
|
DWORD DeviceNotSelectedTimeOut;
|
|
|
|
DWORD TransmissionRetryTimeout;
|
|
|
|
} PRINTER_INFO_5A, *PPRINTER_INFO_5A, *LPPRINTER_INFO_5A;
|
|
|
|
|
|
|
|
typedef struct _PRINTER_INFO_5W {
|
|
|
|
LPWSTR pPrinterName;
|
|
|
|
LPWSTR pPortName;
|
|
|
|
DWORD Attributes;
|
|
|
|
DWORD DeviceNotSelectedTimeOut;
|
|
|
|
DWORD TransmissionRetryTimeout;
|
|
|
|
} PRINTER_INFO_5W, *PPRINTER_INFO_5W, *LPPRINTER_INFO_5W;
|
|
|
|
|
|
|
|
DECL_WINELIB_TYPE_AW(PRINTER_INFO_5)
|
|
|
|
DECL_WINELIB_TYPE_AW(PPRINTER_INFO_5)
|
|
|
|
DECL_WINELIB_TYPE_AW(LPPRINTER_INFO_5)
|
|
|
|
|
1999-02-10 07:52:57 +01:00
|
|
|
#endif /* Status */
|
|
|
|
|
|
|
|
/* DECLARATIONS */
|
1999-05-17 18:20:51 +02:00
|
|
|
INT WINAPI DeviceCapabilitiesA(LPCSTR pDevice,LPCSTR pPort,WORD fwCapability,
|
|
|
|
LPSTR pOutput, LPDEVMODEA pDevMode);
|
1999-02-26 12:11:13 +01:00
|
|
|
INT WINAPI DeviceCapabilitiesW(LPCWSTR pDevice, LPCWSTR pPort,
|
1999-05-17 18:20:51 +02:00
|
|
|
WORD fwCapability, LPWSTR pOutput,
|
|
|
|
const DEVMODEW *pDevMode);
|
1999-02-10 07:52:57 +01:00
|
|
|
|
|
|
|
#define DeviceCapabilities WINELIB_NAME_AW(DeviceCapabilities)
|
|
|
|
|
1999-02-26 12:11:13 +01:00
|
|
|
LONG WINAPI DocumentPropertiesA(HWND hWnd,HANDLE hPrinter,
|
|
|
|
LPSTR pDeviceName, LPDEVMODEA pDevModeOutput,
|
|
|
|
LPDEVMODEA pDevModeInput,DWORD fMode );
|
|
|
|
LONG WINAPI DocumentPropertiesW(HWND hWnd, HANDLE hPrinter,
|
1999-02-10 07:52:57 +01:00
|
|
|
LPWSTR pDeviceName,
|
1999-02-26 12:11:13 +01:00
|
|
|
LPDEVMODEW pDevModeOutput,
|
|
|
|
LPDEVMODEW pDevModeInput, DWORD fMode);
|
1999-02-10 07:52:57 +01:00
|
|
|
|
|
|
|
#define DocumentProperties WINELIB_NAME_AW(DocumentProperties)
|
|
|
|
|
1999-02-26 12:11:13 +01:00
|
|
|
BOOL WINAPI OpenPrinterA(LPSTR lpPrinterName,HANDLE *phPrinter,
|
|
|
|
LPPRINTER_DEFAULTSA pDefault);
|
|
|
|
BOOL WINAPI OpenPrinterW(LPWSTR lpPrinterName,HANDLE *phPrinter,
|
|
|
|
LPPRINTER_DEFAULTSW pDefault);
|
1999-02-10 07:52:57 +01:00
|
|
|
|
|
|
|
#define OpenPrinter WINELIB_NAME_AW(OpenPrinter)
|
|
|
|
|
1999-02-26 12:11:13 +01:00
|
|
|
BOOL WINAPI ClosePrinter (HANDLE phPrinter);
|
1999-02-10 07:52:57 +01:00
|
|
|
|
1999-03-22 13:40:24 +01:00
|
|
|
BOOL WINAPI EnumPrintersA(DWORD dwType, LPSTR lpszName,
|
|
|
|
DWORD dwLevel, LPBYTE lpbPrinters,
|
|
|
|
DWORD cbBuf, LPDWORD lpdwNeeded,
|
|
|
|
LPDWORD lpdwReturned);
|
|
|
|
BOOL WINAPI EnumPrintersW(DWORD dwType, LPWSTR lpszName,
|
|
|
|
DWORD dwLevel, LPBYTE lpbPrinters,
|
|
|
|
DWORD cbBuf, LPDWORD lpdwNeeded,
|
|
|
|
LPDWORD lpdwReturned);
|
|
|
|
#define EnumPrinters WINELIB_NAME_AW(EnumPrinters)
|
|
|
|
|
1999-04-11 16:56:45 +02:00
|
|
|
BOOL WINAPI PrinterProperties(HWND hWnd, HANDLE hPrinter);
|
1999-02-10 07:52:57 +01:00
|
|
|
|
1999-05-22 20:53:56 +02:00
|
|
|
BOOL WINAPI GetPrinterDriverDirectoryA(LPSTR,LPSTR,DWORD,LPBYTE,DWORD,LPDWORD);
|
|
|
|
BOOL WINAPI GetPrinterDriverDirectoryW(LPWSTR,LPWSTR,DWORD,LPBYTE,DWORD,LPDWORD);
|
|
|
|
#define GetPrinterDriverDirectory WINELIB_NAME_AW(GetPrinterDriverDirectory)
|
|
|
|
|
1999-02-10 07:52:57 +01:00
|
|
|
#ifdef __cplusplus
|
1999-04-25 21:01:52 +02:00
|
|
|
} /* extern "C" */
|
1999-02-10 07:52:57 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* __WINE_WINSPOOL_H */
|
|
|
|
|