ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

hidclass.h
Go to the documentation of this file.
00001 /*
00002  * hidclass.h
00003  *
00004  * HID class driver interface
00005  *
00006  * This file is part of the w32api package.
00007  *
00008  * Contributors:
00009  *   Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
00010  *
00011  * THIS SOFTWARE IS NOT COPYRIGHTED
00012  *
00013  * This source code is offered for use in the public domain. You may
00014  * use, modify or distribute it freely.
00015  *
00016  * This code is distributed in the hope that it will be useful but
00017  * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
00018  * DISCLAIMED. This includes but is not limited to warranties of
00019  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00020  *
00021  */
00022 
00023 #ifndef __HIDCLASS_H
00024 #define __HIDCLASS_H
00025 
00026 #include "hidpi.h"
00027 
00028 #ifdef __cplusplus
00029 extern "C" {
00030 #endif
00031 
00032 #define HID_REVISION                      0x00000001
00033 
00034 DEFINE_GUID (GUID_DEVINTERFACE_HID, \
00035   0x4D1E55B2L, 0xF16F, 0x11CF, 0x88, 0xCB, 0x00, 0x11, 0x11, 0x00, 0x00, 0x30);
00036 DEFINE_GUID (GUID_HID_INTERFACE_NOTIFY, \
00037   0x2c4e2e88L, 0x25e6, 0x4c33, 0x88, 0x2f, 0x3d, 0x82, 0xe6, 0x07, 0x36, 0x81);
00038 DEFINE_GUID (GUID_HID_INTERFACE_HIDPARSE, \
00039   0xf5c315a5, 0x69ac, 0x4bc2, 0x92, 0x79, 0xd0, 0xb6, 0x45, 0x76, 0xf4, 0x4b);
00040 
00041 #define GUID_CLASS_INPUT GUID_DEVINTERFACE_HID
00042 
00043 #define GUID_CLASS_INPUT_STR "4D1E55B2-F16F-11CF-88CB-001111000030"
00044 
00045 
00046 #define HID_CTL_CODE(id) \
00047   CTL_CODE (FILE_DEVICE_KEYBOARD, (id), METHOD_NEITHER, FILE_ANY_ACCESS)
00048 #define HID_BUFFER_CTL_CODE(id) \
00049   CTL_CODE (FILE_DEVICE_KEYBOARD, (id), METHOD_BUFFERED, FILE_ANY_ACCESS)
00050 #define HID_IN_CTL_CODE(id) \
00051   CTL_CODE (FILE_DEVICE_KEYBOARD, (id), METHOD_IN_DIRECT, FILE_ANY_ACCESS)
00052 #define HID_OUT_CTL_CODE(id) \
00053   CTL_CODE (FILE_DEVICE_KEYBOARD, (id), METHOD_OUT_DIRECT, FILE_ANY_ACCESS)
00054 
00055 
00056 #define IOCTL_GET_PHYSICAL_DESCRIPTOR         HID_OUT_CTL_CODE(102)
00057 #define IOCTL_HID_FLUSH_QUEUE                 HID_CTL_CODE(101)
00058 #define IOCTL_HID_GET_COLLECTION_DESCRIPTOR   HID_CTL_CODE(100)
00059 #define IOCTL_HID_GET_COLLECTION_INFORMATION  HID_BUFFER_CTL_CODE(106)
00060 #define IOCTL_HID_GET_FEATURE                 HID_OUT_CTL_CODE(100)
00061 #define IOCTL_HID_GET_HARDWARE_ID             HID_OUT_CTL_CODE(103)
00062 #define IOCTL_HID_GET_INDEXED_STRING          HID_OUT_CTL_CODE(120)
00063 #define IOCTL_HID_GET_INPUT_REPORT            HID_OUT_CTL_CODE(104)
00064 #define IOCTL_HID_GET_MANUFACTURER_STRING     HID_OUT_CTL_CODE(110)
00065 #define IOCTL_GET_NUM_DEVICE_INPUT_BUFFERS    HID_BUFFER_CTL_CODE(104)
00066 #define IOCTL_HID_GET_POLL_FREQUENCY_MSEC     HID_BUFFER_CTL_CODE(102)
00067 #define IOCTL_HID_GET_PRODUCT_STRING          HID_OUT_CTL_CODE(111)
00068 #define IOCTL_HID_GET_SERIALNUMBER_STRING     HID_OUT_CTL_CODE(112)
00069 #define IOCTL_HID_SET_FEATURE                 HID_IN_CTL_CODE(100)
00070 #define IOCTL_SET_NUM_DEVICE_INPUT_BUFFERS    HID_BUFFER_CTL_CODE(105)
00071 #define IOCTL_HID_SET_OUTPUT_REPORT           HID_IN_CTL_CODE(101)
00072 #define IOCTL_HID_SET_POLL_FREQUENCY_MSEC     HID_BUFFER_CTL_CODE(103)
00073 
00074 #define IOCTL_HID_GET_DRIVER_CONFIG           HID_BUFFER_CTL_CODE(100)
00075 #define IOCTL_HID_SET_DRIVER_CONFIG           HID_BUFFER_CTL_CODE(101)
00076 #define IOCTL_HID_GET_INDEXED_STRING          HID_OUT_CTL_CODE(120)
00077 #define IOCTL_HID_GET_MS_GENRE_DESCRIPTOR     HID_OUT_CTL_CODE(121)
00078 
00079 typedef enum _HID_STRING_TYPE
00080 {
00081     HID_STRING_INDEXED = 0,
00082     HID_STRING_ID_IMANUFACTURER,
00083     HID_STRING_ID_IPRODUCT,
00084     HID_STRING_ID_ISERIALNUMBER,
00085     HID_STRING_MAX
00086 } HID_STRING_TYPE;
00087 
00088 enum DeviceObjectState {
00089   DeviceObjectStarted = 0,
00090   DeviceObjectStopped,
00091   DeviceObjectRemoved
00092 };
00093 
00094 typedef VOID
00095 (NTAPI *PHID_STATUS_CHANGE)(
00096   _In_ PVOID Context,
00097   _In_ enum DeviceObjectState State);
00098 
00099 _Must_inspect_result_
00100 typedef NTSTATUS
00101 (NTAPI *PHIDP_GETCAPS)(
00102   _In_ PHIDP_PREPARSED_DATA PreparsedData,
00103   _Out_ PHIDP_CAPS Capabilities);
00104 
00105 typedef struct _HID_COLLECTION_INFORMATION {
00106   ULONG  DescriptorSize;
00107   BOOLEAN  Polled;
00108   UCHAR  Reserved1[1];
00109   USHORT  VendorID;
00110   USHORT  ProductID;
00111   USHORT  VersionNumber;
00112 } HID_COLLECTION_INFORMATION, *PHID_COLLECTION_INFORMATION;
00113 
00114 typedef struct _HID_DRIVER_CONFIG {
00115   ULONG  Size;
00116   ULONG  RingBufferSize;
00117 } HID_DRIVER_CONFIG, *PHID_DRIVER_CONFIG;
00118 
00119 typedef struct _HID_INTERFACE_HIDPARSE {
00120 #ifdef __cplusplus
00121   INTERFACE  i;
00122 #else
00123   /* GCC doesn't support including unnamed structs, so INTERFACE is
00124      expanded here */
00125   USHORT  Size;
00126   USHORT  Version;
00127   PVOID  Context;
00128   PINTERFACE_REFERENCE  InterfaceReference;
00129   PINTERFACE_DEREFERENCE  InterfaceDereference;
00130 #endif
00131   PHIDP_GETCAPS  HidpGetCaps;
00132 } HID_INTERFACE_HIDPARSE, *PHID_INTERFACE_HIDPARSE;
00133 
00134 typedef struct _HID_INTERFACE_NOTIFY_PNP {
00135 #ifdef __cplusplus
00136   INTERFACE  i;
00137 #else
00138   /* GCC doesn't support including unnamed structs, so INTERFACE is
00139      expanded here */
00140   USHORT  Size;
00141   USHORT  Version;
00142   PVOID  Context;
00143   PINTERFACE_REFERENCE  InterfaceReference;
00144   PINTERFACE_DEREFERENCE  InterfaceDereference;
00145 #endif
00146   PHID_STATUS_CHANGE  StatusChangeFn;
00147   PVOID  CallbackContext;
00148 } HID_INTERFACE_NOTIFY_PNP, *PHID_INTERFACE_NOTIFY_PNP;
00149 
00150 typedef struct _HID_XFER_PACKET {
00151   PUCHAR  reportBuffer;
00152   ULONG  reportBufferLen;
00153   UCHAR  reportId;
00154 } HID_XFER_PACKET, *PHID_XFER_PACKET;
00155 
00156 #ifdef __cplusplus
00157 }
00158 #endif
00159 
00160 #endif /* __HIDCLASS_H */

Generated on Sun May 27 2012 04:29:58 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.