Add function atk_object_real_set_role() and use it to implement
[atk.git] / atk / atktable.h
blobd229dc3916970b040d119022bc8be57a6b0295ea
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_TABLE_H__
21 #define __ATK_TABLE_H__
23 #include <atk/atkobject.h>
25 #ifdef __cplusplus
26 extern "C" {
27 #endif /* __cplusplus */
30 * AtkTable describes a user-interface component that presents data in
31 * two-dimensional table format.
35 #define ATK_TYPE_TABLE (atk_table_get_type ())
36 #define ATK_IS_TABLE(obj) G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATK_TYPE_TABLE)
37 #define ATK_TABLE(obj) G_TYPE_CHECK_INSTANCE_CAST ((obj), ATK_TYPE_TABLE, AtkTable)
38 #define ATK_TABLE_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), ATK_TYPE_TABLE, AtkTableIface))
40 #ifndef _TYPEDEF_ATK_TABLE_
41 #define _TYPEDEF_ATK_TABLE_
42 typedef struct _AtkTable AtkTable;
43 #endif
44 typedef struct _AtkTableIface AtkTableIface;
46 struct _AtkTableIface
48 GTypeInterface parent;
51 * Returns a reference to the accessible object at a specified row
52 * and column in the table.
54 AtkObject* (* ref_at) (AtkTable *table,
55 gint row,
56 gint column);
57 gint (* get_index_at) (AtkTable *table,
58 gint row,
59 gint column);
60 gint (* get_row_at_index) (AtkTable *table,
61 gint index);
62 gint (* get_column_at_index) (AtkTable *table,
63 gint index);
65 * Returns the caption for the table.
67 AtkObject* (* get_caption) (AtkTable *table);
69 * Returns the number of columns in the table.
71 gint (* get_n_columns) (AtkTable *table);
73 * Returns the description text of the specified column in the table
75 AtkObject* (* get_column_description) (AtkTable *table,
76 gint column);
78 * Returns the number of columns occupied by the accessible object
79 * at a specified row and column in the table.
81 gint (* get_column_extent_at) (AtkTable *table,
82 gint row,
83 gint column);
85 * Returns the column headers of an accessible table.
87 AtkTable* (* get_column_header) (AtkTable *table);
89 * Returns the number of rows in the table.
91 gint (* get_n_rows) (AtkTable *table);
93 * Returns the description text of the specified row in the table
95 AtkObject* (* get_row_description) (AtkTable *table,
96 gint row);
98 * Returns the number of rows occupied by the accessible object
99 * at a specified row and column in the table.
101 gint (* get_row_extent_at) (AtkTable *table,
102 gint row,
103 gint column);
105 * Returns the row headers of an accessible table.
107 AtkTable* (* get_row_header) (AtkTable *table);
109 * Returns the summary description of the table.
111 AtkObject* (* get_summary) (AtkTable *table);
113 * Returns the selected columns of the table.
115 gint* (* get_selected_columns) (AtkTable *table);
117 * Returns the selected rows of the table.
119 gint* (* get_selected_rows) (AtkTable *table);
121 * Returns a boolean value indicating whether the specified column
122 * is selected
124 gboolean (* is_column_selected) (AtkTable *table,
125 gint column);
127 * Returns a boolean value indicating whether the specified row
128 * is selected
130 gboolean (* is_row_selected) (AtkTable *table,
131 gint row);
133 * Returns a boolean value indicating whether the acessible object
134 * at the specified row and column is selected
136 gboolean (* is_selected) (AtkTable *table,
137 gint row,
138 gint column);
140 * Sets the caption for the table.
142 void (* set_caption) (AtkTable *table,
143 AtkObject *accessible);
145 * Sets the description text for the specified column of the table.
147 void (* set_column_description) (AtkTable *table,
148 gint column,
149 AtkObject *accessible);
151 * Sets the column headers
153 void (* set_column_header) (AtkTable *table,
154 gint column,
155 AtkTable *header);
157 * Sets the description text for the specified row of the table.
159 void (* set_row_description) (AtkTable *table,
160 gint row,
161 AtkObject *accessible);
163 * Sets the row headers
165 void (* set_row_header) (AtkTable *table,
166 gint row,
167 AtkTable *header);
169 * Sets the summary description of the table
171 void (* set_summary) (AtkTable *table,
172 AtkObject *accessible);
175 GType atk_table_get_type ();
177 AtkObject* atk_table_ref_at (AtkTable *table,
178 gint row,
179 gint column);
180 gint atk_table_get_index_at (AtkTable *table,
181 gint row,
182 gint column);
183 gint atk_table_get_row_at_index (AtkTable *table,
184 gint index);
185 gint atk_table_get_column_at_index (AtkTable *table,
186 gint index);
187 AtkObject* atk_table_get_caption (AtkTable *table);
188 gint atk_table_get_n_columns (AtkTable *table);
189 AtkObject* atk_table_get_column_description (AtkTable *table,
190 gint column);
191 gint atk_table_get_column_extent_at (AtkTable *table,
192 gint row,
193 gint column);
194 AtkTable* atk_table_get_column_header (AtkTable *table);
195 gint atk_table_get_n_rows (AtkTable *table);
196 AtkObject* atk_table_get_row_description (AtkTable *table,
197 gint r);
198 gint atk_table_get_row_extent_at (AtkTable *table,
199 gint row,
200 gint column);
201 AtkTable* atk_table_get_row_header (AtkTable *table);
202 AtkObject* atk_table_get_summary (AtkTable *table);
203 gint* atk_table_get_selected_columns (AtkTable *table);
204 gint* atk_table_get_selected_rows (AtkTable *table);
205 gboolean atk_table_is_column_selected (AtkTable *table,
206 gint column);
207 gboolean atk_table_is_row_selected (AtkTable *table,
208 gint row);
209 gboolean atk_table_is_selected (AtkTable *table,
210 gint row,
211 gint column);
212 void atk_table_set_caption (AtkTable *table,
213 AtkObject *accessible);
214 void atk_table_set_column_description (AtkTable *table,
215 gint column,
216 AtkObject *accessible);
217 void atk_table_set_column_header (AtkTable *table,
218 gint column,
219 AtkTable *header);
220 void atk_table_set_row_description (AtkTable *table,
221 gint row,
222 AtkObject *accessible);
223 void atk_table_set_row_header (AtkTable *table,
224 gint row,
225 AtkTable *header);
226 void atk_table_set_summary (AtkTable *table,
227 AtkObject *accessible);
229 #ifdef __cplusplus
231 #endif /* __cplusplus */
234 #endif /* __ATK_TABLE_H__ */