]> git.tdb.fi Git - libs/gui.git/blobdiff - source/input/gamecontroller.h
Add decorations for things which should be exported from the library
[libs/gui.git] / source / input / gamecontroller.h
index 84c50b51c377cd7105947f8109cdfb25d982b155..8fbaea90f7eb86e8f528834c6a55d6de2266bdb4 100644 (file)
@@ -1,6 +1,7 @@
 #ifndef MSP_INPUT_GAMECONTROLLER_H_
 #define MSP_INPUT_GAMECONTROLLER_H_
 
+#include <msp/graphics/mspgui_api.h>
 #include <msp/io/eventdispatcher.h>
 #include <msp/time/timedelta.h>
 #include "device.h"
@@ -8,17 +9,23 @@
 namespace Msp {
 namespace Input {
 
-class GameController: public Device
+class MSPGUI_API GameController: public Device
 {
 private:
        struct Private;
 
-       Private *priv;
-       IO::EventDispatcher *event_disp;
+       Private *priv = nullptr;
+       IO::EventDispatcher *event_disp = nullptr;
+
+       static bool detect_done;
+       static unsigned n_detected_controllers;
 
 public:
        GameController(unsigned);
-       virtual ~GameController();
+       ~GameController();
+
+       static unsigned detect();
+       static bool is_available(unsigned = 0);
 
        void use_event_dispatcher(IO::EventDispatcher *);