X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Finput%2Fdevice.h;h=e7a779af3159fececfb53acc33f79ea86332500a;hb=3bb7bd5d99a71420b1dfa8d433f4f274bbe280fa;hp=5ef63053ed8e9b59b5ad3442edce6d1f6c28b402;hpb=73eebea348ced3b684d356238858c00b72cf5361;p=libs%2Fgui.git diff --git a/source/input/device.h b/source/input/device.h index 5ef6305..e7a779a 100644 --- a/source/input/device.h +++ b/source/input/device.h @@ -5,12 +5,13 @@ #include #include #include +#include #include namespace Msp { namespace Input { -class device_not_available: public std::runtime_error +class MSPGUI_API device_not_available: public std::runtime_error { public: device_not_available(const std::string &w): std::runtime_error(w) { } @@ -35,7 +36,7 @@ value nominally in the range [-1, 1]. Event handlers return a boolean indicating whether the event is considered processed. If a handler returns true, no further handlers are invoked. */ -class Device +class MSPGUI_API Device { protected: struct EventAccumulator @@ -57,7 +58,7 @@ public: sigc::signal::accumulated signal_axis_motion; protected: - DeviceType type; + DeviceType type = UNSPECIFIED; std::string name; std::vector buttons; std::vector axes; @@ -81,8 +82,8 @@ protected: }; -void operator>>(const LexicalConverter &, DeviceType &); -void operator<<(LexicalConverter &, DeviceType); +MSPGUI_API void operator>>(const LexicalConverter &, DeviceType &); +MSPGUI_API void operator<<(LexicalConverter &, DeviceType); } // namespace Input } // namespace Msp