/** * AccessibleStreamableContent_open: * @obj: a pointer to the #AccessibleStreamableContent implementor on which to operate. * @content_type: a string specifying the content type to retrieve (should match one * of the return strings from #AccessibleStreamableContent_getContentTypes ()). * * Open a streaming connection to an AccessibleStreamableContent implementor, * of a particular content type. Note that a client may only have one * open stream per streamable interface instance in the current * implementation. * * @Since: AT-SPI 1.4 * * Returns: #TRUE if successful, #FALSE if unsuccessful. * **/ SPIBoolean AccessibleStreamableContent_open (AccessibleStreamableContent *obj, const char *content_type) { Accessibility_ContentStream stream; struct StreamCacheItem *cache; stream = Accessibility_StreamableContent_getStream (CSPI_OBJREF (obj), content_type, cspi_ev ()); cspi_return_val_if_ev ("getContent", FALSE); if (stream != CORBA_OBJECT_NIL) { cache = g_new0 (struct StreamCacheItem, 1); cache->stream = stream; cache->mimetype = CORBA_string_dup (content_type); g_hash_table_replace (get_streams (), CSPI_OBJREF (obj), cache); /* FIXME * This limits us to one concurrent stream per streamable interface * for a given client. * It might be reasonable for a client to open more than one stream * to content, in different mime-types, at the same time. */ return TRUE; }
/** * AccessibleTable_getSummary: * @obj: a pointer to the #AccessibleTable implementor on which to operate. * * Get an accessible object which summarizes the contents of an #AccessibleTable. * * Returns: an #Accessible object that serves as the table's summary (often a * reduced #AccessibleTable). **/ Accessible * AccessibleTable_getSummary (AccessibleTable *obj) { Accessible *retval; cspi_return_val_if_fail (obj != NULL, NULL); retval = cspi_object_add ( Accessibility_Table__get_summary (CSPI_OBJREF (obj), cspi_ev ())); cspi_return_val_if_ev ("getSummary", NULL); return retval; }
/** * AccessibleImage_getImageDescription: * @obj: a pointer to the #AccessibleImage implementor on which to operate. * * Get the description of the image displayed in an #AccessibleImage object. * * Returns: a UTF-8 string describing the image. **/ char * AccessibleImage_getImageDescription (AccessibleImage *obj) { char *retval; cspi_return_val_if_fail (obj != NULL, NULL); cspi_dbus_get_property (obj, spi_interface_image, "description", NULL, "s", &retval); cspi_return_val_if_ev ("getImageDescription", NULL); return retval; }
/** * AccessibleImage_getImageLocale: * @obj: The #AccessibleImage being queried. * * Get the locale associated with an image and its textual representation. * * Returns: A POSIX LC_MESSAGES-style Locale value for image description and text. **/ char * AccessibleImage_getImageLocale (AccessibleImage *obj) { char *retval = "C"; cspi_return_val_if_fail (obj != NULL, "C"); cspi_dbus_get_property (obj, spi_interface_image, "imageLocale", NULL, "=>s", &retval); cspi_return_val_if_ev ("getImageLocale", NULL); return retval; }
/** * AccessibleAction_getNActions: * @obj: a pointer to the #AccessibleAction to query. * * Get the number of actions invokable on an #AccessibleAction implementor. * * Returns: a #long integer indicatin the number of invokable actions. **/ long AccessibleAction_getNActions (AccessibleAction *obj) { dbus_int32_t retval; cspi_return_val_if_fail (obj != NULL, -1); cspi_dbus_get_property (obj, spi_interface_action, "nActions", NULL, "i", &retval); cspi_return_val_if_ev ("getNActions", -1); return retval; }
/** * AccessibleHypertext_getNLinks: * @obj: a pointer to the #AccessibleHypertext implementor on which to operate. * * Get the total number of #AccessibleHyperlinks which an * #AccessibleHypertext implementor has. * * Returns: a #long indicating the number of #AccessibleHyperlinks * of the #AccessibleHypertext implementor, or -1 if * the number cannot be determined (for example, if the * #AccessibleHypertext object is so large that it is not * all currently in the memory cache). **/ long AccessibleHypertext_getNLinks (AccessibleHypertext *obj) { dbus_int32_t retval; cspi_return_val_if_fail (obj != NULL, FALSE); cspi_dbus_call (obj, spi_interface_hypertext, "getNLinks", NULL, "=>i", &retval); cspi_return_val_if_ev ("getNLinks", -1); return retval; }
/** * AccessibleAction_getDescription: * @obj: a pointer to the #AccessibleAction implementor to query. * @i: a long integer indicating which action to query. * * Get the description of '@i-th' action invokable on an * object implementing #AccessibleAction. * * Returns: a UTF-8 string describing the '@i-th' invokable action. **/ char * AccessibleAction_getDescription (AccessibleAction *obj, long int i) { dbus_int32_t d_i = i; char *retval; cspi_return_val_if_fail (obj != NULL, NULL); cspi_dbus_call (obj, spi_interface_action, "getDescription", NULL, "i=>s", d_i, &retval); cspi_return_val_if_ev ("getDescription", NULL); return retval; }
/** * AccessibleHyperlink_isValid: * @obj: a pointer to the #AccessibleHyperlink on which to operate. * * Tell whether an #AccessibleHyperlink object is still valid with respect to its * originating hypertext object. * * Returns: #TRUE of the specified #AccessibleHyperlink is still valid with respect * to its originating #AccessibleHypertext object, #FALSE otherwise. **/ SPIBoolean AccessibleHyperlink_isValid (AccessibleHyperlink *obj) { SPIBoolean retval; cspi_return_val_if_fail (obj != NULL, FALSE); retval = Accessibility_Hyperlink_isValid (CSPI_OBJREF (obj), cspi_ev ()); cspi_return_val_if_ev ("isValid", FALSE); return retval; }
/** * AccessibleHyperlink_getNAnchors: * @obj: a pointer to the #AccessibleHyperlink object on which to operate. * * Get the total number of anchors which an #AccessibleHyperlink implementor has. * Though typical hyperlinks have only one anchor, client-side image maps and * other hypertext objects may potentially activate or refer to multiple * URIs. For each anchor there is a corresponding URI and object. * @see AccessibleHyperlink_getURI() and AccessibleHyperlink_getObject(). * * Returns: a #long indicating the number of anchors in this hyperlink. **/ long AccessibleHyperlink_getNAnchors (AccessibleHyperlink *obj) { long retval; cspi_return_val_if_fail (obj != NULL, -1); retval = Accessibility_Hyperlink__get_nAnchors (CSPI_OBJREF (obj), cspi_ev ()); cspi_return_val_if_ev ("getNAnchors", -1); return retval; }
/** * AccessibleTable_getNSelectedColumns: * @obj: a pointer to the #AccessibleTable implementor on which to operate. * * Query a table to find out how many columns are currently selected. Not all tables * support column selection. * * Returns: a long integer indicating the number of columns currently selected. **/ long AccessibleTable_getNSelectedColumns (AccessibleTable *obj) { long retval; cspi_return_val_if_fail (obj != NULL, -1); retval = Accessibility_Table__get_nSelectedColumns (CSPI_OBJREF (obj), cspi_ev ()); cspi_return_val_if_ev ("getNSelectedColumns", -1); return retval; }
/** * AccessibleTable_getSelectedColumns: * @obj: a pointer to the #AccessibleTable implementor on which to operate. * @selectedColumns: a doubly indirected pointer which will be set to the address * of an array of long integers, specifying which columns are currently selected. * * Query a table for a list of indices of columns which are currently selected. * Not all tables support column selection. * * Returns: a long integer indicating the length of the array returned in @selectedColumns. **/ long AccessibleTable_getSelectedColumns (AccessibleTable *obj, long int **selectedColumns) { Accessibility_LongSeq *columns; *selectedColumns = NULL; cspi_return_val_if_fail (obj != NULL, 0); columns = Accessibility_Table_getSelectedColumns (CSPI_OBJREF (obj), cspi_ev ()); cspi_return_val_if_ev ("getSelectedColumns", -1); return cspi_long_seq_to_array (columns, selectedColumns); }
/** * AccessibleAction_doAction: * @obj: a pointer to the #AccessibleAction to query. * @i: an integer specifying which action to invoke. * * Invoke the action indicated by #index. * * Returns: #TRUE if the action is successfully invoked, otherwise #FALSE. **/ SPIBoolean AccessibleAction_doAction (AccessibleAction *obj, long int i) { dbus_int32_t d_i = i; dbus_bool_t retval; cspi_return_val_if_fail (obj != NULL, FALSE); cspi_dbus_call (obj, spi_interface_action, "doAction", NULL, "i=>b", d_i, &retval); cspi_return_val_if_ev ("doAction", FALSE); return retval; }
/** * AccessibleTable_getColumnHeader: * @obj: a pointer to the #AccessibleTable implementor on which to operate. * @column: the specified table column, zero-indexed. * * Get the header associated with a table column, if available. This differs from * AccessibleTable_getColumnDescription, which returns a string. * * Returns: a #Accessible representatin of the specified table column, if available. **/ Accessible * AccessibleTable_getColumnHeader (AccessibleTable *obj, long int column) { Accessible *retval; cspi_return_val_if_fail (obj != NULL, NULL); retval = cspi_object_add ( Accessibility_Table_getColumnHeader (CSPI_OBJREF (obj), column, cspi_ev ())); cspi_return_val_if_ev ("getColumnHeader", NULL); return retval; }
/** * AccessibleHypertext_getLinkIndex: * @obj: a pointer to the #AccessibleHypertext implementor on which to operate. * @characterOffset: an integer specifying the character offset to query. * * Get the index of the #AccessibleHyperlink object at a specified * character offset. * * Returns: the linkIndex of the #AccessibleHyperlink active at * character offset @characterOffset, or -1 if there is * no hyperlink at the specified character offset. **/ long AccessibleHypertext_getLinkIndex (AccessibleHypertext *obj, long int characterOffset) { dbus_int32_t d_characterOffset = characterOffset; dbus_int32_t retval; cspi_return_val_if_fail (obj != NULL, -1); cspi_dbus_call (obj, spi_interface_hypertext, "getLinkIndex", NULL, "i=>i", d_characterOffset, &retval); cspi_return_val_if_ev ("getLinkIndex", -1); return retval; }
/** * AccessibleTable_getColumnAtIndex: * @obj: a pointer to the #AccessibleTable implementor on which to operate. * @index: the specified child index, zero-indexed. * * Get the table column index occupied by the child at a particular 1-D child index. * * @see #AccessibleTable_getIndexAt(), #AccessibleTable_getRowAtIndex() * * Returns: a long integer indicating the first column spanned by the child of a * table, at the specified 1-D (zero-offset) @index. **/ long AccessibleTable_getColumnAtIndex (AccessibleTable *obj, long index) { long retval; cspi_return_val_if_fail (obj != NULL, -1); retval = Accessibility_Table_getColumnAtIndex (CSPI_OBJREF (obj), index, cspi_ev ()); cspi_return_val_if_ev ("getColumnAtIndex", -1); return retval; }
/** * AccessibleTable_addRowSelection: * @obj: a pointer to the #AccessibleTable implementor on which to operate. * @row: the zero-indexed row number of the row being selected. * * Select the specified row, adding it to the current row selection. * Not all tables support row selection. * * Returns: #TRUE if the specified row was successfully selected, #FALSE if not. **/ SPIBoolean AccessibleTable_addRowSelection (AccessibleTable *obj, long int row) { SPIBoolean retval; cspi_return_val_if_fail (obj != NULL, FALSE); retval = Accessibility_Table_addRowSelection (CSPI_OBJREF (obj), row, cspi_ev ()); cspi_return_val_if_ev ("addRowSelection", FALSE); return retval; }
/** * AccessibleHyperlink_getURI: * @obj: a pointer to the #AccessibleHyperlink implementor on which to operate. * @i: a (zero-index) long integer indicating which hyperlink anchor to query. * * Get the URI associated with a particular hyperlink anchor. * * Returns: a UTF-8 string giving the URI of the @ith hyperlink anchor. **/ char * AccessibleHyperlink_getURI (AccessibleHyperlink *obj, long int i) { char *retval; cspi_return_val_if_fail (obj != NULL, NULL); retval = Accessibility_Hyperlink_getURI (CSPI_OBJREF (obj), i, cspi_ev ()); cspi_return_val_if_ev ("getURI", NULL); return retval; }
/** * AccessibleTable_removeColumnSelection: * @obj: a pointer to the #AccessibleTable implementor on which to operate. * @column: the zero-indexed column number of the column being de-selected. * * De-select the specified column, removing it to the current column selection. * Not all tables support column selection. * * Returns: #TRUE if the specified column was successfully de-selected, #FALSE if not. **/ SPIBoolean AccessibleTable_removeColumnSelection (AccessibleTable *obj, long int column) { SPIBoolean retval; cspi_return_val_if_fail (obj != NULL, FALSE); retval = Accessibility_Table_removeColumnSelection (CSPI_OBJREF (obj), column, cspi_ev ()); cspi_return_val_if_ev ("removeColumnSelection", FALSE); return retval; }
/** * AccessibleTable_getColumnDescription: * @obj: a pointer to the #AccessibleTable implementor on which to operate. * @column: the specified table column, zero-indexed. * * Get a text description of a particular table column. This differs from * AccessibleTable_getColumnHeader, which returns an #Accessible. * * Returns: a UTF-8 string describing the specified table column, if available. **/ char * AccessibleTable_getColumnDescription (AccessibleTable *obj, long int column) { char *retval; cspi_return_val_if_fail (obj != NULL, NULL); retval = Accessibility_Table_getColumnDescription (CSPI_OBJREF (obj), column, cspi_ev ()); cspi_return_val_if_ev ("getColumnDescription", NULL); return retval; }
/** * AccessibleTable_getColumnExtentAt: * @obj: a pointer to the #AccessibleTable implementor on which to operate. * @row: the specified table row, zero-indexed. * @column: the specified table column, zero-indexed. * * Get the number of columns spanned by the table cell at the specific row and column. * (some tables can have cells which span multiple rows and/or columns). * * Returns: a long integer indicating the number of columns spanned by the specified cell. **/ long AccessibleTable_getColumnExtentAt (AccessibleTable *obj, long int row, long int column) { long retval; cspi_return_val_if_fail (obj != NULL, -1); retval = Accessibility_Table_getColumnExtentAt ( CSPI_OBJREF (obj), row, column, cspi_ev ()); cspi_return_val_if_ev ("getColumnExtentAt", -1); return retval; }
/** * AccessibleTable_isSelected: * @obj: a pointer to the #AccessibleTable implementor on which to operate. * @row: the zero-indexed row of the cell being queried. * @column: the zero-indexed column of the cell being queried. * * Determine whether the cell at a specific row and column is selected. * * Returns: #TRUE if the specified cell is currently selected, #FALSE if not. **/ SPIBoolean AccessibleTable_isSelected (AccessibleTable *obj, long int row, long int column) { SPIBoolean retval; cspi_return_val_if_fail (obj != NULL, FALSE); retval = Accessibility_Table_isSelected (CSPI_OBJREF (obj), row, column, cspi_ev ()); cspi_return_val_if_ev ("isSelected", FALSE); return retval; }
/** * AccessibleHypertext_getLink: * @obj: a pointer to the #AccessibleHypertext implementor on which to operate. * @linkIndex: a (zero-index) long integer indicating which hyperlink to query. * * Get the #AccessibleHyperlink object at a specified index. * * Returns: the #AccessibleHyperlink object specified by #linkIndex. **/ AccessibleHyperlink * AccessibleHypertext_getLink (AccessibleHypertext *obj, long int linkIndex) { dbus_int32_t d_linkIndex = linkIndex; char *path; AccessibleHyperlink *retval; cspi_return_val_if_fail (obj != NULL, NULL); cspi_dbus_call (obj, spi_interface_hypertext, "getLink", NULL, "i=>o", d_linkIndex, &path); cspi_return_val_if_ev ("getLink", NULL); retval = cspi_ref_related_accessible (obj, path); g_free (path); return retval; }