win32u: Implement NtGdiGetDCPoint.

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:
Jacek Caban 2022-04-12 13:09:06 +02:00 committed by Alexandre Julliard
parent e9cfbef46b
commit 43126a5053
6 changed files with 56 additions and 1 deletions

View File

@ -1027,6 +1027,42 @@ BOOL WINAPI NtGdiGetDCDword( HDC hdc, UINT method, DWORD *result )
}
/***********************************************************************
* NtGdiGetDCPoint (win32u.@)
*/
BOOL WINAPI NtGdiGetDCPoint( HDC hdc, UINT method, POINT *result )
{
BOOL ret = TRUE;
DC *dc;
if (!(dc = get_dc_ptr( hdc ))) return 0;
switch (method)
{
case NtGdiGetBrushOrgEx:
*result = dc->attr->brush_org;
break;
case NtGdiGetCurrentPosition:
*result = dc->attr->cur_pos;
break;
case NtGdiGetDCOrg:
result->x = dc->attr->vis_rect.left;
result->y = dc->attr->vis_rect.top;
break;
default:
WARN( "unknown method %u\n", method );
ret = FALSE;
break;
}
release_dc_ptr( dc );
return ret;
}
/***********************************************************************
* NtGdiSetBrushOrg (win32u.@)
*/

View File

@ -72,6 +72,7 @@ static void * const syscalls[] =
NtGdiGetColorAdjustment,
NtGdiGetDCDword,
NtGdiGetDCObject,
NtGdiGetDCPoint,
NtGdiGetFontFileData,
NtGdiGetFontFileInfo,
NtGdiGetNearestPaletteIndex,

View File

@ -464,7 +464,7 @@
@ stub NtGdiGetDCDpiScaleValue
@ stdcall -syscall NtGdiGetDCDword(long long ptr)
@ stdcall -syscall NtGdiGetDCObject(long long)
@ stub NtGdiGetDCPoint
@ stdcall -syscall NtGdiGetDCPoint(long long ptr)
@ stub NtGdiGetDCforBitmap
@ stdcall NtGdiGetDIBitsInternal(long long long long ptr ptr long long long)
@ stdcall NtGdiGetDeviceCaps(long long)

View File

@ -67,6 +67,15 @@ NTSTATUS WINAPI wow64_NtGdiGetDCObject( UINT *args )
return HandleToUlong( NtGdiGetDCObject( hdc, type ));
}
NTSTATUS WINAPI wow64_NtGdiGetDCPoint( UINT *args )
{
HDC hdc = get_handle( &args );
UINT method = get_ulong( &args );
POINT *result = get_ptr( &args );
return NtGdiGetDCPoint( hdc, method, result );
}
NTSTATUS WINAPI wow64_NtGdiCreateBitmap( UINT *args )
{
INT width = get_ulong( &args );

View File

@ -59,6 +59,7 @@
SYSCALL_ENTRY( NtGdiGetColorAdjustment ) \
SYSCALL_ENTRY( NtGdiGetDCDword ) \
SYSCALL_ENTRY( NtGdiGetDCObject ) \
SYSCALL_ENTRY( NtGdiGetDCPoint ) \
SYSCALL_ENTRY( NtGdiGetFontFileData ) \
SYSCALL_ENTRY( NtGdiGetFontFileInfo ) \
SYSCALL_ENTRY( NtGdiGetNearestPaletteIndex ) \

View File

@ -131,6 +131,14 @@ enum
NtGdiIsMemDC,
};
/* NtGdiGetDCPoint parameter, not compatible with Windows */
enum
{
NtGdiGetBrushOrgEx,
NtGdiGetCurrentPosition,
NtGdiGetDCOrg,
};
enum
{
NtGdiAnimatePalette,