quartz: FileSource_Load should not fail on unknown file formats.
[wine.git] / dlls / hidclass.sys / parse.h
blob1ba5670b7b001c09fad1a6f1ada646985dab5896
1 /*
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 {
27 UnknownElement = 0,
28 ButtonElement,
29 ValueElement,
30 } WINE_ELEMENT_TYPE;
32 typedef struct __WINE_ELEMENT
34 WINE_ELEMENT_TYPE ElementType;
35 UINT valueStartBit;
36 UINT bitCount;
37 union {
38 HIDP_VALUE_CAPS value;
39 HIDP_BUTTON_CAPS button;
40 } caps;
41 } WINE_HID_ELEMENT;
43 typedef struct __WINE_HID_REPORT
45 UCHAR reportID;
46 DWORD dwSize;
47 DWORD elementCount;
48 WINE_HID_ELEMENT Elements[1];
49 } WINE_HID_REPORT;
51 typedef struct __WINE_HIDP_PREPARSED_DATA
53 DWORD magic;
54 DWORD dwSize;
55 HIDP_CAPS caps;
57 DWORD dwInputReportCount;
58 DWORD dwOutputReportCount;
59 DWORD dwFeatureReportCount;
61 DWORD dwOutputReportOffset;
62 DWORD dwFeatureReportOffset;
64 WINE_HID_REPORT InputReports[1];
65 } WINE_HIDP_PREPARSED_DATA;
67 #define HID_NEXT_REPORT(d,r) ((r)?(WINE_HID_REPORT*)(((BYTE*)(r))+(r)->dwSize):(d)->InputReports)
68 #define HID_INPUT_REPORTS(d) ((d)->InputReports)
69 #define HID_OUTPUT_REPORTS(d) (WINE_HID_REPORT*)(((BYTE*)(d)->InputReports)+(d)->dwOutputReportOffset)
70 #define HID_FEATURE_REPORTS(d) (WINE_HID_REPORT*)(((BYTE*)(d)->InputReports)+(d)->dwFeatureReportOffset)
72 #endif /* __WINE_PARSE_H */