kwin/src/wayland/compositor_interface.h
Vlad Zahorodnii 16db81b5cc Make RegionInterface private
If a Wayland protocol deals with regions, they will be exposed as
QRegion objects in public API. Therefore, it makes sense to make
RegionInterface private as it's an implementation detail and it's
not intended to be used in public api.

The corresponding test was dropped because the CompositorInterface
no longer emits a signal to indicate that a wl_region has been created.
It should be also noted that wl_region stuff is already tested via
other means, e.g. surface damage, etc.
2021-03-15 16:28:30 +00:00

49 lines
1.2 KiB
C++

/*
SPDX-FileCopyrightText: 2014 Martin Gräßlin <mgraesslin@kde.org>
SPDX-FileCopyrightText: 2020 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
*/
#pragma once
#include "surface_interface.h"
#include <QObject>
#include <KWaylandServer/kwaylandserver_export.h>
namespace KWaylandServer
{
class CompositorInterfacePrivate;
class Display;
/**
* The CompositorInterface global allows clients to create surfaces and region objects.
*
* The CompositorInterface corresponds to the Wayland interface @c wl_compositor.
*/
class KWAYLANDSERVER_EXPORT CompositorInterface : public QObject
{
Q_OBJECT
public:
explicit CompositorInterface(Display *display, QObject *parent = nullptr);
~CompositorInterface() override;
/**
* Returns the Display object for this CompositorInterface.
*/
Display *display() const;
Q_SIGNALS:
/**
* This signal is emitted when a new SurfaceInterface @a surface has been created.
*/
void surfaceCreated(KWaylandServer::SurfaceInterface *surface);
private:
QScopedPointer<CompositorInterfacePrivate> d;
};
} // namespace KWaylandServer