Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
androidjniaccessibility.cpp
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
6#include "androidjnimain.h"
8#include "qpa/qplatformaccessibility.h"
9#include <QtGui/private/qaccessiblebridgeutils_p.h>
10#include "qguiapplication.h"
11#include "qwindow.h"
12#include "qrect.h"
13#include "QtGui/qaccessible.h"
14#include <QtCore/qmath.h>
15#include <QtCore/private/qjnihelpers_p.h>
16#include <QtCore/QJniObject>
17#include <QtGui/private/qhighdpiscaling_p.h>
18
19#include <QtCore/QObject>
20#include <QtCore/qpointer.h>
21#include <QtCore/qvarlengtharray.h>
22
23static const char m_qtTag[] = "Qt A11Y";
24
26
27using namespace Qt::StringLiterals;
28
30{
31 static jmethodID m_addActionMethodID = 0;
32 static jmethodID m_setCheckableMethodID = 0;
33 static jmethodID m_setCheckedMethodID = 0;
34 static jmethodID m_setClickableMethodID = 0;
35 static jmethodID m_setContentDescriptionMethodID = 0;
36 static jmethodID m_setEditableMethodID = 0;
37 static jmethodID m_setEnabledMethodID = 0;
38 static jmethodID m_setFocusableMethodID = 0;
39 static jmethodID m_setFocusedMethodID = 0;
40 static jmethodID m_setHeadingMethodID = 0;
41 static jmethodID m_setScrollableMethodID = 0;
42 static jmethodID m_setTextSelectionMethodID = 0;
43 static jmethodID m_setVisibleToUserMethodID = 0;
44
45 static bool m_accessibilityActivated = false;
46
47 // This object is needed to schedule the execution of the code that
48 // deals with accessibility instances to the Qt main thread.
49 // Because of that almost every method here is split into two parts.
50 // The _helper part is executed in the context of m_accessibilityContext
51 // on the main thread. The other part is executed in Java thread.
52 Q_CONSTINIT static QPointer<QObject> m_accessibilityContext = {};
53
54 // This method is called from the Qt main thread, and normally a
55 // QGuiApplication instance will be used as a parent.
62
63 template <typename Func, typename Ret>
64 void runInObjectContext(QObject *context, Func &&func, Ret *retVal)
65 {
67 if (!protector.acquire()) {
68 __android_log_print(ANDROID_LOG_WARN, m_qtTag,
69 "Could not run accessibility call in object context, accessing "
70 "main thread could lead to deadlock");
71 return;
72 }
73
77 } else {
78 __android_log_print(ANDROID_LOG_WARN, m_qtTag,
79 "Could not run accessibility call in object context, event loop suspended.");
80 }
81 }
82
84 {
85 QtAndroid::qtActivityDelegate().callMethod<void>("initializeAccessibility");
86 }
87
88 bool isActive()
89 {
91 }
92
93 static void setActive(JNIEnv */*env*/, jobject /*thiz*/, jboolean active)
94 {
98 if (platformIntegration)
99 platformIntegration->accessibility()->setActive(active);
100 else
101 __android_log_print(ANDROID_LOG_WARN, m_qtTag, "Could not (yet) activate platform accessibility.");
102 }
103
104 QAccessibleInterface *interfaceFromId(jint objectId)
105 {
106 QAccessibleInterface *iface = nullptr;
107 if (objectId == -1) {
108 QWindow *win = qApp->focusWindow();
109 if (win)
110 iface = win->accessibleRoot();
111 } else {
112 iface = QAccessible::accessibleInterface(objectId);
113 }
114 return iface;
115 }
116
117 void notifyLocationChange(uint accessibilityObjectId)
118 {
120 }
121
122 static int parentId_helper(int objectId); // forward declaration
123
124 void notifyObjectHide(uint accessibilityObjectId)
125 {
126 const auto parentObjectId = parentId_helper(accessibilityObjectId);
127 QtAndroid::notifyObjectHide(accessibilityObjectId, parentObjectId);
128 }
129
130 void notifyObjectShow(uint accessibilityObjectId)
131 {
132 const auto parentObjectId = parentId_helper(accessibilityObjectId);
133 QtAndroid::notifyObjectShow(parentObjectId);
134 }
135
136 void notifyObjectFocus(uint accessibilityObjectId)
137 {
138 QtAndroid::notifyObjectFocus(accessibilityObjectId);
139 }
140
141 static jstring jvalueForAccessibleObject(int objectId); // forward declaration
142
143 void notifyValueChanged(uint accessibilityObjectId)
144 {
145 jstring value = jvalueForAccessibleObject(accessibilityObjectId);
146 QtAndroid::notifyValueChanged(accessibilityObjectId, value);
147 }
148
149 void notifyScrolledEvent(uint accessiblityObjectId)
150 {
151 QtAndroid::notifyScrolledEvent(accessiblityObjectId);
152 }
153
154 static QVarLengthArray<int, 8> childIdListForAccessibleObject_helper(int objectId)
155 {
156 QAccessibleInterface *iface = interfaceFromId(objectId);
157 if (iface && iface->isValid()) {
158 const int childCount = iface->childCount();
159 QVarLengthArray<jint, 8> ifaceIdArray;
160 ifaceIdArray.reserve(childCount);
161 for (int i = 0; i < childCount; ++i) {
162 QAccessibleInterface *child = iface->child(i);
163 if (child && child->isValid())
164 ifaceIdArray.append(QAccessible::uniqueId(child));
165 }
166 return ifaceIdArray;
167 }
168 return {};
169 }
170
171 static jintArray childIdListForAccessibleObject(JNIEnv *env, jobject /*thiz*/, jint objectId)
172 {
174 QVarLengthArray<jint, 8> ifaceIdArray;
177 }, &ifaceIdArray);
178 jintArray jArray = env->NewIntArray(jsize(ifaceIdArray.count()));
179 env->SetIntArrayRegion(jArray, 0, ifaceIdArray.count(), ifaceIdArray.data());
180 return jArray;
181 }
182
183 return env->NewIntArray(jsize(0));
184 }
185
186 static int parentId_helper(int objectId)
187 {
188 QAccessibleInterface *iface = interfaceFromId(objectId);
189 if (iface && iface->isValid()) {
190 QAccessibleInterface *parent = iface->parent();
191 if (parent && parent->isValid()) {
192 if (parent->role() == QAccessible::Application)
193 return -1;
194 return QAccessible::uniqueId(parent);
195 }
196 }
197 return -1;
198 }
199
200 static jint parentId(JNIEnv */*env*/, jobject /*thiz*/, jint objectId)
201 {
202 jint result = -1;
205 return parentId_helper(objectId);
206 }, &result);
207 }
208 return result;
209 }
210
211 static QRect screenRect_helper(int objectId, bool clip = true)
212 {
213 QRect rect;
214 QAccessibleInterface *iface = interfaceFromId(objectId);
215 if (iface && iface->isValid()) {
216 rect = QHighDpi::toNativePixels(iface->rect(), iface->window());
217 }
218 // If the widget is not fully in-bound in its parent then we have to clip the rectangle to draw
219 if (clip && iface && iface->parent() && iface->parent()->isValid()) {
220 const auto parentRect = QHighDpi::toNativePixels(iface->parent()->rect(), iface->parent()->window());
221 rect = rect.intersected(parentRect);
222 }
223 return rect;
224 }
225
226 static jobject screenRect(JNIEnv *env, jobject /*thiz*/, jint objectId)
227 {
228 QRect rect;
231 return screenRect_helper(objectId);
232 }, &rect);
233 }
234 jclass rectClass = env->FindClass("android/graphics/Rect");
235 jmethodID ctor = env->GetMethodID(rectClass, "<init>", "(IIII)V");
236 jobject jrect = env->NewObject(rectClass, ctor, rect.left(), rect.top(), rect.right(), rect.bottom());
237 return jrect;
238 }
239
240 static int hitTest_helper(float x, float y)
241 {
242 QAccessibleInterface *root = interfaceFromId(-1);
243 if (root && root->isValid()) {
244 QPoint pos = QHighDpi::fromNativePixels(QPoint(int(x), int(y)), root->window());
245
246 QAccessibleInterface *child = root->childAt(pos.x(), pos.y());
247 QAccessibleInterface *lastChild = nullptr;
248 while (child && (child != lastChild)) {
249 lastChild = child;
250 child = child->childAt(pos.x(), pos.y());
251 }
252 if (lastChild)
253 return QAccessible::uniqueId(lastChild);
254 }
255 return -1;
256 }
257
258 static jint hitTest(JNIEnv */*env*/, jobject /*thiz*/, jfloat x, jfloat y)
259 {
260 jint result = -1;
263 return hitTest_helper(x, y);
264 }, &result);
265 }
266 return result;
267 }
268
269 static void invokeActionOnInterfaceInMainThread(QAccessibleActionInterface* actionInterface,
270 const QString& action)
271 {
272 // Queue the action and return back to Java thread, so that we do not
273 // block it for too long
274 QMetaObject::invokeMethod(qApp, [actionInterface, action]() {
275 actionInterface->doAction(action);
277 }
278
279 static bool clickAction_helper(int objectId)
280 {
281 QAccessibleInterface *iface = interfaceFromId(objectId);
282 if (!iface || !iface->isValid() || !iface->actionInterface())
283 return false;
284
285 const auto& actionNames = iface->actionInterface()->actionNames();
286
287 if (actionNames.contains(QAccessibleActionInterface::pressAction())) {
288 invokeActionOnInterfaceInMainThread(iface->actionInterface(),
289 QAccessibleActionInterface::pressAction());
290 } else if (actionNames.contains(QAccessibleActionInterface::toggleAction())) {
291 invokeActionOnInterfaceInMainThread(iface->actionInterface(),
292 QAccessibleActionInterface::toggleAction());
293 } else {
294 return false;
295 }
296 return true;
297 }
298
299 static jboolean clickAction(JNIEnv */*env*/, jobject /*thiz*/, jint objectId)
300 {
301 bool result = false;
304 return clickAction_helper(objectId);
305 }, &result);
306 }
307 return result;
308 }
309
310 static bool scroll_helper(int objectId, const QString &actionName)
311 {
312 QAccessibleInterface *iface = interfaceFromId(objectId);
313 if (iface && iface->isValid())
314 return QAccessibleBridgeUtils::performEffectiveAction(iface, actionName);
315 return false;
316 }
317
318 static jboolean scrollForward(JNIEnv */*env*/, jobject /*thiz*/, jint objectId)
319 {
320 bool result = false;
321
322 const auto& ids = childIdListForAccessibleObject_helper(objectId);
323 if (ids.isEmpty())
324 return false;
325
326 const int firstChildId = ids.first();
327 const QRect oldPosition = screenRect_helper(firstChildId, false);
328
331 return scroll_helper(objectId, QAccessibleActionInterface::increaseAction());
332 }, &result);
333 }
334
335 // Don't check for position change if the call was not successful
336 return result && oldPosition != screenRect_helper(firstChildId, false);
337 }
338
339 static jboolean scrollBackward(JNIEnv */*env*/, jobject /*thiz*/, jint objectId)
340 {
341 bool result = false;
342
343 const auto& ids = childIdListForAccessibleObject_helper(objectId);
344 if (ids.isEmpty())
345 return false;
346
347 const int firstChildId = ids.first();
348 const QRect oldPosition = screenRect_helper(firstChildId, false);
349
352 return scroll_helper(objectId, QAccessibleActionInterface::decreaseAction());
353 }, &result);
354 }
355
356 // Don't check for position change if the call was not successful
357 return result && oldPosition != screenRect_helper(firstChildId, false);
358 }
359
360 static QString textFromValue(QAccessibleInterface *iface)
361 {
362 QString valueStr;
363 QAccessibleValueInterface *valueIface = iface->valueInterface();
364 if (valueIface) {
365 const QVariant valueVar = valueIface->currentValue();
366 const auto type = valueVar.typeId();
367 if (type == QMetaType::Double || type == QMetaType::Float) {
368 // QVariant's toString() formats floating-point values with
369 // FloatingPointShortest, which is not an accessible
370 // representation; nor, in many cases, is it suitable to the UI
371 // element whose value we're looking at. So roll our own
372 // A11Y-friendly conversion to string.
373 const double val = valueVar.toDouble();
374 // Try to use minimumStepSize() to determine precision
375 bool stepIsValid = false;
376 const double step = qAbs(valueIface->minimumStepSize().toDouble(&stepIsValid));
377 if (!stepIsValid || qFuzzyIsNull(step)) {
378 // Ignore step, use default precision
379 valueStr = qFuzzyIsNull(val) ? u"0"_s : QString::number(val, 'f');
380 } else {
381 const int precision = [](double s) {
382 int count = 0;
383 while (s < 1. && !qFuzzyCompare(s, 1.)) {
384 ++count;
385 s *= 10;
386 }
387 // If s is now 1.25, we want to show some more digits,
388 // but don't want to get silly with a step like 1./7;
389 // so only include a few extra digits.
390 const int stop = count + 3;
391 const auto fractional = [](double v) {
392 double whole = 0.0;
393 std::modf(v + 0.5, &whole);
394 return qAbs(v - whole);
395 };
396 s = fractional(s);
397 while (count < stop && !qFuzzyIsNull(s)) {
398 ++count;
399 s = fractional(s * 10);
400 }
401 return count;
402 }(step);
403 valueStr = qFuzzyIsNull(val / step) ? u"0"_s
404 : QString::number(val, 'f', precision);
405 }
406 } else {
407 valueStr = valueVar.toString();
408 }
409 }
410 return valueStr;
411 }
412
413 static jstring jvalueForAccessibleObject(int objectId)
414 {
415 QAccessibleInterface *iface = interfaceFromId(objectId);
416 const QString value = textFromValue(iface);
417 QJniEnvironment env;
418 jstring jstr = env->NewString((jchar*)value.constData(), (jsize)value.size());
419 if (env.checkAndClearExceptions())
420 __android_log_print(ANDROID_LOG_WARN, m_qtTag, "Failed to create jstring");
421 return jstr;
422 }
423
424 static QString descriptionForInterface(QAccessibleInterface *iface)
425 {
426 QString desc;
427 if (iface && iface->isValid()) {
428 bool hasValue = false;
429 desc = iface->text(QAccessible::Name);
430 if (desc.isEmpty())
431 desc = iface->text(QAccessible::Description);
432 if (desc.isEmpty()) {
433 desc = iface->text(QAccessible::Value);
434 hasValue = !desc.isEmpty();
435 }
436 if (!hasValue && iface->valueInterface()) {
437 const QString valueStr = textFromValue(iface);
438 if (!valueStr.isEmpty()) {
439 if (!desc.isEmpty())
440 desc.append(QChar(QChar::Space));
441 desc.append(valueStr);
442 }
443 }
444 }
445 return desc;
446 }
447
449 {
450 QAccessibleInterface *iface = interfaceFromId(objectId);
451 return descriptionForInterface(iface);
452 }
453
454 static jstring descriptionForAccessibleObject(JNIEnv *env, jobject /*thiz*/, jint objectId)
455 {
456 QString desc;
460 }, &desc);
461 }
462 return env->NewString((jchar*) desc.constData(), (jsize) desc.size());
463 }
464
465
477
478 static NodeInfo populateNode_helper(int objectId)
479 {
481 QAccessibleInterface *iface = interfaceFromId(objectId);
482 if (iface && iface->isValid()) {
483 info.valid = true;
484 info.state = iface->state();
485 info.role = iface->role();
487 info.description = descriptionForInterface(iface);
488 QAccessibleTextInterface *textIface = iface->textInterface();
489 if (textIface && (textIface->selectionCount() > 0)) {
490 info.hasTextSelection = true;
491 textIface->selection(0, &info.selectionStart, &info.selectionEnd);
492 }
493 }
494 return info;
495 }
496
497 static jboolean populateNode(JNIEnv *env, jobject /*thiz*/, jint objectId, jobject node)
498 {
502 return populateNode_helper(objectId);
503 }, &info);
504 }
505 if (!info.valid) {
506 __android_log_print(ANDROID_LOG_WARN, m_qtTag, "Accessibility: populateNode for Invalid ID");
507 return false;
508 }
509
510 const bool hasClickableAction =
511 info.actions.contains(QAccessibleActionInterface::pressAction()) ||
512 info.actions.contains(QAccessibleActionInterface::toggleAction());
513 const bool hasIncreaseAction =
514 info.actions.contains(QAccessibleActionInterface::increaseAction());
515 const bool hasDecreaseAction =
516 info.actions.contains(QAccessibleActionInterface::decreaseAction());
517
518 if (info.hasTextSelection && m_setTextSelectionMethodID) {
519 env->CallVoidMethod(node, m_setTextSelectionMethodID, info.selectionStart,
520 info.selectionEnd);
521 }
522
523 env->CallVoidMethod(node, m_setCheckableMethodID, (bool)info.state.checkable);
524 env->CallVoidMethod(node, m_setCheckedMethodID, (bool)info.state.checked);
525 env->CallVoidMethod(node, m_setEditableMethodID, info.state.editable);
526 env->CallVoidMethod(node, m_setEnabledMethodID, !info.state.disabled);
527 env->CallVoidMethod(node, m_setFocusableMethodID, (bool)info.state.focusable);
528 env->CallVoidMethod(node, m_setFocusedMethodID, (bool)info.state.focused);
530 env->CallVoidMethod(node, m_setHeadingMethodID, info.role == QAccessible::Heading);
531 env->CallVoidMethod(node, m_setVisibleToUserMethodID, !info.state.invisible);
532 env->CallVoidMethod(node, m_setScrollableMethodID, hasIncreaseAction || hasDecreaseAction);
533 env->CallVoidMethod(node, m_setClickableMethodID, hasClickableAction || info.role == QAccessible::Link);
534
535 // Add ACTION_CLICK
536 if (hasClickableAction)
537 env->CallVoidMethod(node, m_addActionMethodID, (int)0x00000010); // ACTION_CLICK defined in AccessibilityNodeInfo
538
539 // Add ACTION_SCROLL_FORWARD
540 if (hasIncreaseAction)
541 env->CallVoidMethod(node, m_addActionMethodID, (int)0x00001000); // ACTION_SCROLL_FORWARD defined in AccessibilityNodeInfo
542
543 // Add ACTION_SCROLL_BACKWARD
544 if (hasDecreaseAction)
545 env->CallVoidMethod(node, m_addActionMethodID, (int)0x00002000); // ACTION_SCROLL_BACKWARD defined in AccessibilityNodeInfo
546
547 // try to fill in the text property, this is what the screen reader reads
548 jstring jdesc = env->NewString((jchar*)info.description.constData(),
549 (jsize)info.description.size());
550 //CALL_METHOD(node, "setText", "(Ljava/lang/CharSequence;)V", jdesc)
551 env->CallVoidMethod(node, m_setContentDescriptionMethodID, jdesc);
552
553 return true;
554 }
555
556 static const JNINativeMethod methods[] = {
557 {"setActive","(Z)V",(void*)setActive},
558 {"childIdListForAccessibleObject", "(I)[I", (jintArray)childIdListForAccessibleObject},
559 {"parentId", "(I)I", (void*)parentId},
560 {"descriptionForAccessibleObject", "(I)Ljava/lang/String;", (jstring)descriptionForAccessibleObject},
561 {"screenRect", "(I)Landroid/graphics/Rect;", (jobject)screenRect},
562 {"hitTest", "(FF)I", (void*)hitTest},
563 {"populateNode", "(ILandroid/view/accessibility/AccessibilityNodeInfo;)Z", (void*)populateNode},
564 {"clickAction", "(I)Z", (void*)clickAction},
565 {"scrollForward", "(I)Z", (void*)scrollForward},
566 {"scrollBackward", "(I)Z", (void*)scrollBackward},
567 };
568
569#define GET_AND_CHECK_STATIC_METHOD(VAR, CLASS, METHOD_NAME, METHOD_SIGNATURE) \
570 VAR = env->GetMethodID(CLASS, METHOD_NAME, METHOD_SIGNATURE); \
571 if (!VAR) { \
572 __android_log_print(ANDROID_LOG_FATAL, QtAndroid::qtTagText(), QtAndroid::methodErrorMsgFmt(), METHOD_NAME, METHOD_SIGNATURE); \
573 return false; \
574 }
575
577 {
578 if (!env.registerNativeMethods("org/qtproject/qt/android/QtNativeAccessibility",
579 methods, sizeof(methods) / sizeof(methods[0]))) {
580 __android_log_print(ANDROID_LOG_FATAL,"Qt A11y", "RegisterNatives failed");
581 return false;
582 }
583
584 jclass nodeInfoClass = env->FindClass("android/view/accessibility/AccessibilityNodeInfo");
585 GET_AND_CHECK_STATIC_METHOD(m_addActionMethodID, nodeInfoClass, "addAction", "(I)V");
586 GET_AND_CHECK_STATIC_METHOD(m_setCheckableMethodID, nodeInfoClass, "setCheckable", "(Z)V");
587 GET_AND_CHECK_STATIC_METHOD(m_setCheckedMethodID, nodeInfoClass, "setChecked", "(Z)V");
588 GET_AND_CHECK_STATIC_METHOD(m_setClickableMethodID, nodeInfoClass, "setClickable", "(Z)V");
589 GET_AND_CHECK_STATIC_METHOD(m_setContentDescriptionMethodID, nodeInfoClass, "setContentDescription", "(Ljava/lang/CharSequence;)V");
590 GET_AND_CHECK_STATIC_METHOD(m_setEditableMethodID, nodeInfoClass, "setEditable", "(Z)V");
591 GET_AND_CHECK_STATIC_METHOD(m_setEnabledMethodID, nodeInfoClass, "setEnabled", "(Z)V");
592 GET_AND_CHECK_STATIC_METHOD(m_setFocusableMethodID, nodeInfoClass, "setFocusable", "(Z)V");
593 GET_AND_CHECK_STATIC_METHOD(m_setFocusedMethodID, nodeInfoClass, "setFocused", "(Z)V");
595 GET_AND_CHECK_STATIC_METHOD(m_setHeadingMethodID, nodeInfoClass, "setHeading", "(Z)V");
596 }
597 GET_AND_CHECK_STATIC_METHOD(m_setScrollableMethodID, nodeInfoClass, "setScrollable", "(Z)V");
598 GET_AND_CHECK_STATIC_METHOD(m_setVisibleToUserMethodID, nodeInfoClass, "setVisibleToUser", "(Z)V");
599 GET_AND_CHECK_STATIC_METHOD(m_setTextSelectionMethodID, nodeInfoClass, "setTextSelection", "(II)V");
600
601 return true;
602 }
603}
604
#define GET_AND_CHECK_STATIC_METHOD(VAR, CLASS, METHOD_NAME, METHOD_SIGNATURE)
static const char m_qtTag[]
\inmodule QtGui
\inmodule QtCore
static Qt::ApplicationState applicationState()
\inmodule QtCore
\inmodule QtCore
Definition qmutex.h:313
\inmodule QtCore
Definition qobject.h:103
\inmodule QtCore\reentrant
Definition qpoint.h:25
\inmodule QtCore\reentrant
Definition qrect.h:30
\inmodule QtCore
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
bool isEmpty() const noexcept
Returns true if the string has no characters; otherwise returns false.
Definition qstring.h:192
static QString number(int, int base=10)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition qstring.cpp:8084
\inmodule QtCore
Definition qvariant.h:65
int typeId() const
Returns the storage type of the value stored in the variant.
Definition qvariant.h:340
\inmodule QtGui
Definition qwindow.h:63
rect
[4]
static bool registerNatives()
QStringList effectiveActionNames(QAccessibleInterface *iface)
bool performEffectiveAction(QAccessibleInterface *iface, const QString &actionName)
T toNativePixels(const T &value, const C *context)
T fromNativePixels(const T &value, const C *context)
Combined button and popup list for selecting options.
void notifyObjectShow(uint accessibilityObjectId)
static bool clickAction_helper(int objectId)
void notifyLocationChange(uint accessibilityObjectId)
void runInObjectContext(QObject *context, Func &&func, Ret *retVal)
static jboolean scrollForward(JNIEnv *, jobject, jint objectId)
void notifyObjectFocus(uint accessibilityObjectId)
static jboolean scrollBackward(JNIEnv *, jobject, jint objectId)
static QString descriptionForInterface(QAccessibleInterface *iface)
static int hitTest_helper(float x, float y)
static jmethodID m_setTextSelectionMethodID
static jstring descriptionForAccessibleObject(JNIEnv *env, jobject, jint objectId)
static bool scroll_helper(int objectId, const QString &actionName)
static QString textFromValue(QAccessibleInterface *iface)
void createAccessibilityContextObject(QObject *parent)
static QVarLengthArray< int, 8 > childIdListForAccessibleObject_helper(int objectId)
static NodeInfo populateNode_helper(int objectId)
void notifyObjectHide(uint accessibilityObjectId)
static jint hitTest(JNIEnv *, jobject, jfloat x, jfloat y)
static jboolean clickAction(JNIEnv *, jobject, jint objectId)
static jstring jvalueForAccessibleObject(int objectId)
static void setActive(JNIEnv *, jobject, jboolean active)
static void invokeActionOnInterfaceInMainThread(QAccessibleActionInterface *actionInterface, const QString &action)
QAccessibleInterface * interfaceFromId(jint objectId)
void notifyValueChanged(uint accessibilityObjectId)
static int parentId_helper(int objectId)
static QRect screenRect_helper(int objectId, bool clip=true)
static jmethodID m_setContentDescriptionMethodID
static QString descriptionForAccessibleObject_helper(int objectId)
static jint parentId(JNIEnv *, jobject, jint objectId)
static const JNINativeMethod methods[]
static jobject screenRect(JNIEnv *env, jobject, jint objectId)
static jintArray childIdListForAccessibleObject(JNIEnv *env, jobject, jint objectId)
static jmethodID m_setVisibleToUserMethodID
static Q_CONSTINIT QPointer< QObject > m_accessibilityContext
static jboolean populateNode(JNIEnv *env, jobject, jint objectId, jobject node)
void notifyScrolledEvent(uint accessiblityObjectId)
Q_CORE_EXPORT jint androidSdkVersion()
void notifyAccessibilityLocationChange(uint accessibilityObjectId)
QBasicMutex * platformInterfaceMutex()
void notifyScrolledEvent(uint accessibilityObjectId)
void notifyObjectShow(uint parentObjectId)
QtJniTypes::QtActivityDelegateBase qtActivityDelegate()
QAndroidPlatformIntegration * androidPlatformIntegration()
void notifyObjectFocus(uint accessibilityObjectId)
void notifyValueChanged(uint accessibilityObjectId, jstring value)
bool blockEventLoopsWhenSuspended()
void notifyObjectHide(uint accessibilityObjectId, uint parentObjectId)
@ ApplicationSuspended
Definition qnamespace.h:263
@ BlockingQueuedConnection
@ QueuedConnection
static void * context
#define qApp
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
bool qFuzzyCompare(qfloat16 p1, qfloat16 p2) noexcept
Definition qfloat16.h:333
bool qFuzzyIsNull(qfloat16 f) noexcept
Definition qfloat16.h:349
constexpr T qAbs(const T &t)
Definition qnumeric.h:328
GLsizei const GLfloat * v
[13]
GLint GLint GLint GLint GLint x
[0]
GLenum GLenum GLsizei const GLuint * ids
GLenum GLenum GLsizei count
GLenum type
GLint y
GLdouble s
[6]
Definition qopenglext.h:235
GLenum func
Definition qopenglext.h:663
GLuint64EXT * result
[6]
GLenum GLint GLint * precision
unsigned int uint
Definition qtypes.h:34
QWidget * win
Definition settings.cpp:6
QReadWriteLock lock
[0]
QPoint oldPosition
[6]
QLayoutItem * child
[0]
QHostInfo info
[0]
static bool invokeMethod(QObject *obj, const char *member, Qt::ConnectionType, QGenericReturnArgument ret, QGenericArgument val0=QGenericArgument(nullptr), QGenericArgument val1=QGenericArgument(), QGenericArgument val2=QGenericArgument(), QGenericArgument val3=QGenericArgument(), QGenericArgument val4=QGenericArgument(), QGenericArgument val5=QGenericArgument(), QGenericArgument val6=QGenericArgument(), QGenericArgument val7=QGenericArgument(), QGenericArgument val8=QGenericArgument(), QGenericArgument val9=QGenericArgument())
\threadsafe This is an overloaded member function, provided for convenience. It differs from the abov...