1// Copyright (C) 2019 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#ifndef QWAYLANDXDGOUTPUTV1_H
5#define QWAYLANDXDGOUTPUTV1_H
6
7#include <QtCore/QRect>
8#include <QtWaylandCompositor/QWaylandCompositorExtension>
9#if QT_CONFIG(wayland_compositor_quick)
10#include <QtWaylandCompositor/qwaylandquickchildren.h>
11#endif
12
13QT_BEGIN_NAMESPACE
14
15class QWaylandOutput;
16
17class QWaylandXdgOutputManagerV1Private;
18class QWaylandXdgOutputV1Private;
19
20class Q_WAYLANDCOMPOSITOR_EXPORT QWaylandXdgOutputManagerV1
21 : public QWaylandCompositorExtensionTemplate<QWaylandXdgOutputManagerV1>
22{
23 Q_OBJECT
24 Q_DECLARE_PRIVATE(QWaylandXdgOutputManagerV1)
25public:
26 explicit QWaylandXdgOutputManagerV1();
27 QWaylandXdgOutputManagerV1(QWaylandCompositor *compositor);
28
29 void initialize() override;
30
31 static const wl_interface *interface();
32};
33
34class Q_WAYLANDCOMPOSITOR_EXPORT QWaylandXdgOutputV1 : public QObject
35{
36 Q_OBJECT
37 Q_DECLARE_PRIVATE(QWaylandXdgOutputV1)
38#if QT_CONFIG(wayland_compositor_quick)
39 Q_WAYLAND_COMPOSITOR_DECLARE_QUICK_CHILDREN(QWaylandXdgOutputV1)
40#endif
41
42 Q_PROPERTY(QWaylandXdgOutputManagerV1 *manager READ manager NOTIFY managerChanged)
43 Q_PROPERTY(QWaylandOutput *output READ output NOTIFY outputChanged)
44 Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged)
45 Q_PROPERTY(QString description READ description WRITE setDescription NOTIFY descriptionChanged)
46 Q_PROPERTY(QPoint logicalPosition READ logicalPosition WRITE setLogicalPosition NOTIFY logicalPositionChanged)
47 Q_PROPERTY(QSize logicalSize READ logicalSize WRITE setLogicalSize NOTIFY logicalSizeChanged)
48 Q_PROPERTY(QRect logicalGeometry READ logicalGeometry NOTIFY logicalGeometryChanged)
49 Q_MOC_INCLUDE("qwaylandoutput.h")
50public:
51 QWaylandXdgOutputV1();
52 QWaylandXdgOutputV1(QWaylandOutput *output, QWaylandXdgOutputManagerV1 *manager);
53 ~QWaylandXdgOutputV1() override;
54
55 QWaylandXdgOutputManagerV1 *manager() const;
56 QWaylandOutput *output() const;
57
58 QString name() const;
59 void setName(const QString &name);
60
61 QString description() const;
62 void setDescription(const QString &name);
63
64 QPoint logicalPosition() const;
65 void setLogicalPosition(const QPoint &position);
66
67 QSize logicalSize() const;
68 void setLogicalSize(const QSize &size);
69
70 QRect logicalGeometry() const;
71
72Q_SIGNALS:
73 void managerChanged();
74 void outputChanged();
75 void logicalPositionChanged();
76 void logicalSizeChanged();
77 void logicalGeometryChanged();
78 void nameChanged();
79 void descriptionChanged();
80};
81
82QT_END_NAMESPACE
83
84#endif // QWAYLANDXDGOUTPUTV1_H
85

source code of qtwayland/src/compositor/extensions/qwaylandxdgoutputv1.h