experiment #1: writing some pixels in the framebuffer device and cls
[winnie] / src / event.cc
1 #include "event.h"
2
3 static DisplayFuncType display_func;
4 static KeyboardFuncType keyboard_func;
5 static MouseButtonFuncType mouse_button_func;
6 static MouseMotionFuncType mouse_motion_func;
7
8 void set_display_callback(DisplayFuncType display)
9 {
10         display_func = display;
11 }
12
13 void set_keyboard_callback(KeyboardFuncType keyboard)
14 {
15         keyboard_func = keyboard;
16 }
17
18 void set_mouse_button_callback(MouseButtonFuncType mouse_button)
19 {
20         mouse_button_func = mouse_button;
21 }
22
23 void set_mouse_motion_callback(MouseMotionFuncType mouse_motion)
24 {
25         mouse_motion_func = mouse_motion;
26 }
27
28 DisplayFuncType get_display_callback()
29 {
30         return display_func;
31 }
32
33 KeyboardFuncType get_keyboard_callback()
34 {
35         return keyboard_func;
36 }
37
38 MouseButtonFuncType get_mouse_button_callback()
39 {
40         return mouse_button_func;
41 }
42
43 MouseMotionFuncType get_mouse_motion_callback()
44 {
45         return mouse_motion_func;
46 }