/* SPDX-FileCopyrightText: 2020 Vlad Zahorodnii SPDX-License-Identifier: GPL-2.0-or-later */ #pragma once #include "kwinglobals.h" #include #include #include #include namespace KWin { class Plugin; class PluginFactory; /** * The PluginManager class loads and unloads binary compositor extensions. */ class KWIN_EXPORT PluginManager : public QObject { Q_OBJECT public: ~PluginManager() override; QStringList loadedPlugins() const; QStringList availablePlugins() const; public Q_SLOTS: bool loadPlugin(const QString &pluginId); void unloadPlugin(const QString &pluginId); private: bool loadStaticPlugin(const QString &pluginId); bool loadDynamicPlugin(const KPluginMetaData &metadata); bool loadDynamicPlugin(const QString &pluginId); bool instantiatePlugin(const QString &pluginId, PluginFactory *factory); QHash m_plugins; QHash m_staticPlugins; KWIN_SINGLETON(PluginManager) }; } // namespace KWin