X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=cspi%2Fspi_selection.c;h=5268ff4a98afb07843fff0da50272ac28c592682;hb=74ba76b61acb398d6f10065e3166b5e6f50a3bc0;hp=e8c4e0cbfc9c47c121edea13f4d495377794f417;hpb=d35cd400a36b0f1393c17ce47015bf753327ccae;p=platform%2Fcore%2Fuifw%2Fat-spi2-atk.git diff --git a/cspi/spi_selection.c b/cspi/spi_selection.c index e8c4e0c..5268ff4 100644 --- a/cspi/spi_selection.c +++ b/cspi/spi_selection.c @@ -1,3 +1,26 @@ +/* + * AT-SPI - Assistive Technology Service Provider Interface + * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap) + * + * 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 + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + #include /** @@ -6,8 +29,6 @@ * * Increment the reference count for an #AccessibleSelection object. * - * Returns: (no return code implemented yet). - * **/ void AccessibleSelection_ref (AccessibleSelection *obj) @@ -21,8 +42,6 @@ AccessibleSelection_ref (AccessibleSelection *obj) * * Decrement the reference count for an #Accessible object. * - * Returns: (no return code implemented yet). - * **/ void AccessibleSelection_unref (AccessibleSelection *obj) @@ -84,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); } /** @@ -112,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); @@ -142,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); @@ -171,11 +190,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; } /** @@ -191,13 +210,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 +227,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); - Accessibility_Selection_clearSelection (CSPI_OBJREF (obj), cspi_ev ()); - cspi_check_ev ("clearSelection"); + retval = Accessibility_Selection_clearSelection (CSPI_OBJREF (obj), cspi_ev ()); + cspi_return_val_if_ev ("clearSelection", FALSE); + + return retval; }