1// Copyright (C) 2017 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#ifndef QWAYLANDIVISURFACE_H
5#define QWAYLANDIVISURFACE_H
6
7#include <QtWaylandCompositor/QWaylandShellSurface>
8#if QT_CONFIG(wayland_compositor_quick)
9#include <QtWaylandCompositor/qwaylandquickchildren.h>
10#endif
11
12struct wl_resource;
13
14QT_BEGIN_NAMESPACE
15
16class QWaylandIviSurfacePrivate;
17class QWaylandSurface;
18class QWaylandIviApplication;
19class QWaylandSurfaceRole;
20class QWaylandResource;
21
22class Q_WAYLANDCOMPOSITOR_EXPORT QWaylandIviSurface : public QWaylandShellSurfaceTemplate<QWaylandIviSurface>
23{
24 Q_OBJECT
25 Q_DECLARE_PRIVATE(QWaylandIviSurface)
26#if QT_CONFIG(wayland_compositor_quick)
27 Q_WAYLAND_COMPOSITOR_DECLARE_QUICK_CHILDREN(QWaylandIviSurface)
28#endif
29 Q_PROPERTY(QWaylandSurface *surface READ surface NOTIFY surfaceChanged)
30 Q_PROPERTY(uint iviId READ iviId NOTIFY iviIdChanged)
31 Q_MOC_INCLUDE("qwaylandsurface.h")
32
33public:
34 QWaylandIviSurface();
35 QWaylandIviSurface(QWaylandIviApplication *application, QWaylandSurface *surface, uint iviId, const QWaylandResource &resource);
36
37 Q_INVOKABLE void initialize(QWaylandIviApplication *iviApplication, QWaylandSurface *surface,
38 uint iviId, const QWaylandResource &resource);
39
40 QWaylandSurface *surface() const;
41 uint iviId() const;
42
43 static const struct wl_interface *interface();
44 static QByteArray interfaceName();
45 static QWaylandSurfaceRole *role();
46 static QWaylandIviSurface *fromResource(::wl_resource *resource);
47
48 Q_INVOKABLE void sendConfigure(const QSize &size);
49
50#if QT_CONFIG(wayland_compositor_quick)
51 QWaylandQuickShellIntegration *createIntegration(QWaylandQuickShellSurfaceItem *item) override;
52#endif
53
54Q_SIGNALS:
55 void surfaceChanged();
56 void iviIdChanged();
57
58private:
59 void initialize() override;
60};
61
62QT_END_NAMESPACE
63
64#endif // QWAYLANDIVISURFACE_H
65

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