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

sermouse.h
Go to the documentation of this file.
00001 #include <ntifs.h>
00002 #include <kbdmou.h>
00003 #include <ntddser.h>
00004 #include <ntddmou.h>
00005 #include <debug.h>
00006 
00007 #define SERMOUSE_TAG 'uoMS'
00008 
00009 typedef enum
00010 {
00011   dsStopped,
00012   dsStarted,
00013   dsPaused,
00014   dsRemoved,
00015   dsSurpriseRemoved
00016 } SERMOUSE_DEVICE_STATE;
00017 
00018 typedef enum
00019 {
00020     mtNone,      /* No Mouse */
00021     mtMicrosoft, /* Microsoft Mouse with 2 buttons */
00022     mtLogitech,  /* Logitech Mouse with 3 buttons */
00023     mtWheelZ     /* Microsoft Wheel Mouse (aka Z Mouse) */
00024 } SERMOUSE_MOUSE_TYPE;
00025 
00026 /* Size for packet buffer used in interrupt routine */
00027 #define PACKET_BUFFER_SIZE  4
00028 
00029 /* Hardware byte mask for left button */
00030 #define LEFT_BUTTON_MASK     0x20
00031 /* Hardware to Microsoft specific code byte shift for left button */
00032 #define LEFT_BUTTON_SHIFT    5
00033 /* Hardware byte mask for right button */
00034 #define RIGHT_BUTTON_MASK    0x10
00035 /* Hardware to Microsoft specific code byte shift for right button */
00036 #define RIGHT_BUTTON_SHIFT   3
00037 /* Hardware byte mask for middle button */
00038 #define MIDDLE_BUTTON_MASK   0x20
00039 /* Hardware to Microsoft specific code byte shift for middle button */
00040 #define MIDDLE_BUTTON_SHIFT  3
00041 
00042 /* Microsoft byte mask for left button */
00043 #define MOUSE_BUTTON_LEFT    0x01
00044 /* Microsoft byte mask for right button */
00045 #define MOUSE_BUTTON_RIGHT   0x02
00046 /* Microsoft byte mask for middle button */
00047 #define MOUSE_BUTTON_MIDDLE  0x04
00048 
00049 typedef struct _SERMOUSE_DRIVER_EXTENSION
00050 {
00051     USHORT NumberOfButtons;
00052 } SERMOUSE_DRIVER_EXTENSION, *PSERMOUSE_DRIVER_EXTENSION;
00053 
00054 typedef struct _SERMOUSE_DEVICE_EXTENSION
00055 {
00056     PDEVICE_OBJECT LowerDevice;
00057     SERMOUSE_DEVICE_STATE PnpState;
00058     SERMOUSE_MOUSE_TYPE MouseType;
00059     PSERMOUSE_DRIVER_EXTENSION DriverExtension;
00060 
00061     HANDLE WorkerThreadHandle;
00062     KEVENT StopWorkerThreadEvent;
00063 
00064     ULONG ActiveQueue;
00065     ULONG InputDataCount[2];
00066     CONNECT_DATA ConnectData;
00067     MOUSE_INPUT_DATA MouseInputData[2];
00068     UCHAR PacketBuffer[PACKET_BUFFER_SIZE];
00069     ULONG PacketBufferPosition;
00070     ULONG PreviousButtons;
00071     MOUSE_ATTRIBUTES AttributesInformation;
00072 } SERMOUSE_DEVICE_EXTENSION, *PSERMOUSE_DEVICE_EXTENSION;
00073 
00074 /************************************ createclose.c */
00075 
00076 DRIVER_DISPATCH SermouseCreate;
00077 
00078 DRIVER_DISPATCH SermouseClose;
00079 
00080 DRIVER_DISPATCH SermouseCleanup;
00081 
00082 /************************************ detect.c */
00083 
00084 SERMOUSE_MOUSE_TYPE
00085 SermouseDetectLegacyDevice(
00086     IN PDEVICE_OBJECT LowerDevice);
00087 
00088 /************************************ fdo.c */
00089 
00090 DRIVER_ADD_DEVICE SermouseAddDevice;
00091 
00092 DRIVER_DISPATCH SermousePnp;
00093 
00094 /************************************ internaldevctl.c */
00095 
00096 DRIVER_DISPATCH SermouseInternalDeviceControl;
00097 
00098 /************************************ misc.c */
00099 
00100 NTSTATUS
00101 ForwardIrpAndWait(
00102     IN PDEVICE_OBJECT DeviceObject,
00103     IN PIRP Irp);
00104 
00105 NTSTATUS NTAPI
00106 ForwardIrpAndForget(
00107     IN PDEVICE_OBJECT DeviceObject,
00108     IN PIRP Irp);
00109 
00110 /************************************ readmouse.c */
00111 
00112 VOID NTAPI
00113 SermouseDeviceWorker(
00114     PVOID Context);

Generated on Sat May 26 2012 04:26:32 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.