2 * USER Input processing
4 * Copyright 1993 Bob Amstadt
5 * Copyright 1996 Albrecht Kleine
6 * Copyright 1997 David Faure
7 * Copyright 1998 Morten Welinder
8 * Copyright 1998 Ulrich Weigand
9 * Copyright 2012 Henri Verbeet
10 * Copyright 2018 Zebediah Figura for CodeWeavers
12 * This library is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU Lesser General Public
14 * License as published by the Free Software Foundation; either
15 * version 2.1 of the License, or (at your option) any later version.
17 * This library is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * Lesser General Public License for more details.
22 * You should have received a copy of the GNU Lesser General Public
23 * License along with this library; if not, write to the Free Software
24 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
27 #include "user_private.h"
29 #include "wine/server.h"
30 #include "wine/debug.h"
32 WINE_DEFAULT_DEBUG_CHANNEL(win
);
33 WINE_DECLARE_DEBUG_CHANNEL(keyboard
);
35 /***********************************************************************
36 * get_locale_kbd_layout
38 static HKL
get_locale_kbd_layout(void)
44 * layout = main_key_tab[kbd_layout].lcid;
46 * Winword uses return value of GetKeyboardLayout as a codepage
47 * to translate ANSI keyboard messages to unicode. But we have
48 * a problem with it: for instance Polish keyboard layout is
49 * identical to the US one, and therefore instead of the Polish
50 * locale id we return the US one.
53 layout
= GetUserDefaultLCID();
54 layout
= MAKELONG( layout
, layout
);
59 /***********************************************************************
60 * keybd_event (USER32.@)
62 void WINAPI
keybd_event( BYTE bVk
, BYTE bScan
,
63 DWORD dwFlags
, ULONG_PTR dwExtraInfo
)
67 input
.type
= INPUT_KEYBOARD
;
69 input
.ki
.wScan
= bScan
;
70 input
.ki
.dwFlags
= dwFlags
;
72 input
.ki
.dwExtraInfo
= dwExtraInfo
;
73 NtUserSendInput( 1, &input
, sizeof(input
) );
77 /***********************************************************************
78 * mouse_event (USER32.@)
80 void WINAPI
mouse_event( DWORD dwFlags
, DWORD dx
, DWORD dy
,
81 DWORD dwData
, ULONG_PTR dwExtraInfo
)
85 input
.type
= INPUT_MOUSE
;
88 input
.mi
.mouseData
= dwData
;
89 input
.mi
.dwFlags
= dwFlags
;
91 input
.mi
.dwExtraInfo
= dwExtraInfo
;
92 NtUserSendInput( 1, &input
, sizeof(input
) );
96 /***********************************************************************
97 * GetCursorPos (USER32.@)
99 BOOL WINAPI DECLSPEC_HOTPATCH
GetCursorPos( POINT
*pt
)
101 return NtUserGetCursorPos( pt
);
105 /**********************************************************************
106 * ReleaseCapture (USER32.@)
108 BOOL WINAPI DECLSPEC_HOTPATCH
ReleaseCapture(void)
110 return NtUserReleaseCapture();
114 /**********************************************************************
115 * GetCapture (USER32.@)
117 HWND WINAPI
GetCapture(void)
120 info
.cbSize
= sizeof(info
);
121 return NtUserGetGUIThreadInfo( GetCurrentThreadId(), &info
) ? info
.hwndCapture
: 0;
125 /*****************************************************************
126 * DestroyCaret (USER32.@)
128 BOOL WINAPI
DestroyCaret(void)
130 return NtUserDestroyCaret();
134 /*****************************************************************
135 * SetCaretPos (USER32.@)
137 BOOL WINAPI
SetCaretPos( int x
, int y
)
139 return NtUserSetCaretPos( x
, y
);
143 /*****************************************************************
144 * SetCaretBlinkTime (USER32.@)
146 BOOL WINAPI
SetCaretBlinkTime( unsigned int time
)
148 return NtUserSetCaretBlinkTime( time
);
152 /***********************************************************************
153 * GetInputState (USER32.@)
155 BOOL WINAPI
GetInputState(void)
157 return NtUserGetInputState();
161 /******************************************************************
162 * GetLastInputInfo (USER32.@)
164 BOOL WINAPI
GetLastInputInfo(PLASTINPUTINFO plii
)
170 if (plii
->cbSize
!= sizeof (*plii
) )
172 SetLastError(ERROR_INVALID_PARAMETER
);
176 SERVER_START_REQ( get_last_input_time
)
178 ret
= !wine_server_call_err( req
);
180 plii
->dwTime
= reply
->time
;
187 /**********************************************************************
188 * VkKeyScanA (USER32.@)
190 * VkKeyScan translates an ANSI character to a virtual-key and shift code
191 * for the current keyboard.
192 * high-order byte yields :
196 * 3-5 Shift-key combinations that are not used for characters
199 * I.e. : Shift = 1, Ctrl = 2, Alt = 4.
200 * FIXME : works ok except for dead chars :
201 * VkKeyScan '^'(0x5e, 94) ... got keycode 00 ... returning 00
202 * VkKeyScan '`'(0x60, 96) ... got keycode 00 ... returning 00
204 SHORT WINAPI
VkKeyScanA(CHAR cChar
)
208 if (IsDBCSLeadByte(cChar
)) return -1;
210 MultiByteToWideChar(CP_ACP
, 0, &cChar
, 1, &wChar
, 1);
211 return VkKeyScanW(wChar
);
214 /******************************************************************************
215 * VkKeyScanW (USER32.@)
217 SHORT WINAPI
VkKeyScanW(WCHAR cChar
)
219 return NtUserVkKeyScanEx( cChar
, NtUserGetKeyboardLayout(0) );
222 /**********************************************************************
223 * VkKeyScanExA (USER32.@)
225 WORD WINAPI
VkKeyScanExA(CHAR cChar
, HKL dwhkl
)
229 if (IsDBCSLeadByte(cChar
)) return -1;
231 MultiByteToWideChar(CP_ACP
, 0, &cChar
, 1, &wChar
, 1);
232 return NtUserVkKeyScanEx( wChar
, dwhkl
);
235 /**********************************************************************
236 * OemKeyScan (USER32.@)
238 DWORD WINAPI
OemKeyScan( WORD oem
)
242 char oem_char
= LOBYTE( oem
);
244 if (!OemToCharBuffW( &oem_char
, &wchr
, 1 ))
247 vkey
= VkKeyScanW( wchr
);
248 scan
= MapVirtualKeyW( LOBYTE( vkey
), MAPVK_VK_TO_VSC
);
249 if (!scan
) return -1;
256 /******************************************************************************
257 * GetKeyboardType (USER32.@)
259 INT WINAPI
GetKeyboardType(INT nTypeFlag
)
261 TRACE_(keyboard
)("(%d)\n", nTypeFlag
);
262 if (LOWORD(NtUserGetKeyboardLayout(0)) == MAKELANGID(LANG_JAPANESE
, SUBLANG_JAPANESE_JAPAN
))
264 /* scan code for `_', the key left of r-shift, in Japanese 106 keyboard */
265 const UINT JP106_VSC_USCORE
= 0x73;
269 case 0: /* Keyboard type */
270 return 7; /* Japanese keyboard */
271 case 1: /* Keyboard Subtype */
272 /* Test keyboard mappings to detect Japanese keyboard */
273 if (MapVirtualKeyW(VK_OEM_102
, MAPVK_VK_TO_VSC
) == JP106_VSC_USCORE
274 && MapVirtualKeyW(JP106_VSC_USCORE
, MAPVK_VSC_TO_VK
) == VK_OEM_102
)
275 return 2; /* Japanese 106 */
277 return 0; /* AT-101 */
278 case 2: /* Number of F-keys */
279 return 12; /* It has 12 F-keys */
286 case 0: /* Keyboard type */
287 return 4; /* AT-101 */
288 case 1: /* Keyboard Subtype */
289 return 0; /* There are no defined subtypes */
290 case 2: /* Number of F-keys */
291 return 12; /* We're doing an 101 for now, so return 12 F-keys */
294 WARN_(keyboard
)("Unknown type\n");
295 return 0; /* The book says 0 here, so 0 */
298 /******************************************************************************
299 * MapVirtualKeyA (USER32.@)
301 UINT WINAPI
MapVirtualKeyA(UINT code
, UINT maptype
)
303 return MapVirtualKeyExA( code
, maptype
, NtUserGetKeyboardLayout(0) );
306 /******************************************************************************
307 * MapVirtualKeyW (USER32.@)
309 UINT WINAPI
MapVirtualKeyW(UINT code
, UINT maptype
)
311 return NtUserMapVirtualKeyEx( code
, maptype
, NtUserGetKeyboardLayout(0) );
314 /******************************************************************************
315 * MapVirtualKeyExA (USER32.@)
317 UINT WINAPI
MapVirtualKeyExA(UINT code
, UINT maptype
, HKL hkl
)
321 ret
= NtUserMapVirtualKeyEx( code
, maptype
, hkl
);
322 if (maptype
== MAPVK_VK_TO_CHAR
)
327 WideCharToMultiByte( CP_ACP
, 0, &wch
, 1, (LPSTR
)&ch
, 1, NULL
, NULL
);
333 /****************************************************************************
334 * GetKBCodePage (USER32.@)
336 UINT WINAPI
GetKBCodePage(void)
341 /****************************************************************************
342 * GetKeyboardLayoutNameA (USER32.@)
344 BOOL WINAPI
GetKeyboardLayoutNameA(LPSTR pszKLID
)
346 WCHAR buf
[KL_NAMELENGTH
];
348 if (NtUserGetKeyboardLayoutName( buf
))
349 return WideCharToMultiByte( CP_ACP
, 0, buf
, -1, pszKLID
, KL_NAMELENGTH
, NULL
, NULL
) != 0;
353 /****************************************************************************
354 * GetKeyNameTextA (USER32.@)
356 INT WINAPI
GetKeyNameTextA(LONG lParam
, LPSTR lpBuffer
, INT nSize
)
361 if (!nSize
|| !NtUserGetKeyNameText( lParam
, buf
, ARRAYSIZE(buf
) ))
366 ret
= WideCharToMultiByte(CP_ACP
, 0, buf
, -1, lpBuffer
, nSize
, NULL
, NULL
);
377 /****************************************************************************
378 * ToUnicode (USER32.@)
380 INT WINAPI
ToUnicode( UINT virt
, UINT scan
, const BYTE
*state
, LPWSTR str
, int size
, UINT flags
)
382 return NtUserToUnicodeEx( virt
, scan
, state
, str
, size
, flags
, NtUserGetKeyboardLayout(0) );
385 /****************************************************************************
388 INT WINAPI
ToAscii( UINT virtKey
, UINT scanCode
, const BYTE
*lpKeyState
,
389 LPWORD lpChar
, UINT flags
)
391 return ToAsciiEx( virtKey
, scanCode
, lpKeyState
, lpChar
, flags
,
392 NtUserGetKeyboardLayout(0) );
395 /****************************************************************************
396 * ToAsciiEx (USER32.@)
398 INT WINAPI
ToAsciiEx( UINT virtKey
, UINT scanCode
, const BYTE
*lpKeyState
,
399 LPWORD lpChar
, UINT flags
, HKL dwhkl
)
404 ret
= NtUserToUnicodeEx( virtKey
, scanCode
, lpKeyState
, uni_chars
, 2, flags
, dwhkl
);
405 if (ret
< 0) n_ret
= 1; /* FIXME: make ToUnicode return 2 for dead chars */
407 WideCharToMultiByte(CP_ACP
, 0, uni_chars
, n_ret
, (LPSTR
)lpChar
, 2, NULL
, NULL
);
411 /**********************************************************************
412 * BlockInput (USER32.@)
414 BOOL WINAPI
BlockInput(BOOL fBlockIt
)
416 FIXME_(keyboard
)("(%d): stub\n", fBlockIt
);
417 SetLastError(ERROR_CALL_NOT_IMPLEMENTED
);
423 /***********************************************************************
424 * LoadKeyboardLayoutW (USER32.@)
426 HKL WINAPI
LoadKeyboardLayoutW( const WCHAR
*name
, UINT flags
)
428 WCHAR layout_path
[MAX_PATH
], value
[5];
429 LCID locale
= GetUserDefaultLCID();
430 DWORD id
, value_size
, tmp
;
434 FIXME_(keyboard
)( "name %s, flags %x, semi-stub!\n", debugstr_w( name
), flags
);
436 tmp
= wcstoul( name
, NULL
, 16 );
437 if (HIWORD( tmp
)) layout
= UlongToHandle( tmp
);
438 else layout
= UlongToHandle( MAKELONG( LOWORD( tmp
), LOWORD( tmp
) ) );
440 if (!((UINT_PTR
)layout
>> 28)) id
= LOWORD( tmp
);
441 else id
= HIWORD( layout
); /* IME or aliased layout */
443 wcscpy( layout_path
, L
"System\\CurrentControlSet\\Control\\Keyboard Layouts\\" );
444 wcscat( layout_path
, name
);
446 if (!RegOpenKeyW( HKEY_LOCAL_MACHINE
, layout_path
, &hkey
))
448 value_size
= sizeof(value
);
449 if (!RegGetValueW( hkey
, NULL
, L
"Layout Id", RRF_RT_REG_SZ
, NULL
, (void *)&value
, &value_size
))
450 id
= 0xf000 | (wcstoul( value
, NULL
, 16 ) & 0xfff);
455 layout
= UlongToHandle( MAKELONG( locale
, id
) );
456 if ((flags
& KLF_ACTIVATE
) && NtUserActivateKeyboardLayout( layout
, 0 )) return layout
;
458 /* FIXME: semi-stub: returning default layout */
459 return get_locale_kbd_layout();
462 /***********************************************************************
463 * LoadKeyboardLayoutA (USER32.@)
465 HKL WINAPI
LoadKeyboardLayoutA(LPCSTR pwszKLID
, UINT Flags
)
468 UNICODE_STRING pwszKLIDW
;
470 if (pwszKLID
) RtlCreateUnicodeStringFromAsciiz(&pwszKLIDW
, pwszKLID
);
471 else pwszKLIDW
.Buffer
= NULL
;
473 ret
= LoadKeyboardLayoutW(pwszKLIDW
.Buffer
, Flags
);
474 RtlFreeUnicodeString(&pwszKLIDW
);
479 /***********************************************************************
480 * LoadKeyboardLayoutEx (USER32.@)
482 HKL WINAPI
LoadKeyboardLayoutEx( HKL layout
, const WCHAR
*name
, UINT flags
)
484 FIXME_(keyboard
)( "layout %p, name %s, flags %x, semi-stub!\n", layout
, debugstr_w( name
), flags
);
486 if (!layout
) return NULL
;
487 return LoadKeyboardLayoutW( name
, flags
);
490 /***********************************************************************
491 * UnloadKeyboardLayout (USER32.@)
493 BOOL WINAPI
UnloadKeyboardLayout( HKL layout
)
495 FIXME_(keyboard
)( "layout %p, stub!\n", layout
);
496 SetLastError( ERROR_CALL_NOT_IMPLEMENTED
);
501 static DWORD CALLBACK
devnotify_window_callbackW(HANDLE handle
, DWORD flags
, DEV_BROADCAST_HDR
*header
)
503 SendMessageTimeoutW(handle
, WM_DEVICECHANGE
, flags
, (LPARAM
)header
, SMTO_ABORTIFHUNG
, 2000, NULL
);
507 static DWORD CALLBACK
devnotify_window_callbackA(HANDLE handle
, DWORD flags
, DEV_BROADCAST_HDR
*header
)
511 switch (header
->dbch_devicetype
)
513 case DBT_DEVTYP_DEVICEINTERFACE
:
515 const DEV_BROADCAST_DEVICEINTERFACE_W
*ifaceW
= (const DEV_BROADCAST_DEVICEINTERFACE_W
*)header
;
516 size_t lenW
= wcslen( ifaceW
->dbcc_name
);
517 DEV_BROADCAST_DEVICEINTERFACE_A
*ifaceA
;
520 if (!(ifaceA
= malloc( offsetof(DEV_BROADCAST_DEVICEINTERFACE_A
, dbcc_name
[lenW
* 3 + 1]) )))
522 lenA
= WideCharToMultiByte( CP_ACP
, 0, ifaceW
->dbcc_name
, lenW
+ 1,
523 ifaceA
->dbcc_name
, lenW
* 3 + 1, NULL
, NULL
);
525 ifaceA
->dbcc_size
= offsetof(DEV_BROADCAST_DEVICEINTERFACE_A
, dbcc_name
[lenA
+ 1]);
526 ifaceA
->dbcc_devicetype
= ifaceW
->dbcc_devicetype
;
527 ifaceA
->dbcc_reserved
= ifaceW
->dbcc_reserved
;
528 ifaceA
->dbcc_classguid
= ifaceW
->dbcc_classguid
;
529 SendMessageTimeoutA( handle
, WM_DEVICECHANGE
, flags
, (LPARAM
)ifaceA
, SMTO_ABORTIFHUNG
, 2000, NULL
);
535 FIXME( "unimplemented W to A mapping for %#lx\n", header
->dbch_devicetype
);
537 case DBT_DEVTYP_HANDLE
:
543 SendMessageTimeoutA( handle
, WM_DEVICECHANGE
, flags
, (LPARAM
)header
, SMTO_ABORTIFHUNG
, 2000, NULL
);
547 static DWORD CALLBACK
devnotify_service_callback(HANDLE handle
, DWORD flags
, DEV_BROADCAST_HDR
*header
)
549 FIXME("Support for service handles is not yet implemented!\n");
553 struct device_notification_details
555 DWORD (CALLBACK
*cb
)(HANDLE handle
, DWORD flags
, DEV_BROADCAST_HDR
*header
);
559 DEV_BROADCAST_HDR header
;
560 DEV_BROADCAST_DEVICEINTERFACE_W iface
;
564 extern HDEVNOTIFY WINAPI
I_ScRegisterDeviceNotification( struct device_notification_details
*details
,
565 void *filter
, DWORD flags
);
566 extern BOOL WINAPI
I_ScUnregisterDeviceNotification( HDEVNOTIFY handle
);
568 /***********************************************************************
569 * RegisterDeviceNotificationA (USER32.@)
571 * See RegisterDeviceNotificationW.
573 HDEVNOTIFY WINAPI
RegisterDeviceNotificationA( HANDLE handle
, void *filter
, DWORD flags
)
575 return RegisterDeviceNotificationW( handle
, filter
, flags
);
578 /***********************************************************************
579 * RegisterDeviceNotificationW (USER32.@)
581 HDEVNOTIFY WINAPI
RegisterDeviceNotificationW( HANDLE handle
, void *filter
, DWORD flags
)
583 struct device_notification_details details
;
584 DEV_BROADCAST_HDR
*header
= filter
;
586 TRACE("handle %p, filter %p, flags %#lx\n", handle
, filter
, flags
);
588 if (flags
& ~(DEVICE_NOTIFY_SERVICE_HANDLE
| DEVICE_NOTIFY_ALL_INTERFACE_CLASSES
))
590 SetLastError( ERROR_INVALID_PARAMETER
);
594 if (!(flags
& DEVICE_NOTIFY_SERVICE_HANDLE
) && !IsWindow( handle
))
596 SetLastError( ERROR_INVALID_PARAMETER
);
600 if (!header
) details
.filter
.header
.dbch_devicetype
= 0;
601 else if (header
->dbch_devicetype
== DBT_DEVTYP_DEVICEINTERFACE
)
603 DEV_BROADCAST_DEVICEINTERFACE_W
*iface
= (DEV_BROADCAST_DEVICEINTERFACE_W
*)header
;
604 details
.filter
.iface
= *iface
;
606 if (flags
& DEVICE_NOTIFY_ALL_INTERFACE_CLASSES
)
607 details
.filter
.iface
.dbcc_size
= offsetof( DEV_BROADCAST_DEVICEINTERFACE_W
, dbcc_classguid
);
609 details
.filter
.iface
.dbcc_size
= offsetof( DEV_BROADCAST_DEVICEINTERFACE_W
, dbcc_name
);
611 else if (header
->dbch_devicetype
== DBT_DEVTYP_HANDLE
)
613 FIXME( "DBT_DEVTYP_HANDLE filter type not implemented\n" );
614 details
.filter
.header
.dbch_devicetype
= 0;
618 SetLastError( ERROR_INVALID_DATA
);
622 details
.handle
= handle
;
624 if (flags
& DEVICE_NOTIFY_SERVICE_HANDLE
)
625 details
.cb
= devnotify_service_callback
;
626 else if (IsWindowUnicode( handle
))
627 details
.cb
= devnotify_window_callbackW
;
629 details
.cb
= devnotify_window_callbackA
;
631 return I_ScRegisterDeviceNotification( &details
, filter
, 0 );
634 /***********************************************************************
635 * UnregisterDeviceNotification (USER32.@)
637 BOOL WINAPI
UnregisterDeviceNotification( HDEVNOTIFY handle
)
639 TRACE("%p\n", handle
);
641 return I_ScUnregisterDeviceNotification( handle
);
644 /***********************************************************************
645 * GetRawInputDeviceInfoA (USER32.@)
647 UINT WINAPI
GetRawInputDeviceInfoA( HANDLE device
, UINT command
, void *data
, UINT
*size
)
649 TRACE( "device %p, command %#x, data %p, size %p.\n", device
, command
, data
, size
);
651 /* RIDI_DEVICENAME size is in chars, not bytes */
652 if (command
== RIDI_DEVICENAME
)
657 if (!size
) return ~0U;
661 if (data
&& sizeW
> 0)
662 nameW
= HeapAlloc( GetProcessHeap(), 0, sizeof(WCHAR
) * sizeW
);
666 ret
= NtUserGetRawInputDeviceInfo( device
, command
, nameW
, &sizeW
);
668 if (ret
&& ret
!= ~0U)
669 WideCharToMultiByte( CP_ACP
, 0, nameW
, -1, data
, *size
, NULL
, NULL
);
673 HeapFree( GetProcessHeap(), 0, nameW
);
678 return NtUserGetRawInputDeviceInfo( device
, command
, data
, size
);
681 /***********************************************************************
682 * DefRawInputProc (USER32.@)
684 LRESULT WINAPI
DefRawInputProc( RAWINPUT
**data
, INT data_count
, UINT header_size
)
686 TRACE( "data %p, data_count %d, header_size %u.\n", data
, data_count
, header_size
);
688 return header_size
== sizeof(RAWINPUTHEADER
) ? 0 : -1;
691 /*****************************************************************************
692 * CloseTouchInputHandle (USER32.@)
694 BOOL WINAPI
CloseTouchInputHandle( HTOUCHINPUT handle
)
696 FIXME( "handle %p stub!\n", handle
);
697 SetLastError( ERROR_CALL_NOT_IMPLEMENTED
);
701 /*****************************************************************************
702 * GetTouchInputInfo (USER32.@)
704 BOOL WINAPI
GetTouchInputInfo( HTOUCHINPUT handle
, UINT count
, TOUCHINPUT
*ptr
, int size
)
706 FIXME( "handle %p, count %u, ptr %p, size %u stub!\n", handle
, count
, ptr
, size
);
707 SetLastError( ERROR_CALL_NOT_IMPLEMENTED
);
711 /**********************************************************************
712 * IsTouchWindow (USER32.@)
714 BOOL WINAPI
IsTouchWindow( HWND hwnd
, ULONG
*flags
)
716 FIXME( "hwnd %p, flags %p stub!\n", hwnd
, flags
);
720 /*****************************************************************************
721 * RegisterTouchWindow (USER32.@)
723 BOOL WINAPI
RegisterTouchWindow( HWND hwnd
, ULONG flags
)
725 FIXME( "hwnd %p, flags %#lx stub!\n", hwnd
, flags
);
726 SetLastError( ERROR_CALL_NOT_IMPLEMENTED
);
730 /*****************************************************************************
731 * UnregisterTouchWindow (USER32.@)
733 BOOL WINAPI
UnregisterTouchWindow( HWND hwnd
)
735 FIXME( "hwnd %p stub!\n", hwnd
);
736 SetLastError( ERROR_CALL_NOT_IMPLEMENTED
);
740 /*****************************************************************************
741 * GetGestureInfo (USER32.@)
743 BOOL WINAPI
CloseGestureInfoHandle( HGESTUREINFO handle
)
745 FIXME( "handle %p stub!\n", handle
);
746 SetLastError( ERROR_CALL_NOT_IMPLEMENTED
);
750 /*****************************************************************************
751 * GetGestureInfo (USER32.@)
753 BOOL WINAPI
GetGestureExtraArgs( HGESTUREINFO handle
, UINT count
, BYTE
*args
)
755 FIXME( "handle %p, count %u, args %p stub!\n", handle
, count
, args
);
756 SetLastError( ERROR_CALL_NOT_IMPLEMENTED
);
760 /*****************************************************************************
761 * GetGestureInfo (USER32.@)
763 BOOL WINAPI
GetGestureInfo( HGESTUREINFO handle
, GESTUREINFO
*ptr
)
765 FIXME( "handle %p, ptr %p stub!\n", handle
, ptr
);
766 SetLastError( ERROR_CALL_NOT_IMPLEMENTED
);
770 /*****************************************************************************
771 * GetGestureConfig (USER32.@)
773 BOOL WINAPI
GetGestureConfig( HWND hwnd
, DWORD reserved
, DWORD flags
, UINT
*count
,
774 GESTURECONFIG
*config
, UINT size
)
776 FIXME( "handle %p, reserved %#lx, flags %#lx, count %p, config %p, size %u stub!\n",
777 hwnd
, reserved
, flags
, count
, config
, size
);
778 SetLastError( ERROR_CALL_NOT_IMPLEMENTED
);
782 /**********************************************************************
783 * SetGestureConfig (USER32.@)
785 BOOL WINAPI
SetGestureConfig( HWND hwnd
, DWORD reserved
, UINT count
,
786 GESTURECONFIG
*config
, UINT size
)
788 FIXME( "handle %p, reserved %#lx, count %u, config %p, size %u stub!\n",
789 hwnd
, reserved
, count
, config
, size
);
790 SetLastError( ERROR_CALL_NOT_IMPLEMENTED
);
794 BOOL WINAPI
GetPointerTouchInfo( UINT32 id
, POINTER_TOUCH_INFO
*info
)
796 FIXME( "id %u, info %p stub!\n", id
, info
);
797 SetLastError( ERROR_CALL_NOT_IMPLEMENTED
);
801 BOOL WINAPI
GetPointerTouchInfoHistory( UINT32 id
, UINT32
*count
, POINTER_TOUCH_INFO
*info
)
803 FIXME( "id %u, count %p, info %p stub!\n", id
, count
, info
);
804 SetLastError( ERROR_CALL_NOT_IMPLEMENTED
);
809 /*******************************************************************
810 * SetForegroundWindow (USER32.@)
812 BOOL WINAPI
SetForegroundWindow( HWND hwnd
)
814 return NtUserSetForegroundWindow( hwnd
);
818 /*******************************************************************
819 * GetActiveWindow (USER32.@)
821 HWND WINAPI
GetActiveWindow(void)
824 info
.cbSize
= sizeof(info
);
825 return NtUserGetGUIThreadInfo( GetCurrentThreadId(), &info
) ? info
.hwndActive
: 0;
829 /*****************************************************************
830 * GetFocus (USER32.@)
832 HWND WINAPI
GetFocus(void)
835 info
.cbSize
= sizeof(info
);
836 return NtUserGetGUIThreadInfo( GetCurrentThreadId(), &info
) ? info
.hwndFocus
: 0;
840 /*******************************************************************
841 * SetShellWindow (USER32.@)
843 BOOL WINAPI
SetShellWindow( HWND hwnd
)
845 return NtUserSetShellWindowEx( hwnd
, hwnd
);
849 /*******************************************************************
850 * GetShellWindow (USER32.@)
852 HWND WINAPI
GetShellWindow(void)
854 return NtUserGetShellWindow();
858 /***********************************************************************
859 * SetProgmanWindow (USER32.@)
861 HWND WINAPI
SetProgmanWindow( HWND hwnd
)
863 return NtUserSetProgmanWindow( hwnd
);
867 /***********************************************************************
868 * GetProgmanWindow (USER32.@)
870 HWND WINAPI
GetProgmanWindow(void)
872 return NtUserGetProgmanWindow();
876 /***********************************************************************
877 * SetTaskmanWindow (USER32.@)
879 HWND WINAPI
SetTaskmanWindow( HWND hwnd
)
881 return NtUserSetTaskmanWindow( hwnd
);
884 /***********************************************************************
885 * GetTaskmanWindow (USER32.@)
887 HWND WINAPI
GetTaskmanWindow(void)
889 return NtUserGetTaskmanWindow();