+} SpiListenerStruct;
+
+
+SpiListenerStruct *
+spi_listener_struct_new (Accessibility_EventListener listener, CORBA_Environment *ev)
+{
+ SpiListenerStruct *retval = g_malloc (sizeof (SpiListenerStruct));
+ retval->listener = bonobo_object_dup_ref (listener, ev);
+ return retval;
+}
+
+
+void
+spi_listener_struct_free (SpiListenerStruct *ls, CORBA_Environment *ev)
+{
+ bonobo_object_release_unref (ls->listener, ev);
+ g_free (ls);
+}
+
+
+static void
+desktop_add_application (SpiDesktop *desktop,
+ guint index, gpointer data)
+{
+ BonoboObject *registry = BONOBO_OBJECT (data);
+ Accessibility_Event e;
+ CORBA_Environment ev;
+
+ e.type = g_strdup ("object:children-changed::add");
+ e.source = BONOBO_OBJREF (desktop);
+ e.detail1 = index;
+ e.detail2 = 0;
+ CORBA_exception_init (&ev);
+ Accessibility_Registry_notifyEvent (BONOBO_OBJREF (registry),
+ &e, &ev);
+ CORBA_exception_free (&ev);
+}
+
+
+
+static void
+desktop_remove_application (SpiDesktop *desktop,
+ guint index, gpointer data)
+{
+ BonoboObject *registry = BONOBO_OBJECT (data);
+ Accessibility_Event e;
+ CORBA_Environment ev;
+
+ e.type = g_strdup ("object:children-changed::remove");
+ e.source = BONOBO_OBJREF (desktop);
+ e.detail1 = index;
+ e.detail2 = 0;
+ CORBA_exception_init (&ev);
+ Accessibility_Registry_notifyEvent (BONOBO_OBJREF (registry),
+ &e, &ev);
+ CORBA_exception_free (&ev);
+}
+