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 | |
12 | struct wl_resource; |
13 | |
14 | QT_BEGIN_NAMESPACE |
15 | |
16 | class QWaylandIviSurfacePrivate; |
17 | class QWaylandSurface; |
18 | class QWaylandIviApplication; |
19 | class QWaylandSurfaceRole; |
20 | class QWaylandResource; |
21 | |
22 | class 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 | |
33 | public: |
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 | |
54 | Q_SIGNALS: |
55 | void surfaceChanged(); |
56 | void iviIdChanged(); |
57 | |
58 | private: |
59 | void initialize() override; |
60 | }; |
61 | |
62 | QT_END_NAMESPACE |
63 | |
64 | #endif // QWAYLANDIVISURFACE_H |
65 |