summaryrefslogtreecommitdiff
path: root/examples/wayland/custom-shell/client-plugin/main.cpp
blob: 4ae4888805b87074cad61635f19bcc32fe92849f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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 &paramList) override;
};

QWaylandShellIntegration *QWaylandExampleShellIntegrationPlugin::create(const QString &key, const QStringList &paramList)
{
    Q_UNUSED(key);
    Q_UNUSED(paramList);
    return new ExampleShellIntegration();
}
//! [plugin]

#include "main.moc"