Deskflow 1.22.0.197
Keyboard and mouse sharing utility
Loading...
Searching...
No Matches
MSWindowsEventQueueBuffer.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
11
12#define WIN32_LEAN_AND_MEAN
13#include <Windows.h>
14
15class IEventQueue;
16
19{
20public:
22 ~MSWindowsEventQueueBuffer() override = default;
23
24 // IEventQueueBuffer overrides
25 void init() override
26 {
27 }
28 void waitForEvent(double timeout) override;
29 Type getEvent(Event &event, uint32_t &dataID) override;
30 bool addEvent(uint32_t dataID) override;
31 bool isEmpty() const override;
32 EventQueueTimer *newTimer(double duration, bool oneShot) const override;
33 void deleteTimer(EventQueueTimer *) const override;
34
35private:
36 DWORD m_thread;
37 UINT m_userEvent;
38 MSG m_event;
39 UINT m_daemonQuit;
40 IEventQueue *m_events;
41};
static const WSAEVENT FAR DWORD
Definition ArchNetworkWinsock.cpp:54
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
Type
Definition IEventQueueBuffer.h:24
Event queue interface.
Definition IEventQueue.h:32
bool isEmpty() const override
Check if event queue buffer is empty.
Definition MSWindowsEventQueueBuffer.cpp:104
bool addEvent(uint32_t dataID) override
Post an event.
Definition MSWindowsEventQueueBuffer.cpp:99
~MSWindowsEventQueueBuffer() override=default
void waitForEvent(double timeout) override
Block waiting for an event.
Definition MSWindowsEventQueueBuffer.cpp:42
MSWindowsEventQueueBuffer(IEventQueue *events)
Definition MSWindowsEventQueueBuffer.cpp:26
Type getEvent(Event &event, uint32_t &dataID) override
Get the next event.
Definition MSWindowsEventQueueBuffer.cpp:67
EventQueueTimer * newTimer(double duration, bool oneShot) const override
Create a timer object.
Definition MSWindowsEventQueueBuffer.cpp:109
void deleteTimer(EventQueueTimer *) const override
Destroy a timer object.
Definition MSWindowsEventQueueBuffer.cpp:114
void init() override
Initialize.
Definition MSWindowsEventQueueBuffer.h:25