Skip to content

Latest commit

 

History

History
61 lines (48 loc) · 1.11 KB

manymouse.h

File metadata and controls

61 lines (48 loc) · 1.11 KB
 
Jun 27, 2005
Jun 27, 2005
1
/*
Jun 27, 2005
Jun 27, 2005
2
* ManyMouse main header. Include this from your app.
Jun 27, 2005
Jun 27, 2005
3
4
5
6
7
*
* Please see the file LICENSE in the source's root directory.
*
* This file written by Ryan C. Gordon.
*/
Jun 27, 2005
Jun 27, 2005
9
10
#ifndef _INCLUDE_MANYMOUSE_H_
#define _INCLUDE_MANYMOUSE_H_
11
12
13
14
15
#ifdef __cplusplus
extern "C" {
#endif
Jun 28, 2005
Jun 28, 2005
16
17
#define MANYMOUSE_VERSION "0.0.1"
18
19
typedef enum
{
Jun 27, 2005
Jun 27, 2005
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;
Jun 26, 2005
Jun 26, 2005
28
typedef struct
Jun 27, 2005
Jun 27, 2005
30
ManyMouseEventType type;
Jun 26, 2005
Jun 26, 2005
31
32
33
34
35
unsigned int device;
unsigned int item;
int value;
int minval;
int maxval;
Jun 27, 2005
Jun 27, 2005
36
} ManyMouseEvent;
Jun 26, 2005
Jun 26, 2005
39
/* internal use only. */
40
41
42
43
typedef struct
{
int (*init)(void);
void (*quit)(void);
Jun 26, 2005
Jun 26, 2005
44
const char *(*name)(unsigned int index);
Jun 27, 2005
Jun 27, 2005
45
46
int (*poll)(ManyMouseEvent *event);
} ManyMouseDriver;
Jun 27, 2005
Jun 27, 2005
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
Jun 27, 2005
Jun 27, 2005
58
#endif /* !defined _INCLUDE_MANYMOUSE_H_ */
Jun 27, 2005
Jun 27, 2005
60
/* end of manymouse.h ... */