more explicit with method parameters.
@return the Accessible child whose bounding box contains the
specified point.
"""
@return the Accessible child whose bounding box contains the
specified point.
"""
- #TODO Need to return an actual accessible object rather than a random string.
func = self.get_dbus_method("getAccessibleAtPoint", dbus_interface=ATSPI_COMPONENT)
func = self.get_dbus_method("getAccessibleAtPoint", dbus_interface=ATSPI_COMPONENT)
- return func(x, y, coord_type)
+ return self._cache.create_accessible(self._app_name,
+ func(x, y, coord_type),
+ interfaces.ATSPI_COMPONENT)
ith anchor can be accessed.
"""
func = self.get_dbus_method("getObject", dbus_interface=ATSPI_HYPERLINK)
ith anchor can be accessed.
"""
func = self.get_dbus_method("getObject", dbus_interface=ATSPI_HYPERLINK)
+ return self._cache.create_accessible(self._app_name, func(index),
+ interfaces.ATSPI_HYPERLINK)
def getURI(self, index):
"""
def getURI(self, index):
"""
@return the Hyperlink in this Hypertext object.
"""
func = self.get_dbus_method("getLink", dbus_interface=ATSPI_HYPERTEXT)
@return the Hyperlink in this Hypertext object.
"""
func = self.get_dbus_method("getLink", dbus_interface=ATSPI_HYPERTEXT)
- #TODO Lookup the accessible object and call queryHyperlink on it.
- return func(index)
+ return self._cache.create_accessible(self._app_name, func(index),
+ interfaces.ATSPI_HYPERTEXT)
def getLinkIndex(self, character_index):
"""
def getLinkIndex(self, character_index):
"""
func = self.get_dbus_method("clearSelection", dbus_interface=ATSPI_SELECTION)
return func()
func = self.get_dbus_method("clearSelection", dbus_interface=ATSPI_SELECTION)
return func()
- def deselectChild(self, *args, **kwargs):
+ def deselectChild(self, childIndex):
"""
Remove a child from the selected children list of a Selection,
if the child is currently selected.
"""
Remove a child from the selected children list of a Selection,
if the child is currently selected.
@return True if the child was successfully selected, False otherwise.
"""
func = self.get_dbus_method("deselectChild", dbus_interface=ATSPI_SELECTION)
@return True if the child was successfully selected, False otherwise.
"""
func = self.get_dbus_method("deselectChild", dbus_interface=ATSPI_SELECTION)
- return func(*args, **kwargs)
+ return func(childIndex)
def deselectSelectedChild(self, index):
"""
def deselectSelectedChild(self, index):
"""
by selectedChildIndex.
"""
func = self.get_dbus_method("getSelectedChild", dbus_interface=ATSPI_SELECTION)
by selectedChildIndex.
"""
func = self.get_dbus_method("getSelectedChild", dbus_interface=ATSPI_SELECTION)
- return self._cache.create_accessible(self._app_name,
- func(index),
+ return self._cache.create_accessible(self._app_name, func(index),
interfaces.ATSPI_ACCESSIBLE)
def isChildSelected(self, index):
interfaces.ATSPI_ACCESSIBLE)
def isChildSelected(self, index):
@return an Accessible object representing the specified table
cell.
"""
@return an Accessible object representing the specified table
cell.
"""
- #TODO Return an accessible object instead of a path.
func = self.get_dbus_method("getAccessibleAt", dbus_interface=ATSPI_TABLE)
func = self.get_dbus_method("getAccessibleAt", dbus_interface=ATSPI_TABLE)
- return func(row, column)
+ return self._cache.create_accessible(self._app_name, func(row, column),
+ interfaces.ATSPI_ACCESSIBLE)
def getColumnAtIndex(self, index):
"""
def getColumnAtIndex(self, index):
"""
if available.
"""
func = self.get_dbus_method("getColumnHeader", dbus_interface=ATSPI_TABLE)
if available.
"""
func = self.get_dbus_method("getColumnHeader", dbus_interface=ATSPI_TABLE)
- #TODO Return an accessible object
- return func(index)
+ return self._cache.create_accessible(self._app_name, func(index),
+ interfaces.ATSPI_ACCESSIBLE)
def getIndexAt(self, row, column):
"""
def getIndexAt(self, row, column):
"""
if available.
"""
func = self.get_dbus_method("getRowHeader", dbus_interface=ATSPI_TABLE)
if available.
"""
func = self.get_dbus_method("getRowHeader", dbus_interface=ATSPI_TABLE)
- #TODO Return an accessible object
- return func(row)
+ return self._cache.create_accessible(self._app_name, func(row),
+ interfaces.ATSPI_ACCESSIBLE)
def getSelectedColumns(self):
"""
def getSelectedColumns(self):
"""
return func(row)
def get_caption(self):
return func(row)
def get_caption(self):
- #TODO Return an accessible object
- return self._pgetter(self._dbus_interface, "caption")
+ accessible = self._pgetter(self._dbus_interface, "caption")
+ return self._cache.create_accessible(self._app_name, accessible,
+ interfaces.ATSPI_ACCESSIBLE)
_captionDoc = \
"""
An Accessible which represents of a caption for a Table.
_captionDoc = \
"""
An Accessible which represents of a caption for a Table.
nSelectedRows = property(fget=get_nSelectedRows, doc=_nSelectedRowsDoc)
def get_summary(self):
nSelectedRows = property(fget=get_nSelectedRows, doc=_nSelectedRowsDoc)
def get_summary(self):
- #TODO Return an accessible object
- return self._pgetter(self._dbus_interface, "summary")
+ accessible = self._pgetter(self._dbus_interface, "summary")
+ return self._cache.create_accessible(self._app_name, accessible,
+ interfaces.ATSPI_ACCESSIBLE)
_summaryDoc = \
"""
An accessible object which summarizes the contents of a Table.
_summaryDoc = \
"""
An accessible object which summarizes the contents of a Table.
and the set returned at a particular character offset via Text::getAttributeRun.
"""
and the set returned at a particular character offset via Text::getAttributeRun.
"""
- def addSelection(self, *args, **kwargs):
+ def addSelection(self, index):
"""
The result of calling addSelection on objects which already have
one selection present, and which do not include STATE_MULTISELECTABLE,
"""
The result of calling addSelection on objects which already have
one selection present, and which do not include STATE_MULTISELECTABLE,
to copy the text into the relevant selection buffer).
"""
func = self.get_dbus_method("addSelection", dbus_interface=ATSPI_TEXT)
to copy the text into the relevant selection buffer).
"""
func = self.get_dbus_method("addSelection", dbus_interface=ATSPI_TEXT)
- return func(*args, **kwargs)
def getAttributeRun(self, offset, startOffset, endOffset, includeDefaults):
"""
def getAttributeRun(self, offset, startOffset, endOffset, includeDefaults):
"""
attr = func(offset, startOffset, endOffset, includeDefaults)
return [key + ':' + value for key, value in attr.values()]
attr = func(offset, startOffset, endOffset, includeDefaults)
return [key + ':' + value for key, value in attr.values()]
- def getAttributeValue(self, *args, **kwargs):
+ def getAttributeValue(self, offset, attributeName, startOffset, endOffset, defined):
"""
Get the string value of a named attribute at a given offset,
if defined.
"""
Get the string value of a named attribute at a given offset,
if defined.
to "name", if defined.
"""
func = self.get_dbus_method("getAttributeValue", dbus_interface=ATSPI_TEXT)
to "name", if defined.
"""
func = self.get_dbus_method("getAttributeValue", dbus_interface=ATSPI_TEXT)
- return func(*args, **kwargs)
+ return func(offset, attributeName, startOffset, endOffset, defined)
def getAttributes(self, offset):
"""
def getAttributes(self, offset):
"""
func = self.get_dbus_method("getAttributes", dbus_interface=ATSPI_TEXT)
return [key + ':' + value for key, value in func(dbus.Int32(offset)).values()]
func = self.get_dbus_method("getAttributes", dbus_interface=ATSPI_TEXT)
return [key + ':' + value for key, value in func(dbus.Int32(offset)).values()]
- def getBoundedRanges(self, *args, **kwargs):
+ def getBoundedRanges(self, x, y, width, height, coordType, xClipType, yClipType):
#TODO Return a list of range structures
"""
Return the text content within a bounding box, as a list of Range
#TODO Return a list of range structures
"""
Return the text content within a bounding box, as a list of Range
the y direction is included.
"""
func = self.get_dbus_method("getBoundedRanges", dbus_interface=ATSPI_TEXT)
the y direction is included.
"""
func = self.get_dbus_method("getBoundedRanges", dbus_interface=ATSPI_TEXT)
- return func(*args, **kwargs)
+ return func(x, y, width, height, coordType, xClipType, yClipType)
- def getCharacterAtOffset(self, *args, **kwargs):
+ def getCharacterAtOffset(self, offset):
+ @param : offset
+ position
@return an unsigned long integer whose value corresponds to the
UCS-4 representation of the character at the specified text offset,
or 0 if offset is out of range.
"""
func = self.get_dbus_method("getCharacterAtOffset", dbus_interface=ATSPI_TEXT)
@return an unsigned long integer whose value corresponds to the
UCS-4 representation of the character at the specified text offset,
or 0 if offset is out of range.
"""
func = self.get_dbus_method("getCharacterAtOffset", dbus_interface=ATSPI_TEXT)
- return func(*args, **kwargs)
- def getCharacterExtents(self, *args, **kwargs):
+ def getCharacterExtents(self, offset, x, y, width, height, coordType):
"""
Obtain a the bounding box, as x, y, width, and height, of the
character or glyph at a particular character offset in this object's
"""
Obtain a the bounding box, as x, y, width, and height, of the
character or glyph at a particular character offset in this object's
down.
"""
func = self.get_dbus_method("getCharacterExtents", dbus_interface=ATSPI_TEXT)
down.
"""
func = self.get_dbus_method("getCharacterExtents", dbus_interface=ATSPI_TEXT)
- return func(*args, **kwargs)
+ return func(offset, x, y, width, height, coordType)
def getDefaultAttributeSet(self):
"""
def getDefaultAttributeSet(self):
"""
func = self.get_dbus_method("getDefaultAttributes", dbus_interface=ATSPI_TEXT)
return [key + ':' + value for key, value in func().values()]
func = self.get_dbus_method("getDefaultAttributes", dbus_interface=ATSPI_TEXT)
return [key + ':' + value for key, value in func().values()]
- def getNSelections(self, *args, **kwargs):
+ def getNSelections(self):
"""
Obtain the number of separate, contiguous selections in the current
Text object. Text objects which do not implement selection of
"""
Obtain the number of separate, contiguous selections in the current
Text object. Text objects which do not implement selection of
object.
"""
func = self.get_dbus_method("getNSelections", dbus_interface=ATSPI_TEXT)
object.
"""
func = self.get_dbus_method("getNSelections", dbus_interface=ATSPI_TEXT)
- return func(*args, **kwargs)
- def getOffsetAtPoint(self, *args, **kwargs):
+ def getOffsetAtPoint(self, x, y, coordType):
"""
Get the offset of the character at a given onscreen coordinate.
The coordinate system used to interpret x and y is determined
"""
Get the offset of the character at a given onscreen coordinate.
The coordinate system used to interpret x and y is determined
-1 if the point is outside the bounds of any glyph.
"""
func = self.get_dbus_method("getOffsetAtPoint", dbus_interface=ATSPI_TEXT)
-1 if the point is outside the bounds of any glyph.
"""
func = self.get_dbus_method("getOffsetAtPoint", dbus_interface=ATSPI_TEXT)
- return func(*args, **kwargs)
+ return func(x, y, coordType)
- def getRangeExtents(self, *args, **kwargs):
+ def getRangeExtents(self, startOffset, endOffset, x, y, width, height, coordType):
"""
Obtain the bounding box which entirely contains a given text
range. Negative values may be returned for the bounding box parameters
"""
Obtain the bounding box which entirely contains a given text
range. Negative values may be returned for the bounding box parameters
to the corner of the containing toplevel window.
"""
func = self.get_dbus_method("getRangeExtents", dbus_interface=ATSPI_TEXT)
to the corner of the containing toplevel window.
"""
func = self.get_dbus_method("getRangeExtents", dbus_interface=ATSPI_TEXT)
- return func(*args, **kwargs)
+ return func(startOffset, endOffset, x, y, width, height, coordType)
- def getSelection(self, *args, **kwargs):
+ def getSelection(self, selectionNum, startOffset, endOffset):
"""
The result of calling getSelection with an out-of-range selectionNum
(i.e. for a selection which does not exist) is not strictly defined,
but should set endOffset equal to startOffset.
"""
The result of calling getSelection with an out-of-range selectionNum
(i.e. for a selection which does not exist) is not strictly defined,
but should set endOffset equal to startOffset.
+ @param : selectionNum
+ indicates which of a set of non-contiguous selections to modify.
+ @param : startOffset
+ back-filled with the starting offset of the resulting substring,
+ if one exists.
+ @param : endOffset
+ back-filled with the offset of the character immediately following
+ the resulting substring, if one exists.
"""
func = self.get_dbus_method("getSelection", dbus_interface=ATSPI_TEXT)
"""
func = self.get_dbus_method("getSelection", dbus_interface=ATSPI_TEXT)
- return func(*args, **kwargs)
+ return func(selectionNum, startOffset, endOffset)
def getText(self, startOffset, endOffset):
"""
Obtain all or part of the onscreen textual content of a Text
object. If endOffset is specified as "-1", then this method will
return the entire onscreen textual contents of the Text object.
def getText(self, startOffset, endOffset):
"""
Obtain all or part of the onscreen textual content of a Text
object. If endOffset is specified as "-1", then this method will
return the entire onscreen textual contents of the Text object.
+ @param : startOffset
+ back-filled with the starting offset of the resulting substring,
+ if one exists.
+ @param : endOffset
+ back-filled with the offset of the character immediately following
+ the resulting substring, if one exists.
@return the textual content of the current Text object beginning
startOffset (inclusive) up to but not including the character
at endOffset.
@return the textual content of the current Text object beginning
startOffset (inclusive) up to but not including the character
at endOffset.
endOffset = -1
return func(dbus.Int32(startOffset), dbus.Int32(endOffset))
endOffset = -1
return func(dbus.Int32(startOffset), dbus.Int32(endOffset))
- def getTextAfterOffset(self, *args, **kwargs):
+ def getTextAfterOffset(self, offset, type, startOffset, endOffset):
"""
Obtain a subset of the text content of an object which entirely
follows offset, delimited by character, word, line, or sentence
"""
Obtain a subset of the text content of an object which entirely
follows offset, delimited by character, word, line, or sentence
the object, delimited by the specified boundary condition.
"""
func = self.get_dbus_method("getTextAfterOffset", dbus_interface=ATSPI_TEXT)
the object, delimited by the specified boundary condition.
"""
func = self.get_dbus_method("getTextAfterOffset", dbus_interface=ATSPI_TEXT)
- return func(*args, **kwargs)
+ return func(offset, type, startOffset, endOffset)
def getTextAtOffset(self, offset, type):
"""
def getTextAtOffset(self, offset, type):
"""
func = self.get_dbus_method("getTextAtOffset", dbus_interface=ATSPI_TEXT)
return _repack_tuple(func(offset, type))
func = self.get_dbus_method("getTextAtOffset", dbus_interface=ATSPI_TEXT)
return _repack_tuple(func(offset, type))
- def getTextBeforeOffset(self, *args, **kwargs):
+ def getTextBeforeOffset(self, offset, type, startOffset, endOffset):
"""
Obtain a subset of the text content of an object which entirely
precedes offset, delimited by character, word, line, or sentence
"""
Obtain a subset of the text content of an object which entirely
precedes offset, delimited by character, word, line, or sentence
the object, delimited by the specified boundary condition.
"""
func = self.get_dbus_method("getTextBeforeOffset", dbus_interface=ATSPI_TEXT)
the object, delimited by the specified boundary condition.
"""
func = self.get_dbus_method("getTextBeforeOffset", dbus_interface=ATSPI_TEXT)
- return func(*args, **kwargs)
+ return func(offset, type, startOffset, endOffset)
- def removeSelection(self, *args, **kwargs):
+ def removeSelection(self, selectionNum):
"""
Deselect the text contained in the specified selectionNum, if
such a selection exists, otherwise do nothing. Removal of a non-existant
selectionNum has no effect.
"""
Deselect the text contained in the specified selectionNum, if
such a selection exists, otherwise do nothing. Removal of a non-existant
selectionNum has no effect.
+ @param : selectionNum
+ indicates which of a set of non-contiguous selections to modify.
@return True if the selection was successfully removed, False
otherwise.
"""
func = self.get_dbus_method("removeSelection", dbus_interface=ATSPI_TEXT)
@return True if the selection was successfully removed, False
otherwise.
"""
func = self.get_dbus_method("removeSelection", dbus_interface=ATSPI_TEXT)
- return func(*args, **kwargs)
+ return func(selectionNum)
- def setCaretOffset(self, *args, **kwargs):
+ def setCaretOffset(self, offset):
"""
Programmatically move the text caret (visible or virtual, as
above) to a given position.
"""
Programmatically move the text caret (visible or virtual, as
above) to a given position.
caret could not be moved to the requested position.
"""
func = self.get_dbus_method("setCaretOffset", dbus_interface=ATSPI_TEXT)
caret could not be moved to the requested position.
"""
func = self.get_dbus_method("setCaretOffset", dbus_interface=ATSPI_TEXT)
- return func(*args, **kwargs)
- def setSelection(self, *args, **kwargs):
+ def setSelection(self, selectionNum, startOffset, endOffset):
"""
Modify an existing selection's start or ending offset.
Calling setSelection for a selectionNum that is not already defined
"""
Modify an existing selection's start or ending offset.
Calling setSelection for a selectionNum that is not already defined
successfully modified, False otherwise.
"""
func = self.get_dbus_method("setSelection", dbus_interface=ATSPI_TEXT)
successfully modified, False otherwise.
"""
func = self.get_dbus_method("setSelection", dbus_interface=ATSPI_TEXT)
- return func(*args, **kwargs)
+ return func(selectionNum, startOffset, endOffset)
def get_caretOffset(self):
return dbus.Int32(self._pgetter(self._dbus_interface, "caretOffset"))
def get_caretOffset(self):
return dbus.Int32(self._pgetter(self._dbus_interface, "caretOffset"))