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 ) \