Added boolean return types for methods in Component, Selection,
[platform/core/uifw/at-spi2-atk.git] / cspi / spi_component.c
index 2d25593..cf43b7d 100644 (file)
@@ -11,9 +11,6 @@
  * @obj: a pointer to an object implementing #AccessibleComponent on which to operate.
  *
  * Increment the reference count for an #AccessibleComponent.
- *
- * Returns: (no return code implemented yet).
- *
  **/
 void
 AccessibleComponent_ref (AccessibleComponent *obj)
@@ -26,9 +23,6 @@ AccessibleComponent_ref (AccessibleComponent *obj)
  * @obj: a pointer to the object implementing #AccessibleComponent on which to operate.
  *
  * Decrement the reference count for an #AccessibleComponent.
- *
- * Returns: (no return code implemented yet).
- *
  **/
 void
 AccessibleComponent_unref (AccessibleComponent *obj)
@@ -279,8 +273,22 @@ AccessibleComponent_getMDIZOrder (AccessibleComponent *obj)
  *
  * Attempt to set the keyboard input focus to the specified
  *         #AccessibleComponent.
+ *
+ * Returns: #TRUE if successful, #FALSE otherwise.
+ *
  **/
-void
+SPIBoolean
 AccessibleComponent_grabFocus (AccessibleComponent *obj)
 {
+  short retval;
+
+  cspi_return_val_if_fail (obj != NULL, FALSE);
+
+  retval = Accessibility_Component_grabFocus (CSPI_OBJREF (obj),
+                                             cspi_ev ());
+
+  cspi_return_val_if_ev ("grabFocus", FALSE);
+
+  return retval;
 }
+