Modules - Implementing mouse multiplexer
[tpg/acess2.git] / KernelLand / Modules / Input / Mouse / include / mouse_int.h
1 /*
2  * Acess2 Kernel - Mouse Mulitplexing Driver
3  * - By John Hodge (thePowersGang)
4  *
5  * include/mouse_int.h
6  * - Mouse mulitplexing interface header
7  */
8 #ifndef _MOUSE__MOUSE_INT_H_
9 #define _MOUSE__MOUSE_INT_H_
10
11 #include <api_drv_joystick.h>
12
13 typedef struct sPointer tPointer;
14
15 /*
16  * \brief Input device type (doesn't hold much)
17  */
18 struct sMouse
19 {
20         tMouse  *Next;
21         tPointer        *Pointer;
22          int    NumButtons;
23          int    NumAxies;
24         Uint32  ButtonState;
25          int    LastAxisVal[];
26 };
27
28 #define MAX_BUTTONS     6
29 #define MAX_AXIES       4
30 #define MAX_FILESIZE    (sizeof(tJoystick_FileHeader) + MAX_AXIES*sizeof(tJoystick_Axis) + MAX_BUTTONS)
31
32 /**
33  */
34 struct sPointer
35 {
36         tPointer        *Next;
37
38         tMouse  *FirstDev;
39
40         // Node
41         tVFS_Node       Node;
42
43         // Data
44         Uint8   FileData[MAX_FILESIZE];
45         tJoystick_FileHeader    *FileHeader;
46         tJoystick_Axis  *Axies;
47         Uint8   *Buttons;
48
49         // Limits for axis positions
50         Uint16  AxisLimits[MAX_AXIES];
51 };
52
53 #endif
54

UCC git Repository :: git.ucc.asn.au