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
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
6
8#include "androidjnimain.h"
22
23#include <QGuiApplication>
24#include <QOffscreenSurface>
25#include <QOpenGLContext>
26#include <QThread>
27#include <QtCore/QJniObject>
28#include <QtGui/private/qeglpbuffer_p.h>
29#include <QtGui/private/qguiapplication_p.h>
30#include <QtGui/private/qoffscreensurface_p.h>
31#include <QtGui/private/qrhibackingstore_p.h>
32#include <qpa/qplatformoffscreensurface.h>
33#include <qpa/qplatformwindow.h>
34#include <qpa/qwindowsysteminterface.h>
35
36#include <jni.h>
37
38#if QT_CONFIG(vulkan)
41#endif
42
43#include <QtGui/qpa/qplatforminputcontextfactory_p.h>
44
46
47using namespace Qt::StringLiterals;
48
49Q_CONSTINIT QSize QAndroidPlatformIntegration::m_defaultScreenSize = QSize(320, 455);
50Q_CONSTINIT QRect QAndroidPlatformIntegration::m_defaultAvailableGeometry = QRect(0, 0, 320, 455);
51Q_CONSTINIT QSize QAndroidPlatformIntegration::m_defaultPhysicalSize = QSize(50, 71);
52
53Qt::ScreenOrientation QAndroidPlatformIntegration::m_orientation = Qt::PrimaryOrientation;
54Qt::ScreenOrientation QAndroidPlatformIntegration::m_nativeOrientation = Qt::PrimaryOrientation;
55
56bool QAndroidPlatformIntegration::m_showPasswordEnabled = false;
57
58Q_DECLARE_JNI_CLASS(QtNative, "org/qtproject/qt/android/QtNative")
59Q_DECLARE_JNI_CLASS(QtDisplayManager, "org/qtproject/qt/android/QtDisplayManager")
61
62Q_DECLARE_JNI_CLASS(List, "java/util/List")
63
64namespace {
65
66QAndroidPlatformScreen* createScreenForDisplayId(int displayId)
67{
68 const QJniObject display = QtJniTypes::QtDisplayManager::callStaticMethod<QtJniTypes::Display>(
69 "getDisplay", QtAndroidPrivate::context(), displayId);
70 if (!display.isValid())
71 return nullptr;
73}
74
75static bool isValidAndroidContextForRendering()
76{
78 : QtAndroidPrivate::context().isValid();
79}
80
81} // anonymous namespace
82
84{
85 if (resource=="JavaVM")
86 return QtAndroid::javaVM();
87 if (resource == "QtActivity") {
88 extern Q_CORE_EXPORT jobject qt_androidActivity();
89 return qt_androidActivity();
90 }
91 if (resource == "QtService") {
92 extern Q_CORE_EXPORT jobject qt_androidService();
93 return qt_androidService();
94 }
95 if (resource == "AndroidStyleData") {
96 if (m_androidStyle) {
97 if (m_androidStyle->m_styleData.isEmpty())
99 return &m_androidStyle->m_styleData;
100 }
101 else
102 return nullptr;
103 }
104 if (resource == "AndroidStandardPalette") {
105 if (m_androidStyle)
106 return &m_androidStyle->m_standardPalette;
107
108 return nullptr;
109 }
110 if (resource == "AndroidQWidgetFonts") {
111 if (m_androidStyle)
112 return &m_androidStyle->m_QWidgetsFonts;
113
114 return nullptr;
115 }
116 if (resource == "AndroidDeviceName") {
117 static QString deviceName = QtAndroid::deviceName();
118 return &deviceName;
119 }
120 return 0;
121}
122
124{
125#if QT_CONFIG(vulkan)
126 if (resource == "vkSurface") {
127 if (window->surfaceType() == QSurface::VulkanSurface) {
129 // return a pointer to the VkSurfaceKHR, not the value
130 return w ? w->vkSurface() : nullptr;
131 }
132 }
133#else
134 Q_UNUSED(resource);
136#endif
137 return nullptr;
138}
139
141{
142 if (QEGLPlatformContext *platformContext = static_cast<QEGLPlatformContext *>(context->handle())) {
143 if (resource == "eglcontext")
144 return platformContext->eglContext();
145 else if (resource == "eglconfig")
146 return platformContext->eglConfig();
147 else if (resource == "egldisplay")
148 return platformContext->eglDisplay();
149 }
150 return nullptr;
151}
152
154{
155 if (event->type() != QEvent::User)
156 return;
157
161
162#if QT_CONFIG(accessibility)
163 // Android accessibility activation event might have been already received
164 api->accessibility()->setActive(QtAndroidAccessibility::isActive());
165#endif // QT_CONFIG(accessibility)
166
167 api->flushPendingUpdates();
168}
169
171 : m_touchDevice(nullptr)
172#if QT_CONFIG(accessibility)
173 , m_accessibility(nullptr)
174#endif
175{
176 Q_UNUSED(paramList);
177 m_androidPlatformNativeInterface = new QAndroidPlatformNativeInterface();
178
179 m_eglDisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY);
180 if (Q_UNLIKELY(m_eglDisplay == EGL_NO_DISPLAY))
181 qFatal("Could not open egl display");
182
183 EGLint major, minor;
184 if (Q_UNLIKELY(!eglInitialize(m_eglDisplay, &major, &minor)))
185 qFatal("Could not initialize egl display");
186
187 if (Q_UNLIKELY(!eglBindAPI(EGL_OPENGL_ES_API)))
188 qFatal("Could not bind GL_ES API");
189
190 using namespace QtJniTypes;
191 m_primaryDisplayId = Display::getStaticField<jint>("DEFAULT_DISPLAY");
192 const QJniObject nativeDisplaysList = QtDisplayManager::callStaticMethod<List>(
193 "getAvailableDisplays", QtAndroidPrivate::context());
194
195 const int numberOfAvailableDisplays = nativeDisplaysList.callMethod<jint>("size");
196 for (int i = 0; i < numberOfAvailableDisplays; ++i) {
197 const QJniObject display =
198 nativeDisplaysList.callObjectMethod<jobject, jint>("get", jint(i));
199 const int displayId = display.callMethod<jint>("getDisplayId");
200 const bool isPrimary = (m_primaryDisplayId == displayId);
202
203 if (isPrimary)
204 m_primaryScreen = screen;
205
207 m_screens[displayId] = screen;
208 }
209
210 if (numberOfAvailableDisplays == 0) {
211 // If no displays are found, add a dummy display
213 m_primaryScreen = defaultScreen;
215 }
216
217 m_mainThread = QThread::currentThread();
218
219 m_androidFDB = new QAndroidPlatformFontDatabase();
220 m_androidPlatformServices = new QAndroidPlatformServices();
221
222#ifndef QT_NO_CLIPBOARD
223 m_androidPlatformClipboard = new QAndroidPlatformClipboard();
224#endif
225
226 m_androidSystemLocale = new QAndroidSystemLocale;
227
228#if QT_CONFIG(accessibility)
229 m_accessibility = new QAndroidPlatformAccessibility();
230#endif // QT_CONFIG(accessibility)
231
232 QJniObject javaActivity = QtAndroidPrivate::activity();
233 if (!javaActivity.isValid())
234 javaActivity = QtAndroidPrivate::service();
235
236 if (javaActivity.isValid()) {
237 QJniObject resources = javaActivity.callObjectMethod("getResources", "()Landroid/content/res/Resources;");
238 QJniObject configuration = resources.callObjectMethod("getConfiguration", "()Landroid/content/res/Configuration;");
239
240 int touchScreen = configuration.getField<jint>("touchscreen");
241 if (touchScreen == QJniObject::getStaticField<jint>("android/content/res/Configuration", "TOUCHSCREEN_FINGER")
242 || touchScreen == QJniObject::getStaticField<jint>("android/content/res/Configuration", "TOUCHSCREEN_STYLUS"))
243 {
244 QJniObject pm = javaActivity.callObjectMethod("getPackageManager", "()Landroid/content/pm/PackageManager;");
245 Q_ASSERT(pm.isValid());
246 int maxTouchPoints = 1;
247 if (pm.callMethod<jboolean>("hasSystemFeature","(Ljava/lang/String;)Z",
248 QJniObject::getStaticObjectField("android/content/pm/PackageManager",
249 "FEATURE_TOUCHSCREEN_MULTITOUCH_JAZZHAND",
250 "Ljava/lang/String;").object())) {
251 maxTouchPoints = 10;
252 } else if (pm.callMethod<jboolean>("hasSystemFeature","(Ljava/lang/String;)Z",
253 QJniObject::getStaticObjectField("android/content/pm/PackageManager",
254 "FEATURE_TOUCHSCREEN_MULTITOUCH_DISTINCT",
255 "Ljava/lang/String;").object())) {
256 maxTouchPoints = 4;
257 } else if (pm.callMethod<jboolean>("hasSystemFeature","(Ljava/lang/String;)Z",
258 QJniObject::getStaticObjectField("android/content/pm/PackageManager",
259 "FEATURE_TOUCHSCREEN_MULTITOUCH",
260 "Ljava/lang/String;").object())) {
261 maxTouchPoints = 2;
262 }
263
264 m_touchDevice = new QPointingDevice("Android touchscreen", 1,
271 maxTouchPoints,
272 0);
274
276 new QInputDevice("Virtual keyboard"_L1, 0, QInputDevice::DeviceType::Keyboard,
277 {}, qApp));
278 }
279
280 auto contentResolver = javaActivity.callObjectMethod("getContentResolver", "()Landroid/content/ContentResolver;");
281 Q_ASSERT(contentResolver.isValid());
282 QJniObject txtShowPassValue = QJniObject::callStaticObjectMethod(
283 "android/provider/Settings$System",
284 "getString",
285 "(Landroid/content/ContentResolver;Ljava/lang/String;)Ljava/lang/String;",
286 contentResolver.object(),
287 QJniObject::getStaticObjectField("android/provider/Settings$System",
288 "TEXT_SHOW_PASSWORD",
289 "Ljava/lang/String;").object());
290 if (txtShowPassValue.isValid()) {
291 bool ok = false;
292 const int txtShowPass = txtShowPassValue.toString().toInt(&ok);
293 m_showPasswordEnabled = ok ? (txtShowPass == 1) : false;
294 }
295 }
296
297 // We can't safely notify the jni bridge that we're up and running just yet, so let's postpone
298 // it for now.
299 QCoreApplication::postEvent(m_androidPlatformNativeInterface, new QEvent(QEvent::User));
300}
301
303{
304 static bool needsWorkaround =
305 QtAndroid::deviceName().compare("samsung SM-T211"_L1, Qt::CaseInsensitive) == 0
306 || QtAndroid::deviceName().compare("samsung SM-T210"_L1, Qt::CaseInsensitive) == 0
307 || QtAndroid::deviceName().compare("samsung SM-T215"_L1, Qt::CaseInsensitive) == 0;
308 return needsWorkaround;
309}
310
312{
313 const auto icStrs = QPlatformInputContextFactory::requested();
314 if (icStrs.isEmpty())
315 m_inputContext.reset(new QAndroidInputContext);
316 else
317 m_inputContext.reset(QPlatformInputContextFactory::create(icStrs));
318}
319
321{
322 switch (cap) {
323 case ApplicationState: return true;
324 case ThreadedPixmaps: return true;
325 case NativeWidgets: return QtAndroidPrivate::activity().isValid();
326 case OpenGL:
327 return isValidAndroidContextForRendering();
328 case ForeignWindows:
329 return isValidAndroidContextForRendering();
330 case ThreadedOpenGL:
331 return !needsBasicRenderloopWorkaround() && isValidAndroidContextForRendering();
332 case RasterGLSurface: return QtAndroidPrivate::activity().isValid();
333 case TopStackedNativeChildWindows: return false;
334 case MaximizeUsingFullscreenGeometry: return true;
335 // FIXME QTBUG-118849 - we do not implement grabWindow() anymore, calling it will return
336 // a null QPixmap also for raster windows - for OpenGL windows this was always true
337 case ScreenWindowGrabbing: return false;
338 default:
340 }
341}
342
350
352{
353 if (!isValidAndroidContextForRendering())
354 return nullptr;
355 QSurfaceFormat format(context->format());
356 format.setAlphaBufferSize(8);
357 format.setRedBufferSize(8);
358 format.setGreenBufferSize(8);
359 format.setBlueBufferSize(8);
360 auto ctx = new QAndroidPlatformOpenGLContext(format, context->shareHandle(), m_eglDisplay);
361 return ctx;
362}
363
365{
366 return QEGLPlatformContext::createFrom<QAndroidPlatformOpenGLContext>(context, display, m_eglDisplay, shareContext);
367}
368
370{
371 if (!QtAndroidPrivate::activity().isValid())
372 return nullptr;
373
375 format.setAlphaBufferSize(8);
376 format.setRedBufferSize(8);
377 format.setGreenBufferSize(8);
378 format.setBlueBufferSize(8);
379
380 return new QEGLPbuffer(m_eglDisplay, format, surface);
381}
382
384{
385 if (!QtAndroidPrivate::activity().isValid() || !nativeSurface)
386 return nullptr;
387
388 auto *surface = new QOffscreenSurface;
389 auto *surfacePrivate = QOffscreenSurfacePrivate::get(surface);
390 surfacePrivate->platformOffscreenSurface = new QAndroidPlatformOffscreenSurface(nativeSurface, m_eglDisplay, surface);
391 return surface;
392}
393
395{
396 if (!isValidAndroidContextForRendering())
397 return nullptr;
398
399#if QT_CONFIG(vulkan)
400 if (window->surfaceType() == QSurface::VulkanSurface)
402#endif
403
404 return new QAndroidPlatformOpenGLWindow(window, m_eglDisplay);
405}
406
411
416
418{
419 if (m_eglDisplay != EGL_NO_DISPLAY)
420 eglTerminate(m_eglDisplay);
421
422 delete m_androidPlatformNativeInterface;
423 delete m_androidFDB;
424 delete m_androidSystemLocale;
425
426#ifndef QT_NO_CLIPBOARD
427 delete m_androidPlatformClipboard;
428#endif
429
431}
432
434{
435 return m_androidFDB;
436}
437
438#ifndef QT_NO_CLIPBOARD
440{
441 return m_androidPlatformClipboard;
442}
443#endif
444
446{
447 return m_inputContext.data();
448}
449
451{
452 return m_androidPlatformNativeInterface;
453}
454
456{
457 return m_androidPlatformServices;
458}
459
461{
462 switch (hint) {
464 // this number is from a hard-coded value in Android code (cf. PasswordTransformationMethod)
465 return m_showPasswordEnabled ? 1500 : 0;
466 case ShowIsMaximized:
467 return true;
468 default:
470 }
471}
472
474{
475 // Don't maximize dialogs on Android
476 if (flags & Qt::Dialog & ~Qt::Window)
477 return Qt::WindowNoState;
478
480}
481
482static const auto androidThemeName = "android"_L1;
487
489{
490 if (androidThemeName == name)
491 return QAndroidPlatformTheme::instance(m_androidPlatformNativeInterface);
492
493 return 0;
494}
495
496void QAndroidPlatformIntegration::setDefaultDisplayMetrics(int availableLeft, int availableTop,
497 int availableWidth, int availableHeight,
498 int physicalWidth, int physicalHeight,
499 int screenWidth, int screenHeight)
500{
501 m_defaultAvailableGeometry = QRect(availableLeft, availableTop,
502 availableWidth, availableHeight);
503 m_defaultPhysicalSize = QSize(physicalWidth, physicalHeight);
504 m_defaultScreenSize = QSize(screenWidth, screenHeight);
505}
506
508 Qt::ScreenOrientation nativeOrientation)
509{
510 m_orientation = currentOrientation;
511 m_nativeOrientation = nativeOrientation;
512}
513
515{
516 if (m_primaryScreen) {
517 m_primaryScreen->setSizeParameters(m_defaultPhysicalSize, m_defaultScreenSize,
518 m_defaultAvailableGeometry);
519 }
520}
521
522#if QT_CONFIG(accessibility)
523QPlatformAccessibility *QAndroidPlatformIntegration::accessibility() const
524{
525 return m_accessibility;
526}
527#endif
528
530{
531 if (m_primaryScreen)
532 QMetaObject::invokeMethod(m_primaryScreen, "setAvailableGeometry", Qt::AutoConnection, Q_ARG(QRect, availableGeometry));
533}
534
536{
537 if (m_primaryScreen)
538 QMetaObject::invokeMethod(m_primaryScreen, "setPhysicalSize", Qt::AutoConnection, Q_ARG(QSize, QSize(width, height)));
539}
540
542{
543 if (m_primaryScreen)
544 QMetaObject::invokeMethod(m_primaryScreen, "setSize", Qt::AutoConnection, Q_ARG(QSize, QSize(width, height)));
545}
546
547Qt::ColorScheme QAndroidPlatformIntegration::m_colorScheme = Qt::ColorScheme::Light;
548
550{
551 if (m_colorScheme == colorScheme)
552 return;
553 m_colorScheme = colorScheme;
554
556 [] () { QAndroidPlatformTheme::instance()->updateColorScheme();});
557}
558
560 const QSize &screenSize,
561 const QRect &availableGeometry)
562{
563 if (m_primaryScreen) {
564 QMetaObject::invokeMethod(m_primaryScreen, "setSizeParameters", Qt::AutoConnection,
565 Q_ARG(QSize, physicalSize), Q_ARG(QSize, screenSize),
566 Q_ARG(QRect, availableGeometry));
567 }
568}
569
571{
572 if (m_primaryScreen)
573 QMetaObject::invokeMethod(m_primaryScreen, "setRefreshRate", Qt::AutoConnection,
574 Q_ARG(qreal, refreshRate));
575}
576
578{
579 auto result = m_screens.insert(displayId, nullptr);
580 if (result.first->second == nullptr) {
581 auto it = result.first;
582 it->second = createScreenForDisplayId(displayId);
583 if (it->second == nullptr)
584 return;
585 const bool isPrimary = (m_primaryDisplayId == displayId);
586 if (isPrimary)
587 m_primaryScreen = it->second;
589 } else {
590 qWarning() << "Display with id" << displayId << "already exists.";
591 }
592}
593
595{
596 auto it = m_screens.find(displayId);
597 if (it == m_screens.end() || it->second == nullptr) {
598 handleScreenAdded(displayId);
599 }
600 // We do not do anything more here as handling of change of
601 // rotation and refresh rate is done in QtActivityDelegate java class
602 // which calls QAndroidPlatformIntegration::setOrientation, and
603 // QAndroidPlatformIntegration::setRefreshRate accordingly.
604}
605
607{
608 auto it = m_screens.find(displayId);
609
610 if (it == m_screens.end())
611 return;
612
613 if (it->second != nullptr)
615
616 m_screens.erase(it);
617}
618
619#if QT_CONFIG(vulkan)
620
621QPlatformVulkanInstance *QAndroidPlatformIntegration::createPlatformVulkanInstance(QVulkanInstance *instance) const
622{
623 return new QAndroidPlatformVulkanInstance(instance);
624}
625
626#endif // QT_CONFIG(vulkan)
627
QPlatformFontDatabase * fontDatabase() const override
Accessor for the platform integration's fontdatabase.
QPlatformWindow * createForeignWindow(QWindow *window, WId nativeHandle) const override
static void setDefaultDisplayMetrics(int availableLeft, int availableTop, int availableWidth, int availableHeight, int physicalWidth, int physicalHeight, int screenWidth, int screenHeight)
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)
QOffscreenSurface * createOffscreenSurface(ANativeWindow *nativeSurface) const override
void setScreenSize(int width, int height)
QPlatformOffscreenSurface * createPlatformOffscreenSurface(QOffscreenSurface *surface) const override
Factory function for QOffscreenSurface.
QPlatformOpenGLContext * createPlatformOpenGLContext(QOpenGLContext *context) const override
Factory function for QPlatformOpenGLContext.
void setPhysicalSize(int width, int height)
bool hasCapability(QPlatformIntegration::Capability cap) const override
void setScreenSizeParameters(const QSize &physicalSize, const QSize &screenSize, const QRect &availableGeometry)
QPlatformWindow * createPlatformWindow(QWindow *window) const override
Factory function for QPlatformWindow.
QPlatformClipboard * clipboard() const override
Accessor for the platform integration's clipboard.
static void updateColorScheme(Qt::ColorScheme colorScheme)
QOpenGLContext * createOpenGLContext(EGLContext context, EGLDisplay display, QOpenGLContext *shareContext) const override
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
static void setScreenOrientation(Qt::ScreenOrientation currentOrientation, Qt::ScreenOrientation nativeOrientation)
QPlatformServices * services() const override
void customEvent(QEvent *event) override
This event handler can be reimplemented in a subclass to receive custom events.
void * nativeResourceForContext(const QByteArray &resource, QOpenGLContext *context) override
void * nativeResourceForWindow(const QByteArray &resource, QWindow *window) override
void * nativeResourceForIntegration(const QByteArray &resource) override
std::shared_ptr< AndroidStyle > m_androidStyle
void setSizeParameters(const QSize &physicalSize, const QSize &size, const QRect &availableGeometry)
static QAndroidPlatformTheme * instance(QAndroidPlatformNativeInterface *androidPlatformNativeInterface=nullptr)
\inmodule QtCore
Definition qbytearray.h:57
static void postEvent(QObject *receiver, QEvent *event, int priority=Qt::NormalEventPriority)
A pbuffer-based implementation of QPlatformOffscreenSurface for EGL.
An EGL context implementation.
\inmodule QtCore
Definition qcoreevent.h:45
iterator end()
Definition qflatmap_p.h:773
iterator erase(iterator it)
Definition qflatmap_p.h:608
iterator find(const Key &key)
Definition qflatmap_p.h:816
std::pair< iterator, bool > insert(const Key &key, const T &value)
Definition qflatmap_p.h:678
static QPlatformIntegration * platformIntegration()
The QInputDevice class describes a device from which a QInputEvent originates.
\inmodule QtCore
\inmodule QtCore
Definition qmutex.h:313
static QOffscreenSurfacePrivate * get(QOffscreenSurface *surface)
\inmodule QtGui
QSurfaceFormat requestedFormat() const
Returns the requested surfaceformat of this offscreen surface.
\inmodule QtGui
The QPlatformBackingStore class provides the drawing area for top-level windows.
The QPlatformClipboard class provides an abstraction for the system clipboard.
The QPlatformFontDatabase class makes it possible to customize how fonts are discovered and how they ...
static QPlatformInputContext * create()
The QPlatformInputContext class abstracts the input method dependent data and composing state.
virtual QVariant styleHint(StyleHint hint) const
virtual Qt::WindowState defaultWindowState(Qt::WindowFlags) const
virtual bool hasCapability(Capability cap) const
Capability
Capabilities are used to determine specific features of a platform integration.
The QPlatformNativeInterface class provides an abstraction for retrieving native resource handles.
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 QPlatformVulkanInstance class provides an abstraction for Vulkan instances.
The QPlatformWindow class provides an abstraction for top-level windows.
The QPointingDevice class describes a device from which mouse, touch or tablet events originate.
\inmodule QtCore\reentrant
Definition qrect.h:30
T * data() const noexcept
Returns the value of the pointer referenced by this object.
void reset(T *other=nullptr) noexcept(noexcept(Cleanup::cleanup(std::declval< T * >())))
Deletes the existing object it is pointing to (if any), and sets its pointer to other.
\inmodule QtCore
Definition qsize.h:25
\inmodule QtCore
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
int compare(const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const noexcept
Definition qstring.cpp:6664
The QSurfaceFormat class represents the format of a QSurface. \inmodule QtGui.
@ VulkanSurface
Definition qsurface.h:35
static QThread * currentThread()
Definition qthread.cpp:1039
\inmodule QtCore
Definition qvariant.h:65
The QVulkanInstance class represents a native Vulkan instance, enabling Vulkan rendering onto a QSurf...
static void registerInputDevice(const QInputDevice *device)
static void handleScreenAdded(QPlatformScreen *screen, bool isPrimary=false)
Should be called by the implementation whenever a new screen is added.
static void handleScreenRemoved(QPlatformScreen *screen)
Should be called by the implementation whenever a screen is removed.
\inmodule QtGui
Definition qwindow.h:63
EGLContext ctx
QSet< QString >::iterator it
struct wl_display * display
Definition linuxdmabuf.h:41
Combined button and popup list for selecting options.
Q_CORE_EXPORT QtJniTypes::Context context()
Q_CORE_EXPORT QtJniTypes::Activity activity()
Q_CORE_EXPORT QtJniTypes::Service service()
void setAndroidPlatformIntegration(QAndroidPlatformIntegration *androidPlatformIntegration)
QBasicMutex * platformInterfaceMutex()
QString deviceName()
JavaVM * javaVM()
bool isQtApplication()
WindowState
Definition qnamespace.h:251
@ WindowNoState
Definition qnamespace.h:252
ColorScheme
Definition qnamespace.h:50
ScreenOrientation
Definition qnamespace.h:271
@ PrimaryOrientation
Definition qnamespace.h:272
@ CaseInsensitive
@ AutoConnection
@ Window
Definition qnamespace.h:207
@ Dialog
Definition qnamespace.h:208
static void * context
static const auto androidThemeName
static bool needsBasicRenderloopWorkaround()
#define Q_UNLIKELY(x)
QList< QString > QStringList
Constructs a string list that contains the given string, str.
#define qApp
typedef EGLDisplay(EGLAPIENTRYP PFNEGLGETPLATFORMDISPLAYEXTPROC)(EGLenum platform
#define qGuiApp
Q_CORE_EXPORT jobject qt_androidActivity()
Q_CORE_EXPORT jobject qt_androidService()
#define qWarning
Definition qlogging.h:166
#define qFatal
Definition qlogging.h:168
#define Q_ARG(Type, data)
Definition qobjectdefs.h:63
GLfloat GLfloat GLfloat w
[0]
GLint GLsizei GLsizei height
GLint GLsizei width
GLbitfield flags
GLuint name
GLint GLsizei GLsizei GLenum format
struct _cl_event * event
GLuint64EXT * result
[6]
GLenum cap
static int defaultScreen
#define Q_ASSERT(cond)
Definition qrandom.cpp:47
QT_BEGIN_NAMESPACE Q_DECLARE_JNI_CLASS(Environment, "android/os/Environment")
static QT_BEGIN_NAMESPACE QVariant hint(QPlatformIntegration::StyleHint h)
#define QT_CONFIG(feature)
#define Q_UNUSED(x)
struct _XDisplay Display
double qreal
Definition qtypes.h:187
if(qFloatDistance(a, b)<(1<< 7))
[0]
QObject::connect nullptr
QReadWriteLock lock
[0]
aWidget window() -> setWindowTitle("New Window Title")
[2]
QNetworkRequestFactory api
[0]
QQuickView * view
[0]
static QJsonObject loadStyleData()
static bool invokeMethod(QObject *obj, const char *member, Qt::ConnectionType, QGenericReturnArgument ret, QGenericArgument val0=QGenericArgument(nullptr), QGenericArgument val1=QGenericArgument(), QGenericArgument val2=QGenericArgument(), QGenericArgument val3=QGenericArgument(), QGenericArgument val4=QGenericArgument(), QGenericArgument val5=QGenericArgument(), QGenericArgument val6=QGenericArgument(), QGenericArgument val7=QGenericArgument(), QGenericArgument val8=QGenericArgument(), QGenericArgument val9=QGenericArgument())
\threadsafe This is an overloaded member function, provided for convenience. It differs from the abov...