Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- dlls/hid/hidp.c | 36 +++++++++++++++++----------------- dlls/hidclass.sys/descriptor.c | 14 ++++++------- dlls/hidclass.sys/device.c | 28 +++++++++++++------------- dlls/hidclass.sys/hid.h | 4 ++-- dlls/hidclass.sys/pnp.c | 2 +- dlls/user32/rawinput.c | 2 +- include/wine/hid.h | 6 +++--- 7 files changed, 46 insertions(+), 46 deletions(-)
diff --git a/dlls/hid/hidp.c b/dlls/hid/hidp.c index 37715ccfbca..2690b9b0f27 100644 --- a/dlls/hid/hidp.c +++ b/dlls/hid/hidp.c @@ -36,7 +36,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(hidp);
-static NTSTATUS get_value_caps_range( WINE_HIDP_PREPARSED_DATA *preparsed, HIDP_REPORT_TYPE report_type, ULONG report_len, +static NTSTATUS get_value_caps_range( struct hid_preparsed_data *preparsed, HIDP_REPORT_TYPE report_type, ULONG report_len, const struct hid_value_caps **caps, const struct hid_value_caps **caps_end ) { if (!preparsed || preparsed->magic != HID_MAGIC) return HIDP_STATUS_INVALID_PREPARSED_DATA; @@ -90,7 +90,7 @@ static BOOL match_value_caps( const struct hid_value_caps *caps, const struct ca
typedef NTSTATUS (*enum_value_caps_callback)( const struct hid_value_caps *caps, void *user );
-static NTSTATUS enum_value_caps( WINE_HIDP_PREPARSED_DATA *preparsed, HIDP_REPORT_TYPE report_type, +static NTSTATUS enum_value_caps( struct hid_preparsed_data *preparsed, HIDP_REPORT_TYPE report_type, ULONG report_len, const struct caps_filter *filter, enum_value_caps_callback callback, void *user, USHORT *count ) { @@ -163,7 +163,7 @@ NTSTATUS WINAPI HidP_GetButtonCaps( HIDP_REPORT_TYPE report_type, HIDP_BUTTON_CA
NTSTATUS WINAPI HidP_GetCaps( PHIDP_PREPARSED_DATA preparsed_data, HIDP_CAPS *caps ) { - WINE_HIDP_PREPARSED_DATA *preparsed = (WINE_HIDP_PREPARSED_DATA *)preparsed_data; + struct hid_preparsed_data *preparsed = (struct hid_preparsed_data *)preparsed_data;
TRACE( "preparsed_data %p, caps %p.\n", preparsed_data, caps );
@@ -214,7 +214,7 @@ NTSTATUS WINAPI HidP_GetScaledUsageValue( HIDP_REPORT_TYPE report_type, USAGE us char *report_buf, ULONG report_len ) { struct usage_value_params params = {.value_buf = value, .value_len = sizeof(*value), .report_buf = report_buf}; - WINE_HIDP_PREPARSED_DATA *preparsed = (WINE_HIDP_PREPARSED_DATA *)preparsed_data; + struct hid_preparsed_data *preparsed = (struct hid_preparsed_data *)preparsed_data; struct caps_filter filter = {.values = TRUE, .usage_page = usage_page, .collection = collection, .usage = usage }; USHORT count = 1;
@@ -242,7 +242,7 @@ NTSTATUS WINAPI HidP_GetUsageValue( HIDP_REPORT_TYPE report_type, USAGE usage_pa ULONG *value, PHIDP_PREPARSED_DATA preparsed_data, char *report_buf, ULONG report_len ) { struct usage_value_params params = {.value_buf = value, .value_len = sizeof(*value), .report_buf = report_buf}; - WINE_HIDP_PREPARSED_DATA *preparsed = (WINE_HIDP_PREPARSED_DATA *)preparsed_data; + struct hid_preparsed_data *preparsed = (struct hid_preparsed_data *)preparsed_data; struct caps_filter filter = {.values = TRUE, .usage_page = usage_page, .collection = collection, .usage = usage}; USHORT count = 1;
@@ -260,7 +260,7 @@ NTSTATUS WINAPI HidP_GetUsageValueArray( HIDP_REPORT_TYPE report_type, USAGE usa PHIDP_PREPARSED_DATA preparsed_data, char *report_buf, ULONG report_len ) { struct usage_value_params params = {.value_buf = value_buf, .value_len = value_len, .report_buf = report_buf}; - WINE_HIDP_PREPARSED_DATA *preparsed = (WINE_HIDP_PREPARSED_DATA *)preparsed_data; + struct hid_preparsed_data *preparsed = (struct hid_preparsed_data *)preparsed_data; struct caps_filter filter = {.values = TRUE, .array = TRUE, .usage_page = usage_page, .collection = collection, .usage = usage}; USHORT count = 1;
@@ -312,7 +312,7 @@ static NTSTATUS get_usage( const struct hid_value_caps *caps, void *user ) NTSTATUS WINAPI HidP_GetUsages( HIDP_REPORT_TYPE report_type, USAGE usage_page, USHORT collection, USAGE *usages, ULONG *usages_len, PHIDP_PREPARSED_DATA preparsed_data, char *report_buf, ULONG report_len ) { - WINE_HIDP_PREPARSED_DATA *preparsed = (WINE_HIDP_PREPARSED_DATA *)preparsed_data; + struct hid_preparsed_data *preparsed = (struct hid_preparsed_data *)preparsed_data; struct get_usage_params params = {.usages = usages, .usages_end = usages + *usages_len, .report_buf = report_buf}; struct caps_filter filter = {.buttons = TRUE, .usage_page = usage_page, .collection = collection}; NTSTATUS status; @@ -342,7 +342,7 @@ NTSTATUS WINAPI HidP_GetValueCaps( HIDP_REPORT_TYPE report_type, HIDP_VALUE_CAPS NTSTATUS WINAPI HidP_InitializeReportForID( HIDP_REPORT_TYPE report_type, UCHAR report_id, PHIDP_PREPARSED_DATA preparsed_data, char *report_buf, ULONG report_len ) { - WINE_HIDP_PREPARSED_DATA *preparsed = (WINE_HIDP_PREPARSED_DATA *)preparsed_data; + struct hid_preparsed_data *preparsed = (struct hid_preparsed_data *)preparsed_data; const struct hid_value_caps *caps, *end; NTSTATUS status;
@@ -370,7 +370,7 @@ static NTSTATUS get_usage_list_length( const struct hid_value_caps *caps, void *
ULONG WINAPI HidP_MaxUsageListLength( HIDP_REPORT_TYPE report_type, USAGE usage_page, PHIDP_PREPARSED_DATA preparsed_data ) { - WINE_HIDP_PREPARSED_DATA *preparsed = (WINE_HIDP_PREPARSED_DATA *)preparsed_data; + struct hid_preparsed_data *preparsed = (struct hid_preparsed_data *)preparsed_data; struct caps_filter filter = {.buttons = TRUE, .usage_page = usage_page}; USHORT limit = -1; ULONG count = 0; @@ -394,7 +394,7 @@ NTSTATUS WINAPI HidP_SetUsageValue( HIDP_REPORT_TYPE report_type, USAGE usage_pa ULONG value, PHIDP_PREPARSED_DATA preparsed_data, char *report_buf, ULONG report_len ) { struct usage_value_params params = {.value_buf = &value, .value_len = sizeof(value), .report_buf = report_buf}; - WINE_HIDP_PREPARSED_DATA *preparsed = (WINE_HIDP_PREPARSED_DATA *)preparsed_data; + struct hid_preparsed_data *preparsed = (struct hid_preparsed_data *)preparsed_data; struct caps_filter filter = {.values = TRUE, .usage_page = usage_page, .collection = collection, .usage = usage}; USHORT count = 1;
@@ -412,7 +412,7 @@ NTSTATUS WINAPI HidP_SetUsageValueArray( HIDP_REPORT_TYPE report_type, USAGE usa PHIDP_PREPARSED_DATA preparsed_data, char *report_buf, ULONG report_len ) { struct usage_value_params params = {.value_buf = value_buf, .value_len = value_len, .report_buf = report_buf}; - WINE_HIDP_PREPARSED_DATA *preparsed = (WINE_HIDP_PREPARSED_DATA *)preparsed_data; + struct hid_preparsed_data *preparsed = (struct hid_preparsed_data *)preparsed_data; struct caps_filter filter = {.values = TRUE, .array = TRUE, .usage_page = usage_page, .collection = collection, .usage = usage}; USHORT count = 1;
@@ -458,7 +458,7 @@ static NTSTATUS set_usage( const struct hid_value_caps *caps, void *user ) NTSTATUS WINAPI HidP_SetUsages( HIDP_REPORT_TYPE report_type, USAGE usage_page, USHORT collection, USAGE *usages, ULONG *usage_count, PHIDP_PREPARSED_DATA preparsed_data, char *report_buf, ULONG report_len ) { - WINE_HIDP_PREPARSED_DATA *preparsed = (WINE_HIDP_PREPARSED_DATA *)preparsed_data; + struct hid_preparsed_data *preparsed = (struct hid_preparsed_data *)preparsed_data; struct set_usage_params params = {.report_buf = report_buf}; struct caps_filter filter = {.buttons = TRUE, .usage_page = usage_page, .collection = collection}; NTSTATUS status; @@ -539,7 +539,7 @@ NTSTATUS WINAPI HidP_GetSpecificButtonCaps( HIDP_REPORT_TYPE report_type, USAGE USAGE usage, HIDP_BUTTON_CAPS *caps, USHORT *caps_count, PHIDP_PREPARSED_DATA preparsed_data ) { - WINE_HIDP_PREPARSED_DATA *preparsed = (WINE_HIDP_PREPARSED_DATA *)preparsed_data; + struct hid_preparsed_data *preparsed = (struct hid_preparsed_data *)preparsed_data; const struct caps_filter filter = {.buttons = TRUE, .usage_page = usage_page, .collection = collection, .usage = usage};
TRACE( "report_type %d, usage_page %x, collection %d, usage %x, caps %p, caps_count %p, preparsed_data %p.\n", @@ -602,7 +602,7 @@ NTSTATUS WINAPI HidP_GetSpecificValueCaps( HIDP_REPORT_TYPE report_type, USAGE u USAGE usage, HIDP_VALUE_CAPS *caps, USHORT *caps_count, PHIDP_PREPARSED_DATA preparsed_data ) { - WINE_HIDP_PREPARSED_DATA *preparsed = (WINE_HIDP_PREPARSED_DATA *)preparsed_data; + struct hid_preparsed_data *preparsed = (struct hid_preparsed_data *)preparsed_data; const struct caps_filter filter = {.values = TRUE, .usage_page = usage_page, .collection = collection, .usage = usage};
TRACE( "report_type %d, usage_page %x, collection %d, usage %x, caps %p, caps_count %p, preparsed_data %p.\n", @@ -657,7 +657,7 @@ NTSTATUS WINAPI HidP_GetUsagesEx( HIDP_REPORT_TYPE report_type, USHORT collectio ULONG *usages_len, PHIDP_PREPARSED_DATA preparsed_data, char *report_buf, ULONG report_len ) { struct get_usage_and_page_params params = {.usages = usages, .usages_end = usages + *usages_len, .report_buf = report_buf}; - WINE_HIDP_PREPARSED_DATA *preparsed = (WINE_HIDP_PREPARSED_DATA *)preparsed_data; + struct hid_preparsed_data *preparsed = (struct hid_preparsed_data *)preparsed_data; struct caps_filter filter = {.buttons = TRUE, .collection = collection}; NTSTATUS status; USHORT limit = -1; @@ -686,7 +686,7 @@ static NTSTATUS count_data( const struct hid_value_caps *caps, void *user )
ULONG WINAPI HidP_MaxDataListLength( HIDP_REPORT_TYPE report_type, PHIDP_PREPARSED_DATA preparsed_data ) { - WINE_HIDP_PREPARSED_DATA *preparsed = (WINE_HIDP_PREPARSED_DATA *)preparsed_data; + struct hid_preparsed_data *preparsed = (struct hid_preparsed_data *)preparsed_data; struct caps_filter filter = {}; USHORT limit = -1; ULONG count = 0; @@ -760,7 +760,7 @@ NTSTATUS WINAPI HidP_GetData( HIDP_REPORT_TYPE report_type, HIDP_DATA *data, ULO PHIDP_PREPARSED_DATA preparsed_data, char *report_buf, ULONG report_len ) { struct find_all_data_params params = {.data = data, .data_end = data + *data_len, .report_buf = report_buf}; - WINE_HIDP_PREPARSED_DATA *preparsed = (WINE_HIDP_PREPARSED_DATA *)preparsed_data; + struct hid_preparsed_data *preparsed = (struct hid_preparsed_data *)preparsed_data; struct caps_filter filter = {}; NTSTATUS status; USHORT limit = -1; @@ -781,7 +781,7 @@ NTSTATUS WINAPI HidP_GetData( HIDP_REPORT_TYPE report_type, HIDP_DATA *data, ULO
NTSTATUS WINAPI HidP_GetLinkCollectionNodes( HIDP_LINK_COLLECTION_NODE *nodes, ULONG *nodes_len, PHIDP_PREPARSED_DATA preparsed_data ) { - WINE_HIDP_PREPARSED_DATA *preparsed = (WINE_HIDP_PREPARSED_DATA *)preparsed_data; + struct hid_preparsed_data *preparsed = (struct hid_preparsed_data *)preparsed_data; struct hid_value_caps *caps = HID_COLLECTION_VALUE_CAPS( preparsed ); ULONG i, count, capacity = *nodes_len;
diff --git a/dlls/hidclass.sys/descriptor.c b/dlls/hidclass.sys/descriptor.c index f8a26d87c9f..546e589d01b 100644 --- a/dlls/hidclass.sys/descriptor.c +++ b/dlls/hidclass.sys/descriptor.c @@ -96,7 +96,7 @@ static inline const char *debugstr_hid_value_caps( struct hid_value_caps *caps ) caps->units, caps->units_exp, caps->logical_min, caps->logical_max, caps->physical_min, caps->physical_max ); }
-static void debug_print_preparsed(WINE_HIDP_PREPARSED_DATA *data) +static void debug_print_preparsed( struct hid_preparsed_data *data ) { unsigned int i, end; if (TRACE_ON(hid)) @@ -391,19 +391,19 @@ static void free_parser_state( struct hid_parser_state *state ) free( state ); }
-static WINE_HIDP_PREPARSED_DATA *build_preparsed_data( struct hid_parser_state *state ) +static struct hid_preparsed_data *build_preparsed_data( struct hid_parser_state *state ) { - WINE_HIDP_PREPARSED_DATA *data; + struct hid_preparsed_data *data; struct hid_value_caps *caps; DWORD i, button, filler, caps_len, size;
caps_len = state->caps.NumberInputValueCaps + state->caps.NumberOutputValueCaps + state->caps.NumberFeatureValueCaps + state->caps.NumberLinkCollectionNodes; - size = FIELD_OFFSET( WINE_HIDP_PREPARSED_DATA, value_caps[caps_len] ); + size = FIELD_OFFSET( struct hid_preparsed_data, value_caps[caps_len] );
if (!(data = calloc( 1, size ))) return NULL; data->magic = HID_MAGIC; - data->dwSize = size; + data->size = size; data->caps = state->caps; data->value_caps_count[HidP_Input] = state->caps.NumberInputValueCaps; data->value_caps_count[HidP_Output] = state->caps.NumberOutputValueCaps; @@ -449,9 +449,9 @@ static WINE_HIDP_PREPARSED_DATA *build_preparsed_data( struct hid_parser_state * return data; }
-WINE_HIDP_PREPARSED_DATA *parse_descriptor( BYTE *descriptor, unsigned int length ) +struct hid_preparsed_data *parse_descriptor( BYTE *descriptor, unsigned int length ) { - WINE_HIDP_PREPARSED_DATA *data = NULL; + struct hid_preparsed_data *data = NULL; struct hid_parser_state *state; UINT32 size, value; INT32 signed_value; diff --git a/dlls/hidclass.sys/device.c b/dlls/hidclass.sys/device.c index 1990142f955..307b2fd3b77 100644 --- a/dlls/hidclass.sys/device.c +++ b/dlls/hidclass.sys/device.c @@ -114,7 +114,7 @@ static void HID_Device_processQueue(DEVICE_OBJECT *device) IRP *irp; BASE_DEVICE_EXTENSION *ext = device->DeviceExtension; UINT buffer_size = RingBuffer_GetBufferSize(ext->u.pdo.ring_buffer); - const WINE_HIDP_PREPARSED_DATA *data = ext->u.pdo.preparsed_data; + struct hid_preparsed_data *preparsed = ext->u.pdo.preparsed_data; HID_XFER_PACKET *packet;
packet = malloc(buffer_size); @@ -127,7 +127,7 @@ static void HID_Device_processQueue(DEVICE_OBJECT *device) if (buffer_size) { TRACE_(hid_report)("Processing Request (%i)\n",ptr); - memcpy( irp->AssociatedIrp.SystemBuffer, packet + 1, data->caps.InputReportByteLength ); + memcpy( irp->AssociatedIrp.SystemBuffer, packet + 1, preparsed->caps.InputReportByteLength ); irp->IoStatus.Information = packet->reportBufferLen; irp->IoStatus.Status = STATUS_SUCCESS; } @@ -145,9 +145,9 @@ static DWORD CALLBACK hid_device_thread(void *args) { DEVICE_OBJECT *device = (DEVICE_OBJECT*)args; BASE_DEVICE_EXTENSION *ext = device->DeviceExtension; - const WINE_HIDP_PREPARSED_DATA *data = ext->u.pdo.preparsed_data; - BYTE report_id = HID_INPUT_VALUE_CAPS( data )->report_id; - ULONG buffer_len = data->caps.InputReportByteLength; + struct hid_preparsed_data *preparsed = ext->u.pdo.preparsed_data; + BYTE report_id = HID_INPUT_VALUE_CAPS( preparsed )->report_id; + ULONG buffer_len = preparsed->caps.InputReportByteLength; IO_STATUS_BLOCK io; HID_XFER_PACKET *packet; BYTE *buffer; @@ -263,17 +263,17 @@ static void handle_IOCTL_HID_GET_COLLECTION_INFORMATION( IRP *irp, BASE_DEVICE_E static void handle_IOCTL_HID_GET_COLLECTION_DESCRIPTOR( IRP *irp, BASE_DEVICE_EXTENSION *ext ) { IO_STACK_LOCATION *irpsp = IoGetCurrentIrpStackLocation( irp ); - const WINE_HIDP_PREPARSED_DATA *data = ext->u.pdo.preparsed_data; + struct hid_preparsed_data *preparsed = ext->u.pdo.preparsed_data;
- if (irpsp->Parameters.DeviceIoControl.OutputBufferLength < data->dwSize) + if (irpsp->Parameters.DeviceIoControl.OutputBufferLength < preparsed->size) { irp->IoStatus.Status = STATUS_INVALID_BUFFER_SIZE; irp->IoStatus.Information = 0; } else { - memcpy(irp->UserBuffer, data, data->dwSize); - irp->IoStatus.Information = data->dwSize; + memcpy( irp->UserBuffer, preparsed, preparsed->size ); + irp->IoStatus.Information = preparsed->size; irp->IoStatus.Status = STATUS_SUCCESS; } } @@ -301,7 +301,7 @@ static void handle_minidriver_string( BASE_DEVICE_EXTENSION *ext, IRP *irp, SHOR
static void hid_device_xfer_report( BASE_DEVICE_EXTENSION *ext, ULONG code, IRP *irp ) { - WINE_HIDP_PREPARSED_DATA *preparsed = ext->u.pdo.preparsed_data; + struct hid_preparsed_data *preparsed = ext->u.pdo.preparsed_data; IO_STACK_LOCATION *stack = IoGetCurrentIrpStackLocation( irp ); struct hid_value_caps *caps = NULL, *caps_end = NULL; ULONG report_len = 0, buffer_len = 0; @@ -523,10 +523,10 @@ NTSTATUS WINAPI pdo_read(DEVICE_OBJECT *device, IRP *irp) { HID_XFER_PACKET *packet; BASE_DEVICE_EXTENSION *ext = device->DeviceExtension; - const WINE_HIDP_PREPARSED_DATA *data = ext->u.pdo.preparsed_data; + struct hid_preparsed_data *preparsed = ext->u.pdo.preparsed_data; UINT buffer_size = RingBuffer_GetBufferSize(ext->u.pdo.ring_buffer); IO_STACK_LOCATION *irpsp = IoGetCurrentIrpStackLocation(irp); - BYTE report_id = HID_INPUT_VALUE_CAPS( data )->report_id; + BYTE report_id = HID_INPUT_VALUE_CAPS( preparsed )->report_id; NTSTATUS status; int ptr = -1; BOOL removed; @@ -543,7 +543,7 @@ NTSTATUS WINAPI pdo_read(DEVICE_OBJECT *device, IRP *irp) return STATUS_DELETE_PENDING; }
- if (irpsp->Parameters.Read.Length < data->caps.InputReportByteLength) + if (irpsp->Parameters.Read.Length < preparsed->caps.InputReportByteLength) { irp->IoStatus.Status = STATUS_INVALID_BUFFER_SIZE; IoCompleteRequest( irp, IO_NO_INCREMENT ); @@ -558,7 +558,7 @@ NTSTATUS WINAPI pdo_read(DEVICE_OBJECT *device, IRP *irp)
if (buffer_size) { - memcpy( irp->AssociatedIrp.SystemBuffer, packet + 1, data->caps.InputReportByteLength ); + memcpy( irp->AssociatedIrp.SystemBuffer, packet + 1, preparsed->caps.InputReportByteLength ); irp->IoStatus.Information = packet->reportBufferLen; irp->IoStatus.Status = STATUS_SUCCESS; } diff --git a/dlls/hidclass.sys/hid.h b/dlls/hidclass.sys/hid.h index c00f014bb2c..675114d22a6 100644 --- a/dlls/hidclass.sys/hid.h +++ b/dlls/hidclass.sys/hid.h @@ -54,7 +54,7 @@ typedef struct _BASE_DEVICE_EXTENSION DEVICE_OBJECT *parent_fdo;
HID_COLLECTION_INFORMATION information; - WINE_HIDP_PREPARSED_DATA *preparsed_data; + struct hid_preparsed_data *preparsed_data;
ULONG poll_interval; struct ReportRingBuffer *ring_buffer; @@ -123,4 +123,4 @@ NTSTATUS WINAPI pdo_create(DEVICE_OBJECT *device, IRP *irp) DECLSPEC_HIDDEN; NTSTATUS WINAPI pdo_close(DEVICE_OBJECT *device, IRP *irp) DECLSPEC_HIDDEN;
/* Parsing HID Report Descriptors into preparsed data */ -WINE_HIDP_PREPARSED_DATA *parse_descriptor( BYTE *descriptor, unsigned int length ) DECLSPEC_HIDDEN; +struct hid_preparsed_data *parse_descriptor( BYTE *descriptor, unsigned int length ) DECLSPEC_HIDDEN; diff --git a/dlls/hidclass.sys/pnp.c b/dlls/hidclass.sys/pnp.c index d792e5d3ddd..dc95a48fc08 100644 --- a/dlls/hidclass.sys/pnp.c +++ b/dlls/hidclass.sys/pnp.c @@ -260,7 +260,7 @@ static void create_child(minidriver *minidriver, DEVICE_OBJECT *fdo) return; }
- pdo_ext->u.pdo.information.DescriptorSize = pdo_ext->u.pdo.preparsed_data->dwSize; + pdo_ext->u.pdo.information.DescriptorSize = pdo_ext->u.pdo.preparsed_data->size;
page = pdo_ext->u.pdo.preparsed_data->caps.UsagePage; usage = pdo_ext->u.pdo.preparsed_data->caps.Usage; diff --git a/dlls/user32/rawinput.c b/dlls/user32/rawinput.c index e08d11bc20a..39f8c622fee 100644 --- a/dlls/user32/rawinput.c +++ b/dlls/user32/rawinput.c @@ -751,7 +751,7 @@ UINT WINAPI GetRawInputDeviceInfoW(HANDLE handle, UINT command, void *data, UINT break;
case RIDI_PREPARSEDDATA: - len = device->data ? ((WINE_HIDP_PREPARSED_DATA*)device->data)->dwSize : 0; + len = device->data ? ((struct hid_preparsed_data *)device->data)->size : 0; if (device->data && len <= data_len && data) memcpy(data, device->data, len); *data_size = len; diff --git a/include/wine/hid.h b/include/wine/hid.h index 2bb26ff280e..e76676ac8c2 100644 --- a/include/wine/hid.h +++ b/include/wine/hid.h @@ -67,14 +67,14 @@ struct hid_value_caps #define HID_VALUE_CAPS_IS_ARRAY(c) (((c)->bit_field & 2) == 0) #define HID_VALUE_CAPS_IS_BUTTON(c) ((c)->bit_size == 1 || HID_VALUE_CAPS_IS_ARRAY(c))
-typedef struct __WINE_HIDP_PREPARSED_DATA +struct hid_preparsed_data { DWORD magic; - DWORD dwSize; + DWORD size; HIDP_CAPS caps; USHORT value_caps_count[3]; struct hid_value_caps value_caps[1]; -} WINE_HIDP_PREPARSED_DATA, *PWINE_HIDP_PREPARSED_DATA; +};
#define HID_INPUT_VALUE_CAPS(d) ((d)->value_caps) #define HID_OUTPUT_VALUE_CAPS(d) (HID_INPUT_VALUE_CAPS(d) + (d)->value_caps_count[0])