1 #include "atspi/atspi.h"
7 AtspiEventListener *listener;
10 basic (AtspiAccessible *obj)
15 AtspiAccessible *accessible;
18 str = atspi_accessible_get_name (obj, &error);
21 accessible = atspi_accessible_get_parent (obj, NULL);
23 g_object_unref (accessible);
24 count = atspi_accessible_get_child_count (obj, &error);
25 for (i = 0; i < count; i++)
27 accessible = atspi_accessible_get_child_at_index (obj, i, &error);
29 g_object_unref (accessible);
42 kill_child (void *data)
44 kill (child_pid, SIGTERM);
49 on_event (AtspiEvent *event, void *data)
51 if (atspi_accessible_get_role (event->source, NULL) == ATSPI_ROLE_DESKTOP_FRAME)
53 if (strstr (event->type, "add"))
55 AtspiAccessible *desktop = atspi_get_desktop (0);
57 g_object_unref (desktop);
58 g_timeout_add (3000, kill_child, NULL);
62 g_idle_add (end, NULL);
65 g_boxed_free (ATSPI_TYPE_EVENT, event);
73 listener = atspi_event_listener_new (on_event, NULL, NULL);
74 atspi_event_listener_register (listener, "object:children-changed", NULL);
77 execlp ("gedit", "gedit", NULL);