diff options
Diffstat (limited to 'examples/wayland/custom-shell/client-plugin/main.cpp')
-rw-r--r-- | examples/wayland/custom-shell/client-plugin/main.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/examples/wayland/custom-shell/client-plugin/main.cpp b/examples/wayland/custom-shell/client-plugin/main.cpp new file mode 100644 index 000000000..4ae488880 --- /dev/null +++ b/examples/wayland/custom-shell/client-plugin/main.cpp @@ -0,0 +1,32 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +#include "exampleshellintegration.h" + +//! [include] +#include <QtWaylandClient/private/qwaylandclientshellapi_p.h> +//! [include] + +#include "qwayland-example-shell.h" + +using namespace QtWaylandClient; + +//! [plugin] +class QWaylandExampleShellIntegrationPlugin : public QWaylandShellIntegrationPlugin +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID QWaylandShellIntegrationFactoryInterface_iid FILE "example-shell.json") + +public: + QWaylandShellIntegration *create(const QString &key, const QStringList ¶mList) override; +}; + +QWaylandShellIntegration *QWaylandExampleShellIntegrationPlugin::create(const QString &key, const QStringList ¶mList) +{ + Q_UNUSED(key); + Q_UNUSED(paramList); + return new ExampleShellIntegration(); +} +//! [plugin] + +#include "main.moc" |