summaryrefslogtreecommitdiffstats
path: root/src/compositor/global/qwaylandquickextension.qdoc
diff options
context:
space:
mode:
Diffstat (limited to 'src/compositor/global/qwaylandquickextension.qdoc')
-rw-r--r--src/compositor/global/qwaylandquickextension.qdoc85
1 files changed, 85 insertions, 0 deletions
diff --git a/src/compositor/global/qwaylandquickextension.qdoc b/src/compositor/global/qwaylandquickextension.qdoc
new file mode 100644
index 000000000..f3a213a11
--- /dev/null
+++ b/src/compositor/global/qwaylandquickextension.qdoc
@@ -0,0 +1,85 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
+
+/*!
+ * \headerfile <QWaylandQuickExtension>
+ * \title Qt Wayland Compositor Qt Quick Extension Macro Declarations
+ * \inmodule QtWaylandCompositor
+ * \ingroup funclists
+ *
+ * \brief The <QWaylandQuickExtension> header file includes macros for creating Qt Quick types
+ * that correspond to subclasses of QWaylandCompositorExtension and QWaylandObject.
+ *
+ * If you are creating extensions to Qt Wayland Compositor, the macros in the QWaylandQuickExtension
+ * header may be a useful alternative to manually implementing the required parts for each class.
+ *
+ * \sa {Custom Shell}
+ */
+
+/*!
+ * \macro Q_COMPOSITOR_DECLARE_QUICK_EXTENSION_CLASS(className)
+ * \relates <QWaylandQuickExtension>
+ *
+ * This macro can be used to define a Qt Quick class based on a Wayland extension. It defines
+ * a new class which inherits from \a className and which suffixes the name with "QuickExtension".
+ *
+ * The class should be a subclass of QWaylandCompositorExtension, and
+ * \l{QWaylandCompositorExtension::initialize()} will be called automatically. The type must be
+ * manually registered in Qt Quick using \l{qmlRegisterType()}.
+ *
+ * \sa Q_COMPOSITOR_DECLARE_QUICK_EXTENSION_NAMED_ELEMENT
+ */
+
+/*!
+ * \macro Q_COMPOSITOR_DECLARE_QUICK_EXTENSION_CONTAINER_CLASS(className)
+ * \relates <QWaylandQuickExtension>
+ *
+ * This macro can be used to define a Qt Quick class intended to contain Wayland extensions. It
+ *
+ * It defines a new class which inherits from \a className and which suffixes the name with
+ * "QuickExtensionContainer". The class given by \a className should inherit from QWaylandObject,
+ * and the new class will have an \c extensions property which manages the extensions by calling
+ * \l{QWaylandObject::addExtension()}{addExtension()} and
+ * \l{QWaylandObject::removeExtension()}{removeExtension()} in the base class.
+ *
+ * The type must be manually registered in Qt Quick using \l{qmlRegisterType()}.
+ */
+
+/*!
+ * \macro Q_COMPOSITOR_DECLARE_QUICK_EXTENSION_NAMED_CLASS(className, QmlType)
+ * \relates <QWaylandQuickExtension>
+ * \deprecated [6.8] Use Q_COMPOSITOR_DECLARE_QUICK_EXTENSION_NAMED_ELEMENT instead.
+ *
+ * This macro can be used to define a Qt Quick class based on a Wayland extension. It defines
+ * a new class which inherits from \a className and which suffixes the name with "QuickExtension".
+ *
+ * The macro works the same as \l{Q_COMPOSITOR_DECLARE_QUICK_EXTENSION_CLASS}, but will also
+ * automatically register the new type as \a QmlType in the current QML module with \l
+ * QML_ADDED_IN_VERSION set to 1.0.
+ */
+
+/*!
+\macro Q_COMPOSITOR_DECLARE_QUICK_EXTENSION_NAMED_ELEMENT(className, QmlType)
+\relates <QWaylandQuickExtension>
+\since 6.8
+
+This macro can be used to define a Qt Quick class based on a Wayland extension. It defines
+a new class which inherits from \a className and which suffixes the name with "QuickExtension".
+
+The macro works the same as \l{Q_COMPOSITOR_DECLARE_QUICK_EXTENSION_CLASS}, but will also
+automatically register the new type as \a QmlType in the current QML module.
+*/
+
+/*!
+\macro Q_COMPOSITOR_DECLARE_QUICK_EXTENSION_NAMED_ELEMENT(className, QmlType, versionMajor, versionMinor)
+\relates <QWaylandQuickExtension>
+\internal
+\since 6.8
+
+This macro can be used to define a Qt Quick class based on a Wayland extension. It defines
+a new class which inherits from \a className and which suffixes the name with "QuickExtension".
+
+The macro works the same as \l{Q_COMPOSITOR_DECLARE_QUICK_EXTENSION_CLASS}, but will also
+automatically register the new type as \a QmlType in the current QML module with
+\l QML_ADDED_IN_VERSION set to the version passed via \a versionMajor and \a versionMinor.
+ */