[java-atk-wrapper] Call getAccessibleContext in EDT
- From: Samuel Thibault <sthibaul src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [java-atk-wrapper] Call getAccessibleContext in EDT
- Date: Fri, 14 Jun 2019 07:37:52 +0000 (UTC)
commit 5345fb5687b95fd79c09ea21d74dbd369a1629a1
Author: Samuel Thibault <samuel thibault ens-lyon org>
Date: Fri Jun 14 09:37:45 2019 +0200
Call getAccessibleContext in EDT
jni/src/jawhyperlink.c | 10 +++-------
wrapper/org/GNOME/Accessibility/AtkHyperlink.java | 2 +-
2 files changed, 4 insertions(+), 8 deletions(-)
---
diff --git a/jni/src/jawhyperlink.c b/jni/src/jawhyperlink.c
index 5723f5e..6e182cc 100644
--- a/jni/src/jawhyperlink.c
+++ b/jni/src/jawhyperlink.c
@@ -127,17 +127,13 @@ jaw_hyperlink_get_object (AtkHyperlink *atk_hyperlink,
}
jclass classAtkHyperlink = (*jniEnv)->FindClass(jniEnv, "org/GNOME/Accessibility/AtkHyperlink");
- jmethodID jmid = (*jniEnv)->GetMethodID(jniEnv, classAtkHyperlink, "get_object",
"(I)Ljava/lang/String;");
- jobject jobj = (*jniEnv)->CallObjectMethod(jniEnv, jhyperlink, jmid, (jint)i);
+ jmethodID jmid = (*jniEnv)->GetMethodID(jniEnv, classAtkHyperlink, "get_object",
"(I)Ljavax/accessibility/AccessibleContext;");
+ jobject ac = (*jniEnv)->CallObjectMethod(jniEnv, jhyperlink, jmid, (jint)i);
(*jniEnv)->DeleteGlobalRef(jniEnv, jhyperlink);
- if (jobj == NULL) {
+ if (ac == NULL) {
return NULL;
}
- jclass classAccessible = (*jniEnv)->FindClass( jniEnv, "javax/accessibility/Accessible" );
- jmid = (*jniEnv)->GetMethodID( jniEnv, classAccessible, "getAccessibleContext",
"()Ljavax/accessibility/AccessibleContext;" );
- jobject ac = (*jniEnv)->CallObjectMethod( jniEnv, jobj, jmid );
-
AtkObject *obj = (AtkObject*) jaw_impl_get_instance_from_jaw( jniEnv, ac );
return obj;
diff --git a/wrapper/org/GNOME/Accessibility/AtkHyperlink.java
b/wrapper/org/GNOME/Accessibility/AtkHyperlink.java
index ad71dc8..60bfc18 100644
--- a/wrapper/org/GNOME/Accessibility/AtkHyperlink.java
+++ b/wrapper/org/GNOME/Accessibility/AtkHyperlink.java
@@ -47,7 +47,7 @@ public class AtkHyperlink {
return AtkUtil.invokeInSwing ( () -> {
Object anchor = acc_hyperlink.getAccessibleActionAnchor(i);
if (anchor instanceof Accessible)
- return anchor;
+ return ((Accessible)anchor).getAccessibleContext();
return null;
}, null);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]