Deskflow 1.22.0.197
Keyboard and mouse sharing utility
Loading...
Searching...
No Matches
FunctionJob.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) 2002 Chris Schoeneman
5 * SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
6 */
7
8#pragma once
9
10#include "base/IJob.h"
11
13
16class FunctionJob : public IJob
17{
18public:
20 FunctionJob(void (*func)(void *), void *arg = nullptr);
21 ~FunctionJob() override = default;
22
23 // IJob overrides
24 void run() override;
25
26private:
27 void (*m_func)(void *);
28 void *m_arg;
29};
void run() override
Run the job.
Definition FunctionJob.cpp:19
~FunctionJob() override=default
FunctionJob(void(*func)(void *), void *arg=nullptr)
run() invokes func(arg)
Definition FunctionJob.cpp:14
Job interface.
Definition IJob.h:17