[pyatspi2] Add ScrollSubstringTo and ScrollSubstringToPoint text interfaces
- From: Samuel Thibault <sthibaul src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pyatspi2] Add ScrollSubstringTo and ScrollSubstringToPoint text interfaces
- Date: Sat, 26 Jan 2019 11:55:23 +0000 (UTC)
commit 5125757dc4fd2f2044619de7492f151952d0bc86
Author: Samuel Thibault <samuel thibault ens-lyon org>
Date: Wed Jun 27 15:45:22 2018 +0200
Add ScrollSubstringTo and ScrollSubstringToPoint text interfaces
NEWS | 4 ++++
pyatspi/text.py | 16 ++++++++++++++++
2 files changed, 20 insertions(+)
---
diff --git a/NEWS b/NEWS
index e5da640..7c2ef62 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,7 @@
+What's new in pyatspi 2.31.2:
+
+* Add ScrollSubstringTo and ScrollSubstringToPoint text interfaces.
+
What's new in pyatspi 2.31.1:
* Add support for locking/unlocking modifiers.
diff --git a/pyatspi/text.py b/pyatspi/text.py
index 1f0c1f2..837e3c1 100644
--- a/pyatspi/text.py
+++ b/pyatspi/text.py
@@ -586,6 +586,22 @@ class Text(interface):
"""
characterCount = property(fget=get_characterCount, doc=_characterCountDoc)
+ def scrollSubstringTo(self, startOffset, endOffset, scroll_type):
+ """
+ Makes the text range visible on the screen at a given position by
+ scrolling all necessary parents.
+ @return True if scrolling was successful.
+ """
+ return Atspi.Text.scroll_substring_to(self.obj, startOffset, endOffset, scroll_type)
+
+ def scrollSubstringToPoint(self, startOffset, endOffset, coord_type, x, y):
+ """
+ Makes the text range visible on the screen at a given position by
+ scrolling all necessary parents.
+ @return True if scrolling was successful.
+ """
+ return Atspi.Text.scroll_substring_to_point(self.obj, startOffset, endOffset, coord_type, x,
y)
+
def rangeToList(r):
return (r.start_offset, r.end_offset)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]