[java-atk-wrapper] JNI: create jaw_table_add_row_selection
- From: Magdalen Berns <mberns src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [java-atk-wrapper] JNI: create jaw_table_add_row_selection
- Date: Mon, 15 Jun 2015 16:50:33 +0000 (UTC)
commit 7453f5b9ffe2d6b36ab646a6cec55c6630a0d208
Author: Magdalen Berns <m berns thismagpie com>
Date: Mon Jun 15 17:49:17 2015 +0100
JNI: create jaw_table_add_row_selection
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=750998
jni/src/jawtable.c | 20 ++++++++++++++++++++
wrapper/org/GNOME/Accessibility/AtkTable.java | 15 ++++++++-------
2 files changed, 28 insertions(+), 7 deletions(-)
---
diff --git a/jni/src/jawtable.c b/jni/src/jawtable.c
index 6f070bb..7173d5c 100644
--- a/jni/src/jawtable.c
+++ b/jni/src/jawtable.c
@@ -65,6 +65,8 @@ static gboolean jaw_table_is_row_selected (AtkTable
*table,
static gboolean jaw_table_is_selected (AtkTable *table,
gint row,
gint column);
+static gboolean jaw_table_add_row_selection(AtkTable *table,
+ gint row);
typedef struct _TableData {
jobject atk_table;
@@ -94,6 +96,7 @@ jaw_table_interface_init (AtkTableIface *iface)
iface->is_column_selected = jaw_table_is_column_selected;
iface->is_row_selected = jaw_table_is_row_selected;
iface->is_selected = jaw_table_is_selected;
+ iface->add_row_selection= jaw_table_add_row_selection;
}
gpointer
@@ -504,3 +507,20 @@ jaw_table_is_selected (AtkTable *table, gint row, gint column)
return FALSE;
}
+static gboolean
+jaw_table_add_row_selection(AtkTable *table, gint row)
+{
+ JawObject *jaw_obj = JAW_OBJECT(table);
+ TableData *data = jaw_object_get_interface_data(jaw_obj, INTERFACE_TABLE);
+ jobject atk_table = data->atk_table;
+
+ JNIEnv *jniEnv = jaw_util_get_jni_env();
+ jclass classAtkTable = (*jniEnv)->FindClass(jniEnv, "org/GNOME/Accessibility/AtkTable");
+ jmethodID jmid = (*jniEnv)->GetMethodID(jniEnv, classAtkTable, "addRowSelection", "(I)Z");
+ jboolean jselected = (*jniEnv)->CallBooleanMethod(jniEnv, atk_table, jmid, (jint)row);
+
+ if (jselected == JNI_TRUE)
+ return TRUE;
+
+ return FALSE;
+}
diff --git a/wrapper/org/GNOME/Accessibility/AtkTable.java b/wrapper/org/GNOME/Accessibility/AtkTable.java
index 20f773f..ac8739a 100644
--- a/wrapper/org/GNOME/Accessibility/AtkTable.java
+++ b/wrapper/org/GNOME/Accessibility/AtkTable.java
@@ -26,10 +26,11 @@ public class AtkTable {
AccessibleContext ac;
AccessibleTable acc_table;
- public AtkTable (AccessibleContext ac) {
- super();
- this.acc_table = ac.getAccessibleTable();
- }
+ public AtkTable (AccessibleContext ac) {
+ super();
+ this.ac = ac;
+ this.acc_table = ac.getAccessibleTable();
+ }
public AccessibleContext ref_at (int row, int column) {
javax.accessibility.Accessible accessible = acc_table.getAccessibleAt(row, column);
@@ -182,9 +183,9 @@ public class AtkTable {
return false;
}
- public boolean add_row_selection (int row) {
- return false;
- }
+ public boolean addRowSelection (int row) {
+ return is_row_selected(row);
+ }
public boolean remove_column_selection (int column) {
return false;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]