Commit 4aecddf0 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

win32u: Use syscall interface for more bitmap functions.

parent 47ee70a8
......@@ -1030,7 +1030,6 @@ BOOL WINAPI NtGdiSetColorAdjustment( HDC hdc, const COLORADJUSTMENT *ca )
static struct unix_funcs unix_funcs =
{
NtGdiCreateCompatibleBitmap,
NtGdiCreateCompatibleDC,
NtGdiCreateDIBitmapInternal,
NtGdiCreateMetafileDC,
......@@ -1082,7 +1081,6 @@ static struct unix_funcs unix_funcs =
NtGdiResetDC,
NtGdiResizePalette,
NtGdiRestoreDC,
NtGdiSelectBitmap,
NtGdiSelectBrush,
NtGdiSelectFont,
NtGdiSelectPen,
......
......@@ -50,6 +50,7 @@ static void * const syscalls[] =
NtGdiComputeXformCoefficients,
NtGdiCreateBitmap,
NtGdiCreateClientObj,
NtGdiCreateCompatibleBitmap,
NtGdiCreateDIBBrush,
NtGdiCreateDIBSection,
NtGdiCreateEllipticRgn,
......@@ -122,6 +123,7 @@ static void * const syscalls[] =
NtGdiSaveDC,
NtGdiScaleViewportExtEx,
NtGdiScaleWindowExtEx,
NtGdiSelectBitmap,
NtGdiSelectClipPath,
NtGdiSetBitmapBits,
NtGdiSetBitmapDimension,
......
......@@ -145,7 +145,7 @@
@ stdcall -syscall NtGdiCreateClientObj(long)
@ stub NtGdiCreateColorSpace
@ stub NtGdiCreateColorTransform
@ stdcall NtGdiCreateCompatibleBitmap(long long long)
@ stdcall -syscall NtGdiCreateCompatibleBitmap(long long long)
@ stdcall NtGdiCreateCompatibleDC(long)
@ stdcall -syscall NtGdiCreateDIBBrush(ptr long long long long ptr)
@ stdcall -syscall NtGdiCreateDIBSection(long long long ptr long long long long ptr)
......@@ -584,7 +584,7 @@
@ stub NtGdiScaleValues
@ stdcall -syscall NtGdiScaleViewportExtEx(long long long long long ptr)
@ stdcall -syscall NtGdiScaleWindowExtEx(long long long long long ptr)
@ stdcall NtGdiSelectBitmap(long long)
@ stdcall -syscall NtGdiSelectBitmap(long long)
@ stdcall NtGdiSelectBrush(long long)
@ stdcall -syscall NtGdiSelectClipPath(long long)
@ stdcall NtGdiSelectFont(long long)
......
......@@ -35,7 +35,6 @@
struct unix_funcs
{
/* win32u functions */
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,
const void *bits, const BITMAPINFO *data,
......@@ -104,7 +103,6 @@ struct unix_funcs
DRIVER_INFO_2W *driver_info, void *dev );
BOOL (WINAPI *pNtGdiResizePalette)( HPALETTE palette, UINT count );
BOOL (WINAPI *pNtGdiRestoreDC)( HDC hdc, INT level );
HGDIOBJ (WINAPI *pNtGdiSelectBitmap)( HDC hdc, HGDIOBJ handle );
HGDIOBJ (WINAPI *pNtGdiSelectBrush)( HDC hdc, HGDIOBJ handle );
HGDIOBJ (WINAPI *pNtGdiSelectFont)( HDC hdc, HGDIOBJ handle );
HGDIOBJ (WINAPI *pNtGdiSelectPen)( HDC hdc, HGDIOBJ handle );
......
......@@ -24,12 +24,6 @@
static const struct unix_funcs *unix_funcs;
HBITMAP WINAPI NtGdiCreateCompatibleBitmap( HDC hdc, INT width, INT height )
{
if (!unix_funcs) return 0;
return unix_funcs->pNtGdiCreateCompatibleBitmap( hdc, width, height );
}
HDC WINAPI NtGdiCreateCompatibleDC( HDC hdc )
{
if (!unix_funcs) return 0;
......@@ -303,12 +297,6 @@ BOOL WINAPI NtGdiRestoreDC( HDC hdc, INT level )
return unix_funcs->pNtGdiRestoreDC( hdc, level );
}
HGDIOBJ WINAPI NtGdiSelectBitmap( HDC hdc, HGDIOBJ handle )
{
if (!unix_funcs) return 0;
return unix_funcs->pNtGdiSelectBitmap( hdc, handle );
}
HGDIOBJ WINAPI NtGdiSelectBrush( HDC hdc, HGDIOBJ handle )
{
if (!unix_funcs) return 0;
......
......@@ -207,6 +207,15 @@ NTSTATUS WINAPI wow64_NtGdiCreateClientObj( UINT *args )
return HandleToUlong( NtGdiCreateClientObj( type ));
}
NTSTATUS WINAPI wow64_NtGdiCreateCompatibleBitmap( UINT *args )
{
HDC hdc = get_handle( &args );
INT width = get_ulong( &args );
INT height = get_ulong( &args );
return HandleToUlong( NtGdiCreateCompatibleBitmap( hdc, width, height ));
}
NTSTATUS WINAPI wow64_NtGdiCreateDIBBrush( UINT *args )
{
const void *data = get_ptr( &args );
......@@ -1037,6 +1046,14 @@ NTSTATUS WINAPI wow64_NtGdiScaleWindowExtEx( UINT *args )
return NtGdiScaleWindowExtEx( hdc, x_num, x_denom, y_num, y_denom, size );
}
NTSTATUS WINAPI wow64_NtGdiSelectBitmap( UINT *args )
{
HDC hdc = get_handle( &args );
HGDIOBJ handle = get_handle( &args );
return HandleToUlong( NtGdiSelectBitmap( hdc, handle ));
}
NTSTATUS WINAPI wow64_NtGdiSelectClipPath( UINT *args )
{
HDC hdc = get_handle( &args );
......
......@@ -36,6 +36,7 @@
SYSCALL_ENTRY( NtGdiComputeXformCoefficients ) \
SYSCALL_ENTRY( NtGdiCreateBitmap ) \
SYSCALL_ENTRY( NtGdiCreateClientObj ) \
SYSCALL_ENTRY( NtGdiCreateCompatibleBitmap ) \
SYSCALL_ENTRY( NtGdiCreateDIBBrush ) \
SYSCALL_ENTRY( NtGdiCreateDIBSection ) \
SYSCALL_ENTRY( NtGdiCreateEllipticRgn ) \
......@@ -108,6 +109,7 @@
SYSCALL_ENTRY( NtGdiSaveDC ) \
SYSCALL_ENTRY( NtGdiScaleViewportExtEx ) \
SYSCALL_ENTRY( NtGdiScaleWindowExtEx ) \
SYSCALL_ENTRY( NtGdiSelectBitmap ) \
SYSCALL_ENTRY( NtGdiSelectClipPath ) \
SYSCALL_ENTRY( NtGdiSetBitmapBits ) \
SYSCALL_ENTRY( NtGdiSetBitmapDimension ) \
......
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