Export adaptor_init() and adaptor_cleanup()
authorBastien Nocera <hadess@hadess.net>
Wed, 13 Jun 2012 15:15:45 +0000 (16:15 +0100)
committerBastien Nocera <hadess@hadess.net>
Thu, 14 Jun 2012 11:27:15 +0000 (12:27 +0100)
https://bugzilla.gnome.org/show_bug.cgi?id=678037

atk-adaptor/bridge.c
atk-adaptor/bridge.h

index faec393..97a5f1d 100644 (file)
@@ -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'";
 
index c24183e..949af30 100644 (file)
@@ -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);