Deskflow 1.24.0.365
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 const UINT m_supportedMessages = (QS_ALLINPUT & ~(QS_TOUCH | QS_POINTER));
42};
static const WSAEVENT FAR DWORD
Definition ArchNetworkWinsock.cpp:55
static fd_set FAR fd_set FAR fd_set FAR const struct timeval FAR * timeout
Definition ArchNetworkWinsock.cpp:40
Definition EventQueueTimer.h:12
Event.
Definition Event.h:29
Event queue buffer interface.
Definition IEventQueueBuffer.h:22
Type
Definition IEventQueueBuffer.h:26
Event queue interface.
Definition IEventQueue.h:29
bool isEmpty() const override
Check if event queue buffer is empty.
Definition MSWindowsEventQueueBuffer.cpp:96
bool addEvent(uint32_t dataID) override
Post an event.
Definition MSWindowsEventQueueBuffer.cpp:91
~MSWindowsEventQueueBuffer() override=default
void waitForEvent(double timeout) override
Block waiting for an event.
Definition MSWindowsEventQueueBuffer.cpp:34
MSWindowsEventQueueBuffer(IEventQueue *events)
Definition MSWindowsEventQueueBuffer.cpp:18
Type getEvent(Event &event, uint32_t &dataID) override
Get the next event.
Definition MSWindowsEventQueueBuffer.cpp:59
EventQueueTimer * newTimer(double duration, bool oneShot) const override
Create a timer object.
Definition MSWindowsEventQueueBuffer.cpp:101
void deleteTimer(EventQueueTimer *) const override
Destroy a timer object.
Definition MSWindowsEventQueueBuffer.cpp:106
void init() override
Initialize.
Definition MSWindowsEventQueueBuffer.h:25