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.
10 * Returns: (no return code implemented yet).
14 AccessibleTable_ref (AccessibleTable *obj)
16 cspi_object_ref (obj);
20 * AccessibleTable_unref:
21 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
23 * Decrement the reference count for an #AccessibleTable object.
25 * Returns: (no return code implemented yet).
29 AccessibleTable_unref (AccessibleTable *obj)
31 cspi_object_unref (obj);
35 * AccessibleTable_getCaption:
36 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
38 * Get an accessible representation of the caption for an #AccessibleTable.
40 * Returns: an #Accessible object that serves as the table's caption.
44 AccessibleTable_getCaption (AccessibleTable *obj)
47 Accessibility_Table__get_caption (CSPI_OBJREF (obj), cspi_ev ());
51 * AccessibleTable_getSummary:
52 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
54 * Get an accessible object which summarizes the contents of an #AccessibleTable.
56 * Returns: an #Accessible object that serves as the table's summary (often a
57 * reduced #AccessibleTable).
61 AccessibleTable_getSummary (AccessibleTable *obj)
64 Accessibility_Table__get_summary (CSPI_OBJREF (obj), cspi_ev ());
68 * AccessibleTable_getNRows:
69 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
71 * Get the number of rows in an #AccessibleTable,
72 * exclusive of any rows that are programmatically hidden, but inclusive
73 * of rows that may be outside of the current scrolling window or viewport.
75 * Returns: a #long integer indicating the number of rows in the table.
79 AccessibleTable_getNRows (AccessibleTable *obj)
82 Accessibility_Table__get_nRows (CSPI_OBJREF (obj), cspi_ev ());
86 * AccessibleTable_getNColumns:
87 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
89 * Get the number of columns in an #AccessibleTable,
90 * exclusive of any columns that are programmatically hidden, but inclusive
91 * of columns that may be outside of the current scrolling window or viewport.
93 * Returns: a #long integer indicating the number of columns in the table.
97 AccessibleTable_getNColumns (AccessibleTable *obj)
100 Accessibility_Table__get_nColumns (CSPI_OBJREF (obj), cspi_ev ());
104 * AccessibleTable_getAccessibleAt:
105 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
106 * @row: the specified table row, zero-indexed.
107 * @column: the specified table column, zero-indexed.
109 * Get the table cell at the specified row and column indices.
110 * To get the accessible object at a particular (x, y) screen coordinate,
111 * use #Accessible_getAccessibleAtPoint ().
113 * Returns: an #Accessible object representing the specified table cell.
117 AccessibleTable_getAccessibleAt (AccessibleTable *obj,
121 return (Accessible *)
122 Accessibility_Table_getAccessibleAt (CSPI_OBJREF (obj),
123 (CORBA_long) row, (CORBA_long) column, cspi_ev ());
127 * AccessibleTable_getIndexAt:
128 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
129 * @row: the specified table row, zero-indexed.
130 * @column: the specified table column, zero-indexed.
132 * Get the 1-D child index corresponding to the specified 2-D row and column indices.
133 * To get the accessible object at a particular (x, y) screen coordinate,
134 * use #Accessible_getAccessibleAtPoint ().
135 * @see #AccessibleTable_getRowAtIndex(), #AccessibleTable_getColumnAtIndex()
137 * Returns: a long integer which serves as the index of a specified cell in the
138 * table, in a form usable by #Accessible_getChildAtIndex().
142 AccessibleTable_getIndexAt (AccessibleTable *obj,
147 Accessibility_Table_getIndexAt (CSPI_OBJREF (obj),
148 (CORBA_long) row, (CORBA_long) column, cspi_ev ());
154 * AccessibleTable_getRowAtIndex:
155 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
156 * @index: the specified child index, zero-indexed.
158 * Get the table row index occupied by the child at a particular 1-D child index.
160 * @see #AccessibleTable_getIndexAt(), #AccessibleTable_getColumnAtIndex()
162 * Returns: a long integer indicating the first row spanned by the child of a
163 * table, at the specified 1-D (zero-offset) @index.
167 AccessibleTable_getRowAtIndex (AccessibleTable *obj,
171 Accessibility_Table_getRowAtIndex (CSPI_OBJREF (obj),
172 (CORBA_long) index, cspi_ev ());
178 * AccessibleTable_getColumnAtIndex:
179 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
180 * @index: the specified child index, zero-indexed.
182 * Get the table column index occupied by the child at a particular 1-D child index.
184 * @see #AccessibleTable_getIndexAt(), #AccessibleTable_getRowAtIndex()
186 * Returns: a long integer indicating the first column spanned by the child of a
187 * table, at the specified 1-D (zero-offset) @index.
191 AccessibleTable_getColumnAtIndex (AccessibleTable *obj,
195 Accessibility_Table_getColumnAtIndex (CSPI_OBJREF (obj),
196 (CORBA_long) index, cspi_ev ());
202 * AccessibleTable_getRowDescription:
203 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
204 * @row: the specified table row, zero-indexed.
206 * Get a text description of a particular table row. This differs from
207 * AccessibleTable_getRowHeader, which returns an #Accessible.
209 * Returns: a UTF-8 string describing the specified table row, if available.
213 AccessibleTable_getRowDescription (AccessibleTable *obj,
217 Accessibility_Table_getRowDescription (CSPI_OBJREF (obj),
218 (CORBA_long) row, cspi_ev ());
224 * AccessibleTable_getColumnDescription:
225 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
226 * @column: the specified table column, zero-indexed.
228 * Get a text description of a particular table column. This differs from
229 * AccessibleTable_getColumnHeader, which returns an #Accessible.
231 * Returns: a UTF-8 string describing the specified table column, if available.
235 AccessibleTable_getColumnDescription (AccessibleTable *obj,
239 Accessibility_Table_getColumnDescription (CSPI_OBJREF (obj),
240 (CORBA_long) column, cspi_ev ());
246 * AccessibleTable_getRowExtentAt:
247 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
248 * @row: the specified table row, zero-indexed.
249 * @column: the specified table column, zero-indexed.
251 * Get the number of rows spanned by the table cell at the specific row and column.
252 * (some tables can have cells which span multiple rows and/or columns).
254 * Returns: a long integer indicating the number of rows spanned by the specified cell.
258 AccessibleTable_getRowExtentAt (AccessibleTable *obj,
263 Accessibility_Table_getRowExtentAt (CSPI_OBJREF (obj),
264 (CORBA_long) row, (CORBA_long) column, cspi_ev ());
270 * AccessibleTable_getColumnExtentAt:
271 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
272 * @row: the specified table row, zero-indexed.
273 * @column: the specified table column, zero-indexed.
275 * Get the number of columns spanned by the table cell at the specific row and column.
276 * (some tables can have cells which span multiple rows and/or columns).
278 * Returns: a long integer indicating the number of columns spanned by the specified cell.
282 AccessibleTable_getColumnExtentAt (AccessibleTable *obj,
287 Accessibility_Table_getColumnExtentAt (CSPI_OBJREF (obj),
288 (CORBA_long) row, (CORBA_long) column, cspi_ev ());
293 * AccessibleTable_getRowHeader:
294 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
295 * @row: the specified table row, zero-indexed.
297 * Get the header associated with a table row, if available. This differs from
298 * AccessibleTable_getRowDescription, which returns a string.
300 * Returns: a #Accessible representatin of the specified table row, if available.
304 AccessibleTable_getRowHeader (AccessibleTable *obj,
307 return (Accessible *)
308 Accessibility_Table_getRowHeader (CSPI_OBJREF (obj),
309 (CORBA_long) row, cspi_ev ());
315 * AccessibleTable_getColumnHeader:
316 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
317 * @column: the specified table column, zero-indexed.
319 * Get the header associated with a table column, if available. This differs from
320 * AccessibleTable_getColumnDescription, which returns a string.
322 * Returns: a #Accessible representatin of the specified table column, if available.
326 AccessibleTable_getColumnHeader (AccessibleTable *obj,
329 return (Accessible *)
330 Accessibility_Table_getColumnHeader (CSPI_OBJREF (obj),
331 (CORBA_long) column, cspi_ev ());
336 * AccessibleTable_getNSelectedRows:
337 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
339 * Query a table to find out how many rows are currently selected. Not all tables
340 * support row selection.
342 * Returns: a long integer indicating the number of rows currently selected.
345 AccessibleTable_getNSelectedRows (AccessibleTable *obj)
348 Accessibility_Table__get_nSelectedRows (CSPI_OBJREF (obj), cspi_ev ());
354 * AccessibleTable_getSelectedRows:
355 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
356 * @selectedRows: a doubly indirected pointer which will be set to the address
357 * of an array of long integers, specifying which rows are currently selected.
359 * Query a table for a list of indices of rows which are currently selected.
361 * Returns: a long integer indicating the length of the array returned in @selectedRows.
364 AccessibleTable_getSelectedRows (AccessibleTable *obj,
365 long int **selectedRows)
367 Accessibility_LongSeq *rows = Accessibility_Table_getSelectedRows (CSPI_OBJREF (obj), cspi_ev ());
373 length = (long) rows->_length;
374 j = *selectedRows = (long *) malloc (sizeof(long)*length);
377 *j++ = (CORBA_long) (*i++);
379 length = rows->_length;
387 * AccessibleTable_getNSelectedColumns:
388 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
390 * Query a table to find out how many columnss are currently selected. Not all tables
391 * support column selection.
393 * Returns: a long integer indicating the number of columns currently selected.
396 AccessibleTable_getNSelectedColumns (AccessibleTable *obj)
399 Accessibility_Table__get_nSelectedColumns (CSPI_OBJREF (obj), cspi_ev ());
404 * AccessibleTable_getSelectedColumns:
405 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
406 * @selectedColumns: a doubly indirected pointer which will be set to the address
407 * of an array of long integers, specifying which columns are currently selected.
409 * Query a table for a list of indices of columns which are currently selected.
410 * Not all tables support column selection.
412 * Returns: a long integer indicating the length of the array returned in @selectedColumns.
415 AccessibleTable_getSelectedColumns (AccessibleTable *obj,
416 long int **selectedColumns)
418 Accessibility_LongSeq *columns = Accessibility_Table_getSelectedColumns (CSPI_OBJREF (obj), cspi_ev ());
423 i = columns->_buffer;
424 length = (long) columns->_length;
425 j = *selectedColumns = (long *) malloc (sizeof(long)*length);
428 *j++ = (CORBA_long) (*i++);
430 length = columns->_length;
431 CORBA_free (columns);
437 * AccessibleTable_isRowSelected:
438 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
441 * Determine whether a table row is selected. Not all tables support row selection.
443 * Returns: #TRUE if the specified row is currently selected, #FALSE if not.
447 AccessibleTable_isRowSelected (AccessibleTable *obj,
451 Accessibility_Table_isRowSelected (CSPI_OBJREF (obj),
452 (CORBA_long) row, cspi_ev ());
458 * AccessibleTable_isColumnSelected:
459 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
462 * Determine whether specified table column is selected.
463 * Not all tables support column selection.
465 * Returns: #TRUE if the specified column is currently selected, #FALSE if not.
469 AccessibleTable_isColumnSelected (AccessibleTable *obj,
473 Accessibility_Table_isColumnSelected (CSPI_OBJREF (obj),
474 (CORBA_long) column, cspi_ev ());
480 * AccessibleTable_isSelected:
481 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
485 * Determine whether the cell at a specific row and column is selected.
487 * Returns: #TRUE if the specified cell is currently selected, #FALSE if not.
491 AccessibleTable_isSelected (AccessibleTable *obj,
496 Accessibility_Table_isSelected (CSPI_OBJREF (obj),
497 (CORBA_long) row, (CORBA_long) column, cspi_ev ());