[pyatspi2] Update for libatspi API changes



commit 103c0062960ace671124b065a4b2e79806710f3e
Author: Mike Gorse <mgorse suse com>
Date:   Tue May 14 12:20:05 2013 -0500

    Update for libatspi API changes
    
    Some functions have been deprecated in favor of new functions to avoid
    name collisions.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=700243

 pyatspi/Accessibility.py |   22 +++++++++++-----------
 pyatspi/action.py        |    4 ++--
 pyatspi/document.py      |    4 ++--
 pyatspi/text.py          |    4 ++--
 4 files changed, 17 insertions(+), 17 deletions(-)
---
diff --git a/pyatspi/Accessibility.py b/pyatspi/Accessibility.py
index 1f57073..06960a5 100644
--- a/pyatspi/Accessibility.py
+++ b/pyatspi/Accessibility.py
@@ -138,18 +138,18 @@ Atspi.Accessible.toolkitName = property(fget=Atspi.Accessible.get_toolkit_name)
 Atspi.Accessible.toolkitVersion = property(fget=Atspi.Accessible.get_toolkit_version)
 Atspi.Accessible.atspiVersion = property(fget=Atspi.Accessible.get_atspi_version)
 
-Atspi.Accessible.queryAction = lambda x: Action(getInterface(Atspi.Accessible.get_action, x))
-Atspi.Accessible.queryCollection = lambda x: Collection(getInterface(Atspi.Accessible.get_collection, x))
-Atspi.Accessible.queryComponent = lambda x: Component(getInterface(Atspi.Accessible.get_component, x))
-Atspi.Accessible.queryDocument = lambda x: Document(getInterface(Atspi.Accessible.get_document, x))
-Atspi.Accessible.queryEditableText = lambda x: EditableText(getInterface(Atspi.Accessible.get_editable_text, 
x))
+Atspi.Accessible.queryAction = lambda x: Action(getInterface(Atspi.Accessible.get_action_iface, x))
+Atspi.Accessible.queryCollection = lambda x: Collection(getInterface(Atspi.Accessible.get_collection_iface, 
x))
+Atspi.Accessible.queryComponent = lambda x: Component(getInterface(Atspi.Accessible.get_component_iface, x))
+Atspi.Accessible.queryDocument = lambda x: Document(getInterface(Atspi.Accessible.get_document_iface, x))
+Atspi.Accessible.queryEditableText = lambda x: 
EditableText(getInterface(Atspi.Accessible.get_editable_text_iface, x))
 Atspi.Accessible.queryHyperlink = lambda x: getInterface(Atspi.Accessible.get_hyperlink, x)
-Atspi.Accessible.queryHypertext = lambda x: Hypertext(getInterface(Atspi.Accessible.get_hypertext, x))
-Atspi.Accessible.queryImage = lambda x: Image(getInterface(Atspi.Accessible.get_image, x))
-Atspi.Accessible.querySelection = lambda x: Selection(getInterface(Atspi.Accessible.get_selection, x))
-Atspi.Accessible.queryTable = lambda x: Table(getInterface(Atspi.Accessible.get_table, x))
-Atspi.Accessible.queryText = lambda x: Text(getInterface(Atspi.Accessible.get_text, x))
-Atspi.Accessible.queryValue = lambda x: Value(getInterface(Atspi.Accessible.get_value, x))
+Atspi.Accessible.queryHypertext = lambda x: Hypertext(getInterface(Atspi.Accessible.get_hypertext_iface, x))
+Atspi.Accessible.queryImage = lambda x: Image(getInterface(Atspi.Accessible.get_image_iface, x))
+Atspi.Accessible.querySelection = lambda x: Selection(getInterface(Atspi.Accessible.get_selection_iface, x))
+Atspi.Accessible.queryTable = lambda x: Table(getInterface(Atspi.Accessible.get_table_iface, x))
+Atspi.Accessible.queryText = lambda x: Text(getInterface(Atspi.Accessible.get_text_iface, x))
+Atspi.Accessible.queryValue = lambda x: Value(getInterface(Atspi.Accessible.get_value_iface, x))
 
 # Doing this here since otherwise we'd have import recursion
 interface.queryAction = lambda x: Action(getInterface(Atspi.Accessible.get_action, x.obj))
diff --git a/pyatspi/action.py b/pyatspi/action.py
index d95e6d1..ac69e25 100644
--- a/pyatspi/action.py
+++ b/pyatspi/action.py
@@ -66,7 +66,7 @@ class Action(interface):
                 @return : a string containing the description of the specified
                 action.
                 """
-                return Atspi.Action.get_description(self.obj, index)
+                return Atspi.Action.get_action_description(self.obj, index)
 
         def getKeyBinding(self, index):
                 """
@@ -89,7 +89,7 @@ class Action(interface):
                 rather than the result of invoking the action.
                 @return : a string containing the name of the specified action.
                 """
-                return Atspi.Action.get_name(self.obj, index)
+                return Atspi.Action.get_action_name(self.obj, index)
 
         def getLocalizedName(self, index):
                 """
diff --git a/pyatspi/document.py b/pyatspi/document.py
index c41ddc6..e57e9b1 100644
--- a/pyatspi/document.py
+++ b/pyatspi/document.py
@@ -45,7 +45,7 @@ class Document(interface):
                 attribute, or an empty string if the attribute is unspecified
                 for the object.
                 """
-                return Atspi.Document.get_attribute_value(self.obj, key)
+                return Atspi.Document.get_document_attribute_value(self.obj, key)
 
         def getAttributes(self):
                 """
@@ -55,7 +55,7 @@ class Document(interface):
                 @return an AttributeSet containing the attributes of the document,
                 as name-value pairs.
                 """
-                ret = Atspi.Document.get_attributes(self.obj)
+                ret = Atspi.Document.get_document_attributes(self.obj)
                 return [key + ':' + value for key, value in ret.items()]
 
         def getLocale(self):
diff --git a/pyatspi/text.py b/pyatspi/text.py
index c3278e0..e4ff521 100644
--- a/pyatspi/text.py
+++ b/pyatspi/text.py
@@ -190,7 +190,7 @@ class Text(interface):
                 @return the value of attribute (name-value pair) corresponding
                 to "name", if defined.
                 """
-                return Atspi.Text.get_attribute_value(self.obj, offset, attributeName)
+                return Atspi.Text.get_text_attribute_value(self.obj, offset, attributeName)
 
         def getAttributes(self, offset):
                 """
@@ -198,7 +198,7 @@ class Text(interface):
                 @return the attributes at offset, as a semicolon-delimited set
                 of colon-delimited name-value pairs.
                 """
-                [attrs, startOffset, endOffset] = Atspi.Text.get_attributes(self.obj, offset)
+                [attrs, startOffset, endOffset] = Atspi.Text.get_text_attributes(self.obj, offset)
                 arr = [key + ':' + value for key, value in attrs.items()]
                 str = ';'.join (arr)
                 return [str, startOffset, endOffset]


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