2 * Win16 printer driver definitions
5 #ifndef __WINE_WIN16DRV_H
6 #define __WINE_WIN16DRV_H
15 #define GETGDIINFO 0x8001
16 #define INITPDEVICE 0x8000
18 #define GETGDIINFO 0x0001
19 #define INITPDEVICE 0x0000
23 #define OS_SCANLINES 4
24 #define OS_RECTANGLE 6
27 #define OS_POLYLINE 18
28 #define OS_ALTPOLYGON 22
29 #define OS_WINDPOLYGON 20
31 #define OS_POLYMARKER 24
34 #define OS_ROUNDRECT 72
38 #define ORD_COLORINFO 2
42 #define ORD_ENUMDFONTS 6
46 #define ORD_REALIZEOBJECT 10
49 #define ORD_DEVICEMODE 13
50 #define ORD_EXTTEXTOUT 14
51 #define ORD_GETCHARWIDTH 15
52 #define ORD_DEVICEBITMAP 16
53 #define ORD_FASTBORDER 17
54 #define ORD_SETATTRIBUTE 18
56 #define ORD_STRETCHBLT 27
57 #define ORD_STRETCHDIBITS 28
58 #define ORD_SELECTBITMAP 29
59 #define ORD_BITMAPBITS 30
61 #define ORD_EXTDEVICEMODE 90
62 #define ORD_DEVICECAPABILITIES 91
63 #define ORD_ADVANCEDSETUPDIALOG 93
65 #define ORD_DIALOGFN 100
66 #define ORD_PSEUDOEDIT 101
92 FUNC_DEVICECAPABILITIES
,
93 FUNC_ADVANCEDSETUPDIALOG
,
96 TOTAL_PRINTER_DRIVER_FUNCTIONS
/* insert functions before here */
101 LPSTR szDriver
; /* Driver name eg EPSON */
102 HINSTANCE16 hInst
; /* Handle for driver */
103 WORD ds_reg
; /* DS of driver */
104 FARPROC16 fn
[TOTAL_PRINTER_DRIVER_FUNCTIONS
]; /* Printer functions */
105 int nUsageCount
; /* Usage count, unload == 0 */
106 int nIndex
; /* Index in global driver array */
107 } LOADED_PRINTER_DRIVER
;
109 typedef struct PDEVICE_HEADER
111 LOADED_PRINTER_DRIVER
*pLPD
; /* Associated printer driver */
114 #include "pshpack1.h"
116 typedef struct DRAWMODE
131 SHORT StretchBltMode
;
133 } DRAWMODE
, *LPDRAWMODE
;
138 typedef struct WINE_ENUM_PRINTER_FONT_CALLBACK
140 int (*proc
)(LPENUMLOGFONT16
, LPNEWTEXTMETRIC16
, UINT16
, LPARAM
);
145 #define DRVOBJ_BRUSH 2
146 #define DRVOBJ_FONT 3
147 #define DRVOBJ_PBITMAP 5
149 /* Win16 printer driver physical DC */
152 SEGPTR segptrPDEVICE
; /* PDEVICE used by 16 bit printer drivers */
153 LOGFONT16 lf
; /* Current font details */
154 TEXTMETRIC16 tm
; /* Current font metrics */
155 LPFONTINFO16 FontInfo
; /* Current font realized by printer driver */
156 LPLOGBRUSH16 BrushInfo
; /* Current brush realized by printer driver */
157 LPLOGPEN16 PenInfo
; /* Current pen realized by printer driver */
161 * Printer driver functions
163 typedef SEGPTR LPPDEVICE
;
164 LOADED_PRINTER_DRIVER
*LoadPrinterDriver(const char *pszDriver
);
166 extern INT16
PRTDRV_Control(LPPDEVICE lpDestDev
, WORD wfunction
, SEGPTR lpInData
, SEGPTR lpOutData
);
167 extern WORD
PRTDRV_Enable(LPVOID lpDevInfo
, WORD wStyle
, LPCSTR lpDestDevType
,
168 LPCSTR lpDeviceName
, LPCSTR lpOutputFile
, LPVOID lpData
);
169 extern WORD
PRTDRV_EnumDFonts(LPPDEVICE lpDestDev
, LPSTR lpFaceName
,
170 FARPROC16 lpCallbackFunc
, LPVOID lpClientData
);
171 extern DWORD
PRTDRV_RealizeObject(LPPDEVICE lpDestDev
, WORD wStyle
,
172 LPVOID lpInObj
, LPVOID lpOutObj
,
175 extern BOOL16
PRTDRV_EnumObj(LPPDEVICE lpDestDev
, WORD iStyle
, FARPROC16 lpfn
, LPVOID lpb
);
176 extern DWORD
PRTDRV_ExtTextOut(LPPDEVICE lpDestDev
, WORD wDestXOrg
, WORD wDestYOrg
,
177 RECT16
*lpClipRect
, LPCSTR lpString
, WORD wCount
,
178 LPFONTINFO16 lpFontInfo
, SEGPTR lpDrawMode
,
179 SEGPTR lpTextXForm
, SHORT
*lpCharWidths
,
180 RECT16
* lpOpaqueRect
, WORD wOptions
);
182 extern WORD
PRTDRV_Output(LPPDEVICE lpDestDev
,
187 LPLOGBRUSH16 lpBrush
,
191 DWORD
PRTDRV_StretchBlt(LPPDEVICE lpDestDev
,
192 WORD wDestX
, WORD wDestY
,
193 WORD wDestXext
, WORD wDestYext
,
195 WORD wSrcX
, WORD wSrcY
,
196 WORD wSrcXext
, WORD wSrcYext
,
198 LPLOGBRUSH16 lpBrush
,
202 extern WORD
PRTDRV_GetCharWidth(LPPDEVICE lpDestDev
, LPINT lpBuffer
,
203 WORD wFirstChar
, WORD wLastChar
, LPFONTINFO16 lpFontInfo
,
204 SEGPTR lpDrawMode
, SEGPTR lpTextXForm
);
206 /* Wine driver functions */
208 extern BOOL
WIN16DRV_Init(void);
209 extern BOOL
WIN16DRV_GetCharWidth( struct tagDC
*dc
, UINT firstChar
, UINT lastChar
,
212 extern BOOL
WIN16DRV_GetTextExtentPoint( DC
*dc
, LPCWSTR str
, INT count
,
214 extern BOOL
WIN16DRV_GetTextMetrics( DC
*dc
, TEXTMETRICA
*metrics
);
216 extern BOOL
WIN16DRV_ExtTextOut( DC
*dc
, INT x
, INT y
, UINT flags
,
217 const RECT
*lprect
, LPCWSTR str
, UINT count
,
219 extern BOOL
WIN16DRV_LineTo( DC
*dc
, INT x
, INT y
);
220 extern BOOL
WIN16DRV_Polygon(DC
*dc
, const POINT
* pt
, INT count
);
221 extern BOOL
WIN16DRV_Polyline(DC
*dc
, const POINT
* pt
, INT count
);
222 extern BOOL
WIN16DRV_Rectangle(DC
*dc
, INT left
, INT top
, INT right
, INT bottom
);
223 extern HGDIOBJ
WIN16DRV_SelectObject( DC
*dc
, HGDIOBJ handle
);
224 extern BOOL
WIN16DRV_PatBlt( struct tagDC
*dc
, INT left
, INT top
,
225 INT width
, INT height
, DWORD rop
);
226 extern BOOL
WIN16DRV_Ellipse(DC
*dc
, INT left
, INT top
, INT right
, INT bottom
);
227 extern BOOL
WIN16DRV_EnumDeviceFonts( HDC hdc
, LPLOGFONT16 plf
,
228 DEVICEFONTENUMPROC proc
, LPARAM lp
);
230 extern INT
WIN16DRV_ExtDeviceMode(LPSTR lpszDriver
, HWND hwnd
,
231 LPDEVMODEA lpdmOutput
,
233 LPSTR lpszPort
, LPDEVMODEA lpdmInput
,
234 LPSTR lpszProfile
, DWORD dwMode
);
235 extern DWORD
WIN16DRV_DeviceCapabilities(LPSTR lpszDriver
, LPCSTR lpszDevice
,
236 LPCSTR lpszPort
, WORD fwCapability
,
237 LPSTR lpszOutput
, LPDEVMODEA lpdm
);
240 * Wine 16bit driver global variables
242 extern SEGPTR win16drv_SegPtr_TextXForm
;
243 extern LPTEXTXFORM16 win16drv_TextXFormP
;
244 extern SEGPTR win16drv_SegPtr_DrawMode
;
245 extern LPDRAWMODE win16drv_DrawModeP
;
247 #endif /* __WINE_WIN16DRV_H */