summaryrefslogtreecommitdiffstats
path: root/src/plugins/gfxdrivers/eglnullws/eglnullwsscreenplugin.cpp
blob: 354ddef7fa8509f349d5f43d58fb07bc6b37faa0 (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
#include "eglnullwsscreenplugin.h"
#include "eglnullwsscreen.h"

#include <QScreenDriverPlugin>
#include <QStringList>

class EGLNullWSScreenPlugin : public QScreenDriverPlugin
{
public:
    virtual QStringList keys() const;
    virtual QScreen *create(const QString& driver, int displayId);
};

QStringList EGLNullWSScreenPlugin::keys() const
{
    return QStringList() << QLatin1String(PluginName);
}

QScreen *EGLNullWSScreenPlugin::create(const QString& driver, int displayId)
{
    return (driver.toLower() == QLatin1String(PluginName) ?
        new EGLNullWSScreen(displayId) : 0);
}

Q_EXPORT_PLUGIN2(qeglnullws, EGLNullWSScreenPlugin)