Package AccessEngine :: Package AEAccAdapters :: Package ATSPI :: Module DefaultInfo :: Class DefaultAccInfoAdapter
[hide private]
[frames] | no frames]

Class DefaultAccInfoAdapter

source code

               object --+        
                        |        
AEAccAdapter.AEAccAdapter --+    
                            |    
      AEAccAdapter.PORAdapter --+
                                |
                               DefaultAccInfoAdapter

Adapts all AT-SPI accessibles to the IAccessibleNav interface. No condition for adaption is given imp`lying that this adapter is used as a default by AEAccAdapter when no better adapter is available. Expects the subject to be a AEPor.

Instance Methods [hide private]
dictionary
getAccAttrs(self)
Gets a list of name:value attribute pairs for the subject.
source code
3-tuple of float
getAccFloatValueExtents(self)
Gets the minimum, maximum, and step for the floating point value exposed by the subject.
source code
float
getAccFloatValue(self)
Gets the current floating point value of the subject
source code
dictionary
getAccDefTextAttrs(self)
Gets all of the default text attributes assigned to the subject.
source code
integer
getAccTextSelectionCount(self)
Gets the number of discontiguous selected text ranges.
source code
AEPor
getAccCaret(self)
Gets the current offset of the caret in this text object as a AEPor.
source code
integer
getAccTextCharCount(self)
Gets the number of characters in a text body.
source code
list of string
getAccTextSelection(self, n=None)
Gets a list of all text selections in the subject if n is None, or the nth selection if it is specified.
source code
string
getAccText(self, por)
Gets all text starting at item offset + char offset up to the offset given by the AEPor.
source code
 
getAccTableExtents(self)
Returns the number of rows and columns in a table as a 2-tuple of integers Not implemented for non-Table objects.
source code
2-tuple of integer
getAccVisualExtents(self)
Gets the size of the bounding box of an accessible.
source code
2-tuple integer
getAccVisualPoint(self)
Gets the visual position of the focal point wihin an accessible object, the center in a simple box-like control.
source code
2-tuple integer
getAccPosition(self)
Gets the position of the accessible object, usually upper-left corner.
source code
string
getAccTextAttr(self, name)
Gets the value of a given attribute name.
source code
integer
getAccIndex(self)
Gets the index of an item as its child index in its parent.
source code
 
getAccLevel(self)
Gets the (tree) level for the item object implementing this interface.
source code
 
getAccRow(self)
Gets the row of the item object implementing this interface.
source code
 
getAccColumn(self)
Gets the column of the item object implementing this interface.
source code
 
getAccRowColIndex(self, row, col)
Gets the 1D index of the cell at the given 2D row and column.
source code
 
getAccColumnHeader(self)
Gets the column header text of the item object implementing this interface.
source code
 
getAccRowHeader(self)
Gets the row header text of the item object implementing this interface.
source code
dictionary
getAccAllTextAttrs(self)
Gets all the text attributes of a given accessible.
source code
list of AEPors
getAccSelection(self)
Gets a list AEPors referring to the selected child acessibles within the subject accessible.
source code
integer
getAccChildCount(self)
Gets the number of child accessibles for the object implementing this interface.
source code
string
getAccAppName(self)
Gets the name of the application application to which the subject accessible belongs.
source code
2-tuple of string, integer
getAccAppID(self)
Gets a unique ID identifying the application to which the subject accessible belongs.
source code
string
getAccAppLocale(self)
Gets the POSIX locale of an application as a string.
source code
string
getAccRoleName(self)
Gets the accessible role name of the subject.
source code
string
getAccRole(self)
Gets the accessible role of the subject.
source code
string
getAccName(self)
Gets the accessible name of the subject.
source code
string
getAccDescription(self)
Gets the accessible description of the subject.
source code
string
getAccItemText(self)
Gets the accessible text of this object or its name if the text is not available.
source code
list of AEPor
getAccRelations(self, kind)
Gets a list of accessibles related to the subject accessible in the manner given by kind.
source code
list
getAccStates(self)
Gets a list of names of states indicating the current state of the given accessible.
source code
boolean
isAccTopLevelWindow(self)
Gets whether or not the subject accessible is a top-level container in the accessible hierarchy.
source code
boolean
isAccTrivial(self)
Gets if the accessible should be considered trivial.
source code
boolean
isAccVisible(self)
Gets if an accessible is visible.
source code
boolean
hasAccState(self, state)
Gets if the subject has the given state.
source code
boolean
hasAccOneState(self, *states)
Gets if the subject has at least one of the given states.
source code
boolean
hasAccAllStates(self, *states)
Gets if the subject has all of the given states.
source code
boolean
hasAccRole(self, role)
Gets if the subject has the given role.
source code
boolean
hasAccOneRole(self, *roles)
Gets if the subject has any one of the given roles.
source code
list of string
getAccActionNames(self)
Gets the list of all action names defined by the subject.
source code
list of string
getAccActionDescs(self)
Gets the list of all action descriptions defined by the subject.
source code
integer
getAccActionCount(self)
Gets the number of available actions on the subject.
source code
list of tuple of string
getAccActionKeys(self)
Gets the key bindings associated with all available actions.
source code
boolean
allowsAccEmbeds(self)
Always False.
source code
boolean
isAccEmbedded(self)
Gets whether or not the accessible considers itself embedded in its parent's content by calling the parent's allowsAccEmbeds method.
source code
string
getAccURI(self, index)
Obtain a resource locator ('URI') string which can be used to access the content to which this link "points" or is connected.
source code
integer
getAccAnchorCount(self)
Obtain he number of separate anchors associated with this accessible.
source code

Inherited from AEAccAdapter.PORAdapter: __call__, __init__

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Class Variables [hide private]
list of Interface provides = [IAccessibleInfo]
Interfaces provided by this adapter
tuple VISIBLE_STATES = pyatspi.STATE_VISIBLE, pyatspi.STATE_SHOWING
States that an accessible must have to be considered visible
tuple TRIVIAL_STATES = pyatspi.STATE_DEFUNCT, pyatspi.STATE_INVALID,...
States that an accessible must not have to be considered non-trivial
tuple TRIVIAL_ROLES = pyatspi.ROLE_INVALID, pyatspi.ROLE_GLASS_PANE,...
Roles that an accessible must not have to be considered non-trivial

Inherited from AEAccAdapter.AEAccAdapter: singleton, when

Instance Variables [hide private]

Inherited from AEAccAdapter.PORAdapter: accessible, char_offset, item_offset, subject

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

getAccAttrs(self)

source code 
Gets a list of name:value attribute pairs for the subject.
Returns: dictionary
Name:value pairs of the object attributes
Raises:
  • LookupError - When the accessible object is dead
  • NotImplementedError - When this accessible does not support object attributes

getAccFloatValueExtents(self)

source code 
Gets the minimum, maximum, and step for the floating point value exposed by the subject.
Returns: 3-tuple of float
Minimum, maximum, and step values
Raises:
  • LookupError - When the accessible object is dead
  • NotImplementedError - When this accessible does not support the Value interface

getAccFloatValue(self)

source code 
Gets the current floating point value of the subject
Returns: float
Current value
Raises:
  • LookupError - When the accessible object is dead
  • NotImplementedError - When this accessible does not support the Value interface

getAccDefTextAttrs(self)

source code 
Gets all of the default text attributes assigned to the subject.
Returns: dictionary
Name:value pairs of the default text attributes
Raises:
  • LookupError - When the accessible object is dead
  • NotImplementedError - When this accessible does not support the text interface

getAccTextSelectionCount(self)

source code 
Gets the number of discontiguous selected text ranges.
Returns: integer
Number of selections
Raises:
  • LookupError - When the accessible object is dead
  • NotImplementedError - When the accessible does not support the Text interface

getAccCaret(self)

source code 
Gets the current offset of the caret in this text object as a AEPor.
Returns: AEPor
Point of regard of the text caret in this object
Raises:
  • LookupError - When the accessible object is dead
  • NotImplementedError - When the accessible does not support the Text interface

getAccTextCharCount(self)

source code 
Gets the number of characters in a text body.
Returns: integer
Total number of characters
Raises:
  • LookupError - When the accessible object is dead
  • NotImplementedError - When the accessible does not support the Text interface

getAccTextSelection(self, n=None)

source code 
Gets a list of all text selections in the subject if n is None, or the nth selection if it is specified.
Parameters:
  • n (integer) - Index of selection to be returned, or None to indicate all
Returns: list of string
List of selected text runs
Raises:
  • LookupError - When the accessible object is dead
  • NotImplementedError - When this accessible does not support the Text interface

getAccText(self, por)

source code 
Gets all text starting at item offset + char offset up to the offset given by the AEPor. Gets from the beginning of the text if subject item offset is None. Gets to the end of the text if the AEPor item offset is None.
Parameters:
  • por (AEPor) - Point of regard to the end of the text range to get
Returns: string
Text between the offsets
Raises:
  • LookupError - When the accessible object is dead
  • NotImplementedError - When this accessible does not support the Text interface

getAccTableExtents(self)

source code 
Returns the number of rows and columns in a table as a 2-tuple of integers Not implemented for non-Table objects.
Returns:
We never return.
Raises:
  • NotImplementedError - Always

getAccVisualExtents(self)

source code 
Gets the size of the bounding box of an accessible.
Returns: 2-tuple of integer
Width and height
Raises:
  • NotImplementedError - When this accessible does not support the Component interface

getAccVisualPoint(self)

source code 
Gets the visual position of the focal point wihin an accessible object, the center in a simple box-like control.
Returns: 2-tuple integer
x,y coordinate
Raises:
  • NotImplementedError - When this accessible does not support the Component interface

getAccPosition(self)

source code 
Gets the position of the accessible object, usually upper-left corner.
Returns: 2-tuple integer
x,y coordinate
Raises:
  • NotImplementedError - When this accessible does not support the Component interface

getAccTextAttr(self, name)

source code 
Gets the value of a given attribute name.
Parameters:
  • name (string) - Name of the attribute (eg. fgcolor, bgcolor)
Returns: string
Value of the accessible attribute
Raises:
  • LookupError - When the accessible object is dead
  • NotImplementedError - When this accessible does not support the Text interface

getAccIndex(self)

source code 
Gets the index of an item as its child index in its parent.
Returns: integer
Zero indexed child offset under the parent accessible
Raises:
  • LookupError - When the table or item is no longer valid

getAccLevel(self)

source code 
Gets the (tree) level for the item object implementing this interface. This is NOT IMPLEMENTED for non-tree objects.
Raises:
  • NotImplementedError - Always

getAccRow(self)

source code 
Gets the row of the item object implementing this interface. This is NOT IMPLEMENTED for non-table objects.
Raises:
  • NotImplementedError - Always

getAccColumn(self)

source code 
Gets the column of the item object implementing this interface. This is NOT IMPLEMENTED for non-table objects.
Raises:
  • NotImplementedError - Always

getAccRowColIndex(self, row, col)

source code 
Gets the 1D index of the cell at the given 2D row and column. This is not implemented for non-table objects.
Parameters:
  • row (integer) - Row index
  • col (integer) - Column index
Raises:
  • NotImplementedError - Always

getAccColumnHeader(self)

source code 
Gets the column header text of the item object implementing this interface. This is NOT IMPLEMENTED for non-table objects.
Raises:
  • NotImplementedError - Always

getAccRowHeader(self)

source code 
Gets the row header text of the item object implementing this interface. This is NOT IMPLEMENTED for non-table objects.
Raises:
  • NotImplementedError - Always

getAccAllTextAttrs(self)

source code 
Gets all the text attributes of a given accessible.
Returns: dictionary
Name:value pairs of the text attributes at the character offset
Raises:
  • LookupError - When the accessible object is dead
  • NotImplementedError - When this accessible does not support the text interface

getAccSelection(self)

source code 
Gets a list AEPors referring to the selected child acessibles within the subject accessible.
Returns: list of AEPors
Points of regard to selected accessibles
Raises:
  • LookupError - When the subject accessible is dead

getAccChildCount(self)

source code 
Gets the number of child accessibles for the object implementing this interface.
Returns: integer
Number of accessible children
Raises:
  • LookupError - When the accessible object is dead

getAccAppName(self)

source code 
Gets the name of the application application to which the subject accessible belongs.
Returns: string
Name of the subject's application
Raises:
  • LookupError - When the accessible or any parent accessible up to the application is dead

getAccAppID(self)

source code 

Gets a unique ID identifying the application to which the subject accessible belongs.

Currently, the name and ID of the application are used. See http://www.linuxbase.org/~gk4/a11y/idl/interfaceAccessibility_1_1Application.html#o2 for information about the application ID.
Returns: 2-tuple of string, integer
Application's name and runtime ID
Raises:
  • LookupError - When the accessible or any parent accessible up to the application is dead

getAccAppLocale(self)

source code 
Gets the POSIX locale of an application as a string. At the present time this routine returns only the locale set for messages.
Returns: string
POSIX locale as string
Raises:
  • LookupError - When the accessible or any parent accessible up to the application is dead

getAccRoleName(self)

source code 
Gets the accessible role name of the subject. Ignores the given item offset because the default adapter assumes there are no items.
Returns: string
Localized role name
Raises:
  • LookupError - When the accessible object is dead

getAccRole(self)

source code 
Gets the accessible role of the subject. Ignores the given item offset because the default adapter assumes there are no items.
Returns: string
Unlocalized role
Raises:
  • LookupError - When the accessible object is dead

getAccName(self)

source code 
Gets the accessible name of the subject. Ignores the given item offset because the default adapter assumes there are no items.
Returns: string
Accessible name of requested object
Raises:
  • LookupError - When the subject accessible is dead

getAccDescription(self)

source code 
Gets the accessible description of the subject. Ignores the given item offset because the default adapter assumes there are no items.
Returns: string
Accessible description of requested object
Raises:
  • LookupError - When the subject accessible is dead

getAccItemText(self)

source code 
Gets the accessible text of this object or its name if the text is not available. Ignores the given item offset because the default adapter assumes there are no items.
Returns: string
Accessible text of requested item
Raises:
  • LookupError - When the accessible object is dead

getAccRelations(self, kind)

source code 
Gets a list of accessibles related to the subject accessible in the manner given by kind.
Parameters:
  • kind (string) - Name specifying the kind of relations to retrieve
Returns: list of AEPor
List of AEPors related to subject accessible in the manner given by kind
Raises:
  • LookupError - When the accessible object is dead

getAccStates(self)

source code 
Gets a list of names of states indicating the current state of the given accessible. Ignores the given item offset because the default adapter assumes there are no items.
Returns: list
Names of all states
Raises:
  • LookupError - When the accessible object is dead

isAccTopLevelWindow(self)

source code 
Gets whether or not the subject accessible is a top-level container in the accessible hierarchy.
Returns: boolean
Is the subject a top-level container or not?
Raises:
  • LookupError - When the accessible object is dead

isAccTrivial(self)

source code 
Gets if the accessible should be considered trivial. This implementation considers an accessible trivial if the state is one of TRIVIAL_STATES or the role is one of TRIVIAL_ROLES.
Returns: boolean
Does the accessible consider itself trivial?
Raises:
  • LookupError - When the accessible object is dead

isAccVisible(self)

source code 
Gets if an accessible is visible. This implementation considers an accessible visible if it has all of the states in VISIBLE_STATES.
Returns: boolean
Does the accessible consider itself visible?
Raises:
  • LookupError - When the accessible object is dead

hasAccState(self, state)

source code 
Gets if the subject has the given state.
Parameters:
  • state (string) - State name (e.g. 'focused', 'selected', 'selectable')
Returns: boolean
Does the accessible have the given state?

See Also: getAccStates

hasAccOneState(self, *states)

source code 
Gets if the subject has at least one of the given states.
Parameters:
  • states (string) - States names (e.g. 'focused', 'selected', 'selectable')
Returns: boolean
Does the accessible have at least one of the given states?

See Also: getAccStates

hasAccAllStates(self, *states)

source code 
Gets if the subject has all of the given states.
Parameters:
  • states (string) - State names (e.g. 'focused', 'selected', 'selectable')
Returns: boolean
Does the accessible have all of the given states?

See Also: getAccStates

hasAccRole(self, role)

source code 
Gets if the subject has the given role. The given string role is compared to the unlocalized string role of the accessible.
Parameters:
  • role (string) - Name of the role (e.g. 'terminal', 'glass pane')
Returns: boolean
Does the accessible have the given role?

hasAccOneRole(self, *roles)

source code 
Gets if the subject has any one of the given roles. The given role strings are compared to the unlocalized string role of the accessible.
Parameters:
  • roles (list of string) - Names of the roles (e.g. 'terminal', 'glass pane')
Returns: boolean
Does the accessible have any one of the given roles?

getAccActionNames(self)

source code 
Gets the list of all action names defined by the subject.
Returns: list of string
List of all action names
Raises:
  • NotImplementedError - When the subject does not support actions

getAccActionDescs(self)

source code 
Gets the list of all action descriptions defined by the subject.
Returns: list of string
List of all action descriptions
Raises:
  • NotImplementedError - When the subject does not support actions

getAccActionCount(self)

source code 
Gets the number of available actions on the subject.
Returns: integer
Number of actions available
Raises:
  • NotImplementedError - When the subject does not support actions

getAccActionKeys(self)

source code 
Gets the key bindings associated with all available actions. Parses the key bindings into tuples since some actions can have multiple ways of activating them dependent on the context.
Returns: list of tuple of string
List of tuples, each containing one or more string keysym names indicating the keys to press in sequence to perform the action
Raises:
  • NotImplementedError - When the subject does not support actions

allowsAccEmbeds(self)

source code 
Always False. Default accessibles don't allow embedding.
Returns: boolean
False

isAccEmbedded(self)

source code 
Gets whether or not the accessible considers itself embedded in its parent's content by calling the parent's allowsAccEmbeds method.
Returns: boolean
Does the accessible consider itself embedded?
Raises:
  • LookupError - When the accessible object is dead

getAccURI(self, index)

source code 
Obtain a resource locator ('URI') string which can be used to access the content to which this link "points" or is connected.
Returns: string
URI string
Raises:
  • LookupError - When the accessible object is invalid

getAccAnchorCount(self)

source code 
Obtain he number of separate anchors associated with this accessible.
Returns: integer
Number of anchors
Raises:
  • LookupError - When the accessible object is invalid

Class Variable Details [hide private]

TRIVIAL_STATES

States that an accessible must not have to be considered non-trivial
Type:
tuple
Value:
pyatspi.STATE_DEFUNCT, pyatspi.STATE_INVALID, pyatspi.STATE_INDETERMIN\
ATE

TRIVIAL_ROLES

Roles that an accessible must not have to be considered non-trivial
Type:
tuple
Value:
pyatspi.ROLE_INVALID, pyatspi.ROLE_GLASS_PANE, pyatspi.ROLE_FILLER, py\
atspi.ROLE_VIEWPORT, pyatspi.ROLE_MENU_BAR, pyatspi.ROLE_TOOL_BAR, pya\
tspi.ROLE_SCROLL_BAR, pyatspi.ROLE_PANEL, pyatspi.ROLE_SPLIT_PANE, pya\
tspi.ROLE_SCROLL_PANE, pyatspi.ROLE_PAGE_TAB_LIST, pyatspi.ROLE_SEPARA\
TOR