Message translation WM_CREATE fixed.
[wine/multimedia.git] / include / win16drv.h
blob8cf53d6b72c36b6d7d9294abf21c0c8e7b0a4941
1 /*
2 * Win16 printer driver definitions
3 */
5 #ifndef __WINE_WIN16DRV_H
6 #define __WINE_WIN16DRV_H
8 #include "wingdi.h"
9 #include "gdi.h"
11 #define SETHIGHBIT
12 #undef SETHIGHBIT
13 #ifdef SETHIGHBIT
14 #define GETGDIINFO 0x8001
15 #define INITPDEVICE 0x8000
16 #else
17 #define GETGDIINFO 0x0001
18 #define INITPDEVICE 0x0000
19 #endif
21 #define OS_ARC 3
22 #define OS_SCANLINES 4
23 #define OS_RECTANGLE 6
24 #define OS_ELLIPSE 7
25 #define OS_MARKER 8
26 #define OS_POLYLINE 18
27 #define OS_ALTPOLYGON 22
28 #define OS_WINDPOLYGON 20
29 #define OS_PIE 23
30 #define OS_POLYMARKER 24
31 #define OS_CHORD 39
32 #define OS_CIRCLE 55
33 #define OS_ROUNDRECT 72
35 /* Internal Data */
36 #define ORD_BITBLT 1
37 #define ORD_COLORINFO 2
38 #define ORD_CONTROL 3
39 #define ORD_DISABLE 4
40 #define ORD_ENABLE 5
41 #define ORD_ENUMDFONTS 6
42 #define ORD_ENUMOBJ 7
43 #define ORD_OUTPUT 8
44 #define ORD_PIXEL 9
45 #define ORD_REALIZEOBJECT 10
46 #define ORD_STRBLT 11
47 #define ORD_SCANLR 12
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
67 enum {
68 FUNC_BITBLT = 0,
69 FUNC_COLORINFO,
70 FUNC_CONTROL,
71 FUNC_DISABLE,
72 FUNC_ENABLE,
73 FUNC_ENUMDFONTS,
74 FUNC_ENUMOBJ,
75 FUNC_OUTPUT,
76 FUNC_PIXEL,
77 FUNC_REALIZEOBJECT,
78 FUNC_STRBLT,
79 FUNC_SCANLR,
80 FUNC_DEVICEMODE,
81 FUNC_EXTTEXTOUT,
82 FUNC_GETCHARWIDTH,
83 FUNC_DEVICEBITMAP,
84 FUNC_FASTBORDER,
85 FUNC_SETATTRIBUTE,
86 FUNC_STRETCHBLT,
87 FUNC_STRETCHDIBITS,
88 FUNC_SELECTBITMAP,
89 FUNC_BITMAPBITS,
90 FUNC_EXTDEVICEMODE,
91 FUNC_DEVICECAPABILITIES,
92 FUNC_ADVANCEDSETUPDIALOG,
93 FUNC_DIALOGFN,
94 FUNC_PSEUDOEDIT,
95 TOTAL_PRINTER_DRIVER_FUNCTIONS /* insert functions before here */
98 typedef struct
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 */
111 } PDEVICE_HEADER;
113 #include "pshpack1.h"
114 #define PCOLOR DWORD
115 typedef struct DRAWMODE
117 SHORT Rop2;
118 SHORT bkMode;
119 PCOLOR bkColor;
120 PCOLOR TextColor;
121 SHORT TBreakExtra;
122 SHORT BreakExtra;
123 SHORT BreakErr;
124 SHORT BreakRem;
125 SHORT BreakCount;
126 SHORT CharExtra;
127 COLORREF LbkColor;
128 COLORREF LTextColor;
129 DWORD ICMCXform;
130 SHORT StretchBltMode;
131 DWORD eMiterLimit;
132 } DRAWMODE, *LPDRAWMODE;
135 #include "poppack.h"
137 typedef struct WINE_ENUM_PRINTER_FONT_CALLBACK
139 int (*proc)(LPENUMLOGFONT16, LPNEWTEXTMETRIC16, UINT16, LPARAM);
140 LPARAM lp;
141 } WEPFC;
143 #define DRVOBJ_PEN 1
144 #define DRVOBJ_BRUSH 2
145 #define DRVOBJ_FONT 3
146 #define DRVOBJ_PBITMAP 5
148 /* Win16 printer driver physical DC */
149 typedef struct
151 SEGPTR segptrPDEVICE; /* PDEVICE used by 16 bit printer drivers */
152 LOGFONT16 lf; /* Current font details */
153 TEXTMETRIC16 tm; /* Current font metrics */
154 LPFONTINFO16 FontInfo; /* Current font realized by printer driver */
155 LPLOGBRUSH16 BrushInfo; /* Current brush realized by printer driver */
156 LPLOGPEN16 PenInfo; /* Current pen realized by printer driver */
157 } WIN16DRV_PDEVICE;
160 * Printer driver functions
162 typedef SEGPTR LPPDEVICE;
163 LOADED_PRINTER_DRIVER *LoadPrinterDriver(const char *pszDriver);
165 extern INT16 PRTDRV_Control(LPPDEVICE lpDestDev, WORD wfunction, SEGPTR lpInData, SEGPTR lpOutData);
166 extern WORD PRTDRV_Enable(LPVOID lpDevInfo, WORD wStyle, LPCSTR lpDestDevType,
167 LPCSTR lpDeviceName, LPCSTR lpOutputFile, LPVOID lpData);
168 extern WORD PRTDRV_EnumDFonts(LPPDEVICE lpDestDev, LPSTR lpFaceName,
169 FARPROC16 lpCallbackFunc, LPVOID lpClientData);
170 extern DWORD PRTDRV_RealizeObject(LPPDEVICE lpDestDev, WORD wStyle,
171 LPVOID lpInObj, LPVOID lpOutObj,
172 SEGPTR lpTextXForm);
174 extern BOOL16 PRTDRV_EnumObj(LPPDEVICE lpDestDev, WORD iStyle, FARPROC16 lpfn, LPVOID lpb);
175 extern DWORD PRTDRV_ExtTextOut(LPPDEVICE lpDestDev, WORD wDestXOrg, WORD wDestYOrg,
176 RECT16 *lpClipRect, LPCSTR lpString, WORD wCount,
177 LPFONTINFO16 lpFontInfo, SEGPTR lpDrawMode,
178 SEGPTR lpTextXForm, SHORT *lpCharWidths,
179 RECT16 * lpOpaqueRect, WORD wOptions);
181 extern WORD PRTDRV_Output(LPPDEVICE lpDestDev,
182 WORD wStyle,
183 WORD wCount,
184 POINT16 *points,
185 LPLOGPEN16 lpPen,
186 LPLOGBRUSH16 lpBrush,
187 SEGPTR lpDrawMode,
188 HRGN hClipRgn);
190 DWORD PRTDRV_StretchBlt(LPPDEVICE lpDestDev,
191 WORD wDestX, WORD wDestY,
192 WORD wDestXext, WORD wDestYext,
193 LPPDEVICE lpSrcDev,
194 WORD wSrcX, WORD wSrcY,
195 WORD wSrcXext, WORD wSrcYext,
196 DWORD Rop3,
197 LPLOGBRUSH16 lpBrush,
198 SEGPTR lpDrawMode,
199 RECT16 *lpClipRect);
201 extern WORD PRTDRV_GetCharWidth(LPPDEVICE lpDestDev, LPINT lpBuffer,
202 WORD wFirstChar, WORD wLastChar, LPFONTINFO16 lpFontInfo,
203 SEGPTR lpDrawMode, SEGPTR lpTextXForm );
205 /* Wine driver functions */
207 extern BOOL WIN16DRV_Init(void);
208 extern BOOL WIN16DRV_GetCharWidth( struct tagDC *dc, UINT firstChar, UINT lastChar,
209 LPINT buffer );
211 extern BOOL WIN16DRV_GetTextExtentPoint( DC *dc, LPCSTR str, INT count,
212 LPSIZE size );
213 extern BOOL WIN16DRV_GetTextMetrics( DC *dc, TEXTMETRICA *metrics );
215 extern BOOL WIN16DRV_ExtTextOut( DC *dc, INT x, INT y, UINT flags,
216 const RECT *lprect, LPCSTR str, UINT count,
217 const INT *lpDx );
218 extern BOOL WIN16DRV_LineTo( DC *dc, INT x, INT y );
219 extern BOOL WIN16DRV_MoveToEx(DC *dc,INT x,INT y,LPPOINT pt);
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( DC* dc, 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 */