gdi32: Use NtGdiPolyPolyDraw for PolyPolygon implementation.
[wine.git] / include / ntgdi.h
blobdce35a8b0b8ec4b80cdf7b5e67b9e83d4c4d8ad7
1 /*
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
19 #ifndef _NTGDI_
20 #define _NTGDI_
22 #include <wingdi.h>
24 typedef struct _GDI_HANDLE_ENTRY
26 UINT64 Object;
27 union
29 struct
31 USHORT ProcessId;
32 USHORT Lock : 1;
33 USHORT Count : 15;
35 ULONG Value;
36 } Owner;
37 union
39 struct
41 UCHAR ExtType : 7;
42 UCHAR StockFlag : 1;
43 UCHAR Generation;
45 USHORT Unique;
47 UCHAR Type;
48 UCHAR Flags;
49 UINT64 UserPointer;
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;
78 enum
80 NtGdiArc,
81 NtGdiArcTo,
82 NtGdiChord,
83 NtGdiPie,
86 enum
88 NtGdiPolyPolygon = 1,
89 NtGdiPolyPolyline,
90 NtGdiPolyBezier,
91 NtGdiPolyBezierTo,
92 NtGdiPolylineTo,
93 NtGdiPolyPolygonRgn,
96 /* structs not compatible with native Windows */
97 #ifdef __WINESRC__
99 typedef struct DC_ATTR
101 POINT cur_pos;
102 INT graphics_mode;
103 void *emf;
104 } DC_ATTR;
106 #endif /* __WINESRC__ */
108 INT WINAPI NtGdiAbortDoc( HDC hdc );
109 BOOL WINAPI NtGdiAbortPath( HDC hdc );
110 BOOL WINAPI NtGdiAngleArc( HDC hdc, INT x, INT y, DWORD radius, FLOAT start_angle,
111 FLOAT sweep_angle );
112 BOOL WINAPI NtGdiArcInternal( UINT type, HDC hdc, INT left, INT top, INT right, INT bottom,
113 INT xstart, INT ystart, INT xend, INT yend );
114 BOOL WINAPI NtGdiBeginPath( HDC hdc );
115 BOOL WINAPI NtGdiCancelDC( HDC hdc );
116 BOOL WINAPI NtGdiCloseFigure( HDC hdc );
117 INT WINAPI NtGdiCombineRgn( HRGN dest, HRGN src1, HRGN src2, INT mode );
118 HBITMAP WINAPI NtGdiCreateBitmap( INT width, INT height, UINT planes,
119 UINT bpp, const void *bits );
120 HBRUSH WINAPI NtGdiCreateHatchBrushInternal( INT style, COLORREF color, BOOL pen );
121 BOOL WINAPI NtGdiEllipse( HDC hdc, INT left, INT top, INT right, INT bottom );
122 INT WINAPI NtGdiEndDoc(HDC hdc);
123 BOOL WINAPI NtGdiEndPath( HDC hdc );
124 HANDLE WINAPI NtGdiCreateClientObj( ULONG type );
125 HFONT WINAPI NtGdiHfontCreate( const ENUMLOGFONTEXDVW *enumex, ULONG unk2, ULONG unk3,
126 ULONG unk4, void *data );
127 HBRUSH WINAPI NtGdiCreateDIBBrush( const void* data, UINT coloruse );
128 HRGN WINAPI NtGdiCreateEllipticRgn( INT left, INT top, INT right, INT bottom );
129 HBRUSH WINAPI NtGdiCreatePatternBrushInternal( HBITMAP hbitmap, BOOL pen );
130 HPEN WINAPI NtGdiCreatePen( INT style, INT width, COLORREF color, HBRUSH brush );
131 HRGN WINAPI NtGdiCreateRectRgn( INT left, INT top, INT right, INT bottom );
132 HRGN WINAPI NtGdiCreateRoundRectRgn( INT left, INT top, INT right, INT bottom,
133 INT ellipse_width, INT ellipse_height );
134 HBRUSH WINAPI NtGdiCreateSolidBrush( COLORREF color );
135 BOOL WINAPI NtGdiDeleteClientObj( HGDIOBJ obj );
136 BOOL WINAPI NtGdiDeleteObjectApp( HGDIOBJ obj );
137 LONG WINAPI NtGdiDoPalette( HGDIOBJ handle, WORD start, WORD count, void *entries,
138 DWORD func, BOOL inbound );
139 INT WINAPI NtGdiEndPage( HDC hdc );
140 HPEN WINAPI NtGdiExtCreatePen( DWORD style, DWORD width, const LOGBRUSH *brush,
141 DWORD style_count, const DWORD *style_bits );
142 HRGN WINAPI NtGdiExtCreateRegion( const XFORM *xform, DWORD count, const RGNDATA *data );
143 INT WINAPI NtGdiExtGetObjectW( HGDIOBJ handle, INT count, void *buffer );
144 INT WINAPI NtGdiExtSelectClipRgn( HDC hdc, HRGN region, INT mode );
145 BOOL WINAPI NtGdiFillRgn( HDC hdc, HRGN hrgn, HBRUSH hbrush );
146 INT WINAPI NtGdiExtEscape( HDC hdc, INT escape, INT input_size, const char *input,
147 INT output_size, char *output );
148 BOOL WINAPI NtGdiExtFloodFill( HDC hdc, INT x, INT y, COLORREF color, UINT type );
149 BOOL WINAPI NtGdiFrameRgn( HDC hdc, HRGN hrgn, HBRUSH brush,
150 INT width, INT height );
151 BOOL WINAPI NtGdiFillPath( HDC hdc );
152 BOOL WINAPI NtGdiGetAndSetDCDword( HDC hdc, UINT method, DWORD value, DWORD *result );
153 INT WINAPI NtGdiGetAppClipBox( HDC hdc, RECT *rect );
154 BOOL WINAPI NtGdiGetBitmapDimension( HBITMAP bitmap, SIZE *size );
155 UINT WINAPI NtGdiGetBoundsRect( HDC hdc, RECT *rect, UINT flags );
156 BOOL WINAPI NtGdiGetCharABCWidthsW( HDC hdc, UINT first_char, UINT last_char, ABC *abc );
157 BOOL WINAPI NtGdiGetCharWidthW( HDC hdc, UINT first_char, UINT last_char, INT *buffer );
158 BOOL WINAPI NtGdiGetDCDword( HDC hdc, UINT method, DWORD *result );
159 BOOL WINAPI NtGdiGetDCPoint( HDC hdc, UINT method, POINT *result );
160 INT WINAPI NtGdiGetDeviceCaps( HDC hdc, INT cap );
161 BOOL WINAPI NtGdiGetDeviceGammaRamp( HDC hdc, void *ptr );
162 BOOL WINAPI NtGdiGetMiterLimit( HDC hdc, FLOAT *limit );
163 COLORREF WINAPI NtGdiGetNearestColor( HDC hdc, COLORREF color );
164 UINT WINAPI NtGdiGetNearestPaletteIndex( HPALETTE hpalette, COLORREF color );
165 UINT WINAPI NtGdiGetOutlineTextMetricsInternalW( HDC hdc, UINT cbData,
166 OUTLINETEXTMETRICW *otm, ULONG opts);
167 INT WINAPI NtGdiGetPath( HDC hdc, POINT *points, BYTE *types, INT size );
168 INT WINAPI NtGdiGetRandomRgn( HDC hdc, HRGN region, INT code );
169 DWORD WINAPI NtGdiGetRegionData( HRGN hrgn, DWORD count, RGNDATA *data );
170 INT WINAPI NtGdiGetRgnBox( HRGN hrgn, RECT *rect );
171 UINT WINAPI NtGdiGetTextCharsetInfo( HDC hdc, FONTSIGNATURE *fs, DWORD flags );
172 INT WINAPI NtGdiGetTextFaceW( HDC hdc, INT count, WCHAR *name );
173 BOOL WINAPI NtGdiGetTextMetricsW( HDC hdc, TEXTMETRICW *metrics );
174 BOOL WINAPI NtGdiGetTransform( HDC hdc, DWORD which, XFORM *xform );
175 BOOL WINAPI NtGdiGradientFill( HDC hdc, TRIVERTEX *vert_array, ULONG nvert,
176 void *grad_array, ULONG ngrad, ULONG mode );
177 BOOL WINAPI NtGdiEqualRgn( HRGN hrgn1, HRGN hrgn2 );
178 INT WINAPI NtGdiExcludeClipRect( HDC hdc, INT left, INT top, INT right, INT bottom );
179 BOOL WINAPI NtGdiFlattenPath( HDC hdc );
180 BOOL WINAPI NtGdiFontIsLinked( HDC hdc );
181 INT WINAPI NtGdiIntersectClipRect( HDC hdc, INT left, INT top, INT right, INT bottom );
182 BOOL WINAPI NtGdiInvertRgn( HDC hdc, HRGN hrgn );
183 BOOL WINAPI NtGdiLineTo( HDC hdc, INT x, INT y );
184 BOOL WINAPI NtGdiMoveTo( HDC hdc, INT x, INT y, POINT *pt );
185 INT WINAPI NtGdiOffsetClipRgn( HDC hdc, INT x, INT y );
186 INT WINAPI NtGdiOffsetRgn( HRGN hrgn, INT x, INT y );
187 HRGN WINAPI NtGdiPathToRegion( HDC hdc );
188 BOOL WINAPI NtGdiPolyDraw(HDC hdc, const POINT *points, const BYTE *types, DWORD count );
189 ULONG WINAPI NtGdiPolyPolyDraw( HDC hdc, const POINT *points, const UINT *counts,
190 DWORD count, UINT function );
191 BOOL WINAPI NtGdiPtInRegion( HRGN hrgn, INT x, INT y );
192 BOOL WINAPI NtGdiPtVisible( HDC hdc, INT x, INT y );
193 BOOL WINAPI NtGdiRectInRegion( HRGN hrgn, const RECT *rect );
194 BOOL WINAPI NtGdiRectVisible( HDC hdc, const RECT *rect );
195 BOOL WINAPI NtGdiRectangle( HDC hdc, INT left, INT top, INT right, INT bottom );
196 HDC WINAPI NtGdiResetDC( HDC hdc, const DEVMODEW *devmode );
197 BOOL WINAPI NtGdiRestoreDC( HDC hdc, INT level );
198 BOOL WINAPI NtGdiRoundRect( HDC hdc, INT left, INT top, INT right,
199 INT bottom, INT ell_width, INT ell_height );
200 INT WINAPI NtGdiSaveDC( HDC hdc );
201 BOOL WINAPI NtGdiScaleViewportExtEx( HDC hdc, INT x_num, INT x_denom,
202 INT y_num, INT y_denom, SIZE *size );
203 BOOL WINAPI NtGdiScaleWindowExtEx( HDC hdc, INT x_num, INT x_denom,
204 INT y_num, INT y_denom, SIZE *size );
205 HGDIOBJ WINAPI NtGdiSelectBitmap( HDC hdc, HGDIOBJ handle );
206 HGDIOBJ WINAPI NtGdiSelectBrush( HDC hdc, HGDIOBJ handle );
207 BOOL WINAPI NtGdiSelectClipPath( HDC hdc, INT mode );
208 HGDIOBJ WINAPI NtGdiSelectFont( HDC hdc, HGDIOBJ handle );
209 HGDIOBJ WINAPI NtGdiSelectPen( HDC hdc, HGDIOBJ handle );
210 LONG WINAPI NtGdiSetBitmapBits( HBITMAP hbitmap, LONG count, const void *bits );
211 BOOL WINAPI NtGdiSetBitmapDimension( HBITMAP hbitmap, INT x, INT y, SIZE *prev_size );
212 BOOL WINAPI NtGdiSetBrushOrg( HDC hdc, INT x, INT y, POINT *prev_org );
213 UINT WINAPI NtGdiSetBoundsRect( HDC hdc, const RECT *rect, UINT flags );
214 BOOL WINAPI NtGdiSetDeviceGammaRamp( HDC hdc, void *ptr );
215 DWORD WINAPI NtGdiSetLayout( HDC hdc, DWORD layout );
216 INT WINAPI NtGdiSetMetaRgn( HDC hdc );
217 BOOL WINAPI NtGdiSetMiterLimit( HDC hdc, FLOAT limit, FLOAT *prev_limit );
218 COLORREF WINAPI NtGdiSetPixel( HDC hdc, INT x, INT y, COLORREF color );
219 BOOL WINAPI NtGdiSetPixelFormat( HDC hdc, INT format, const PIXELFORMATDESCRIPTOR *descr );
220 BOOL WINAPI NtGdiSetRectRgn( HRGN hrgn, INT left, INT top, INT right, INT bottom );
221 BOOL WINAPI NtGdiSetTextJustification( HDC hdc, INT extra, INT breaks );
222 BOOL WINAPI NtGdiSetVirtualResolution( HDC hdc, DWORD horz_res, DWORD vert_res,
223 DWORD horz_size, DWORD vert_size );
224 INT WINAPI NtGdiStartDoc( HDC hdc, const DOCINFOW *doc );
225 INT WINAPI NtGdiStartPage( HDC hdc );
226 BOOL WINAPI NtGdiStrokePath( HDC hdc );
227 BOOL WINAPI NtGdiStrokeAndFillPath( HDC hdc );
228 BOOL WINAPI NtGdiTransformPoints( HDC hdc, POINT *points, INT count, UINT mode );
229 BOOL WINAPI NtGdiUnrealizeObject( HGDIOBJ obj );
230 BOOL WINAPI NtGdiWidenPath( HDC hdc );
232 #endif /* _NTGDI_ */