summaryrefslogtreecommitdiff
path: root/atk/atkselection.c
diff options
context:
space:
mode:
authorBrian Cameron <bcameron@src.gnome.org>2001-06-15 13:20:49 +0000
committerBrian Cameron <bcameron@src.gnome.org>2001-06-15 13:20:49 +0000
commita992d1ec4bd948b359a63efc6d5e0358a1ceef26 (patch)
tree3bfc5939df8adea37f13f74c84f17b32fdc52298 /atk/atkselection.c
parent6176d7549c091b22dfcce88af6f6f8bf7eb048ff (diff)
downloadatk-a992d1ec4bd948b359a63efc6d5e0358a1ceef26.tar.gz
Now atkselection returns a boolean for add_selection, clear_selection
and remove_selection to indiate if the operation was successful or not.
Diffstat (limited to 'atk/atkselection.c')
-rwxr-xr-xatk/atkselection.c36
1 files changed, 24 insertions, 12 deletions
diff --git a/atk/atkselection.c b/atk/atkselection.c
index fa5a946..4532ff4 100755
--- a/atk/atkselection.c
+++ b/atk/atkselection.c
@@ -46,20 +46,24 @@ atk_selection_get_type ()
*
* Adds the specified accessible child of the object to the
* object's selection.
+ *
+ * Returns: TRUE if success, FALSE otherwise.
**/
-void
+gboolean
atk_selection_add_selection (AtkSelection *obj,
gint i)
{
AtkSelectionIface *iface;
- g_return_if_fail (obj != NULL);
- g_return_if_fail (ATK_IS_SELECTION (obj));
+ g_return_val_if_fail (obj != NULL, FALSE);
+ g_return_val_if_fail (ATK_IS_SELECTION (obj), FALSE);
iface = ATK_SELECTION_GET_IFACE (obj);
if (iface->add_selection)
- (iface->add_selection) (obj, i);
+ return (iface->add_selection) (obj, i);
+ else
+ return FALSE;
}
/**
@@ -68,19 +72,23 @@ atk_selection_add_selection (AtkSelection *obj,
*
* Clears the selection in the object so that no children in the object
* are selected.
+ *
+ * Returns: TRUE if success, FALSE otherwise.
**/
-void
+gboolean
atk_selection_clear_selection (AtkSelection *obj)
{
AtkSelectionIface *iface;
- g_return_if_fail (obj != NULL);
- g_return_if_fail (ATK_IS_SELECTION (obj));
+ g_return_val_if_fail (obj != NULL, FALSE);
+ g_return_val_if_fail (ATK_IS_SELECTION (obj), FALSE);
iface = ATK_SELECTION_GET_IFACE (obj);
if (iface->clear_selection)
- (iface->clear_selection) (obj);
+ return (iface->clear_selection) (obj);
+ else
+ return FALSE;
}
/**
@@ -181,20 +189,24 @@ atk_selection_is_child_selected (AtkSelection *obj,
* @i: a #gint specifying an accessible child of @selection
*
* Removes the specified child of the object from the object's selection.
+ *
+ * Returns: TRUE if success, FALSE otherwise.
**/
-void
+gboolean
atk_selection_remove_selection (AtkSelection *obj,
gint i)
{
AtkSelectionIface *iface;
- g_return_if_fail (obj != NULL);
- g_return_if_fail (ATK_IS_SELECTION (obj));
+ g_return_val_if_fail (obj != NULL, FALSE);
+ g_return_val_if_fail (ATK_IS_SELECTION (obj), FALSE);
iface = ATK_SELECTION_GET_IFACE (obj);
if (iface->remove_selection)
- (iface->remove_selection) (obj, i);
+ return (iface->remove_selection) (obj, i);
+ else
+ return FALSE;
}
/**