![]() |
![]() |
![]() |
AT-SPI C Bindings Reference Manual | ![]() |
---|---|---|---|---|
Accessible ObjectsAccessible Objects — The base accessibility interface which all accessible objects implement. |
struct Accessible; void Accessible_ref (Accessible *obj); void Accessible_unref (Accessible *obj); char* Accessible_getName (Accessible *obj); char* Accessible_getDescription (Accessible *obj); Accessible* Accessible_getParent (Accessible *obj); long Accessible_getChildCount (Accessible *obj); Accessible* Accessible_getChildAtIndex (Accessible *obj, long int childIndex); long Accessible_getIndexInParent (Accessible *obj); AccessibleRelation** Accessible_getRelationSet (Accessible *obj); AccessibleRole Accessible_getRole (Accessible *obj); char* Accessible_getRoleName (Accessible *obj); AccessibleStateSet* Accessible_getStateSet (Accessible *obj); AccessibleAttributeSet* Accessible_getAttributes (Accessible *obj); AccessibleApplication* Accessible_getHostApplication (Accessible *obj); char* Accessible_getLocalizedRoleName (Accessible *obj); SPIBoolean Accessible_isAction (Accessible *obj); SPIBoolean Accessible_isApplication (Accessible *obj); SPIBoolean Accessible_isComponent (Accessible *obj); SPIBoolean Accessible_isDocument (Accessible *obj); SPIBoolean Accessible_isEditableText (Accessible *obj); SPIBoolean Accessible_isHypertext (Accessible *obj); SPIBoolean Accessible_isImage (Accessible *obj); SPIBoolean Accessible_isSelection (Accessible *obj); SPIBoolean Accessible_isStreamableContent (Accessible *obj); SPIBoolean Accessible_isTable (Accessible *obj); SPIBoolean Accessible_isText (Accessible *obj); SPIBoolean Accessible_isValue (Accessible *obj); AccessibleAction* Accessible_getAction (Accessible *obj); AccessibleApplication* Accessible_getApplication (Accessible *obj); AccessibleComponent* Accessible_getComponent (Accessible *obj); AccessibleDocument* Accessible_getDocument (Accessible *obj); AccessibleEditableText* Accessible_getEditableText (Accessible *obj); AccessibleHypertext* Accessible_getHypertext (Accessible *obj); AccessibleImage* Accessible_getImage (Accessible *obj); AccessibleSelection* Accessible_getSelection (Accessible *obj); AccessibleStreamableContent* Accessible_getStreamableContent (Accessible *obj); AccessibleTable* Accessible_getTable (Accessible *obj); AccessibleText* Accessible_getText (Accessible *obj); AccessibleValue* Accessible_getValue (Accessible *obj); AccessibleUnknown* Accessible_queryInterface (Accessible *obj, const char *interface_name); enum AccessibleRole; char* AccessibleRole_getName (AccessibleRole role);
The Accessible interface provides for a hierarchical tree of accessible objects corresponding to user interface components and content in an accessible application. Accessible objects provide name, descriptive information, state information, and information on the "role" of the object in the user interface. The capabilities of these objects may be queried via interface queries, as they are implemented via interface aggregation. These objects are located in a containment hierarchy with parent/child relationships, and may have other functional relationships to objects within the tree.
struct Accessible { CORBA_Object objref; /* And some other bits */ guint on_loan : 1; guint ref_count : 30; };
An Accessible object is an opaque object used to refer to an accessible object corresponding to an user interface element.
void Accessible_ref (Accessible *obj);
Increment the reference count for an Accessible object.
obj : |
a pointer to the Accessible object on which to operate. |
void Accessible_unref (Accessible *obj);
Decrement the reference count for an Accessible object.
obj : |
a pointer to the Accessible object on which to operate. |
char* Accessible_getName (Accessible *obj);
Get the name of an Accessible object.
obj : |
a pointer to the Accessible object on which to operate. |
Returns : | a UTF-8 string indicating the name of the Accessible object. or NULL on exception |
char* Accessible_getDescription (Accessible *obj);
Get the description of an Accessible object.
obj : |
a pointer to the Accessible object on which to operate. |
Returns : | a UTF-8 string describing the Accessible object. or NULL on exception |
Accessible* Accessible_getParent (Accessible *obj);
Get an Accessible object's parent container.
obj : |
a pointer to the Accessible object to query. |
Returns : | a pointer tothe Accessible object which contains the given
Accessible instance, or NULL if the obj has no parent container.
|
long Accessible_getChildCount (Accessible *obj);
Get the number of children contained by an Accessible object.
obj : |
a pointer to the Accessible object on which to operate. |
Returns : | a long indicating the number of Accessible children contained by an Accessible object. or -1 on exception |
Accessible* Accessible_getChildAtIndex (Accessible *obj, long int childIndex);
Get the Accessible child of an Accessible object at a given index.
obj : |
a pointer to the Accessible object on which to operate. |
childIndex : |
a long indicating which child is specified. |
Returns : | a pointer to the Accessible child object at index
childIndex . or NULL on exception
|
long Accessible_getIndexInParent (Accessible *obj);
Get the index of an Accessible object in its containing Accessible.
obj : |
a pointer to the Accessible object on which to operate. |
Returns : | a long indicating the index of the Accessible object
in its parent (i.e. containing) Accessible instance,
or -1 if obj has no containing parent or on exception.
|
AccessibleRelation** Accessible_getRelationSet (Accessible *obj);
Get the set of AccessibleRelation objects which describe this Accessible object's relationships with other Accessible objects.
obj : |
a pointer to the Accessible object on which to operate. |
Returns : | an array of AccessibleRelation pointers. or NULL on exception |
AccessibleRole Accessible_getRole (Accessible *obj);
Get the UI role of an Accessible object.
A UTF-8 string describing this role can be obtained via Accessible_getRoleName()
.
obj : |
a pointer to the Accessible object on which to operate. |
Returns : | the AccessibleRole of the object. |
char* Accessible_getRoleName (Accessible *obj);
Get a UTF-8 string describing the role this object plays in the UI.
This method will return useful values for roles that fall outside the
enumeration used in Accessible_getRole()
.
obj : |
a pointer to the Accessible object on which to operate. |
Returns : | a UTF-8 string specifying the role of this Accessible object. |
AccessibleStateSet* Accessible_getStateSet (Accessible *obj);
Gets the current state of an object.
obj : |
a pointer to the Accessible object on which to operate. |
Returns : | a pointer to an AccessibleStateSet representing the object's current state. |
AccessibleAttributeSet* Accessible_getAttributes (Accessible *obj);
Get the AttributeSet representing any assigned name-value pair attributes or annotations for this object. For typographic, textual, or textually-semantic attributes, see AccessibleText_getAttributes instead.
obj : |
The Accessible being queried. |
Returns : | The name-value-pair attributes assigned to this object. |
AccessibleApplication* Accessible_getHostApplication (Accessible *obj);
Get the containing AccessibleApplication for an object.
obj : |
The Accessible being queried. |
Returns : | the containing AccessibleApplication instance for this object. |
char* Accessible_getLocalizedRoleName (Accessible *obj);
Get a UTF-8 string describing the (localized) role this object plays in the UI.
This method will return useful values for roles that fall outside the
enumeration used in Accessible_getRole()
.
Since
: AT-SPI 1.4
obj : |
a pointer to the Accessible object on which to operate. |
Returns : | a UTF-8 string specifying the role of this Accessible object. |
SPIBoolean Accessible_isAction (Accessible *obj);
Query whether the specified Accessible implements AccessibleAction.
obj : |
a pointer to the Accessible instance to query. |
Returns : | TRUE if obj implements the AccessibleAction interface,
FALSE otherwise.
|
SPIBoolean Accessible_isApplication (Accessible *obj);
Query whether the specified Accessible implements AccessibleApplication.
obj : |
a pointer to the Accessible instance to query. |
Returns : | TRUE if obj implements the AccessibleApplication interface,
FALSE otherwise.
|
SPIBoolean Accessible_isComponent (Accessible *obj);
Query whether the specified Accessible implements AccessibleComponent.
obj : |
a pointer to the Accessible instance to query. |
Returns : | TRUE if obj implements the AccessibleComponent interface,
FALSE otherwise.
|
SPIBoolean Accessible_isDocument (Accessible *obj);
Query whether the specified Accessible implements AccessibleDocument.
obj : |
a pointer to the Accessible instance to query. |
Returns : | TRUE if obj implements the AccessibleDocument interface,
FALSE otherwise.
|
SPIBoolean Accessible_isEditableText (Accessible *obj);
Query whether the specified Accessible implements AccessibleEditableText.
obj : |
a pointer to the Accessible instance to query. |
Returns : | TRUE if obj implements the AccessibleEditableText interface,
FALSE otherwise.
|
SPIBoolean Accessible_isHypertext (Accessible *obj);
Query whether the specified Accessible implements AccessibleHypertext.
obj : |
a pointer to the Accessible instance to query. |
Returns : | TRUE if obj implements the AccessibleHypertext interface,
FALSE otherwise.
|
SPIBoolean Accessible_isImage (Accessible *obj);
Query whether the specified Accessible implements AccessibleImage.
obj : |
a pointer to the Accessible instance to query. |
Returns : | TRUE if obj implements the AccessibleImage interface,
FALSE otherwise.
|
SPIBoolean Accessible_isSelection (Accessible *obj);
Query whether the specified Accessible implements AccessibleSelection.
obj : |
a pointer to the Accessible instance to query. |
Returns : | TRUE if obj implements the AccessibleSelection interface,
FALSE otherwise.
|
SPIBoolean Accessible_isStreamableContent (Accessible *obj);
Query whether the specified Accessible implements AccessibleStreamableContent.
obj : |
a pointer to the Accessible instance to query. |
Returns : | TRUE if obj implements the AccessibleStreamableContent interface,
FALSE otherwise.
|
SPIBoolean Accessible_isTable (Accessible *obj);
Query whether the specified Accessible implements AccessibleTable.
obj : |
a pointer to the Accessible instance to query. |
Returns : | TRUE if obj implements the AccessibleTable interface,
FALSE otherwise.
|
SPIBoolean Accessible_isText (Accessible *obj);
Query whether the specified Accessible implements AccessibleText.
obj : |
a pointer to the Accessible instance to query. |
Returns : | TRUE if obj implements the AccessibleText interface,
FALSE otherwise.
|
SPIBoolean Accessible_isValue (Accessible *obj);
Query whether the specified Accessible implements AccessibleValue.
obj : |
a pointer to the Accessible instance to query. |
Returns : | TRUE if obj implements the AccessibleValue interface,
FALSE otherwise.
|
AccessibleAction* Accessible_getAction (Accessible *obj);
Get the AccessibleAction interface for an Accessible.
obj : |
a pointer to the Accessible instance to query. |
Returns : | a pointer to an AccessibleAction interface instance, or
NULL if obj does not implement AccessibleAction.
|
AccessibleApplication* Accessible_getApplication (Accessible *obj);
Get the AccessibleApplication interface for an Accessible.
obj : |
a pointer to the Accessible instance to query. |
Returns : | a pointer to an AccessibleApplication interface instance, or
NULL if obj does not implement AccessibleApplication.
|
AccessibleComponent* Accessible_getComponent (Accessible *obj);
Get the AccessibleComponent interface for an Accessible.
obj : |
a pointer to the Accessible instance to query. |
Returns : | a pointer to an AccessibleComponent interface instance, or
NULL if obj does not implement AccessibleComponent.
|
AccessibleDocument* Accessible_getDocument (Accessible *obj);
Get the AccessibleDocument interface for an Accessible.
obj : |
a pointer to the Accessible instance to query. |
Returns : | a pointer to an AccessibleDocument interface instance, or
NULL if obj does not implement AccessibleDocument.
|
AccessibleEditableText* Accessible_getEditableText (Accessible *obj);
Get the AccessibleEditableText interface for an Accessible.
obj : |
a pointer to the Accessible instance to query. |
Returns : | a pointer to an AccessibleEditableText interface instance, or
NULL if obj does not implement AccessibleEditableText.
|
AccessibleHypertext* Accessible_getHypertext (Accessible *obj);
Get the AccessibleHypertext interface for an Accessible.
obj : |
a pointer to the Accessible instance to query. |
Returns : | a pointer to an AccessibleHypertext interface instance, or
NULL if obj does not implement AccessibleHypertext.
|
AccessibleImage* Accessible_getImage (Accessible *obj);
Get the AccessibleImage interface for an Accessible.
obj : |
a pointer to the Accessible instance to query. |
Returns : | a pointer to an AccessibleImage interface instance, or
NULL if obj does not implement AccessibleImage.
|
AccessibleSelection* Accessible_getSelection (Accessible *obj);
Get the AccessibleSelection interface for an Accessible.
obj : |
a pointer to the Accessible instance to query. |
Returns : | a pointer to an AccessibleSelection interface instance, or
NULL if obj does not implement AccessibleSelection.
|
AccessibleStreamableContent* Accessible_getStreamableContent (Accessible *obj);
Get the AccessibleStreamableContent interface for an Accessible.
obj : |
a pointer to the Accessible instance to query. |
Returns : | a pointer to an AccessibleStreamableContent interface instance, or
NULL if obj does not implement AccessibleStreamableContent.
|
AccessibleTable* Accessible_getTable (Accessible *obj);
Get the AccessibleTable interface for an Accessible.
obj : |
a pointer to the Accessible instance to query. |
Returns : | a pointer to an AccessibleTable interface instance, or
NULL if obj does not implement AccessibleTable.
|
AccessibleText* Accessible_getText (Accessible *obj);
Get the AccessibleText interface for an Accessible.
obj : |
a pointer to the Accessible instance to query. |
Returns : | a pointer to an AccessibleText interface instance, or
NULL if obj does not implement AccessibleText.
|
AccessibleValue* Accessible_getValue (Accessible *obj);
Get the AccessibleValue interface for an Accessible.
obj : |
a pointer to the Accessible instance to query. |
Returns : | a pointer to an AccessibleValue interface instance, or
NULL if obj does not implement AccessibleValue.
|
AccessibleUnknown* Accessible_queryInterface (Accessible *obj, const char *interface_name);
Query an Accessible object to for a named interface.
obj : |
a pointer to the Accessible instance to query. |
interface_name : |
a UTF-8 character string specifiying the requested interface. |
Returns : | an instance of the named interface object, if it is implemented
by obj , or NULL otherwise.
|
typedef enum { SPI_ROLE_INVALID, SPI_ROLE_ACCEL_LABEL, SPI_ROLE_ALERT, SPI_ROLE_ANIMATION, SPI_ROLE_ARROW, SPI_ROLE_CALENDAR, SPI_ROLE_CANVAS, SPI_ROLE_CHECK_BOX, SPI_ROLE_CHECK_MENU_ITEM, SPI_ROLE_COLOR_CHOOSER, SPI_ROLE_COLUMN_HEADER, SPI_ROLE_COMBO_BOX, SPI_ROLE_DATE_EDITOR, SPI_ROLE_DESKTOP_ICON, SPI_ROLE_DESKTOP_FRAME, SPI_ROLE_DIAL, SPI_ROLE_DIALOG, SPI_ROLE_DIRECTORY_PANE, SPI_ROLE_DRAWING_AREA, SPI_ROLE_FILE_CHOOSER, SPI_ROLE_FILLER, SPI_ROLE_FONT_CHOOSER, SPI_ROLE_FRAME, SPI_ROLE_GLASS_PANE, SPI_ROLE_HTML_CONTAINER, SPI_ROLE_ICON, SPI_ROLE_IMAGE, SPI_ROLE_INTERNAL_FRAME, SPI_ROLE_LABEL, SPI_ROLE_LAYERED_PANE, SPI_ROLE_LIST, SPI_ROLE_LIST_ITEM, SPI_ROLE_MENU, SPI_ROLE_MENU_BAR, SPI_ROLE_MENU_ITEM, SPI_ROLE_OPTION_PANE, SPI_ROLE_PAGE_TAB, SPI_ROLE_PAGE_TAB_LIST, SPI_ROLE_PANEL, SPI_ROLE_PASSWORD_TEXT, SPI_ROLE_POPUP_MENU, SPI_ROLE_PROGRESS_BAR, SPI_ROLE_PUSH_BUTTON, SPI_ROLE_RADIO_BUTTON, SPI_ROLE_RADIO_MENU_ITEM, SPI_ROLE_ROOT_PANE, SPI_ROLE_ROW_HEADER, SPI_ROLE_SCROLL_BAR, SPI_ROLE_SCROLL_PANE, SPI_ROLE_SEPARATOR, SPI_ROLE_SLIDER, SPI_ROLE_SPIN_BUTTON, SPI_ROLE_SPLIT_PANE, SPI_ROLE_STATUS_BAR, SPI_ROLE_TABLE, SPI_ROLE_TABLE_CELL, SPI_ROLE_TABLE_COLUMN_HEADER, SPI_ROLE_TABLE_ROW_HEADER, SPI_ROLE_TEAROFF_MENU_ITEM, SPI_ROLE_TERMINAL, SPI_ROLE_TEXT, SPI_ROLE_TOGGLE_BUTTON, SPI_ROLE_TOOL_BAR, SPI_ROLE_TOOL_TIP, SPI_ROLE_TREE, SPI_ROLE_TREE_TABLE, SPI_ROLE_UNKNOWN, SPI_ROLE_VIEWPORT, SPI_ROLE_WINDOW, SPI_ROLE_EXTENDED, SPI_ROLE_HEADER, SPI_ROLE_FOOTER, SPI_ROLE_PARAGRAPH, SPI_ROLE_RULER, SPI_ROLE_APPLICATION, SPI_ROLE_AUTOCOMPLETE, SPI_ROLE_EDITBAR, SPI_ROLE_EMBEDDED, SPI_ROLE_ENTRY, SPI_ROLE_CHART, SPI_ROLE_CAPTION, SPI_ROLE_DOCUMENT_FRAME, SPI_ROLE_HEADING, SPI_ROLE_PAGE, SPI_ROLE_SECTION, SPI_ROLE_FORM, SPI_ROLE_REDUNDANT_OBJECT, SPI_ROLE_LINK, SPI_ROLE_INPUT_METHOD_WINDOW, SPI_ROLE_LAST_DEFINED } AccessibleRole;
Describes the role of an object
These are the built-in enumerated roles that UI components can have. Other roles may be added at runtime, so an AccessibleRole >= SPI_ROLE_LAST_DEFINED is not necessarily an error.
char* AccessibleRole_getName (AccessibleRole role);
Get a localizeable string that indicates the name of an AccessibleRole. <em>DEPRECATED.</em>
role : |
an AccessibleRole object to query. |
Returns : | a localizable string name for an AccessibleRole enumerated type. |