guint index, AtkObject * child);
static void
-remove_object (gpointer data, GObject * gobj);
+remove_object (GObject * source, GObject * gobj, gpointer data);
static void
add_object (SpiCache * cache, GObject * gobj);
/*---------------------------------------------------------------------------*/
static void
-remove_object (gpointer data, GObject * gobj)
+remove_object (GObject * source, GObject * gobj, gpointer data)
{
SpiCache *cache = SPI_CACHE (data);
if (spi_cache_in (cache, gobj))
{
+#ifdef SPI_ATK_DEBUG
+ g_debug ("CACHE REM - %s - %d - %s\n", atk_object_get_name (ATK_OBJECT (gobj)),
+ atk_object_get_role (ATK_OBJECT (gobj)),
+ spi_register_object_to_path (spi_global_register, gobj));
+#endif
g_signal_emit (cache, cache_signals [OBJECT_REMOVED], 0, gobj);
g_hash_table_remove (cache->objects, gobj);
}
g_hash_table_insert (cache->objects, gobj, NULL);
+#ifdef SPI_ATK_DEBUG
+ g_debug ("CACHE ADD - %s - %d - %s\n", atk_object_get_name (ATK_OBJECT (gobj)),
+ atk_object_get_role (ATK_OBJECT (gobj)),
+ spi_register_object_to_path (spi_global_register, gobj));
+#endif
+
g_signal_emit (cache, cache_signals [OBJECT_ADDED], 0, gobj);
}
if (!spi_cache_in (cache, G_OBJECT (current)) &&
!atk_state_set_contains_state (set, ATK_STATE_MANAGES_DESCENDANTS))
{
-#ifdef SPI_ATK_DEBUG
- g_debug ("REG - %s - %d - %s", atk_object_get_name (current),
- atk_object_get_role (current),
- atk_dbus_object_to_path (current));
-#endif
append_children (current, traversal);
}
}
if (signal_hint->detail)
detail = g_quark_to_string (signal_hint->detail);
- if (!strcmp (detail, "add"))
+ if (!g_strcmp0 (detail, "add"))
{
gpointer child;
int index = g_value_get_uint (param_values + 1);
return FALSE;
}
+#ifdef SPI_ATK_DEBUG
+void
+spi_cache_print_info (GObject * obj)
+{
+ char * path = spi_register_object_to_path (spi_global_register, obj);
+
+ if (spi_cache_in (spi_global_cache, obj))
+ g_printf ("%s IC\n", path);
+ else
+ g_printf ("%s NC\n", path);
+
+ if (path)
+ g_free (path);
+}
+#endif
+
/*END------------------------------------------------------------------------*/