1 #ifndef MSP_INPUT_TOUCHSCREEN_H_
2 #define MSP_INPUT_TOUCHSCREEN_H_
4 #include <sigc++/trackable.h>
5 #include <msp/graphics/mspgui_api.h>
6 #include <msp/graphics/window.h>
12 class MSPGUI_API Touchscreen: public Device, public sigc::trackable
15 static constexpr unsigned UNUSED = static_cast<unsigned>(-1);
17 Graphics::Window &window;
18 std::vector<unsigned> active_points;
21 Touchscreen(Graphics::Window &);
24 static bool is_available();
26 Graphics::Window &get_window() const { return window; }
28 std::string get_button_name(unsigned) const override;
29 std::string get_axis_name(unsigned) const override;
31 void input_event(const Graphics::Window::Event &);
33 unsigned map_point_id(unsigned);
34 void touch_down(unsigned);
35 void touch_move(unsigned, float, float);
36 void touch_up(unsigned);