Commit 384d34d6 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

win32u: Use syscall interface for more GDI object functions.

parent 5f5082af
......@@ -1030,7 +1030,6 @@ BOOL WINAPI NtGdiSetColorAdjustment( HDC hdc, const COLORADJUSTMENT *ca )
static struct unix_funcs unix_funcs =
{
NtGdiDeleteObjectApp,
NtGdiDoPalette,
NtGdiEnumFonts,
NtGdiExcludeClipRect,
......@@ -1065,14 +1064,10 @@ static struct unix_funcs unix_funcs =
NtGdiPtVisible,
NtGdiRectVisible,
NtGdiResizePalette,
NtGdiSelectBrush,
NtGdiSelectFont,
NtGdiSelectPen,
NtGdiSetBoundsRect,
NtGdiSetDeviceGammaRamp,
NtGdiSetLayout,
NtGdiSetSystemPaletteUse,
NtGdiUnrealizeObject,
NtUserDrawCaptionTemp,
NtUserDrawMenuBarTemp,
NtUserEndPaint,
......
......@@ -80,6 +80,7 @@ static void * const syscalls[] =
NtGdiDdDDISetQueuedLimit,
NtGdiDdDDISetVidPnSourceOwner,
NtGdiDeleteClientObj,
NtGdiDeleteObjectApp,
NtGdiDescribePixelFormat,
NtGdiDrawStream,
NtGdiEllipse,
......@@ -140,7 +141,10 @@ static void * const syscalls[] =
NtGdiScaleViewportExtEx,
NtGdiScaleWindowExtEx,
NtGdiSelectBitmap,
NtGdiSelectBrush,
NtGdiSelectClipPath,
NtGdiSelectFont,
NtGdiSelectPen,
NtGdiSetBitmapBits,
NtGdiSetBitmapDimension,
NtGdiSetBrushOrg,
......@@ -162,6 +166,7 @@ static void * const syscalls[] =
NtGdiSwapBuffers,
NtGdiTransformPoints,
NtGdiTransparentBlt,
NtGdiUnrealizeObject,
NtGdiUpdateColors,
NtGdiWidenPath,
NtUserActivateKeyboardLayout,
......
......@@ -367,7 +367,7 @@
@ stdcall -syscall NtGdiDeleteClientObj(long)
@ stub NtGdiDeleteColorSpace
@ stub NtGdiDeleteColorTransform
@ stdcall NtGdiDeleteObjectApp(long )
@ stdcall -syscall NtGdiDeleteObjectApp(long )
@ stdcall -syscall NtGdiDescribePixelFormat(long long long ptr)
@ stub NtGdiDestroyOPMProtectedOutput
@ stub NtGdiDestroyPhysicalMonitor
......@@ -585,10 +585,10 @@
@ stdcall -syscall NtGdiScaleViewportExtEx(long long long long long ptr)
@ stdcall -syscall NtGdiScaleWindowExtEx(long long long long long ptr)
@ stdcall -syscall NtGdiSelectBitmap(long long)
@ stdcall NtGdiSelectBrush(long long)
@ stdcall -syscall NtGdiSelectBrush(long long)
@ stdcall -syscall NtGdiSelectClipPath(long long)
@ stdcall NtGdiSelectFont(long long)
@ stdcall NtGdiSelectPen(long long)
@ stdcall -syscall NtGdiSelectFont(long long)
@ stdcall -syscall NtGdiSelectPen(long long)
@ stub NtGdiSetBitmapAttributes
@ stdcall -syscall NtGdiSetBitmapBits(long long ptr)
@ stdcall -syscall NtGdiSetBitmapDimension(long long long ptr)
......@@ -630,7 +630,7 @@
@ stub NtGdiUMPDEngFreeUserMem
@ stub NtGdiUnloadPrinterDriver
@ stub NtGdiUnmapMemFont
@ stdcall NtGdiUnrealizeObject(long)
@ stdcall -syscall NtGdiUnrealizeObject(long)
@ stdcall -syscall NtGdiUpdateColors(long)
@ stub NtGdiUpdateTransform
@ stdcall -syscall NtGdiWidenPath(long)
......
......@@ -35,7 +35,6 @@
struct unix_funcs
{
/* win32u functions */
BOOL (WINAPI *pNtGdiDeleteObjectApp)( HGDIOBJ obj );
LONG (WINAPI *pNtGdiDoPalette)( HGDIOBJ handle, WORD start, WORD count, void *entries,
DWORD func, BOOL inbound );
BOOL (WINAPI *pNtGdiEnumFonts)( HDC hdc, ULONG type, ULONG win32_compat, ULONG face_name_len,
......@@ -81,14 +80,10 @@ struct unix_funcs
BOOL (WINAPI *pNtGdiPtVisible)( HDC hdc, INT x, INT y );
BOOL (WINAPI *pNtGdiRectVisible)( HDC hdc, const RECT *rect );
BOOL (WINAPI *pNtGdiResizePalette)( HPALETTE palette, UINT count );
HGDIOBJ (WINAPI *pNtGdiSelectBrush)( HDC hdc, HGDIOBJ handle );
HGDIOBJ (WINAPI *pNtGdiSelectFont)( HDC hdc, HGDIOBJ handle );
HGDIOBJ (WINAPI *pNtGdiSelectPen)( HDC hdc, HGDIOBJ handle );
UINT (WINAPI *pNtGdiSetBoundsRect)( HDC hdc, const RECT *rect, UINT flags );
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 *pNtGdiUnrealizeObject)( HGDIOBJ obj );
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 );
......
......@@ -24,12 +24,6 @@
static const struct unix_funcs *unix_funcs;
BOOL WINAPI NtGdiDeleteObjectApp( HGDIOBJ obj )
{
if (!unix_funcs) return FALSE;
return unix_funcs->pNtGdiDeleteObjectApp( obj );
}
LONG WINAPI NtGdiDoPalette( HGDIOBJ handle, WORD start, WORD count, void *entries,
DWORD func, BOOL inbound )
{
......@@ -253,24 +247,6 @@ BOOL WINAPI NtGdiResizePalette( HPALETTE palette, UINT count )
return unix_funcs->pNtGdiResizePalette( palette, count );
}
HGDIOBJ WINAPI NtGdiSelectBrush( HDC hdc, HGDIOBJ handle )
{
if (!unix_funcs) return 0;
return unix_funcs->pNtGdiSelectBrush( hdc, handle );
}
HGDIOBJ WINAPI NtGdiSelectFont( HDC hdc, HGDIOBJ handle )
{
if (!unix_funcs) return 0;
return unix_funcs->pNtGdiSelectFont( hdc, handle );
}
HGDIOBJ WINAPI NtGdiSelectPen( HDC hdc, HGDIOBJ handle )
{
if (!unix_funcs) return 0;
return unix_funcs->pNtGdiSelectPen( hdc, handle );
}
UINT WINAPI NtGdiSetBoundsRect( HDC hdc, const RECT *rect, UINT flags )
{
if (!unix_funcs) return 0;
......@@ -295,12 +271,6 @@ UINT WINAPI NtGdiSetSystemPaletteUse( HDC hdc, UINT use )
return unix_funcs->pNtGdiSetSystemPaletteUse( hdc, use );
}
BOOL WINAPI NtGdiUnrealizeObject( HGDIOBJ obj )
{
if (!unix_funcs) return FALSE;
return unix_funcs->pNtGdiUnrealizeObject( obj );
}
BOOL WINAPI NtUserDrawCaptionTemp( HWND hwnd, HDC hdc, const RECT *rect, HFONT font,
HICON icon, const WCHAR *str, UINT flags )
{
......
......@@ -622,6 +622,13 @@ NTSTATUS WINAPI wow64_NtGdiDeleteClientObj( UINT *args )
return NtGdiDeleteClientObj( obj );
}
NTSTATUS WINAPI wow64_NtGdiDeleteObjectApp( UINT *args )
{
HGDIOBJ obj = get_handle( &args );
return NtGdiDeleteObjectApp( obj );
}
NTSTATUS WINAPI wow64_NtGdiDescribePixelFormat( UINT *args )
{
HDC hdc = get_handle( &args );
......@@ -1303,6 +1310,14 @@ NTSTATUS WINAPI wow64_NtGdiSelectBitmap( UINT *args )
return HandleToUlong( NtGdiSelectBitmap( hdc, handle ));
}
NTSTATUS WINAPI wow64_NtGdiSelectBrush( UINT *args )
{
HDC hdc = get_handle( &args );
HGDIOBJ handle = get_handle( &args );
return HandleToUlong( NtGdiSelectBrush( hdc, handle ));
}
NTSTATUS WINAPI wow64_NtGdiSelectClipPath( UINT *args )
{
HDC hdc = get_handle( &args );
......@@ -1311,6 +1326,22 @@ NTSTATUS WINAPI wow64_NtGdiSelectClipPath( UINT *args )
return NtGdiSelectClipPath( hdc, mode );
}
NTSTATUS WINAPI wow64_NtGdiSelectFont( UINT *args )
{
HDC hdc = get_handle( &args );
HGDIOBJ handle = get_handle( &args );
return HandleToUlong( NtGdiSelectFont( hdc, handle ));
}
NTSTATUS WINAPI wow64_NtGdiSelectPen( UINT *args )
{
HDC hdc = get_handle( &args );
HGDIOBJ handle = get_handle( &args );
return HandleToUlong( NtGdiSelectPen( hdc, handle ));
}
NTSTATUS WINAPI wow64_NtGdiSetBitmapBits( UINT *args )
{
HBITMAP hbitmap = get_handle( &args );
......@@ -1561,6 +1592,13 @@ NTSTATUS WINAPI wow64_NtGdiTransformPoints( UINT *args )
return NtGdiTransformPoints( hdc, points_in, points_out, count, mode );
}
NTSTATUS WINAPI wow64_NtGdiUnrealizeObject( UINT *args )
{
HGDIOBJ obj = get_handle( &args );
return NtGdiUnrealizeObject( obj );
}
NTSTATUS WINAPI wow64_NtGdiUpdateColors( UINT *args )
{
HDC hdc = get_handle( &args );
......
......@@ -66,6 +66,7 @@
SYSCALL_ENTRY( NtGdiDdDDISetQueuedLimit ) \
SYSCALL_ENTRY( NtGdiDdDDISetVidPnSourceOwner ) \
SYSCALL_ENTRY( NtGdiDeleteClientObj ) \
SYSCALL_ENTRY( NtGdiDeleteObjectApp ) \
SYSCALL_ENTRY( NtGdiDescribePixelFormat ) \
SYSCALL_ENTRY( NtGdiDrawStream ) \
SYSCALL_ENTRY( NtGdiEllipse ) \
......@@ -126,7 +127,10 @@
SYSCALL_ENTRY( NtGdiScaleViewportExtEx ) \
SYSCALL_ENTRY( NtGdiScaleWindowExtEx ) \
SYSCALL_ENTRY( NtGdiSelectBitmap ) \
SYSCALL_ENTRY( NtGdiSelectBrush ) \
SYSCALL_ENTRY( NtGdiSelectClipPath ) \
SYSCALL_ENTRY( NtGdiSelectFont ) \
SYSCALL_ENTRY( NtGdiSelectPen ) \
SYSCALL_ENTRY( NtGdiSetBitmapBits ) \
SYSCALL_ENTRY( NtGdiSetBitmapDimension ) \
SYSCALL_ENTRY( NtGdiSetBrushOrg ) \
......@@ -148,6 +152,7 @@
SYSCALL_ENTRY( NtGdiSwapBuffers ) \
SYSCALL_ENTRY( NtGdiTransformPoints ) \
SYSCALL_ENTRY( NtGdiTransparentBlt ) \
SYSCALL_ENTRY( NtGdiUnrealizeObject ) \
SYSCALL_ENTRY( NtGdiUpdateColors ) \
SYSCALL_ENTRY( NtGdiWidenPath ) \
SYSCALL_ENTRY( NtUserActivateKeyboardLayout ) \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment