Deskflow 1.26.0.0
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) 2026 Deskflow Developers
4 * SPDX-FileCopyrightText: (C) 2012 - 2016 Symless Ltd.
5 * SPDX-FileCopyrightText: (C) 2004 Chris Schoeneman
6 * SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
7 */
8
9#pragma once
10
12
13#define WIN32_LEAN_AND_MEAN
14#include <Windows.h>
15
16class IEventQueue;
17
20{
21public:
23 ~MSWindowsEventQueueBuffer() override = default;
24
25 // IEventQueueBuffer overrides
26 void init() override
27 {
28 }
29 void waitForEvent(double timeout) override;
30 Type getEvent(Event &event, uint32_t &dataID) override;
31 bool addEvent(uint32_t dataID) override;
32 bool isEmpty() const override;
33
34private:
35 DWORD m_thread;
36 UINT m_userEvent;
37 MSG m_event;
38 UINT m_daemonQuit;
39 IEventQueue *m_events;
40 const UINT m_supportedMessages = (QS_ALLINPUT & ~(QS_TOUCH | QS_POINTER));
41};
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
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
void init() override
Initialize.
Definition MSWindowsEventQueueBuffer.h:26