Add two new relations ATK_RELATION_NODE_CHILDREN and
[platform/upstream/atk.git] / atk / atktable.c
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 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.
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  * Lesser General Public License for more details.
13  *
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.
18  */
19
20 #include "atktable.h"
21 #include "atkmarshal.h"
22
23 enum {
24   ROW_INSERTED,
25   ROW_DELETED,
26   COLUMN_INSERTED,
27   COLUMN_DELETED,
28   ROW_REORDERED,
29   COLUMN_REORDERED,
30   LAST_SIGNAL
31 };
32
33 struct _AtkTableIfaceClass
34 {
35   GObjectClass parent;
36 };
37
38 typedef struct _AtkTableIfaceClass AtkTableIfaceClass;
39
40 static void  atk_table_base_init (gpointer *g_class);
41
42 static guint atk_table_signals[LAST_SIGNAL] = { 0 };
43
44 GType
45 atk_table_get_type ()
46 {
47   static GType type = 0;
48   
49   if (!type) {
50     GTypeInfo tinfo =
51     {
52       sizeof (AtkTableIface),
53       (GBaseInitFunc) atk_table_base_init,
54       (GBaseFinalizeFunc) NULL,
55       
56     };
57     
58     type = g_type_register_static (G_TYPE_INTERFACE, "AtkTable", &tinfo, 0);
59   }
60   
61   return type;
62 }
63
64
65 static void
66 atk_table_base_init (gpointer *g_class)
67 {
68   static gboolean initialized = FALSE;
69   
70   if (!initialized)
71     {
72       atk_table_signals[ROW_INSERTED] =
73         g_signal_new ("row_inserted",
74                       ATK_TYPE_TABLE,
75                       G_SIGNAL_RUN_LAST,
76                       G_STRUCT_OFFSET (AtkTableIface, row_inserted),
77                       (GSignalAccumulator) NULL, NULL,
78                       atk_marshal_VOID__INT_INT,
79                       G_TYPE_NONE,
80                       2, G_TYPE_INT, G_TYPE_INT);
81       atk_table_signals[COLUMN_INSERTED] =
82         g_signal_new ("column_inserted",
83                       ATK_TYPE_TABLE,
84                       G_SIGNAL_RUN_LAST,
85                       G_STRUCT_OFFSET (AtkTableIface, column_inserted),
86                       (GSignalAccumulator) NULL, NULL,
87                       atk_marshal_VOID__INT_INT,
88                       G_TYPE_NONE,
89                       2, G_TYPE_INT, G_TYPE_INT);
90       atk_table_signals[ROW_DELETED] =
91         g_signal_new ("row_deleted",
92                       ATK_TYPE_TABLE,
93                       G_SIGNAL_RUN_LAST,
94                       G_STRUCT_OFFSET (AtkTableIface, row_deleted),
95                       (GSignalAccumulator) NULL, NULL,
96                       atk_marshal_VOID__INT_INT,
97                       G_TYPE_NONE,
98                       2, G_TYPE_INT, G_TYPE_INT);
99       atk_table_signals[COLUMN_DELETED] =
100         g_signal_new ("column_deleted",
101                       ATK_TYPE_TABLE,
102                       G_SIGNAL_RUN_LAST,
103                       G_STRUCT_OFFSET (AtkTableIface, column_deleted),
104                       (GSignalAccumulator) NULL, NULL,
105                       atk_marshal_VOID__INT_INT,
106                       G_TYPE_NONE,
107                       2, G_TYPE_INT, G_TYPE_INT);
108       atk_table_signals[ROW_REORDERED] =
109         g_signal_new ("row_reordered",
110                       ATK_TYPE_TABLE,
111                       G_SIGNAL_RUN_LAST,
112                       G_STRUCT_OFFSET (AtkTableIface, row_reordered),
113                       (GSignalAccumulator) NULL, NULL,
114                       g_cclosure_marshal_VOID__VOID,
115                       G_TYPE_NONE,
116                       0);
117       atk_table_signals[COLUMN_REORDERED] =
118         g_signal_new ("column_reordered",
119                       ATK_TYPE_TABLE,
120                       G_SIGNAL_RUN_LAST,
121                       G_STRUCT_OFFSET (AtkTableIface, column_reordered),
122                       (GSignalAccumulator) NULL, NULL,
123                       g_cclosure_marshal_VOID__VOID,
124                       G_TYPE_NONE,
125                       0);
126       initialized = TRUE;
127     }
128 }
129
130 /**
131  * atk_table_ref_at:
132  * @table: a GObject instance that implements AtkTableIface
133  * @row: a #gint representing a row in @table
134  * @column: a #gint representing a column in @table
135  *
136  * Get a reference to the table cell at @row, @column.
137  *
138  * Returns: a AtkObject* representing the referred to accessible
139  **/
140 AtkObject*
141 atk_table_ref_at (AtkTable *table,
142                   gint     row,
143                   gint     column)
144 {
145   AtkTableIface *iface;
146
147   g_return_val_if_fail (ATK_IS_TABLE (table), NULL);
148
149   iface = ATK_TABLE_GET_IFACE (table);
150
151   if (iface->ref_at)
152     return (iface->ref_at) (table, row, column);
153   else
154     return NULL;
155 }
156
157 /**
158  * atk_table_get_index_at:
159  * @table: a GObject instance that implements AtkTableIface
160  * @row: a #gint representing a row in @table
161  * @column: a #gint representing a column in @table
162  *
163  * Gets a #gint representing the index at the specified @row and @column.
164  * The value -1 is returned if the object at row,column is not a child
165  * of table or table does not implement this interface.
166  *
167  * Returns: a #gint representing the index at specified position 
168  **/
169 gint
170 atk_table_get_index_at (AtkTable *table,
171                         gint     row,
172                         gint     column)
173 {
174   AtkTableIface *iface;
175
176   g_return_val_if_fail (ATK_IS_TABLE (table), -1);
177   g_return_val_if_fail (row >= 0, -1);
178   g_return_val_if_fail (column >= 0, -1);
179
180   iface = ATK_TABLE_GET_IFACE (table);
181
182   if (iface->get_index_at)
183     return (iface->get_index_at) (table, row, column);
184   else
185     return -1;
186 }
187
188 /**
189  * atk_table_get_row_at_index:
190  * @table: a GObject instance that implements AtkTableInterface
191  * @index: a #gint representing an index in @table
192  *
193  * Gets a #gint representing the row at the specified @index, or -1
194  * if the table does not implement this interface
195  *
196  * Returns: a gint representing the row at the specified index.
197  **/
198 gint
199 atk_table_get_row_at_index (AtkTable *table,
200                             gint     index)
201 {
202   AtkTableIface *iface;
203
204   g_return_val_if_fail (ATK_IS_TABLE (table), -1);
205
206   iface = ATK_TABLE_GET_IFACE (table);
207
208   if (iface->get_row_at_index)
209     return (iface->get_row_at_index) (table, index);
210   else
211     return -1;
212 }
213
214 /**
215  * atk_table_get_column_at_index:
216  * @table: a GObject instance that implements AtkTableInterface
217  * @index: a #gint representing an index in @table
218  *
219  * Gets a #gint representing the column at the specified @index, or -1
220  * if the table does not implement this interface
221  *
222  * Returns: a gint representing the column at the specified index.
223  **/
224 gint
225 atk_table_get_column_at_index (AtkTable *table,
226                                gint     index)
227 {
228   AtkTableIface *iface;
229
230   g_return_val_if_fail (ATK_IS_TABLE (table), 0);
231
232   iface = ATK_TABLE_GET_IFACE (table);
233
234   if (iface->get_column_at_index)
235     return (iface->get_column_at_index) (table, index);
236   else
237     return -1;
238 }
239
240 /**
241  * atk_table_get_caption:
242  * @table: a GObject instance that implements AtkTableInterface
243  *
244  * Gets the caption for the @table.
245  *
246  * Returns: a AtkObject* representing the table caption, or %NULL
247  * if value does not implement this interface.
248  **/
249 AtkObject*
250 atk_table_get_caption (AtkTable *table)
251 {
252   AtkTableIface *iface;
253
254   g_return_val_if_fail (ATK_IS_TABLE (table), NULL);
255
256   iface = ATK_TABLE_GET_IFACE (table);
257
258   if (iface->get_caption)
259     return (iface->get_caption) (table);
260   else
261     return NULL;
262 }
263
264 /**
265  * atk_table_get_n_columns:
266  * @table: a GObject instance that implements AtkTableIface
267  *
268  * Gets the number of columns in the table.
269  *
270  * Returns: a gint representing the number of columns, or 0
271  * if value does not implement this interface.
272  **/
273 gint
274 atk_table_get_n_columns (AtkTable *table)
275 {
276   AtkTableIface *iface;
277
278   g_return_val_if_fail (ATK_IS_TABLE (table), 0);
279
280   iface = ATK_TABLE_GET_IFACE (table);
281
282   if (iface->get_n_columns)
283     return (iface->get_n_columns) (table);
284   else
285     return 0;
286 }
287
288 /**
289  * atk_table_get_column_description:
290  * @table: a GObject instance that implements AtkTableIface
291  * @column: a #gint representing a column in @table
292  *
293  * Gets the description text of the specified @column in the table
294  *
295  * Returns: a gchar* representing the column description, or %NULL
296  * if value does not implement this interface.
297  **/
298 G_CONST_RETURN gchar*
299 atk_table_get_column_description (AtkTable *table,
300                                   gint     column)
301 {
302   AtkTableIface *iface;
303
304   g_return_val_if_fail (ATK_IS_TABLE (table), NULL);
305
306   iface = ATK_TABLE_GET_IFACE (table);
307
308   if (iface->get_column_description)
309     return (iface->get_column_description) (table, column);
310   else
311     return NULL;
312 }
313
314 /**
315  * atk_table_get_column_extent_at:
316  * @table: a GObject instance that implements AtkTableIface
317  * @row: a #gint representing a row in @table
318  * @column: a #gint representing a column in @table
319  *
320  * Gets the number of columns occupied by the accessible object
321  * at the specified @row and @column in the @table.
322  *
323  * Returns: a gint representing the column extent at specified position, or 0
324  * if value does not implement this interface.
325  **/
326 gint
327 atk_table_get_column_extent_at (AtkTable *table,
328                                 gint     row,
329                                 gint     column)
330 {
331   AtkTableIface *iface;
332
333   g_return_val_if_fail (ATK_IS_TABLE (table), 0);
334
335   iface = ATK_TABLE_GET_IFACE (table);
336
337   if (iface->get_column_extent_at)
338     return (iface->get_column_extent_at) (table, row, column);
339   else
340     return 0;
341 }
342
343 /**
344  * atk_table_get_column_header:
345  * @table: a GObject instance that implements AtkTableIface
346  * @column: a #gint representing a column in the table
347  *
348  * Gets the column header of a specified column in an accessible table.
349  *
350  * Returns: a AtkObject* representing the specified column header, or
351  * %NULL if value does not implement this interface.
352  **/
353 AtkObject*
354 atk_table_get_column_header (AtkTable *table, gint column)
355 {
356   AtkTableIface *iface;
357
358   g_return_val_if_fail (ATK_IS_TABLE (table), NULL);
359
360   iface = ATK_TABLE_GET_IFACE (table);
361
362   if (iface->get_column_header)
363     return (iface->get_column_header) (table, column);
364   else
365     return NULL;
366 }
367
368 /**
369  * atk_table_get_n_rows:
370  * @table: a GObject instance that implements AtkTableIface
371  *
372  * Gets the number of rows in the table.
373  *
374  * Returns: a gint representing the number of rows, or 0
375  * if value does not implement this interface.
376  **/
377 gint
378 atk_table_get_n_rows (AtkTable *table)
379 {
380   AtkTableIface *iface;
381
382   g_return_val_if_fail (ATK_IS_TABLE (table), 0);
383
384   iface = ATK_TABLE_GET_IFACE (table);
385
386   if (iface->get_n_rows)
387     return (iface->get_n_rows) (table);
388   else
389     return 0;
390 }
391
392 /**
393  * atk_table_get_row_description:
394  * @table: a GObject instance that implements AtkTableIface
395  * @row: a #gint representing a row in @table
396  *
397  * Gets the description text of the specified row in the table
398  *
399  * Returns: a gchar* representing the row description, or %NULL
400  * if value does not implement this interface.
401  **/
402 G_CONST_RETURN gchar*
403 atk_table_get_row_description (AtkTable *table,
404                                gint      row)
405 {
406   AtkTableIface *iface;
407
408   g_return_val_if_fail (ATK_IS_TABLE (table), NULL);
409
410   iface = ATK_TABLE_GET_IFACE (table);
411
412   if (iface->get_row_description)
413     return (iface->get_row_description) (table, row);
414   else
415     return NULL;
416 }
417
418 /**
419  * atk_table_get_row_extent_at:
420  * @table: a GObject instance that implements AtkTableIface
421  * @row: a #gint representing a row in @table
422  * @column: a #gint representing a column in @table
423  *
424  * Gets the number of rows occupied by the accessible object
425  * at a specified @row and @column in the @table.
426  *
427  * Returns: a gint representing the row extent at specified position, or 0
428  * if value does not implement this interface.
429  **/
430 gint
431 atk_table_get_row_extent_at (AtkTable *table,
432                              gint     row,
433                              gint     column)
434 {
435   AtkTableIface *iface;
436
437   g_return_val_if_fail (ATK_IS_TABLE (table), 0);
438
439   iface = ATK_TABLE_GET_IFACE (table);
440
441   if (iface->get_row_extent_at)
442     return (iface->get_row_extent_at) (table, row, column);
443   else
444     return 0;
445 }
446
447 /**
448  * atk_table_get_row_header:
449  * @table: a GObject instance that implements AtkTableIface
450  * @row: a #gint representing a row in the table
451  *
452  * Gets the row header of a specified row in an accessible table.
453  *
454  * Returns: a AtkObject* representing the specified row header, or
455  * %NULL if value does not implement this interface.
456  **/
457 AtkObject*
458 atk_table_get_row_header (AtkTable *table, gint row)
459 {
460   AtkTableIface *iface;
461
462   g_return_val_if_fail (ATK_IS_TABLE (table), NULL);
463
464   iface = ATK_TABLE_GET_IFACE (table);
465
466   if (iface->get_row_header)
467     return (iface->get_row_header) (table, row);
468   else
469     return NULL;
470 }
471
472 /**
473  * atk_table_get_summary:
474  * @table: a GObject instance that implements AtkTableIface
475  *
476  * Gets the summary description of the table.
477  *
478  * Returns: a AtkObject* representing a summary description of the table,
479  * or zero if value does not implement this interface.
480  **/
481 AtkObject*
482 atk_table_get_summary (AtkTable *table)
483 {
484   AtkTableIface *iface;
485
486   g_return_val_if_fail (ATK_IS_TABLE (table), NULL);
487
488   iface = ATK_TABLE_GET_IFACE (table);
489
490   if (iface->get_summary)
491     return (iface->get_summary) (table);
492   else
493     return NULL;
494 }
495
496 /**
497  * atk_table_get_selected_rows:
498  * @table: a GObject instance that implements AtkTableIface
499  * @selected: a #gint** that is to contain the selected row numbers
500  *
501  * Gets the selected rows of the table by initializing **selected with 
502  * the selected row numbers. This array should be freed by the caller.
503  *
504  * Returns: a gint representing the number of selected rows,
505  * or zero if value does not implement this interface.
506  **/
507 gint
508 atk_table_get_selected_rows (AtkTable *table, gint **selected)
509 {
510   AtkTableIface *iface;
511
512   g_return_val_if_fail (ATK_IS_TABLE (table), 0);
513
514   iface = ATK_TABLE_GET_IFACE (table);
515
516   if (iface->get_selected_rows)
517     return (iface->get_selected_rows) (table, selected);
518   else
519     return 0;
520 }
521
522 /**
523  * atk_table_get_selected_columns:
524  * @table: a GObject instance that implements AtkTableIface
525  * @selected: a #gint** that is to contain the selected columns numbers
526  *
527  * Gets the selected columns of the table by initializing **selected with 
528  * the selected column numbers. This array should be freed by the caller.
529  *
530  * Returns: a gint representing the number of selected columns,
531  * or %0 if value does not implement this interface.
532  **/
533 gint 
534 atk_table_get_selected_columns (AtkTable *table, gint **selected)
535 {
536   AtkTableIface *iface;
537
538   g_return_val_if_fail (ATK_IS_TABLE (table), 0);
539
540   iface = ATK_TABLE_GET_IFACE (table);
541
542   if (iface->get_selected_columns)
543     return (iface->get_selected_columns) (table, selected);
544   else
545     return 0;
546 }
547
548 /**
549  * atk_table_is_column_selected:
550  * @table: a GObject instance that implements AtkTableIface
551  * @column: a #gint representing a column in @table
552  *
553  * Gets a boolean value indicating whether the specified @column
554  * is selected
555  *
556  * Returns: a gboolean representing if the column is selected, or 0
557  * if value does not implement this interface.
558  **/
559 gboolean
560 atk_table_is_column_selected (AtkTable *table,
561                               gint     column)
562 {
563   AtkTableIface *iface;
564
565   g_return_val_if_fail (ATK_IS_TABLE (table), FALSE);
566
567   iface = ATK_TABLE_GET_IFACE (table);
568
569   if (iface->is_column_selected)
570     return (iface->is_column_selected) (table, column);
571   else
572     return FALSE;
573 }
574
575 /**
576  * atk_table_is_row_selected:
577  * @table: a GObject instance that implements AtkTableIface
578  * @row: a #gint representing a row in @table
579  *
580  * Gets a boolean value indicating whether the specified @row
581  * is selected
582  *
583  * Returns: a gboolean representing if the row is selected, or 0
584  * if value does not implement this interface.
585  **/
586 gboolean
587 atk_table_is_row_selected (AtkTable *table,
588                            gint     row)
589 {
590   AtkTableIface *iface;
591
592   g_return_val_if_fail (ATK_IS_TABLE (table), FALSE);
593
594   iface = ATK_TABLE_GET_IFACE (table);
595
596   if (iface->is_row_selected)
597     return (iface->is_row_selected) (table, row);
598   else
599     return FALSE;
600 }
601
602 /**
603  * atk_table_is_selected:
604  * @table: a GObject instance that implements AtkTableIface
605  * @row: a #gint representing a row in @table
606  * @column: a #gint representing a column in @table
607  *
608  * Gets a boolean value indicating whether the accessible object
609  * at the specified @row and @column is selected
610  *
611  * Returns: a gboolean representing if the cell is selected, or 0
612  * if value does not implement this interface.
613  **/
614 gboolean
615 atk_table_is_selected (AtkTable *table,
616                        gint     row,
617                        gint     column)
618 {
619   AtkTableIface *iface;
620
621   g_return_val_if_fail (ATK_IS_TABLE (table), FALSE);
622
623   iface = ATK_TABLE_GET_IFACE (table);
624
625   if (iface->is_selected)
626     return (iface->is_selected) (table, row, column);
627   else
628     return FALSE;
629 }
630
631 /**
632  * atk_table_add_row_selection:
633  * @table: a GObject instance that implements AtkTableIface
634  * @row: a #gint representing a row in @table
635  *
636  * Adds the specified @row to the selection. 
637  *
638  * Returns: a gboolean representing if row was successfully added to selection,
639  * or 0 if value does not implement this interface.
640  **/
641 gboolean
642 atk_table_add_row_selection (AtkTable *table,
643                                  gint     row)
644 {
645   AtkTableIface *iface;
646
647   g_return_val_if_fail (ATK_IS_TABLE (table), FALSE);
648
649   iface = ATK_TABLE_GET_IFACE (table);
650
651   if (iface->add_row_selection)
652     return (iface->add_row_selection) (table, row);
653   else
654     return FALSE;
655 }
656 /**
657  * atk_table_remove_row_selection:
658  * @table: a GObject instance that implements AtkTableIface
659  * @row: a #gint representing a row in @table
660  *
661  * Removes the specified @row from the selection. 
662  *
663  * Returns: a gboolean representing if the row was successfully removed from
664  * the selection, or 0 if value does not implement this interface.
665  **/
666 gboolean
667 atk_table_remove_row_selection (AtkTable *table,
668                                     gint     row)
669 {
670   AtkTableIface *iface;
671
672   g_return_val_if_fail (ATK_IS_TABLE (table), FALSE);
673
674   iface = ATK_TABLE_GET_IFACE (table);
675
676   if (iface->remove_row_selection)
677     return (iface->remove_row_selection) (table, row);
678   else
679     return FALSE;
680 }
681 /**
682  * atk_table_add_column_selection:
683  * @table: a GObject instance that implements AtkTableIface
684  * @column: a #gint representing a column in @table
685  *
686  * Adds the specified @column to the selection. 
687  *
688  * Returns: a gboolean representing if the column was successfully added to 
689  * the selection, or 0 if value does not implement this interface.
690  **/
691 gboolean
692 atk_table_add_column_selection (AtkTable *table,
693                                     gint     column)
694 {
695   AtkTableIface *iface;
696
697   g_return_val_if_fail (ATK_IS_TABLE (table), FALSE);
698
699   iface = ATK_TABLE_GET_IFACE (table);
700
701   if (iface->add_column_selection)
702     return (iface->add_column_selection) (table, column);
703   else
704     return FALSE;
705 }
706 /**
707  * atk_table_remove_column_selection:
708  * @table: a GObject instance that implements AtkTableIface
709  * @column: a #gint representing a column in @table
710  *
711  * Adds the specified @column to the selection. 
712  *
713  * Returns: a gboolean representing if the column was successfully removed from
714  * the selection, or 0 if value does not implement this interface.
715  **/
716 gboolean
717 atk_table_remove_column_selection (AtkTable *table,
718                                            gint     column)
719 {
720   AtkTableIface *iface;
721
722   g_return_val_if_fail (ATK_IS_TABLE (table), FALSE);
723
724   iface = ATK_TABLE_GET_IFACE (table);
725
726   if (iface->remove_column_selection)
727     return (iface->remove_column_selection) (table, column);
728   else
729     return FALSE;
730 }
731
732 /**
733  * atk_table_set_caption:
734  * @table: a GObject instance that implements AtkTableIface
735  * @caption: a #AtkObject representing the caption to set for @table
736  *
737  * Sets the caption for the table.
738  **/
739 void
740 atk_table_set_caption (AtkTable       *table,
741                        AtkObject      *caption)
742 {
743   AtkTableIface *iface;
744
745   g_return_if_fail (ATK_IS_TABLE (table));
746
747   iface = ATK_TABLE_GET_IFACE (table);
748
749   if (iface->set_caption)
750     (iface->set_caption) (table, caption);
751 }
752
753 /**
754  * atk_table_set_column_description:
755  * @table: a GObject instance that implements AtkTableIface
756  * @column: a #gint representing a column in @table
757  * @description: a #gchar representing the description text
758  * to set for the specified @column of the @table
759  *
760  * Sets the description text for the specified @column of the @table.
761  **/
762 void
763 atk_table_set_column_description (AtkTable       *table,
764                                   gint           column,
765                                   const gchar    *description)
766 {
767   AtkTableIface *iface;
768
769   g_return_if_fail (ATK_IS_TABLE (table));
770
771   iface = ATK_TABLE_GET_IFACE (table);
772
773   if (iface->set_column_description)
774     (iface->set_column_description) (table, column, description);
775 }
776
777 /**
778  * atk_table_set_column_header:
779  * @table: a GObject instance that implements AtkTableIface
780  * @column: a #gint representing a column in @table
781  * @header: an #AtkTable
782  *
783  * Sets the specified column header to @header.
784  **/
785 void
786 atk_table_set_column_header (AtkTable  *table,
787                              gint      column,
788                              AtkObject *header)
789 {
790   AtkTableIface *iface;
791
792   g_return_if_fail (ATK_IS_TABLE (table));
793
794   iface = ATK_TABLE_GET_IFACE (table);
795
796   if (iface->set_column_header)
797     (iface->set_column_header) (table, column, header);
798 }
799
800 /**
801  * atk_table_set_row_description:
802  * @table: a GObject instance that implements AtkTableIface
803  * @row: a #gint representing a row in @table
804  * @description: a #gchar representing the description text
805  * to set for the specified @row of @table
806  *
807  * Sets the description text for the specified @row of @table.
808  **/
809 void
810 atk_table_set_row_description (AtkTable       *table,
811                                gint           row,
812                                const gchar    *description)
813 {
814   AtkTableIface *iface;
815
816   g_return_if_fail (ATK_IS_TABLE (table));
817
818   iface = ATK_TABLE_GET_IFACE (table);
819
820   if (iface->set_row_description)
821     (iface->set_row_description) (table, row, description);
822 }
823
824 /**
825  * atk_table_set_row_header:
826  * @table: a GObject instance that implements AtkTableIface
827  * @row: a #gint representing a row in @table
828  * @header: an #AtkTable 
829  *
830  * Sets the specified row header to @header.
831  **/
832 void
833 atk_table_set_row_header (AtkTable  *table,
834                           gint      row,
835                           AtkObject *header)
836 {
837   AtkTableIface *iface;
838
839   g_return_if_fail (ATK_IS_TABLE (table));
840
841   iface = ATK_TABLE_GET_IFACE (table);
842
843   if (iface->set_row_header)
844     (iface->set_row_header) (table, row, header);
845 }
846
847 /**
848  * atk_table_set_summary:
849  * @table: a GObject instance that implements AtkTableIface
850  * @accessible: an #AtkObject representing the summary description
851  * to set for @table
852  *
853  * Sets the summary description of the table.
854  **/
855 void
856 atk_table_set_summary (AtkTable       *table,
857                        AtkObject      *accessible)
858 {
859   AtkTableIface *iface;
860
861   g_return_if_fail (ATK_IS_TABLE (table));
862
863   iface = ATK_TABLE_GET_IFACE (table);
864
865   if (iface->set_summary)
866     (iface->set_summary) (table, accessible);
867 }