Beispiel #1
0
/**
 * AccessibleHyperlink_getObject:
 * @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 object associated with a particular hyperlink anchor, as an #Accessible. 
 *
 * Returns: an #Accessible that represents the object associated with the @ith anchor
 *        of the specified #AccessibleHyperlink.
 **/
Accessible*
AccessibleHyperlink_getObject (AccessibleHyperlink *obj,
                               long int             i)
{
  cspi_return_val_if_fail (obj != NULL, NULL);

  return cspi_object_add (
    Accessibility_Hyperlink_getObject (CSPI_OBJREF (obj),
				       i, cspi_ev ()));
}
Beispiel #2
0
/**
 * 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;
}
/**
 * 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;
}
/**
 * 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;
}
/**
 * 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;
}
/**
 * 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;
}
/**
 * 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;
}
Beispiel #8
0
/**
 * 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;
}
Beispiel #9
0
/**
 * 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;
}
Beispiel #10
0
/**
 * 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;
}
/**
 * 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;
}
/**
 * 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;
}
Beispiel #13
0
/**
 * 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;
}
Beispiel #14
0
/**
 * 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);
}
Beispiel #15
0
/**
 * 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;
}
Beispiel #16
0
/**
 * 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;
}
Beispiel #17
0
/**
 * 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;
}
Beispiel #18
0
/**
 * 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;
}
Beispiel #19
0
/**
 * 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;
}
Beispiel #20
0
/**
 * 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;
}
Beispiel #21
0
/**
 * 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;
}
Beispiel #23
0
/**
 * AccessibleTable_getRowColumnExtentsAtIndex:
 * @obj: a pointer to the #AccessibleTable implementor on which to operate.
 * @index: the index of the Table child whose row/column 
 * extents are requested.
 * @row: back-filled with the first table row associated with
 * the cell with child index \c index.
 * @col: back-filled with the first table column associated 
 * with the cell with child index \c index.
 * @row_extents: back-filled with the number of table rows 
 * across which child \c i extends.
 * @col_extents: back-filled with the number of table columns
 * across which child \c i extends.
 * @is_selected: a boolean which is back-filled with \c True
 * if the child at index \c i corresponds to a selected table cell,
 * \c False otherwise.
 *
 * Given a child index, determine the row and column indices and 
 * extents, and whether the cell is currently selected.  If
 * the child at \c index is not a cell (for instance, if it is 
 * a summary, caption, etc.), \c False is returned.
 *
 * Example:
 * If the Table child at index '6' extends across columns 5 and 6 of
 * row 2 of a Table instance, and is currently selected, then
 * 
 * retval = table::getRowColumnExtentsAtIndex (6, row, col, 
 *                                             row_extents,
 *                                             col_extents,
 *                                             is_selected);
 * 
 * will return True, and after the call
 * row, col, row_extents, col_extents,
 * and \c is_selected will contain 2, 5, 1, 2, and 
 * True, respectively.
 *
 * Returns: \c True if the index is associated with a valid table
 * cell, \c False if the index does not correspond to a cell.  If 
 * \c False is returned, the values of the out parameters are 
 * undefined.
 * 
 * Since AT-SPI 1.7.0
 **/
SPIBoolean
AccessibleTable_getRowColumnExtentsAtIndex (AccessibleTable *obj,
					    long int index, long int *row, long int *col, 
					    long int *row_extents, long int *col_extents, 
					    long int *is_selected){
  SPIBoolean retval;
  CORBA_long cRow,  cCol, cRow_extents, cCol_extents; 
  CORBA_boolean cIs_selected;

  cspi_return_val_if_fail (obj != NULL, FALSE);

  retval = Accessibility_Table_getRowColumnExtentsAtIndex (CSPI_OBJREF (obj),
							   index, &cRow, &cCol,
							   &cRow_extents, &cCol_extents,
							   &cIs_selected,
							   cspi_ev ());

  if (!cspi_check_ev ("getRowColumnExtentsAtIndex")){
    
    *row = 0;
    *col = 0;
    *row_extents = 0;
    *col_extents = 0;
    *is_selected = FALSE;
    retval = FALSE;
  }

  else {
    *row = cRow;
    *col = cCol;
    *row_extents = cRow_extents;;
    *col_extents = cCol_extents;
    *is_selected = cIs_selected;;
  }
  
  return retval;

}