};
+enum DeviceType
+{
+ UNSPECIFIED,
+ KEYBOARD,
+ MOUSE,
+ TOUCH_SURFACE,
+ GAME_CONTROLLER
+};
+
+
/**
Base class for input devices. Input devices have two types of controls:
buttons and axes. Buttons are either on or off. Axes have a floating point
sigc::signal<bool, unsigned, float, float>::accumulated<EventAccumulator> signal_axis_motion;
protected:
+ DeviceType type;
std::string name;
std::vector<char> buttons;
std::vector<float> axes;
- Device();
+ Device(DeviceType);
public:
virtual ~Device();
+ DeviceType get_type() const { return type; }
const std::string &get_name() const { return name; }
bool get_button_state(unsigned) const;
float get_axis_value(unsigned) const;