Пример #1
0
int 
e_mod_notify_shutdown(void) 
{
   Ind_Notify_Win *nwin;

   EINA_LIST_FREE(_nwins, nwin) 
     e_object_del(E_OBJECT(nwin));

   if (_notify_daemon) e_notification_daemon_free(_notify_daemon);

   /* shutdown notification subsystem */
   e_notification_daemon_shutdown();

   return 1;
}
Пример #2
0
int
main()
{
  E_Notification_Daemon *d;
  E_Notification *n;
  Daemon_Data *dd;


  ecore_init();

  dd = calloc(1, sizeof(Daemon_Data));
  dd->open_notes = NULL;
  dd->history = NULL;
  dd->next_id = dd->history_start = 1;
  dd->max_history_length = 5;
  dd->default_timeout = 5;

  /* set up the daemon */
  d = e_notification_daemon_add("e_notification_module", "Enlightenment");
  e_notification_daemon_data_set(d, dd);
  dd->daemon = d;
  e_notification_daemon_callback_notify_set(d, cb_notify);
  e_notification_daemon_callback_close_notification_set(d, cb_close_notification);

  ecore_main_loop_begin();
  while (dd->open_notes)
    {
       n = eina_list_data_get(dd->open_notes);
       e_notification_unref(n);
       dd->open_notes = eina_list_remove_list(dd->open_notes, dd->open_notes);
    }
  while (dd->history)
    {
       n = eina_list_data_get(dd->history);
       e_notification_unref(n);
       dd->history = eina_list_remove_list(dd->history, dd->history);
    }
  free(dd);
  e_notification_daemon_free(d);
  ecore_shutdown();

  return 0;
}