9#include "qpa/qplatformaccessibility.h"
10#include <QtGui/private/qaccessiblebridgeutils_p.h>
14#include "QtGui/qaccessible.h"
15#include <QtCore/qmath.h>
16#include <QtCore/private/qjnihelpers_p.h>
17#include <QtCore/QJniObject>
18#include <QtGui/private/qhighdpiscaling_p.h>
20#include <QtCore/QObject>
21#include <QtCore/qpointer.h>
22#include <QtCore/qvarlengtharray.h>
28using namespace Qt::StringLiterals;
66 if (m_accessibilityContext)
67 m_accessibilityContext->deleteLater();
68 m_accessibilityContext =
new QObject(parent);
71 template <
typename Func,
typename Ret>
75 __android_log_print(ANDROID_LOG_WARN, m_qtTag,
76 "Could not run accessibility call in object context, no valid surface.");
80 QtAndroidPrivate::AndroidDeadlockProtector protector(
81 u"QtAndroidAccessibility::runInObjectContext()"_s);
82 if (!protector.acquire()) {
83 __android_log_print(ANDROID_LOG_WARN, m_qtTag,
84 "Could not run accessibility call in object context, accessing "
85 "main thread could lead to deadlock");
89 if (!QtAndroid::blockEventLoopsWhenSuspended()
90 || QGuiApplication::applicationState() != Qt::ApplicationSuspended) {
91 QMetaObject::invokeMethod(context, func, Qt::BlockingQueuedConnection, retVal);
93 __android_log_print(ANDROID_LOG_WARN, m_qtTag,
94 "Could not run accessibility call in object context, event loop suspended.");
108 if (platformIntegration) {
109 platformIntegration->accessibility()->setActive(active);
111 __android_log_print(ANDROID_LOG_DEBUG, m_qtTag,
112 "Android platform integration is not ready, accessibility activation deferred.");
118 QAccessibleInterface *iface =
nullptr;
119 if (objectId == -1) {
120 QWindow *win =
qApp->focusWindow();
122 iface = win->accessibleRoot();
124 iface = QAccessible::accessibleInterface(objectId);
131 QtAndroid::notifyAccessibilityLocationChange(accessibilityObjectId);
138 const auto parentObjectId = parentId_helper(accessibilityObjectId);
139 QtAndroid::notifyObjectHide(accessibilityObjectId, parentObjectId);
144 const auto parentObjectId = parentId_helper(accessibilityObjectId);
145 QtAndroid::notifyObjectShow(parentObjectId);
150 QtAndroid::notifyObjectFocus(accessibilityObjectId);
157 jstring value = jvalueForAccessibleObject(accessibilityObjectId);
158 QtAndroid::notifyValueChanged(accessibilityObjectId, value);
166 QAccessibleInterface *iface = interfaceFromId(accessibilityObjectId);
167 if (iface && iface->isValid()) {
168 const QString value = descriptionForInterface(iface);
169 QtAndroid::notifyDescriptionOrNameChanged(accessibilityObjectId, value);
175 QtAndroid::notifyScrolledEvent(accessiblityObjectId);
180 QtAndroid::notifyAnnouncementEvent(accessibilityObjectId, message);
185 QAccessibleInterface *iface = interfaceFromId(objectId);
186 if (iface && iface->isValid()) {
187 const int childCount = iface->childCount();
188 QVarLengthArray<jint, 8> ifaceIdArray;
189 ifaceIdArray.reserve(childCount);
190 for (
int i = 0; i < childCount; ++i) {
191 QAccessibleInterface *child = iface->child(i);
192 if (child && child->isValid())
193 ifaceIdArray.append(QAccessible::uniqueId(child));
202 if (m_accessibilityContext) {
203 QVarLengthArray<jint, 8> ifaceIdArray;
204 runInObjectContext(m_accessibilityContext, [objectId]() {
205 return childIdListForAccessibleObject_helper(objectId);
207 jintArray jArray = env->NewIntArray(jsize(ifaceIdArray.count()));
208 env->SetIntArrayRegion(jArray, 0, ifaceIdArray.count(), ifaceIdArray.data());
212 return env->NewIntArray(jsize(0));
217 QAccessibleInterface *iface = interfaceFromId(objectId);
218 if (iface && iface->isValid()) {
219 QAccessibleInterface *parent = iface->parent();
220 if (parent && parent->isValid()) {
221 if (parent->role() == QAccessible::Application)
223 return QAccessible::uniqueId(parent);
232 if (m_accessibilityContext) {
233 runInObjectContext(m_accessibilityContext, [objectId]() {
234 return parentId_helper(objectId);
243 QAccessibleInterface *iface = interfaceFromId(objectId);
244 if (iface && iface->isValid()) {
245 rect = QHighDpi::toNativePixels(iface->rect(), iface->window());
248 if (clip && iface && iface->parent() && iface->parent()->isValid()) {
249 const auto parentRect = QHighDpi::toNativePixels(iface->parent()->rect(), iface->parent()->window());
250 rect = rect.intersected(parentRect);
258 if (m_accessibilityContext) {
259 runInObjectContext(m_accessibilityContext, [objectId]() {
260 return screenRect_helper(objectId);
263 jclass rectClass = env->FindClass(
"android/graphics/Rect");
264 jmethodID ctor = env->GetMethodID(rectClass,
"<init>",
"(IIII)V");
265 jobject jrect = env->NewObject(rectClass, ctor, rect.left(), rect.top(), rect.right(), rect.bottom());
271 QAccessibleInterface *root = interfaceFromId(-1);
272 if (root && root->isValid()) {
273 QPoint pos = QHighDpi::fromNativePixels(QPoint(
int(x),
int(y)), root->window());
275 QAccessibleInterface *child = root->childAt(pos.x(), pos.y());
276 QAccessibleInterface *lastChild =
nullptr;
277 while (child && (child != lastChild)) {
279 child = child->childAt(pos.x(), pos.y());
282 return QAccessible::uniqueId(lastChild);
290 if (m_accessibilityContext) {
291 runInObjectContext(m_accessibilityContext, [x, y]() {
292 return hitTest_helper(x, y);
299 const QString& action)
303 QMetaObject::invokeMethod(
qApp, [actionInterface, action]() {
304 actionInterface->doAction(action);
305 }, Qt::QueuedConnection);
310 QAccessibleInterface *iface = interfaceFromId(objectId);
311 if (!iface || !iface->isValid() || !iface->actionInterface())
314 const auto& actionNames = iface->actionInterface()->actionNames();
316 if (actionNames.contains(QAccessibleActionInterface::pressAction())) {
317 invokeActionOnInterfaceInMainThread(iface->actionInterface(),
318 QAccessibleActionInterface::pressAction());
319 }
else if (actionNames.contains(QAccessibleActionInterface::toggleAction())) {
320 invokeActionOnInterfaceInMainThread(iface->actionInterface(),
321 QAccessibleActionInterface::toggleAction());
330 QAccessibleInterface *iface = interfaceFromId(objectId);
331 if (!iface || !iface->isValid() || !iface->actionInterface())
334 const auto& actionNames = iface->actionInterface()->actionNames();
336 if (actionNames.contains(QAccessibleActionInterface::setFocusAction())) {
337 invokeActionOnInterfaceInMainThread(iface->actionInterface(),
338 QAccessibleActionInterface::setFocusAction());
347 if (m_accessibilityContext) {
348 runInObjectContext(m_accessibilityContext, [objectId]() {
349 return clickAction_helper(objectId);
358 if (m_accessibilityContext) {
359 runInObjectContext(m_accessibilityContext, [objectId]() {
360 return focusAction_helper(objectId);
368 QAccessibleInterface *iface = interfaceFromId(objectId);
369 if (iface && iface->isValid())
370 return QAccessibleBridgeUtils::performEffectiveAction(iface, actionName);
378 const auto& ids = childIdListForAccessibleObject_helper(objectId);
382 const int firstChildId = ids.first();
383 const QRect oldPosition = screenRect_helper(firstChildId,
false);
385 if (m_accessibilityContext) {
386 runInObjectContext(m_accessibilityContext, [objectId]() {
387 return scroll_helper(objectId, QAccessibleActionInterface::increaseAction());
392 return result && oldPosition != screenRect_helper(firstChildId,
false);
399 const auto& ids = childIdListForAccessibleObject_helper(objectId);
403 const int firstChildId = ids.first();
404 const QRect oldPosition = screenRect_helper(firstChildId,
false);
406 if (m_accessibilityContext) {
407 runInObjectContext(m_accessibilityContext, [objectId]() {
408 return scroll_helper(objectId, QAccessibleActionInterface::decreaseAction());
413 return result && oldPosition != screenRect_helper(firstChildId,
false);
419 QAccessibleValueInterface *valueIface = iface->valueInterface();
421 const QVariant valueVar = valueIface->currentValue();
422 const auto type = valueVar.typeId();
423 if (type == QMetaType::Double || type == QMetaType::Float) {
429 const double val = valueVar.toDouble();
431 bool stepIsValid =
false;
432 const double step = qAbs(valueIface->minimumStepSize().toDouble(&stepIsValid));
433 if (!stepIsValid || qFuzzyIsNull(step)) {
435 valueStr = qFuzzyIsNull(val) ? u"0"_s : QString::number(val,
'f');
437 const int precision = [](
double s) {
439 while (s < 1. && !qFuzzyCompare(s, 1.)) {
446 const int stop = count + 3;
447 const auto fractional = [](
double v) {
449 std::modf(v + 0.5, &whole);
450 return qAbs(v - whole);
453 while (count < stop && !qFuzzyIsNull(s)) {
455 s = fractional(s * 10);
459 valueStr = qFuzzyIsNull(val / step) ? u"0"_s
460 : QString::number(val,
'f', precision);
463 valueStr = valueVar.toString();
471 QAccessibleInterface *iface = interfaceFromId(objectId);
472 const QString value = textFromValue(iface);
474 jstring jstr = env->NewString((jchar*)value.constData(), (jsize)value.size());
475 if (env.checkAndClearExceptions())
476 __android_log_print(ANDROID_LOG_WARN, m_qtTag,
"Failed to create jstring");
482 case QAccessible::Role::Button:
483 case QAccessible::Role::Link:
486 return QStringLiteral(
"android.widget.ToggleButton");
487 return QStringLiteral(
"android.widget.Button");
489 case QAccessible::Role::CheckBox:
492 return QStringLiteral(
"android.widget.CompoundButton");
493 case QAccessible::Role::Switch:
494 return QStringLiteral(
"android.widget.Switch");
495 case QAccessible::Role::Clock:
496 return QStringLiteral(
"android.widget.TextClock");
497 case QAccessible::Role::ComboBox:
498 return QStringLiteral(
"android.widget.Spinner");
499 case QAccessible::Role::Graphic:
501 return QStringLiteral(
"android.widget.ImageView");
502 case QAccessible::Role::Grouping:
503 return QStringLiteral(
"android.view.ViewGroup");
504 case QAccessible::Role::List:
507 return QStringLiteral(
"android.widget.AbsListView");
508 case QAccessible::Role::MenuItem:
509 return QStringLiteral(
"android.view.MenuItem");
510 case QAccessible::Role::PopupMenu:
511 return QStringLiteral(
"android.widget.PopupMenu");
512 case QAccessible::Role::Separator:
513 return QStringLiteral(
"android.widget.Space");
514 case QAccessible::Role::ToolBar:
515 return QStringLiteral(
"android.view.Toolbar");
516 case QAccessible::Role::Heading: [[fallthrough]];
517 case QAccessible::Role::StaticText:
519 return QStringLiteral(
"android.widget.TextView");
520 case QAccessible::Role::EditableText:
521 return QStringLiteral(
"android.widget.EditText");
522 case QAccessible::Role::RadioButton:
523 return QStringLiteral(
"android.widget.RadioButton");
524 case QAccessible::Role::ProgressBar:
525 return QStringLiteral(
"android.widget.ProgressBar");
526 case QAccessible::Role::SpinBox:
527 return QStringLiteral(
"android.widget.NumberPicker");
528 case QAccessible::Role::WebDocument:
529 return QStringLiteral(
"android.webkit.WebView");
530 case QAccessible::Role::Dialog:
531 return QStringLiteral(
"android.app.AlertDialog");
532 case QAccessible::Role::PageTab:
533 return QStringLiteral(
"android.app.ActionBar.Tab");
534 case QAccessible::Role::PageTabList:
535 return QStringLiteral(
"android.widget.TabWidget");
536 case QAccessible::Role::ScrollBar:
537 return QStringLiteral(
"android.widget.Scroller");
538 case QAccessible::Role::Slider:
539 return QStringLiteral(
"com.google.android.material.slider.Slider");
540 case QAccessible::Role::Table:
543 return QStringLiteral(
"android.widget.GridView");
544 case QAccessible::Role::Pane:
546 return QStringLiteral(
"android.view.ViewGroup");
547 case QAccessible::Role::AlertMessage:
548 case QAccessible::Role::Animation:
549 case QAccessible::Role::Application:
550 case QAccessible::Role::Assistant:
551 case QAccessible::Role::BlockQuote:
552 case QAccessible::Role::Border:
553 case QAccessible::Role::ButtonDropGrid:
554 case QAccessible::Role::ButtonDropDown:
555 case QAccessible::Role::ButtonMenu:
556 case QAccessible::Role::Canvas:
557 case QAccessible::Role::Caret:
558 case QAccessible::Role::Cell:
559 case QAccessible::Role::Chart:
560 case QAccessible::Role::Client:
561 case QAccessible::Role::ColorChooser:
562 case QAccessible::Role::Column:
563 case QAccessible::Role::ColumnHeader:
564 case QAccessible::Role::ComplementaryContent:
565 case QAccessible::Role::Cursor:
566 case QAccessible::Role::Desktop:
567 case QAccessible::Role::Dial:
568 case QAccessible::Role::Document:
569 case QAccessible::Role::Equation:
570 case QAccessible::Role::Footer:
571 case QAccessible::Role::Form:
572 case QAccessible::Role::Grip:
573 case QAccessible::Role::HelpBalloon:
574 case QAccessible::Role::HotkeyField:
575 case QAccessible::Role::Indicator:
576 case QAccessible::Role::LayeredPane:
577 case QAccessible::Role::ListItem:
578 case QAccessible::Role::MenuBar:
579 case QAccessible::Role::NoRole:
580 case QAccessible::Role::Note:
581 case QAccessible::Role::Notification:
582 case QAccessible::Role::Paragraph:
583 case QAccessible::Role::PropertyPage:
584 case QAccessible::Role::Row:
585 case QAccessible::Role::RowHeader:
586 case QAccessible::Role::Section:
587 case QAccessible::Role::Sound:
588 case QAccessible::Role::Splitter:
589 case QAccessible::Role::StatusBar:
590 case QAccessible::Role::Terminal:
591 case QAccessible::Role::TitleBar:
592 case QAccessible::Role::ToolTip:
593 case QAccessible::Role::Tree:
594 case QAccessible::Role::TreeItem:
595 case QAccessible::Role::UserRole:
596 case QAccessible::Role::Whitespace:
597 case QAccessible::Role::Window:
601 return QStringLiteral(
"android.view.TextView");
608 if (iface && iface->isValid()) {
609 bool hasValue =
false;
610 desc = iface->text(QAccessible::Name);
611 const QString descStr = iface->text(QAccessible::Description);
612 if (!descStr.isEmpty()) {
614 desc.append(QStringLiteral(
", "));
615 desc.append(descStr);
617 if (desc.isEmpty()) {
618 desc = iface->text(QAccessible::Value);
619 hasValue = !desc.isEmpty();
621 if (!hasValue && iface->valueInterface()) {
622 const QString valueStr = textFromValue(iface);
623 if (!valueStr.isEmpty()) {
625 desc.append(QChar(QChar::Space));
626 desc.append(valueStr);
635 QAccessibleInterface *iface = interfaceFromId(objectId);
636 return descriptionForInterface(iface);
642 if (m_accessibilityContext) {
643 runInObjectContext(m_accessibilityContext, [objectId]() {
644 return descriptionForAccessibleObject_helper(objectId);
647 return env->NewString((jchar*) desc.constData(), (jsize) desc.size());
652 QAccessibleInterface *iface = interfaceFromId(objectId);
653 if (!iface || !iface->isValid())
656 QAccessibleAttributesInterface *attributesIface = iface->attributesInterface();
657 if (!attributesIface || !attributesIface->attributeKeys().contains(QAccessible::Attribute::Locale))
660 return attributesIface->attributeValue(QAccessible::Attribute::Locale).toLocale().bcp47Name();
666 if (m_accessibilityContext) {
667 runInObjectContext(m_accessibilityContext, [objectId]() {
668 return languageTag_helper(objectId);
671 return env->NewString((jchar*)tag.constData(), (jsize)tag.size());
695 QAccessibleInterface *iface = interfaceFromId(objectId);
696 if (iface && iface->isValid()) {
698 info.state = iface->state();
699 info.role = iface->role();
700 info.actions = QAccessibleBridgeUtils::effectiveActionNames(iface);
701 info.description = descriptionForInterface(iface);
702 info.identifier = QAccessibleBridgeUtils::accessibleId(iface);
703 QAccessibleTextInterface *textIface = iface->textInterface();
704 if (textIface && (textIface->selectionCount() > 0)) {
708 QAccessibleValueInterface *valueInterface = iface->valueInterface();
709 if (valueInterface) {
711 info.minValue = valueInterface->minimumValue();
712 info.maxValue = valueInterface->maximumValue();
713 info.currentValue = valueInterface->currentValue();
714 info.valueStepSize = valueInterface->minimumStepSize();
723 if (m_accessibilityContext) {
724 runInObjectContext(m_accessibilityContext, [objectId]() {
725 return populateNode_helper(objectId);
729 __android_log_print(ANDROID_LOG_WARN, m_qtTag,
"Accessibility: populateNode for Invalid ID");
733 const QString role = classNameForRole(info.role, info.state);
734 jstring jrole = env->NewString((jchar*)role.constData(), (jsize)role.size());
735 env->CallVoidMethod(node, m_setClassNameMethodID, jrole);
737 const bool hasClickableAction =
738 (info.actions.contains(QAccessibleActionInterface::pressAction())
739 || info.actions.contains(QAccessibleActionInterface::toggleAction()))
740 && !(info.role == QAccessible::StaticText || info.role == QAccessible::Heading);
741 const bool hasIncreaseAction =
742 info.actions.contains(QAccessibleActionInterface::increaseAction());
743 const bool hasDecreaseAction =
744 info.actions.contains(QAccessibleActionInterface::decreaseAction());
747 env->CallVoidMethod(node, m_setTextSelectionMethodID, info
.selectionStart,
751 if (info
.hasValue && m_setRangeInfoMethodID) {
752 int valueType = info.currentValue.typeId();
755 case QMetaType::Float:
756 case QMetaType::Double:
764 float min = info.minValue.toFloat();
765 float max = info.maxValue.toFloat();
766 float current = info.currentValue.toFloat();
767 if (info.role == QAccessible::ProgressBar) {
769 current = 100 * (current - min) / (max - min);
774 QJniObject rangeInfo(
"android/view/accessibility/AccessibilityNodeInfo$RangeInfo",
775 "(IFFF)V", rangeType, min, max, current);
777 if (rangeInfo.isValid()) {
778 env->CallVoidMethod(node, m_setRangeInfoMethodID, rangeInfo.object());
782 env->CallVoidMethod(node, m_setCheckableMethodID, (
bool)info.state.checkable);
783 env->CallVoidMethod(node, m_setCheckedMethodID, (
bool)info.state.checked);
784 env->CallVoidMethod(node, m_setEditableMethodID, info.state.editable);
785 env->CallVoidMethod(node, m_setEnabledMethodID, !info.state.disabled);
786 env->CallVoidMethod(node, m_setFocusableMethodID, (
bool)info.state.focusable);
787 env->CallVoidMethod(node, m_setFocusedMethodID, (
bool)info.state.focused);
789 env->CallVoidMethod(node, m_setHeadingMethodID, info.role == QAccessible::Heading);
790 env->CallVoidMethod(node, m_setVisibleToUserMethodID, !info.state.invisible);
791 env->CallVoidMethod(node, m_setScrollableMethodID, hasIncreaseAction || hasDecreaseAction);
792 env->CallVoidMethod(node, m_setClickableMethodID, hasClickableAction || info.role == QAccessible::Link);
795 if (hasClickableAction)
796 env->CallVoidMethod(node, m_addActionMethodID, (
int)0x00000010);
799 if (hasIncreaseAction)
800 env->CallVoidMethod(node, m_addActionMethodID, (
int)0x00001000);
803 if (hasDecreaseAction)
804 env->CallVoidMethod(node, m_addActionMethodID, (
int)0x00002000);
807 jstring jdesc = env->NewString((jchar*)info.description.constData(),
808 (jsize)info.description.size());
810 env->CallVoidMethod(node, m_setContentDescriptionMethodID, jdesc);
812 QJniObject(node).callMethod<
void>(
"setViewIdResourceName", info.identifier);
820 {
"parentId",
"(I)I", (
void*)
parentId},
824 {
"hitTest",
"(FF)I", (
void*)
hitTest},
825 {
"populateNode",
"(ILandroid/view/accessibility/AccessibilityNodeInfo;)Z", (
void*)
populateNode},
832#define GET_AND_CHECK_STATIC_METHOD(VAR, CLASS, METHOD_NAME, METHOD_SIGNATURE)
833 VAR = env->GetMethodID(CLASS, METHOD_NAME, METHOD_SIGNATURE);
835 __android_log_print(ANDROID_LOG_FATAL, QtAndroid::qtTagText(), QtAndroid::methodErrorMsgFmt(), METHOD_NAME, METHOD_SIGNATURE);
839#define CHECK_AND_INIT_STATIC_FIELD(TYPE, VAR, CLASS, FIELD_NAME)
840 if (env.findStaticField<TYPE>(CLASS, FIELD_NAME) == nullptr) {
841 __android_log_print(ANDROID_LOG_FATAL, QtAndroid::qtTagText(),
842 QtAndroid::staticFieldErrorMsgFmt(), FIELD_NAME);
845 VAR = QJniObject::getStaticField<TYPE>(CLASS, FIELD_NAME);
849 if (!env.registerNativeMethods(
"org/qtproject/qt/android/QtNativeAccessibility",
851 __android_log_print(ANDROID_LOG_FATAL,
"Qt A11y",
"RegisterNatives failed");
855 jclass nodeInfoClass = env->FindClass(
"android/view/accessibility/AccessibilityNodeInfo");
861 GET_AND_CHECK_STATIC_METHOD(m_setContentDescriptionMethodID, nodeInfoClass,
"setContentDescription",
"(Ljava/lang/CharSequence;)V");
866 if (QtAndroidPrivate::androidSdkVersion() >= 28) {
873 m_setRangeInfoMethodID, nodeInfoClass,
"setRangeInfo",
874 "(Landroid/view/accessibility/AccessibilityNodeInfo$RangeInfo;)V");
876 jclass rangeInfoClass =
877 env->FindClass(
"android/view/accessibility/AccessibilityNodeInfo$RangeInfo");
881 if (QtAndroidPrivate::androidSdkVersion() >= 36) {
883 "RANGE_TYPE_INDETERMINATE");
static const char m_qtTag[]
#define GET_AND_CHECK_STATIC_METHOD(VAR, CLASS, METHOD_NAME, METHOD_SIGNATURE)
#define CHECK_AND_INIT_STATIC_FIELD(TYPE, VAR, CLASS, FIELD_NAME)
\inmodule QtCore\reentrant
static jmethodID m_setCheckableMethodID
static int RANGE_TYPE_FLOAT
void notifyDescriptionOrNameChanged(uint accessibilityObjectId)
void notifyObjectShow(uint accessibilityObjectId)
static bool clickAction_helper(int objectId)
static const JNINativeMethod methods[]
void notifyLocationChange(uint accessibilityObjectId)
void runInObjectContext(QObject *context, Func &&func, Ret *retVal)
static jmethodID m_setFocusableMethodID
static jmethodID m_setFocusedMethodID
static int RANGE_TYPE_INDETERMINATE
static jmethodID m_setClassNameMethodID
static jmethodID m_setEditableMethodID
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_setEnabledMethodID
static int RANGE_TYPE_PERCENT
static jstring descriptionForAccessibleObject(JNIEnv *env, jobject, jint objectId)
static bool scroll_helper(int objectId, const QString &actionName)
static QString classNameForRole(QAccessible::Role role, QAccessible::State state)
static jmethodID m_setContentDescriptionMethodID
static bool m_accessibilityActivated
static QString textFromValue(QAccessibleInterface *iface)
void createAccessibilityContextObject(QObject *parent)
static QVarLengthArray< int, 8 > childIdListForAccessibleObject_helper(int objectId)
static jmethodID m_setClickableMethodID
static NodeInfo populateNode_helper(int objectId)
void notifyObjectHide(uint accessibilityObjectId)
static jboolean focusAction(JNIEnv *, jobject, jint objectId)
static QString languageTag_helper(int objectId)
static jmethodID m_setVisibleToUserMethodID
static jmethodID m_setScrollableMethodID
static jint hitTest(JNIEnv *, jobject, jfloat x, jfloat y)
static jmethodID m_setRangeInfoMethodID
static jstring languageTag(JNIEnv *env, jobject, jint objectId)
static jmethodID m_addActionMethodID
static bool focusAction_helper(int objectId)
static jboolean clickAction(JNIEnv *, jobject, jint objectId)
static int RANGE_TYPE_INT
static jmethodID m_setCheckedMethodID
static jstring jvalueForAccessibleObject(int objectId)
static void setActive(JNIEnv *, jobject, jboolean active)
static void invokeActionOnInterfaceInMainThread(QAccessibleActionInterface *actionInterface, const QString &action)
static jmethodID m_setTextSelectionMethodID
bool registerNatives(QJniEnvironment &env)
QAccessibleInterface * interfaceFromId(jint objectId)
void notifyValueChanged(uint accessibilityObjectId)
void notifyAnnouncementEvent(uint accessibilityObjectId, const QString &message)
static int parentId_helper(int objectId)
static QRect screenRect_helper(int objectId, bool clip=true)
static jmethodID m_setHeadingMethodID
static QString descriptionForAccessibleObject_helper(int objectId)
static jint parentId(JNIEnv *, jobject, jint objectId)
static jobject screenRect(JNIEnv *env, jobject, jint objectId)
static jintArray childIdListForAccessibleObject(JNIEnv *env, jobject, jint objectId)
static jboolean populateNode(JNIEnv *env, jobject, jint objectId, jobject node)
void notifyScrolledEvent(uint accessiblityObjectId)
QBasicMutex * platformInterfaceMutex()
QAndroidPlatformIntegration * androidPlatformIntegration()