2020-03-15 15:19:28 +00:00
|
|
|
/*
|
|
|
|
SPDX-FileCopyrightText: 2014 Martin Gräßlin <mgraesslin@kde.org>
|
2020-07-04 08:54:47 +00:00
|
|
|
SPDX-FileCopyrightText: 2020 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
|
2014-08-28 07:52:35 +00:00
|
|
|
|
2020-03-15 15:19:28 +00:00
|
|
|
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
|
|
|
|
*/
|
2021-03-10 16:08:30 +00:00
|
|
|
#pragma once
|
2014-08-28 07:52:35 +00:00
|
|
|
|
2022-04-22 09:27:33 +00:00
|
|
|
#include "kwin_export.h"
|
|
|
|
|
2014-08-28 07:52:35 +00:00
|
|
|
#include "surface_interface.h"
|
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
|
2020-04-29 14:56:38 +00:00
|
|
|
namespace KWaylandServer
|
2014-08-28 07:52:35 +00:00
|
|
|
{
|
2020-07-04 08:54:47 +00:00
|
|
|
class CompositorInterfacePrivate;
|
2014-08-28 07:52:35 +00:00
|
|
|
class Display;
|
|
|
|
|
2015-09-09 15:31:13 +00:00
|
|
|
/**
|
2020-07-04 08:54:47 +00:00
|
|
|
* The CompositorInterface global allows clients to create surfaces and region objects.
|
2015-09-09 15:31:13 +00:00
|
|
|
*
|
2020-07-04 08:54:47 +00:00
|
|
|
* The CompositorInterface corresponds to the Wayland interface @c wl_compositor.
|
|
|
|
*/
|
2022-04-22 09:27:33 +00:00
|
|
|
class KWIN_EXPORT CompositorInterface : public QObject
|
2014-08-28 07:52:35 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
2020-07-04 08:54:47 +00:00
|
|
|
|
2014-08-28 07:52:35 +00:00
|
|
|
public:
|
2020-07-04 08:54:47 +00:00
|
|
|
explicit CompositorInterface(Display *display, QObject *parent = nullptr);
|
|
|
|
~CompositorInterface() override;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the Display object for this CompositorInterface.
|
|
|
|
*/
|
|
|
|
Display *display() const;
|
2014-08-28 07:52:35 +00:00
|
|
|
|
|
|
|
Q_SIGNALS:
|
2015-09-09 15:31:13 +00:00
|
|
|
/**
|
2020-07-04 08:54:47 +00:00
|
|
|
* This signal is emitted when a new SurfaceInterface @a surface has been created.
|
|
|
|
*/
|
|
|
|
void surfaceCreated(KWaylandServer::SurfaceInterface *surface);
|
2014-08-28 07:52:35 +00:00
|
|
|
|
|
|
|
private:
|
2020-07-04 08:54:47 +00:00
|
|
|
QScopedPointer<CompositorInterfacePrivate> d;
|
2014-08-28 07:52:35 +00:00
|
|
|
};
|
|
|
|
|
2020-07-04 08:54:47 +00:00
|
|
|
} // namespace KWaylandServer
|