Add atk-bridge
[platform/core/uifw/at-spi2-atk.git] / cspi / spi_selection.c
index 9362b9a..910e9c8 100644 (file)
@@ -2,7 +2,8 @@
  * AT-SPI - Assistive Technology Service Provider Interface
  * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap)
  *
- * Copyright 2001 Sun Microsystems Inc.
+ * Copyright 2001, 2002 Sun Microsystems Inc.,
+ * Copyright 2001, 2002 Ximian, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -102,9 +103,9 @@ AccessibleSelection_getSelectedChild (AccessibleSelection *obj,
   
   child = Accessibility_Selection_getSelectedChild (
     CSPI_OBJREF (obj),
-    (CORBA_long) selectedChildIndex, cspi_ev ());
+    selectedChildIndex, cspi_ev ());
 
-  return (Accessible *) cspi_object_add (child);
+  return  cspi_object_add (child);
 }
 
 /**
@@ -130,7 +131,7 @@ AccessibleSelection_selectChild (AccessibleSelection *obj,
 
   retval =
     Accessibility_Selection_selectChild (CSPI_OBJREF (obj),
-                                        (CORBA_long) childIndex, cspi_ev ());
+                                        childIndex, cspi_ev ());
 
   cspi_return_val_if_ev ("selectChild", FALSE);
 
@@ -160,7 +161,7 @@ AccessibleSelection_deselectSelectedChild (AccessibleSelection *obj,
   cspi_return_val_if_fail (obj != NULL, FALSE);
 
   retval = Accessibility_Selection_deselectSelectedChild (
-    CSPI_OBJREF (obj), (CORBA_long) selectedChildIndex, cspi_ev ());
+    CSPI_OBJREF (obj), selectedChildIndex, cspi_ev ());
 
   cspi_return_val_if_ev ("deselectSelectedChild", FALSE);
 
@@ -168,6 +169,38 @@ AccessibleSelection_deselectSelectedChild (AccessibleSelection *obj,
 }
 
 /**
+ * AccessibleSelection_deselectChild:
+ * @obj: a pointer to the #AccessibleSelection on which to operate.
+ * @childIndex: a #long indicating which of the children
+ *              of the #Accessible is to be de-selected.
+ *
+ * Deselect a specific child of an #AccessibleSelection.
+ *          Note that @childIndex is the index of the child
+ *          in the parent container.
+ * 
+ * See #AccessibleSelection_deselectSelectedChild
+ *
+ * Since AT-SPI 1.8.0
+ * 
+ * Returns: #TRUE if the child was successfully deselected, #FALSE otherwise.
+ **/
+SPIBoolean
+AccessibleSelection_deselectChild (AccessibleSelection *obj,
+                                  long int childIndex)
+{
+  SPIBoolean retval;
+
+  cspi_return_val_if_fail (obj != NULL, FALSE);
+
+  retval = Accessibility_Selection_deselectChild (
+    CSPI_OBJREF (obj), childIndex, cspi_ev ());
+
+  cspi_return_val_if_ev ("deselectChild", FALSE);
+
+  return retval;
+}
+
+/**
  * AccessibleSelection_isChildSelected:
  * @obj: a pointer to the #AccessibleSelection implementor on which to operate.
  * @childIndex: an index into the #AccessibleSelection's list of children.
@@ -189,11 +222,11 @@ AccessibleSelection_isChildSelected (AccessibleSelection *obj,
 
   retval = Accessibility_Selection_isChildSelected (
     CSPI_OBJREF (obj),
-    (CORBA_long) childIndex, cspi_ev ());
+    childIndex, cspi_ev ());
 
   cspi_return_val_if_ev ("isChildSelected", FALSE);
 
-  return (SPIBoolean) retval;
+  return retval;
 }
 
 /**