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