Deskflow 1.22.0.197
Keyboard and mouse sharing utility
Loading...
Searching...
No Matches
IEventQueueBuffer Class Referenceabstract

Event queue buffer interface. More...

#include <IEventQueueBuffer.h>

Inheritance diagram for IEventQueueBuffer:
Collaboration diagram for IEventQueueBuffer:

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 EventQueueTimernewTimer (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.

Detailed Description

Event queue buffer interface.

An event queue buffer provides a queue of events for an IEventQueue.

Member Enumeration Documentation

◆ Type

enum class IEventQueueBuffer::Type : uint8_t
strong
Enumerator
Unknown 

No event is available.

System 

Event is a system event.

User 

Event is a user event.

Member Function Documentation

◆ addEvent()

virtual bool IEventQueueBuffer::addEvent ( uint32_t dataID)
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.

◆ deleteTimer()

virtual void IEventQueueBuffer::deleteTimer ( EventQueueTimer * ) const
pure virtual

Destroy a timer object.

Destroy a timer object previously returned by newTimer().

Implemented in deskflow::EiEventQueueBuffer, MSWindowsEventQueueBuffer, OSXEventQueueBuffer, SimpleEventQueueBuffer, and XWindowsEventQueueBuffer.

◆ getEvent()

virtual Type IEventQueueBuffer::getEvent ( Event & event,
uint32_t & dataID )
pure virtual

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.

◆ init()

virtual void IEventQueueBuffer::init ( )
pure virtual

Initialize.

Useful for platform-specific initialisation from a specific thread.

Implemented in deskflow::EiEventQueueBuffer, MSWindowsEventQueueBuffer, OSXEventQueueBuffer, SimpleEventQueueBuffer, and XWindowsEventQueueBuffer.

◆ isEmpty()

virtual bool IEventQueueBuffer::isEmpty ( ) const
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.

◆ newTimer()

virtual EventQueueTimer * IEventQueueBuffer::newTimer ( double duration,
bool oneShot ) const
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.

◆ waitForEvent()

virtual void IEventQueueBuffer::waitForEvent ( double timeout)
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.


The documentation for this class was generated from the following file: