2020-11-07 19:34:55 +00:00
|
|
|
/*
|
|
|
|
SPDX-FileCopyrightText: 2020 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
|
|
|
|
|
|
|
|
SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <config-kwin.h>
|
2022-08-04 09:10:51 +00:00
|
|
|
#include <kwin_export.h>
|
2020-11-07 19:34:55 +00:00
|
|
|
|
|
|
|
#include <QObject>
|
2022-07-05 12:00:41 +00:00
|
|
|
#include <memory>
|
2020-11-07 19:34:55 +00:00
|
|
|
|
|
|
|
namespace KWin
|
|
|
|
{
|
|
|
|
|
2021-06-01 10:06:54 +00:00
|
|
|
#define PluginFactory_iid "org.kde.kwin.PluginFactoryInterface" KWIN_PLUGIN_VERSION_STRING
|
2020-11-07 19:34:55 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The Plugin class is the baseclass for all binary compositor extensions.
|
|
|
|
*
|
|
|
|
* Note that a binary extension must be recompiled with every new KWin release.
|
|
|
|
*/
|
|
|
|
class KWIN_EXPORT Plugin : public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2022-07-05 12:00:41 +00:00
|
|
|
explicit Plugin();
|
2020-11-07 19:34:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The PluginFactory class creates binary compositor extensions.
|
|
|
|
*/
|
|
|
|
class KWIN_EXPORT PluginFactory : public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2022-07-05 12:00:41 +00:00
|
|
|
explicit PluginFactory();
|
2020-11-07 19:34:55 +00:00
|
|
|
|
2022-07-05 12:00:41 +00:00
|
|
|
virtual std::unique_ptr<Plugin> create() const = 0;
|
2020-11-07 19:34:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace KWin
|
|
|
|
|
|
|
|
Q_DECLARE_INTERFACE(KWin::PluginFactory, PluginFactory_iid)
|