X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Finput%2Ftouchscreen.h;h=a02fb2a841edac9271033ff920e23ac440236553;hb=d7686e3867e3c68cec0d3767a21f9d2408383085;hp=363111cd3ea18e5936590c12bb3b20099103c96d;hpb=1d7113259625a91f5f6d2f53365aad22ae744689;p=libs%2Fgui.git diff --git a/source/input/touchscreen.h b/source/input/touchscreen.h index 363111c..a02fb2a 100644 --- a/source/input/touchscreen.h +++ b/source/input/touchscreen.h @@ -2,19 +2,17 @@ #define MSP_INPUT_TOUCHSCREEN_H_ #include +#include #include #include "device.h" namespace Msp { namespace Input { -class Touchscreen: public Device, public sigc::trackable +class MSPGUI_API Touchscreen: public Device, public sigc::trackable { private: - enum - { - UNUSED = static_cast(-1) - }; + static constexpr unsigned UNUSED = static_cast(-1); Graphics::Window &window; std::vector active_points; @@ -23,8 +21,12 @@ public: Touchscreen(Graphics::Window &); ~Touchscreen(); - virtual std::string get_button_name(unsigned) const; - virtual std::string get_axis_name(unsigned) const; + static bool is_available(); + + Graphics::Window &get_window() const { return window; } + + std::string get_button_name(unsigned) const override; + std::string get_axis_name(unsigned) const override; private: void input_event(const Graphics::Window::Event &);