+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
}
/**
+ * 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
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;
+}
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 ();
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);
/*