Package AccessEngine :: Package AEAccAdapters :: Package ATSPI :: Module DefaultAction :: Class DefaultAccActionAdapter
[hide private]
[frames] | no frames]

Class DefaultAccActionAdapter

source code

               object --+        
                        |        
AEAccAdapter.AEAccAdapter --+    
                            |    
      AEAccAdapter.PORAdapter --+
                                |
                               DefaultAccActionAdapter

Adapts all AT-SPI accessibles to the IAccessibleAction interface. No condition for adaption is given implying that this adapter is used as a default by AEAccAdapter when no better adapter is available.

Expects the subject to be a pyatspi.Accessibility.Accessible.

Instance Methods [hide private]
boolean
setAccCaret(self)
Moves the caret to the location given by the item offset + the char offset.
source code
boolean
setAccText(self, text)
Replace contents of text area with the given text.
source code
boolean
insertAccText(self, text, attrs)
Inserts text at the location given by the item offset + the char offset.
source code
boolean
setAccTextAttrs(self, por, attrs)
Sets the accessible text attributes starting at item offset + char offset up to the offset given by the AEPor.
source code
boolean
copyAccText(self, por)
Copies the text starting at item offset + char offset up to the offset given by the AEPor.
source code
boolean
cutAccText(self, por)
Cuts the text starting at item offset + char offset up to the offset given by the AEPor.
source code
boolean
deleteAccText(self, por)
Deletes the text starting at item offset + char offset up to the offset given by the AEPor.
source code
boolean
pasteAccText(self)
Pastes the text at item offset + char offset.
source code
boolean
selectAccText(self, por, n=None)
Adds a new selection if n is None or sets the nth selection otherwise.
source code
boolean
deselectAccText(self, n=None)
Removes a all text selections if n is None or removes the nth text selection otherwise.
source code
 
doMouseAction(self, event)
Performs a mouse event on the center of a given point of regard.
source code
boolean
setAccFocus(self)
Gives the subject accessible the keyboard focus.
source code
boolean
selectAcc(self, all=False)
Selects the subject accessible if all is False.
source code
boolean
deselectAcc(self, all=False)
Deselects the subject accessible if all is False.
source code
boolean
doAccAction(self, index)
Executes the accessible action given by the index.
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 = [IAccessibleAction]
Interfaces provided by this adapter

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]

setAccCaret(self)

source code 
Moves the caret to the location given by the item offset + the char offset. Moves to the beginning of the text if the item offset is None.
Returns: boolean
Indicator of whether the caret was moved successfully
Raises:
  • LookupError - When the accessible object is dead
  • NotImplementedError - When the Text interface is not supported

setAccText(self, text)

source code 
Replace contents of text area with the given text.
Parameters:
  • text (string) - Text to set as the content of the text area given by the AEPor
Returns: boolean
Indicator of whether the text was set successfully or not
Raises:
  • LookupError - When the accessible object is dead
  • NotImplementedError - When the EditableText interface is not supported

insertAccText(self, text, attrs)

source code 
Inserts text at the location given by the item offset + the char offset. Inserts at the beginning of the text if the item offset is None.
Parameters:
  • text (string) - Text to insert at the given position
  • attrs (dictionary) - Dictionary of string name/value pairs of text attributes to set on the inserted text
Returns: boolean
Indicator of whether the text was inserted successfully or not
Raises:
  • LookupError - When the accessible object is dead
  • NotImplementedError - When the EditableText interface is not supported

setAccTextAttrs(self, por, attrs)

source code 
Sets the accessible text attributes starting at item offset + char offset up to the offset given by the AEPor. Always replaces the current attributes at present.
Parameters:
  • por (AEPor) - Point of regard to the end of the text run
  • attrs (dictionary) - Dictionary of string name/value pairs of text attributes to set on the text range
Returns: boolean
Indicator of whether the text attributes were set successfully or not
Raises:
  • LookupError - When the accessible object is dead
  • NotImplementedError - When the EditableText interface is not supported

copyAccText(self, por)

