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
androidjnimain.h
Go to the documentation of this file.
1// Copyright (C) 2014 BogDan Vatra <bogdan@kde.org>
2// Copyright (C) 2016 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
6#ifndef ANDROID_APP_H
7#define ANDROID_APP_H
8
9#include <android/log.h>
10
11#include <jni.h>
12#include <android/asset_manager.h>
13
14#include <QImage>
15#include <private/qjnihelpers_p.h>
16#include <QtCore/QJniObject>
17#include <androidbackendregister.h>
18
20
21class QRect;
22class QPoint;
23class QThread;
25class QWidget;
26class QString;
27class QWindow;
29class QBasicMutex;
30
31Q_DECLARE_JNI_CLASS(QtActivityDelegateBase, "org/qtproject/qt/android/QtActivityDelegateBase")
32Q_DECLARE_JNI_CLASS(QtInputDelegate, "org/qtproject/qt/android/QtInputDelegate")
33
34namespace QtAndroid
35{
36 QBasicMutex *platformInterfaceMutex();
39 void setAndroidPlatformIntegration(QAndroidPlatformIntegration *androidPlatformIntegration);
40 void setQtThread(QThread *thread);
41 void setViewVisibility(jobject view, bool visible);
42
43 QWindow *topLevelWindowAt(const QPoint &globalPos);
44 QWindow *windowFromId(int windowId);
47 double pixelDensity();
51
52 jobject createBitmap(QImage img, JNIEnv *env = nullptr);
53 jobject createBitmap(int width, int height, QImage::Format format, JNIEnv *env);
54 jobject createBitmapDrawable(jobject bitmap, JNIEnv *env = nullptr);
55
56#if QT_CONFIG(accessibility)
65#endif
67
68 const char *classErrorMsgFmt();
69 const char *methodErrorMsgFmt();
70 const char *staticFieldErrorMsgFmt();
71 const char *qtTagText();
72
73 QString deviceName();
75
76 bool isQtApplication();
77}
78
79QT_END_NAMESPACE
80
81#endif // ANDROID_APP_H
auto callInterface(const char *func, Args... args)
friend class QWidget
Definition qpainter.h:431
\inmodule QtCore\reentrant
Definition qpoint.h:30
Combined button and popup list for selecting options.
const char * classErrorMsgFmt()
void setViewVisibility(jobject view, bool visible)
void setAndroidPlatformIntegration(QAndroidPlatformIntegration *androidPlatformIntegration)
const char * qtTagText()
jobject assets()
QBasicMutex * platformInterfaceMutex()
jobject createBitmap(int width, int height, QImage::Format format, JNIEnv *env)
jobject createBitmapDrawable(jobject bitmap, JNIEnv *env=nullptr)
QWindow * topLevelWindowAt(const QPoint &globalPos)
QAndroidPlatformIntegration * androidPlatformIntegration()
jobject createBitmap(QImage img, JNIEnv *env=nullptr)
AndroidBackendRegister * backendRegister()
void setQtThread(QThread *thread)
QString deviceName()
int availableWidthPixels()
bool blockEventLoopsWhenSuspended()
double pixelDensity()
QWindow * windowFromId(int windowId)
jclass applicationClass()
void notifyNativePluginIntegrationReady(bool ready)
int availableHeightPixels()
AAssetManager * assetManager()
const char * staticFieldErrorMsgFmt()
bool isQtApplication()
const char * methodErrorMsgFmt()
Q_DECLARE_JNI_CLASS(MotionEvent, "android/view/MotionEvent")