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
8
9#if QT_CONFIG(accessibility)
10#include "androidjniaccessibility.h"
11#endif
12#include "androidjnimain.h"
15#if QT_CONFIG(accessibility)
16#include "qandroidplatformaccessibility.h"
17#endif
19#if QT_CONFIG(draganddrop)
20#include "qandroidplatformdrag.h"
21#endif
25#if QT_CONFIG(egl)
26#include "qandroidplatformopenglcontext.h"
27#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#if QT_CONFIG(accessibility)
245 m_accessibility = new QAndroidPlatformAccessibility();
246#endif // QT_CONFIG(accessibility)
247
248 QJniObject javaActivity = QtAndroidPrivate::activity();
249 if (!javaActivity.isValid())
250 javaActivity = QtAndroidPrivate::service();
251
252 if (javaActivity.isValid()) {
253 QJniObject resources = javaActivity.callObjectMethod("getResources", "()Landroid/content/res/Resources;");
254 QJniObject configuration = resources.callObjectMethod("getConfiguration", "()Landroid/content/res/Configuration;");
255
256 int touchScreen = configuration.getField<jint>("touchscreen");
257 if (touchScreen == QJniObject::getStaticField<jint>("android/content/res/Configuration", "TOUCHSCREEN_FINGER")
258 || touchScreen == QJniObject::getStaticField<jint>("android/content/res/Configuration", "TOUCHSCREEN_STYLUS"))
259 {
260 QJniObject pm = javaActivity.callObjectMethod("getPackageManager", "()Landroid/content/pm/PackageManager;");
261 Q_ASSERT(pm.isValid());
262 int maxTouchPoints = 1;
263 if (pm.callMethod<jboolean>("hasSystemFeature","(Ljava/lang/String;)Z",
264 QJniObject::getStaticObjectField("android/content/pm/PackageManager",
265 "FEATURE_TOUCHSCREEN_MULTITOUCH_JAZZHAND",
266 "Ljava/lang/String;").object())) {
267 maxTouchPoints = 10;
268 } else if (pm.callMethod<jboolean>("hasSystemFeature","(Ljava/lang/String;)Z",
269 QJniObject::getStaticObjectField("android/content/pm/PackageManager",
270 "FEATURE_TOUCHSCREEN_MULTITOUCH_DISTINCT",
271 "Ljava/lang/String;").object())) {
272 maxTouchPoints = 4;
273 } else if (pm.callMethod<jboolean>("hasSystemFeature","(Ljava/lang/String;)Z",
274 QJniObject::getStaticObjectField("android/content/pm/PackageManager",
275 "FEATURE_TOUCHSCREEN_MULTITOUCH",
276 "Ljava/lang/String;").object())) {
277 maxTouchPoints = 2;
278 }
279
280 m_touchDevice = new QPointingDevice("Android touchscreen", 1,
281 QInputDevice::DeviceType::TouchScreen,
282 QPointingDevice::PointerType::Finger,
283 QPointingDevice::Capability::Position
284 | QPointingDevice::Capability::Area
285 | QPointingDevice::Capability::Pressure,
286 maxTouchPoints,
287 0);
288 QWindowSystemInterface::registerInputDevice(m_touchDevice);
289
290 QWindowSystemInterface::registerInputDevice(
291 new QInputDevice("Virtual keyboard"_L1, 0, QInputDevice::DeviceType::Keyboard,
292 {}, qApp));
293 }
294
295 auto contentResolver = javaActivity.callObjectMethod("getContentResolver", "()Landroid/content/ContentResolver;");
296 Q_ASSERT(contentResolver.isValid());
297 QJniObject txtShowPassValue = QJniObject::callStaticObjectMethod(
298 "android/provider/Settings$System",
299 "getString",
300 "(Landroid/content/ContentResolver;Ljava/lang/String;)Ljava/lang/String;",
301 contentResolver.object(),
302 QJniObject::getStaticObjectField("android/provider/Settings$System",
303 "TEXT_SHOW_PASSWORD",
304 "Ljava/lang/String;").object());
305 if (txtShowPassValue.isValid()) {
306 bool ok = false;
307 const int txtShowPass = txtShowPassValue.toString().toInt(&ok);
308 m_showPasswordEnabled = ok ? (txtShowPass == 1) : false;
309 }
310 }
311
312 // We can't safely notify the jni bridge that we're up and running just yet, so let's postpone
313 // it for now.
314 QCoreApplication::postEvent(m_androidPlatformNativeInterface, new QEvent(QEvent::User));
315}
316
318{
319 static bool needsWorkaround =
320 QtAndroid::deviceName().compare("samsung SM-T211"_L1, Qt::CaseInsensitive) == 0
321 || QtAndroid::deviceName().compare("samsung SM-T210"_L1, Qt::CaseInsensitive) == 0
322 || QtAndroid::deviceName().compare("samsung SM-T215"_L1, Qt::CaseInsensitive) == 0;
323 return needsWorkaround;
324}
325
327{
328 const auto icStrs = QPlatformInputContextFactory::requested();
329 if (icStrs.isEmpty())
330 m_inputContext.reset(new QAndroidInputContext);
331 else
332 m_inputContext.reset(QPlatformInputContextFactory::create(icStrs));
333}
334
336{
337 switch (cap) {
338 case ApplicationState: return true;
339 case ThreadedPixmaps: return true;
340 case NativeWidgets: return QtAndroidPrivate::activity().isValid();
341 case OpenGL:
342 return isValidAndroidContextForRendering();
343 case ForeignWindows:
344 return isValidAndroidContextForRendering();
345 case ThreadedOpenGL:
346 return !needsBasicRenderloopWorkaround() && isValidAndroidContextForRendering();
347 case TopStackedNativeChildWindows: return false;
348 case MaximizeUsingFullscreenGeometry: return true;
349 // FIXME QTBUG-118849 - we do not implement grabWindow() anymore, calling it will return
350 // a null QPixmap also for raster windows - for OpenGL windows this was always true
351 case ScreenWindowGrabbing: return false;
352 case OffscreenSurface: return QtAndroidPrivate::activity().isValid();
353 default:
354 return QPlatformIntegration::hasCapability(cap);
355 }
356}
357
359{
360 if (!QtAndroidPrivate::activity().isValid())
361 return nullptr;
362
363 return new QRhiBackingStore(window);
364}
365
366#if QT_CONFIG(egl)
367QPlatformOpenGLContext *QAndroidPlatformIntegration::createPlatformOpenGLContext(QOpenGLContext *context) const
368{
369 if (!isValidAndroidContextForRendering())
370 return nullptr;
371 QSurfaceFormat format(context->format());
372 format.setAlphaBufferSize(8);
373 format.setRedBufferSize(8);
374 format.setGreenBufferSize(8);
375 format.setBlueBufferSize(8);
376 auto ctx = new QAndroidPlatformOpenGLContext(format, context->shareHandle(), m_eglDisplay);
377 return ctx;
378}
379
380QOpenGLContext *QAndroidPlatformIntegration::createOpenGLContext(EGLContext context, EGLDisplay display, QOpenGLContext *shareContext) const
381{
382 return QEGLPlatformContext::createFrom<QAndroidPlatformOpenGLContext>(context, display, m_eglDisplay, shareContext);
383}
384
385QPlatformOffscreenSurface *QAndroidPlatformIntegration::createPlatformOffscreenSurface(QOffscreenSurface *surface) const
386{
387 if (!QtAndroidPrivate::activity().isValid())
388 return nullptr;
389
390 QSurfaceFormat format(surface->requestedFormat());
391 format.setAlphaBufferSize(8);
392 format.setRedBufferSize(8);
393 format.setGreenBufferSize(8);
394 format.setBlueBufferSize(8);
395
396 return new QEGLPbuffer(m_eglDisplay, format, surface);
397}
398
399QOffscreenSurface *QAndroidPlatformIntegration::createOffscreenSurface(ANativeWindow *nativeSurface) const
400{
401 if (!QtAndroidPrivate::activity().isValid() || !nativeSurface)
402 return nullptr;
403
404 auto *surface = new QOffscreenSurface;
405 auto *surfacePrivate = QOffscreenSurfacePrivate::get(surface);
406 surfacePrivate->platformOffscreenSurface = new QAndroidPlatformOffscreenSurface(nativeSurface, m_eglDisplay, surface);
407 return surface;
408}
409#endif
410
412{
413 if (!isValidAndroidContextForRendering())
414 return nullptr;
415
416#if QT_CONFIG(vulkan)
417 if (window->surfaceType() == QSurface::VulkanSurface)
418 return new QAndroidPlatformVulkanWindow(window);
419#endif
420
421#if QT_CONFIG(egl)
422 return new QAndroidPlatformOpenGLWindow(window, m_eglDisplay);
423#endif
424
425 return nullptr;
426}
427
428QPlatformWindow *QAndroidPlatformIntegration::createForeignWindow(QWindow *window, WId nativeHandle) const
429{
430 return new QAndroidPlatformForeignWindow(window, nativeHandle);
431}
432
437
439{
440#if QT_CONFIG(egl)
441 if (m_eglDisplay != EGL_NO_DISPLAY)
442 eglTerminate(m_eglDisplay);
443#endif
444
445 delete m_androidPlatformNativeInterface;
446 delete m_androidFDB;
447
448#ifndef QT_NO_CLIPBOARD
449 delete m_androidPlatformClipboard;
450#endif
451
452#if QT_CONFIG(draganddrop)
453 delete m_androidPlatformDrag;
454#endif
455
457}
458
460{
461 return m_androidFDB;
462}
463
464#ifndef QT_NO_CLIPBOARD
466{
467 return m_androidPlatformClipboard;
468}
469#endif
470
471#if QT_CONFIG(draganddrop)
472QPlatformDrag *QAndroidPlatformIntegration::drag() const
473{
474 return m_androidPlatformDrag;
475}
476#endif
477
479{
480 return m_inputContext.data();
481}
482
484{
485 return m_androidPlatformNativeInterface;
486}
487
489{
490 return m_androidPlatformServices.data();
491}
492
493QVariant QAndroidPlatformIntegration::styleHint(StyleHint hint) const
494{
495 switch (hint) {
496 case PasswordMaskDelay:
497 // this number is from a hard-coded value in Android code (cf. PasswordTransformationMethod)
498 return m_showPasswordEnabled ? 1500 : 0;
499 case ShowIsMaximized:
500 return true;
501 default:
502 return QPlatformIntegration::styleHint(hint);
503 }
504}
505
507{
508 // Don't maximize dialogs on Android
509 if (flags & Qt::Dialog & ~Qt::Window)
510 return Qt::WindowNoState;
511
512 return QPlatformIntegration::defaultWindowState(flags);
513}
514
515static const auto androidThemeName = "android"_L1;
517{
518 return QStringList(QString(androidThemeName));
519}
520
522{
523 if (androidThemeName == name)
524 return QAndroidPlatformTheme::instance(m_androidPlatformNativeInterface);
525
526 return 0;
527}
528
529void QAndroidPlatformIntegration::setScreenOrientation(Qt::ScreenOrientation currentOrientation,
530 Qt::ScreenOrientation nativeOrientation)
531{
532 m_orientation = currentOrientation;
533 m_nativeOrientation = nativeOrientation;
534}
535
537{
538 if (!m_primaryScreen)
539 return;
540
541 // Apply the latest layout size, it may have changed since the screen
542 // snapshotted it at construction, e.g. an app enabling edge-to-edge.
543 const QRect availableDefault = QAndroidPlatformScreen::defaultAvailableGeometry();
544 m_primaryScreen->setAvailableGeometry(availableDefault.isNull() ?
545 m_primaryScreen->availableGeometry() : availableDefault);
546}
547
548#if QT_CONFIG(accessibility)
549QPlatformAccessibility *QAndroidPlatformIntegration::accessibility() const
550{
551 return m_accessibility;
552}
553#endif
554
555extern "C" JNIEXPORT bool JNICALL
556Java_org_qtproject_qt_android_QtNativeAccessibility_accessibilitySupported(JNIEnv *, jobject)
557{
558 #if QT_CONFIG(accessibility)
559 return true;
560 #endif // QT_CONFIG(accessibility)
561
562 return false;
563}
564
565void QAndroidPlatformIntegration::setAvailableGeometry(const QRect &availableGeometry)
566{
567 if (m_primaryScreen)
568 QMetaObject::invokeMethod(m_primaryScreen, "setAvailableGeometry", Qt::AutoConnection, Q_ARG(QRect, availableGeometry));
569}
570
572{
573 if (m_primaryScreen)
574 QMetaObject::invokeMethod(m_primaryScreen, "setPhysicalSize", Qt::AutoConnection, Q_ARG(QSize, QSize(width, height)));
575}
576
577void QAndroidPlatformIntegration::setScreenSize(int width, int height)
578{
579 if (m_primaryScreen)
580 QMetaObject::invokeMethod(m_primaryScreen, "setSize", Qt::AutoConnection, Q_ARG(QSize, QSize(width, height)));
581}
582
583Qt::ColorScheme QAndroidPlatformIntegration::m_colorScheme = Qt::ColorScheme::Light;
584
585void QAndroidPlatformIntegration::updateColorScheme(Qt::ColorScheme colorScheme)
586{
587 if (m_colorScheme == colorScheme)
588 return;
589 m_colorScheme = colorScheme;
590
591 QMetaObject::invokeMethod(qGuiApp,
592 [] () { QAndroidPlatformTheme::instance()->updateColorScheme();});
593}
594
596{
597 if (m_primaryScreen)
598 QMetaObject::invokeMethod(m_primaryScreen, "setRefreshRate", Qt::AutoConnection,
599 Q_ARG(qreal, refreshRate));
600}
601
603{
604 auto result = m_screens.insert(displayId, nullptr);
605 if (result.first->second == nullptr) {
606 auto it = result.first;
607 it->second = createScreenForDisplayId(displayId);
608 if (it->second == nullptr)
609 return;
610 const bool isPrimary = (m_primaryDisplayId == displayId);
611 if (isPrimary)
612 m_primaryScreen = it->second;
613 QWindowSystemInterface::handleScreenAdded(it->second, isPrimary);
614 } else {
615 qWarning() << "Display with id" << displayId << "already exists.";
616 }
617}
618
620{
621 auto it = m_screens.find(displayId);
622 if (it == m_screens.end() || it->second == nullptr) {
623 handleScreenAdded(displayId);
624 }
625
626 if (QAndroidPlatformScreen *screen = it->second) {
627 QSize size = QAndroidPlatformScreen::sizeForDisplayId(displayId);
628 if (screen->geometry().size() != size) {
629 screen->setSize(size);
630 }
631 }
632
633 // We do not do handle changes in rotation, refresh rate and density
634 // as they are done under QtDisplayManager.
635}
636
638{
639 auto it = m_screens.find(displayId);
640
641 if (it == m_screens.end())
642 return;
643
644 if (it->second != nullptr)
645 QWindowSystemInterface::handleScreenRemoved(it->second);
646
647 m_screens.erase(it);
648}
649
650#if QT_CONFIG(vulkan)
651
652QPlatformVulkanInstance *QAndroidPlatformIntegration::createPlatformVulkanInstance(QVulkanInstance *instance) const
653{
654 return new QAndroidPlatformVulkanInstance(instance);
655}
656
657#endif // QT_CONFIG(vulkan)
658
659QT_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")