win32u: Use syscall interface for some DC functions.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
59e6d3b693
commit
277d37bcfb
|
@ -1099,9 +1099,7 @@ static struct unix_funcs unix_funcs =
|
|||
NtGdiDdDDISetVidPnSourceOwner,
|
||||
NtGdiDeleteClientObj,
|
||||
NtGdiDeleteObjectApp,
|
||||
NtGdiDescribePixelFormat,
|
||||
NtGdiDoPalette,
|
||||
NtGdiDrawStream,
|
||||
NtGdiEllipse,
|
||||
NtGdiEndDoc,
|
||||
NtGdiEndPath,
|
||||
|
@ -1151,7 +1149,6 @@ static struct unix_funcs unix_funcs =
|
|||
NtGdiGetTextExtentExW,
|
||||
NtGdiGetTextFaceW,
|
||||
NtGdiGetTextMetricsW,
|
||||
NtGdiGetTransform,
|
||||
NtGdiGradientFill,
|
||||
NtGdiHfontCreate,
|
||||
NtGdiInitSpool,
|
||||
|
@ -1177,7 +1174,6 @@ static struct unix_funcs unix_funcs =
|
|||
NtGdiResizePalette,
|
||||
NtGdiRestoreDC,
|
||||
NtGdiRoundRect,
|
||||
NtGdiSaveDC,
|
||||
NtGdiScaleViewportExtEx,
|
||||
NtGdiScaleWindowExtEx,
|
||||
NtGdiSelectBitmap,
|
||||
|
@ -1185,7 +1181,6 @@ static struct unix_funcs unix_funcs =
|
|||
NtGdiSelectClipPath,
|
||||
NtGdiSelectFont,
|
||||
NtGdiSelectPen,
|
||||
NtGdiSetBrushOrg,
|
||||
NtGdiSetBoundsRect,
|
||||
NtGdiSetColorAdjustment,
|
||||
NtGdiSetDIBitsToDeviceInternal,
|
||||
|
@ -1193,7 +1188,6 @@ static struct unix_funcs unix_funcs =
|
|||
NtGdiSetLayout,
|
||||
NtGdiSetMagicColors,
|
||||
NtGdiSetPixel,
|
||||
NtGdiSetPixelFormat,
|
||||
NtGdiSetSystemPaletteUse,
|
||||
NtGdiSetTextJustification,
|
||||
NtGdiSetVirtualResolution,
|
||||
|
@ -1203,7 +1197,6 @@ static struct unix_funcs unix_funcs =
|
|||
NtGdiStretchDIBitsInternal,
|
||||
NtGdiStrokeAndFillPath,
|
||||
NtGdiStrokePath,
|
||||
NtGdiSwapBuffers,
|
||||
NtGdiTransparentBlt,
|
||||
NtGdiTransformPoints,
|
||||
NtGdiUnrealizeObject,
|
||||
|
|
|
@ -44,6 +44,8 @@ static void * const syscalls[] =
|
|||
NtGdiCreateRectRgn,
|
||||
NtGdiCreateRoundRectRgn,
|
||||
NtGdiCreateSolidBrush,
|
||||
NtGdiDescribePixelFormat,
|
||||
NtGdiDrawStream,
|
||||
NtGdiEqualRgn,
|
||||
NtGdiExtCreateRegion,
|
||||
NtGdiFlush,
|
||||
|
@ -51,13 +53,18 @@ static void * const syscalls[] =
|
|||
NtGdiGetBitmapDimension,
|
||||
NtGdiGetRegionData,
|
||||
NtGdiGetRgnBox,
|
||||
NtGdiGetTransform,
|
||||
NtGdiOffsetRgn,
|
||||
NtGdiPtInRegion,
|
||||
NtGdiRectInRegion,
|
||||
NtGdiSaveDC,
|
||||
NtGdiSetBitmapBits,
|
||||
NtGdiSetBitmapDimension,
|
||||
NtGdiSetBrushOrg,
|
||||
NtGdiSetMetaRgn,
|
||||
NtGdiSetPixelFormat,
|
||||
NtGdiSetRectRgn,
|
||||
NtGdiSwapBuffers,
|
||||
};
|
||||
|
||||
static BYTE arguments[ARRAY_SIZE(syscalls)];
|
||||
|
|
|
@ -368,13 +368,13 @@
|
|||
@ stub NtGdiDeleteColorSpace
|
||||
@ stub NtGdiDeleteColorTransform
|
||||
@ stdcall NtGdiDeleteObjectApp(long )
|
||||
@ stdcall NtGdiDescribePixelFormat(long long long ptr)
|
||||
@ stdcall -syscall NtGdiDescribePixelFormat(long long long ptr)
|
||||
@ stub NtGdiDestroyOPMProtectedOutput
|
||||
@ stub NtGdiDestroyPhysicalMonitor
|
||||
@ stub NtGdiDoBanding
|
||||
@ stdcall NtGdiDoPalette(long long long ptr long long)
|
||||
@ stub NtGdiDrawEscape
|
||||
@ stdcall NtGdiDrawStream(long long ptr)
|
||||
@ stdcall -syscall NtGdiDrawStream(long long ptr)
|
||||
@ stub NtGdiDwmCreatedBitmapRemotingOutput
|
||||
@ stdcall NtGdiEllipse(long long long long long)
|
||||
@ stub NtGdiEnableEudc
|
||||
|
@ -520,7 +520,7 @@
|
|||
@ stdcall NtGdiGetTextExtentExW(long wstr long long ptr ptr ptr long)
|
||||
@ stdcall NtGdiGetTextFaceW(long long ptr long)
|
||||
@ stdcall NtGdiGetTextMetricsW(long ptr long)
|
||||
@ stdcall NtGdiGetTransform(long long ptr)
|
||||
@ stdcall -syscall NtGdiGetTransform(long long ptr)
|
||||
@ stub NtGdiGetUFI
|
||||
@ stub NtGdiGetUFIPathname
|
||||
@ stub NtGdiGetWidthTable
|
||||
|
@ -579,7 +579,7 @@
|
|||
@ stub NtGdiSTROBJ_bGetAdvanceWidths
|
||||
@ stub NtGdiSTROBJ_dwGetCodePage
|
||||
@ stub NtGdiSTROBJ_vEnumStart
|
||||
@ stdcall NtGdiSaveDC(long)
|
||||
@ stdcall -syscall NtGdiSaveDC(long)
|
||||
@ stub NtGdiScaleRgn
|
||||
@ stub NtGdiScaleValues
|
||||
@ stdcall NtGdiScaleViewportExtEx(long long long long long ptr)
|
||||
|
@ -594,7 +594,7 @@
|
|||
@ stdcall -syscall NtGdiSetBitmapDimension(long long long ptr)
|
||||
@ stdcall NtGdiSetBoundsRect(long ptr long)
|
||||
@ stub NtGdiSetBrushAttributes
|
||||
@ stdcall NtGdiSetBrushOrg(long long long ptr)
|
||||
@ stdcall -syscall NtGdiSetBrushOrg(long long long ptr)
|
||||
@ stdcall NtGdiSetColorAdjustment(long ptr)
|
||||
@ stub NtGdiSetColorSpace
|
||||
@ stdcall NtGdiSetDIBitsToDeviceInternal(long long long long long long long long long ptr ptr long long long long long)
|
||||
|
@ -610,7 +610,7 @@
|
|||
@ stub NtGdiSetOPMSigningKeyAndSequenceNumbers
|
||||
@ stub NtGdiSetPUMPDOBJ
|
||||
@ stdcall NtGdiSetPixel(long long long long)
|
||||
@ stdcall NtGdiSetPixelFormat(long long)
|
||||
@ stdcall -syscall NtGdiSetPixelFormat(long long)
|
||||
@ stub NtGdiSetPrivateDeviceGammaRamp
|
||||
@ stdcall -syscall NtGdiSetRectRgn(long long long long long)
|
||||
@ stub NtGdiSetSizeDevice
|
||||
|
@ -624,7 +624,7 @@
|
|||
@ 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 NtGdiSwapBuffers(long)
|
||||
@ stdcall -syscall NtGdiSwapBuffers(long)
|
||||
@ stdcall NtGdiTransformPoints(long ptr ptr long long)
|
||||
@ stdcall NtGdiTransparentBlt(long long long long long long long long long long long)
|
||||
@ stub NtGdiUMPDEngFreeUserMem
|
||||
|
|
|
@ -86,11 +86,8 @@ struct unix_funcs
|
|||
NTSTATUS (WINAPI *pNtGdiDdDDISetVidPnSourceOwner)( const D3DKMT_SETVIDPNSOURCEOWNER *desc );
|
||||
BOOL (WINAPI *pNtGdiDeleteClientObj)( HGDIOBJ obj );
|
||||
BOOL (WINAPI *pNtGdiDeleteObjectApp)( HGDIOBJ obj );
|
||||
INT (WINAPI *pNtGdiDescribePixelFormat)( HDC hdc, INT format, UINT size,
|
||||
PIXELFORMATDESCRIPTOR *descr );
|
||||
LONG (WINAPI *pNtGdiDoPalette)( HGDIOBJ handle, WORD start, WORD count, void *entries,
|
||||
DWORD func, BOOL inbound );
|
||||
BOOL (WINAPI *pNtGdiDrawStream)( HDC hdc, ULONG in, void *pvin );
|
||||
BOOL (WINAPI *pNtGdiEllipse)( HDC hdc, INT left, INT top, INT right, INT bottom );
|
||||
INT (WINAPI *pNtGdiEndDoc)(HDC hdc);
|
||||
BOOL (WINAPI *pNtGdiEndPath)( HDC hdc );
|
||||
|
@ -157,7 +154,6 @@ 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 *pNtGdiGetTransform)( HDC hdc, DWORD which, XFORM *xform );
|
||||
BOOL (WINAPI *pNtGdiGradientFill)( HDC hdc, TRIVERTEX *vert_array, ULONG nvert,
|
||||
void *grad_array, ULONG ngrad, ULONG mode );
|
||||
HFONT (WINAPI *pNtGdiHfontCreate)( const ENUMLOGFONTEXDVW *enumex, ULONG unk2, ULONG unk3,
|
||||
|
@ -195,7 +191,6 @@ struct unix_funcs
|
|||
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 );
|
||||
INT (WINAPI *pNtGdiSaveDC)( HDC hdc );
|
||||
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,
|
||||
|
@ -205,7 +200,6 @@ struct unix_funcs
|
|||
BOOL (WINAPI *pNtGdiSelectClipPath)( HDC hdc, INT mode );
|
||||
HGDIOBJ (WINAPI *pNtGdiSelectFont)( HDC hdc, HGDIOBJ handle );
|
||||
HGDIOBJ (WINAPI *pNtGdiSelectPen)( HDC hdc, HGDIOBJ handle );
|
||||
BOOL (WINAPI *pNtGdiSetBrushOrg)( HDC hdc, INT x, INT y, POINT *prev_org );
|
||||
UINT (WINAPI *pNtGdiSetBoundsRect)( HDC hdc, const RECT *rect, UINT flags );
|
||||
BOOL (WINAPI *pNtGdiSetColorAdjustment)( HDC hdc, const COLORADJUSTMENT *ca );
|
||||
INT (WINAPI *pNtGdiSetDIBitsToDeviceInternal)( HDC hdc, INT x_dst, INT y_dst, DWORD cx,
|
||||
|
@ -217,7 +211,6 @@ struct unix_funcs
|
|||
DWORD (WINAPI *pNtGdiSetLayout)( HDC hdc, LONG wox, DWORD layout );
|
||||
BOOL (WINAPI *pNtGdiSetMagicColors)( HDC hdc, DWORD magic, ULONG index );
|
||||
COLORREF (WINAPI *pNtGdiSetPixel)( HDC hdc, INT x, INT y, COLORREF color );
|
||||
BOOL (WINAPI *pNtGdiSetPixelFormat)( HDC hdc, INT format );
|
||||
UINT (WINAPI *pNtGdiSetSystemPaletteUse)( HDC hdc, UINT use );
|
||||
BOOL (WINAPI *pNtGdiSetTextJustification)( HDC hdc, INT extra, INT breaks );
|
||||
BOOL (WINAPI *pNtGdiSetVirtualResolution)( HDC hdc, DWORD horz_res, DWORD vert_res,
|
||||
|
@ -234,7 +227,6 @@ struct unix_funcs
|
|||
HANDLE xform );
|
||||
BOOL (WINAPI *pNtGdiStrokeAndFillPath)( HDC hdc );
|
||||
BOOL (WINAPI *pNtGdiStrokePath)( HDC hdc );
|
||||
BOOL (WINAPI *pNtGdiSwapBuffers)( 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 );
|
||||
|
|
|
@ -147,22 +147,12 @@ BOOL WINAPI NtGdiDeleteObjectApp( HGDIOBJ obj )
|
|||
return unix_funcs->pNtGdiDeleteObjectApp( obj );
|
||||
}
|
||||
|
||||
INT WINAPI NtGdiDescribePixelFormat( HDC hdc, INT format, UINT size, PIXELFORMATDESCRIPTOR *descr )
|
||||
{
|
||||
return unix_funcs->pNtGdiDescribePixelFormat( hdc, format, size, descr );
|
||||
}
|
||||
|
||||
LONG WINAPI NtGdiDoPalette( HGDIOBJ handle, WORD start, WORD count, void *entries,
|
||||
DWORD func, BOOL inbound )
|
||||
{
|
||||
return unix_funcs->pNtGdiDoPalette( handle, start, count, entries, func, inbound );
|
||||
}
|
||||
|
||||
BOOL WINAPI NtGdiDrawStream( HDC hdc, ULONG in, void *pvin )
|
||||
{
|
||||
return unix_funcs->pNtGdiDrawStream( hdc, in, pvin );
|
||||
}
|
||||
|
||||
BOOL WINAPI NtGdiEllipse( HDC hdc, INT left, INT top, INT right, INT bottom )
|
||||
{
|
||||
return unix_funcs->pNtGdiEllipse( hdc, left, top, right, bottom );
|
||||
|
@ -429,11 +419,6 @@ BOOL WINAPI NtGdiGetTextMetricsW( HDC hdc, TEXTMETRICW *metrics, ULONG flags )
|
|||
return unix_funcs->pNtGdiGetTextMetricsW( hdc, metrics, flags );
|
||||
}
|
||||
|
||||
BOOL WINAPI NtGdiGetTransform( HDC hdc, DWORD which, XFORM *xform )
|
||||
{
|
||||
return unix_funcs->pNtGdiGetTransform( hdc, which, xform );
|
||||
}
|
||||
|
||||
BOOL WINAPI NtGdiGradientFill( HDC hdc, TRIVERTEX *vert_array, ULONG nvert,
|
||||
void *grad_array, ULONG ngrad, ULONG mode )
|
||||
{
|
||||
|
@ -574,11 +559,6 @@ BOOL WINAPI NtGdiRoundRect( HDC hdc, INT left, INT top, INT right,
|
|||
return unix_funcs->pNtGdiRoundRect( hdc, left, top, right, bottom, ell_width, ell_height );
|
||||
}
|
||||
|
||||
INT WINAPI NtGdiSaveDC( HDC hdc )
|
||||
{
|
||||
return unix_funcs->pNtGdiSaveDC( hdc );
|
||||
}
|
||||
|
||||
BOOL WINAPI NtGdiScaleViewportExtEx( HDC hdc, INT x_num, INT x_denom,
|
||||
INT y_num, INT y_denom, SIZE *size )
|
||||
{
|
||||
|
@ -616,11 +596,6 @@ HGDIOBJ WINAPI NtGdiSelectPen( HDC hdc, HGDIOBJ handle )
|
|||
return unix_funcs->pNtGdiSelectPen( hdc, handle );
|
||||
}
|
||||
|
||||
BOOL WINAPI NtGdiSetBrushOrg( HDC hdc, INT x, INT y, POINT *prev_org )
|
||||
{
|
||||
return unix_funcs->pNtGdiSetBrushOrg( hdc, x, y, prev_org );
|
||||
}
|
||||
|
||||
UINT WINAPI NtGdiSetBoundsRect( HDC hdc, const RECT *rect, UINT flags )
|
||||
{
|
||||
return unix_funcs->pNtGdiSetBoundsRect( hdc, rect, flags );
|
||||
|
@ -662,11 +637,6 @@ COLORREF WINAPI NtGdiSetPixel( HDC hdc, INT x, INT y, COLORREF color )
|
|||
return unix_funcs->pNtGdiSetPixel( hdc, x, y, color );
|
||||
}
|
||||
|
||||
BOOL WINAPI NtGdiSetPixelFormat( HDC hdc, INT format )
|
||||
{
|
||||
return unix_funcs->pNtGdiSetPixelFormat( hdc, format );
|
||||
}
|
||||
|
||||
UINT WINAPI NtGdiSetSystemPaletteUse( HDC hdc, UINT use )
|
||||
{
|
||||
return unix_funcs->pNtGdiSetSystemPaletteUse( hdc, use );
|
||||
|
@ -722,11 +692,6 @@ BOOL WINAPI NtGdiStrokePath( HDC hdc )
|
|||
return unix_funcs->pNtGdiStrokePath( hdc );
|
||||
}
|
||||
|
||||
BOOL WINAPI NtGdiSwapBuffers( HDC hdc )
|
||||
{
|
||||
return unix_funcs->pNtGdiSwapBuffers( 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 )
|
||||
|
|
|
@ -254,6 +254,66 @@ NTSTATUS WINAPI wow64_NtGdiSetMetaRgn( UINT *args )
|
|||
return NtGdiSetMetaRgn( hdc );
|
||||
}
|
||||
|
||||
NTSTATUS WINAPI wow64_NtGdiSaveDC( UINT *args )
|
||||
{
|
||||
HDC hdc = get_handle( &args );
|
||||
|
||||
return NtGdiSaveDC( hdc );
|
||||
}
|
||||
|
||||
BOOL WINAPI wow64_NtGdiSetBrushOrg( UINT *args )
|
||||
{
|
||||
HDC hdc = get_handle( &args );
|
||||
INT x = get_ulong( &args );
|
||||
INT y = get_ulong( &args );
|
||||
POINT *prev_org = get_ptr( &args );
|
||||
|
||||
return NtGdiSetBrushOrg( hdc, x, y, prev_org );
|
||||
}
|
||||
|
||||
BOOL WINAPI wow64_NtGdiGetTransform( UINT *args )
|
||||
{
|
||||
HDC hdc = get_handle( &args );
|
||||
DWORD which = get_ulong( &args );
|
||||
XFORM *xform = get_ptr( &args );
|
||||
|
||||
return NtGdiGetTransform( hdc, which, xform );
|
||||
}
|
||||
|
||||
NTSTATUS WINAPI wow64_NtGdiDescribePixelFormat( UINT *args )
|
||||
{
|
||||
HDC hdc = get_handle( &args );
|
||||
INT format = get_ulong( &args );
|
||||
UINT size = get_ulong( &args );
|
||||
PIXELFORMATDESCRIPTOR *descr = get_ptr( &args );
|
||||
|
||||
return NtGdiDescribePixelFormat( hdc, format, size, descr );
|
||||
}
|
||||
|
||||
NTSTATUS WINAPI wow64_NtGdiSetPixelFormat( UINT *args )
|
||||
{
|
||||
HDC hdc = get_handle( &args );
|
||||
INT format = get_ulong( &args );
|
||||
|
||||
return NtGdiSetPixelFormat( hdc, format );
|
||||
}
|
||||
|
||||
NTSTATUS WINAPI wow64_NtGdiSwapBuffers( UINT *args )
|
||||
{
|
||||
HDC hdc = get_handle( &args );
|
||||
|
||||
return NtGdiSwapBuffers( hdc );
|
||||
}
|
||||
|
||||
NTSTATUS WINAPI wow64_NtGdiDrawStream( UINT *args )
|
||||
{
|
||||
HDC hdc = get_handle( &args );
|
||||
ULONG in = get_ulong( &args );
|
||||
void *pvin = get_ptr( &args );
|
||||
|
||||
return NtGdiDrawStream( hdc, in, pvin );
|
||||
}
|
||||
|
||||
NTSTATUS WINAPI wow64_NtGdiFlush( UINT *args )
|
||||
{
|
||||
return NtGdiFlush();
|
||||
|
|
|
@ -32,6 +32,8 @@
|
|||
SYSCALL_ENTRY( NtGdiCreateRectRgn ) \
|
||||
SYSCALL_ENTRY( NtGdiCreateRoundRectRgn ) \
|
||||
SYSCALL_ENTRY( NtGdiCreateSolidBrush ) \
|
||||
SYSCALL_ENTRY( NtGdiDescribePixelFormat ) \
|
||||
SYSCALL_ENTRY( NtGdiDrawStream ) \
|
||||
SYSCALL_ENTRY( NtGdiEqualRgn ) \
|
||||
SYSCALL_ENTRY( NtGdiExtCreateRegion ) \
|
||||
SYSCALL_ENTRY( NtGdiFlush ) \
|
||||
|
@ -39,12 +41,17 @@
|
|||
SYSCALL_ENTRY( NtGdiGetBitmapDimension ) \
|
||||
SYSCALL_ENTRY( NtGdiGetRegionData ) \
|
||||
SYSCALL_ENTRY( NtGdiGetRgnBox ) \
|
||||
SYSCALL_ENTRY( NtGdiGetTransform ) \
|
||||
SYSCALL_ENTRY( NtGdiOffsetRgn ) \
|
||||
SYSCALL_ENTRY( NtGdiPtInRegion ) \
|
||||
SYSCALL_ENTRY( NtGdiRectInRegion ) \
|
||||
SYSCALL_ENTRY( NtGdiSaveDC ) \
|
||||
SYSCALL_ENTRY( NtGdiSetBitmapBits ) \
|
||||
SYSCALL_ENTRY( NtGdiSetBitmapDimension ) \
|
||||
SYSCALL_ENTRY( NtGdiSetBrushOrg ) \
|
||||
SYSCALL_ENTRY( NtGdiSetMetaRgn ) \
|
||||
SYSCALL_ENTRY( NtGdiSetRectRgn )
|
||||
SYSCALL_ENTRY( NtGdiSetPixelFormat ) \
|
||||
SYSCALL_ENTRY( NtGdiSetRectRgn ) \
|
||||
SYSCALL_ENTRY( NtGdiSwapBuffers )
|
||||
|
||||
#endif /* __WOW64WIN_SYSCALL_H */
|
||||
|
|
Loading…
Reference in New Issue