]>
Dogcows Code - chaz/openbox/blob - timerqueuemanager.hh
042ede4c6c2ff035b67f007b3a4851adfb081c6b
1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
2 #ifndef __timerqueuemanager_hh
3 #define __timerqueuemanager_hh
5 #include "timerqueue.hh"
9 //! Manages a queue of Timer objects
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.
15 class TimerQueueManager
{
17 //! A priority queue of all timers being managed by this class.
20 //! Constructs a new TimerQueueManager
21 TimerQueueManager() {}
22 //! Destroys the TimerQueueManager
23 virtual ~TimerQueueManager() {}
25 //! Fire the next timer in the queue.
27 @param wait If true, this function will wait for the next timer, breaking
28 on any events from the X server.
30 virtual void fire(bool wait
= true);
32 //! Adds a new timer to the queue
34 @param timer An Timer to add to the queue
36 virtual void addTimer(Timer
* timer
);
37 //! Removes a timer from the queue
39 @param timer An Timer already in the queue to remove
41 virtual void removeTimer(Timer
* timer
);
46 #endif // __timerqueuemanager_hh
This page took 0.03474 seconds and 3 git commands to generate.