]>
Dogcows Code - chaz/openbox/blob - otk/timerqueuemanager.hh
1 // -*- mode: C++; indent-tabs-mode: nil; -*-
2 #ifndef __timerqueuemanager_hh
3 #define __timerqueuemanager_hh
5 #include "timerqueue.hh"
9 //! Manages a queue of OBTimer objects
11 All OBTimer objects add themself to an OBTimerQueueManager. The manager is
12 what fires the timers when their time has elapsed. This is done by having the
13 application call the OBTimerQueueManager::fire class in its main event loop.
15 class OBTimerQueueManager
{
17 //! A priority queue of all timers being managed by this class.
20 //! Constructs a new OBTimerQueueManager
21 OBTimerQueueManager() {}
22 //! Destroys the OBTimerQueueManager
23 virtual ~OBTimerQueueManager() {}
25 //! Will wait for and fire the next timer in the queue.
27 The function will stop waiting if an event is received from the X server.
31 //! Adds a new timer to the queue
33 @param timer An OBTimer to add to the queue
35 virtual void addTimer(OBTimer
* timer
);
36 //! Removes a timer from the queue
38 @param timer An OBTimer already in the queue to remove
40 virtual void removeTimer(OBTimer
* timer
);
45 #endif // __timerqueuemanager_hh
This page took 0.038745 seconds and 4 git commands to generate.