X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Finput%2Fgamecontroller.h;h=863f66f3e5a338bea6d8cdb2acdcb3968f7f43b3;hb=7262f1e7e9ea88a021c14de9dc06ebe76112afd7;hp=9ebacee7becbc495c28b27b30e8118804657e698;hpb=051149e5026ff64f3ec477cf19080124b82de619;p=libs%2Fgui.git diff --git a/source/input/gamecontroller.h b/source/input/gamecontroller.h index 9ebacee..863f66f 100644 --- a/source/input/gamecontroller.h +++ b/source/input/gamecontroller.h @@ -1,6 +1,8 @@ -#ifndef GAMECONTROLLER_H_ -#define GAMECONTROLLER_H_ +#ifndef MSP_INPUT_GAMECONTROLLER_H_ +#define MSP_INPUT_GAMECONTROLLER_H_ +#include +#include #include "device.h" namespace Msp { @@ -12,12 +14,22 @@ private: struct Private; Private *priv; + IO::EventDispatcher *event_disp; + + static bool detect_done; + static unsigned n_detected_controllers; public: GameController(unsigned); virtual ~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