Commit acebc001 authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

user32: Make some functions hookable.

parent 282cc71a
...@@ -1803,7 +1803,7 @@ DWORD WINAPI DumpIcon16( SEGPTR pInfo, WORD *lpLen, ...@@ -1803,7 +1803,7 @@ DWORD WINAPI DumpIcon16( SEGPTR pInfo, WORD *lpLen,
* RETURNS * RETURNS
* A handle to the previous cursor shape. * A handle to the previous cursor shape.
*/ */
HCURSOR WINAPI SetCursor( HCURSOR hCursor /* [in] Handle of cursor to show */ ) HCURSOR WINAPI DECLSPEC_HOTPATCH SetCursor( HCURSOR hCursor /* [in] Handle of cursor to show */ )
{ {
struct user_thread_info *thread_info = get_user_thread_info(); struct user_thread_info *thread_info = get_user_thread_info();
HCURSOR hOldCursor; HCURSOR hOldCursor;
...@@ -1824,7 +1824,7 @@ HCURSOR WINAPI SetCursor( HCURSOR hCursor /* [in] Handle of cursor to show */ ) ...@@ -1824,7 +1824,7 @@ HCURSOR WINAPI SetCursor( HCURSOR hCursor /* [in] Handle of cursor to show */ )
/*********************************************************************** /***********************************************************************
* ShowCursor (USER32.@) * ShowCursor (USER32.@)
*/ */
INT WINAPI ShowCursor( BOOL bShow ) INT WINAPI DECLSPEC_HOTPATCH ShowCursor( BOOL bShow )
{ {
struct user_thread_info *thread_info = get_user_thread_info(); struct user_thread_info *thread_info = get_user_thread_info();
...@@ -1858,7 +1858,7 @@ HCURSOR WINAPI GetCursor(void) ...@@ -1858,7 +1858,7 @@ HCURSOR WINAPI GetCursor(void)
/*********************************************************************** /***********************************************************************
* ClipCursor (USER32.@) * ClipCursor (USER32.@)
*/ */
BOOL WINAPI ClipCursor( const RECT *rect ) BOOL WINAPI DECLSPEC_HOTPATCH ClipCursor( const RECT *rect )
{ {
RECT virt; RECT virt;
...@@ -1881,7 +1881,7 @@ BOOL WINAPI ClipCursor( const RECT *rect ) ...@@ -1881,7 +1881,7 @@ BOOL WINAPI ClipCursor( const RECT *rect )
/*********************************************************************** /***********************************************************************
* GetClipCursor (USER32.@) * GetClipCursor (USER32.@)
*/ */
BOOL WINAPI GetClipCursor( RECT *rect ) BOOL WINAPI DECLSPEC_HOTPATCH GetClipCursor( RECT *rect )
{ {
/* If this is first time - initialize the rect */ /* If this is first time - initialize the rect */
if (IsRectEmpty( &CURSOR_ClipRect )) ClipCursor( NULL ); if (IsRectEmpty( &CURSOR_ClipRect )) ClipCursor( NULL );
......
...@@ -192,7 +192,7 @@ void WINAPI mouse_event( DWORD dwFlags, DWORD dx, DWORD dy, ...@@ -192,7 +192,7 @@ void WINAPI mouse_event( DWORD dwFlags, DWORD dx, DWORD dy,
/*********************************************************************** /***********************************************************************
* GetCursorPos (USER32.@) * GetCursorPos (USER32.@)
*/ */
BOOL WINAPI GetCursorPos( POINT *pt ) BOOL WINAPI DECLSPEC_HOTPATCH GetCursorPos( POINT *pt )
{ {
if (!pt) return FALSE; if (!pt) return FALSE;
return USER_Driver->pGetCursorPos( pt ); return USER_Driver->pGetCursorPos( pt );
...@@ -215,7 +215,7 @@ BOOL WINAPI GetCursorInfo( PCURSORINFO pci ) ...@@ -215,7 +215,7 @@ BOOL WINAPI GetCursorInfo( PCURSORINFO pci )
/*********************************************************************** /***********************************************************************
* SetCursorPos (USER32.@) * SetCursorPos (USER32.@)
*/ */
BOOL WINAPI SetCursorPos( INT x, INT y ) BOOL WINAPI DECLSPEC_HOTPATCH SetCursorPos( INT x, INT y )
{ {
return USER_Driver->pSetCursorPos( x, y ); return USER_Driver->pSetCursorPos( x, y );
} }
...@@ -224,7 +224,7 @@ BOOL WINAPI SetCursorPos( INT x, INT y ) ...@@ -224,7 +224,7 @@ BOOL WINAPI SetCursorPos( INT x, INT y )
/********************************************************************** /**********************************************************************
* SetCapture (USER32.@) * SetCapture (USER32.@)
*/ */
HWND WINAPI SetCapture( HWND hwnd ) HWND WINAPI DECLSPEC_HOTPATCH SetCapture( HWND hwnd )
{ {
HWND previous; HWND previous;
...@@ -236,7 +236,7 @@ HWND WINAPI SetCapture( HWND hwnd ) ...@@ -236,7 +236,7 @@ HWND WINAPI SetCapture( HWND hwnd )
/********************************************************************** /**********************************************************************
* ReleaseCapture (USER32.@) * ReleaseCapture (USER32.@)
*/ */
BOOL WINAPI ReleaseCapture(void) BOOL WINAPI DECLSPEC_HOTPATCH ReleaseCapture(void)
{ {
BOOL ret = set_capture_window( 0, 0, NULL ); BOOL ret = set_capture_window( 0, 0, NULL );
...@@ -271,7 +271,7 @@ HWND WINAPI GetCapture(void) ...@@ -271,7 +271,7 @@ HWND WINAPI GetCapture(void)
* bit set to 1 if currently pressed, low-order bit set to 1 if key has * bit set to 1 if currently pressed, low-order bit set to 1 if key has
* been pressed. * been pressed.
*/ */
SHORT WINAPI GetAsyncKeyState(INT nKey) SHORT WINAPI DECLSPEC_HOTPATCH GetAsyncKeyState(INT nKey)
{ {
if (nKey < 0 || nKey > 256) if (nKey < 0 || nKey > 256)
return 0; return 0;
...@@ -370,7 +370,7 @@ UINT WINAPI GetRawInputDeviceList(PRAWINPUTDEVICELIST pRawInputDeviceList, PUINT ...@@ -370,7 +370,7 @@ UINT WINAPI GetRawInputDeviceList(PRAWINPUTDEVICELIST pRawInputDeviceList, PUINT
/****************************************************************** /******************************************************************
* RegisterRawInputDevices (USER32.@) * RegisterRawInputDevices (USER32.@)
*/ */
BOOL WINAPI RegisterRawInputDevices(PRAWINPUTDEVICE pRawInputDevices, UINT uiNumDevices, UINT cbSize) BOOL WINAPI DECLSPEC_HOTPATCH RegisterRawInputDevices(PRAWINPUTDEVICE pRawInputDevices, UINT uiNumDevices, UINT cbSize)
{ {
FIXME("(pRawInputDevices=%p, uiNumDevices=%d, cbSize=%d) stub!\n", pRawInputDevices, uiNumDevices, cbSize); FIXME("(pRawInputDevices=%p, uiNumDevices=%d, cbSize=%d) stub!\n", pRawInputDevices, uiNumDevices, cbSize);
...@@ -393,7 +393,7 @@ UINT WINAPI GetRawInputData(HRAWINPUT hRawInput, UINT uiCommand, LPVOID pData, P ...@@ -393,7 +393,7 @@ UINT WINAPI GetRawInputData(HRAWINPUT hRawInput, UINT uiCommand, LPVOID pData, P
/****************************************************************** /******************************************************************
* GetRawInputBuffer (USER32.@) * GetRawInputBuffer (USER32.@)
*/ */
UINT WINAPI GetRawInputBuffer(PRAWINPUT pData, PUINT pcbSize, UINT cbSizeHeader) UINT WINAPI DECLSPEC_HOTPATCH GetRawInputBuffer(PRAWINPUT pData, PUINT pcbSize, UINT cbSizeHeader)
{ {
FIXME("(pData=%p, pcbSize=%p, cbSizeHeader=%d) stub!\n", pData, pcbSize, cbSizeHeader); FIXME("(pData=%p, pcbSize=%p, cbSizeHeader=%d) stub!\n", pData, pcbSize, cbSizeHeader);
...@@ -474,7 +474,7 @@ BOOL WINAPI AttachThreadInput( DWORD from, DWORD to, BOOL attach ) ...@@ -474,7 +474,7 @@ BOOL WINAPI AttachThreadInput( DWORD from, DWORD to, BOOL attach )
* keyboard-input message. This function retrieves the state of the key * keyboard-input message. This function retrieves the state of the key
* at the time the input message was generated. * at the time the input message was generated.
*/ */
SHORT WINAPI GetKeyState(INT vkey) SHORT WINAPI DECLSPEC_HOTPATCH GetKeyState(INT vkey)
{ {
SHORT retval = 0; SHORT retval = 0;
...@@ -493,7 +493,7 @@ SHORT WINAPI GetKeyState(INT vkey) ...@@ -493,7 +493,7 @@ SHORT WINAPI GetKeyState(INT vkey)
/********************************************************************** /**********************************************************************
* GetKeyboardState (USER32.@) * GetKeyboardState (USER32.@)
*/ */
BOOL WINAPI GetKeyboardState( LPBYTE state ) BOOL WINAPI DECLSPEC_HOTPATCH GetKeyboardState( LPBYTE state )
{ {
BOOL ret; BOOL ret;
......
...@@ -3059,7 +3059,7 @@ BOOL WINAPI TranslateMessage( const MSG *msg ) ...@@ -3059,7 +3059,7 @@ BOOL WINAPI TranslateMessage( const MSG *msg )
* *
* See DispatchMessageW. * See DispatchMessageW.
*/ */
LRESULT WINAPI DispatchMessageA( const MSG* msg ) LRESULT WINAPI DECLSPEC_HOTPATCH DispatchMessageA( const MSG* msg )
{ {
LRESULT retval; LRESULT retval;
...@@ -3130,7 +3130,7 @@ LRESULT WINAPI DispatchMessageA( const MSG* msg ) ...@@ -3130,7 +3130,7 @@ LRESULT WINAPI DispatchMessageA( const MSG* msg )
* ECMA-234, Win32 * ECMA-234, Win32
* *
*/ */
LRESULT WINAPI DispatchMessageW( const MSG* msg ) LRESULT WINAPI DECLSPEC_HOTPATCH DispatchMessageW( const MSG* msg )
{ {
LRESULT retval; LRESULT retval;
......
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