Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qeglfsintegration_p.h
Go to the documentation of this file.
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// Qt-Security score:significant reason:default
4
5#ifndef QEGLFSINTEGRATION_H
6#define QEGLFSINTEGRATION_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include "qeglfsglobal_p.h"
20#include <QtCore/QPointer>
21#include <QtCore/QVariant>
22#include <QtGui/QWindow>
23#include <qpa/qplatformintegration.h>
24#include <qpa/qplatformnativeinterface.h>
25#include <qpa/qplatformopenglcontext.h>
26#include <qpa/qplatformscreen.h>
27#include <QtGui/private/qkeymapper_p.h>
28
30
31class QEglFSWindow;
32class QEglFSContext;
33class QFbVtHandler;
34#if QT_CONFIG(evdev)
35class QEvdevKeyboardManager;
36#elif QT_CONFIG(vxworksevdev)
37class QVxKeyboardManager;
38#endif
39
40class Q_EGLFS_EXPORT QEglFSIntegration : public QPlatformIntegration, public QPlatformNativeInterface
41#if QT_CONFIG(evdev)
42 , public QNativeInterface::Private::QEvdevKeyMapper
43#elif QT_CONFIG(vxworksevdev)
44 , public QNativeInterface::Private::QVxKeyMapper
45#endif
46#ifndef QT_NO_OPENGL
47 , public QNativeInterface::Private::QEGLIntegration
48#endif
49{
50public:
51 QEglFSIntegration();
52
53 void initialize() override;
54 void destroy() override;
55
56 EGLDisplay display() const { return m_display; }
57
58 QAbstractEventDispatcher *createEventDispatcher() const override;
59 QPlatformFontDatabase *fontDatabase() const override;
60 QPlatformServices *services() const override;
61 QPlatformInputContext *inputContext() const override { return m_inputContext; }
62 QPlatformTheme *createPlatformTheme(const QString &name) const override;
63
64 QPlatformWindow *createPlatformWindow(QWindow *window) const override;
65 QPlatformBackingStore *createPlatformBackingStore(QWindow *window) const override;
66#ifndef QT_NO_OPENGL
67 QPlatformOpenGLContext *createPlatformOpenGLContext(QOpenGLContext *context) const override;
68 QOpenGLContext *createOpenGLContext(EGLContext context, EGLDisplay display, QOpenGLContext *shareContext) const override;
69 QPlatformOffscreenSurface *createPlatformOffscreenSurface(QOffscreenSurface *surface) const override;
70#endif
71 bool hasCapability(QPlatformIntegration::Capability cap) const override;
72
73 QPlatformNativeInterface *nativeInterface() const override;
74
75 // QPlatformNativeInterface
76 void *nativeResourceForIntegration(const QByteArray &resource) override;
77 void *nativeResourceForScreen(const QByteArray &resource, QScreen *screen) override;
78 void *nativeResourceForWindow(const QByteArray &resource, QWindow *window) override;
79#ifndef QT_NO_OPENGL
80 void *nativeResourceForContext(const QByteArray &resource, QOpenGLContext *context) override;
81#endif
82 NativeResourceForContextFunction nativeResourceFunctionForContext(const QByteArray &resource) override;
83
84 QFunctionPointer platformFunction(const QByteArray &function) const override;
85
86 QVariant styleHint(QPlatformIntegration::StyleHint hint) const override;
87
88 QFbVtHandler *vtHandler() { return m_vtHandler.data(); }
89
90 QPointer<QWindow> pointerWindow() { return m_pointerWindow; }
91 void setPointerWindow(QWindow *pointerWindow) { m_pointerWindow = pointerWindow; }
92
93#if QT_CONFIG(evdev) || QT_CONFIG(vxworksevdev)
94 void loadKeymap(const QString &filename) override;
95 void switchLang() override;
96#endif
97
98protected:
99 virtual void createInputHandlers();
100#if QT_CONFIG(evdev)
101 QEvdevKeyboardManager *m_kbdMgr = nullptr;
102#elif QT_CONFIG(vxworksevdev)
103 QVxKeyboardManager *m_kbdMgr = nullptr;
104#endif
105
106private:
107 EGLNativeDisplayType nativeDisplay() const;
108
109 EGLDisplay m_display;
110 QPlatformInputContext *m_inputContext;
111 QScopedPointer<QPlatformFontDatabase> m_fontDb;
112 mutable QScopedPointer<QPlatformServices> m_services;
113 QScopedPointer<QFbVtHandler> m_vtHandler;
114 QPointer<QWindow> m_pointerWindow;
115 bool m_disableInputHandlers;
116 mutable QPlatformBackingStore *m_bs = nullptr;
117};
118
119QT_END_NAMESPACE
120
121#endif // QEGLFSINTEGRATION_H
\inmodule QtSql
Combined button and popup list for selecting options.
#define Q_EGLFS_EXPORT