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
1e1599d9
Commit
1e1599d9
authored
Jun 30, 2015
by
Aric Stewart
Committed by
Alexandre Julliard
Jul 01, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hid: Implement HidP_GetCaps.
parent
b75d7f06
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
127 additions
and
1 deletion
+127
-1
Makefile.in
dlls/hid/Makefile.in
+1
-0
hid.spec
dlls/hid/hid.spec
+1
-1
hidp.c
dlls/hid/hidp.c
+53
-0
parse.h
dlls/hid/parse.h
+72
-0
No files found.
dlls/hid/Makefile.in
View file @
1e1599d9
...
...
@@ -3,6 +3,7 @@ IMPORTLIB = hid
C_SRCS
=
\
hidd.c
\
hidp.c
\
main.c
RC_SRCS
=
version.rc
dlls/hid/hid.spec
View file @
1e1599d9
...
...
@@ -19,7 +19,7 @@
@ stub HidD_SetNumInputBuffers
@ stub HidD_SetOutputReport
@ stub HidP_GetButtonCaps
@ st
ub HidP_GetCaps
@ st
dcall HidP_GetCaps(ptr ptr)
@ stub HidP_GetData
@ stub HidP_GetExtendedAttributes
@ stub HidP_GetLinkCollectionNodes
...
...
dlls/hid/hidp.c
0 → 100644
View file @
1e1599d9
/*
* Human Input Devices
*
* Copyright (C) 2015 Aric Stewart
*
* 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 "config.h"
#include <stdarg.h>
#define NONAMELESSUNION
#define WIN32_NO_STATUS
#include "windef.h"
#include "winbase.h"
#include "winternl.h"
#include "winioctl.h"
#include "ddk/wdm.h"
#include "hidusage.h"
#include "ddk/hidpi.h"
#include "parse.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
hidp
);
NTSTATUS
WINAPI
HidP_GetCaps
(
PHIDP_PREPARSED_DATA
PreparsedData
,
PHIDP_CAPS
Capabilities
)
{
PWINE_HIDP_PREPARSED_DATA
data
=
(
PWINE_HIDP_PREPARSED_DATA
)
PreparsedData
;
TRACE
(
"(%p, %p)
\n
"
,
PreparsedData
,
Capabilities
);
if
(
data
->
magic
!=
HID_MAGIC
)
return
HIDP_STATUS_INVALID_PREPARSED_DATA
;
*
Capabilities
=
data
->
caps
;
return
HIDP_STATUS_SUCCESS
;
}
dlls/hid/parse.h
0 → 100644
View file @
1e1599d9
/*
* Internal HID structures
*
* Copyright 2015 Aric Stewart
*
* 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
*/
#ifndef __HID_PARSE_H
#define __HID_PARSE_H
#define HID_MAGIC 0x8491759
typedef
enum
{
UnknownElement
=
0
,
ButtonElement
,
ValueElement
,
}
WINE_ELEMENT_TYPE
;
typedef
struct
{
WINE_ELEMENT_TYPE
ElementType
;
UINT
valueStartBit
;
UINT
bitCount
;
union
{
HIDP_VALUE_CAPS
value
;
HIDP_BUTTON_CAPS
button
;
}
caps
;
}
WINE_HID_ELEMENT
;
typedef
struct
{
UCHAR
reportID
;
DWORD
dwSize
;
DWORD
elementCount
;
WINE_HID_ELEMENT
Elements
[
1
];
}
WINE_HID_REPORT
;
typedef
struct
{
DWORD
magic
;
DWORD
dwSize
;
HIDP_CAPS
caps
;
DWORD
dwInputReportCount
;
DWORD
dwOutputReportCount
;
DWORD
dwFeatureReportCount
;
DWORD
dwOutputReportOffset
;
DWORD
dwFeatureReportOffset
;
WINE_HID_REPORT
InputReports
[
1
];
}
WINE_HIDP_PREPARSED_DATA
,
*
PWINE_HIDP_PREPARSED_DATA
;
#define HID_NEXT_REPORT(d,r) ((r)?(WINE_HID_REPORT*)(((BYTE*)(r))+(r)->dwSize):(d)->InputReports)
#define HID_INPUT_REPORTS(d) ((d)->InputReports)
#define HID_OUTPUT_REPORTS(d) ((WINE_HID_REPORT*)(((BYTE*)(d)->InputReports)+(d)->dwOutputReportOffset))
#define HID_FEATURE_REPORTS(d) ((WINE_HID_REPORT*)(((BYTE*)(d)->InputReports)+(d)->dwFeatureReportOffset))
#endif
/* __HID_PARSE_H */
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