[java-atk-wrapper] JNI: Create jaw_table_set_row_description
- From: Magdalen Berns <mberns src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [java-atk-wrapper] JNI: Create jaw_table_set_row_description
- Date: Fri, 3 Jul 2015 16:14:44 +0000 (UTC)
commit 8c91d0108a8a27ef098fdec98ec0455b2e467cc3
Author: Magdalen Berns <m berns thismagpie com>
Date: Fri Jul 3 15:13:52 2015 +0100
JNI: Create jaw_table_set_row_description
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=751895
jni/src/jawtable.c | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
---
diff --git a/jni/src/jawtable.c b/jni/src/jawtable.c
index 2b3b654..38b803b 100644
--- a/jni/src/jawtable.c
+++ b/jni/src/jawtable.c
@@ -48,6 +48,9 @@ static gboolean jaw_table_is_row_selected(AtkTable *table, gint row);
static gboolean jaw_table_is_selected(AtkTable *table,gint row, gint column);
static gboolean jaw_table_add_row_selection(AtkTable *table, gint row);
static gboolean jaw_table_add_column_selection(AtkTable *table, gint column);
+static void jaw_table_set_row_description(AtkTable *table,
+ gint row,
+ const gchar *description);
typedef struct _TableData {
jobject atk_table;
@@ -79,6 +82,7 @@ jaw_table_interface_init (AtkTableIface *iface)
iface->is_selected = jaw_table_is_selected;
iface->add_row_selection= jaw_table_add_row_selection;
iface->add_column_selection= jaw_table_add_column_selection;
+ iface->set_row_description = jaw_table_set_row_description;
}
gpointer
@@ -530,3 +534,20 @@ jaw_table_add_column_selection(AtkTable *table, gint column)
return FALSE;
}
+
+static void
+jaw_table_set_row_description(AtkTable *table, gint row, const gchar *description)
+{
+ JawObject *jaw_obj = JAW_OBJECT(table);
+ TableData *data = jaw_object_get_interface_data(jaw_obj, INTERFACE_TABLE);
+ jobject atk_table = data->atk_table;
+
+ JNIEnv *env = jaw_util_get_jni_env();
+ jclass classAtkTable = (*env)->FindClass(env, "org/GNOME/Accessibility/AtkTable");
+ jmethodID jmid = (*env)->GetMethodID(env,
+ classAtkTable,
+ "setRowDescription",
+ "(ILjava/lang/String;)V");
+ jstring jstr = (*env)->NewStringUTF(env, description);
+ (*env)->CallVoidMethod(env, atk_table, jmid, (jint)row, jstr);
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]