atkhyperlink.h 4.06 KB
Newer Older
Bill Haneman's avatar
Bill Haneman committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* ATK -  Accessibility Toolkit
 * Copyright 2001 Sun Microsystems Inc.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
Piotr Drąg's avatar
Piotr Drąg committed
15
16
17
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.
Bill Haneman's avatar
Bill Haneman committed
18
19
 */

20
21
22
#ifndef __ATK_HYPERLINK_H__
#define __ATK_HYPERLINK_H__

23
24
25
26
#if defined(ATK_DISABLE_SINGLE_INCLUDES) && !defined (__ATK_H_INSIDE__) && !defined (ATK_COMPILATION)
#error "Only <atk/atk.h> can be included directly."
#endif

Bill Haneman's avatar
Bill Haneman committed
27
28
#include <atk/atkaction.h>

29
30
G_BEGIN_DECLS

Bill Haneman's avatar
Bill Haneman committed
31
/*
32
 * AtkHyperlink encapsulates a link or set of links in a hypertext document.
Bill Haneman's avatar
Bill Haneman committed
33
34
35
36
 *
 * It implements the AtkAction interface.
 */

37
/**
38
 *AtkHyperlinkStateFlags:
39
40
41
42
43
44
45
46
47
 *@ATK_HYPERLINK_IS_INLINE: Link is inline
 *
 *Describes the type of link
 **/ 
typedef enum 
{
  ATK_HYPERLINK_IS_INLINE = 1 << 0
} AtkHyperlinkStateFlags;

Bill Haneman's avatar
Bill Haneman committed
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#define ATK_TYPE_HYPERLINK                        (atk_hyperlink_get_type ())
#define ATK_HYPERLINK(obj)                        (G_TYPE_CHECK_INSTANCE_CAST ((obj), ATK_TYPE_HYPERLINK, AtkHyperlink))
#define ATK_HYPERLINK_CLASS(klass)                (G_TYPE_CHECK_CLASS_CAST ((klass), ATK_TYPE_HYPERLINK, AtkHyperlinkClass))
#define ATK_IS_HYPERLINK(obj)                     (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATK_TYPE_HYPERLINK))
#define ATK_IS_HYPERLINK_CLASS(klass)             (G_TYPE_CHECK_CLASS_TYPE ((klass), ATK_TYPE_HYPERLINK))
#define ATK_HYPERLINK_GET_CLASS(obj)              (G_TYPE_INSTANCE_GET_CLASS ((obj), ATK_TYPE_HYPERLINK, AtkHyperlinkClass))

typedef struct _AtkHyperlink                      AtkHyperlink;
typedef struct _AtkHyperlinkClass                 AtkHyperlinkClass;

struct _AtkHyperlink
{
  GObject parent;
};

struct _AtkHyperlinkClass
{
  GObjectClass parent;

67
  gchar*           (* get_uri)             (AtkHyperlink     *link_,
Bill Haneman's avatar
Bill Haneman committed
68
                                            gint             i);
69
  AtkObject*       (* get_object)          (AtkHyperlink     *link_,
Bill Haneman's avatar
Bill Haneman committed
70
                                            gint             i);
71
72
73
74
  gint             (* get_end_index)       (AtkHyperlink     *link_);
  gint             (* get_start_index)     (AtkHyperlink     *link_);
  gboolean         (* is_valid)            (AtkHyperlink     *link_);
  gint	           (* get_n_anchors)	   (AtkHyperlink     *link_);
75
  guint	           (* link_state)	   (AtkHyperlink     *link_);
76
  gboolean         (* is_selected_link)    (AtkHyperlink     *link_);
77
78
79

  /* Signals */
  void             ( *link_activated)      (AtkHyperlink     *link_);
80
  AtkFunction      pad1;
Bill Haneman's avatar
Bill Haneman committed
81
82
};

83
ATK_AVAILABLE_IN_ALL
Bill Haneman's avatar
Bill Haneman committed
84
85
GType            atk_hyperlink_get_type             (void);

86
ATK_AVAILABLE_IN_ALL
87
gchar*           atk_hyperlink_get_uri              (AtkHyperlink     *link_,
Bill Haneman's avatar
Bill Haneman committed
88
89
                                                     gint             i);

90
ATK_AVAILABLE_IN_ALL
91
AtkObject*       atk_hyperlink_get_object           (AtkHyperlink     *link_,
Bill Haneman's avatar
Bill Haneman committed
92
93
                                                     gint             i);

94
ATK_AVAILABLE_IN_ALL
95
gint             atk_hyperlink_get_end_index        (AtkHyperlink     *link_);
Bill Haneman's avatar
Bill Haneman committed
96

97
ATK_AVAILABLE_IN_ALL
98
gint             atk_hyperlink_get_start_index      (AtkHyperlink     *link_);
Bill Haneman's avatar
Bill Haneman committed
99

100
ATK_AVAILABLE_IN_ALL
101
gboolean         atk_hyperlink_is_valid             (AtkHyperlink     *link_);
Bill Haneman's avatar
Bill Haneman committed
102

103
ATK_AVAILABLE_IN_ALL
104
105
gboolean         atk_hyperlink_is_inline             (AtkHyperlink     *link_);

106
ATK_AVAILABLE_IN_ALL
107
gint		 atk_hyperlink_get_n_anchors        (AtkHyperlink     *link_);
108

109
ATK_DEPRECATED
110
gboolean         atk_hyperlink_is_selected_link     (AtkHyperlink     *link_);
111

112
G_END_DECLS
Bill Haneman's avatar
Bill Haneman committed
113
114

#endif /* __ATK_HYPERLINK_H__ */