PS2SDK
PS2 Homebrew Libraries
ps2mouse.h
Go to the documentation of this file.
1 /*
2 # _____ ___ ____ ___ ____
3 # ____| | ____| | | |____|
4 # | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
5 #-----------------------------------------------------------------------
6 # Copyright 2001-2004, ps2dev - http://www.ps2dev.org
7 # Licenced under Academic Free License version 2.0
8 # Review ps2sdk README & LICENSE files for further details.
9 */
10 
16 #ifndef __PS2MOUSE_H__
17 #define __PS2MOUSE_H__
18 
19 #include <types.h>
20 
21 typedef struct _mouse_data
22 {
23  s32 x, y;
24  s32 wheel;
25  u32 buttons;
26 } mouse_data;
27 
28 #define PS2MOUSE_READMODE_DIFF 0
29 #define PS2MOUSE_READMODE_ABS 1
30 
31 /* Define mouse button constants */
32 
33 #define PS2MOUSE_BTN1 1
34 #define PS2MOUSE_BTN2 2
35 #define PS2MOUSE_BTN3 4
36 #define PS2MOUSE_BTN1DBL (PS2MOUSE_BTN1 << 8)
37 #define PS2MOUSE_BTN2DBL (PS2MOUSE_BTN2 << 8)
38 #define PS2MOUSE_BTN3DBL (PS2MOUSE_BTN3 << 8)
39 
40 /* RPC Defines */
41 
42 #define PS2MOUSE_BIND_RPC_ID 0x500C001
43 #define PS2MOUSE_READ 0x1
44 #define PS2MOUSE_SETREADMODE 0x2
45 #define PS2MOUSE_GETREADMODE 0x3
46 #define PS2MOUSE_SETTHRES 0x4
47 #define PS2MOUSE_GETTHRES 0x5
48 #define PS2MOUSE_SETACCEL 0x6
49 #define PS2MOUSE_GETACCEL 0x7
50 #define PS2MOUSE_SETBOUNDARY 0x8
51 #define PS2MOUSE_GETBOUNDARY 0x9
52 #define PS2MOUSE_SETPOSITION 0xA
53 #define PS2MOUSE_RESET 0xB
54 #define PS2MOUSE_ENUM 0xC
55 #define PS2MOUSE_SETDBLCLICKTIME 0xD
56 #define PS2MOUSE_GETDBLCLICKTIME 0xE
57 #define PS2MOUSE_GETVERSION 0x20
58 
59 #endif /* __PS2MOUSE_H__ */
_mouse_data
Definition: ps2mouse.h:21