2 * Wine internal HID structures
4 * Copyright 2015 Aric Stewart
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #ifndef __WINE_PARSE_H
22 #define __WINE_PARSE_H
24 #define HID_MAGIC 0x8491759
26 typedef enum __WINE_ELEMENT_TYPE
{
32 typedef struct __WINE_ELEMENT
34 WINE_ELEMENT_TYPE ElementType
;
38 HIDP_VALUE_CAPS value
;
39 HIDP_BUTTON_CAPS button
;
43 typedef struct __WINE_HID_REPORT
51 typedef struct __WINE_HID_LINK_COLLECTION_NODE
{
55 USHORT NumberOfChildren
;
60 } WINE_HID_LINK_COLLECTION_NODE
;
62 typedef struct __WINE_HIDP_PREPARSED_DATA
71 BYTE reportIdx
[3][256];
73 WINE_HID_REPORT reports
[1];
74 } WINE_HIDP_PREPARSED_DATA
, *PWINE_HIDP_PREPARSED_DATA
;
76 #define HID_INPUT_REPORTS(d) ((d)->reports)
77 #define HID_OUTPUT_REPORTS(d) ((d)->reports + (d)->reportCount[0])
78 #define HID_FEATURE_REPORTS(d) ((d)->reports + (d)->reportCount[0] + (d)->reportCount[1])
79 #define HID_ELEMS(d) ((WINE_HID_ELEMENT*)((BYTE*)(d) + (d)->elementOffset))
80 #define HID_NODES(d) ((WINE_HID_LINK_COLLECTION_NODE*)((BYTE*)(d) + (d)->nodesOffset))
82 #endif /* __WINE_PARSE_H */