Correct return value. Fixes bug #116621. Problem reported by Mario Lang.
[atk.git] / atk / atkhyperlink.h
blobf3c24e867f92962fa8d977a3a4d2c6e6a67fc1a9
1 /* ATK - Accessibility Toolkit
2 * Copyright 2001 Sun Microsystems Inc.
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
20 #ifndef __ATK_HYPERLINK_H__
21 #define __ATK_HYPERLINK_H__
23 #ifdef __cplusplus
24 extern "C" {
25 #endif /* __cplusplus */
27 #include <atk/atkaction.h>
30 * AtkHyperlink encapsulates a link or set of links in a hypertext document.
32 * It implements the AtkAction interface.
35 /**
36 *AtkHyperlinkStateFlags
37 *@ATK_HYPERLINK_IS_INLINE: Link is inline
39 *Describes the type of link
40 **/
41 typedef enum
43 ATK_HYPERLINK_IS_INLINE = 1 << 0
44 } AtkHyperlinkStateFlags;
46 #define ATK_TYPE_HYPERLINK (atk_hyperlink_get_type ())
47 #define ATK_HYPERLINK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ATK_TYPE_HYPERLINK, AtkHyperlink))
48 #define ATK_HYPERLINK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ATK_TYPE_HYPERLINK, AtkHyperlinkClass))
49 #define ATK_IS_HYPERLINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATK_TYPE_HYPERLINK))
50 #define ATK_IS_HYPERLINK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ATK_TYPE_HYPERLINK))
51 #define ATK_HYPERLINK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ATK_TYPE_HYPERLINK, AtkHyperlinkClass))
53 typedef struct _AtkHyperlink AtkHyperlink;
54 typedef struct _AtkHyperlinkClass AtkHyperlinkClass;
56 struct _AtkHyperlink
58 GObject parent;
61 struct _AtkHyperlinkClass
63 GObjectClass parent;
66 * Returns a string specifying the URI associated with the nth anchor
67 * of this link.
69 gchar* (* get_uri) (AtkHyperlink *link_,
70 gint i);
72 * Returns an object which represents the link action, as appropriate for
73 * that link.
75 AtkObject* (* get_object) (AtkHyperlink *link_,
76 gint i);
78 * Gets the index with the hypertext document at which this link ends
80 gint (* get_end_index) (AtkHyperlink *link_);
82 /*
83 * Gets the index with the hypertext document at which this link begins
85 gint (* get_start_index) (AtkHyperlink *link_);
88 * Since the document a link is associated with may have changed, this
89 * method returns whether or not this link is still valid (with respect
90 * to the document is references)
92 gboolean (* is_valid) (AtkHyperlink *link_);
94 /*
95 * Returns the number of anchors associated with this link
97 gint (* get_n_anchors) (AtkHyperlink *link_);
100 * Returns a set of bitflags which encode state information.
101 * Used by non-virtualized state query methods, not intended,
102 * for direct client use. It is virtualized, but clients should use
103 * atk_hyperlink_is_inline (), etc.
105 guint (* link_state) (AtkHyperlink *link_);
107 gboolean (* is_selected_link) (AtkHyperlink *link_);
108 AtkFunction pad1;
109 AtkFunction pad2;
112 GType atk_hyperlink_get_type (void);
114 gchar* atk_hyperlink_get_uri (AtkHyperlink *link_,
115 gint i);
117 AtkObject* atk_hyperlink_get_object (AtkHyperlink *link_,
118 gint i);
120 gint atk_hyperlink_get_end_index (AtkHyperlink *link_);
122 gint atk_hyperlink_get_start_index (AtkHyperlink *link_);
124 gboolean atk_hyperlink_is_valid (AtkHyperlink *link_);
126 gboolean atk_hyperlink_is_inline (AtkHyperlink *link_);
128 gint atk_hyperlink_get_n_anchors (AtkHyperlink *link_);
129 gboolean atk_hyperlink_is_selected_link (AtkHyperlink *link_);
132 #ifdef __cplusplus
134 #endif /* __cplusplus */
137 #endif /* __ATK_HYPERLINK_H__ */