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 Lesser 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 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser 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.
25 static GType type = 0;
30 sizeof (AtkTableIface),
36 type = g_type_register_static (G_TYPE_INTERFACE, "AtkTable", &tinfo, 0);
44 * @obj: a GObject instance that implements AtkTableIface
45 * return values: a AtkObject* representing the referred to accessible
47 * Get a reference to the table cell at #row, #column
51 atk_table_ref_at (AtkTable *obj,
57 g_return_val_if_fail (obj != NULL, NULL);
58 g_return_val_if_fail (ATK_IS_TABLE (obj), NULL);
60 iface = ATK_TABLE_GET_IFACE (obj);
63 return (iface->ref_at) (obj, row, column);
69 * atk_table_get_index_at:
70 * @value: a GObject instance that implements AtkTableIface
71 * @return: a gint representing the index at specified position, or 0
72 * if value does not implement this interface.
74 * WARNING: callers should not rely on %NULL or on a zero value for
75 * indication of whether AtkSelectionIface is implemented, they should
76 * use type checking/interface checking macros or the
77 * atk_get_accessible_table() convenience method.
80 atk_table_get_index_at (AtkTable *obj,
86 g_return_val_if_fail (obj != NULL, 0);
87 g_return_val_if_fail (ATK_IS_TABLE (obj), 0);
89 iface = ATK_TABLE_GET_IFACE (obj);
91 if (iface->get_index_at)
92 return (iface->get_index_at) (obj, row, column);
98 * atk_table_get_row_at_index:
99 * @value: a GObject instance that implements AtkTableInterface
100 * @return: a gint representing the row at the specified index, or 0
101 * if value does not implement this interface.
103 * WARNING: callers should not rely on %NULL or on a zero value for
104 * indication of whether AtkSelectionIface is implemented, they should
105 * use type checking/interface checking macros or the
106 * atk_get_accessible_table() convenience method.
109 atk_table_get_row_at_index (AtkTable *obj,
112 AtkTableIface *iface;
114 g_return_val_if_fail (obj != NULL, 0);
115 g_return_val_if_fail (ATK_IS_TABLE (obj), 0);
117 iface = ATK_TABLE_GET_IFACE (obj);
119 if (iface->get_row_at_index)
120 return (iface->get_row_at_index) (obj, index);
126 * atk_table_get_column_at_index:
127 * @value: a GObject instance that implements AtkTableInterface
128 * @return: a gint representing the column at the specified index, or 0
129 * if value does not implement this interface.
131 * WARNING: callers should not rely on %NULL or on a zero value for
132 * indication of whether AtkSelectionIface is implemented, they should
133 * use type checking/interface checking macros or the
134 * atk_get_accessible_table() convenience method.
137 atk_table_get_column_at_index (AtkTable *obj,
140 AtkTableIface *iface;
142 g_return_val_if_fail (obj != NULL, 0);
143 g_return_val_if_fail (ATK_IS_TABLE (obj), 0);
145 iface = ATK_TABLE_GET_IFACE (obj);
147 if (iface->get_column_at_index)
148 return (iface->get_column_at_index) (obj, index);
154 * atk_table_get_caption:
155 * @value: a GObject instance that implements AtkTableInterface
156 * @return: a AtkObject* representing the table caption, or NULL
157 * if value does not implement this interface.
159 * WARNING: callers should not rely on %NULL or on a zero value for
160 * indication of whether AtkSelectionIface is implemented, they should
161 * use type checking/interface checking macros or the
162 * atk_get_accessible_table() convenience method.
165 atk_table_get_caption (AtkTable *obj)
167 AtkTableIface *iface;
169 g_return_val_if_fail (obj != NULL, NULL);
170 g_return_val_if_fail (ATK_IS_TABLE (obj), NULL);
172 iface = ATK_TABLE_GET_IFACE (obj);
174 if (iface->get_caption)
175 return (iface->get_caption) (obj);
181 * atk_table_get_n_columns:
182 * @value: a GObject instance that implements AtkTableIface
183 * @return: a gint representing the number of columns, or 0
184 * if value does not implement this interface.
186 * WARNING: callers should not rely on %NULL or on a zero value for
187 * indication of whether AtkSelectionIface is implemented, they should
188 * use type checking/interface checking macros or the
189 * atk_get_accessible_table() convenience method.
192 atk_table_get_n_columns (AtkTable *obj)
194 AtkTableIface *iface;
196 g_return_val_if_fail (obj != NULL, 0);
197 g_return_val_if_fail (ATK_IS_TABLE (obj), 0);
199 iface = ATK_TABLE_GET_IFACE (obj);
201 if (iface->get_n_columns)
202 return (iface->get_n_columns) (obj);
208 * atk_table_get_column_description:
209 * @value: a GObject instance that implements AtkTableIface
210 * @return: a AtkObject* representing the table description, or NULL
211 * if value does not implement this interface.
213 * WARNING: callers should not rely on %NULL or on a zero value for
214 * indication of whether AtkSelectionIface is implemented, they should
215 * use type checking/interface checking macros or the
216 * atk_get_accessible_table() convenience method.
219 atk_table_get_column_description (AtkTable *obj,
222 AtkTableIface *iface;
224 g_return_val_if_fail (obj != NULL, NULL);
225 g_return_val_if_fail (ATK_IS_TABLE (obj), NULL);
227 iface = ATK_TABLE_GET_IFACE (obj);
229 if (iface->get_column_description)
230 return (iface->get_column_description) (obj, column);
236 * atk_table_get_column_extent_at:
237 * @value: a GObject instance that implements AtkTableIface
238 * @return: a gint representing the column extent at specified position, or 0
239 * if value does not implement this interface.
241 * WARNING: callers should not rely on %NULL or on a zero value for
242 * indication of whether AtkSelectionIface is implemented, they should
243 * use type checking/interface checking macros or the
244 * atk_get_accessible_table() convenience method.
247 atk_table_get_column_extent_at (AtkTable *obj,
251 AtkTableIface *iface;
253 g_return_val_if_fail (obj != NULL, 0);
254 g_return_val_if_fail (ATK_IS_TABLE (obj), 0);
256 iface = ATK_TABLE_GET_IFACE (obj);
258 if (iface->get_column_extent_at)
259 return (iface->get_column_extent_at) (obj, row, column);
265 * atk_table_get_column_header:
266 * @value: a GObject instance that implements AtkTableIface
267 * @return: a AtkObject* representing the column headers, or NULL
268 * if value does not implement this interface.
270 * WARNING: callers should not rely on %NULL or on a zero value for
271 * indication of whether AtkSelectionIface is implemented, they should
272 * use type checking/interface checking macros or the
273 * atk_get_accessible_table() convenience method.
276 atk_table_get_column_header (AtkTable *obj)
278 AtkTableIface *iface;
280 g_return_val_if_fail (obj != NULL, NULL);
281 g_return_val_if_fail (ATK_IS_TABLE (obj), NULL);
283 iface = ATK_TABLE_GET_IFACE (obj);
285 if (iface->get_column_header)
286 return (iface->get_column_header) (obj);
292 * atk_table_get_n_rows:
293 * @value: a GObject instance that implements AtkTableIface
294 * @return: a gint representing the number of rows, or 0
295 * if value does not implement this interface.
297 * WARNING: callers should not rely on %NULL or on a zero value for
298 * indication of whether AtkSelectionIface is implemented, they should
299 * use type checking/interface checking macros or the
300 * atk_get_accessible_table() convenience method.
303 atk_table_get_n_rows (AtkTable *obj)
305 AtkTableIface *iface;
307 g_return_val_if_fail (obj != NULL, 0);
308 g_return_val_if_fail (ATK_IS_TABLE (obj), 0);
310 iface = ATK_TABLE_GET_IFACE (obj);
312 if (iface->get_n_rows)
313 return (iface->get_n_rows) (obj);
319 * atk_table_get_row_description:
320 * @value: a GObject instance that implements AtkTableIface
321 * @return: a AtkObject* representing the table description, or NULL
322 * if value does not implement this interface.
324 * WARNING: callers should not rely on %NULL or on a zero value for
325 * indication of whether AtkSelectionIface is implemented, they should
326 * use type checking/interface checking macros or the
327 * atk_get_accessible_table() convenience method.
330 atk_table_get_row_description (AtkTable *obj,
333 AtkTableIface *iface;
335 g_return_val_if_fail (obj != NULL, NULL);
336 g_return_val_if_fail (ATK_IS_TABLE (obj), NULL);
338 iface = ATK_TABLE_GET_IFACE (obj);
340 if (iface->get_row_description)
341 return (iface->get_row_description) (obj, row);
347 * atk_table_get_row_extent_at:
348 * @value: a GObject instance that implements AtkTableIface
349 * @return: a gint representing the row extent at specified position, or 0
350 * if value does not implement this interface.
352 * WARNING: callers should not rely on %NULL or on a zero value for
353 * indication of whether AtkSelectionIface is implemented, they should
354 * use type checking/interface checking macros or the
355 * atk_get_accessible_table() convenience method.
358 atk_table_get_row_extent_at (AtkTable *obj,
362 AtkTableIface *iface;
364 g_return_val_if_fail (obj != NULL, 0);
365 g_return_val_if_fail (ATK_IS_TABLE (obj), 0);
367 iface = ATK_TABLE_GET_IFACE (obj);
369 if (iface->get_row_extent_at)
370 return (iface->get_row_extent_at) (obj, row, column);
376 * atk_table_get_row_header:
377 * @value: a GObject instance that implements AtkTableIface
378 * @return: a AtkTable* representing the row headers, or NULL
379 * if value does not implement this interface.
381 * WARNING: callers should not rely on %NULL or on a zero value for
382 * indication of whether AtkSelectionIface is implemented, they should
383 * use type checking/interface checking macros or the
384 * atk_get_accessible_table() convenience method.
387 atk_table_get_row_header (AtkTable *obj)
389 AtkTableIface *iface;
391 g_return_val_if_fail (obj != NULL, NULL);
392 g_return_val_if_fail (ATK_IS_TABLE (obj), NULL);
394 iface = ATK_TABLE_GET_IFACE (obj);
396 if (iface->get_row_header)
397 return (iface->get_row_header) (obj);
403 * atk_table_get_summary:
404 * @value: a GObject instance that implements AtkTableIface
405 * @return: a AtkObject* representing a sumary description of the table,
406 * or NULL if value does not implement this interface.
408 * WARNING: callers should not rely on %NULL or on a zero value for
409 * indication of whether AtkSelectionIface is implemented, they should
410 * use type checking/interface checking macros or the
411 * atk_get_accessible_table() convenience method.
414 atk_table_get_summary (AtkTable *obj)
416 AtkTableIface *iface;
418 g_return_val_if_fail (obj != NULL, NULL);
419 g_return_val_if_fail (ATK_IS_TABLE (obj), NULL);
421 iface = ATK_TABLE_GET_IFACE (obj);
423 if (iface->get_summary)
424 return (iface->get_summary) (obj);
430 * atk_table_get_selected_rows:
431 * @value: a GObject instance that implements AtkTableIface
432 * @return: a gint* representing the selected rows,
433 * or NULL if value does not implement this interface.
435 * WARNING: callers should not rely on %NULL or on a zero value for
436 * indication of whether AtkSelectionIface is implemented, they should
437 * use type checking/interface checking macros or the
438 * atk_get_accessible_table() convenience method.
441 atk_table_get_selected_rows (AtkTable *obj)
443 AtkTableIface *iface;
445 g_return_val_if_fail (obj != NULL, NULL);
446 g_return_val_if_fail (ATK_IS_TABLE (obj), NULL);
448 iface = ATK_TABLE_GET_IFACE (obj);
450 if (iface->get_selected_rows)
451 return (iface->get_selected_rows) (obj);
457 * atk_table_get_selected_columns:
458 * @value: a GObject instance that implements AtkTableIface
459 * @return: a gint* representing the selected columns,
460 * or NULL if value does not implement this interface.
462 * WARNING: callers should not rely on %NULL or on a zero value for
463 * indication of whether AtkSelectionIface is implemented, they should
464 * use type checking/interface checking macros or the
465 * atk_get_accessible_table() convenience method.
468 atk_table_get_selected_columns (AtkTable *obj)
470 AtkTableIface *iface;
472 g_return_val_if_fail (obj != NULL, NULL);
473 g_return_val_if_fail (ATK_IS_TABLE (obj), NULL);
475 iface = ATK_TABLE_GET_IFACE (obj);
477 if (iface->get_selected_columns)
478 return (iface->get_selected_columns) (obj);
484 * atk_table_is_column_selected:
485 * @value: a GObject instance that implements AtkTableIface
486 * @return: a gboolean representing the column is selected, or 0
487 * if value does not implement this interface.
489 * WARNING: callers should not rely on %NULL or on a zero value for
490 * indication of whether AtkSelectionIface is implemented, they should
491 * use type checking/interface checking macros or the
492 * atk_get_accessible_table() convenience method.
495 atk_table_is_column_selected (AtkTable *obj,
498 AtkTableIface *iface;
500 g_return_val_if_fail (obj != NULL, FALSE);
501 g_return_val_if_fail (ATK_IS_TABLE (obj), FALSE);
503 iface = ATK_TABLE_GET_IFACE (obj);
505 if (iface->is_column_selected)
506 return (iface->is_column_selected) (obj, column);
512 * atk_table_is_row_selected:
513 * @value: a GObject instance that implements AtkTableIface
514 * @return: a gboolean representing the row is selected, or 0
515 * if value does not implement this interface.
517 * WARNING: callers should not rely on %NULL or on a zero value for
518 * indication of whether AtkSelectionIface is implemented, they should
519 * use type checking/interface checking macros or the
520 * atk_get_accessible_table() convenience method.
523 atk_table_is_row_selected (AtkTable *obj,
526 AtkTableIface *iface;
528 g_return_val_if_fail (obj != NULL, FALSE);
529 g_return_val_if_fail (ATK_IS_TABLE (obj), FALSE);
531 iface = ATK_TABLE_GET_IFACE (obj);
533 if (iface->is_row_selected)
534 return (iface->is_row_selected) (obj, row);
540 * atk_table_is_selected:
541 * @value: a GObject instance that implements AtkTableIface
542 * @return: a gboolean representing the cell is selected, or 0
543 * if value does not implement this interface.
545 * WARNING: callers should not rely on %NULL or on a zero value for
546 * indication of whether AtkSelectionIface is implemented, they should
547 * use type checking/interface checking macros or the
548 * atk_get_accessible_table() convenience method.
551 atk_table_is_selected (AtkTable *obj,
555 AtkTableIface *iface;
557 g_return_val_if_fail (obj != NULL, FALSE);
558 g_return_val_if_fail (ATK_IS_TABLE (obj), FALSE);
560 iface = ATK_TABLE_GET_IFACE (obj);
562 if (iface->is_selected)
563 return (iface->is_selected) (obj, row, column);
569 * atk_table_set_caption:
570 * @value: a GObject instance that implements AtkTableIface
574 atk_table_set_caption (AtkTable *obj,
575 AtkObject *accessible)
577 AtkTableIface *iface;
579 g_return_if_fail (obj != NULL);
580 g_return_if_fail (ATK_IS_TABLE (obj));
582 iface = ATK_TABLE_GET_IFACE (obj);
584 if (iface->set_caption)
585 (iface->set_caption) (obj, accessible);
589 * atk_table_set_column_description:
590 * @value: a GObject instance that implements AtkTableIface
594 atk_table_set_column_description (AtkTable *obj,
596 AtkObject *accessible)
598 AtkTableIface *iface;
600 g_return_if_fail (obj != NULL);
601 g_return_if_fail (ATK_IS_TABLE (obj));
603 iface = ATK_TABLE_GET_IFACE (obj);
605 if (iface->set_column_description)
606 (iface->set_column_description) (obj, column, accessible);
610 * atk_table_set_column_header:
611 * @value: a GObject instance that implements AtkTableIface
615 atk_table_set_column_header (AtkTable *obj,
619 AtkTableIface *iface;
621 g_return_if_fail (obj != NULL);
622 g_return_if_fail (ATK_IS_TABLE (obj));
624 iface = ATK_TABLE_GET_IFACE (obj);
626 if (iface->set_column_header)
627 (iface->set_column_header) (obj, column, header);
631 * atk_table_set_row_description:
632 * @value: a GObject instance that implements AtkTableIface
636 atk_table_set_row_description (AtkTable *obj,
638 AtkObject *accessible)
640 AtkTableIface *iface;
642 g_return_if_fail (obj != NULL);
643 g_return_if_fail (ATK_IS_TABLE (obj));
645 iface = ATK_TABLE_GET_IFACE (obj);
647 if (iface->set_row_description)
648 (iface->set_row_description) (obj, row, accessible);
652 * atk_table_set_row_header:
653 * @value: a GObject instance that implements AtkTableIface
657 atk_table_set_row_header (AtkTable *obj,
661 AtkTableIface *iface;
663 g_return_if_fail (obj != NULL);
664 g_return_if_fail (ATK_IS_TABLE (obj));
666 iface = ATK_TABLE_GET_IFACE (obj);
668 if (iface->set_row_header)
669 (iface->set_row_header) (obj, row, header);
673 * atk_table_set_summary:
674 * @value: a GObject instance that implements AtkTableIface
678 atk_table_set_summary (AtkTable *obj,
679 AtkObject *accessible)
681 AtkTableIface *iface;
683 g_return_if_fail (obj != NULL);
684 g_return_if_fail (ATK_IS_TABLE (obj));
686 iface = ATK_TABLE_GET_IFACE (obj);
688 if (iface->set_summary)
689 (iface->set_summary) (obj, accessible);