2009-04-16 Mike Gorse <mgorse@novell.com>
[platform/core/uifw/at-spi2-atk.git] / pyatspi / base.py
index ae097d1..438f9e5 100644 (file)
@@ -20,6 +20,7 @@ import interfaces
 
 __all__ = [
            "AccessibleObjectNoLongerExists",
+           "AccessibleObjectNotAvailable",
            "Enum",
            "BaseProxy",
           ]
@@ -27,9 +28,12 @@ __all__ = [
 class AccessibleObjectNoLongerExists(Exception):
         pass
 
+class AccessibleObjectNotAvailable(Exception):
+        pass
+
 #------------------------------------------------------------------------------
 
-class Enum(int):
+class Enum(uint):
         def __str__(self):
                 return self._enum_lookup[int(self)]
 
@@ -127,6 +131,9 @@ class BaseProxy(object):
         def __ne__(self, other):
                 return not self.__eq__(other)
 
+        def __hash__(self):
+                return hash(self._app_name + self._acc_path)
+
         def get_dbus_method(self, *args, **kwargs):
                 method =  self._dbus_object.get_dbus_method(*args, **kwargs)