From: Bastien Nocera Date: Wed, 13 Jun 2012 15:15:45 +0000 (+0100) Subject: Export adaptor_init() and adaptor_cleanup() X-Git-Tag: AT_SPI2_ATK_2_12_0~126 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fat-spi2-atk.git;a=commitdiff_plain;h=4ec12f8224307742cb9b466d7065d0baea1dd9e1 Export adaptor_init() and adaptor_cleanup() https://bugzilla.gnome.org/show_bug.cgi?id=678037 --- 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);