Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
0a930890
Commit
0a930890
authored
May 15, 2022
by
Zebediah Figura
Committed by
Alexandre Julliard
Jun 30, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u: Move raw input device list management from user32.
parent
cbbab655
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
68 additions
and
17 deletions
+68
-17
rawinput.c
dlls/user32/rawinput.c
+0
-0
user32.spec
dlls/user32/user32.spec
+2
-2
user_main.c
dlls/user32/user_main.c
+0
-2
user_private.h
dlls/user32/user_private.h
+0
-6
message.c
dlls/win32u/message.c
+2
-3
ntuser_private.h
dlls/win32u/ntuser_private.h
+0
-2
rawinput.c
dlls/win32u/rawinput.c
+0
-0
syscall.c
dlls/win32u/syscall.c
+2
-0
win32u.spec
dlls/win32u/win32u.spec
+2
-2
win32u_private.h
dlls/win32u/win32u_private.h
+1
-0
syscall.h
dlls/wow64win/syscall.h
+2
-0
user.c
dlls/wow64win/user.c
+55
-0
ntuser.h
include/ntuser.h
+2
-0
No files found.
dlls/user32/rawinput.c
View file @
0a930890
This diff is collapsed.
Click to expand it.
dlls/user32/user32.spec
View file @
0a930890
...
...
@@ -369,8 +369,8 @@
@ stdcall GetRawInputBuffer(ptr ptr long) NtUserGetRawInputBuffer
@ stdcall GetRawInputData(ptr long ptr ptr long) NtUserGetRawInputData
@ stdcall GetRawInputDeviceInfoA(ptr long ptr ptr)
@ stdcall GetRawInputDeviceInfoW(ptr long ptr ptr)
@ stdcall GetRawInputDeviceList(ptr ptr long)
@ stdcall GetRawInputDeviceInfoW(ptr long ptr ptr)
NtUserGetRawInputDeviceInfo
@ stdcall GetRawInputDeviceList(ptr ptr long)
NtUserGetRawInputDeviceList
# @ stub GetReasonTitleFromReasonCode
@ stdcall GetRegisteredRawInputDevices(ptr ptr long) NtUserGetRegisteredRawInputDevices
@ stdcall GetScrollBarInfo(long long ptr)
...
...
dlls/user32/user_main.c
View file @
0a930890
...
...
@@ -161,8 +161,6 @@ static const struct user_callbacks user_funcs =
free_win_ptr
,
notify_ime
,
post_dde_message
,
rawinput_update_device_list
,
rawinput_device_get_usages
,
SCROLL_SetStandardScrollPainted
,
unpack_dde_message
,
register_imm
,
...
...
dlls/user32/user_private.h
View file @
0a930890
...
...
@@ -60,14 +60,8 @@ extern HMODULE user32_module DECLSPEC_HIDDEN;
struct
dce
;
struct
tagWND
;
struct
hardware_msg_data
;
extern
BOOL
rawinput_device_get_usages
(
HANDLE
handle
,
USAGE
*
usage_page
,
USAGE
*
usage
);
extern
void
CDECL
rawinput_update_device_list
(
void
);
extern
BOOL
post_dde_message
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
,
DWORD
dest_tid
,
DWORD
type
)
DECLSPEC_HIDDEN
;
extern
BOOL
process_rawinput_message
(
MSG
*
msg
,
UINT
hw_id
,
const
struct
hardware_msg_data
*
msg_data
)
DECLSPEC_HIDDEN
;
extern
BOOL
unpack_dde_message
(
HWND
hwnd
,
UINT
message
,
WPARAM
*
wparam
,
LPARAM
*
lparam
,
void
**
buffer
,
size_t
size
)
DECLSPEC_HIDDEN
;
extern
void
free_cached_data
(
UINT
format
,
HANDLE
handle
)
DECLSPEC_HIDDEN
;
...
...
dlls/win32u/message.c
View file @
0a930890
...
...
@@ -2381,9 +2381,8 @@ NTSTATUS send_hardware_message( HWND hwnd, const INPUT *input, const RAWINPUT *r
hid_usage_page
=
((
USAGE
*
)
rawinput
->
data
.
hid
.
bRawData
)[
0
];
hid_usage
=
((
USAGE
*
)
rawinput
->
data
.
hid
.
bRawData
)[
1
];
}
if
(
input
->
hi
.
uMsg
==
WM_INPUT
&&
user_callbacks
&&
!
user_callbacks
->
rawinput_device_get_usages
(
rawinput
->
header
.
hDevice
,
&
hid_usage_page
,
&
hid_usage
))
if
(
input
->
hi
.
uMsg
==
WM_INPUT
&&
!
rawinput_device_get_usages
(
rawinput
->
header
.
hDevice
,
&
hid_usage_page
,
&
hid_usage
))
{
WARN
(
"unable to get HID usages for device %p
\n
"
,
rawinput
->
header
.
hDevice
);
return
STATUS_INVALID_HANDLE
;
...
...
dlls/win32u/ntuser_private.h
View file @
0a930890
...
...
@@ -40,8 +40,6 @@ struct user_callbacks
void
(
CDECL
*
notify_ime
)(
HWND
hwnd
,
UINT
param
);
BOOL
(
CDECL
*
post_dde_message
)(
HWND
hwnd
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
,
DWORD
dest_tid
,
DWORD
type
);
void
(
CDECL
*
rawinput_update_device_list
)(
void
);
BOOL
(
CDECL
*
rawinput_device_get_usages
)(
HANDLE
handle
,
USHORT
*
usage_page
,
USHORT
*
usage
);
void
(
WINAPI
*
set_standard_scroll_painted
)(
HWND
hwnd
,
INT
bar
,
BOOL
visible
);
BOOL
(
CDECL
*
unpack_dde_message
)(
HWND
hwnd
,
UINT
message
,
WPARAM
*
wparam
,
LPARAM
*
lparam
,
void
**
buffer
,
size_t
size
);
...
...
dlls/win32u/rawinput.c
View file @
0a930890
This diff is collapsed.
Click to expand it.
dlls/win32u/syscall.c
View file @
0a930890
...
...
@@ -147,6 +147,8 @@ static void * const syscalls[] =
NtUserGetProp
,
NtUserGetRawInputBuffer
,
NtUserGetRawInputData
,
NtUserGetRawInputDeviceInfo
,
NtUserGetRawInputDeviceList
,
NtUserGetRegisteredRawInputDevices
,
NtUserGetSystemDpiForProcess
,
NtUserGetThreadDesktop
,
...
...
dlls/win32u/win32u.spec
View file @
0a930890
...
...
@@ -985,8 +985,8 @@
@ stub NtUserGetQueueStatusReadonly
@ stdcall -syscall NtUserGetRawInputBuffer(ptr ptr long)
@ stdcall -syscall NtUserGetRawInputData(ptr long ptr ptr long)
@ st
ub NtUserGetRawInputDeviceInfo
@ st
ub NtUserGetRawInputDeviceList
@ st
dcall -syscall NtUserGetRawInputDeviceInfo(ptr long ptr ptr)
@ st
dcall -syscall NtUserGetRawInputDeviceList(ptr ptr long)
@ stub NtUserGetRawPointerDeviceData
@ stdcall -syscall NtUserGetRegisteredRawInputDevices(ptr ptr long)
@ stub NtUserGetRequiredCursorSizes
...
...
dlls/win32u/win32u_private.h
View file @
0a930890
...
...
@@ -437,6 +437,7 @@ extern LRESULT send_message_timeout( HWND hwnd, UINT msg, WPARAM wparam, LPARAM
/* rawinput.c */
extern
BOOL
process_rawinput_message
(
MSG
*
msg
,
UINT
hw_id
,
const
struct
hardware_msg_data
*
msg_data
)
DECLSPEC_HIDDEN
;
extern
BOOL
rawinput_device_get_usages
(
HANDLE
handle
,
USHORT
*
usage_page
,
USHORT
*
usage
)
DECLSPEC_HIDDEN
;
/* sysparams.c */
extern
BOOL
enable_thunk_lock
DECLSPEC_HIDDEN
;
...
...
dlls/wow64win/syscall.h
View file @
0a930890
...
...
@@ -134,6 +134,8 @@
SYSCALL_ENTRY( NtUserGetProp ) \
SYSCALL_ENTRY( NtUserGetRawInputBuffer ) \
SYSCALL_ENTRY( NtUserGetRawInputData ) \
SYSCALL_ENTRY( NtUserGetRawInputDeviceInfo ) \
SYSCALL_ENTRY( NtUserGetRawInputDeviceList ) \
SYSCALL_ENTRY( NtUserGetRegisteredRawInputDevices ) \
SYSCALL_ENTRY( NtUserGetSystemDpiForProcess ) \
SYSCALL_ENTRY( NtUserGetThreadDesktop ) \
...
...
dlls/wow64win/user.c
View file @
0a930890
...
...
@@ -72,6 +72,12 @@ typedef struct
UINT32
hwndTarget
;
}
RAWINPUTDEVICE32
;
typedef
struct
{
UINT32
hDevice
;
DWORD
dwType
;
}
RAWINPUTDEVICELIST32
;
static
MSG
*
msg_32to64
(
MSG
*
msg
,
MSG32
*
msg32
)
{
if
(
!
msg32
)
return
NULL
;
...
...
@@ -1056,3 +1062,52 @@ NTSTATUS WINAPI wow64_NtUserGetRegisteredRawInputDevices( UINT *args )
return
NtUserGetRegisteredRawInputDevices
(
NULL
,
count
,
sizeof
(
RAWINPUTDEVICE
)
);
}
}
NTSTATUS
WINAPI
wow64_NtUserGetRawInputDeviceInfo
(
UINT
*
args
)
{
HANDLE
handle
=
get_handle
(
&
args
);
UINT
command
=
get_ulong
(
&
args
);
void
*
data
=
get_ptr
(
&
args
);
UINT
*
data_size
=
get_ptr
(
&
args
);
return
NtUserGetRawInputDeviceInfo
(
handle
,
command
,
data
,
data_size
);
}
NTSTATUS
WINAPI
wow64_NtUserGetRawInputDeviceList
(
UINT
*
args
)
{
RAWINPUTDEVICELIST32
*
devices32
=
get_ptr
(
&
args
);
UINT
*
count
=
get_ptr
(
&
args
);
UINT
size
=
get_ulong
(
&
args
);
if
(
size
!=
sizeof
(
RAWINPUTDEVICELIST32
))
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
~
0u
;
}
if
(
devices32
)
{
RAWINPUTDEVICELIST
*
devices64
;
unsigned
int
ret
,
i
;
if
(
!
(
devices64
=
Wow64AllocateTemp
(
(
*
count
)
*
sizeof
(
*
devices64
)
)))
{
SetLastError
(
ERROR_NOT_ENOUGH_MEMORY
);
return
~
0u
;
}
ret
=
NtUserGetRawInputDeviceList
(
devices64
,
count
,
sizeof
(
RAWINPUTDEVICELIST
)
);
if
(
ret
==
~
0u
)
return
ret
;
for
(
i
=
0
;
i
<
*
count
;
++
i
)
{
devices32
[
i
].
hDevice
=
(
UINT_PTR
)
devices64
[
i
].
hDevice
;
devices32
[
i
].
dwType
=
devices64
[
i
].
dwType
;
}
return
ret
;
}
else
{
return
NtUserGetRawInputDeviceList
(
NULL
,
count
,
sizeof
(
RAWINPUTDEVICELIST
)
);
}
}
include/ntuser.h
View file @
0a930890
...
...
@@ -621,6 +621,8 @@ ULONG WINAPI NtUserGetProcessDpiAwarenessContext( HANDLE process );
DWORD
WINAPI
NtUserGetQueueStatus
(
UINT
flags
);
UINT
WINAPI
NtUserGetRawInputBuffer
(
RAWINPUT
*
data
,
UINT
*
data_size
,
UINT
header_size
);
UINT
WINAPI
NtUserGetRawInputData
(
HRAWINPUT
rawinput
,
UINT
command
,
void
*
data
,
UINT
*
data_size
,
UINT
header_size
);
UINT
WINAPI
NtUserGetRawInputDeviceInfo
(
HANDLE
handle
,
UINT
command
,
void
*
data
,
UINT
*
data_size
);
UINT
WINAPI
NtUserGetRawInputDeviceList
(
RAWINPUTDEVICELIST
*
devices
,
UINT
*
device_count
,
UINT
size
);
UINT
WINAPI
NtUserGetRegisteredRawInputDevices
(
RAWINPUTDEVICE
*
devices
,
UINT
*
device_count
,
UINT
size
);
ULONG
WINAPI
NtUserGetSystemDpiForProcess
(
HANDLE
process
);
HMENU
WINAPI
NtUserGetSystemMenu
(
HWND
hwnd
,
BOOL
revert
);
...
...
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