diff options
author | Brian Cameron <bcameron@src.gnome.org> | 2001-06-15 13:20:49 +0000 |
---|---|---|
committer | Brian Cameron <bcameron@src.gnome.org> | 2001-06-15 13:20:49 +0000 |
commit | a992d1ec4bd948b359a63efc6d5e0358a1ceef26 (patch) | |
tree | 3bfc5939df8adea37f13f74c84f17b32fdc52298 /atk/atkselection.c | |
parent | 6176d7549c091b22dfcce88af6f6f8bf7eb048ff (diff) | |
download | atk-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-x | atk/atkselection.c | 36 |
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; } /** |