1// Copyright (C) 2021 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
5 * \headerfile <QWaylandQuickExtension>
6 * \title Qt Wayland Compositor Qt Quick Extension Macro Declarations
7 * \inmodule QtWaylandCompositor
10 * \brief The <QWaylandQuickExtension> header file includes macros for creating Qt Quick types
11 * that correspond to subclasses of QWaylandCompositorExtension and QWaylandObject.
13 * If you are creating extensions to Qt Wayland Compositor, the macros in the QWaylandQuickExtension
14 * header may be a useful alternative to manually implementing the required parts for each class.
20 * \macro Q_COMPOSITOR_DECLARE_QUICK_EXTENSION_CLASS(className)
21 * \relates <QWaylandQuickExtension>
23 * This macro can be used to define a Qt Quick class based on a Wayland extension. It defines
24 * a new class which inherits from \a className and which suffixes the name with "QuickExtension".
26 * The class should be a subclass of QWaylandCompositorExtension, and
27 * \l{QWaylandCompositorExtension::initialize()} will be called automatically. The type must be
28 * manually registered in Qt Quick using \l{qmlRegisterType()}.
30 * \sa Q_COMPOSITOR_DECLARE_QUICK_EXTENSION_NAMED_CLASS
34 * \macro Q_COMPOSITOR_DECLARE_QUICK_EXTENSION_CONTAINER_CLASS(className)
35 * \relates <QWaylandQuickExtension>
37 * This macro can be used to define a Qt Quick class intended to contain Wayland extensions. It
39 * It defines a new class which inherits from \a className and which suffixes the name with
40 * "QuickExtensionContainer". The class given by \a className should inherit from QWaylandObject,
41 * and the new class will have an \c extensions property which manages the extensions by calling
42 * \l{QWaylandObject::addExtension()}{addExtension()} and
43 * \l{QWaylandObject::removeExtension()}{removeExtension()} in the base class.
45 * The type must be manually registered in Qt Quick using \l{qmlRegisterType()}.
49 * \macro Q_COMPOSITOR_DECLARE_QUICK_EXTENSION_NAMED_CLASS(className, QmlType)
50 * \relates <QWaylandQuickExtension>
52 * This macro can be used to define a Qt Quick class based on a Wayland extension. It defines
53 * a new class which inherits from \a className and which suffixes the name with "QuickExtension".
55 * The macro works the same as \l{Q_COMPOSITOR_DECLARE_QUICK_EXTENSION_CLASS}, but will also
56 * automatically register the new type as \a QmlType in Qt Quick.