/* intialize the the atk interface (function pointers) with MAI implementation. * When atk bridge get loaded, these interface can be used. */ static void mai_util_class_init(MaiUtilClass *klass) { AtkUtilClass *atk_class; gpointer data; data = g_type_class_peek(ATK_TYPE_UTIL); atk_class = ATK_UTIL_CLASS(data); // save gail function pointer gail_add_global_event_listener = atk_class->add_global_event_listener; gail_remove_global_event_listener = atk_class->remove_global_event_listener; gail_remove_key_event_listener = atk_class->remove_key_event_listener; gail_get_root = atk_class->get_root; 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); }
/* intialize the the atk interface (function pointers) with MAI implementation. * When atk bridge get loaded, these interface can be used. */ static void mai_util_class_init(MaiUtilClass *klass) { AtkUtilClass *atk_class; gpointer data; data = g_type_class_peek(ATK_TYPE_UTIL); atk_class = ATK_UTIL_CLASS(data); // save gail function pointer gail_add_global_event_listener = atk_class->add_global_event_listener; gail_remove_global_event_listener = atk_class->remove_global_event_listener; gail_remove_key_event_listener = atk_class->remove_key_event_listener; gail_get_root = atk_class->get_root; 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); // Keep track of added/removed windows. AtkObject *root = atk_get_root (); g_signal_connect (root, "children-changed::add", (GCallback) window_added, NULL); g_signal_connect (root, "children-changed::remove", (GCallback) window_removed, NULL); }
void _gtk_accessibility_override_atk_util (void) { AtkUtilClass *atk_class = ATK_UTIL_CLASS (g_type_class_ref (ATK_TYPE_UTIL)); atk_class->add_key_event_listener = add_key_event_listener; atk_class->remove_key_event_listener = remove_key_event_listener; atk_class->get_root = get_root; atk_class->get_toolkit_name = get_toolkit_name; atk_class->get_toolkit_version = get_toolkit_version; }
static void jaw_util_class_init(JawUtilClass *kclass) { AtkUtilClass *atk_class; gpointer data; data = g_type_class_peek (ATK_TYPE_UTIL); atk_class = ATK_UTIL_CLASS (data); atk_class->add_key_event_listener = jaw_util_add_key_event_listener; atk_class->remove_key_event_listener = jaw_util_remove_key_event_listener; atk_class->get_root = jaw_util_get_root; atk_class->get_toolkit_name = jaw_util_get_toolkit_name; atk_class->get_toolkit_version = jaw_util_get_toolkit_version; }