]> git.tdb.fi Git - libs/gui.git/blobdiff - source/input/touchscreen.h
Add decorations for things which should be exported from the library
[libs/gui.git] / source / input / touchscreen.h
index 363111cd3ea18e5936590c12bb3b20099103c96d..a02fb2a841edac9271033ff920e23ac440236553 100644 (file)
@@ -2,19 +2,17 @@
 #define MSP_INPUT_TOUCHSCREEN_H_
 
 #include <sigc++/trackable.h>
+#include <msp/graphics/mspgui_api.h>
 #include <msp/graphics/window.h>
 #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<unsigned>(-1)
-       };
+       static constexpr unsigned UNUSED = static_cast<unsigned>(-1);
 
        Graphics::Window &window;
        std::vector<unsigned> 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 &);