]> git.tdb.fi Git - libs/gui.git/blobdiff - source/input/gamecontroller.h
Use default member initializers and defaulted default constructors
[libs/gui.git] / source / input / gamecontroller.h
index 9ebacee7becbc495c28b27b30e8118804657e698..6393ac09358a6b297cc2f0b261e5c94dccd8a5cd 100644 (file)
@@ -1,6 +1,8 @@
-#ifndef GAMECONTROLLER_H_
-#define GAMECONTROLLER_H_
+#ifndef MSP_INPUT_GAMECONTROLLER_H_
+#define MSP_INPUT_GAMECONTROLLER_H_
 
+#include <msp/io/eventdispatcher.h>
+#include <msp/time/timedelta.h>
 #include "device.h"
 
 namespace Msp {
@@ -11,13 +13,23 @@ class GameController: public Device
 private:
        struct Private;
 
-       Private *priv;
+       Private *priv = 0;
+       IO::EventDispatcher *event_disp = 0;
+
+       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 *);
 
        void tick();
+       void tick(const Time::TimeDelta &);
 };
 
 } // namespace Input