1// Copyright (C) 2020 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#include <QtQml/qqmlextensionplugin.h>
5#include <QtQml/qqml.h>
6
7#include <QtWaylandCompositor/qwaylandquickextension.h>
8#include <QtWaylandCompositor/qwaylandiviapplication.h>
9#include <QtWaylandCompositor/qwaylandivisurface.h>
10
11QT_BEGIN_NAMESPACE
12
13Q_COMPOSITOR_DECLARE_QUICK_EXTENSION_CLASS(QWaylandIviApplication)
14
15/*!
16 \qmlmodule QtWayland.Compositor.IviApplication
17 \title Qt Wayland IviApplication Extension
18 \ingroup qmlmodules
19 \brief Provides a Qt API for the IviApplication shell extension.
20
21 \section2 Summary
22 IviApplication is a shell extension suitable for lightweight compositors,
23 for example in In-Vehicle Infotainment (IVI) systems.
24
25 IviApplication corresponds to the Wayland \c ivi_application interface.
26
27 \section2 Usage
28 To use this module, import it like this:
29 \qml
30 import QtWayland.Compositor.IviApplication
31 \endqml
32*/
33
34class QWaylandCompositorIviApplicationPlugin : public QQmlExtensionPlugin
35{
36 Q_OBJECT
37 Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid)
38public:
39 void registerTypes(const char *uri) override
40 {
41 Q_ASSERT(QLatin1String(uri) == QLatin1String("QtWayland.Compositor.IviApplication"));
42 defineModule(uri);
43 }
44
45 static void defineModule(const char *uri)
46 {
47 qmlRegisterModule(uri, QT_VERSION_MAJOR, QT_VERSION_MINOR);
48 qmlRegisterType<QWaylandIviApplicationQuickExtension>(uri, versionMajor: 1, versionMinor: 0, qmlName: "IviApplication");
49 qmlRegisterType<QWaylandIviSurface>(uri, versionMajor: 1, versionMinor: 0, qmlName: "IviSurface");
50 }
51};
52
53QT_END_NAMESPACE
54
55#include "qwaylandcompositoriviapplicationplugin.moc"
56

source code of qtwayland/src/imports/compositor-extensions/iviapplication/qwaylandcompositoriviapplicationplugin.cpp