ReactOS  0.4.15-dev-2703-g05fb0f1
mouse32.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _MOUSE_USER_HANDLER
 
struct  _MOUSE_DRIVER_STATE
 

Macros

#define MOUSE_VERSION   MAKEWORD(0x26, 0x06)
 
#define DOS_MOUSE_INTERRUPT   0x33
 
#define MOUSE_IRQ_INT   0x74
 
#define MOUSE_MAX_HORIZ   640
 
#define MOUSE_MAX_VERT   200
 

Typedefs

typedef struct _MOUSE_USER_HANDLER MOUSE_USER_HANDLER
 
typedef struct _MOUSE_USER_HANDLERPMOUSE_USER_HANDLER
 
typedef struct _MOUSE_DRIVER_STATE MOUSE_DRIVER_STATE
 
typedef struct _MOUSE_DRIVER_STATEPMOUSE_DRIVER_STATE
 

Enumerations

enum  { MOUSE_BUTTON_LEFT, MOUSE_BUTTON_RIGHT, MOUSE_BUTTON_MIDDLE, NUM_MOUSE_BUTTONS }
 

Functions

BOOLEAN DosMouseInitialize (VOID)
 
VOID DosMouseCleanup (VOID)
 

Macro Definition Documentation

◆ DOS_MOUSE_INTERRUPT

#define DOS_MOUSE_INTERRUPT   0x33

Definition at line 19 of file mouse32.h.

◆ MOUSE_IRQ_INT

#define MOUSE_IRQ_INT   0x74

Definition at line 20 of file mouse32.h.

◆ MOUSE_MAX_HORIZ

#define MOUSE_MAX_HORIZ   640

Definition at line 21 of file mouse32.h.

◆ MOUSE_MAX_VERT

#define MOUSE_MAX_VERT   200

Definition at line 22 of file mouse32.h.

◆ MOUSE_VERSION

#define MOUSE_VERSION   MAKEWORD(0x26, 0x06)

Definition at line 17 of file mouse32.h.

Typedef Documentation

◆ MOUSE_DRIVER_STATE

◆ MOUSE_USER_HANDLER

◆ PMOUSE_DRIVER_STATE

◆ PMOUSE_USER_HANDLER

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
MOUSE_BUTTON_LEFT 
MOUSE_BUTTON_RIGHT 
MOUSE_BUTTON_MIDDLE 
NUM_MOUSE_BUTTONS 

Definition at line 24 of file mouse32.h.

Function Documentation

◆ DosMouseCleanup()

VOID DosMouseCleanup ( VOID  )

Definition at line 1296 of file mouse32.c.

1297 {
1299  DosMouseDisable();
1300  // UCHAR BH = getBH();
1301  // setBH(0x00);
1302  // BiosPs2Service(0x00);
1303  // FIXME: Check for return status in AH and CF
1304  // setBH(BH);
1305 
1306  /* Restore the old mouse service interrupt handler */
1308 
1310  MouseDataSegment = 0;
1311  MouseData = 0;
1312 }
#define DOS_MOUSE_INTERRUPT
Definition: mouse32.h:19
static VOID DosMouseDisable(VOID)
Definition: mouse32.c:1250
BOOLEAN DosFreeMemory(WORD BlockData)
Definition: memory.c:418
static WORD MouseDataSegment
Definition: mouse32.c:61
static PMOUSE_DRIVER MouseData
Definition: mouse32.c:62
static VOID EraseMouseCursor(VOID)
Definition: mouse32.c:282
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID * BaseAddress
Definition: mmfuncs.h:404
static MOUSE_DRIVER_STATE DriverState
Definition: mouse32.c:69
static DWORD OldIntHandler
Definition: mouse32.c:71
DWORD * PDWORD
Definition: pedump.c:68

◆ DosMouseInitialize()

BOOLEAN DosMouseInitialize ( VOID  )

Definition at line 1260 of file mouse32.c.

1261 {
1262  /* Initialize some memory for storing our data that should be available to DOS */
1264  if (MouseDataSegment == 0) return FALSE;
1266 
1267  /* Initialize the callback context */
1269 
1270  /* Clear the state */
1272 
1273  /* Mouse Driver Copyright */
1275 
1276  /* Mouse Driver Version in BCD format, compatible MS-MOUSE */
1278 
1279  /* Get the old mouse service interrupt handler */
1281 
1282  /* Initialize the interrupt handler */
1285 
1286  DosMouseEnable();
1287  // UCHAR BH = getBH();
1288  // setBH(0x01);
1289  // BiosPs2Service(0x00);
1290  // FIXME: Check for return status in AH and CF
1291  // setBH(BH);
1292 
1293  return TRUE;
1294 }
#define MAKEWORD(a, b)
Definition: typedefs.h:248
#define DOS_MOUSE_INTERRUPT
Definition: mouse32.h:19
#define TRUE
Definition: types.h:120
VOID InitializeContext(IN PCALLBACK16 Context, IN USHORT Segment, IN USHORT Offset)
Definition: callback.c:60
#define MOUSE_VERSION
Definition: mouse32.h:17
static WORD MouseDataSegment
Definition: mouse32.c:61
static VOID DosMouseEnable(VOID)
Definition: mouse32.c:1235
WORD Version
Definition: mouse32.c:52
#define SEG_OFF_TO_PTR(seg, off)
Definition: emulator.h:28
struct _MOUSE_DRIVER * PMOUSE_DRIVER
static PMOUSE_DRIVER MouseData
Definition: mouse32.c:62
#define FALSE
Definition: types.h:117
ULONG RegisterInt32(IN ULONG FarPtr, IN BYTE IntNumber, IN EMULATOR_INT32_PROC IntHandler, OUT PSIZE_T CodeSize OPTIONAL)
Definition: int32.c:118
#define MAKELONG(a, b)
Definition: typedefs.h:249
WORD DosAllocateMemory(WORD Size, WORD *MaxAvailable)
Definition: memory.c:136
static VOID WINAPI DosMouseService(LPWORD Stack)
Definition: mouse32.c:584
CHAR Copyright[sizeof(MouseCopyright)]
Definition: mouse32.c:51
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID * BaseAddress
Definition: mmfuncs.h:404
static MOUSE_DRIVER_STATE DriverState
Definition: mouse32.c:69
static const CHAR MouseCopyright[]
Definition: mouse32.c:42
static DWORD OldIntHandler
Definition: mouse32.c:71
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255
#define NULL
Definition: types.h:112
DWORD * PDWORD
Definition: pedump.c:68
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
static CALLBACK16 MouseContext
Definition: mouse32.c:63

Referenced by DosStart().