diff options
Diffstat (limited to 'SwifTools/Idle/IdleDetector.h')
-rw-r--r-- | SwifTools/Idle/IdleDetector.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/SwifTools/Idle/IdleDetector.h b/SwifTools/Idle/IdleDetector.h new file mode 100644 index 0000000..1fb3d69 --- /dev/null +++ b/SwifTools/Idle/IdleDetector.h @@ -0,0 +1,24 @@ +#pragma once + +#include <boost/signals.hpp> +#include <boost/shared_ptr.hpp> + +namespace Swift { + class IdleDetector { + public: + virtual ~IdleDetector(); + + void setIdleTimeSeconds(int time) { + idleTimeSeconds = time; + } + + int getIdleTimeSeconds() const { + return idleTimeSeconds; + } + + boost::signal<void (bool /* isIdle */)> onIdleChanged; + + private: + int idleTimeSeconds; + }; +} |