{
guint ref;
- ref = atk_dbus_register_accessible (accessible);
return atk_dbus_ref_to_path (ref);
}
/*---------------------------------------------------------------------------*/
/*
- * The tree update listener handles the following Atk signals:
- *
- * Gtk:AtkObject:property-change
- *
- * With the folowing property names:
- *
- * accessible-name
- * accessible-description
- * accessible-parent
- *
- * It updates the server side accessible-object database, which
- * will then syncronize with the client-side accessible cache.
- *
- */
-static gboolean
-tree_update_listener (GSignalInvocationHint *signal_hint,
- guint n_param_values,
- const GValue *param_values,
- gpointer data)
-{
- AtkObject *accessible;
- AtkPropertyValues *values;
- const gchar *pname = NULL;
-
- accessible = g_value_get_object (¶m_values[0]);
- values = (AtkPropertyValues*) g_value_get_pointer (¶m_values[1]);
-
- pname = values[0].property_name;
-
- if (strcmp (pname, "accessible-name") == 0 ||
- strcmp (pname, "accessible-description") == 0 ||
- strcmp (pname, "accessible-parent") == 0)
- {
- atk_dbus_update_accessible (accessible);
- }
- return TRUE;
-}
-
-/*
- * Handles the ATK signal 'Gtk:AtkObject:children-changed'.
- *
- * It updates the server side accessible-object database, which
- * will then syncronize with the client-side accessible cache.
- *
- */
-static gboolean
-tree_update_children_listener (GSignalInvocationHint *signal_hint,
- guint n_param_values,
- const GValue *param_values,
- gpointer data)
-{
- AtkObject *accessible;
- const gchar *detail = NULL;
- AtkObject *child;
- gboolean child_needs_unref = FALSE;
-
- if (signal_hint->detail)
- detail = g_quark_to_string (signal_hint->detail);
-
- accessible = g_value_get_object (¶m_values[0]);
- if (!strcmp (detail, "add"))
- {
- gpointer child;
- int index = g_value_get_uint (param_values + 1);
- child = g_value_get_pointer (param_values + 2);
-
- if (ATK_IS_OBJECT (child))
- g_object_ref (child);
- else
- child = atk_object_ref_accessible_child (accessible, index);
-
- atk_dbus_register_accessible (child);
- g_object_unref (child);
- }
- return TRUE;
-}
-
-/*---------------------------------------------------------------------------*/
-
-/*
* The focus listener handles the ATK 'focus' signal and forwards it
* as the AT-SPI event, 'focus:'
*/
atk_bridge_focus_tracker_id = atk_add_focus_tracker (focus_tracker);
- add_signal_listener (tree_update_listener, "Gtk:AtkObject:property-change");
- add_signal_listener (tree_update_children_listener, "Gtk:AtkObject:children-changed");
-
add_signal_listener (property_event_listener, "Gtk:AtkObject:property-change");
add_signal_listener (window_event_listener, "window:create");
add_signal_listener (window_event_listener, "window:destroy");