555b89d7f104916444b1754efa18ee1990202184
[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 #if defined(__GNUC__)
7 NTSTATUS NTAPI
8 IoAttachDeviceToDeviceStackSafe(
9 IN PDEVICE_OBJECT SourceDevice,
10 IN PDEVICE_OBJECT TargetDevice,
11 OUT PDEVICE_OBJECT *AttachedToDeviceObject);
12 #else
13 #error Unknown compiler!
14 #endif
15
16 typedef enum
17 {
18 dsStopped,
19 dsStarted,
20 dsPaused,
21 dsRemoved,
22 dsSurpriseRemoved
23 } PORT_DEVICE_STATE;
24
25 typedef struct _CLASS_DRIVER_EXTENSION
26 {
27 UNICODE_STRING RegistryPath;
28
29 /* Registry settings */
30 ULONG ConnectMultiplePorts;
31 ULONG DataQueueSize;
32 UNICODE_STRING DeviceBaseName;
33
34 PDEVICE_OBJECT MainClassDeviceObject;
35 } CLASS_DRIVER_EXTENSION, *PCLASS_DRIVER_EXTENSION;
36
37 typedef struct _COMMON_DEVICE_EXTENSION
38 {
39 BOOLEAN IsClassDO;
40 } COMMON_DEVICE_EXTENSION, *PCOMMON_DEVICE_EXTENSION;
41
42 typedef struct _PORT_DEVICE_EXTENSION
43 {
44 COMMON_DEVICE_EXTENSION Common;
45
46 PORT_DEVICE_STATE PnpState;
47 PDEVICE_OBJECT LowerDevice;
48 UNICODE_STRING InterfaceName;
49 } PORT_DEVICE_EXTENSION, *PPORT_DEVICE_EXTENSION;
50
51 typedef struct _CLASS_DEVICE_EXTENSION
52 {
53 COMMON_DEVICE_EXTENSION Common;
54
55 PCLASS_DRIVER_EXTENSION DriverExtension;
56
57 KSPIN_LOCK SpinLock;
58 BOOLEAN ReadIsPending;
59 ULONG InputCount;
60 PMOUSE_INPUT_DATA PortData;
61 } CLASS_DEVICE_EXTENSION, *PCLASS_DEVICE_EXTENSION;
62
63 /* misc.c */
64
65 NTSTATUS NTAPI
66 ForwardIrpAndForget(
67 IN PDEVICE_OBJECT DeviceObject,
68 IN PIRP Irp);