1/* ATK - Accessibility Toolkit
2 * Copyright 2001 Sun Microsystems Inc.
3 *
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.
8 *
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.
13 *
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.
18 */
19
20#ifndef __ATK_HYPERLINK_H__
21#define __ATK_HYPERLINK_H__
22
23#if defined(ATK_DISABLE_SINGLE_INCLUDES) && !defined (__ATK_H_INSIDE__) && !defined (ATK_COMPILATION)
24#error "Only <atk/atk.h> can be included directly."
25#endif
26
27#include <atk/atkaction.h>
28
29G_BEGIN_DECLS
30
31/*
32 * AtkHyperlink encapsulates a link or set of links in a hypertext document.
33 *
34 * It implements the AtkAction interface.
35 */
36
37/**
38 *AtkHyperlinkStateFlags:
39 *@ATK_HYPERLINK_IS_INLINE: Link is inline
40 *
41 *Describes the type of link
42 **/
43typedef enum
44{
45 ATK_HYPERLINK_IS_INLINE = 1 << 0
46} AtkHyperlinkStateFlags;
47
48#define ATK_TYPE_HYPERLINK (atk_hyperlink_get_type ())
49#define ATK_HYPERLINK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ATK_TYPE_HYPERLINK, AtkHyperlink))
50#define ATK_HYPERLINK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ATK_TYPE_HYPERLINK, AtkHyperlinkClass))
51#define ATK_IS_HYPERLINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATK_TYPE_HYPERLINK))
52#define ATK_IS_HYPERLINK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ATK_TYPE_HYPERLINK))
53#define ATK_HYPERLINK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ATK_TYPE_HYPERLINK, AtkHyperlinkClass))
54
55typedef struct _AtkHyperlink AtkHyperlink;
56typedef struct _AtkHyperlinkClass AtkHyperlinkClass;
57
58struct _AtkHyperlink
59{
60 GObject parent;
61};
62
63struct _AtkHyperlinkClass
64{
65 GObjectClass parent;
66
67 gchar* (* get_uri) (AtkHyperlink *link_,
68 gint i);
69 AtkObject* (* get_object) (AtkHyperlink *link_,
70 gint i);
71 gint (* get_end_index) (AtkHyperlink *link_);
72 gint (* get_start_index) (AtkHyperlink *link_);
73 gboolean (* is_valid) (AtkHyperlink *link_);
74 gint (* get_n_anchors) (AtkHyperlink *link_);
75 guint (* link_state) (AtkHyperlink *link_);
76 gboolean (* is_selected_link) (AtkHyperlink *link_);
77
78 /* Signals */
79 void ( *link_activated) (AtkHyperlink *link_);
80 AtkFunction pad1;
81};
82
83ATK_AVAILABLE_IN_ALL
84GType atk_hyperlink_get_type (void);
85
86ATK_AVAILABLE_IN_ALL
87gchar* atk_hyperlink_get_uri (AtkHyperlink *link_,
88 gint i);
89
90ATK_AVAILABLE_IN_ALL
91AtkObject* atk_hyperlink_get_object (AtkHyperlink *link_,
92 gint i);
93
94ATK_AVAILABLE_IN_ALL
95gint atk_hyperlink_get_end_index (AtkHyperlink *link_);
96
97ATK_AVAILABLE_IN_ALL
98gint atk_hyperlink_get_start_index (AtkHyperlink *link_);
99
100ATK_AVAILABLE_IN_ALL
101gboolean atk_hyperlink_is_valid (AtkHyperlink *link_);
102
103ATK_AVAILABLE_IN_ALL
104gboolean atk_hyperlink_is_inline (AtkHyperlink *link_);
105
106ATK_AVAILABLE_IN_ALL
107gint atk_hyperlink_get_n_anchors (AtkHyperlink *link_);
108
109ATK_DEPRECATED
110gboolean atk_hyperlink_is_selected_link (AtkHyperlink *link_);
111
112G_END_DECLS
113
114#endif /* __ATK_HYPERLINK_H__ */
115