1 #include <stdlib.h> /* for malloc */
2 #include <cspi/spi-private.h>
6 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
8 * Increment the reference count for an #AccessibleTable object.
11 AccessibleTable_ref (AccessibleTable *obj)
13 cspi_object_ref (obj);
17 * AccessibleTable_unref:
18 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
20 * Decrement the reference count for an #AccessibleTable object.
23 AccessibleTable_unref (AccessibleTable *obj)
25 cspi_object_unref (obj);
29 * AccessibleTable_getCaption:
30 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
32 * Get an accessible representation of the caption for an #AccessibleTable.
34 * Returns: an #Accessible object that serves as the table's caption.
37 AccessibleTable_getCaption (AccessibleTable *obj)
40 Accessibility_Table__get_caption (CSPI_OBJREF (obj), cspi_ev ());
44 * AccessibleTable_getSummary:
45 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
47 * Get an accessible object which summarizes the contents of an #AccessibleTable.
49 * Returns: an #Accessible object that serves as the table's summary (often a
50 * reduced #AccessibleTable).
54 AccessibleTable_getSummary (AccessibleTable *obj)
57 Accessibility_Table__get_summary (CSPI_OBJREF (obj), cspi_ev ());
61 * AccessibleTable_getNRows:
62 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
64 * Get the number of rows in an #AccessibleTable,
65 * exclusive of any rows that are programmatically hidden, but inclusive
66 * of rows that may be outside of the current scrolling window or viewport.
68 * Returns: a #long integer indicating the number of rows in the table.
72 AccessibleTable_getNRows (AccessibleTable *obj)
75 Accessibility_Table__get_nRows (CSPI_OBJREF (obj), cspi_ev ());
79 * AccessibleTable_getNColumns:
80 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
82 * Get the number of columns in an #AccessibleTable,
83 * exclusive of any columns that are programmatically hidden, but inclusive
84 * of columns that may be outside of the current scrolling window or viewport.
86 * Returns: a #long integer indicating the number of columns in the table.
90 AccessibleTable_getNColumns (AccessibleTable *obj)
93 Accessibility_Table__get_nColumns (CSPI_OBJREF (obj), cspi_ev ());
97 * AccessibleTable_getAccessibleAt:
98 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
99 * @row: the specified table row, zero-indexed.
100 * @column: the specified table column, zero-indexed.
102 * Get the table cell at the specified row and column indices.
103 * To get the accessible object at a particular (x, y) screen coordinate,
104 * use #Accessible_getAccessibleAtPoint ().
106 * Returns: an #Accessible object representing the specified table cell.
110 AccessibleTable_getAccessibleAt (AccessibleTable *obj,
114 return (Accessible *)
115 Accessibility_Table_getAccessibleAt (CSPI_OBJREF (obj),
116 (CORBA_long) row, (CORBA_long) column, cspi_ev ());
120 * AccessibleTable_getIndexAt:
121 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
122 * @row: the specified table row, zero-indexed.
123 * @column: the specified table column, zero-indexed.
125 * Get the 1-D child index corresponding to the specified 2-D row and column indices.
126 * To get the accessible object at a particular (x, y) screen coordinate,
127 * use #Accessible_getAccessibleAtPoint ().
128 * @see #AccessibleTable_getRowAtIndex(), #AccessibleTable_getColumnAtIndex()
130 * Returns: a long integer which serves as the index of a specified cell in the
131 * table, in a form usable by #Accessible_getChildAtIndex().
135 AccessibleTable_getIndexAt (AccessibleTable *obj,
140 Accessibility_Table_getIndexAt (CSPI_OBJREF (obj),
141 (CORBA_long) row, (CORBA_long) column, cspi_ev ());
147 * AccessibleTable_getRowAtIndex:
148 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
149 * @index: the specified child index, zero-indexed.
151 * Get the table row index occupied by the child at a particular 1-D child index.
153 * @see #AccessibleTable_getIndexAt(), #AccessibleTable_getColumnAtIndex()
155 * Returns: a long integer indicating the first row spanned by the child of a
156 * table, at the specified 1-D (zero-offset) @index.
160 AccessibleTable_getRowAtIndex (AccessibleTable *obj,
164 Accessibility_Table_getRowAtIndex (CSPI_OBJREF (obj),
165 (CORBA_long) index, cspi_ev ());
171 * AccessibleTable_getColumnAtIndex:
172 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
173 * @index: the specified child index, zero-indexed.
175 * Get the table column index occupied by the child at a particular 1-D child index.
177 * @see #AccessibleTable_getIndexAt(), #AccessibleTable_getRowAtIndex()
179 * Returns: a long integer indicating the first column spanned by the child of a
180 * table, at the specified 1-D (zero-offset) @index.
184 AccessibleTable_getColumnAtIndex (AccessibleTable *obj,
188 Accessibility_Table_getColumnAtIndex (CSPI_OBJREF (obj),
189 (CORBA_long) index, cspi_ev ());
195 * AccessibleTable_getRowDescription:
196 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
197 * @row: the specified table row, zero-indexed.
199 * Get a text description of a particular table row. This differs from
200 * AccessibleTable_getRowHeader, which returns an #Accessible.
202 * Returns: a UTF-8 string describing the specified table row, if available.
206 AccessibleTable_getRowDescription (AccessibleTable *obj,
210 Accessibility_Table_getRowDescription (CSPI_OBJREF (obj),
211 (CORBA_long) row, cspi_ev ());
217 * AccessibleTable_getColumnDescription:
218 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
219 * @column: the specified table column, zero-indexed.
221 * Get a text description of a particular table column. This differs from
222 * AccessibleTable_getColumnHeader, which returns an #Accessible.
224 * Returns: a UTF-8 string describing the specified table column, if available.
228 AccessibleTable_getColumnDescription (AccessibleTable *obj,
232 Accessibility_Table_getColumnDescription (CSPI_OBJREF (obj),
233 (CORBA_long) column, cspi_ev ());
239 * AccessibleTable_getRowExtentAt:
240 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
241 * @row: the specified table row, zero-indexed.
242 * @column: the specified table column, zero-indexed.
244 * Get the number of rows spanned by the table cell at the specific row and column.
245 * (some tables can have cells which span multiple rows and/or columns).
247 * Returns: a long integer indicating the number of rows spanned by the specified cell.
251 AccessibleTable_getRowExtentAt (AccessibleTable *obj,
256 Accessibility_Table_getRowExtentAt (CSPI_OBJREF (obj),
257 (CORBA_long) row, (CORBA_long) column, cspi_ev ());
263 * AccessibleTable_getColumnExtentAt:
264 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
265 * @row: the specified table row, zero-indexed.
266 * @column: the specified table column, zero-indexed.
268 * Get the number of columns spanned by the table cell at the specific row and column.
269 * (some tables can have cells which span multiple rows and/or columns).
271 * Returns: a long integer indicating the number of columns spanned by the specified cell.
275 AccessibleTable_getColumnExtentAt (AccessibleTable *obj,
280 Accessibility_Table_getColumnExtentAt (CSPI_OBJREF (obj),
281 (CORBA_long) row, (CORBA_long) column, cspi_ev ());
286 * AccessibleTable_getRowHeader:
287 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
288 * @row: the specified table row, zero-indexed.
290 * Get the header associated with a table row, if available. This differs from
291 * AccessibleTable_getRowDescription, which returns a string.
293 * Returns: a #Accessible representatin of the specified table row, if available.
297 AccessibleTable_getRowHeader (AccessibleTable *obj,
300 return (Accessible *)
301 Accessibility_Table_getRowHeader (CSPI_OBJREF (obj),
302 (CORBA_long) row, cspi_ev ());
308 * AccessibleTable_getColumnHeader:
309 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
310 * @column: the specified table column, zero-indexed.
312 * Get the header associated with a table column, if available. This differs from
313 * AccessibleTable_getColumnDescription, which returns a string.
315 * Returns: a #Accessible representatin of the specified table column, if available.
319 AccessibleTable_getColumnHeader (AccessibleTable *obj,
322 return (Accessible *)
323 Accessibility_Table_getColumnHeader (CSPI_OBJREF (obj),
324 (CORBA_long) column, cspi_ev ());
329 * AccessibleTable_getNSelectedRows:
330 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
332 * Query a table to find out how many rows are currently selected. Not all tables
333 * support row selection.
335 * Returns: a long integer indicating the number of rows currently selected.
338 AccessibleTable_getNSelectedRows (AccessibleTable *obj)
341 Accessibility_Table__get_nSelectedRows (CSPI_OBJREF (obj), cspi_ev ());
347 * AccessibleTable_getSelectedRows:
348 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
349 * @selectedRows: a doubly indirected pointer which will be set to the address
350 * of an array of long integers, specifying which rows are currently selected.
352 * Query a table for a list of indices of rows which are currently selected.
354 * Returns: a long integer indicating the length of the array returned in @selectedRows.
357 AccessibleTable_getSelectedRows (AccessibleTable *obj,
358 long int **selectedRows)
360 Accessibility_LongSeq *rows = Accessibility_Table_getSelectedRows (CSPI_OBJREF (obj), cspi_ev ());
366 length = (long) rows->_length;
367 j = *selectedRows = (long *) malloc (sizeof(long)*length);
370 *j++ = (CORBA_long) (*i++);
372 length = rows->_length;
380 * AccessibleTable_getNSelectedColumns:
381 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
383 * Query a table to find out how many columnss are currently selected. Not all tables
384 * support column selection.
386 * Returns: a long integer indicating the number of columns currently selected.
389 AccessibleTable_getNSelectedColumns (AccessibleTable *obj)
392 Accessibility_Table__get_nSelectedColumns (CSPI_OBJREF (obj), cspi_ev ());
397 * AccessibleTable_getSelectedColumns:
398 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
399 * @selectedColumns: a doubly indirected pointer which will be set to the address
400 * of an array of long integers, specifying which columns are currently selected.
402 * Query a table for a list of indices of columns which are currently selected.
403 * Not all tables support column selection.
405 * Returns: a long integer indicating the length of the array returned in @selectedColumns.
408 AccessibleTable_getSelectedColumns (AccessibleTable *obj,
409 long int **selectedColumns)
411 Accessibility_LongSeq *columns = Accessibility_Table_getSelectedColumns (CSPI_OBJREF (obj), cspi_ev ());
416 i = columns->_buffer;
417 length = (long) columns->_length;
418 j = *selectedColumns = (long *) malloc (sizeof(long)*length);
421 *j++ = (CORBA_long) (*i++);
423 length = columns->_length;
424 CORBA_free (columns);
430 * AccessibleTable_isRowSelected:
431 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
434 * Determine whether a table row is selected. Not all tables support row selection.
436 * Returns: #TRUE if the specified row is currently selected, #FALSE if not.
440 AccessibleTable_isRowSelected (AccessibleTable *obj,
444 Accessibility_Table_isRowSelected (CSPI_OBJREF (obj),
445 (CORBA_long) row, cspi_ev ());
451 * AccessibleTable_isColumnSelected:
452 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
455 * Determine whether specified table column is selected.
456 * Not all tables support column selection.
458 * Returns: #TRUE if the specified column is currently selected, #FALSE if not.
462 AccessibleTable_isColumnSelected (AccessibleTable *obj,
466 Accessibility_Table_isColumnSelected (CSPI_OBJREF (obj),
467 (CORBA_long) column, cspi_ev ());
473 * AccessibleTable_isSelected:
474 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
478 * Determine whether the cell at a specific row and column is selected.
480 * Returns: #TRUE if the specified cell is currently selected, #FALSE if not.
484 AccessibleTable_isSelected (AccessibleTable *obj,
489 Accessibility_Table_isSelected (CSPI_OBJREF (obj),
490 (CORBA_long) row, (CORBA_long) column, cspi_ev ());