From 8b0d9a16db7bcfb5d6439b8863aded5c583f9ed5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Str=C3=B8mme?= Date: Thu, 28 Aug 2014 12:18:14 +0200 Subject: Android: Improve the foreign-window implementation Adds: - Improved geometry calculations (e.g, inside a parent) - Change visibility - proper stacking order. Native views now reserve the top of the stack to ensure that they stay visible. - React to application state changes. Change-Id: I35de0396937fff37ffcd272c9a7d8e9873a91dfb Reviewed-by: Paul Olav Tvete --- src/plugins/platforms/android/qandroidplatformforeignwindow.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/plugins/platforms/android/qandroidplatformforeignwindow.h') diff --git a/src/plugins/platforms/android/qandroidplatformforeignwindow.h b/src/plugins/platforms/android/qandroidplatformforeignwindow.h index cb04142696..974ffbc376 100644 --- a/src/plugins/platforms/android/qandroidplatformforeignwindow.h +++ b/src/plugins/platforms/android/qandroidplatformforeignwindow.h @@ -38,16 +38,23 @@ #include "qandroidplatformwindow.h" #include +QT_BEGIN_NAMESPACE + class QAndroidPlatformForeignWindow : public QAndroidPlatformWindow { public: explicit QAndroidPlatformForeignWindow(QWindow *window); ~QAndroidPlatformForeignWindow(); - void setGeometry(const QRect &rect); + void setGeometry(const QRect &rect) Q_DECL_OVERRIDE; + void setVisible(bool visible) Q_DECL_OVERRIDE; + void applicationStateChanged(Qt::ApplicationState state) Q_DECL_OVERRIDE; + void setParent(const QPlatformWindow *window) Q_DECL_OVERRIDE; private: + int m_surfaceId; QJNIObjectPrivate m_view; - int m_surfaceId = -1; }; +QT_END_NAMESPACE + #endif // QANDROIDPLATFORMFOREIGNWINDOW_H -- cgit v1.2.3