gdi32: Support MWT_SET in NtGdiModifyWorldTransform.
[wine.git] / include / ntgdi.h
blob9132d606c43b1cb38ca0c11a7b1933192590a3b4
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
72 #define NTGDI_HANDLE_STOCK_OBJECT 0x00800000
74 typedef struct _GDI_SHARED_MEMORY
76 GDI_HANDLE_ENTRY Handles[GDI_MAX_HANDLE_COUNT];
77 } GDI_SHARED_MEMORY, *PGDI_SHARED_MEMORY;
79 enum
81 NtGdiArc,
82 NtGdiArcTo,
83 NtGdiChord,
84 NtGdiPie,
87 enum
89 NtGdiPolyPolygon = 1,
90 NtGdiPolyPolyline,
91 NtGdiPolyBezier,
92 NtGdiPolyBezierTo,
93 NtGdiPolylineTo,
94 NtGdiPolyPolygonRgn,
97 enum
99 NtGdiLPtoDP,
100 NtGdiDPtoLP,
103 enum
105 NtGdiSetMapMode = 8,
108 #define MWT_SET 4
110 /* structs not compatible with native Windows */
111 #ifdef __WINESRC__
113 typedef struct DC_ATTR
115 HDC hdc; /* handle to self */
116 LONG disabled; /* disabled flag, controled by DCHF_(DISABLE|ENABLE)DC */
117 COLORREF background_color;
118 COLORREF brush_color;
119 COLORREF pen_color;
120 COLORREF text_color;
121 POINT cur_pos;
122 INT graphics_mode;
123 INT arc_direction;
124 DWORD layout;
125 WORD text_align;
126 WORD background_mode;
127 WORD poly_fill_mode;
128 WORD rop_mode;
129 WORD rel_abs_mode;
130 WORD stretch_blt_mode;
131 INT map_mode;
132 INT char_extra;
133 DWORD mapper_flags; /* font mapper flags */
134 RECT vis_rect; /* visible rectangle in screen coords */
135 FLOAT miter_limit;
136 POINT brush_org; /* brush origin */
137 POINT wnd_org; /* window origin */
138 SIZE wnd_ext; /* window extent */
139 POINT vport_org; /* viewport origin */
140 SIZE vport_ext; /* viewport extent */
141 SIZE virtual_res;
142 SIZE virtual_size;
143 void *emf;
144 } DC_ATTR;
146 #endif /* __WINESRC__ */
148 INT WINAPI NtGdiAbortDoc( HDC hdc );
149 BOOL WINAPI NtGdiAbortPath( HDC hdc );
150 BOOL WINAPI NtGdiAlphaBlend( HDC hdc_dst, int x_dst, int y_dst, int width_dst, int height_dst,
151 HDC hdc_src, int x_src, int y_src, int width_src, int height_src,
152 BLENDFUNCTION blend_function, HANDLE xform );
153 BOOL WINAPI NtGdiAngleArc( HDC hdc, INT x, INT y, DWORD radius, FLOAT start_angle,
154 FLOAT sweep_angle );
155 BOOL WINAPI NtGdiArcInternal( UINT type, HDC hdc, INT left, INT top, INT right, INT bottom,
156 INT xstart, INT ystart, INT xend, INT yend );
157 BOOL WINAPI NtGdiBeginPath( HDC hdc );
158 BOOL WINAPI NtGdiBitBlt( HDC hdc_dst, INT x_dst, INT y_dst, INT width, INT height, HDC hdc_src,
159 INT x_src, INT y_src, DWORD rop, DWORD bk_color, FLONG fl );
160 BOOL WINAPI NtGdiCancelDC( HDC hdc );
161 BOOL WINAPI NtGdiCloseFigure( HDC hdc );
162 INT WINAPI NtGdiCombineRgn( HRGN dest, HRGN src1, HRGN src2, INT mode );
163 BOOL WINAPI NtGdiComputeXformCoefficients( HDC hdc );
164 HBITMAP WINAPI NtGdiCreateBitmap( INT width, INT height, UINT planes,
165 UINT bpp, const void *bits );
166 HBRUSH WINAPI NtGdiCreateHatchBrushInternal( INT style, COLORREF color, BOOL pen );
167 BOOL WINAPI NtGdiEllipse( HDC hdc, INT left, INT top, INT right, INT bottom );
168 INT WINAPI NtGdiEndDoc(HDC hdc);
169 BOOL WINAPI NtGdiEndPath( HDC hdc );
170 HANDLE WINAPI NtGdiCreateClientObj( ULONG type );
171 HFONT WINAPI NtGdiHfontCreate( const ENUMLOGFONTEXDVW *enumex, ULONG unk2, ULONG unk3,
172 ULONG unk4, void *data );
173 HDC WINAPI NtGdiCreateCompatibleDC( HDC hdc );
174 HBRUSH WINAPI NtGdiCreateDIBBrush( const void* data, UINT coloruse );
175 HRGN WINAPI NtGdiCreateEllipticRgn( INT left, INT top, INT right, INT bottom );
176 HBRUSH WINAPI NtGdiCreatePatternBrushInternal( HBITMAP hbitmap, BOOL pen );
177 HPEN WINAPI NtGdiCreatePen( INT style, INT width, COLORREF color, HBRUSH brush );
178 HRGN WINAPI NtGdiCreateRectRgn( INT left, INT top, INT right, INT bottom );
179 HRGN WINAPI NtGdiCreateRoundRectRgn( INT left, INT top, INT right, INT bottom,
180 INT ellipse_width, INT ellipse_height );
181 HBRUSH WINAPI NtGdiCreateSolidBrush( COLORREF color );
182 BOOL WINAPI NtGdiDeleteClientObj( HGDIOBJ obj );
183 BOOL WINAPI NtGdiDeleteObjectApp( HGDIOBJ obj );
184 LONG WINAPI NtGdiDoPalette( HGDIOBJ handle, WORD start, WORD count, void *entries,
185 DWORD func, BOOL inbound );
186 INT WINAPI NtGdiEndPage( HDC hdc );
187 HPEN WINAPI NtGdiExtCreatePen( DWORD style, DWORD width, const LOGBRUSH *brush,
188 DWORD style_count, const DWORD *style_bits );
189 HRGN WINAPI NtGdiExtCreateRegion( const XFORM *xform, DWORD count, const RGNDATA *data );
190 INT WINAPI NtGdiExtGetObjectW( HGDIOBJ handle, INT count, void *buffer );
191 INT WINAPI NtGdiExtSelectClipRgn( HDC hdc, HRGN region, INT mode );
192 BOOL WINAPI NtGdiFillRgn( HDC hdc, HRGN hrgn, HBRUSH hbrush );
193 INT WINAPI NtGdiExtEscape( HDC hdc, INT escape, INT input_size, const char *input,
194 INT output_size, char *output );
195 BOOL WINAPI NtGdiExtFloodFill( HDC hdc, INT x, INT y, COLORREF color, UINT type );
196 BOOL WINAPI NtGdiFrameRgn( HDC hdc, HRGN hrgn, HBRUSH brush,
197 INT width, INT height );
198 BOOL WINAPI NtGdiFillPath( HDC hdc );
199 BOOL WINAPI NtGdiGetAndSetDCDword( HDC hdc, UINT method, DWORD value, DWORD *result );
200 INT WINAPI NtGdiGetAppClipBox( HDC hdc, RECT *rect );
201 BOOL WINAPI NtGdiGetBitmapDimension( HBITMAP bitmap, SIZE *size );
202 UINT WINAPI NtGdiGetBoundsRect( HDC hdc, RECT *rect, UINT flags );
203 BOOL WINAPI NtGdiGetCharABCWidthsW( HDC hdc, UINT first_char, UINT last_char, ABC *abc );
204 BOOL WINAPI NtGdiGetCharWidthW( HDC hdc, UINT first_char, UINT last_char, INT *buffer );
205 BOOL WINAPI NtGdiGetDCDword( HDC hdc, UINT method, DWORD *result );
206 BOOL WINAPI NtGdiGetDCPoint( HDC hdc, UINT method, POINT *result );
207 INT WINAPI NtGdiGetDeviceCaps( HDC hdc, INT cap );
208 BOOL WINAPI NtGdiGetDeviceGammaRamp( HDC hdc, void *ptr );
209 BOOL WINAPI NtGdiExtTextOutW( HDC hdc, INT x, INT y, UINT flags, const RECT *rect,
210 const WCHAR *str, UINT count, const INT *dx, DWORD cp );
211 BOOL WINAPI NtGdiGetMiterLimit( HDC hdc, FLOAT *limit );
212 COLORREF WINAPI NtGdiGetNearestColor( HDC hdc, COLORREF color );
213 UINT WINAPI NtGdiGetNearestPaletteIndex( HPALETTE hpalette, COLORREF color );
214 UINT WINAPI NtGdiGetOutlineTextMetricsInternalW( HDC hdc, UINT cbData,
215 OUTLINETEXTMETRICW *otm, ULONG opts );
216 INT WINAPI NtGdiGetPath( HDC hdc, POINT *points, BYTE *types, INT size );
217 COLORREF WINAPI NtGdiGetPixel( HDC hdc, INT x, INT y );
218 INT WINAPI NtGdiGetRandomRgn( HDC hdc, HRGN region, INT code );
219 DWORD WINAPI NtGdiGetRegionData( HRGN hrgn, DWORD count, RGNDATA *data );
220 INT WINAPI NtGdiGetRgnBox( HRGN hrgn, RECT *rect );
221 UINT WINAPI NtGdiGetTextCharsetInfo( HDC hdc, FONTSIGNATURE *fs, DWORD flags );
222 INT WINAPI NtGdiGetTextFaceW( HDC hdc, INT count, WCHAR *name );
223 BOOL WINAPI NtGdiGetTextMetricsW( HDC hdc, TEXTMETRICW *metrics );
224 BOOL WINAPI NtGdiGetTransform( HDC hdc, DWORD which, XFORM *xform );
225 BOOL WINAPI NtGdiGradientFill( HDC hdc, TRIVERTEX *vert_array, ULONG nvert,
226 void *grad_array, ULONG ngrad, ULONG mode );
227 BOOL WINAPI NtGdiEqualRgn( HRGN hrgn1, HRGN hrgn2 );
228 INT WINAPI NtGdiExcludeClipRect( HDC hdc, INT left, INT top, INT right, INT bottom );
229 BOOL WINAPI NtGdiFlattenPath( HDC hdc );
230 BOOL WINAPI NtGdiFontIsLinked( HDC hdc );
231 INT WINAPI NtGdiIntersectClipRect( HDC hdc, INT left, INT top, INT right, INT bottom );
232 BOOL WINAPI NtGdiInvertRgn( HDC hdc, HRGN hrgn );
233 BOOL WINAPI NtGdiLineTo( HDC hdc, INT x, INT y );
234 BOOL WINAPI NtGdiModifyWorldTransform( HDC hdc, const XFORM *xform, DWORD mode );
235 BOOL WINAPI NtGdiMoveTo( HDC hdc, INT x, INT y, POINT *pt );
236 INT WINAPI NtGdiOffsetClipRgn( HDC hdc, INT x, INT y );
237 INT WINAPI NtGdiOffsetRgn( HRGN hrgn, INT x, INT y );
238 BOOL WINAPI NtGdiPatBlt( HDC hdc, INT left, INT top, INT width, INT height, DWORD rop );
239 HRGN WINAPI NtGdiPathToRegion( HDC hdc );
240 BOOL WINAPI NtGdiPolyDraw(HDC hdc, const POINT *points, const BYTE *types, DWORD count );
241 ULONG WINAPI NtGdiPolyPolyDraw( HDC hdc, const POINT *points, const UINT *counts,
242 DWORD count, UINT function );
243 BOOL WINAPI NtGdiPtInRegion( HRGN hrgn, INT x, INT y );
244 BOOL WINAPI NtGdiPtVisible( HDC hdc, INT x, INT y );
245 BOOL WINAPI NtGdiRectInRegion( HRGN hrgn, const RECT *rect );
246 BOOL WINAPI NtGdiRectVisible( HDC hdc, const RECT *rect );
247 BOOL WINAPI NtGdiRectangle( HDC hdc, INT left, INT top, INT right, INT bottom );
248 HDC WINAPI NtGdiResetDC( HDC hdc, const DEVMODEW *devmode );
249 BOOL WINAPI NtGdiRestoreDC( HDC hdc, INT level );
250 BOOL WINAPI NtGdiRoundRect( HDC hdc, INT left, INT top, INT right,
251 INT bottom, INT ell_width, INT ell_height );
252 INT WINAPI NtGdiSaveDC( HDC hdc );
253 BOOL WINAPI NtGdiScaleViewportExtEx( HDC hdc, INT x_num, INT x_denom,
254 INT y_num, INT y_denom, SIZE *size );
255 BOOL WINAPI NtGdiScaleWindowExtEx( HDC hdc, INT x_num, INT x_denom,
256 INT y_num, INT y_denom, SIZE *size );
257 HGDIOBJ WINAPI NtGdiSelectBitmap( HDC hdc, HGDIOBJ handle );
258 HGDIOBJ WINAPI NtGdiSelectBrush( HDC hdc, HGDIOBJ handle );
259 BOOL WINAPI NtGdiSelectClipPath( HDC hdc, INT mode );
260 HGDIOBJ WINAPI NtGdiSelectFont( HDC hdc, HGDIOBJ handle );
261 HGDIOBJ WINAPI NtGdiSelectPen( HDC hdc, HGDIOBJ handle );
262 LONG WINAPI NtGdiSetBitmapBits( HBITMAP hbitmap, LONG count, const void *bits );
263 BOOL WINAPI NtGdiSetBitmapDimension( HBITMAP hbitmap, INT x, INT y, SIZE *prev_size );
264 BOOL WINAPI NtGdiSetBrushOrg( HDC hdc, INT x, INT y, POINT *prev_org );
265 UINT WINAPI NtGdiSetBoundsRect( HDC hdc, const RECT *rect, UINT flags );
266 BOOL WINAPI NtGdiSetDeviceGammaRamp( HDC hdc, void *ptr );
267 DWORD WINAPI NtGdiSetLayout( HDC hdc, LONG wox, DWORD layout );
268 INT WINAPI NtGdiSetMetaRgn( HDC hdc );
269 BOOL WINAPI NtGdiSetMiterLimit( HDC hdc, FLOAT limit, FLOAT *prev_limit );
270 COLORREF WINAPI NtGdiSetPixel( HDC hdc, INT x, INT y, COLORREF color );
271 BOOL WINAPI NtGdiSetPixelFormat( HDC hdc, INT format );
272 BOOL WINAPI NtGdiSetRectRgn( HRGN hrgn, INT left, INT top, INT right, INT bottom );
273 BOOL WINAPI NtGdiSetTextJustification( HDC hdc, INT extra, INT breaks );
274 BOOL WINAPI NtGdiSetVirtualResolution( HDC hdc, DWORD horz_res, DWORD vert_res,
275 DWORD horz_size, DWORD vert_size );
276 INT WINAPI NtGdiStartDoc( HDC hdc, const DOCINFOW *doc );
277 INT WINAPI NtGdiStartPage( HDC hdc );
278 BOOL WINAPI NtGdiStretchBlt( HDC hdc, INT x_dst, INT y_dst, INT width_dst, INT height_dst,
279 HDC hdc_src, INT x_src, INT y_src, INT width_src, INT height_src,
280 DWORD rop, COLORREF bk_color );
281 BOOL WINAPI NtGdiStrokePath( HDC hdc );
282 BOOL WINAPI NtGdiStrokeAndFillPath( HDC hdc );
283 BOOL WINAPI NtGdiTransformPoints( HDC hdc, const POINT *points_in, POINT *points_out,
284 INT count, UINT mode );
285 BOOL WINAPI NtGdiUnrealizeObject( HGDIOBJ obj );
286 BOOL WINAPI NtGdiWidenPath( HDC hdc );
288 #endif /* _NTGDI_ */