Commit 3afff1a6 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

win32u: Add a hwnd parameter to SetCursor driver entry points.

parent 25906eed
......@@ -101,8 +101,8 @@ INT WINAPI NtUserShowCursor( BOOL show )
TRACE("%d, count=%d\n", show, count );
if (show && !count) user_driver->pSetCursor( cursor );
else if (!show && count == -1) user_driver->pSetCursor( 0 );
if (show && !count) user_driver->pSetCursor( 0, cursor );
else if (!show && count == -1) user_driver->pSetCursor( 0, 0 );
return count;
}
......@@ -132,7 +132,7 @@ HCURSOR WINAPI NtUserSetCursor( HCURSOR cursor )
SERVER_END_REQ;
if (!ret) return 0;
user_driver->pSetCursor( show_count >= 0 ? cursor : 0 );
user_driver->pSetCursor( 0, show_count >= 0 ? cursor : 0 );
if (!(obj = get_icon_ptr( old_cursor ))) return 0;
release_user_handle_ptr( obj );
......
......@@ -738,7 +738,7 @@ static void nulldrv_DestroyCursorIcon( HCURSOR cursor )
{
}
static void nulldrv_SetCursor( HCURSOR cursor )
static void nulldrv_SetCursor( HWND hwnd, HCURSOR cursor )
{
}
......@@ -1118,9 +1118,9 @@ static INT loaderdrv_GetDisplayDepth( LPCWSTR name, BOOL is_primary )
return load_driver()->pGetDisplayDepth( name, is_primary );
}
static void loaderdrv_SetCursor( HCURSOR cursor )
static void loaderdrv_SetCursor( HWND hwnd, HCURSOR cursor )
{
load_driver()->pSetCursor( cursor );
load_driver()->pSetCursor( hwnd, cursor );
}
static BOOL loaderdrv_GetCursorPos( POINT *pt )
......
......@@ -86,13 +86,12 @@ extern pthread_mutex_t win_data_mutex DECLSPEC_HIDDEN;
extern INT ANDROID_GetKeyNameText( LONG lparam, LPWSTR buffer, INT size ) DECLSPEC_HIDDEN;
extern UINT ANDROID_MapVirtualKeyEx( UINT code, UINT maptype, HKL hkl ) DECLSPEC_HIDDEN;
extern SHORT ANDROID_VkKeyScanEx( WCHAR ch, HKL hkl ) DECLSPEC_HIDDEN;
extern void ANDROID_SetCursor( HCURSOR handle ) DECLSPEC_HIDDEN;
extern void ANDROID_SetCursor( HWND hwnd, HCURSOR handle ) DECLSPEC_HIDDEN;
extern BOOL ANDROID_CreateDesktop( const WCHAR *name, UINT width, UINT height ) DECLSPEC_HIDDEN;
extern BOOL ANDROID_CreateWindow( HWND hwnd ) DECLSPEC_HIDDEN;
extern void ANDROID_DestroyWindow( HWND hwnd ) DECLSPEC_HIDDEN;
extern BOOL ANDROID_ProcessEvents( DWORD mask ) DECLSPEC_HIDDEN;
extern LRESULT ANDROID_DesktopWindowProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp ) DECLSPEC_HIDDEN;
extern void ANDROID_SetCursor( HCURSOR handle ) DECLSPEC_HIDDEN;
extern void ANDROID_SetLayeredWindowAttributes( HWND hwnd, COLORREF key, BYTE alpha,
DWORD flags ) DECLSPEC_HIDDEN;
extern void ANDROID_SetParent( HWND hwnd, HWND parent, HWND old_parent ) DECLSPEC_HIDDEN;
......
......@@ -1446,7 +1446,7 @@ static BOOL get_icon_info( HICON handle, ICONINFOEXW *ret )
/***********************************************************************
* ANDROID_SetCursor
*/
void ANDROID_SetCursor( HCURSOR handle )
void ANDROID_SetCursor( HWND hwnd, HCURSOR handle )
{
static HCURSOR last_cursor;
static DWORD last_cursor_change;
......
......@@ -159,7 +159,7 @@ extern void macdrv_WindowPosChanged(HWND hwnd, HWND insert_after, UINT swp_flags
extern void macdrv_DestroyCursorIcon(HCURSOR cursor) DECLSPEC_HIDDEN;
extern BOOL macdrv_GetCursorPos(LPPOINT pos) DECLSPEC_HIDDEN;
extern void macdrv_SetCapture(HWND hwnd, UINT flags) DECLSPEC_HIDDEN;
extern void macdrv_SetCursor(HCURSOR cursor) DECLSPEC_HIDDEN;
extern void macdrv_SetCursor(HWND hwnd, HCURSOR cursor) DECLSPEC_HIDDEN;
extern BOOL macdrv_SetCursorPos(INT x, INT y) DECLSPEC_HIDDEN;
extern BOOL macdrv_RegisterHotKey(HWND hwnd, UINT mod_flags, UINT vkey) DECLSPEC_HIDDEN;
extern void macdrv_UnregisterHotKey(HWND hwnd, UINT modifiers, UINT vkey) DECLSPEC_HIDDEN;
......
......@@ -744,12 +744,12 @@ static BOOL get_icon_info(HICON handle, ICONINFOEXW *ret)
/***********************************************************************
* SetCursor (MACDRV.@)
*/
void macdrv_SetCursor(HCURSOR cursor)
void macdrv_SetCursor(HWND hwnd, HCURSOR cursor)
{
CFStringRef cursor_name = NULL;
CFArrayRef cursor_frames = NULL;
TRACE("%p\n", cursor);
TRACE("%p %p\n", hwnd, cursor);
if (cursor)
{
......
......@@ -1402,7 +1402,7 @@ void X11DRV_DestroyCursorIcon( HCURSOR handle )
/***********************************************************************
* SetCursor (X11DRV.@)
*/
void X11DRV_SetCursor( HCURSOR handle )
void X11DRV_SetCursor( HWND hwnd, HCURSOR handle )
{
if (InterlockedExchangePointer( (void **)&last_cursor, handle ) != handle ||
NtGetTickCount() - last_cursor_change > 100)
......
......@@ -213,7 +213,7 @@ extern UINT X11DRV_ImeToAsciiEx( UINT vkey, UINT vsc, const BYTE *state,
extern SHORT X11DRV_VkKeyScanEx( WCHAR wChar, HKL hkl ) DECLSPEC_HIDDEN;
extern void X11DRV_NotifyIMEStatus( HWND hwnd, UINT status ) DECLSPEC_HIDDEN;
extern void X11DRV_DestroyCursorIcon( HCURSOR handle ) DECLSPEC_HIDDEN;
extern void X11DRV_SetCursor( HCURSOR handle ) DECLSPEC_HIDDEN;
extern void X11DRV_SetCursor( HWND hwnd, HCURSOR handle ) DECLSPEC_HIDDEN;
extern BOOL X11DRV_SetCursorPos( INT x, INT y ) DECLSPEC_HIDDEN;
extern BOOL X11DRV_GetCursorPos( LPPOINT pos ) DECLSPEC_HIDDEN;
extern BOOL X11DRV_ClipCursor( const RECT *clip, BOOL reset ) DECLSPEC_HIDDEN;
......
......@@ -298,7 +298,7 @@ struct user_driver_funcs
void (*pNotifyIMEStatus)(HWND,UINT);
/* cursor/icon functions */
void (*pDestroyCursorIcon)(HCURSOR);
void (*pSetCursor)(HCURSOR);
void (*pSetCursor)(HWND,HCURSOR);
BOOL (*pGetCursorPos)(LPPOINT);
BOOL (*pSetCursorPos)(INT,INT);
BOOL (*pClipCursor)(const RECT*,BOOL);
......
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