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 * AccessibleHyperlink_ref:
27 * @obj: a pointer to the #AccessibleHyperlink object on which to operate.
29 * Increment the reference count for an #AccessibleHyperlink object.
32 AccessibleHyperlink_ref (AccessibleHyperlink *obj)
34 cspi_object_ref (obj);
38 * AccessibleHyperlink_unref:
39 * @obj: a pointer to the #AccessibleHyperlink object on which to operate.
41 * Decrement the reference count for an #AccessibleHyperlink object.
44 AccessibleHyperlink_unref (AccessibleHyperlink *obj)
46 cspi_object_ref (obj);
50 * AccessibleHyperlink_getNAnchors:
51 * @obj: a pointer to the #AccessibleHyperlink object on which to operate.
53 * Get the total number of anchors which an #AccessibleHyperlink implementor has.
54 * Though typical hyperlinks have only one anchor, client-side image maps and
55 * other hypertext objects may potentially activate or refer to multiple
56 * URIs. For each anchor there is a corresponding URI and object.
57 * @see AccessibleHyperlink_getURI() and AccessibleHyperlink_getObject().
59 * Returns: a #long indicating the number of anchors in this hyperlink.
62 AccessibleHyperlink_getNAnchors (AccessibleHyperlink *obj)
66 cspi_return_val_if_fail (obj != NULL, -1);
69 Accessibility_Hyperlink__get_nAnchors (CSPI_OBJREF (obj), cspi_ev ());
71 cspi_return_val_if_ev ("getNAnchors", -1);
77 * AccessibleHyperlink_getURI:
78 * @obj: a pointer to the #AccessibleHyperlink implementor on which to operate.
79 * @i: a (zero-index) long integer indicating which hyperlink anchor to query.
81 * Get the URI associated with a particular hyperlink anchor.
83 * Returns: a UTF-8 string giving the URI of the @ith hyperlink anchor.
86 AccessibleHyperlink_getURI (AccessibleHyperlink *obj,
91 cspi_return_val_if_fail (obj != NULL, NULL);
94 Accessibility_Hyperlink_getURI (CSPI_OBJREF (obj),
97 cspi_return_val_if_ev ("getURI", NULL);
103 * AccessibleHyperlink_getObject:
104 * @obj: a pointer to the #AccessibleHyperlink implementor on which to operate.
105 * @i: a (zero-index) long integer indicating which hyperlink anchor to query.
107 * Get the object associated with a particular hyperlink anchor, as an #Accessible.
109 * Returns: an #Accessible that represents the object associated with the @ith anchor
110 * of the specified #AccessibleHyperlink.
113 AccessibleHyperlink_getObject (AccessibleHyperlink *obj,
116 cspi_return_val_if_fail (obj != NULL, NULL);
118 return cspi_object_add (
119 Accessibility_Hyperlink_getObject (CSPI_OBJREF (obj),
124 * AccessibleHyperlink_getIndexRange:
125 * @obj: a pointer to the #AccessibleHyperlink implementor on which to operate.
126 * @startIndex: a pointer to a long integer into which the starting
127 * offset of the text associated with this #AccessibleHyperlink is returned.
128 * @endIndex: a pointer to a long integer into which the offset of the first character
129 * after the text associated with this #AccessibleHyperlink is returned.
132 * Get the starting and ending character offsets of the text range associated with
133 * a #AccessibleHyperlink, in its originating #AccessibleHypertext.
136 AccessibleHyperlink_getIndexRange (AccessibleHyperlink *obj,
137 long int *startIndex,
142 cspi_return_if_fail (obj != NULL);
144 si = Accessibility_Hyperlink__get_startIndex (CSPI_OBJREF (obj), cspi_ev ());
145 cspi_return_if_ev ("startIndex");
146 ei = Accessibility_Hyperlink__get_endIndex (CSPI_OBJREF (obj), cspi_ev ());
148 cspi_return_if_ev ("endIndex");
154 * AccessibleHyperlink_isValid:
155 * @obj: a pointer to the #AccessibleHyperlink on which to operate.
157 * Tell whether an #AccessibleHyperlink object is still valid with respect to its
158 * originating hypertext object.
160 * Returns: #TRUE of the specified #AccessibleHyperlink is still valid with respect
161 * to its originating #AccessibleHypertext object, #FALSE otherwise.
164 AccessibleHyperlink_isValid (AccessibleHyperlink *obj)
168 cspi_return_val_if_fail (obj != NULL, FALSE);
171 Accessibility_Hyperlink_isValid (CSPI_OBJREF (obj), cspi_ev ());
173 cspi_return_val_if_ev ("isValid", FALSE);