Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qwaylandshellsurface.h
Go to the documentation of this file.
1// Copyright (C) 2017 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#ifndef QWAYLANDSHELLSURFACE_H
5#define QWAYLANDSHELLSURFACE_H
6
7#include <QtWaylandCompositor/qtwaylandqmlinclude.h>
8#include <QtWaylandCompositor/qwaylandcompositorextension.h>
9
11
14
15class Q_WAYLANDCOMPOSITOR_EXPORT QWaylandShellSurface : public QWaylandCompositorExtension
16{
18 Q_PROPERTY(Qt::WindowType windowType READ windowType NOTIFY windowTypeChanged)
19 QML_NAMED_ELEMENT(ShellSurface)
22public:
23#if QT_CONFIG(wayland_compositor_quick)
25#endif
28
29protected:
32
35};
36
37template <typename T>
38class Q_WAYLANDCOMPOSITOR_EXPORT QWaylandShellSurfaceTemplate : public QWaylandShellSurface
39{
40public:
42 : QWaylandShellSurface(container)
43 { }
44
45 const struct wl_interface *extensionInterface() const override
46 {
47 return T::interface();
48 }
49
50 static T *findIn(QWaylandObject *container)
51 {
52 if (!container) return nullptr;
53 return qobject_cast<T *>(container->extension(T::interfaceName()));
54 }
55
56protected:
59 { }
60
62 : QWaylandShellSurface(container,dd)
63 { }
64};
65
67
68#endif // QWAYLANDSHELLSURFACE_H
\inmodule QtWaylandCompositor
\inmodule QtWaylandCompositor
QWaylandCompositorExtension * extension(const QByteArray &name)
Returns the compositor extension which matches name if one has been registered with the QWaylandObjec...
\qmltype ShellSurfaceItem \instantiates QWaylandQuickShellSurfaceItem \inherits WaylandQuickItem \inq...
\inmodule QtWaylandCompositor
const struct wl_interface * extensionInterface() const override
A pure virtual function which should be reimplemented to return the wl_interface which corresponds to...
static T * findIn(QWaylandObject *container)
If any instance of the interface has been registered with container, this is returned.
QWaylandShellSurfaceTemplate(QWaylandObject *container, QWaylandCompositorExtensionPrivate &dd)
QWaylandShellSurfaceTemplate(QWaylandObject *container=nullptr)
QWaylandShellSurfaceTemplate(QWaylandCompositorExtensionPrivate &dd)
\qmltype ShellSurface \instantiates QWaylandShellSurface \inqmlmodule QtWayland.Compositor
QWaylandShellSurface(QWaylandObject *container, QWaylandCompositorExtensionPrivate &dd)
QWaylandShellSurface(QWaylandCompositorExtensionPrivate &dd)
virtual Qt::WindowType windowType() const
QWaylandShellSurface(QWaylandObject *waylandObject)
Combined button and popup list for selecting options.
WindowType
Definition qnamespace.h:204
@ Window
Definition qnamespace.h:206
#define QML_UNCREATABLE(REASON)
#define QML_NAMED_ELEMENT(NAME)
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_SIGNALS
QGraphicsItem * item