ReactOS 0.4.15-dev-7704-gc07eb9f
mouse.h
Go to the documentation of this file.
1/*
2 * COPYRIGHT: GPL - See COPYING in the top level directory
3 * PROJECT: ReactOS Virtual DOS Machine
4 * FILE: subsystems/mvdm/ntvdm/hardware/mouse.h
5 * PURPOSE: PS/2 Mouse emulation
6 * PROGRAMMERS: Aleksandar Andrejevic <theflash AT sdf DOT lonestar DOT org>
7 */
8
9#ifndef _MOUSE_H_
10#define _MOUSE_H_
11
12/* DEFINES ********************************************************************/
13
14/* Mouse packet constants */
15#define MOUSE_MAX 255
16
17/* Mouse packet flags */
18#define MOUSE_LEFT_BUTTON (1 << 0)
19#define MOUSE_RIGHT_BUTTON (1 << 1)
20#define MOUSE_MIDDLE_BUTTON (1 << 2)
21#define MOUSE_ALWAYS_SET (1 << 3)
22#define MOUSE_X_SIGN (1 << 4)
23#define MOUSE_Y_SIGN (1 << 5)
24#define MOUSE_X_OVERFLOW (1 << 6)
25#define MOUSE_Y_OVERFLOW (1 << 7)
26
27/* Mouse packet extra flags */
28#define MOUSE_4TH_BUTTON (1 << 4)
29#define MOUSE_5TH_BUTTON (1 << 5)
30
31/* Command responses */
32#define MOUSE_BAT_SUCCESS 0xAA
33#define MOUSE_ACK 0xFA
34#define MOUSE_ERROR 0xFC
35
36/*
37 * Scrolling directions
38 *
39 * It may seem odd that the directions are implemented this way, but
40 * this is how it's done on real hardware. It works because the two
41 * scroll wheels can't be used at the same time.
42 */
43#define MOUSE_SCROLL_UP 1
44#define MOUSE_SCROLL_DOWN -1
45#define MOUSE_SCROLL_RIGHT 2
46#define MOUSE_SCROLL_LEFT -2
47
48typedef enum _MOUSE_MODE
49{
54
55typedef struct _MOUSE_PACKET
56{
62
63/* FUNCTIONS ******************************************************************/
64
67BOOLEAN MouseInit(BYTE PS2Connector);
68
69#endif /* _MOUSE_H_ */
unsigned char BOOLEAN
ULONG CurrentPosition
Definition: patchapi.h:57
BYTE * PBYTE
Definition: pedump.c:66
Definition: bl.h:1338
BYTE VertCounter
Definition: mouse.h:59
BYTE Flags
Definition: mouse.h:57
BYTE HorzCounter
Definition: mouse.h:58
BYTE Extra
Definition: mouse.h:60
enum _MOUSE_MODE * PMOUSE_MODE
VOID MouseEventHandler(PMOUSE_EVENT_RECORD MouseEvent)
Definition: mouse.c:427
VOID MouseGetDataFast(PCOORD CurrentPosition, PBYTE CurrentButtonState)
Definition: mouse.c:419
struct _MOUSE_PACKET MOUSE_PACKET
BOOLEAN MouseInit(BYTE PS2Connector)
Definition: mouse.c:464
struct _MOUSE_PACKET * PMOUSE_PACKET
_MOUSE_MODE
Definition: mouse.h:49
@ MOUSE_REMOTE_MODE
Definition: mouse.h:51
@ MOUSE_WRAP_MODE
Definition: mouse.h:52
@ MOUSE_STREAMING_MODE
Definition: mouse.h:50
enum _MOUSE_MODE MOUSE_MODE
unsigned char BYTE
Definition: xxhash.c:193