File indexing completed on 2024-10-06 13:22:06
0001 /* 0002 SPDX-FileCopyrightText: 2020 Vlad Zahorodnii <vlad.zahorodnii@kde.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include <config-kwin.h> 0010 #include <kwin_export.h> 0011 0012 #include <QObject> 0013 #include <memory> 0014 0015 namespace KWin 0016 { 0017 0018 #define PluginFactory_iid "org.kde.kwin.PluginFactoryInterface" KWIN_PLUGIN_VERSION_STRING 0019 0020 /** 0021 * The Plugin class is the baseclass for all binary compositor extensions. 0022 * 0023 * Note that a binary extension must be recompiled with every new KWin release. 0024 */ 0025 class KWIN_EXPORT Plugin : public QObject 0026 { 0027 Q_OBJECT 0028 0029 public: 0030 explicit Plugin(); 0031 }; 0032 0033 /** 0034 * The PluginFactory class creates binary compositor extensions. 0035 */ 0036 class KWIN_EXPORT PluginFactory : public QObject 0037 { 0038 Q_OBJECT 0039 0040 public: 0041 explicit PluginFactory(); 0042 0043 virtual std::unique_ptr<Plugin> create() const = 0; 0044 }; 0045 0046 } // namespace KWin 0047 0048 Q_DECLARE_INTERFACE(KWin::PluginFactory, PluginFactory_iid)