Package AccessEngine :: Package AccessEngineAPI :: Module View
[hide private]
[frames] | no frames]

Module View

source code

Defines AccessEngineAPI for navigating within an application and inspecting and manipulating its accessible objects.

Provides methods for reading information from accessible objects and for navigating relative to a AEPor.

Methods prefixed with get return the AEPor of interest. Methods prefixed with move do modify these variables. Methods prefixed with set actually change properties of the accessible it


Note: Selected and editable states not being announced because they happen at unexpected times or on undesireable accessibles. Selection can probably be done properly with events. Editable we will just avoid for the time being.

Authors:
Peter Parente, Pete Brunet, Larry Weiss, Brett Clippingdale, Eirikur Hallgrimsson, Frank Zenker, Nicole Anacker, Ramona Bunk
Organizations: Copyright:

License: The BSD License All rights reserved. This program and the accompanying materials are made available under the terms of the BSD license which accompanies this distribution, and is available at http://www.opensource.org/licenses/bsd-license.php

Functions [hide private]
string
getAccName(por)
Gets the accessible name of the component at the provided AEPor.
source code
string
getAccDesc(por)
Gets the accessible description of the component at the provided AEPor.
source code
integer
getAccCount(por)
Gets the number of child accessibles of the accessible indicated by
source code
string
getAccRole(por)
Gets the unlocalized role for the accessible at the provided AEPor.
source code
string
getAccRoleName(por)
Gets the localized role name for the accessible at the provided AEPor.
source code
boolean
hasAccRole(role, por)
Gets if the accessible at the given AEPor has the given role.
source code
boolean
hasOneAccRole(por, *roles)
Gets if the accessible at the given AEPor has any one of the given roles.
source code
boolean
compareAncestorRoles(por, *roles)
Iterates through the given roles comparing them with the roles of the first len(roles) ancestors of the given AEPor starting with the immediate parent.
source code
string
getStateText(por, name=None, value=None)
Gets text describing the states of the given AEPor that might be of interest to the user.
source code
boolean
hasAccState(state, por)
Gets if the accessible at the given AEPor has the given state.
source code
boolean
hasOneAccState(por, *states)
Gets if the accessible at the given AEPor has one of the given states.
source code
dictionary of string
getAccAttrs(por)
Gets a dictionary of name:value attribute pairs at the provided AEPor.
source code
boolean
setAccPOR(por)
Sets the system input focus, selection, and caret offset to the provided AEPor.
source code
list of string
getAccActionNames(por)
Gets the names of the actions that can be performed at the provided AEPor.
source code
boolean
hasAccActionName(actionName, por)
Looks for the given action name in all action names of the por accessible.
source code
list of string
getAccActionDescs(por)
Gets the descriptions of the actions that can be performed at the
source code
list of tuple of string
getAccActionKeys(por)
Gets the key bindings associated with the actions at the given AEPor.
source code
string
getAccClickKey(por)
Gets the key binding associated with the common "click" action which appears to be the action most commonly accessed by a hotkey.
source code
 
