Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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
4#ifndef QEGLFSINTEGRATION_H
5#define QEGLFSINTEGRATION_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include "qeglfsglobal_p.h"
19#include <QtCore/QPointer>
20#include <QtCore/QVariant>
21#include <QtGui/QWindow>
22#include <qpa/qplatformintegration.h>
23#include <qpa/qplatformnativeinterface.h>
24#include <qpa/qplatformopenglcontext.h>
25#include <qpa/qplatformscreen.h>
26#include <QtGui/private/qkeymapper_p.h>
27
29
30class QEglFSWindow;
31class QEglFSContext;
32class QFbVtHandler;
34
36#if QT_CONFIG(evdev)
37 , public QNativeInterface::Private::QEvdevKeyMapper
38#endif
39#ifndef QT_NO_OPENGL
40 , public QNativeInterface::Private::QEGLIntegration
41#endif
42{
43public:
45
46 void initialize() override;
47 void destroy() override;
48
49 EGLDisplay display() const { return m_display; }
50
52 QPlatformFontDatabase *fontDatabase() const override;
53 QPlatformServices *services() const override;
54 QPlatformInputContext *inputContext() const override { return m_inputContext; }
55 QPlatformTheme *createPlatformTheme(const QString &name) const override;
56
59#ifndef QT_NO_OPENGL
61 QOpenGLContext *createOpenGLContext(EGLContext context, EGLDisplay display, QOpenGLContext *shareContext) const override;
63#endif
65
67
68 // QPlatformNativeInterface
69 void *nativeResourceForIntegration(const QByteArray &resource) override;
70 void *nativeResourceForScreen(const QByteArray &resource, QScreen *screen) override;
71 void *nativeResourceForWindow(const QByteArray &resource, QWindow *window) override;
72#ifndef QT_NO_OPENGL
73 void *nativeResourceForContext(const QByteArray &resource, QOpenGLContext *context) override;
74#endif
75 NativeResourceForContextFunction nativeResourceFunctionForContext(const QByteArray &resource) override;
76
77 QFunctionPointer platformFunction(const QByteArray &function) const override;
78
80
81 QFbVtHandler *vtHandler() { return m_vtHandler.data(); }
82
83 QPointer<QWindow> pointerWindow() { return m_pointerWindow; }
84 void setPointerWindow(QWindow *pointerWindow) { m_pointerWindow = pointerWindow; }
85
86#if QT_CONFIG(evdev)
87 void loadKeymap(const QString &filename) override;
88 void switchLang() override;
89#endif
90
91protected:
92 virtual void createInputHandlers();
94
95private:
96 EGLNativeDisplayType nativeDisplay() const;
97
98 EGLDisplay m_display;
99 QPlatformInputContext *m_inputContext;
100 QScopedPointer<QPlatformFontDatabase> m_fontDb;
101 QScopedPointer<QPlatformServices> m_services;
102 QScopedPointer<QFbVtHandler> m_vtHandler;
103 QPointer<QWindow> m_pointerWindow;
104 bool m_disableInputHandlers;
105};
106
108
109#endif // QEGLFSINTEGRATION_H
\inmodule QtCore
Definition qbytearray.h:57
void setPointerWindow(QWindow *pointerWindow)
QPlatformInputContext * inputContext() const override
Returns the platforms input context.
EGLDisplay display() const
QEvdevKeyboardManager * m_kbdMgr
QFbVtHandler * vtHandler()
QPointer< QWindow > pointerWindow()
\inmodule QtGui
\inmodule QtGui
The QPlatformBackingStore class provides the drawing area for top-level windows.
The QPlatformFontDatabase class makes it possible to customize how fonts are discovered and how they ...
The QPlatformInputContext class abstracts the input method dependent data and composing state.
The QPlatformIntegration class is the entry for WindowSystem specific functionality.
virtual QPlatformBackingStore * createPlatformBackingStore(QWindow *window) const =0
Factory function for QPlatformBackingStore.
virtual QVariant styleHint(StyleHint hint) const
virtual QAbstractEventDispatcher * createEventDispatcher() const =0
Factory function for the GUI event dispatcher.
virtual bool hasCapability(Capability cap) const
virtual QPlatformOpenGLContext * createPlatformOpenGLContext(QOpenGLContext *context) const
Factory function for QPlatformOpenGLContext.
virtual QPlatformOffscreenSurface * createPlatformOffscreenSurface(QOffscreenSurface *surface) const
Factory function for QOffscreenSurface.
virtual QPlatformServices * services() const
virtual QPlatformNativeInterface * nativeInterface() const
virtual QPlatformFontDatabase * fontDatabase() const
Accessor for the platform integration's fontdatabase.
virtual QPlatformTheme * createPlatformTheme(const QString &name) const
virtual void initialize()
Performs initialization steps that depend on having an event dispatcher available.
virtual QPlatformWindow * createPlatformWindow(QWindow *window) const =0
Factory function for QPlatformWindow.
virtual void destroy()
Called before the platform integration is deleted.
Capability
Capabilities are used to determine specific features of a platform integration.
The QPlatformNativeInterface class provides an abstraction for retrieving native resource handles.
virtual NativeResourceForContextFunction nativeResourceFunctionForContext(const QByteArray &resource)
virtual void * nativeResourceForContext(const QByteArray &resource, QOpenGLContext *context)
virtual void * nativeResourceForWindow(const QByteArray &resource, QWindow *window)
virtual void * nativeResourceForScreen(const QByteArray &resource, QScreen *screen)
virtual QFunctionPointer platformFunction(const QByteArray &function) const
virtual void * nativeResourceForIntegration(const QByteArray &resource)
The QPlatformOpenGLContext class provides an abstraction for native GL contexts.
The QPlatformServices provides the backend for desktop-related functionality.
The QPlatformTheme class allows customizing the UI based on themes.
The QPlatformWindow class provides an abstraction for top-level windows.
The QScreen class is used to query screen properties. \inmodule QtGui.
Definition qscreen.h:32
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
\inmodule QtCore
Definition qvariant.h:65
\inmodule QtGui
Definition qwindow.h:63
struct wl_display * display
Definition linuxdmabuf.h:41
Combined button and popup list for selecting options.
static void * context
#define Q_EGLFS_EXPORT
typedef EGLDisplay(EGLAPIENTRYP PFNEGLGETPLATFORMDISPLAYEXTPROC)(EGLenum platform
GLuint name
GLenum cap
static QT_BEGIN_NAMESPACE QVariant hint(QPlatformIntegration::StyleHint h)
QScreen * screen
[1]
Definition main.cpp:29
aWidget window() -> setWindowTitle("New Window Title")
[2]