Index: src/orca/default.py
===================================================================
--- src/orca/default.py	(revision 3078)
+++ src/orca/default.py	(working copy)
@@ -4132,7 +4132,22 @@
         Bookmark.goToPrevBookmark """ 
         bookmarks = self.getBookmarks()
         bookmarks.goToPrevBookmark(inputEvent)
-           
+
+    def getInterface(self, obj, interface):
+        """Given a interface type, returns the interface if implemented.
+
+        Arguments:
+        - obj: an accessible object
+        - interface: the pyatspi interface (e.g. pyatspi.Accessibility.Text)
+        """
+        
+        try:
+            iface = obj.queryInterface(pyatspi.getInterfaceIID(interface))
+        except:
+            iface = None
+
+        return iface
+
 ########################################################################
 #                                                                      #
 # DEBUG support.                                                       #
