12 cb_sent(void *data __UNUSED__, void *ret, DBusError *err)
14 E_Notification_Return_Notify *notify;
18 printf("id: %d\n", notify->notification_id);
20 else if (dbus_error_is_set(err))
22 printf("Error: %s\n", err->message);
27 cb_timer(void *data __UNUSED__)
32 static const char *icons[] = {
38 snprintf(buf, sizeof(buf), "<i>%s</i> says <b>Hello</b> #%d", icons[num%3], num / 3);
39 n = e_notification_full_new(icons[num%3], 0, icons[num%3], "Summary", buf, -1);
40 e_notification_send(n, cb_sent, NULL);
41 e_notification_unref(n);
44 return ECORE_CALLBACK_RENEW;
48 cb_action_invoked(void *data __UNUSED__, int type __UNUSED__, void *event)
50 E_Notification_Event_Action_Invoked *ev;
53 printf("Action (%d): %s\n", ev->notification_id, ev->action_id);
58 cb_note_closed(void *data __UNUSED__, int type __UNUSED__, void *event)
60 E_Notification_Event_Notification_Closed *ev;
61 static const char *reasons[] = {
69 printf("Note %d closed: %s\n", ev->notification_id, reasons[ev->reason]);
78 if (e_notification_init())
80 ecore_timer_add(1, cb_timer, NULL);
81 ecore_main_loop_begin();
82 e_notification_shutdown();