/
manymouse.h
61 lines (48 loc) · 1.11 KB
1
/*
2
* ManyMouse main header. Include this from your app.
3
4
5
6
7
*
* Please see the file LICENSE in the source's root directory.
*
* This file written by Ryan C. Gordon.
*/
8
9
10
#ifndef _INCLUDE_MANYMOUSE_H_
#define _INCLUDE_MANYMOUSE_H_
11
12
13
14
15
#ifdef __cplusplus
extern "C" {
#endif
16
17
#define MANYMOUSE_VERSION "0.0.1"
18
19
typedef enum
{
20
21
22
23
24
25
26
MANYMOUSE_EVENT_ABSMOTION = 0,
MANYMOUSE_EVENT_RELMOTION,
MANYMOUSE_EVENT_BUTTON,
MANYMOUSE_EVENT_SCROLL,
MANYMOUSE_EVENT_DISCONNECT,
MANYMOUSE_EVENT_MAX
} ManyMouseEventType;
27
28
typedef struct
29
{
30
ManyMouseEventType type;
31
32
33
34
35
unsigned int device;
unsigned int item;
int value;
int minval;
int maxval;
36
} ManyMouseEvent;
37
38
39
/* internal use only. */
40
41
42
43
typedef struct
{
int (*init)(void);
void (*quit)(void);
44
const char *(*name)(unsigned int index);
45
46
int (*poll)(ManyMouseEvent *event);
} ManyMouseDriver;
47
48
49
50
51
52
int ManyMouse_Init(void);
void ManyMouse_Quit(void);
const char *ManyMouse_DeviceName(unsigned int index);
int ManyMouse_PollEvent(ManyMouseEvent *event);
53
54
55
56
57
#ifdef __cplusplus
}
#endif
58
#endif /* !defined _INCLUDE_MANYMOUSE_H_ */
59
60
/* end of manymouse.h ... */