Removed "elfdll" load order option and updated documentation.
[wine/multimedia.git] / include / win16drv.h
blob231c1aae68a106dd5e6cab45d2f72eba6cbe437d
1 /*
2 * Win16 printer driver definitions
3 */
5 #ifndef __WINE_WIN16DRV_H
6 #define __WINE_WIN16DRV_H
8 #include "windef.h"
9 #include "wingdi.h"
10 #include "gdi.h"
12 #define SETHIGHBIT
13 #undef SETHIGHBIT
14 #ifdef SETHIGHBIT
15 #define GETGDIINFO 0x8001
16 #define INITPDEVICE 0x8000
17 #else
18 #define GETGDIINFO 0x0001
19 #define INITPDEVICE 0x0000
20 #endif
22 #define OS_ARC 3
23 #define OS_SCANLINES 4
24 #define OS_RECTANGLE 6
25 #define OS_ELLIPSE 7
26 #define OS_MARKER 8
27 #define OS_POLYLINE 18
28 #define OS_ALTPOLYGON 22
29 #define OS_WINDPOLYGON 20
30 #define OS_PIE 23
31 #define OS_POLYMARKER 24
32 #define OS_CHORD 39
33 #define OS_CIRCLE 55
34 #define OS_ROUNDRECT 72
36 /* Internal Data */
37 #define ORD_BITBLT 1
38 #define ORD_COLORINFO 2
39 #define ORD_CONTROL 3
40 #define ORD_DISABLE 4
41 #define ORD_ENABLE 5
42 #define ORD_ENUMDFONTS 6
43 #define ORD_ENUMOBJ 7
44 #define ORD_OUTPUT 8
45 #define ORD_PIXEL 9
46 #define ORD_REALIZEOBJECT 10
47 #define ORD_STRBLT 11
48 #define ORD_SCANLR 12
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
68 enum {
69 FUNC_BITBLT = 0,
70 FUNC_COLORINFO,
71 FUNC_CONTROL,
72 FUNC_DISABLE,
73 FUNC_ENABLE,
74 FUNC_ENUMDFONTS,
75 FUNC_ENUMOBJ,
76 FUNC_OUTPUT,
77 FUNC_PIXEL,
78 FUNC_REALIZEOBJECT,
79 FUNC_STRBLT,
80 FUNC_SCANLR,
81 FUNC_DEVICEMODE,
82 FUNC_EXTTEXTOUT,
83 FUNC_GETCHARWIDTH,
84 FUNC_DEVICEBITMAP,
85 FUNC_FASTBORDER,
86 FUNC_SETATTRIBUTE,
87 FUNC_STRETCHBLT,
88 FUNC_STRETCHDIBITS,
89 FUNC_SELECTBITMAP,
90 FUNC_BITMAPBITS,
91 FUNC_EXTDEVICEMODE,
92 FUNC_DEVICECAPABILITIES,
93 FUNC_ADVANCEDSETUPDIALOG,
94 FUNC_DIALOGFN,
95 FUNC_PSEUDOEDIT,
96 TOTAL_PRINTER_DRIVER_FUNCTIONS /* insert functions before here */
99 typedef struct
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 */
112 } PDEVICE_HEADER;
114 #include "pshpack1.h"
115 #define PCOLOR DWORD
116 typedef struct DRAWMODE
118 SHORT Rop2;
119 SHORT bkMode;
120 PCOLOR bkColor;
121 PCOLOR TextColor;
122 SHORT TBreakExtra;
123 SHORT BreakExtra;
124 SHORT BreakErr;
125 SHORT BreakRem;
126 SHORT BreakCount;
127 SHORT CharExtra;
128 COLORREF LbkColor;
129 COLORREF LTextColor;
130 DWORD ICMCXform;
131 SHORT StretchBltMode;
132 DWORD eMiterLimit;
133 } DRAWMODE, *LPDRAWMODE;
136 #include "poppack.h"
138 typedef struct WINE_ENUM_PRINTER_FONT_CALLBACK
140 int (*proc)(LPENUMLOGFONT16, LPNEWTEXTMETRIC16, UINT16, LPARAM);
141 LPARAM lp;
142 } WEPFC;
144 #define DRVOBJ_PEN 1
145 #define DRVOBJ_BRUSH 2
146 #define DRVOBJ_FONT 3
147 #define DRVOBJ_PBITMAP 5
149 /* Win16 printer driver physical DC */
150 typedef struct
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 */
158 } WIN16DRV_PDEVICE;
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,
173 SEGPTR lpTextXForm);
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,
183 WORD wStyle,
184 WORD wCount,
185 POINT16 *points,
186 LPLOGPEN16 lpPen,
187 LPLOGBRUSH16 lpBrush,
188 SEGPTR lpDrawMode,
189 HRGN hClipRgn);
191 DWORD PRTDRV_StretchBlt(LPPDEVICE lpDestDev,
192 WORD wDestX, WORD wDestY,
193 WORD wDestXext, WORD wDestYext,
194 LPPDEVICE lpSrcDev,
195 WORD wSrcX, WORD wSrcY,
196 WORD wSrcXext, WORD wSrcYext,
197 DWORD Rop3,
198 LPLOGBRUSH16 lpBrush,
199 SEGPTR lpDrawMode,
200 RECT16 *lpClipRect);
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,
210 LPINT buffer );
212 extern BOOL WIN16DRV_GetTextExtentPoint( DC *dc, LPCWSTR str, INT count,
213 LPSIZE size );
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,
218 const INT *lpDx );
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,
232 LPSTR lpszDevice,
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 */