3 This file is part of libmspgbase
4 Copyright © 2007 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
8 #ifndef MSP_GBASE_INPUTDEVICE_H_
9 #define MSP_GBASE_INPUTDEVICE_H_
12 #include <sigc++/signal.h>
18 Base class for input devices. Input devices have two types of controls:
19 buttons and axes. Buttons are either on or off. Axes have a floating-point
20 value, with range depending on the device.
25 sigc::signal<void, unsigned> signal_button_press;
26 sigc::signal<void, unsigned> signal_button_release;
27 sigc::signal<void, unsigned, float, float> signal_axis_motion;
30 std::vector<char> buttons;
31 std::vector<float> axes;
35 bool get_button_state(unsigned);
36 float get_axis_value(unsigned);
38 void set_button_state(unsigned, bool, bool);
39 void set_axis_value(unsigned, float, bool);