kwin/src/plugin.h
Vlad Zahorodnii 93e0265e4e Move source code to src/ directory
Once in a while, we receive complaints from other fellow KDE developers
about the file organization of kwin. This change addresses some of those
complaints by moving all of source code in a separate directory, src/,
thus making the project structure more traditional. Things such as tests
are kept in their own toplevel directories.

This change may wreak havoc on merge requests that add new files to kwin,
but if a patch modifies an already existing file, git should be smart
enough to figure out that the file has been relocated.

We may potentially split the src/ directory further to make navigating
the source code easier, but hopefully this is good enough already.
2021-02-10 15:31:43 +00:00

52 lines
1.1 KiB
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 "kwinglobals.h"
#include <QObject>
namespace KWin
{
#define KWIN_PLUGIN_API_VERSION QT_VERSION_CHECK(KWIN_VERSION_MAJOR, \
KWIN_VERSION_MINOR, \
KWIN_VERSION_PATCH)
#define PluginFactory_iid "org.kde.kwin.PluginFactoryInterface"
/**
* 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(QObject *parent = nullptr);
};
/**
* The PluginFactory class creates binary compositor extensions.
*/
class KWIN_EXPORT PluginFactory : public QObject
{
Q_OBJECT
public:
explicit PluginFactory(QObject *parent = nullptr);
virtual Plugin *create() const = 0;
};
} // namespace KWin
Q_DECLARE_INTERFACE(KWin::PluginFactory, PluginFactory_iid)