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.
7
* Copyright 2010, 2011 Novell, Inc.
9
* This library is free software; you can redistribute it and/or
10
* modify it under the terms of the GNU Library General Public
11
* License as published by the Free Software Foundation; either
12
* version 2 of the License, or (at your option) any later version.
14
* This library is distributed in the hope that it will be useful,
15
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17
* Library General Public License for more details.
19
* You should have received a copy of the GNU Library General Public
20
* License along with this library; if not, write to the
21
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
22
* Boston, MA 02111-1307, USA.
25
#include "atspi-private.h"
28
* atspi_hypertext_get_n_links:
29
* @obj: a pointer to the #AtspiHypertext implementor on which to operate.
31
* Gets the total number of #AtspiHyperlink objects that an
32
* #AtspiHypertext implementor has.
34
* Returns: a #gint indicating the number of #AtspiHyperlink objects
35
* of the #AtspiHypertext implementor, or -1 if
36
* the number cannot be determined (for example, if the
37
* #AtspiHypertext object is so large that it is not
38
* all currently in the memory cache).
41
atspi_hypertext_get_n_links (AtspiHypertext *obj, GError **error)
43
dbus_int32_t retval = 0;
45
g_return_val_if_fail (obj != NULL, FALSE);
47
_atspi_dbus_call (obj, atspi_interface_hypertext, "GetNLinks", error, "=>i", &retval);
53
* atspi_hypertext_get_link:
54
* @obj: a pointer to the #AtspiHypertext implementor on which to operate.
55
* @link_index: a (zero-index) #gint indicating which hyperlink to query.
57
* Gets the #AtspiHyperlink object at a specified index.
59
* Returns: (nullable) (transfer full): the #AtspiHyperlink object
60
* specified by @link_index.
63
atspi_hypertext_get_link (AtspiHypertext *obj, gint link_index, GError **error)
65
dbus_int32_t d_link_index = link_index;
68
g_return_val_if_fail (obj != NULL, NULL);
70
reply = _atspi_dbus_call_partial (obj, atspi_interface_hypertext, "GetLink", error, "i", d_link_index);
72
return _atspi_dbus_return_hyperlink_from_message (reply);
76
* atspi_hypertext_get_link_index:
77
* @obj: a pointer to the #AtspiHypertext implementor on which to operate.
78
* @character_offset: a #gint specifying the character offset to query.
80
* Gets the index of the #AtspiHyperlink object at a specified
83
* Returns: the linkIndex of the #AtspiHyperlink active at
84
* character offset @character_offset, or -1 if there is
85
* no hyperlink at the specified character offset.
88
atspi_hypertext_get_link_index (AtspiHypertext *obj,
89
gint character_offset,
92
dbus_int32_t d_character_offset = character_offset;
93
dbus_int32_t retval = -1;
95
g_return_val_if_fail (obj != NULL, -1);
97
_atspi_dbus_call (obj, atspi_interface_hypertext, "GetLinkIndex", error, "i=>i", d_character_offset, &retval);
103
atspi_hypertext_base_init (AtspiHypertext *klass)
108
atspi_hypertext_get_type (void)
110
static GType type = 0;
113
static const GTypeInfo tinfo =
115
sizeof (AtspiHypertext),
116
(GBaseInitFunc) atspi_hypertext_base_init,
117
(GBaseFinalizeFunc) NULL,
120
type = g_type_register_static (G_TYPE_INTERFACE, "AtspiHypertext", &tinfo, 0);