Big move of driver input stack to a Plug-and-Play model:
[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 } MOUCLASS_DEVICE_STATE;
24
25 typedef struct _MOUCLASS_DRIVER_EXTENSION
26 {
27 /* Registry settings */
28 ULONG ConnectMultiplePorts;
29 ULONG MouseDataQueueSize;
30 UNICODE_STRING PointerDeviceBaseName;
31
32 PDEVICE_OBJECT MainMouclassDeviceObject;
33 } MOUCLASS_DRIVER_EXTENSION, *PMOUCLASS_DRIVER_EXTENSION;
34
35 typedef struct _COMMON_DEVICE_EXTENSION
36 {
37 BOOLEAN IsClassDO;
38 } COMMON_DEVICE_EXTENSION, *PCOMMON_DEVICE_EXTENSION;
39
40 typedef struct _MOUPORT_DEVICE_EXTENSION
41 {
42 COMMON_DEVICE_EXTENSION Common;
43 } MOUPORT_DEVICE_EXTENSION, *PMOUPORT_DEVICE_EXTENSION;
44
45 typedef struct _MOUCLASS_DEVICE_EXTENSION
46 {
47 COMMON_DEVICE_EXTENSION Common;
48
49 MOUCLASS_DEVICE_STATE PnpState;
50 PMOUCLASS_DRIVER_EXTENSION DriverExtension;
51 PDEVICE_OBJECT LowerDevice;
52 UNICODE_STRING MouseInterfaceName;
53
54 KSPIN_LOCK SpinLock;
55 BOOLEAN ReadIsPending;
56 ULONG InputCount;
57 PMOUSE_INPUT_DATA PortData;
58 } MOUCLASS_DEVICE_EXTENSION, *PMOUCLASS_DEVICE_EXTENSION;
59
60 /* misc.c */
61
62 NTSTATUS NTAPI
63 ForwardIrpAndForget(
64 IN PDEVICE_OBJECT DeviceObject,
65 IN PIRP Irp);