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
ff166bac
Commit
ff166bac
authored
May 15, 2022
by
Zebediah Figura
Committed by
Alexandre Julliard
Jun 30, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Merge rawinput.c into input.c.
parent
0a930890
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
89 deletions
+49
-89
Makefile.in
dlls/user32/Makefile.in
+0
-1
input.c
dlls/user32/input.c
+49
-0
rawinput.c
dlls/user32/rawinput.c
+0
-88
No files found.
dlls/user32/Makefile.in
View file @
ff166bac
...
...
@@ -34,7 +34,6 @@ C_SRCS = \
nonclient.c
\
painting.c
\
property.c
\
rawinput.c
\
resource.c
\
scroll.c
\
static.c
\
...
...
dlls/user32/input.c
View file @
ff166bac
...
...
@@ -6,6 +6,8 @@
* Copyright 1997 David Faure
* Copyright 1998 Morten Welinder
* Copyright 1998 Ulrich Weigand
* Copyright 2012 Henri Verbeet
* Copyright 2018 Zebediah Figura for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
...
...
@@ -623,3 +625,50 @@ BOOL WINAPI UnregisterDeviceNotification( HDEVNOTIFY handle )
return
I_ScUnregisterDeviceNotification
(
handle
);
}
/***********************************************************************
* GetRawInputDeviceInfoA (USER32.@)
*/
UINT
WINAPI
GetRawInputDeviceInfoA
(
HANDLE
device
,
UINT
command
,
void
*
data
,
UINT
*
size
)
{
TRACE
(
"device %p, command %#x, data %p, size %p.
\n
"
,
device
,
command
,
data
,
size
);
/* RIDI_DEVICENAME size is in chars, not bytes */
if
(
command
==
RIDI_DEVICENAME
)
{
WCHAR
*
nameW
;
UINT
ret
,
sizeW
;
if
(
!
size
)
return
~
0U
;
sizeW
=
*
size
;
if
(
data
&&
sizeW
>
0
)
nameW
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
WCHAR
)
*
sizeW
);
else
nameW
=
NULL
;
ret
=
NtUserGetRawInputDeviceInfo
(
device
,
command
,
nameW
,
&
sizeW
);
if
(
ret
&&
ret
!=
~
0U
)
WideCharToMultiByte
(
CP_ACP
,
0
,
nameW
,
-
1
,
data
,
*
size
,
NULL
,
NULL
);
*
size
=
sizeW
;
HeapFree
(
GetProcessHeap
(),
0
,
nameW
);
return
ret
;
}
return
NtUserGetRawInputDeviceInfo
(
device
,
command
,
data
,
size
);
}
/***********************************************************************
* DefRawInputProc (USER32.@)
*/
LRESULT
WINAPI
DefRawInputProc
(
RAWINPUT
**
data
,
INT
data_count
,
UINT
header_size
)
{
FIXME
(
"data %p, data_count %d, header_size %u stub!
\n
"
,
data
,
data_count
,
header_size
);
return
0
;
}
dlls/user32/rawinput.c
deleted
100644 → 0
View file @
0a930890
/*
* Raw Input
*
* Copyright 2012 Henri Verbeet
* Copyright 2018 Zebediah Figura for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdarg.h>
#include "ntstatus.h"
#define WIN32_NO_STATUS
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "winioctl.h"
#include "winnls.h"
#include "winreg.h"
#include "winuser.h"
#include "ddk/hidclass.h"
#include "wine/debug.h"
#include "wine/server.h"
#include "wine/hid.h"
#include "user_private.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
rawinput
);
/***********************************************************************
* GetRawInputDeviceInfoA (USER32.@)
*/
UINT
WINAPI
GetRawInputDeviceInfoA
(
HANDLE
device
,
UINT
command
,
void
*
data
,
UINT
*
data_size
)
{
TRACE
(
"device %p, command %#x, data %p, data_size %p.
\n
"
,
device
,
command
,
data
,
data_size
);
/* RIDI_DEVICENAME data_size is in chars, not bytes */
if
(
command
==
RIDI_DEVICENAME
)
{
WCHAR
*
nameW
;
UINT
ret
,
nameW_sz
;
if
(
!
data_size
)
return
~
0U
;
nameW_sz
=
*
data_size
;
if
(
data
&&
nameW_sz
>
0
)
nameW
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
WCHAR
)
*
nameW_sz
);
else
nameW
=
NULL
;
ret
=
NtUserGetRawInputDeviceInfo
(
device
,
command
,
nameW
,
&
nameW_sz
);
if
(
ret
&&
ret
!=
~
0U
)
WideCharToMultiByte
(
CP_ACP
,
0
,
nameW
,
-
1
,
data
,
*
data_size
,
NULL
,
NULL
);
*
data_size
=
nameW_sz
;
HeapFree
(
GetProcessHeap
(),
0
,
nameW
);
return
ret
;
}
return
NtUserGetRawInputDeviceInfo
(
device
,
command
,
data
,
data_size
);
}
/***********************************************************************
* DefRawInputProc (USER32.@)
*/
LRESULT
WINAPI
DefRawInputProc
(
RAWINPUT
**
data
,
INT
data_count
,
UINT
header_size
)
{
FIXME
(
"data %p, data_count %d, header_size %u stub!
\n
"
,
data
,
data_count
,
header_size
);
return
0
;
}
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