Commit 0492108a authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

win32u: Use syscall interface for all ntuser functions.

parent f9e77ad7
......@@ -1030,15 +1030,6 @@ BOOL WINAPI NtGdiSetColorAdjustment( HDC hdc, const COLORADJUSTMENT *ca )
static struct unix_funcs unix_funcs =
{
NtUserDrawCaptionTemp,
NtUserDrawMenuBarTemp,
NtUserEndPaint,
NtUserExcludeUpdateRgn,
NtUserReleaseDC,
NtUserScrollDC,
NtUserSelectPalette,
NtUserUpdateLayeredWindow,
SetDIBits,
__wine_get_brush_bitmap_info,
__wine_get_file_outline_text_metric,
......
......@@ -249,16 +249,20 @@ static void * const syscalls[] =
NtUserDisplayConfigGetDeviceInfo,
NtUserDragDetect,
NtUserDragObject,
NtUserDrawCaptionTemp,
NtUserDrawIconEx,
NtUserDrawMenuBarTemp,
NtUserEmptyClipboard,
NtUserEnableMenuItem,
NtUserEnableMouseInPointer,
NtUserEnableScrollBar,
NtUserEndDeferWindowPosEx,
NtUserEndMenu,
NtUserEndPaint,
NtUserEnumDisplayDevices,
NtUserEnumDisplayMonitors,
NtUserEnumDisplaySettings,
NtUserExcludeUpdateRgn,
NtUserFindExistingCursorIcon,
NtUserFindWindowEx,
NtUserFlashWindowEx,
......@@ -356,10 +360,13 @@ static void * const syscalls[] =
NtUserRegisterClassExWOW,
NtUserRegisterHotKey,
NtUserRegisterRawInputDevices,
NtUserReleaseDC,
NtUserRemoveClipboardFormatListener,
NtUserRemoveMenu,
NtUserRemoveProp,
NtUserScrollDC,
NtUserScrollWindowEx,
NtUserSelectPalette,
NtUserSendInput,
NtUserSetActiveWindow,
NtUserSetCapture,
......@@ -417,6 +424,7 @@ static void * const syscalls[] =
NtUserUnregisterClass,
NtUserUnregisterHotKey,
NtUserUpdateInputContext,
NtUserUpdateLayeredWindow,
NtUserValidateRect,
NtUserVkKeyScanEx,
NtUserWaitForInputIdle,
......
......@@ -849,9 +849,9 @@
@ stdcall -syscall NtUserDragObject(long long long long long)
@ stub NtUserDrawAnimatedRects
@ stub NtUserDrawCaption
@ stdcall NtUserDrawCaptionTemp(long long ptr long long wstr long)
@ stdcall -syscall NtUserDrawCaptionTemp(long long ptr long long wstr long)
@ stdcall -syscall NtUserDrawIconEx(long long long long long long long long long)
@ stdcall NtUserDrawMenuBarTemp(long long ptr long long)
@ stdcall -syscall NtUserDrawMenuBarTemp(long long ptr long long)
@ stub NtUserDwmGetRemoteSessionOcclusionEvent
@ stub NtUserDwmGetRemoteSessionOcclusionState
@ stub NtUserDwmKernelShutdown
......@@ -874,12 +874,12 @@
@ stub NtUserEnableWindowResizeOptimization
@ stdcall -syscall NtUserEndDeferWindowPosEx(long long)
@ stdcall -syscall NtUserEndMenu()
@ stdcall NtUserEndPaint(long ptr)
@ stdcall -syscall NtUserEndPaint(long ptr)
@ stdcall -syscall NtUserEnumDisplayDevices(ptr long ptr long)
@ stdcall -syscall NtUserEnumDisplayMonitors(long ptr ptr long)
@ stdcall -syscall NtUserEnumDisplaySettings(ptr long ptr long)
@ stub NtUserEvent
@ stdcall NtUserExcludeUpdateRgn(long long)
@ stdcall -syscall NtUserExcludeUpdateRgn(long long)
@ stub NtUserFillWindow
@ stdcall -syscall NtUserFindExistingCursorIcon(ptr ptr ptr)
@ stdcall -syscall NtUserFindWindowEx(long long ptr ptr long)
......@@ -1139,7 +1139,7 @@
@ stub NtUserRegisterTouchPadCapable
@ stub NtUserRegisterUserApiHook
@ stub NtUserRegisterWindowMessage
@ stdcall NtUserReleaseDC(long long)
@ stdcall -syscall NtUserReleaseDC(long long)
@ stub NtUserReleaseDwmHitTestWaiters
@ stub NtUserRemoteConnect
@ stub NtUserRemoteRedrawRectangle
......@@ -1155,9 +1155,9 @@
@ stub NtUserResolveDesktopForWOW
@ stub NtUserRestoreWindowDpiChanges
@ stub NtUserSBGetParms
@ stdcall NtUserScrollDC(long long long ptr ptr long ptr)
@ stdcall -syscall NtUserScrollDC(long long long ptr ptr long ptr)
@ stdcall -syscall NtUserScrollWindowEx(long long long ptr ptr long ptr long)
@ stdcall NtUserSelectPalette(long long long)
@ stdcall -syscall NtUserSelectPalette(long long long)
@ stub NtUserSendEventMessage
@ stdcall -syscall NtUserSendInput(long ptr long)
@ stub NtUserSendInteracsetiveControlHapticsReport
......@@ -1295,7 +1295,7 @@
@ stub NtUserUpdateDefaultDesktopThumbnail
@ stdcall -syscall NtUserUpdateInputContext(long long ptr)
@ stub NtUserUpdateInstance
@ stdcall NtUserUpdateLayeredWindow(long long ptr ptr long ptr long ptr long ptr)
@ stdcall -syscall NtUserUpdateLayeredWindow(long long ptr ptr long ptr long ptr long ptr)
@ stub NtUserUpdatePerUserSystemParameters
@ stub NtUserUpdateWindowInputSinkHints
@ stub NtUserUpdateWindowTrackingInfo
......
......@@ -34,21 +34,6 @@
struct unix_funcs
{
/* win32u functions */
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 );
BOOL (WINAPI *pNtUserEndPaint)( HWND hwnd, const PAINTSTRUCT *ps );
INT (WINAPI *pNtUserExcludeUpdateRgn)( HDC hdc, HWND hwnd );
INT (WINAPI *pNtUserReleaseDC)( HWND hwnd, HDC hdc );
BOOL (WINAPI *pNtUserScrollDC)( HDC hdc, INT dx, INT dy, const RECT *scroll, const RECT *clip,
HRGN ret_update_rgn, RECT *update_rect );
HPALETTE (WINAPI *pNtUserSelectPalette)( HDC hdc, HPALETTE hpal, WORD bkg );
BOOL (WINAPI *pNtUserUpdateLayeredWindow)( HWND hwnd, HDC hdc_dst, const POINT *pts_dst,
const SIZE *size, HDC hdc_src, const POINT *pts_src,
COLORREF key, const BLENDFUNCTION *blend,
DWORD flags, const RECT *dirty );
/* Wine-specific functions */
INT (WINAPI *pSetDIBits)( HDC hdc, HBITMAP hbitmap, UINT startscan,
UINT lines, const void *bits, const BITMAPINFO *info,
......
......@@ -24,59 +24,6 @@
static const struct unix_funcs *unix_funcs;
BOOL WINAPI NtUserEndPaint( HWND hwnd, const PAINTSTRUCT *ps )
{
if (!unix_funcs) return FALSE;
return unix_funcs->pNtUserEndPaint( hwnd, ps );
}
BOOL WINAPI NtUserDrawCaptionTemp( HWND hwnd, HDC hdc, const RECT *rect, HFONT font,
HICON icon, const WCHAR *str, UINT flags )
{
if (!unix_funcs) return FALSE;
return unix_funcs->pNtUserDrawCaptionTemp( hwnd, hdc, rect, font, icon, str, flags );
}
DWORD WINAPI NtUserDrawMenuBarTemp( HWND hwnd, HDC hdc, RECT *rect, HMENU handle, HFONT font )
{
if (!unix_funcs) return 0;
return unix_funcs->pNtUserDrawMenuBarTemp( hwnd, hdc, rect, handle, font );
}
INT WINAPI NtUserExcludeUpdateRgn( HDC hdc, HWND hwnd )
{
if (!unix_funcs) return ERROR;
return unix_funcs->pNtUserExcludeUpdateRgn( hdc, hwnd );
}
INT WINAPI NtUserReleaseDC( HWND hwnd, HDC hdc )
{
if (!unix_funcs) return 0;
return unix_funcs->pNtUserReleaseDC( hwnd, hdc );
}
BOOL WINAPI NtUserScrollDC( HDC hdc, INT dx, INT dy, const RECT *scroll, const RECT *clip,
HRGN ret_update_rgn, RECT *update_rect )
{
if (!unix_funcs) return FALSE;
return unix_funcs->pNtUserScrollDC( hdc, dx, dy, scroll, clip, ret_update_rgn, update_rect );
}
HPALETTE WINAPI NtUserSelectPalette( HDC hdc, HPALETTE hpal, WORD bkg )
{
if (!unix_funcs) return 0;
return unix_funcs->pNtUserSelectPalette( hdc, hpal, bkg );
}
BOOL WINAPI NtUserUpdateLayeredWindow( HWND hwnd, HDC hdc_dst, const POINT *pts_dst, const SIZE *size,
HDC hdc_src, const POINT *pts_src, COLORREF key,
const BLENDFUNCTION *blend, DWORD flags, const RECT *dirty )
{
if (!unix_funcs) return FALSE;
return unix_funcs->pNtUserUpdateLayeredWindow( hwnd, hdc_dst, pts_dst, size, hdc_src, pts_src,
key, blend, flags, dirty );
}
INT WINAPI SetDIBits( HDC hdc, HBITMAP hbitmap, UINT startscan,
UINT lines, const void *bits, const BITMAPINFO *info,
UINT coloruse )
......
......@@ -235,16 +235,20 @@
SYSCALL_ENTRY( NtUserDisplayConfigGetDeviceInfo ) \
SYSCALL_ENTRY( NtUserDragDetect ) \
SYSCALL_ENTRY( NtUserDragObject ) \
SYSCALL_ENTRY( NtUserDrawCaptionTemp ) \
SYSCALL_ENTRY( NtUserDrawIconEx ) \
SYSCALL_ENTRY( NtUserDrawMenuBarTemp ) \
SYSCALL_ENTRY( NtUserEmptyClipboard ) \
SYSCALL_ENTRY( NtUserEnableMenuItem ) \
SYSCALL_ENTRY( NtUserEnableMouseInPointer ) \
SYSCALL_ENTRY( NtUserEnableScrollBar ) \
SYSCALL_ENTRY( NtUserEndDeferWindowPosEx ) \
SYSCALL_ENTRY( NtUserEndMenu ) \
SYSCALL_ENTRY( NtUserEndPaint ) \
SYSCALL_ENTRY( NtUserEnumDisplayDevices ) \
SYSCALL_ENTRY( NtUserEnumDisplayMonitors ) \
SYSCALL_ENTRY( NtUserEnumDisplaySettings ) \
SYSCALL_ENTRY( NtUserExcludeUpdateRgn ) \
SYSCALL_ENTRY( NtUserFindExistingCursorIcon ) \
SYSCALL_ENTRY( NtUserFindWindowEx ) \
SYSCALL_ENTRY( NtUserFlashWindowEx ) \
......@@ -342,10 +346,13 @@
SYSCALL_ENTRY( NtUserRegisterClassExWOW ) \
SYSCALL_ENTRY( NtUserRegisterHotKey ) \
SYSCALL_ENTRY( NtUserRegisterRawInputDevices ) \
SYSCALL_ENTRY( NtUserReleaseDC ) \
SYSCALL_ENTRY( NtUserRemoveClipboardFormatListener ) \
SYSCALL_ENTRY( NtUserRemoveMenu ) \
SYSCALL_ENTRY( NtUserRemoveProp ) \
SYSCALL_ENTRY( NtUserScrollDC ) \
SYSCALL_ENTRY( NtUserScrollWindowEx ) \
SYSCALL_ENTRY( NtUserSelectPalette ) \
SYSCALL_ENTRY( NtUserSendInput ) \
SYSCALL_ENTRY( NtUserSetActiveWindow ) \
SYSCALL_ENTRY( NtUserSetCapture ) \
......@@ -403,6 +410,7 @@
SYSCALL_ENTRY( NtUserUnregisterClass ) \
SYSCALL_ENTRY( NtUserUnregisterHotKey ) \
SYSCALL_ENTRY( NtUserUpdateInputContext ) \
SYSCALL_ENTRY( NtUserUpdateLayeredWindow ) \
SYSCALL_ENTRY( NtUserValidateRect ) \
SYSCALL_ENTRY( NtUserVkKeyScanEx ) \
SYSCALL_ENTRY( NtUserWaitForInputIdle ) \
......
......@@ -1616,6 +1616,19 @@ NTSTATUS WINAPI wow64_NtUserDragObject( UINT *args )
return NtUserDragObject( parent, hwnd, fmt, data, hcursor );
}
NTSTATUS WINAPI wow64_NtUserDrawCaptionTemp( UINT *args )
{
HWND hwnd = get_handle( &args );
HDC hdc = get_handle( &args );
const RECT *rect = get_ptr( &args );
HFONT font = get_handle( &args );
HICON icon = get_handle( &args );
const WCHAR *str = get_ptr( &args );
UINT flags = get_ulong( &args );
return NtUserDrawCaptionTemp( hwnd, hdc, rect, font, icon, str, flags );
}
NTSTATUS WINAPI wow64_NtUserDrawIconEx( UINT *args )
{
HDC hdc = get_handle( &args );
......@@ -1631,6 +1644,17 @@ NTSTATUS WINAPI wow64_NtUserDrawIconEx( UINT *args )
return NtUserDrawIconEx( hdc, x0, y0, icon, width, height, istep, hbr, flags );
}
NTSTATUS WINAPI wow64_NtUserDrawMenuBarTemp( UINT *args )
{
HWND hwnd = get_handle( &args );
HDC hdc = get_handle( &args );
RECT *rect = get_ptr( &args );
HMENU handle = get_handle( &args );
HFONT font = get_handle( &args );
return NtUserDrawMenuBarTemp( hwnd, hdc, rect, handle, font );
}
NTSTATUS WINAPI wow64_NtUserEmptyClipboard( UINT *args )
{
return NtUserEmptyClipboard();
......@@ -1674,6 +1698,15 @@ NTSTATUS WINAPI wow64_NtUserEndMenu( UINT *args )
return NtUserEndMenu();
}
NTSTATUS WINAPI wow64_NtUserEndPaint( UINT *args )
{
HWND hwnd = get_handle( &args );
const PAINTSTRUCT32 *ps32 = get_ptr( &args );
PAINTSTRUCT ps;
return NtUserEndPaint( hwnd, paintstruct_32to64( &ps, ps32 ));
}
NTSTATUS WINAPI wow64_NtUserEnumDisplayDevices( UINT *args )
{
UNICODE_STRING32 *device32 = get_ptr( &args );
......@@ -1709,6 +1742,14 @@ NTSTATUS WINAPI wow64_NtUserEnumDisplaySettings( UINT *args )
mode, dev_mode, flags );
}
NTSTATUS WINAPI wow64_NtUserExcludeUpdateRgn( UINT *args )
{
HDC hdc = get_handle( &args );
HWND hwnd = get_handle( &args );
return NtUserExcludeUpdateRgn( hdc, hwnd );
}
NTSTATUS WINAPI wow64_NtUserFindExistingCursorIcon( UINT *args )
{
UNICODE_STRING32 *module32 = get_ptr( &args );
......@@ -3337,6 +3378,14 @@ NTSTATUS WINAPI wow64_NtUserRegisterRawInputDevices( UINT *args )
return NtUserRegisterRawInputDevices( devices64, count, sizeof(*devices64) );
}
NTSTATUS WINAPI wow64_NtUserReleaseDC( UINT *args )
{
HWND hwnd = get_handle( &args );
HDC hdc = get_handle( &args );
return NtUserReleaseDC( hwnd, hdc );
}
NTSTATUS WINAPI wow64_NtUserRemoveClipboardFormatListener( UINT *args )
{
HWND hwnd = get_handle( &args );
......@@ -3361,6 +3410,19 @@ NTSTATUS WINAPI wow64_NtUserRemoveProp( UINT *args )
return HandleToUlong( NtUserRemoveProp( hwnd, str ));
}
NTSTATUS WINAPI wow64_NtUserScrollDC( UINT *args )
{
HDC hdc = get_handle( &args );
INT dx = get_ulong( &args );
INT dy = get_ulong( &args );
const RECT *scroll = get_ptr( &args );
const RECT *clip = get_ptr( &args );
HRGN ret_update_rgn = get_handle( &args );
RECT *update_rect = get_ptr( &args );
return NtUserScrollDC( hdc, dx, dy, scroll, clip, ret_update_rgn, update_rect );
}
NTSTATUS WINAPI wow64_NtUserScrollWindowEx( UINT *args )
{
HWND hwnd = get_handle( &args );
......@@ -3375,6 +3437,15 @@ NTSTATUS WINAPI wow64_NtUserScrollWindowEx( UINT *args )
return NtUserScrollWindowEx( hwnd, dx, dy, rect, clip_rect, update_rgn, update_rect, flags );
}
NTSTATUS WINAPI wow64_NtUserSelectPalette( UINT *args )
{
HDC hdc = get_handle( &args );
HPALETTE hpal = get_handle( &args );
WORD bkg = get_ulong( &args );
return HandleToUlong( NtUserSelectPalette( hdc, hpal, bkg ));
}
NTSTATUS WINAPI wow64_NtUserSendInput( UINT *args )
{
UINT count = get_ulong( &args );
......@@ -4203,6 +4274,23 @@ NTSTATUS WINAPI wow64_NtUserUpdateInputContext( UINT *args )
return NtUserUpdateInputContext( handle, attr, value );
}
NTSTATUS WINAPI wow64_NtUserUpdateLayeredWindow( UINT *args )
{
HWND hwnd = get_handle( &args );
HDC hdc_dst = get_handle( &args );
const POINT *pts_dst = get_ptr( &args );
const SIZE *size = get_ptr( &args );
HDC hdc_src = get_handle( &args );
const POINT *pts_src = get_ptr( &args );
COLORREF key = get_ulong( &args );
const BLENDFUNCTION *blend = get_ptr( &args );
DWORD flags = get_ulong( &args );
const RECT *dirty = get_ptr( &args );
return NtUserUpdateLayeredWindow( hwnd, hdc_dst, pts_dst, size, hdc_src, pts_src,
key, blend, flags, dirty );
}
NTSTATUS WINAPI wow64_NtUserValidateRect( UINT *args )
{
HWND hwnd = get_handle( &args );
......
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