2 * Win16 printer driver definitions
5 #ifndef __WINE_WIN16DRV_H
6 #define __WINE_WIN16DRV_H
14 #define GETGDIINFO 0x8001
15 #define INITPDEVICE 0x8000
17 #define GETGDIINFO 0x0001
18 #define INITPDEVICE 0x0000
22 #define OS_SCANLINES 4
23 #define OS_RECTANGLE 6
26 #define OS_POLYLINE 18
27 #define OS_ALTPOLYGON 22
28 #define OS_WINDPOLYGON 20
30 #define OS_POLYMARKER 24
33 #define OS_ROUNDRECT 72
37 #define ORD_COLORINFO 2
41 #define ORD_ENUMDFONTS 6
45 #define ORD_REALIZEOBJECT 10
48 #define ORD_DEVICEMODE 13
49 #define ORD_EXTTEXTOUT 14
50 #define ORD_GETCHARWIDTH 15
51 #define ORD_DEVICEBITMAP 16
52 #define ORD_FASTBORDER 17
53 #define ORD_SETATTRIBUTE 18
55 #define ORD_STRETCHBLT 27
56 #define ORD_STRETCHDIBITS 28
57 #define ORD_SELECTBITMAP 29
58 #define ORD_BITMAPBITS 30
60 #define ORD_EXTDEVICEMODE 90
61 #define ORD_DEVICECAPABILITIES 91
62 #define ORD_ADVANCEDSETUPDIALOG 93
64 #define ORD_DIALOGFN 100
65 #define ORD_PSEUDOEDIT 101
91 FUNC_DEVICECAPABILITIES,
92 FUNC_ADVANCEDSETUPDIALOG,
95 TOTAL_PRINTER_DRIVER_FUNCTIONS /* insert functions before here */
100 LPSTR szDriver; /* Driver name eg EPSON */
101 HINSTANCE16 hInst; /* Handle for driver */
102 WORD ds_reg; /* DS of driver */
103 FARPROC16 fn[TOTAL_PRINTER_DRIVER_FUNCTIONS]; /* Printer functions */
104 int nUsageCount; /* Usage count, unload == 0 */
105 int nIndex; /* Index in global driver array */
106 } LOADED_PRINTER_DRIVER;
108 typedef struct PDEVICE_HEADER
110 LOADED_PRINTER_DRIVER *pLPD; /* Associated printer driver */
117 typedef struct DRAWMODE
131 } DRAWMODE, *LPDRAWMODE;
136 typedef struct WINE_ENUM_PRINTER_FONT_CALLBACK
138 int (*proc)(LPENUMLOGFONT16, LPNEWTEXTMETRIC16, UINT16, LPARAM);
143 #define DRVOBJ_BRUSH 2
144 #define DRVOBJ_FONT 3
145 #define DRVOBJ_PBITMAP 5
147 /* Win16 printer driver physical DC */
150 SEGPTR segptrPDEVICE; /* PDEVICE used by 16 bit printer drivers */
151 LOGFONT16 lf; /* Current font details */
152 TEXTMETRIC16 tm; /* Current font metrics */
153 LPFONTINFO16 FontInfo; /* Current font realized by printer driver */
154 LPLOGBRUSH16 BrushInfo; /* Current brush realized by printer driver */
155 LPLOGPEN16 PenInfo; /* Current pen realized by printer driver */
159 * Printer driver functions
161 typedef SEGPTR LPPDEVICE;
162 LOADED_PRINTER_DRIVER *LoadPrinterDriver(const char *pszDriver);
164 extern INT16 PRTDRV_Control(LPPDEVICE lpDestDev, WORD wfunction, SEGPTR lpInData, SEGPTR lpOutData);
165 extern WORD PRTDRV_Enable(LPVOID lpDevInfo, WORD wStyle, LPCSTR lpDestDevType,
166 LPCSTR lpDeviceName, LPCSTR lpOutputFile, LPVOID lpData);
167 extern WORD PRTDRV_EnumDFonts(LPPDEVICE lpDestDev, LPSTR lpFaceName,
168 FARPROC16 lpCallbackFunc, LPVOID lpClientData);
169 extern DWORD PRTDRV_RealizeObject(LPPDEVICE lpDestDev, WORD wStyle,
170 LPVOID lpInObj, LPVOID lpOutObj,
173 extern BOOL16 PRTDRV_EnumObj(LPPDEVICE lpDestDev, WORD iStyle, FARPROC16 lpfn, LPVOID lpb);
174 extern DWORD PRTDRV_ExtTextOut(LPPDEVICE lpDestDev, WORD wDestXOrg, WORD wDestYOrg,
175 RECT16 *lpClipRect, LPCSTR lpString, WORD wCount,
176 LPFONTINFO16 lpFontInfo, SEGPTR lpDrawMode,
177 SEGPTR lpTextXForm, SHORT *lpCharWidths,
178 RECT16 * lpOpaqueRect, WORD wOptions);
180 extern WORD PRTDRV_Output(LPPDEVICE lpDestDev,
185 LPLOGBRUSH16 lpBrush,
189 DWORD PRTDRV_StretchBlt(LPPDEVICE lpDestDev,
190 WORD wDestX, WORD wDestY,
191 WORD wDestXext, WORD wDestYext,
193 WORD wSrcX, WORD wSrcY,
194 WORD wSrcXext, WORD wSrcYext,
196 LPLOGBRUSH16 lpBrush,
200 extern WORD PRTDRV_GetCharWidth(LPPDEVICE lpDestDev, LPINT32 lpBuffer,
201 WORD wFirstChar, WORD wLastChar, LPFONTINFO16 lpFontInfo,
202 SEGPTR lpDrawMode, SEGPTR lpTextXForm );
204 /* Wine driver functions */
206 extern BOOL32 WIN16DRV_Init(void);
207 extern BOOL32 WIN16DRV_GetCharWidth( struct tagDC *dc, UINT32 firstChar, UINT32 lastChar,
210 extern BOOL32 WIN16DRV_GetTextExtentPoint( DC *dc, LPCSTR str, INT32 count,
212 extern BOOL32 WIN16DRV_GetTextMetrics( DC *dc, TEXTMETRIC32A *metrics );
214 extern BOOL32 WIN16DRV_ExtTextOut( DC *dc, INT32 x, INT32 y, UINT32 flags,
215 const RECT32 *lprect, LPCSTR str, UINT32 count,
217 extern BOOL32 WIN16DRV_LineTo( DC *dc, INT32 x, INT32 y );
218 extern BOOL32 WIN16DRV_MoveToEx(DC *dc,INT32 x,INT32 y,LPPOINT32 pt);
219 extern BOOL32 WIN16DRV_Polygon(DC *dc, LPPOINT32 pt, INT32 count );
220 extern BOOL32 WIN16DRV_Polyline(DC *dc, LPPOINT32 pt, INT32 count );
221 extern BOOL32 WIN16DRV_Rectangle(DC *dc, INT32 left, INT32 top, INT32 right, INT32 bottom);
222 extern HGDIOBJ32 WIN16DRV_SelectObject( DC *dc, HGDIOBJ32 handle );
223 extern BOOL32 WIN16DRV_PatBlt( struct tagDC *dc, INT32 left, INT32 top,
224 INT32 width, INT32 height, DWORD rop );
225 extern BOOL32 WIN16DRV_Ellipse(DC *dc, INT32 left, INT32 top, INT32 right, INT32 bottom);
226 extern BOOL32 WIN16DRV_EnumDeviceFonts( DC* dc, LPLOGFONT16 plf,
227 DEVICEFONTENUMPROC proc, LPARAM lp );
231 * Wine 16bit driver global variables
233 extern SEGPTR win16drv_SegPtr_TextXForm;
234 extern LPTEXTXFORM16 win16drv_TextXFormP;
235 extern SEGPTR win16drv_SegPtr_DrawMode;
236 extern LPDRAWMODE win16drv_DrawModeP;
238 #endif /* __WINE_WIN16DRV_H */