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