2 * AT-SPI - Assistive Technology Service Provider Interface
3 * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap)
5 * Copyright 2001 Sun Microsystems Inc.
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details.
17 * You should have received a copy of the GNU Library General Public
18 * License along with this library; if not, write to the
19 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 * Boston, MA 02111-1307, USA.
23 #include <cspi/spi-private.h>
26 * AccessibleHypertext_ref:
27 * @obj: a pointer to the #AccessibleHypertext object on which to operate.
29 * Increment the reference count for an #AccessibleHypertext object.
30 * Since AccessibleHypertext is derived from AccessibleText,
31 * this is the same as AccessibleText_unref().
34 AccessibleHypertext_ref (AccessibleHypertext *obj)
36 cspi_object_ref (obj);
40 * AccessibleHypertext_unref:
41 * @obj: a pointer to the #AccessibleHypertext object on which to operate.
43 * Decrement the reference count for an #AccessibleHypertext object.
44 * Since AccessibleHypertext is derived from AccessibleText,
45 * this is the same as AccessibleText_unref().
48 AccessibleHypertext_unref (AccessibleHypertext *obj)
50 cspi_object_unref (obj);
54 * AccessibleHypertext_getNLinks:
55 * @obj: a pointer to the #AccessibleHypertext implementor on which to operate.
57 * Get the total number of #AccessibleHyperlinks which an
58 * #AccessibleHypertext implementor has.
60 * Returns: a #long indicating the number of #AccessibleHyperlinks
61 * of the #AccessibleHypertext implementor, or -1 if
62 * the number cannot be determined (for example, if the
63 * #AccessibleHypertext object is so large that it is not
64 * all currently in the memory cache).
67 AccessibleHypertext_getNLinks (AccessibleHypertext *obj)
71 cspi_return_val_if_fail (obj != NULL, FALSE);
74 Accessibility_Hypertext_getNLinks (CSPI_OBJREF (obj), cspi_ev ());
76 cspi_return_val_if_ev ("getNLinks", -1);
82 * AccessibleHypertext_getLink:
83 * @obj: a pointer to the #AccessibleHypertext implementor on which to operate.
84 * @linkIndex: a (zero-index) long integer indicating which hyperlink to query.
86 * Get the #AccessibleHyperlink object at a specified index.
88 * Returns: the #AccessibleHyperlink object specified by #linkIndex.
91 AccessibleHypertext_getLink (AccessibleHypertext *obj,
94 AccessibleHyperlink *retval;
96 cspi_return_val_if_fail (obj != NULL, FALSE);
98 retval = cspi_object_add (
99 Accessibility_Hypertext_getLink (CSPI_OBJREF (obj),
100 (CORBA_long) linkIndex,
103 cspi_return_val_if_ev ("getLink", NULL);
109 * AccessibleHypertext_getLinkIndex:
110 * @obj: a pointer to the #AccessibleHypertext implementor on which to operate.
111 * @characterOffset: an integer specifying the character offset to query.
113 * Get the index of the #AccessibleHyperlink object at a specified
116 * Returns: the linkIndex of the #AccessibleHyperlink active at
117 * character offset @characterOffset, or -1 if there is
118 * no hyperlink at the specified character offset.
121 AccessibleHypertext_getLinkIndex (AccessibleHypertext *obj,
122 long int characterOffset)
126 cspi_return_val_if_fail (obj != NULL, -1);
129 Accessibility_Hypertext_getLinkIndex (CSPI_OBJREF (obj),
130 (CORBA_long) characterOffset,
133 cspi_return_val_if_ev ("getLinkIndex", -1);