[java-atk-wrapper/wip] JNI: create jaw_object_set_role



commit a522e2e395a73353729c7105ca7dc58ec1157ba3
Author: Magdalen Berns <m berns thismagpie com>
Date:   Sun Jun 21 19:47:37 2015 +0100

    JNI: create jaw_object_set_role
    
    Patch 3378dd4 doesn't apply
    
    Bug: https://bugzilla.gnome.org/show_bug.cgi?id=750716

 jni/src/jawobject.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/jni/src/jawobject.c b/jni/src/jawobject.c
index a63194a..8bd30f3 100644
--- a/jni/src/jawobject.c
+++ b/jni/src/jawobject.c
@@ -45,6 +45,7 @@ static AtkObject* jaw_object_get_parent(AtkObject *obj);
 static void jaw_object_set_name (AtkObject *atk_obj, const gchar *name);
 static void jaw_object_set_description (AtkObject *atk_obj, const gchar *description);
 static void jaw_object_set_parent(AtkObject *atk_obj, AtkObject *parent);
+static void jaw_object_set_role (AtkObject *atk_obj, AtkRole role);
 
 static gpointer parent_class = NULL;
 
@@ -97,6 +98,8 @@ jaw_object_class_init (JawObjectClass *klass)
   atk_class->get_role = jaw_object_get_role;
   atk_class->get_parent = jaw_object_get_parent;
   atk_class->set_parent = jaw_object_set_parent;
+  atk_class->set_role = jaw_object_set_role;
+
   atk_class->ref_state_set = jaw_object_ref_state_set;
   atk_class->initialize = jaw_object_initialize;
 
@@ -416,6 +419,16 @@ jaw_object_get_role (AtkObject *atk_obj)
   return atk_obj->role;
 }
 
+static void
+jaw_object_set_role (AtkObject *atk_obj, AtkRole role)
+{
+  JawObject *jaw_obj = JAW_OBJECT(atk_obj);
+  atk_obj->role = role;
+  if (atk_obj != NULL && role)
+    atk_object_set_role(atk_obj, atk_obj->role);
+}
+
+
 static AtkStateSet*
 jaw_object_ref_state_set (AtkObject *atk_obj)
 {


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