Add table interface
[platform/upstream/at-spi2-core.git] / atspi / atspi-table.c
1 /*
2  * AT-SPI - Assistive Technology Service Provider Interface
3  * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap)
4  *
5  * Copyright 2001, 2002 Sun Microsystems Inc.,
6  * Copyright 2001, 2002 Ximian, Inc.
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Library General Public
10  * License as published by the Free Software Foundation; either
11  * version 2 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * Library General Public License for more details.
17  *
18  * You should have received a copy of the GNU Library General Public
19  * License along with this library; if not, write to the
20  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21  * Boston, MA 02111-1307, USA.
22  */
23
24 #include <stdlib.h> /* for malloc */
25 #include "atspi-private.h"
26
27 /**
28  * atspi_table_get_caption:
29  * @obj: a pointer to the #AtspiTable implementor on which to operate.
30  *
31  * Get an accessible representation of the caption for an #AtspiTable.
32  *
33  * Returns: (transfer full): an #Accessible object that serves as the table's
34  *          caption.
35  **/
36 AtspiAccessible *
37 atspi_table_get_caption (AtspiTable *obj, GError **error)
38 {
39   char *path;
40   AtspiAccessible *retval = NULL;
41
42   g_return_val_if_fail (obj != NULL, NULL);
43
44   _atspi_dbus_get_property (obj, atspi_interface_table, "Caption", error, "(so)", &retval);
45   return retval;
46 }
47
48 /**
49  * atspi_table_get_summary:
50  * @obj: a pointer to the #AtspiTable implementor on which to operate.
51  *
52  * Get an accessible object which summarizes the contents of an #AtspiTable.
53  *
54  * Returns: (transfer full): an #AtspiAccessible object that serves as the
55  *          table's summary (often a reduced #AtspiTable).
56  **/
57 AtspiAccessible *
58 atspi_table_get_summary (AtspiTable *obj, GError **error)
59 {
60   AtspiAccessible *retval;
61
62   g_return_val_if_fail (obj != NULL, NULL);
63
64   _atspi_dbus_get_property (obj, atspi_interface_table, "Summary", error, "(so)", &retval);
65
66  return retval;
67 }
68
69 /**
70  * atspi_table_get_n_rows:
71  * @obj: a pointer to the #AtspiTable implementor on which to operate.
72  *
73  * Get the number of rows in an #AtspiTable,
74  *        exclusive of any rows that are programmatically hidden, but inclusive
75  *        of rows that may be outside of the current scrolling window or viewport.
76  *
77  * Returns: an integer indicating the number of rows in the table.
78  **/
79 gint
80 atspi_table_get_n_rows (AtspiTable *obj, GError **error)
81 {
82   dbus_int32_t retval = -1;
83
84   g_return_val_if_fail (obj != NULL, -1);
85
86   _atspi_dbus_get_property (obj, atspi_interface_table, "NRows", error, "i", &retval);
87           
88   return retval;
89 }
90
91 /**
92  * atspi_table_get_n_columns:
93  * @obj: a pointer to the #AtspiTable implementor on which to operate.
94  *
95  * Get the number of columns in an #AtspiTable,
96  *        exclusive of any columns that are programmatically hidden, but inclusive
97  *        of columns that may be outside of the current scrolling window or viewport.
98  *
99  * Returns: an integer indicating the number of columns in the table.
100  **/
101 gint
102 atspi_table_get_n_columns (AtspiTable *obj, GError **error)
103 {
104   dbus_int32_t retval = -1;
105
106   g_return_val_if_fail (obj != NULL, -1);
107
108   _atspi_dbus_get_property (obj, atspi_interface_table, "NColumns", error, "i", &retval);
109           
110   return retval;
111 }
112
113 /**
114  * atspi_table_get_accessible_at:
115  * @obj: a pointer to the #AtspiTable implementor on which to operate.
116  * @row: the specified table row, zero-indexed.
117  * @column: the specified table column, zero-indexed.
118  *
119  * Get the table cell at the specified row and column indices.
120  *          To get the accessible object at a particular (x, y) screen coordinate,
121  *          use #atspi_component_get_accessible_at_point ().
122  *
123  * Returns: (transfer full): an #AtspiAccessible object representing the
124  *          specified table cell.
125  **/
126 AtspiAccessible *
127 atspi_table_get_accessible_at (AtspiTable *obj,
128                                  gint row,
129                                  gint column,
130                                  GError **error)
131 {
132   dbus_int32_t d_row = row, d_column = column;
133   AtspiAccessible *retval;
134   DBusMessage *reply;
135
136   g_return_val_if_fail (obj != NULL, NULL);
137
138   reply = _atspi_dbus_call_partial (obj, atspi_interface_table, "GetAccessibleAt", error, "ii", row, column);
139
140   return _atspi_dbus_return_accessible_from_message (reply);
141 }
142
143 /**
144  * atspi_table_get_index_at:
145  * @obj: a pointer to the #AtspiTable implementor on which to operate.
146  * @row: the specified table row, zero-indexed.
147  * @column: the specified table column, zero-indexed.
148  *
149  * Get the 1-D child index corresponding to the specified 2-D row and column indices.
150  *          To get the accessible object at a particular (x, y) screen coordinate,
151  *          use #Accessible_getAccessibleAtPoint ().
152  * @see #atspi_table_getRowAtIndex(), #atspi_table_getColumnAtIndex()
153  *
154  * Returns: a long integer which serves as the index of a specified cell in the
155  *          table, in a form usable by #Accessible_getChildAtIndex().
156  **/
157 gint
158 atspi_table_get_index_at (AtspiTable *obj,
159                             gint row,
160                             gint column,
161                             GError **error)
162 {
163   dbus_int32_t d_row = row, d_column = column;
164   dbus_int32_t retval = -1;
165
166   g_return_val_if_fail (obj != NULL, -1);
167
168   _atspi_dbus_call (obj, atspi_interface_table, "GetIndexAt", error, "ii=>i", d_row, d_column, &retval);
169           
170   return retval;
171 }
172
173 /**
174  * atspi_table_get_row_at_index:
175  * @obj: a pointer to the #AtspiTable implementor on which to operate.
176  * @index: the specified child index, zero-indexed.
177  *
178  * Get the table row index occupied by the child at a particular 1-D child index.
179  *
180  * @see #atspi_table_get_indexAt(), #atspi_table_get_columnAtIndex()
181  *
182  * Returns: a long integer indicating the first row spanned by the child of a
183  *          table, at the specified 1-D (zero-offset) @index.
184  **/
185 gint
186 atspi_table_get_row_at_index (AtspiTable *obj,
187                                gint index,
188                                GError **error)
189 {
190   dbus_int32_t d_index = index;
191   dbus_int32_t retval = -1;
192
193   g_return_val_if_fail (obj != NULL, -1);
194
195   _atspi_dbus_call (obj, atspi_interface_table, "GetRowAtIndex", error, "i=>i", d_index, &retval);
196           
197   return retval;
198 }
199
200 /**
201  * atspi_table_get_column_at_index:
202  * @obj: a pointer to the #AtspiTable implementor on which to operate.
203  * @index: the specified child index, zero-indexed.
204  *
205  * Get the table column index occupied by the child at a particular 1-D child index.
206  *
207  * @see #atspi_table_getIndexAt(), #atspi_table_getRowAtIndex()
208  *
209  * Returns: a long integer indicating the first column spanned by the child of a
210  *          table, at the specified 1-D (zero-offset) @index.
211  **/
212 gint
213 atspi_table_get_column_at_index (AtspiTable *obj,
214                                   gint index,
215                                   GError **error)
216 {
217   dbus_int32_t d_index = index;
218   dbus_int32_t retval = -1;
219
220   g_return_val_if_fail (obj != NULL, -1);
221
222   _atspi_dbus_call (obj, atspi_interface_table, "GetColumnAtIndex", error, "i=>i", d_index, &retval);
223           
224   return retval;
225 }
226
227 /**
228  * atspi_table_get_row_description:
229  * @obj: a pointer to the #AtspiTable implementor on which to operate.
230  * @row: the specified table row, zero-indexed.
231  *
232  * Get a text description of a particular table row.  This differs from
233  * atspi_table_get_row_header, which returns an #AtspiAccessible.
234  *
235  * Returns: a UTF-8 string describing the specified table row, if available.
236  **/
237 gchar *
238 atspi_table_get_row_description (AtspiTable *obj,
239                                    gint  row,
240                                    GError **error)
241 {
242   dbus_int32_t d_row = row;
243   char *retval = NULL;
244
245   g_return_val_if_fail (obj != NULL, NULL);
246
247   _atspi_dbus_call (obj, atspi_interface_table, "GetRowDescription", error, "i=>s", d_row, &retval);
248           
249   return retval;
250 }
251
252 /**
253  * atspi_table_get_column_description:
254  * @obj: a pointer to the #AtspiTable implementor on which to operate.
255  * @column: the specified table column, zero-indexed.
256  *
257  * Get a text description of a particular table column.  This differs from
258  * atspi_table_get_column_header, which returns an #Accessible.
259  *
260  * Returns: a UTF-8 string describing the specified table column, if available.
261  **/
262 gchar *
263 atspi_table_get_column_description (AtspiTable *obj,
264                                       gint         column, GError **error)
265 {
266   dbus_int32_t d_column = column;
267   char *retval = NULL;
268
269   g_return_val_if_fail (obj != NULL, NULL);
270
271   _atspi_dbus_call (obj, atspi_interface_table, "GetColumnDescription", error, "i=>s", d_column, &retval);
272
273   return retval;
274 }
275
276 /**
277  * atspi_table_get_row_extent_at:
278  * @obj: a pointer to the #AtspiTable implementor on which to operate.
279  * @row: the specified table row, zero-indexed.
280  * @column: the specified table column, zero-indexed.
281  *
282  * Get the number of rows spanned by the table cell at the specific row and column.
283  * (some tables can have cells which span multiple rows and/or columns).
284  *
285  * Returns: a long integer indicating the number of rows spanned by the specified cell.
286  **/
287 gint
288 atspi_table_get_row_extent_at (AtspiTable *obj,
289                                 gint         row,
290                                 gint         column,
291                                 GError **error)
292 {
293   dbus_int32_t d_row = row, d_column = column;
294   dbus_int32_t retval = -1;
295
296   g_return_val_if_fail (obj != NULL, -1);
297
298   _atspi_dbus_call (obj, atspi_interface_table, "GetRowExtentAt", error, "ii=>i", d_row, d_column, &retval);
299           
300   return retval;
301 }
302
303 /**
304  * atspi_table_get_column_extent_at:
305  * @obj: a pointer to the #AtspiTable implementor on which to operate.
306  * @row: the specified table row, zero-indexed.
307  * @column: the specified table column, zero-indexed.
308  *
309  * Get the number of columns spanned by the table cell at the specific row and column.
310  * (some tables can have cells which span multiple rows and/or columns).
311  *
312  * Returns: a long integer indicating the number of columns spanned by the specified cell.
313  **/
314 gint
315 atspi_table_get_column_extent_at (AtspiTable *obj,
316                                    gint         row,
317                                    gint         column,
318                                    GError **error)
319 {
320   dbus_int32_t d_row = row, d_column = column;
321   dbus_int32_t retval = -1;
322
323   g_return_val_if_fail (obj != NULL, -1);
324
325   _atspi_dbus_call (obj, atspi_interface_table, "GetColumnExtentAt", error, "ii=>i", d_row, d_column, &retval);
326           
327   return retval;
328 }
329
330 /**
331  * atspi_table_get_row_header:
332  * @obj: a pointer to the #AtspiTable implementor on which to operate.
333  * @row: the specified table row, zero-indexed.
334  *
335  * Get the header associated with a table row, if available.  This differs from
336  * atspi_table_get_row_description, which returns a string.
337  *
338  * Returns: (transfer full): a #Accessible representatin of the specified
339  *          table row, if available.
340  **/
341 AtspiAccessible *
342 atspi_table_get_row_header (AtspiTable *obj,
343                               gint         row,
344                               GError **error)
345 {
346   dbus_int32_t d_row = row;
347   AtspiAccessible *retval = NULL;
348
349   g_return_val_if_fail (obj != NULL, NULL);
350
351   !_atspi_dbus_call (obj, atspi_interface_table, "GetRowHeader", error, "i=>(so)", d_row, &retval);
352
353   return retval;
354 }
355
356 /**
357  * atspi_table_get_column_header:
358  * @obj: a pointer to the #AtspiTable implementor on which to operate.
359  * @column: the specified table column, zero-indexed.
360  *
361  * Get the header associated with a table column, if available.  This differs from
362  * atspi_table_get_column_description, which returns a string.
363  *
364  * Returns: (transfer full): a #AtspiAccessible representation of the
365  *          specified table column, if available.
366  **/
367 AtspiAccessible *
368 atspi_table_get_column_header (AtspiTable *obj,
369                                  gint column,
370                                  GError **error)
371 {
372   dbus_int32_t d_column = column;
373   AtspiAccessible *retval = NULL;
374
375   g_return_val_if_fail (obj != NULL, NULL);
376
377   !_atspi_dbus_call (obj, atspi_interface_table, "GetColumnHeader", error, "i=>(so)", d_column, &retval);
378
379   return retval;
380 }
381
382 /**
383  * atspi_table_get_n_selected_rows:
384  * @obj: a pointer to the #AtspiTable implementor on which to operate.
385  *
386  * Query a table to find out how many rows are currently selected.  Not all tables
387  *  support row selection.
388  *
389  * Returns: a long integer indicating the number of rows currently selected.
390  **/
391 gint
392 atspi_table_get_n_selected_rows (AtspiTable *obj, GError **error)
393 {
394   dbus_int32_t retval = -1;
395
396   g_return_val_if_fail (obj != NULL, -1);
397
398   _atspi_dbus_get_property (obj, atspi_interface_table, "NSelectedRows", error, "i", &retval);
399           
400   return retval;
401 }
402
403 /**
404  * atspi_table_get_selected_rows:
405  * @obj: a pointer to the #AtspiTable implementor on which to operate.
406  *
407  * Query a table for a list of indices of rows which are currently selected.
408  *
409  * Returns: (element-type gint) (transfer full): an array of integers,
410  *          specifying which rows are currently selected.
411  **/
412 GArray *
413 atspi_table_get_selected_rows (AtspiTable *obj,
414                                  GError **error)
415 {
416   GArray *rows = NULL;
417
418   g_return_val_if_fail (obj != NULL, 0);
419
420   _atspi_dbus_call (obj, atspi_interface_table, "GetSelectedRows", error, "=>ai", &rows);
421
422   return rows;
423 }
424
425 /**
426  * atspi_table_get_selected_columns:
427  * @obj: a pointer to the #AtspiTable implementor on which to operate.
428  *
429  * Query a table for a list of indices of columns which are currently selected.
430  *
431  * Returns: (element-type gint) (transfer full): an array of integers,
432  *          specifying which columns are currently selected.
433  **/
434 GArray *
435 atspi_table_get_selected_columns (AtspiTable *obj,
436                                  GError **error)
437 {
438   GArray *columns = NULL;
439
440   g_return_val_if_fail (obj != NULL, 0);
441
442   _atspi_dbus_call (obj, atspi_interface_table, "GetSelectedColumns", error, "=>ai", &columns);
443
444   return columns;
445 }
446
447 /**
448  * atspi_table_get_n_selected_columns:
449  * @obj: a pointer to the #AtspiTable implementor on which to operate.
450  *
451  * Query a table to find out how many columns are currently selected.  Not all tables
452  *  support column selection.
453  *
454  * Returns: a long integer indicating the number of columns currently selected.
455  **/
456 gint
457 atspi_table_get_n_selected_columns (AtspiTable *obj, GError **error)
458 {
459   dbus_int32_t retval = -1;
460
461   g_return_val_if_fail (obj != NULL, -1);
462
463   _atspi_dbus_get_property (obj, atspi_interface_table, "NSelectedColumns", error, "i", &retval);
464           
465   return retval;
466 }
467
468 /**
469  * atspi_table_is_row_selected:
470  * @obj: a pointer to the #AtspiTable implementor on which to operate.
471  * @row: the zero-indexed row number of the row being queried.
472  *
473  * Determine whether a table row is selected.  Not all tables support row selection.
474  *
475  * Returns: #TRUE if the specified row is currently selected, #FALSE if not.
476  **/
477 gboolean
478 atspi_table_is_row_selected (AtspiTable *obj,
479                                gint row,
480                                GError **error)
481 {
482   dbus_int32_t d_row = row;
483   dbus_bool_t retval = FALSE;
484
485   g_return_val_if_fail (obj != NULL, FALSE);
486
487   _atspi_dbus_call (obj, atspi_interface_table, "IsRowSelected", error, "i=>b", d_row, &retval);
488
489   return retval;
490 }
491
492 /**
493  * atspi_table_is_column_selected:
494  * @obj: a pointer to the #AtspiTable implementor on which to operate.
495  * @column: the zero-indexed column number of the column being queried.
496  *
497  * Determine whether specified table column is selected.
498  * Not all tables support column selection.
499  *
500  * Returns: #TRUE if the specified column is currently selected, #FALSE if not.
501  **/
502 gboolean
503 atspi_table_is_column_selected (AtspiTable *obj,
504                                   gint column,
505                                   GError **error)
506 {
507   dbus_int32_t d_column = column;
508   dbus_bool_t retval = FALSE;
509
510   g_return_val_if_fail (obj != NULL, FALSE);
511
512   _atspi_dbus_call (obj, atspi_interface_table, "IsColumnSelected", error, "i=>b", d_column, &retval);
513           
514   return retval;
515 }
516
517 /**
518  * atspi_table_add_row_selection:
519  * @obj: a pointer to the #AtspiTable implementor on which to operate.
520  * @row: the zero-indexed row number of the row being selected.
521  *
522  * Select the specified row, adding it to the current row selection.
523  * Not all tables support row selection.
524  *
525  * Returns: #TRUE if the specified row was successfully selected, #FALSE if not.
526  **/
527 gboolean
528 atspi_table_add_row_selection (AtspiTable *obj,
529                                  gint row,
530                                  GError **error)
531 {
532   dbus_int32_t d_row = row;
533   dbus_bool_t retval = FALSE;
534
535   g_return_val_if_fail (obj != NULL, FALSE);
536
537   _atspi_dbus_call (obj, atspi_interface_table, "AddRowSelection", error, "i=>b", d_row, &retval);
538           
539   return retval;
540 }
541
542 /**
543  * atspi_table_add_column_selection:
544  * @obj: a pointer to the #AtspiTable implementor on which to operate.
545  * @column: the zero-indexed column number of the column being selected.
546  *
547  * Select the specified column, adding it to the current column selection.
548  * Not all tables support column selection.
549  *
550  * Returns: #TRUE if the specified column was successfully selected, #FALSE if not.
551  **/
552 gboolean
553 atspi_table_add_column_selection (AtspiTable *obj,
554                                     gint column,
555                                     GError **error)
556 {
557   dbus_int32_t d_column = column;
558   dbus_bool_t retval = FALSE;
559
560   g_return_val_if_fail (obj != NULL, FALSE);
561
562   _atspi_dbus_call (obj, atspi_interface_table, "AddColumnSelection", error, "i=>b", d_column, &retval);
563           
564   return retval;
565 }
566
567 /**
568  * atspi_table_remove_row_selection:
569  * @obj: a pointer to the #AtspiTable implementor on which to operate.
570  * @row: the zero-indexed number of the row being deselected.
571  *
572  * De-select the specified row, removing it to the current row selection.
573  * Not all tables support row selection.
574  *
575  * Returns: #TRUE if the specified row was successfully de-selected, #FALSE if not.
576  **/
577 gboolean
578 atspi_table_remove_row_selection (AtspiTable *obj,
579                                     gint row,
580                                     GError **error)
581 {
582   dbus_int32_t d_row = row;
583   dbus_bool_t retval = FALSE;
584
585   g_return_val_if_fail (obj != NULL, FALSE);
586
587   _atspi_dbus_call (obj, atspi_interface_table, "RemoveRowSelection", error, "i=>b", d_row, &retval);
588           
589   return retval;
590 }
591
592 /**
593  * atspi_table_remove_column_selection:
594  * @obj: a pointer to the #AtspiTable implementor on which to operate.
595  * @column: the zero-indexed column number of the column being de-selected.
596  *
597  * De-select the specified column, removing it to the current column selection.
598  * Not all tables support column selection.
599  *
600  * Returns: #TRUE if the specified column was successfully de-selected, #FALSE if not.
601  **/
602 gboolean
603 atspi_table_remove_column_selection (AtspiTable *obj,
604                                        gint column,
605                                        GError **error)
606 {
607   dbus_int32_t d_column = column;
608   dbus_bool_t retval = FALSE;
609
610   g_return_val_if_fail (obj != NULL, FALSE);
611
612   _atspi_dbus_call (obj, atspi_interface_table, "RemoveColumnSelection", error, "i=>b", d_column, &retval);
613           
614   return retval;
615 }
616
617 /**
618  * atspi_table_get_row_column_extents_at_index:
619  * @obj: a pointer to the #AtspiTable implementor on which to operate.
620  * @index: the index of the Table child whose row/column 
621  * extents are requested.
622  * @row: back-filled with the first table row associated with
623  * the cell with child index \c index.
624  * @col: back-filled with the first table column associated 
625  * with the cell with child index \c index.
626  * @row_extents: back-filled with the number of table rows 
627  * across which child \c i extends.
628  * @col_extents: back-filled with the number of table columns
629  * across which child \c i extends.
630  * @is_selected: a boolean which is back-filled with \c True
631  * if the child at index \c i corresponds to a selected table cell,
632  * \c False otherwise.
633  *
634  * Given a child index, determine the row and column indices and 
635  * extents, and whether the cell is currently selected.  If
636  * the child at \c index is not a cell (for instance, if it is 
637  * a summary, caption, etc.), \c False is returned.
638  *
639  * Example:
640  * If the Table child at index '6' extends across columns 5 and 6 of
641  * row 2 of a Table instance, and is currently selected, then
642  * 
643  * retval = table::getRowColumnExtentsAtIndex (6, row, col, 
644  *                                             row_extents,
645  *                                             col_extents,
646  *                                             is_selected);
647  * 
648  * will return True, and after the call
649  * row, col, row_extents, col_extents,
650  * and \c is_selected will contain 2, 5, 1, 2, and 
651  * True, respectively.
652  *
653  * Returns: \c True if the index is associated with a valid table
654  * cell, \c False if the index does not correspond to a cell.  If 
655  * \c False is returned, the values of the out parameters are 
656  * undefined.
657  **/
658 gboolean
659 atspi_table_get_row_column_extents_at_index (AtspiTable *obj,
660                                             gint index, gint *row, gint *col, 
661                                             gint *row_extents, gint *col_extents, 
662                                             gboolean *is_selected, GError **error)
663 {
664   dbus_int32_t d_index = index;
665   dbus_bool_t retval = FALSE;
666   dbus_int32_t d_row = 0,  d_col = 0, d_row_extents = 0, d_col_extents = 0;
667   dbus_bool_t d_is_selected = FALSE;
668
669   g_return_val_if_fail (obj != NULL, FALSE);
670
671   _atspi_dbus_call (obj, atspi_interface_table, "GetRowColumnExtentsAtIndex", error, "i=>iiiibb", d_index, &d_row, &d_col, &d_row_extents, &d_col_extents, &d_is_selected, &retval);
672
673   *col = d_col;
674   *row_extents = d_row_extents;;
675   *col_extents = d_col_extents;
676   *is_selected = d_is_selected;;
677   
678   return retval;
679 }
680
681
682 /**
683  * atspi_table_is_selected:
684  * @obj: a pointer to the #AtspiTable implementor on which to operate.
685  * @row: the zero-indexed row of the cell being queried.
686  * @column: the zero-indexed column of the cell being queried.
687  *
688  * Determine whether the cell at a specific row and column is selected.
689  *
690  * Returns: #TRUE if the specified cell is currently selected, #FALSE if not.
691  **/
692 gboolean
693 atspi_table_is_selected (AtspiTable *obj,
694                             gint row,
695                             gint column,
696                             GError **error)
697 {
698   dbus_int32_t d_row = row, d_column = column;
699   dbus_bool_t retval = FALSE;
700
701   g_return_val_if_fail (obj != NULL, FALSE);
702
703   _atspi_dbus_call (obj, atspi_interface_table, "IsSelected", error, "ii=>b", d_row, d_column, &retval);
704           
705   return retval;
706 }
707
708 static void
709 atspi_table_base_init (AtspiTable *klass)
710 {
711 }
712
713 GType
714 atspi_table_get_type (void)
715 {
716   static GType type = 0;
717
718   if (!type) {
719     static const GTypeInfo tinfo =
720     {
721       sizeof (AtspiTable),
722       (GBaseInitFunc) atspi_table_base_init,
723       (GBaseFinalizeFunc) NULL,
724     };
725
726     type = g_type_register_static (G_TYPE_INTERFACE, "AtspiTable", &tinfo, 0);
727
728   }
729   return type;
730 }