1// Copyright (C) 2018 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#include "qwlhardwarelayerintegrationfactory_p.h"
5#include "qwlhardwarelayerintegrationplugin_p.h"
6#include "qwlhardwarelayerintegration_p.h"
7
8#include <QtCore/private/qfactoryloader_p.h>
9#include <QtCore/QCoreApplication>
10#include <QtCore/QDir>
11
12QT_BEGIN_NAMESPACE
13
14namespace QtWayland {
15
16Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, qwhlifLoader,
17 (QtWaylandHardwareLayerIntegrationFactoryInterface_iid, QLatin1String("/wayland-hardware-layer-integration"), Qt::CaseInsensitive))
18
19QStringList HardwareLayerIntegrationFactory::keys()
20{
21 return qwhlifLoader->keyMap().values();
22}
23
24HardwareLayerIntegration *HardwareLayerIntegrationFactory::create(const QString &name, const QStringList &args)
25{
26 return qLoadPlugin<HardwareLayerIntegration, HardwareLayerIntegrationPlugin>(loader: qwhlifLoader(), key: name, args);
27}
28
29}
30
31QT_END_NAMESPACE
32

source code of qtwayland/src/compositor/hardware_integration/qwlhardwarelayerintegrationfactory.cpp