projects
/
oftp
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
ac1a546b83a90fe123f6970df881f0bb394df7a5
[oftp]
/
src
/
input.h
1
#ifndef INPUT_H_
2
#define INPUT_H_
3
4
enum {
5
KB_DEL = 128,
6
KB_INS,
7
KB_UP,
8
KB_DOWN,
9
KB_LEFT,
10
KB_RIGHT,
11
KB_HOME,
12
KB_END,
13
KB_PGUP,
14
KB_PGDN
15
};
16
17
enum {
18
EV_KEY,
19
EV_MMOVE,
20
EV_MBUTTON
21
};
22
23
struct event_key {
24
int type;
25
int key;
26
};
27
28
struct event_mmove {
29
int type;
30
int x, y;
31
};
32
33
struct event_mbutton {
34
int type;
35
int x, y, bn, press;
36
};
37
38
union event {
39
int type;
40
struct event_key key;
41
struct event_mmove mmove;
42
struct event_mbutton mbutton;
43
};
44
45
46
int init_input(void);
47
void cleanup_input(void);
48
49
int poll_input(union event *ev);
50
int have_input(void);
51
52
#endif /* INPUT_H_ */