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
25 #define WIN32_NO_STATUS
30 #include "ddk/hidpi.h"
32 #define HID_MAGIC 0x8491759
39 USHORT data_index_min
;
40 USHORT data_index_max
;
43 USHORT designator_min
;
44 USHORT designator_max
;
46 BOOLEAN is_string_range
;
47 BOOLEAN is_designator_range
;
49 USHORT link_collection
;
50 USAGE link_usage_page
;
65 #define HID_VALUE_CAPS_IS_ABSOLUTE(x) (((x)->bit_field & 0x04) == 0)
66 #define HID_VALUE_CAPS_HAS_NULL(x) (((x)->bit_field & 0x40) != 0)
67 #define HID_VALUE_CAPS_IS_ARRAY(c) (((c)->bit_field & 2) == 0)
68 #define HID_VALUE_CAPS_IS_BUTTON(c) ((c)->bit_size == 1 || HID_VALUE_CAPS_IS_ARRAY(c))
70 typedef struct __WINE_HIDP_PREPARSED_DATA
75 USHORT value_caps_count
[3];
76 struct hid_value_caps value_caps
[1];
77 } WINE_HIDP_PREPARSED_DATA
, *PWINE_HIDP_PREPARSED_DATA
;
79 #define HID_INPUT_VALUE_CAPS(d) ((d)->value_caps)
80 #define HID_OUTPUT_VALUE_CAPS(d) (HID_INPUT_VALUE_CAPS(d) + (d)->value_caps_count[0])
81 #define HID_FEATURE_VALUE_CAPS(d) (HID_OUTPUT_VALUE_CAPS(d) + (d)->value_caps_count[1])
82 #define HID_COLLECTION_VALUE_CAPS(d) (HID_FEATURE_VALUE_CAPS(d) + (d)->value_caps_count[2])
84 #endif /* __WINE_PARSE_H */