1 /* 2 * COPYRIGHT: GPL - See COPYING in the top level directory 3 * PROJECT: ReactOS Virtual DOS Machine 4 * FILE: subsystems/mvdm/ntvdm/dos/mouse32.h 5 * PURPOSE: VDM 32-bit compatible PS/2 MOUSE.COM driver 6 * PROGRAMMERS: Aleksandar Andrejevic <theflash AT sdf DOT lonestar DOT org> 7 */ 8 9 #ifndef _MOUSE32_H_ 10 #define _MOUSE32_H_ 11 12 /* DEFINES ********************************************************************/ 13 14 // 15 // We are ReactOS PS/2 Mouse Driver Version 6.26, compatible MS-MOUSE 6.26 16 // 17 #define MOUSE_VERSION MAKEWORD(0x26, 0x06) 18 19 #define DOS_MOUSE_INTERRUPT 0x33 20 #define MOUSE_IRQ_INT 0x74 21 #define MOUSE_MAX_HORIZ 640 22 #define MOUSE_MAX_VERT 200 23 24 enum 25 { 26 MOUSE_BUTTON_LEFT, 27 MOUSE_BUTTON_RIGHT, 28 MOUSE_BUTTON_MIDDLE, 29 NUM_MOUSE_BUTTONS 30 }; 31 32 typedef struct _MOUSE_USER_HANDLER 33 { 34 /* 35 * CallMask format: see table: http://www.ctyme.com/intr/rb-5968.htm#Table3171 36 * Alternatively, see table: http://www.ctyme.com/intr/rb-5981.htm#Table3174 37 */ 38 USHORT CallMask; 39 ULONG Callback; // Far pointer to the callback 40 } MOUSE_USER_HANDLER, *PMOUSE_USER_HANDLER; 41 42 typedef struct _MOUSE_DRIVER_STATE 43 { 44 SHORT ShowCount; 45 COORD Position; 46 WORD Character; 47 WORD ButtonState; 48 WORD PressCount[NUM_MOUSE_BUTTONS]; 49 COORD LastPress[NUM_MOUSE_BUTTONS]; 50 WORD ReleaseCount[NUM_MOUSE_BUTTONS]; 51 COORD LastRelease[NUM_MOUSE_BUTTONS]; 52 SHORT HorizCount; 53 SHORT VertCount; 54 WORD MinX, MaxX, MinY, MaxY; 55 56 /* 57 * User Subroutine Handlers called on mouse events 58 */ 59 MOUSE_USER_HANDLER Handler0; // Handler compatible MS MOUSE v1.0+ 60 MOUSE_USER_HANDLER Handlers[3]; // Handlers compatible MS MOUSE v6.0+ 61 62 struct 63 { 64 WORD ScreenMask; 65 WORD CursorMask; 66 } TextCursor; 67 68 struct 69 { 70 COORD HotSpot; 71 WORD ScreenMask[16]; 72 WORD CursorMask[16]; 73 } GraphicsCursor; 74 75 BYTE GraphicsData[256]; 76 } MOUSE_DRIVER_STATE, *PMOUSE_DRIVER_STATE; 77 78 /* FUNCTIONS ******************************************************************/ 79 80 BOOLEAN DosMouseInitialize(VOID); 81 VOID DosMouseCleanup(VOID); 82 83 #endif /* _MOUSE32_H_ */ 84