X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=cspi%2Fspi_hypertext.c;h=35a64afd996ec667d933550c287caa1c0fe35385;hb=54e12e5a757d6eace45f45f08edaa778af6e0960;hp=e9be19830178e87d70e8dcb7512142025c631b24;hpb=ef25f6c6de6d39e1b4e4adc4ed9f6d639b04437d;p=platform%2Fcore%2Fuifw%2Fat-spi2-atk.git diff --git a/cspi/spi_hypertext.c b/cspi/spi_hypertext.c index e9be198..35a64af 100644 --- a/cspi/spi_hypertext.c +++ b/cspi/spi_hypertext.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 /** @@ -51,7 +74,7 @@ AccessibleHypertext_getNLinks (AccessibleHypertext *obj) retval = Accessibility_Hypertext_getNLinks (CSPI_OBJREF (obj), cspi_ev ()); - cspi_return_val_if_ex ("getNLinks", -1); + cspi_return_val_if_ev ("getNLinks", -1); return retval; } @@ -69,11 +92,18 @@ AccessibleHyperlink * AccessibleHypertext_getLink (AccessibleHypertext *obj, long int linkIndex) { - cspi_return_val_if_fail (obj != NULL, FALSE); + AccessibleHyperlink *retval; + + cspi_return_val_if_fail (obj != NULL, NULL); - return cspi_object_new ( + retval = cspi_object_add ( Accessibility_Hypertext_getLink (CSPI_OBJREF (obj), - (CORBA_long) linkIndex, cspi_ev ())); + linkIndex, + cspi_ev ())); + + cspi_return_val_if_ev ("getLink", NULL); + + return retval; } /** @@ -98,10 +128,10 @@ AccessibleHypertext_getLinkIndex (AccessibleHypertext *obj, retval = Accessibility_Hypertext_getLinkIndex (CSPI_OBJREF (obj), - (CORBA_long) characterOffset, + characterOffset, cspi_ev ()); - cspi_return_val_if_ex ("getLinkIndex", -1); + cspi_return_val_if_ev ("getLinkIndex", -1); return retval; }