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);
418 QAccessibleInterface *iface = interfaceFromId(objectId);
419 if (!iface || !iface->isValid() || !iface->actionInterface())
422 const auto actionNames = iface->actionInterface()->actionNames();
424 if (actionNames.contains(QAccessibleActionInterface::showOnScreenAction())) {
425 invokeActionOnInterfaceInMainThread(iface->actionInterface(), QAccessibleActionInterface::showOnScreenAction());
434 if (m_accessibilityContext) {
435 runInObjectContext(m_accessibilityContext, [objectId]() {
436 return showOnScreen_helper(objectId);
445 QAccessibleValueInterface *valueIface = iface->valueInterface();
447 const QVariant valueVar = valueIface->currentValue();
448 const auto type = valueVar.typeId();
449 if (type == QMetaType::Double || type == QMetaType::Float) {
455 const double val = valueVar.toDouble();
457 bool stepIsValid =
false;
458 const double step = qAbs(valueIface->minimumStepSize().toDouble(&stepIsValid));
459 if (!stepIsValid || qFuzzyIsNull(step)) {
461 valueStr = qFuzzyIsNull(val) ? u"0"_s : QString::number(val,
'f');
463 const int precision = [](
double s) {
465 while (s < 1. && !qFuzzyCompare(s, 1.)) {
472 const int stop = count + 3;
473 const auto fractional = [](
double v) {
475 std::modf(v + 0.5, &whole);
476 return qAbs(v - whole);
479 while (count < stop && !qFuzzyIsNull(s)) {
481 s = fractional(s * 10);
485 valueStr = qFuzzyIsNull(val / step) ? u"0"_s
486 : QString::number(val,
'f', precision);
489 valueStr = valueVar.toString();
497 QAccessibleInterface *iface = interfaceFromId(objectId);
498 const QString value = textFromValue(iface);
500 jstring jstr = env->NewString((jchar*)value.constData(), (jsize)value.size());
501 if (env.checkAndClearExceptions())
502 __android_log_print(ANDROID_LOG_WARN, m_qtTag,
"Failed to create jstring");
508 case QAccessible::Role::Button:
509 case QAccessible::Role::Link:
512 return QStringLiteral(
"android.widget.ToggleButton");
513 return QStringLiteral(
"android.widget.Button");
515 case QAccessible::Role::CheckBox:
518 return QStringLiteral(
"android.widget.CompoundButton");
519 case QAccessible::Role::Switch:
520 return QStringLiteral(
"android.widget.Switch");
521 case QAccessible::Role::Clock:
522 return QStringLiteral(
"android.widget.TextClock");
523 case QAccessible::Role::ComboBox:
524 return QStringLiteral(
"android.widget.Spinner");
525 case QAccessible::Role::Graphic:
527 return QStringLiteral(
"android.widget.ImageView");
528 case QAccessible::Role::Grouping:
529 return QStringLiteral(
"android.view.ViewGroup");
530 case QAccessible::Role::List:
533 return QStringLiteral(
"android.widget.AbsListView");
534 case QAccessible::Role::MenuItem:
535 return QStringLiteral(
"android.view.MenuItem");
536 case QAccessible::Role::PopupMenu:
537 return QStringLiteral(
"android.widget.PopupMenu");
538 case QAccessible::Role::Separator:
539 return QStringLiteral(
"android.widget.Space");
540 case QAccessible::Role::ToolBar:
541 return QStringLiteral(
"android.view.Toolbar");
542 case QAccessible::Role::Heading: [[fallthrough]];
543 case QAccessible::Role::StaticText:
545 return QStringLiteral(
"android.widget.TextView");
546 case QAccessible::Role::EditableText:
547 return QStringLiteral(
"android.widget.EditText");
548 case QAccessible::Role::RadioButton:
549 return QStringLiteral(
"android.widget.RadioButton");
550 case QAccessible::Role::ProgressBar:
551 return QStringLiteral(
"android.widget.ProgressBar");
552 case QAccessible::Role::SpinBox:
553 return QStringLiteral(
"android.widget.NumberPicker");
554 case QAccessible::Role::WebDocument:
555 return QStringLiteral(
"android.webkit.WebView");
556 case QAccessible::Role::Dialog:
557 return QStringLiteral(
"android.app.AlertDialog");
558 case QAccessible::Role::PageTab:
559 return QStringLiteral(
"android.app.ActionBar.Tab");
560 case QAccessible::Role::PageTabList:
561 return QStringLiteral(
"android.widget.TabWidget");
562 case QAccessible::Role::ScrollBar:
563 return QStringLiteral(
"android.widget.Scroller");
564 case QAccessible::Role::Slider:
565 return QStringLiteral(
"com.google.android.material.slider.Slider");
566 case QAccessible::Role::Table:
569 return QStringLiteral(
"android.widget.GridView");
570 case QAccessible::Role::Pane:
572 return QStringLiteral(
"android.view.ViewGroup");
573 case QAccessible::Role::AlertMessage:
574 case QAccessible::Role::Animation:
575 case QAccessible::Role::Application:
576 case QAccessible::Role::Assistant:
577 case QAccessible::Role::BlockQuote:
578 case QAccessible::Role::Border:
579 case QAccessible::Role::ButtonDropGrid:
580 case QAccessible::Role::ButtonDropDown:
581 case QAccessible::Role::ButtonMenu:
582 case QAccessible::Role::Canvas:
583 case QAccessible::Role::Caret:
584 case QAccessible::Role::Cell:
585 case QAccessible::Role::Chart:
586 case QAccessible::Role::Client:
587 case QAccessible::Role::ColorChooser:
588 case QAccessible::Role::Column:
589 case QAccessible::Role::ColumnHeader:
590 case QAccessible::Role::ComplementaryContent:
591 case QAccessible::Role::Cursor:
592 case QAccessible::Role::Desktop:
593 case QAccessible::Role::Dial:
594 case QAccessible::Role::Document:
595 case QAccessible::Role::Equation:
596 case QAccessible::Role::Footer:
597 case QAccessible::Role::Form:
598 case QAccessible::Role::Grip:
599 case QAccessible::Role::HelpBalloon:
600 case QAccessible::Role::HotkeyField:
601 case QAccessible::Role::Indicator:
602 case QAccessible::Role::LayeredPane:
603 case QAccessible::Role::ListItem:
604 case QAccessible::Role::MenuBar:
605 case QAccessible::Role::NoRole:
606 case QAccessible::Role::Note:
607 case QAccessible::Role::Notification:
608 case QAccessible::Role::Paragraph:
609 case QAccessible::Role::PropertyPage:
610 case QAccessible::Role::Row:
611 case QAccessible::Role::RowHeader:
612 case QAccessible::Role::Section:
613 case QAccessible::Role::Sound:
614 case QAccessible::Role::Splitter:
615 case QAccessible::Role::StatusBar:
616 case QAccessible::Role::Terminal:
617 case QAccessible::Role::TitleBar:
618 case QAccessible::Role::ToolTip:
619 case QAccessible::Role::Tree:
620 case QAccessible::Role::TreeItem:
621 case QAccessible::Role::UserRole:
622 case QAccessible::Role::Whitespace:
623 case QAccessible::Role::Window:
627 return QStringLiteral(
"android.view.TextView");
634 if (iface && iface->isValid()) {
635 bool hasValue =
false;
636 desc = iface->text(QAccessible::Name);
637 const QString descStr = iface->text(QAccessible::Description);
638 if (!descStr.isEmpty()) {
640 desc.append(QStringLiteral(
", "));
641 desc.append(descStr);
643 if (desc.isEmpty()) {
644 desc = iface->text(QAccessible::Value);
645 hasValue = !desc.isEmpty();
647 if (!hasValue && iface->valueInterface()) {
648 const QString valueStr = textFromValue(iface);
649 if (!valueStr.isEmpty()) {
651 desc.append(QChar(QChar::Space));
652 desc.append(valueStr);
661 QAccessibleInterface *iface = interfaceFromId(objectId);
662 return descriptionForInterface(iface);
668 if (m_accessibilityContext) {
669 runInObjectContext(m_accessibilityContext, [objectId]() {
670 return descriptionForAccessibleObject_helper(objectId);
673 return env->NewString((jchar*) desc.constData(), (jsize) desc.size());
678 QAccessibleInterface *iface = interfaceFromId(objectId);
679 if (!iface || !iface->isValid())
682 QAccessibleAttributesInterface *attributesIface = iface->attributesInterface();
683 if (!attributesIface || !attributesIface->attributeKeys().contains(QAccessible::Attribute::Locale))
686 return attributesIface->attributeValue(QAccessible::Attribute::Locale).toLocale().bcp47Name();
692 if (m_accessibilityContext) {
693 runInObjectContext(m_accessibilityContext, [objectId]() {
694 return languageTag_helper(objectId);
697 return env->NewString((jchar*)tag.constData(), (jsize)tag.size());
721 QAccessibleInterface *iface = interfaceFromId(objectId);
722 if (iface && iface->isValid()) {
724 info.state = iface->state();
725 info.role = iface->role();
726 info.actions = QAccessibleBridgeUtils::effectiveActionNames(iface);
727 info.description = descriptionForInterface(iface);
728 info.identifier = QAccessibleBridgeUtils::accessibleId(iface);
729 QAccessibleTextInterface *textIface = iface->textInterface();
730 if (textIface && (textIface->selectionCount() > 0)) {
734 QAccessibleValueInterface *valueInterface = iface->valueInterface();
735 if (valueInterface) {
737 info.minValue = valueInterface->minimumValue();
738 info.maxValue = valueInterface->maximumValue();
739 info.currentValue = valueInterface->currentValue();
740 info.valueStepSize = valueInterface->minimumStepSize();
749 if (m_accessibilityContext) {
750 runInObjectContext(m_accessibilityContext, [objectId]() {
751 return populateNode_helper(objectId);
755 __android_log_print(ANDROID_LOG_WARN, m_qtTag,
"Accessibility: populateNode for Invalid ID");
759 const QString role = classNameForRole(info.role, info.state);
760 jstring jrole = env->NewString((jchar*)role.constData(), (jsize)role.size());
761 env->CallVoidMethod(node, m_setClassNameMethodID, jrole);
763 const bool hasClickableAction =
764 (info.actions.contains(QAccessibleActionInterface::pressAction())
765 || info.actions.contains(QAccessibleActionInterface::toggleAction()))
766 && !(info.role == QAccessible::StaticText || info.role == QAccessible::Heading);
767 const bool hasIncreaseAction =
768 info.actions.contains(QAccessibleActionInterface::increaseAction());
769 const bool hasDecreaseAction =
770 info.actions.contains(QAccessibleActionInterface::decreaseAction());
773 env->CallVoidMethod(node, m_setTextSelectionMethodID, info
.selectionStart,
777 if (info
.hasValue && m_setRangeInfoMethodID) {
778 int valueType = info.currentValue.typeId();
781 case QMetaType::Float:
782 case QMetaType::Double:
790 float min = info.minValue.toFloat();
791 float max = info.maxValue.toFloat();
792 float current = info.currentValue.toFloat();
793 if (info.role == QAccessible::ProgressBar) {
795 current = 100 * (current - min) / (max - min);
800 QJniObject rangeInfo(
"android/view/accessibility/AccessibilityNodeInfo$RangeInfo",
801 "(IFFF)V", rangeType, min, max, current);
803 if (rangeInfo.isValid()) {
804 env->CallVoidMethod(node, m_setRangeInfoMethodID, rangeInfo.object());
808 env->CallVoidMethod(node, m_setCheckableMethodID, (
bool)info.state.checkable);
809 env->CallVoidMethod(node, m_setCheckedMethodID, (
bool)info.state.checked);
810 env->CallVoidMethod(node, m_setEditableMethodID, info.state.editable);
811 env->CallVoidMethod(node, m_setEnabledMethodID, !info.state.disabled);
812 env->CallVoidMethod(node, m_setFocusableMethodID, (
bool)info.state.focusable);
813 env->CallVoidMethod(node, m_setFocusedMethodID, (
bool)info.state.focused);
815 env->CallVoidMethod(node, m_setHeadingMethodID, info.role == QAccessible::Heading);
816 env->CallVoidMethod(node, m_setVisibleToUserMethodID, !info.state.invisible);
817 env->CallVoidMethod(node, m_setScrollableMethodID, hasIncreaseAction || hasDecreaseAction);
818 env->CallVoidMethod(node, m_setClickableMethodID, hasClickableAction || info.role == QAccessible::Link);
821 if (hasClickableAction)
822 env->CallVoidMethod(node, m_addActionMethodID, (
int)0x00000010);
825 if (hasIncreaseAction)
826 env->CallVoidMethod(node, m_addActionMethodID, (
int)0x00001000);
829 if (hasDecreaseAction)
830 env->CallVoidMethod(node, m_addActionMethodID, (
int)0x00002000);
833 jstring jdesc = env->NewString((jchar*)info.description.constData(),
834 (jsize)info.description.size());
836 env->CallVoidMethod(node, m_setContentDescriptionMethodID, jdesc);
838 QJniObject(node).callMethod<
void>(
"setViewIdResourceName", info.identifier);
846 {
"parentId",
"(I)I", (
void*)
parentId},
850 {
"hitTest",
"(FF)I", (
void*)
hitTest},
851 {
"populateNode",
"(ILandroid/view/accessibility/AccessibilityNodeInfo;)Z", (
void*)
populateNode},
859#define GET_AND_CHECK_STATIC_METHOD(VAR, CLASS, METHOD_NAME, METHOD_SIGNATURE)
860 VAR = env->GetMethodID(CLASS, METHOD_NAME, METHOD_SIGNATURE);
862 __android_log_print(ANDROID_LOG_FATAL, QtAndroid::qtTagText(), QtAndroid::methodErrorMsgFmt(), METHOD_NAME, METHOD_SIGNATURE);
866#define CHECK_AND_INIT_STATIC_FIELD(TYPE, VAR, CLASS, FIELD_NAME)
867 if (env.findStaticField<TYPE>(CLASS, FIELD_NAME) == nullptr) {
868 __android_log_print(ANDROID_LOG_FATAL, QtAndroid::qtTagText(),
869 QtAndroid::staticFieldErrorMsgFmt(), FIELD_NAME);
872 VAR = QJniObject::getStaticField<TYPE>(CLASS, FIELD_NAME);
876 if (!env.registerNativeMethods(
"org/qtproject/qt/android/QtNativeAccessibility",
878 __android_log_print(ANDROID_LOG_FATAL,
"Qt A11y",
"RegisterNatives failed");
882 jclass nodeInfoClass = env->FindClass(
"android/view/accessibility/AccessibilityNodeInfo");
888 GET_AND_CHECK_STATIC_METHOD(m_setContentDescriptionMethodID, nodeInfoClass,
"setContentDescription",
"(Ljava/lang/CharSequence;)V");
893 if (QtAndroidPrivate::androidSdkVersion() >= 28) {
900 m_setRangeInfoMethodID, nodeInfoClass,
"setRangeInfo",
901 "(Landroid/view/accessibility/AccessibilityNodeInfo$RangeInfo;)V");
903 jclass rangeInfoClass =
904 env->FindClass(
"android/view/accessibility/AccessibilityNodeInfo$RangeInfo");
908 if (QtAndroidPrivate::androidSdkVersion() >= 36) {
910 "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
static jboolean showOnScreen(JNIEnv *, jobject, jint objectId)
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 bool showOnScreen_helper(int objectId)
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()