kbdclass and mouclass:
[reactos.git] / reactos / drivers / input / mouclass / mouclass.h
1 #include <ntifs.h>
2 #include <kbdmou.h>
3 #include <ntddmou.h>
4 #include <stdio.h>
5
6 #define MAX_PATH 260
7
8 typedef enum
9 {
10 dsStopped,
11 dsStarted,
12 dsPaused,
13 dsRemoved,
14 dsSurpriseRemoved
15 } PORT_DEVICE_STATE;
16
17 typedef struct _CLASS_DRIVER_EXTENSION
18 {
19 UNICODE_STRING RegistryPath;
20
21 /* Registry settings */
22 ULONG ConnectMultiplePorts;
23 ULONG DataQueueSize;
24 UNICODE_STRING DeviceBaseName;
25
26 PDEVICE_OBJECT MainClassDeviceObject;
27 } CLASS_DRIVER_EXTENSION, *PCLASS_DRIVER_EXTENSION;
28
29 typedef struct _COMMON_DEVICE_EXTENSION
30 {
31 BOOLEAN IsClassDO;
32 } COMMON_DEVICE_EXTENSION, *PCOMMON_DEVICE_EXTENSION;
33
34 typedef struct _PORT_DEVICE_EXTENSION
35 {
36 COMMON_DEVICE_EXTENSION Common;
37
38 LIST_ENTRY ListEntry;
39 PDEVICE_OBJECT DeviceObject;
40 PORT_DEVICE_STATE PnpState;
41 PDEVICE_OBJECT LowerDevice;
42 PDEVICE_OBJECT ClassDO;
43 UNICODE_STRING InterfaceName;
44 } PORT_DEVICE_EXTENSION, *PPORT_DEVICE_EXTENSION;
45
46 typedef struct _CLASS_DEVICE_EXTENSION
47 {
48 COMMON_DEVICE_EXTENSION Common;
49
50 PCLASS_DRIVER_EXTENSION DriverExtension;
51
52 LIST_ENTRY ListHead;
53 KSPIN_LOCK ListSpinLock;
54 KSPIN_LOCK SpinLock;
55 BOOLEAN ReadIsPending;
56 ULONG InputCount;
57 PMOUSE_INPUT_DATA PortData;
58 } CLASS_DEVICE_EXTENSION, *PCLASS_DEVICE_EXTENSION;
59
60 /* misc.c */
61
62 NTSTATUS
63 ForwardIrpAndWait(
64 IN PDEVICE_OBJECT DeviceObject,
65 IN PIRP Irp);
66
67 NTSTATUS NTAPI
68 ForwardIrpAndForget(
69 IN PDEVICE_OBJECT DeviceObject,
70 IN PIRP Irp);