[clutter] [a11y] Exposing via ATK the proper toolkit name and version



commit 7e9ee85c7d23ed6d2ae5f69a91d26b34f0f523df
Author: Alejandro PiÃeiro <apinheiro igalia com>
Date:   Wed Jul 6 14:25:02 2011 +0200

    [a11y] Exposing via ATK the proper toolkit name and version

 clutter/cally/cally-actor.c |   18 ++++++++++++++++++
 clutter/cally/cally-util.c  |    9 ++-------
 2 files changed, 20 insertions(+), 7 deletions(-)
---
diff --git a/clutter/cally/cally-actor.c b/clutter/cally/cally-actor.c
index d7f0528..3365d10 100644
--- a/clutter/cally/cally-actor.c
+++ b/clutter/cally/cally-actor.c
@@ -151,6 +151,8 @@ static const gchar*          cally_actor_get_name            (AtkObject *obj);
 static gint                  cally_actor_get_n_children      (AtkObject *obj);
 static AtkObject*            cally_actor_ref_child           (AtkObject *obj,
                                                              gint       i);
+static AtkAttributeSet *     cally_actor_get_attributes      (AtkObject *obj);
+
 static gboolean             _cally_actor_all_parents_visible (ClutterActor *actor);
 
 /* ClutterContainer */
@@ -353,6 +355,7 @@ cally_actor_class_init (CallyActorClass *klass)
   class->initialize          = cally_actor_initialize;
   class->get_n_children      = cally_actor_get_n_children;
   class->ref_child           = cally_actor_ref_child;
+  class->get_attributes      = cally_actor_get_attributes;
 
   g_type_class_add_private (gobject_class, sizeof (CallyActorPrivate));
 }
@@ -634,6 +637,21 @@ cally_actor_ref_child (AtkObject *obj,
   return result;
 }
 
+static AtkAttributeSet *
+cally_actor_get_attributes (AtkObject *obj)
+{
+  AtkAttributeSet *attributes;
+  AtkAttribute *toolkit;
+
+  toolkit = g_new (AtkAttribute, 1);
+  toolkit->name = g_strdup ("toolkit");
+  toolkit->value = g_strdup ("clutter");
+
+  attributes = g_slist_append (NULL, toolkit);
+
+  return attributes;
+}
+
 /* ClutterContainer */
 static gint
 cally_actor_add_actor (ClutterActor *container,
diff --git a/clutter/cally/cally-util.c b/clutter/cally/cally-util.c
index b4bd19e..cb33654 100644
--- a/clutter/cally/cally-util.c
+++ b/clutter/cally/cally-util.c
@@ -165,18 +165,13 @@ cally_util_get_root (void)
 static const gchar *
 cally_util_get_toolkit_name (void)
 {
-  return "CALLY";
+  return "clutter";
 }
 
 static const gchar *
 cally_util_get_toolkit_version (void)
 {
-  /*
-   * FIXME:
-   * Version is passed in as a -D flag when this file is
-   * compiled.
-   */
-  return "0.1";
+  return CLUTTER_VERSION_S;
 }
 
 



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