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
qandroidplatformforeignwindow.h
Go to the documentation of this file.
1// Copyright (C) 2021 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QANDROIDPLATFORMFOREIGNWINDOW_H
5#define QANDROIDPLATFORMFOREIGNWINDOW_H
6
8
9#include <QtCore/QJniObject>
10
12
13Q_DECLARE_JNI_CLASS(View, "android/view/View")
14
15class QAndroidPlatformForeignWindow : public QAndroidPlatformWindow
16{
17public:
18 explicit QAndroidPlatformForeignWindow(QWindow *window, WId nativeHandle);
19 void initialize() override;
20 ~QAndroidPlatformForeignWindow();
21 void setVisible(bool visible) override;
22 void applicationStateChanged(Qt::ApplicationState state) override;
23 bool isForeignWindow() const override { return true; }
24
25 WId winId() const override;
26
27private:
28 void addViewToWindow();
29
30 QtJniTypes::View m_view;
31 bool m_nativeViewInserted;
32};
33
34QT_END_NAMESPACE
35
36#endif // QANDROIDPLATFORMFOREIGNWINDOW_H