doAction(index, por)
Executes the action at the given index in the list of all actions named in the return value from getAccActionNames.
source code
string
getRootAccToApplication(por)
Gets the accessible name of the application containing the AEPor.
source code
string
getAppName(por)
Gets the accessible name of the application containing the AEPor.
source code
string
getWindowTitle(por)
Gets the accessible name of the window containing the AEPor.
source code
string
getAccAppLocale(por)
Gets the POSIX locale of the application containing the AEPor as a string.
source code
AEPor
getAccFocus(tier, search=False)
Gets the AEPor representing the focus of the foreground application.
source code
boolean
setAccFocus(por)
Sets the system input focus to the accessible in the provided AEPor.
source code
2-tuple of integer
getAccPosition(por)
Gets the position of the accessible object, usually upper-left corner
source code
2-tuple of integer
getAccVisualPoint(por)
Returns the focal point of a visual component at the AEPor.
source code
2-tuple of integer
getAccVisualExtents(por)
Returns the extents of a visual component at the AEPor.
source code
string
getAccLabel(por)
Gets the label for the accessible at the provided AEPor.
source code
list of AEPors
getAccRelations(relation, por)
Gets the AEPors to accessibles related to the given AEPor in the manner stated by the given relation.
source code
integer
getAccSetSize(por)
Get the number of members within an accessible group.
source code
integer
getAccPosInSet(por)
Get the position of an accessible within a group.
source code
string
getAccURI(index, por)
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(por)
Obtain the number of separate anchors associated with this accessible.
source code
string
getItemText(por)
Gets the text of the complete item that includes the specified AEPor.
source code
string
getWordText(por)
Gets the text of the current word at the specified AEPor.
source code
string
getCharText(por)
Gets the text of the current character at the specified AEPor.
source code
string
getAccText(start, end=None)
Gets all of the text from the starting offset to the ending offset at the given AEPors.
source code
integer
getAccTextLength(por)
Gets the length of the text in the AEPor.
source code
string
getAccTextBetween(start_por, end_por=None, only_visible=False)
Gets all text between two point of regards.
source code
boolean
setAccText(text, por)
Sets the given string as the text at the given AEPor.
source code
boolean
insertAccText(text, por, attrs=None)
Inserts the given text at the given AEPor.
source code
boolean
copyAccText(start, end=None)
Copies the text from the given starting AEPor to the ending AEPor.
source code
boolean
cutAccText(start, end=None)
Cuts the text from the given starting AEPor to the ending AEPor.
source code
boolean
pasteAccText(por)
Pastes the clipboard text at the given AEPor.
source code
boolean
deleteAccText(start, end=None)
Deletes the text from the given starting AEPor to the ending AEPor.
source code
boolean
selectAccText(start, end=None, n=None)
Selects the text from the given starting AEPor to the ending AEPor.
source code
boolean
deselectAccText(por, n=None)
Deselects the text from the given AEPor.
source code
list of string
getAccTextSelection(por, n=None)
Gets a list of all selected text if n is None, or the nth selection if it is specified, at the AEPor.
source code
integer
getAccTextSelectionCount(por)
Gets the number of discontiguous text selections in the AEPor.
source code
dictionary
getAccDefTextAttrs(por)
Gets a dictionary of name:value default text attribute pairs at the provided
source code
dictionary
getAccAllTextAttrs(por)
Like getAccTextAttr, but gets the values of all of the current attributes of an accessible of a given AEPor.
source code
string
getAccTextAttr(name, por)
Gets the value of the given attribute of an accessible of a given AEPor.
source code
boolean
setAccTextAttrs(start, end=None, **attrs)
Sets the attributes of the text from the given starting AEPor to the ending AEPor.
source code
AEPor
getAccCaret(por)
Gets the text input caret AEPor within the given accessible AEPor.
source code
boolean
setAccCaret(por)
Moves the text input caret to offset indicated by the given AEPor.
source code
float
getAccFloatValue(por)
Gets the floating point value at the given AEPor.
source code
3-tuple of float
getAccFloatValueExtents(por)
Get the extents and step size of the floating point value at the AEPor.
source code
integer
getAccIndex(por)
Gets the index the AEPor within some 1D ordered collection.
source code
integer
getAccRow(por)
Gets the row index of the AEPor within some 2D ordered collection.
source code
integer
getAccColumn(por)
Gets the column index of the AEPor within some 2D ordered collection.
source code
AEPor
getAccAtRowColumn(row, col, por)
Gets the AEPor to the cell in the given AEPor at the given row and column.
source code
string
getAccRowHeader(por)
Gets the text description of a row in a table.
source code
string
getAccColumnHeader(por)
Gets the text description of a column in a table.
source code
integer
getAccLevel(por)
Gets the tree level of the item indicated by the given AEPor.
source code
2-tuple of integer
getAccTableExtents(por)
Returns the number of rows and columns in a table indicated by the given AEPor.
source code
AEPor
getFirstSelected(por)
Gets the first selected items or accessible children in the accessible indicated by the given AEPor.
source code
list of AEPor
getAllSelected(por)
Gets all of the selected items or accessible children in the accessible indicated by the given AEPor.
source code
boolean
setAllSelected(por)
Selects all of the items or accessible children in the accessible indicated by the given AEPor.
source code
boolean
setAllDeselected(por)
Deselects all of the items or accessible children in the accessible indicated by the given AEPor.
source code
boolean
setAccSelected(por)
Selects the item or accessible indicated by the given AEPor.
source code
boolean
setAccDeselected(por)
Deselects the item or accessible indicated by the given AEPor.
source code
AEPor
getRootAcc(por)
Gets a AEPor to the top level container of the given AEPor.
source code
AEPor
getEndAcc(por)
Gets a AEPor to the last item of the last accessible under the root of the view.
source code
AEPor
getViewRootAcc()
Gets a AEPor indicating the root of the active view.
source code
AEPor
getLastAccUnder(por)
Gets a AEPor to the last item of the last accessible under the given root.
source code
AEPor
getAccFromPath(por, *path)
Gets a AEPor representing the accessible found by treating the path integers as descendant indices stating at the given AEPor.
source code
AEPor
getParentAcc(por)
Gets the AEPor of the first character and first item of the parent of the provided AEPor.
source code
AEPor
getChildAcc(index, por)
Gets the child accessible at the given index from the AEPor.
source code
AEPor
getPrevAcc(por)
Gets the AEPor of the previous accessible of a given AEPor.
source code
AEPor
getNextAcc(por)
Gets the AEPor of the next accessible of a given AEPor in the AccessibleWalker order.
source code
AEPor
getFirstPeerAcc(por)
Gets the AEPor of the first accessible peer of a given AEPor.
source code
AEPor
getLastPeerAcc(por)
Gets the AEPor of the last accessible peer of a given AEPor.
source code
AEPor
getNextPeerAcc(por)
Gets the AEPor of the next accessible peer of a given AEPor.
source code
AEPor
getPrevPeerAcc(por)
Gets the AEPor of the previous accessible peer of a given AEPor.
source code
AEPor
getCurrItem(por)
Gets the AEPor of the start of the item.
source code
AEPor
getNextItem(por, wrap=False, only_visible=False)
Gets the AEPor of the next item in the given AEPor.
source code
AEPor
getPrevItem(por, wrap=False, only_visible=False)
Gets the AEPor of the previous item in the given AEPor.
source code
AEPor
getCurrWord(por)
Get the AEPor of the current word in the item indicated by the given AEPor
source code
AEPor
getNextWord(por)
Get the AEPor of the next word in the item indicated by the given AEPor.
source code
AEPor
getPrevWord(por)
Get the AEPor of the previous word in the item indicated by the given AEPor.
source code
AEPor
getLastWord(por)
Get the AEPor of the current word in the item indicated by the given AEPor.
source code
AEPor
getNextChar(por)
Get the AEPor of the next character in the item indicated by the given
source code
AEPor
getPrevChar(por)
Get the AEPor of the previous character in the item indicated by the given AEPor.
source code
AEPor
getLastChar(por)
Get the AEPor of the last character in the item indicated by the given AEPor.
source code
AEPor
getCurrRow(por)
Gets the AEPor to the cell in the first column of the row containing the item indicated by the given AEPor.
source code
AEPor
getNextRow(por)
Get the AEPor of the first column of the next row relative to the row containing the item indicated by the given AEPor.
source code
AEPor
getPrevRow(por)
Get the AEPor of the first column of the previous row relative to the row containing the item indicated by the given AEPor.
source code
AEPor
getStartOfHardLine(por)
From a given AEPor, get the AEPor of the start of the first line that follows the previous hard line break, or the start of the first line if it is the first line in the accessible.
source code
AEPor
getEndOfHardLine(por)
From a given AEPor, get the AEPor of the end of the first following line that ends with a hard line break, or the end of the last line if it is the last line in the accessible.
source code
AEPor
iterAncestorAccs(por, only_visible=False, allow_trivial=False)
Builds an iterator over the ancestors of the current AEPor.
source code
AEPor
iterNextAccs(por)
Builds an iterator over the accessibles next to the current AEPor.
source code
AEPor
iterPrevAccs(por)
Builds an iterator over the accessibles previous to the current AEPor.
source code
AEPor
iterNextItems(por, wrap=False, only_visible=False)
Builds an iterator over the items next to the current AEPor.
source code
AEPor
iterPrevItems(por, wrap=False, only_visible=False)
Builds an iterator over the items previous to the current AEPor.
source code
AEPor
findAccByName(name, por, ancestor=False, depth_first=True)
Gets a AEPor to the first accessible descendant or ancestor of the given AEPor with the given name.
source code
AEPor
findAccByRole(role, por, ancestor=False, depth_first=True)
Gets a AEPor to the first accessible descendant or ancestor of the given AEPor with the given role.
source code
AEPor
findAccByObjId(objname, por, ancestor=False, depth_first=True)
Gets a AEPor to the first accessible descendant or ancestor of the given AEPor with the given 'id' attribute named objname.
source code
AEPor
findAccByPredicate(predicate, por, ancestor=False, depth_first=True)
Gets a AEPor to the first accessible descendant or ancestor of the given AEPor matching the given callable predicate.
source code
boolean
mouseEventPOR(event, por)
Triggers a mouse event at the center of the given point of regard or - in case of a text accessible - set the caret to the given position (e.g.
source code
boolean
leftClickPOR(por)
Performs a mouse left click on the center of a given point of regard.
source code
Variables [hide private]
  _state_descriptions = {('checked', False): _('unchecked'), ('c...
Function Details [hide private]

getAccName(por)

source code 
Gets the accessible name of the component at the provided AEPor.
Parameters:
  • por (AEPor) - A point of regard
Returns: string
The accessible name of the control of the at the point of regard
Raises:

getAccDesc(por)

source code 
Gets the accessible description of the component at the provided AEPor.
Parameters:
  • por (AEPor) - A point of regard
Returns: string
The accessible description of the control of the at the point of regard
Raises:

getAccCount(por)

source code 
Gets the number of child accessibles of the accessible indicated by
Parameters:
  • por (AEPor) - A point of regard
Returns: integer
Number of accessible children
Raises:

getAccRole(por)

source code 

Gets the unlocalized role for the accessible at the provided AEPor.

The return value of this method is not suitable for output. It is suitable for comparison to known role values.
Parameters:
  • por (AEPor) - A point of regard
Returns: string
The role name of the control of the at the point of regard
Raises:

getAccRoleName(por)

source code 

Gets the localized role name for the accessible at the provided AEPor.

The return value of this method is suitable for output. It is not suitable for comparison to known role values.
Parameters:
  • por (AEPor) - A point of regard
Returns: string
The role name of the control of the at the point of regard
Raises:

hasAccRole(role, por)

source code 
Gets if the accessible at the given AEPor has the given role. The role is assumed to be a string that can be mapped to an appropriate role constant on the platform or indicates an extension role that is represented by a string.
Parameters:
  • role (string) - Name of a role (e.g. 'terminal', 'glass pane', 'button')
  • por (AEPor) - A point of regard
Returns: boolean
Does the AEPor have the given role?
Raises:

hasOneAccRole(por, *roles)

source code 

Gets if the accessible at the given AEPor has any one of the given roles. The role is assumed to be a string that can be mapped to an appropriate role constant on the platform or indicates an extension role that is represented by a string.

This method is more efficient than calling hasAccRole multiple times.
Parameters:
  • roles (string) - Name of a role (e.g. 'terminal', 'glass pane', 'button')
  • por (AEPor) - A point of regard
Returns: boolean
Does the AEPor have the given role?
Raises:

compareAncestorRoles(por, *roles)

source code 
Iterates through the given roles comparing them with the roles of the first len(roles) ancestors of the given AEPor starting with the immediate parent.
Parameters:
  • por (AEPor) - A point of regard
  • roles (string) - Role names to use as a comparison
Returns: boolean
Did the given roles match the roles of the corresponding ancestors?

getStateText(por, name=None, value=None)

source code 
Gets text describing the states of the given AEPor that might be of interest to the user. If name is specified, only gets the text describing the state with that non-translated name. If name is not specified, gets text describing all states of interest.
Parameters:
  • por (AEPor) - A point of regard
  • name (string) - Name of the state to describe
  • value (string) - Value of the state to describe
Returns: string
String describing the state(s), None if named state not found
Raises:

hasAccState(state, por)

source code 
Gets if the accessible at the given AEPor has the given state. The state is assumed to be a string that can be mapped to an appropriate state constant on the platform or indicates an extension state that is represented by a string.
Parameters:
  • state (string) - Name of a state (e.g. 'focused', 'selected', 'selectable')
  • por (AEPor) - A point of regard
Returns: boolean
Does the AEPor have the given state?
Raises:

hasOneAccState(por, *states)

source code 

Gets if the accessible at the given AEPor has one of the given states. The state is assumed to be a string that can be mapped to an appropriate state constant on the platform or indicates an extension state that is represented by a string.

This method is more efficient than calling hasAccState multiple times.
Parameters:
  • states (string) - Names of states (e.g. 'focused', 'selected', 'selectable')
  • por (AEPor) - A point of regard
Returns: boolean
Does the AEPor have the given state?
Raises:

getAccAttrs(por)

source code 
Gets a dictionary of name:value attribute pairs at the provided AEPor.
Parameters:
  • por (AEPor) - A point of regard
Returns: dictionary of string
Name/value pairs for all available attributes
Raises:

setAccPOR(por)

source code 
Sets the system input focus, selection, and caret offset to the provided AEPor. Ignores errors trying each as focus, selection, and caret offset are not all supported by every control.
Parameters:
  • por (AEPor) - A point of regard
Returns: boolean
False if none of focus, selection, or caret can be set; True if at least one was set
Raises:

getAccActionNames(por)

source code 
Gets the names of the actions that can be performed at the provided AEPor.
Parameters:
  • por (AEPor) - A point of regard
Returns: list of string
Names of the actions at the point of regard
Raises:

Note: The names appear to be unlocalized.

hasAccActionName(actionName, por)

source code 
Looks for the given action name in all action names of the por accessible.
Parameters:
  • actionName (string) -
  • por (AEPor) - A point of regard
Returns: boolean
Was the given action name found?
Raises:

getAccActionDescs(por)

source code 
Gets the descriptions of the actions that can be performed at the
Parameters:
  • por (AEPor) - A point of regard
Returns: list of string
Descriptions of the actions at the point of regard
Raises:

Note: Unsure if the descriptions are localized or not.

getAccActionKeys(por)

source code 
Gets the key bindings associated with the actions at the given AEPor.
Parameters:
  • por (AEPor) - A point of regard
Returns: list of tuple of string
Names of key sequences that all trigger the same action
Raises:

getAccClickKey(por)

source code 
Gets the key binding associated with the common "click" action which appears to be the action most commonly accessed by a hotkey. Only returns the last of all defined hotkey sequences as it is usually the globally available hotkey rather than the local menu mnemonic or a sequence for activating the menu followed by the mnemonic.
Parameters:
  • por (AEPor) - A point of regard
Returns: string
Hotkey sequence
Raises:

doAction(index, por)

source code 
Executes the action at the given index in the list of all actions named in the return value from getAccActionNames.
Parameters:
  • index (integer) - Index of the action to execute.
  • por (AEPor) - A point of regard
Raises:

getRootAccToApplication(por)

source code 
Gets the accessible name of the application containing the AEPor.
Parameters:
  • por (AEPor) - A point of regard
Returns: string
Name of the application
Raises:

getAppName(por)

source code 
Gets the accessible name of the application containing the AEPor.
Parameters:
  • por (AEPor) - A point of regard
Returns: string
Name of the application
Raises:

getWindowTitle(por)

source code 
Gets the accessible name of the window containing the AEPor.
Parameters:
  • por (AEPor) - A point of regard
Returns: string
Name of the window
Raises:

getAccAppLocale(por)

source code 
Gets the POSIX locale of the application containing the AEPor as a string.
Parameters:
  • por (AEPor) - A point of regard
Returns: string
POSIX locale of the application
Raises:

getAccFocus(tier, search=False)

source code 
Gets the AEPor representing the focus of the foreground application. If no focus event has been received yet by this AETier and search is True, performs a search for an accessible with state focus.
Returns: AEPor
Point of regard to the focused accessible

Note: Setting search to True can result in a very long search operation. Be careful.

setAccFocus(por)

source code 
Sets the system input focus to the accessible in the provided AEPor.
Parameters:
  • por (AEPor) - A point of regard
Returns: boolean
Is setting the focus supported?
Raises:

getAccPosition(por)

source code 
Gets the position of the accessible object, usually upper-left corner
Parameters:
  • por (AEPor) - A point of regard
Returns: 2-tuple of integer
x,y coordinates of the accessible's position
Raises:

getAccVisualPoint(por)

source code 
Returns the focal point of a visual component at the AEPor.
Parameters:
  • por (AEPor) - A point of regard
Returns: 2-tuple of integer
x,y coordinates of the focal point of the point of regard
Raises:

getAccVisualExtents(por)

source code 
Returns the extents of a visual component at the AEPor.
Parameters:
  • por (AEPor) - A point of regard
Returns: 2-tuple of integer
Width and height of the point of regard
Raises:

getAccLabel(por)

source code 
Gets the label for the accessible at the provided AEPor.
Parameters:
  • por (AEPor) - A point of regard
Returns: string
The AccessibleName of the component that labels the component at the given location.
Raises:

getAccRelations(relation, por)

source code 
Gets the AEPors to accessibles related to the given AEPor in the manner stated by the given relation.
Parameters:
  • por (AEPor) - A point of regard
  • relation (string) - Type of relation
Returns: list of AEPors
Point of regard to related accessibles
Raises:

getAccSetSize(por)

source code 
Get the number of members within an accessible group. Often used to determine the size of a radio or menu group.
Parameters:
  • por (AEPor) - Point of regard
Returns: integer
Set/group size.

getAccPosInSet(por)

source code 
Get the position of an accessible within a group.
Parameters:
  • por (AEPor) - Point of regard
Returns: integer
Position within a group.

getAccURI(index, por)

source code 
Obtain a resource locator ('URI') string which can be used to access the content to which this link "points" or is connected.
Parameters:
  • index (integer) - anchor index
  • por (AEPor) - Point of regard
Returns: string
URI string
Raises:

getAccAnchorCount(por)

source code 
Obtain the number of separate anchors associated with this accessible.
Parameters:
  • por (AEPor) - Point of regard
Returns: integer
Number of anchors
Raises:

getItemText(por)

source code 
Gets the text of the complete item that includes the specified AEPor.
Parameters:
  • por (AEPor) - A point of regard
Returns: string
Item text at the given point of regard
Raises:

getWordText(por)

source code 
Gets the text of the current word at the specified AEPor.
Parameters:
  • por (AEPor) - A point of regard
Returns: string
Word text at the given point of regard
Raises:

getCharText(por)

source code 
Gets the text of the current character at the specified AEPor.
Parameters:
  • por (AEPor) - A point of regard
Returns: string
Character at the given point of regard
Raises:

getAccText(start, end=None)

source code 
Gets all of the text from the starting offset to the ending offset at the given AEPors. If end is None, the start is used possibly for both cases.
Parameters:
  • start (AEPor) - Point of regard to the start of the text run
  • end (AEPor) - Point of regard to the end of the text run
Returns: string
Text between start and end offsets
Raises:

getAccTextLength(por)

source code 
Gets the length of the text in the AEPor.
Parameters:
  • por (AEPor) - Point of regard to an object containing text
Returns: integer
Number of characters in the text or None when character count not supported
Raises:

getAccTextBetween(start_por, end_por=None, only_visible=False)

source code 
Gets all text between two point of regards. If end_por is not given, defaults to getting all text to the end of the current accessible.
Parameters:
  • start_por (AEPor) - A point of regard indicating the start of the text range
  • end_por (AEPor) - A point of regard indicating the end of the text range; use the POR to the end of the accessible if none supplied
  • only_visible (boolean) - Only consider visible items? Defaults to False.
Returns: string
Text between the two AEPors
Raises:

setAccText(text, por)

source code 
Sets the given string as the text at the given AEPor. All existing text is replaced.
Parameters:
  • text (string) - Text to set
  • por (AEPor) - Point of regard
Returns: boolean
Is setting the text supported?
Raises:

insertAccText(text, por, attrs=None)

source code 
Inserts the given text at the given AEPor. If attributes are specified, they will be applied to the inserted text.
Parameters:
  • text (string) - Text to set
  • por (AEPor) - Point of regard
  • attrs (dictionary) - Attributes to set over the text range
Returns: boolean
Is inserting text supported?
Raises:

copyAccText(start, end=None)

source code 
Copies the text from the given starting AEPor to the ending AEPor. When end is None, the start is used.
Parameters:
  • start (AEPor) - Point of regard to the start of the text run
  • end (AEPor) - Point of regard to the end of the text run
Returns: boolean
Is copy supported?
Raises:

cutAccText(start, end=None)

source code 
Cuts the text from the given starting AEPor to the ending AEPor. When end is None, the start is used.
Parameters:
  • start (AEPor) - Point of regard to the start of the text run
  • end (AEPor) - Point of regard to the end of the text run
Returns: boolean
Is cut supported?
Raises:

pasteAccText(por)

source code 
Pastes the clipboard text at the given AEPor.
Parameters:
  • por (AEPor) - Point of regard to the insertion point
Returns: boolean
Is paste supported?
Raises:

deleteAccText(start, end=None)

source code 
Deletes the text from the given starting AEPor to the ending AEPor. When end is None, the start is used.
Parameters:
  • start (AEPor) - Point of regard to the start of the text run
  • end (AEPor) - Point of regard to the end of the text run
Returns: boolean
Is delete supported?
Raises:

selectAccText(start, end=None, n=None)

source code 
Selects the text from the given starting AEPor to the ending AEPor. If n is None, a new selection range is added, else the nth selection is modified to the given range. When end is None, the start is used.
Parameters:
  • start (AEPor) - Point of regard to the start of the text run
  • end (AEPor) - Point of regard to the end of the text run
Returns: boolean
Is text selection supported?
Raises:

deselectAccText(por, n=None)

source code 
Deselects the text from the given AEPor. If n is None, all selected ranges are removed, else the nth selection is removed.
Parameters:
  • por (AEPor) - Point of regard to the text area
Returns: boolean
Is text deselection supported?
Raises:

getAccTextSelection(por, n=None)

source code 
Gets a list of all selected text if n is None, or the nth selection if it is specified, at the AEPor.
Parameters:
  • n (integer) - Index of text selection to get or None
  • por (AEPor) - A point of regard
Returns: list of string
List of selected text strings
Raises:

getAccTextSelectionCount(por)

source code 
Gets the number of discontiguous text selections in the AEPor.
Parameters:
  • por (AEPor) - Point of regard to an object containing text
Returns: integer
Number of selections or None when selections are not supported
Raises:

getAccDefTextAttrs(por)

source code 
Gets a dictionary of name:value default text attribute pairs at the provided
Parameters:
  • por (AEPor) - A point of regard
Returns: dictionary
Name/value pairs for all available attributes
Raises:

getAccAllTextAttrs(por)

source code 
Like getAccTextAttr, but gets the values of all of the current attributes of an accessible of a given AEPor.
Parameters:
  • por (AEPor) - A point of regard
Returns: dictionary
Name/value pairs for all available attributes
Raises:

See Also: getAccTextAttr

getAccTextAttr(name, por)

source code 

Gets the value of the given attribute of an accessible of a given AEPor.

Valid attribute names/value pairs include: (subject to change, GNOME ATK specification):

left-margin: The pixel width of the left margin right-margin: The pixel width of the right margin indent: The number of pixels that the text is indented invisible: Either "true" or "false" indicates whether text is visible or not editable: Either "true" or "false" indicates whether text is editable or not pixels-above-lines: Pixels of blank space to leave above each newline-terminated line. pixels-below-lines: Pixels of blank space to leave below each newline-terminated line. pixels-inside-wrap: Pixels of blank space to leave between wrapped lines inside the same newline-terminated line (paragraph). bg-full-height: "true" or "false" whether to make the background color for each character the height of the highest font used on the current line, or the height of the font used for the current character. rise: Number of pixels that the characters are risen above the baseline underline: "none", "single", "double" or "low" strikethrough: "true" or "false" whether the text is strikethrough size: The size of the characters. scale: The scale of the characters: a string representation of a double. weight: The weight of the characters. language: The language used family-name: The font family name bg-color: The background color: RGB value of the format "u,u,u" fg-color: The foreground color: RGB value of the format "u,u,u" bg-stipple: "true" if a GdkBitmap is set for stippling the background color. fg-stipple: "true" if a GdkBitmap is set for stippling the foreground color. wrap-mode: The wrap mode of the text, if any: "none", "char" or "word" direction: The direction of the text, if set: "none", "ltr" or "rtl" justification: The justification of the text, if set: "left", "right", "center" or "fill" stretch: The stretch of the text, if set: "ultra_condensed", "extra_condensed", "condensed", "semi_condensed", "normal", "semi_expanded", "expanded", "extra_expanded" or "ultra_expanded" variant: The capitalization of the text, if set: "normal" or "small_caps" style: The slant style of the text, if set: "normal", "oblique" or "italic" last-defined: not a valid text attribute, for finding end of enumeration
Parameters:
  • name (string) - text attribute name, eg. "fg-color", "justification"
  • por (AEPor) - A point of regard
Returns: string
value of attribute
Raises:

setAccTextAttrs(start, end=None, **attrs)

source code 
Sets the attributes of the text from the given starting AEPor to the ending AEPor. When end is None, the start is used.
Parameters:
  • attrs (dictionary) - Attributes to set over the text range
  • start (AEPor) - Point of regard to the start of the text run
  • end (AEPor) - Point of regard to the end of the text run
Returns: boolean
Is setting attributes supported?
Raises:

See Also: getAccTextAttr

getAccCaret(por)

source code 
Gets the text input caret AEPor within the given accessible AEPor.
Parameters:
  • por (AEPor) - A point of regard
Returns: AEPor
Point of regard to the text insertion caret
Raises:

setAccCaret(por)

source code 
Moves the text input caret to offset indicated by the given AEPor.
Parameters:
  • por (AEPor) - A point of regard
Returns: boolean
Is setting the caret supported?
Raises:
  • PORError - When the AEPor is invalid
  • CaretError - When moving the caret is supported but rejected by the system for some reason

getAccFloatValue(por)

source code 
Gets the floating point value at the given AEPor.
Parameters:
  • por (AEPor) - A point of regard
Returns: float
Floating point value
Raises:

getAccFloatValueExtents(por)

source code 
Get the extents and step size of the floating point value at the AEPor.
Parameters:
  • por (AEPor) - A point of regard
Returns: 3-tuple of float
The minimum possible value, the maximum possible value, and the step size for the floating point value
Raises:

getAccIndex(por)

source code 
Gets the index the AEPor within some 1D ordered collection.
Parameters:
  • por (AEPor) - A point of regard
Returns: integer
Zero index of the item
Raises:

getAccRow(por)

source code 
Gets the row index of the AEPor within some 2D ordered collection.
Parameters:
  • por (AEPor) - A point of regard
Returns: integer
Zero indexed row of the item
Raises:

getAccColumn(por)

source code 
Gets the column index of the AEPor within some 2D ordered collection.
Parameters:
  • por (AEPor) - A point of regard
Returns: integer
Zero indexed column of the item
Raises:

getAccAtRowColumn(row, col, por)

source code 
Gets the AEPor to the cell in the given AEPor at the given row and column.
Parameters:
  • por (AEPor) - A point of regard
  • row (integer) - Row offset
  • col (integer) - Column offset
Returns: AEPor
Point of regard to the given row and column
Raises:

getAccRowHeader(por)

source code 
Gets the text description of a row in a table.
Parameters:
  • por (AEPor) - A point of regard
Returns: string
text description of the row, if there is one.
Raises:

getAccColumnHeader(por)

source code 
Gets the text description of a column in a table.
Parameters:
  • por (AEPor) - A point of regard
Returns: string
text description of the column, if there is one.
Raises:

getAccLevel(por)

source code 
Gets the tree level of the item indicated by the given AEPor.
Parameters:
  • por (AEPor) - A point of regard
Returns: integer
Zero indexed level of the item
Raises:

getAccTableExtents(por)

source code 
Returns the number of rows and columns in a table indicated by the given AEPor.
Parameters:
  • por (AEPor) - A point of regard
Returns: 2-tuple of integer
Count of rows and columns
Raises:

getFirstSelected(por)

source code 
Gets the first selected items or accessible children in the accessible indicated by the given AEPor.
Parameters:
  • por (AEPor) - A point of regard
Returns: AEPor
Point of regard to the first selected item or accessible
Raises:

getAllSelected(por)

source code 
Gets all of the selected items or accessible children in the accessible indicated by the given AEPor.
Parameters:
  • por (AEPor) - A point of regard
Returns: list of AEPor
Points of regard to selected items or accessibles
Raises:

setAllSelected(por)

source code 
Selects all of the items or accessible children in the accessible indicated by the given AEPor.
Parameters:
  • por (AEPor) - A point of regard
Returns: boolean
Is setting the focus supported?
Raises:
  • PORError - When the AEPor is invalid
  • SelectError - When selecting is supported but rejected by the system for some reason

setAllDeselected(por)

source code 
Deselects all of the items or accessible children in the accessible indicated by the given AEPor.
Parameters:
  • por (AEPor) - A point of regard
Returns: boolean
Is setting the focus supported?
Raises:
  • PORError - When the AEPor is invalid
  • SelectError - When deselecting is supported but rejected by the system for some reason

setAccSelected(por)

source code 
Selects the item or accessible indicated by the given AEPor.
Parameters:
  • por (AEPor) - A point of regard
Returns: boolean
Is setting the selection supported?
Raises:

setAccDeselected(por)

source code 
Deselects the item or accessible indicated by the given AEPor.
Parameters:
  • por (AEPor) - A point of regard
Returns: boolean
Is setting the selection supported?
Raises:

getRootAcc(por)

source code 
Gets a AEPor to the top level container of the given AEPor.
Parameters:
  • por (AEPor) - A point of regard
Returns: AEPor
A point of regard to the root accessible
Raises:

getEndAcc(por)

source code 
Gets a AEPor to the last item of the last accessible under the root of the view.
Parameters:
  • por (AEPor) - A point of regard
Returns: AEPor
A point of regard to the last accessible under the root POR
Raises:

getViewRootAcc()

source code 
Gets a AEPor indicating the root of the active view. This is more efficient than getRootAcc when the root of the active view is needed.
Returns: AEPor
A point of regard to the root accessible

getLastAccUnder(por)

source code 
Gets a AEPor to the last item of the last accessible under the given root.
Parameters:
  • por (AEPor) - A point of regard
Returns: AEPor
A point of regard to the last accessible under the given POR
Raises:

getAccFromPath(por, *path)

source code 
Gets a AEPor representing the accessible found by treating the path integers as descendant indices stating at the given AEPor.
Parameters:
  • por (AEPor) - A point of regard
  • path (integer) - Integers indicate the path to the desired object
Returns: AEPor
Point of regard for the descendant at the specified path

getParentAcc(por)

source code 
Gets the AEPor of the first character and first item of the parent of the provided AEPor.
Parameters:
  • por (AEPor) - A point of regard
Returns: AEPor
Point of regard for the parent

getChildAcc(index, por)

source code 
Gets the child accessible at the given index from the AEPor.
Parameters:
  • index (integer) - Child index to retrieve
  • por (AEPor) - A point of regard
Returns: AEPor
Point of regard to the child at the index or None if it does not exist

getPrevAcc(por)

source code 
Gets the AEPor of the previous accessible of a given AEPor.
Parameters:
  • por (AEPor) - A point of regard
Returns: AEPor
Point of regard to the previous accessible or None if not found

getNextAcc(por)

source code 
Gets the AEPor of the next accessible of a given AEPor in the AccessibleWalker order.
Parameters:
  • por (AEPor) - A point of regard
Returns: AEPor
Point of regard to the next accessible

getFirstPeerAcc(por)

source code 
Gets the AEPor of the first accessible peer of a given AEPor.
Parameters:
  • por (AEPor) - A point of regard
Returns: AEPor
Point of regard to the first peer accessible

getLastPeerAcc(por)

source code 
Gets the AEPor of the last accessible peer of a given AEPor.
Parameters:
  • por (AEPor) - A point of regard
Returns: AEPor
Point of regard to the first peer accessible

getNextPeerAcc(por)

source code 
Gets the AEPor of the next accessible peer of a given AEPor.
Parameters:
  • por (AEPor) - A point of regard
Returns: AEPor
Point of regard to the next peer accessible

getPrevPeerAcc(por)

source code 
Gets the AEPor of the previous accessible peer of a given AEPor.
Parameters:
  • por (AEPor) - A point of regard
Returns: AEPor
Point of regard to the next peer accessible

getCurrItem(por)

source code 
Gets the AEPor of the start of the item.
Parameters:
  • por (AEPor) - A point of regard
Returns: AEPor
Point of regard to the first character in the item or None if not found

getNextItem(por, wrap=False, only_visible=False)

source code 
Gets the AEPor of the next item in the given AEPor.
Parameters:
  • por (AEPor) - A point of regard
  • wrap (boolean) - Consider a next item outside this accessible if there is no next item in this accessible? Defaults to False.
  • only_visible (boolean) - Only consider visible items? Defaults to False.
Returns: AEPor
Point of regard to the previous item or None if not found

getPrevItem(por, wrap=False, only_visible=False)

source code 
Gets the AEPor of the previous item in the given AEPor.
Parameters:
  • por (AEPor) - A point of regard
  • wrap (boolean) - Consider a previous item outside this accessible if there is no previous item in this accessible? Defaults to False.
  • only_visible (boolean) - Only consider visible items? Defaults to False.
Returns: AEPor
Point of regard to the previous item or None if not found

getCurrWord(por)

source code 
Get the AEPor of the current word in the item indicated by the given AEPor
Parameters:
  • por (AEPor) - A point of regard
Returns: AEPor
Point of regard to the start of the current word or None if not found

getNextWord(por)

source code 
Get the AEPor of the next word in the item indicated by the given AEPor.
Parameters:
  • por (AEPor) - A point of regard
Returns: AEPor
Point of regard to the next word or None if not found

getPrevWord(por)

source code 
Get the AEPor of the previous word in the item indicated by the given AEPor.
Parameters:
  • por (AEPor) - A point of regard
Returns: AEPor
Point of regard to the previous word or None if not found

getLastWord(por)

source code 
Get the AEPor of the current word in the item indicated by the given AEPor.
Parameters:
  • por (AEPor) - A point of regard
Returns: AEPor
Point of regard to the start of the last word or None if not found

getNextChar(por)

source code 
Get the AEPor of the next character in the item indicated by the given
Parameters:
  • por (AEPor) - A point of regard
Returns: AEPor
Point of regard to the next character or None if not found

getPrevChar(por)

source code 
Get the AEPor of the previous character in the item indicated by the given AEPor.
Parameters:
  • por (AEPor) - A point of regard
Returns: AEPor
Point of regard to the previous character or None if not found

getLastChar(por)

source code 
Get the AEPor of the last character in the item indicated by the given AEPor.
Parameters:
  • por (AEPor) - A point of regard
Returns: AEPor
Point of regard to the last character or None if not found

getCurrRow(por)

source code 
Gets the AEPor to the cell in the first column of the row containing the item indicated by the given AEPor.
Parameters:
  • por (AEPor) - A point of regard
Returns: AEPor
Point of regard to the first column of the given row

getNextRow(por)

source code 
Get the AEPor of the first column of the next row relative to the row containing the item indicated by the given AEPor.
Parameters:
  • por (AEPor) - A point of regard
Returns: AEPor
Point of regard to the start of the next row or None if not found

getPrevRow(por)

source code 
Get the AEPor of the first column of the previous row relative to the row containing the item indicated by the given AEPor.
Parameters:
  • por (AEPor) - A point of regard
Returns: AEPor
Point of regard to the start of the previous row or None if not found

getStartOfHardLine(por)

source code 
From a given AEPor, get the AEPor of the start of the first line that follows the previous hard line break, or the start of the first line if it is the first line in the accessible.
Parameters:
  • por (AEPor) - Point of regard
Returns: AEPor
Point of regard to the previous character or None if not found
Raises:

getEndOfHardLine(por)

source code 
From a given AEPor, get the AEPor of the end of the first following line that ends with a hard line break, or the end of the last line if it is the last line in the accessible.
Parameters:
  • por (AEPor) - Point of regard
Returns: AEPor
Point of regard to the previous character or None if not found
Raises:

iterAncestorAccs(por, only_visible=False, allow_trivial=False)

source code 
Builds an iterator over the ancestors of the current AEPor.
Parameters:
  • por (AEPor) - A point of regard
  • only_visible (boolean) - Yield on visible AEPors only?
  • allow_trivial (boolean) - Yield on trivial AEPors too?
Returns: AEPor
Point of regard to an ancestor

iterNextAccs(por)

source code 
Builds an iterator over the accessibles next to the current AEPor.
Parameters:
  • por (AEPor) - A point of regard
Returns: AEPor
Point of regard to the previous accessible

iterPrevAccs(por)

source code 
Builds an iterator over the accessibles previous to the current AEPor.
Parameters:
  • por (AEPor) - A point of regard
Returns: AEPor
Point of regard to the previous accessible

iterNextItems(por, wrap=False, only_visible=False)

source code 
Builds an iterator over the items next to the current AEPor.
Parameters:
  • por (AEPor) - A point of regard
  • wrap (boolean) - Consider a next item outside this accessible if there is no next item in this accessible? Defaults to False.
  • only_visible (boolean) - Only consider visible items? Defaults to False.
Returns: AEPor
Point of regard to the next item

iterPrevItems(por, wrap=False, only_visible=False)

source code 
Builds an iterator over the items previous to the current AEPor.
Parameters:
  • por (AEPor) - A point of regard
  • wrap (boolean) - Consider a previous item outside this accessible if there is no previous item in this accessible? Defaults to False.
  • only_visible (boolean) - Only consider visible items? Defaults to False.
Returns: AEPor
Point of regard to the previous item

findAccByName(name, por, ancestor=False, depth_first=True)

source code 
Gets a AEPor to the first accessible descendant or ancestor of the given AEPor with the given name.
Parameters:
  • name (string) - Name of the accessible to locate
  • por (AEPor) - A point of regard
  • ancestor (boolean) - Search through ancestors (True) or descendants (False)?
  • depth_first (boolean) - Is the search depth-first (True) or breadth-first (False)? Only meaningful when ancestor is False.
Returns: AEPor
Point of regard to the target if found or None if not

findAccByRole(role, por, ancestor=False, depth_first=True)

source code 
Gets a AEPor to the first accessible descendant or ancestor of the given AEPor with the given role.
Parameters:
  • role (string) - Role of the accessible to locate
  • por (AEPor) - A point of regard
  • ancestor (boolean) - Search through ancestors (True) or descendants (False)?
  • depth_first (boolean) - Is the search depth-first (True) or breadth-first (False)? Only meaningful when ancestor is False.
Returns: AEPor
Point of regard to the target if found or None if not

findAccByObjId(objname, por, ancestor=False, depth_first=True)

source code 
Gets a AEPor to the first accessible descendant or ancestor of the given AEPor with the given 'id' attribute named objname.
Parameters:
  • objname (string) - Object id name to search
  • por (AEPor) - A point of regard
  • ancestor (boolean) - Search through ancestors (True) or descendants (False)?
  • depth_first (boolean) - Is the search depth-first (True) or breadth-first (False)? Only meaningful when ancestor is False.
Returns: AEPor
Point of regard to the target if found or None if not

findAccByPredicate(predicate, por, ancestor=False, depth_first=True)

source code 
Gets a AEPor to the first accessible descendant or ancestor of the given AEPor matching the given callable predicate.
Parameters:
  • predicate (callable) - Search predicate that evaluates to True or False
  • por (AEPor) - A point of regard
  • ancestor (boolean) - Search through ancestors (True) or descendants (False)?
  • depth_first (boolean) - Is the search depth-first (True) or breadth-first (False)? Only meaningful when ancestor is False.
Returns: AEPor
Point of regard to the target if found or None if not

Warning: This method should be considered unstable and likely to change in future versions of SUE

mouseEventPOR(event, por)

source code 
Triggers a mouse event at the center of the given point of regard or - in case of a text accessible - set the caret to the given position (e.g. in response to HandleTouchCursor in BasicBraillePerk)
Parameters:
  • event (string) - Mouse event, one of EVENT_SYNTHMOUSE_* in AEConstants
  • por (AEPor) - Point of regard
Returns: boolean
Is the action supported?
Raises:

leftClickPOR(por)

source code 
Performs a mouse left click on the center of a given point of regard.
Parameters:
  • por (AEPor) - Point of regard
Returns: boolean
Did the click succeed?
Raises:

Variables Details [hide private]

_state_descriptions

Value:
{('checked', False): _('unchecked'), ('checked', True): _('checked'), \
('unchecked', True): _('unchecked'), ('enabled', False): _('disabled')\
, ('disabled', True): _('disabled'), ('collapsed', False): _('expanded\
'), ('collapsed', True): _('collapsed'), ('expanded', False): _('colla\
psed'), ('expanded', True): _('expanded'), ('animated', False): _('not\
 animated'), ('animated', True): _('animated'),}