mirror of
https://github.com/debauchee/barrier.git
synced 2026-07-05 11:28:22 +08:00
Refactored event queue. The event queue is now separated from the
buffer that holds the events and generates system events. This allows us to switch in/out a platform specific event handler as necessary without losing our timers and handlers.
This commit is contained in:
@@ -21,9 +21,10 @@
|
||||
#define EVENTQUEUE IEventQueue::getInstance()
|
||||
|
||||
class IEventJob;
|
||||
class IEventQueueBuffer;
|
||||
|
||||
// Opaque type for timer info. This is defined by subclasses of
|
||||
// IEventQueue.
|
||||
// IEventQueueBuffer.
|
||||
class CEventQueueTimer;
|
||||
|
||||
//! Event queue interface
|
||||
@@ -44,6 +45,13 @@ public:
|
||||
//! @name manipulators
|
||||
//@{
|
||||
|
||||
//! Set the buffer
|
||||
/*!
|
||||
Replace the current event queue buffer. Any queued events are
|
||||
discarded. The queue takes ownership of the buffer.
|
||||
*/
|
||||
virtual void adoptBuffer(IEventQueueBuffer*) = 0;
|
||||
|
||||
//! Remove event from queue
|
||||
/*!
|
||||
Returns the next event on the queue into \p event. If no event is
|
||||
|
||||
Reference in New Issue
Block a user