1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QLINUXFBINTEGRATION_H
5#define QLINUXFBINTEGRATION_H
6
7#include <qpa/qplatformintegration.h>
8#include <qpa/qplatformnativeinterface.h>
9#include <QtGui/private/qkeymapper_p.h>
10
11QT_BEGIN_NAMESPACE
12
13class QAbstractEventDispatcher;
14class QFbScreen;
15class QFbVtHandler;
16class QEvdevKeyboardManager;
17
18class QLinuxFbIntegration : public QPlatformIntegration, public QPlatformNativeInterface
19#if QT_CONFIG(evdev)
20 , public QNativeInterface::Private::QEvdevKeyMapper
21#endif
22{
23public:
24 QLinuxFbIntegration(const QStringList &paramList);
25 ~QLinuxFbIntegration();
26
27 void initialize() override;
28 bool hasCapability(QPlatformIntegration::Capability cap) const override;
29
30 QPlatformWindow *createPlatformWindow(QWindow *window) const override;
31 QPlatformBackingStore *createPlatformBackingStore(QWindow *window) const override;
32
33 QAbstractEventDispatcher *createEventDispatcher() const override;
34
35 QPlatformFontDatabase *fontDatabase() const override;
36 QPlatformServices *services() const override;
37 QPlatformInputContext *inputContext() const override { return m_inputContext; }
38
39 QPlatformNativeInterface *nativeInterface() const override;
40
41 QList<QPlatformScreen *> screens() const;
42
43 QFunctionPointer platformFunction(const QByteArray &function) const override;
44
45#if QT_CONFIG(evdev)
46 void loadKeymap(const QString &filename) override;
47 void switchLang() override;
48#endif
49
50private:
51 void createInputHandlers();
52
53 QFbScreen *m_primaryScreen;
54 QPlatformInputContext *m_inputContext;
55 QScopedPointer<QPlatformFontDatabase> m_fontDb;
56 QScopedPointer<QPlatformServices> m_services;
57 QScopedPointer<QFbVtHandler> m_vtHandler;
58
59 QEvdevKeyboardManager *m_kbdMgr;
60};
61
62QT_END_NAMESPACE
63
64#endif // QLINUXFBINTEGRATION_H
65

source code of qtbase/src/plugins/platforms/linuxfb/qlinuxfbintegration.h