Deskflow 1.22.0.197
Keyboard and mouse sharing utility
Loading...
Searching...
No Matches
FunctionEventJob.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 "base/IEventJob.h"
11
13
17{
18public:
20 FunctionEventJob(void (*func)(const Event &, void *), void *arg = nullptr);
21 ~FunctionEventJob() override = default;
22
23 // IEventJob overrides
24 void run(const Event &) override;
25
26private:
27 void (*m_func)(const Event &, void *);
28 void *m_arg;
29};
Event.
Definition Event.h:27
~FunctionEventJob() override=default
FunctionEventJob(void(*func)(const Event &, void *), void *arg=nullptr)
run() invokes func(arg)
Definition FunctionEventJob.cpp:14
void run(const Event &) override
Run the job.
Definition FunctionEventJob.cpp:19
Event handler interface.
Definition IEventJob.h:19