diff --git a/src/lib/base/CMakeLists.txt b/src/lib/base/CMakeLists.txt index e87dcce68..c473aed32 100644 --- a/src/lib/base/CMakeLists.txt +++ b/src/lib/base/CMakeLists.txt @@ -17,7 +17,6 @@ add_library(base STATIC FunctionEventJob.h FunctionJob.cpp FunctionJob.h - IEventJob.h IEventQueue.h IEventQueueBuffer.h IJob.h diff --git a/src/lib/base/FunctionEventJob.h b/src/lib/base/FunctionEventJob.h index aa0076773..d0266f655 100644 --- a/src/lib/base/FunctionEventJob.h +++ b/src/lib/base/FunctionEventJob.h @@ -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 *); diff --git a/src/lib/base/IEventJob.h b/src/lib/base/IEventJob.h deleted file mode 100644 index cc83cd7ad..000000000 --- a/src/lib/base/IEventJob.h +++ /dev/null @@ -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; -};