[at-spi2-atk] Some refactoring to remove duplicate code and other clean-ups



commit 20958d891139849067a0e784e04c35cc3c575c3d
Author: Mike Gorse <mgorse linux-l2tz site>
Date:   Wed Jul 27 17:01:03 2011 -0500

    Some refactoring to remove duplicate code and other clean-ups
    
    Remove "common" directory (it was an artifact of at-spi2-core and
    at-spi2-atk originally living in the same repository).  Where constants
    essentially duplicated other constants in libatspi, use the constants defined
    in libatspi, renaming as needed.  Otherwise move code from common into
    atk-adaptor.

 Makefile.am                                        |    2 +-
 atk-adaptor/Makefile.include                       |    1 -
 .../accessible-stateset.c                          |    0
 .../accessible-stateset.h                          |   10 +-
 atk-adaptor/adaptors/Makefile.am                   |    2 +
 atk-adaptor/adaptors/accessible-adaptor.c          |   55 +-
 atk-adaptor/adaptors/action-adaptor.c              |    4 +-
 atk-adaptor/adaptors/adaptors.h                    |    2 +-
 atk-adaptor/adaptors/application-adaptor.c         |    4 +-
 atk-adaptor/adaptors/cache-adaptor.c               |   12 +-
 atk-adaptor/adaptors/collection-adaptor.c          |   78 +-
 atk-adaptor/adaptors/component-adaptor.c           |   20 +-
 atk-adaptor/adaptors/document-adaptor.c            |    4 +-
 atk-adaptor/adaptors/editabletext-adaptor.c        |    4 +-
 atk-adaptor/adaptors/hyperlink-adaptor.c           |    4 +-
 atk-adaptor/adaptors/hypertext-adaptor.c           |    4 +-
 atk-adaptor/adaptors/image-adaptor.c               |    4 +-
 atk-adaptor/adaptors/selection-adaptor.c           |    4 +-
 atk-adaptor/adaptors/socket-adaptor.c              |    8 +-
 atk-adaptor/adaptors/table-adaptor.c               |    4 +-
 atk-adaptor/adaptors/text-adaptor.c                |    4 +-
 atk-adaptor/adaptors/value-adaptor.c               |    4 +-
 {common => atk-adaptor}/bitarray.h                 |    0
 atk-adaptor/bridge.c                               |   26 +-
 atk-adaptor/event.c                                |   16 +-
 atk-adaptor/event.h                                |    2 -
 atk-adaptor/object.c                               |  246 +++---
 atk-adaptor/object.h                               |    2 +-
 {common => atk-adaptor}/spi-dbus.c                 |    0
 atk-adaptor/spi-dbus.h                             |   56 ++
 common/Makefile.am                                 |   26 -
 common/event-types.h                               |   61 --
 common/generated-types.h                           |  792 --------------------
 common/keymasks.h                                  |   53 --
 common/spi-dbus.h                                  |   80 --
 common/spi-types.h                                 |   30 -
 36 files changed, 319 insertions(+), 1305 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 8142b2d..d00a130 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS=dbind droute common atk-adaptor po schemas
+SUBDIRS=dbind droute atk-adaptor po schemas
 
 gtk_modulesdir = $(libdir)/gnome-settings-daemon-3.0/gtk-modules/
 gtk_modules_DATA = at-spi2-atk.desktop
diff --git a/atk-adaptor/Makefile.include b/atk-adaptor/Makefile.include
index cd1675e..1bddbbd 100644
--- a/atk-adaptor/Makefile.include
+++ b/atk-adaptor/Makefile.include
@@ -21,7 +21,6 @@ libatk_bridge_la_LIBADD = $(DBUS_LIBS) \
 		          $(ATSPI_LIBS)       \
 			  $(X_LIBS)         \
 		          $(top_builddir)/droute/libdroute.la \
-		          $(top_builddir)/common/libspicommon.la \
 			  $(top_builddir)/atk-adaptor/adaptors/libatk-bridge-adaptors.la
 
 libatk_bridge_la_SOURCES =	\
diff --git a/common/spi-stateset.c b/atk-adaptor/accessible-stateset.c
similarity index 100%
rename from common/spi-stateset.c
rename to atk-adaptor/accessible-stateset.c
diff --git a/common/spi-stateset.h b/atk-adaptor/accessible-stateset.h
similarity index 91%
rename from common/spi-stateset.h
rename to atk-adaptor/accessible-stateset.h
index f097c92..e27e3c5 100644
--- a/common/spi-stateset.h
+++ b/atk-adaptor/accessible-stateset.h
@@ -21,17 +21,17 @@
  * Boston, MA 02111-1307, USA.
  */
 
-#ifndef SPI_STATE_SET_H_
-#define SPI_STATE_SET_H_
+#ifndef ACCESSSIBLE_STATE_SET_H_
+#define ACCESSIBLE_STATE_SET_H_
 
-#include "spi-types.h"
 #include <atk/atkstateset.h>
+#include "atspi/atspi.h"
 
 G_BEGIN_DECLS
 
 /* private - internal API to abstract away atk API */
 AtkStateSet *spi_state_set_cache_from_sequence(GArray *seq);
-AtkState     spi_atk_state_from_spi_state     (Accessibility_StateType state);
+AtkState     spi_atk_state_from_spi_state     (AtspiStateType state);
 void spi_atk_state_to_dbus_array (AtkObject * object, dbus_uint32_t * array);
 void spi_atk_state_set_to_dbus_array (AtkStateSet *set, dbus_uint32_t * array);
 #define      spi_state_set_cache_ref(s)        g_object_ref (s)
@@ -48,4 +48,4 @@ void spi_atk_state_set_to_dbus_array (AtkStateSet *set, dbus_uint32_t * array);
 
 G_END_DECLS
 
-#endif /* SPI_STATE_SET_H_ */
+#endif /* ACCESSIBLE_STATE_SET_H_ */
diff --git a/atk-adaptor/adaptors/Makefile.am b/atk-adaptor/adaptors/Makefile.am
index e34870c..58663ef 100644
--- a/atk-adaptor/adaptors/Makefile.am
+++ b/atk-adaptor/adaptors/Makefile.am
@@ -3,6 +3,7 @@ noinst_LTLIBRARIES = libatk-bridge-adaptors.la
 libatk_bridge_adaptors_la_CFLAGS =\
 			  $(DBUS_CFLAGS) \
 		          $(ATK_CFLAGS)       \
+		          $(ATSPI_CFLAGS)       \
 		          -I$(top_srcdir)     \
 		          -I$(top_srcdir)/atk-adaptor \
 	$(P2P_CFLAGS)
@@ -10,6 +11,7 @@ libatk_bridge_adaptors_la_CFLAGS =\
 libatk_bridge_adaptors_la_LIBADD =\
 			  $(DBUS_LIBS) \
 		          $(ATK_LIBS)       \
+		          $(ATSPI_LIBS)       \
 			  $(X_LIBS)
 
 libatk_bridge_adaptors_la_SOURCES =\
diff --git a/atk-adaptor/adaptors/accessible-adaptor.c b/atk-adaptor/adaptors/accessible-adaptor.c
index a8789c9..7572e49 100644
--- a/atk-adaptor/adaptors/accessible-adaptor.c
+++ b/atk-adaptor/adaptors/accessible-adaptor.c
@@ -25,8 +25,9 @@
 #include <atk/atk.h>
 #include <droute/droute.h>
 
-#include "common/spi-dbus.h"
-#include "common/spi-stateset.h"
+#include "atspi/atspi.h"
+#include "spi-dbus.h"
+#include "accessible-stateset.h"
 #include "object.h"
 #include "introspection.h"
 
@@ -122,7 +123,7 @@ impl_get_Parent (DBusMessageIter * iter, void *user_data)
               spi_object_append_null_reference (&iter_variant);
             }
         }
-      else if (role != Accessibility_ROLE_APPLICATION)
+      else if (role != ATSPI_ROLE_APPLICATION)
          spi_object_append_null_reference (&iter_variant);
       else
          spi_object_append_desktop_reference (&iter_variant);
@@ -253,42 +254,42 @@ impl_GetIndexInParent (DBusConnection * bus,
 }
 
 static gboolean
-spi_init_relation_type_table (Accessibility_RelationType * types)
+spi_init_relation_type_table (AtspiRelationType * types)
 {
   gint i;
 
   for (i = 0; i < ATK_RELATION_LAST_DEFINED; i++)
-    types[i] = Accessibility_RELATION_NULL;
-
-  types[ATK_RELATION_CONTROLLED_BY] = Accessibility_RELATION_CONTROLLED_BY;
-  types[ATK_RELATION_CONTROLLER_FOR] = Accessibility_RELATION_CONTROLLER_FOR;
-  types[ATK_RELATION_LABEL_FOR] = Accessibility_RELATION_LABEL_FOR;
-  types[ATK_RELATION_LABELLED_BY] = Accessibility_RELATION_LABELLED_BY;
-  types[ATK_RELATION_MEMBER_OF] = Accessibility_RELATION_MEMBER_OF;
-  types[ATK_RELATION_NODE_CHILD_OF] = Accessibility_RELATION_NODE_CHILD_OF;
-  types[ATK_RELATION_FLOWS_TO] = Accessibility_RELATION_FLOWS_TO;
-  types[ATK_RELATION_FLOWS_FROM] = Accessibility_RELATION_FLOWS_FROM;
-  types[ATK_RELATION_SUBWINDOW_OF] = Accessibility_RELATION_SUBWINDOW_OF;
-  types[ATK_RELATION_EMBEDS] = Accessibility_RELATION_EMBEDS;
-  types[ATK_RELATION_EMBEDDED_BY] = Accessibility_RELATION_EMBEDDED_BY;
-  types[ATK_RELATION_POPUP_FOR] = Accessibility_RELATION_POPUP_FOR;
+    types[i] = ATSPI_RELATION_NULL;
+
+  types[ATK_RELATION_CONTROLLED_BY] = ATSPI_RELATION_CONTROLLED_BY;
+  types[ATK_RELATION_CONTROLLER_FOR] = ATSPI_RELATION_CONTROLLER_FOR;
+  types[ATK_RELATION_LABEL_FOR] = ATSPI_RELATION_LABEL_FOR;
+  types[ATK_RELATION_LABELLED_BY] = ATSPI_RELATION_LABELLED_BY;
+  types[ATK_RELATION_MEMBER_OF] = ATSPI_RELATION_MEMBER_OF;
+  types[ATK_RELATION_NODE_CHILD_OF] = ATSPI_RELATION_NODE_CHILD_OF;
+  types[ATK_RELATION_FLOWS_TO] = ATSPI_RELATION_FLOWS_TO;
+  types[ATK_RELATION_FLOWS_FROM] = ATSPI_RELATION_FLOWS_FROM;
+  types[ATK_RELATION_SUBWINDOW_OF] = ATSPI_RELATION_SUBWINDOW_OF;
+  types[ATK_RELATION_EMBEDS] = ATSPI_RELATION_EMBEDS;
+  types[ATK_RELATION_EMBEDDED_BY] = ATSPI_RELATION_EMBEDDED_BY;
+  types[ATK_RELATION_POPUP_FOR] = ATSPI_RELATION_POPUP_FOR;
   types[ATK_RELATION_PARENT_WINDOW_OF] =
-    Accessibility_RELATION_PARENT_WINDOW_OF;
+    ATSPI_RELATION_PARENT_WINDOW_OF;
   types[ATK_RELATION_DESCRIPTION_FOR] =
-    Accessibility_RELATION_DESCRIPTION_FOR;
-  types[ATK_RELATION_DESCRIBED_BY] = Accessibility_RELATION_DESCRIBED_BY;
-  types[ATK_RELATION_NODE_PARENT_OF] = Accessibility_RELATION_NODE_PARENT_OF;
+    ATSPI_RELATION_DESCRIPTION_FOR;
+  types[ATK_RELATION_DESCRIBED_BY] = ATSPI_RELATION_DESCRIBED_BY;
+  types[ATK_RELATION_NODE_PARENT_OF] = ATSPI_RELATION_NODE_PARENT_OF;
 
   return TRUE;
 }
 
