82#define check_member_( file, line, val, exp, fmt, member ) \
83 ok_(file, line)( (val).member == (exp).member, "got " #member " " fmt "\n", (val).member )
84#define check_member( val, exp, fmt, member ) \
85 check_member_( __FILE__, __LINE__, val, exp, fmt, member )
101#define ok_eq( e, r, t, f, ... ) \
105 ok( v == (e), "%s " f "\n", debugstr_ok( #r ), v, ##__VA_ARGS__ ); \
107#define ok_ne( e, r, t, f, ... ) \
111 ok( v != (e), "%s " f "\n", debugstr_ok( #r ), v, ##__VA_ARGS__ ); \
113#define ok_rect( e, r ) \
117 ok( EqualRect( &v, &(e) ), "%s %s\n", debugstr_ok(#r), wine_dbgstr_rect(&v) ); \
119#define ok_point( e, r ) \
123 ok( !memcmp( &v, &(e), sizeof(v) ), "%s %s\n", debugstr_ok(#r), wine_dbgstr_point(&v) ); \
125#define ok_ret( e, r ) ok_eq( e, r, UINT_PTR, "%Iu, error %ld", GetLastError() )
186 case WM_CHAR:
return "WM_CHAR";
210 case VK_MENU:
return "VK_MENU";
222#define ok_call( a, b ) ok_call_( __FILE__, __LINE__, a, b )
256 if ((
ret =
expected->raw_input.kbd.MakeCode -
received->raw_input.kbd.MakeCode))
goto done;
260 if ((
ret =
expected->raw_input.kbd.ExtraInformation -
received->raw_input.kbd.ExtraInformation))
goto done;
271 ok_(
file,
line)( !
ret,
"got MSG_TEST_WIN hwnd %p, msg %s, wparam %#Ix, lparam %#Ix\n",
received->message.hwnd,
288 ok_(
file,
line)( !
ret,
"got WM_INPUT key hwnd %p, code %d, make_code %#x, flags %#x, vkey %s, message %s, extra %#lx\n",
316 ok_(
file,
line)( !
ret,
"got WM_INPUT key hwnd %p, code %d, make_code %#x, flags %#x, vkey %s, message %s, extra %#lx\n",
326#define ok_seq( a ) ok_seq_( __FILE__, __LINE__, a, #a )
335 !
received->func ?
" (missing)" :
"" );
363 .msg =
msg, .scan =
info->scanCode, .vkey =
info->vkCode,
364 .flags =
info->flags, .extra =
info->dwExtraInfo
381 .msg =
msg, .point =
info->pt, .data =
info->mouseData, .flags =
info->flags,
382 .time =
info->time, .extra =
info->dwExtraInfo
401 if (rawinput.header.dwType == RIM_TYPEKEYBOARD)
435#define DESKTOP_ALL_ACCESS 0x01ff
439static BOOL (
WINAPI *pGetCurrentInputMessageSource)( INPUT_MESSAGE_SOURCE *
source );
460#define GET_PROC(func) \
461 if (!(p ## func = (void*)GetProcAddress(hdll, #func))) \
462 trace("GetProcAddress(%s) failed\n", #func)
466 GET_PROC(GetCurrentInputMessageSource);
471 GET_PROC(GetPointerFrameInfoHistory);
486#define run_in_process( a, b ) run_in_process_( __FILE__, __LINE__, a, b )
504#define run_in_desktop( a, b, c ) run_in_desktop_( __FILE__, __LINE__, a, b, c )
508 const char *desktop_name =
"WineTest Desktop";
511 HDESK old_desktop, desktop;
525 startup.lpDesktop = (
char *)desktop_name;
546#define wait_messages( a, b ) msg_wait_for_events_( __FILE__, __LINE__, 0, NULL, a, b )
547#define msg_wait_for_events( a, b, c ) msg_wait_for_events_( __FILE__, __LINE__, a, b, c, FALSE )
582#define create_foreground_window( a ) create_foreground_window_( __FILE__, __LINE__, a, 5 )
609 ok_(
file,
line)( retries > 0,
"failed to create foreground window\n" );
610 if (!retries--)
return hwnd;
623 int min_timeout = 50;
632 ok(
msg.time != 0,
"message %#x has time set to 0\n",
msg.message);
671 trace(
"Hook: w=%Ix vk:%8lx sc:%8lx fl:%8lx %Ix\n",
wparam,
677#define check_keyboard_state( a, b ) check_keyboard_state_( __LINE__, a, b )
687 ok_(__FILE__,
line)( (expect_state[
i] & 0x80) == (
state[
i] & 0x80),
692#define check_keyboard_async( a, b ) check_keyboard_async_( __LINE__, a, b )
699 for (
i = 1;
i < 256;
i++)
703 ok_(__FILE__,
line)( (expect_state[
i] & 0x80) == (
state & 0x80),
710 static BYTE empty_state[256] = {0};
719 input.ki.wVk = lock_keys[
i];
732#define check_send_input_keyboard_test( a, b ) check_send_input_keyboard_test_( a, #a, b )
745 input.ki.wScan =
test->flags & (KEYEVENTF_SCANCODE | KEYEVENTF_UNICODE) ?
test->scan : (
i + 1);
800 ok_ne(
NULL, pKbdLayerDescriptor,
void *,
"%p" );
802 if (!pKbdLayerDescriptor)
return FALSE;
803 tables = pKbdLayerDescriptor();
826#define WIN_MSG(m, w, l, ...) {.func = MSG_TEST_WIN, .message = {.msg = m, .wparam = w, .lparam = l}, ## __VA_ARGS__}
827#define KBD_HOOK(m, s, v, f, ...) {.func = LL_HOOK_KEYBD, .ll_hook_kbd = {.msg = m, .scan = s, .vkey = v, .flags = f}, ## __VA_ARGS__}
829#define KEY_HOOK_(m, s, v, f, ...) KBD_HOOK( m, s, v, LLKHF_INJECTED | (m == WM_KEYUP || m == WM_SYSKEYUP ? LLKHF_UP : 0) | (f), ## __VA_ARGS__ )
830#define KEY_HOOK(m, s, v, ...) KEY_HOOK_( m, s, v, 0, ## __VA_ARGS__ )
832#define KEY_MSG_(m, s, v, f, ...) WIN_MSG( m, v, MAKELONG(1, (s) | (m == WM_KEYUP || m == WM_SYSKEYUP ? (KF_UP | KF_REPEAT) : 0) | (f)), ## __VA_ARGS__ )
833#define KEY_MSG(m, s, v, ...) KEY_MSG_( m, s, v, 0, ## __VA_ARGS__ )
838 .expect = {
KEY_HOOK_(
WM_SYSKEYDOWN, 1,
VK_LMENU,
LLKHF_ALTDOWN, .todo_value =
TRUE),
KEY_MSG_(
WM_SYSKEYDOWN, 1,
VK_MENU,
KF_ALTDOWN), {0}}},
851 .expect = {
KEY_HOOK_(
WM_SYSKEYUP, 3,
vkey,
LLKHF_ALTDOWN, .todo_value =
TRUE),
KEY_MSG_(
WM_SYSKEYUP, 3,
vkey,
KF_ALTDOWN), {0}}},
860 .expect = {
KEY_HOOK_(
WM_SYSKEYDOWN, 1,
VK_LMENU,
LLKHF_ALTDOWN, .todo_value =
TRUE),
KEY_MSG_(
WM_SYSKEYDOWN, 1,
VK_MENU,
KF_ALTDOWN), {0}}},
872 .expect = {
KEY_HOOK_(
WM_SYSKEYUP, 3,
vkey,
LLKHF_ALTDOWN, .todo_value =
TRUE),
KEY_MSG_(
WM_SYSKEYUP, 3,
vkey,
KF_ALTDOWN), {0}}},
883 .expect = {
KEY_HOOK(
WM_KEYDOWN, 2,
vkey),
KEY_MSG(
WM_KEYDOWN, 2,
vkey),
WIN_MSG(
WM_CHAR, wch_control,
MAKELONG(1, 2)), {0}}},
894 .expect = {
KEY_HOOK_(
WM_SYSKEYDOWN, 1,
VK_LMENU,
LLKHF_ALTDOWN, .todo_value =
TRUE),
KEY_MSG_(
WM_SYSKEYDOWN, 1,
VK_MENU,
KF_ALTDOWN), {0}}},
902 .expect = {
KEY_HOOK_(
WM_SYSKEYUP, 5,
VK_LCONTROL,
LLKHF_ALTDOWN, .todo_value =
TRUE),
KEY_MSG_(
WM_SYSKEYUP, 5,
VK_CONTROL,
KF_ALTDOWN), {0}}},
913 .expect = {
KEY_HOOK(
WM_KEYDOWN, 2,
vkey),
KEY_MSG(
WM_KEYDOWN, 2,
vkey),
WIN_MSG(
WM_CHAR, wch_shift,
MAKELONG(1, 2)), {0}}},
1006 .expect = {
KEY_HOOK_(
WM_SYSKEYDOWN, 1,
VK_RMENU,
LLKHF_ALTDOWN, .todo_value =
TRUE),
KEY_MSG_(
WM_SYSKEYDOWN, 1,
VK_MENU,
KF_ALTDOWN), {0}}},
1008 .expect = {
KEY_HOOK(
WM_KEYUP, 2,
VK_RMENU, .todo_value =
TRUE),
KEY_MSG(
WM_SYSKEYUP, 2,
VK_MENU),
WIN_MSG(
WM_SYSCOMMAND,
SC_KEYMENU, 0), {0}}},
1014 .expect = {
KEY_HOOK_(
WM_SYSKEYDOWN, 1,
VK_LMENU,
LLKHF_ALTDOWN|
LLKHF_EXTENDED, .todo_value =
TRUE),
KEY_MSG_(
WM_SYSKEYDOWN, 1,
VK_MENU,
KF_ALTDOWN|
KF_EXTENDED), {0}}},
1016 .expect = {
KEY_HOOK_(
WM_KEYUP, 2,
VK_LMENU,
LLKHF_EXTENDED, .todo_value =
TRUE),
KEY_MSG_(
WM_SYSKEYUP, 2,
VK_MENU,
KF_EXTENDED),
WIN_MSG(
WM_SYSCOMMAND,
SC_KEYMENU, 0), {0}}},
1022 .expect = {
KEY_HOOK_(
WM_SYSKEYDOWN, 1,
VK_RMENU,
LLKHF_ALTDOWN|
LLKHF_EXTENDED, .todo_value =
TRUE),
KEY_MSG_(
WM_SYSKEYDOWN, 1,
VK_MENU,
KF_ALTDOWN|
KF_EXTENDED), {0}}},
1024 .expect = {
KEY_HOOK_(
WM_KEYUP, 2,
VK_RMENU,
LLKHF_EXTENDED, .todo_value =
TRUE),
KEY_MSG_(
WM_SYSKEYUP, 2,
VK_MENU,
KF_EXTENDED),
WIN_MSG(
WM_SYSCOMMAND,
SC_KEYMENU, 0), {0}}},
1030 .expect = {
KEY_HOOK_(
WM_SYSKEYDOWN, 1,
VK_LMENU,
LLKHF_ALTDOWN, .todo_value =
TRUE),
KEY_MSG_(
WM_SYSKEYDOWN, 1,
VK_MENU,
KF_ALTDOWN), {0}}},
1032 .expect = {
KEY_HOOK(
WM_KEYUP, 2,
VK_LMENU, .todo_value =
TRUE),
KEY_MSG(
WM_SYSKEYUP, 2,
VK_MENU),
WIN_MSG(
WM_SYSCOMMAND,
SC_KEYMENU, 0), {0}}},
1038 .expect = {
KEY_HOOK_(
WM_SYSKEYDOWN, 1,
VK_RMENU,
LLKHF_ALTDOWN|
LLKHF_EXTENDED, .todo_value =
TRUE),
KEY_MSG_(
WM_SYSKEYDOWN, 1,
VK_MENU,
KF_ALTDOWN|
KF_EXTENDED), {0}}},
1040 .expect = {
KEY_HOOK_(
WM_KEYUP, 2,
VK_RMENU,
LLKHF_EXTENDED, .todo_value =
TRUE),
KEY_MSG_(
WM_SYSKEYUP, 2,
VK_MENU,
KF_EXTENDED),
WIN_MSG(
WM_SYSCOMMAND,
SC_KEYMENU, 0), {0}}},
1047 .expect = {
KEY_HOOK_(
WM_SYSKEYDOWN, 1,
VK_RMENU,
LLKHF_ALTDOWN, .todo_value =
TRUE),
KEY_MSG_(
WM_SYSKEYDOWN, 1,
VK_MENU,
KF_ALTDOWN), {0}}},
1055 .expect = {
KEY_HOOK_(
WM_SYSKEYDOWN, 1,
VK_LMENU,
LLKHF_ALTDOWN|
LLKHF_EXTENDED, .todo_value =
TRUE),
KEY_MSG_(
WM_SYSKEYDOWN, 1,
VK_MENU,
KF_ALTDOWN|
KF_EXTENDED), {0}}},
1057 .expect = {
KEY_HOOK_(
WM_KEYUP, 2,
VK_LMENU,
LLKHF_EXTENDED, .todo_value =
TRUE),
KEY_MSG_(
WM_SYSKEYUP, 2,
VK_MENU,
KF_EXTENDED), {0}}},
1063 .expect = {
KEY_HOOK_(
WM_SYSKEYDOWN, 1,
VK_RMENU,
LLKHF_ALTDOWN|
LLKHF_EXTENDED, .todo_value =
TRUE),
KEY_MSG_(
WM_SYSKEYDOWN, 1,
VK_MENU,
KF_ALTDOWN|
KF_EXTENDED), {0}}},
1065 .expect = {
KEY_HOOK_(
WM_KEYUP, 2,
VK_RMENU,
LLKHF_EXTENDED, .todo_value =
TRUE),
KEY_MSG_(
WM_SYSKEYUP, 2,
VK_MENU,
KF_EXTENDED), {0}}},
1071 .expect = {
KEY_HOOK_(
WM_SYSKEYDOWN, 1,
VK_LMENU,
LLKHF_ALTDOWN, .todo_value =
TRUE),
KEY_MSG_(
WM_SYSKEYDOWN, 1,
VK_MENU,
KF_ALTDOWN), {0}}},
1079 .expect = {
KEY_HOOK_(
WM_SYSKEYDOWN, 1,
VK_RMENU,
LLKHF_ALTDOWN|
LLKHF_EXTENDED, .todo_value =
TRUE),
KEY_MSG_(
WM_SYSKEYDOWN, 1,
VK_MENU,
KF_ALTDOWN|
KF_EXTENDED), {0}}},
1081 .expect = {
KEY_HOOK_(
WM_KEYUP, 2,
VK_RMENU,
LLKHF_EXTENDED, .todo_value =
TRUE),
KEY_MSG_(
WM_SYSKEYUP, 2,
VK_MENU,
KF_EXTENDED), {0}}},
1169 .expect = {
KEY_HOOK_(
WM_KEYDOWN, 2,
VK_RSHIFT,
LLKHF_EXTENDED),
KEY_MSG_(
WM_KEYDOWN, 2,
VK_SHIFT,
KF_REPEAT, .todo_value =
TRUE), {0}}},
1179 {.
scan = 0x36, .flags = KEYEVENTF_SCANCODE, .expect_state = {[
VK_SHIFT] = 0x80, [
VK_LSHIFT] = 0x80},
1181 {.scan =
scan, .flags = KEYEVENTF_SCANCODE, .expect_state = {[
VK_SHIFT] = 0x80, [
VK_LSHIFT] = 0x80, },
1182 .expect = {
KEY_HOOK(
WM_KEYDOWN,
scan,
vkey),
KEY_MSG(
WM_KEYDOWN,
scan,
vkey),
WIN_MSG(
WM_CHAR, wch_shift,
MAKELONG(1,
scan)), {0}}},
1205 {.
scan = 0x3c0, .flags = KEYEVENTF_UNICODE, .expect_state = {[VK_PACKET] = 0x80},
1206 .expect = {
KEY_HOOK(
WM_KEYDOWN, 0x3c0, VK_PACKET),
KEY_MSG(
WM_KEYDOWN, 0, VK_PACKET, .todo_value =
TRUE),
WIN_MSG(
WM_CHAR, 0x3c0, 1), {0}}},
1215 .expect = {
KEY_HOOK_(
WM_SYSKEYDOWN, 1,
VK_LMENU,
LLKHF_ALTDOWN, .todo_value =
TRUE),
KEY_MSG_(
WM_SYSKEYDOWN, 1,
VK_MENU,
KF_ALTDOWN), {0}}},
1217 .scan = 0x3c0, .flags = KEYEVENTF_UNICODE, .expect_state = {[
VK_MENU] = 0x80, [
VK_LMENU] = 0x80, [VK_PACKET] = 0x80},
1228 .expect = {
KEY_HOOK_(
WM_SYSKEYUP, 0x3c0, VK_PACKET,
LLKHF_ALTDOWN, .todo_value =
TRUE),
KEY_MSG_(
WM_SYSKEYUP, 0, VK_PACKET,
KF_ALTDOWN, .todo_value =
TRUE), {0}}},
1236 .expect = {
KEY_HOOK_(
WM_SYSKEYDOWN, 1,
VK_LMENU,
LLKHF_ALTDOWN, .todo_value =
TRUE),
KEY_MSG_(
WM_SYSKEYDOWN, 1,
VK_MENU,
KF_ALTDOWN), {0}}},
1238 .scan = 0x3c0, .flags = KEYEVENTF_UNICODE, .expect_state = {[
VK_MENU] = 0x80, [
VK_LMENU] = 0x80, [VK_PACKET] = 0x80},
1248 .expect = {
KEY_HOOK_(
WM_SYSKEYUP, 0x3c0, VK_PACKET,
LLKHF_ALTDOWN, .todo_value =
TRUE),
KEY_MSG_(
WM_SYSKEYUP, 0, VK_PACKET,
KF_ALTDOWN, .todo_value =
TRUE), {0}}},
1256#if defined(__REACTOS__) && defined(_MSC_VER)
1257 {.
scan = 0x3c0, .vkey =
vkey, .flags = KEYEVENTF_UNICODE, .expect_state = { 0 },
1259 {.scan = 0x3c0, .vkey =
vkey, .flags = KEYEVENTF_UNICODE, .expect_state = {},
1261 .expect = {
KEY_HOOK(
WM_KEYDOWN, 0xc0,
vkey),
KEY_MSG(
WM_KEYDOWN, 0xc0,
vkey),
WIN_MSG(
WM_CHAR, wch,
MAKELONG(1, 0xc0)), {0}}},
1278 {.
scan = 0x3c0, .vkey = VK_PACKET, .flags = KEYEVENTF_UNICODE, .expect_state = {[VK_PACKET] = 0x80},
1279 .expect = {
KEY_HOOK(
WM_KEYDOWN, 0xc0, VK_PACKET),
KEY_MSG(
WM_KEYDOWN, 0, VK_PACKET, .todo_value =
TRUE),
WIN_MSG(
WM_CHAR, 0xc0, 1), {0}}},
1280 {.scan = 0x3c0, .vkey = VK_PACKET, .flags = KEYEVENTF_UNICODE |
KEYEVENTF_KEYUP,
1287 {.
scan = 0x4b, .flags = KEYEVENTF_SCANCODE, .expect_state = {[
VK_LEFT] = 0x80},
1296 {.
scan = 0x45, .flags = KEYEVENTF_SCANCODE, .expect_state = {[
VK_NUMLOCK] = 0x80},
1301 .scan = 0x4b, .flags = KEYEVENTF_SCANCODE,
1338 if (altgr &&
sizeof(
void *) == 4 && !
is_wow64) skip_altgr =
TRUE;
1340 hwnd =
CreateWindowW(
L"static",
NULL,
WS_POPUP |
WS_VISIBLE, 0, 0, 100, 100,
NULL,
NULL,
NULL,
NULL );
1347 win_skip(
"Spurious keyboard layout changed detected (expected: %p got: %p)\n",
1385 if (skip_altgr)
skip(
"skipping rmenu_altgr test\n" );
1389 if (skip_altgr)
skip(
"skipping rmenu_ext_altgr test\n" );
1393 if (skip_altgr)
skip(
"skipping menu_ext_altgr test\n" );
1399 if (
hkl == (
HKL)0x04120412)
skip(
"skipping rctrl_scan test on Korean layout" );
1432 if (skip_altgr)
skip(
"skipping rmenu_altgr test\n" );
1436 if (skip_altgr)
skip(
"skipping rmenu_ext_altgr test\n" );
1440 if (skip_altgr)
skip(
"skipping menu_ext_altgr test\n" );
1446 if (
hkl == (
HKL)0x04120412)
skip(
"skipping rctrl_scan test on Korean layout" );
1470 for (
i = 0;
i < 512;
i++)
1474 ok(
len || !
buff[0],
"%d: Buffer is not zeroed\n",
i);
1485#define WIN_MSG(m, w, l, ...) {.func = MSG_TEST_WIN, .message = {.msg = m, .wparam = w, .lparam = l}, ## __VA_ARGS__}
1486#define RAW_KEY(s, f, v, m, ...) {.func = RAW_INPUT_KEYBOARD, .raw_input.kbd = {.MakeCode = s, .Flags = f, .VKey = v, .Message = m}, ## __VA_ARGS__}
1487#define KEY_MSG(m, s, v, ...) WIN_MSG( m, v, MAKELONG(1, (s) | (m == WM_KEYUP || m == WM_SYSKEYUP ? (KF_UP | KF_REPEAT) : 0)), ## __VA_ARGS__ )
1491 .expect = {
RAW_KEY(1, RI_KEY_MAKE,
vkey,
WM_KEYDOWN),
KEY_MSG(
WM_KEYDOWN, 1,
vkey),
WIN_MSG(
WM_CHAR, wch,
MAKELONG(1, 1)), {0}}},
1504 {.
vkey = VK_PACKET, .expect_state = {[VK_PACKET] = 0x80},
1512 {.
vkey = VK_PACKET, .async =
TRUE, .expect_async = {[VK_PACKET] = 0x80},
1519 {.
scan = 0x3c0, .flags = KEYEVENTF_UNICODE, .expect_state = {[VK_PACKET] = 0x80},
1527 {.
scan = 0x3c0, .flags = KEYEVENTF_UNICODE, .async =
TRUE, .expect_async = {[VK_PACKET] = 0x80}},
1557 hwnd =
CreateWindowW(
L"static",
NULL,
WS_POPUP |
WS_VISIBLE, 0, 0, 100, 100,
NULL,
NULL,
NULL,
NULL );
1564 win_skip(
"Spurious keyboard layout changed detected (expected: %p got: %p)\n",
1574 for (receive = 0; receive <= 1; receive++)
1624#define MYERROR 0xdeadbeef
1627 MOUSEMOVEPOINT
out[200];
1636 memset(&
in, 0,
sizeof(MOUSEMOVEPOINT));
1648 win_skip(
"GetMouseMovePointsEx broken on WinME\n" );
1651 ok(
retval == -1,
"expected GetMouseMovePointsEx to fail, got %d\n",
retval);
1653 "expected error ERROR_INVALID_PARAMETER, got %lu\n",
GetLastError());
1656 retval = pGetMouseMovePointsEx(
sizeof(MOUSEMOVEPOINT)-1, &
in,
out,
BUFLIM, GMMP_USE_DISPLAY_POINTS);
1657 ok(
retval == -1,
"expected GetMouseMovePointsEx to fail, got %d\n",
retval);
1659 "expected error ERROR_INVALID_PARAMETER, got %lu\n",
GetLastError());
1662 retval = pGetMouseMovePointsEx(
sizeof(MOUSEMOVEPOINT)+1, &
in,
out,
BUFLIM, GMMP_USE_DISPLAY_POINTS);
1663 ok(
retval == -1,
"expected GetMouseMovePointsEx to fail, got %d\n",
retval);
1665 "expected error ERROR_INVALID_PARAMETER, got %lu\n",
GetLastError());
1670 retval = pGetMouseMovePointsEx(
sizeof(MOUSEMOVEPOINT),
NULL,
out,
BUFLIM, GMMP_USE_DISPLAY_POINTS);
1671 ok(
retval == -1,
"expected GetMouseMovePointsEx to fail, got %d\n",
retval);
1673 "expected error ERROR_NOACCESS, got %lu\n",
GetLastError());
1676 retval = pGetMouseMovePointsEx(
sizeof(MOUSEMOVEPOINT), &
in,
NULL,
BUFLIM, GMMP_USE_DISPLAY_POINTS);
1677 ok(
retval == -1,
"expected GetMouseMovePointsEx to fail, got %d\n",
retval);
1679 "expected error ERROR_NOACCESS, got %lu\n",
GetLastError());
1682 retval = pGetMouseMovePointsEx(
sizeof(MOUSEMOVEPOINT),
NULL,
NULL,
BUFLIM, GMMP_USE_DISPLAY_POINTS);
1683 ok(
retval == -1,
"expected GetMouseMovePointsEx to fail, got %d\n",
retval);
1685 "expected error ERROR_NOACCESS, got %lu\n",
GetLastError());
1689 retval = pGetMouseMovePointsEx(
sizeof(MOUSEMOVEPOINT), &
in,
NULL,
count, GMMP_USE_DISPLAY_POINTS);
1700 retval = pGetMouseMovePointsEx(
sizeof(MOUSEMOVEPOINT), &
in,
out,
count, GMMP_USE_DISPLAY_POINTS);
1703 "expected error ERROR_INVALID_PARAMETER, got %lu\n",
GetLastError());
1707 retval = pGetMouseMovePointsEx(
sizeof(MOUSEMOVEPOINT), &
in,
out,
count, GMMP_USE_DISPLAY_POINTS);
1715 retval = pGetMouseMovePointsEx(
sizeof(MOUSEMOVEPOINT), &
in,
out,
count, GMMP_USE_DISPLAY_POINTS);
1722 retval = pGetMouseMovePointsEx(
sizeof(MOUSEMOVEPOINT), &
in,
out,
BUFLIM+1, GMMP_USE_DISPLAY_POINTS);
1723 ok(
retval == -1,
"expected GetMouseMovePointsEx to fail, got %d\n",
retval);
1725 "expected error ERROR_INVALID_PARAMETER, got %lu\n",
GetLastError());
1731 retval = pGetMouseMovePointsEx(
sizeof(MOUSEMOVEPOINT)-1,
NULL,
out,
BUFLIM, GMMP_USE_DISPLAY_POINTS);
1732 ok(
retval == -1,
"expected GetMouseMovePointsEx to fail, got %d\n",
retval);
1734 "expected error ERROR_INVALID_PARAMETER, got %lu\n",
GetLastError());
1737 retval = pGetMouseMovePointsEx(
sizeof(MOUSEMOVEPOINT)-1, &
in,
NULL,
BUFLIM, GMMP_USE_DISPLAY_POINTS);
1738 ok(
retval == -1,
"expected GetMouseMovePointsEx to fail, got %d\n",
retval);
1740 "expected error ERROR_INVALID_PARAMETER, got %lu\n",
GetLastError());
1743 retval = pGetMouseMovePointsEx(
sizeof(MOUSEMOVEPOINT),
NULL,
out,
BUFLIM+1, GMMP_USE_DISPLAY_POINTS);
1744 ok(
retval == -1,
"expected GetMouseMovePointsEx to fail, got %d\n",
retval);
1746 "expected error ERROR_INVALID_PARAMETER, got %lu\n",
GetLastError());
1749 retval = pGetMouseMovePointsEx(
sizeof(MOUSEMOVEPOINT), &
in,
NULL,
BUFLIM+1, GMMP_USE_DISPLAY_POINTS);
1750 ok(
retval == -1,
"expected GetMouseMovePointsEx to fail, got %d\n",
retval);
1752 "expected error ERROR_INVALID_PARAMETER, got %lu\n",
GetLastError());
1755 for (
i = 0;
i < 67;
i++)
1763 retval = pGetMouseMovePointsEx(
sizeof(MOUSEMOVEPOINT), &
in,
out,
BUFLIM, GMMP_USE_DISPLAY_POINTS );
1764 ok(
retval == 64,
"expected to get 64 mouse move points but got %d\n",
retval );
1777 retval = pGetMouseMovePointsEx(
sizeof(MOUSEMOVEPOINT), &
in,
out,
BUFLIM, GMMP_USE_DISPLAY_POINTS );
1786 retval = pGetMouseMovePointsEx(
sizeof(MOUSEMOVEPOINT), &
in,
out,
BUFLIM, GMMP_USE_DISPLAY_POINTS );
1787 ok(
retval == 64,
"expected to get 64 mouse move points but got %d\n",
retval );
1788 ok(
out[0].
x == 6 &&
out[0].
y == 6,
"expected cursor position to be 6x6 but got %d %d\n",
out[0].
x,
out[0].
y );
1789 ok(
out[1].
x == 6 &&
out[1].
y == 6,
"expected cursor position to be 6x6 but got %d %d\n",
out[1].
x,
out[1].
y );
1800 retval = pGetMouseMovePointsEx(
sizeof(MOUSEMOVEPOINT), &
in,
out,
BUFLIM, GMMP_USE_DISPLAY_POINTS );
1801 ok(
retval == 64,
"expected to get 64 mouse move points but got %d\n",
retval );
1802 ok(
out[0].
x == 150 &&
out[0].
y == 75,
"expected cursor position to be 150x75 but got %d %d\n",
out[0].
x,
out[0].
y );
1803 ok(
out[1].
x == 150 &&
out[1].
y == 150,
"expected cursor position to be 150x150 but got %d %d\n",
out[1].
x,
out[1].
y );
1804 ok(
out[2].
x == 150 &&
out[2].
y == 75,
"expected cursor position to be 150x75 but got %d %d\n",
out[2].
x,
out[2].
y );
1806 in.time =
out[2].time;
1807 retval = pGetMouseMovePointsEx(
sizeof(MOUSEMOVEPOINT), &
in,
out,
BUFLIM, GMMP_USE_DISPLAY_POINTS );
1808 ok(
retval == 62,
"expected to get 62 mouse move points but got %d\n",
retval );
1809 ok(
out[0].
x == 150 &&
out[0].
y == 75,
"expected cursor position to be 150x75 but got %d %d\n",
out[0].
x,
out[0].
y );
1810 ok(
out[1].
x == 30 &&
out[1].
y == 30,
"expected cursor position to be 30x30 but got %d %d\n",
out[1].
x,
out[1].
y );
1815 ok(
in.x !=
point.
x &&
in.y !=
point.
y,
"cursor didn't change position after mouse_event()\n" );
1819 retval = pGetMouseMovePointsEx(
sizeof(MOUSEMOVEPOINT), &
in,
out,
BUFLIM, GMMP_USE_DISPLAY_POINTS );
1820 ok(
retval == 64,
"expected to get 64 mouse move points but got %d\n",
retval );
1821 ok(
out[0].dwExtraInfo == 0xcafecafe,
"wrong extra info, got 0x%Ix expected 0xcafecafe\n",
out[0].dwExtraInfo );
1826 input.mi.dwExtraInfo = 0xdeadbeef;
1831 ok(
in.x !=
point.
x &&
in.y !=
point.
y,
"cursor didn't change position after mouse_event()\n" );
1835 retval = pGetMouseMovePointsEx(
sizeof(MOUSEMOVEPOINT), &
in,
out,
BUFLIM, GMMP_USE_DISPLAY_POINTS );
1836 ok(
retval == 64,
"expected to get 64 mouse move points but got %d\n",
retval );
1837 ok(
out[0].dwExtraInfo == 0xdeadbeef,
"wrong extra info, got 0x%Ix expected 0xdeadbeef\n",
out[0].dwExtraInfo );
1839 retval = pGetMouseMovePointsEx(
sizeof(MOUSEMOVEPOINT), &
in,
out,
BUFLIM, GMMP_USE_HIGH_RESOLUTION_POINTS );
1851 MOUSEMOVEPOINT
out[64], out2[64];
1854 HWINSTA winstation0, winstation1;
1857 memset( out2, 0,
sizeof(out2) );
1865 ok(
retval == 64,
"expected to get 64 mouse move points but got %d\n",
retval );
1875 retval = pGetMouseMovePointsEx(
sizeof(MOUSEMOVEPOINT), &
in, out2,
ARRAY_SIZE(out2), GMMP_USE_DISPLAY_POINTS );
1876 ok(
retval == 64,
"expected to get 64 mouse move points but got %d\n",
retval );
1878 ok(
memcmp(
out, out2,
sizeof(out2) ) == 0,
"expected to get exact same history on the new desktop\n" );
1885 retval = pGetMouseMovePointsEx(
sizeof(MOUSEMOVEPOINT), &
in, out2,
ARRAY_SIZE(out2), GMMP_USE_DISPLAY_POINTS );
1886 ok(
retval == 64,
"expected to get 64 mouse move points but got %d\n",
retval );
1892 ok(
retval == 64,
"expected to get 64 mouse move points but got %d\n",
retval );
1893 ok(
memcmp(
out, out2,
sizeof( out2 ) ) == 0,
"expected to get exact same history on the old desktop\n" );
1900 ok( winstation0 !=
NULL,
"GetProcessWindowStation has failed with %ld\n",
GetLastError() );
1907 win_skip(
"not enough privileges for CreateWindowStation\n");
1913 ok( winstation1 !=
NULL,
"CreateWindowStationA has failed with %ld\n",
GetLastError() );
1935 RAWINPUTDEVICELIST
devices[32];
1936 UINT ret, oret, devcount, odevcount,
i;
1943 ok(
ret == -1,
"expected -1, got %d\n",
ret);
1949 ok(
ret == -1,
"expected -1, got %d\n",
ret);
1953 ret = pGetRawInputDeviceList(
NULL, &devcount,
sizeof(
devices[0]));
1954 ok(
ret == 0,
"expected 0, got %d\n",
ret);
1955 ok(devcount > 0,
"expected non-zero\n");
1961 ok(
ret == -1,
"expected -1, got %d\n",
ret);
1963 ok(devcount > 0,
"expected non-zero\n");
1967 ok(
ret > 0,
"expected non-zero\n");
1971 RID_DEVICE_INFO
info;
1976 ok(
ret == ~0
U,
"GetRawInputDeviceInfoW returned %#x, expected ~0.\n",
ret );
1982 ok(
ret == ~0
U,
"GetRawInputDeviceInfoW returned %#x, expected ~0.\n",
ret );
1983 ok(
size == 0xdeadbeef,
"GetRawInputDeviceInfoW returned size %#x, expected 0.\n",
size );
1989 ok(
ret == ~0
U,
"GetRawInputDeviceInfoW returned %#x, expected ~0.\n",
ret );
1990 ok(
size == 0xdeadbeef,
"GetRawInputDeviceInfoW returned size %#x, expected 0.\n",
size );
1995 ok(
ret == ~0
U,
"GetRawInputDeviceInfoW returned %#x, expected ~0.\n",
ret );
2001 ok(
ret == ~0
U,
"GetRawInputDeviceInfoW returned %#x, expected ~0.\n",
ret );
2002 ok(
size ==
sizeof(
info),
"GetRawInputDeviceInfoW returned size %#x, expected %#Ix.\n",
size,
sizeof(
info) );
2006 for(
i = 0;
i < devcount; ++
i)
2011 RID_DEVICE_INFO
info;
2018 ret = pGetRawInputDeviceInfoW(
devices[
i].hDevice, RIDI_DEVICENAME,
name, &sz);
2019 ok(
ret == -1,
"GetRawInputDeviceInfo gave wrong failure: %ld\n",
err);
2020 ok(sz > 5 && sz <
ARRAY_SIZE(
name),
"Size should have been set and not too large (got: %u)\n", sz);
2023 ret = pGetRawInputDeviceInfoW(
devices[
i].hDevice, RIDI_DEVICENAME,
name, &sz);
2024 ok(
ret == sz,
"GetRawInputDeviceInfo gave wrong return: %ld\n",
err);
2026 ok(
len + 1 ==
ret,
"GetRawInputDeviceInfo returned wrong length (name: %u, ret: %u)\n",
len + 1,
ret);
2029 ret = pGetRawInputDeviceInfoA(
devices[
i].hDevice, RIDI_DEVICENAME, nameA, &sz);
2030 ok(
ret == sz,
"GetRawInputDeviceInfoA gave wrong return: %ld\n",
err);
2032 ok(
len + 1 ==
ret,
"GetRawInputDeviceInfoA returned wrong length (name: %u, ret: %u)\n",
len + 1,
ret);
2037 sz =
sizeof(
info) - 1;
2038 ret = pGetRawInputDeviceInfoW(
devices[
i].hDevice, RIDI_DEVICEINFO, &
info, &sz);
2039 ok(
ret == -1,
"GetRawInputDeviceInfo gave wrong failure: %ld\n",
err);
2040 ok(sz ==
sizeof(
info),
"GetRawInputDeviceInfo set wrong size\n");
2042 ret = pGetRawInputDeviceInfoW(
devices[
i].hDevice, RIDI_DEVICEINFO, &
info, &sz);
2043 ok(
ret ==
sizeof(
info),
"GetRawInputDeviceInfo gave wrong return: %ld\n",
err);
2044 ok(sz ==
sizeof(
info),
"GetRawInputDeviceInfo set wrong size\n");
2045 ok(
info.dwType ==
devices[
i].dwType,
"GetRawInputDeviceInfo set wrong type: 0x%lx\n",
info.dwType);
2049 ret = pGetRawInputDeviceInfoA(
devices[
i].hDevice, RIDI_DEVICEINFO, &
info, &sz);
2050 ok(
ret ==
sizeof(
info),
"GetRawInputDeviceInfo gave wrong return: %ld\n",
err);
2051 ok(sz ==
sizeof(
info),
"GetRawInputDeviceInfo set wrong size\n");
2052 ok(
info.dwType ==
devices[
i].dwType,
"GetRawInputDeviceInfo set wrong type: 0x%lx\n",
info.dwType);
2061 ret = pGetRawInputDeviceInfoW(
devices[
i].hDevice, RIDI_PREPARSEDDATA,
NULL, &sz);
2062 ok(
ret == 0,
"GetRawInputDeviceInfo gave wrong return: %u\n",
ret);
2063 ok((
info.dwType == RIM_TYPEHID && sz != 0) ||
2064 (
info.dwType != RIM_TYPEHID && sz == 0),
2065 "Got wrong PPD size for type 0x%lx: %u\n",
info.dwType, sz);
2068 ret = pGetRawInputDeviceInfoW(
devices[
i].hDevice, RIDI_PREPARSEDDATA, ppd, &sz);
2069 ok(
ret == sz,
"GetRawInputDeviceInfo gave wrong return: %u, should be %u\n",
ret, sz);
2075 if (
info.dwType == RIM_TYPEHID)
2078 ok(br ==
TRUE,
"HidD_GetPreparsedData failed\n");
2081 ok(!
memcmp(preparsed, ppd, sz),
"Expected to get same preparsed data\n");
2102 ok(
ret > 0,
"expected non-zero\n");
2103 ok(devcount == odevcount,
"expected %d, got %d\n", devcount, odevcount);
2104 devcount = odevcount;
2106 ret = pGetRawInputDeviceList(
NULL, &odevcount,
sizeof(
devices[0]));
2107 ok(
ret == 0,
"expected 0, got %d\n",
ret);
2108 ok(odevcount == oret,
"expected %d, got %d\n", oret, odevcount);
2124 RAWINPUTDEVICE raw_devices[2] = {0};
2153 raw_devices_count = 0;
2155 ok_eq( 2, raw_devices_count,
UINT,
"%u" );
2158 raw_devices_count = 0;
2161 win_skip(
"Ignoring GetRegisteredRawInputDevices success\n" );
2165 ok_eq( 0, raw_devices_count,
UINT,
"%u" );
2170 raw_devices_count = 1;
2172 ok_eq( 2, raw_devices_count,
UINT,
"%u" );
2175 memset( raw_devices, 0,
sizeof(raw_devices) );
2178 ok_eq( 2, raw_devices_count,
UINT,
"%u" );
2186 raw_devices[0].hwndTarget = 0;
2188 raw_devices[1].hwndTarget = 0;
2194 raw_devices[0].hwndTarget =
hwnd;
2195 raw_devices[1].hwndTarget =
hwnd;
2199 raw_devices[0].dwFlags = RIDEV_DEVNOTIFY;
2200 raw_devices[0].hwndTarget = 0;
2203 raw_devices[1].dwFlags = RIDEV_DEVNOTIFY;
2204 raw_devices[1].hwndTarget = 0;
2217 raw_devices[0].hwndTarget =
hwnd;
2218 raw_devices[1].hwndTarget =
hwnd;
2242 raw_devices[0].hwndTarget =
hwnd;
2244 raw_devices[1].hwndTarget =
hwnd;
2250 raw_devices[0].hwndTarget = 0;
2251 raw_devices[1].hwndTarget = 0;
2297 RAWINPUT *rawbuffer = (RAWINPUT *)
buffer;
2299 RAWINPUT rawinput = {{0}};
2304 else rawinput_size =
sizeof(RAWINPUTHEADER) +
sizeof(RAWKEYBOARD);
2311 for (
i = 0;
i < 3; ++
i)
2324 RAWINPUT *rawinput = (RAWINPUT *)(
buffer +
i * rawinput_size);
2325 ok_eq( RIM_TYPEKEYBOARD, rawinput->header.dwType,
UINT,
"%u" );
2326 ok_eq( rawinput_size, rawinput->header.dwSize,
UINT,
"%u" );
2328 ok_eq(
i + 2, rawinput->data.keyboard.MakeCode,
WPARAM,
"%Iu" );
2345 size =
sizeof(rawinput) + 1;
2349 else ok_eq( 5, rawbuffer->data.keyboard.MakeCode,
WPARAM,
"%Iu" );
2359 size =
sizeof(rawinput);
2373 size =
sizeof(RAWINPUTHEADER);
2374 rawinput_size =
sizeof(RAWINPUTHEADER) +
sizeof(RAWKEYBOARD);
2376 ok_eq( rawinput_size, rawinput.header.dwSize,
UINT,
"%u" );
2377 ok_eq( RIM_TYPEKEYBOARD, rawinput.header.dwType,
UINT,
"%u" );
2394 size =
sizeof(rawinput);
2399 size =
sizeof(rawinput);
2401 ok_eq( 6, rawinput.data.keyboard.MakeCode,
UINT,
"%u" );
2405 if (
sizeof(
void *) == 8)
2414 ok_eq( 6, rawinput.data.keyboard.MakeCode,
UINT,
"%u" );
2434 unsigned int size, rawinput_size, header_size;
2435 RAWINPUTDEVICE raw_devices[1];
2438 RAWINPUT *rawbuffer = (RAWINPUT *)
buffer;
2440 LPARAM extra_info1, extra_info2;
2441 INPUT_MESSAGE_SOURCE
source;
2447 else rawinput_size =
sizeof(RAWINPUTHEADER) +
sizeof(RAWMOUSE);
2452 if (pGetCurrentInputMessageSource)
2454 ret = pGetCurrentInputMessageSource( &
source );
2463 raw_devices[0].hwndTarget =
hwnd;
2481 ok( t1 <=
now,
"got %lu, %lu.\n", t1,
now );
2497 ok( t2 == t1,
"got %lu, %lu.\n", t1, t2 );
2506 ok( t2 == t1,
"got %lu, %lu.\n", t1, t2 );
2536 size = rawinput_size;
2541 else ok_eq( 5, rawbuffer->data.mouse.lLastX,
UINT,
"%u" );
2546 ok( extra_info2 == extra_info1,
"got %#Ix, %#Ix.\n", extra_info1, extra_info2 );
2548 ok( t3 > t1,
"got %lu, %lu.\n", t1, t3 );
2549 ok( t3 < t2,
"got %lu, %lu.\n", t2, t3 );
2550 ok( pos1 == pos2,
"got pos1 (%ld, %ld), pos2 (%ld, %ld), pt (%ld %ld).\n",
2551 pos1 & 0xffff, pos1 >> 16, pos2 & 0xffff, pos2 >> 16,
pt.x,
pt.y );
2552 if (pGetCurrentInputMessageSource)
2554 ret = pGetCurrentInputMessageSource( &
source );
2572 ok( t1 <=
now,
"got %lu, %lu.\n", t1,
now );
2578 ok( t2 == t1,
"got %lu, %lu.\n", t1, t2 );
2583 size = rawinput_size + 1;
2589 ok_eq( RIM_TYPEMOUSE, rawbuffer64->header.dwType,
UINT,
"%#x" );
2590 ok_eq( 0, rawbuffer64->header.wParam,
WPARAM,
"%Iu" );
2591 ok_eq( 5, rawbuffer64->data.mouse.lLastX,
UINT,
"%u" );
2595 ok_eq( RIM_TYPEMOUSE, rawbuffer->header.dwType,
UINT,
"%#x" );
2596 ok_eq( 0, rawbuffer->header.wParam,
WPARAM,
"%Iu" );
2597 ok_eq( 5, rawbuffer->data.mouse.lLastX,
UINT,
"%u" );
2608 ok( extra_info2 == extra_info1,
"got %#Ix, %#Ix.\n", extra_info1, extra_info2 );
2609 ok( t3 > t1,
"got %lu, %lu.\n", t1, t3 );
2610 ok( t3 < t2,
"got %lu, %lu.\n", t2, t3 );
2611 ok( pos1 == pos2,
"got pos1 (%ld, %ld), pos2 (%ld, %ld), pt (%ld %ld).\n",
2612 pos1 & 0xffff, pos1 >> 16, pos2 & 0xffff, pos2 >> 16,
pt.x,
pt.y );
2615 raw_devices[0].hwndTarget = 0;
2623 raw_devices[0].hwndTarget =
hwnd;
2630 else rawinput_size =
sizeof(RAWINPUTHEADER) +
sizeof(RAWKEYBOARD);
2642 ok_eq( RIM_TYPEKEYBOARD, rawbuffer64->header.dwType,
UINT,
"%u" );
2643 ok_eq( 0, rawbuffer64->header.wParam,
UINT,
"%u" );
2644 ok_eq( 0x2d, rawbuffer64->data.keyboard.MakeCode,
UINT,
"%#x" );
2648 ok_eq( RIM_TYPEKEYBOARD, rawbuffer->header.dwType,
UINT,
"%u" );
2649 ok_eq( 0, rawbuffer->header.wParam,
UINT,
"%u" );
2650 ok_eq( 0x2d, rawbuffer->data.keyboard.MakeCode,
UINT,
"%#x" );
2668 raw_devices[0].hwndTarget = 0;
2674 size = rawinput_size + 1;
2681 raw_devices[0].hwndTarget =
hwnd;
2685 else rawinput_size =
sizeof(RAWINPUTHEADER) +
sizeof(RAWMOUSE);
2687 size = rawinput_size + 1;
2695 raw_devices[0].hwndTarget = 0;
2721 ok(
ret == 0,
"GetRawInputData failed\n");
2722 ok(raw_size <=
sizeof(raw),
"Unexpected rawinput data size: %u\n", raw_size);
2724 raw_size =
sizeof(raw);
2726 ok(
ret > 0 &&
ret != (
UINT)-1,
"GetRawInputData failed\n");
2727 ok(raw.header.dwType == RIM_TYPEMOUSE,
"Unexpected rawinput type: %lu\n", raw.header.dwType);
2728 ok(raw.header.dwSize == raw_size,
"Expected size %u, got %lu\n", raw_size, raw.header.dwSize);
2730 ok(raw.header.wParam ==
wparam,
"Expected wparam %Iu, got %Iu\n",
wparam, raw.header.wParam);
2786 RAWINPUTDEVICE raw_devices[1];
2795 ok(ready != 0,
"OpenEventA failed, error: %lu\n",
GetLastError());
2801 ok(done != 0,
"OpenEventA failed, error: %lu\n",
GetLastError());
2824 ok(
hwnd != 0,
"CreateWindow failed\n");
2835 if (
i == 9 ||
i == 10 ||
i == 11 ||
i == 12)
2837 raw_devices[0].usUsagePage = 0x01;
2838 raw_devices[0].usUsage = 0x02;
2840 raw_devices[0].hwndTarget =
i == 11 ?
hwnd : 0;
2844 ok(
ret,
"%d: RegisterRawInputDevices failed\n",
i);
2867 if (
i == 9 ||
i == 10 ||
i == 11 ||
i == 12)
2870 raw_devices[0].hwndTarget = 0;
2879 ok(
ret,
"%d: RegisterRawInputDevices failed\n",
i);
2903 RAWINPUTDEVICE raw_devices[1];
2926 ok(
hwnd != 0,
"CreateWindow failed\n");
2938 raw_devices[0].usUsagePage = 0x01;
2939 raw_devices[0].usUsage = 0x02;
2949 ok(
ret,
"%d: RegisterRawInputDevices failed\n",
i);
2974 for (
i = 0;
i < 14; ++
i)
2987 ok(
hwnd != 0,
"CreateWindow failed\n");
3022 RAWINPUTDEVICE raw_devices[1];
3024 HANDLE thread, process_ready, process_start, process_done;
3048 ok(process_ready !=
NULL,
"CreateEventA failed\n");
3051 ok(process_start !=
NULL,
"CreateEventA failed\n");
3054 ok(process_done !=
NULL,
"CreateEventA failed\n");
3056 memset(&startup_info, 0,
sizeof(startup_info));
3057 startup_info.
cb =
sizeof(startup_info);
3074 ok(
hwnd != 0,
"CreateWindow failed\n");
3075 if (
i != 14 &&
i != 15 &&
i != 16)
3091 raw_devices[0].usUsagePage = 0x01;
3092 raw_devices[0].usUsage = 0x02;
3103 win_skip(
"RIDEV_EXINPUTSINK not supported\n");
3105 ok(!skipped,
"%d: RegisterRawInputDevices failed: %lu\n",
i,
GetLastError());
3121 ok(
hwnd != 0,
"CreateWindow failed\n");
3147 "%d: %sexpected WM_MOUSEMOVE message\n",
i,
rawinput_tests[
i].expect_legacy ?
"" :
"un");
3150 "%d: %sexpected WM_INPUT message\n",
i,
rawinput_tests[
i].expect_raw ?
"" :
"un");
3153 "%d: %sexpected RIM_INPUT message\n",
i,
rawinput_tests[
i].expect_rawfg ?
"" :
"un");
3157 ok((newpt.
x -
pt.x) == 5 || (newpt.
x -
pt.x) == 4,
"%d: Unexpected cursor movement\n",
i);
3162 raw_devices[0].hwndTarget = 0;
3214 static const UINT numpad_collisions[][2] = {
3227 ok(
s != 0,
"MapVirtualKeyEx(VK_SHIFT) should return non-zero\n");
3230 "%x != %x\n",
s, sL);
3233 ok(kL ==
VK_SHIFT,
"Scan code -> vKey = %x (not VK_SHIFT)\n", kL);
3235 ok(kR ==
VK_SHIFT,
"Scan code -> vKey = %x (not VK_SHIFT)\n", kR);
3239 "Scan code -> vKey = %x (not VK_LSHIFT)\n", kL);
3242 "Scan code -> vKey = %x (not VK_RSHIFT)\n", kR);
3251 if (numpad_scan && other_scan == numpad_scan)
3254 ok(vkey != numpad_collisions[
i][0],
3255 "Got numpad vKey %x for scan code %x when there was another choice\n",
3262 ok(
s >> 8 == 0x00,
"Scan code prefixes should not be returned when not using MAPVK_VK_TO_VSC_EX %#1x\n",
s >> 8);
3264 ok(
s >> 8 == 0xE0 ||
broken(
s == 0),
"Scan code prefix for VK_RCONTROL should be 0xE0 when MAPVK_VK_TO_VSC_EX is set, was %#1x\n",
s >> 8);
3266 ok(
s >> 8 == 0xE0 ||
broken(
s == 0),
"Scan code prefix for VK_RMENU should be 0xE0 when MAPVK_VK_TO_VSC_EX is set, was %#1x\n",
s >> 8);
3268 ok(
s >> 8 == 0x00 ||
broken(
s == 0),
"The scan code shouldn't have a prefix, got %#1x\n",
s >> 8);
3284 { 0, 0,
'a', 1, {
'a',0}},
3285 { 0,
shift,
'a', 1, {
'A',0}},
3286 { 0,
menu,
'a', 1, {
'a',0}},
3288#if defined(__REACTOS__) && defined(_MSC_VER)
3293 { 0,
ctrl,
'a', 1, {1, 0}},
3295#if defined(__REACTOS__) && defined(_MSC_VER)
3303#if defined(__REACTOS__) && defined(_MSC_VER)
3305 { 0,
ctrl,
'4', 0, {0}},
3307 { 0,
ctrl,
'!', 0, {0}},
3308 { 0,
ctrl,
'\"', 0, {0}},
3309 { 0,
ctrl,
'#', 0, {0}},
3310 { 0,
ctrl,
'$', 0, {0}},
3311 { 0,
ctrl,
'%', 0, {0}},
3312 { 0,
ctrl,
'\'', 0, {0}},
3313 { 0,
ctrl,
'(', 0, {0}},
3314 { 0,
ctrl,
')', 0, {0}},
3315 { 0,
ctrl,
'*', 0, {0}},
3316 { 0,
ctrl,
'+', 0, {0}},
3317 { 0,
ctrl,
',', 0, {0}},
3318 { 0,
ctrl,
'-', 0, {0}},
3319 { 0,
ctrl,
'.', 0, {0}},
3320 { 0,
ctrl,
'/', 0, {0}},
3321 { 0,
ctrl,
':', 0, {0}},
3322 { 0,
ctrl,
';', 0, {0}},
3323 { 0,
ctrl,
'<', 0, {0}},
3324 { 0,
ctrl,
'=', 0, {0}},
3325 { 0,
ctrl,
'>', 0, {0}},
3326 { 0,
ctrl,
'?', 0, {0}},
3329 { 0,
ctrl,
'4', 0, {}},
3331 { 0,
ctrl,
'!', 0, {}},
3332 { 0,
ctrl,
'\"', 0, {}},
3333 { 0,
ctrl,
'#', 0, {}},
3334 { 0,
ctrl,
'$', 0, {}},
3335 { 0,
ctrl,
'%', 0, {}},
3336 { 0,
ctrl,
'\'', 0, {}},
3337 { 0,
ctrl,
'(', 0, {}},
3338 { 0,
ctrl,
')', 0, {}},
3339 { 0,
ctrl,
'*', 0, {}},
3340 { 0,
ctrl,
'+', 0, {}},
3341 { 0,
ctrl,
',', 0, {}},
3342 { 0,
ctrl,
'-', 0, {}},
3343 { 0,
ctrl,
'.', 0, {}},
3344 { 0,
ctrl,
'/', 0, {}},
3345 { 0,
ctrl,
':', 0, {}},
3346 { 0,
ctrl,
';', 0, {}},
3347 { 0,
ctrl,
'<', 0, {}},
3348 { 0,
ctrl,
'=', 0, {}},
3349 { 0,
ctrl,
'>', 0, {}},
3350 { 0,
ctrl,
'?', 0, {}},
3352 { 0,
ctrl,
'@', 1, {0}},
3353 { 0,
ctrl,
'[', 1, {0x1b}},
3354 { 0,
ctrl,
'\\', 1, {0x1c}},
3355 { 0,
ctrl,
']', 1, {0x1d}},
3356 { 0,
ctrl,
'^', 1, {0x1e}},
3357 { 0,
ctrl,
'_', 1, {0x1f}},
3358#if defined(__REACTOS__) && defined(_MSC_VER)
3359 { 0,
ctrl,
'`', 0, {0}},
3361 { 0,
ctrl,
'`', 0, {}},
3372 const BYTE SC_RETURN = 0x1c, SC_TAB = 0x0f, SC_A = 0x1e;
3373 const BYTE HIGHEST_BIT = 0x80;
3377 for(
i=0;
i<256;
i++)
3385 win_skip(
"ToUnicode is not implemented\n");
3389 ok(
ret == 1,
"ToUnicode for Return key didn't return 1 (was %i)\n",
ret);
3392 ok(wStr[0]==
'\r',
"ToUnicode for CTRL + Return was %i (expected 13)\n", wStr[0]);
3393 ok(wStr[1]==0 ||
broken(wStr[1]!=0) ,
3394 "ToUnicode didn't null-terminate the buffer when there was room.\n");
3405 if (!us_kbd)
continue;
3407 if (vk_ret == -1)
continue;
3410 if (vk_ret & 0x200)
mod |=
ctrl;
3429 ok(
ret == 0,
"ToUnicode with NULL keystate didn't return 0 (was %i)\n",
ret);
3431 ok(
ret == 0,
"ToUnicode with NULL keystate didn't return 0 (was %i)\n",
ret);
3433 ok(
ret == 0,
"ToUnicode with NULL keystate didn't return 0 (was %i)\n",
ret);
3435 ok(
ret == 0,
"ToUnicodeEx with NULL keystate didn't return 0 (was %i)\n",
ret);
3437 ok(
ret == 0,
"ToUnicodeEx with NULL keystate didn't return 0 (was %i)\n",
ret);
3439 ok(
ret == 0,
"ToUnicodeEx with NULL keystate didn't return 0 (was %i)\n",
ret);
3448 const BYTE SC_RETURN = 0x1c, SC_A = 0x1e;
3449 const BYTE HIGHEST_BIT = 0x80;
3457 ok(
ret == 1,
"ToAscii for Return key didn't return 1 (was %i)\n",
ret);
3458 ok(character ==
'\r',
"ToAscii for Return was %i (expected 13)\n", character);
3462 ok(
ret == 1,
"ToUnicode(A) returned %i, expected 1\n",
ret);
3471 if (
len == 1 ||
len == 2)
3472 ok(
ret == 1,
"ToAscii(A) returned %i, expected 1\n",
ret);
3475 ok(
ret == 0,
"ToAscii(A) returned %i, expected 0\n",
ret);
3482 ok(character ==
'a',
"ToAscii(A) returned char=%i, expected %i\n", character,
'a');
3491 ok(
ret == 1,
"ToAscii for CTRL + Return key didn't return 1 (was %i)\n",
ret);
3492 ok(character ==
'\n',
"ToAscii for CTRL + Return was %i (expected 10)\n", character);
3496 ok(
ret == 1,
"ToAscii for CTRL + character 'A' didn't return 1 (was %i)\n",
ret);
3497 ok(character == 1,
"ToAscii for CTRL + character 'A' was %i (expected 1)\n", character);
3502 ok(
ret == 0,
"ToAscii for CTRL + Shift + Return key didn't return 0 (was %i)\n",
ret);
3505 ok(
ret == 0,
"ToAscii for NULL keystate didn't return 0 (was %i)\n",
ret);
3507 ok(
ret == 0,
"ToAscii for NULL keystate didn't return 0 (was %i)\n",
ret);
3509 ok(
ret == 0,
"ToAsciiEx for NULL keystate didn't return 0 (was %i)\n",
ret);
3511 ok(
ret == 0,
"ToAsciiEx for NULL keystate didn't return 0 (was %i)\n",
ret);
3538 HKL layout, tmplayout, *layouts, *layouts_preload;
3561 win_skip(
"broken keyboard layout, skipping tests\n" );
3566 ok(layouts !=
NULL,
"Could not allocate memory\n");
3568 layouts_preload =
calloc(1,
sizeof(
HKL));
3569 ok(layouts_preload !=
NULL,
"Could not allocate memory\n");
3575 klid_size =
sizeof(klid);
3579 klid_size =
sizeof(klid);
3581 layouts_preload =
realloc( layouts_preload, (
i + 1) *
sizeof(*layouts_preload) );
3582 ok(layouts_preload !=
NULL,
"Could not allocate memory\n");
3584 layouts_preload[
i] = 0;
3587 if (
id & 0x80000000)
todo_wine_if(
HIWORD(
id) == 0xe001)
ok((
id & 0xf0000000) == 0xd0000000,
"Unexpected preloaded keyboard layout high bits %#lx\n",
id);
3588 else ok(!(
id & 0xf0000000),
"Unexpected preloaded keyboard layout high bits %#lx\n",
id);
3596 for (
i = 0; layouts_preload[
i]; ++
i)
3599 klid_size =
sizeof(klid);
3607 ok(!(
id & 0xf0000000),
"Unexpected substitute keyboard layout high bits %#lx\n",
id);
3612 ok(!(
id & 0xf0000000),
"Unexpected preloaded keyboard layout high bits %#lx\n",
id);
3619 for (
i =
len - 1;
i >= 0; --
i)
3629 ok( tmplayout == layouts[
i],
"Failed to activate keyboard layout\n");
3630 if (tmplayout != layouts[
i])
3638 for (
j = 0; layouts_preload[
j]; ++
j)
3641 if (!
wcscmp( tmpklid, klid ))
break;
3645 if (
id & 0x80000000)
3647 todo_wine ok((
id >> 28) == 0xf,
"hkl high bits %#lx, expected 0xf\n",
id >> 28);
3649 value_size =
sizeof(
value);
3650 wcscpy(layout_path,
L"System\\CurrentControlSet\\Control\\Keyboard Layouts\\");
3651 wcscat(layout_path, klid);
3654 ok(value_size == 5 *
sizeof(
WCHAR),
"RegGetValueW returned size %ld\n", value_size);
3669 ok(((
UINT_PTR)tmplayout & ~0xffff) == ((
UINT_PTR)layouts[
i] & ~0xffff),
"LoadKeyboardLayoutW returned %p, expected %p\n", tmplayout, layouts[
i]);
3681 free(layouts_preload);
3690 ok(
msg != WM_INPUTLANGCHANGEREQUEST,
"got WM_INPUTLANGCHANGEREQUEST\n" );
3693 if (
msg == WM_INPUTLANGCHANGE)
3712 ok( !
got_setfocus,
"got WM_SETFOCUS before WM_INPUTLANGCHANGE\n" );
3715 "got wparam %#Ix\n",
wparam );
3741 win_skip(
"broken keyboard layout, skipping tests\n" );
3746 ok(
count > 0,
"GetKeyboardLayoutList returned %d\n",
count );
3748 ok( layouts !=
NULL,
"Could not allocate memory\n" );
3750 ok(
count > 0,
"GetKeyboardLayoutList returned %d\n",
count );
3754 ok( !!hwnd1,
"CreateWindow failed, error %lu\n",
GetLastError() );
3762 HKL other_layout = layouts[
i];
3778 ok( tmp_layout == other_layout,
"got tmp_layout %p\n", tmp_layout );
3784 ok( !
ret,
"WaitForSingleObject returned %#lx\n",
ret );
3792 ok( tmp_layout == other_layout,
"got tmp_layout %p\n", tmp_layout );
3798 ok( !!hwnd2,
"CreateWindow failed, error %lu\n",
GetLastError() );
3803 "got tmp_layout %p\n", tmp_layout );
3804 if (
broken(
layout != other_layout && tmp_layout == other_layout))
3806 win_skip(
"Broken layout activation on focus change, skipping some tests\n" );
3807 broken_focus_activate =
TRUE;
3818 ok( tmp_layout == other_layout,
"got tmp_layout %p\n", tmp_layout );
3822 ok( !
ret,
"WaitForSingleObject returned %#lx\n",
ret );
3827 ok( tmp_layout == other_layout,
"got tmp_layout %p\n", tmp_layout );
3836 if (broken_focus_activate)
3850 ok( tmp_layout ==
layout,
"got tmp_layout %p\n", tmp_layout );
3886 memset( bufferW, 0xcc,
sizeof(bufferW) );
3891 memset( bufferW, 0xcc,
sizeof(bufferW) );
3897 memset( bufferW, 0xcc,
sizeof(bufferW) );
3900 ok( bufferW[0] == 0xcccc,
"wrong string %s\n",
wine_dbgstr_w(bufferW) );
3919 ok(events_no == 2,
"SendInput returned %d\n", events_no);
3957 params->hwnd =
CreateWindowW(
L"static",
NULL,
WS_VISIBLE |
WS_POPUP, 0, 0, 100, 100,
NULL,
NULL,
NULL,
NULL );
3973 static DWORD last_x = 50, expect_x = 60;
3981 if (
pt.x != last_x)
ok(
pt.x == expect_x,
"got unexpected WM_MOUSEMOVE x %ld, expected %ld\n",
pt.x, expect_x );
3983 expect_x =
pt.x == 50 ? 60 : 50;
4038 ok(
abs( hook_info->
pt.
x - 51 ) <= 1,
"got x %ld\n", hook_info->
pt.
x );
4039 ok(
abs( hook_info->
pt.
y - 49 ) <= 1,
"got y %ld\n", hook_info->
pt.
y );
4043 ok(
abs(
pos.x - 51 ) <= 1,
"got x %ld\n",
pos.x );
4044 ok(
abs(
pos.y - 49 ) <= 1,
"got y %ld\n",
pos.y );
4047 hook_info->
pt = hook_pos;
4058 POINT pos, expect_pos = {60, 60}, hook_pos = {40, 40};
4074#define WIN_MSG(m, h, w, l, ...) {.func = MSG_TEST_WIN, .message = {.msg = m, .hwnd = h, .wparam = w, .lparam = l}, ## __VA_ARGS__}
4075#define MS_HOOK(m, x, y, ...) {.func = LL_HOOK_MOUSE, .ll_hook_ms = {.msg = m, .point = {x, y}, .flags = 1}, ## __VA_ARGS__}
4087 struct user_call button_down_hwnd_todo[] =
4100 struct user_call button_up_hwnd_todo[] =
4107 struct user_call button_down_no_message[] =
4113 struct user_call button_up_no_message[] =
4121 static const POINT expect_60x50 = {60, 50}, expect_50x50 = {50, 50};
4123 static const struct layered_test
4132 {.flags = LWA_ALPHA, .expect_click =
FALSE},
4133 {.alpha = 1, .flags = LWA_ALPHA, .expect_click =
TRUE},
4134 {.color =
RGB(0, 255, 0), .flags = LWA_COLORKEY, .expect_click =
TRUE},
4135 {.color =
RGB(50, 100, 255), .flags = LWA_COLORKEY, .expect_click =
TRUE},
4136 {.color =
RGB(0, 255, 0), .flags = LWA_COLORKEY | LWA_ALPHA, .expect_click =
FALSE},
4137 {.color =
RGB(0, 255, 0), .alpha = 1, .flags = LWA_COLORKEY | LWA_ALPHA, .expect_click =
TRUE},
4138 {.color =
RGB(50, 100, 255), .alpha = 1, .flags = LWA_COLORKEY | LWA_ALPHA, .expect_click =
TRUE},
4143 RECT clip_rect = {55, 55, 55, 55};
4144 UINT dblclk_time,
i;
4148 HHOOK
hook, hook_setpos, hook_getpos;
4154 ok( !!
params.start_event,
"CreateEvent failed\n" );
4156 ok( !!
params.end_event,
"CreateEvent failed\n" );
4165 hwnd =
CreateWindowW(
L"static",
NULL,
WS_POPUP |
WS_VISIBLE, 0, 0, 100, 100,
NULL,
NULL,
NULL,
NULL );
4189 ok_ne(
NULL, hook_getpos, HHOOK,
"%p" );
4191 ok_ne(
NULL, hook_setpos, HHOOK,
"%p" );
4227 ok_seq( button_down_hwnd );
4232 ok_seq( button_up_hwnd );
4236 ok_seq( button_up_hwnd );
4241 other =
CreateWindowW(
L"static",
NULL,
WS_VISIBLE |
WS_POPUP, 0, 0, 100, 100,
NULL,
NULL,
NULL,
NULL );
4252 ok_seq( button_down_hwnd );
4256 ok_seq( button_up_hwnd );
4264 other =
CreateWindowW(
L"static",
NULL,
WS_VISIBLE |
WS_CHILD, 0, 0, 100, 100,
hwnd,
NULL,
NULL,
NULL );
4275 ok_seq( button_down_hwnd );
4279 ok_seq( button_up_hwnd );
4287 other =
CreateWindowW(
L"static",
NULL,
WS_VISIBLE |
WS_POPUP, 0, 0, 100, 100,
NULL,
NULL,
NULL,
NULL );
4298 ok_seq( button_down_hwnd_todo );
4302 ok_seq( button_up_hwnd_todo );
4310 other =
CreateWindowW(
L"static",
NULL,
WS_VISIBLE |
WS_CHILD, 0, 0, 100, 100,
hwnd,
NULL,
NULL,
NULL );
4321 ok_seq( button_down_hwnd );
4325 ok_seq( button_up_hwnd );
4341 ok_seq( button_down_no_message );
4344 ok_seq( button_up_no_message );
4366 ok_seq( button_down_hwnd_todo );
4370 ok_seq( button_up_hwnd );
4382 other =
CreateWindowW(
L"static",
NULL,
WS_VISIBLE |
WS_POPUP, 0, 0, 100, 100,
NULL,
NULL,
NULL,
NULL );
4395 ok_seq( button_down_hwnd );
4399 ok_seq( button_up_hwnd );
4409 other =
CreateWindowW(
L"static",
NULL,
WS_VISIBLE |
WS_CHILD, 0, 0, 100, 100,
hwnd,
NULL,
NULL,
NULL );
4422 ok_seq( button_down_hwnd );
4426 ok_seq( button_up_hwnd );
4439 const struct layered_test *
test = layered_tests +
i;
4444 other =
CreateWindowW(
L"static",
NULL,
WS_VISIBLE |
WS_POPUP, 0, 0, 100, 100,
NULL,
NULL,
NULL,
NULL );
4457 win_skip(
"Skipping broken SetLayeredWindowAttributes tests\n");
4470 button_down_hwnd_todo[1].
todo = !
test->expect_click;
4471 button_down_hwnd_todo[2].
todo = !
test->alpha && (
test->flags & LWA_ALPHA);
4472 ok_seq( button_down_hwnd_todo );
4476 button_up_hwnd_todo[1].
todo = !
test->expect_click;
4477 button_up_hwnd_todo[2].
todo = !
test->alpha && (
test->flags & LWA_ALPHA);
4478 ok_seq( button_up_hwnd_todo );
4490 button_down_hwnd_todo[1].
todo = !
test->expect_click;
4491 button_down_hwnd_todo[2].
todo = !
test->alpha && (
test->flags & LWA_ALPHA);
4492 ok_seq( button_down_hwnd_todo );
4496 button_up_hwnd_todo[1].
todo = !
test->expect_click;
4497 button_up_hwnd_todo[2].
todo = !
test->alpha && (
test->flags & LWA_ALPHA);
4498 ok_seq( button_up_hwnd_todo );
4508 other =
CreateWindowW(
L"static",
NULL,
WS_VISIBLE |
WS_POPUP, 0, 0, 100, 100,
NULL,
NULL,
NULL,
NULL );
4525 ok_seq( button_down_hwnd );
4529 ok_seq( button_up_hwnd );
4605 "WaitForSingleObject failed\n");
4622 100, 100, 200, 200, 0, 0, 0,
NULL);
4658 cls.lpszMenuName =
NULL;
4659 cls.lpszClassName =
"TestWindowClass";
4669 win_skip(
"skipping interthread message test under win9x\n");
4680 0, 0, 0, 0, 0, 0, 0,
NULL);
4681 ok(ourWnd!= 0,
"failed to create ourWnd window\n");
4684 0, 0, 0, 0, 0, 0, 0,
NULL);
4685 ok(Wnd2!= 0,
"failed to create Wnd2 window\n");
4803 ok(!
ret,
"AttachThreadInput succeeded\n");
4805 "expected ERROR_INVALID_PARAMETER, got %ld\n",
GetLastError());
4809 ok(!
ret,
"AttachThreadInput succeeded\n");
4811 "expected ERROR_INVALID_PARAMETER, got %ld\n",
GetLastError());
4921#define check_get_keyboard_state(i, j, c, x) check_get_keyboard_state_(i, j, c, x, __LINE__)
4930 ok_(__FILE__,
line)(!(
keystate[
'X'] & 0x80) == !
x,
"%d:%d: expected that X keystate is %s\n",
i,
j,
x ?
"set" :
"unset");
4931 ok_(__FILE__,
line)(!(
keystate[
'C'] & 0x80) == !
c,
"%d:%d: expected that C keystate is %s\n",
i,
j,
c ?
"set" :
"unset");
4937 ok_(__FILE__,
line)(!(
keystate[
'X'] & 0x80) == !
x,
"%d:%d: expected that X keystate is %s\n",
i,
j,
x ?
"set" :
"unset");
4938 ok_(__FILE__,
line)(!(
keystate[
'C'] & 0x80) == !
c,
"%d:%d: expected that C keystate is %s\n",
i,
j,
c ?
"set" :
"unset");
4941#define check_get_key_state(i, j, c, x) check_get_key_state_(i, j, c, x, __LINE__)
4947 ok_(__FILE__,
line)(!(
state & 0x8000) == !
x,
"%d:%d: expected that X highest bit is %s, got %#x\n",
i,
j,
x ?
"set" :
"unset",
state);
4948 ok_(__FILE__,
line)(!(
state & 0x007e),
"%d:%d: expected that X undefined bits are unset, got %#x\n",
i,
j,
state);
4951 ok_(__FILE__,
line)(!(
state & 0x8000) == !
c,
"%d:%d: expected that C highest bit is %s, got %#x\n",
i,
j,
c ?
"set" :
"unset",
state);
4952 ok_(__FILE__,
line)(!(
state & 0x007e),
"%d:%d: expected that C undefined bits are unset, got %#x\n",
i,
j,
state);
4963 BOOL expect_x, expect_c;
4968 has_queue =
test->peek_message ||
test->set_keyboard_state;
4970 if (
test->peek_message)
4976 for (
j = 0;
j < 4; ++
j)
4983 if (
test->set_keyboard_state)
4994 if (
test->set_keyboard_state) expect_x =
TRUE;
4995 else if (!has_queue &&
j == 0) expect_x =
FALSE;
4996 else expect_x =
TRUE;
4998 if (
test->set_keyboard_state) expect_c =
TRUE;
4999 else expect_c =
FALSE;
5024 BOOL expect_x, expect_c;
5032 skip(
"skipping test with inconsistent results on non-us keyboard\n");
5054 for (
j = 0;
j < 4; ++
j)
5071 if (
test->set_keyboard_state_main)
5077 else expect_c =
FALSE;
5085 if (
test->peek_message_main) expect_x =
TRUE;
5086 else expect_x =
FALSE;
5099 if (
test->set_keyboard_state_main)
5138 skip(
"skipping test with inconsistent results on non-us keyboard\n");
5142 for (oem = 0; oem < 0x200; oem++)
5146 oem_char =
LOBYTE( oem );
5151 if (!
OemToCharBuffW( &oem_char, &wchr, 1 ) || (wchr ==
'?' && oem_char < 0))
5174 INPUT_MESSAGE_SOURCE
source;
5177 ok( pGetCurrentInputMessageSource( &
source ),
"GetCurrentInputMessageSource failed\n" );
5206 ok(
source.deviceType == IMDT_UNAVAILABLE,
"%x: wrong deviceType %x\n",
5244 inputs[0].
ki.
wVk = 0;
5246 inputs[0].
ki.
dwFlags = KEYEVENTF_UNICODE;
5247 inputs[1] = inputs[0];
5302 ok(
ret ==
FALSE,
"Unregistering NULL Device Notification returned: %d\n",
ret);
5307 const struct user_call broken_sequence[] =
5319 hwnd =
CreateWindowW(
L"static",
NULL,
WS_POPUP |
WS_VISIBLE, 0, 0, 100, 100,
NULL,
NULL,
NULL,
NULL );
5326 win_skip(
"Spurious keyboard layout changed detected (expected: %p got: %p)\n",
5387 input[0].hi.wParamL = 0;
5388 input[0].hi.wParamH =
'A';
5390 input[1].hi.wParamL = 0;
5391 input[1].hi.wParamH =
'A' | 0xc000;
5404 input[1].ki.dwFlags = 0;
5430#define check_pointer_info( a, b ) check_pointer_info_( __LINE__, a, b )
5457 POINTER_INFO pointer_info;
5462 200, 0, 0,
NULL, 0 );
5464 memset( &pointer_info, 0xcd,
sizeof(pointer_info) );
5465 ret = pGetPointerInfo( 1, &pointer_info );
5466 ok( !
ret,
"GetPointerInfo succeeded\n" );
5476 POINTER_INFO pointer_info[4], expect_pointer;
5477 void *invalid_ptr = (
void *)0xdeadbeef;
5478 UINT32 entry_count, pointer_count;
5479 POINTER_INPUT_TYPE
type;
5485 .lpszClassName =
L"test",
5493 if (!pGetPointerType)
5496 win_skip(
"GetPointerType not found, skipping tests\n" );
5501 ret = pGetPointerType( 1,
NULL );
5502 ok( !
ret,
"GetPointerType succeeded\n" );
5505 ret = pGetPointerType( 0xdead, &
type );
5507 ok( !
ret,
"GetPointerType succeeded\n" );
5510 ret = pGetPointerType( 1, &
type );
5514 if (!pGetPointerInfo)
5517 win_skip(
"GetPointerInfo not found, skipping tests\n" );
5524 ret = pGetPointerInfo( 1, invalid_ptr );
5525 ok( !
ret,
"GetPointerInfo succeeded\n" );
5530 memset( pointer_info, 0xcd,
sizeof(pointer_info) );
5531 ret = pGetPointerInfo( 1, pointer_info );
5532 ok( !
ret,
"GetPointerInfo succeeded\n" );
5538 200, 0, 0,
NULL, 0 );
5541 memset( pointer_info, 0xcd,
sizeof(pointer_info) );
5542 ret = pGetPointerInfo( 1, pointer_info );
5543 ok( !
ret,
"GetPointerInfo succeeded\n" );
5555 memset( pointer_info, 0xcd,
sizeof(pointer_info) );
5556 ret = pGetPointerInfo( 0xdead, pointer_info );
5557 ok( !
ret,
"GetPointerInfo succeeded\n" );
5560 memset( pointer_info, 0xcd,
sizeof(pointer_info) );
5561 ret = pGetPointerInfo( 1, pointer_info );
5563 ok(
ret == mouse_in_pointer_enabled,
"GetPointerInfo failed, error %lu\n",
GetLastError() );
5564 if (!mouse_in_pointer_enabled)
5571 ok( pointer_info[0].pointerType == PT_MOUSE,
"got pointerType %lu\n", pointer_info[0].pointerType );
5573 ok( pointer_info[0].pointerId == 1,
"got pointerId %u\n", pointer_info[0].pointerId );
5574 ok( !!pointer_info[0].frameId,
"got frameId %u\n", pointer_info[0].frameId );
5576 ok( pointer_info[0].pointerFlags == (0x20000 | POINTER_MESSAGE_FLAG_INRANGE | POINTER_MESSAGE_FLAG_PRIMARY),
5577 "got pointerFlags %#x\n", pointer_info[0].pointerFlags );
5580 "got sourceDevice %p\n", pointer_info[0].sourceDevice );
5582 ok( pointer_info[0].hwndTarget ==
hwnd,
"got hwndTarget %p\n", pointer_info[0].hwndTarget );
5583 ok( !!pointer_info[0].ptPixelLocation.x,
"got ptPixelLocation %s\n",
wine_dbgstr_point( &pointer_info[0].ptPixelLocation ) );
5584 ok( !!pointer_info[0].ptPixelLocation.y,
"got ptPixelLocation %s\n",
wine_dbgstr_point( &pointer_info[0].ptPixelLocation ) );
5585 ok( !!pointer_info[0].ptHimetricLocation.x,
"got ptHimetricLocation %s\n",
wine_dbgstr_point( &pointer_info[0].ptHimetricLocation ) );
5586 ok( !!pointer_info[0].ptHimetricLocation.y,
"got ptHimetricLocation %s\n",
wine_dbgstr_point( &pointer_info[0].ptHimetricLocation ) );
5587 ok( !!pointer_info[0].ptPixelLocationRaw.x,
"got ptPixelLocationRaw %s\n",
wine_dbgstr_point( &pointer_info[0].ptPixelLocationRaw ) );
5588 ok( !!pointer_info[0].ptPixelLocationRaw.y,
"got ptPixelLocationRaw %s\n",
wine_dbgstr_point( &pointer_info[0].ptPixelLocationRaw ) );
5589 ok( !!pointer_info[0].ptHimetricLocationRaw.x,
"got ptHimetricLocationRaw %s\n",
wine_dbgstr_point( &pointer_info[0].ptHimetricLocationRaw ) );
5590 ok( !!pointer_info[0].ptHimetricLocationRaw.y,
"got ptHimetricLocationRaw %s\n",
wine_dbgstr_point( &pointer_info[0].ptHimetricLocationRaw ) );
5591 ok( !!pointer_info[0].
dwTime,
"got dwTime %lu\n", pointer_info[0].
dwTime );
5593 ok( pointer_info[0].historyCount == 1,
"got historyCount %u\n", pointer_info[0].historyCount );
5595 ok( pointer_info[0].InputData == 0,
"got InputData %u\n", pointer_info[0].InputData );
5597 ok( pointer_info[0].dwKeyStates == 0,
"got dwKeyStates %lu\n", pointer_info[0].dwKeyStates );
5598 ok( !!pointer_info[0].PerformanceCount,
"got PerformanceCount %I64u\n", pointer_info[0].PerformanceCount );
5600 ok( pointer_info[0].ButtonChangeType == 0,
"got ButtonChangeType %u\n", pointer_info[0].ButtonChangeType );
5606 expect_pointer = pointer_info[0];
5608 memset( pointer_info, 0xa5,
sizeof(pointer_info) );
5609 entry_count = pointer_count = 2;
5610 if (!pGetPointerFrameInfo)
ret =
FALSE;
5611 else ret = pGetPointerFrameInfo( 1, &pointer_count, pointer_info );
5615 ok( pointer_count == 1,
"got pointer_count %u\n", pointer_count );
5618 memset( pointer_info, 0xa5,
sizeof(pointer_info) );
5619 entry_count = pointer_count = 2;
5620 if (!pGetPointerInfoHistory)
ret =
FALSE;
5621 else ret = pGetPointerInfoHistory( 1, &entry_count, pointer_info );
5625 ok( entry_count == 1,
"got entry_count %u\n", entry_count );
5628 memset( pointer_info, 0xa5,
sizeof(pointer_info) );
5629 entry_count = pointer_count = 2;
5630 if (!pGetPointerFrameInfoHistory)
ret =
FALSE;
5631 else ret = pGetPointerFrameInfoHistory( 1, &entry_count, &pointer_count, pointer_info );
5635 ok( entry_count == 1,
"got pointer_count %u\n", pointer_count );
5637 ok( pointer_count == 1,
"got pointer_count %u\n", pointer_count );
5660 ok( !
ret,
"EnableMouseInPointer succeeded\n" );
5663 ret = pIsMouseInPointerEnabled();
5670 ret = pIsMouseInPointerEnabled();
5769 ok( !!tmp_hwnd,
"CreateWindowW failed, error %lu\n",
GetLastError() );
5797 clip_rect = virtual_rect;
5803 clip_rect = virtual_rect;
5821 clip_rect.
right -= 1;
5829 clip_rect.
right += 1;
5871 RECT clip_rect = {50, 50, 51, 51};
5894 ok(
abs( expect_pos.
x -
pos.x ) <= 2,
"got pos %ld\n",
pos.x );
5895 ok(
abs( expect_pos.
y -
pos.y ) <= 2,
"got pos %ld\n",
pos.y );
5902 ok(
abs( expect_pos.
x -
pos.x ) <= 2,
"got pos %ld\n",
pos.x );
5903 ok(
abs( expect_pos.
y -
pos.y ) <= 2,
"got pos %ld\n",
pos.y );
5921 ok(
abs( expect_pos.
x -
pos.x ) <= 2,
"got pos %ld\n",
pos.x );
5923 ok(
abs( expect_pos.
x -
pos.x ) <= 1,
"got pos %ld\n",
pos.x );
5927 expect_pos.
x = expect_pos.
y = 50;
5970 expect_pos.
x = expect_pos.
y = 49;
5974 expect_pos.
x = expect_pos.
y = 50;
5978 expect_pos.
x = expect_pos.
y = 49;
5982 expect_pos.
x = expect_pos.
y = 50;
5986 expect_pos.
x = expect_pos.
y = 49;
6047 hwnd =
CreateWindowW(
L"static",
NULL,
WS_POPUP |
WS_VISIBLE, 0, 0, 100, 100,
NULL,
NULL,
NULL,
NULL );
6067 static const WCHAR test_layout_name[] =
L"00000429";
6068 static const HKL test_hkl = (
HKL)0x04290429;
6070 HKL *new_layouts, *layouts, old_hkl,
hkl;
6072 WCHAR layout_name[64];
6080 if (orig_hkl != old_hkl)
6082 win_skip(
"Spurious keyboard layout changed detected (expected: %p got: %p)\n",
6083 orig_hkl, old_hkl );
6087 hkl = pLoadKeyboardLayoutEx(
NULL, test_layout_name, 0 );
6091 for (
i = 0;
i <
len;
i++)
if (layouts[
i] == test_hkl)
break;
6094 skip(
"Test HKL is already loaded, skipping tests\n" );
6109 skip(
"Failed to find appropriate layouts, skipping tests\n" );
6114 trace(
"using layouts %p / %p\n", layouts[
i], layouts[
j] );
6121 hkl = pLoadKeyboardLayoutEx( layouts[
i], test_layout_name, 0 );
6127 ok_eq( test_hkl, new_layouts[
i],
HKL,
"%p" );
6128 new_layouts[
i] = layouts[
i];
6129 ok( !
memcmp( new_layouts, layouts,
len *
sizeof(*layouts) ),
"keyboard layouts changed\n" );
6130 free( new_layouts );
6132 hkl = pLoadKeyboardLayoutEx( test_hkl, layout_name, 0 );
6136 ok( !
memcmp( new_layouts, layouts,
len *
sizeof(*layouts) ),
"keyboard layouts changed\n" );
6137 free( new_layouts );
6139 if (
j ==
i)
skip(
"Only one layout found, skipping tests\n" );
6146 hkl = pLoadKeyboardLayoutEx( layouts[
i], test_layout_name, 0 );
6152 ok_eq( test_hkl, new_layouts[
i],
HKL,
"%p" );
6153 new_layouts[
i] = layouts[
i];
6154 ok( !
memcmp( new_layouts, layouts,
len *
sizeof(*layouts) ),
"keyboard layouts changed\n" );
6155 free( new_layouts );
6157 hkl = pLoadKeyboardLayoutEx( test_hkl, layout_name, 0 );
6161 ok( !
memcmp( new_layouts, layouts,
len *
sizeof(*layouts) ),
"keyboard layouts changed\n" );
6162 free( new_layouts );
6175 WCHAR wch, wch_shift;
6202 const CHAR *layout_name;
6215 layout_name =
"00000804";
6217 layout_name =
"00000411";
6219 layout_name =
"00000412";
6236 skip(
"The user32:input tests causes persistent input issues on WS03!\n");
6243 if (
argc >= 3 && !
strcmp(
argv[2],
"test_GetMouseMovePointsEx_process" ))
6245 if (
argc >= 4 && !
strcmp(
argv[2],
"test_EnableMouseInPointer" ))
6272 if(pGetMouseMovePointsEx)
6275 win_skip(
"GetMouseMovePointsEx is not available\n");
6277 if(pGetRawInputDeviceList)
6280 win_skip(
"GetRawInputDeviceList is not available\n");
6282 if (pGetCurrentInputMessageSource)
6285 win_skip(
"GetCurrentInputMessageSource is not available\n");
6289 if (pGetPointerType)
6292 win_skip(
"GetPointerType is not available\n" );
6296 if (!pEnableMouseInPointer)
6297 win_skip(
"EnableMouseInPointer not found, skipping tests\n" );
std::map< E_MODULE, HMODULE > mod
COMPILER_DEPENDENT_UINT64 UINT64
static void startup(void)
#define InterlockedIncrement
static const char * wine_dbgstr_point(const POINT *ppt)
#define UlongToHandle(ul)
#define RegCloseKey(hKey)
#define ERROR_INSUFFICIENT_BUFFER
LSTATUS WINAPI RegGetValueW(HKEY hKey, LPCWSTR pszSubKey, LPCWSTR pszValue, DWORD dwFlags, LPDWORD pdwType, PVOID pvData, LPDWORD pcbData)
LONG WINAPI RegOpenKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
LONG WINAPI RegEnumValueW(_In_ HKEY hKey, _In_ DWORD index, _Out_ LPWSTR value, _Inout_ PDWORD val_count, _Reserved_ PDWORD reserved, _Out_opt_ PDWORD type, _Out_opt_ LPBYTE data, _Inout_opt_ PDWORD count)
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
const char * wine_dbg_sprintf(const char *format,...)
#define ERROR_CALL_NOT_IMPLEMENTED
#define ERROR_INVALID_PARAMETER
#define GetProcAddress(x, y)
#define INVALID_HANDLE_VALUE
#define GetCurrentProcess()
#define ERROR_INVALID_HANDLE
#define WideCharToMultiByte
#define ERROR_ACCESS_DENIED
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
INT WINAPI GetLocaleInfoA(LCID lcid, LCTYPE lctype, LPSTR buffer, INT len)
LCID WINAPI GetUserDefaultLCID(void)
BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessA(const char *app_name, char *cmd_line, SECURITY_ATTRIBUTES *process_attr, SECURITY_ATTRIBUTES *thread_attr, BOOL inherit, DWORD flags, void *env, const char *cur_dir, STARTUPINFOA *startup_info, PROCESS_INFORMATION *info)
ULONG WINAPI DECLSPEC_HOTPATCH GetTickCount(void)
_ACRTIMP int __cdecl swscanf(const wchar_t *, const wchar_t *,...)
_ACRTIMP __msvcrt_ulong __cdecl wcstoul(const wchar_t *, wchar_t **, int)
_ACRTIMP size_t __cdecl wcslen(const wchar_t *)
_ACRTIMP int __cdecl wcscmp(const wchar_t *, const wchar_t *)
_ACRTIMP int __cdecl memcmp(const void *, const void *, size_t)
_ACRTIMP __msvcrt_ulong __cdecl strtoul(const char *, char **, int)
_ACRTIMP char *__cdecl strchr(const char *, int)
_ACRTIMP size_t __cdecl strlen(const char *)
_ACRTIMP size_t __cdecl strcspn(const char *, const char *)
_ACRTIMP int __cdecl strcmp(const char *, const char *)
struct nls_table * tables
static struct all_devices * devices
static unsigned char buff[32768]
GLint GLint GLint GLint GLint x
GLuint GLuint GLsizei count
GLuint GLuint GLsizei GLenum type
GLclampf GLclampf GLclampf alpha
GLint GLint GLint GLint GLint GLint y
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLenum const GLfloat * params
GLenum GLenum GLenum input
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
HIDAPI BOOLEAN WINAPI HidD_GetPreparsedData(IN HANDLE HidDeviceObject, OUT PHIDP_PREPARSED_DATA *PreparsedData)
HIDAPI BOOLEAN WINAPI HidD_FreePreparsedData(IN PHIDP_PREPARSED_DATA PreparsedData)
struct _HIDP_PREPARSED_DATA * PHIDP_PREPARSED_DATA
#define HID_USAGE_GENERIC_GAMEPAD
#define HID_USAGE_GENERIC_MOUSE
#define HID_USAGE_PAGE_GENERIC
#define HID_USAGE_GENERIC_KEYBOARD
#define HID_USAGE_GENERIC_JOYSTICK
const char * winetest_platform
#define todo_wine_if(is_todo)
void __cdecl void __cdecl void __cdecl void __cdecl void __cdecl void winetest_pop_context(void)
void __cdecl void __cdecl void __cdecl void __cdecl void __cdecl winetest_push_context(const char *fmt,...) __WINE_PRINTF_ATTR(1
#define expect_rect(r, _left, _top, _right, _bottom)
unsigned __int3264 UINT_PTR
HMONITOR WINAPI MonitorFromWindow(HWND, DWORD)
#define MOUSE_MOVE_ABSOLUTE
#define MOUSE_VIRTUAL_DESKTOP
#define WS_OVERLAPPEDWINDOW
struct _STARTUPINFOA STARTUPINFOA
#define offsetof(TYPE, MEMBER)
int winetest_get_mainargs(char ***pargv)
void winetest_wait_child_process(HANDLE process)
#define wait_child_process
#define _WIN32_WINNT_VISTA
static char argv0[MAX_PATH]
BOOL set_keyboard_state_main
struct user_call::@1856::@1861 raw_input
struct user_call::@1856::@1860 ll_hook_ms
struct user_call::@1856::@1859 ll_hook_kbd
struct user_call::@1856::@1858 message
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventA(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCSTR lpName OPTIONAL)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventW(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCWSTR lpName OPTIONAL)
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
HANDLE WINAPI DECLSPEC_HOTPATCH OpenEventA(IN DWORD dwDesiredAccess, IN BOOL bInheritHandle, IN LPCSTR lpName)
BOOL WINAPI DECLSPEC_HOTPATCH ResetEvent(IN HANDLE hEvent)
BOOL WINAPI DECLSPEC_HOTPATCH ReleaseSemaphore(IN HANDLE hSemaphore, IN LONG lReleaseCount, IN LPLONG lpPreviousCount)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateSemaphoreA(IN LPSECURITY_ATTRIBUTES lpSemaphoreAttributes OPTIONAL, IN LONG lInitialCount, IN LONG lMaximumCount, IN LPCSTR lpName OPTIONAL)
TW_UINT32 TW_UINT16 TW_UINT16 MSG
static BOOL keystate[LAST_MODIFIER - FIRST_MODIFIER]
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
HDESK WINAPI CreateDesktopA(LPCSTR lpszDesktop, LPCSTR lpszDevice, LPDEVMODEA pDevmode, DWORD dwFlags, ACCESS_MASK dwDesiredAccess, LPSECURITY_ATTRIBUTES lpsa)
BOOL WINAPI UnregisterDeviceNotification(HDEVNOTIFY Handle)
UINT WINAPI DECLSPEC_HOTPATCH GetRawInputBuffer(PRAWINPUT pData, PUINT pcbSize, UINT cbSizeHeader)
UINT WINAPI DECLSPEC_HOTPATCH GetRegisteredRawInputDevices(PRAWINPUTDEVICE pRawInputDevices, PUINT puiNumDevices, UINT cbSize)
BOOL WINAPI DECLSPEC_HOTPATCH RegisterRawInputDevices(PCRAWINPUTDEVICE pRawInputDevices, UINT uiNumDevices, UINT cbSize)
UINT WINAPI GetRawInputDeviceInfoA(HANDLE hDevice, UINT uiCommand, LPVOID pData, PUINT pcbSize)
UINT WINAPI GetRawInputDeviceInfoW(HANDLE hDevice, UINT uiCommand, LPVOID pData, PUINT pcbSize)
UINT WINAPI GetRawInputData(HRAWINPUT hRawInput, UINT uiCommand, LPVOID pData, PUINT pcbSize, UINT cbSizeHeader)
LRESULT WINAPI DefRawInputProc(PRAWINPUT *paRawInput, INT nInput, UINT cbSizeHeader)
UINT WINAPI GetRawInputDeviceList(PRAWINPUTDEVICELIST pRawInputDeviceList, PUINT puiNumDevices, UINT cbSize)
int WINAPI GetWindowRgnBox(HWND hWnd, LPRECT lprc)
BOOL WINAPI GetPointerType(UINT32 id, POINTER_INPUT_TYPE *type)
BOOL WINAPI GetPointerInfo(UINT32 id, POINTER_INFO *info)
UINT WINAPI SendInput(UINT, LPINPUT, int)
DWORD WINAPI GetLastError(void)
#define STARTF_USESHOWWINDOW
DWORD WINAPI GetCurrentThreadId(void)
HWINSTA WINAPI GetProcessWindowStation(void)
#define ERROR_POINT_NOT_FOUND
HGDIOBJ WINAPI GetStockObject(_In_ int)
HRGN WINAPI CreateRectRgn(_In_ int, _In_ int, _In_ int, _In_ int)
int WINAPI FillRect(HDC, LPCRECT, HBRUSH)
HBRUSH WINAPI CreateSolidBrush(_In_ COLORREF)
BOOL WINAPI TranslateCharsetInfo(_Inout_ PDWORD, _Out_ LPCHARSETINFO, _In_ DWORD)
#define LOCALE_IDEFAULTANSICODEPAGE
#define HKEY_LOCAL_MACHINE
#define HKEY_CURRENT_USER
HWND WINAPI GetFocus(void)
HWND WINAPI SetCapture(_In_ HWND hWnd)
LRESULT WINAPI DispatchMessageA(_In_ const MSG *)
BOOL WINAPI GetKeyboardLayoutNameW(_Out_writes_(KL_NAMELENGTH) LPWSTR)
#define MOUSEEVENTF_ABSOLUTE
#define SetWindowLongPtrA
HWND WINAPI GetActiveWindow(void)
BOOL WINAPI SetDoubleClickTime(_In_ UINT)
HKL WINAPI GetKeyboardLayout(_In_ DWORD)
#define WM_INPUT_DEVICE_CHANGE
BOOL WINAPI RedrawWindow(_In_opt_ HWND, _In_opt_ LPCRECT, _In_opt_ HRGN, _In_ UINT)
void WINAPI mouse_event(_In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ ULONG_PTR)
BOOL WINAPI GetKeyboardLayoutNameA(_Out_writes_(KL_NAMELENGTH) LPSTR)
BOOL WINAPI SetKeyboardState(_In_reads_(256) LPBYTE)
BOOL WINAPI TranslateMessage(_In_ const MSG *)
HWND WINAPI CreateWindowExA(_In_ DWORD dwExStyle, _In_opt_ LPCSTR lpClassName, _In_opt_ LPCSTR lpWindowName, _In_ DWORD dwStyle, _In_ int X, _In_ int Y, _In_ int nWidth, _In_ int nHeight, _In_opt_ HWND hWndParent, _In_opt_ HMENU hMenu, _In_opt_ HINSTANCE hInstance, _In_opt_ LPVOID lpParam)
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
UINT WINAPI MapVirtualKeyExA(_In_ UINT, _In_ UINT, _In_opt_ HKL)
DWORD WINAPI GetMessagePos(void)
BOOL WINAPI UnregisterClassA(_In_ LPCSTR, HINSTANCE)
BOOL WINAPI GetClipCursor(_Out_ LPRECT)
HWND WINAPI GetForegroundWindow(void)
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI SwitchDesktop(_In_ HDESK)
#define MOUSEEVENTF_LEFTUP
BOOL WINAPI AttachThreadInput(_In_ DWORD, _In_ DWORD, _In_ BOOL)
int WINAPI GetKeyNameTextA(_In_ LONG lParam, _Out_writes_(cchSize) LPSTR lpString, _In_ int cchSize)
LRESULT WINAPI DefWindowProcA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI SetThreadDesktop(_In_ HDESK)
#define GET_RAWINPUT_CODE_WPARAM(wParam)
#define CreateWindowA(a, b, c, d, e, f, g, h, i, j, k)
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
HHOOK WINAPI SetWindowsHookExW(_In_ int, _In_ HOOKPROC, _In_opt_ HINSTANCE, _In_ DWORD)
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
UINT WINAPI MapVirtualKeyExW(_In_ UINT, _In_ UINT, _In_opt_ HKL)
int WINAPI SetWindowRgn(_In_ HWND, _In_opt_ HRGN, _In_ BOOL)
HDESK WINAPI OpenInputDesktop(_In_ DWORD, _In_ BOOL, _In_ DWORD)
LONG WINAPI SetWindowLongW(_In_ HWND, _In_ int, _In_ LONG)
LONG WINAPI GetWindowLongW(_In_ HWND, _In_ int)
int WINAPI ToAscii(_In_ UINT, _In_ UINT, _In_reads_opt_(256) CONST BYTE *, _Out_ LPWORD, _In_ UINT)
BOOL WINAPI ClipCursor(_In_opt_ LPCRECT)
#define MAPVK_VSC_TO_VK_EX
ATOM WINAPI RegisterClassW(_In_ CONST WNDCLASSW *)
BOOL WINAPI SetForegroundWindow(_In_ HWND)
BOOL WINAPI GetCursorPos(_Out_ LPPOINT)
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI EnumDisplayMonitors(_In_opt_ HDC, _In_opt_ LPCRECT, _In_ MONITORENUMPROC, _In_ LPARAM)
int WINAPI ToUnicode(_In_ UINT wVirtKey, _In_ UINT wScanCode, _In_reads_bytes_opt_(256) CONST BYTE *lpKeyState, _Out_writes_(cchBuff) LPWSTR pwszBuff, _In_ int cchBuff, _In_ UINT wFlags)
HWINSTA WINAPI CreateWindowStationA(_In_opt_ LPCSTR lpwinsta, _In_ DWORD dwFlags, _In_ ACCESS_MASK dwDesiredAccess, _In_opt_ LPSECURITY_ATTRIBUTES lpsa)
BOOL WINAPI CloseWindowStation(_In_ HWINSTA)
#define MOUSEEVENTF_RIGHTUP
_Check_return_ BOOL WINAPI GetKeyboardState(_Out_writes_(256) PBYTE lpKeyState)
BOOL WINAPI SetCursorPos(_In_ int, _In_ int)
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
DWORD WINAPI MsgWaitForMultipleObjects(_In_ DWORD nCount, _In_reads_opt_(nCount) CONST HANDLE *pHandles, _In_ BOOL fWaitAll, _In_ DWORD dwMilliseconds, _In_ DWORD dwWakeMask)
BOOL WINAPI SetProcessWindowStation(_In_ HWINSTA)
int WINAPI MapWindowPoints(_In_opt_ HWND hWndFrom, _In_opt_ HWND hWndTo, _Inout_updates_(cPoints) LPPOINT lpPoints, _In_ UINT cPoints)
UINT WINAPI GetDoubleClickTime(void)
UINT WINAPI MapVirtualKeyW(_In_ UINT, _In_ UINT)
#define WINSTA_ALL_ACCESS
#define MOUSEEVENTF_LEFTDOWN
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
ATOM WINAPI RegisterClassA(_In_ CONST WNDCLASSA *)
BOOL WINAPI OemToCharBuffW(_In_ LPCSTR lpszSrc, _Out_writes_(cchDstLength) LPWSTR lpszDst, _In_ DWORD cchDstLength)
HWND WINAPI SetFocus(_In_opt_ HWND)
HKL WINAPI LoadKeyboardLayoutW(_In_ LPCWSTR, _In_ UINT)
BOOL WINAPI UnhookWindowsHookEx(_In_ HHOOK)
HWND WINAPI SetActiveWindow(_In_ HWND)
BOOL WINAPI PeekMessageW(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT, _In_ UINT)
int WINAPI GetKeyNameTextW(_In_ LONG lParam, _Out_writes_(cchSize) LPWSTR lpString, _In_ int cchSize)
UINT WINAPI GetKeyboardLayoutList(_In_ int nBuff, _Out_writes_to_opt_(nBuff, return) HKL FAR *lpList)
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
BOOL WINAPI UpdateWindow(_In_ HWND)
HKL WINAPI LoadKeyboardLayoutA(_In_ LPCSTR, _In_ UINT)
#define CreateWindowW(a, b, c, d, e, f, g, h, i, j, k)
VOID WINAPI keybd_event(_In_ BYTE, _In_ BYTE, _In_ DWORD, _In_ ULONG_PTR)
LONG WINAPI GetMessageTime(void)
LRESULT WINAPI CallNextHookEx(_In_opt_ HHOOK, _In_ int, _In_ WPARAM, _In_ LPARAM)
#define KEYEVENTF_EXTENDEDKEY
LRESULT WINAPI DispatchMessageW(_In_ const MSG *)
#define MOUSEEVENTF_RIGHTDOWN
int WINAPI ToUnicodeEx(_In_ UINT wVirtKey, _In_ UINT wScanCode, _In_reads_bytes_(256) CONST BYTE *lpKeyState, _Out_writes_(cchBuff) LPWSTR pwszBuff, _In_ int cchBuff, _In_ UINT wFlags, _In_opt_ HKL dwhkl)
struct tagMONITORINFO MONITORINFO
BOOL WINAPI PeekMessageA(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT, _In_ UINT)
BOOL WINAPI UnregisterClassW(_In_ LPCWSTR, HINSTANCE)
SHORT WINAPI GetAsyncKeyState(_In_ int)
BOOL WINAPI GetMonitorInfoW(_In_ HMONITOR, _Inout_ LPMONITORINFO)
BOOL WINAPI CloseDesktop(_In_ HDESK)
HKL WINAPI ActivateKeyboardLayout(_In_ HKL, _In_ UINT)
#define MAPVK_VK_TO_VSC_EX
DWORD WINAPI OemKeyScan(_In_ WORD)
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)
BOOL WINAPI UnionRect(_Out_ LPRECT, _In_ LPCRECT, _In_ LPCRECT)
#define SetWindowLongPtrW
BOOL WINAPI InflateRect(_Inout_ LPRECT, _In_ int, _In_ int)
BOOL WINAPI GetMessageA(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT)
int WINAPI ToAsciiEx(_In_ UINT, _In_ UINT, _In_reads_opt_(256) CONST BYTE *, _Out_ LPWORD, _In_ UINT, _In_opt_ HKL)
SHORT WINAPI VkKeyScanW(_In_ WCHAR)
LPARAM WINAPI GetMessageExtraInfo(void)
BOOL WINAPI DestroyWindow(_In_ HWND)
BOOL WINAPI PostMessageA(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI EqualRect(_In_ LPCRECT, _In_ LPCRECT)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HCURSOR WINAPI LoadCursorA(_In_opt_ HINSTANCE, _In_ LPCSTR)
SHORT WINAPI GetKeyState(_In_ int)