foo
[oftp] / src / input.h
1 #ifndef INPUT_H_
2 #define INPUT_H_
3
4 enum {
5         EV_KEY,
6         EV_MMOVE,
7         EV_MBUTTON
8 };
9
10 struct event_key {
11         int type;
12         int key;
13 };
14
15 struct event_mmove {
16         int type;
17         int x, y;
18 };
19
20 struct event_mbutton {
21         int type;
22         int x, y, bn, press;
23 };
24
25 union event {
26         int type;
27         struct event_key key;
28         struct event_mmove mmove;
29         struct event_mbutton mbutton;
30 };
31
32
33 int init_input(void);
34 void cleanup_input(void);
35
36 int poll_input(union event *ev);
37 int have_input(void);
38
39 #endif  /* INPUT_H_ */