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
qandroidplatformintegration.cpp
Go to the documentation of this file.
1// Copyright (C) 2012 BogDan Vatra <bogdan@kde.org>
2// Copyright (C) 2021 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
7
8#if QT_CONFIG(accessibility)
9#include "androidjniaccessibility.h"
10#endif
11#include "androidjnimain.h"
14#if QT_CONFIG(accessibility)
15#include "qandroidplatformaccessibility.h"
16#endif
18#if QT_CONFIG(draganddrop)
19#include "qandroidplatformdrag.h"
20#endif
24#if QT_CONFIG(egl)
25#include "qandroidplatformopenglcontext.h"
26#endif
32
33#include <QGuiApplication>
34#include <QOffscreenSurface>
35#include <QOpenGLContext>
36#include <QThread>
37#include <QtCore/QJniObject>
38#if QT_CONFIG(egl)
39#include <QtGui/private/qeglpbuffer_p.h>
40#endif
41#include <QtGui/private/qguiapplication_p.h>
42#include <QtGui/private/qoffscreensurface_p.h>
43#include <QtGui/private/qrhibackingstore_p.h>
44#include <qpa/qplatformoffscreensurface.h>
45#include <qpa/qplatformwindow.h>
46#include <qpa/qwindowsysteminterface.h>
47
48#include <jni.h>
49
50#if QT_CONFIG(vulkan)
51#include "qandroidplatformvulkanwindow.h"
52#include "qandroidplatformvulkaninstance.h"
53#endif
54
55#include <QtGui/qpa/qplatforminputcontextfactory_p.h>
56
58
59using namespace Qt::StringLiterals;
60
61Qt::ScreenOrientation QAndroidPlatformIntegration::m_orientation = Qt::PrimaryOrientation;
62Qt::ScreenOrientation QAndroidPlatformIntegration::m_nativeOrientation = Qt::PrimaryOrientation;
63
64bool QAndroidPlatformIntegration::m_showPasswordEnabled = false;
65
66Q_DECLARE_JNI_CLASS(QtDisplayManager, "org/qtproject/qt/android/QtDisplayManager")
67Q_DECLARE_JNI_CLASS(Display, "android/view/Display")
68
69Q_DECLARE_JNI_CLASS(List, "java/util/List")
70
71namespace {
72
73QAndroidPlatformScreen* createScreenForDisplayId(int displayId)
74{
75 const QJniObject display = QtJniTypes::QtDisplayManager::callStaticMethod<QtJniTypes::Display>(
76 "getDisplay", QtAndroidPrivate::context(), displayId);
77 if (!display.isValid())
78 return nullptr;
79 return new QAndroidPlatformScreen(display);
80}
81
82static bool isValidAndroidContextForRendering()
83{
84 return QtAndroid::isQtApplication() ? QtAndroidPrivate::activity().isValid()
85 : QtAndroidPrivate::context().isValid();
86}
87
88} // anonymous namespace
89
91{
92 if (resource=="JavaVM")
93 return QtAndroidPrivate::javaVM();
94 if (resource == "QtActivity") {
95 extern Q_CORE_EXPORT jobject qt_androidActivity();
96 return qt_androidActivity();
97 }
98 if (resource == "QtService") {
99 extern Q_CORE_EXPORT jobject qt_androidService();
100 return qt_androidService();
101 }
102 if (resource == "AndroidStyleData") {
103 if (m_androidStyle) {
104 if (m_androidStyle->m_styleData.isEmpty())
105 m_androidStyle->m_styleData = AndroidStyle::loadStyleData();
106 return &m_androidStyle->m_styleData;
107 }
108 else
109 return nullptr;
110 }
111 if (resource == "AndroidStandardPalette") {
112 if (m_androidStyle)
113 return &m_androidStyle->m_standardPalette;
114
115 return nullptr;
116 }
117 if (resource == "AndroidQWidgetFonts") {
118 if (m_androidStyle)
119 return &m_androidStyle->m_QWidgetsFonts;
120
121 return nullptr;
122 }
123 if (resource == "AndroidDeviceName") {
124 static QString deviceName = QtAndroid::deviceName();
125 return &deviceName;
126 }
127 return 0;
128}
129
130void *QAndroidPlatformNativeInterface::nativeResourceForWindow(const QByteArray &resource, QWindow *window)
131{
132#if QT_CONFIG(vulkan)
133 if (resource == "vkSurface") {
134 if (window->surfaceType() == QSurface::VulkanSurface) {
135 QAndroidPlatformVulkanWindow *w = static_cast<QAndroidPlatformVulkanWindow *>(window->handle());
136 // return a pointer to the VkSurfaceKHR, not the value
137 return w ? w->vkSurface() : nullptr;
138 }
139 }
140#else
141 Q_UNUSED(resource);
142 Q_UNUSED(window);
143#endif
144 return nullptr;
145}
146
147void *QAndroidPlatformNativeInterface::nativeResourceForContext(const QByteArray &resource, QOpenGLContext *context)
148{
149#if QT_CONFIG(egl)
150 if (QEGLPlatformContext *platformContext = static_cast<QEGLPlatformContext *>(context->handle())) {
151 if (resource == "eglcontext")
152 return platformContext->eglContext();
153 else if (resource == "eglconfig")
154 return platformContext->eglConfig();
155 else if (resource == "egldisplay")
156 return platformContext->eglDisplay();
157 }
158#else
159 Q_UNUSED(resource)
160 Q_UNUSED(context)
161#endif
162 return nullptr;
163}
164
165void QAndroidPlatformNativeInterface::customEvent(QEvent *event)
166{
167 if (event->type() != QEvent::User)
168 return;
169
170 QMutexLocker lock(QtAndroid::platformInterfaceMutex());
171 QAndroidPlatformIntegration *api = static_cast<QAndroidPlatformIntegration *>(QGuiApplicationPrivate::platformIntegration());
173
174#if QT_CONFIG(accessibility)
175 // Android accessibility activation event might have been already received
176 api->accessibility()->setActive(QtAndroidAccessibility::isActive());
177#endif // QT_CONFIG(accessibility)
178
180}
181
183 : m_touchDevice(nullptr)
184#if QT_CONFIG(accessibility)
185 , m_accessibility(nullptr)
186#endif
187{
188 Q_UNUSED(paramList);
189 m_androidPlatformNativeInterface = new QAndroidPlatformNativeInterface();
190
191#if QT_CONFIG(egl)
192 m_eglDisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY);
193 if (Q_UNLIKELY(m_eglDisplay == EGL_NO_DISPLAY))
194 qFatal("Could not open egl display");
195
196 EGLint major, minor;
197 if (Q_UNLIKELY(!eglInitialize(m_eglDisplay, &major, &minor)))
198 qFatal("Could not initialize egl display");
199
200 if (Q_UNLIKELY(!eglBindAPI(EGL_OPENGL_ES_API)))
201 qFatal("Could not bind GL_ES API");
202#endif
203
204 using namespace QtJniTypes;
205 m_primaryDisplayId = Display::getStaticField<jint>("DEFAULT_DISPLAY");
206 const QJniObject nativeDisplaysList = QtDisplayManager::callStaticMethod<List>(
207 "getAvailableDisplays", QtAndroidPrivate::context());
208
209 const int numberOfAvailableDisplays = nativeDisplaysList.callMethod<jint>("size");
210 for (int i = 0; i < numberOfAvailableDisplays; ++i) {
211 const QJniObject display =
212 nativeDisplaysList.callObjectMethod<jobject, jint>("get", jint(i));
213 const int displayId = display.callMethod<jint>("getDisplayId");
214 const bool isPrimary = (m_primaryDisplayId == displayId);
215 auto screen = new QAndroidPlatformScreen(display);
216
217 if (isPrimary)
218 m_primaryScreen = screen;
219
220 QWindowSystemInterface::handleScreenAdded(screen, isPrimary);
221 m_screens[displayId] = screen;
222 }
223
224 if (numberOfAvailableDisplays == 0) {
225 // If no displays are found, add a dummy display
226 auto defaultScreen = new QAndroidPlatformScreen(QJniObject {});
227 m_primaryScreen = defaultScreen;
228 QWindowSystemInterface::handleScreenAdded(defaultScreen, true);
229 }
230
231 m_mainThread = QThread::currentThread();
232
233 m_androidFDB = new QAndroidPlatformFontDatabase();
234 m_androidPlatformServices.reset(new QAndroidPlatformServices);
235
236#ifndef QT_NO_CLIPBOARD
237 m_androidPlatformClipboard = new QAndroidPlatformClipboard();
238#endif
239
240#if QT_CONFIG(draganddrop)
241 m_androidPlatformDrag = new QAndroidPlatformDrag();
242#endif
243
244 m_androidSystemLocale = new QAndroidSystemLocale;
245
246#if QT_CONFIG(accessibility)
247 m_accessibility = new QAndroidPlatformAccessibility();
248#endif // QT_CONFIG(accessibility)
249
250 QJniObject javaActivity = QtAndroidPrivate::activity();
251 if (!javaActivity.isValid())
252 javaActivity = QtAndroidPrivate::service();
253
254 if (javaActivity.isValid()) {
255 QJniObject resources = javaActivity.callObjectMethod("getResources", "()Landroid/content/res/Resources;");
256 QJniObject configuration = resources.callObjectMethod("getConfiguration", "()Landroid/content/res/Configuration;");
257
258 int touchScreen = configuration.getField<jint>("touchscreen");
259 if (touchScreen == QJniObject::getStaticField<jint>("android/content/res/Configuration", "TOUCHSCREEN_FINGER")
260 || touchScreen == QJniObject::getStaticField<jint>("android/content/res/Configuration", "TOUCHSCREEN_STYLUS"))
261 {
262 QJniObject pm = javaActivity.callObjectMethod("getPackageManager", "()Landroid/content/pm/PackageManager;");
263 Q_ASSERT(pm.isValid());
264 int maxTouchPoints = 1;
265 if (pm.callMethod<jboolean>("hasSystemFeature","(Ljava/lang/String;)Z",
266 QJniObject::getStaticObjectField("android/content/pm/PackageManager",
267 "FEATURE_TOUCHSCREEN_MULTITOUCH_JAZZHAND",
268 "Ljava/lang/String;").object())) {
269 maxTouchPoints = 10;
270 } else if (pm.callMethod<jboolean>("hasSystemFeature","(Ljava/lang/String;)Z",
271 QJniObject::getStaticObjectField("android/content/pm/PackageManager",
272 "FEATURE_TOUCHSCREEN_MULTITOUCH_DISTINCT",
273 "Ljava/lang/String;").object())) {
274 maxTouchPoints = 4;
275 } else if (pm.callMethod<jboolean>("hasSystemFeature","(Ljava/lang/String;)Z",
276 QJniObject::getStaticObjectField("android/content/pm/PackageManager",
277 "FEATURE_TOUCHSCREEN_MULTITOUCH",
278 "Ljava/lang/String;").object())) {
279 maxTouchPoints = 2;
280 }
281
282 m_touchDevice = new QPointingDevice("Android touchscreen", 1,
283 QInputDevice::DeviceType::TouchScreen,
284 QPointingDevice::PointerType::Finger,
285 QPointingDevice::Capability::Position
286 | QPointingDevice::Capability::Area
287 | QPointingDevice::Capability::Pressure
288 | QPointingDevice::Capability::NormalizedPosition,
289 maxTouchPoints,
290 0);
291 QWindowSystemInterface::registerInputDevice(m_touchDevice);
292
293 QWindowSystemInterface::registerInputDevice(
294 new QInputDevice("Virtual keyboard"_L1, 0, QInputDevice::DeviceType::Keyboard,
295 {}, qApp));
296 }
297
298 auto contentResolver = javaActivity.callObjectMethod("getContentResolver", "()Landroid/content/ContentResolver;");
299 Q_ASSERT(contentResolver.isValid());
300 QJniObject txtShowPassValue = QJniObject::callStaticObjectMethod(
301 "android/provider/Settings$System",
302 "getString",
303 "(Landroid/content/ContentResolver;Ljava/lang/String;)Ljava/lang/String;",
304 contentResolver.object(),
305 QJniObject::getStaticObjectField("android/provider/Settings$System",
306 "TEXT_SHOW_PASSWORD",
307 "Ljava/lang/String;").object());
308 if (txtShowPassValue.isValid()) {
309 bool ok = false;
310 const int txtShowPass = txtShowPassValue.toString().toInt(&ok);
311 m_showPasswordEnabled = ok ? (txtShowPass == 1) : false;
312 }
313 }
314
315 // We can't safely notify the jni bridge that we're up and running just yet, so let's postpone
316 // it for now.
317 QCoreApplication::postEvent(m_androidPlatformNativeInterface, new QEvent(QEvent::User));
318}
319
321{
322 static bool needsWorkaround =
323 QtAndroid::deviceName().compare("samsung SM-T211"_L1, Qt::CaseInsensitive) == 0
324 || QtAndroid::deviceName().compare("samsung SM-T210"_L1, Qt::CaseInsensitive) == 0
325 || QtAndroid::deviceName().compare("samsung SM-T215"_L1, Qt::CaseInsensitive) == 0;
326 return needsWorkaround;
327}
328
330{
331 const auto icStrs = QPlatformInputContextFactory::requested();
332 if (icStrs.isEmpty())
333 m_inputContext.reset(new QAndroidInputContext);
334 else
335 m_inputContext.reset(QPlatformInputContextFactory::create(icStrs));
336}
337
339{
340 switch (cap) {
341 case ApplicationState: return true;
342 case ThreadedPixmaps: return true;
343 case NativeWidgets: return QtAndroidPrivate::activity().isValid();
344 case OpenGL:
345 return isValidAndroidContextForRendering();
346 case ForeignWindows:
347 return isValidAndroidContextForRendering();
348 case ThreadedOpenGL:
349 return !needsBasicRenderloopWorkaround() && isValidAndroidContextForRendering();
350 case TopStackedNativeChildWindows: return false;
351 case MaximizeUsingFullscreenGeometry: return true;
352 // FIXME QTBUG-118849 - we do not implement grabWindow() anymore, calling it will return
353 // a null QPixmap also for raster windows - for OpenGL windows this was always true
354 case ScreenWindowGrabbing: return false;
355 case OffscreenSurface: return QtAndroidPrivate::activity().isValid();
356 default:
357 return QPlatformIntegration::hasCapability(cap);
358 }
359}
360
362{
363 if (!QtAndroidPrivate::activity().isValid())
364 return nullptr;
365
366 return new QRhiBackingStore(window);
367}
368
369#if QT_CONFIG(egl)
370QPlatformOpenGLContext *QAndroidPlatformIntegration::createPlatformOpenGLContext(QOpenGLContext *context) const
371{
372 if (!isValidAndroidContextForRendering())
373 return nullptr;
374 QSurfaceFormat format(context->format());
375 format.setAlphaBufferSize(8);
376 format.setRedBufferSize(8);
377 format.setGreenBufferSize(8);
378 format.setBlueBufferSize(8);
379 auto ctx = new QAndroidPlatformOpenGLContext(format, context->shareHandle(), m_eglDisplay);
380 return ctx;
381}
382
383QOpenGLContext *QAndroidPlatformIntegration::createOpenGLContext(EGLContext context, EGLDisplay display, QOpenGLContext *shareContext) const
384{
385 return QEGLPlatformContext::createFrom<QAndroidPlatformOpenGLContext>(context, display, m_eglDisplay, shareContext);
386}
387
388QPlatformOffscreenSurface *QAndroidPlatformIntegration::createPlatformOffscreenSurface(QOffscreenSurface *surface) const
389{
390 if (!QtAndroidPrivate::activity().isValid())
391 return nullptr;
392
393 QSurfaceFormat format(surface->requestedFormat());
394 format.setAlphaBufferSize(8);
395 format.setRedBufferSize(8);
396 format.setGreenBufferSize(8);
397 format.setBlueBufferSize(8);
398
399 return new QEGLPbuffer(m_eglDisplay, format, surface);
400}
401
402QOffscreenSurface *QAndroidPlatformIntegration::createOffscreenSurface(ANativeWindow *nativeSurface) const
403{
404 if (!QtAndroidPrivate::activity().isValid() || !nativeSurface)
405 return nullptr;
406
407 auto *surface = new QOffscreenSurface;
408 auto *surfacePrivate = QOffscreenSurfacePrivate::get(surface);
409 surfacePrivate->platformOffscreenSurface = new QAndroidPlatformOffscreenSurface(nativeSurface, m_eglDisplay, surface);
410 return surface;
411}
412#endif
413
415{
416 if (!isValidAndroidContextForRendering())
417 return nullptr;
418
419#if QT_CONFIG(vulkan)
420 if (window->surfaceType() == QSurface::VulkanSurface)
421 return new QAndroidPlatformVulkanWindow(window);
422#endif
423
424#if QT_CONFIG(egl)
425 return new QAndroidPlatformOpenGLWindow(window, m_eglDisplay);
426#endif
427
428 return nullptr;
429}
430
431QPlatformWindow *QAndroidPlatformIntegration::createForeignWindow(QWindow *window, WId nativeHandle) const
432{
433 return new QAndroidPlatformForeignWindow(window, nativeHandle);
434}
435
440
442{
443#if QT_CONFIG(egl)
444 if (m_eglDisplay != EGL_NO_DISPLAY)
445 eglTerminate(m_eglDisplay);
446#endif
447
448 delete m_androidPlatformNativeInterface;
449 delete m_androidFDB;
450 delete m_androidSystemLocale;
451
452#ifndef QT_NO_CLIPBOARD
453 delete m_androidPlatformClipboard;
454#endif
455
456#if QT_CONFIG(draganddrop)
457 delete m_androidPlatformDrag;
458#endif
459
461}
462
464{
465 return m_androidFDB;
466}
467
468#ifndef QT_NO_CLIPBOARD
470{
471 return m_androidPlatformClipboard;
472}
473#endif
474
475#if QT_CONFIG(draganddrop)
476QPlatformDrag *QAndroidPlatformIntegration::drag() const
477{
478 return m_androidPlatformDrag;
479}
480#endif
481
483{
484 return m_inputContext.data();
485}
486
488{
489 return m_androidPlatformNativeInterface;
490}
491
493{
494 return m_androidPlatformServices.data();
495}
496
497QVariant QAndroidPlatformIntegration::styleHint(StyleHint hint) const
498{
499 switch (hint) {
500 case PasswordMaskDelay:
501 // this number is from a hard-coded value in Android code (cf. PasswordTransformationMethod)
502 return m_showPasswordEnabled ? 1500 : 0;
503 case ShowIsMaximized:
504 return true;
505 default:
506 return QPlatformIntegration::styleHint(hint);
507 }
508}
509
511{
512 // Don't maximize dialogs on Android
513 if (flags & Qt::Dialog & ~Qt::Window)
514 return Qt::WindowNoState;
515
516 return QPlatformIntegration::defaultWindowState(flags);
517}
518
519static const auto androidThemeName = "android"_L1;
521{
522 return QStringList(QString(androidThemeName));
523}
524
526{
527 if (androidThemeName == name)
528 return QAndroidPlatformTheme::instance(m_androidPlatformNativeInterface);
529
530 return 0;
531}
532
533void QAndroidPlatformIntegration::setScreenOrientation(Qt::ScreenOrientation currentOrientation,
534 Qt::ScreenOrientation nativeOrientation)
535{
536 m_orientation = currentOrientation;
537 m_nativeOrientation = nativeOrientation;
538}
539
541{
542 if (m_primaryScreen)
543 m_primaryScreen->setAvailableGeometry(m_primaryScreen->availableGeometry());
544}
545
546#if QT_CONFIG(accessibility)
547QPlatformAccessibility *QAndroidPlatformIntegration::accessibility() const
548{
549 return m_accessibility;
550}
551#endif
552
553extern "C" JNIEXPORT bool JNICALL
554Java_org_qtproject_qt_android_QtNativeAccessibility_accessibilitySupported(JNIEnv *, jobject)
555{
556 #if QT_CONFIG(accessibility)
557 return true;
558 #endif // QT_CONFIG(accessibility)
559
560 return false;
561}
562
563void QAndroidPlatformIntegration::setAvailableGeometry(const QRect &availableGeometry)
564{
565 if (m_primaryScreen)
566 QMetaObject::invokeMethod(m_primaryScreen, "setAvailableGeometry", Qt::AutoConnection, Q_ARG(QRect, availableGeometry));
567}
568
570{
571 if (m_primaryScreen)
572 QMetaObject::invokeMethod(m_primaryScreen, "setPhysicalSize", Qt::AutoConnection, Q_ARG(QSize, QSize(width, height)));
573}
574
575void QAndroidPlatformIntegration::setScreenSize(int width, int height)
576{
577 if (m_primaryScreen)
578 QMetaObject::invokeMethod(m_primaryScreen, "setSize", Qt::AutoConnection, Q_ARG(QSize, QSize(width, height)));
579}
580
581Qt::ColorScheme QAndroidPlatformIntegration::m_colorScheme = Qt::ColorScheme::Light;
582
583void QAndroidPlatformIntegration::updateColorScheme(Qt::ColorScheme colorScheme)
584{
585 if (m_colorScheme == colorScheme)
586 return;
587 m_colorScheme = colorScheme;
588
589 QMetaObject::invokeMethod(qGuiApp,
590 [] () { QAndroidPlatformTheme::instance()->updateColorScheme();});
591}
592
594{
595 if (m_primaryScreen)
596 QMetaObject::invokeMethod(m_primaryScreen, "setRefreshRate", Qt::AutoConnection,
597 Q_ARG(qreal, refreshRate));
598}
599
601{
602 auto result = m_screens.insert(displayId, nullptr);
603 if (result.first->second == nullptr) {
604 auto it = result.first;
605 it->second = createScreenForDisplayId(displayId);
606 if (it->second == nullptr)
607 return;
608 const bool isPrimary = (m_primaryDisplayId == displayId);
609 if (isPrimary)
610 m_primaryScreen = it->second;
611 QWindowSystemInterface::handleScreenAdded(it->second, isPrimary);
612 } else {
613 qWarning() << "Display with id" << displayId << "already exists.";
614 }
615}
616
618{
619 auto it = m_screens.find(displayId);
620 if (it == m_screens.end() || it->second == nullptr) {
621 handleScreenAdded(displayId);
622 }
623
624 if (QAndroidPlatformScreen *screen = it->second) {
625 QSize size = QAndroidPlatformScreen::sizeForDisplayId(displayId);
626 if (screen->geometry().size() != size) {
627 screen->setSize(size);
628 }
629 }
630
631 // We do not do handle changes in rotation, refresh rate and density
632 // as they are done under QtDisplayManager.
633}
634
636{
637 auto it = m_screens.find(displayId);
638
639 if (it == m_screens.end())
640 return;
641
642 if (it->second != nullptr)
643 QWindowSystemInterface::handleScreenRemoved(it->second);
644
645 m_screens.erase(it);
646}
647
648#if QT_CONFIG(vulkan)
649
650QPlatformVulkanInstance *QAndroidPlatformIntegration::createPlatformVulkanInstance(QVulkanInstance *instance) const
651{
652 return new QAndroidPlatformVulkanInstance(instance);
653}
654
655#endif // QT_CONFIG(vulkan)
656
657QT_END_NAMESPACE
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
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")