1 #ifndef MSP_INPUT_TOUCHSCREEN_H_
2 #define MSP_INPUT_TOUCHSCREEN_H_
4 #include <sigc++/trackable.h>
5 #include <msp/graphics/window.h>
11 class Touchscreen: public Device, public sigc::trackable
16 UNUSED = static_cast<unsigned>(-1)
19 Graphics::Window &window;
20 std::vector<unsigned> active_points;
23 Touchscreen(Graphics::Window &);
26 static bool is_available();
28 Graphics::Window &get_window() const { return window; }
30 virtual std::string get_button_name(unsigned) const;
31 virtual std::string get_axis_name(unsigned) const;
33 void input_event(const Graphics::Window::Event &);
35 unsigned map_point_id(unsigned);
36 void touch_down(unsigned);
37 void touch_move(unsigned, float, float);
38 void touch_up(unsigned);