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;
1859 ok(
FALSE,
"Broken on ReactOS\n");
1860 skip(
"Skipping test_GetMouseMovePointsEx_process due to CORE-20552\n");
1866 memset( out2, 0,
sizeof(out2) );
1874 ok(
retval == 64,
"expected to get 64 mouse move points but got %d\n",
retval );
1884 retval = pGetMouseMovePointsEx(
sizeof(MOUSEMOVEPOINT), &
in, out2,
ARRAY_SIZE(out2), GMMP_USE_DISPLAY_POINTS );
1885 ok(
retval == 64,
"expected to get 64 mouse move points but got %d\n",
retval );
1887 ok(
memcmp(
out, out2,
sizeof(out2) ) == 0,
"expected to get exact same history on the new desktop\n" );
1894 retval = pGetMouseMovePointsEx(
sizeof(MOUSEMOVEPOINT), &
in, out2,
ARRAY_SIZE(out2), GMMP_USE_DISPLAY_POINTS );
1895 ok(
retval == 64,
"expected to get 64 mouse move points but got %d\n",
retval );
1901 ok(
retval == 64,
"expected to get 64 mouse move points but got %d\n",
retval );
1902 ok(
memcmp(
out, out2,
sizeof( out2 ) ) == 0,
"expected to get exact same history on the old desktop\n" );
1909 ok( winstation0 !=
NULL,
"GetProcessWindowStation has failed with %ld\n",
GetLastError() );
1916 win_skip(
"not enough privileges for CreateWindowStation\n");
1922 ok( winstation1 !=
NULL,
"CreateWindowStationA has failed with %ld\n",
GetLastError() );
1944 RAWINPUTDEVICELIST
devices[32];
1945 UINT ret, oret, devcount, odevcount,
i;
1952 ok(
ret == -1,
"expected -1, got %d\n",
ret);
1958 ok(
ret == -1,
"expected -1, got %d\n",
ret);
1962 ret = pGetRawInputDeviceList(
NULL, &devcount,
sizeof(
devices[0]));
1963 ok(
ret == 0,
"expected 0, got %d\n",
ret);
1964 ok(devcount > 0,
"expected non-zero\n");
1970 ok(
ret == -1,
"expected -1, got %d\n",
ret);
1972 ok(devcount > 0,
"expected non-zero\n");
1976 ok(
ret > 0,
"expected non-zero\n");
1980 RID_DEVICE_INFO
info;
1985 ok(
ret == ~0
U,
"GetRawInputDeviceInfoW returned %#x, expected ~0.\n",
ret );
1991 ok(
ret == ~0
U,
"GetRawInputDeviceInfoW returned %#x, expected ~0.\n",
ret );
1992 ok(
size == 0xdeadbeef,
"GetRawInputDeviceInfoW returned size %#x, expected 0.\n",
size );
1998 ok(
ret == ~0
U,
"GetRawInputDeviceInfoW returned %#x, expected ~0.\n",
ret );
1999 ok(
size == 0xdeadbeef,
"GetRawInputDeviceInfoW returned size %#x, expected 0.\n",
size );
2004 ok(
ret == ~0
U,
"GetRawInputDeviceInfoW returned %#x, expected ~0.\n",
ret );
2010 ok(
ret == ~0
U,
"GetRawInputDeviceInfoW returned %#x, expected ~0.\n",
ret );
2011 ok(
size ==
sizeof(
info),
"GetRawInputDeviceInfoW returned size %#x, expected %#Ix.\n",
size,
sizeof(
info) );
2015 for(
i = 0;
i < devcount; ++
i)
2020 RID_DEVICE_INFO
info;
2027 ret = pGetRawInputDeviceInfoW(
devices[
i].hDevice, RIDI_DEVICENAME,
name, &sz);
2028 ok(
ret == -1,
"GetRawInputDeviceInfo gave wrong failure: %ld\n",
err);
2029 ok(sz > 5 && sz <
ARRAY_SIZE(
name),
"Size should have been set and not too large (got: %u)\n", sz);
2032 ret = pGetRawInputDeviceInfoW(
devices[
i].hDevice, RIDI_DEVICENAME,
name, &sz);
2033 ok(
ret == sz,
"GetRawInputDeviceInfo gave wrong return: %ld\n",
err);
2035 ok(
len + 1 ==
ret,
"GetRawInputDeviceInfo returned wrong length (name: %u, ret: %u)\n",
len + 1,
ret);
2038 ret = pGetRawInputDeviceInfoA(
devices[
i].hDevice, RIDI_DEVICENAME, nameA, &sz);
2039 ok(
ret == sz,
"GetRawInputDeviceInfoA gave wrong return: %ld\n",
err);
2041 ok(
len + 1 ==
ret,
"GetRawInputDeviceInfoA returned wrong length (name: %u, ret: %u)\n",
len + 1,
ret);
2046 sz =
sizeof(
info) - 1;
2047 ret = pGetRawInputDeviceInfoW(
devices[
i].hDevice, RIDI_DEVICEINFO, &
info, &sz);
2048 ok(
ret == -1,
"GetRawInputDeviceInfo gave wrong failure: %ld\n",
err);
2049 ok(sz ==
sizeof(
info),
"GetRawInputDeviceInfo set wrong size\n");
2051 ret = pGetRawInputDeviceInfoW(
devices[
i].hDevice, RIDI_DEVICEINFO, &
info, &sz);
2052 ok(
ret ==
sizeof(
info),
"GetRawInputDeviceInfo gave wrong return: %ld\n",
err);
2053 ok(sz ==
sizeof(
info),
"GetRawInputDeviceInfo set wrong size\n");
2054 ok(
info.dwType ==
devices[
i].dwType,
"GetRawInputDeviceInfo set wrong type: 0x%lx\n",
info.dwType);
2058 ret = pGetRawInputDeviceInfoA(
devices[
i].hDevice, RIDI_DEVICEINFO, &
info, &sz);
2059 ok(
ret ==
sizeof(
info),
"GetRawInputDeviceInfo gave wrong return: %ld\n",
err);
2060 ok(sz ==
sizeof(
info),
"GetRawInputDeviceInfo set wrong size\n");
2061 ok(
info.dwType ==
devices[
i].dwType,
"GetRawInputDeviceInfo set wrong type: 0x%lx\n",
info.dwType);
2070 ret = pGetRawInputDeviceInfoW(
devices[
i].hDevice, RIDI_PREPARSEDDATA,
NULL, &sz);
2071 ok(
ret == 0,
"GetRawInputDeviceInfo gave wrong return: %u\n",
ret);
2072 ok((
info.dwType == RIM_TYPEHID && sz != 0) ||
2073 (
info.dwType != RIM_TYPEHID && sz == 0),
2074 "Got wrong PPD size for type 0x%lx: %u\n",
info.dwType, sz);
2077 ret = pGetRawInputDeviceInfoW(
devices[
i].hDevice, RIDI_PREPARSEDDATA, ppd, &sz);
2078 ok(
ret == sz,
"GetRawInputDeviceInfo gave wrong return: %u, should be %u\n",
ret, sz);
2084 if (
info.dwType == RIM_TYPEHID)
2087 ok(br ==
TRUE,
"HidD_GetPreparsedData failed\n");
2090 ok(!
memcmp(preparsed, ppd, sz),
"Expected to get same preparsed data\n");
2111 ok(
ret > 0,
"expected non-zero\n");
2112 ok(devcount == odevcount,
"expected %d, got %d\n", devcount, odevcount);
2113 devcount = odevcount;
2115 ret = pGetRawInputDeviceList(
NULL, &odevcount,
sizeof(
devices[0]));
2116 ok(
ret == 0,
"expected 0, got %d\n",
ret);
2117 ok(odevcount == oret,
"expected %d, got %d\n", oret, odevcount);
2133 RAWINPUTDEVICE raw_devices[2] = {0};
2162 raw_devices_count = 0;
2164 ok_eq( 2, raw_devices_count,
UINT,
"%u" );
2167 raw_devices_count = 0;
2170 win_skip(
"Ignoring GetRegisteredRawInputDevices success\n" );
2174 ok_eq( 0, raw_devices_count,
UINT,
"%u" );
2179 raw_devices_count = 1;
2181 ok_eq( 2, raw_devices_count,
UINT,
"%u" );
2184 memset( raw_devices, 0,
sizeof(raw_devices) );
2187 ok_eq( 2, raw_devices_count,
UINT,
"%u" );
2195 raw_devices[0].hwndTarget = 0;
2197 raw_devices[1].hwndTarget = 0;
2203 raw_devices[0].hwndTarget =
hwnd;
2204 raw_devices[1].hwndTarget =
hwnd;
2208 raw_devices[0].dwFlags = RIDEV_DEVNOTIFY;
2209 raw_devices[0].hwndTarget = 0;
2212 raw_devices[1].dwFlags = RIDEV_DEVNOTIFY;
2213 raw_devices[1].hwndTarget = 0;
2226 raw_devices[0].hwndTarget =
hwnd;
2227 raw_devices[1].hwndTarget =
hwnd;
2251 raw_devices[0].hwndTarget =
hwnd;
2253 raw_devices[1].hwndTarget =
hwnd;
2259 raw_devices[0].hwndTarget = 0;
2260 raw_devices[1].hwndTarget = 0;
2306 RAWINPUT *rawbuffer = (RAWINPUT *)
buffer;
2308 RAWINPUT rawinput = {{0}};
2313 else rawinput_size =
sizeof(RAWINPUTHEADER) +
sizeof(RAWKEYBOARD);
2320 for (
i = 0;
i < 3; ++
i)
2333 RAWINPUT *rawinput = (RAWINPUT *)(
buffer +
i * rawinput_size);
2334 ok_eq( RIM_TYPEKEYBOARD, rawinput->header.dwType,
UINT,
"%u" );
2335 ok_eq( rawinput_size, rawinput->header.dwSize,
UINT,
"%u" );
2337 ok_eq(
i + 2, rawinput->data.keyboard.MakeCode,
WPARAM,
"%Iu" );
2354 size =
sizeof(rawinput) + 1;
2358 else ok_eq( 5, rawbuffer->data.keyboard.MakeCode,
WPARAM,
"%Iu" );
2368 size =
sizeof(rawinput);
2382 size =
sizeof(RAWINPUTHEADER);
2383 rawinput_size =
sizeof(RAWINPUTHEADER) +
sizeof(RAWKEYBOARD);
2385 ok_eq( rawinput_size, rawinput.header.dwSize,
UINT,
"%u" );
2386 ok_eq( RIM_TYPEKEYBOARD, rawinput.header.dwType,
UINT,
"%u" );
2403 size =
sizeof(rawinput);
2408 size =
sizeof(rawinput);
2410 ok_eq( 6, rawinput.data.keyboard.MakeCode,
UINT,
"%u" );
2414 if (
sizeof(
void *) == 8)
2423 ok_eq( 6, rawinput.data.keyboard.MakeCode,
UINT,
"%u" );
2443 unsigned int size, rawinput_size, header_size;
2444 RAWINPUTDEVICE raw_devices[1];
2447 RAWINPUT *rawbuffer = (RAWINPUT *)
buffer;
2449 LPARAM extra_info1, extra_info2;
2450 INPUT_MESSAGE_SOURCE
source;
2456 else rawinput_size =
sizeof(RAWINPUTHEADER) +
sizeof(RAWMOUSE);
2461 if (pGetCurrentInputMessageSource)
2463 ret = pGetCurrentInputMessageSource( &
source );
2472 raw_devices[0].hwndTarget =
hwnd;
2490 ok( t1 <=
now,
"got %lu, %lu.\n", t1,
now );
2506 ok( t2 == t1,
"got %lu, %lu.\n", t1, t2 );
2515 ok( t2 == t1,
"got %lu, %lu.\n", t1, t2 );
2545 size = rawinput_size;
2550 else ok_eq( 5, rawbuffer->data.mouse.lLastX,
UINT,
"%u" );
2555 ok( extra_info2 == extra_info1,
"got %#Ix, %#Ix.\n", extra_info1, extra_info2 );
2557 ok( t3 > t1,
"got %lu, %lu.\n", t1, t3 );
2558 ok( t3 < t2,
"got %lu, %lu.\n", t2, t3 );
2559 ok( pos1 == pos2,
"got pos1 (%ld, %ld), pos2 (%ld, %ld), pt (%ld %ld).\n",
2560 pos1 & 0xffff, pos1 >> 16, pos2 & 0xffff, pos2 >> 16,
pt.x,
pt.y );
2561 if (pGetCurrentInputMessageSource)
2563 ret = pGetCurrentInputMessageSource( &
source );
2581 ok( t1 <=
now,
"got %lu, %lu.\n", t1,
now );
2587 ok( t2 == t1,
"got %lu, %lu.\n", t1, t2 );
2592 size = rawinput_size + 1;
2598 ok_eq( RIM_TYPEMOUSE, rawbuffer64->header.dwType,
UINT,
"%#x" );
2599 ok_eq( 0, rawbuffer64->header.wParam,
WPARAM,
"%Iu" );
2600 ok_eq( 5, rawbuffer64->data.mouse.lLastX,
UINT,
"%u" );
2604 ok_eq( RIM_TYPEMOUSE, rawbuffer->header.dwType,
UINT,
"%#x" );
2605 ok_eq( 0, rawbuffer->header.wParam,
WPARAM,
"%Iu" );
2606 ok_eq( 5, rawbuffer->data.mouse.lLastX,
UINT,
"%u" );
2617 ok( extra_info2 == extra_info1,
"got %#Ix, %#Ix.\n", extra_info1, extra_info2 );
2618 ok( t3 > t1,
"got %lu, %lu.\n", t1, t3 );
2619 ok( t3 < t2,
"got %lu, %lu.\n", t2, t3 );
2620 ok( pos1 == pos2,
"got pos1 (%ld, %ld), pos2 (%ld, %ld), pt (%ld %ld).\n",
2621 pos1 & 0xffff, pos1 >> 16, pos2 & 0xffff, pos2 >> 16,
pt.x,
pt.y );
2624 raw_devices[0].hwndTarget = 0;
2632 raw_devices[0].hwndTarget =
hwnd;
2639 else rawinput_size =
sizeof(RAWINPUTHEADER) +
sizeof(RAWKEYBOARD);
2651 ok_eq( RIM_TYPEKEYBOARD, rawbuffer64->header.dwType,
UINT,
"%u" );
2652 ok_eq( 0, rawbuffer64->header.wParam,
UINT,
"%u" );
2653 ok_eq( 0x2d, rawbuffer64->data.keyboard.MakeCode,
UINT,
"%#x" );
2657 ok_eq( RIM_TYPEKEYBOARD, rawbuffer->header.dwType,
UINT,
"%u" );
2658 ok_eq( 0, rawbuffer->header.wParam,
UINT,
"%u" );
2659 ok_eq( 0x2d, rawbuffer->data.keyboard.MakeCode,
UINT,
"%#x" );
2677 raw_devices[0].hwndTarget = 0;
2683 size = rawinput_size + 1;
2690 raw_devices[0].hwndTarget =
hwnd;
2694 else rawinput_size =
sizeof(RAWINPUTHEADER) +
sizeof(RAWMOUSE);
2696 size = rawinput_size + 1;
2704 raw_devices[0].hwndTarget = 0;
2730 ok(
ret == 0,
"GetRawInputData failed\n");
2731 ok(raw_size <=
sizeof(raw),
"Unexpected rawinput data size: %u\n", raw_size);
2733 raw_size =
sizeof(raw);
2735 ok(
ret > 0 &&
ret != (
UINT)-1,
"GetRawInputData failed\n");
2736 ok(raw.header.dwType == RIM_TYPEMOUSE,
"Unexpected rawinput type: %lu\n", raw.header.dwType);
2737 ok(raw.header.dwSize == raw_size,
"Expected size %u, got %lu\n", raw_size, raw.header.dwSize);
2739 ok(raw.header.wParam ==
wparam,
"Expected wparam %Iu, got %Iu\n",
wparam, raw.header.wParam);
2795 RAWINPUTDEVICE raw_devices[1];
2804 ok(ready != 0,
"OpenEventA failed, error: %lu\n",
GetLastError());
2810 ok(done != 0,
"OpenEventA failed, error: %lu\n",
GetLastError());
2833 ok(
hwnd != 0,
"CreateWindow failed\n");
2844 if (
i == 9 ||
i == 10 ||
i == 11 ||
i == 12)
2846 raw_devices[0].usUsagePage = 0x01;
2847 raw_devices[0].usUsage = 0x02;
2849 raw_devices[0].hwndTarget =
i == 11 ?
hwnd : 0;
2853 ok(
ret,
"%d: RegisterRawInputDevices failed\n",
i);
2876 if (
i == 9 ||
i == 10 ||
i == 11 ||
i == 12)
2879 raw_devices[0].hwndTarget = 0;
2888 ok(
ret,
"%d: RegisterRawInputDevices failed\n",
i);
2912 RAWINPUTDEVICE raw_devices[1];
2935 ok(
hwnd != 0,
"CreateWindow failed\n");
2947 raw_devices[0].usUsagePage = 0x01;
2948 raw_devices[0].usUsage = 0x02;
2958 ok(
ret,
"%d: RegisterRawInputDevices failed\n",
i);
2983 for (
i = 0;
i < 14; ++
i)
2996 ok(
hwnd != 0,
"CreateWindow failed\n");
3031 RAWINPUTDEVICE raw_devices[1];
3033 HANDLE thread, process_ready, process_start, process_done;
3057 ok(process_ready !=
NULL,
"CreateEventA failed\n");
3060 ok(process_start !=
NULL,
"CreateEventA failed\n");
3063 ok(process_done !=
NULL,
"CreateEventA failed\n");
3065 memset(&startup_info, 0,
sizeof(startup_info));
3066 startup_info.
cb =
sizeof(startup_info);
3083 ok(
hwnd != 0,
"CreateWindow failed\n");
3084 if (
i != 14 &&
i != 15 &&
i != 16)
3100 raw_devices[0].usUsagePage = 0x01;
3101 raw_devices[0].usUsage = 0x02;
3112 win_skip(
"RIDEV_EXINPUTSINK not supported\n");
3114 ok(!skipped,
"%d: RegisterRawInputDevices failed: %lu\n",
i,
GetLastError());
3130 ok(
hwnd != 0,
"CreateWindow failed\n");
3156 "%d: %sexpected WM_MOUSEMOVE message\n",
i,
rawinput_tests[
i].expect_legacy ?
"" :
"un");
3159 "%d: %sexpected WM_INPUT message\n",
i,
rawinput_tests[
i].expect_raw ?
"" :
"un");
3162 "%d: %sexpected RIM_INPUT message\n",
i,
rawinput_tests[
i].expect_rawfg ?
"" :
"un");
3166 ok((newpt.
x -
pt.x) == 5 || (newpt.
x -
pt.x) == 4,
"%d: Unexpected cursor movement\n",
i);
3171 raw_devices[0].hwndTarget = 0;
3223 static const UINT numpad_collisions[][2] = {
3236 ok(
s != 0,
"MapVirtualKeyEx(VK_SHIFT) should return non-zero\n");
3239 "%x != %x\n",
s, sL);
3242 ok(kL ==
VK_SHIFT,
"Scan code -> vKey = %x (not VK_SHIFT)\n", kL);
3244 ok(kR ==
VK_SHIFT,
"Scan code -> vKey = %x (not VK_SHIFT)\n", kR);
3248 "Scan code -> vKey = %x (not VK_LSHIFT)\n", kL);
3251 "Scan code -> vKey = %x (not VK_RSHIFT)\n", kR);
3260 if (numpad_scan && other_scan == numpad_scan)
3263 ok(vkey != numpad_collisions[
i][0],
3264 "Got numpad vKey %x for scan code %x when there was another choice\n",
3271 ok(
s >> 8 == 0x00,
"Scan code prefixes should not be returned when not using MAPVK_VK_TO_VSC_EX %#1x\n",
s >> 8);
3273 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);
3275 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);
3277 ok(
s >> 8 == 0x00 ||
broken(
s == 0),
"The scan code shouldn't have a prefix, got %#1x\n",
s >> 8);
3293 { 0, 0,
'a', 1, {
'a',0}},
3294 { 0,
shift,
'a', 1, {
'A',0}},
3295 { 0,
menu,
'a', 1, {
'a',0}},
3297#if defined(__REACTOS__) && defined(_MSC_VER)
3302 { 0,
ctrl,
'a', 1, {1, 0}},
3304#if defined(__REACTOS__) && defined(_MSC_VER)
3312#if defined(__REACTOS__) && defined(_MSC_VER)
3314 { 0,
ctrl,
'4', 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}},
3327 { 0,
ctrl,
'-', 0, {0}},
3328 { 0,
ctrl,
'.', 0, {0}},
3329 { 0,
ctrl,
'/', 0, {0}},
3330 { 0,
ctrl,
':', 0, {0}},
3331 { 0,
ctrl,
';', 0, {0}},
3332 { 0,
ctrl,
'<', 0, {0}},
3333 { 0,
ctrl,
'=', 0, {0}},
3334 { 0,
ctrl,
'>', 0, {0}},
3335 { 0,
ctrl,
'?', 0, {0}},
3338 { 0,
ctrl,
'4', 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, {}},
3351 { 0,
ctrl,
'-', 0, {}},
3352 { 0,
ctrl,
'.', 0, {}},
3353 { 0,
ctrl,
'/', 0, {}},
3354 { 0,
ctrl,
':', 0, {}},
3355 { 0,
ctrl,
';', 0, {}},
3356 { 0,
ctrl,
'<', 0, {}},
3357 { 0,
ctrl,
'=', 0, {}},
3358 { 0,
ctrl,
'>', 0, {}},
3359 { 0,
ctrl,
'?', 0, {}},
3361 { 0,
ctrl,
'@', 1, {0}},
3362 { 0,
ctrl,
'[', 1, {0x1b}},
3363 { 0,
ctrl,
'\\', 1, {0x1c}},
3364 { 0,
ctrl,
']', 1, {0x1d}},
3365 { 0,
ctrl,
'^', 1, {0x1e}},
3366 { 0,
ctrl,
'_', 1, {0x1f}},
3367#if defined(__REACTOS__) && defined(_MSC_VER)
3368 { 0,
ctrl,
'`', 0, {0}},
3370 { 0,
ctrl,
'`', 0, {}},
3381 const BYTE SC_RETURN = 0x1c, SC_TAB = 0x0f, SC_A = 0x1e;
3382 const BYTE HIGHEST_BIT = 0x80;
3386 for(
i=0;
i<256;
i++)
3394 win_skip(
"ToUnicode is not implemented\n");
3398 ok(
ret == 1,
"ToUnicode for Return key didn't return 1 (was %i)\n",
ret);
3401 ok(wStr[0]==
'\r',
"ToUnicode for CTRL + Return was %i (expected 13)\n", wStr[0]);
3402 ok(wStr[1]==0 ||
broken(wStr[1]!=0) ,
3403 "ToUnicode didn't null-terminate the buffer when there was room.\n");
3414 if (!us_kbd)
continue;
3416 if (vk_ret == -1)
continue;
3419 if (vk_ret & 0x200)
mod |=
ctrl;
3438 ok(
ret == 0,
"ToUnicode with NULL keystate didn't return 0 (was %i)\n",
ret);
3440 ok(
ret == 0,
"ToUnicode with NULL keystate didn't return 0 (was %i)\n",
ret);
3442 ok(
ret == 0,
"ToUnicode with NULL keystate didn't return 0 (was %i)\n",
ret);
3444 ok(
ret == 0,
"ToUnicodeEx with NULL keystate didn't return 0 (was %i)\n",
ret);
3446 ok(
ret == 0,
"ToUnicodeEx with NULL keystate didn't return 0 (was %i)\n",
ret);
3448 ok(
ret == 0,
"ToUnicodeEx with NULL keystate didn't return 0 (was %i)\n",
ret);
3457 const BYTE SC_RETURN = 0x1c, SC_A = 0x1e;
3458 const BYTE HIGHEST_BIT = 0x80;
3466 ok(
ret == 1,
"ToAscii for Return key didn't return 1 (was %i)\n",
ret);
3467 ok(character ==
'\r',
"ToAscii for Return was %i (expected 13)\n", character);
3471 ok(
ret == 1,
"ToUnicode(A) returned %i, expected 1\n",
ret);
3480 if (
len == 1 ||
len == 2)
3481 ok(
ret == 1,
"ToAscii(A) returned %i, expected 1\n",
ret);
3484 ok(
ret == 0,
"ToAscii(A) returned %i, expected 0\n",
ret);
3491 ok(character ==
'a',
"ToAscii(A) returned char=%i, expected %i\n", character,
'a');
3500 ok(
ret == 1,
"ToAscii for CTRL + Return key didn't return 1 (was %i)\n",
ret);
3501 ok(character ==
'\n',
"ToAscii for CTRL + Return was %i (expected 10)\n", character);
3505 ok(
ret == 1,
"ToAscii for CTRL + character 'A' didn't return 1 (was %i)\n",
ret);
3506 ok(character == 1,
"ToAscii for CTRL + character 'A' was %i (expected 1)\n", character);
3511 ok(
ret == 0,
"ToAscii for CTRL + Shift + Return key didn't return 0 (was %i)\n",
ret);
3514 ok(
ret == 0,
"ToAscii for NULL keystate didn't return 0 (was %i)\n",
ret);
3516 ok(
ret == 0,
"ToAscii for NULL keystate didn't return 0 (was %i)\n",
ret);
3518 ok(
ret == 0,
"ToAsciiEx for NULL keystate didn't return 0 (was %i)\n",
ret);
3520 ok(
ret == 0,
"ToAsciiEx for NULL keystate didn't return 0 (was %i)\n",
ret);
3547 HKL layout, tmplayout, *layouts, *layouts_preload;
3563 if (
broken( layout == (
HKL)0x040a0c0a ))
3570 win_skip(
"broken keyboard layout, skipping tests\n" );
3575 ok(layouts !=
NULL,
"Could not allocate memory\n");
3577 layouts_preload =
calloc(1,
sizeof(
HKL));
3578 ok(layouts_preload !=
NULL,
"Could not allocate memory\n");
3584 klid_size =
sizeof(klid);
3588 klid_size =
sizeof(klid);
3590 layouts_preload =
realloc( layouts_preload, (
i + 1) *
sizeof(*layouts_preload) );
3591 ok(layouts_preload !=
NULL,
"Could not allocate memory\n");
3593 layouts_preload[
i] = 0;
3596 if (
id & 0x80000000)
todo_wine_if(
HIWORD(
id) == 0xe001)
ok((
id & 0xf0000000) == 0xd0000000,
"Unexpected preloaded keyboard layout high bits %#lx\n",
id);
3597 else ok(!(
id & 0xf0000000),
"Unexpected preloaded keyboard layout high bits %#lx\n",
id);
3605 for (
i = 0; layouts_preload[
i]; ++
i)
3608 klid_size =
sizeof(klid);
3616 ok(!(
id & 0xf0000000),
"Unexpected substitute keyboard layout high bits %#lx\n",
id);
3621 ok(!(
id & 0xf0000000),
"Unexpected preloaded keyboard layout high bits %#lx\n",
id);
3628 for (
i =
len - 1;
i >= 0; --
i)
3638 ok( tmplayout == layouts[
i],
"Failed to activate keyboard layout\n");
3639 if (tmplayout != layouts[
i])
3647 for (
j = 0; layouts_preload[
j]; ++
j)
3654 if (!
wcscmp( tmpklid, klid ))
break;
3658 if (
id & 0x80000000)
3660 todo_wine ok((
id >> 28) == 0xf,
"hkl high bits %#lx, expected 0xf\n",
id >> 28);
3662 value_size =
sizeof(
value);
3663 wcscpy(layout_path,
L"System\\CurrentControlSet\\Control\\Keyboard Layouts\\");
3664 wcscat(layout_path, klid);
3667 ok(value_size == 5 *
sizeof(
WCHAR),
"RegGetValueW returned size %ld\n", value_size);
3682 ok(((
UINT_PTR)tmplayout & ~0xffff) == ((
UINT_PTR)layouts[
i] & ~0xffff),
"LoadKeyboardLayoutW returned %p, expected %p\n", tmplayout, layouts[
i]);
3694 free(layouts_preload);
3703 ok(
msg != WM_INPUTLANGCHANGEREQUEST,
"got WM_INPUTLANGCHANGEREQUEST\n" );
3706 if (
msg == WM_INPUTLANGCHANGE)
3725 ok( !
got_setfocus,
"got WM_SETFOCUS before WM_INPUTLANGCHANGE\n" );
3728 "got wparam %#Ix\n",
wparam );
3744 HKL layout, tmp_layout, *layouts;
3751 if (
broken( layout == (
HKL)0x040a0c0a ))
3754 win_skip(
"broken keyboard layout, skipping tests\n" );
3759 ok(
count > 0,
"GetKeyboardLayoutList returned %d\n",
count );
3761 ok( layouts !=
NULL,
"Could not allocate memory\n" );
3763 ok(
count > 0,
"GetKeyboardLayoutList returned %d\n",
count );
3767 ok( !!hwnd1,
"CreateWindow failed, error %lu\n",
GetLastError() );
3775 HKL other_layout = layouts[
i];
3791 ok( tmp_layout == other_layout,
"got tmp_layout %p\n", tmp_layout );
3797 ok( !
ret,
"WaitForSingleObject returned %#lx\n",
ret );
3805 ok( tmp_layout == other_layout,
"got tmp_layout %p\n", tmp_layout );
3811 ok( !!hwnd2,
"CreateWindow failed, error %lu\n",
GetLastError() );
3815 ok( tmp_layout == layout ||
broken(layout != other_layout && tmp_layout == other_layout) ,
3816 "got tmp_layout %p\n", tmp_layout );
3817 if (
broken(layout != other_layout && tmp_layout == other_layout))
3819 win_skip(
"Broken layout activation on focus change, skipping some tests\n" );
3820 broken_focus_activate =
TRUE;
3831 ok( tmp_layout == other_layout,
"got tmp_layout %p\n", tmp_layout );
3835 ok( !
ret,
"WaitForSingleObject returned %#lx\n",
ret );
3840 ok( tmp_layout == other_layout,
"got tmp_layout %p\n", tmp_layout );
3849 if (broken_focus_activate)
3863 ok( tmp_layout == layout,
"got tmp_layout %p\n", tmp_layout );
3899 memset( bufferW, 0xcc,
sizeof(bufferW) );
3904 memset( bufferW, 0xcc,
sizeof(bufferW) );
3910 memset( bufferW, 0xcc,
sizeof(bufferW) );
3913 ok( bufferW[0] == 0xcccc,
"wrong string %s\n",
wine_dbgstr_w(bufferW) );
3932 ok(events_no == 2,
"SendInput returned %d\n", events_no);
3970 params->hwnd =
CreateWindowW(
L"static",
NULL,
WS_VISIBLE |
WS_POPUP, 0, 0, 100, 100,
NULL,
NULL,
NULL,
NULL );
3986 static DWORD last_x = 50, expect_x = 60;
3994 if (
pt.x != last_x)
ok(
pt.x == expect_x,
"got unexpected WM_MOUSEMOVE x %ld, expected %ld\n",
pt.x, expect_x );
3996 expect_x =
pt.x == 50 ? 60 : 50;
4051 ok(
abs( hook_info->
pt.
x - 51 ) <= 1,
"got x %ld\n", hook_info->
pt.
x );
4052 ok(
abs( hook_info->
pt.
y - 49 ) <= 1,
"got y %ld\n", hook_info->
pt.
y );
4056 ok(
abs(
pos.x - 51 ) <= 1,
"got x %ld\n",
pos.x );
4057 ok(
abs(
pos.y - 49 ) <= 1,
"got y %ld\n",
pos.y );
4060 hook_info->
pt = hook_pos;
4071 POINT pos, expect_pos = {60, 60}, hook_pos = {40, 40};
4087#define WIN_MSG(m, h, w, l, ...) {.func = MSG_TEST_WIN, .message = {.msg = m, .hwnd = h, .wparam = w, .lparam = l}, ## __VA_ARGS__}
4088#define MS_HOOK(m, x, y, ...) {.func = LL_HOOK_MOUSE, .ll_hook_ms = {.msg = m, .point = {x, y}, .flags = 1}, ## __VA_ARGS__}
4100 struct user_call button_down_hwnd_todo[] =
4113 struct user_call button_up_hwnd_todo[] =
4120 struct user_call button_down_no_message[] =
4126 struct user_call button_up_no_message[] =
4134 static const POINT expect_60x50 = {60, 50}, expect_50x50 = {50, 50};
4136 static const struct layered_test
4145 {.flags = LWA_ALPHA, .expect_click =
FALSE},
4146 {.alpha = 1, .flags = LWA_ALPHA, .expect_click =
TRUE},
4147 {.color =
RGB(0, 255, 0), .flags = LWA_COLORKEY, .expect_click =
TRUE},
4148 {.color =
RGB(50, 100, 255), .flags = LWA_COLORKEY, .expect_click =
TRUE},
4149 {.color =
RGB(0, 255, 0), .flags = LWA_COLORKEY | LWA_ALPHA, .expect_click =
FALSE},
4150 {.color =
RGB(0, 255, 0), .alpha = 1, .flags = LWA_COLORKEY | LWA_ALPHA, .expect_click =
TRUE},
4151 {.color =
RGB(50, 100, 255), .alpha = 1, .flags = LWA_COLORKEY | LWA_ALPHA, .expect_click =
TRUE},
4156 RECT clip_rect = {55, 55, 55, 55};
4157 UINT dblclk_time,
i;
4161 HHOOK
hook, hook_setpos, hook_getpos;
4167 ok( !!
params.start_event,
"CreateEvent failed\n" );
4169 ok( !!
params.end_event,
"CreateEvent failed\n" );
4178 hwnd =
CreateWindowW(
L"static",
NULL,
WS_POPUP |
WS_VISIBLE, 0, 0, 100, 100,
NULL,
NULL,
NULL,
NULL );
4202 ok_ne(
NULL, hook_getpos, HHOOK,
"%p" );
4204 ok_ne(
NULL, hook_setpos, HHOOK,
"%p" );
4240 ok_seq( button_down_hwnd );
4245 ok_seq( button_up_hwnd );
4249 ok_seq( button_up_hwnd );
4254 other =
CreateWindowW(
L"static",
NULL,
WS_VISIBLE |
WS_POPUP, 0, 0, 100, 100,
NULL,
NULL,
NULL,
NULL );
4265 ok_seq( button_down_hwnd );
4269 ok_seq( button_up_hwnd );
4277 other =
CreateWindowW(
L"static",
NULL,
WS_VISIBLE |
WS_CHILD, 0, 0, 100, 100,
hwnd,
NULL,
NULL,
NULL );
4288 ok_seq( button_down_hwnd );
4292 ok_seq( button_up_hwnd );
4300 other =
CreateWindowW(
L"static",
NULL,
WS_VISIBLE |
WS_POPUP, 0, 0, 100, 100,
NULL,
NULL,
NULL,
NULL );
4311 ok_seq( button_down_hwnd_todo );
4315 ok_seq( button_up_hwnd_todo );
4323 other =
CreateWindowW(
L"static",
NULL,
WS_VISIBLE |
WS_CHILD, 0, 0, 100, 100,
hwnd,
NULL,
NULL,
NULL );
4334 ok_seq( button_down_hwnd );
4338 ok_seq( button_up_hwnd );
4354 ok_seq( button_down_no_message );
4357 ok_seq( button_up_no_message );
4379 ok_seq( button_down_hwnd_todo );
4383 ok_seq( button_up_hwnd );
4395 other =
CreateWindowW(
L"static",
NULL,
WS_VISIBLE |
WS_POPUP, 0, 0, 100, 100,
NULL,
NULL,
NULL,
NULL );
4408 ok_seq( button_down_hwnd );
4412 ok_seq( button_up_hwnd );
4422 other =
CreateWindowW(
L"static",
NULL,
WS_VISIBLE |
WS_CHILD, 0, 0, 100, 100,
hwnd,
NULL,
NULL,
NULL );
4435 ok_seq( button_down_hwnd );
4439 ok_seq( button_up_hwnd );
4452 const struct layered_test *
test = layered_tests +
i;
4457 other =
CreateWindowW(
L"static",
NULL,
WS_VISIBLE |
WS_POPUP, 0, 0, 100, 100,
NULL,
NULL,
NULL,
NULL );
4470 win_skip(
"Skipping broken SetLayeredWindowAttributes tests\n");
4483 button_down_hwnd_todo[1].
todo = !
test->expect_click;
4484 button_down_hwnd_todo[2].
todo = !
test->alpha && (
test->flags & LWA_ALPHA);
4485 ok_seq( button_down_hwnd_todo );
4489 button_up_hwnd_todo[1].
todo = !
test->expect_click;
4490 button_up_hwnd_todo[2].
todo = !
test->alpha && (
test->flags & LWA_ALPHA);
4491 ok_seq( button_up_hwnd_todo );
4503 button_down_hwnd_todo[1].
todo = !
test->expect_click;
4504 button_down_hwnd_todo[2].
todo = !
test->alpha && (
test->flags & LWA_ALPHA);
4505 ok_seq( button_down_hwnd_todo );
4509 button_up_hwnd_todo[1].
todo = !
test->expect_click;
4510 button_up_hwnd_todo[2].
todo = !
test->alpha && (
test->flags & LWA_ALPHA);
4511 ok_seq( button_up_hwnd_todo );
4521 other =
CreateWindowW(
L"static",
NULL,
WS_VISIBLE |
WS_POPUP, 0, 0, 100, 100,
NULL,
NULL,
NULL,
NULL );
4538 ok_seq( button_down_hwnd );
4542 ok_seq( button_up_hwnd );
4618 "WaitForSingleObject failed\n");
4635 100, 100, 200, 200, 0, 0, 0,
NULL);
4671 cls.lpszMenuName =
NULL;
4672 cls.lpszClassName =
"TestWindowClass";
4682 win_skip(
"skipping interthread message test under win9x\n");
4693 0, 0, 0, 0, 0, 0, 0,
NULL);
4694 ok(ourWnd!= 0,
"failed to create ourWnd window\n");
4697 0, 0, 0, 0, 0, 0, 0,
NULL);
4698 ok(Wnd2!= 0,
"failed to create Wnd2 window\n");
4816 ok(!
ret,
"AttachThreadInput succeeded\n");
4818 "expected ERROR_INVALID_PARAMETER, got %ld\n",
GetLastError());
4822 ok(!
ret,
"AttachThreadInput succeeded\n");
4824 "expected ERROR_INVALID_PARAMETER, got %ld\n",
GetLastError());
4934#define check_get_keyboard_state(i, j, c, x) check_get_keyboard_state_(i, j, c, x, __LINE__)
4943 ok_(__FILE__,
line)(!(
keystate[
'X'] & 0x80) == !
x,
"%d:%d: expected that X keystate is %s\n",
i,
j,
x ?
"set" :
"unset");
4944 ok_(__FILE__,
line)(!(
keystate[
'C'] & 0x80) == !
c,
"%d:%d: expected that C keystate is %s\n",
i,
j,
c ?
"set" :
"unset");
4950 ok_(__FILE__,
line)(!(
keystate[
'X'] & 0x80) == !
x,
"%d:%d: expected that X keystate is %s\n",
i,
j,
x ?
"set" :
"unset");
4951 ok_(__FILE__,
line)(!(
keystate[
'C'] & 0x80) == !
c,
"%d:%d: expected that C keystate is %s\n",
i,
j,
c ?
"set" :
"unset");
4954#define check_get_key_state(i, j, c, x) check_get_key_state_(i, j, c, x, __LINE__)
4960 ok_(__FILE__,
line)(!(
state & 0x8000) == !
x,
"%d:%d: expected that X highest bit is %s, got %#x\n",
i,
j,
x ?
"set" :
"unset",
state);
4961 ok_(__FILE__,
line)(!(
state & 0x007e),
"%d:%d: expected that X undefined bits are unset, got %#x\n",
i,
j,
state);
4964 ok_(__FILE__,
line)(!(
state & 0x8000) == !
c,
"%d:%d: expected that C highest bit is %s, got %#x\n",
i,
j,
c ?
"set" :
"unset",
state);
4965 ok_(__FILE__,
line)(!(
state & 0x007e),
"%d:%d: expected that C undefined bits are unset, got %#x\n",
i,
j,
state);
4976 BOOL expect_x, expect_c;
4981 has_queue =
test->peek_message ||
test->set_keyboard_state;
4983 if (
test->peek_message)
4989 for (
j = 0;
j < 4; ++
j)
4996 if (
test->set_keyboard_state)
5007 if (
test->set_keyboard_state) expect_x =
TRUE;
5008 else if (!has_queue &&
j == 0) expect_x =
FALSE;
5009 else expect_x =
TRUE;
5011 if (
test->set_keyboard_state) expect_c =
TRUE;
5012 else expect_c =
FALSE;
5037 BOOL expect_x, expect_c;
5045 skip(
"skipping test with inconsistent results on non-us keyboard\n");
5067 for (
j = 0;
j < 4; ++
j)
5084 if (
test->set_keyboard_state_main)
5090 else expect_c =
FALSE;
5098 if (
test->peek_message_main) expect_x =
TRUE;
5099 else expect_x =
FALSE;
5112 if (
test->set_keyboard_state_main)
5151 skip(
"skipping test with inconsistent results on non-us keyboard\n");
5155 for (oem = 0; oem < 0x200; oem++)
5159 oem_char =
LOBYTE( oem );
5164 if (!
OemToCharBuffW( &oem_char, &wchr, 1 ) || (wchr ==
'?' && oem_char < 0))
5187 INPUT_MESSAGE_SOURCE
source;
5190 ok( pGetCurrentInputMessageSource( &
source ),
"GetCurrentInputMessageSource failed\n" );
5219 ok(
source.deviceType == IMDT_UNAVAILABLE,
"%x: wrong deviceType %x\n",
5257 inputs[0].
ki.
wVk = 0;
5259 inputs[0].
ki.
dwFlags = KEYEVENTF_UNICODE;
5260 inputs[1] = inputs[0];
5315 ok(
ret ==
FALSE,
"Unregistering NULL Device Notification returned: %d\n",
ret);
5320 const struct user_call broken_sequence[] =
5332 hwnd =
CreateWindowW(
L"static",
NULL,
WS_POPUP |
WS_VISIBLE, 0, 0, 100, 100,
NULL,
NULL,
NULL,
NULL );
5339 win_skip(
"Spurious keyboard layout changed detected (expected: %p got: %p)\n",
5400 input[0].hi.wParamL = 0;
5401 input[0].hi.wParamH =
'A';
5403 input[1].hi.wParamL = 0;
5404 input[1].hi.wParamH =
'A' | 0xc000;
5417 input[1].ki.dwFlags = 0;
5443#define check_pointer_info( a, b ) check_pointer_info_( __LINE__, a, b )
5470 POINTER_INFO pointer_info;
5475 200, 0, 0,
NULL, 0 );
5477 memset( &pointer_info, 0xcd,
sizeof(pointer_info) );
5478 ret = pGetPointerInfo( 1, &pointer_info );
5479 ok( !
ret,
"GetPointerInfo succeeded\n" );
5489 POINTER_INFO pointer_info[4], expect_pointer;
5490 void *invalid_ptr = (
void *)0xdeadbeef;
5491 UINT32 entry_count, pointer_count;
5492 POINTER_INPUT_TYPE
type;
5498 .lpszClassName =
L"test",
5506 if (!pGetPointerType)
5509 win_skip(
"GetPointerType not found, skipping tests\n" );
5514 ret = pGetPointerType( 1,
NULL );
5515 ok( !
ret,
"GetPointerType succeeded\n" );
5518 ret = pGetPointerType( 0xdead, &
type );
5520 ok( !
ret,
"GetPointerType succeeded\n" );
5523 ret = pGetPointerType( 1, &
type );
5527 if (!pGetPointerInfo)
5530 win_skip(
"GetPointerInfo not found, skipping tests\n" );
5537 ret = pGetPointerInfo( 1, invalid_ptr );
5538 ok( !
ret,
"GetPointerInfo succeeded\n" );
5543 memset( pointer_info, 0xcd,
sizeof(pointer_info) );
5544 ret = pGetPointerInfo( 1, pointer_info );
5545 ok( !
ret,
"GetPointerInfo succeeded\n" );
5551 200, 0, 0,
NULL, 0 );
5554 memset( pointer_info, 0xcd,
sizeof(pointer_info) );
5555 ret = pGetPointerInfo( 1, pointer_info );
5556 ok( !
ret,
"GetPointerInfo succeeded\n" );
5568 memset( pointer_info, 0xcd,
sizeof(pointer_info) );
5569 ret = pGetPointerInfo( 0xdead, pointer_info );
5570 ok( !
ret,
"GetPointerInfo succeeded\n" );
5573 memset( pointer_info, 0xcd,
sizeof(pointer_info) );
5574 ret = pGetPointerInfo( 1, pointer_info );
5576 ok(
ret == mouse_in_pointer_enabled,
"GetPointerInfo failed, error %lu\n",
GetLastError() );
5577 if (!mouse_in_pointer_enabled)
5584 ok( pointer_info[0].pointerType == PT_MOUSE,
"got pointerType %lu\n", pointer_info[0].pointerType );
5586 ok( pointer_info[0].pointerId == 1,
"got pointerId %u\n", pointer_info[0].pointerId );
5587 ok( !!pointer_info[0].frameId,
"got frameId %u\n", pointer_info[0].frameId );
5589 ok( pointer_info[0].pointerFlags == (0x20000 | POINTER_MESSAGE_FLAG_INRANGE | POINTER_MESSAGE_FLAG_PRIMARY),
5590 "got pointerFlags %#x\n", pointer_info[0].pointerFlags );
5593 "got sourceDevice %p\n", pointer_info[0].sourceDevice );
5595 ok( pointer_info[0].hwndTarget ==
hwnd,
"got hwndTarget %p\n", pointer_info[0].hwndTarget );
5596 ok( !!pointer_info[0].ptPixelLocation.x,
"got ptPixelLocation %s\n",
wine_dbgstr_point( &pointer_info[0].ptPixelLocation ) );
5597 ok( !!pointer_info[0].ptPixelLocation.y,
"got ptPixelLocation %s\n",
wine_dbgstr_point( &pointer_info[0].ptPixelLocation ) );
5598 ok( !!pointer_info[0].ptHimetricLocation.x,
"got ptHimetricLocation %s\n",
wine_dbgstr_point( &pointer_info[0].ptHimetricLocation ) );
5599 ok( !!pointer_info[0].ptHimetricLocation.y,
"got ptHimetricLocation %s\n",
wine_dbgstr_point( &pointer_info[0].ptHimetricLocation ) );
5600 ok( !!pointer_info[0].ptPixelLocationRaw.x,
"got ptPixelLocationRaw %s\n",
wine_dbgstr_point( &pointer_info[0].ptPixelLocationRaw ) );
5601 ok( !!pointer_info[0].ptPixelLocationRaw.y,
"got ptPixelLocationRaw %s\n",
wine_dbgstr_point( &pointer_info[0].ptPixelLocationRaw ) );
5602 ok( !!pointer_info[0].ptHimetricLocationRaw.x,
"got ptHimetricLocationRaw %s\n",
wine_dbgstr_point( &pointer_info[0].ptHimetricLocationRaw ) );
5603 ok( !!pointer_info[0].ptHimetricLocationRaw.y,
"got ptHimetricLocationRaw %s\n",
wine_dbgstr_point( &pointer_info[0].ptHimetricLocationRaw ) );
5604 ok( !!pointer_info[0].
dwTime,
"got dwTime %lu\n", pointer_info[0].
dwTime );
5606 ok( pointer_info[0].historyCount == 1,
"got historyCount %u\n", pointer_info[0].historyCount );
5608 ok( pointer_info[0].InputData == 0,
"got InputData %u\n", pointer_info[0].InputData );
5610 ok( pointer_info[0].dwKeyStates == 0,
"got dwKeyStates %lu\n", pointer_info[0].dwKeyStates );
5611 ok( !!pointer_info[0].PerformanceCount,
"got PerformanceCount %I64u\n", pointer_info[0].PerformanceCount );
5613 ok( pointer_info[0].ButtonChangeType == 0,
"got ButtonChangeType %u\n", pointer_info[0].ButtonChangeType );
5619 expect_pointer = pointer_info[0];
5621 memset( pointer_info, 0xa5,
sizeof(pointer_info) );
5622 entry_count = pointer_count = 2;
5623 if (!pGetPointerFrameInfo)
ret =
FALSE;
5624 else ret = pGetPointerFrameInfo( 1, &pointer_count, pointer_info );
5628 ok( pointer_count == 1,
"got pointer_count %u\n", pointer_count );
5631 memset( pointer_info, 0xa5,
sizeof(pointer_info) );
5632 entry_count = pointer_count = 2;
5633 if (!pGetPointerInfoHistory)
ret =
FALSE;
5634 else ret = pGetPointerInfoHistory( 1, &entry_count, pointer_info );
5638 ok( entry_count == 1,
"got entry_count %u\n", entry_count );
5641 memset( pointer_info, 0xa5,
sizeof(pointer_info) );
5642 entry_count = pointer_count = 2;
5643 if (!pGetPointerFrameInfoHistory)
ret =
FALSE;
5644 else ret = pGetPointerFrameInfoHistory( 1, &entry_count, &pointer_count, pointer_info );
5648 ok( entry_count == 1,
"got pointer_count %u\n", pointer_count );
5650 ok( pointer_count == 1,
"got pointer_count %u\n", pointer_count );
5673 ok( !
ret,
"EnableMouseInPointer succeeded\n" );
5676 ret = pIsMouseInPointerEnabled();
5683 ret = pIsMouseInPointerEnabled();
5782 ok( !!tmp_hwnd,
"CreateWindowW failed, error %lu\n",
GetLastError() );
5810 clip_rect = virtual_rect;
5816 clip_rect = virtual_rect;
5834 clip_rect.
right -= 1;
5842 clip_rect.
right += 1;
5884 RECT clip_rect = {50, 50, 51, 51};
5907 ok(
abs( expect_pos.
x -
pos.x ) <= 2,
"got pos %ld\n",
pos.x );
5908 ok(
abs( expect_pos.
y -
pos.y ) <= 2,
"got pos %ld\n",
pos.y );
5915 ok(
abs( expect_pos.
x -
pos.x ) <= 2,
"got pos %ld\n",
pos.x );
5916 ok(
abs( expect_pos.
y -
pos.y ) <= 2,
"got pos %ld\n",
pos.y );
5934 ok(
abs( expect_pos.
x -
pos.x ) <= 2,
"got pos %ld\n",
pos.x );
5936 ok(
abs( expect_pos.
x -
pos.x ) <= 1,
"got pos %ld\n",
pos.x );
5940 expect_pos.
x = expect_pos.
y = 50;
5983 expect_pos.
x = expect_pos.
y = 49;
5987 expect_pos.
x = expect_pos.
y = 50;
5991 expect_pos.
x = expect_pos.
y = 49;
5995 expect_pos.
x = expect_pos.
y = 50;
5999 expect_pos.
x = expect_pos.
y = 49;
6060 hwnd =
CreateWindowW(
L"static",
NULL,
WS_POPUP |
WS_VISIBLE, 0, 0, 100, 100,
NULL,
NULL,
NULL,
NULL );
6080 static const WCHAR test_layout_name[] =
L"00000429";
6081 static const HKL test_hkl = (
HKL)0x04290429;
6083 HKL *new_layouts, *layouts, old_hkl,
hkl;
6085 WCHAR layout_name[64];
6093 if (orig_hkl != old_hkl)
6095 win_skip(
"Spurious keyboard layout changed detected (expected: %p got: %p)\n",
6096 orig_hkl, old_hkl );
6100 hkl = pLoadKeyboardLayoutEx(
NULL, test_layout_name, 0 );
6104 for (
i = 0;
i <
len;
i++)
if (layouts[
i] == test_hkl)
break;
6107 skip(
"Test HKL is already loaded, skipping tests\n" );
6122 skip(
"Failed to find appropriate layouts, skipping tests\n" );
6127 trace(
"using layouts %p / %p\n", layouts[
i], layouts[
j] );
6134 hkl = pLoadKeyboardLayoutEx( layouts[
i], test_layout_name, 0 );
6140 ok_eq( test_hkl, new_layouts[
i],
HKL,
"%p" );
6141 new_layouts[
i] = layouts[
i];
6142 ok( !
memcmp( new_layouts, layouts,
len *
sizeof(*layouts) ),
"keyboard layouts changed\n" );
6143 free( new_layouts );
6145 hkl = pLoadKeyboardLayoutEx( test_hkl, layout_name, 0 );
6149 ok( !
memcmp( new_layouts, layouts,
len *
sizeof(*layouts) ),
"keyboard layouts changed\n" );
6150 free( new_layouts );
6152 if (
j ==
i)
skip(
"Only one layout found, skipping tests\n" );
6159 hkl = pLoadKeyboardLayoutEx( layouts[
i], test_layout_name, 0 );
6165 ok_eq( test_hkl, new_layouts[
i],
HKL,
"%p" );
6166 new_layouts[
i] = layouts[
i];
6167 ok( !
memcmp( new_layouts, layouts,
len *
sizeof(*layouts) ),
"keyboard layouts changed\n" );
6168 free( new_layouts );
6170 hkl = pLoadKeyboardLayoutEx( test_hkl, layout_name, 0 );
6174 ok( !
memcmp( new_layouts, layouts,
len *
sizeof(*layouts) ),
"keyboard layouts changed\n" );
6175 free( new_layouts );
6188 WCHAR wch, wch_shift;
6215 const CHAR *layout_name;
6228 layout_name =
"00000804";
6230 layout_name =
"00000411";
6232 layout_name =
"00000412";
6249 skip(
"The user32:input tests causes persistent input issues on WS03!\n");
6256 if (
argc >= 3 && !
strcmp(
argv[2],
"test_GetMouseMovePointsEx_process" ))
6258 if (
argc >= 4 && !
strcmp(
argv[2],
"test_EnableMouseInPointer" ))
6285 if(pGetMouseMovePointsEx)
6288 win_skip(
"GetMouseMovePointsEx is not available\n");
6290 if(pGetRawInputDeviceList)
6293 win_skip(
"GetRawInputDeviceList is not available\n");
6295 if (pGetCurrentInputMessageSource)
6298 win_skip(
"GetCurrentInputMessageSource is not available\n");
6302 if (pGetPointerType)
6305 win_skip(
"GetPointerType is not available\n" );
6309 if (!pEnableMouseInPointer)
6310 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 WINSTA_ALL_ACCESS
#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::@1876::@1879 ll_hook_kbd
struct user_call::@1876::@1880 ll_hook_ms
struct user_call::@1876::@1881 raw_input
struct user_call::@1876::@1878 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 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)