Esempio n. 1
0
int
main()
{
  atspi_init ();

  listener = atspi_event_listener_new (on_event, NULL, NULL);
  atspi_event_listener_register (listener, "object:children-changed", NULL);
  child_pid = fork ();
  if (!child_pid)
    execlp ("gedit", "gedit", NULL);
  atspi_event_main ();
  return 0;
}
int main(int argc, gchar **argv)
{
  AtspiEventListener *listener;

  filter_name = parse_args (&argc, &argv);
  if (!filter_name) {
    g_print ("NOTE: Application name to filter not specified. Showing "
             "focus/selection changes for any application.\n");
  }

  atspi_init ();

  listener = atspi_event_listener_new (on_event, NULL, NULL);

  atspi_event_listener_register (listener, "object:state-changed:focused", NULL);
  atspi_event_listener_register (listener, "object:state-changed:selected", NULL);

  atspi_event_main ();

  return 0;
}