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_TABLE_H__
21#define __ATK_TABLE_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/atkobject.h>
28
29G_BEGIN_DECLS
30
31#define ATK_TYPE_TABLE (atk_table_get_type ())
32#define ATK_IS_TABLE(obj) G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATK_TYPE_TABLE)
33#define ATK_TABLE(obj) G_TYPE_CHECK_INSTANCE_CAST ((obj), ATK_TYPE_TABLE, AtkTable)
34#define ATK_TABLE_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), ATK_TYPE_TABLE, AtkTableIface))
35
36#ifndef _TYPEDEF_ATK_TABLE_
37#define _TYPEDEF_ATK_TABLE_
38typedef struct _AtkTable AtkTable;
39#endif
40typedef struct _AtkTableIface AtkTableIface;
41
42struct _AtkTableIface
43{
44 GTypeInterface parent;
45
46 AtkObject* (* ref_at) (AtkTable *table,
47 gint row,
48 gint column);
49 gint (* get_index_at) (AtkTable *table,
50 gint row,
51 gint column);
52 gint (* get_column_at_index) (AtkTable *table,
53 gint index_);
54 gint (* get_row_at_index) (AtkTable *table,
55 gint index_);
56 gint (* get_n_columns) (AtkTable *table);
57 gint (* get_n_rows) (AtkTable *table);
58 gint (* get_column_extent_at) (AtkTable *table,
59 gint row,
60 gint column);
61 gint (* get_row_extent_at) (AtkTable *table,
62 gint row,
63 gint column);
64 AtkObject*
65 (* get_caption) (AtkTable *table);
66 const gchar* (* get_column_description) (AtkTable *table,
67 gint column);
68 AtkObject* (* get_column_header) (AtkTable *table,
69 gint column);
70 const gchar* (* get_row_description) (AtkTable *table,
71 gint row);
72 AtkObject* (* get_row_header) (AtkTable *table,
73 gint row);
74 AtkObject* (* get_summary) (AtkTable *table);
75 void (* set_caption) (AtkTable *table,
76 AtkObject *caption);
77 void (* set_column_description) (AtkTable *table,
78 gint column,
79 const gchar *description);
80 void (* set_column_header) (AtkTable *table,
81 gint column,
82 AtkObject *header);
83 void (* set_row_description) (AtkTable *table,
84 gint row,
85 const gchar *description);
86 void (* set_row_header) (AtkTable *table,
87 gint row,
88 AtkObject *header);
89 void (* set_summary) (AtkTable *table,
90 AtkObject *accessible);
91 gint (* get_selected_columns) (AtkTable *table,
92 gint **selected);
93 gint (* get_selected_rows) (AtkTable *table,
94 gint **selected);
95 gboolean (* is_column_selected) (AtkTable *table,
96 gint column);
97 gboolean (* is_row_selected) (AtkTable *table,
98 gint row);
99 gboolean (* is_selected) (AtkTable *table,
100 gint row,
101 gint column);
102 gboolean (* add_row_selection) (AtkTable *table,
103 gint row);
104 gboolean (* remove_row_selection) (AtkTable *table,
105 gint row);
106 gboolean (* add_column_selection) (AtkTable *table,
107 gint column);
108 gboolean (* remove_column_selection) (AtkTable *table,
109 gint column);
110
111 /*
112 * signal handlers
113 */
114 void (* row_inserted) (AtkTable *table,
115 gint row,
116 gint num_inserted);
117 void (* column_inserted) (AtkTable *table,
118 gint column,
119 gint num_inserted);
120 void (* row_deleted) (AtkTable *table,
121 gint row,
122 gint num_deleted);
123 void (* column_deleted) (AtkTable *table,
124 gint column,
125 gint num_deleted);
126 void (* row_reordered) (AtkTable *table);
127 void (* column_reordered) (AtkTable *table);
128 void (* model_changed) (AtkTable *table);
129};
130
131ATK_AVAILABLE_IN_ALL
132GType atk_table_get_type (void);
133
134ATK_AVAILABLE_IN_ALL
135AtkObject* atk_table_ref_at (AtkTable *table,
136 gint row,
137 gint column);
138ATK_DEPRECATED_IN_2_12_FOR(atk_table_ref_at)
139gint atk_table_get_index_at (AtkTable *table,
140 gint row,
141 gint column);
142ATK_DEPRECATED_IN_2_12
143gint atk_table_get_column_at_index (AtkTable *table,
144 gint index_);
145ATK_DEPRECATED_IN_2_12
146gint atk_table_get_row_at_index (AtkTable *table,
147 gint index_);
148ATK_AVAILABLE_IN_ALL
149gint atk_table_get_n_columns (AtkTable *table);
150ATK_AVAILABLE_IN_ALL
151gint atk_table_get_n_rows (AtkTable *table);
152ATK_AVAILABLE_IN_ALL
153gint atk_table_get_column_extent_at (AtkTable *table,
154 gint row,
155 gint column);
156ATK_AVAILABLE_IN_ALL
157gint atk_table_get_row_extent_at (AtkTable *table,
158 gint row,
159 gint column);
160ATK_AVAILABLE_IN_ALL
161AtkObject*
162 atk_table_get_caption (AtkTable *table);
163ATK_AVAILABLE_IN_ALL
164const gchar* atk_table_get_column_description
165 (AtkTable *table,
166 gint column);
167ATK_AVAILABLE_IN_ALL
168AtkObject* atk_table_get_column_header (AtkTable *table,
169 gint column);
170ATK_AVAILABLE_IN_ALL
171const gchar* atk_table_get_row_description (AtkTable *table,
172 gint row);
173ATK_AVAILABLE_IN_ALL
174AtkObject* atk_table_get_row_header (AtkTable *table,
175 gint row);
176ATK_AVAILABLE_IN_ALL
177AtkObject* atk_table_get_summary (AtkTable *table);
178ATK_AVAILABLE_IN_ALL
179void atk_table_set_caption (AtkTable *table,
180 AtkObject *caption);
181ATK_AVAILABLE_IN_ALL
182void atk_table_set_column_description
183 (AtkTable *table,
184 gint column,
185 const gchar *description);
186ATK_AVAILABLE_IN_ALL
187void atk_table_set_column_header (AtkTable *table,
188 gint column,
189 AtkObject *header);
190ATK_AVAILABLE_IN_ALL
191void atk_table_set_row_description (AtkTable *table,
192 gint row,
193 const gchar *description);
194ATK_AVAILABLE_IN_ALL
195void atk_table_set_row_header (AtkTable *table,
196 gint row,
197 AtkObject *header);
198ATK_AVAILABLE_IN_ALL
199void atk_table_set_summary (AtkTable *table,
200 AtkObject *accessible);
201ATK_AVAILABLE_IN_ALL
202gint atk_table_get_selected_columns (AtkTable *table,
203 gint **selected);
204ATK_AVAILABLE_IN_ALL
205gint atk_table_get_selected_rows (AtkTable *table,
206 gint **selected);
207ATK_AVAILABLE_IN_ALL
208gboolean atk_table_is_column_selected (AtkTable *table,
209 gint column);
210ATK_AVAILABLE_IN_ALL
211gboolean atk_table_is_row_selected (AtkTable *table,
212 gint row);
213ATK_AVAILABLE_IN_ALL
214gboolean atk_table_is_selected (AtkTable *table,
215 gint row,
216 gint column);
217ATK_AVAILABLE_IN_ALL
218gboolean atk_table_add_row_selection (AtkTable *table,
219 gint row);
220ATK_AVAILABLE_IN_ALL
221gboolean atk_table_remove_row_selection (AtkTable *table,
222 gint row);
223ATK_AVAILABLE_IN_ALL
224gboolean atk_table_add_column_selection (AtkTable *table,
225 gint column);
226ATK_AVAILABLE_IN_ALL
227gboolean atk_table_remove_column_selection
228 (AtkTable *table,
229 gint column);
230
231G_END_DECLS
232
233#endif /* __ATK_TABLE_H__ */
234

source code of include/atk-1.0/atk/atktable.h