]> git.tdb.fi Git - libs/gui.git/blobdiff - source/input/control.h
Add decorations for things which should be exported from the library
[libs/gui.git] / source / input / control.h
index dcf7bf341047e71249440ba6114738cce367af96..177776d1a4aac86dc413a5364a7e0cdd4900113c 100644 (file)
@@ -4,6 +4,7 @@
 #include <string>
 #include <sigc++/signal.h>
 #include <sigc++/trackable.h>
+#include <msp/graphics/mspgui_api.h>
 
 namespace Msp {
 namespace Input {
@@ -13,7 +14,7 @@ class Device;
 
 enum ControlSrcType
 {
-       NONE,
+       NO_SOURCE,
        BUTTON,
        AXIS_POS,
        AXIS_NEG
@@ -23,10 +24,10 @@ enum ControlSrcType
 Specifies the source of a control.  This provides a way for setting sources for
 different types of controls in a uniform way.
 */
-struct ControlSource
+struct MSPGUI_API ControlSource
 {
-       Device *dev = 0;
-       ControlSrcType type = NONE;
+       Device *dev = nullptr;
+       ControlSrcType type = NO_SOURCE;
        unsigned index = 0;
 
        ControlSource() = default;
@@ -48,15 +49,15 @@ active for any events to be processed.  This can be used to implement shifted
 controls (when used on a BinaryControl) or click-and-drag functionality (when
 used on a SmoothControl).
 */
-class Control: public sigc::trackable
+class MSPGUI_API Control: public sigc::trackable
 {
 public:
        sigc::signal<void> signal_capture_complete;
 
 protected:
        ControlSource src;
-       Device *capture_dev = 0;
-       BinaryControl *activator = 0;
+       Device *capture_dev = nullptr;
+       BinaryControl *activator = nullptr;
        float origin = 0.0f;
        bool rising_edge = false;
        bool falling_edge = false;