Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
84a80215
Commit
84a80215
authored
Oct 23, 2013
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Oct 23, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/tests: Fix input tests compilation with __WINESRC__ defined.
parent
f237d5ee
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
21 deletions
+21
-21
input.c
dlls/user32/tests/input.c
+21
-21
No files found.
dlls/user32/tests/input.c
View file @
84a80215
...
...
@@ -246,7 +246,7 @@ static BOOL do_test( HWND hwnd, int seqnr, const KEV td[] )
if
(
winetest_debug
>
1
)
trace
(
"======== key stroke sequence #%d: %s =============
\n
"
,
seqnr
+
1
,
buf
);
while
(
PeekMessage
(
&
msg
,
hwnd
,
WM_KEYFIRST
,
WM_KEYLAST
,
PM_REMOVE
)
)
{
while
(
PeekMessage
A
(
&
msg
,
hwnd
,
WM_KEYFIRST
,
WM_KEYLAST
,
PM_REMOVE
)
)
{
if
(
winetest_debug
>
1
)
trace
(
"message[%d] %-15s wParam %04lx lParam %08lx time %x
\n
"
,
i
,
MSGNAME
[
msg
.
message
-
WM_KEYFIRST
],
msg
.
wParam
,
msg
.
lParam
,
msg
.
time
);
...
...
@@ -344,8 +344,8 @@ static void test_Input_whitebox(void)
wclass
.
style
=
CS_HREDRAW
|
CS_VREDRAW
;
wclass
.
lpfnWndProc
=
WndProc
;
wclass
.
hInstance
=
hInstance
;
wclass
.
hIcon
=
LoadIconA
(
0
,
IDI_APPLICATION
);
wclass
.
hCursor
=
LoadCursorA
(
NULL
,
IDC_ARROW
);
wclass
.
hIcon
=
LoadIconA
(
0
,
(
LPCSTR
)
IDI_APPLICATION
);
wclass
.
hCursor
=
LoadCursorA
(
NULL
,
(
LPCSTR
)
IDC_ARROW
);
wclass
.
hbrBackground
=
(
HBRUSH
)(
COLOR_WINDOW
+
1
);
wclass
.
lpszMenuName
=
0
;
wclass
.
cbClsExtra
=
0
;
...
...
@@ -362,7 +362,7 @@ static void test_Input_whitebox(void)
UpdateWindow
(
hWndTest
);
/* flush pending messages */
while
(
PeekMessage
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
))
DispatchMessageA
(
&
msg
);
while
(
PeekMessage
A
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
))
DispatchMessageA
(
&
msg
);
SetFocus
(
hWndTest
);
TestSysKeys
(
hWndTest
);
...
...
@@ -390,13 +390,13 @@ static void empty_message_queue(void)
while
(
diff
>
0
)
{
if
(
MsgWaitForMultipleObjects
(
0
,
NULL
,
FALSE
,
min_timeout
,
QS_ALLINPUT
)
==
WAIT_TIMEOUT
)
break
;
while
(
PeekMessage
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
))
while
(
PeekMessage
A
(
&
msg
,
0
,
0
,
0
,
PM_REMOVE
))
{
if
(
is_keyboard_message
(
msg
.
message
)
||
is_mouse_message
(
msg
.
message
))
ok
(
msg
.
time
!=
0
,
"message %#x has time set to 0
\n
"
,
msg
.
message
);
TranslateMessage
(
&
msg
);
DispatchMessage
(
&
msg
);
DispatchMessage
A
(
&
msg
);
}
diff
=
time
-
GetTickCount
();
}
...
...
@@ -865,7 +865,7 @@ static LRESULT CALLBACK WndProc2(HWND hWnd, UINT Msg, WPARAM wParam,
sent_messages
[
sent_messages_cnt
++
].
lParam
=
HIWORD
(
lParam
)
&
(
KF_UP
|
KF_EXTENDED
);
}
}
return
DefWindowProc
(
hWnd
,
Msg
,
wParam
,
lParam
);
return
DefWindowProc
A
(
hWnd
,
Msg
,
wParam
,
lParam
);
}
static
LRESULT
CALLBACK
hook_proc
(
int
code
,
WPARAM
wparam
,
LPARAM
lparam
)
...
...
@@ -911,7 +911,7 @@ static void test_Input_blackbox(void)
skip
(
"Skipping Input_blackbox test on non-US keyboard
\n
"
);
return
;
}
window
=
CreateWindow
(
"Static"
,
NULL
,
WS_POPUP
|
WS_HSCROLL
|
WS_VSCROLL
window
=
CreateWindow
A
(
"Static"
,
NULL
,
WS_POPUP
|
WS_HSCROLL
|
WS_VSCROLL
|
WS_VISIBLE
,
0
,
0
,
200
,
60
,
NULL
,
NULL
,
NULL
,
NULL
);
ok
(
window
!=
NULL
,
"error: %d
\n
"
,
(
int
)
GetLastError
());
...
...
@@ -929,7 +929,7 @@ static void test_Input_blackbox(void)
* key state set by SendInput(). */
empty_message_queue
();
prevWndProc
=
SetWindowLongPtr
(
window
,
GWLP_WNDPROC
,
(
LONG_PTR
)
WndProc2
);
prevWndProc
=
SetWindowLongPtr
A
(
window
,
GWLP_WNDPROC
,
(
LONG_PTR
)
WndProc2
);
ok
(
prevWndProc
!=
0
||
(
prevWndProc
==
0
&&
GetLastError
()
==
0
),
"error: %d
\n
"
,
(
int
)
GetLastError
());
...
...
@@ -1160,8 +1160,8 @@ static void test_Input_unicode(void)
wclass
.
style
=
CS_HREDRAW
|
CS_VREDRAW
;
wclass
.
lpfnWndProc
=
unicode_wnd_proc
;
wclass
.
hInstance
=
hInstance
;
wclass
.
hIcon
=
LoadIcon
(
0
,
IDI_APPLICATION
);
wclass
.
hCursor
=
LoadCursor
(
NULL
,
IDC_ARROW
);
wclass
.
hIcon
=
LoadIcon
W
(
0
,
(
LPCWSTR
)
IDI_APPLICATION
);
wclass
.
hCursor
=
LoadCursor
W
(
NULL
,
(
LPCWSTR
)
IDC_ARROW
);
wclass
.
hbrBackground
=
(
HBRUSH
)(
COLOR_WINDOW
+
1
);
wclass
.
lpszMenuName
=
0
;
wclass
.
cbClsExtra
=
0
;
...
...
@@ -1280,7 +1280,7 @@ static void test_mouse_ll_hook(void)
RECT
rc
;
GetCursorPos
(
&
pt_org
);
hwnd
=
CreateWindow
(
"static"
,
"Title"
,
WS_OVERLAPPEDWINDOW
|
WS_VISIBLE
,
hwnd
=
CreateWindow
A
(
"static"
,
"Title"
,
WS_OVERLAPPEDWINDOW
|
WS_VISIBLE
,
10
,
10
,
200
,
200
,
NULL
,
NULL
,
NULL
,
NULL
);
SetCursorPos
(
100
,
100
);
...
...
@@ -1503,34 +1503,34 @@ static void test_key_map(void)
{
VK_NUMPAD9
,
VK_PRIOR
},
};
s
=
MapVirtualKeyEx
(
VK_SHIFT
,
MAPVK_VK_TO_VSC
,
kl
);
s
=
MapVirtualKeyEx
A
(
VK_SHIFT
,
MAPVK_VK_TO_VSC
,
kl
);
ok
(
s
!=
0
,
"MapVirtualKeyEx(VK_SHIFT) should return non-zero
\n
"
);
sL
=
MapVirtualKeyEx
(
VK_LSHIFT
,
MAPVK_VK_TO_VSC
,
kl
);
sL
=
MapVirtualKeyEx
A
(
VK_LSHIFT
,
MAPVK_VK_TO_VSC
,
kl
);
ok
(
s
==
sL
||
broken
(
sL
==
0
),
/* win9x */
"%x != %x
\n
"
,
s
,
sL
);
kL
=
MapVirtualKeyEx
(
0x2a
,
MAPVK_VSC_TO_VK
,
kl
);
kL
=
MapVirtualKeyEx
A
(
0x2a
,
MAPVK_VSC_TO_VK
,
kl
);
ok
(
kL
==
VK_SHIFT
,
"Scan code -> vKey = %x (not VK_SHIFT)
\n
"
,
kL
);
kR
=
MapVirtualKeyEx
(
0x36
,
MAPVK_VSC_TO_VK
,
kl
);
kR
=
MapVirtualKeyEx
A
(
0x36
,
MAPVK_VSC_TO_VK
,
kl
);
ok
(
kR
==
VK_SHIFT
,
"Scan code -> vKey = %x (not VK_SHIFT)
\n
"
,
kR
);
kL
=
MapVirtualKeyEx
(
0x2a
,
MAPVK_VSC_TO_VK_EX
,
kl
);
kL
=
MapVirtualKeyEx
A
(
0x2a
,
MAPVK_VSC_TO_VK_EX
,
kl
);
ok
(
kL
==
VK_LSHIFT
||
broken
(
kL
==
0
),
/* win9x */
"Scan code -> vKey = %x (not VK_LSHIFT)
\n
"
,
kL
);
kR
=
MapVirtualKeyEx
(
0x36
,
MAPVK_VSC_TO_VK_EX
,
kl
);
kR
=
MapVirtualKeyEx
A
(
0x36
,
MAPVK_VSC_TO_VK_EX
,
kl
);
ok
(
kR
==
VK_RSHIFT
||
broken
(
kR
==
0
),
/* win9x */
"Scan code -> vKey = %x (not VK_RSHIFT)
\n
"
,
kR
);
/* test that MAPVK_VSC_TO_VK prefers the non-numpad vkey if there's ambiguity */
for
(
i
=
0
;
i
<
sizeof
(
numpad_collisions
)
/
sizeof
(
numpad_collisions
[
0
]);
i
++
)
{
UINT
numpad_scan
=
MapVirtualKeyEx
(
numpad_collisions
[
i
][
0
],
MAPVK_VK_TO_VSC
,
kl
);
UINT
other_scan
=
MapVirtualKeyEx
(
numpad_collisions
[
i
][
1
],
MAPVK_VK_TO_VSC
,
kl
);
UINT
numpad_scan
=
MapVirtualKeyEx
A
(
numpad_collisions
[
i
][
0
],
MAPVK_VK_TO_VSC
,
kl
);
UINT
other_scan
=
MapVirtualKeyEx
A
(
numpad_collisions
[
i
][
1
],
MAPVK_VK_TO_VSC
,
kl
);
/* do they really collide for this layout? */
if
(
numpad_scan
&&
other_scan
==
numpad_scan
)
{
UINT
vkey
=
MapVirtualKeyEx
(
numpad_scan
,
MAPVK_VSC_TO_VK
,
kl
);
UINT
vkey
=
MapVirtualKeyEx
A
(
numpad_scan
,
MAPVK_VSC_TO_VK
,
kl
);
ok
(
vkey
!=
numpad_collisions
[
i
][
0
],
"Got numpad vKey %x for scan code %x when there was another choice
\n
"
,
vkey
,
numpad_scan
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment