refactor: remove IEventJob

This commit is contained in:
sithlord48
2025-08-17 22:53:30 -04:00
committed by Nick Bolton
parent bcb6c368b1
commit 347cb46f15
3 changed files with 5 additions and 30 deletions

View File

@ -17,7 +17,6 @@ add_library(base STATIC
FunctionEventJob.h
FunctionJob.cpp
FunctionJob.h
IEventJob.h
IEventQueue.h
IEventQueueBuffer.h
IJob.h

View File

@ -1,5 +1,6 @@
/*
* Deskflow -- mouse and keyboard sharing utility
* SPDX-FileCopyrightText: (C) 2025 Deskflow Developers
* SPDX-FileCopyrightText: (C) 2012 - 2016 Symless Ltd.
* SPDX-FileCopyrightText: (C) 2004 Chris Schoeneman
* SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
@ -7,21 +8,19 @@
#pragma once
#include "base/IEventJob.h"
class Event;
//! Use a function as an event job
/*!
An event job class that invokes a function.
*/
class FunctionEventJob : public IEventJob
class FunctionEventJob
{
public:
//! run() invokes \c func(arg)
explicit FunctionEventJob(void (*func)(const Event &, void *), void *arg = nullptr);
~FunctionEventJob() override = default;
// IEventJob overrides
void run(const Event &) override;
~FunctionEventJob() = default;
void run(const Event &);
private:
void (*m_func)(const Event &, void *);

View File

@ -1,23 +0,0 @@
/*
* Deskflow -- mouse and keyboard sharing utility
* SPDX-FileCopyrightText: (C) 2025 Deskflow Developers
* SPDX-FileCopyrightText: (C) 2012 - 2016 Symless Ltd.
* SPDX-FileCopyrightText: (C) 2004 Chris Schoeneman
* SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
*/
#pragma once
class Event;
//! Event handler interface
/*!
An event job is an interface for executing a event handler.
*/
class IEventJob
{
public:
virtual ~IEventJob() = default;
//! Run the job
virtual void run(const Event &) = 0;
};