atk/atkaction.[c|h], docs/atk-sections.txt, docs/tmpl/atkaction.sgml Add
authorPadraig O'Briain <padraigo@src.gnome.org>
Fri, 20 Jul 2001 09:01:43 +0000 (09:01 +0000)
committerPadraig O'Briain <padraigo@src.gnome.org>
Fri, 20 Jul 2001 09:01:43 +0000 (09:01 +0000)
* atk/atkaction.[c|h], docs/atk-sections.txt,
docs/tmpl/atkaction.sgml
Add atk_action_get_name() and atk_action_set_description()

ChangeLog
atk/atkaction.c
atk/atkaction.h
docs/atk-sections.txt
docs/tmpl/atkaction.sgml

index b24fb42..2cc81ba 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2001-07-20  Padraig O'Briain  <padraig.obriain@sun.com>
+       * atk/atkaction.[c|h], docs/atk-sections.txt, 
+       docs/tmpl/atkaction.sgml
+       Add atk_action_get_name() and atk_action_set_description()
+
 2001-07-18  Padraig O'Briain  <padraig.obriain@sun.com>
        * atk/atkstate.[c|h]
        Add ATK_STATE_ENABLED so we can distinguish between a consistent
index f7a2018..ed6d5d2 100755 (executable)
@@ -116,6 +116,33 @@ atk_action_get_description (AtkAction *obj,
 }
 
 /**
+ * atk_action_get_name:
+ * @action: a #GObject instance that implements AtkActionIface
+ * @i: the action index corresponding to the action to be performed 
+ *
+ * Returns the name of the specified action of the object.
+ *
+ * Returns a name string, or %NULL
+ * if @action does not implement this interface.
+ **/
+G_CONST_RETURN gchar*
+atk_action_get_name (AtkAction *obj,
+                     gint      i)
+{
+  AtkActionIface *iface;
+
+  g_return_val_if_fail (obj != NULL, NULL);
+  g_return_val_if_fail (ATK_IS_ACTION (obj), NULL);
+
+  iface = ATK_ACTION_GET_IFACE (obj);
+
+  if (iface->get_name)
+    return (iface->get_name) (obj, i);
+  else
+    return NULL;
+}
+
+/**
  * atk_action_get_keybinding:
  * @action: a #GObject instance that implements AtkActionIface
  * @i: the action index corresponding to the action to be performed 
@@ -142,3 +169,31 @@ atk_action_get_keybinding (AtkAction *obj,
   else
     return NULL;
 }
+
+/**
+ * atk_action_set_description:
+ * @action: a #GObject instance that implements AtkActionIface
+ * @i: the action index corresponding to the action to be performed 
+ * @desc: the description to be assigned to this action
+ *
+ * Sets a description of the specified action of the object.
+ *
+ * Returns: a gboolean representing if the description was successfully set;
+ **/
+gboolean
+atk_action_set_description (AtkAction   *obj,
+                            gint        i,
+                            const gchar *desc)
+{
+  AtkActionIface *iface;
+
+  g_return_val_if_fail (obj != NULL, FALSE);
+  g_return_val_if_fail (ATK_IS_ACTION (obj), FALSE);
+
+  iface = ATK_ACTION_GET_IFACE (obj);
+
+  if (iface->set_description)
+    return (iface->set_description) (obj, i, desc);
+  else
+    return FALSE;
+}
index e6180e2..5237ec1 100755 (executable)
@@ -55,8 +55,13 @@ struct _AtkActionIface
   gint                    (*get_n_actions)     (AtkAction         *action);
   G_CONST_RETURN gchar*   (*get_description)   (AtkAction         *action,
                                                 gint              i);
+  G_CONST_RETURN gchar*   (*get_name)          (AtkAction         *action,
+                                                gint              i);
   G_CONST_RETURN gchar*   (*get_keybinding)    (AtkAction         *action,
                                                 gint              i);
+  gboolean                (*set_description)   (AtkAction         *action,
+                                                gint              i,
+                                                const gchar       *desc);
 };
 
 GType atk_action_get_type ();
@@ -77,8 +82,13 @@ void   atk_action_do_action                (AtkAction         *action,
 gint   atk_action_get_n_actions            (AtkAction *action);
 G_CONST_RETURN gchar* atk_action_get_description  (AtkAction         *action,
                                                    gint              i);
+G_CONST_RETURN gchar* atk_action_get_name         (AtkAction         *action,
+                                                   gint              i);
 G_CONST_RETURN gchar* atk_action_get_keybinding   (AtkAction         *action,
                                                    gint              i);
+gboolean              atk_action_set_description  (AtkAction         *action,
+                                                   gint              i,
+                                                   const gchar       *desc);
 
 
 /*
index 890c81c..63a850a 100644 (file)
@@ -6,7 +6,9 @@ AtkActionIface
 atk_action_do_action
 atk_action_get_n_actions
 atk_action_get_description
+atk_action_get_name
 atk_action_get_keybinding
+atk_action_set_description
 <SUBSECTION Standard>
 ATK_ACTION
 ATK_IS_ACTION
index cf62743..349c0e9 100644 (file)
@@ -33,7 +33,9 @@ be manipulated should support this interface.
 @do_action: 
 @get_n_actions: 
 @get_description: 
+@get_name: 
 @get_keybinding: 
+@set_description: 
 
 <!-- ##### FUNCTION atk_action_do_action ##### -->
 <para>
@@ -63,6 +65,16 @@ be manipulated should support this interface.
 @Returns: 
 
 
+<!-- ##### FUNCTION atk_action_get_name ##### -->
+<para>
+
+</para>
+
+@action: 
+@i: 
+@Returns: 
+
+
 <!-- ##### FUNCTION atk_action_get_keybinding ##### -->
 <para>
 
@@ -73,3 +85,14 @@ be manipulated should support this interface.
 @Returns: 
 
 
+<!-- ##### FUNCTION atk_action_set_description ##### -->
+<para>
+
+</para>
+
+@action: 
+@i: 
+@desc: 
+@Returns: 
+
+