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
5#ifndef ANDROID_APP_H
6#define ANDROID_APP_H
7
8#include <android/log.h>
9
10#include <jni.h>
11#include <android/asset_manager.h>
12
13#include <QImage>
14#include <private/qjnihelpers_p.h>
15#include <QtCore/QJniObject>
16#include <androidbackendregister.h>
17
19
20class QRect;
21class QPoint;
22class QThread;
24class QWidget;
25class QString;
26class QWindow;
28class QBasicMutex;
29
30Q_DECLARE_JNI_CLASS(QtActivityDelegateBase, "org/qtproject/qt/android/QtActivityDelegateBase")
31Q_DECLARE_JNI_CLASS(QtInputDelegate, "org/qtproject/qt/android/QtInputDelegate")
32
33namespace QtAndroid
34{
35 QBasicMutex *platformInterfaceMutex();
38 void setAndroidPlatformIntegration(QAndroidPlatformIntegration *androidPlatformIntegration);
39 void setQtThread(QThread *thread);
40 void setViewVisibility(jobject view, bool visible);
41
42 QWindow *topLevelWindowAt(const QPoint &globalPos);
43 QWindow *windowFromId(int windowId);
46 double pixelDensity();
50
51 jobject createBitmap(QImage img, JNIEnv *env = nullptr);
52 jobject createBitmap(int width, int height, QImage::Format format, JNIEnv *env);
53 jobject createBitmapDrawable(jobject bitmap, JNIEnv *env = nullptr);
54
55#if QT_CONFIG(accessibility)
64#endif
66
67 const char *classErrorMsgFmt();
68 const char *methodErrorMsgFmt();
69 const char *qtTagText();
70
71 QString deviceName();
73
74 bool isQtApplication();
75}
76
77QT_END_NAMESPACE
78
79#endif // ANDROID_APP_H
auto callInterface(const char *func, Args... args)
friend class QWidget
Definition qpainter.h:431
\inmodule QtCore\reentrant
Definition qpoint.h:29
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()
bool isQtApplication()
const char * methodErrorMsgFmt()
Q_DECLARE_JNI_CLASS(MotionEvent, "android/view/MotionEvent")