[java-atk-wrapper] JNI: create jaw_object_set_role
- From: Magdalen Berns <mberns src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [java-atk-wrapper] JNI: create jaw_object_set_role
- Date: Wed, 10 Jun 2015 15:19:21 +0000 (UTC)
commit 3378dd423d5c43616d1eecd34dd617d69cd50d36
Author: Magdalen Berns <m berns thismagpie com>
Date: Wed Jun 10 16:18:38 2015 +0100
JNI: create jaw_object_set_role
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=750716
jni/src/jawobject.c | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
---
diff --git a/jni/src/jawobject.c b/jni/src/jawobject.c
index dad2259..fce4d90 100644
--- a/jni/src/jawobject.c
+++ b/jni/src/jawobject.c
@@ -49,6 +49,7 @@ static AtkRelationSet* jaw_object_ref_relation_set(AtkObject *atk_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;
@@ -74,9 +75,8 @@ jaw_object_class_init (JawObjectClass *klass)
atk_class->set_name = jaw_object_set_name;
atk_class->set_description = jaw_object_set_description;
atk_class->set_parent = jaw_object_set_parent;
-/* atk_class->set_role = jaw_object_set_role;
- atk_class->get_attributes = jaw_object_get_attributes;
-*/
+ atk_class->set_role = jaw_object_set_role;
+
klass->get_interface_data = NULL;
}
@@ -371,6 +371,15 @@ 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 AtkObject*
jaw_object_ref_child (AtkObject *atk_obj, gint i)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]