removed clang-format and clang_complete files from the repo
[dosdemo] / src / sball.h
1 #ifndef SBALL_H_
2 #define SBALL_H_
3
4 enum {
5         SBALL_EV_NONE,
6         SBALL_EV_MOTION,
7         SBALL_EV_BUTTON
8 };
9
10 struct sball_event_motion {
11         int type;
12         int motion[6];
13 };
14
15 struct sball_event_button {
16         int type;
17         int id;
18         int pressed;
19         unsigned int state;
20 };
21
22 typedef union sball_event {
23         int type;
24         struct sball_event_motion motion;
25         struct sball_event_button button;
26 } sball_event;
27
28 int sball_init(void);
29 void sball_shutdown(void);
30
31 int sball_getdev(void);
32
33 int sball_pending(void);
34 int sball_getevent(sball_event *ev);
35
36 #endif  /* SBALL_H_ */