Package AccessEngine :: Package AEAccAdapters :: Package ATSPI :: Module ContainerAdapter :: Class ContainerAccInfoAdapter
[hide private]
[frames] | no frames]

Class ContainerAccInfoAdapter

source code

??-139 --+
         |
        ContainerAccInfoAdapter

Overrides DefaultAccInfoAdapter to provide information specific to containers that have STATE_MANAGES_DESCENDANTS. Expects the subject to be a AEPor.

Instance Methods [hide private]
list of pyatspi.Accessibility.Accessible
_getSubItems(self, acc)
Gets subitems of an item in a container that manages its descendants.
source code
dictionary
getAccDefTextAttrs(self)
Gets all of the default text attributes assigned to the subject if item offset is None, else the default attributes of the item offset child.
source code
dictionary
getAccAllTextAttrs(self)
Gets all the text attributes of a given accessible if item offset is None or the attributes of the item offset child if it is not.
source code
list of AEPors
getAccSelection(self)
Gets a list of AEPors referring to the selected items within the subject accessible.
source code
string
getAccRoleName(self)
Gets the accessible role name of the subject if item offset is None else the role name of the given item.
source code
string
getAccRole(self)
Gets the accessible role of the subject if item offset is None else the role name of the given item.
source code
string
getAccName(self)
Gets the accessible name of the subject if item offset is None else the name of the given item.
source code
string
getAccDescription(self)
Gets the accessible description of the subject if item offset is None else the name of the given item.
source code
string
getAccItemText(self)
Gets the accessible name of the subject if item offset is None else the name of the given child accessible.
source code
list of string
getAccStates(self)
Gets a list of names of states indicating the current state of the given accessible.
source code
integer
getAccIndex(self)
Gets the index of an item as the item offset.
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
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
2-tuple of integer
getAccVisualExtents(self)
Gets the visual width and height of the subject.
source code
2-tuple of integer
getAccVisualPoint(self)
Gets the focal point within the subject, where the focal point is defined as the center of the active item.
source code
Static Methods [hide private]
boolean
when(subject)
Tests if the given subject can be adapted by this class.
source code
Class Variables [hide private]
  provides = [IAccessibleInfo]
Method Details [hide private]

when(subject)
Static Method

source code 
Tests if the given subject can be adapted by this class.
Parameters:
  • subject (AEPor) - AEPor containing an accessible to test
Returns: boolean
True when the subject meets the condition named in the docstring for this class, False otherwise

_getSubItems(self, acc)

source code 
Gets subitems of an item in a container that manages its descendants. Subitems appear to be used to indicate items that cannot be selected independently of each other in a list or tree control so they are made children of a dummy accessible. This is most often observed when a list or tree has an icon + plus text in one of its cells.
Parameters:
  • acc (pyatspi.Accessibility.Accessible) - Accessible that may or may not have subitems
Returns: list of pyatspi.Accessibility.Accessible
List of accessibles, including the given one

getAccDefTextAttrs(self)

source code 
Gets all of the default text attributes assigned to the subject if item offset is None, else the default attributes of the item offset child.
Returns: dictionary
Name:value pairs of the default text attributes
Raises:
  • LookupError - When the accessible object is dead
  • IndexError - When the item offset is outside the bounds of the number of children of the subject accessible
  • NotImplementedError - When this accessible does not support the text interface

getAccAllTextAttrs(self)

source code 
Gets all the text attributes of a given accessible if item offset is None or the attributes of the item offset child if it is not.
Returns: dictionary
Name:value pairs of the text attributes at the character offset
Raises:
  • LookupError - When the accessible object is dead
  • IndexError - When the item offset is outside the bounds of the number of children of the subject accessible
  • NotImplementedError - When this accessible does not support the text interface

getAccSelection(self)

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

getAccRoleName(self)

source code 
Gets the accessible role name of the subject if item offset is None else the role name of the given item. The name is localized.
Returns: string
Accessible role name of requested object
Raises:
  • LookupError - When the subject accessible or the child is dead
  • IndexError - When the item offset is outside the bounds of the number of children of the subject accessible

getAccRole(self)

source code 
Gets the accessible role of the subject if item offset is None else the role name of the given item.
Returns: string
Accessible role of requested object
Raises:
  • LookupError - When the subject accessible or the child is dead
  • IndexError - When the item offset is outside the bounds of the number of children of the subject accessible

getAccName(self)

source code 
Gets the accessible name of the subject if item offset is None else the name of the given item.
Returns: string
Accessible name of requested object
Raises:
  • LookupError - When the subject accessible or the child is dead
  • IndexError - When the item offset is outside the bounds of the number of children of the subject accessible

getAccDescription(self)

source code 
Gets the accessible description of the subject if item offset is None else the name of the given item.
Returns: string
Accessible description of requested object
Raises:
  • LookupError - When the subject accessible or the child is dead
  • IndexError - When the item offset is outside the bounds of the number of children of the subject accessible

getAccItemText(self)

source code 
Gets the accessible name of the subject if item offset is None else the name of the given child accessible.
Returns: string
Accessible description of requested object
Raises:
  • LookupError - When the subject accessible or the child is dead
  • IndexError - When the item offset is outside the bounds of the number of children of the subject accessible

getAccStates(self)

source code 
Gets a list of names of states indicating the current state of the given accessible.
Returns: list of string
Names of all states
Raises:
  • LookupError - When the subject accessible or the child is dead
  • IndexError - When the item offset is outside the bounds of the number of children of the subject accessible

getAccIndex(self)

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

hasAccState(self, state)

source code 
Gets if the subject has the given state.
Parameters:
  • state (string) - Name of the state (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) - State names(e.g. 'focused', 'selected', 'selectable')
Returns: boolean
Does the accessible have at least one of the given states?

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?

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

getAccVisualExtents(self)

source code 
Gets the visual width and height of the subject.
Returns: 2-tuple of integer
Width and height extents
Raises:
  • LookupError - When the accessible object is dead

getAccVisualPoint(self)

source code 
Gets the focal point within the subject, where the focal point is defined as the center of the active item.
Returns: 2-tuple of integer
x,y coordinates
Raises:
  • LookupError - When the accessible object is dead