]> Dogcows Code - chaz/openbox/blob - otk/timerqueuemanager.hh
fix indenting
[chaz/openbox] / otk / timerqueuemanager.hh
1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
2 #ifndef __timerqueuemanager_hh
3 #define __timerqueuemanager_hh
4
5 #include "timerqueue.hh"
6
7 namespace otk {
8
9 //! Manages a queue of Timer objects
10 /*!
11 All Timer objects add themself to a TimerQueueManager. The manager is
12 what fires the timers when their time has elapsed. This is done by having the
13 application call the TimerQueueManager::fire class in its main event loop.
14 */
15 class TimerQueueManager {
16 private:
17 //! A priority queue of all timers being managed by this class.
18 TimerQueue timerList;
19 public:
20 //! Constructs a new TimerQueueManager
21 TimerQueueManager() {}
22 //! Destroys the TimerQueueManager
23 virtual ~TimerQueueManager() {}
24
25 //! Fire the next timer in the queue.
26 /*!
27 @param wait If true, this function will wait for the next timer, breaking
28 on any events from the X server.
29 */
30 virtual void fire(bool wait = true);
31
32 //! Adds a new timer to the queue
33 /*!
34 @param timer An Timer to add to the queue
35 */
36 virtual void addTimer(Timer* timer);
37 //! Removes a timer from the queue
38 /*!
39 @param timer An Timer already in the queue to remove
40 */
41 virtual void removeTimer(Timer* timer);
42 };
43
44 }
45
46 #endif // __timerqueuemanager_hh
This page took 0.037721 seconds and 4 git commands to generate.