From: Jacek Caban jacek@codeweavers.com
--- dlls/win32u/gdiobj.c | 7 ---- dlls/win32u/syscall.c | 7 ++++ dlls/win32u/win32u.spec | 14 ++++---- dlls/win32u/win32u_private.h | 10 ------ dlls/win32u/wrappers.c | 45 ------------------------ dlls/wow64win/gdi.c | 68 ++++++++++++++++++++++++++++++++++++ dlls/wow64win/syscall.h | 7 ++++ 7 files changed, 89 insertions(+), 69 deletions(-)
diff --git a/dlls/win32u/gdiobj.c b/dlls/win32u/gdiobj.c index 8d3d2719728..7c255231f08 100644 --- a/dlls/win32u/gdiobj.c +++ b/dlls/win32u/gdiobj.c @@ -1034,21 +1034,14 @@ static struct unix_funcs unix_funcs = NtGdiExcludeClipRect, NtGdiExtEscape, NtGdiExtSelectClipRgn, - NtGdiFontIsLinked, NtGdiGetAndSetDCDword, NtGdiGetAppClipBox, NtGdiGetBoundsRect, NtGdiGetDeviceCaps, NtGdiGetDeviceGammaRamp, - NtGdiGetFontData, - NtGdiGetFontUnicodeRanges, - NtGdiGetGlyphIndicesW, - NtGdiGetGlyphOutline, - NtGdiGetKerningPairs, NtGdiGetNearestColor, NtGdiGetRandomRgn, NtGdiGetRasterizerCaps, - NtGdiGetRealizationInfo, NtGdiIntersectClipRect, NtGdiOffsetClipRgn, NtGdiPtVisible, diff --git a/dlls/win32u/syscall.c b/dlls/win32u/syscall.c index cdf86da7c89..787fa431119 100644 --- a/dlls/win32u/syscall.c +++ b/dlls/win32u/syscall.c @@ -98,6 +98,7 @@ static void * const syscalls[] = NtGdiFillRgn, NtGdiFlattenPath, NtGdiFlush, + NtGdiFontIsLinked, NtGdiFrameRgn, NtGdiGetBitmapBits, NtGdiGetBitmapDimension, @@ -109,12 +110,18 @@ static void * const syscalls[] = NtGdiGetDCObject, NtGdiGetDCPoint, NtGdiGetDIBitsInternal, + NtGdiGetFontData, NtGdiGetFontFileData, NtGdiGetFontFileInfo, + NtGdiGetFontUnicodeRanges, + NtGdiGetGlyphIndicesW, + NtGdiGetGlyphOutline, + NtGdiGetKerningPairs, NtGdiGetNearestPaletteIndex, NtGdiGetOutlineTextMetricsInternalW, NtGdiGetPath, NtGdiGetPixel, + NtGdiGetRealizationInfo, NtGdiGetRegionData, NtGdiGetRgnBox, NtGdiGetSpoolMessage, diff --git a/dlls/win32u/win32u.spec b/dlls/win32u/win32u.spec index bc4fdd292a4..e75380dc7ac 100644 --- a/dlls/win32u/win32u.spec +++ b/dlls/win32u/win32u.spec @@ -437,7 +437,7 @@ @ stdcall -syscall NtGdiFillRgn(long long long) @ stdcall -syscall NtGdiFlattenPath(long) @ stdcall -syscall NtGdiFlush() -@ stdcall NtGdiFontIsLinked(long) +@ stdcall -syscall NtGdiFontIsLinked(long) @ stub NtGdiForceUFIMapping @ stdcall -syscall NtGdiFrameRgn(long long long long long) @ stub NtGdiFullscreenControl @@ -477,16 +477,16 @@ @ stub NtGdiGetEmbedFonts @ stub NtGdiGetEntry @ stub NtGdiGetEudcTimeStampEx -@ stdcall NtGdiGetFontData(long long long ptr long) +@ stdcall -syscall NtGdiGetFontData(long long long ptr long) @ stdcall -syscall NtGdiGetFontFileData(long long ptr ptr long) @ stdcall -syscall NtGdiGetFontFileInfo(long long ptr long ptr) @ stub NtGdiGetFontResourceInfoInternalW -@ stdcall NtGdiGetFontUnicodeRanges(long ptr) +@ stdcall -syscall NtGdiGetFontUnicodeRanges(long ptr) @ stub NtGdiGetGammaRampCapability -@ stdcall NtGdiGetGlyphIndicesW(long wstr long ptr long) +@ stdcall -syscall NtGdiGetGlyphIndicesW(long wstr long ptr long) @ stub NtGdiGetGlyphIndicesWInternal -@ stdcall NtGdiGetGlyphOutline(long long long ptr long ptr ptr long) -@ stdcall NtGdiGetKerningPairs(long long ptr) +@ stdcall -syscall NtGdiGetGlyphOutline(long long long ptr long ptr ptr long) +@ stdcall -syscall NtGdiGetKerningPairs(long long ptr) @ stub NtGdiGetLinkedUFIs @ stub NtGdiGetMiterLimit @ stub NtGdiGetMonitorID @@ -506,7 +506,7 @@ @ stub NtGdiGetPublicFontTableChangeCookie @ stdcall NtGdiGetRandomRgn(long long long) @ stdcall NtGdiGetRasterizerCaps(ptr long) -@ stdcall NtGdiGetRealizationInfo(long ptr) +@ stdcall -syscall NtGdiGetRealizationInfo(long ptr) @ stdcall -syscall NtGdiGetRegionData(long long ptr) @ stdcall -syscall NtGdiGetRgnBox(long ptr) @ stub NtGdiGetServerMetaFileBits diff --git a/dlls/win32u/win32u_private.h b/dlls/win32u/win32u_private.h index 804e90bc66a..5cdd3b6a256 100644 --- a/dlls/win32u/win32u_private.h +++ b/dlls/win32u/win32u_private.h @@ -41,24 +41,14 @@ struct unix_funcs INT (WINAPI *pNtGdiExtEscape)( HDC hdc, WCHAR *driver, INT driver_id, INT escape, INT input_size, const char *input, INT output_size, char *output ); INT (WINAPI *pNtGdiExtSelectClipRgn)( HDC hdc, HRGN region, INT mode ); - BOOL (WINAPI *pNtGdiFontIsLinked)( HDC hdc ); 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 ); INT (WINAPI *pNtGdiGetDeviceCaps)( HDC hdc, INT cap ); BOOL (WINAPI *pNtGdiGetDeviceGammaRamp)( HDC hdc, void *ptr ); - DWORD (WINAPI *pNtGdiGetFontData)( HDC hdc, DWORD table, DWORD offset, void *buffer, DWORD length ); - DWORD (WINAPI *pNtGdiGetFontUnicodeRanges)( HDC hdc, GLYPHSET *lpgs ); - DWORD (WINAPI *pNtGdiGetGlyphIndicesW)( HDC hdc, const WCHAR *str, INT count, - WORD *indices, DWORD flags ); - DWORD (WINAPI *pNtGdiGetGlyphOutline)( HDC hdc, UINT ch, UINT format, GLYPHMETRICS *metrics, - DWORD size, void *buffer, const MAT2 *mat2, - BOOL ignore_rotation ); - DWORD (WINAPI *pNtGdiGetKerningPairs)( HDC hdc, DWORD count, KERNINGPAIR *kern_pair ); COLORREF (WINAPI *pNtGdiGetNearestColor)( HDC hdc, COLORREF color ); 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 ); INT (WINAPI *pNtGdiIntersectClipRect)( HDC hdc, INT left, INT top, INT right, INT bottom ); INT (WINAPI *pNtGdiOffsetClipRgn)( HDC hdc, INT x, INT y ); BOOL (WINAPI *pNtGdiPtVisible)( HDC hdc, INT x, INT y ); diff --git a/dlls/win32u/wrappers.c b/dlls/win32u/wrappers.c index d451dc4d3ce..6eb1c80d622 100644 --- a/dlls/win32u/wrappers.c +++ b/dlls/win32u/wrappers.c @@ -57,12 +57,6 @@ INT WINAPI NtGdiExtSelectClipRgn( HDC hdc, HRGN region, INT mode ) return unix_funcs->pNtGdiExtSelectClipRgn( hdc, region, mode ); }
-BOOL WINAPI NtGdiFontIsLinked( HDC hdc ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtGdiFontIsLinked( hdc ); -} - BOOL WINAPI NtGdiGetAndSetDCDword( HDC hdc, UINT method, DWORD value, DWORD *result ) { if (!unix_funcs) return FALSE; @@ -93,39 +87,6 @@ BOOL WINAPI NtGdiGetDeviceGammaRamp( HDC hdc, void *ptr ) return unix_funcs->pNtGdiGetDeviceGammaRamp( hdc, ptr ); }
-DWORD WINAPI NtGdiGetFontData( HDC hdc, DWORD table, DWORD offset, void *buffer, DWORD length ) -{ - if (!unix_funcs) return GDI_ERROR; - return unix_funcs->pNtGdiGetFontData( hdc, table, offset, buffer, length ); -} - -DWORD WINAPI NtGdiGetFontUnicodeRanges( HDC hdc, GLYPHSET *lpgs ) -{ - if (!unix_funcs) return 0; - return unix_funcs->pNtGdiGetFontUnicodeRanges( hdc, lpgs ); -} - -DWORD WINAPI NtGdiGetGlyphIndicesW( HDC hdc, const WCHAR *str, INT count, - WORD *indices, DWORD flags ) -{ - if (!unix_funcs) return GDI_ERROR; - return unix_funcs->pNtGdiGetGlyphIndicesW( hdc, str, count, indices, flags ); -} - -DWORD WINAPI NtGdiGetGlyphOutline( HDC hdc, UINT ch, UINT format, GLYPHMETRICS *metrics, - DWORD size, void *buffer, const MAT2 *mat2, - BOOL ignore_rotation ) -{ - if (!unix_funcs) return GDI_ERROR; - return unix_funcs->pNtGdiGetGlyphOutline( hdc, ch, format, metrics, size, buffer, mat2, ignore_rotation ); -} - -DWORD WINAPI NtGdiGetKerningPairs( HDC hdc, DWORD count, KERNINGPAIR *kern_pair ) -{ - if (!unix_funcs) return 0; - return unix_funcs->pNtGdiGetKerningPairs( hdc, count, kern_pair ); -} - COLORREF WINAPI NtGdiGetNearestColor( HDC hdc, COLORREF color ) { if (!unix_funcs) return CLR_INVALID; @@ -144,12 +105,6 @@ BOOL WINAPI NtGdiGetRasterizerCaps( RASTERIZER_STATUS *status, UINT size ) return unix_funcs->pNtGdiGetRasterizerCaps( status, size ); }
-BOOL WINAPI NtGdiGetRealizationInfo( HDC hdc, struct font_realization_info *info ) -{ - if (!unix_funcs) return FALSE; - return unix_funcs->pNtGdiGetRealizationInfo( hdc, info ); -} - INT WINAPI NtGdiIntersectClipRect( HDC hdc, INT left, INT top, INT right, INT bottom ) { if (!unix_funcs) return ERROR; diff --git a/dlls/wow64win/gdi.c b/dlls/wow64win/gdi.c index 9cdd8a987bd..78cb59d7226 100644 --- a/dlls/wow64win/gdi.c +++ b/dlls/wow64win/gdi.c @@ -913,6 +913,13 @@ NTSTATUS WINAPI wow64_NtGdiFlush( UINT *args ) return NtGdiFlush(); }
+NTSTATUS WINAPI wow64_NtGdiFontIsLinked( UINT *args ) +{ + HDC hdc = get_handle( &args ); + + return NtGdiFontIsLinked( hdc ); +} + NTSTATUS WINAPI wow64_NtGdiFrameRgn( UINT *args ) { HDC hdc = get_handle( &args ); @@ -1023,6 +1030,17 @@ NTSTATUS WINAPI wow64_NtGdiGetDIBitsInternal( UINT *args ) max_bits, max_info ); }
+NTSTATUS WINAPI wow64_NtGdiGetFontData( UINT *args ) +{ + HDC hdc = get_handle( &args ); + DWORD table = get_ulong( &args ); + DWORD offset = get_ulong( &args ); + void *buffer = get_ptr( &args ); + DWORD length = get_ulong( &args ); + + return NtGdiGetFontData( hdc, table, offset, buffer, length ); +} + NTSTATUS WINAPI wow64_NtGdiGetFontFileData( UINT *args ) { DWORD instance_id = get_ulong( &args ); @@ -1050,6 +1068,48 @@ NTSTATUS WINAPI wow64_NtGdiGetFontFileInfo( UINT *args ) return ret; }
+NTSTATUS WINAPI wow64_NtGdiGetFontUnicodeRanges( UINT *args ) +{ + HDC hdc = get_handle( &args ); + GLYPHSET *lpgs = get_ptr( &args ); + + return NtGdiGetFontUnicodeRanges( hdc, lpgs ); +} + +NTSTATUS WINAPI wow64_NtGdiGetGlyphIndicesW( UINT *args ) +{ + HDC hdc = get_handle( &args ); + const WCHAR *str = get_ptr( &args ); + INT count = get_ulong( &args ); + WORD *indices = get_ptr( &args ); + DWORD flags = get_ulong( &args ); + + return NtGdiGetGlyphIndicesW( hdc, str, count, indices, flags ); +} + +NTSTATUS WINAPI wow64_NtGdiGetGlyphOutline( UINT *args ) +{ + HDC hdc = get_handle( &args ); + UINT ch = get_ulong( &args ); + UINT format = get_ulong( &args ); + GLYPHMETRICS *metrics = get_ptr( &args ); + DWORD size = get_ulong( &args ); + void *buffer = get_ptr( &args ); + const MAT2 *mat2 = get_ptr( &args ); + BOOL ignore_rotation = get_ulong( &args ); + + return NtGdiGetGlyphOutline( hdc, ch, format, metrics, size, buffer, mat2, ignore_rotation ); +} + +NTSTATUS WINAPI wow64_NtGdiGetKerningPairs( UINT *args ) +{ + HDC hdc = get_handle( &args ); + DWORD count = get_ulong( &args ); + KERNINGPAIR *kern_pair = get_ptr( &args ); + + return NtGdiGetKerningPairs( hdc, count, kern_pair ); +} + NTSTATUS WINAPI wow64_NtGdiGetNearestPaletteIndex( UINT *args ) { HPALETTE hpalette = get_handle( &args ); @@ -1132,6 +1192,14 @@ NTSTATUS WINAPI wow64_NtGdiGetPixel( UINT *args ) return NtGdiGetPixel( hdc, x, y ); }
+NTSTATUS WINAPI wow64_NtGdiGetRealizationInfo( UINT *args ) +{ + HDC hdc = get_handle( &args ); + struct font_realization_info *info = get_ptr( &args ); + + return NtGdiGetRealizationInfo( hdc, info ); +} + NTSTATUS WINAPI wow64_NtGdiGetTextCharsetInfo( UINT *args ) { HDC hdc = get_ptr( &args ); diff --git a/dlls/wow64win/syscall.h b/dlls/wow64win/syscall.h index 8299ef1141c..03f7c360ff9 100644 --- a/dlls/wow64win/syscall.h +++ b/dlls/wow64win/syscall.h @@ -84,6 +84,7 @@ SYSCALL_ENTRY( NtGdiFillRgn ) \ SYSCALL_ENTRY( NtGdiFlattenPath ) \ SYSCALL_ENTRY( NtGdiFlush ) \ + SYSCALL_ENTRY( NtGdiFontIsLinked ) \ SYSCALL_ENTRY( NtGdiFrameRgn ) \ SYSCALL_ENTRY( NtGdiGetBitmapBits ) \ SYSCALL_ENTRY( NtGdiGetBitmapDimension ) \ @@ -95,12 +96,18 @@ SYSCALL_ENTRY( NtGdiGetDCObject ) \ SYSCALL_ENTRY( NtGdiGetDCPoint ) \ SYSCALL_ENTRY( NtGdiGetDIBitsInternal ) \ + SYSCALL_ENTRY( NtGdiGetFontData ) \ SYSCALL_ENTRY( NtGdiGetFontFileData ) \ SYSCALL_ENTRY( NtGdiGetFontFileInfo ) \ + SYSCALL_ENTRY( NtGdiGetFontUnicodeRanges ) \ + SYSCALL_ENTRY( NtGdiGetGlyphIndicesW ) \ + SYSCALL_ENTRY( NtGdiGetGlyphOutline ) \ + SYSCALL_ENTRY( NtGdiGetKerningPairs ) \ SYSCALL_ENTRY( NtGdiGetNearestPaletteIndex ) \ SYSCALL_ENTRY( NtGdiGetOutlineTextMetricsInternalW ) \ SYSCALL_ENTRY( NtGdiGetPath ) \ SYSCALL_ENTRY( NtGdiGetPixel ) \ + SYSCALL_ENTRY( NtGdiGetRealizationInfo ) \ SYSCALL_ENTRY( NtGdiGetRegionData ) \ SYSCALL_ENTRY( NtGdiGetRgnBox ) \ SYSCALL_ENTRY( NtGdiGetSpoolMessage ) \