gameui

view include/event.h @ 5:5a84873185ff

rudimentary theme plugin system and other minor fixes
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 22 Mar 2014 01:50:01 +0200
parents src/event.h@e0916bb20b7f
children
line source
1 #ifndef EVENT_H_
2 #define EVENT_H_
4 #include "vec.h"
6 namespace goatkit {
8 enum EventType {
9 EV_MOUSE_BUTTON,
10 EV_MOUSE_MOTION,
11 EV_MOUSE_FOCUS,
12 EV_KEY
13 };
15 struct ButtonEvent {
16 Vec2 pos;
17 int button;
18 bool press;
19 };
21 struct MotionEvent {
22 Vec2 pos;
23 };
25 struct FocusEvent {
26 bool enter;
27 };
29 struct KeyEvent {
30 int key;
31 bool press;
32 };
34 struct Event {
35 EventType type;
37 ButtonEvent button;
38 MotionEvent motion;
39 FocusEvent focus;
40 KeyEvent key;
41 };
43 } // namespace goatkit
45 #endif // EVENT_H_