Added boolean return types for methods in Component, Selection,
[platform/core/uifw/at-spi2-atk.git] / cspi / spi_selection.c
index e8c4e0c..9c52e38 100644 (file)
@@ -6,8 +6,6 @@
  *
  * Increment the reference count for an #AccessibleSelection object.
  *
- * Returns: (no return code implemented yet).
- *
  **/
 void
 AccessibleSelection_ref (AccessibleSelection *obj)
@@ -21,8 +19,6 @@ AccessibleSelection_ref (AccessibleSelection *obj)
  *
  * Decrement the reference count for an #Accessible object.
  *
- * Returns: (no return code implemented yet).
- *
  **/
 void
 AccessibleSelection_unref (AccessibleSelection *obj)
@@ -191,13 +187,15 @@ AccessibleSelection_isChildSelected (AccessibleSelection *obj,
 SPIBoolean
 AccessibleSelection_selectAll (AccessibleSelection *obj)
 {
+  SPIBoolean retval;
+  
   cspi_return_val_if_fail (obj != NULL, FALSE);
 
-  Accessibility_Selection_selectAll (CSPI_OBJREF (obj), cspi_ev ());
+  retval = Accessibility_Selection_selectAll (CSPI_OBJREF (obj), cspi_ev ());
 
-  cspi_check_ev ("selectAll");
+  cspi_return_val_if_ev ("selectAll", FALSE);
 
-  return TRUE; /* TODO: change the bonobo method to return SPIBoolean */
+  return retval;
 }
 
 /**
@@ -206,14 +204,21 @@ AccessibleSelection_selectAll (AccessibleSelection *obj)
  *
  * Clear the current selection, removing all selected children from the
  *       specified #AccessibleSelection implementor's selection list.
+ *
+ * Returns: #TRUE if successful, #FALSE otherwise.
+ *
  **/
-void
+SPIBoolean
 AccessibleSelection_clearSelection (AccessibleSelection *obj)
 {
-  cspi_return_if_fail (obj != NULL);
+  SPIBoolean retval;
+  
+  cspi_return_val_if_fail (obj != NULL, FALSE);
+
+  retval = Accessibility_Selection_clearSelection (CSPI_OBJREF (obj), cspi_ev ());
+  cspi_return_val_if_ev ("clearSelection", FALSE);
 
-  Accessibility_Selection_clearSelection (CSPI_OBJREF (obj), cspi_ev ());
-  cspi_check_ev ("clearSelection");
+  return retval;
 }