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
qandroidplatformopenglwindow.h
Go to the documentation of this file.
1// Copyright (C) 2014 BogDan Vatra <bogdan@kde.org>
2// Copyright (C) 2016 The Qt Company Ltd.
3// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
4// Qt-Security score:significant reason:default
5
6#ifndef QANDROIDPLATFORMOPENGLWINDOW_H
7#define QANDROIDPLATFORMOPENGLWINDOW_H
8
10
11#include <QtCore/qjnienvironment.h>
12#include <QtCore/qjniobject.h>
13
14#include <EGL/egl.h>
15
17
19{
20public:
21 explicit QAndroidPlatformOpenGLWindow(QWindow *window, EGLDisplay display);
23
24 void setGeometry(const QRect &rect) override;
25 // Render thread. Creates the EGLSurface on first use, EGL_NO_SURFACE until
26 // Android provides a Surface (the window isn't exposed before that).
27 EGLSurface eglSurface(EGLConfig config);
28 QSurfaceFormat format() const override;
29
30private:
31 void destroyWindowSurface() override;
32 EGLDisplay m_eglDisplay = EGL_NO_DISPLAY;
33
34 // Render-thread-only state.
35 EGLSurface m_eglSurface = EGL_NO_SURFACE;
36 QSurfaceFormat m_format;
37};
38
39QT_END_NAMESPACE
40#endif // QANDROIDPLATFORMOPENGLWINDOW_H
QPlatformFontDatabase * fontDatabase() const override
Accessor for the platform integration's fontdatabase.
QPlatformWindow * createForeignWindow(QWindow *window, WId nativeHandle) const override
void initialize() override
Performs initialization steps that depend on having an event dispatcher available.
QPlatformInputContext * inputContext() const override
Returns the platforms input context.
QStringList themeNames() const override
QPlatformNativeInterface * nativeInterface() const override
QPlatformTheme * createPlatformTheme(const QString &name) const override
QPlatformBackingStore * createPlatformBackingStore(QWindow *window) const override
Factory function for QPlatformBackingStore.
void setAvailableGeometry(const QRect &availableGeometry)
void setScreenSize(int width, int height)
void setPhysicalSize(int width, int height)
bool hasCapability(QPlatformIntegration::Capability cap) const override
QPlatformWindow * createPlatformWindow(QWindow *window) const override
Factory function for QPlatformWindow.
QPlatformClipboard * clipboard() const override
Accessor for the platform integration's clipboard.
Qt::WindowState defaultWindowState(Qt::WindowFlags flags) const override
QAndroidPlatformIntegration(const QStringList &paramList)
QAbstractEventDispatcher * createEventDispatcher() const override
Factory function for the GUI event dispatcher.
QVariant styleHint(StyleHint hint) const override
QPlatformServices * services() const override
void * nativeResourceForContext(const QByteArray &resource, QOpenGLContext *context) override
void * nativeResourceForWindow(const QByteArray &resource, QWindow *window) override
void * nativeResourceForIntegration(const QByteArray &resource) override
ANativeWindow * nativeSurface() const override
bool isValid() const override
Returns true if the platform offscreen surface has been allocated.
QSurfaceFormat format() const override
Returns the actual surface format of the offscreen surface.
EGLSurface eglSurface(EGLConfig config)
QSurfaceFormat format() const override
Returns the actual surface format of the window.
static QAndroidPlatformTheme * instance(QAndroidPlatformNativeInterface *androidPlatformNativeInterface=nullptr)
Combined button and popup list for selecting options.
void setAndroidPlatformIntegration(QAndroidPlatformIntegration *androidPlatformIntegration)
QBasicMutex * platformInterfaceMutex()
QString deviceName()
static const auto androidThemeName
static bool needsBasicRenderloopWorkaround()
Q_DECLARE_JNI_CLASS(MotionEvent, "android/view/MotionEvent")