win32u: Move menu tracking implementation from user32.
[wine.git] / dlls / win32u / wrappers.c
blobed4337eae84be1ba090a1695ce22f617ee82bf27
1 /*
2 * Unix call wrappers
4 * Copyright 2021 Jacek Caban for CodeWeavers
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 #include "ntstatus.h"
22 #define WIN32_NO_STATUS
23 #include "win32u_private.h"
25 static const struct unix_funcs *unix_funcs;
27 INT WINAPI NtGdiAbortDoc( HDC hdc )
29 if (!unix_funcs) return 0;
30 return unix_funcs->pNtGdiAbortDoc( hdc );
33 BOOL WINAPI NtGdiAbortPath( HDC hdc )
35 if (!unix_funcs) return FALSE;
36 return unix_funcs->pNtGdiAbortPath( hdc );
39 BOOL WINAPI NtGdiAlphaBlend( HDC hdc_dst, int x_dst, int y_dst, int width_dst, int height_dst,
40 HDC hdc_src, int x_src, int y_src, int width_src, int height_src,
41 BLENDFUNCTION blend_function, HANDLE xform )
43 if (!unix_funcs) return FALSE;
44 return unix_funcs->pNtGdiAlphaBlend( hdc_dst, x_dst, y_dst, width_dst, height_dst, hdc_src,
45 x_src, y_src, width_src, height_src, blend_function, xform );
48 BOOL WINAPI NtGdiAngleArc( HDC hdc, INT x, INT y, DWORD radius, FLOAT start_angle, FLOAT sweep_angle )
50 if (!unix_funcs) return FALSE;
51 return unix_funcs->pNtGdiAngleArc( hdc, x, y, radius, start_angle, sweep_angle );
54 BOOL WINAPI NtGdiArcInternal( UINT type, HDC hdc, INT left, INT top, INT right, INT bottom,
55 INT xstart, INT ystart, INT xend, INT yend )
57 if (!unix_funcs) return FALSE;
58 return unix_funcs->pNtGdiArcInternal( type, hdc, left, top, right, bottom, xstart, ystart, xend, yend );
61 BOOL WINAPI NtGdiBeginPath( HDC hdc )
63 if (!unix_funcs) return FALSE;
64 return unix_funcs->pNtGdiBeginPath( hdc );
67 BOOL WINAPI NtGdiBitBlt( HDC hdc_dst, INT x_dst, INT y_dst, INT width, INT height, HDC hdc_src,
68 INT x_src, INT y_src, DWORD rop, DWORD bk_color, FLONG fl )
70 if (!unix_funcs) return FALSE;
71 return unix_funcs->pNtGdiBitBlt( hdc_dst, x_dst, y_dst, width, height, hdc_src, x_src, y_src,
72 rop, bk_color, fl );
75 BOOL WINAPI NtGdiCloseFigure( HDC hdc )
77 if (!unix_funcs) return FALSE;
78 return unix_funcs->pNtGdiCloseFigure( hdc );
81 BOOL WINAPI NtGdiComputeXformCoefficients( HDC hdc )
83 if (!unix_funcs) return FALSE;
84 return unix_funcs->pNtGdiComputeXformCoefficients( hdc );
87 HBITMAP WINAPI NtGdiCreateCompatibleBitmap( HDC hdc, INT width, INT height )
89 if (!unix_funcs) return 0;
90 return unix_funcs->pNtGdiCreateCompatibleBitmap( hdc, width, height );
93 HDC WINAPI NtGdiCreateCompatibleDC( HDC hdc )
95 if (!unix_funcs) return 0;
96 return unix_funcs->pNtGdiCreateCompatibleDC( hdc );
99 HBITMAP WINAPI NtGdiCreateDIBitmapInternal( HDC hdc, INT width, INT height, DWORD init,
100 const void *bits, const BITMAPINFO *data,
101 UINT coloruse, UINT max_info, UINT max_bits,
102 ULONG flags, HANDLE xform )
104 if (!unix_funcs) return 0;
105 return unix_funcs->pNtGdiCreateDIBitmapInternal( hdc, width, height, init, bits, data,
106 coloruse, max_info, max_bits, flags, xform );
109 HDC WINAPI NtGdiCreateMetafileDC( HDC hdc )
111 if (!unix_funcs) return 0;
112 return unix_funcs->pNtGdiCreateMetafileDC( hdc );
115 BOOL WINAPI NtGdiDeleteObjectApp( HGDIOBJ obj )
117 if (!unix_funcs) return FALSE;
118 return unix_funcs->pNtGdiDeleteObjectApp( obj );
121 LONG WINAPI NtGdiDoPalette( HGDIOBJ handle, WORD start, WORD count, void *entries,
122 DWORD func, BOOL inbound )
124 if (!unix_funcs) return 0;
125 return unix_funcs->pNtGdiDoPalette( handle, start, count, entries, func, inbound );
128 BOOL WINAPI NtGdiEllipse( HDC hdc, INT left, INT top, INT right, INT bottom )
130 if (!unix_funcs) return FALSE;
131 return unix_funcs->pNtGdiEllipse( hdc, left, top, right, bottom );
134 INT WINAPI NtGdiEndDoc( HDC hdc )
136 if (!unix_funcs) return SP_ERROR;
137 return unix_funcs->pNtGdiEndDoc( hdc );
140 BOOL WINAPI NtGdiEndPath( HDC hdc )
142 if (!unix_funcs) return FALSE;
143 return unix_funcs->pNtGdiEndPath( hdc );
146 INT WINAPI NtGdiEndPage( HDC hdc )
148 if (!unix_funcs) return SP_ERROR;
149 return unix_funcs->pNtGdiEndPage( hdc );
152 BOOL WINAPI NtUserEndPaint( HWND hwnd, const PAINTSTRUCT *ps )
154 if (!unix_funcs) return FALSE;
155 return unix_funcs->pNtUserEndPaint( hwnd, ps );
158 BOOL WINAPI NtGdiEnumFonts( HDC hdc, ULONG type, ULONG win32_compat, ULONG face_name_len,
159 const WCHAR *face_name, ULONG charset, ULONG *count, void *buf )
161 if (!unix_funcs) return FALSE;
162 return unix_funcs->pNtGdiEnumFonts( hdc, type, win32_compat, face_name_len, face_name,
163 charset, count, buf );
166 INT WINAPI NtGdiExcludeClipRect( HDC hdc, INT left, INT top, INT right, INT bottom )
168 if (!unix_funcs) return ERROR;
169 return unix_funcs->pNtGdiExcludeClipRect( hdc, left, top, right, bottom );
172 INT WINAPI NtGdiExtEscape( HDC hdc, WCHAR *driver, INT driver_id, INT escape, INT input_size,
173 const char *input, INT output_size, char *output )
175 if (!unix_funcs) return 0;
176 return unix_funcs->pNtGdiExtEscape( hdc, driver, driver_id, escape, input_size, input,
177 output_size, output );
180 BOOL WINAPI NtGdiExtFloodFill( HDC hdc, INT x, INT y, COLORREF color, UINT type )
182 if (!unix_funcs) return FALSE;
183 return unix_funcs->pNtGdiExtFloodFill( hdc, x, y, color, type );
186 BOOL WINAPI NtGdiExtTextOutW( HDC hdc, INT x, INT y, UINT flags, const RECT *rect,
187 const WCHAR *str, UINT count, const INT *dx, DWORD cp )
189 if (!unix_funcs) return FALSE;
190 return unix_funcs->pNtGdiExtTextOutW( hdc, x, y, flags, rect, str, count, dx, cp );
193 INT WINAPI NtGdiExtSelectClipRgn( HDC hdc, HRGN region, INT mode )
195 if (!unix_funcs) return ERROR;
196 return unix_funcs->pNtGdiExtSelectClipRgn( hdc, region, mode );
199 BOOL WINAPI NtGdiFillPath( HDC hdc )
201 if (!unix_funcs) return FALSE;
202 return unix_funcs->pNtGdiFillPath( hdc );
205 BOOL WINAPI NtGdiFillRgn( HDC hdc, HRGN hrgn, HBRUSH hbrush )
207 if (!unix_funcs) return FALSE;
208 return unix_funcs->pNtGdiFillRgn( hdc, hrgn, hbrush );
211 BOOL WINAPI NtGdiFontIsLinked( HDC hdc )
213 if (!unix_funcs) return FALSE;
214 return unix_funcs->pNtGdiFontIsLinked( hdc );
217 BOOL WINAPI NtGdiFrameRgn( HDC hdc, HRGN hrgn, HBRUSH brush, INT width, INT height )
219 if (!unix_funcs) return FALSE;
220 return unix_funcs->pNtGdiFrameRgn( hdc, hrgn, brush, width, height );
223 BOOL WINAPI NtGdiGetAndSetDCDword( HDC hdc, UINT method, DWORD value, DWORD *result )
225 if (!unix_funcs) return FALSE;
226 return unix_funcs->pNtGdiGetAndSetDCDword( hdc, method, value, result );
229 INT WINAPI NtGdiGetAppClipBox( HDC hdc, RECT *rect )
231 if (!unix_funcs) return ERROR;
232 return unix_funcs->pNtGdiGetAppClipBox( hdc, rect );
235 UINT WINAPI NtGdiGetBoundsRect( HDC hdc, RECT *rect, UINT flags )
237 if (!unix_funcs) return 0;
238 return unix_funcs->pNtGdiGetBoundsRect( hdc, rect, flags );
241 BOOL WINAPI NtGdiGetCharABCWidthsW( HDC hdc, UINT first, UINT last, WCHAR *chars,
242 ULONG flags, void *buffer )
244 if (!unix_funcs) return FALSE;
245 return unix_funcs->pNtGdiGetCharABCWidthsW( hdc, first, last, chars, flags, buffer );
248 BOOL WINAPI NtGdiGetCharWidthW( HDC hdc, UINT first_char, UINT last_char, WCHAR *chars,
249 ULONG flags, void *buffer )
251 if (!unix_funcs) return FALSE;
252 return unix_funcs->pNtGdiGetCharWidthW( hdc, first_char, last_char, chars, flags, buffer );
255 BOOL WINAPI NtGdiGetCharWidthInfo( HDC hdc, struct char_width_info *info )
257 if (!unix_funcs) return FALSE;
258 return unix_funcs->pNtGdiGetCharWidthInfo( hdc, info );
261 INT WINAPI NtGdiGetDIBitsInternal( HDC hdc, HBITMAP hbitmap, UINT startscan, UINT lines,
262 void *bits, BITMAPINFO *info, UINT coloruse,
263 UINT max_bits, UINT max_info )
265 if (!unix_funcs) return 0;
266 return unix_funcs->pNtGdiGetDIBitsInternal( hdc, hbitmap, startscan, lines, bits, info, coloruse,
267 max_bits, max_info );
270 INT WINAPI NtGdiGetDeviceCaps( HDC hdc, INT cap )
272 if (!unix_funcs) return 0;
273 return unix_funcs->pNtGdiGetDeviceCaps( hdc, cap );
276 BOOL WINAPI NtGdiGetDeviceGammaRamp( HDC hdc, void *ptr )
278 if (!unix_funcs) return FALSE;
279 return unix_funcs->pNtGdiGetDeviceGammaRamp( hdc, ptr );
282 DWORD WINAPI NtGdiGetFontData( HDC hdc, DWORD table, DWORD offset, void *buffer, DWORD length )
284 if (!unix_funcs) return GDI_ERROR;
285 return unix_funcs->pNtGdiGetFontData( hdc, table, offset, buffer, length );
288 DWORD WINAPI NtGdiGetFontUnicodeRanges( HDC hdc, GLYPHSET *lpgs )
290 if (!unix_funcs) return 0;
291 return unix_funcs->pNtGdiGetFontUnicodeRanges( hdc, lpgs );
294 DWORD WINAPI NtGdiGetGlyphIndicesW( HDC hdc, const WCHAR *str, INT count,
295 WORD *indices, DWORD flags )
297 if (!unix_funcs) return GDI_ERROR;
298 return unix_funcs->pNtGdiGetGlyphIndicesW( hdc, str, count, indices, flags );
301 DWORD WINAPI NtGdiGetGlyphOutline( HDC hdc, UINT ch, UINT format, GLYPHMETRICS *metrics,
302 DWORD size, void *buffer, const MAT2 *mat2,
303 BOOL ignore_rotation )
305 if (!unix_funcs) return GDI_ERROR;
306 return unix_funcs->pNtGdiGetGlyphOutline( hdc, ch, format, metrics, size, buffer, mat2, ignore_rotation );
309 DWORD WINAPI NtGdiGetKerningPairs( HDC hdc, DWORD count, KERNINGPAIR *kern_pair )
311 if (!unix_funcs) return 0;
312 return unix_funcs->pNtGdiGetKerningPairs( hdc, count, kern_pair );
315 COLORREF WINAPI NtGdiGetNearestColor( HDC hdc, COLORREF color )
317 if (!unix_funcs) return CLR_INVALID;
318 return unix_funcs->pNtGdiGetNearestColor( hdc, color );
321 UINT WINAPI NtGdiGetOutlineTextMetricsInternalW( HDC hdc, UINT cbData,
322 OUTLINETEXTMETRICW *otm, ULONG opts )
324 if (!unix_funcs) return 0;
325 return unix_funcs->pNtGdiGetOutlineTextMetricsInternalW( hdc, cbData, otm, opts );
328 COLORREF WINAPI NtGdiGetPixel( HDC hdc, INT x, INT y )
330 if (!unix_funcs) return CLR_INVALID;
331 return unix_funcs->pNtGdiGetPixel( hdc, x, y );
334 INT WINAPI NtGdiGetRandomRgn( HDC hdc, HRGN region, INT code )
336 if (!unix_funcs) return -1;
337 return unix_funcs->pNtGdiGetRandomRgn( hdc, region, code );
340 BOOL WINAPI NtGdiGetRasterizerCaps( RASTERIZER_STATUS *status, UINT size )
342 if (!unix_funcs) return FALSE;
343 return unix_funcs->pNtGdiGetRasterizerCaps( status, size );
346 BOOL WINAPI NtGdiGetRealizationInfo( HDC hdc, struct font_realization_info *info )
348 if (!unix_funcs) return FALSE;
349 return unix_funcs->pNtGdiGetRealizationInfo( hdc, info );
352 UINT WINAPI NtGdiGetTextCharsetInfo( HDC hdc, FONTSIGNATURE *fs, DWORD flags )
354 if (!unix_funcs) return DEFAULT_CHARSET;
355 return unix_funcs->pNtGdiGetTextCharsetInfo( hdc, fs, flags );
358 BOOL WINAPI NtGdiGetTextExtentExW( HDC hdc, const WCHAR *str, INT count, INT max_ext,
359 INT *nfit, INT *dxs, SIZE *size, UINT flags )
361 if (!unix_funcs) return FALSE;
362 return unix_funcs->pNtGdiGetTextExtentExW( hdc, str, count, max_ext, nfit, dxs, size, flags );
365 INT WINAPI NtGdiGetTextFaceW( HDC hdc, INT count, WCHAR *name, BOOL alias_name )
367 if (!unix_funcs) return 0;
368 return unix_funcs->pNtGdiGetTextFaceW( hdc, count, name, alias_name );
371 BOOL WINAPI NtGdiGetTextMetricsW( HDC hdc, TEXTMETRICW *metrics, ULONG flags )
373 if (!unix_funcs) return FALSE;
374 return unix_funcs->pNtGdiGetTextMetricsW( hdc, metrics, flags );
377 BOOL WINAPI NtGdiGradientFill( HDC hdc, TRIVERTEX *vert_array, ULONG nvert,
378 void *grad_array, ULONG ngrad, ULONG mode )
380 if (!unix_funcs) return FALSE;
381 return unix_funcs->pNtGdiGradientFill( hdc, vert_array, nvert, grad_array, ngrad, mode );
384 INT WINAPI NtGdiIntersectClipRect( HDC hdc, INT left, INT top, INT right, INT bottom )
386 if (!unix_funcs) return ERROR;
387 return unix_funcs->pNtGdiIntersectClipRect( hdc, left, top, right, bottom );
390 BOOL WINAPI NtGdiInvertRgn( HDC hdc, HRGN hrgn )
392 if (!unix_funcs) return FALSE;
393 return unix_funcs->pNtGdiInvertRgn( hdc, hrgn );
396 BOOL WINAPI NtGdiLineTo( HDC hdc, INT x, INT y )
398 if (!unix_funcs) return FALSE;
399 return unix_funcs->pNtGdiLineTo( hdc, x, y );
402 BOOL WINAPI NtGdiMaskBlt( HDC hdc, INT x_dst, INT y_dst, INT width_dst, INT height_dst,
403 HDC hdc_src, INT x_src, INT y_src, HBITMAP mask,
404 INT x_mask, INT y_mask, DWORD rop, DWORD bk_color )
406 if (!unix_funcs) return FALSE;
407 return unix_funcs->pNtGdiMaskBlt( hdc, x_dst, y_dst, width_dst, height_dst, hdc_src,
408 x_src, y_src, mask, x_mask, y_mask, rop, bk_color );
411 BOOL WINAPI NtGdiModifyWorldTransform( HDC hdc, const XFORM *xform, DWORD mode )
413 if (!unix_funcs) return FALSE;
414 return unix_funcs->pNtGdiModifyWorldTransform( hdc, xform, mode );
417 BOOL WINAPI NtGdiMoveTo( HDC hdc, INT x, INT y, POINT *pt )
419 if (!unix_funcs) return FALSE;
420 return unix_funcs->pNtGdiMoveTo( hdc, x, y, pt );
423 INT WINAPI NtGdiOffsetClipRgn( HDC hdc, INT x, INT y )
425 if (!unix_funcs) return ERROR;
426 return unix_funcs->pNtGdiOffsetClipRgn( hdc, x, y );
429 HDC WINAPI NtGdiOpenDCW( UNICODE_STRING *device, const DEVMODEW *devmode,
430 UNICODE_STRING *output, ULONG type, BOOL is_display,
431 HANDLE hspool, DRIVER_INFO_2W *driver_info, void *pdev )
433 if (!unix_funcs) return 0;
434 return unix_funcs->pNtGdiOpenDCW( device, devmode, output, type, is_display,
435 hspool, driver_info, pdev );
438 BOOL WINAPI NtGdiPatBlt( HDC hdc, INT left, INT top, INT width, INT height, DWORD rop )
440 if (!unix_funcs) return FALSE;
441 return unix_funcs->pNtGdiPatBlt( hdc, left, top, width, height, rop );
444 BOOL WINAPI NtGdiPlgBlt( HDC hdc, const POINT *point, HDC hdc_src, INT x_src, INT y_src,
445 INT width, INT height, HBITMAP mask, INT x_mask, INT y_mask,
446 DWORD bk_color )
448 if (!unix_funcs) return FALSE;
449 return unix_funcs->pNtGdiPlgBlt( hdc, point, hdc_src, x_src, y_src, width, height, mask,
450 x_mask, y_mask, bk_color );
453 BOOL WINAPI NtGdiPolyDraw( HDC hdc, const POINT *points, const BYTE *types, DWORD count )
455 if (!unix_funcs) return FALSE;
456 return unix_funcs->pNtGdiPolyDraw( hdc, points, types, count );
459 ULONG WINAPI NtGdiPolyPolyDraw( HDC hdc, const POINT *points, const ULONG *counts,
460 DWORD count, UINT function )
462 if (!unix_funcs) return 0;
463 return unix_funcs->pNtGdiPolyPolyDraw( hdc, points, counts, count, function );
466 BOOL WINAPI NtGdiPtVisible( HDC hdc, INT x, INT y )
468 if (!unix_funcs) return FALSE;
469 return unix_funcs->pNtGdiPtVisible( hdc, x, y );
472 BOOL WINAPI NtGdiRectVisible( HDC hdc, const RECT *rect )
474 if (!unix_funcs) return FALSE;
475 return unix_funcs->pNtGdiRectVisible( hdc, rect );
478 BOOL WINAPI NtGdiRectangle( HDC hdc, INT left, INT top, INT right, INT bottom )
480 if (!unix_funcs) return FALSE;
481 return unix_funcs->pNtGdiRectangle( hdc, left, top, right, bottom );
484 BOOL WINAPI NtGdiResetDC( HDC hdc, const DEVMODEW *devmode, BOOL *banding,
485 DRIVER_INFO_2W *driver_info, void *dev )
487 if (!unix_funcs) return FALSE;
488 return unix_funcs->pNtGdiResetDC( hdc, devmode, banding, driver_info, dev );
491 BOOL WINAPI NtGdiResizePalette( HPALETTE palette, UINT count )
493 if (!unix_funcs) return FALSE;
494 return unix_funcs->pNtGdiResizePalette( palette, count );
497 BOOL WINAPI NtGdiRestoreDC( HDC hdc, INT level )
499 if (!unix_funcs) return FALSE;
500 return unix_funcs->pNtGdiRestoreDC( hdc, level );
503 BOOL WINAPI NtGdiRoundRect( HDC hdc, INT left, INT top, INT right,
504 INT bottom, INT ell_width, INT ell_height )
506 if (!unix_funcs) return FALSE;
507 return unix_funcs->pNtGdiRoundRect( hdc, left, top, right, bottom, ell_width, ell_height );
510 BOOL WINAPI NtGdiScaleViewportExtEx( HDC hdc, INT x_num, INT x_denom,
511 INT y_num, INT y_denom, SIZE *size )
513 if (!unix_funcs) return FALSE;
514 return unix_funcs->pNtGdiScaleViewportExtEx( hdc, x_num, x_denom, y_num, y_denom, size );
517 BOOL WINAPI NtGdiScaleWindowExtEx( HDC hdc, INT x_num, INT x_denom,
518 INT y_num, INT y_denom, SIZE *size )
520 if (!unix_funcs) return FALSE;
521 return unix_funcs->pNtGdiScaleWindowExtEx( hdc, x_num, x_denom, y_num, y_denom, size );
524 HGDIOBJ WINAPI NtGdiSelectBitmap( HDC hdc, HGDIOBJ handle )
526 if (!unix_funcs) return 0;
527 return unix_funcs->pNtGdiSelectBitmap( hdc, handle );
530 HGDIOBJ WINAPI NtGdiSelectBrush( HDC hdc, HGDIOBJ handle )
532 if (!unix_funcs) return 0;
533 return unix_funcs->pNtGdiSelectBrush( hdc, handle );
536 BOOL WINAPI NtGdiSelectClipPath( HDC hdc, INT mode )
538 if (!unix_funcs) return FALSE;
539 return unix_funcs->pNtGdiSelectClipPath( hdc, mode );
542 HGDIOBJ WINAPI NtGdiSelectFont( HDC hdc, HGDIOBJ handle )
544 if (!unix_funcs) return 0;
545 return unix_funcs->pNtGdiSelectFont( hdc, handle );
548 HGDIOBJ WINAPI NtGdiSelectPen( HDC hdc, HGDIOBJ handle )
550 if (!unix_funcs) return 0;
551 return unix_funcs->pNtGdiSelectPen( hdc, handle );
554 UINT WINAPI NtGdiSetBoundsRect( HDC hdc, const RECT *rect, UINT flags )
556 if (!unix_funcs) return 0;
557 return unix_funcs->pNtGdiSetBoundsRect( hdc, rect, flags );
560 INT WINAPI NtGdiSetDIBitsToDeviceInternal( HDC hdc, INT x_dst, INT y_dst, DWORD cx,
561 DWORD cy, INT x_src, INT y_src, UINT startscan,
562 UINT lines, const void *bits, const BITMAPINFO *bmi,
563 UINT coloruse, UINT max_bits, UINT max_info,
564 BOOL xform_coords, HANDLE xform )
566 if (!unix_funcs) return 0;
567 return unix_funcs->pNtGdiSetDIBitsToDeviceInternal( hdc, x_dst, y_dst, cx, cy, x_src, y_src,
568 startscan, lines, bits, bmi, coloruse,
569 max_bits, max_info, xform_coords, xform );
572 BOOL WINAPI NtGdiSetDeviceGammaRamp( HDC hdc, void *ptr )
574 if (!unix_funcs) return FALSE;
575 return unix_funcs->pNtGdiSetDeviceGammaRamp( hdc, ptr );
578 DWORD WINAPI NtGdiSetLayout( HDC hdc, LONG wox, DWORD layout )
580 if (!unix_funcs) return GDI_ERROR;
581 return unix_funcs->pNtGdiSetLayout( hdc, wox, layout );
584 COLORREF WINAPI NtGdiSetPixel( HDC hdc, INT x, INT y, COLORREF color )
586 if (!unix_funcs) return CLR_INVALID;
587 return unix_funcs->pNtGdiSetPixel( hdc, x, y, color );
590 UINT WINAPI NtGdiSetSystemPaletteUse( HDC hdc, UINT use )
592 if (!unix_funcs) return SYSPAL_ERROR;
593 return unix_funcs->pNtGdiSetSystemPaletteUse( hdc, use );
596 INT WINAPI NtGdiStartDoc( HDC hdc, const DOCINFOW *doc, BOOL *banding, INT job )
598 if (!unix_funcs) return SP_ERROR;
599 return unix_funcs->pNtGdiStartDoc( hdc, doc, banding, job );
602 INT WINAPI NtGdiStartPage( HDC hdc )
604 if (!unix_funcs) return SP_ERROR;
605 return unix_funcs->pNtGdiStartPage( hdc );
608 BOOL WINAPI NtGdiStretchBlt( HDC hdc, INT x_dst, INT y_dst, INT width_dst, INT height_dst,
609 HDC hdc_src, INT x_src, INT y_src, INT width_src, INT height_src,
610 DWORD rop, COLORREF bk_color )
612 if (!unix_funcs) return FALSE;
613 return unix_funcs->pNtGdiStretchBlt( hdc, x_dst, y_dst, width_dst, height_dst, hdc_src,
614 x_src, y_src, width_src, height_src, rop, bk_color );
617 INT WINAPI NtGdiStretchDIBitsInternal( HDC hdc, INT x_dst, INT y_dst, INT width_dst,
618 INT height_dst, INT x_src, INT y_src, INT width_src,
619 INT height_src, const void *bits, const BITMAPINFO *bmi,
620 UINT coloruse, DWORD rop, UINT max_info, UINT max_bits,
621 HANDLE xform )
623 if (!unix_funcs) return 0;
624 return unix_funcs->pNtGdiStretchDIBitsInternal( hdc, x_dst, y_dst, width_dst, height_dst,
625 x_src, y_src, width_src, height_src, bits, bmi,
626 coloruse, rop, max_info, max_bits, xform );
629 BOOL WINAPI NtGdiStrokeAndFillPath( HDC hdc )
631 if (!unix_funcs) return FALSE;
632 return unix_funcs->pNtGdiStrokeAndFillPath( hdc );
635 BOOL WINAPI NtGdiStrokePath( HDC hdc )
637 if (!unix_funcs) return FALSE;
638 return unix_funcs->pNtGdiStrokePath( hdc );
641 BOOL WINAPI NtGdiTransparentBlt( HDC hdc, int x_dst, int y_dst, int width_dst, int height_dst,
642 HDC hdc_src, int x_src, int y_src, int width_src, int height_src,
643 UINT color )
645 if (!unix_funcs) return FALSE;
646 return unix_funcs->pNtGdiTransparentBlt( hdc, x_dst, y_dst, width_dst, height_dst, hdc_src,
647 x_src, y_src, width_src, height_src, color );
650 BOOL WINAPI NtGdiUnrealizeObject( HGDIOBJ obj )
652 if (!unix_funcs) return FALSE;
653 return unix_funcs->pNtGdiUnrealizeObject( obj );
656 BOOL WINAPI NtGdiUpdateColors( HDC hdc )
658 if (!unix_funcs) return FALSE;
659 return unix_funcs->pNtGdiUpdateColors( hdc );
662 BOOL WINAPI NtGdiWidenPath( HDC hdc )
664 if (!unix_funcs) return FALSE;
665 return unix_funcs->pNtGdiWidenPath( hdc );
668 NTSTATUS WINAPI NtGdiDdDDICheckVidPnExclusiveOwnership( const D3DKMT_CHECKVIDPNEXCLUSIVEOWNERSHIP *desc )
670 if (!unix_funcs) return STATUS_NOT_SUPPORTED;
671 return unix_funcs->pNtGdiDdDDICheckVidPnExclusiveOwnership( desc );
674 NTSTATUS WINAPI NtGdiDdDDICloseAdapter( const D3DKMT_CLOSEADAPTER *desc )
676 if (!unix_funcs) return STATUS_NOT_SUPPORTED;
677 return unix_funcs->pNtGdiDdDDICloseAdapter( desc );
680 NTSTATUS WINAPI NtGdiDdDDICreateDCFromMemory( D3DKMT_CREATEDCFROMMEMORY *desc )
682 if (!unix_funcs) return STATUS_NOT_SUPPORTED;
683 return unix_funcs->pNtGdiDdDDICreateDCFromMemory( desc );
686 NTSTATUS WINAPI NtGdiDdDDIDestroyDCFromMemory( const D3DKMT_DESTROYDCFROMMEMORY *desc )
688 if (!unix_funcs) return STATUS_NOT_SUPPORTED;
689 return unix_funcs->pNtGdiDdDDIDestroyDCFromMemory( desc );
692 NTSTATUS WINAPI NtGdiDdDDIDestroyDevice( const D3DKMT_DESTROYDEVICE *desc )
694 if (!unix_funcs) return STATUS_NOT_SUPPORTED;
695 return unix_funcs->pNtGdiDdDDIDestroyDevice( desc );
698 NTSTATUS WINAPI NtGdiDdDDIEscape( const D3DKMT_ESCAPE *desc )
700 if (!unix_funcs) return STATUS_NOT_SUPPORTED;
701 return unix_funcs->pNtGdiDdDDIEscape( desc );
704 NTSTATUS WINAPI NtGdiDdDDIOpenAdapterFromDeviceName( D3DKMT_OPENADAPTERFROMDEVICENAME *desc )
706 if (!unix_funcs) return STATUS_NOT_SUPPORTED;
707 return unix_funcs->pNtGdiDdDDIOpenAdapterFromDeviceName( desc );
710 NTSTATUS WINAPI NtGdiDdDDIOpenAdapterFromLuid( D3DKMT_OPENADAPTERFROMLUID *desc )
712 if (!unix_funcs) return STATUS_NOT_SUPPORTED;
713 return unix_funcs->pNtGdiDdDDIOpenAdapterFromLuid( desc );
716 NTSTATUS WINAPI NtGdiDdDDIQueryVideoMemoryInfo( D3DKMT_QUERYVIDEOMEMORYINFO *desc )
718 if (!unix_funcs) return STATUS_NOT_SUPPORTED;
719 return unix_funcs->pNtGdiDdDDIQueryVideoMemoryInfo( desc );
722 NTSTATUS WINAPI NtGdiDdDDISetVidPnSourceOwner( const D3DKMT_SETVIDPNSOURCEOWNER *desc )
724 if (!unix_funcs) return STATUS_NOT_SUPPORTED;
725 return unix_funcs->pNtGdiDdDDISetVidPnSourceOwner( desc );
728 HKL WINAPI NtUserActivateKeyboardLayout( HKL layout, UINT flags )
730 if (!unix_funcs) return 0;
731 return unix_funcs->pNtUserActivateKeyboardLayout( layout, flags );
734 HDC WINAPI NtUserBeginPaint( HWND hwnd, PAINTSTRUCT *ps )
736 if (!unix_funcs) return 0;
737 return unix_funcs->pNtUserBeginPaint( hwnd, ps );
740 LRESULT WINAPI NtUserCallNextHookEx( HHOOK hhook, INT code, WPARAM wparam, LPARAM lparam )
742 if (!unix_funcs) return 0;
743 return unix_funcs->pNtUserCallNextHookEx( hhook, code, wparam, lparam );
746 ULONG_PTR WINAPI NtUserCallNoParam( ULONG code )
748 if (!unix_funcs) return 0;
749 return unix_funcs->pNtUserCallNoParam( code );
752 ULONG_PTR WINAPI NtUserCallOneParam( ULONG_PTR arg, ULONG code )
754 if (!unix_funcs) return 0;
755 return unix_funcs->pNtUserCallOneParam( arg, code );
758 ULONG_PTR WINAPI NtUserCallTwoParam( ULONG_PTR arg1, ULONG_PTR arg2, ULONG code )
760 if (!unix_funcs) return 0;
761 return unix_funcs->pNtUserCallTwoParam( arg1, arg2, code );
764 ULONG_PTR WINAPI NtUserCallHwnd( HWND hwnd, DWORD code )
766 if (!unix_funcs) return 0;
767 return unix_funcs->pNtUserCallHwnd( hwnd, code );
770 ULONG_PTR WINAPI NtUserCallHwndParam( HWND hwnd, DWORD_PTR param, DWORD code )
772 if (!unix_funcs) return 0;
773 return unix_funcs->pNtUserCallHwndParam( hwnd, param, code );
776 BOOL WINAPI NtUserCloseClipboard(void)
778 if (!unix_funcs) return FALSE;
779 return unix_funcs->pNtUserCloseClipboard();
782 BOOL WINAPI NtUserChangeClipboardChain( HWND hwnd, HWND next )
784 if (!unix_funcs) return DISP_CHANGE_FAILED;
785 return unix_funcs->pNtUserChangeClipboardChain( hwnd, next );
788 LONG WINAPI NtUserChangeDisplaySettings( UNICODE_STRING *devname, DEVMODEW *devmode, HWND hwnd,
789 DWORD flags, void *lparam )
791 if (!unix_funcs) return DISP_CHANGE_FAILED;
792 return unix_funcs->pNtUserChangeDisplaySettings( devname, devmode, hwnd, flags, lparam );
795 BOOL WINAPI NtUserClipCursor( const RECT *rect )
797 if (!unix_funcs) return FALSE;
798 return unix_funcs->pNtUserClipCursor( rect );
801 INT WINAPI NtUserCountClipboardFormats(void)
803 if (!unix_funcs) return 0;
804 return unix_funcs->pNtUserCountClipboardFormats();
807 BOOL WINAPI NtUserCreateCaret( HWND hwnd, HBITMAP bitmap, int width, int height )
809 if (!unix_funcs) return 0;
810 return unix_funcs->pNtUserCreateCaret( hwnd, bitmap, width, height );
813 HWND WINAPI NtUserCreateWindowEx( DWORD ex_style, UNICODE_STRING *class_name,
814 UNICODE_STRING *version, UNICODE_STRING *window_name,
815 DWORD style, INT x, INT y, INT width, INT height,
816 HWND parent, HMENU menu, HINSTANCE instance, void *params,
817 DWORD flags, CBT_CREATEWNDW *cbtc, DWORD unk, BOOL ansi )
819 if (!unix_funcs) return 0;
820 return unix_funcs->pNtUserCreateWindowEx( ex_style, class_name, version, window_name,
821 style, x, y, width, height, parent, menu,
822 instance, params, flags, cbtc, unk, ansi );
825 HDWP WINAPI NtUserDeferWindowPosAndBand( HDWP hdwp, HWND hwnd, HWND after,
826 INT x, INT y, INT cx, INT cy,
827 UINT flags, UINT unk1, UINT unk2 )
829 if (!unix_funcs) return 0;
830 return unix_funcs->pNtUserDeferWindowPosAndBand( hdwp, hwnd, after, x, y, cx, cy,
831 flags, unk1, unk2 );
834 BOOL WINAPI NtUserDestroyCursor( HCURSOR cursor, ULONG arg )
836 if (!unix_funcs) return FALSE;
837 return unix_funcs->pNtUserDestroyCursor( cursor, arg );
840 BOOL WINAPI NtUserDestroyMenu( HMENU handle )
842 if (!unix_funcs) return FALSE;
843 return unix_funcs->pNtUserDestroyMenu( handle );
846 BOOL WINAPI NtUserDestroyWindow( HWND hwnd )
848 if (!unix_funcs) return FALSE;
849 return unix_funcs->pNtUserDestroyWindow( hwnd );
852 LRESULT WINAPI NtUserDispatchMessage( const MSG *msg )
854 if (!unix_funcs) return 0;
855 return unix_funcs->pNtUserDispatchMessage( msg );
858 BOOL WINAPI NtUserDragDetect( HWND hwnd, int x, int y )
860 if (!unix_funcs) return FALSE;
861 return unix_funcs->pNtUserDragDetect( hwnd, x, y );
864 BOOL WINAPI NtUserDrawIconEx( HDC hdc, INT x0, INT y0, HICON icon, INT width,
865 INT height, UINT istep, HBRUSH hbr, UINT flags )
867 if (!unix_funcs) return FALSE;
868 return unix_funcs->pNtUserDrawIconEx( hdc, x0, y0, icon, width, height, istep, hbr, flags );
871 DWORD WINAPI NtUserDrawMenuBarTemp( HWND hwnd, HDC hdc, RECT *rect, HMENU handle, HFONT font )
873 if (!unix_funcs) return 0;
874 return unix_funcs->pNtUserDrawMenuBarTemp( hwnd, hdc, rect, handle, font );
877 BOOL WINAPI NtUserEnableMenuItem( HMENU handle, UINT id, UINT flags )
879 if (!unix_funcs) return FALSE;
880 return unix_funcs->pNtUserEnableMenuItem( handle, id, flags );
883 BOOL WINAPI NtUserEndDeferWindowPosEx( HDWP hdwp, BOOL async )
885 if (!unix_funcs) return FALSE;
886 return unix_funcs->pNtUserEndDeferWindowPosEx( hdwp, async );
889 BOOL WINAPI NtUserEmptyClipboard(void)
891 if (!unix_funcs) return FALSE;
892 return unix_funcs->pNtUserEmptyClipboard();
895 NTSTATUS WINAPI NtUserEnumDisplayDevices( UNICODE_STRING *device, DWORD index,
896 DISPLAY_DEVICEW *info, DWORD flags )
898 if (!unix_funcs) return FALSE;
899 return unix_funcs->pNtUserEnumDisplayDevices( device, index, info, flags );
902 BOOL WINAPI NtUserEnumDisplayMonitors( HDC hdc, RECT *rect, MONITORENUMPROC proc, LPARAM lp )
904 if (!unix_funcs) return FALSE;
905 return unix_funcs->pNtUserEnumDisplayMonitors( hdc, rect, proc, lp );
908 BOOL WINAPI NtUserEnumDisplaySettings( UNICODE_STRING *device, DWORD mode,
909 DEVMODEW *dev_mode, DWORD flags )
911 if (!unix_funcs) return FALSE;
912 return unix_funcs->pNtUserEnumDisplaySettings( device, mode, dev_mode, flags );
915 INT WINAPI NtUserExcludeUpdateRgn( HDC hdc, HWND hwnd )
917 if (!unix_funcs) return ERROR;
918 return unix_funcs->pNtUserExcludeUpdateRgn( hdc, hwnd );
921 BOOL WINAPI NtUserFlashWindowEx( FLASHWINFO *info )
923 if (!unix_funcs) return FALSE;
924 return unix_funcs->pNtUserFlashWindowEx( info );
927 SHORT WINAPI NtUserGetAsyncKeyState( INT key )
929 if (!unix_funcs) return 0;
930 return unix_funcs->pNtUserGetAsyncKeyState( key );
933 ATOM WINAPI NtUserGetClassInfoEx( HINSTANCE instance, UNICODE_STRING *name, WNDCLASSEXW *wc,
934 struct client_menu_name *menu_name, BOOL ansi )
936 if (!unix_funcs) return FALSE;
937 return unix_funcs->pNtUserGetClassInfoEx( instance, name, wc, menu_name, ansi );
940 HANDLE WINAPI NtUserGetClipboardData( UINT format, struct get_clipboard_params *params )
942 if (!unix_funcs) return 0;
943 return unix_funcs->pNtUserGetClipboardData( format, params );
946 BOOL WINAPI NtUserGetCursorInfo( CURSORINFO *info )
948 if (!unix_funcs) return FALSE;
949 return unix_funcs->pNtUserGetCursorInfo( info );
952 HDC WINAPI NtUserGetDCEx( HWND hwnd, HRGN clip_rgn, DWORD flags )
954 if (!unix_funcs) return 0;
955 return unix_funcs->pNtUserGetDCEx( hwnd, clip_rgn, flags );
958 LONG WINAPI NtUserGetDisplayConfigBufferSizes( UINT32 flags, UINT32 *num_path_info,
959 UINT32 *num_mode_info )
961 if (!unix_funcs) return ERROR_NOT_SUPPORTED;
962 return unix_funcs->pNtUserGetDisplayConfigBufferSizes( flags, num_path_info, num_mode_info );
965 BOOL WINAPI NtUserGetIconInfo( HICON icon, ICONINFO *info, UNICODE_STRING *module,
966 UNICODE_STRING *res_name, DWORD *bpp, LONG unk )
968 if (!unix_funcs) return FALSE;
969 return unix_funcs->pNtUserGetIconInfo( icon, info, module, res_name, bpp, unk );
972 UINT WINAPI NtUserGetKeyboardLayoutList( INT size, HKL *layouts )
974 if (!unix_funcs) return 0;
975 return unix_funcs->pNtUserGetKeyboardLayoutList( size, layouts );
978 INT WINAPI NtUserGetKeyNameText( LONG lparam, WCHAR *buffer, INT size )
980 if (!unix_funcs) return 0;
981 return unix_funcs->pNtUserGetKeyNameText( lparam, buffer, size );
984 BOOL WINAPI NtUserGetMenuBarInfo( HWND hwnd, LONG id, LONG item, MENUBARINFO *info )
986 if (!unix_funcs) return 0;
987 return unix_funcs->pNtUserGetMenuBarInfo( hwnd, id, item, info );
990 BOOL WINAPI NtUserGetMessage( MSG *msg, HWND hwnd, UINT first, UINT last )
992 if (!unix_funcs) return FALSE;
993 return unix_funcs->pNtUserGetMessage( msg, hwnd, first, last );
996 HMENU WINAPI NtUserGetSystemMenu( HWND hwnd, BOOL revert )
998 if (!unix_funcs) return 0;
999 return unix_funcs->pNtUserGetSystemMenu( hwnd, revert );
1002 BOOL WINAPI NtUserGetUpdateRect( HWND hwnd, RECT *rect, BOOL erase )
1004 if (!unix_funcs) return FALSE;
1005 return unix_funcs->pNtUserGetUpdateRect( hwnd, rect, erase );
1008 INT WINAPI NtUserGetUpdateRgn( HWND hwnd, HRGN hrgn, BOOL erase )
1010 if (!unix_funcs) return 0;
1011 return unix_funcs->pNtUserGetUpdateRgn( hwnd, hrgn, erase );
1014 BOOL WINAPI NtUserHideCaret( HWND hwnd )
1016 if (!unix_funcs) return FALSE;
1017 return unix_funcs->pNtUserHideCaret( hwnd );
1020 BOOL WINAPI NtUserHiliteMenuItem( HWND hwnd, HMENU handle, UINT item, UINT hilite )
1022 if (!unix_funcs) return FALSE;
1023 return unix_funcs->pNtUserHiliteMenuItem( hwnd, handle, item, hilite );
1026 BOOL WINAPI NtUserMoveWindow( HWND hwnd, INT x, INT y, INT cx, INT cy, BOOL repaint )
1028 if (!unix_funcs) return 0;
1029 return unix_funcs->pNtUserMoveWindow( hwnd, x, y, cx, cy, repaint );
1032 INT WINAPI NtUserGetPriorityClipboardFormat( UINT *list, INT count )
1034 if (!unix_funcs) return 0;
1035 return unix_funcs->pNtUserGetPriorityClipboardFormat( list, count );
1038 DWORD WINAPI NtUserGetQueueStatus( UINT flags )
1040 if (!unix_funcs) return 0;
1041 return unix_funcs->pNtUserGetQueueStatus( flags );
1044 BOOL WINAPI NtUserGetUpdatedClipboardFormats( UINT *formats, UINT size, UINT *out_size )
1046 if (!unix_funcs) return FALSE;
1047 return unix_funcs->pNtUserGetUpdatedClipboardFormats( formats, size, out_size );
1051 BOOL WINAPI NtUserGetWindowPlacement( HWND hwnd, WINDOWPLACEMENT *placement )
1053 if (!unix_funcs) return FALSE;
1054 return unix_funcs->pNtUserGetWindowPlacement( hwnd, placement );
1057 HICON WINAPI NtUserInternalGetWindowIcon( HWND hwnd, UINT type )
1059 if (!unix_funcs) return 0;
1060 return unix_funcs->pNtUserInternalGetWindowIcon( hwnd, type );
1063 BOOL WINAPI NtUserInvalidateRect( HWND hwnd, const RECT *rect, BOOL erase )
1065 if (!unix_funcs) return FALSE;
1066 return unix_funcs->pNtUserInvalidateRect( hwnd, rect, erase );
1069 BOOL WINAPI NtUserInvalidateRgn( HWND hwnd, HRGN hrgn, BOOL erase )
1071 if (!unix_funcs) return FALSE;
1072 return unix_funcs->pNtUserInvalidateRgn( hwnd, hrgn, erase );
1075 BOOL WINAPI NtUserIsClipboardFormatAvailable( UINT format )
1077 if (!unix_funcs) return FALSE;
1078 return unix_funcs->pNtUserIsClipboardFormatAvailable( format );
1081 UINT WINAPI NtUserMapVirtualKeyEx( UINT code, UINT type, HKL layout )
1083 if (!unix_funcs) return -1;
1084 return unix_funcs->pNtUserMapVirtualKeyEx( code, type, layout );
1087 LRESULT WINAPI NtUserMessageCall( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam,
1088 void *result_info, DWORD type, BOOL ansi )
1090 if (!unix_funcs) return 0;
1091 return unix_funcs->pNtUserMessageCall( hwnd, msg, wparam, lparam, result_info, type, ansi );
1094 DWORD WINAPI NtUserMsgWaitForMultipleObjectsEx( DWORD count, const HANDLE *handles,
1095 DWORD timeout, DWORD mask, DWORD flags )
1097 if (!unix_funcs) return 0;
1098 return unix_funcs->pNtUserMsgWaitForMultipleObjectsEx( count, handles, timeout, mask, flags );
1101 BOOL WINAPI NtUserOpenClipboard( HWND hwnd, ULONG unk )
1103 if (!unix_funcs) return FALSE;
1104 return unix_funcs->pNtUserOpenClipboard( hwnd, unk );
1107 BOOL WINAPI NtUserPeekMessage( MSG *msg_out, HWND hwnd, UINT first, UINT last, UINT flags )
1109 if (!unix_funcs) return FALSE;
1110 return unix_funcs->pNtUserPeekMessage( msg_out, hwnd, first, last, flags );
1113 BOOL WINAPI NtUserPostMessage( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam )
1115 if (!unix_funcs) return FALSE;
1116 return unix_funcs->pNtUserPostMessage( hwnd, msg, wparam, lparam );
1119 BOOL WINAPI NtUserPostThreadMessage( DWORD thread, UINT msg, WPARAM wparam, LPARAM lparam )
1121 if (!unix_funcs) return FALSE;
1122 return unix_funcs->pNtUserPostThreadMessage( thread, msg, wparam, lparam );
1125 BOOL WINAPI NtUserRedrawWindow( HWND hwnd, const RECT *rect, HRGN hrgn, UINT flags )
1127 if (!unix_funcs) return FALSE;
1128 return unix_funcs->pNtUserRedrawWindow( hwnd, rect, hrgn, flags );
1131 ATOM WINAPI NtUserRegisterClassExWOW( const WNDCLASSEXW *wc, UNICODE_STRING *name, UNICODE_STRING *version,
1132 struct client_menu_name *client_menu_name, DWORD fnid, DWORD flags,
1133 DWORD *wow )
1135 if (!unix_funcs) return 0;
1136 return unix_funcs->pNtUserRegisterClassExWOW( wc, name, version, client_menu_name, fnid, flags, wow );
1139 BOOL WINAPI NtUserRegisterHotKey( HWND hwnd, INT id, UINT modifiers, UINT vk )
1141 if (!unix_funcs) return FALSE;
1142 return unix_funcs->pNtUserRegisterHotKey( hwnd, id, modifiers, vk );
1145 INT WINAPI NtUserReleaseDC( HWND hwnd, HDC hdc )
1147 if (!unix_funcs) return 0;
1148 return unix_funcs->pNtUserReleaseDC( hwnd, hdc );
1151 BOOL WINAPI NtUserScrollDC( HDC hdc, INT dx, INT dy, const RECT *scroll, const RECT *clip,
1152 HRGN ret_update_rgn, RECT *update_rect )
1154 if (!unix_funcs) return FALSE;
1155 return unix_funcs->pNtUserScrollDC( hdc, dx, dy, scroll, clip, ret_update_rgn, update_rect );
1158 INT WINAPI NtUserScrollWindowEx( HWND hwnd, INT dx, INT dy, const RECT *rect,
1159 const RECT *clip_rect, HRGN update_rgn,
1160 RECT *update_rect, UINT flags )
1162 if (!unix_funcs) return 0;
1163 return unix_funcs->pNtUserScrollWindowEx( hwnd, dx, dy, rect, clip_rect,
1164 update_rgn, update_rect, flags );
1167 HPALETTE WINAPI NtUserSelectPalette( HDC hdc, HPALETTE hpal, WORD bkg )
1169 if (!unix_funcs) return 0;
1170 return unix_funcs->pNtUserSelectPalette( hdc, hpal, bkg );
1173 UINT WINAPI NtUserSendInput( UINT count, INPUT *inputs, int size )
1175 if (!unix_funcs) return 0;
1176 return unix_funcs->pNtUserSendInput( count, inputs, size );
1179 HWND WINAPI NtUserSetActiveWindow( HWND hwnd )
1181 if (!unix_funcs) return 0;
1182 return unix_funcs->pNtUserSetActiveWindow( hwnd );
1185 HWND WINAPI NtUserSetCapture( HWND hwnd )
1187 if (!unix_funcs) return 0;
1188 return unix_funcs->pNtUserSetCapture( hwnd );
1191 NTSTATUS WINAPI NtUserSetClipboardData( UINT format, HANDLE handle, struct set_clipboard_params *params )
1193 if (!unix_funcs) return 0;
1194 return unix_funcs->pNtUserSetClipboardData( format, handle, params );
1197 HCURSOR WINAPI NtUserSetCursor( HCURSOR cursor )
1199 if (!unix_funcs) return 0;
1200 return unix_funcs->pNtUserSetCursor( cursor );
1203 DWORD WINAPI NtUserSetClassLong( HWND hwnd, INT offset, LONG newval, BOOL ansi )
1205 if (!unix_funcs) return 0;
1206 return unix_funcs->pNtUserSetClassLong( hwnd, offset, newval, ansi );
1209 ULONG_PTR WINAPI NtUserSetClassLongPtr( HWND hwnd, INT offset, LONG_PTR newval, BOOL ansi )
1211 if (!unix_funcs) return 0;
1212 return unix_funcs->pNtUserSetClassLongPtr( hwnd, offset, newval, ansi );
1215 WORD WINAPI NtUserSetClassWord( HWND hwnd, INT offset, WORD newval )
1217 if (!unix_funcs) return 0;
1218 return unix_funcs->pNtUserSetClassWord( hwnd, offset, newval );
1221 HWND WINAPI NtUserSetClipboardViewer( HWND hwnd )
1223 if (!unix_funcs) return 0;
1224 return unix_funcs->pNtUserSetClipboardViewer( hwnd );
1227 BOOL WINAPI NtUserSetCursorIconData( HCURSOR cursor, UNICODE_STRING *module, UNICODE_STRING *res_name,
1228 struct cursoricon_desc *desc )
1230 if (!unix_funcs) return FALSE;
1231 return unix_funcs->pNtUserSetCursorIconData( cursor, module, res_name, desc );
1234 BOOL WINAPI NtUserSetCursorPos( INT x, INT y )
1236 if (!unix_funcs) return FALSE;
1237 return unix_funcs->pNtUserSetCursorPos( x, y );
1240 HWND WINAPI NtUserSetFocus( HWND hwnd )
1242 if (!unix_funcs) return FALSE;
1243 return unix_funcs->pNtUserSetFocus( hwnd );
1246 void WINAPI NtUserSetInternalWindowPos( HWND hwnd, UINT cmd, RECT *rect, POINT *pt )
1248 if (!unix_funcs) return;
1249 return unix_funcs->pNtUserSetInternalWindowPos( hwnd, cmd, rect, pt );
1252 BOOL WINAPI NtUserSetLayeredWindowAttributes( HWND hwnd, COLORREF key, BYTE alpha, DWORD flags )
1254 if (!unix_funcs) return FALSE;
1255 return unix_funcs->pNtUserSetLayeredWindowAttributes( hwnd, key, alpha, flags );
1258 BOOL WINAPI NtUserSetMenu( HWND hwnd, HMENU menu )
1260 if (!unix_funcs) return FALSE;
1261 return unix_funcs->pNtUserSetMenu( hwnd, menu );
1264 HWND WINAPI NtUserSetParent( HWND hwnd, HWND parent )
1266 if (!unix_funcs) return 0;
1267 return unix_funcs->pNtUserSetParent( hwnd, parent );
1270 BOOL WINAPI NtUserSetSysColors( INT count, const INT *colors, const COLORREF *values )
1272 if (!unix_funcs) return FALSE;
1273 return unix_funcs->pNtUserSetSysColors( count, colors, values );
1276 BOOL WINAPI NtUserSetSystemMenu( HWND hwnd, HMENU menu )
1278 if (!unix_funcs) return FALSE;
1279 return unix_funcs->pNtUserSetSystemMenu( hwnd, menu );
1282 LONG WINAPI NtUserSetWindowLong( HWND hwnd, INT offset, LONG newval, BOOL ansi )
1284 if (!unix_funcs) return 0;
1285 return unix_funcs->pNtUserSetWindowLong( hwnd, offset, newval, ansi );
1288 LONG_PTR WINAPI NtUserSetWindowLongPtr( HWND hwnd, INT offset, LONG_PTR newval, BOOL ansi )
1290 if (!unix_funcs) return 0;
1291 return unix_funcs->pNtUserSetWindowLongPtr( hwnd, offset, newval, ansi );
1294 BOOL WINAPI NtUserSetWindowPlacement( HWND hwnd, const WINDOWPLACEMENT *wpl )
1296 if (!unix_funcs) return 0;
1297 return unix_funcs->pNtUserSetWindowPlacement( hwnd, wpl );
1300 BOOL WINAPI NtUserSetWindowPos( HWND hwnd, HWND after, INT x, INT y, INT cx, INT cy, UINT flags )
1302 if (!unix_funcs) return 0;
1303 return unix_funcs->pNtUserSetWindowPos( hwnd, after, x, y, cx, cy, flags );
1306 int WINAPI NtUserSetWindowRgn( HWND hwnd, HRGN hrgn, BOOL redraw )
1308 if (!unix_funcs) return 0;
1309 return unix_funcs->pNtUserSetWindowRgn( hwnd, hrgn, redraw );
1312 WORD WINAPI NtUserSetWindowWord( HWND hwnd, INT offset, WORD newval )
1314 if (!unix_funcs) return 0;
1315 return unix_funcs->pNtUserSetWindowWord( hwnd, offset, newval );
1318 BOOL WINAPI NtUserShowCaret( HWND hwnd )
1320 if (!unix_funcs) return FALSE;
1321 return unix_funcs->pNtUserShowCaret( hwnd );
1324 INT WINAPI NtUserShowCursor( BOOL show )
1326 if (!unix_funcs) return 0;
1327 return unix_funcs->pNtUserShowCursor( show );
1330 BOOL WINAPI NtUserShowWindowAsync( HWND hwnd, INT cmd )
1332 if (!unix_funcs) return FALSE;
1333 return unix_funcs->pNtUserShowWindowAsync( hwnd, cmd );
1336 BOOL WINAPI NtUserShowWindow( HWND hwnd, INT cmd )
1338 if (!unix_funcs) return FALSE;
1339 return unix_funcs->pNtUserShowWindow( hwnd, cmd );
1342 BOOL WINAPI NtUserSystemParametersInfo( UINT action, UINT val, PVOID ptr, UINT winini )
1344 if (!unix_funcs) return FALSE;
1345 return unix_funcs->pNtUserSystemParametersInfo( action, val, ptr, winini );
1348 BOOL WINAPI NtUserSystemParametersInfoForDpi( UINT action, UINT val, PVOID ptr, UINT winini, UINT dpi )
1350 if (!unix_funcs) return FALSE;
1351 return unix_funcs->pNtUserSystemParametersInfoForDpi( action, val, ptr, winini, dpi );
1354 INT WINAPI NtUserToUnicodeEx( UINT virt, UINT scan, const BYTE *state,
1355 WCHAR *str, int size, UINT flags, HKL layout )
1357 if (!unix_funcs) return 0;
1358 return unix_funcs->pNtUserToUnicodeEx( virt, scan, state, str, size, flags, layout );
1361 BOOL WINAPI NtUserTrackMouseEvent( TRACKMOUSEEVENT *info )
1363 if (!unix_funcs) return FALSE;
1364 return unix_funcs->pNtUserTrackMouseEvent( info );
1367 BOOL WINAPI NtUserTrackPopupMenuEx( HMENU handle, UINT flags, INT x, INT y, HWND hwnd,
1368 TPMPARAMS *params )
1370 if (!unix_funcs) return FALSE;
1371 return unix_funcs->pNtUserTrackPopupMenuEx( handle, flags, x, y, hwnd, params );
1374 INT WINAPI NtUserTranslateAccelerator( HWND hwnd, HACCEL accel, MSG *msg )
1376 if (!unix_funcs) return 0;
1377 return unix_funcs->pNtUserTranslateAccelerator( hwnd, accel, msg );
1380 BOOL WINAPI NtUserTranslateMessage( const MSG *msg, UINT flags )
1382 if (!unix_funcs) return 0;
1383 return unix_funcs->pNtUserTranslateMessage( msg, flags );
1386 BOOL WINAPI NtUserUnregisterClass( UNICODE_STRING *name, HINSTANCE instance,
1387 struct client_menu_name *client_menu_name )
1389 if (!unix_funcs) return FALSE;
1390 return unix_funcs->pNtUserUnregisterClass( name, instance, client_menu_name );
1393 BOOL WINAPI NtUserUnregisterHotKey( HWND hwnd, INT id )
1395 if (!unix_funcs) return FALSE;
1396 return unix_funcs->pNtUserUnregisterHotKey( hwnd, id );
1399 BOOL WINAPI NtUserUpdateLayeredWindow( HWND hwnd, HDC hdc_dst, const POINT *pts_dst, const SIZE *size,
1400 HDC hdc_src, const POINT *pts_src, COLORREF key,
1401 const BLENDFUNCTION *blend, DWORD flags, const RECT *dirty )
1403 if (!unix_funcs) return FALSE;
1404 return unix_funcs->pNtUserUpdateLayeredWindow( hwnd, hdc_dst, pts_dst, size, hdc_src, pts_src,
1405 key, blend, flags, dirty );
1408 WORD WINAPI NtUserVkKeyScanEx( WCHAR chr, HKL layout )
1410 if (!unix_funcs) return 0;
1411 return unix_funcs->pNtUserVkKeyScanEx( chr, layout );
1414 DWORD WINAPI NtUserWaitForInputIdle( HANDLE process, DWORD timeout, BOOL wow )
1416 if (!unix_funcs) return 0;
1417 return unix_funcs->pNtUserWaitForInputIdle( process, timeout, wow );
1420 HWND WINAPI NtUserWindowFromPoint( LONG x, LONG y )
1422 if (!unix_funcs) return 0;
1423 return unix_funcs->pNtUserWindowFromPoint( x, y );
1426 INT WINAPI SetDIBits( HDC hdc, HBITMAP hbitmap, UINT startscan,
1427 UINT lines, const void *bits, const BITMAPINFO *info,
1428 UINT coloruse )
1430 if (!unix_funcs) return 0;
1431 return unix_funcs->pSetDIBits( hdc, hbitmap, startscan, lines, bits, info, coloruse );
1434 BOOL CDECL __wine_get_icm_profile( HDC hdc, BOOL allow_default, DWORD *size, WCHAR *filename )
1436 if (!unix_funcs) return FALSE;
1437 return unix_funcs->get_icm_profile( hdc, allow_default, size, filename );
1440 BOOL CDECL __wine_get_brush_bitmap_info( HBRUSH handle, BITMAPINFO *info, void *bits, UINT *usage )
1442 if (!unix_funcs) return FALSE;
1443 return unix_funcs->get_brush_bitmap_info( handle, info, bits, usage );
1446 BOOL CDECL __wine_get_file_outline_text_metric( const WCHAR *path, OUTLINETEXTMETRICW *otm )
1448 if (!unix_funcs) return FALSE;
1449 return unix_funcs->get_file_outline_text_metric( path, otm );
1452 const struct vulkan_funcs * CDECL __wine_get_vulkan_driver(UINT version)
1454 if (!unix_funcs) return NULL;
1455 return unix_funcs->get_vulkan_driver( version );
1458 struct opengl_funcs * CDECL __wine_get_wgl_driver( HDC hdc, UINT version )
1460 if (!unix_funcs) return NULL;
1461 return unix_funcs->get_wgl_driver( hdc, version );
1464 BOOL CDECL __wine_send_input( HWND hwnd, const INPUT *input, const RAWINPUT *rawinput )
1466 if (!unix_funcs) return FALSE;
1467 return unix_funcs->wine_send_input( hwnd, input, rawinput );
1470 extern void wrappers_init( unixlib_handle_t handle )
1472 const void *args;
1473 if (!__wine_unix_call( handle, 1, &args )) unix_funcs = args;