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
5#ifndef QANDROIDPLATFORMOPENGLWINDOW_H
6#define QANDROIDPLATFORMOPENGLWINDOW_H
7
9
10#include <QWaitCondition>
11#include <QtCore/qjnienvironment.h>
12#include <QtCore/qjniobject.h>
13
14#include <EGL/egl.h>
15
17
18class QAndroidPlatformOpenGLWindow : public QAndroidPlatformWindow
19{
20public:
21 explicit QAndroidPlatformOpenGLWindow(QWindow *window, EGLDisplay display);
22 ~QAndroidPlatformOpenGLWindow();
23
24 void setGeometry(const QRect &rect) override;
25 EGLSurface eglSurface(EGLConfig config);
26 bool ensureEglSurfaceCreated(EGLConfig config);
27 QSurfaceFormat format() const override;
28
29 void applicationStateChanged(Qt::ApplicationState) override;
30
31protected:
32 void clearSurface() override;
33
34private:
35 EGLDisplay m_eglDisplay = EGL_NO_DISPLAY;
36 EGLSurface m_eglSurface = EGL_NO_SURFACE;
37 EGLNativeWindowType m_nativeWindow = nullptr;
38
39 QSurfaceFormat m_format;
40};
41
42QT_END_NAMESPACE
43#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.
static QAndroidPlatformTheme * instance(QAndroidPlatformNativeInterface *androidPlatformNativeInterface=nullptr)
void setAndroidPlatformIntegration(QAndroidPlatformIntegration *androidPlatformIntegration)
QBasicMutex * platformInterfaceMutex()
static const auto androidThemeName
static bool needsBasicRenderloopWorkaround()
Q_DECLARE_JNI_CLASS(MotionEvent, "android/view/MotionEvent")