#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;
Touchscreen(Graphics::Window &);
~Touchscreen();
+ static bool is_available();
+
Graphics::Window &get_window() const { return window; }
- virtual std::string get_button_name(unsigned) const;
- virtual std::string get_axis_name(unsigned) const;
+ std::string get_button_name(unsigned) const override;
+ std::string get_axis_name(unsigned) const override;
private:
void input_event(const Graphics::Window::Event &);