1/****************************************************************************
2**
3** Copyright (C) 2017 The Qt Company Ltd.
4** Contact: https://www.qt.io/licensing/
5**
6** This file is part of the QtWaylandCompositor module of the Qt Toolkit.
7**
8** $QT_BEGIN_LICENSE:GPL$
9** Commercial License Usage
10** Licensees holding valid commercial Qt licenses may use this file in
11** accordance with the commercial license agreement provided with the
12** Software or, alternatively, in accordance with the terms contained in
13** a written agreement between you and The Qt Company. For licensing terms
14** and conditions see https://www.qt.io/terms-conditions. For further
15** information use the contact form at https://www.qt.io/contact-us.
16**
17** GNU General Public License Usage
18** Alternatively, this file may be used under the terms of the GNU
19** General Public License version 3 or (at your option) any later version
20** approved by the KDE Free Qt Foundation. The licenses are as published by
21** the Free Software Foundation and appearing in the file LICENSE.GPL3
22** included in the packaging of this file. Please review the following
23** information to ensure the GNU General Public License requirements will
24** be met: https://www.gnu.org/licenses/gpl-3.0.html.
25**
26** $QT_END_LICENSE$
27**
28****************************************************************************/
29
30#ifndef QWAYLANDIVISURFACE_H
31#define QWAYLANDIVISURFACE_H
32
33#include <QtWaylandCompositor/QWaylandShellSurface>
34#include <QtWaylandCompositor/qwaylandquickchildren.h>
35
36struct wl_resource;
37
38QT_BEGIN_NAMESPACE
39
40class QWaylandIviSurfacePrivate;
41class QWaylandSurface;
42class QWaylandIviApplication;
43class QWaylandSurfaceRole;
44class QWaylandResource;
45
46class Q_WAYLAND_COMPOSITOR_EXPORT QWaylandIviSurface : public QWaylandShellSurfaceTemplate<QWaylandIviSurface>
47{
48 Q_OBJECT
49 Q_DECLARE_PRIVATE(QWaylandIviSurface)
50 Q_WAYLAND_COMPOSITOR_DECLARE_QUICK_CHILDREN(QWaylandIviSurface)
51 Q_PROPERTY(QWaylandSurface *surface READ surface NOTIFY surfaceChanged)
52 Q_PROPERTY(uint iviId READ iviId NOTIFY iviIdChanged)
53
54public:
55 QWaylandIviSurface();
56 QWaylandIviSurface(QWaylandIviApplication *application, QWaylandSurface *surface, uint iviId, const QWaylandResource &resource);
57
58 Q_INVOKABLE void initialize(QWaylandIviApplication *iviApplication, QWaylandSurface *surface,
59 uint iviId, const QWaylandResource &resource);
60
61 QWaylandSurface *surface() const;
62 uint iviId() const;
63
64 static const struct wl_interface *interface();
65 static QByteArray interfaceName();
66 static QWaylandSurfaceRole *role();
67 static QWaylandIviSurface *fromResource(::wl_resource *resource);
68
69 Q_INVOKABLE void sendConfigure(const QSize &size);
70
71#if QT_CONFIG(wayland_compositor_quick)
72 QWaylandQuickShellIntegration *createIntegration(QWaylandQuickShellSurfaceItem *item) override;
73#endif
74
75Q_SIGNALS:
76 void surfaceChanged();
77 void iviIdChanged();
78
79private:
80 void initialize() override;
81};
82
83QT_END_NAMESPACE
84
85#endif // QWAYLANDIVISURFACE_H
86

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