[at-spi2-atk] Export adaptor_init() and adaptor_cleanup()



commit 4ec12f8224307742cb9b466d7065d0baea1dd9e1
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Jun 13 16:15:45 2012 +0100

    Export adaptor_init() and adaptor_cleanup()
    
    https://bugzilla.gnome.org/show_bug.cgi?id=678037

 atk-adaptor/bridge.c |   86 ++++++++++++++++++++++++++-----------------------
 atk-adaptor/bridge.h |    2 +
 2 files changed, 48 insertions(+), 40 deletions(-)
---
diff --git a/atk-adaptor/bridge.c b/atk-adaptor/bridge.c
index faec393..97a5f1d 100644
--- a/atk-adaptor/bridge.c
+++ b/atk-adaptor/bridge.c
@@ -769,7 +769,7 @@ signal_filter (DBusConnection *bus, DBusMessage *message, void *user_data)
  * - Application registration with the AT-SPI registry.
  *
  */
-static int
+int
 adaptor_init (gint * argc, gchar ** argv[])
 {
   GOptionContext *opt;
@@ -911,46 +911,8 @@ adaptor_init (gint * argc, gchar ** argv[])
   return 0;
 }
 
-/*---------------------------------------------------------------------------*/
-
-int
-gtk_module_init (gint * argc, gchar ** argv[])
-{
-  const gchar *load_bridge = g_getenv ("NO_AT_BRIDGE");
-
-  if (!load_bridge || g_ascii_strtod (load_bridge, NULL) == 0)
-    {
-      return adaptor_init (argc, argv);
-    }
-  return 0;
-}
-
-gchar*
-g_module_check_init (GModule *module)
-{
-  g_module_make_resident (module);
-
-  return NULL;
-}
-
 void
-gnome_accessibility_module_init (void)
-{
-  const gchar *load_bridge = g_getenv ("NO_AT_BRIDGE");
-
-  if (!load_bridge || g_ascii_strtod (load_bridge, NULL) == 0)
-    {
-      adaptor_init (NULL, NULL);
-
-      if (g_getenv ("AT_SPI_DEBUG"))
-        {
-          g_print ("Atk Accessibility bridge initialized\n");
-        }
-    }
-}
-
-void
-gnome_accessibility_module_shutdown (void)
+adaptor_cleanup (void)
 {
   GList *l;
   GSList *ls;
@@ -1002,6 +964,50 @@ gnome_accessibility_module_shutdown (void)
 
 /*---------------------------------------------------------------------------*/
 
+int
+gtk_module_init (gint * argc, gchar ** argv[])
+{
+  const gchar *load_bridge = g_getenv ("NO_AT_BRIDGE");
+
+  if (!load_bridge || g_ascii_strtod (load_bridge, NULL) == 0)
+    {
+      return adaptor_init (argc, argv);
+    }
+  return 0;
+}
+
+gchar*
+g_module_check_init (GModule *module)
+{
+  g_module_make_resident (module);
+
+  return NULL;
+}
+
+void
+gnome_accessibility_module_init (void)
+{
+  const gchar *load_bridge = g_getenv ("NO_AT_BRIDGE");
+
+  if (!load_bridge || g_ascii_strtod (load_bridge, NULL) == 0)
+    {
+      adaptor_init (NULL, NULL);
+
+      if (g_getenv ("AT_SPI_DEBUG"))
+        {
+          g_print ("Atk Accessibility bridge initialized\n");
+        }
+    }
+}
+
+void
+gnome_accessibility_module_shutdown (void)
+{
+  adaptor_cleanup ();
+}
+
+/*---------------------------------------------------------------------------*/
+
 static gchar *name_match_tmpl =
        "type='signal', interface='org.freedesktop.DBus', member='NameOwnerChanged', arg0='%s'";
 
diff --git a/atk-adaptor/bridge.h b/atk-adaptor/bridge.h
index c24183e..949af30 100644
--- a/atk-adaptor/bridge.h
+++ b/atk-adaptor/bridge.h
@@ -66,6 +66,8 @@ char *app_bus_addr;
 
 extern SpiBridge *spi_global_app_data;
 
+int adaptor_init (gint * argc, gchar ** argv[]);
+void adaptor_cleanup (void);
 void spi_atk_add_client (const char *bus_name);
 void spi_atk_remove_client (const char *bus_name);
 



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