Deskflow 1.22.0.197
Keyboard and mouse sharing utility
|
Event queue buffer interface. More...
#include <IEventQueueBuffer.h>
Public Types | |
enum class | Type : uint8_t { Unknown , System , User } |
Public Member Functions | |
manipulators | |
virtual void | init ()=0 |
Initialize. | |
virtual void | waitForEvent (double timeout)=0 |
Block waiting for an event. | |
virtual Type | getEvent (Event &event, uint32_t &dataID)=0 |
Get the next event. | |
virtual bool | addEvent (uint32_t dataID)=0 |
Post an event. | |
accessors | |
virtual bool | isEmpty () const =0 |
Check if event queue buffer is empty. | |
virtual EventQueueTimer * | newTimer (double duration, bool oneShot) const =0 |
Create a timer object. | |
virtual void | deleteTimer (EventQueueTimer *) const =0 |
Destroy a timer object. | |
Public Member Functions inherited from IInterface | |
virtual | ~IInterface ()=default |
Interface destructor does nothing. |
Event queue buffer interface.
An event queue buffer provides a queue of events for an IEventQueue.
|
strong |
|
pure virtual |
Post an event.
Add the given event to the end of the queue buffer. This is a user event and getEvent()
must be able to identify it as such and return dataID
. This method must cause waitForEvent()
to return at some future time if it's blocked waiting on an event.
Implemented in deskflow::EiEventQueueBuffer, MSWindowsEventQueueBuffer, OSXEventQueueBuffer, SimpleEventQueueBuffer, and XWindowsEventQueueBuffer.
|
pure virtual |
Destroy a timer object.
Destroy a timer object previously returned by newTimer()
.
Implemented in deskflow::EiEventQueueBuffer, MSWindowsEventQueueBuffer, OSXEventQueueBuffer, SimpleEventQueueBuffer, and XWindowsEventQueueBuffer.
Get the next event.
Get the next event from the buffer. Return None if no event is available. If a system event is next, return System and fill in event. The event data in a system event can point to a static buffer (because Event::deleteData() will not attempt to delete data in a System event). Otherwise, return User and fill in dataID
with the value passed to addEvent()
.
Implemented in deskflow::EiEventQueueBuffer, MSWindowsEventQueueBuffer, OSXEventQueueBuffer, SimpleEventQueueBuffer, and XWindowsEventQueueBuffer.
|
pure virtual |
Initialize.
Useful for platform-specific initialisation from a specific thread.
Implemented in deskflow::EiEventQueueBuffer, MSWindowsEventQueueBuffer, OSXEventQueueBuffer, SimpleEventQueueBuffer, and XWindowsEventQueueBuffer.
|
pure virtual |
Check if event queue buffer is empty.
Return true iff the event queue buffer is empty.
Implemented in deskflow::EiEventQueueBuffer, MSWindowsEventQueueBuffer, OSXEventQueueBuffer, SimpleEventQueueBuffer, and XWindowsEventQueueBuffer.
|
pure virtual |
Create a timer object.
Create and return a timer object. The object is opaque and is used only by the buffer but it must be a valid object (i.e. not nullptr).
Implemented in deskflow::EiEventQueueBuffer, MSWindowsEventQueueBuffer, OSXEventQueueBuffer, SimpleEventQueueBuffer, and XWindowsEventQueueBuffer.
|
pure virtual |
Block waiting for an event.
Wait for an event in the event queue buffer for up to timeout
seconds.
Implemented in deskflow::EiEventQueueBuffer, MSWindowsEventQueueBuffer, OSXEventQueueBuffer, SimpleEventQueueBuffer, and XWindowsEventQueueBuffer.