-static Accessibility_RelationType
+static AtspiRelationType
 spi_relation_type_from_atk_relation_type (AtkRelationType type)
 {
   static gboolean is_initialized = FALSE;
-  static Accessibility_RelationType
+  static AtspiRelationType
     spi_relation_type_table[ATK_RELATION_LAST_DEFINED];
-  Accessibility_RelationType spi_type;
+  AtspiRelationType spi_type;
 
   if (!is_initialized)
     is_initialized = spi_init_relation_type_table (spi_relation_type_table);
@@ -296,7 +297,7 @@ spi_relation_type_from_atk_relation_type (AtkRelationType type)
   if (type > ATK_RELATION_NULL && type < ATK_RELATION_LAST_DEFINED)
     spi_type = spi_relation_type_table[type];
   else
-    spi_type = Accessibility_RELATION_EXTENDED;
+    spi_type = ATSPI_RELATION_EXTENDED;
   return spi_type;
 }
 
@@ -551,7 +552,7 @@ void
 spi_initialize_accessible (DRoutePath * path)
 {
   droute_path_add_interface (path,
-                             SPI_DBUS_INTERFACE_ACCESSIBLE,
+                             ATSPI_DBUS_INTERFACE_ACCESSIBLE,
                              spi_org_a11y_atspi_Accessible,	
                              methods, properties);
 };
diff --git a/atk-adaptor/adaptors/action-adaptor.c b/atk-adaptor/adaptors/action-adaptor.c
index 62f68f7..08e3a2c 100644
--- a/atk-adaptor/adaptors/action-adaptor.c
+++ b/atk-adaptor/adaptors/action-adaptor.c
@@ -25,7 +25,7 @@
 #include <atk/atk.h>
 #include <droute/droute.h>
 
-#include "common/spi-dbus.h"
+#include "spi-dbus.h"
 
 #include "introspection.h"
 
@@ -224,6 +224,6 @@ void
 spi_initialize_action (DRoutePath * path)
 {
   droute_path_add_interface (path,
-                             SPI_DBUS_INTERFACE_ACTION,
+                             ATSPI_DBUS_INTERFACE_ACTION,
                              spi_org_a11y_atspi_Action, methods, properties);
 };
diff --git a/atk-adaptor/adaptors/adaptors.h b/atk-adaptor/adaptors/adaptors.h
index 30f1a16..84d2ef4 100644
--- a/atk-adaptor/adaptors/adaptors.h
+++ b/atk-adaptor/adaptors/adaptors.h
@@ -27,7 +27,7 @@
 #include <atk/atk.h>
 #include <droute/droute.h>
 
-Accessibility_Role spi_accessible_role_from_atk_role (AtkRole role);
+AtspiRole spi_accessible_role_from_atk_role (AtkRole role);
 
 void spi_initialize_accessible (DRoutePath * path);
 void spi_initialize_action (DRoutePath * path);
diff --git a/atk-adaptor/adaptors/application-adaptor.c b/atk-adaptor/adaptors/application-adaptor.c
index c686c31..1b85969 100644
--- a/atk-adaptor/adaptors/application-adaptor.c
+++ b/atk-adaptor/adaptors/application-adaptor.c
@@ -25,7 +25,7 @@
 #include <atk/atk.h>
 #include <droute/droute.h>
 
-#include "common/spi-dbus.h"
+#include "spi-dbus.h"
 #include "introspection.h"
 
 /* for spi_global_app_data  is there a better way? */
@@ -145,7 +145,7 @@ void
 spi_initialize_application (DRoutePath * path)
 {
   droute_path_add_interface (path,
-                             SPI_DBUS_INTERFACE_APPLICATION,
+                             ATSPI_DBUS_INTERFACE_APPLICATION,
                              spi_org_a11y_atspi_Application,
                              methods, properties);
 };
diff --git a/atk-adaptor/adaptors/cache-adaptor.c b/atk-adaptor/adaptors/cache-adaptor.c
index 1f33ce3..3b5540c 100644
--- a/atk-adaptor/adaptors/cache-adaptor.c
+++ b/atk-adaptor/adaptors/cache-adaptor.c
@@ -28,8 +28,8 @@
 #include <atk/atk.h>
 #include <droute/droute.h>
 
-#include "common/spi-dbus.h"
-#include "common/spi-stateset.h"
+#include "spi-dbus.h"
+#include "accessible-stateset.h"
 #include "accessible-cache.h"
 #include "bridge.h"
 #include "object.h"
@@ -132,7 +132,7 @@ append_cache_item (AtkObject * obj, gpointer data)
                 spi_object_append_null_reference (&iter_struct);
               }
           }
-        else if (role != Accessibility_ROLE_APPLICATION)
+        else if (role != ATSPI_ROLE_APPLICATION)
           spi_object_append_null_reference (&iter_struct);
         else
           spi_object_append_desktop_reference (&iter_struct);
