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 * @value: a GObject instance that implements AtkTableIface
45 * @return: a AtkObject* representing the referred to accessible , or NULL
46 * if value does not implement this interface.
48 * WARNING: callers should not rely on %NULL or on a zero value for
49 * indication of whether AtkSelectionIface is implemented, they should
50 * use type checking/interface checking macros or the
51 * atk_get_accessible_table() convenience method.
54 atk_table_ref_at (AtkTable *obj,
60 g_return_val_if_fail (obj != NULL, NULL);
61 g_return_val_if_fail (ATK_IS_TABLE (obj), NULL);
63 iface = ATK_TABLE_GET_IFACE (obj);
66 return (iface->ref_at) (obj, row, column);
72 * atk_table_get_index_at:
73 * @value: a GObject instance that implements AtkTableIface
74 * @return: a gint representing the index at specified position, or 0
75 * if value does not implement this interface.
77 * WARNING: callers should not rely on %NULL or on a zero value for
78 * indication of whether AtkSelectionIface is implemented, they should
79 * use type checking/interface checking macros or the
80 * atk_get_accessible_table() convenience method.
83 atk_table_get_index_at (AtkTable *obj,
89 g_return_val_if_fail (obj != NULL, 0);
90 g_return_val_if_fail (ATK_IS_TABLE (obj), 0);
92 iface = ATK_TABLE_GET_IFACE (obj);
94 if (iface->get_index_at)
95 return (iface->get_index_at) (obj, row, column);
101 * atk_table_get_row_at_index:
102 * @value: a GObject instance that implements AtkTableInterface
103 * @return: a gint representing the row at the specified index, or 0
104 * if value does not implement this interface.
106 * WARNING: callers should not rely on %NULL or on a zero value for
107 * indication of whether AtkSelectionIface is implemented, they should
108 * use type checking/interface checking macros or the
109 * atk_get_accessible_table() convenience method.
112 atk_table_get_row_at_index (AtkTable *obj,
115 AtkTableIface *iface;
117 g_return_val_if_fail (obj != NULL, 0);
118 g_return_val_if_fail (ATK_IS_TABLE (obj), 0);
120 iface = ATK_TABLE_GET_IFACE (obj);
122 if (iface->get_row_at_index)
123 return (iface->get_row_at_index) (obj, index);
129 * atk_table_get_column_at_index:
130 * @value: a GObject instance that implements AtkTableInterface
131 * @return: a gint representing the column at the specified index, or 0
132 * if value does not implement this interface.
134 * WARNING: callers should not rely on %NULL or on a zero value for
135 * indication of whether AtkSelectionIface is implemented, they should
136 * use type checking/interface checking macros or the
137 * atk_get_accessible_table() convenience method.
140 atk_table_get_column_at_index (AtkTable *obj,
143 AtkTableIface *iface;
145 g_return_val_if_fail (obj != NULL, 0);
146 g_return_val_if_fail (ATK_IS_TABLE (obj), 0);
148 iface = ATK_TABLE_GET_IFACE (obj);
150 if (iface->get_column_at_index)
151 return (iface->get_column_at_index) (obj, index);
157 * atk_table_get_caption:
158 * @value: a GObject instance that implements AtkTableInterface
159 * @return: a AtkObject* representing the table caption, or NULL
160 * if value does not implement this interface.
162 * WARNING: callers should not rely on %NULL or on a zero value for
163 * indication of whether AtkSelectionIface is implemented, they should
164 * use type checking/interface checking macros or the
165 * atk_get_accessible_table() convenience method.
168 atk_table_get_caption (AtkTable *obj)
170 AtkTableIface *iface;
172 g_return_val_if_fail (obj != NULL, NULL);
173 g_return_val_if_fail (ATK_IS_TABLE (obj), NULL);
175 iface = ATK_TABLE_GET_IFACE (obj);
177 if (iface->get_caption)
178 return (iface->get_caption) (obj);
184 * atk_table_get_n_columns:
185 * @value: a GObject instance that implements AtkTableIface
186 * @return: a gint representing the number of columns, or 0
187 * if value does not implement this interface.
189 * WARNING: callers should not rely on %NULL or on a zero value for
190 * indication of whether AtkSelectionIface is implemented, they should
191 * use type checking/interface checking macros or the
192 * atk_get_accessible_table() convenience method.
195 atk_table_get_n_columns (AtkTable *obj)
197 AtkTableIface *iface;
199 g_return_val_if_fail (obj != NULL, 0);
200 g_return_val_if_fail (ATK_IS_TABLE (obj), 0);
202 iface = ATK_TABLE_GET_IFACE (obj);
204 if (iface->get_n_columns)
205 return (iface->get_n_columns) (obj);
211 * atk_table_get_column_description:
212 * @value: a GObject instance that implements AtkTableIface
213 * @return: a AtkObject* representing the table description, or NULL
214 * if value does not implement this interface.
216 * WARNING: callers should not rely on %NULL or on a zero value for
217 * indication of whether AtkSelectionIface is implemented, they should
218 * use type checking/interface checking macros or the
219 * atk_get_accessible_table() convenience method.
222 atk_table_get_column_description (AtkTable *obj,
225 AtkTableIface *iface;
227 g_return_val_if_fail (obj != NULL, NULL);
228 g_return_val_if_fail (ATK_IS_TABLE (obj), NULL);
230 iface = ATK_TABLE_GET_IFACE (obj);
232 if (iface->get_column_description)
233 return (iface->get_column_description) (obj, column);
239 * atk_table_get_column_extent_at:
240 * @value: a GObject instance that implements AtkTableIface
241 * @return: a gint representing the column extent at specified position, or 0
242 * if value does not implement this interface.
244 * WARNING: callers should not rely on %NULL or on a zero value for
245 * indication of whether AtkSelectionIface is implemented, they should
246 * use type checking/interface checking macros or the
247 * atk_get_accessible_table() convenience method.
250 atk_table_get_column_extent_at (AtkTable *obj,
254 AtkTableIface *iface;
256 g_return_val_if_fail (obj != NULL, 0);
257 g_return_val_if_fail (ATK_IS_TABLE (obj), 0);
259 iface = ATK_TABLE_GET_IFACE (obj);
261 if (iface->get_column_extent_at)
262 return (iface->get_column_extent_at) (obj, row, column);
268 * atk_table_get_column_header:
269 * @value: a GObject instance that implements AtkTableIface
270 * @return: a AtkObject* representing the column headers, or NULL
271 * if value does not implement this interface.
273 * WARNING: callers should not rely on %NULL or on a zero value for
274 * indication of whether AtkSelectionIface is implemented, they should
275 * use type checking/interface checking macros or the
276 * atk_get_accessible_table() convenience method.
279 atk_table_get_column_header (AtkTable *obj)
281 AtkTableIface *iface;
283 g_return_val_if_fail (obj != NULL, NULL);
284 g_return_val_if_fail (ATK_IS_TABLE (obj), NULL);
286 iface = ATK_TABLE_GET_IFACE (obj);
288 if (iface->get_column_header)
289 return (iface->get_column_header) (obj);
295 * atk_table_get_n_rows:
296 * @value: a GObject instance that implements AtkTableIface
297 * @return: a gint representing the number of rows, or 0
298 * if value does not implement this interface.
300 * WARNING: callers should not rely on %NULL or on a zero value for
301 * indication of whether AtkSelectionIface is implemented, they should
302 * use type checking/interface checking macros or the
303 * atk_get_accessible_table() convenience method.
306 atk_table_get_n_rows (AtkTable *obj)
308 AtkTableIface *iface;
310 g_return_val_if_fail (obj != NULL, 0);
311 g_return_val_if_fail (ATK_IS_TABLE (obj), 0);
313 iface = ATK_TABLE_GET_IFACE (obj);
315 if (iface->get_n_rows)
316 return (iface->get_n_rows) (obj);
322 * atk_table_get_row_description:
323 * @value: a GObject instance that implements AtkTableIface
324 * @return: a AtkObject* representing the table description, or NULL
325 * if value does not implement this interface.
327 * WARNING: callers should not rely on %NULL or on a zero value for
328 * indication of whether AtkSelectionIface is implemented, they should
329 * use type checking/interface checking macros or the
330 * atk_get_accessible_table() convenience method.
333 atk_table_get_row_description (AtkTable *obj,
336 AtkTableIface *iface;
338 g_return_val_if_fail (obj != NULL, NULL);
339 g_return_val_if_fail (ATK_IS_TABLE (obj), NULL);
341 iface = ATK_TABLE_GET_IFACE (obj);
343 if (iface->get_row_description)
344 return (iface->get_row_description) (obj, row);
350 * atk_table_get_row_extent_at:
351 * @value: a GObject instance that implements AtkTableIface
352 * @return: a gint representing the row extent at specified position, or 0
353 * if value does not implement this interface.
355 * WARNING: callers should not rely on %NULL or on a zero value for
356 * indication of whether AtkSelectionIface is implemented, they should
357 * use type checking/interface checking macros or the
358 * atk_get_accessible_table() convenience method.
361 atk_table_get_row_extent_at (AtkTable *obj,
365 AtkTableIface *iface;
367 g_return_val_if_fail (obj != NULL, 0);
368 g_return_val_if_fail (ATK_IS_TABLE (obj), 0);
370 iface = ATK_TABLE_GET_IFACE (obj);
372 if (iface->get_row_extent_at)
373 return (iface->get_row_extent_at) (obj, row, column);
379 * atk_table_get_row_header:
380 * @value: a GObject instance that implements AtkTableIface
381 * @return: a AtkTable* representing the row headers, or NULL
382 * if value does not implement this interface.
384 * WARNING: callers should not rely on %NULL or on a zero value for
385 * indication of whether AtkSelectionIface is implemented, they should
386 * use type checking/interface checking macros or the
387 * atk_get_accessible_table() convenience method.
390 atk_table_get_row_header (AtkTable *obj)
392 AtkTableIface *iface;
394 g_return_val_if_fail (obj != NULL, NULL);
395 g_return_val_if_fail (ATK_IS_TABLE (obj), NULL);
397 iface = ATK_TABLE_GET_IFACE (obj);
399 if (iface->get_row_header)
400 return (iface->get_row_header) (obj);
406 * atk_table_get_summary:
407 * @value: a GObject instance that implements AtkTableIface
408 * @return: a AtkObject* representing a sumary description of the table,
409 * or NULL if value does not implement this interface.
411 * WARNING: callers should not rely on %NULL or on a zero value for
412 * indication of whether AtkSelectionIface is implemented, they should
413 * use type checking/interface checking macros or the
414 * atk_get_accessible_table() convenience method.
417 atk_table_get_summary (AtkTable *obj)
419 AtkTableIface *iface;
421 g_return_val_if_fail (obj != NULL, NULL);
422 g_return_val_if_fail (ATK_IS_TABLE (obj), NULL);
424 iface = ATK_TABLE_GET_IFACE (obj);
426 if (iface->get_summary)
427 return (iface->get_summary) (obj);
433 * atk_table_get_selected_rows:
434 * @value: a GObject instance that implements AtkTableIface
435 * @return: a gint* representing the selected rows,
436 * or NULL if value does not implement this interface.
438 * WARNING: callers should not rely on %NULL or on a zero value for
439 * indication of whether AtkSelectionIface is implemented, they should
440 * use type checking/interface checking macros or the
441 * atk_get_accessible_table() convenience method.
444 atk_table_get_selected_rows (AtkTable *obj)
446 AtkTableIface *iface;
448 g_return_val_if_fail (obj != NULL, NULL);
449 g_return_val_if_fail (ATK_IS_TABLE (obj), NULL);
451 iface = ATK_TABLE_GET_IFACE (obj);
453 if (iface->get_selected_rows)
454 return (iface->get_selected_rows) (obj);
460 * atk_table_get_selected_columns:
461 * @value: a GObject instance that implements AtkTableIface
462 * @return: a gint* representing the selected columns,
463 * or NULL if value does not implement this interface.
465 * WARNING: callers should not rely on %NULL or on a zero value for
466 * indication of whether AtkSelectionIface is implemented, they should
467 * use type checking/interface checking macros or the
468 * atk_get_accessible_table() convenience method.
471 atk_table_get_selected_columns (AtkTable *obj)
473 AtkTableIface *iface;
475 g_return_val_if_fail (obj != NULL, NULL);
476 g_return_val_if_fail (ATK_IS_TABLE (obj), NULL);
478 iface = ATK_TABLE_GET_IFACE (obj);
480 if (iface->get_selected_columns)
481 return (iface->get_selected_columns) (obj);
487 * atk_table_is_column_selected:
488 * @value: a GObject instance that implements AtkTableIface
489 * @return: a gboolean representing the column is selected, or 0
490 * if value does not implement this interface.
492 * WARNING: callers should not rely on %NULL or on a zero value for
493 * indication of whether AtkSelectionIface is implemented, they should
494 * use type checking/interface checking macros or the
495 * atk_get_accessible_table() convenience method.
498 atk_table_is_column_selected (AtkTable *obj,
501 AtkTableIface *iface;
503 g_return_val_if_fail (obj != NULL, FALSE);
504 g_return_val_if_fail (ATK_IS_TABLE (obj), FALSE);
506 iface = ATK_TABLE_GET_IFACE (obj);
508 if (iface->is_column_selected)
509 return (iface->is_column_selected) (obj, column);
515 * atk_table_is_row_selected:
516 * @value: a GObject instance that implements AtkTableIface
517 * @return: a gboolean representing the row is selected, or 0
518 * if value does not implement this interface.
520 * WARNING: callers should not rely on %NULL or on a zero value for
521 * indication of whether AtkSelectionIface is implemented, they should
522 * use type checking/interface checking macros or the
523 * atk_get_accessible_table() convenience method.
526 atk_table_is_row_selected (AtkTable *obj,
529 AtkTableIface *iface;
531 g_return_val_if_fail (obj != NULL, FALSE);
532 g_return_val_if_fail (ATK_IS_TABLE (obj), FALSE);
534 iface = ATK_TABLE_GET_IFACE (obj);
536 if (iface->is_row_selected)
537 return (iface->is_row_selected) (obj, row);
543 * atk_table_is_selected:
544 * @value: a GObject instance that implements AtkTableIface
545 * @return: a gboolean representing the cell is selected, or 0
546 * if value does not implement this interface.
548 * WARNING: callers should not rely on %NULL or on a zero value for
549 * indication of whether AtkSelectionIface is implemented, they should
550 * use type checking/interface checking macros or the
551 * atk_get_accessible_table() convenience method.
554 atk_table_is_selected (AtkTable *obj,
558 AtkTableIface *iface;
560 g_return_val_if_fail (obj != NULL, FALSE);
561 g_return_val_if_fail (ATK_IS_TABLE (obj), FALSE);
563 iface = ATK_TABLE_GET_IFACE (obj);
565 if (iface->is_selected)
566 return (iface->is_selected) (obj, row, column);
572 * atk_table_set_caption:
573 * @value: a GObject instance that implements AtkTableIface
577 atk_table_set_caption (AtkTable *obj,
578 AtkObject *accessible)
580 AtkTableIface *iface;
582 g_return_if_fail (obj != NULL);
583 g_return_if_fail (ATK_IS_TABLE (obj));
585 iface = ATK_TABLE_GET_IFACE (obj);
587 if (iface->set_caption)
588 (iface->set_caption) (obj, accessible);
592 * atk_table_set_column_description:
593 * @value: a GObject instance that implements AtkTableIface
597 atk_table_set_column_description (AtkTable *obj,
599 AtkObject *accessible)
601 AtkTableIface *iface;
603 g_return_if_fail (obj != NULL);
604 g_return_if_fail (ATK_IS_TABLE (obj));
606 iface = ATK_TABLE_GET_IFACE (obj);
608 if (iface->set_column_description)
609 (iface->set_column_description) (obj, column, accessible);
613 * atk_table_set_column_header:
614 * @value: a GObject instance that implements AtkTableIface
618 atk_table_set_column_header (AtkTable *obj,
622 AtkTableIface *iface;
624 g_return_if_fail (obj != NULL);
625 g_return_if_fail (ATK_IS_TABLE (obj));
627 iface = ATK_TABLE_GET_IFACE (obj);
629 if (iface->set_column_header)
630 (iface->set_column_header) (obj, column, header);
634 * atk_table_set_row_description:
635 * @value: a GObject instance that implements AtkTableIface
639 atk_table_set_row_description (AtkTable *obj,
641 AtkObject *accessible)
643 AtkTableIface *iface;
645 g_return_if_fail (obj != NULL);
646 g_return_if_fail (ATK_IS_TABLE (obj));
648 iface = ATK_TABLE_GET_IFACE (obj);
650 if (iface->set_row_description)
651 (iface->set_row_description) (obj, row, accessible);
655 * atk_table_set_row_header:
656 * @value: a GObject instance that implements AtkTableIface
660 atk_table_set_row_header (AtkTable *obj,
664 AtkTableIface *iface;
666 g_return_if_fail (obj != NULL);
667 g_return_if_fail (ATK_IS_TABLE (obj));
669 iface = ATK_TABLE_GET_IFACE (obj);
671 if (iface->set_row_header)
672 (iface->set_row_header) (obj, row, header);
676 * atk_table_set_summary:
677 * @value: a GObject instance that implements AtkTableIface
681 atk_table_set_summary (AtkTable *obj,
682 AtkObject *accessible)
684 AtkTableIface *iface;
686 g_return_if_fail (obj != NULL);
687 g_return_if_fail (ATK_IS_TABLE (obj));
689 iface = ATK_TABLE_GET_IFACE (obj);
691 if (iface->set_summary)
692 (iface->set_summary) (obj, accessible);