With printer driver converted, we may use syscall interface for remaining functions.
From: Jacek Caban jacek@codeweavers.com
--- dlls/win32u/gdiobj.c | 1 - dlls/win32u/syscall.c | 1 + dlls/win32u/win32u.spec | 2 +- dlls/win32u/win32u_private.h | 3 --- dlls/win32u/wrappers.c | 9 --------- dlls/wow64win/gdi.c | 18 ++++++++++++++++++ dlls/wow64win/syscall.h | 1 + 7 files changed, 21 insertions(+), 14 deletions(-)
diff --git a/dlls/win32u/gdiobj.c b/dlls/win32u/gdiobj.c index f88efbaa679..2088ba3218b 100644 --- a/dlls/win32u/gdiobj.c +++ b/dlls/win32u/gdiobj.c @@ -1101,7 +1101,6 @@ static struct unix_funcs unix_funcs = NtGdiModifyWorldTransform, NtGdiMoveTo, NtGdiOffsetClipRgn, - NtGdiOpenDCW, NtGdiPatBlt, NtGdiPlgBlt, NtGdiPolyDraw, diff --git a/dlls/win32u/syscall.c b/dlls/win32u/syscall.c index 80c108ab41b..38bb4b6dfbd 100644 --- a/dlls/win32u/syscall.c +++ b/dlls/win32u/syscall.c @@ -83,6 +83,7 @@ static void * const syscalls[] = NtGdiHfontCreate, NtGdiInitSpool, NtGdiOffsetRgn, + NtGdiOpenDCW, NtGdiPathToRegion, NtGdiPtInRegion, NtGdiRectInRegion, diff --git a/dlls/win32u/win32u.spec b/dlls/win32u/win32u.spec index 2831b20ece9..b8fdd16b5ff 100644 --- a/dlls/win32u/win32u.spec +++ b/dlls/win32u/win32u.spec @@ -547,7 +547,7 @@ @ stdcall NtGdiMoveTo(long long long ptr) @ stdcall NtGdiOffsetClipRgn(long long long) @ stdcall -syscall NtGdiOffsetRgn(long long long) -@ stdcall NtGdiOpenDCW(ptr ptr ptr long long ptr ptr ptr) +@ stdcall -syscall NtGdiOpenDCW(ptr ptr ptr long long ptr ptr ptr) @ stub NtGdiPATHOBJ_bEnum @ stub NtGdiPATHOBJ_bEnumClipLines @ stub NtGdiPATHOBJ_vEnumStart diff --git a/dlls/win32u/win32u_private.h b/dlls/win32u/win32u_private.h index fe5143d7903..4bafc9bfaaf 100644 --- a/dlls/win32u/win32u_private.h +++ b/dlls/win32u/win32u_private.h @@ -130,9 +130,6 @@ struct unix_funcs BOOL (WINAPI *pNtGdiModifyWorldTransform)( HDC hdc, const XFORM *xform, DWORD mode ); BOOL (WINAPI *pNtGdiMoveTo)( HDC hdc, INT x, INT y, POINT *pt ); INT (WINAPI *pNtGdiOffsetClipRgn)( HDC hdc, INT x, INT y ); - HDC (WINAPI *pNtGdiOpenDCW)( UNICODE_STRING *device, const DEVMODEW *devmode, - UNICODE_STRING *output, ULONG type, BOOL is_display, - HANDLE hspool, DRIVER_INFO_2W *driver_info, void *pdev ); BOOL (WINAPI *pNtGdiPatBlt)( HDC hdc, INT left, INT top, INT width, INT height, DWORD rop ); BOOL (WINAPI *pNtGdiPlgBlt)( HDC hdc, const POINT *point, HDC hdc_src, INT x_src, INT y_src, INT width, INT height, HBITMAP mask, INT x_mask, INT y_mask, diff --git a/dlls/win32u/wrappers.c b/dlls/win32u/wrappers.c index 4e23f325aec..e24f7883fa3 100644 --- a/dlls/win32u/wrappers.c +++ b/dlls/win32u/wrappers.c @@ -426,15 +426,6 @@ INT WINAPI NtGdiOffsetClipRgn( HDC hdc, INT x, INT y ) return unix_funcs->pNtGdiOffsetClipRgn( hdc, x, y ); }
-HDC WINAPI NtGdiOpenDCW( UNICODE_STRING *device, const DEVMODEW *devmode, - UNICODE_STRING *output, ULONG type, BOOL is_display, - HANDLE hspool, DRIVER_INFO_2W *driver_info, void *pdev ) -{ - if (!unix_funcs) return 0; - return unix_funcs->pNtGdiOpenDCW( device, devmode, output, type, is_display, - hspool, driver_info, pdev ); -} - BOOL WINAPI NtGdiPatBlt( HDC hdc, INT left, INT top, INT width, INT height, DWORD rop ) { if (!unix_funcs) return FALSE; diff --git a/dlls/wow64win/gdi.c b/dlls/wow64win/gdi.c index 6fa36b5f3a3..abb15da1884 100644 --- a/dlls/wow64win/gdi.c +++ b/dlls/wow64win/gdi.c @@ -623,6 +623,24 @@ NTSTATUS WINAPI wow64_NtGdiOffsetRgn( UINT *args ) return NtGdiOffsetRgn( hrgn, x, y ); }
+NTSTATUS WINAPI wow64_NtGdiOpenDCW( UINT *args ) +{ + UNICODE_STRING32 *device32 = get_ptr( &args ); + const DEVMODEW *devmode = get_ptr( &args ); + UNICODE_STRING32 *output32 = get_ptr( &args ); + ULONG type = get_ulong( &args ); + BOOL is_display = get_ulong( &args ); + HANDLE hspool = get_handle( &args ); + DRIVER_INFO_2W *driver_info = get_ptr( &args ); + void *pdev = get_ptr( &args ); + + UNICODE_STRING device, output; + HDC ret = NtGdiOpenDCW( unicode_str_32to64( &device, device32 ), devmode, + unicode_str_32to64( &output, output32 ), type, + is_display, hspool, driver_info, pdev ); + return HandleToUlong( ret ); +} + NTSTATUS WINAPI wow64_NtGdiPathToRegion( UINT *args ) { HDC hdc = get_handle( &args ); diff --git a/dlls/wow64win/syscall.h b/dlls/wow64win/syscall.h index b2d4b041779..96c238329b6 100644 --- a/dlls/wow64win/syscall.h +++ b/dlls/wow64win/syscall.h @@ -69,6 +69,7 @@ SYSCALL_ENTRY( NtGdiHfontCreate ) \ SYSCALL_ENTRY( NtGdiInitSpool ) \ SYSCALL_ENTRY( NtGdiOffsetRgn ) \ + SYSCALL_ENTRY( NtGdiOpenDCW ) \ SYSCALL_ENTRY( NtGdiPathToRegion ) \ SYSCALL_ENTRY( NtGdiPtInRegion ) \ SYSCALL_ENTRY( NtGdiRectInRegion ) \
From: Jacek Caban jacek@codeweavers.com
--- dlls/win32u/gdiobj.c | 8 ---- dlls/win32u/syscall.c | 8 ++++ dlls/win32u/win32u.spec | 16 +++---- dlls/win32u/win32u_private.h | 10 ---- dlls/win32u/wrappers.c | 50 -------------------- dlls/wow64win/gdi.c | 89 ++++++++++++++++++++++++++++++++++++ dlls/wow64win/syscall.h | 8 ++++ 7 files changed, 113 insertions(+), 76 deletions(-)
diff --git a/dlls/win32u/gdiobj.c b/dlls/win32u/gdiobj.c index 2088ba3218b..4db5bd98f86 100644 --- a/dlls/win32u/gdiobj.c +++ b/dlls/win32u/gdiobj.c @@ -1034,7 +1034,6 @@ static struct unix_funcs unix_funcs = NtGdiAbortPath, NtGdiAlphaBlend, NtGdiAngleArc, - NtGdiArcInternal, NtGdiBeginPath, NtGdiBitBlt, NtGdiCloseFigure, @@ -1055,7 +1054,6 @@ static struct unix_funcs unix_funcs = NtGdiDdDDISetVidPnSourceOwner, NtGdiDeleteObjectApp, NtGdiDoPalette, - NtGdiEllipse, NtGdiEndDoc, NtGdiEndPath, NtGdiEndPage, @@ -1085,7 +1083,6 @@ static struct unix_funcs unix_funcs = NtGdiGetKerningPairs, NtGdiGetNearestColor, NtGdiGetOutlineTextMetricsInternalW, - NtGdiGetPixel, NtGdiGetRandomRgn, NtGdiGetRasterizerCaps, NtGdiGetRealizationInfo, @@ -1096,10 +1093,8 @@ static struct unix_funcs unix_funcs = NtGdiGradientFill, NtGdiIntersectClipRect, NtGdiInvertRgn, - NtGdiLineTo, NtGdiMaskBlt, NtGdiModifyWorldTransform, - NtGdiMoveTo, NtGdiOffsetClipRgn, NtGdiPatBlt, NtGdiPlgBlt, @@ -1107,11 +1102,9 @@ static struct unix_funcs unix_funcs = NtGdiPolyPolyDraw, NtGdiPtVisible, NtGdiRectVisible, - NtGdiRectangle, NtGdiResetDC, NtGdiResizePalette, NtGdiRestoreDC, - NtGdiRoundRect, NtGdiScaleViewportExtEx, NtGdiScaleWindowExtEx, NtGdiSelectBitmap, @@ -1123,7 +1116,6 @@ static struct unix_funcs unix_funcs = NtGdiSetDIBitsToDeviceInternal, NtGdiSetDeviceGammaRamp, NtGdiSetLayout, - NtGdiSetPixel, NtGdiSetSystemPaletteUse, NtGdiStartDoc, NtGdiStartPage, diff --git a/dlls/win32u/syscall.c b/dlls/win32u/syscall.c index 38bb4b6dfbd..d0b83c2352d 100644 --- a/dlls/win32u/syscall.c +++ b/dlls/win32u/syscall.c @@ -38,6 +38,7 @@ static void * const syscalls[] = { NtGdiAddFontMemResourceEx, NtGdiAddFontResourceW, + NtGdiArcInternal, NtGdiCombineRgn, NtGdiCreateBitmap, NtGdiCreateClientObj, @@ -59,6 +60,7 @@ static void * const syscalls[] = NtGdiDeleteClientObj, NtGdiDescribePixelFormat, NtGdiDrawStream, + NtGdiEllipse, NtGdiEqualRgn, NtGdiExtCreatePen, NtGdiExtCreateRegion, @@ -75,6 +77,7 @@ static void * const syscalls[] = NtGdiGetFontFileInfo, NtGdiGetNearestPaletteIndex, NtGdiGetPath, + NtGdiGetPixel, NtGdiGetRegionData, NtGdiGetRgnBox, NtGdiGetSpoolMessage, @@ -82,13 +85,17 @@ static void * const syscalls[] = NtGdiGetTransform, NtGdiHfontCreate, NtGdiInitSpool, + NtGdiLineTo, + NtGdiMoveTo, NtGdiOffsetRgn, NtGdiOpenDCW, NtGdiPathToRegion, NtGdiPtInRegion, NtGdiRectInRegion, + NtGdiRectangle, NtGdiRemoveFontMemResourceEx, NtGdiRemoveFontResourceW, + NtGdiRoundRect, NtGdiSaveDC, NtGdiSetBitmapBits, NtGdiSetBitmapDimension, @@ -96,6 +103,7 @@ static void * const syscalls[] = NtGdiSetColorAdjustment, NtGdiSetMagicColors, NtGdiSetMetaRgn, + NtGdiSetPixel, NtGdiSetPixelFormat, NtGdiSetRectRgn, NtGdiSetTextJustification, diff --git a/dlls/win32u/win32u.spec b/dlls/win32u/win32u.spec index b8fdd16b5ff..ff675898048 100644 --- a/dlls/win32u/win32u.spec +++ b/dlls/win32u/win32u.spec @@ -115,7 +115,7 @@ @ stdcall NtGdiAlphaBlend(long long long long long long long long long long long ptr) @ stdcall NtGdiAngleArc(long long long long long long) @ stub NtGdiAnyLinkedFonts -@ stdcall NtGdiArcInternal(long long long long long long long long long long) +@ stdcall -syscall NtGdiArcInternal(long long long long long long long long long long) @ stub NtGdiBRUSHOBJ_DeleteRbrush @ stub NtGdiBRUSHOBJ_hGetColorTransform @ stub NtGdiBRUSHOBJ_pvAllocRbrush @@ -376,7 +376,7 @@ @ stub NtGdiDrawEscape @ stdcall -syscall NtGdiDrawStream(long long ptr) @ stub NtGdiDwmCreatedBitmapRemotingOutput -@ stdcall NtGdiEllipse(long long long long long) +@ stdcall -syscall NtGdiEllipse(long long long long long) @ stub NtGdiEnableEudc @ stdcall NtGdiEndDoc(long) @ stub NtGdiEndGdiRendering @@ -501,7 +501,7 @@ @ stub NtGdiGetPerBandInfo @ stub NtGdiGetPhysicalMonitorDescription @ stub NtGdiGetPhysicalMonitors -@ stdcall NtGdiGetPixel(long long long) +@ stdcall -syscall NtGdiGetPixel(long long long) @ stub NtGdiGetProcessSessionFonts @ stub NtGdiGetPublicFontTableChangeCookie @ stdcall NtGdiGetRandomRgn(long long long) @@ -535,7 +535,7 @@ @ stdcall -syscall NtGdiInitSpool() @ stdcall NtGdiIntersectClipRect(long long long long long) @ stdcall NtGdiInvertRgn(long long) -@ stdcall NtGdiLineTo(long long long) +@ stdcall -syscall NtGdiLineTo(long long long) @ stub NtGdiMakeFontDir @ stub NtGdiMakeInfoDC @ stub NtGdiMakeObjectUnXferable @@ -544,7 +544,7 @@ @ stub NtGdiMirrorWindowOrg @ stdcall NtGdiModifyWorldTransform(long ptr long) @ stub NtGdiMonoBitmap -@ stdcall NtGdiMoveTo(long long long ptr) +@ stdcall -syscall NtGdiMoveTo(long long long ptr) @ stdcall NtGdiOffsetClipRgn(long long long) @ stdcall -syscall NtGdiOffsetRgn(long long long) @ stdcall -syscall NtGdiOpenDCW(ptr ptr ptr long long ptr ptr ptr) @@ -566,14 +566,14 @@ @ stub NtGdiQueryFonts @ stdcall -syscall NtGdiRectInRegion(long ptr) @ stdcall NtGdiRectVisible(long ptr) -@ stdcall NtGdiRectangle(long long long long long) +@ stdcall -syscall NtGdiRectangle(long long long long long) @ stdcall -syscall NtGdiRemoveFontMemResourceEx(long) @ stdcall -syscall NtGdiRemoveFontResourceW(wstr long long long long ptr) @ stub NtGdiRemoveMergeFont @ stdcall NtGdiResetDC(long ptr ptr ptr ptr) @ stdcall NtGdiResizePalette(long long) @ stdcall NtGdiRestoreDC(long long) -@ stdcall NtGdiRoundRect(long long long long long long long) +@ stdcall -syscall NtGdiRoundRect(long long long long long long long) @ stub NtGdiSTROBJ_bEnum @ stub NtGdiSTROBJ_bEnumPositionsOnly @ stub NtGdiSTROBJ_bGetAdvanceWidths @@ -609,7 +609,7 @@ @ stub NtGdiSetMiterLimit @ stub NtGdiSetOPMSigningKeyAndSequenceNumbers @ stub NtGdiSetPUMPDOBJ -@ stdcall NtGdiSetPixel(long long long long) +@ stdcall -syscall NtGdiSetPixel(long long long long) @ stdcall -syscall NtGdiSetPixelFormat(long long) @ stub NtGdiSetPrivateDeviceGammaRamp @ stdcall -syscall NtGdiSetRectRgn(long long long long long) diff --git a/dlls/win32u/win32u_private.h b/dlls/win32u/win32u_private.h index 4bafc9bfaaf..5db0d294925 100644 --- a/dlls/win32u/win32u_private.h +++ b/dlls/win32u/win32u_private.h @@ -42,8 +42,6 @@ struct unix_funcs BLENDFUNCTION blend_function, HANDLE xform ); BOOL (WINAPI *pNtGdiAngleArc)( HDC hdc, INT x, INT y, DWORD radius, DWORD start_angle, DWORD sweep_angle ); - BOOL (WINAPI *pNtGdiArcInternal)( UINT type, HDC hdc, INT left, INT top, INT right, INT bottom, - INT xstart, INT ystart, INT xend, INT yend ); BOOL (WINAPI *pNtGdiBeginPath)( HDC hdc ); BOOL (WINAPI *pNtGdiBitBlt)( HDC hdc_dst, INT x_dst, INT y_dst, INT width, INT height, HDC hdc_src, INT x_src, INT y_src, DWORD rop, DWORD bk_color, FLONG fl ); @@ -69,7 +67,6 @@ struct unix_funcs BOOL (WINAPI *pNtGdiDeleteObjectApp)( HGDIOBJ obj ); LONG (WINAPI *pNtGdiDoPalette)( HGDIOBJ handle, WORD start, WORD count, void *entries, DWORD func, BOOL inbound ); - BOOL (WINAPI *pNtGdiEllipse)( HDC hdc, INT left, INT top, INT right, INT bottom ); INT (WINAPI *pNtGdiEndDoc)(HDC hdc); BOOL (WINAPI *pNtGdiEndPath)( HDC hdc ); INT (WINAPI *pNtGdiEndPage)( HDC hdc ); @@ -110,7 +107,6 @@ struct unix_funcs COLORREF (WINAPI *pNtGdiGetNearestColor)( HDC hdc, COLORREF color ); UINT (WINAPI *pNtGdiGetOutlineTextMetricsInternalW)( HDC hdc, UINT cbData, OUTLINETEXTMETRICW *otm, ULONG opts ); - COLORREF (WINAPI *pNtGdiGetPixel)( HDC hdc, INT x, INT y ); INT (WINAPI *pNtGdiGetRandomRgn)( HDC hdc, HRGN region, INT code ); BOOL (WINAPI *pNtGdiGetRasterizerCaps)( RASTERIZER_STATUS *status, UINT size ); BOOL (WINAPI *pNtGdiGetRealizationInfo)( HDC hdc, struct font_realization_info *info ); @@ -123,12 +119,10 @@ struct unix_funcs void *grad_array, ULONG ngrad, ULONG mode ); INT (WINAPI *pNtGdiIntersectClipRect)( HDC hdc, INT left, INT top, INT right, INT bottom ); BOOL (WINAPI *pNtGdiInvertRgn)( HDC hdc, HRGN hrgn ); - BOOL (WINAPI *pNtGdiLineTo)( HDC hdc, INT x, INT y ); BOOL (WINAPI *pNtGdiMaskBlt)( HDC hdc, INT x_dst, INT y_dst, INT width_dst, INT height_dst, HDC hdc_src, INT x_src, INT y_src, HBITMAP mask, INT x_mask, INT y_mask, DWORD rop, DWORD bk_color ); BOOL (WINAPI *pNtGdiModifyWorldTransform)( HDC hdc, const XFORM *xform, DWORD mode ); - BOOL (WINAPI *pNtGdiMoveTo)( HDC hdc, INT x, INT y, POINT *pt ); INT (WINAPI *pNtGdiOffsetClipRgn)( HDC hdc, INT x, INT y ); BOOL (WINAPI *pNtGdiPatBlt)( HDC hdc, INT left, INT top, INT width, INT height, DWORD rop ); BOOL (WINAPI *pNtGdiPlgBlt)( HDC hdc, const POINT *point, HDC hdc_src, INT x_src, INT y_src, @@ -139,13 +133,10 @@ struct unix_funcs DWORD count, UINT function ); BOOL (WINAPI *pNtGdiPtVisible)( HDC hdc, INT x, INT y ); BOOL (WINAPI *pNtGdiRectVisible)( HDC hdc, const RECT *rect ); - BOOL (WINAPI *pNtGdiRectangle)( HDC hdc, INT left, INT top, INT right, INT bottom ); BOOL (WINAPI *pNtGdiResetDC)( HDC hdc, const DEVMODEW *devmode, BOOL *banding, DRIVER_INFO_2W *driver_info, void *dev ); BOOL (WINAPI *pNtGdiResizePalette)( HPALETTE palette, UINT count ); BOOL (WINAPI *pNtGdiRestoreDC)( HDC hdc, INT level ); - BOOL (WINAPI *pNtGdiRoundRect)( HDC hdc, INT left, INT top, INT right, - INT bottom, INT ell_width, INT ell_height ); BOOL (WINAPI *pNtGdiScaleViewportExtEx)( HDC hdc, INT x_num, INT x_denom, INT y_num, INT y_denom, SIZE *size ); BOOL (WINAPI *pNtGdiScaleWindowExtEx)( HDC hdc, INT x_num, INT x_denom, @@ -163,7 +154,6 @@ struct unix_funcs BOOL xform_coords, HANDLE xform ); BOOL (WINAPI *pNtGdiSetDeviceGammaRamp)( HDC hdc, void *ptr ); DWORD (WINAPI *pNtGdiSetLayout)( HDC hdc, LONG wox, DWORD layout ); - COLORREF (WINAPI *pNtGdiSetPixel)( HDC hdc, INT x, INT y, COLORREF color ); UINT (WINAPI *pNtGdiSetSystemPaletteUse)( HDC hdc, UINT use ); INT (WINAPI *pNtGdiStartDoc)( HDC hdc, const DOCINFOW *doc, BOOL *banding, INT job ); INT (WINAPI *pNtGdiStartPage)( HDC hdc ); diff --git a/dlls/win32u/wrappers.c b/dlls/win32u/wrappers.c index e24f7883fa3..3b7d88ccce8 100644 --- a/dlls/win32u/wrappers.c +++ b/dlls/win32u/wrappers.c @@ -51,13 +51,6 @@ BOOL WINAPI NtGdiAngleArc( HDC hdc, INT x, INT y, DWORD radius, DWORD start_angl return unix_funcs->pNtGdiAngleArc( hdc, x, y, radius, start_angle, sweep_angle ); }
-BOOL WINAPI NtGdiArcInternal( UINT type, HDC hdc, INT left, INT top, INT right, INT bottom, - INT xstart, INT ystart, INT xend, INT yend ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtGdiArcInternal( type, hdc, left, top, right, bottom, xstart, ystart, xend, yend ); -} - BOOL WINAPI NtGdiBeginPath( HDC hdc ) { if (!unix_funcs) return FALSE; @@ -125,12 +118,6 @@ LONG WINAPI NtGdiDoPalette( HGDIOBJ handle, WORD start, WORD count, void *entrie return unix_funcs->pNtGdiDoPalette( handle, start, count, entries, func, inbound ); }
-BOOL WINAPI NtGdiEllipse( HDC hdc, INT left, INT top, INT right, INT bottom ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtGdiEllipse( hdc, left, top, right, bottom ); -} - INT WINAPI NtGdiEndDoc( HDC hdc ) { if (!unix_funcs) return SP_ERROR; @@ -325,12 +312,6 @@ UINT WINAPI NtGdiGetOutlineTextMetricsInternalW( HDC hdc, UINT cbData, return unix_funcs->pNtGdiGetOutlineTextMetricsInternalW( hdc, cbData, otm, opts ); }
-COLORREF WINAPI NtGdiGetPixel( HDC hdc, INT x, INT y ) -{ - if (!unix_funcs) return CLR_INVALID; - return unix_funcs->pNtGdiGetPixel( hdc, x, y ); -} - INT WINAPI NtGdiGetRandomRgn( HDC hdc, HRGN region, INT code ) { if (!unix_funcs) return -1; @@ -393,12 +374,6 @@ BOOL WINAPI NtGdiInvertRgn( HDC hdc, HRGN hrgn ) return unix_funcs->pNtGdiInvertRgn( hdc, hrgn ); }
-BOOL WINAPI NtGdiLineTo( HDC hdc, INT x, INT y ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtGdiLineTo( hdc, x, y ); -} - BOOL WINAPI NtGdiMaskBlt( HDC hdc, INT x_dst, INT y_dst, INT width_dst, INT height_dst, HDC hdc_src, INT x_src, INT y_src, HBITMAP mask, INT x_mask, INT y_mask, DWORD rop, DWORD bk_color ) @@ -414,12 +389,6 @@ BOOL WINAPI NtGdiModifyWorldTransform( HDC hdc, const XFORM *xform, DWORD mode ) return unix_funcs->pNtGdiModifyWorldTransform( hdc, xform, mode ); }
-BOOL WINAPI NtGdiMoveTo( HDC hdc, INT x, INT y, POINT *pt ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtGdiMoveTo( hdc, x, y, pt ); -} - INT WINAPI NtGdiOffsetClipRgn( HDC hdc, INT x, INT y ) { if (!unix_funcs) return ERROR; @@ -466,12 +435,6 @@ BOOL WINAPI NtGdiRectVisible( HDC hdc, const RECT *rect ) return unix_funcs->pNtGdiRectVisible( hdc, rect ); }
-BOOL WINAPI NtGdiRectangle( HDC hdc, INT left, INT top, INT right, INT bottom ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtGdiRectangle( hdc, left, top, right, bottom ); -} - BOOL WINAPI NtGdiResetDC( HDC hdc, const DEVMODEW *devmode, BOOL *banding, DRIVER_INFO_2W *driver_info, void *dev ) { @@ -491,13 +454,6 @@ BOOL WINAPI NtGdiRestoreDC( HDC hdc, INT level ) return unix_funcs->pNtGdiRestoreDC( hdc, level ); }
-BOOL WINAPI NtGdiRoundRect( HDC hdc, INT left, INT top, INT right, - INT bottom, INT ell_width, INT ell_height ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtGdiRoundRect( hdc, left, top, right, bottom, ell_width, ell_height ); -} - BOOL WINAPI NtGdiScaleViewportExtEx( HDC hdc, INT x_num, INT x_denom, INT y_num, INT y_denom, SIZE *size ) { @@ -572,12 +528,6 @@ DWORD WINAPI NtGdiSetLayout( HDC hdc, LONG wox, DWORD layout ) return unix_funcs->pNtGdiSetLayout( hdc, wox, layout ); }
-COLORREF WINAPI NtGdiSetPixel( HDC hdc, INT x, INT y, COLORREF color ) -{ - if (!unix_funcs) return CLR_INVALID; - return unix_funcs->pNtGdiSetPixel( hdc, x, y, color ); -} - UINT WINAPI NtGdiSetSystemPaletteUse( HDC hdc, UINT use ) { if (!unix_funcs) return SYSPAL_ERROR; diff --git a/dlls/wow64win/gdi.c b/dlls/wow64win/gdi.c index abb15da1884..78bb57a7ef9 100644 --- a/dlls/wow64win/gdi.c +++ b/dlls/wow64win/gdi.c @@ -79,6 +79,22 @@ NTSTATUS WINAPI wow64_NtGdiAddFontResourceW( UINT *args ) return NtGdiAddFontResourceW( str, size, files, flags, tid, dv ); }
+NTSTATUS WINAPI wow64_NtGdiArcInternal( UINT *args ) +{ + UINT type = get_ulong( &args ); + HDC hdc = get_handle( &args ); + INT left = get_ulong( &args ); + INT top = get_ulong( &args ); + INT right = get_ulong( &args ); + INT bottom = get_ulong( &args ); + INT xstart = get_ulong( &args ); + INT ystart = get_ulong( &args ); + INT xend = get_ulong( &args ); + INT yend = get_ulong( &args ); + + return NtGdiArcInternal( type, hdc, left, top, right, bottom, xstart, ystart, xend, yend ); +} + NTSTATUS WINAPI wow64_NtGdiCombineRgn( UINT *args ) { HRGN dest = get_handle( &args ); @@ -318,6 +334,17 @@ NTSTATUS WINAPI wow64_NtGdiDrawStream( UINT *args ) return NtGdiDrawStream( hdc, in, pvin ); }
+NTSTATUS WINAPI wow64_NtGdiEllipse( UINT *args ) +{ + HDC hdc = get_handle( &args ); + INT left = get_ulong( &args ); + INT top = get_ulong( &args ); + INT right = get_ulong( &args ); + INT bottom = get_ulong( &args ); + + return NtGdiEllipse( hdc, left, top, right, bottom ); +} + NTSTATUS WINAPI wow64_NtGdiEqualRgn( UINT *args ) { HRGN hrgn1 = get_handle( &args ); @@ -555,6 +582,45 @@ NTSTATUS WINAPI wow64_NtGdiGetPath( UINT *args ) return NtGdiGetPath( hdc, points, types, size ); }
+NTSTATUS WINAPI wow64_NtGdiGetPixel( UINT *args ) +{ + HDC hdc = get_handle( &args ); + INT x = get_ulong( &args ); + INT y = get_ulong( &args ); + + return NtGdiGetPixel( hdc, x, y ); +} + +NTSTATUS WINAPI wow64_NtGdiLineTo( UINT *args ) +{ + HDC hdc = get_handle( &args ); + INT x = get_ulong( &args ); + INT y = get_ulong( &args ); + + return NtGdiLineTo( hdc, x, y ); +} + +NTSTATUS WINAPI wow64_NtGdiMoveTo( UINT *args ) +{ + HDC hdc = get_handle( &args ); + INT x = get_ulong( &args ); + INT y = get_ulong( &args ); + POINT *pt = get_ptr( &args ); + + return NtGdiMoveTo( hdc, x, y, pt ); +} + +NTSTATUS WINAPI wow64_NtGdiRectangle( UINT *args ) +{ + HDC hdc = get_handle( &args ); + INT left = get_ulong( &args ); + INT top = get_ulong( &args ); + INT right = get_ulong( &args ); + INT bottom = get_ulong( &args ); + + return NtGdiRectangle( hdc, left, top, right, bottom ); +} + NTSTATUS WINAPI wow64_NtGdiGetRegionData( UINT *args ) { HRGN hrgn = get_ptr( &args ); @@ -572,6 +638,19 @@ NTSTATUS WINAPI wow64_NtGdiGetRgnBox( UINT *args ) return NtGdiGetRgnBox( hrgn, rect ); }
+NTSTATUS WINAPI wow64_NtGdiRoundRect( UINT *args ) +{ + HDC hdc = get_handle( &args ); + INT left = get_ulong( &args ); + INT top = get_ulong( &args ); + INT right = get_ulong( &args ); + INT bottom = get_ulong( &args ); + INT ell_width = get_ulong( &args ); + INT ell_height = get_ulong( &args ); + + return NtGdiRoundRect( hdc, left, top, right, bottom, ell_width, ell_height ); +} + NTSTATUS WINAPI wow64_NtGdiGetSpoolMessage( UINT *args ) { void *ptr1 = get_ptr( &args ); @@ -744,6 +823,16 @@ NTSTATUS WINAPI wow64_NtGdiSetMetaRgn( UINT *args ) return NtGdiSetMetaRgn( hdc ); }
+NTSTATUS WINAPI wow64_NtGdiSetPixel( UINT *args ) +{ + HDC hdc = get_handle( &args ); + INT x = get_ulong( &args ); + INT y = get_ulong( &args ); + COLORREF color = get_ulong( &args ); + + return NtGdiSetPixel( hdc, x, y, color ); +} + NTSTATUS WINAPI wow64_NtGdiSetPixelFormat( UINT *args ) { HDC hdc = get_handle( &args ); diff --git a/dlls/wow64win/syscall.h b/dlls/wow64win/syscall.h index 96c238329b6..9d764ed5ca6 100644 --- a/dlls/wow64win/syscall.h +++ b/dlls/wow64win/syscall.h @@ -24,6 +24,7 @@ #define ALL_WIN32_SYSCALLS \ SYSCALL_ENTRY( NtGdiAddFontMemResourceEx ) \ SYSCALL_ENTRY( NtGdiAddFontResourceW ) \ + SYSCALL_ENTRY( NtGdiArcInternal ) \ SYSCALL_ENTRY( NtGdiCombineRgn ) \ SYSCALL_ENTRY( NtGdiCreateBitmap ) \ SYSCALL_ENTRY( NtGdiCreateClientObj ) \ @@ -45,6 +46,7 @@ SYSCALL_ENTRY( NtGdiDeleteClientObj ) \ SYSCALL_ENTRY( NtGdiDescribePixelFormat ) \ SYSCALL_ENTRY( NtGdiDrawStream ) \ + SYSCALL_ENTRY( NtGdiEllipse ) \ SYSCALL_ENTRY( NtGdiEqualRgn ) \ SYSCALL_ENTRY( NtGdiExtCreatePen ) \ SYSCALL_ENTRY( NtGdiExtCreateRegion ) \ @@ -61,6 +63,7 @@ SYSCALL_ENTRY( NtGdiGetFontFileInfo ) \ SYSCALL_ENTRY( NtGdiGetNearestPaletteIndex ) \ SYSCALL_ENTRY( NtGdiGetPath ) \ + SYSCALL_ENTRY( NtGdiGetPixel ) \ SYSCALL_ENTRY( NtGdiGetRegionData ) \ SYSCALL_ENTRY( NtGdiGetRgnBox ) \ SYSCALL_ENTRY( NtGdiGetSpoolMessage ) \ @@ -68,13 +71,17 @@ SYSCALL_ENTRY( NtGdiGetTransform ) \ SYSCALL_ENTRY( NtGdiHfontCreate ) \ SYSCALL_ENTRY( NtGdiInitSpool ) \ + SYSCALL_ENTRY( NtGdiLineTo ) \ + SYSCALL_ENTRY( NtGdiMoveTo ) \ SYSCALL_ENTRY( NtGdiOffsetRgn ) \ SYSCALL_ENTRY( NtGdiOpenDCW ) \ SYSCALL_ENTRY( NtGdiPathToRegion ) \ SYSCALL_ENTRY( NtGdiPtInRegion ) \ SYSCALL_ENTRY( NtGdiRectInRegion ) \ + SYSCALL_ENTRY( NtGdiRectangle ) \ SYSCALL_ENTRY( NtGdiRemoveFontMemResourceEx ) \ SYSCALL_ENTRY( NtGdiRemoveFontResourceW ) \ + SYSCALL_ENTRY( NtGdiRoundRect ) \ SYSCALL_ENTRY( NtGdiSaveDC ) \ SYSCALL_ENTRY( NtGdiSetBitmapBits ) \ SYSCALL_ENTRY( NtGdiSetBitmapDimension ) \ @@ -82,6 +89,7 @@ SYSCALL_ENTRY( NtGdiSetColorAdjustment ) \ SYSCALL_ENTRY( NtGdiSetMagicColors ) \ SYSCALL_ENTRY( NtGdiSetMetaRgn ) \ + SYSCALL_ENTRY( NtGdiSetPixel ) \ SYSCALL_ENTRY( NtGdiSetPixelFormat ) \ SYSCALL_ENTRY( NtGdiSetRectRgn ) \ SYSCALL_ENTRY( NtGdiSetTextJustification ) \
From: Jacek Caban jacek@codeweavers.com
--- dlls/win32u/gdiobj.c | 8 ---- dlls/win32u/syscall.c | 8 ++++ dlls/win32u/win32u.spec | 16 +++---- dlls/win32u/win32u_private.h | 11 ----- dlls/win32u/wrappers.c | 50 --------------------- dlls/wow64win/gdi.c | 84 ++++++++++++++++++++++++++++++++++++ dlls/wow64win/syscall.h | 8 ++++ 7 files changed, 108 insertions(+), 77 deletions(-)
diff --git a/dlls/win32u/gdiobj.c b/dlls/win32u/gdiobj.c index 4db5bd98f86..d15e5367f15 100644 --- a/dlls/win32u/gdiobj.c +++ b/dlls/win32u/gdiobj.c @@ -1033,7 +1033,6 @@ static struct unix_funcs unix_funcs = NtGdiAbortDoc, NtGdiAbortPath, NtGdiAlphaBlend, - NtGdiAngleArc, NtGdiBeginPath, NtGdiBitBlt, NtGdiCloseFigure, @@ -1060,13 +1059,10 @@ static struct unix_funcs unix_funcs = NtGdiEnumFonts, NtGdiExcludeClipRect, NtGdiExtEscape, - NtGdiExtFloodFill, NtGdiExtTextOutW, NtGdiExtSelectClipRgn, NtGdiFillPath, - NtGdiFillRgn, NtGdiFontIsLinked, - NtGdiFrameRgn, NtGdiGetAndSetDCDword, NtGdiGetAppClipBox, NtGdiGetBoundsRect, @@ -1090,16 +1086,12 @@ static struct unix_funcs unix_funcs = NtGdiGetTextExtentExW, NtGdiGetTextFaceW, NtGdiGetTextMetricsW, - NtGdiGradientFill, NtGdiIntersectClipRect, - NtGdiInvertRgn, NtGdiMaskBlt, NtGdiModifyWorldTransform, NtGdiOffsetClipRgn, NtGdiPatBlt, NtGdiPlgBlt, - NtGdiPolyDraw, - NtGdiPolyPolyDraw, NtGdiPtVisible, NtGdiRectVisible, NtGdiResetDC, diff --git a/dlls/win32u/syscall.c b/dlls/win32u/syscall.c index d0b83c2352d..a7ee8762abb 100644 --- a/dlls/win32u/syscall.c +++ b/dlls/win32u/syscall.c @@ -38,6 +38,7 @@ static void * const syscalls[] = { NtGdiAddFontMemResourceEx, NtGdiAddFontResourceW, + NtGdiAngleArc, NtGdiArcInternal, NtGdiCombineRgn, NtGdiCreateBitmap, @@ -64,9 +65,12 @@ static void * const syscalls[] = NtGdiEqualRgn, NtGdiExtCreatePen, NtGdiExtCreateRegion, + NtGdiExtFloodFill, NtGdiExtGetObjectW, + NtGdiFillRgn, NtGdiFlattenPath, NtGdiFlush, + NtGdiFrameRgn, NtGdiGetBitmapBits, NtGdiGetBitmapDimension, NtGdiGetColorAdjustment, @@ -83,13 +87,17 @@ static void * const syscalls[] = NtGdiGetSpoolMessage, NtGdiGetSystemPaletteUse, NtGdiGetTransform, + NtGdiGradientFill, NtGdiHfontCreate, NtGdiInitSpool, + NtGdiInvertRgn, NtGdiLineTo, NtGdiMoveTo, NtGdiOffsetRgn, NtGdiOpenDCW, NtGdiPathToRegion, + NtGdiPolyDraw, + NtGdiPolyPolyDraw, NtGdiPtInRegion, NtGdiRectInRegion, NtGdiRectangle, diff --git a/dlls/win32u/win32u.spec b/dlls/win32u/win32u.spec index ff675898048..39f18d6d36c 100644 --- a/dlls/win32u/win32u.spec +++ b/dlls/win32u/win32u.spec @@ -113,7 +113,7 @@ @ stub NtGdiAddRemoteFontToDC @ stub NtGdiAddRemoteMMInstanceToDC @ stdcall NtGdiAlphaBlend(long long long long long long long long long long long ptr) -@ stdcall NtGdiAngleArc(long long long long long long) +@ stdcall -syscall NtGdiAngleArc(long long long long long long) @ stub NtGdiAnyLinkedFonts @ stdcall -syscall NtGdiArcInternal(long long long long long long long long long long) @ stub NtGdiBRUSHOBJ_DeleteRbrush @@ -421,7 +421,7 @@ @ stdcall -syscall NtGdiExtCreatePen(long long long long long long long ptr long long long) @ stdcall -syscall NtGdiExtCreateRegion(ptr long ptr) @ stdcall NtGdiExtEscape(long wstr long long long ptr long ptr) -@ stdcall NtGdiExtFloodFill(long long long long long) +@ stdcall -syscall NtGdiExtFloodFill(long long long long long) @ stdcall -syscall NtGdiExtGetObjectW(long long ptr) @ stdcall NtGdiExtSelectClipRgn(long long long) @ stdcall NtGdiExtTextOutW(long long long long ptr ptr long ptr long) @@ -434,12 +434,12 @@ @ stub NtGdiFONTOBJ_pxoGetXform @ stub NtGdiFONTOBJ_vGetInfo @ stdcall NtGdiFillPath(long) -@ stdcall NtGdiFillRgn(long long long) +@ stdcall -syscall NtGdiFillRgn(long long long) @ stdcall -syscall NtGdiFlattenPath(long) @ stdcall -syscall NtGdiFlush() @ stdcall NtGdiFontIsLinked(long) @ stub NtGdiForceUFIMapping -@ stdcall NtGdiFrameRgn(long long long long long) +@ stdcall -syscall NtGdiFrameRgn(long long long long long) @ stub NtGdiFullscreenControl @ stdcall NtGdiGetAndSetDCDword(long long long ptr) @ stdcall NtGdiGetAppClipBox(long ptr) @@ -524,7 +524,7 @@ @ stub NtGdiGetUFI @ stub NtGdiGetUFIPathname @ stub NtGdiGetWidthTable -@ stdcall NtGdiGradientFill(long ptr long ptr long long) +@ stdcall -syscall NtGdiGradientFill(long ptr long ptr long long) @ stub NtGdiHLSurfGetInformation @ stub NtGdiHLSurfSetInformation @ stub NtGdiHT_Get8BPPFormatPalette @@ -534,7 +534,7 @@ @ stub NtGdiInit @ stdcall -syscall NtGdiInitSpool() @ stdcall NtGdiIntersectClipRect(long long long long long) -@ stdcall NtGdiInvertRgn(long long) +@ stdcall -syscall NtGdiInvertRgn(long long) @ stdcall -syscall NtGdiLineTo(long long long) @ stub NtGdiMakeFontDir @ stub NtGdiMakeInfoDC @@ -556,9 +556,9 @@ @ stdcall NtGdiPatBlt(long long long long long long) @ stdcall -syscall NtGdiPathToRegion(long) @ stdcall NtGdiPlgBlt(long ptr long long long long long long long long long) -@ stdcall NtGdiPolyDraw(long ptr ptr long) +@ stdcall -syscall NtGdiPolyDraw(long ptr ptr long) @ stub NtGdiPolyPatBlt -@ stdcall NtGdiPolyPolyDraw(long ptr ptr long long) +@ stdcall -syscall NtGdiPolyPolyDraw(long ptr ptr long long) @ stub NtGdiPolyTextOutW @ stdcall -syscall NtGdiPtInRegion(long long long) @ stdcall NtGdiPtVisible(long long long) diff --git a/dlls/win32u/win32u_private.h b/dlls/win32u/win32u_private.h index 5db0d294925..ce1dd51f5d8 100644 --- a/dlls/win32u/win32u_private.h +++ b/dlls/win32u/win32u_private.h @@ -40,8 +40,6 @@ struct unix_funcs BOOL (WINAPI *pNtGdiAlphaBlend)( HDC hdc_dst, int x_dst, int y_dst, int width_dst, int height_dst, HDC hdc_src, int x_src, int y_src, int width_src, int height_src, BLENDFUNCTION blend_function, HANDLE xform ); - BOOL (WINAPI *pNtGdiAngleArc)( HDC hdc, INT x, INT y, DWORD radius, DWORD start_angle, - DWORD sweep_angle ); BOOL (WINAPI *pNtGdiBeginPath)( HDC hdc ); BOOL (WINAPI *pNtGdiBitBlt)( HDC hdc_dst, INT x_dst, INT y_dst, INT width, INT height, HDC hdc_src, INT x_src, INT y_src, DWORD rop, DWORD bk_color, FLONG fl ); @@ -75,14 +73,11 @@ struct unix_funcs INT (WINAPI *pNtGdiExcludeClipRect)( HDC hdc, INT left, INT top, INT right, INT bottom ); INT (WINAPI *pNtGdiExtEscape)( HDC hdc, WCHAR *driver, INT driver_id, INT escape, INT input_size, const char *input, INT output_size, char *output ); - BOOL (WINAPI *pNtGdiExtFloodFill)( HDC hdc, INT x, INT y, COLORREF color, UINT type ); BOOL (WINAPI *pNtGdiExtTextOutW)( HDC hdc, INT x, INT y, UINT flags, const RECT *rect, const WCHAR *str, UINT count, const INT *dx, DWORD cp ); INT (WINAPI *pNtGdiExtSelectClipRgn)( HDC hdc, HRGN region, INT mode ); BOOL (WINAPI *pNtGdiFillPath)( HDC hdc ); - BOOL (WINAPI *pNtGdiFillRgn)( HDC hdc, HRGN hrgn, HBRUSH hbrush ); BOOL (WINAPI *pNtGdiFontIsLinked)( HDC hdc ); - BOOL (WINAPI *pNtGdiFrameRgn)( HDC hdc, HRGN hrgn, HBRUSH brush, INT width, INT height ); BOOL (WINAPI *pNtGdiGetAndSetDCDword)( HDC hdc, UINT method, DWORD value, DWORD *result ); INT (WINAPI *pNtGdiGetAppClipBox)( HDC hdc, RECT *rect ); UINT (WINAPI *pNtGdiGetBoundsRect)( HDC hdc, RECT *rect, UINT flags ); @@ -115,10 +110,7 @@ struct unix_funcs INT *nfit, INT *dxs, SIZE *size, UINT flags ); INT (WINAPI *pNtGdiGetTextFaceW)( HDC hdc, INT count, WCHAR *name, BOOL alias_name ); BOOL (WINAPI *pNtGdiGetTextMetricsW)( HDC hdc, TEXTMETRICW *metrics, ULONG flags ); - BOOL (WINAPI *pNtGdiGradientFill)( HDC hdc, TRIVERTEX *vert_array, ULONG nvert, - void *grad_array, ULONG ngrad, ULONG mode ); INT (WINAPI *pNtGdiIntersectClipRect)( HDC hdc, INT left, INT top, INT right, INT bottom ); - BOOL (WINAPI *pNtGdiInvertRgn)( HDC hdc, HRGN hrgn ); BOOL (WINAPI *pNtGdiMaskBlt)( HDC hdc, INT x_dst, INT y_dst, INT width_dst, INT height_dst, HDC hdc_src, INT x_src, INT y_src, HBITMAP mask, INT x_mask, INT y_mask, DWORD rop, DWORD bk_color ); @@ -128,9 +120,6 @@ struct unix_funcs BOOL (WINAPI *pNtGdiPlgBlt)( HDC hdc, const POINT *point, HDC hdc_src, INT x_src, INT y_src, INT width, INT height, HBITMAP mask, INT x_mask, INT y_mask, DWORD bk_color ); - BOOL (WINAPI *pNtGdiPolyDraw)(HDC hdc, const POINT *points, const BYTE *types, DWORD count ); - ULONG (WINAPI *pNtGdiPolyPolyDraw)( HDC hdc, const POINT *points, const ULONG *counts, - DWORD count, UINT function ); BOOL (WINAPI *pNtGdiPtVisible)( HDC hdc, INT x, INT y ); BOOL (WINAPI *pNtGdiRectVisible)( HDC hdc, const RECT *rect ); BOOL (WINAPI *pNtGdiResetDC)( HDC hdc, const DEVMODEW *devmode, BOOL *banding, diff --git a/dlls/win32u/wrappers.c b/dlls/win32u/wrappers.c index 3b7d88ccce8..50bfec72e3d 100644 --- a/dlls/win32u/wrappers.c +++ b/dlls/win32u/wrappers.c @@ -45,12 +45,6 @@ BOOL WINAPI NtGdiAlphaBlend( HDC hdc_dst, int x_dst, int y_dst, int width_dst, i x_src, y_src, width_src, height_src, blend_function, xform ); }
-BOOL WINAPI NtGdiAngleArc( HDC hdc, INT x, INT y, DWORD radius, DWORD start_angle, DWORD sweep_angle ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtGdiAngleArc( hdc, x, y, radius, start_angle, sweep_angle ); -} - BOOL WINAPI NtGdiBeginPath( HDC hdc ) { if (!unix_funcs) return FALSE; @@ -164,12 +158,6 @@ INT WINAPI NtGdiExtEscape( HDC hdc, WCHAR *driver, INT driver_id, INT escape, IN output_size, output ); }
-BOOL WINAPI NtGdiExtFloodFill( HDC hdc, INT x, INT y, COLORREF color, UINT type ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtGdiExtFloodFill( hdc, x, y, color, type ); -} - BOOL WINAPI NtGdiExtTextOutW( HDC hdc, INT x, INT y, UINT flags, const RECT *rect, const WCHAR *str, UINT count, const INT *dx, DWORD cp ) { @@ -189,24 +177,12 @@ BOOL WINAPI NtGdiFillPath( HDC hdc ) return unix_funcs->pNtGdiFillPath( hdc ); }
-BOOL WINAPI NtGdiFillRgn( HDC hdc, HRGN hrgn, HBRUSH hbrush ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtGdiFillRgn( hdc, hrgn, hbrush ); -} - BOOL WINAPI NtGdiFontIsLinked( HDC hdc ) { if (!unix_funcs) return FALSE; return unix_funcs->pNtGdiFontIsLinked( hdc ); }
-BOOL WINAPI NtGdiFrameRgn( HDC hdc, HRGN hrgn, HBRUSH brush, INT width, INT height ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtGdiFrameRgn( hdc, hrgn, brush, width, height ); -} - BOOL WINAPI NtGdiGetAndSetDCDword( HDC hdc, UINT method, DWORD value, DWORD *result ) { if (!unix_funcs) return FALSE; @@ -355,25 +331,12 @@ BOOL WINAPI NtGdiGetTextMetricsW( HDC hdc, TEXTMETRICW *metrics, ULONG flags ) return unix_funcs->pNtGdiGetTextMetricsW( hdc, metrics, flags ); }
-BOOL WINAPI NtGdiGradientFill( HDC hdc, TRIVERTEX *vert_array, ULONG nvert, - void *grad_array, ULONG ngrad, ULONG mode ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtGdiGradientFill( hdc, vert_array, nvert, grad_array, ngrad, mode ); -} - INT WINAPI NtGdiIntersectClipRect( HDC hdc, INT left, INT top, INT right, INT bottom ) { if (!unix_funcs) return ERROR; return unix_funcs->pNtGdiIntersectClipRect( hdc, left, top, right, bottom ); }
-BOOL WINAPI NtGdiInvertRgn( HDC hdc, HRGN hrgn ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtGdiInvertRgn( hdc, hrgn ); -} - BOOL WINAPI NtGdiMaskBlt( HDC hdc, INT x_dst, INT y_dst, INT width_dst, INT height_dst, HDC hdc_src, INT x_src, INT y_src, HBITMAP mask, INT x_mask, INT y_mask, DWORD rop, DWORD bk_color ) @@ -410,19 +373,6 @@ BOOL WINAPI NtGdiPlgBlt( HDC hdc, const POINT *point, HDC hdc_src, INT x_src, IN x_mask, y_mask, bk_color ); }
-BOOL WINAPI NtGdiPolyDraw( HDC hdc, const POINT *points, const BYTE *types, DWORD count ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtGdiPolyDraw( hdc, points, types, count ); -} - -ULONG WINAPI NtGdiPolyPolyDraw( HDC hdc, const POINT *points, const ULONG *counts, - DWORD count, UINT function ) -{ - if (!unix_funcs) return 0; - return unix_funcs->pNtGdiPolyPolyDraw( hdc, points, counts, count, function ); -} - BOOL WINAPI NtGdiPtVisible( HDC hdc, INT x, INT y ) { if (!unix_funcs) return FALSE; diff --git a/dlls/wow64win/gdi.c b/dlls/wow64win/gdi.c index 78bb57a7ef9..56c70f0fda2 100644 --- a/dlls/wow64win/gdi.c +++ b/dlls/wow64win/gdi.c @@ -79,6 +79,18 @@ NTSTATUS WINAPI wow64_NtGdiAddFontResourceW( UINT *args ) return NtGdiAddFontResourceW( str, size, files, flags, tid, dv ); }
+NTSTATUS WINAPI wow64_NtGdiAngleArc( UINT *args ) +{ + HDC hdc = get_handle( &args ); + INT x = get_ulong( &args ); + INT y = get_ulong( &args ); + DWORD radius = get_ulong( &args ); + DWORD start_angle = get_ulong( &args ); + DWORD sweep_angle = get_ulong( &args ); + + return NtGdiAngleArc( hdc, x, y, radius, start_angle, sweep_angle ); +} + NTSTATUS WINAPI wow64_NtGdiArcInternal( UINT *args ) { UINT type = get_ulong( &args ); @@ -381,6 +393,17 @@ NTSTATUS WINAPI wow64_NtGdiExtCreateRegion( UINT *args ) return HandleToUlong( NtGdiExtCreateRegion( xform, count, data )); }
+NTSTATUS WINAPI wow64_NtGdiExtFloodFill( UINT *args ) +{ + HDC hdc = get_handle( &args ); + INT x = get_ulong( &args ); + INT y = get_ulong( &args ); + COLORREF color = get_ulong( &args ); + UINT type = get_ulong( &args ); + + return NtGdiExtFloodFill( hdc, x, y, color, type ); +} + NTSTATUS WINAPI wow64_NtGdiExtGetObjectW( UINT *args ) { HGDIOBJ handle = get_handle( &args ); @@ -474,6 +497,15 @@ NTSTATUS WINAPI wow64_NtGdiExtGetObjectW( UINT *args ) } }
+NTSTATUS WINAPI wow64_NtGdiFillRgn( UINT *args ) +{ + HDC hdc = get_handle( &args ); + HRGN hrgn = get_handle( &args ); + HBRUSH hbrush = get_handle( &args ); + + return NtGdiFillRgn( hdc, hrgn, hbrush ); +} + NTSTATUS WINAPI wow64_NtGdiFlattenPath( UINT *args ) { HDC hdc = get_handle( &args ); @@ -486,6 +518,17 @@ NTSTATUS WINAPI wow64_NtGdiFlush( UINT *args ) return NtGdiFlush(); }
+NTSTATUS WINAPI wow64_NtGdiFrameRgn( UINT *args ) +{ + HDC hdc = get_handle( &args ); + HRGN hrgn = get_handle( &args ); + HBRUSH brush = get_handle( &args ); + INT width = get_ulong( &args ); + INT height = get_ulong( &args ); + + return NtGdiFrameRgn( hdc, hrgn, brush, width, height ); +} + NTSTATUS WINAPI wow64_NtGdiGetBitmapBits( UINT *args ) { HBITMAP bitmap = get_handle( &args ); @@ -591,6 +634,26 @@ NTSTATUS WINAPI wow64_NtGdiGetPixel( UINT *args ) return NtGdiGetPixel( hdc, x, y ); }
+NTSTATUS WINAPI wow64_NtGdiGradientFill( UINT *args ) +{ + HDC hdc = get_handle( &args ); + TRIVERTEX *vert_array = get_ptr( &args ); + ULONG nvert = get_ulong( &args ); + void *grad_array = get_ptr( &args ); + ULONG ngrad = get_ulong( &args ); + ULONG mode = get_ulong( &args ); + + return NtGdiGradientFill( hdc, vert_array, nvert, grad_array, ngrad, mode ); +} + +NTSTATUS WINAPI wow64_NtGdiInvertRgn( UINT *args ) +{ + HDC hdc = get_handle( &args ); + HRGN hrgn = get_handle( &args ); + + return NtGdiInvertRgn( hdc, hrgn ); +} + NTSTATUS WINAPI wow64_NtGdiLineTo( UINT *args ) { HDC hdc = get_handle( &args ); @@ -610,6 +673,27 @@ NTSTATUS WINAPI wow64_NtGdiMoveTo( UINT *args ) return NtGdiMoveTo( hdc, x, y, pt ); }
+NTSTATUS WINAPI wow64_NtGdiPolyDraw( UINT *args ) +{ + HDC hdc = get_handle( &args ); + const POINT *points = get_ptr( &args ); + const BYTE *types = get_ptr( &args ); + DWORD count = get_ulong( &args ); + + return NtGdiPolyDraw( hdc, points, types, count ); +} + +NTSTATUS WINAPI wow64_NtGdiPolyPolyDraw( UINT *args ) +{ + HDC hdc = get_handle( &args ); + const POINT *points = get_ptr( &args ); + const ULONG *counts = get_ptr( &args ); + DWORD count = get_ulong( &args ); + UINT function = get_ulong( &args ); + + return NtGdiPolyPolyDraw( hdc, points, counts, count, function ); +} + NTSTATUS WINAPI wow64_NtGdiRectangle( UINT *args ) { HDC hdc = get_handle( &args ); diff --git a/dlls/wow64win/syscall.h b/dlls/wow64win/syscall.h index 9d764ed5ca6..350a4b24f83 100644 --- a/dlls/wow64win/syscall.h +++ b/dlls/wow64win/syscall.h @@ -24,6 +24,7 @@ #define ALL_WIN32_SYSCALLS \ SYSCALL_ENTRY( NtGdiAddFontMemResourceEx ) \ SYSCALL_ENTRY( NtGdiAddFontResourceW ) \ + SYSCALL_ENTRY( NtGdiAngleArc ) \ SYSCALL_ENTRY( NtGdiArcInternal ) \ SYSCALL_ENTRY( NtGdiCombineRgn ) \ SYSCALL_ENTRY( NtGdiCreateBitmap ) \ @@ -50,9 +51,12 @@ SYSCALL_ENTRY( NtGdiEqualRgn ) \ SYSCALL_ENTRY( NtGdiExtCreatePen ) \ SYSCALL_ENTRY( NtGdiExtCreateRegion ) \ + SYSCALL_ENTRY( NtGdiExtFloodFill ) \ SYSCALL_ENTRY( NtGdiExtGetObjectW ) \ + SYSCALL_ENTRY( NtGdiFillRgn ) \ SYSCALL_ENTRY( NtGdiFlattenPath ) \ SYSCALL_ENTRY( NtGdiFlush ) \ + SYSCALL_ENTRY( NtGdiFrameRgn ) \ SYSCALL_ENTRY( NtGdiGetBitmapBits ) \ SYSCALL_ENTRY( NtGdiGetBitmapDimension ) \ SYSCALL_ENTRY( NtGdiGetColorAdjustment ) \ @@ -69,13 +73,17 @@ SYSCALL_ENTRY( NtGdiGetSpoolMessage ) \ SYSCALL_ENTRY( NtGdiGetSystemPaletteUse ) \ SYSCALL_ENTRY( NtGdiGetTransform ) \ + SYSCALL_ENTRY( NtGdiGradientFill ) \ SYSCALL_ENTRY( NtGdiHfontCreate ) \ SYSCALL_ENTRY( NtGdiInitSpool ) \ + SYSCALL_ENTRY( NtGdiInvertRgn ) \ SYSCALL_ENTRY( NtGdiLineTo ) \ SYSCALL_ENTRY( NtGdiMoveTo ) \ SYSCALL_ENTRY( NtGdiOffsetRgn ) \ SYSCALL_ENTRY( NtGdiOpenDCW ) \ SYSCALL_ENTRY( NtGdiPathToRegion ) \ + SYSCALL_ENTRY( NtGdiPolyDraw ) \ + SYSCALL_ENTRY( NtGdiPolyPolyDraw ) \ SYSCALL_ENTRY( NtGdiPtInRegion ) \ SYSCALL_ENTRY( NtGdiRectInRegion ) \ SYSCALL_ENTRY( NtGdiRectangle ) \
From: Jacek Caban jacek@codeweavers.com
--- dlls/win32u/gdiobj.c | 5 ---- dlls/win32u/syscall.c | 5 ++++ dlls/win32u/win32u.spec | 10 +++---- dlls/win32u/win32u_private.h | 5 ---- dlls/win32u/wrappers.c | 30 --------------------- dlls/wow64win/gdi.c | 52 ++++++++++++++++++++++++++++++++++++ dlls/wow64win/syscall.h | 5 ++++ 7 files changed, 67 insertions(+), 45 deletions(-)
diff --git a/dlls/win32u/gdiobj.c b/dlls/win32u/gdiobj.c index d15e5367f15..240703e1489 100644 --- a/dlls/win32u/gdiobj.c +++ b/dlls/win32u/gdiobj.c @@ -1030,7 +1030,6 @@ BOOL WINAPI NtGdiSetColorAdjustment( HDC hdc, const COLORADJUSTMENT *ca )
static struct unix_funcs unix_funcs = { - NtGdiAbortDoc, NtGdiAbortPath, NtGdiAlphaBlend, NtGdiBeginPath, @@ -1053,9 +1052,7 @@ static struct unix_funcs unix_funcs = NtGdiDdDDISetVidPnSourceOwner, NtGdiDeleteObjectApp, NtGdiDoPalette, - NtGdiEndDoc, NtGdiEndPath, - NtGdiEndPage, NtGdiEnumFonts, NtGdiExcludeClipRect, NtGdiExtEscape, @@ -1109,8 +1106,6 @@ static struct unix_funcs unix_funcs = NtGdiSetDeviceGammaRamp, NtGdiSetLayout, NtGdiSetSystemPaletteUse, - NtGdiStartDoc, - NtGdiStartPage, NtGdiStretchBlt, NtGdiStretchDIBitsInternal, NtGdiStrokeAndFillPath, diff --git a/dlls/win32u/syscall.c b/dlls/win32u/syscall.c index a7ee8762abb..f35640276d8 100644 --- a/dlls/win32u/syscall.c +++ b/dlls/win32u/syscall.c @@ -36,6 +36,7 @@
static void * const syscalls[] = { + NtGdiAbortDoc, NtGdiAddFontMemResourceEx, NtGdiAddFontResourceW, NtGdiAngleArc, @@ -62,6 +63,8 @@ static void * const syscalls[] = NtGdiDescribePixelFormat, NtGdiDrawStream, NtGdiEllipse, + NtGdiEndDoc, + NtGdiEndPage, NtGdiEqualRgn, NtGdiExtCreatePen, NtGdiExtCreateRegion, @@ -116,6 +119,8 @@ static void * const syscalls[] = NtGdiSetRectRgn, NtGdiSetTextJustification, NtGdiSetVirtualResolution, + NtGdiStartDoc, + NtGdiStartPage, NtGdiSwapBuffers, NtGdiTransformPoints, NtUserActivateKeyboardLayout, diff --git a/dlls/win32u/win32u.spec b/dlls/win32u/win32u.spec index 39f18d6d36c..af7f47573df 100644 --- a/dlls/win32u/win32u.spec +++ b/dlls/win32u/win32u.spec @@ -104,7 +104,7 @@ @ stub NtFlipObjectRemovePoolBuffer @ stub NtFlipObjectSetContent @ stub NtFlipObjectSetMaximumBackchannelQueueDepth -@ stdcall NtGdiAbortDoc(long) +@ stdcall -syscall NtGdiAbortDoc(long) @ stdcall NtGdiAbortPath(long) @ stub NtGdiAddEmbFontToDC @ stdcall -syscall NtGdiAddFontMemResourceEx(ptr long ptr long ptr) @@ -378,9 +378,9 @@ @ stub NtGdiDwmCreatedBitmapRemotingOutput @ stdcall -syscall NtGdiEllipse(long long long long long) @ stub NtGdiEnableEudc -@ stdcall NtGdiEndDoc(long) +@ stdcall -syscall NtGdiEndDoc(long) @ stub NtGdiEndGdiRendering -@ stdcall NtGdiEndPage(long) +@ stdcall -syscall NtGdiEndPage(long) @ stdcall NtGdiEndPath(long) @ stub NtGdiEngAlphaBlend @ stub NtGdiEngAssociateSurface @@ -618,8 +618,8 @@ @ stdcall -syscall NtGdiSetTextJustification(long long long) @ stub NtGdiSetUMPDSandboxState @ stdcall -syscall NtGdiSetVirtualResolution(long long long long long) -@ stdcall NtGdiStartDoc(long ptr ptr long) -@ stdcall NtGdiStartPage(long) +@ stdcall -syscall NtGdiStartDoc(long ptr ptr long) +@ stdcall -syscall NtGdiStartPage(long) @ stdcall NtGdiStretchBlt(long long long long long long long long long long long long) @ stdcall NtGdiStretchDIBitsInternal(long long long long long long long long long ptr ptr long long long long long) @ stdcall NtGdiStrokeAndFillPath(long) diff --git a/dlls/win32u/win32u_private.h b/dlls/win32u/win32u_private.h index ce1dd51f5d8..0d1f138a86f 100644 --- a/dlls/win32u/win32u_private.h +++ b/dlls/win32u/win32u_private.h @@ -35,7 +35,6 @@ struct unix_funcs { /* win32u functions */ - INT (WINAPI *pNtGdiAbortDoc)( HDC hdc ); BOOL (WINAPI *pNtGdiAbortPath)( HDC hdc ); BOOL (WINAPI *pNtGdiAlphaBlend)( HDC hdc_dst, int x_dst, int y_dst, int width_dst, int height_dst, HDC hdc_src, int x_src, int y_src, int width_src, int height_src, @@ -65,9 +64,7 @@ struct unix_funcs BOOL (WINAPI *pNtGdiDeleteObjectApp)( HGDIOBJ obj ); LONG (WINAPI *pNtGdiDoPalette)( HGDIOBJ handle, WORD start, WORD count, void *entries, DWORD func, BOOL inbound ); - INT (WINAPI *pNtGdiEndDoc)(HDC hdc); BOOL (WINAPI *pNtGdiEndPath)( HDC hdc ); - INT (WINAPI *pNtGdiEndPage)( HDC hdc ); BOOL (WINAPI *pNtGdiEnumFonts)( HDC hdc, ULONG type, ULONG win32_compat, ULONG face_name_len, const WCHAR *face_name, ULONG charset, ULONG *count, void *buf ); INT (WINAPI *pNtGdiExcludeClipRect)( HDC hdc, INT left, INT top, INT right, INT bottom ); @@ -144,8 +141,6 @@ struct unix_funcs BOOL (WINAPI *pNtGdiSetDeviceGammaRamp)( HDC hdc, void *ptr ); DWORD (WINAPI *pNtGdiSetLayout)( HDC hdc, LONG wox, DWORD layout ); UINT (WINAPI *pNtGdiSetSystemPaletteUse)( HDC hdc, UINT use ); - INT (WINAPI *pNtGdiStartDoc)( HDC hdc, const DOCINFOW *doc, BOOL *banding, INT job ); - INT (WINAPI *pNtGdiStartPage)( HDC hdc ); BOOL (WINAPI *pNtGdiStretchBlt)( HDC hdc, INT x_dst, INT y_dst, INT width_dst, INT height_dst, HDC hdc_src, INT x_src, INT y_src, INT width_src, INT height_src, DWORD rop, COLORREF bk_color ); diff --git a/dlls/win32u/wrappers.c b/dlls/win32u/wrappers.c index 50bfec72e3d..e8d6ab55dfe 100644 --- a/dlls/win32u/wrappers.c +++ b/dlls/win32u/wrappers.c @@ -24,12 +24,6 @@
static const struct unix_funcs *unix_funcs;
-INT WINAPI NtGdiAbortDoc( HDC hdc ) -{ - if (!unix_funcs) return 0; - return unix_funcs->pNtGdiAbortDoc( hdc ); -} - BOOL WINAPI NtGdiAbortPath( HDC hdc ) { if (!unix_funcs) return FALSE; @@ -112,24 +106,12 @@ LONG WINAPI NtGdiDoPalette( HGDIOBJ handle, WORD start, WORD count, void *entrie return unix_funcs->pNtGdiDoPalette( handle, start, count, entries, func, inbound ); }
-INT WINAPI NtGdiEndDoc( HDC hdc ) -{ - if (!unix_funcs) return SP_ERROR; - return unix_funcs->pNtGdiEndDoc( hdc ); -} - BOOL WINAPI NtGdiEndPath( HDC hdc ) { if (!unix_funcs) return FALSE; return unix_funcs->pNtGdiEndPath( hdc ); }
-INT WINAPI NtGdiEndPage( HDC hdc ) -{ - if (!unix_funcs) return SP_ERROR; - return unix_funcs->pNtGdiEndPage( hdc ); -} - BOOL WINAPI NtUserEndPaint( HWND hwnd, const PAINTSTRUCT *ps ) { if (!unix_funcs) return FALSE; @@ -484,18 +466,6 @@ UINT WINAPI NtGdiSetSystemPaletteUse( HDC hdc, UINT use ) return unix_funcs->pNtGdiSetSystemPaletteUse( hdc, use ); }
-INT WINAPI NtGdiStartDoc( HDC hdc, const DOCINFOW *doc, BOOL *banding, INT job ) -{ - if (!unix_funcs) return SP_ERROR; - return unix_funcs->pNtGdiStartDoc( hdc, doc, banding, job ); -} - -INT WINAPI NtGdiStartPage( HDC hdc ) -{ - if (!unix_funcs) return SP_ERROR; - return unix_funcs->pNtGdiStartPage( hdc ); -} - BOOL WINAPI NtGdiStretchBlt( HDC hdc, INT x_dst, INT y_dst, INT width_dst, INT height_dst, HDC hdc_src, INT x_src, INT y_src, INT width_src, INT height_src, DWORD rop, COLORREF bk_color ) diff --git a/dlls/wow64win/gdi.c b/dlls/wow64win/gdi.c index 56c70f0fda2..dffca389804 100644 --- a/dlls/wow64win/gdi.c +++ b/dlls/wow64win/gdi.c @@ -56,6 +56,13 @@ static DWORD gdi_handle_type( HGDIOBJ obj ) return handle & NTGDI_HANDLE_TYPE_MASK; }
+NTSTATUS WINAPI wow64_NtGdiAbortDoc( UINT *args ) +{ + HDC hdc = get_handle( &args ); + + return NtGdiAbortDoc( hdc ); +} + NTSTATUS WINAPI wow64_NtGdiAddFontMemResourceEx( UINT *args ) { void *ptr = get_ptr( &args ); @@ -357,6 +364,20 @@ NTSTATUS WINAPI wow64_NtGdiEllipse( UINT *args ) return NtGdiEllipse( hdc, left, top, right, bottom ); }
+NTSTATUS WINAPI wow64_NtGdiEndDoc( UINT *args ) +{ + HDC hdc = get_handle( &args ); + + return NtGdiEndDoc( hdc ); +} + +NTSTATUS WINAPI wow64_NtGdiEndPage( UINT *args ) +{ + HDC hdc = get_handle( &args ); + + return NtGdiEndPage( hdc ); +} + NTSTATUS WINAPI wow64_NtGdiEqualRgn( UINT *args ) { HRGN hrgn1 = get_handle( &args ); @@ -956,6 +977,37 @@ NTSTATUS WINAPI wow64_NtGdiSetVirtualResolution( UINT *args ) return NtGdiSetVirtualResolution( hdc, horz_res, vert_res, horz_size, vert_size ); }
+NTSTATUS WINAPI wow64_NtGdiStartDoc( UINT *args ) +{ + HDC hdc = get_handle( &args ); + const struct + { + INT cbSize; + ULONG lpszDocName; + ULONG lpszOutput; + ULONG lpszDatatype; + DWORD fwType; + } *doc32 = get_ptr( &args ); + BOOL *banding = get_ptr( &args ); + INT job = get_ulong( &args ); + + DOCINFOW doc; + doc.cbSize = sizeof(doc); + doc.lpszDocName = UlongToPtr( doc32->lpszDocName ); + doc.lpszOutput = UlongToPtr( doc32->lpszOutput ); + doc.lpszDatatype = UlongToPtr( doc32->lpszDatatype ); + doc.fwType = doc32->fwType; + + return NtGdiStartDoc( hdc, &doc, banding, job ); +} + +NTSTATUS WINAPI wow64_NtGdiStartPage( UINT *args ) +{ + HDC hdc = get_handle( &args ); + + return NtGdiStartPage( hdc ); +} + NTSTATUS WINAPI wow64_NtGdiSwapBuffers( UINT *args ) { HDC hdc = get_handle( &args ); diff --git a/dlls/wow64win/syscall.h b/dlls/wow64win/syscall.h index 350a4b24f83..7868984c4de 100644 --- a/dlls/wow64win/syscall.h +++ b/dlls/wow64win/syscall.h @@ -22,6 +22,7 @@ #define __WOW64WIN_SYSCALL_H
#define ALL_WIN32_SYSCALLS \ + SYSCALL_ENTRY( NtGdiAbortDoc ) \ SYSCALL_ENTRY( NtGdiAddFontMemResourceEx ) \ SYSCALL_ENTRY( NtGdiAddFontResourceW ) \ SYSCALL_ENTRY( NtGdiAngleArc ) \ @@ -48,6 +49,8 @@ SYSCALL_ENTRY( NtGdiDescribePixelFormat ) \ SYSCALL_ENTRY( NtGdiDrawStream ) \ SYSCALL_ENTRY( NtGdiEllipse ) \ + SYSCALL_ENTRY( NtGdiEndDoc ) \ + SYSCALL_ENTRY( NtGdiEndPage ) \ SYSCALL_ENTRY( NtGdiEqualRgn ) \ SYSCALL_ENTRY( NtGdiExtCreatePen ) \ SYSCALL_ENTRY( NtGdiExtCreateRegion ) \ @@ -102,6 +105,8 @@ SYSCALL_ENTRY( NtGdiSetRectRgn ) \ SYSCALL_ENTRY( NtGdiSetTextJustification ) \ SYSCALL_ENTRY( NtGdiSetVirtualResolution ) \ + SYSCALL_ENTRY( NtGdiStartDoc ) \ + SYSCALL_ENTRY( NtGdiStartPage ) \ SYSCALL_ENTRY( NtGdiSwapBuffers ) \ SYSCALL_ENTRY( NtGdiTransformPoints ) \ SYSCALL_ENTRY( NtUserActivateKeyboardLayout ) \
From: Jacek Caban jacek@codeweavers.com
--- dlls/win32u/gdiobj.c | 9 ----- dlls/win32u/syscall.c | 9 +++++ dlls/win32u/win32u.spec | 18 +++++----- dlls/win32u/win32u_private.h | 9 ----- dlls/win32u/wrappers.c | 54 ------------------------------ dlls/wow64win/gdi.c | 64 ++++++++++++++++++++++++++++++++++++ dlls/wow64win/syscall.h | 9 +++++ 7 files changed, 91 insertions(+), 81 deletions(-)
diff --git a/dlls/win32u/gdiobj.c b/dlls/win32u/gdiobj.c index 240703e1489..c78b8850e91 100644 --- a/dlls/win32u/gdiobj.c +++ b/dlls/win32u/gdiobj.c @@ -1030,11 +1030,8 @@ BOOL WINAPI NtGdiSetColorAdjustment( HDC hdc, const COLORADJUSTMENT *ca )
static struct unix_funcs unix_funcs = { - NtGdiAbortPath, NtGdiAlphaBlend, - NtGdiBeginPath, NtGdiBitBlt, - NtGdiCloseFigure, NtGdiComputeXformCoefficients, NtGdiCreateCompatibleBitmap, NtGdiCreateCompatibleDC, @@ -1052,13 +1049,11 @@ static struct unix_funcs unix_funcs = NtGdiDdDDISetVidPnSourceOwner, NtGdiDeleteObjectApp, NtGdiDoPalette, - NtGdiEndPath, NtGdiEnumFonts, NtGdiExcludeClipRect, NtGdiExtEscape, NtGdiExtTextOutW, NtGdiExtSelectClipRgn, - NtGdiFillPath, NtGdiFontIsLinked, NtGdiGetAndSetDCDword, NtGdiGetAppClipBox, @@ -1098,7 +1093,6 @@ static struct unix_funcs unix_funcs = NtGdiScaleWindowExtEx, NtGdiSelectBitmap, NtGdiSelectBrush, - NtGdiSelectClipPath, NtGdiSelectFont, NtGdiSelectPen, NtGdiSetBoundsRect, @@ -1108,12 +1102,9 @@ static struct unix_funcs unix_funcs = NtGdiSetSystemPaletteUse, NtGdiStretchBlt, NtGdiStretchDIBitsInternal, - NtGdiStrokeAndFillPath, - NtGdiStrokePath, NtGdiTransparentBlt, NtGdiUnrealizeObject, NtGdiUpdateColors, - NtGdiWidenPath, NtUserDrawCaptionTemp, NtUserDrawMenuBarTemp, NtUserEndPaint, diff --git a/dlls/win32u/syscall.c b/dlls/win32u/syscall.c index f35640276d8..d3ff0a7696f 100644 --- a/dlls/win32u/syscall.c +++ b/dlls/win32u/syscall.c @@ -37,10 +37,13 @@ static void * const syscalls[] = { NtGdiAbortDoc, + NtGdiAbortPath, NtGdiAddFontMemResourceEx, NtGdiAddFontResourceW, NtGdiAngleArc, NtGdiArcInternal, + NtGdiBeginPath, + NtGdiCloseFigure, NtGdiCombineRgn, NtGdiCreateBitmap, NtGdiCreateClientObj, @@ -65,11 +68,13 @@ static void * const syscalls[] = NtGdiEllipse, NtGdiEndDoc, NtGdiEndPage, + NtGdiEndPath, NtGdiEqualRgn, NtGdiExtCreatePen, NtGdiExtCreateRegion, NtGdiExtFloodFill, NtGdiExtGetObjectW, + NtGdiFillPath, NtGdiFillRgn, NtGdiFlattenPath, NtGdiFlush, @@ -108,6 +113,7 @@ static void * const syscalls[] = NtGdiRemoveFontResourceW, NtGdiRoundRect, NtGdiSaveDC, + NtGdiSelectClipPath, NtGdiSetBitmapBits, NtGdiSetBitmapDimension, NtGdiSetBrushOrg, @@ -121,8 +127,11 @@ static void * const syscalls[] = NtGdiSetVirtualResolution, NtGdiStartDoc, NtGdiStartPage, + NtGdiStrokeAndFillPath, + NtGdiStrokePath, NtGdiSwapBuffers, NtGdiTransformPoints, + NtGdiWidenPath, NtUserActivateKeyboardLayout, NtUserAddClipboardFormatListener, NtUserAssociateInputContext, diff --git a/dlls/win32u/win32u.spec b/dlls/win32u/win32u.spec index af7f47573df..0bf64260561 100644 --- a/dlls/win32u/win32u.spec +++ b/dlls/win32u/win32u.spec @@ -105,7 +105,7 @@ @ stub NtFlipObjectSetContent @ stub NtFlipObjectSetMaximumBackchannelQueueDepth @ stdcall -syscall NtGdiAbortDoc(long) -@ stdcall NtGdiAbortPath(long) +@ stdcall -syscall NtGdiAbortPath(long) @ stub NtGdiAddEmbFontToDC @ stdcall -syscall NtGdiAddFontMemResourceEx(ptr long ptr long ptr) @ stdcall -syscall NtGdiAddFontResourceW(wstr long long long long ptr) @@ -122,7 +122,7 @@ @ stub NtGdiBRUSHOBJ_pvGetRbrush @ stub NtGdiBRUSHOBJ_ulGetBrushColor @ stub NtGdiBeginGdiRendering -@ stdcall NtGdiBeginPath(long) +@ stdcall -syscall NtGdiBeginPath(long) @ stdcall NtGdiBitBlt(long long long long long long long long long long long) @ stub NtGdiCLIPOBJ_bEnum @ stub NtGdiCLIPOBJ_cEnumStart @@ -132,7 +132,7 @@ @ stub NtGdiCheckBitmapBits @ stub NtGdiClearBitmapAttributes @ stub NtGdiClearBrushAttributes -@ stdcall NtGdiCloseFigure(long) +@ stdcall -syscall NtGdiCloseFigure(long) @ stub NtGdiColorCorrectPalette @ stdcall -syscall NtGdiCombineRgn(long long long long) @ stub NtGdiCombineTransform @@ -381,7 +381,7 @@ @ stdcall -syscall NtGdiEndDoc(long) @ stub NtGdiEndGdiRendering @ stdcall -syscall NtGdiEndPage(long) -@ stdcall NtGdiEndPath(long) +@ stdcall -syscall NtGdiEndPath(long) @ stub NtGdiEngAlphaBlend @ stub NtGdiEngAssociateSurface @ stub NtGdiEngBitBlt @@ -433,7 +433,7 @@ @ stub NtGdiFONTOBJ_pvTrueTypeFontFile @ stub NtGdiFONTOBJ_pxoGetXform @ stub NtGdiFONTOBJ_vGetInfo -@ stdcall NtGdiFillPath(long) +@ stdcall -syscall NtGdiFillPath(long) @ stdcall -syscall NtGdiFillRgn(long long long) @ stdcall -syscall NtGdiFlattenPath(long) @ stdcall -syscall NtGdiFlush() @@ -586,7 +586,7 @@ @ stdcall NtGdiScaleWindowExtEx(long long long long long ptr) @ stdcall NtGdiSelectBitmap(long long) @ stdcall NtGdiSelectBrush(long long) -@ stdcall NtGdiSelectClipPath(long long) +@ stdcall -syscall NtGdiSelectClipPath(long long) @ stdcall NtGdiSelectFont(long long) @ stdcall NtGdiSelectPen(long long) @ stub NtGdiSetBitmapAttributes @@ -622,8 +622,8 @@ @ stdcall -syscall NtGdiStartPage(long) @ stdcall NtGdiStretchBlt(long long long long long long long long long long long long) @ stdcall NtGdiStretchDIBitsInternal(long long long long long long long long long ptr ptr long long long long long) -@ stdcall NtGdiStrokeAndFillPath(long) -@ stdcall NtGdiStrokePath(long) +@ stdcall -syscall NtGdiStrokeAndFillPath(long) +@ stdcall -syscall NtGdiStrokePath(long) @ stdcall -syscall NtGdiSwapBuffers(long) @ stdcall -syscall NtGdiTransformPoints(long ptr ptr long long) @ stdcall NtGdiTransparentBlt(long long long long long long long long long long long) @@ -633,7 +633,7 @@ @ stdcall NtGdiUnrealizeObject(long) @ stdcall NtGdiUpdateColors(long) @ stub NtGdiUpdateTransform -@ stdcall NtGdiWidenPath(long) +@ stdcall -syscall NtGdiWidenPath(long) @ stub NtGdiXFORMOBJ_bApplyXform @ stub NtGdiXFORMOBJ_iGetXform @ stub NtGdiXLATEOBJ_cGetPalette diff --git a/dlls/win32u/win32u_private.h b/dlls/win32u/win32u_private.h index 0d1f138a86f..6088321599e 100644 --- a/dlls/win32u/win32u_private.h +++ b/dlls/win32u/win32u_private.h @@ -35,14 +35,11 @@ struct unix_funcs { /* win32u functions */ - BOOL (WINAPI *pNtGdiAbortPath)( HDC hdc ); BOOL (WINAPI *pNtGdiAlphaBlend)( HDC hdc_dst, int x_dst, int y_dst, int width_dst, int height_dst, HDC hdc_src, int x_src, int y_src, int width_src, int height_src, BLENDFUNCTION blend_function, HANDLE xform ); - BOOL (WINAPI *pNtGdiBeginPath)( HDC hdc ); BOOL (WINAPI *pNtGdiBitBlt)( HDC hdc_dst, INT x_dst, INT y_dst, INT width, INT height, HDC hdc_src, INT x_src, INT y_src, DWORD rop, DWORD bk_color, FLONG fl ); - BOOL (WINAPI *pNtGdiCloseFigure)( HDC hdc ); BOOL (WINAPI *pNtGdiComputeXformCoefficients)( HDC hdc ); HBITMAP (WINAPI *pNtGdiCreateCompatibleBitmap)( HDC hdc, INT width, INT height ); HDC (WINAPI *pNtGdiCreateCompatibleDC)( HDC hdc ); @@ -64,7 +61,6 @@ struct unix_funcs BOOL (WINAPI *pNtGdiDeleteObjectApp)( HGDIOBJ obj ); LONG (WINAPI *pNtGdiDoPalette)( HGDIOBJ handle, WORD start, WORD count, void *entries, DWORD func, BOOL inbound ); - BOOL (WINAPI *pNtGdiEndPath)( HDC hdc ); BOOL (WINAPI *pNtGdiEnumFonts)( HDC hdc, ULONG type, ULONG win32_compat, ULONG face_name_len, const WCHAR *face_name, ULONG charset, ULONG *count, void *buf ); INT (WINAPI *pNtGdiExcludeClipRect)( HDC hdc, INT left, INT top, INT right, INT bottom ); @@ -73,7 +69,6 @@ struct unix_funcs BOOL (WINAPI *pNtGdiExtTextOutW)( HDC hdc, INT x, INT y, UINT flags, const RECT *rect, const WCHAR *str, UINT count, const INT *dx, DWORD cp ); INT (WINAPI *pNtGdiExtSelectClipRgn)( HDC hdc, HRGN region, INT mode ); - BOOL (WINAPI *pNtGdiFillPath)( HDC hdc ); BOOL (WINAPI *pNtGdiFontIsLinked)( HDC hdc ); BOOL (WINAPI *pNtGdiGetAndSetDCDword)( HDC hdc, UINT method, DWORD value, DWORD *result ); INT (WINAPI *pNtGdiGetAppClipBox)( HDC hdc, RECT *rect ); @@ -129,7 +124,6 @@ struct unix_funcs INT y_num, INT y_denom, SIZE *size ); HGDIOBJ (WINAPI *pNtGdiSelectBitmap)( HDC hdc, HGDIOBJ handle ); HGDIOBJ (WINAPI *pNtGdiSelectBrush)( HDC hdc, HGDIOBJ handle ); - BOOL (WINAPI *pNtGdiSelectClipPath)( HDC hdc, INT mode ); HGDIOBJ (WINAPI *pNtGdiSelectFont)( HDC hdc, HGDIOBJ handle ); HGDIOBJ (WINAPI *pNtGdiSelectPen)( HDC hdc, HGDIOBJ handle ); UINT (WINAPI *pNtGdiSetBoundsRect)( HDC hdc, const RECT *rect, UINT flags ); @@ -149,14 +143,11 @@ struct unix_funcs INT height_src, const void *bits, const BITMAPINFO *bmi, UINT coloruse, DWORD rop, UINT max_info, UINT max_bits, HANDLE xform ); - BOOL (WINAPI *pNtGdiStrokeAndFillPath)( HDC hdc ); - BOOL (WINAPI *pNtGdiStrokePath)( HDC hdc ); BOOL (WINAPI *pNtGdiTransparentBlt)( HDC hdc, int x_dst, int y_dst, int width_dst, int height_dst, HDC hdc_src, int x_src, int y_src, int width_src, int height_src, UINT color ); BOOL (WINAPI *pNtGdiUnrealizeObject)( HGDIOBJ obj ); BOOL (WINAPI *pNtGdiUpdateColors)( HDC hdc ); - BOOL (WINAPI *pNtGdiWidenPath)( HDC hdc ); BOOL (WINAPI *pNtUserDrawCaptionTemp)( HWND hwnd, HDC hdc, const RECT *rect, HFONT font, HICON icon, const WCHAR *str, UINT flags ); DWORD (WINAPI *pNtUserDrawMenuBarTemp)( HWND hwnd, HDC hdc, RECT *rect, HMENU handle, HFONT font ); diff --git a/dlls/win32u/wrappers.c b/dlls/win32u/wrappers.c index e8d6ab55dfe..9ad14424c2a 100644 --- a/dlls/win32u/wrappers.c +++ b/dlls/win32u/wrappers.c @@ -24,12 +24,6 @@
static const struct unix_funcs *unix_funcs;
-BOOL WINAPI NtGdiAbortPath( HDC hdc ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtGdiAbortPath( hdc ); -} - BOOL WINAPI NtGdiAlphaBlend( HDC hdc_dst, int x_dst, int y_dst, int width_dst, int height_dst, HDC hdc_src, int x_src, int y_src, int width_src, int height_src, BLENDFUNCTION blend_function, HANDLE xform ) @@ -39,12 +33,6 @@ BOOL WINAPI NtGdiAlphaBlend( HDC hdc_dst, int x_dst, int y_dst, int width_dst, i x_src, y_src, width_src, height_src, blend_function, xform ); }
-BOOL WINAPI NtGdiBeginPath( HDC hdc ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtGdiBeginPath( hdc ); -} - BOOL WINAPI NtGdiBitBlt( HDC hdc_dst, INT x_dst, INT y_dst, INT width, INT height, HDC hdc_src, INT x_src, INT y_src, DWORD rop, DWORD bk_color, FLONG fl ) { @@ -53,12 +41,6 @@ BOOL WINAPI NtGdiBitBlt( HDC hdc_dst, INT x_dst, INT y_dst, INT width, INT heigh rop, bk_color, fl ); }
-BOOL WINAPI NtGdiCloseFigure( HDC hdc ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtGdiCloseFigure( hdc ); -} - BOOL WINAPI NtGdiComputeXformCoefficients( HDC hdc ) { if (!unix_funcs) return FALSE; @@ -106,12 +88,6 @@ LONG WINAPI NtGdiDoPalette( HGDIOBJ handle, WORD start, WORD count, void *entrie return unix_funcs->pNtGdiDoPalette( handle, start, count, entries, func, inbound ); }
-BOOL WINAPI NtGdiEndPath( HDC hdc ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtGdiEndPath( hdc ); -} - BOOL WINAPI NtUserEndPaint( HWND hwnd, const PAINTSTRUCT *ps ) { if (!unix_funcs) return FALSE; @@ -153,12 +129,6 @@ INT WINAPI NtGdiExtSelectClipRgn( HDC hdc, HRGN region, INT mode ) return unix_funcs->pNtGdiExtSelectClipRgn( hdc, region, mode ); }
-BOOL WINAPI NtGdiFillPath( HDC hdc ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtGdiFillPath( hdc ); -} - BOOL WINAPI NtGdiFontIsLinked( HDC hdc ) { if (!unix_funcs) return FALSE; @@ -412,12 +382,6 @@ HGDIOBJ WINAPI NtGdiSelectBrush( HDC hdc, HGDIOBJ handle ) return unix_funcs->pNtGdiSelectBrush( hdc, handle ); }
-BOOL WINAPI NtGdiSelectClipPath( HDC hdc, INT mode ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtGdiSelectClipPath( hdc, mode ); -} - HGDIOBJ WINAPI NtGdiSelectFont( HDC hdc, HGDIOBJ handle ) { if (!unix_funcs) return 0; @@ -487,18 +451,6 @@ INT WINAPI NtGdiStretchDIBitsInternal( HDC hdc, INT x_dst, INT y_dst, INT width_ coloruse, rop, max_info, max_bits, xform ); }
-BOOL WINAPI NtGdiStrokeAndFillPath( HDC hdc ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtGdiStrokeAndFillPath( hdc ); -} - -BOOL WINAPI NtGdiStrokePath( HDC hdc ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtGdiStrokePath( hdc ); -} - BOOL WINAPI NtGdiTransparentBlt( HDC hdc, int x_dst, int y_dst, int width_dst, int height_dst, HDC hdc_src, int x_src, int y_src, int width_src, int height_src, UINT color ) @@ -520,12 +472,6 @@ BOOL WINAPI NtGdiUpdateColors( HDC hdc ) return unix_funcs->pNtGdiUpdateColors( hdc ); }
-BOOL WINAPI NtGdiWidenPath( HDC hdc ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtGdiWidenPath( hdc ); -} - NTSTATUS WINAPI NtGdiDdDDICheckVidPnExclusiveOwnership( const D3DKMT_CHECKVIDPNEXCLUSIVEOWNERSHIP *desc ) { if (!unix_funcs) return STATUS_NOT_SUPPORTED; diff --git a/dlls/wow64win/gdi.c b/dlls/wow64win/gdi.c index dffca389804..e5915bfc949 100644 --- a/dlls/wow64win/gdi.c +++ b/dlls/wow64win/gdi.c @@ -63,6 +63,13 @@ NTSTATUS WINAPI wow64_NtGdiAbortDoc( UINT *args ) return NtGdiAbortDoc( hdc ); }
+NTSTATUS WINAPI wow64_NtGdiAbortPath( UINT *args ) +{ + HDC hdc = get_handle( &args ); + + return NtGdiAbortPath( hdc ); +} + NTSTATUS WINAPI wow64_NtGdiAddFontMemResourceEx( UINT *args ) { void *ptr = get_ptr( &args ); @@ -114,6 +121,20 @@ NTSTATUS WINAPI wow64_NtGdiArcInternal( UINT *args ) return NtGdiArcInternal( type, hdc, left, top, right, bottom, xstart, ystart, xend, yend ); }
+NTSTATUS WINAPI wow64_NtGdiBeginPath( UINT *args ) +{ + HDC hdc = get_handle( &args ); + + return NtGdiBeginPath( hdc ); +} + +NTSTATUS WINAPI wow64_NtGdiCloseFigure( UINT *args ) +{ + HDC hdc = get_handle( &args ); + + return NtGdiCloseFigure( hdc ); +} + NTSTATUS WINAPI wow64_NtGdiCombineRgn( UINT *args ) { HRGN dest = get_handle( &args ); @@ -378,6 +399,13 @@ NTSTATUS WINAPI wow64_NtGdiEndPage( UINT *args ) return NtGdiEndPage( hdc ); }
+NTSTATUS WINAPI wow64_NtGdiEndPath( UINT *args ) +{ + HDC hdc = get_handle( &args ); + + return NtGdiEndPath( hdc ); +} + NTSTATUS WINAPI wow64_NtGdiEqualRgn( UINT *args ) { HRGN hrgn1 = get_handle( &args ); @@ -518,6 +546,13 @@ NTSTATUS WINAPI wow64_NtGdiExtGetObjectW( UINT *args ) } }
+NTSTATUS WINAPI wow64_NtGdiFillPath( UINT *args ) +{ + HDC hdc = get_handle( &args ); + + return NtGdiFillPath( hdc ); +} + NTSTATUS WINAPI wow64_NtGdiFillRgn( UINT *args ) { HDC hdc = get_handle( &args ); @@ -875,6 +910,14 @@ NTSTATUS WINAPI wow64_NtGdiSaveDC( UINT *args ) return NtGdiSaveDC( hdc ); }
+NTSTATUS WINAPI wow64_NtGdiSelectClipPath( UINT *args ) +{ + HDC hdc = get_handle( &args ); + INT mode = get_ulong( &args ); + + return NtGdiSelectClipPath( hdc, mode ); +} + NTSTATUS WINAPI wow64_NtGdiSetBitmapBits( UINT *args ) { HBITMAP hbitmap = get_handle( &args ); @@ -1008,6 +1051,20 @@ NTSTATUS WINAPI wow64_NtGdiStartPage( UINT *args ) return NtGdiStartPage( hdc ); }
+NTSTATUS WINAPI wow64_NtGdiStrokeAndFillPath( UINT *args ) +{ + HDC hdc = get_handle( &args ); + + return NtGdiStrokeAndFillPath( hdc ); +} + +NTSTATUS WINAPI wow64_NtGdiStrokePath( UINT *args ) +{ + HDC hdc = get_handle( &args ); + + return NtGdiStrokePath( hdc ); +} + NTSTATUS WINAPI wow64_NtGdiSwapBuffers( UINT *args ) { HDC hdc = get_handle( &args ); @@ -1025,3 +1082,10 @@ NTSTATUS WINAPI wow64_NtGdiTransformPoints( UINT *args )
return NtGdiTransformPoints( hdc, points_in, points_out, count, mode ); } + +NTSTATUS WINAPI wow64_NtGdiWidenPath( UINT *args ) +{ + HDC hdc = get_handle( &args ); + + return NtGdiWidenPath( hdc ); +} diff --git a/dlls/wow64win/syscall.h b/dlls/wow64win/syscall.h index 7868984c4de..c2a9f1a05b7 100644 --- a/dlls/wow64win/syscall.h +++ b/dlls/wow64win/syscall.h @@ -23,10 +23,13 @@
#define ALL_WIN32_SYSCALLS \ SYSCALL_ENTRY( NtGdiAbortDoc ) \ + SYSCALL_ENTRY( NtGdiAbortPath ) \ SYSCALL_ENTRY( NtGdiAddFontMemResourceEx ) \ SYSCALL_ENTRY( NtGdiAddFontResourceW ) \ SYSCALL_ENTRY( NtGdiAngleArc ) \ SYSCALL_ENTRY( NtGdiArcInternal ) \ + SYSCALL_ENTRY( NtGdiBeginPath ) \ + SYSCALL_ENTRY( NtGdiCloseFigure ) \ SYSCALL_ENTRY( NtGdiCombineRgn ) \ SYSCALL_ENTRY( NtGdiCreateBitmap ) \ SYSCALL_ENTRY( NtGdiCreateClientObj ) \ @@ -51,11 +54,13 @@ SYSCALL_ENTRY( NtGdiEllipse ) \ SYSCALL_ENTRY( NtGdiEndDoc ) \ SYSCALL_ENTRY( NtGdiEndPage ) \ + SYSCALL_ENTRY( NtGdiEndPath ) \ SYSCALL_ENTRY( NtGdiEqualRgn ) \ SYSCALL_ENTRY( NtGdiExtCreatePen ) \ SYSCALL_ENTRY( NtGdiExtCreateRegion ) \ SYSCALL_ENTRY( NtGdiExtFloodFill ) \ SYSCALL_ENTRY( NtGdiExtGetObjectW ) \ + SYSCALL_ENTRY( NtGdiFillPath ) \ SYSCALL_ENTRY( NtGdiFillRgn ) \ SYSCALL_ENTRY( NtGdiFlattenPath ) \ SYSCALL_ENTRY( NtGdiFlush ) \ @@ -94,6 +99,7 @@ SYSCALL_ENTRY( NtGdiRemoveFontResourceW ) \ SYSCALL_ENTRY( NtGdiRoundRect ) \ SYSCALL_ENTRY( NtGdiSaveDC ) \ + SYSCALL_ENTRY( NtGdiSelectClipPath ) \ SYSCALL_ENTRY( NtGdiSetBitmapBits ) \ SYSCALL_ENTRY( NtGdiSetBitmapDimension ) \ SYSCALL_ENTRY( NtGdiSetBrushOrg ) \ @@ -107,8 +113,11 @@ SYSCALL_ENTRY( NtGdiSetVirtualResolution ) \ SYSCALL_ENTRY( NtGdiStartDoc ) \ SYSCALL_ENTRY( NtGdiStartPage ) \ + SYSCALL_ENTRY( NtGdiStrokeAndFillPath ) \ + SYSCALL_ENTRY( NtGdiStrokePath ) \ SYSCALL_ENTRY( NtGdiSwapBuffers ) \ SYSCALL_ENTRY( NtGdiTransformPoints ) \ + SYSCALL_ENTRY( NtGdiWidenPath ) \ SYSCALL_ENTRY( NtUserActivateKeyboardLayout ) \ SYSCALL_ENTRY( NtUserAddClipboardFormatListener ) \ SYSCALL_ENTRY( NtUserAssociateInputContext ) \
From: Jacek Caban jacek@codeweavers.com
--- dlls/gdi32/dc.c | 2 +- dlls/win32u/bitblt.c | 3 ++- dlls/win32u/cursoricon.c | 4 ++-- dlls/win32u/win32u_private.h | 2 +- dlls/win32u/wrappers.c | 2 +- dlls/wineandroid.drv/window.c | 3 ++- dlls/winemac.drv/window.c | 2 +- dlls/winex11.drv/window.c | 3 ++- include/ntgdi.h | 2 +- 9 files changed, 13 insertions(+), 10 deletions(-)
diff --git a/dlls/gdi32/dc.c b/dlls/gdi32/dc.c index 5ae7cc653d1..9a33e343f94 100644 --- a/dlls/gdi32/dc.c +++ b/dlls/gdi32/dc.c @@ -1967,7 +1967,7 @@ BOOL WINAPI GdiAlphaBlend( HDC hdc_dst, int x_dst, int y_dst, int width_dst, int return FALSE; return NtGdiAlphaBlend( hdc_dst, x_dst, y_dst, width_dst, height_dst, hdc_src, x_src, y_src, width_src, height_src, - blend_function, 0 /* FIXME */ ); + *(DWORD *)&blend_function, 0 /* FIXME */ ); }
/*********************************************************************** diff --git a/dlls/win32u/bitblt.c b/dlls/win32u/bitblt.c index 01ec347baad..8383a1d9dcd 100644 --- a/dlls/win32u/bitblt.c +++ b/dlls/win32u/bitblt.c @@ -955,8 +955,9 @@ error: */ BOOL WINAPI NtGdiAlphaBlend( HDC hdcDst, int xDst, int yDst, int widthDst, int heightDst, HDC hdcSrc, int xSrc, int ySrc, int widthSrc, int heightSrc, - BLENDFUNCTION blendFunction, HANDLE xform ) + DWORD blend_func, HANDLE xform ) { + BLENDFUNCTION blendFunction = *(BLENDFUNCTION *)&blend_func; BOOL ret = FALSE; DC *dcDst, *dcSrc;
diff --git a/dlls/win32u/cursoricon.c b/dlls/win32u/cursoricon.c index 5ae886187f2..bf4b1c3ac23 100644 --- a/dlls/win32u/cursoricon.c +++ b/dlls/win32u/cursoricon.c @@ -707,11 +707,11 @@ BOOL WINAPI NtUserDrawIconEx( HDC hdc, INT x0, INT y0, HICON icon, INT width, } if (alpha_blend) { - BLENDFUNCTION pixelblend = { AC_SRC_OVER, 0, 255, AC_SRC_ALPHA }; NtGdiSelectBitmap( mem_dc, obj->frame.alpha ); if (NtGdiAlphaBlend( hdc_dest, x, y, width, height, mem_dc, 0, 0, obj->frame.width, obj->frame.height, - pixelblend, 0 )) goto done; + MAKEFOURCC( AC_SRC_OVER, 0, 255, AC_SRC_ALPHA ), 0 )) + goto done; } }
diff --git a/dlls/win32u/win32u_private.h b/dlls/win32u/win32u_private.h index 6088321599e..6e361973f0e 100644 --- a/dlls/win32u/win32u_private.h +++ b/dlls/win32u/win32u_private.h @@ -37,7 +37,7 @@ struct unix_funcs /* win32u functions */ BOOL (WINAPI *pNtGdiAlphaBlend)( HDC hdc_dst, int x_dst, int y_dst, int width_dst, int height_dst, HDC hdc_src, int x_src, int y_src, int width_src, int height_src, - BLENDFUNCTION blend_function, HANDLE xform ); + DWORD blend_function, HANDLE xform ); BOOL (WINAPI *pNtGdiBitBlt)( HDC hdc_dst, INT x_dst, INT y_dst, INT width, INT height, HDC hdc_src, INT x_src, INT y_src, DWORD rop, DWORD bk_color, FLONG fl ); BOOL (WINAPI *pNtGdiComputeXformCoefficients)( HDC hdc ); diff --git a/dlls/win32u/wrappers.c b/dlls/win32u/wrappers.c index 9ad14424c2a..b720f561474 100644 --- a/dlls/win32u/wrappers.c +++ b/dlls/win32u/wrappers.c @@ -26,7 +26,7 @@ static const struct unix_funcs *unix_funcs;
BOOL WINAPI NtGdiAlphaBlend( HDC hdc_dst, int x_dst, int y_dst, int width_dst, int height_dst, HDC hdc_src, int x_src, int y_src, int width_src, int height_src, - BLENDFUNCTION blend_function, HANDLE xform ) + DWORD blend_function, HANDLE xform ) { if (!unix_funcs) return FALSE; return unix_funcs->pNtGdiAlphaBlend( hdc_dst, x_dst, y_dst, width_dst, height_dst, hdc_src, diff --git a/dlls/wineandroid.drv/window.c b/dlls/wineandroid.drv/window.c index f01df37a400..533983ecf1e 100644 --- a/dlls/wineandroid.drv/window.c +++ b/dlls/wineandroid.drv/window.c @@ -1613,10 +1613,11 @@ BOOL ANDROID_UpdateLayeredWindow( HWND hwnd, const UPDATELAYEREDWINDOWINFO *info if (info->pptSrc) OffsetRect( &src_rect, info->pptSrc->x, info->pptSrc->y ); NtGdiTransformPoints( info->hdcSrc, (POINT *)&src_rect, (POINT *)&src_rect, 2, NtGdiDPtoLP );
+ if (info->dwFlags & ULW_ALPHA) blend = *info->pblend; ret = NtGdiAlphaBlend( hdc, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, info->hdcSrc, src_rect.left, src_rect.top, src_rect.right - src_rect.left, src_rect.bottom - src_rect.top, - (info->dwFlags & ULW_ALPHA) ? *info->pblend : blend, 0 ); + *(DWORD *)&blend, 0 ); if (ret) { memcpy( dst_bits, src_bits, bmi->bmiHeader.biSizeImage ); diff --git a/dlls/winemac.drv/window.c b/dlls/winemac.drv/window.c index 104100a0770..c35e92b3e2a 100644 --- a/dlls/winemac.drv/window.c +++ b/dlls/winemac.drv/window.c @@ -1972,7 +1972,7 @@ BOOL macdrv_UpdateLayeredWindow(HWND hwnd, const UPDATELAYEREDWINDOWINFO *info, if (!(ret = NtGdiAlphaBlend(hdc, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, info->hdcSrc, src_rect.left, src_rect.top, src_rect.right - src_rect.left, src_rect.bottom - src_rect.top, - blend, 0))) + *(DWORD *)&blend, 0))) goto done;
if ((data = get_win_data(hwnd))) diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index 3b49b7e1d08..8399a816fa7 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -2948,10 +2948,11 @@ BOOL X11DRV_UpdateLayeredWindow( HWND hwnd, const UPDATELAYEREDWINDOWINFO *info, if (info->pptSrc) OffsetRect( &src_rect, info->pptSrc->x, info->pptSrc->y ); NtGdiTransformPoints( info->hdcSrc, (POINT *)&src_rect, (POINT *)&src_rect, 2, NtGdiDPtoLP );
+ if (info->dwFlags & ULW_ALPHA) blend = *info->pblend; ret = NtGdiAlphaBlend( hdc, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, info->hdcSrc, src_rect.left, src_rect.top, src_rect.right - src_rect.left, src_rect.bottom - src_rect.top, - (info->dwFlags & ULW_ALPHA) ? *info->pblend : blend, 0 ); + *(DWORD *)&blend, 0 ); if (ret) { memcpy( dst_bits, src_bits, bmi->bmiHeader.biSizeImage ); diff --git a/include/ntgdi.h b/include/ntgdi.h index 918a5c5d7b3..0f989189045 100644 --- a/include/ntgdi.h +++ b/include/ntgdi.h @@ -250,7 +250,7 @@ INT WINAPI NtGdiAddFontResourceW( const WCHAR *str, ULONG size, ULONG files DWORD tid, void *dv ); BOOL WINAPI NtGdiAlphaBlend( HDC hdc_dst, int x_dst, int y_dst, int width_dst, int height_dst, HDC hdc_src, int x_src, int y_src, int width_src, int height_src, - BLENDFUNCTION blend_function, HANDLE xform ); + DWORD blend_function, HANDLE xform ); BOOL WINAPI NtGdiAngleArc( HDC hdc, INT x, INT y, DWORD radius, DWORD start_angle, DWORD sweep_angle ); BOOL WINAPI NtGdiArcInternal( UINT type, HDC hdc, INT left, INT top, INT right, INT bottom,
From: Jacek Caban jacek@codeweavers.com
--- dlls/win32u/gdiobj.c | 11 --- dlls/win32u/syscall.c | 11 +++ dlls/win32u/win32u.spec | 22 ++--- dlls/win32u/win32u_private.h | 24 ----- dlls/win32u/wrappers.c | 85 ------------------ dlls/wow64win/gdi.c | 164 +++++++++++++++++++++++++++++++++++ dlls/wow64win/syscall.h | 11 +++ 7 files changed, 197 insertions(+), 131 deletions(-)
diff --git a/dlls/win32u/gdiobj.c b/dlls/win32u/gdiobj.c index c78b8850e91..1df4c83ed55 100644 --- a/dlls/win32u/gdiobj.c +++ b/dlls/win32u/gdiobj.c @@ -1030,9 +1030,6 @@ BOOL WINAPI NtGdiSetColorAdjustment( HDC hdc, const COLORADJUSTMENT *ca )
static struct unix_funcs unix_funcs = { - NtGdiAlphaBlend, - NtGdiBitBlt, - NtGdiComputeXformCoefficients, NtGdiCreateCompatibleBitmap, NtGdiCreateCompatibleDC, NtGdiCreateDIBitmapInternal, @@ -1079,18 +1076,12 @@ static struct unix_funcs unix_funcs = NtGdiGetTextFaceW, NtGdiGetTextMetricsW, NtGdiIntersectClipRect, - NtGdiMaskBlt, - NtGdiModifyWorldTransform, NtGdiOffsetClipRgn, - NtGdiPatBlt, - NtGdiPlgBlt, NtGdiPtVisible, NtGdiRectVisible, NtGdiResetDC, NtGdiResizePalette, NtGdiRestoreDC, - NtGdiScaleViewportExtEx, - NtGdiScaleWindowExtEx, NtGdiSelectBitmap, NtGdiSelectBrush, NtGdiSelectFont, @@ -1100,9 +1091,7 @@ static struct unix_funcs unix_funcs = NtGdiSetDeviceGammaRamp, NtGdiSetLayout, NtGdiSetSystemPaletteUse, - NtGdiStretchBlt, NtGdiStretchDIBitsInternal, - NtGdiTransparentBlt, NtGdiUnrealizeObject, NtGdiUpdateColors, NtUserDrawCaptionTemp, diff --git a/dlls/win32u/syscall.c b/dlls/win32u/syscall.c index d3ff0a7696f..40229632d16 100644 --- a/dlls/win32u/syscall.c +++ b/dlls/win32u/syscall.c @@ -40,11 +40,14 @@ static void * const syscalls[] = NtGdiAbortPath, NtGdiAddFontMemResourceEx, NtGdiAddFontResourceW, + NtGdiAlphaBlend, NtGdiAngleArc, NtGdiArcInternal, NtGdiBeginPath, + NtGdiBitBlt, NtGdiCloseFigure, NtGdiCombineRgn, + NtGdiComputeXformCoefficients, NtGdiCreateBitmap, NtGdiCreateClientObj, NtGdiCreateDIBBrush, @@ -100,10 +103,14 @@ static void * const syscalls[] = NtGdiInitSpool, NtGdiInvertRgn, NtGdiLineTo, + NtGdiMaskBlt, + NtGdiModifyWorldTransform, NtGdiMoveTo, NtGdiOffsetRgn, NtGdiOpenDCW, + NtGdiPatBlt, NtGdiPathToRegion, + NtGdiPlgBlt, NtGdiPolyDraw, NtGdiPolyPolyDraw, NtGdiPtInRegion, @@ -113,6 +120,8 @@ static void * const syscalls[] = NtGdiRemoveFontResourceW, NtGdiRoundRect, NtGdiSaveDC, + NtGdiScaleViewportExtEx, + NtGdiScaleWindowExtEx, NtGdiSelectClipPath, NtGdiSetBitmapBits, NtGdiSetBitmapDimension, @@ -127,10 +136,12 @@ static void * const syscalls[] = NtGdiSetVirtualResolution, NtGdiStartDoc, NtGdiStartPage, + NtGdiStretchBlt, NtGdiStrokeAndFillPath, NtGdiStrokePath, NtGdiSwapBuffers, NtGdiTransformPoints, + NtGdiTransparentBlt, NtGdiWidenPath, NtUserActivateKeyboardLayout, NtUserAddClipboardFormatListener, diff --git a/dlls/win32u/win32u.spec b/dlls/win32u/win32u.spec index 0bf64260561..cdd39aebf8a 100644 --- a/dlls/win32u/win32u.spec +++ b/dlls/win32u/win32u.spec @@ -112,7 +112,7 @@ @ stub NtGdiAddInitialFonts @ stub NtGdiAddRemoteFontToDC @ stub NtGdiAddRemoteMMInstanceToDC -@ stdcall NtGdiAlphaBlend(long long long long long long long long long long long ptr) +@ stdcall -syscall NtGdiAlphaBlend(long long long long long long long long long long long ptr) @ stdcall -syscall NtGdiAngleArc(long long long long long long) @ stub NtGdiAnyLinkedFonts @ stdcall -syscall NtGdiArcInternal(long long long long long long long long long long) @@ -123,7 +123,7 @@ @ stub NtGdiBRUSHOBJ_ulGetBrushColor @ stub NtGdiBeginGdiRendering @ stdcall -syscall NtGdiBeginPath(long) -@ stdcall NtGdiBitBlt(long long long long long long long long long long long) +@ stdcall -syscall NtGdiBitBlt(long long long long long long long long long long long) @ stub NtGdiCLIPOBJ_bEnum @ stub NtGdiCLIPOBJ_cEnumStart @ stub NtGdiCLIPOBJ_ppoGetPath @@ -136,7 +136,7 @@ @ stub NtGdiColorCorrectPalette @ stdcall -syscall NtGdiCombineRgn(long long long long) @ stub NtGdiCombineTransform -@ stdcall NtGdiComputeXformCoefficients(long) +@ stdcall -syscall NtGdiComputeXformCoefficients(long) @ stub NtGdiConfigureOPMProtectedOutput @ stub NtGdiConvertMetafileRect @ stdcall -syscall NtGdiCreateBitmap(long long long long ptr) @@ -540,9 +540,9 @@ @ stub NtGdiMakeInfoDC @ stub NtGdiMakeObjectUnXferable @ stub NtGdiMakeObjectXferable -@ stdcall NtGdiMaskBlt(long long long long long long long long long long long long long) +@ stdcall -syscall NtGdiMaskBlt(long long long long long long long long long long long long long) @ stub NtGdiMirrorWindowOrg -@ stdcall NtGdiModifyWorldTransform(long ptr long) +@ stdcall -syscall NtGdiModifyWorldTransform(long ptr long) @ stub NtGdiMonoBitmap @ stdcall -syscall NtGdiMoveTo(long long long ptr) @ stdcall NtGdiOffsetClipRgn(long long long) @@ -553,9 +553,9 @@ @ stub NtGdiPATHOBJ_vEnumStart @ stub NtGdiPATHOBJ_vEnumStartClipLines @ stub NtGdiPATHOBJ_vGetBounds -@ stdcall NtGdiPatBlt(long long long long long long) +@ stdcall -syscall NtGdiPatBlt(long long long long long long) @ stdcall -syscall NtGdiPathToRegion(long) -@ stdcall NtGdiPlgBlt(long ptr long long long long long long long long long) +@ stdcall -syscall NtGdiPlgBlt(long ptr long long long long long long long long long) @ stdcall -syscall NtGdiPolyDraw(long ptr ptr long) @ stub NtGdiPolyPatBlt @ stdcall -syscall NtGdiPolyPolyDraw(long ptr ptr long long) @@ -582,8 +582,8 @@ @ stdcall -syscall NtGdiSaveDC(long) @ stub NtGdiScaleRgn @ stub NtGdiScaleValues -@ stdcall NtGdiScaleViewportExtEx(long long long long long ptr) -@ stdcall NtGdiScaleWindowExtEx(long long long long long ptr) +@ stdcall -syscall NtGdiScaleViewportExtEx(long long long long long ptr) +@ stdcall -syscall NtGdiScaleWindowExtEx(long long long long long ptr) @ stdcall NtGdiSelectBitmap(long long) @ stdcall NtGdiSelectBrush(long long) @ stdcall -syscall NtGdiSelectClipPath(long long) @@ -620,13 +620,13 @@ @ stdcall -syscall NtGdiSetVirtualResolution(long long long long long) @ stdcall -syscall NtGdiStartDoc(long ptr ptr long) @ stdcall -syscall NtGdiStartPage(long) -@ stdcall NtGdiStretchBlt(long long long long long long long long long long long long) +@ stdcall -syscall NtGdiStretchBlt(long long long long long long long long long long long long) @ stdcall NtGdiStretchDIBitsInternal(long long long long long long long long long ptr ptr long long long long long) @ stdcall -syscall NtGdiStrokeAndFillPath(long) @ stdcall -syscall NtGdiStrokePath(long) @ stdcall -syscall NtGdiSwapBuffers(long) @ stdcall -syscall NtGdiTransformPoints(long ptr ptr long long) -@ stdcall NtGdiTransparentBlt(long long long long long long long long long long long) +@ stdcall -syscall NtGdiTransparentBlt(long long long long long long long long long long long) @ stub NtGdiUMPDEngFreeUserMem @ stub NtGdiUnloadPrinterDriver @ stub NtGdiUnmapMemFont diff --git a/dlls/win32u/win32u_private.h b/dlls/win32u/win32u_private.h index 6e361973f0e..ebfe18fcbc2 100644 --- a/dlls/win32u/win32u_private.h +++ b/dlls/win32u/win32u_private.h @@ -35,12 +35,6 @@ struct unix_funcs { /* win32u functions */ - BOOL (WINAPI *pNtGdiAlphaBlend)( HDC hdc_dst, int x_dst, int y_dst, int width_dst, int height_dst, - HDC hdc_src, int x_src, int y_src, int width_src, int height_src, - DWORD blend_function, HANDLE xform ); - BOOL (WINAPI *pNtGdiBitBlt)( HDC hdc_dst, INT x_dst, INT y_dst, INT width, INT height, HDC hdc_src, - INT x_src, INT y_src, DWORD rop, DWORD bk_color, FLONG fl ); - BOOL (WINAPI *pNtGdiComputeXformCoefficients)( HDC hdc ); HBITMAP (WINAPI *pNtGdiCreateCompatibleBitmap)( HDC hdc, INT width, INT height ); HDC (WINAPI *pNtGdiCreateCompatibleDC)( HDC hdc ); HBITMAP (WINAPI *pNtGdiCreateDIBitmapInternal)( HDC hdc, INT width, INT height, DWORD init, @@ -103,25 +97,13 @@ struct unix_funcs INT (WINAPI *pNtGdiGetTextFaceW)( HDC hdc, INT count, WCHAR *name, BOOL alias_name ); BOOL (WINAPI *pNtGdiGetTextMetricsW)( HDC hdc, TEXTMETRICW *metrics, ULONG flags ); INT (WINAPI *pNtGdiIntersectClipRect)( HDC hdc, INT left, INT top, INT right, INT bottom ); - BOOL (WINAPI *pNtGdiMaskBlt)( HDC hdc, INT x_dst, INT y_dst, INT width_dst, INT height_dst, - HDC hdc_src, INT x_src, INT y_src, HBITMAP mask, - INT x_mask, INT y_mask, DWORD rop, DWORD bk_color ); - BOOL (WINAPI *pNtGdiModifyWorldTransform)( HDC hdc, const XFORM *xform, DWORD mode ); INT (WINAPI *pNtGdiOffsetClipRgn)( HDC hdc, INT x, INT y ); - BOOL (WINAPI *pNtGdiPatBlt)( HDC hdc, INT left, INT top, INT width, INT height, DWORD rop ); - BOOL (WINAPI *pNtGdiPlgBlt)( HDC hdc, const POINT *point, HDC hdc_src, INT x_src, INT y_src, - INT width, INT height, HBITMAP mask, INT x_mask, INT y_mask, - DWORD bk_color ); BOOL (WINAPI *pNtGdiPtVisible)( HDC hdc, INT x, INT y ); BOOL (WINAPI *pNtGdiRectVisible)( HDC hdc, const RECT *rect ); BOOL (WINAPI *pNtGdiResetDC)( HDC hdc, const DEVMODEW *devmode, BOOL *banding, DRIVER_INFO_2W *driver_info, void *dev ); BOOL (WINAPI *pNtGdiResizePalette)( HPALETTE palette, UINT count ); BOOL (WINAPI *pNtGdiRestoreDC)( HDC hdc, INT level ); - BOOL (WINAPI *pNtGdiScaleViewportExtEx)( HDC hdc, INT x_num, INT x_denom, - INT y_num, INT y_denom, SIZE *size ); - BOOL (WINAPI *pNtGdiScaleWindowExtEx)( HDC hdc, INT x_num, INT x_denom, - INT y_num, INT y_denom, SIZE *size ); HGDIOBJ (WINAPI *pNtGdiSelectBitmap)( HDC hdc, HGDIOBJ handle ); HGDIOBJ (WINAPI *pNtGdiSelectBrush)( HDC hdc, HGDIOBJ handle ); HGDIOBJ (WINAPI *pNtGdiSelectFont)( HDC hdc, HGDIOBJ handle ); @@ -135,17 +117,11 @@ struct unix_funcs BOOL (WINAPI *pNtGdiSetDeviceGammaRamp)( HDC hdc, void *ptr ); DWORD (WINAPI *pNtGdiSetLayout)( HDC hdc, LONG wox, DWORD layout ); UINT (WINAPI *pNtGdiSetSystemPaletteUse)( HDC hdc, UINT use ); - BOOL (WINAPI *pNtGdiStretchBlt)( HDC hdc, INT x_dst, INT y_dst, INT width_dst, INT height_dst, - HDC hdc_src, INT x_src, INT y_src, INT width_src, INT height_src, - DWORD rop, COLORREF bk_color ); INT (WINAPI *pNtGdiStretchDIBitsInternal)( HDC hdc, INT x_dst, INT y_dst, INT width_dst, INT height_dst, INT x_src, INT y_src, INT width_src, INT height_src, const void *bits, const BITMAPINFO *bmi, UINT coloruse, DWORD rop, UINT max_info, UINT max_bits, HANDLE xform ); - BOOL (WINAPI *pNtGdiTransparentBlt)( HDC hdc, int x_dst, int y_dst, int width_dst, int height_dst, - HDC hdc_src, int x_src, int y_src, int width_src, int height_src, - UINT color ); BOOL (WINAPI *pNtGdiUnrealizeObject)( HGDIOBJ obj ); BOOL (WINAPI *pNtGdiUpdateColors)( HDC hdc ); BOOL (WINAPI *pNtUserDrawCaptionTemp)( HWND hwnd, HDC hdc, const RECT *rect, HFONT font, diff --git a/dlls/win32u/wrappers.c b/dlls/win32u/wrappers.c index b720f561474..4cd756fd575 100644 --- a/dlls/win32u/wrappers.c +++ b/dlls/win32u/wrappers.c @@ -24,29 +24,6 @@
static const struct unix_funcs *unix_funcs;
-BOOL WINAPI NtGdiAlphaBlend( HDC hdc_dst, int x_dst, int y_dst, int width_dst, int height_dst, - HDC hdc_src, int x_src, int y_src, int width_src, int height_src, - DWORD blend_function, HANDLE xform ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtGdiAlphaBlend( hdc_dst, x_dst, y_dst, width_dst, height_dst, hdc_src, - x_src, y_src, width_src, height_src, blend_function, xform ); -} - -BOOL WINAPI NtGdiBitBlt( HDC hdc_dst, INT x_dst, INT y_dst, INT width, INT height, HDC hdc_src, - INT x_src, INT y_src, DWORD rop, DWORD bk_color, FLONG fl ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtGdiBitBlt( hdc_dst, x_dst, y_dst, width, height, hdc_src, x_src, y_src, - rop, bk_color, fl ); -} - -BOOL WINAPI NtGdiComputeXformCoefficients( HDC hdc ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtGdiComputeXformCoefficients( hdc ); -} - HBITMAP WINAPI NtGdiCreateCompatibleBitmap( HDC hdc, INT width, INT height ) { if (!unix_funcs) return 0; @@ -289,42 +266,12 @@ INT WINAPI NtGdiIntersectClipRect( HDC hdc, INT left, INT top, INT right, INT bo return unix_funcs->pNtGdiIntersectClipRect( hdc, left, top, right, bottom ); }
-BOOL WINAPI NtGdiMaskBlt( HDC hdc, INT x_dst, INT y_dst, INT width_dst, INT height_dst, - HDC hdc_src, INT x_src, INT y_src, HBITMAP mask, - INT x_mask, INT y_mask, DWORD rop, DWORD bk_color ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtGdiMaskBlt( hdc, x_dst, y_dst, width_dst, height_dst, hdc_src, - x_src, y_src, mask, x_mask, y_mask, rop, bk_color ); -} - -BOOL WINAPI NtGdiModifyWorldTransform( HDC hdc, const XFORM *xform, DWORD mode ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtGdiModifyWorldTransform( hdc, xform, mode ); -} - INT WINAPI NtGdiOffsetClipRgn( HDC hdc, INT x, INT y ) { if (!unix_funcs) return ERROR; return unix_funcs->pNtGdiOffsetClipRgn( hdc, x, y ); }
-BOOL WINAPI NtGdiPatBlt( HDC hdc, INT left, INT top, INT width, INT height, DWORD rop ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtGdiPatBlt( hdc, left, top, width, height, rop ); -} - -BOOL WINAPI NtGdiPlgBlt( HDC hdc, const POINT *point, HDC hdc_src, INT x_src, INT y_src, - INT width, INT height, HBITMAP mask, INT x_mask, INT y_mask, - DWORD bk_color ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtGdiPlgBlt( hdc, point, hdc_src, x_src, y_src, width, height, mask, - x_mask, y_mask, bk_color ); -} - BOOL WINAPI NtGdiPtVisible( HDC hdc, INT x, INT y ) { if (!unix_funcs) return FALSE; @@ -356,20 +303,6 @@ BOOL WINAPI NtGdiRestoreDC( HDC hdc, INT level ) return unix_funcs->pNtGdiRestoreDC( hdc, level ); }
-BOOL WINAPI NtGdiScaleViewportExtEx( HDC hdc, INT x_num, INT x_denom, - INT y_num, INT y_denom, SIZE *size ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtGdiScaleViewportExtEx( hdc, x_num, x_denom, y_num, y_denom, size ); -} - -BOOL WINAPI NtGdiScaleWindowExtEx( HDC hdc, INT x_num, INT x_denom, - INT y_num, INT y_denom, SIZE *size ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtGdiScaleWindowExtEx( hdc, x_num, x_denom, y_num, y_denom, size ); -} - HGDIOBJ WINAPI NtGdiSelectBitmap( HDC hdc, HGDIOBJ handle ) { if (!unix_funcs) return 0; @@ -430,15 +363,6 @@ UINT WINAPI NtGdiSetSystemPaletteUse( HDC hdc, UINT use ) return unix_funcs->pNtGdiSetSystemPaletteUse( hdc, use ); }
-BOOL WINAPI NtGdiStretchBlt( HDC hdc, INT x_dst, INT y_dst, INT width_dst, INT height_dst, - HDC hdc_src, INT x_src, INT y_src, INT width_src, INT height_src, - DWORD rop, COLORREF bk_color ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtGdiStretchBlt( hdc, x_dst, y_dst, width_dst, height_dst, hdc_src, - x_src, y_src, width_src, height_src, rop, bk_color ); -} - INT WINAPI NtGdiStretchDIBitsInternal( HDC hdc, INT x_dst, INT y_dst, INT width_dst, INT height_dst, INT x_src, INT y_src, INT width_src, INT height_src, const void *bits, const BITMAPINFO *bmi, @@ -451,15 +375,6 @@ INT WINAPI NtGdiStretchDIBitsInternal( HDC hdc, INT x_dst, INT y_dst, INT width_ coloruse, rop, max_info, max_bits, xform ); }
-BOOL WINAPI NtGdiTransparentBlt( HDC hdc, int x_dst, int y_dst, int width_dst, int height_dst, - HDC hdc_src, int x_src, int y_src, int width_src, int height_src, - UINT color ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtGdiTransparentBlt( hdc, x_dst, y_dst, width_dst, height_dst, hdc_src, - x_src, y_src, width_src, height_src, color ); -} - BOOL WINAPI NtGdiUnrealizeObject( HGDIOBJ obj ) { if (!unix_funcs) return FALSE; diff --git a/dlls/wow64win/gdi.c b/dlls/wow64win/gdi.c index e5915bfc949..d6006adf8d1 100644 --- a/dlls/wow64win/gdi.c +++ b/dlls/wow64win/gdi.c @@ -93,6 +93,25 @@ NTSTATUS WINAPI wow64_NtGdiAddFontResourceW( UINT *args ) return NtGdiAddFontResourceW( str, size, files, flags, tid, dv ); }
+NTSTATUS WINAPI wow64_NtGdiAlphaBlend( UINT *args ) +{ + HDC hdc_dst = get_handle( &args ); + int x_dst = get_ulong( &args ); + int y_dst = get_ulong( &args ); + int width_dst = get_ulong( &args ); + int height_dst = get_ulong( &args ); + HDC hdc_src = get_handle( &args ); + int x_src = get_ulong( &args ); + int y_src = get_ulong( &args ); + int width_src = get_ulong( &args ); + int height_src = get_ulong( &args ); + DWORD blend_function = get_ulong( &args ); + HANDLE xform = get_handle( &args ); + + return NtGdiAlphaBlend( hdc_dst, x_dst, y_dst, width_dst, height_dst, hdc_src, + x_src, y_src, width_src, height_src, blend_function, xform ); +} + NTSTATUS WINAPI wow64_NtGdiAngleArc( UINT *args ) { HDC hdc = get_handle( &args ); @@ -128,6 +147,24 @@ NTSTATUS WINAPI wow64_NtGdiBeginPath( UINT *args ) return NtGdiBeginPath( hdc ); }
+NTSTATUS WINAPI wow64_NtGdiBitBlt( UINT *args ) +{ + HDC hdc_dst = get_handle( &args ); + INT x_dst = get_ulong( &args ); + INT y_dst = get_ulong( &args ); + INT width = get_ulong( &args ); + INT height = get_ulong( &args ); + HDC hdc_src = get_handle( &args ); + INT x_src = get_ulong( &args ); + INT y_src = get_ulong( &args ); + DWORD rop = get_ulong( &args ); + DWORD bk_color = get_ulong( &args ); + FLONG fl = get_ulong( &args ); + + return NtGdiBitBlt( hdc_dst, x_dst, y_dst, width, height, hdc_src, + x_src, y_src, rop, bk_color, fl ); +} + NTSTATUS WINAPI wow64_NtGdiCloseFigure( UINT *args ) { HDC hdc = get_handle( &args ); @@ -145,6 +182,13 @@ NTSTATUS WINAPI wow64_NtGdiCombineRgn( UINT *args ) return NtGdiCombineRgn( dest, src1, src2, mode ); }
+NTSTATUS WINAPI wow64_NtGdiComputeXformCoefficients( UINT *args ) +{ + HDC hdc = get_handle( &args ); + + return NtGdiComputeXformCoefficients( hdc ); +} + NTSTATUS WINAPI wow64_NtGdiCreateBitmap( UINT *args ) { INT width = get_ulong( &args ); @@ -719,6 +763,35 @@ NTSTATUS WINAPI wow64_NtGdiLineTo( UINT *args ) return NtGdiLineTo( hdc, x, y ); }
+NTSTATUS WINAPI wow64_NtGdiMaskBlt( UINT *args ) +{ + HDC hdc = get_handle( &args ); + INT x_dst = get_ulong( &args ); + INT y_dst = get_ulong( &args ); + INT width_dst = get_ulong( &args ); + INT height_dst = get_ulong( &args ); + HDC hdc_src = get_handle( &args ); + INT x_src = get_ulong( &args ); + INT y_src = get_ulong( &args ); + HBITMAP mask = get_handle( &args ); + INT x_mask = get_ulong( &args ); + INT y_mask = get_ulong( &args ); + DWORD rop = get_ulong( &args ); + DWORD bk_color = get_ulong( &args ); + + return NtGdiMaskBlt( hdc, x_dst, y_dst, width_dst, height_dst, hdc_src, + x_src, y_src, mask, x_mask, y_mask, rop, bk_color ); +} + +NTSTATUS WINAPI wow64_NtGdiModifyWorldTransform( UINT *args ) +{ + HDC hdc = get_handle( &args ); + const XFORM *xform = get_ptr( &args ); + DWORD mode = get_ulong( &args ); + + return NtGdiModifyWorldTransform( hdc, xform, mode ); +} + NTSTATUS WINAPI wow64_NtGdiMoveTo( UINT *args ) { HDC hdc = get_handle( &args ); @@ -860,6 +933,18 @@ NTSTATUS WINAPI wow64_NtGdiOpenDCW( UINT *args ) return HandleToUlong( ret ); }
+NTSTATUS WINAPI wow64_NtGdiPatBlt( UINT *args ) +{ + HDC hdc = get_handle( &args ); + INT left = get_ulong( &args ); + INT top = get_ulong( &args ); + INT width = get_ulong( &args ); + INT height = get_ulong( &args ); + DWORD rop = get_ulong( &args ); + + return NtGdiPatBlt( hdc, left, top, width, height, rop ); +} + NTSTATUS WINAPI wow64_NtGdiPathToRegion( UINT *args ) { HDC hdc = get_handle( &args ); @@ -867,6 +952,24 @@ NTSTATUS WINAPI wow64_NtGdiPathToRegion( UINT *args ) return HandleToUlong( NtGdiPathToRegion( hdc )); }
+NTSTATUS WINAPI wow64_NtGdiPlgBlt( UINT *args ) +{ + HDC hdc = get_handle( &args ); + const POINT *point = get_ptr( &args ); + HDC hdc_src = get_handle( &args ); + INT x_src = get_ulong( &args ); + INT y_src = get_ulong( &args ); + INT width = get_ulong( &args ); + INT height = get_ulong( &args ); + HBITMAP mask = get_handle( &args ); + INT x_mask = get_ulong( &args ); + INT y_mask = get_ulong( &args ); + DWORD bk_color = get_ulong( &args ); + + return NtGdiPlgBlt( hdc, point, hdc_src, x_src, y_src, width, height, + mask, x_mask, y_mask, bk_color ); +} + NTSTATUS WINAPI wow64_NtGdiPtInRegion( UINT *args ) { HRGN hrgn = get_handle( &args ); @@ -910,6 +1013,30 @@ NTSTATUS WINAPI wow64_NtGdiSaveDC( UINT *args ) return NtGdiSaveDC( hdc ); }
+NTSTATUS WINAPI wow64_NtGdiScaleViewportExtEx( UINT *args ) +{ + HDC hdc = get_handle( &args ); + INT x_num = get_ulong( &args ); + INT x_denom = get_ulong( &args ); + INT y_num = get_ulong( &args ); + INT y_denom = get_ulong( &args ); + SIZE *size = get_ptr( &args ); + + return NtGdiScaleViewportExtEx( hdc, x_num, x_denom, y_num, y_denom, size ); +} + +NTSTATUS WINAPI wow64_NtGdiScaleWindowExtEx( UINT *args ) +{ + HDC hdc = get_handle( &args ); + INT x_num = get_ulong( &args ); + INT x_denom = get_ulong( &args ); + INT y_num = get_ulong( &args ); + INT y_denom = get_ulong( &args ); + SIZE *size = get_ptr( &args ); + + return NtGdiScaleWindowExtEx( hdc, x_num, x_denom, y_num, y_denom, size ); +} + NTSTATUS WINAPI wow64_NtGdiSelectClipPath( UINT *args ) { HDC hdc = get_handle( &args ); @@ -1051,6 +1178,25 @@ NTSTATUS WINAPI wow64_NtGdiStartPage( UINT *args ) return NtGdiStartPage( hdc ); }
+NTSTATUS WINAPI wow64_NtGdiStretchBlt( UINT *args ) +{ + HDC hdc = get_handle( &args ); + INT x_dst = get_ulong( &args ); + INT y_dst = get_ulong( &args ); + INT width_dst = get_ulong( &args ); + INT height_dst = get_ulong( &args ); + HDC hdc_src = get_handle( &args ); + INT x_src = get_ulong( &args ); + INT y_src = get_ulong( &args ); + INT width_src = get_ulong( &args ); + INT height_src = get_ulong( &args ); + DWORD rop = get_ulong( &args ); + COLORREF bk_color = get_ulong( &args ); + + return NtGdiStretchBlt( hdc, x_dst, y_dst, width_dst, height_dst, hdc_src, + x_src, y_src, width_src, height_src, rop, bk_color ); +} + NTSTATUS WINAPI wow64_NtGdiStrokeAndFillPath( UINT *args ) { HDC hdc = get_handle( &args ); @@ -1072,6 +1218,24 @@ NTSTATUS WINAPI wow64_NtGdiSwapBuffers( UINT *args ) return NtGdiSwapBuffers( hdc ); }
+NTSTATUS WINAPI wow64_NtGdiTransparentBlt( UINT *args ) +{ + HDC hdc = get_handle( &args ); + int x_dst = get_ulong( &args ); + int y_dst = get_ulong( &args ); + int width_dst = get_ulong( &args ); + int height_dst = get_ulong( &args ); + HDC hdc_src = get_handle( &args ); + int x_src = get_ulong( &args ); + int y_src = get_ulong( &args ); + int width_src = get_ulong( &args ); + int height_src = get_ulong( &args ); + UINT color = get_ulong( &args ); + + return NtGdiTransparentBlt( hdc, x_dst, y_dst, width_dst, height_dst, hdc_src, + x_src, y_src, width_src, height_src, color ); +} + NTSTATUS WINAPI wow64_NtGdiTransformPoints( UINT *args ) { HDC hdc = get_handle( &args ); diff --git a/dlls/wow64win/syscall.h b/dlls/wow64win/syscall.h index c2a9f1a05b7..1f925757eb6 100644 --- a/dlls/wow64win/syscall.h +++ b/dlls/wow64win/syscall.h @@ -26,11 +26,14 @@ SYSCALL_ENTRY( NtGdiAbortPath ) \ SYSCALL_ENTRY( NtGdiAddFontMemResourceEx ) \ SYSCALL_ENTRY( NtGdiAddFontResourceW ) \ + SYSCALL_ENTRY( NtGdiAlphaBlend ) \ SYSCALL_ENTRY( NtGdiAngleArc ) \ SYSCALL_ENTRY( NtGdiArcInternal ) \ SYSCALL_ENTRY( NtGdiBeginPath ) \ + SYSCALL_ENTRY( NtGdiBitBlt ) \ SYSCALL_ENTRY( NtGdiCloseFigure ) \ SYSCALL_ENTRY( NtGdiCombineRgn ) \ + SYSCALL_ENTRY( NtGdiComputeXformCoefficients ) \ SYSCALL_ENTRY( NtGdiCreateBitmap ) \ SYSCALL_ENTRY( NtGdiCreateClientObj ) \ SYSCALL_ENTRY( NtGdiCreateDIBBrush ) \ @@ -86,10 +89,14 @@ SYSCALL_ENTRY( NtGdiInitSpool ) \ SYSCALL_ENTRY( NtGdiInvertRgn ) \ SYSCALL_ENTRY( NtGdiLineTo ) \ + SYSCALL_ENTRY( NtGdiMaskBlt ) \ + SYSCALL_ENTRY( NtGdiModifyWorldTransform ) \ SYSCALL_ENTRY( NtGdiMoveTo ) \ SYSCALL_ENTRY( NtGdiOffsetRgn ) \ SYSCALL_ENTRY( NtGdiOpenDCW ) \ + SYSCALL_ENTRY( NtGdiPatBlt ) \ SYSCALL_ENTRY( NtGdiPathToRegion ) \ + SYSCALL_ENTRY( NtGdiPlgBlt ) \ SYSCALL_ENTRY( NtGdiPolyDraw ) \ SYSCALL_ENTRY( NtGdiPolyPolyDraw ) \ SYSCALL_ENTRY( NtGdiPtInRegion ) \ @@ -99,6 +106,8 @@ SYSCALL_ENTRY( NtGdiRemoveFontResourceW ) \ SYSCALL_ENTRY( NtGdiRoundRect ) \ SYSCALL_ENTRY( NtGdiSaveDC ) \ + SYSCALL_ENTRY( NtGdiScaleViewportExtEx ) \ + SYSCALL_ENTRY( NtGdiScaleWindowExtEx ) \ SYSCALL_ENTRY( NtGdiSelectClipPath ) \ SYSCALL_ENTRY( NtGdiSetBitmapBits ) \ SYSCALL_ENTRY( NtGdiSetBitmapDimension ) \ @@ -113,10 +122,12 @@ SYSCALL_ENTRY( NtGdiSetVirtualResolution ) \ SYSCALL_ENTRY( NtGdiStartDoc ) \ SYSCALL_ENTRY( NtGdiStartPage ) \ + SYSCALL_ENTRY( NtGdiStretchBlt ) \ SYSCALL_ENTRY( NtGdiStrokeAndFillPath ) \ SYSCALL_ENTRY( NtGdiStrokePath ) \ SYSCALL_ENTRY( NtGdiSwapBuffers ) \ SYSCALL_ENTRY( NtGdiTransformPoints ) \ + SYSCALL_ENTRY( NtGdiTransparentBlt ) \ SYSCALL_ENTRY( NtGdiWidenPath ) \ SYSCALL_ENTRY( NtUserActivateKeyboardLayout ) \ SYSCALL_ENTRY( NtUserAddClipboardFormatListener ) \
This merge request was approved by Huw Davies.