KWin
Loading...
Searching...
No Matches
layershell_v1.h
Go to the documentation of this file.
1/*
2 SPDX-FileCopyrightText: 2020 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5*/
6
7#pragma once
8
9#include "display.h"
10
11#include <QMargins>
12
13namespace KWin
14{
15class LayerShellV1InterfacePrivate;
16class LayerSurfaceV1Interface;
17class LayerSurfaceV1InterfacePrivate;
18class OutputInterface;
19class SurfaceInterface;
20class SurfaceRole;
21
30class KWIN_EXPORT LayerShellV1Interface : public QObject
31{
32 Q_OBJECT
33
34public:
35 explicit LayerShellV1Interface(Display *display, QObject *parent = nullptr);
36 ~LayerShellV1Interface() override;
37
41 Display *display() const;
42
43Q_SIGNALS:
48
49private:
50 std::unique_ptr<LayerShellV1InterfacePrivate> d;
51};
52
58class KWIN_EXPORT LayerSurfaceV1Interface : public QObject
59{
60 Q_OBJECT
61
62public:
69
71 SurfaceInterface *surface,
72 OutputInterface *output,
73 Layer layer,
74 const QString &scope,
75 wl_resource *resource);
76 ~LayerSurfaceV1Interface() override;
77
78 static SurfaceRole *role();
79
83 bool isCommitted() const;
84
88 SurfaceInterface *surface() const;
89
94 Qt::Edges anchor() const;
95
99 QSize desiredSize() const;
100
104 Layer layer() const;
105
109 bool acceptsFocus() const;
110
115 QMargins margins() const;
116
120 int leftMargin() const;
121
125 int rightMargin() const;
126
130 int topMargin() const;
131
135 int bottomMargin() const;
136
144 int exclusiveZone() const;
145
150 Qt::Edge exclusiveEdge() const;
151
157 OutputInterface *output() const;
158
162 QString scope() const;
163
170 quint32 sendConfigure(const QSize &size);
171
176 void sendClosed();
177
178Q_SIGNALS:
180 void configureAcknowledged(quint32 serial);
187
188private:
189 std::unique_ptr<LayerSurfaceV1InterfacePrivate> d;
190};
191
192} // namespace KWin
Class holding the Wayland server display loop.
Definition display.h:34
void surfaceCreated(LayerSurfaceV1Interface *surface)
void configureAcknowledged(quint32 serial)
Resource representing a wl_surface.
Definition surface.h:80
Layer
Definition globals.h:162