source code 
Copies the text starting at item offset + char offset up to the offset given by the AEPor. Copies from the beginning of the text if subject item offset is None. Copies to the end of the text if the AEPor item offset is None.
Parameters:
  • por (AEPor) - Point of regard to the end terminus of the copy operation
Returns: boolean
Indicator of whether the text was copied successfully or not
Raises:
  • LookupError - When the accessible object is dead
  • NotImplementedError - When the EditableText interface is not supported

cutAccText(self, por)

source code 
Cuts the text starting at item offset + char offset up to the offset given by the AEPor. Cuts from the beginning of the text if subject item offset is None. Cuts to the end of the text if the AEPor item offset is None.
Parameters:
  • por (AEPor) - Point of regard to the end terminus of the cut operation
Returns: boolean
Indicator of whether the text was cut successfully or not
Raises:
  • LookupError - When the accessible object is dead
  • NotImplementedError - When the EditableText interface is not supported

deleteAccText(self, por)

source code 
Deletes the text starting at item offset + char offset up to the offset given by the AEPor. Deletes from the beginning of the text if subject item offset is None. Deletes to the end of the text if the AEPor item_offset is None.
Parameters:
  • por (AEPor) - Point of regard to the end terminus of the delete operation
Returns: boolean
Indicator of whether the text was deleted successfully or not
Raises:
  • LookupError - When the accessible object is dead
  • NotImplementedError - When the EditableText interface is not supported

pasteAccText(self)

source code 
Pastes the text at item offset + char offset. Pastes from the beginning of the text is item offset is None.
Returns: boolean
Indicator of whether the text was pasted successfully or not
Raises:
  • LookupError - When the accessible object is dead
  • NotImplementedError - When the EditableText interface is not supported

selectAccText(self, por, n=None)

source code 
Adds a new selection if n is None or sets the nth selection otherwise. Selects the text starting at item offset + char offset up to the offset given by the AEPor. Selects to the end of the text if the AEPor item_offset is None.
Parameters:
  • por (AEPor) - Point of regard to the end terminus of the select operation
Returns: boolean
Indicator of whether the text was selected successfully or not
Raises:
  • LookupError - When the accessible object is dead
  • NotImplementedError - When the Text interface is not supported

deselectAccText(self, n=None)

source code 
Removes a all text selections if n is None or removes the nth text selection otherwise. When n is None, returns True if at least one selection was removed.
Returns: boolean
Indicator of whether the text was deselected successfully or not
Raises:
  • LookupError - When the accessible object is dead
  • NotImplementedError - When the Text interface is not supported

doMouseAction(self, event)

source code 
Performs a mouse event on the center of a given point of regard.
Parameters:
  • event (integer (EVENT_SYNTHMOUSE*)) - Mouse event to perform
Returns:
Indicator of whether the event succeded or not
Raises:
  • LookupError - When the accessible object is dead

setAccFocus(self)

source code 
Gives the subject accessible the keyboard focus.
Returns: boolean
Did accessible accept (True) or refuse (False) the focus change?
Raises:
  • LookupError - When the accessible object is dead
  • NotImplementedError - When the accessible does not support an interface for setting focus

selectAcc(self, all=False)

source code 
Selects the subject accessible if all is False. Selects all children if all is True.
Parameters:
  • all (boolean) - Select all children?
Returns: boolean
Did accessible accept (True) or refuse (False) the selection?
Raises:
  • LookupError - When the accessible object is dead
  • NotImplementedError - When the accessible does not support an interface for setting selection

deselectAcc(self, all=False)

source code 
Deselects the subject accessible if all is False. Deselects all children if all is True.
Parameters:
  • all (boolean) - Deselect all children?
Returns: boolean
Did accessible accept (True) or refuse (False) the deselection?
Raises:
  • LookupError - When the accessible object is dead
  • NotImplementedError - When the accessible does not support an interface for setting selection

doAccAction(self, index)

source code 
Executes the accessible action given by the index.
Parameters:
  • index (integer) - Index of the action to execute
Returns: boolean
Did the action execute (True) or not (False)?
Raises:
  • LookupError - When the accessible object is dead
  • NotImplementedError - When the accessible does not support the action interface