1 #ifndef ORG_EEROS_HAL_MOUSE_HPP_
2 #define ORG_EEROS_HAL_MOUSE_HPP_
6 #include <linux/input.h>
8 #define MOUSE_BUTTON_COUNT (16)
9 #define MOUSE_AXIS_COUNT (8)
36 virtual bool open(
const char* device);
39 virtual void on_event(std::function<
void(
struct input_event)> action);
40 virtual void on_button(std::function<
void(
int,
bool)> action);
41 virtual void on_axis(std::function<
void(
int,
signed)> action);
43 virtual std::string
name();
50 std::function<void(struct input_event)> event_action;
51 std::function<void(int, bool)> button_action;
52 std::function<void(int, signed)> axis_action;
57 #endif // ORG_EEROS_HAL_MOUSE_HPP_
struct eeros::hal::MouseState::@5 button
bool middle
Definition: Mouse.hpp:19
virtual void close()
Definition: Mouse.cpp:35
signed y
Definition: Mouse.hpp:25
signed z
Definition: Mouse.hpp:26
signed r
Definition: Mouse.hpp:27
virtual std::string name()
Definition: Mouse.cpp:40
signed x
Definition: Mouse.hpp:24
struct eeros::hal::MouseState::@6 axis
bool right
Definition: Mouse.hpp:20
bool left
Definition: Mouse.hpp:18
virtual bool open(const char *device)
Definition: Mouse.cpp:29
virtual void on_button(std::function< void(int, bool)> action)
Definition: Mouse.cpp:61
virtual void loop()
Definition: Mouse.cpp:72
Mouse()
Definition: Mouse.cpp:10
MouseState last
Definition: Mouse.hpp:46
~Mouse()
Definition: Mouse.cpp:24
virtual void on_event(std::function< void(struct input_event)> action)
Definition: Mouse.cpp:56
virtual void on_axis(std::function< void(int, signed)> action)
Definition: Mouse.cpp:66
MouseState current
Definition: Mouse.hpp:45