Deskflow 1.22.0.197
Keyboard and mouse sharing utility
Loading...
Searching...
No Matches
IEventQueueBuffer.h
Go to the documentation of this file.
1/*
2 * Deskflow -- mouse and keyboard sharing utility
3 * SPDX-FileCopyrightText: (C) 2012 - 2016 Symless Ltd.
4 * SPDX-FileCopyrightText: (C) 2004 Chris Schoeneman
5 * SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
6 */
7
8#pragma once
9
10#include "common/Common.h"
11#include "common/IInterface.h"
12
13class Event;
14class EventQueueTimer;
15
17
21{
22public:
23 enum class Type : uint8_t
24 {
28 };
29
31
32
34
37 virtual void init() = 0;
38
40
44 virtual void waitForEvent(double timeout) = 0;
45
47
55 virtual Type getEvent(Event &event, uint32_t &dataID) = 0;
56
58
64 virtual bool addEvent(uint32_t dataID) = 0;
65
67
69
71
74 virtual bool isEmpty() const = 0;
75
77
82 virtual EventQueueTimer *newTimer(double duration, bool oneShot) const = 0;
83
85
88 virtual void deleteTimer(EventQueueTimer *) const = 0;
89
91};
static fd_set FAR fd_set FAR fd_set FAR const struct timeval FAR * timeout
Definition ArchNetworkWinsock.cpp:39
Definition SimpleEventQueueBuffer.cpp:13
Event.
Definition Event.h:27
Event queue buffer interface.
Definition IEventQueueBuffer.h:21
virtual void deleteTimer(EventQueueTimer *) const =0
Destroy a timer object.
virtual Type getEvent(Event &event, uint32_t &dataID)=0
Get the next event.
Type
Definition IEventQueueBuffer.h:24
@ Unknown
No event is available.
Definition IEventQueueBuffer.h:25
@ User
Event is a user event.
Definition IEventQueueBuffer.h:27
@ System
Event is a system event.
Definition IEventQueueBuffer.h:26
virtual EventQueueTimer * newTimer(double duration, bool oneShot) const =0
Create a timer object.
virtual void init()=0
Initialize.
virtual void waitForEvent(double timeout)=0
Block waiting for an event.
virtual bool addEvent(uint32_t dataID)=0
Post an event.
virtual bool isEmpty() const =0
Check if event queue buffer is empty.
Base class of interfaces.
Definition IInterface.h:18