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);
23 * AccessibleTable_unref:
24 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
26 * Decrement the reference count for an #AccessibleTable object.
28 * Returns: (no return code implemented yet).
32 AccessibleTable_unref (AccessibleTable *obj)
34 cspi_object_unref (obj);
39 * AccessibleTable_getCaption:
40 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
42 * Get an accessible representation of the caption for an #AccessibleTable.
44 * Returns: an #Accessible object that serves as the table's caption.
48 AccessibleTable_getCaption (AccessibleTable *obj)
51 Accessibility_Table__get_caption (CSPI_OBJREF (obj), cspi_ev ());
57 * AccessibleTable_getSummary:
58 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
60 * Get an accessible object which summarizes the contents of an #AccessibleTable.
62 * Returns: an #Accessible object that serves as the table's summary (often a
63 * reduced #AccessibleTable).
67 AccessibleTable_getSummary (AccessibleTable *obj)
70 Accessibility_Table__get_summary (CSPI_OBJREF (obj), cspi_ev ());
76 * AccessibleTable_getNRows:
77 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
79 * Get the number of rows in an #AccessibleTable,
80 * exclusive of any rows that are programmatically hidden, but inclusive
81 * of rows that may be outside of the current scrolling window or viewport.
83 * Returns: a #long integer indicating the number of rows in the table.
87 AccessibleTable_getNRows (AccessibleTable *obj)
90 Accessibility_Table__get_nRows (CSPI_OBJREF (obj), cspi_ev ());
96 * AccessibleTable_getNColumns:
97 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
99 * Get the number of columns in an #AccessibleTable,
100 * exclusive of any columns that are programmatically hidden, but inclusive
101 * of columns that may be outside of the current scrolling window or viewport.
103 * Returns: a #long integer indicating the number of columns in the table.
107 AccessibleTable_getNColumns (AccessibleTable *obj)
110 Accessibility_Table__get_nColumns (CSPI_OBJREF (obj), cspi_ev ());
115 * AccessibleTable_getAccessibleAt:
116 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
117 * @row: the specified table row, zero-indexed.
118 * @column: the specified table column, zero-indexed.
120 * Get the table cell at the specified row and column indices.
121 * To get the accessible object at a particular (x, y) screen coordinate,
122 * use #Accessible_getAccessibleAtPoint ().
124 * Returns: an #Accessible object representing the specified table cell.
128 AccessibleTable_getAccessibleAt (AccessibleTable *obj,
132 return (Accessible *)
133 Accessibility_Table_getAccessibleAt (CSPI_OBJREF (obj),
134 (CORBA_long) row, (CORBA_long) column, cspi_ev ());
139 * AccessibleTable_getIndexAt:
140 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
141 * @row: the specified table row, zero-indexed.
142 * @column: the specified table column, zero-indexed.
144 * Get the 1-D child index corresponding to the specified 2-D row and column indices.
145 * To get the accessible object at a particular (x, y) screen coordinate,
146 * use #Accessible_getAccessibleAtPoint ().
147 * @see #AccessibleTable_getRowAtIndex(), #AccessibleTable_getColumnAtIndex()
149 * Returns: a long integer which serves as the index of a specified cell in the
150 * table, in a form usable by #Accessible_getChildAtIndex().
154 AccessibleTable_getIndexAt (AccessibleTable *obj,
159 Accessibility_Table_getIndexAt (CSPI_OBJREF (obj),
160 (CORBA_long) row, (CORBA_long) column, cspi_ev ());
166 * AccessibleTable_getRowAtIndex:
167 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
168 * @index: the specified child index, zero-indexed.
170 * Get the table row index occupied by the child at a particular 1-D child index.
172 * @see #AccessibleTable_getIndexAt(), #AccessibleTable_getColumnAtIndex()
174 * Returns: a long integer indicating the first row spanned by the child of a
175 * table, at the specified 1-D (zero-offset) @index.
179 AccessibleTable_getRowAtIndex (AccessibleTable *obj,
183 Accessibility_Table_getRowAtIndex (CSPI_OBJREF (obj),
184 (CORBA_long) index, cspi_ev ());
190 * AccessibleTable_getColumnAtIndex:
191 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
192 * @index: the specified child index, zero-indexed.
194 * Get the table column index occupied by the child at a particular 1-D child index.
196 * @see #AccessibleTable_getIndexAt(), #AccessibleTable_getRowAtIndex()
198 * Returns: a long integer indicating the first column spanned by the child of a
199 * table, at the specified 1-D (zero-offset) @index.
203 AccessibleTable_getColumnAtIndex (AccessibleTable *obj,
207 Accessibility_Table_getColumnAtIndex (CSPI_OBJREF (obj),
208 (CORBA_long) index, cspi_ev ());
214 * AccessibleTable_getRowDescription:
215 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
216 * @row: the specified table row, zero-indexed.
218 * Get a text description of a particular table row. This differs from
219 * AccessibleTable_getRowHeader, which returns an #Accessible.
221 * Returns: a UTF-8 string describing the specified table row, if available.
225 AccessibleTable_getRowDescription (AccessibleTable *obj,
229 Accessibility_Table_getRowDescription (CSPI_OBJREF (obj),
230 (CORBA_long) row, cspi_ev ());
236 * AccessibleTable_getColumnDescription:
237 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
238 * @column: the specified table column, zero-indexed.
240 * Get a text description of a particular table column. This differs from
241 * AccessibleTable_getColumnHeader, which returns an #Accessible.
243 * Returns: a UTF-8 string describing the specified table column, if available.
247 AccessibleTable_getColumnDescription (AccessibleTable *obj,
251 Accessibility_Table_getColumnDescription (CSPI_OBJREF (obj),
252 (CORBA_long) column, cspi_ev ());
258 * AccessibleTable_getRowExtentAt:
259 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
260 * @row: the specified table row, zero-indexed.
261 * @column: the specified table column, zero-indexed.
263 * Get the number of rows spanned by the table cell at the specific row and column.
264 * (some tables can have cells which span multiple rows and/or columns).
266 * Returns: a long integer indicating the number of rows spanned by the specified cell.
270 AccessibleTable_getRowExtentAt (AccessibleTable *obj,
275 Accessibility_Table_getRowExtentAt (CSPI_OBJREF (obj),
276 (CORBA_long) row, (CORBA_long) column, cspi_ev ());
282 * AccessibleTable_getColumnExtentAt:
283 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
284 * @row: the specified table row, zero-indexed.
285 * @column: the specified table column, zero-indexed.
287 * Get the number of columns spanned by the table cell at the specific row and column.
288 * (some tables can have cells which span multiple rows and/or columns).
290 * Returns: a long integer indicating the number of columns spanned by the specified cell.
294 AccessibleTable_getColumnExtentAt (AccessibleTable *obj,
299 Accessibility_Table_getColumnExtentAt (CSPI_OBJREF (obj),
300 (CORBA_long) row, (CORBA_long) column, cspi_ev ());
305 * AccessibleTable_getRowHeader:
306 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
307 * @row: the specified table row, zero-indexed.
309 * Get the header associated with a table row, if available. This differs from
310 * AccessibleTable_getRowDescription, which returns a string.
312 * Returns: a #Accessible representatin of the specified table row, if available.
316 AccessibleTable_getRowHeader (AccessibleTable *obj,
319 return (Accessible *)
320 Accessibility_Table_getRowHeader (CSPI_OBJREF (obj),
321 (CORBA_long) row, cspi_ev ());
327 * AccessibleTable_getColumnHeader:
328 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
329 * @column: the specified table column, zero-indexed.
331 * Get the header associated with a table column, if available. This differs from
332 * AccessibleTable_getColumnDescription, which returns a string.
334 * Returns: a #Accessible representatin of the specified table column, if available.
338 AccessibleTable_getColumnHeader (AccessibleTable *obj,
341 return (Accessible *)
342 Accessibility_Table_getColumnHeader (CSPI_OBJREF (obj),
343 (CORBA_long) column, cspi_ev ());
348 * AccessibleTable_getNSelectedRows:
349 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
351 * Query a table to find out how many rows are currently selected. Not all tables
352 * support row selection.
354 * Returns: a long integer indicating the number of rows currently selected.
357 AccessibleTable_getNSelectedRows (AccessibleTable *obj)
360 Accessibility_Table__get_nSelectedRows (CSPI_OBJREF (obj), cspi_ev ());
366 * AccessibleTable_getSelectedRows:
367 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
368 * @selectedRows: a doubly indirected pointer which will be set to the address
369 * of an array of long integers, specifying which rows are currently selected.
371 * Query a table for a list of indices of rows which are currently selected.
373 * Returns: a long integer indicating the length of the array returned in @selectedRows.
376 AccessibleTable_getSelectedRows (AccessibleTable *obj,
377 long int **selectedRows)
379 Accessibility_LongSeq *rows = Accessibility_Table_getSelectedRows (CSPI_OBJREF (obj), cspi_ev ());
385 length = (long) rows->_length;
386 j = *selectedRows = (long *) malloc (sizeof(long)*length);
389 *j++ = (CORBA_long) (*i++);
391 length = rows->_length;
399 * AccessibleTable_getNSelectedColumns:
400 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
402 * Query a table to find out how many columnss are currently selected. Not all tables
403 * support column selection.
405 * Returns: a long integer indicating the number of columns currently selected.
408 AccessibleTable_getNSelectedColumns (AccessibleTable *obj)
411 Accessibility_Table__get_nSelectedColumns (CSPI_OBJREF (obj), cspi_ev ());
416 * AccessibleTable_getSelectedColumns:
417 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
418 * @selectedColumns: a doubly indirected pointer which will be set to the address
419 * of an array of long integers, specifying which columns are currently selected.
421 * Query a table for a list of indices of columns which are currently selected.
422 * Not all tables support column selection.
424 * Returns: a long integer indicating the length of the array returned in @selectedColumns.
427 AccessibleTable_getSelectedColumns (AccessibleTable *obj,
428 long int **selectedColumns)
430 Accessibility_LongSeq *columns = Accessibility_Table_getSelectedColumns (CSPI_OBJREF (obj), cspi_ev ());
435 i = columns->_buffer;
436 length = (long) columns->_length;
437 j = *selectedColumns = (long *) malloc (sizeof(long)*length);
440 *j++ = (CORBA_long) (*i++);
442 length = columns->_length;
443 CORBA_free (columns);
449 * AccessibleTable_isRowSelected:
450 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
453 * Determine whether a table row is selected. Not all tables support row selection.
455 * Returns: #TRUE if the specified row is currently selected, #FALSE if not.
459 AccessibleTable_isRowSelected (AccessibleTable *obj,
463 Accessibility_Table_isRowSelected (CSPI_OBJREF (obj),
464 (CORBA_long) row, cspi_ev ());
470 * AccessibleTable_isColumnSelected:
471 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
474 * Determine whether specified table column is selected.
475 * Not all tables support column selection.
477 * Returns: #TRUE if the specified column is currently selected, #FALSE if not.
481 AccessibleTable_isColumnSelected (AccessibleTable *obj,
485 Accessibility_Table_isColumnSelected (CSPI_OBJREF (obj),
486 (CORBA_long) column, cspi_ev ());
492 * AccessibleTable_isSelected:
493 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
497 * Determine whether the cell at a specific row and column is selected.
499 * Returns: #TRUE if the specified cell is currently selected, #FALSE if not.
503 AccessibleTable_isSelected (AccessibleTable *obj,
508 Accessibility_Table_isSelected (CSPI_OBJREF (obj),
509 (CORBA_long) row, (CORBA_long) column, cspi_ev ());