- AtkObject *accessible;
- const gchar *detail = NULL;
- AtkObject *child;
-
- g_static_rec_mutex_lock (®istration_mutex);
-
- /* Ensure that only registered accessibles
- * have their signals processed.
- */
- accessible = g_value_get_object (¶m_values[0]);
- g_assert (ATK_IS_OBJECT (accessible));
-
- if (object_to_ref (accessible))
- {
-#ifdef SPI_ATK_DEBUG
- if (recursion_check_and_set ())
- g_warning ("AT-SPI: Recursive use of registration module");
-#endif
-
- if (signal_hint->detail)
- detail = g_quark_to_string (signal_hint->detail);
-
- 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))
- {
- child = atk_object_ref_accessible_child (accessible, index);
-#ifdef SPI_ATK_DEBUG
- non_owned_accessible (child);
-#endif
- }
- register_subtree (child);
- }
-
- recursion_check_unset ();
- }
-
- g_static_rec_mutex_unlock (®istration_mutex);
-
- return TRUE;