@@ -238,7 +238,7 @@ emit_cache_remove (SpiCache *cache, GObject * obj)
   DBusMessage *message;
 
   if ((message = dbus_message_new_signal (SPI_CACHE_OBJECT_PATH,
-                                          SPI_DBUS_INTERFACE_CACHE,
+                                          ATSPI_DBUS_INTERFACE_CACHE,
                                           "RemoveAccessible")))
     {
       DBusMessageIter iter;
@@ -261,7 +261,7 @@ emit_cache_add (SpiCache *cache, GObject * obj)
   DBusMessage *message;
 
   if ((message = dbus_message_new_signal (SPI_CACHE_OBJECT_PATH,
-                                          SPI_DBUS_INTERFACE_CACHE,
+                                          ATSPI_DBUS_INTERFACE_CACHE,
                                           "AddAccessible")))
     {
       DBusMessageIter iter;
@@ -316,7 +316,7 @@ static DRouteMethod methods[] = {
 void
 spi_initialize_cache (DRoutePath * path)
 {
-  droute_path_add_interface (path, SPI_DBUS_INTERFACE_CACHE, spi_org_a11y_atspi_Cache, methods, NULL);
+  droute_path_add_interface (path, ATSPI_DBUS_INTERFACE_CACHE, spi_org_a11y_atspi_Cache, methods, NULL);
 
   g_signal_connect (spi_global_cache,
                     "object-added",
diff --git a/atk-adaptor/adaptors/collection-adaptor.c b/atk-adaptor/adaptors/collection-adaptor.c
index f274239..efefa43 100644
--- a/atk-adaptor/adaptors/collection-adaptor.c
+++ b/atk-adaptor/adaptors/collection-adaptor.c
@@ -27,9 +27,9 @@
 #include <atk/atk.h>
 #include <droute/droute.h>
 
-#include "common/bitarray.h"
-#include "common/spi-dbus.h"
-#include "common/spi-stateset.h"
+#include "bitarray.h"
+#include "spi-dbus.h"
+#include "accessible-stateset.h"
 
 #include "accessible-register.h"
 #include "object.h"
@@ -39,13 +39,13 @@ typedef struct _MatchRulePrivate MatchRulePrivate;
 struct _MatchRulePrivate
 {
   gint *states;
-  Accessibility_Collection_MatchType statematchtype;
+  AtspiCollectionMatchType statematchtype;
   AtkAttributeSet *attributes;
-  Accessibility_Collection_MatchType attributematchtype;
+  AtspiCollectionMatchType attributematchtype;
   gint *roles;
-  Accessibility_Collection_MatchType rolematchtype;
+  AtspiCollectionMatchType rolematchtype;
   gchar **ifaces;
-  Accessibility_Collection_MatchType interfacematchtype;
+  AtspiCollectionMatchType interfacematchtype;
   gboolean invert;
 };
 
@@ -161,17 +161,17 @@ match_states_lookup (AtkObject * child, MatchRulePrivate * mrp)
 {
   switch (mrp->statematchtype)
     {
-    case Accessibility_Collection_MATCH_ALL:
+    case ATSPI_Collection_MATCH_ALL:
       if (match_states_all_p (child, mrp->states))
         return TRUE;
       break;
 
-    case Accessibility_Collection_MATCH_ANY:
+    case ATSPI_Collection_MATCH_ANY:
       if (match_states_any_p (child, mrp->states))
         return TRUE;
       break;
 
-    case Accessibility_Collection_MATCH_NONE:
+    case ATSPI_Collection_MATCH_NONE:
       if (match_states_none_p (child, mrp->states))
         return TRUE;
       break;
@@ -202,7 +202,7 @@ match_roles_all_p (AtkObject * child, gint * roles)
 static gboolean
 match_roles_any_p (AtkObject * child, gint * roles)
 {
-  Accessibility_Role role;
+  AtspiRole role;
   int i;
 
   if (roles == NULL || roles[0] == BITARRAY_SEQ_TERM)
@@ -240,17 +240,17 @@ match_roles_lookup (AtkObject * child, MatchRulePrivate * mrp)
 {
   switch (mrp->rolematchtype)
     {
-    case Accessibility_Collection_MATCH_ALL:
+    case ATSPI_Collection_MATCH_ALL:
       if (match_roles_all_p (child, mrp->roles))
         return TRUE;
       break;
 
-    case Accessibility_Collection_MATCH_ANY:
+    case ATSPI_Collection_MATCH_ANY:
       if (match_roles_any_p (child, mrp->roles))
         return TRUE;
       break;
 
-    case Accessibility_Collection_MATCH_NONE:
+    case ATSPI_Collection_MATCH_NONE:
       if (match_roles_none_p (child, mrp->roles))
         return TRUE;
       break;
@@ -313,17 +313,17 @@ match_interfaces_lookup (AtkObject * child, MatchRulePrivate * mrp)
   switch (mrp->interfacematchtype)
     {
 
-    case Accessibility_Collection_MATCH_ALL:
+    case ATSPI_Collection_MATCH_ALL:
       if (match_interfaces_all_p (child, mrp->ifaces))
         return TRUE;
       break;
 
-    case Accessibility_Collection_MATCH_ANY:
+    case ATSPI_Collection_MATCH_ANY:
       if (match_interfaces_any_p (child, mrp->ifaces))
         return TRUE;
       break;
 
-    case Accessibility_Collection_MATCH_NONE:
+    case ATSPI_Collection_MATCH_NONE:
       if (match_interfaces_none_p (child, mrp->ifaces))
         return TRUE;
       break;
@@ -449,17 +449,17 @@ match_attributes_lookup (AtkObject * child, MatchRulePrivate * mrp)
   switch (mrp->attributematchtype)
     {
 
-    case Accessibility_Collection_MATCH_ALL:
+    case ATSPI_Collection_MATCH_ALL:
       if (match_attributes_all_p (child, mrp->attributes))
         return TRUE;
       break;
 
-    case Accessibility_Collection_MATCH_ANY:
+    case ATSPI_Collection_MATCH_ANY:
       if (match_attributes_any_p (child, mrp->attributes))
         return TRUE;
       break;
 
-    case Accessibility_Collection_MATCH_NONE:
+    case ATSPI_Collection_MATCH_NONE:
       if (match_attributes_none_p (child, mrp->attributes))
         return TRUE;
       break;
@@ -583,7 +583,7 @@ sort_order_rev_canonical (MatchRulePrivate * mrp, GList * ls,
 }
 
 static int
-query_exec (MatchRulePrivate * mrp, Accessibility_Collection_SortOrder sortby,
+query_exec (MatchRulePrivate * mrp, AtspiCollectionSortOrder sortby,
             GList * ls, gint kount, gint max,
             AtkObject * obj, glong index,
             gboolean flag,
@@ -591,11 +591,11 @@ query_exec (MatchRulePrivate * mrp, Accessibility_Collection_SortOrder sortby,
 {
   switch (sortby)
     {
-    case Accessibility_Collection_SORT_ORDER_CANONICAL:
+    case ATSPI_Collection_SORT_ORDER_CANONICAL:
       kount = sort_order_canonical (mrp, ls, 0, max, obj, index, flag,
                                     pobj, recurse, traverse);
       break;
-    case Accessibility_Collection_SORT_ORDER_REVERSE_CANONICAL:
+    case ATSPI_Collection_SORT_ORDER_REVERSE_CANONICAL:
       kount = sort_order_canonical (mrp, ls, 0, max, obj, index, flag,
                                     pobj, recurse, traverse);
       break;
@@ -761,7 +761,7 @@ static DBusMessage *
 GetMatchesFrom (DBusMessage * message,
                 AtkObject * current_object,
                 MatchRulePrivate * mrp,
-                const Accessibility_Collection_SortOrder sortby,
+                const AtspiCollectionSortOrder sortby,
                 const dbus_bool_t isrestrict,
                 dbus_int32_t count, const dbus_bool_t traverse)
 {
@@ -784,7 +784,7 @@ GetMatchesFrom (DBusMessage * message,
 
   ls = g_list_remove (ls, ls->data);
 
-  if (sortby == Accessibility_Collection_SORT_ORDER_REVERSE_CANONICAL)
+  if (sortby == ATSPI_Collection_SORT_ORDER_REVERSE_CANONICAL)
     ls = g_list_reverse (ls);
 
   free_mrp_data (mrp);
@@ -834,7 +834,7 @@ static DBusMessage *
 GetMatchesInOrder (DBusMessage * message,
                    AtkObject * current_object,
                    MatchRulePrivate * mrp,
-                   const Accessibility_Collection_SortOrder sortby,
+                   const AtspiCollectionSortOrder sortby,
                    const dbus_bool_t recurse,
                    dbus_int32_t count, const dbus_bool_t traverse)
 {
@@ -851,7 +851,7 @@ GetMatchesInOrder (DBusMessage * message,
 
   ls = g_list_remove (ls, ls->data);
 
-  if (sortby == Accessibility_Collection_SORT_ORDER_REVERSE_CANONICAL)
+  if (sortby == ATSPI_Collection_SORT_ORDER_REVERSE_CANONICAL)
     ls = g_list_reverse (ls);
 
   free_mrp_data (mrp);
@@ -867,7 +867,7 @@ static DBusMessage *
 GetMatchesInBackOrder (DBusMessage * message,
                        AtkObject * current_object,
                        MatchRulePrivate * mrp,
-                       const Accessibility_Collection_SortOrder sortby,
+                       const AtspiCollectionSortOrder sortby,
                        dbus_int32_t count)
 {
   GList *ls = NULL;
@@ -883,7 +883,7 @@ GetMatchesInBackOrder (DBusMessage * message,
 
   ls = g_list_remove (ls, ls->data);
 
-  if (sortby == Accessibility_Collection_SORT_ORDER_REVERSE_CANONICAL)
+  if (sortby == ATSPI_Collection_SORT_ORDER_REVERSE_CANONICAL)
     ls = g_list_reverse (ls);
 
   free_mrp_data (mrp);
@@ -894,7 +894,7 @@ static DBusMessage *
 GetMatchesTo (DBusMessage * message,
               AtkObject * current_object,
               MatchRulePrivate * mrp,
-              const Accessibility_Collection_SortOrder sortby,
+              const AtspiCollectionSortOrder sortby,
               const dbus_bool_t recurse,
               const dbus_bool_t isrestrict,
               dbus_int32_t count, const dbus_bool_t traverse)
@@ -920,7 +920,7 @@ GetMatchesTo (DBusMessage * message,
 
   ls = g_list_remove (ls, ls->data);
 
-  if (sortby != Accessibility_Collection_SORT_ORDER_REVERSE_CANONICAL)
+  if (sortby != ATSPI_Collection_SORT_ORDER_REVERSE_CANONICAL)
     ls = g_list_reverse (ls);
 
   free_mrp_data (mrp);
@@ -972,15 +972,15 @@ impl_GetMatchesFrom (DBusConnection * bus, DBusMessage * message,
 
   switch (tree)
     {
-    case Accessibility_Collection_TREE_RESTRICT_CHILDREN:
+    case ATSPI_Collection_TREE_RESTRICT_CHILDREN:
       return GetMatchesFrom (message, current_object,
                              &rule, sortby, TRUE, count, traverse);
       break;
-    case Accessibility_Collection_TREE_RESTRICT_SIBLING:
+    case ATSPI_Collection_TREE_RESTRICT_SIBLING:
       return GetMatchesFrom (message, current_object,
                              &rule, sortby, FALSE, count, traverse);
       break;
-    case Accessibility_Collection_TREE_INORDER:
+    case ATSPI_Collection_TREE_INORDER:
       return GetMatchesInOrder (message, current_object,
                                 &rule, sortby, TRUE, count, traverse);
       break;
@@ -1037,15 +1037,15 @@ impl_GetMatchesTo (DBusConnection * bus, DBusMessage * message,
 
   switch (tree)
     {
-    case Accessibility_Collection_TREE_RESTRICT_CHILDREN:
+    case ATSPI_Collection_TREE_RESTRICT_CHILDREN:
       return GetMatchesTo (message, current_object,
                            &rule, sortby, recurse, TRUE, count, traverse);
       break;
-    case Accessibility_Collection_TREE_RESTRICT_SIBLING:
+    case ATSPI_Collection_TREE_RESTRICT_SIBLING:
       return GetMatchesTo (message, current_object,
                            &rule, sortby, recurse, FALSE, count, traverse);
       break;
-    case Accessibility_Collection_TREE_INORDER:
+    case ATSPI_Collection_TREE_INORDER:
       return GetMatchesInBackOrder (message, current_object,
                                     &rule, sortby, count);
       break;
@@ -1088,7 +1088,7 @@ impl_GetMatches (DBusConnection * bus, DBusMessage * message, void *user_data)
                       obj, 0, TRUE, NULL, TRUE, traverse);
   ls = g_list_remove (ls, ls->data);
 
-  if (sortby == Accessibility_Collection_SORT_ORDER_REVERSE_CANONICAL)
+  if (sortby == ATSPI_Collection_SORT_ORDER_REVERSE_CANONICAL)
     ls = g_list_reverse (ls);
   free_mrp_data (&rule);
   return return_and_free_list (message, ls);
@@ -1105,5 +1105,5 @@ void
 spi_initialize_collection (DRoutePath * path)
 {
   droute_path_add_interface (path,
-                             SPI_DBUS_INTERFACE_COLLECTION, spi_org_a11y_atspi_Collection, methods, NULL);
+                             ATSPI_DBUS_INTERFACE_COLLECTION, spi_org_a11y_atspi_Collection, methods, NULL);
 };
diff --git a/atk-adaptor/adaptors/component-adaptor.c b/atk-adaptor/adaptors/component-adaptor.c
index 3db9717..f477348 100644
--- a/atk-adaptor/adaptors/component-adaptor.c
+++ b/atk-adaptor/adaptors/component-adaptor.c
@@ -26,7 +26,7 @@
 #include <droute/droute.h>
 #include <string.h>
 
-#include "common/spi-dbus.h"
+#include "spi-dbus.h"
 #include "object.h"
 #include "introspection.h"
 
@@ -184,28 +184,28 @@ impl_GetLayer (DBusConnection * bus, DBusMessage * message, void *user_data)
   switch (atklayer)
     {
     case ATK_LAYER_BACKGROUND:
-      rv = Accessibility_LAYER_BACKGROUND;
+      rv = ATSPI_LAYER_BACKGROUND;
       break;
     case ATK_LAYER_CANVAS:
-      rv = Accessibility_LAYER_CANVAS;
+      rv = ATSPI_LAYER_CANVAS;
       break;
     case ATK_LAYER_WIDGET:
-      rv = Accessibility_LAYER_WIDGET;
+      rv = ATSPI_LAYER_WIDGET;
       break;
     case ATK_LAYER_MDI:
-      rv = Accessibility_LAYER_MDI;
+      rv = ATSPI_LAYER_MDI;
       break;
     case ATK_LAYER_POPUP:
-      rv = Accessibility_LAYER_POPUP;
+      rv = ATSPI_LAYER_POPUP;
       break;
     case ATK_LAYER_OVERLAY:
-      rv = Accessibility_LAYER_OVERLAY;
+      rv = ATSPI_LAYER_OVERLAY;
       break;
     case ATK_LAYER_WINDOW:
-      rv = Accessibility_LAYER_WINDOW;
+      rv = ATSPI_LAYER_WINDOW;
       break;
     default:
-      rv = Accessibility_LAYER_INVALID;
+      rv = ATSPI_LAYER_INVALID;
       break;
     }
   reply = dbus_message_new_method_return (message);
@@ -418,5 +418,5 @@ void
 spi_initialize_component (DRoutePath * path)
 {
   droute_path_add_interface (path,
-                             SPI_DBUS_INTERFACE_COMPONENT, spi_org_a11y_atspi_Component, methods, NULL);
+                             ATSPI_DBUS_INTERFACE_COMPONENT, spi_org_a11y_atspi_Component, methods, NULL);
 };
diff --git a/atk-adaptor/adaptors/document-adaptor.c b/atk-adaptor/adaptors/document-adaptor.c
index 53e35a8..5eacd38 100644
--- a/atk-adaptor/adaptors/document-adaptor.c
+++ b/atk-adaptor/adaptors/document-adaptor.c
@@ -25,7 +25,7 @@
 #include <atk/atk.h>
 #include <droute/droute.h>
 
-#include "common/spi-dbus.h"
+#include "spi-dbus.h"
 #include "object.h"
 #include "introspection.h"
 
@@ -117,5 +117,5 @@ void
 spi_initialize_document (DRoutePath * path)
 {
   droute_path_add_interface (path,
-                             SPI_DBUS_INTERFACE_DOCUMENT, spi_org_a11y_atspi_Document, methods, NULL);
+                             ATSPI_DBUS_INTERFACE_DOCUMENT, spi_org_a11y_atspi_Document, methods, NULL);
 };
diff --git a/atk-adaptor/adaptors/editabletext-adaptor.c b/atk-adaptor/adaptors/editabletext-adaptor.c
index e633a54..1e0a5b9 100644
--- a/atk-adaptor/adaptors/editabletext-adaptor.c
+++ b/atk-adaptor/adaptors/editabletext-adaptor.c
@@ -26,7 +26,7 @@
 #include <droute/droute.h>
 #include "introspection.h"
 
-#include "common/spi-dbus.h"
+#include "spi-dbus.h"
 
 static DBusMessage *
 impl_SetTextContents (DBusConnection * bus, DBusMessage * message,
@@ -214,5 +214,5 @@ void
 spi_initialize_editabletext (DRoutePath * path)
 {
   droute_path_add_interface (path,
-                             SPI_DBUS_INTERFACE_EDITABLE_TEXT, spi_org_a11y_atspi_EditableText, methods, NULL);
+                             ATSPI_DBUS_INTERFACE_EDITABLE_TEXT, spi_org_a11y_atspi_EditableText, methods, NULL);
 };
diff --git a/atk-adaptor/adaptors/hyperlink-adaptor.c b/atk-adaptor/adaptors/hyperlink-adaptor.c
index cd0a924..746676d 100644
--- a/atk-adaptor/adaptors/hyperlink-adaptor.c
+++ b/atk-adaptor/adaptors/hyperlink-adaptor.c
@@ -25,7 +25,7 @@
 #include <atk/atk.h>
 #include <droute/droute.h>
 
-#include "common/spi-dbus.h"
+#include "spi-dbus.h"
 #include "introspection.h"
 #include "object.h"
 
@@ -153,7 +153,7 @@ void
 spi_initialize_hyperlink (DRoutePath * path)
 {
   droute_path_add_interface (path,
-                             SPI_DBUS_INTERFACE_HYPERLINK,
+                             ATSPI_DBUS_INTERFACE_HYPERLINK,
                              spi_org_a11y_atspi_Hyperlink,
                              methods, properties);
 };
diff --git a/atk-adaptor/adaptors/hypertext-adaptor.c b/atk-adaptor/adaptors/hypertext-adaptor.c
index dbe1ffd..6569eaa 100644
--- a/atk-adaptor/adaptors/hypertext-adaptor.c
+++ b/atk-adaptor/adaptors/hypertext-adaptor.c
@@ -25,7 +25,7 @@
 #include <atk/atk.h>
 #include <droute/droute.h>
 
-#include "common/spi-dbus.h"
+#include "spi-dbus.h"
 #include "object.h"
 
 #include "introspection.h"
@@ -111,5 +111,5 @@ void
 spi_initialize_hypertext (DRoutePath * path)
 {
   droute_path_add_interface (path,
-                             SPI_DBUS_INTERFACE_HYPERTEXT, spi_org_a11y_atspi_Hypertext, methods, NULL);
+                             ATSPI_DBUS_INTERFACE_HYPERTEXT, spi_org_a11y_atspi_Hypertext, methods, NULL);
 };
diff --git a/atk-adaptor/adaptors/image-adaptor.c b/atk-adaptor/adaptors/image-adaptor.c
index da56a21..1ba1f4e 100644
--- a/atk-adaptor/adaptors/image-adaptor.c
+++ b/atk-adaptor/adaptors/image-adaptor.c
@@ -25,7 +25,7 @@
 #include <atk/atk.h>
 #include <droute/droute.h>
 
-#include "common/spi-dbus.h"
+#include "spi-dbus.h"
 #include "object.h"
 #include "introspection.h"
 
@@ -139,5 +139,5 @@ void
 spi_initialize_image (DRoutePath * path)
 {
   droute_path_add_interface (path,
-                             SPI_DBUS_INTERFACE_IMAGE, spi_org_a11y_atspi_Image, methods, properties);
+                             ATSPI_DBUS_INTERFACE_IMAGE, spi_org_a11y_atspi_Image, methods, properties);
 };
diff --git a/atk-adaptor/adaptors/selection-adaptor.c b/atk-adaptor/adaptors/selection-adaptor.c
index 353113d..23b0a4f 100644
--- a/atk-adaptor/adaptors/selection-adaptor.c
+++ b/atk-adaptor/adaptors/selection-adaptor.c
@@ -25,7 +25,7 @@
 #include <atk/atk.h>
 #include <droute/droute.h>
 
-#include "common/spi-dbus.h"
+#include "spi-dbus.h"
 #include "object.h"
 #include "introspection.h"
 
@@ -259,7 +259,7 @@ void
 spi_initialize_selection (DRoutePath * path)
 {
   droute_path_add_interface (path,
-                             SPI_DBUS_INTERFACE_SELECTION,
+                             ATSPI_DBUS_INTERFACE_SELECTION,
                              spi_org_a11y_atspi_Selection,
                              methods, properties);
 };
diff --git a/atk-adaptor/adaptors/socket-adaptor.c b/atk-adaptor/adaptors/socket-adaptor.c
index 58d19d5..ac7f646 100644
--- a/atk-adaptor/adaptors/socket-adaptor.c
+++ b/atk-adaptor/adaptors/socket-adaptor.c
@@ -25,8 +25,8 @@
 #include <atk/atk.h>
 #include <droute/droute.h>
 
-#include "common/spi-dbus.h"
-#include "common/spi-stateset.h"
+#include "spi-dbus.h"
+#include "accessible-stateset.h"
 #include "object.h"
 #include "introspection.h"
 #include "bridge.h"
@@ -49,7 +49,7 @@ new_socket_call_message (AtkComponent *component, const char *member)
       DBusMessage *message;
       *(path_parent++) = '\0';
       message = dbus_message_new_method_call (bus_parent, path_parent,
-                                              SPI_DBUS_INTERFACE_COMPONENT,
+                                              ATSPI_DBUS_INTERFACE_COMPONENT,
                                               member);
       g_free (bus_parent);
       return message;
@@ -199,7 +199,7 @@ void
 spi_initialize_socket (DRoutePath * path)
 {
   droute_path_add_interface (path,
-                             SPI_DBUS_INTERFACE_SOCKET,
+                             ATSPI_DBUS_INTERFACE_SOCKET,
                              NULL, /* spi_org_a11y_atspi_Socket,	 */
                              methods, NULL);
 };
diff --git a/atk-adaptor/adaptors/table-adaptor.c b/atk-adaptor/adaptors/table-adaptor.c
index bd35f5f..26fec2b 100644
--- a/atk-adaptor/adaptors/table-adaptor.c
+++ b/atk-adaptor/adaptors/table-adaptor.c
@@ -25,7 +25,7 @@
 #include <atk/atk.h>
 #include <droute/droute.h>
 
-#include "common/spi-dbus.h"
+#include "spi-dbus.h"
 #include "object.h"
 #include "introspection.h"
 
@@ -701,5 +701,5 @@ void
 spi_initialize_table (DRoutePath * path)
 {
   droute_path_add_interface (path,
-                             SPI_DBUS_INTERFACE_TABLE, spi_org_a11y_atspi_Table, methods, properties);
+                             ATSPI_DBUS_INTERFACE_TABLE, spi_org_a11y_atspi_Table, methods, properties);
 };
diff --git a/atk-adaptor/adaptors/text-adaptor.c b/atk-adaptor/adaptors/text-adaptor.c
index 7a810b2..5600ed0 100644
--- a/atk-adaptor/adaptors/text-adaptor.c
+++ b/atk-adaptor/adaptors/text-adaptor.c
@@ -27,7 +27,7 @@
 #include <atk/atk.h>
 #include <droute/droute.h>
 
-#include "common/spi-dbus.h"
+#include "spi-dbus.h"
 #include "object.h"
 #include "introspection.h"
 
@@ -847,5 +847,5 @@ void
 spi_initialize_text (DRoutePath * path)
 {
   droute_path_add_interface (path,
-                             SPI_DBUS_INTERFACE_TEXT, spi_org_a11y_atspi_Text, methods, properties);
+                             ATSPI_DBUS_INTERFACE_TEXT, spi_org_a11y_atspi_Text, methods, properties);
 };
diff --git a/atk-adaptor/adaptors/value-adaptor.c b/atk-adaptor/adaptors/value-adaptor.c
index 188b6dd..89f29ff 100644
--- a/atk-adaptor/adaptors/value-adaptor.c
+++ b/atk-adaptor/adaptors/value-adaptor.c
@@ -27,7 +27,7 @@
 #include <atk/atk.h>
 #include <droute/droute.h>
 
-#include "common/spi-dbus.h"
+#include "spi-dbus.h"
 #include "introspection.h"
 
 static dbus_bool_t
@@ -201,5 +201,5 @@ void
 spi_initialize_value (DRoutePath * path)
 {
   droute_path_add_interface (path,
-                             SPI_DBUS_INTERFACE_VALUE, spi_org_a11y_atspi_Value, methods, properties);
+                             ATSPI_DBUS_INTERFACE_VALUE, spi_org_a11y_atspi_Value, methods, properties);
 };
diff --git a/common/bitarray.h b/atk-adaptor/bitarray.h
similarity index 100%
rename from common/bitarray.h
rename to atk-adaptor/bitarray.h
diff --git a/atk-adaptor/bridge.c b/atk-adaptor/bridge.c
index 6aacd12..bcae3b9 100644
--- a/atk-adaptor/bridge.c
+++ b/atk-adaptor/bridge.c
@@ -44,13 +44,13 @@
 #include "event.h"
 #include "adaptors.h"
 #include "object.h"
-#include "common/spi-stateset.h"
+#include "accessible-stateset.h"
 
 #include "accessible-register.h"
 #include "accessible-leasing.h"
 #include "accessible-cache.h"
 
-#include "common/spi-dbus.h"
+#include "spi-dbus.h"
 
 /*---------------------------------------------------------------------------*/
 
@@ -143,8 +143,8 @@ get_registered_event_listeners (SpiBridge *app)
   DBusMessageIter iter, iter_array, iter_struct;
 
   message = dbus_message_new_method_call (SPI_DBUS_NAME_REGISTRY,
-                                         SPI_DBUS_PATH_REGISTRY,
-                                         SPI_DBUS_INTERFACE_REGISTRY,
+                                         ATSPI_DBUS_PATH_REGISTRY,
+                                         ATSPI_DBUS_INTERFACE_REGISTRY,
                                          "GetRegisteredEvents");
   if (!message)
     return;
@@ -235,12 +235,12 @@ register_application (SpiBridge * app)
 
   /* These will be overridden when we get a reply, but in practice these
      defaults should always be correct */
-  app->desktop_name = SPI_DBUS_NAME_REGISTRY;
-  app->desktop_path = SPI_DBUS_PATH_ROOT;
+  app->desktop_name = ATSPI_DBUS_NAME_REGISTRY;
+  app->desktop_path = ATSPI_DBUS_PATH_ROOT;
 
   message = dbus_message_new_method_call (SPI_DBUS_NAME_REGISTRY,
-                                          SPI_DBUS_PATH_ROOT,
-                                          SPI_DBUS_INTERFACE_SOCKET,
+                                          ATSPI_DBUS_PATH_ROOT,
+                                          ATSPI_DBUS_INTERFACE_SOCKET,
                                           "Embed");
 
   dbus_message_iter_init_append (message, &iter);
@@ -285,8 +285,8 @@ deregister_application (SpiBridge * app)
   dbus_error_init (&error);
 
   message = dbus_message_new_method_call (SPI_DBUS_NAME_REGISTRY,
-                                          SPI_DBUS_PATH_REGISTRY,
-                                          SPI_DBUS_INTERFACE_REGISTRY,
+                                          ATSPI_DBUS_PATH_REGISTRY,
+                                          ATSPI_DBUS_INTERFACE_REGISTRY,
                                           "DeregisterApplication");
   dbus_message_set_no_reply (message, TRUE);
 
@@ -366,7 +366,7 @@ socket_ref_state_set (AtkObject *accessible)
       return NULL;
     }
   *(child_path++) = '\0';
-  message = dbus_message_new_method_call (child_name, child_path, SPI_DBUS_INTERFACE_ACCESSIBLE, "GetState");
+  message = dbus_message_new_method_call (child_name, child_path, ATSPI_DBUS_INTERFACE_ACCESSIBLE, "GetState");
   g_free (child_name);
   reply = dbus_connection_send_with_reply_and_block (spi_global_app_data->bus, message, 1, NULL);
   dbus_message_unref (message);
@@ -421,7 +421,7 @@ socket_embed_hook (AtkSocket * socket, gchar * plug_id)
     {
       DBusMessage *message;
       *(plug_path++) = '\0';
-      message = dbus_message_new_method_call (plug_name, plug_path, SPI_DBUS_INTERFACE_SOCKET, "Embedded");
+      message = dbus_message_new_method_call (plug_name, plug_path, ATSPI_DBUS_INTERFACE_SOCKET, "Embedded");
       dbus_message_append_args (message, DBUS_TYPE_STRING, &path, DBUS_TYPE_INVALID);
       dbus_connection_send (spi_global_app_data->bus, message, NULL);
     }
@@ -628,7 +628,7 @@ signal_filter (DBusConnection *bus, DBusMessage *message, void *user_data)
   if (dbus_message_get_type (message) != DBUS_MESSAGE_TYPE_SIGNAL)
     return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
 
-  if (!strcmp (interface, SPI_DBUS_INTERFACE_REGISTRY))
+  if (!strcmp (interface, ATSPI_DBUS_INTERFACE_REGISTRY))
     {
       result = DBUS_HANDLER_RESULT_HANDLED;
       if (!strcmp (member, "EventListenerRegistered"))
diff --git a/atk-adaptor/event.c b/atk-adaptor/event.c
index 7624844..f5a2d2d 100644
--- a/atk-adaptor/event.c
+++ b/atk-adaptor/event.c
@@ -32,7 +32,7 @@
 #include "bridge.h"
 #include "accessible-register.h"
 
-#include "common/spi-dbus.h"
+#include "spi-dbus.h"
 #include "event.h"
 #include "object.h"
 
@@ -114,7 +114,7 @@ send_and_allow_reentry (DBusConnection * bus, DBusMessage * message)
 
 static gboolean
 Accessibility_DeviceEventController_NotifyListenersSync (const
-                                                         Accessibility_DeviceEvent
+                                                         AtspiDeviceEvent
                                                          * key_event)
 {
   DBusMessage *message;
@@ -123,8 +123,8 @@ Accessibility_DeviceEventController_NotifyListenersSync (const
 
   message =
     dbus_message_new_method_call (SPI_DBUS_NAME_REGISTRY,
-                                  SPI_DBUS_PATH_DEC,
-                                  SPI_DBUS_INTERFACE_DEC,
+                                  ATSPI_DBUS_PATH_DEC,
+                                  ATSPI_DBUS_INTERFACE_DEC,
                                   "NotifyListenersSync");
 
   dbus_error_init (&error);
@@ -146,7 +146,7 @@ Accessibility_DeviceEventController_NotifyListenersSync (const
 }
 
 static void
-spi_init_keystroke_from_atk_key_event (Accessibility_DeviceEvent * keystroke,
+spi_init_keystroke_from_atk_key_event (AtspiDeviceEvent * keystroke,
                                        AtkKeyEventStruct * event)
 {
   keystroke->id = (dbus_int32_t) event->keyval;
@@ -172,10 +172,10 @@ spi_init_keystroke_from_atk_key_event (Accessibility_DeviceEvent * keystroke,
   switch (event->type)
     {
     case (ATK_KEY_EVENT_PRESS):
-      keystroke->type = Accessibility_KEY_PRESSED_EVENT;
+      keystroke->type = ATSPI_KEY_PRESSED;
       break;
     case (ATK_KEY_EVENT_RELEASE):
-      keystroke->type = Accessibility_KEY_RELEASED_EVENT;
+      keystroke->type = ATSPI_KEY_RELEASED;
       break;
     default:
       keystroke->type = 0;
@@ -195,7 +195,7 @@ static gint
 spi_atk_bridge_key_listener (AtkKeyEventStruct * event, gpointer data)
 {
   gboolean result;
-  Accessibility_DeviceEvent key_event;
+  AtspiDeviceEvent key_event;
 
   spi_init_keystroke_from_atk_key_event (&key_event, event);
 
diff --git a/atk-adaptor/event.h b/atk-adaptor/event.h
index 07a43df..1a9f9f3 100644
--- a/atk-adaptor/event.h
+++ b/atk-adaptor/event.h
@@ -25,8 +25,6 @@
 #ifndef EVENT_H
 #define EVENT_H
 
-#include <common/spi-types.h>
-
 void spi_atk_register_event_listeners (void);
 void spi_atk_deregister_event_listeners (void);
 void spi_atk_tidy_windows (void);
diff --git a/atk-adaptor/object.c b/atk-adaptor/object.c
index 6795cf7..4240a66 100644
--- a/atk-adaptor/object.c
+++ b/atk-adaptor/object.c
@@ -30,8 +30,8 @@
  */
 
 #include <atk/atk.h>
-#include <common/spi-types.h>
-#include <common/spi-dbus.h>
+#include "atspi/atspi.h"
+#include "spi-dbus.h"
 
 #include "accessible-register.h"
 #include "accessible-cache.h"
@@ -78,7 +78,7 @@ spi_object_append_null_reference (DBusMessageIter * iter)
 {
   DBusMessageIter iter_struct;
   const char *name;
-  const char *path = SPI_DBUS_PATH_NULL;
+  const char *path = ATSPI_DBUS_PATH_NULL;
 
   name = dbus_bus_get_unique_name (spi_global_app_data->bus);
 
@@ -215,66 +215,66 @@ spi_object_append_interfaces (DBusMessageIter * iter, AtkObject * obj)
 {
   const gchar *itf;
 
-  itf = SPI_DBUS_INTERFACE_ACCESSIBLE;
+  itf = ATSPI_DBUS_INTERFACE_ACCESSIBLE;
   dbus_message_iter_append_basic (iter, DBUS_TYPE_STRING, &itf);
 
   if (ATK_IS_ACTION (obj))
     {
-      itf = SPI_DBUS_INTERFACE_ACTION;
+      itf = ATSPI_DBUS_INTERFACE_ACTION;
       dbus_message_iter_append_basic (iter, DBUS_TYPE_STRING, &itf);
     }
 
   if (atk_object_get_role (obj) == ATK_ROLE_APPLICATION)
     {
-      itf = SPI_DBUS_INTERFACE_APPLICATION;
+      itf = ATSPI_DBUS_INTERFACE_APPLICATION;
       dbus_message_iter_append_basic (iter, DBUS_TYPE_STRING, &itf);
     }
 
   if (ATK_IS_COMPONENT (obj))
     {
-      itf = SPI_DBUS_INTERFACE_COMPONENT;
+      itf = ATSPI_DBUS_INTERFACE_COMPONENT;
       dbus_message_iter_append_basic (iter, DBUS_TYPE_STRING, &itf);
     }
 
   if (ATK_IS_EDITABLE_TEXT (obj))
     {
-      itf = SPI_DBUS_INTERFACE_EDITABLE_TEXT;
+      itf = ATSPI_DBUS_INTERFACE_EDITABLE_TEXT;
       dbus_message_iter_append_basic (iter, DBUS_TYPE_STRING, &itf);
     }
 
   if (ATK_IS_TEXT (obj))
     {
-      itf = SPI_DBUS_INTERFACE_TEXT;
+      itf = ATSPI_DBUS_INTERFACE_TEXT;
       dbus_message_iter_append_basic (iter, DBUS_TYPE_STRING, &itf);
     }
 
   if (ATK_IS_HYPERTEXT (obj))
     {
-      itf = SPI_DBUS_INTERFACE_HYPERTEXT;
+      itf = ATSPI_DBUS_INTERFACE_HYPERTEXT;
       dbus_message_iter_append_basic (iter, DBUS_TYPE_STRING, &itf);
     }
 
   if (ATK_IS_IMAGE (obj))
     {
-      itf = SPI_DBUS_INTERFACE_IMAGE;
+      itf = ATSPI_DBUS_INTERFACE_IMAGE;
       dbus_message_iter_append_basic (iter, DBUS_TYPE_STRING, &itf);
     }
 
   if (ATK_IS_SELECTION (obj))
     {
-      itf = SPI_DBUS_INTERFACE_SELECTION;
+      itf = ATSPI_DBUS_INTERFACE_SELECTION;
       dbus_message_iter_append_basic (iter, DBUS_TYPE_STRING, &itf);
     }
 
   if (ATK_IS_TABLE (obj))
     {
-      itf = SPI_DBUS_INTERFACE_TABLE;
+      itf = ATSPI_DBUS_INTERFACE_TABLE;
       dbus_message_iter_append_basic (iter, DBUS_TYPE_STRING, &itf);
     }
 
   if (ATK_IS_VALUE (obj))
     {
-      itf = SPI_DBUS_INTERFACE_VALUE;
+      itf = ATSPI_DBUS_INTERFACE_VALUE;
       dbus_message_iter_append_basic (iter, DBUS_TYPE_STRING, &itf);
     }
 
@@ -290,13 +290,13 @@ spi_object_append_interfaces (DBusMessageIter * iter, AtkObject * obj)
     {
       itf = "org.a11y.atspi.Collection";
       dbus_message_iter_append_basic (iter, DBUS_TYPE_STRING, &itf);
-      itf = SPI_DBUS_INTERFACE_DOCUMENT;
+      itf = ATSPI_DBUS_INTERFACE_DOCUMENT;
       dbus_message_iter_append_basic (iter, DBUS_TYPE_STRING, &itf);
     }
 
   if (ATK_IS_HYPERLINK_IMPL (obj))
     {
-      itf = SPI_DBUS_INTERFACE_HYPERLINK;
+      itf = ATSPI_DBUS_INTERFACE_HYPERLINK;
       dbus_message_iter_append_basic (iter, DBUS_TYPE_STRING, &itf);
     }
 }
@@ -336,130 +336,130 @@ spi_object_append_attribute_set (DBusMessageIter * iter, AtkAttributeSet * attr)
 /*---------------------------------------------------------------------------*/
 
 static gboolean
-init_role_lookup_table (Accessibility_Role * role_table)
+init_role_lookup_table (AtspiRole * role_table)
 {
   int i;
   /* if it's not in the list below, dunno what it is */
   for (i = 0; i < ATK_ROLE_LAST_DEFINED; ++i)
     {
-      role_table[i] = Accessibility_ROLE_UNKNOWN;
+      role_table[i] = ATSPI_ROLE_UNKNOWN;
     }
 
-  role_table[ATK_ROLE_INVALID] = Accessibility_ROLE_INVALID;
-  role_table[ATK_ROLE_ACCEL_LABEL] = Accessibility_ROLE_ACCELERATOR_LABEL;
-  role_table[ATK_ROLE_ALERT] = Accessibility_ROLE_ALERT;
-  role_table[ATK_ROLE_ANIMATION] = Accessibility_ROLE_ANIMATION;
-  role_table[ATK_ROLE_ARROW] = Accessibility_ROLE_ARROW;
-  role_table[ATK_ROLE_CALENDAR] = Accessibility_ROLE_CALENDAR;
-  role_table[ATK_ROLE_CANVAS] = Accessibility_ROLE_CANVAS;
-  role_table[ATK_ROLE_CHECK_BOX] = Accessibility_ROLE_CHECK_BOX;
-  role_table[ATK_ROLE_CHECK_MENU_ITEM] = Accessibility_ROLE_CHECK_MENU_ITEM;
-  role_table[ATK_ROLE_COLOR_CHOOSER] = Accessibility_ROLE_COLOR_CHOOSER;
-  role_table[ATK_ROLE_COLUMN_HEADER] = Accessibility_ROLE_COLUMN_HEADER;
-  role_table[ATK_ROLE_COMBO_BOX] = Accessibility_ROLE_COMBO_BOX;
-  role_table[ATK_ROLE_DATE_EDITOR] = Accessibility_ROLE_DATE_EDITOR;
-  role_table[ATK_ROLE_DESKTOP_ICON] = Accessibility_ROLE_DESKTOP_ICON;
-  role_table[ATK_ROLE_DESKTOP_FRAME] = Accessibility_ROLE_DESKTOP_FRAME;
-  role_table[ATK_ROLE_DIAL] = Accessibility_ROLE_DIAL;
-  role_table[ATK_ROLE_DIALOG] = Accessibility_ROLE_DIALOG;
-  role_table[ATK_ROLE_DIRECTORY_PANE] = Accessibility_ROLE_DIRECTORY_PANE;
-  role_table[ATK_ROLE_DRAWING_AREA] = Accessibility_ROLE_DRAWING_AREA;
-  role_table[ATK_ROLE_FILE_CHOOSER] = Accessibility_ROLE_FILE_CHOOSER;
-  role_table[ATK_ROLE_FILLER] = Accessibility_ROLE_FILLER;
-  role_table[ATK_ROLE_FONT_CHOOSER] = Accessibility_ROLE_FONT_CHOOSER;
-  role_table[ATK_ROLE_FRAME] = Accessibility_ROLE_FRAME;
-  role_table[ATK_ROLE_GLASS_PANE] = Accessibility_ROLE_GLASS_PANE;
-  role_table[ATK_ROLE_HTML_CONTAINER] = Accessibility_ROLE_HTML_CONTAINER;
-  role_table[ATK_ROLE_ICON] = Accessibility_ROLE_ICON;
-  role_table[ATK_ROLE_IMAGE] = Accessibility_ROLE_IMAGE;
-  role_table[ATK_ROLE_INTERNAL_FRAME] = Accessibility_ROLE_INTERNAL_FRAME;
-  role_table[ATK_ROLE_LABEL] = Accessibility_ROLE_LABEL;
-  role_table[ATK_ROLE_LAYERED_PANE] = Accessibility_ROLE_LAYERED_PANE;
-  role_table[ATK_ROLE_LIST] = Accessibility_ROLE_LIST;
-  role_table[ATK_ROLE_LIST_ITEM] = Accessibility_ROLE_LIST_ITEM;
-  role_table[ATK_ROLE_MENU] = Accessibility_ROLE_MENU;
-  role_table[ATK_ROLE_MENU_BAR] = Accessibility_ROLE_MENU_BAR;
-  role_table[ATK_ROLE_MENU_ITEM] = Accessibility_ROLE_MENU_ITEM;
-  role_table[ATK_ROLE_OPTION_PANE] = Accessibility_ROLE_OPTION_PANE;
-  role_table[ATK_ROLE_PAGE_TAB] = Accessibility_ROLE_PAGE_TAB;
-  role_table[ATK_ROLE_PAGE_TAB_LIST] = Accessibility_ROLE_PAGE_TAB_LIST;
-  role_table[ATK_ROLE_PANEL] = Accessibility_ROLE_PANEL;
-  role_table[ATK_ROLE_PASSWORD_TEXT] = Accessibility_ROLE_PASSWORD_TEXT;
-  role_table[ATK_ROLE_POPUP_MENU] = Accessibility_ROLE_POPUP_MENU;
-  role_table[ATK_ROLE_PROGRESS_BAR] = Accessibility_ROLE_PROGRESS_BAR;
-  role_table[ATK_ROLE_PUSH_BUTTON] = Accessibility_ROLE_PUSH_BUTTON;
-  role_table[ATK_ROLE_RADIO_BUTTON] = Accessibility_ROLE_RADIO_BUTTON;
-  role_table[ATK_ROLE_RADIO_MENU_ITEM] = Accessibility_ROLE_RADIO_MENU_ITEM;
-  role_table[ATK_ROLE_ROOT_PANE] = Accessibility_ROLE_ROOT_PANE;
-  role_table[ATK_ROLE_ROW_HEADER] = Accessibility_ROLE_ROW_HEADER;
-  role_table[ATK_ROLE_SCROLL_BAR] = Accessibility_ROLE_SCROLL_BAR;
-  role_table[ATK_ROLE_SCROLL_PANE] = Accessibility_ROLE_SCROLL_PANE;
-  role_table[ATK_ROLE_SEPARATOR] = Accessibility_ROLE_SEPARATOR;
-  role_table[ATK_ROLE_SLIDER] = Accessibility_ROLE_SLIDER;
-  role_table[ATK_ROLE_SPIN_BUTTON] = Accessibility_ROLE_SPIN_BUTTON;
-  role_table[ATK_ROLE_SPLIT_PANE] = Accessibility_ROLE_SPLIT_PANE;
-  role_table[ATK_ROLE_STATUSBAR] = Accessibility_ROLE_STATUS_BAR;
-  role_table[ATK_ROLE_TABLE] = Accessibility_ROLE_TABLE;
-  role_table[ATK_ROLE_TABLE_CELL] = Accessibility_ROLE_TABLE_CELL;
+  role_table[ATK_ROLE_INVALID] = ATSPI_ROLE_INVALID;
+  role_table[ATK_ROLE_ACCEL_LABEL] = ATSPI_ROLE_ACCELERATOR_LABEL;
+  role_table[ATK_ROLE_ALERT] = ATSPI_ROLE_ALERT;
+  role_table[ATK_ROLE_ANIMATION] = ATSPI_ROLE_ANIMATION;
+  role_table[ATK_ROLE_ARROW] = ATSPI_ROLE_ARROW;
+  role_table[ATK_ROLE_CALENDAR] = ATSPI_ROLE_CALENDAR;
+  role_table[ATK_ROLE_CANVAS] = ATSPI_ROLE_CANVAS;
+  role_table[ATK_ROLE_CHECK_BOX] = ATSPI_ROLE_CHECK_BOX;
+  role_table[ATK_ROLE_CHECK_MENU_ITEM] = ATSPI_ROLE_CHECK_MENU_ITEM;
+  role_table[ATK_ROLE_COLOR_CHOOSER] = ATSPI_ROLE_COLOR_CHOOSER;
+  role_table[ATK_ROLE_COLUMN_HEADER] = ATSPI_ROLE_COLUMN_HEADER;
+  role_table[ATK_ROLE_COMBO_BOX] = ATSPI_ROLE_COMBO_BOX;
+  role_table[ATK_ROLE_DATE_EDITOR] = ATSPI_ROLE_DATE_EDITOR;
+  role_table[ATK_ROLE_DESKTOP_ICON] = ATSPI_ROLE_DESKTOP_ICON;
+  role_table[ATK_ROLE_DESKTOP_FRAME] = ATSPI_ROLE_DESKTOP_FRAME;
+  role_table[ATK_ROLE_DIAL] = ATSPI_ROLE_DIAL;
+  role_table[ATK_ROLE_DIALOG] = ATSPI_ROLE_DIALOG;
+  role_table[ATK_ROLE_DIRECTORY_PANE] = ATSPI_ROLE_DIRECTORY_PANE;
+  role_table[ATK_ROLE_DRAWING_AREA] = ATSPI_ROLE_DRAWING_AREA;
+  role_table[ATK_ROLE_FILE_CHOOSER] = ATSPI_ROLE_FILE_CHOOSER;
+  role_table[ATK_ROLE_FILLER] = ATSPI_ROLE_FILLER;
+  role_table[ATK_ROLE_FONT_CHOOSER] = ATSPI_ROLE_FONT_CHOOSER;
+  role_table[ATK_ROLE_FRAME] = ATSPI_ROLE_FRAME;
+  role_table[ATK_ROLE_GLASS_PANE] = ATSPI_ROLE_GLASS_PANE;
+  role_table[ATK_ROLE_HTML_CONTAINER] = ATSPI_ROLE_HTML_CONTAINER;
+  role_table[ATK_ROLE_ICON] = ATSPI_ROLE_ICON;
+  role_table[ATK_ROLE_IMAGE] = ATSPI_ROLE_IMAGE;
+  role_table[ATK_ROLE_INTERNAL_FRAME] = ATSPI_ROLE_INTERNAL_FRAME;
+  role_table[ATK_ROLE_LABEL] = ATSPI_ROLE_LABEL;
+  role_table[ATK_ROLE_LAYERED_PANE] = ATSPI_ROLE_LAYERED_PANE;
+  role_table[ATK_ROLE_LIST] = ATSPI_ROLE_LIST;
+  role_table[ATK_ROLE_LIST_ITEM] = ATSPI_ROLE_LIST_ITEM;
+  role_table[ATK_ROLE_MENU] = ATSPI_ROLE_MENU;
+  role_table[ATK_ROLE_MENU_BAR] = ATSPI_ROLE_MENU_BAR;
+  role_table[ATK_ROLE_MENU_ITEM] = ATSPI_ROLE_MENU_ITEM;
+  role_table[ATK_ROLE_OPTION_PANE] = ATSPI_ROLE_OPTION_PANE;
+  role_table[ATK_ROLE_PAGE_TAB] = ATSPI_ROLE_PAGE_TAB;
+  role_table[ATK_ROLE_PAGE_TAB_LIST] = ATSPI_ROLE_PAGE_TAB_LIST;
+  role_table[ATK_ROLE_PANEL] = ATSPI_ROLE_PANEL;
+  role_table[ATK_ROLE_PASSWORD_TEXT] = ATSPI_ROLE_PASSWORD_TEXT;
+  role_table[ATK_ROLE_POPUP_MENU] = ATSPI_ROLE_POPUP_MENU;
+  role_table[ATK_ROLE_PROGRESS_BAR] = ATSPI_ROLE_PROGRESS_BAR;
+  role_table[ATK_ROLE_PUSH_BUTTON] = ATSPI_ROLE_PUSH_BUTTON;
+  role_table[ATK_ROLE_RADIO_BUTTON] = ATSPI_ROLE_RADIO_BUTTON;
+  role_table[ATK_ROLE_RADIO_MENU_ITEM] = ATSPI_ROLE_RADIO_MENU_ITEM;
+  role_table[ATK_ROLE_ROOT_PANE] = ATSPI_ROLE_ROOT_PANE;
+  role_table[ATK_ROLE_ROW_HEADER] = ATSPI_ROLE_ROW_HEADER;
+  role_table[ATK_ROLE_SCROLL_BAR] = ATSPI_ROLE_SCROLL_BAR;
+  role_table[ATK_ROLE_SCROLL_PANE] = ATSPI_ROLE_SCROLL_PANE;
+  role_table[ATK_ROLE_SEPARATOR] = ATSPI_ROLE_SEPARATOR;
+  role_table[ATK_ROLE_SLIDER] = ATSPI_ROLE_SLIDER;
+  role_table[ATK_ROLE_SPIN_BUTTON] = ATSPI_ROLE_SPIN_BUTTON;
+  role_table[ATK_ROLE_SPLIT_PANE] = ATSPI_ROLE_SPLIT_PANE;
+  role_table[ATK_ROLE_STATUSBAR] = ATSPI_ROLE_STATUS_BAR;
+  role_table[ATK_ROLE_TABLE] = ATSPI_ROLE_TABLE;
+  role_table[ATK_ROLE_TABLE_CELL] = ATSPI_ROLE_TABLE_CELL;
   role_table[ATK_ROLE_TABLE_COLUMN_HEADER] =
-    Accessibility_ROLE_TABLE_COLUMN_HEADER;
-  role_table[ATK_ROLE_TABLE_ROW_HEADER] = Accessibility_ROLE_TABLE_ROW_HEADER;
+    ATSPI_ROLE_TABLE_COLUMN_HEADER;
+  role_table[ATK_ROLE_TABLE_ROW_HEADER] = ATSPI_ROLE_TABLE_ROW_HEADER;
   role_table[ATK_ROLE_TEAR_OFF_MENU_ITEM] =
-    Accessibility_ROLE_TEAROFF_MENU_ITEM;
-  role_table[ATK_ROLE_TERMINAL] = Accessibility_ROLE_TERMINAL;
-  role_table[ATK_ROLE_TEXT] = Accessibility_ROLE_TEXT;
-  role_table[ATK_ROLE_TOGGLE_BUTTON] = Accessibility_ROLE_TOGGLE_BUTTON;
-  role_table[ATK_ROLE_TOOL_BAR] = Accessibility_ROLE_TOOL_BAR;
-  role_table[ATK_ROLE_TOOL_TIP] = Accessibility_ROLE_TOOL_TIP;
-  role_table[ATK_ROLE_TREE] = Accessibility_ROLE_TREE;
-  role_table[ATK_ROLE_TREE_TABLE] = Accessibility_ROLE_TREE_TABLE;
-  role_table[ATK_ROLE_UNKNOWN] = Accessibility_ROLE_UNKNOWN;
-  role_table[ATK_ROLE_VIEWPORT] = Accessibility_ROLE_VIEWPORT;
-  role_table[ATK_ROLE_WINDOW] = Accessibility_ROLE_WINDOW;
-  role_table[ATK_ROLE_HEADER] = Accessibility_ROLE_HEADER;
-  role_table[ATK_ROLE_FOOTER] = Accessibility_ROLE_FOOTER;
-  role_table[ATK_ROLE_PARAGRAPH] = Accessibility_ROLE_PARAGRAPH;
-  role_table[ATK_ROLE_RULER] = Accessibility_ROLE_RULER;
-  role_table[ATK_ROLE_APPLICATION] = Accessibility_ROLE_APPLICATION;
-  role_table[ATK_ROLE_AUTOCOMPLETE] = Accessibility_ROLE_AUTOCOMPLETE;
-  role_table[ATK_ROLE_EDITBAR] = Accessibility_ROLE_EDITBAR;
-  role_table[ATK_ROLE_EMBEDDED] = Accessibility_ROLE_EMBEDDED;
-  role_table[ATK_ROLE_ENTRY] = Accessibility_ROLE_ENTRY;
-  role_table[ATK_ROLE_CHART] = Accessibility_ROLE_CHART;
-  role_table[ATK_ROLE_CAPTION] = Accessibility_ROLE_CAPTION;
-  role_table[ATK_ROLE_DOCUMENT_FRAME] = Accessibility_ROLE_DOCUMENT_FRAME;
-  role_table[ATK_ROLE_HEADING] = Accessibility_ROLE_HEADING;
-  role_table[ATK_ROLE_PAGE] = Accessibility_ROLE_PAGE;
-  role_table[ATK_ROLE_SECTION] = Accessibility_ROLE_SECTION;
-  role_table[ATK_ROLE_FORM] = Accessibility_ROLE_FORM;
-  role_table[ATK_ROLE_REDUNDANT_OBJECT] = Accessibility_ROLE_REDUNDANT_OBJECT;
-  role_table[ATK_ROLE_LINK] = Accessibility_ROLE_LINK;
+    ATSPI_ROLE_TEAROFF_MENU_ITEM;
+  role_table[ATK_ROLE_TERMINAL] = ATSPI_ROLE_TERMINAL;
+  role_table[ATK_ROLE_TEXT] = ATSPI_ROLE_TEXT;
+  role_table[ATK_ROLE_TOGGLE_BUTTON] = ATSPI_ROLE_TOGGLE_BUTTON;
+  role_table[ATK_ROLE_TOOL_BAR] = ATSPI_ROLE_TOOL_BAR;
+  role_table[ATK_ROLE_TOOL_TIP] = ATSPI_ROLE_TOOL_TIP;
+  role_table[ATK_ROLE_TREE] = ATSPI_ROLE_TREE;
+  role_table[ATK_ROLE_TREE_TABLE] = ATSPI_ROLE_TREE_TABLE;
+  role_table[ATK_ROLE_UNKNOWN] = ATSPI_ROLE_UNKNOWN;
+  role_table[ATK_ROLE_VIEWPORT] = ATSPI_ROLE_VIEWPORT;
+  role_table[ATK_ROLE_WINDOW] = ATSPI_ROLE_WINDOW;
+  role_table[ATK_ROLE_HEADER] = ATSPI_ROLE_HEADER;
+  role_table[ATK_ROLE_FOOTER] = ATSPI_ROLE_FOOTER;
+  role_table[ATK_ROLE_PARAGRAPH] = ATSPI_ROLE_PARAGRAPH;
+  role_table[ATK_ROLE_RULER] = ATSPI_ROLE_RULER;
+  role_table[ATK_ROLE_APPLICATION] = ATSPI_ROLE_APPLICATION;
+  role_table[ATK_ROLE_AUTOCOMPLETE] = ATSPI_ROLE_AUTOCOMPLETE;
+  role_table[ATK_ROLE_EDITBAR] = ATSPI_ROLE_EDITBAR;
+  role_table[ATK_ROLE_EMBEDDED] = ATSPI_ROLE_EMBEDDED;
+  role_table[ATK_ROLE_ENTRY] = ATSPI_ROLE_ENTRY;
+  role_table[ATK_ROLE_CHART] = ATSPI_ROLE_CHART;
+  role_table[ATK_ROLE_CAPTION] = ATSPI_ROLE_CAPTION;
+  role_table[ATK_ROLE_DOCUMENT_FRAME] = ATSPI_ROLE_DOCUMENT_FRAME;
+  role_table[ATK_ROLE_HEADING] = ATSPI_ROLE_HEADING;
+  role_table[ATK_ROLE_PAGE] = ATSPI_ROLE_PAGE;
+  role_table[ATK_ROLE_SECTION] = ATSPI_ROLE_SECTION;
+  role_table[ATK_ROLE_FORM] = ATSPI_ROLE_FORM;
+  role_table[ATK_ROLE_REDUNDANT_OBJECT] = ATSPI_ROLE_REDUNDANT_OBJECT;
+  role_table[ATK_ROLE_LINK] = ATSPI_ROLE_LINK;
   role_table[ATK_ROLE_INPUT_METHOD_WINDOW] =
-    Accessibility_ROLE_INPUT_METHOD_WINDOW;
-  role_table[ATK_ROLE_TABLE_ROW] = Accessibility_ROLE_TABLE_ROW;
-  role_table[ATK_ROLE_TREE_ITEM] = Accessibility_ROLE_TREE_ITEM;
+    ATSPI_ROLE_INPUT_METHOD_WINDOW;
+  role_table[ATK_ROLE_TABLE_ROW] = ATSPI_ROLE_TABLE_ROW;
+  role_table[ATK_ROLE_TREE_ITEM] = ATSPI_ROLE_TREE_ITEM;
   role_table[ATK_ROLE_DOCUMENT_SPREADSHEET] =
-    Accessibility_ROLE_DOCUMENT_SPREADSHEET;
+    ATSPI_ROLE_DOCUMENT_SPREADSHEET;
   role_table[ATK_ROLE_DOCUMENT_PRESENTATION] =
-    Accessibility_ROLE_DOCUMENT_PRESENTATION;
-  role_table[ATK_ROLE_DOCUMENT_TEXT] = Accessibility_ROLE_DOCUMENT_TEXT;
-  role_table[ATK_ROLE_DOCUMENT_WEB] = Accessibility_ROLE_DOCUMENT_WEB;
-  role_table[ATK_ROLE_DOCUMENT_EMAIL] = Accessibility_ROLE_DOCUMENT_EMAIL;
-  role_table[ATK_ROLE_COMMENT] = Accessibility_ROLE_COMMENT;
-  role_table[ATK_ROLE_LIST_BOX] = Accessibility_ROLE_LIST_BOX;
-  role_table[ATK_ROLE_GROUPING] = Accessibility_ROLE_GROUPING;
-  role_table[ATK_ROLE_IMAGE_MAP] = Accessibility_ROLE_IMAGE_MAP;
-  role_table[ATK_ROLE_NOTIFICATION] = Accessibility_ROLE_NOTIFICATION;
-  role_table[ATK_ROLE_INFO_BAR] = Accessibility_ROLE_INFO_BAR;
+    ATSPI_ROLE_DOCUMENT_PRESENTATION;
+  role_table[ATK_ROLE_DOCUMENT_TEXT] = ATSPI_ROLE_DOCUMENT_TEXT;
+  role_table[ATK_ROLE_DOCUMENT_WEB] = ATSPI_ROLE_DOCUMENT_WEB;
+  role_table[ATK_ROLE_DOCUMENT_EMAIL] = ATSPI_ROLE_DOCUMENT_EMAIL;
+  role_table[ATK_ROLE_COMMENT] = ATSPI_ROLE_COMMENT;
+  role_table[ATK_ROLE_LIST_BOX] = ATSPI_ROLE_LIST_BOX;
+  role_table[ATK_ROLE_GROUPING] = ATSPI_ROLE_GROUPING;
+  role_table[ATK_ROLE_IMAGE_MAP] = ATSPI_ROLE_IMAGE_MAP;
+  role_table[ATK_ROLE_NOTIFICATION] = ATSPI_ROLE_NOTIFICATION;
+  role_table[ATK_ROLE_INFO_BAR] = ATSPI_ROLE_INFO_BAR;
   return TRUE;
 }
 
-Accessibility_Role
+AtspiRole
 spi_accessible_role_from_atk_role (AtkRole role)
 {
   static gboolean is_initialized = FALSE;
-  static Accessibility_Role spi_role_table[ATK_ROLE_LAST_DEFINED];
-  Accessibility_Role spi_role;
+  static AtspiRole spi_role_table[ATK_ROLE_LAST_DEFINED];
+  AtspiRole spi_role;
 
   if (!is_initialized)
     {
@@ -472,7 +472,7 @@ spi_accessible_role_from_atk_role (AtkRole role)
     }
   else
     {
-      spi_role = Accessibility_ROLE_EXTENDED;
+      spi_role = ATSPI_ROLE_EXTENDED;
     }
   return spi_role;
 }
diff --git a/atk-adaptor/object.h b/atk-adaptor/object.h
index 3b27292..5f283bc 100644
--- a/atk-adaptor/object.h
+++ b/atk-adaptor/object.h
@@ -57,7 +57,7 @@ spi_object_append_interfaces (DBusMessageIter * iter, AtkObject * obj);
 void
 spi_object_append_attribute_set (DBusMessageIter * iter, AtkAttributeSet * attr);
 
-Accessibility_Role
+AtspiRole
 spi_accessible_role_from_atk_role (AtkRole role);
 
 #endif /* ACCESSIBLE_OBJECT_H */
diff --git a/common/spi-dbus.c b/atk-adaptor/spi-dbus.c
similarity index 100%
rename from common/spi-dbus.c
rename to atk-adaptor/spi-dbus.c
diff --git a/atk-adaptor/spi-dbus.h b/atk-adaptor/spi-dbus.h
new file mode 100644
index 0000000..61a43be
--- /dev/null
+++ b/atk-adaptor/spi-dbus.h
@@ -0,0 +1,56 @@
+/*
+ * AT-SPI - Assistive Technology Service Provider Interface
+ * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap)
+ *
+ * Copyright 2001, 2002 Sun Microsystems Inc.,
+ * Copyright 2001, 2002 Ximian, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef SPI_DBUS_H_
+#define SPI_DBUS_H_
+
+#include <glib.h>
+#include <atspi/atspi.h>
+
+#define DBG(a,b) if(_dbg>=(a))b
+
+extern int _dbg;
+
+#define SPI_DBUS_NAME_REGISTRY "org.a11y.atspi.Registry"
+#define SPI_DBUS_PATH_REGISTRY "/org/a11y/atspi/registry"
+#define SPI_DBUS_INTERFACE_REGISTRY "org.a11y.atspi.Registry"
+
+#define SPI_DBUS_PATH_NULL "/org/a11y/atspi/null"
+#define SPI_DBUS_PATH_ROOT "/org/a11y/atspi/accessible/root"
+
+DBusMessage *spi_dbus_general_error(DBusMessage *message);
+DBusMessage *spi_dbus_return_rect(DBusMessage *message, gint ix, gint iy, gint iwidth, gint iheight);
+
+void spi_dbus_emit_valist(DBusConnection *bus, const char *path, const char *interface, const char *name, int first_arg_type, va_list args);
+dbus_bool_t spi_dbus_message_iter_get_struct(DBusMessageIter *iter, ...);
+dbus_bool_t spi_dbus_message_iter_append_struct(DBusMessageIter *iter, ...);
+dbus_bool_t spi_dbus_marshal_deviceEvent(DBusMessage *message, const AtspiDeviceEvent *e);
+dbus_bool_t spi_dbus_demarshal_deviceEvent(DBusMessage *message, AtspiDeviceEvent *e);
+dbus_bool_t spi_dbus_get_simple_property (DBusConnection *bus, const char *dest, const char *path, const char *interface, const char *prop, int *type, void *ptr, DBusError *error);
+void spi_dbus_emit_signal(DBusConnection *bus, const char *path, const char *klass, const char *major, const char *minor, dbus_int32_t detail1, dbus_int32_t detail2, const char *type, const void *val);
+/*
+void spi_dbus_add_disconnect_match (DBusConnection *bus, const char *name);
+void spi_dbus_remove_disconnect_match (DBusConnection *bus, const char *name);
+*/
+
+#endif /* SPI_DBUS_H_ */



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