[pyatspi2] document: add support for newly added methods and signals on AtkDocument



commit 809607009856aaa4d4fa186dd0ea2a4991251f10
Author: Alejandro Piñeiro <apinheiro igalia com>
Date:   Thu Nov 28 19:59:45 2013 +0100

    document: add support for newly added methods and signals on AtkDocument
    
    https://bugzilla.gnome.org/show_bug.cgi?id=719508

 pyatspi/constants.py |    1 +
 pyatspi/document.py  |   16 ++++++++++++++++
 2 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/pyatspi/constants.py b/pyatspi/constants.py
index d6b4cff..6ad3bc1 100644
--- a/pyatspi/constants.py
+++ b/pyatspi/constants.py
@@ -67,6 +67,7 @@ EVENT_TREE = {
      'document:reload',
      'document:load-stopped',
      'document:attributes-changed'
+     'document:page-changed'
      ],
   'object': 
     ['object:property-change',
diff --git a/pyatspi/document.py b/pyatspi/document.py
index e57e9b1..b44689c 100644
--- a/pyatspi/document.py
+++ b/pyatspi/document.py
@@ -67,4 +67,20 @@ class Document(interface):
                 """
                 return Atspi.Document.get_locale(self.obj)
 
+        def getCurrentPageNumber(self):
+                """
+                Gets the current page number associated with the document.
+                @return a integer with the current page number. -1 if error
+                or unknown.
+                """
+                return Atspi.Document.get_current_page_number(self.obj)
+
+        def getPageCount(self):
+                """
+                Gets the page count of the document.
+                @return a integer with the page count of the document.
+                -1 if error or unknown.
+                """
+                return Atspi.Document.get_page_count(self.obj)
+
 #END----------------------------------------------------------------------------


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]