kwin/src/plugin.h
Kai Uwe Broulik 62008e7b62 plugin: Use kwin_export.h instead of kwinglobals.h
It only uses the `KWIN_EXPORT` macro in plugin.h.
kwinglobals.h comes from libkwineffects and not kwin core.

(`KWIN_PLUGIN_VERSION_STRING` comes from config-kwin.h)

Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
2022-08-04 11:44:48 +02:00

48 lines
919 B
C++

/*
SPDX-FileCopyrightText: 2020 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
SPDX-License-Identifier: GPL-2.0-or-later
*/
#pragma once
#include <config-kwin.h>
#include <kwin_export.h>
#include <QObject>
#include <memory>
namespace KWin
{
#define PluginFactory_iid "org.kde.kwin.PluginFactoryInterface" KWIN_PLUGIN_VERSION_STRING
/**
* 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:
explicit Plugin();
};
/**
* The PluginFactory class creates binary compositor extensions.
*/
class KWIN_EXPORT PluginFactory : public QObject
{
Q_OBJECT
public:
explicit PluginFactory();
virtual std::unique_ptr<Plugin> create() const = 0;
};
} // namespace KWin
Q_DECLARE_INTERFACE(KWin::PluginFactory, PluginFactory_iid)