2 * AT-SPI - Assistive Technology Service Provider Interface
3 * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap)
5 * Copyright 2001, 2002 Sun Microsystems Inc.,
6 * Copyright 2001, 2002 Ximian, Inc.
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details.
18 * You should have received a copy of the GNU Library General Public
19 * License along with this library; if not, write to the
20 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21 * Boston, MA 02111-1307, USA.
24 #include <cspi/spi-private.h>
27 * AccessibleHypertext_ref:
28 * @obj: a pointer to the #AccessibleHypertext object on which to operate.
30 * Increment the reference count for an #AccessibleHypertext object.
31 * Since AccessibleHypertext is derived from AccessibleText,
32 * this is the same as AccessibleText_unref().
35 AccessibleHypertext_ref (AccessibleHypertext *obj)
37 cspi_object_ref (obj);
41 * AccessibleHypertext_unref:
42 * @obj: a pointer to the #AccessibleHypertext object on which to operate.
44 * Decrement the reference count for an #AccessibleHypertext object.
45 * Since AccessibleHypertext is derived from AccessibleText,
46 * this is the same as AccessibleText_unref().
49 AccessibleHypertext_unref (AccessibleHypertext *obj)
51 cspi_object_unref (obj);
55 * AccessibleHypertext_getNLinks:
56 * @obj: a pointer to the #AccessibleHypertext implementor on which to operate.
58 * Get the total number of #AccessibleHyperlinks which an
59 * #AccessibleHypertext implementor has.
61 * Returns: a #long indicating the number of #AccessibleHyperlinks
62 * of the #AccessibleHypertext implementor, or -1 if
63 * the number cannot be determined (for example, if the
64 * #AccessibleHypertext object is so large that it is not
65 * all currently in the memory cache).
68 AccessibleHypertext_getNLinks (AccessibleHypertext *obj)
72 cspi_return_val_if_fail (obj != NULL, FALSE);
74 cspi_dbus_call (obj, spi_interface_hypertext, "getNLinks", NULL, "=>i", &retval);
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 dbus_int32_t d_linkIndex = linkIndex;
96 AccessibleHyperlink *retval;
98 cspi_return_val_if_fail (obj != NULL, NULL);
100 cspi_dbus_call (obj, spi_interface_hypertext, "getLink", NULL, "i=>o", d_linkIndex, &path);
102 cspi_return_val_if_ev ("getLink", NULL);
104 retval = cspi_ref_related_accessible (obj, path);
111 * AccessibleHypertext_getLinkIndex:
112 * @obj: a pointer to the #AccessibleHypertext implementor on which to operate.
113 * @characterOffset: an integer specifying the character offset to query.
115 * Get the index of the #AccessibleHyperlink object at a specified
118 * Returns: the linkIndex of the #AccessibleHyperlink active at
119 * character offset @characterOffset, or -1 if there is
120 * no hyperlink at the specified character offset.
123 AccessibleHypertext_getLinkIndex (AccessibleHypertext *obj,
124 long int characterOffset)
126 dbus_int32_t d_characterOffset = characterOffset;
129 cspi_return_val_if_fail (obj != NULL, -1);
131 cspi_dbus_call (obj, spi_interface_hypertext, "getLinkIndex", NULL, "i=>i", d_characterOffset, &retval);
133 cspi_return_val_if_ev ("getLinkIndex", -1);