+2001-06-15 Brian Cameron & Lucy Brophy <brian.cameron@sun.com>
+ * atk/atkselection.h atk/atkselection.c
+ Now add_selection, clear_selection, and remove_selection
+ return a boolean indicating SUCCESS/FAILURE to indicate
+ if the operation was successful.
+
2001-06-13 Brian Cameron & Lucy Brophy <brian.cameron@sun.com>
* atk/atktable.h atk/atktable.h
Updated so now the get_text_before|at|after functions
*
* 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;
}
/**
*
* 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;
}
/**
* @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;
}
/**
{
GTypeInterface parent;
- void (* add_selection) (AtkSelection *selection,
+ gboolean (* add_selection) (AtkSelection *selection,
gint i);
- void (* clear_selection) (AtkSelection *selection);
+ gboolean (* clear_selection) (AtkSelection *selection);
AtkObject* (* ref_selection) (AtkSelection *selection,
gint i);
gint (* get_selection_count) (AtkSelection *selection);
gboolean (* is_child_selected) (AtkSelection *selection,
gint i);
- void (* remove_selection) (AtkSelection *selection,
+ gboolean (* remove_selection) (AtkSelection *selection,
gint i);
void (* select_all_selection) (AtkSelection *selection);
};
GType atk_selection_get_type ();
-void atk_selection_add_selection (AtkSelection *selection,
+gboolean atk_selection_add_selection (AtkSelection *selection,
gint i);
-void atk_selection_clear_selection (AtkSelection *selection);
+gboolean atk_selection_clear_selection (AtkSelection *selection);
AtkObject* atk_selection_ref_selection (AtkSelection *selection,
gint i);
gboolean atk_selection_is_child_selected (AtkSelection *selection,
gint i);
-void atk_selection_remove_selection (AtkSelection *selection,
+gboolean atk_selection_remove_selection (AtkSelection *selection,
gint i);
void atk_selection_select_all_selection (AtkSelection *selection);