Commit e9cfbef4 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

win32u: Implement NtGdiGetDCDword.

parent 9eff8911
......@@ -961,6 +961,73 @@ BOOL WINAPI NtGdiGetAndSetDCDword( HDC hdc, UINT method, DWORD value, DWORD *pre
/***********************************************************************
* NtGdiGetDCDword (win32u.@)
*/
BOOL WINAPI NtGdiGetDCDword( HDC hdc, UINT method, DWORD *result )
{
BOOL ret = TRUE;
DC *dc;
if (!(dc = get_dc_ptr( hdc ))) return 0;
switch (method)
{
case NtGdiGetArcDirection:
*result = dc->attr->arc_direction;
break;
case NtGdiGetBkColor:
*result = dc->attr->background_color;
break;
case NtGdiGetBkMode:
*result = dc->attr->background_mode;
break;
case NtGdiGetDCBrushColor:
*result = dc->attr->brush_color;
break;
case NtGdiGetDCPenColor:
*result = dc->attr->pen_color;
break;
case NtGdiGetGraphicsMode:
*result = dc->attr->graphics_mode;
break;
case NtGdiGetLayout:
*result = dc->attr->layout;
break;
case NtGdiGetPolyFillMode:
*result = dc->attr->poly_fill_mode;
break;
case NtGdiGetROP2:
*result = dc->attr->rop_mode;
break;
case NtGdiGetTextColor:
*result = dc->attr->text_color;
break;
case NtGdiIsMemDC:
*result = get_gdi_object_type( hdc ) == NTGDI_OBJ_MEMDC;
break;
default:
WARN( "unknown method %u\n", method );
ret = FALSE;
break;
}
release_dc_ptr( dc );
return ret;
}
/***********************************************************************
* NtGdiSetBrushOrg (win32u.@)
*/
BOOL WINAPI NtGdiSetBrushOrg( HDC hdc, INT x, INT y, POINT *oldorg )
......
......@@ -70,6 +70,7 @@ static void * const syscalls[] =
NtGdiGetBitmapBits,
NtGdiGetBitmapDimension,
NtGdiGetColorAdjustment,
NtGdiGetDCDword,
NtGdiGetDCObject,
NtGdiGetFontFileData,
NtGdiGetFontFileInfo,
......
......@@ -462,7 +462,7 @@
@ stub NtGdiGetColorSpaceforBitmap
@ stub NtGdiGetCurrentDpiInfo
@ stub NtGdiGetDCDpiScaleValue
@ stub NtGdiGetDCDword
@ stdcall -syscall NtGdiGetDCDword(long long ptr)
@ stdcall -syscall NtGdiGetDCObject(long long)
@ stub NtGdiGetDCPoint
@ stub NtGdiGetDCforBitmap
......
......@@ -50,6 +50,15 @@ NTSTATUS WINAPI wow64_NtGdiExtGetObjectW( UINT *args )
return NtGdiExtGetObjectW( handle, count, buffer );
}
NTSTATUS WINAPI wow64_NtGdiGetDCDword( UINT *args )
{
HDC hdc = get_handle( &args );
UINT method = get_ulong( &args );
DWORD *result = get_ptr( &args );
return NtGdiGetDCDword( hdc, method, result );
}
NTSTATUS WINAPI wow64_NtGdiGetDCObject( UINT *args )
{
HDC hdc = get_handle( &args );
......
......@@ -57,6 +57,7 @@
SYSCALL_ENTRY( NtGdiGetBitmapBits ) \
SYSCALL_ENTRY( NtGdiGetBitmapDimension ) \
SYSCALL_ENTRY( NtGdiGetColorAdjustment ) \
SYSCALL_ENTRY( NtGdiGetDCDword ) \
SYSCALL_ENTRY( NtGdiGetDCObject ) \
SYSCALL_ENTRY( NtGdiGetFontFileData ) \
SYSCALL_ENTRY( NtGdiGetFontFileInfo ) \
......
......@@ -115,6 +115,22 @@ enum
NtGdiSetGraphicsMode,
};
/* NtGdiGetDCDword parameter, not compatible with Windows */
enum
{
NtGdiGetArcDirection,
NtGdiGetBkColor,
NtGdiGetBkMode,
NtGdiGetDCBrushColor,
NtGdiGetDCPenColor,
NtGdiGetGraphicsMode,
NtGdiGetLayout,
NtGdiGetPolyFillMode,
NtGdiGetROP2,
NtGdiGetTextColor,
NtGdiIsMemDC,
};
enum
{
NtGdiAnimatePalette,
......
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