diff options
Diffstat (limited to 'src/plugins/platforms/android/qandroidplatformintegration.h')
-rw-r--r-- | src/plugins/platforms/android/qandroidplatformintegration.h | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/src/plugins/platforms/android/qandroidplatformintegration.h b/src/plugins/platforms/android/qandroidplatformintegration.h index 14e529b93e..b7bfb58d1d 100644 --- a/src/plugins/platforms/android/qandroidplatformintegration.h +++ b/src/plugins/platforms/android/qandroidplatformintegration.h @@ -13,6 +13,9 @@ #include <qpa/qplatformnativeinterface.h> #include <qpa/qplatformopenglcontext.h> #include <qpa/qplatformoffscreensurface.h> +#include <qpa/qplatformtheme.h> +#include <private/qflatmap_p.h> +#include <QtCore/qvarlengtharray.h> #include <EGL/egl.h> #include <memory> @@ -74,6 +77,10 @@ public: QPlatformFontDatabase *fontDatabase() const override; + void handleScreenAdded(int displayId); + void handleScreenChanged(int displayId); + void handleScreenRemoved(int displayId); + #ifndef QT_NO_CLIPBOARD QPlatformClipboard *clipboard() const override; #endif @@ -82,7 +89,7 @@ public: QPlatformNativeInterface *nativeInterface() const override; QPlatformServices *services() const override; -#ifndef QT_NO_ACCESSIBILITY +#if QT_CONFIG(accessibility) virtual QPlatformAccessibility *accessibility() const override; #endif @@ -103,6 +110,8 @@ public: void flushPendingUpdates(); + static void updateColorScheme(Qt::ColorScheme colorScheme); + static Qt::ColorScheme colorScheme() { return m_colorScheme; } #if QT_CONFIG(vulkan) QPlatformVulkanInstance *createPlatformVulkanInstance(QVulkanInstance *instance) const override; #endif @@ -115,6 +124,8 @@ private: QThread *m_mainThread; + static Qt::ColorScheme m_colorScheme; + static QRect m_defaultAvailableGeometry; static QSize m_defaultPhysicalSize; static QSize m_defaultScreenSize; @@ -127,12 +138,23 @@ private: QAndroidPlatformNativeInterface *m_androidPlatformNativeInterface; QAndroidPlatformServices *m_androidPlatformServices; + // Handling the multiple screens connected. Every display is identified + // with an unique (autoincremented) displayID. The values of this ID will + // not repeat during the OS runtime. We use this value as the key in the + // storage of screens. + QFlatMap<int, QAndroidPlatformScreen *, std::less<int> + , QVarLengthArray<int, 10> + , QVarLengthArray<QAndroidPlatformScreen *, 10> > m_screens; + // ID of the primary display, in documentation it is said to be always 0, + // but nevertheless it is retrieved + int m_primaryDisplayId = 0; + #ifndef QT_NO_CLIPBOARD QPlatformClipboard *m_androidPlatformClipboard; #endif QAndroidSystemLocale *m_androidSystemLocale; -#ifndef QT_NO_ACCESSIBILITY +#if QT_CONFIG(accessibility) mutable QPlatformAccessibility *m_accessibility; #endif |