static guint add_listener (GSignalEmissionHook listener, const gchar *object_type, const gchar *signal, const gchar *hook_data);
static void mai_util_class_init(MaiUtilClass *klass);/* atkutil.h */static guint mai_util_add_global_event_listener(GSignalEmissionHook listener,                                                const gchar *event_type);static void mai_util_remove_global_event_listener(guint remove_listener);static AtkObject *mai_util_get_root(void);static G_CONST_RETURN gchar *mai_util_get_toolkit_name(void);static G_CONST_RETURN gchar *mai_util_get_toolkit_version(void);static gboolean mai_add_toplevel_accessible(nsIAccessible *toplevel);static gboolean mai_remove_toplevel_accessible(nsIAccessible *toplevel);/* Misc */static void _listener_info_destroy(gpointer data);static GHashTable *listener_list = NULL;static gint listener_idx = 1;typedef struct _MaiUtilListenerInfo MaiUtilListenerInfo;/* supporting */static int mai_initialized = FALSE;static MaiHook maiHook;PRLogModuleInfo *gMaiLog = NULL;struct _MaiUtilListenerInfo{    gint key;    guint signal_id;    gulong hook_id;};GTypemai_util_get_type(void){    static GType type = 0;    if (!type) {        static const GTypeInfo tinfo = {            sizeof(MaiUtilClass),            (GBaseInitFunc) NULL, /* base init */            (GBaseFinalizeFunc) NULL, /* base finalize */            (GClassInitFunc) mai_util_class_init, /* class init */            (GClassFinalizeFunc) NULL, /* class finalize */            NULL, /* class data */            sizeof(MaiUtil), /* instance size */            0, /* nb preallocs */            (GInstanceInitFunc) NULL, /* instance init */            NULL /* value table */        };        type = g_type_register_static(ATK_TYPE_UTIL,                                      "MaiUtil", &tinfo, GTypeFlags(0));    }    return type;}/* intialize the the atk interface (function pointers) with MAI implementation. * When atk bridge get loaded, these interface can be used. */static voidmai_util_class_init(MaiUtilClass *klass){    AtkUtilClass *atk_class;    gpointer data;    data = g_type_class_peek(ATK_TYPE_UTIL);    atk_class = ATK_UTIL_CLASS(data);    atk_class->add_global_event_listener =        mai_util_add_global_event_listener;    atk_class->remove_global_event_listener =        mai_util_remove_global_event_listener;    /*      atk_class->add_key_event_listener =      mai_util_add_key_event_listener;      atk_class->remove_key_event_listener =      mai_util_remove_key_event_listener;    */    atk_class->get_root = mai_util_get_root;    atk_class->get_toolkit_name = mai_util_get_toolkit_name;    atk_class->get_toolkit_version = mai_util_get_toolkit_version;    listener_list = g_hash_table_new_full(g_int_hash, g_int_equal, NULL,                                          _listener_info_destroy);}