source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/hidclass.h@ 1186

Last change on this file since 1186 was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 4.1 KB
RevLine 
[1166]1/**
2 * This file is part of the mingw-w64 runtime package.
3 * No warranty is given; refer to the file DISCLAIMER within this package.
4 */
5
6#include <winapifamily.h>
7#include <basetyps.h>
8
9#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
10#define GUID_CLASS_INPUT GUID_DEVINTERFACE_HID
11
12DEFINE_GUID (GUID_DEVINTERFACE_HID, 0x4d1e55b2, 0xf16f, 0x11cf, 0x88, 0xcb, 0x00, 0x11, 0x11, 0x00, 0x00, 0x30);
13DEFINE_GUID (GUID_HID_INTERFACE_NOTIFY, 0x2c4e2e88, 0x25e6, 0x4c33, 0x88, 0x2f, 0x3d, 0x82, 0xe6, 0x07, 0x36, 0x81);
14DEFINE_GUID (GUID_HID_INTERFACE_HIDPARSE, 0xf5c315a5, 0x69ac, 0x4bc2, 0x92, 0x79, 0xd0, 0xb6, 0x45, 0x76, 0xf4, 0x4b);
15#endif
16
17#ifndef __HIDCLASS_H__
18#define __HIDCLASS_H__
19
20#if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
21
22#define GUID_CLASS_INPUT_STR "4D1E55B2-F16F-11CF-88CB-001111000030"
23
24#define HID_REVISION 0x00000001
25
26#define HID_CTL_CODE(id) CTL_CODE (FILE_DEVICE_KEYBOARD,(id), METHOD_NEITHER, FILE_ANY_ACCESS)
27#define HID_BUFFER_CTL_CODE(id) CTL_CODE (FILE_DEVICE_KEYBOARD,(id), METHOD_BUFFERED, FILE_ANY_ACCESS)
28#define HID_IN_CTL_CODE(id) CTL_CODE (FILE_DEVICE_KEYBOARD,(id), METHOD_IN_DIRECT, FILE_ANY_ACCESS)
29#define HID_OUT_CTL_CODE(id) CTL_CODE (FILE_DEVICE_KEYBOARD,(id), METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
30
31#define IOCTL_HID_GET_DRIVER_CONFIG HID_BUFFER_CTL_CODE (100)
32#define IOCTL_HID_SET_DRIVER_CONFIG HID_BUFFER_CTL_CODE (101)
33#define IOCTL_HID_GET_POLL_FREQUENCY_MSEC HID_BUFFER_CTL_CODE (102)
34#define IOCTL_HID_SET_POLL_FREQUENCY_MSEC HID_BUFFER_CTL_CODE (103)
35#define IOCTL_GET_NUM_DEVICE_INPUT_BUFFERS HID_BUFFER_CTL_CODE (104)
36#define IOCTL_SET_NUM_DEVICE_INPUT_BUFFERS HID_BUFFER_CTL_CODE (105)
37#define IOCTL_HID_GET_COLLECTION_INFORMATION HID_BUFFER_CTL_CODE (106)
38
39#define IOCTL_HID_GET_COLLECTION_DESCRIPTOR HID_CTL_CODE (100)
40#define IOCTL_HID_FLUSH_QUEUE HID_CTL_CODE (101)
41#define IOCTL_HID_SET_FEATURE HID_IN_CTL_CODE (100)
42#define IOCTL_HID_SET_OUTPUT_REPORT HID_IN_CTL_CODE (101)
43#define IOCTL_HID_GET_FEATURE HID_OUT_CTL_CODE (100)
44#define IOCTL_GET_PHYSICAL_DESCRIPTOR HID_OUT_CTL_CODE (102)
45#define IOCTL_HID_GET_HARDWARE_ID HID_OUT_CTL_CODE (103)
46#define IOCTL_HID_GET_INPUT_REPORT HID_OUT_CTL_CODE (104)
47#define IOCTL_HID_GET_MANUFACTURER_STRING HID_OUT_CTL_CODE (110)
48#define IOCTL_HID_GET_PRODUCT_STRING HID_OUT_CTL_CODE (111)
49#define IOCTL_HID_GET_SERIALNUMBER_STRING HID_OUT_CTL_CODE (112)
50#define IOCTL_HID_GET_INDEXED_STRING HID_OUT_CTL_CODE (120)
51#define IOCTL_HID_GET_MS_GENRE_DESCRIPTOR HID_OUT_CTL_CODE (121)
52#define IOCTL_HID_ENABLE_SECURE_READ HID_CTL_CODE (130)
53#define IOCTL_HID_DISABLE_SECURE_READ HID_CTL_CODE (131)
54
55typedef struct _HID_XFER_PACKET {
56 PUCHAR reportBuffer;
57 ULONG reportBufferLen;
58 UCHAR reportId;
59} HID_XFER_PACKET,*PHID_XFER_PACKET;
60
61#ifdef NT_INCLUDED
62enum DeviceObjectState {
63 DeviceObjectStarted,
64 DeviceObjectStopped,
65 DeviceObjectRemoved
66};
67
68typedef VOID (*PHID_STATUS_CHANGE) (PVOID Context, enum DeviceObjectState State);
69
70typedef struct _HID_INTERFACE_NOTIFY_PNP {
71#ifdef __cplusplus
72 INTERFACE i;
73#else
74 /* inline instead. See miniport.h/wdm.h of ddk */
75 USHORT Size;
76 USHORT Version;
77 PVOID Context;
78 PINTERFACE_REFERENCE InterfaceReference;
79 PINTERFACE_DEREFERENCE InterfaceDereference;
80#endif
81 PHID_STATUS_CHANGE StatusChangeFn;
82 PVOID CallbackContext;
83} HID_INTERFACE_NOTIFY_PNP,*PHID_INTERFACE_NOTIFY_PNP;
84
85#ifdef __HIDPI_H__
86typedef NTSTATUS (__stdcall *PHIDP_GETCAPS) (PHIDP_PREPARSED_DATA PreparsedData, PHIDP_CAPS Capabilities);
87
88typedef struct _HID_INTERFACE_HIDPARSE {
89#ifdef __cplusplus
90 INTERFACE i;
91#else
92 /* inline instead. See miniport.h/wdm.h of ddk */
93 USHORT Size;
94 USHORT Version;
95 PVOID Context;
96 PINTERFACE_REFERENCE InterfaceReference;
97 PINTERFACE_DEREFERENCE InterfaceDereference;
98#endif
99 PHIDP_GETCAPS HidpGetCaps;
100} HID_INTERFACE_HIDPARSE,*PHID_INTERFACE_HIDPARSE;
101#endif
102#endif
103
104typedef struct _HID_COLLECTION_INFORMATION {
105 ULONG DescriptorSize;
106 BOOLEAN Polled;
107 UCHAR Reserved1[1];
108 USHORT VendorID;
109 USHORT ProductID;
110 USHORT VersionNumber;
111} HID_COLLECTION_INFORMATION,*PHID_COLLECTION_INFORMATION;
112
113typedef struct _HID_DRIVER_CONFIG {
114 ULONG Size;
115 ULONG RingBufferSize;
116} HID_DRIVER_CONFIG,*PHID_DRIVER_CONFIG;
117#endif
118#endif
Note: See TracBrowser for help on using the repository browser.