2 * Definitions for Wine GDI drivers
4 * Copyright 2011 Alexandre Julliard
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #ifndef __WINE_WINE_GDI_DRIVER_H
22 #define __WINE_WINE_GDI_DRIVER_H
26 typedef struct gdi_physdev
28 const struct gdi_dc_funcs
*funcs
;
29 struct gdi_physdev
*next
;
35 int log_x
; /* original position and size, in logical coords */
39 int x
; /* mapped position and size, in device coords */
43 RECT visrect
; /* rectangle clipped to the visible part, in device coords */
44 DWORD layout
; /* DC layout */
49 INT (CDECL
*pAbortDoc
)(PHYSDEV
);
50 BOOL (CDECL
*pAbortPath
)(PHYSDEV
);
51 BOOL (CDECL
*pAlphaBlend
)(PHYSDEV
,struct bitblt_coords
*,PHYSDEV
,struct bitblt_coords
*,BLENDFUNCTION
);
52 BOOL (CDECL
*pAngleArc
)(PHYSDEV
,INT
,INT
,DWORD
,FLOAT
,FLOAT
);
53 BOOL (CDECL
*pArc
)(PHYSDEV
,INT
,INT
,INT
,INT
,INT
,INT
,INT
,INT
);
54 BOOL (CDECL
*pArcTo
)(PHYSDEV
,INT
,INT
,INT
,INT
,INT
,INT
,INT
,INT
);
55 BOOL (CDECL
*pBeginPath
)(PHYSDEV
);
56 INT (CDECL
*pChoosePixelFormat
)(PHYSDEV
,const PIXELFORMATDESCRIPTOR
*);
57 BOOL (CDECL
*pChord
)(PHYSDEV
,INT
,INT
,INT
,INT
,INT
,INT
,INT
,INT
);
58 BOOL (CDECL
*pCloseFigure
)(PHYSDEV
);
59 BOOL (CDECL
*pCreateBitmap
)(PHYSDEV
,HBITMAP
,LPVOID
);
60 BOOL (CDECL
*pCreateDC
)(HDC
,PHYSDEV
*,LPCWSTR
,LPCWSTR
,LPCWSTR
,const DEVMODEW
*);
61 HBITMAP (CDECL
*pCreateDIBSection
)(PHYSDEV
,HBITMAP
,const BITMAPINFO
*,UINT
);
62 BOOL (CDECL
*pDeleteBitmap
)(HBITMAP
);
63 BOOL (CDECL
*pDeleteDC
)(PHYSDEV
);
64 BOOL (CDECL
*pDeleteObject
)(PHYSDEV
,HGDIOBJ
);
65 INT (CDECL
*pDescribePixelFormat
)(PHYSDEV
,INT
,UINT
,PIXELFORMATDESCRIPTOR
*);
66 DWORD (CDECL
*pDeviceCapabilities
)(LPSTR
,LPCSTR
,LPCSTR
,WORD
,LPSTR
,LPDEVMODEA
);
67 BOOL (CDECL
*pEllipse
)(PHYSDEV
,INT
,INT
,INT
,INT
);
68 INT (CDECL
*pEndDoc
)(PHYSDEV
);
69 INT (CDECL
*pEndPage
)(PHYSDEV
);
70 BOOL (CDECL
*pEndPath
)(PHYSDEV
);
71 BOOL (CDECL
*pEnumDeviceFonts
)(PHYSDEV
,LPLOGFONTW
,FONTENUMPROCW
,LPARAM
);
72 INT (CDECL
*pEnumICMProfiles
)(PHYSDEV
,ICMENUMPROCW
,LPARAM
);
73 INT (CDECL
*pExcludeClipRect
)(PHYSDEV
,INT
,INT
,INT
,INT
);
74 INT (CDECL
*pExtDeviceMode
)(LPSTR
,HWND
,LPDEVMODEA
,LPSTR
,LPSTR
,LPDEVMODEA
,LPSTR
,DWORD
);
75 INT (CDECL
*pExtEscape
)(PHYSDEV
,INT
,INT
,LPCVOID
,INT
,LPVOID
);
76 BOOL (CDECL
*pExtFloodFill
)(PHYSDEV
,INT
,INT
,COLORREF
,UINT
);
77 INT (CDECL
*pExtSelectClipRgn
)(PHYSDEV
,HRGN
,INT
);
78 BOOL (CDECL
*pExtTextOut
)(PHYSDEV
,INT
,INT
,UINT
,const RECT
*,LPCWSTR
,UINT
,const INT
*);
79 BOOL (CDECL
*pFillPath
)(PHYSDEV
);
80 BOOL (CDECL
*pFillRgn
)(PHYSDEV
,HRGN
,HBRUSH
);
81 BOOL (CDECL
*pFlattenPath
)(PHYSDEV
);
82 BOOL (CDECL
*pFrameRgn
)(PHYSDEV
,HRGN
,HBRUSH
,INT
,INT
);
83 BOOL (CDECL
*pGdiComment
)(PHYSDEV
,UINT
,CONST BYTE
*);
84 LONG (CDECL
*pGetBitmapBits
)(HBITMAP
,void*,LONG
);
85 BOOL (CDECL
*pGetCharWidth
)(PHYSDEV
,UINT
,UINT
,LPINT
);
86 INT (CDECL
*pGetDIBits
)(PHYSDEV
,HBITMAP
,UINT
,UINT
,LPVOID
,BITMAPINFO
*,UINT
);
87 INT (CDECL
*pGetDeviceCaps
)(PHYSDEV
,INT
);
88 BOOL (CDECL
*pGetDeviceGammaRamp
)(PHYSDEV
,LPVOID
);
89 BOOL (CDECL
*pGetICMProfile
)(PHYSDEV
,LPDWORD
,LPWSTR
);
90 COLORREF (CDECL
*pGetNearestColor
)(PHYSDEV
,COLORREF
);
91 COLORREF (CDECL
*pGetPixel
)(PHYSDEV
,INT
,INT
);
92 INT (CDECL
*pGetPixelFormat
)(PHYSDEV
);
93 UINT (CDECL
*pGetSystemPaletteEntries
)(PHYSDEV
,UINT
,UINT
,LPPALETTEENTRY
);
94 BOOL (CDECL
*pGetTextExtentExPoint
)(PHYSDEV
,LPCWSTR
,INT
,INT
,LPINT
,LPINT
,LPSIZE
);
95 BOOL (CDECL
*pGetTextMetrics
)(PHYSDEV
,TEXTMETRICW
*);
96 INT (CDECL
*pIntersectClipRect
)(PHYSDEV
,INT
,INT
,INT
,INT
);
97 BOOL (CDECL
*pInvertRgn
)(PHYSDEV
,HRGN
);
98 BOOL (CDECL
*pLineTo
)(PHYSDEV
,INT
,INT
);
99 BOOL (CDECL
*pModifyWorldTransform
)(PHYSDEV
,const XFORM
*,DWORD
);
100 BOOL (CDECL
*pMoveTo
)(PHYSDEV
,INT
,INT
);
101 INT (CDECL
*pOffsetClipRgn
)(PHYSDEV
,INT
,INT
);
102 BOOL (CDECL
*pOffsetViewportOrgEx
)(PHYSDEV
,INT
,INT
,POINT
*);
103 BOOL (CDECL
*pOffsetWindowOrgEx
)(PHYSDEV
,INT
,INT
,POINT
*);
104 BOOL (CDECL
*pPaintRgn
)(PHYSDEV
,HRGN
);
105 BOOL (CDECL
*pPatBlt
)(PHYSDEV
,struct bitblt_coords
*,DWORD
);
106 BOOL (CDECL
*pPie
)(PHYSDEV
,INT
,INT
,INT
,INT
,INT
,INT
,INT
,INT
);
107 BOOL (CDECL
*pPolyBezier
)(PHYSDEV
,const POINT
*,DWORD
);
108 BOOL (CDECL
*pPolyBezierTo
)(PHYSDEV
,const POINT
*,DWORD
);
109 BOOL (CDECL
*pPolyDraw
)(PHYSDEV
,const POINT
*,const BYTE
*,DWORD
);
110 BOOL (CDECL
*pPolyPolygon
)(PHYSDEV
,const POINT
*,const INT
*,UINT
);
111 BOOL (CDECL
*pPolyPolyline
)(PHYSDEV
,const POINT
*,const DWORD
*,DWORD
);
112 BOOL (CDECL
*pPolygon
)(PHYSDEV
,const POINT
*,INT
);
113 BOOL (CDECL
*pPolyline
)(PHYSDEV
,const POINT
*,INT
);
114 BOOL (CDECL
*pPolylineTo
)(PHYSDEV
,const POINT
*,INT
);
115 UINT (CDECL
*pRealizeDefaultPalette
)(PHYSDEV
);
116 UINT (CDECL
*pRealizePalette
)(PHYSDEV
,HPALETTE
,BOOL
);
117 BOOL (CDECL
*pRectangle
)(PHYSDEV
,INT
,INT
,INT
,INT
);
118 HDC (CDECL
*pResetDC
)(PHYSDEV
,const DEVMODEW
*);
119 BOOL (CDECL
*pRestoreDC
)(PHYSDEV
,INT
);
120 BOOL (CDECL
*pRoundRect
)(PHYSDEV
,INT
,INT
,INT
,INT
,INT
,INT
);
121 INT (CDECL
*pSaveDC
)(PHYSDEV
);
122 BOOL (CDECL
*pScaleViewportExtEx
)(PHYSDEV
,INT
,INT
,INT
,INT
,SIZE
*);
123 BOOL (CDECL
*pScaleWindowExtEx
)(PHYSDEV
,INT
,INT
,INT
,INT
,SIZE
*);
124 HBITMAP (CDECL
*pSelectBitmap
)(PHYSDEV
,HBITMAP
);
125 HBRUSH (CDECL
*pSelectBrush
)(PHYSDEV
,HBRUSH
);
126 BOOL (CDECL
*pSelectClipPath
)(PHYSDEV
,INT
);
127 HFONT (CDECL
*pSelectFont
)(PHYSDEV
,HFONT
,HANDLE
);
128 HPALETTE (CDECL
*pSelectPalette
)(PHYSDEV
,HPALETTE
,BOOL
);
129 HPEN (CDECL
*pSelectPen
)(PHYSDEV
,HPEN
);
130 INT (CDECL
*pSetArcDirection
)(PHYSDEV
,INT
);
131 LONG (CDECL
*pSetBitmapBits
)(HBITMAP
,const void*,LONG
);
132 COLORREF (CDECL
*pSetBkColor
)(PHYSDEV
,COLORREF
);
133 INT (CDECL
*pSetBkMode
)(PHYSDEV
,INT
);
134 COLORREF (CDECL
*pSetDCBrushColor
)(PHYSDEV
, COLORREF
);
135 COLORREF (CDECL
*pSetDCPenColor
)(PHYSDEV
, COLORREF
);
136 UINT (CDECL
*pSetDIBColorTable
)(PHYSDEV
,UINT
,UINT
,const RGBQUAD
*);
137 INT (CDECL
*pSetDIBits
)(PHYSDEV
,HBITMAP
,UINT
,UINT
,LPCVOID
,const BITMAPINFO
*,UINT
);
138 INT (CDECL
*pSetDIBitsToDevice
)(PHYSDEV
,INT
,INT
,DWORD
,DWORD
,INT
,INT
,UINT
,UINT
,LPCVOID
,const BITMAPINFO
*,UINT
);
139 VOID (CDECL
*pSetDeviceClipping
)(PHYSDEV
,HRGN
,HRGN
);
140 BOOL (CDECL
*pSetDeviceGammaRamp
)(PHYSDEV
,LPVOID
);
141 DWORD (CDECL
*pSetLayout
)(PHYSDEV
,DWORD
);
142 INT (CDECL
*pSetMapMode
)(PHYSDEV
,INT
);
143 DWORD (CDECL
*pSetMapperFlags
)(PHYSDEV
,DWORD
);
144 COLORREF (CDECL
*pSetPixel
)(PHYSDEV
,INT
,INT
,COLORREF
);
145 BOOL (CDECL
*pSetPixelFormat
)(PHYSDEV
,INT
,const PIXELFORMATDESCRIPTOR
*);
146 INT (CDECL
*pSetPolyFillMode
)(PHYSDEV
,INT
);
147 INT (CDECL
*pSetROP2
)(PHYSDEV
,INT
);
148 INT (CDECL
*pSetRelAbs
)(PHYSDEV
,INT
);
149 INT (CDECL
*pSetStretchBltMode
)(PHYSDEV
,INT
);
150 UINT (CDECL
*pSetTextAlign
)(PHYSDEV
,UINT
);
151 INT (CDECL
*pSetTextCharacterExtra
)(PHYSDEV
,INT
);
152 COLORREF (CDECL
*pSetTextColor
)(PHYSDEV
,COLORREF
);
153 BOOL (CDECL
*pSetTextJustification
)(PHYSDEV
,INT
,INT
);
154 BOOL (CDECL
*pSetViewportExtEx
)(PHYSDEV
,INT
,INT
,SIZE
*);
155 BOOL (CDECL
*pSetViewportOrgEx
)(PHYSDEV
,INT
,INT
,POINT
*);
156 BOOL (CDECL
*pSetWindowExtEx
)(PHYSDEV
,INT
,INT
,SIZE
*);
157 BOOL (CDECL
*pSetWindowOrgEx
)(PHYSDEV
,INT
,INT
,POINT
*);
158 BOOL (CDECL
*pSetWorldTransform
)(PHYSDEV
,const XFORM
*);
159 INT (CDECL
*pStartDoc
)(PHYSDEV
,const DOCINFOW
*);
160 INT (CDECL
*pStartPage
)(PHYSDEV
);
161 BOOL (CDECL
*pStretchBlt
)(PHYSDEV
,struct bitblt_coords
*,PHYSDEV
,struct bitblt_coords
*,DWORD
);
162 INT (CDECL
*pStretchDIBits
)(PHYSDEV
,INT
,INT
,INT
,INT
,INT
,INT
,INT
,INT
,const void*,const BITMAPINFO
*,UINT
,DWORD
);
163 BOOL (CDECL
*pStrokeAndFillPath
)(PHYSDEV
);
164 BOOL (CDECL
*pStrokePath
)(PHYSDEV
);
165 BOOL (CDECL
*pSwapBuffers
)(PHYSDEV
);
166 BOOL (CDECL
*pUnrealizePalette
)(HPALETTE
);
167 BOOL (CDECL
*pWidenPath
)(PHYSDEV
);
170 BOOL (CDECL
*pwglCopyContext
)(HGLRC
,HGLRC
,UINT
);
171 HGLRC (CDECL
*pwglCreateContext
)(PHYSDEV
);
172 HGLRC (CDECL
*pwglCreateContextAttribsARB
)(PHYSDEV
,HGLRC
,const int*);
173 BOOL (CDECL
*pwglDeleteContext
)(HGLRC
);
174 PROC (CDECL
*pwglGetProcAddress
)(LPCSTR
);
175 HDC (CDECL
*pwglGetPbufferDCARB
)(PHYSDEV
,void*);
176 BOOL (CDECL
*pwglMakeCurrent
)(PHYSDEV
,HGLRC
);
177 BOOL (CDECL
*pwglMakeContextCurrentARB
)(PHYSDEV
,PHYSDEV
,HGLRC
);
178 BOOL (CDECL
*pwglSetPixelFormatWINE
)(PHYSDEV
,INT
,const PIXELFORMATDESCRIPTOR
*);
179 BOOL (CDECL
*pwglShareLists
)(HGLRC
,HGLRC
);
180 BOOL (CDECL
*pwglUseFontBitmapsA
)(PHYSDEV
,DWORD
,DWORD
,DWORD
);
181 BOOL (CDECL
*pwglUseFontBitmapsW
)(PHYSDEV
,DWORD
,DWORD
,DWORD
);
184 /* increment this when you change the DC function table */
185 #define WINE_GDI_DRIVER_VERSION 1
187 static inline PHYSDEV
get_physdev_entry_point( PHYSDEV dev
, size_t offset
)
189 while (!((void **)dev
->funcs
)[offset
/ sizeof(void *)]) dev
= dev
->next
;
193 #define GET_DC_PHYSDEV(dc,func) get_physdev_entry_point( (dc)->physDev, FIELD_OFFSET(DC_FUNCTIONS,func))
194 #define GET_NEXT_PHYSDEV(dev,func) get_physdev_entry_point( (dev)->next, FIELD_OFFSET(DC_FUNCTIONS,func))
196 #endif /* __WINE_WINE_GDI_DRIVER_H */