2 * Copyright 2021 Jacek Caban for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
24 typedef struct _GDI_HANDLE_ENTRY
50 } GDI_HANDLE_ENTRY
, *PGDI_HANDLE_ENTRY
;
52 #define GDI_MAX_HANDLE_COUNT 0x10000
54 #define NTGDI_OBJ_DC 0x01
55 #define NTGDI_OBJ_ENHMETADC 0x21
56 #define NTGDI_OBJ_REGION 0x04
57 #define NTGDI_OBJ_METAFILE 0x26
58 #define NTGDI_OBJ_ENHMETAFILE 0x46
59 #define NTGDI_OBJ_METADC 0x66
60 #define NTGDI_OBJ_PAL 0x08
61 #define NTGDI_OBJ_BITMAP 0x09
62 #define NTGDI_OBJ_FONT 0x0a
63 #define NTGDI_OBJ_BRUSH 0x10
64 #define NTGDI_OBJ_PEN 0x30
65 #define NTGDI_OBJ_EXTPEN 0x50
67 /* Wine extension, native uses NTGDI_OBJ_DC */
68 #define NTGDI_OBJ_MEMDC 0x41
70 #define NTGDI_HANDLE_TYPE_SHIFT 16
71 #define NTGDI_HANDLE_TYPE_MASK 0x007f0000
73 typedef struct _GDI_SHARED_MEMORY
75 GDI_HANDLE_ENTRY Handles
[GDI_MAX_HANDLE_COUNT
];
76 } GDI_SHARED_MEMORY
, *PGDI_SHARED_MEMORY
;
96 /* structs not compatible with native Windows */
99 typedef struct DC_ATTR
101 LONG disabled
; /* disabled flag, controled by DCHF_(DISABLE|ENABLE)DC */
102 COLORREF background_color
;
103 COLORREF brush_color
;
111 WORD background_mode
;
115 WORD stretch_blt_mode
;
121 #endif /* __WINESRC__ */
123 INT WINAPI
NtGdiAbortDoc( HDC hdc
);
124 BOOL WINAPI
NtGdiAbortPath( HDC hdc
);
125 BOOL WINAPI
NtGdiAngleArc( HDC hdc
, INT x
, INT y
, DWORD radius
, FLOAT start_angle
,
127 BOOL WINAPI
NtGdiArcInternal( UINT type
, HDC hdc
, INT left
, INT top
, INT right
, INT bottom
,
128 INT xstart
, INT ystart
, INT xend
, INT yend
);
129 BOOL WINAPI
NtGdiBeginPath( HDC hdc
);
130 BOOL WINAPI
NtGdiCancelDC( HDC hdc
);
131 BOOL WINAPI
NtGdiCloseFigure( HDC hdc
);
132 INT WINAPI
NtGdiCombineRgn( HRGN dest
, HRGN src1
, HRGN src2
, INT mode
);
133 HBITMAP WINAPI
NtGdiCreateBitmap( INT width
, INT height
, UINT planes
,
134 UINT bpp
, const void *bits
);
135 HBRUSH WINAPI
NtGdiCreateHatchBrushInternal( INT style
, COLORREF color
, BOOL pen
);
136 BOOL WINAPI
NtGdiEllipse( HDC hdc
, INT left
, INT top
, INT right
, INT bottom
);
137 INT WINAPI
NtGdiEndDoc(HDC hdc
);
138 BOOL WINAPI
NtGdiEndPath( HDC hdc
);
139 HANDLE WINAPI
NtGdiCreateClientObj( ULONG type
);
140 HFONT WINAPI
NtGdiHfontCreate( const ENUMLOGFONTEXDVW
*enumex
, ULONG unk2
, ULONG unk3
,
141 ULONG unk4
, void *data
);
142 HDC WINAPI
NtGdiCreateCompatibleDC( HDC hdc
);
143 HBRUSH WINAPI
NtGdiCreateDIBBrush( const void* data
, UINT coloruse
);
144 HRGN WINAPI
NtGdiCreateEllipticRgn( INT left
, INT top
, INT right
, INT bottom
);
145 HBRUSH WINAPI
NtGdiCreatePatternBrushInternal( HBITMAP hbitmap
, BOOL pen
);
146 HPEN WINAPI
NtGdiCreatePen( INT style
, INT width
, COLORREF color
, HBRUSH brush
);
147 HRGN WINAPI
NtGdiCreateRectRgn( INT left
, INT top
, INT right
, INT bottom
);
148 HRGN WINAPI
NtGdiCreateRoundRectRgn( INT left
, INT top
, INT right
, INT bottom
,
149 INT ellipse_width
, INT ellipse_height
);
150 HBRUSH WINAPI
NtGdiCreateSolidBrush( COLORREF color
);
151 BOOL WINAPI
NtGdiDeleteClientObj( HGDIOBJ obj
);
152 BOOL WINAPI
NtGdiDeleteObjectApp( HGDIOBJ obj
);
153 LONG WINAPI
NtGdiDoPalette( HGDIOBJ handle
, WORD start
, WORD count
, void *entries
,
154 DWORD func
, BOOL inbound
);
155 INT WINAPI
NtGdiEndPage( HDC hdc
);
156 HPEN WINAPI
NtGdiExtCreatePen( DWORD style
, DWORD width
, const LOGBRUSH
*brush
,
157 DWORD style_count
, const DWORD
*style_bits
);
158 HRGN WINAPI
NtGdiExtCreateRegion( const XFORM
*xform
, DWORD count
, const RGNDATA
*data
);
159 INT WINAPI
NtGdiExtGetObjectW( HGDIOBJ handle
, INT count
, void *buffer
);
160 INT WINAPI
NtGdiExtSelectClipRgn( HDC hdc
, HRGN region
, INT mode
);
161 BOOL WINAPI
NtGdiFillRgn( HDC hdc
, HRGN hrgn
, HBRUSH hbrush
);
162 INT WINAPI
NtGdiExtEscape( HDC hdc
, INT escape
, INT input_size
, const char *input
,
163 INT output_size
, char *output
);
164 BOOL WINAPI
NtGdiExtFloodFill( HDC hdc
, INT x
, INT y
, COLORREF color
, UINT type
);
165 BOOL WINAPI
NtGdiFrameRgn( HDC hdc
, HRGN hrgn
, HBRUSH brush
,
166 INT width
, INT height
);
167 BOOL WINAPI
NtGdiFillPath( HDC hdc
);
168 BOOL WINAPI
NtGdiGetAndSetDCDword( HDC hdc
, UINT method
, DWORD value
, DWORD
*result
);
169 INT WINAPI
NtGdiGetAppClipBox( HDC hdc
, RECT
*rect
);
170 BOOL WINAPI
NtGdiGetBitmapDimension( HBITMAP bitmap
, SIZE
*size
);
171 UINT WINAPI
NtGdiGetBoundsRect( HDC hdc
, RECT
*rect
, UINT flags
);
172 BOOL WINAPI
NtGdiGetCharABCWidthsW( HDC hdc
, UINT first_char
, UINT last_char
, ABC
*abc
);
173 BOOL WINAPI
NtGdiGetCharWidthW( HDC hdc
, UINT first_char
, UINT last_char
, INT
*buffer
);
174 BOOL WINAPI
NtGdiGetDCDword( HDC hdc
, UINT method
, DWORD
*result
);
175 BOOL WINAPI
NtGdiGetDCPoint( HDC hdc
, UINT method
, POINT
*result
);
176 INT WINAPI
NtGdiGetDeviceCaps( HDC hdc
, INT cap
);
177 BOOL WINAPI
NtGdiGetDeviceGammaRamp( HDC hdc
, void *ptr
);
178 BOOL WINAPI
NtGdiExtTextOutW( HDC hdc
, INT x
, INT y
, UINT flags
, const RECT
*rect
,
179 const WCHAR
*str
, UINT count
, const INT
*dx
, DWORD cp
);
180 BOOL WINAPI
NtGdiGetMiterLimit( HDC hdc
, FLOAT
*limit
);
181 COLORREF WINAPI
NtGdiGetNearestColor( HDC hdc
, COLORREF color
);
182 UINT WINAPI
NtGdiGetNearestPaletteIndex( HPALETTE hpalette
, COLORREF color
);
183 UINT WINAPI
NtGdiGetOutlineTextMetricsInternalW( HDC hdc
, UINT cbData
,
184 OUTLINETEXTMETRICW
*otm
, ULONG opts
);
185 INT WINAPI
NtGdiGetPath( HDC hdc
, POINT
*points
, BYTE
*types
, INT size
);
186 COLORREF WINAPI
NtGdiGetPixel( HDC hdc
, INT x
, INT y
);
187 INT WINAPI
NtGdiGetRandomRgn( HDC hdc
, HRGN region
, INT code
);
188 DWORD WINAPI
NtGdiGetRegionData( HRGN hrgn
, DWORD count
, RGNDATA
*data
);
189 INT WINAPI
NtGdiGetRgnBox( HRGN hrgn
, RECT
*rect
);
190 UINT WINAPI
NtGdiGetTextCharsetInfo( HDC hdc
, FONTSIGNATURE
*fs
, DWORD flags
);
191 INT WINAPI
NtGdiGetTextFaceW( HDC hdc
, INT count
, WCHAR
*name
);
192 BOOL WINAPI
NtGdiGetTextMetricsW( HDC hdc
, TEXTMETRICW
*metrics
);
193 BOOL WINAPI
NtGdiGetTransform( HDC hdc
, DWORD which
, XFORM
*xform
);
194 BOOL WINAPI
NtGdiGradientFill( HDC hdc
, TRIVERTEX
*vert_array
, ULONG nvert
,
195 void *grad_array
, ULONG ngrad
, ULONG mode
);
196 BOOL WINAPI
NtGdiEqualRgn( HRGN hrgn1
, HRGN hrgn2
);
197 INT WINAPI
NtGdiExcludeClipRect( HDC hdc
, INT left
, INT top
, INT right
, INT bottom
);
198 BOOL WINAPI
NtGdiFlattenPath( HDC hdc
);
199 BOOL WINAPI
NtGdiFontIsLinked( HDC hdc
);
200 INT WINAPI
NtGdiIntersectClipRect( HDC hdc
, INT left
, INT top
, INT right
, INT bottom
);
201 BOOL WINAPI
NtGdiInvertRgn( HDC hdc
, HRGN hrgn
);
202 BOOL WINAPI
NtGdiLineTo( HDC hdc
, INT x
, INT y
);
203 BOOL WINAPI
NtGdiMoveTo( HDC hdc
, INT x
, INT y
, POINT
*pt
);
204 INT WINAPI
NtGdiOffsetClipRgn( HDC hdc
, INT x
, INT y
);
205 INT WINAPI
NtGdiOffsetRgn( HRGN hrgn
, INT x
, INT y
);
206 HRGN WINAPI
NtGdiPathToRegion( HDC hdc
);
207 BOOL WINAPI
NtGdiPolyDraw(HDC hdc
, const POINT
*points
, const BYTE
*types
, DWORD count
);
208 ULONG WINAPI
NtGdiPolyPolyDraw( HDC hdc
, const POINT
*points
, const UINT
*counts
,
209 DWORD count
, UINT function
);
210 BOOL WINAPI
NtGdiPtInRegion( HRGN hrgn
, INT x
, INT y
);
211 BOOL WINAPI
NtGdiPtVisible( HDC hdc
, INT x
, INT y
);
212 BOOL WINAPI
NtGdiRectInRegion( HRGN hrgn
, const RECT
*rect
);
213 BOOL WINAPI
NtGdiRectVisible( HDC hdc
, const RECT
*rect
);
214 BOOL WINAPI
NtGdiRectangle( HDC hdc
, INT left
, INT top
, INT right
, INT bottom
);
215 HDC WINAPI
NtGdiResetDC( HDC hdc
, const DEVMODEW
*devmode
);
216 BOOL WINAPI
NtGdiRestoreDC( HDC hdc
, INT level
);
217 BOOL WINAPI
NtGdiRoundRect( HDC hdc
, INT left
, INT top
, INT right
,
218 INT bottom
, INT ell_width
, INT ell_height
);
219 INT WINAPI
NtGdiSaveDC( HDC hdc
);
220 BOOL WINAPI
NtGdiScaleViewportExtEx( HDC hdc
, INT x_num
, INT x_denom
,
221 INT y_num
, INT y_denom
, SIZE
*size
);
222 BOOL WINAPI
NtGdiScaleWindowExtEx( HDC hdc
, INT x_num
, INT x_denom
,
223 INT y_num
, INT y_denom
, SIZE
*size
);
224 HGDIOBJ WINAPI
NtGdiSelectBitmap( HDC hdc
, HGDIOBJ handle
);
225 HGDIOBJ WINAPI
NtGdiSelectBrush( HDC hdc
, HGDIOBJ handle
);
226 BOOL WINAPI
NtGdiSelectClipPath( HDC hdc
, INT mode
);
227 HGDIOBJ WINAPI
NtGdiSelectFont( HDC hdc
, HGDIOBJ handle
);
228 HGDIOBJ WINAPI
NtGdiSelectPen( HDC hdc
, HGDIOBJ handle
);
229 LONG WINAPI
NtGdiSetBitmapBits( HBITMAP hbitmap
, LONG count
, const void *bits
);
230 BOOL WINAPI
NtGdiSetBitmapDimension( HBITMAP hbitmap
, INT x
, INT y
, SIZE
*prev_size
);
231 BOOL WINAPI
NtGdiSetBrushOrg( HDC hdc
, INT x
, INT y
, POINT
*prev_org
);
232 UINT WINAPI
NtGdiSetBoundsRect( HDC hdc
, const RECT
*rect
, UINT flags
);
233 BOOL WINAPI
NtGdiSetDeviceGammaRamp( HDC hdc
, void *ptr
);
234 DWORD WINAPI
NtGdiSetLayout( HDC hdc
, DWORD layout
);
235 INT WINAPI
NtGdiSetMetaRgn( HDC hdc
);
236 BOOL WINAPI
NtGdiSetMiterLimit( HDC hdc
, FLOAT limit
, FLOAT
*prev_limit
);
237 COLORREF WINAPI
NtGdiSetPixel( HDC hdc
, INT x
, INT y
, COLORREF color
);
238 BOOL WINAPI
NtGdiSetPixelFormat( HDC hdc
, INT format
);
239 BOOL WINAPI
NtGdiSetRectRgn( HRGN hrgn
, INT left
, INT top
, INT right
, INT bottom
);
240 BOOL WINAPI
NtGdiSetTextJustification( HDC hdc
, INT extra
, INT breaks
);
241 BOOL WINAPI
NtGdiSetVirtualResolution( HDC hdc
, DWORD horz_res
, DWORD vert_res
,
242 DWORD horz_size
, DWORD vert_size
);
243 INT WINAPI
NtGdiStartDoc( HDC hdc
, const DOCINFOW
*doc
);
244 INT WINAPI
NtGdiStartPage( HDC hdc
);
245 BOOL WINAPI
NtGdiStrokePath( HDC hdc
);
246 BOOL WINAPI
NtGdiStrokeAndFillPath( HDC hdc
);
247 BOOL WINAPI
NtGdiTransformPoints( HDC hdc
, POINT
*points
, INT count
, UINT mode
);
248 BOOL WINAPI
NtGdiUnrealizeObject( HGDIOBJ obj
);
249 BOOL WINAPI
NtGdiWidenPath( HDC hdc
);