AccessEngine :: AEPor :: AEPor :: Class AEPor
[hide private]
[frames] | no frames]

Class AEPor

source code

object --+
         |
        AEPor

Stores point-of-regard data for accessibles, the user, a AETier's focus, etc.


Note: This class is a structure and based on the SUE coding conventions its members (except for the adapters dictionary) can be accessed directly.

Instance Methods [hide private]
 
__init__(self, accessible=None, item_offset=None, char_offset=0, incomplete=False)
Stores the provided accessible, offset to an item within the accessible, and offset to a character within the accessible.
source code
 
getAdapter(self, interface)
Gets a cached instead of an adapter for this AEPor to one of the AEAccInterfaces.
source code
 
cacheAdapter(self, interface, adapter)
Caches an adapter instance that has been previously used for this AEPor to provide the given interface.
source code
 
__eq__(self, other)
Compares this AEPor to the one provided based on all their properties.
source code
integer
__hash__(self)
Hashes based on the accessible, item offset, and character offset rather than the ID of the AEPor itself.
source code
 
__ne__(self, other)
Compares this AEPor to the one provided based on all their properties.
source code
string
__str__(self)
Gets a string describing this AEPor (Por = Point of Regard) in terms of its accessible, item_offset, and char_offset
source code
boolean
isSameChar(self, other)
Checks if the character offset in this AEPor is the same as the one in the given AEPor.
source code
boolean
isSameItem(self, other)
Checks if the item offset in this AEPor is the same as the one in the given AEPor.
source code
boolean
isSameAcc(self, other)
Checks if the accessible object in this AEPor is the same as the one in the given AEPor.
source code
boolean
isCharAfter(self, other)
Checks if the character offset in this AEPor is after the one in the given AEPor.
source code
boolean
isCharBefore(self, other)
Checks if the character offset in this AEPor is before the one in the given AEPor.
source code
boolean
isItemBefore(self, other)
Checks if the item offset in this AEPor is before the one in the given AEPor.
source code
boolean
isItemAfter(self, other)
Checks if the item offset in this AEPor is after the one in the given AEPor.
source code

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

Instance Variables [hide private]
pyatspi.Accessibility.Accessible accessible
The accessible of the control which has the point of regard.
dictionary adapters
Cached adapters for AEAccInterfaces for this AEPor
integer char_offset
Offset of the character at the caret or virtual cursor within the accessible and the item which has the point of regard.
boolean incomplete
Indicates that a AEPor might need additional processing before it is used when True.
integer or None item_offset
Offset of the Item within the accessible which has the point of regard.
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, accessible=None, item_offset=None, char_offset=0, incomplete=False)
(Constructor)

source code 
Stores the provided accessible, offset to an item within the accessible, and offset to a character within the accessible.
Parameters:
  • accessible (pyatspi.Accessibility.Accessible) - Accessible of the control which has the point of regard.
  • item_offset (integer or None) - Offset of the Item within the accessible which has the point of regard. Set to None to indicate the accessible has only 1 item. When restricting to visible, this offset will still be relative to total. For example, when the first item in a table is not visble, but the first item is requested, this index will not be 0 (the first in the table), but instead will be the index of the first visible cell. For text, this will be the character index of the first character in the line requested (i.e. the first visible line in the example above).
  • char_offset (integer) - Offset of the character at the caret or virtual cursor within the accessible which has the point of regard.
  • incomplete (boolean) - Indicates that a AEPor might need additional processing before it is used when True. Some AEAccInterfaces.IEventHandler may create AEPors that have an item in the accessible slot instead of its parent as the accessible and its index as the item_offset in order to save time for events that may never be handled. This flag indicates this situation and suggests that the AEPor be corrected properly before it reaches a AEScript and its tasks for processing.
Overrides: object.__init__

getAdapter(self, interface)

source code 
Gets a cached instead of an adapter for this AEPor to one of the AEAccInterfaces.
Parameters:

cacheAdapter(self, interface, adapter)

source code 
Caches an adapter instance that has been previously used for this AEPor to provide the given interface.
Parameters:

__eq__(self, other)
(Equality operator)

source code 
Compares this AEPor to the one provided based on all their properties.
Parameters:
  • other (AEPor) - Point of regard to compare

__hash__(self)
(Hashing function)

source code 
Hashes based on the accessible, item offset, and character offset rather than the ID of the AEPor itself.
Returns: integer
Immutable hash code based on the attributes of the AEPor
Overrides: object.__hash__

__ne__(self, other)

source code 
Compares this AEPor to the one provided based on all their properties.
Parameters:
  • other (AEPor) - Point of regard to compare

__str__(self)
(Informal representation operator)

source code 
Gets a string describing this AEPor (Por = Point of Regard) in terms of its accessible, item_offset, and char_offset
Returns: string
String representation
Overrides: object.__str__

isSameChar(self, other)

source code 
Checks if the character offset in this AEPor is the same as the one in the given AEPor.
Parameters:
  • other (AEPor) - Point of regard with the character offset to compare
Returns: boolean
Same character offset?

isSameItem(self, other)

source code 
Checks if the item offset in this AEPor is the same as the one in the given AEPor.
Parameters:
  • other (AEPor) - Point of regard with the item offset to compare
Returns: boolean
Same item offset?

isSameAcc(self, other)

source code 
Checks if the accessible object in this AEPor is the same as the one in the given AEPor.
Parameters:
  • other (AEPor) - Point of regard with the accessible to compare
Returns: boolean
Same accessible?

isCharAfter(self, other)

source code 
Checks if the character offset in this AEPor is after the one in the given AEPor.
Parameters:
  • other (AEPor) - Point of regard with the character offset to compare
Returns: boolean
Character after the other?

isCharBefore(self, other)

source code 
Checks if the character offset in this AEPor is before the one in the given AEPor.
Parameters:
  • other (AEPor) - Point of regard with the character offset to compare
Returns: boolean
Character before the other?

isItemBefore(self, other)

source code 
Checks if the item offset in this AEPor is before the one in the given AEPor.
Parameters:
  • other (AEPor) - Point of regard with the item offset to compare
Returns: boolean
Item before the other?

isItemAfter(self, other)

source code 
Checks if the item offset in this AEPor is after the one in the given AEPor.
Parameters:
  • other (AEPor) - Point of regard with the item offset to compare
Returns: boolean
Item after the other?

Instance Variable Details [hide private]

incomplete

Indicates that a AEPor might need additional processing before it is used when True. Some AEAccInterfaces.IEventHandler may create AEPors that have an item in the accessible slot instead of its parent as the accessible and its index as the item_offset in order to save time for events that may never be handled. This flag indicates this situation and suggests that the AEPor be corrected properly before it reaches a AEScript and its tasks for processing.
Type:
boolean

item_offset

Offset of the Item within the accessible which has the point of regard. Set to None to indicate the accessible has only 1 item. When restricting to visible, this offset will still be relative to total. For example, when the first item in a table is not visible, but the first item is requested, this index will not be 0 (the first in the table), but instead will be the index of the first visible cell. For text, this will be the character index of the first character in the line requested (i.e. the first visible line in the example above).
Type:
integer or None