win32u: Move NtUserGetCursorInfo implementation from user32.
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
e560357df1
commit
47ca0f49c7
|
@ -307,30 +307,6 @@ BOOL WINAPI DECLSPEC_HOTPATCH GetCursorPos( POINT *pt )
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GetCursorInfo (USER32.@)
|
||||
*/
|
||||
BOOL WINAPI GetCursorInfo( PCURSORINFO pci )
|
||||
{
|
||||
BOOL ret;
|
||||
|
||||
if (!pci) return FALSE;
|
||||
|
||||
SERVER_START_REQ( get_thread_input )
|
||||
{
|
||||
req->tid = 0;
|
||||
if ((ret = !wine_server_call( req )))
|
||||
{
|
||||
pci->hCursor = wine_server_ptr_handle( reply->cursor );
|
||||
pci->flags = (reply->show_count >= 0) ? CURSOR_SHOWING : 0;
|
||||
}
|
||||
}
|
||||
SERVER_END_REQ;
|
||||
GetCursorPos(&pci->ptScreenPos);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* SetCapture (USER32.@)
|
||||
*/
|
||||
|
|
|
@ -284,7 +284,7 @@
|
|||
@ stdcall GetCurrentInputMessageSource(ptr)
|
||||
@ stdcall GetCursor() NtUserGetCursor
|
||||
@ stdcall GetCursorFrameInfo(long long long ptr ptr)
|
||||
@ stdcall GetCursorInfo(ptr)
|
||||
@ stdcall GetCursorInfo(ptr) NtUserGetCursorInfo
|
||||
@ stdcall GetCursorPos(ptr)
|
||||
@ stdcall GetDC(long)
|
||||
@ stdcall GetDCEx(long long long)
|
||||
|
|
|
@ -1162,6 +1162,7 @@ static struct unix_funcs unix_funcs =
|
|||
NtUserEnumDisplayMonitors,
|
||||
NtUserEnumDisplaySettings,
|
||||
NtUserGetAsyncKeyState,
|
||||
NtUserGetCursorInfo,
|
||||
NtUserGetDisplayConfigBufferSizes,
|
||||
NtUserGetIconInfo,
|
||||
NtUserGetKeyNameText,
|
||||
|
|
|
@ -131,6 +131,29 @@ BOOL get_cursor_pos( POINT *pt )
|
|||
return ret;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* NtUserGetCursorInfo (win32u.@)
|
||||
*/
|
||||
BOOL WINAPI NtUserGetCursorInfo( CURSORINFO *info )
|
||||
{
|
||||
BOOL ret;
|
||||
|
||||
if (!info) return FALSE;
|
||||
|
||||
SERVER_START_REQ( get_thread_input )
|
||||
{
|
||||
req->tid = 0;
|
||||
if ((ret = !wine_server_call( req )))
|
||||
{
|
||||
info->hCursor = wine_server_ptr_handle( reply->cursor );
|
||||
info->flags = reply->show_count >= 0 ? CURSOR_SHOWING : 0;
|
||||
}
|
||||
}
|
||||
SERVER_END_REQ;
|
||||
get_cursor_pos( &info->ptScreenPos );
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void check_for_events( UINT flags )
|
||||
{
|
||||
if (user_driver->pMsgWaitForMultipleObjectsEx( 0, NULL, 0, flags, 0 ) == WAIT_TIMEOUT)
|
||||
|
|
|
@ -914,7 +914,7 @@
|
|||
@ stub NtUserGetCurrentInputMessageSource
|
||||
@ stdcall -syscall NtUserGetCursor()
|
||||
@ stdcall -syscall NtUserGetCursorFrameInfo(long long ptr ptr)
|
||||
@ stub NtUserGetCursorInfo
|
||||
@ stdcall NtUserGetCursorInfo(ptr)
|
||||
@ stub NtUserGetDC
|
||||
@ stub NtUserGetDCEx
|
||||
@ stub NtUserGetDManipHookInitFunction
|
||||
|
|
|
@ -199,6 +199,7 @@ struct unix_funcs
|
|||
BOOL (WINAPI *pNtUserEnumDisplaySettings)( UNICODE_STRING *device, DWORD mode,
|
||||
DEVMODEW *dev_mode, DWORD flags );
|
||||
SHORT (WINAPI *pNtUserGetAsyncKeyState)( INT key );
|
||||
BOOL (WINAPI *pNtUserGetCursorInfo)( CURSORINFO *info );
|
||||
LONG (WINAPI *pNtUserGetDisplayConfigBufferSizes)( UINT32 flags, UINT32 *num_path_info,
|
||||
UINT32 *num_mode_info );
|
||||
BOOL (WINAPI *pNtUserGetIconInfo)( HICON icon, ICONINFO *info, UNICODE_STRING *module,
|
||||
|
|
|
@ -777,6 +777,12 @@ SHORT WINAPI NtUserGetAsyncKeyState( INT key )
|
|||
return unix_funcs->pNtUserGetAsyncKeyState( key );
|
||||
}
|
||||
|
||||
BOOL WINAPI NtUserGetCursorInfo( CURSORINFO *info )
|
||||
{
|
||||
if (!unix_funcs) return FALSE;
|
||||
return unix_funcs->pNtUserGetCursorInfo( info );
|
||||
}
|
||||
|
||||
LONG WINAPI NtUserGetDisplayConfigBufferSizes( UINT32 flags, UINT32 *num_path_info,
|
||||
UINT32 *num_mode_info )
|
||||
{
|
||||
|
|
|
@ -205,6 +205,7 @@ HWND WINAPI NtUserGetClipboardViewer(void);
|
|||
HCURSOR WINAPI NtUserGetCursor(void);
|
||||
HCURSOR WINAPI NtUserGetCursorFrameInfo( HCURSOR hCursor, DWORD istep, DWORD *rate_jiffies,
|
||||
DWORD *num_steps );
|
||||
BOOL WINAPI NtUserGetCursorInfo( CURSORINFO *info );
|
||||
LONG WINAPI NtUserGetDisplayConfigBufferSizes( UINT32 flags, UINT32 *num_path_info,
|
||||
UINT32 *num_mode_info );
|
||||
UINT WINAPI NtUserGetDoubleClickTime(void);
|
||||
|
|
Loading…
Reference in New Issue