[java-atk-wrapper] JNI: Create jaw_table_set_column_description



commit f369fb14a5838f38679df08d72db2323e71926ba
Author: Magdalen Berns <m berns thismagpie com>
Date:   Fri Jul 3 15:32:40 2015 +0100

    JNI: Create jaw_table_set_column_description
    
    Bug: https://bugzilla.gnome.org/show_bug.cgi?id=751897

 jni/src/jawtable.c |   22 +++++++++++++++++++++-
 1 files changed, 21 insertions(+), 1 deletions(-)
---
diff --git a/jni/src/jawtable.c b/jni/src/jawtable.c
index 38b803b..64acc68 100644
--- a/jni/src/jawtable.c
+++ b/jni/src/jawtable.c
@@ -51,7 +51,9 @@ 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);
-
+static void         jaw_table_set_column_description(AtkTable *table,
+                                                     gint column,
+                                                     const gchar *description);
 typedef struct _TableData {
   jobject atk_table;
   gchar* description;
@@ -83,6 +85,7 @@ jaw_table_interface_init (AtkTableIface *iface)
   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;
+  iface->set_column_description = jaw_table_set_column_description;
 }
 
 gpointer
@@ -551,3 +554,20 @@ jaw_table_set_row_description(AtkTable *table, gint row, const gchar *descriptio
   jstring jstr = (*env)->NewStringUTF(env, description);
   (*env)->CallVoidMethod(env, atk_table, jmid, (jint)row, jstr);
 }
+
+static void
+jaw_table_set_column_description(AtkTable *table, gint column, 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,
+                                       "setColumnDescription",
+                                       "(ILjava/lang/String;)V");
+  jstring jstr = (*env)->NewStringUTF(env, description);
+  (*env)->CallVoidMethod(env, atk_table, jmid, (jint)column, jstr);
+}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]