forked from enlightenment/enlightenment
add notification util function for more easily sending notifications
still need some kind of sticky notification for important things
This commit is contained in:
parent
109d7897b0
commit
83952a1708
|
@ -579,3 +579,15 @@ e_notification_client_send(E_Notification_Notify *notify, E_Notification_Client_
|
||||||
return EINA_TRUE;
|
return EINA_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
E_API Eina_Bool
|
||||||
|
e_notification_util_send(const char *summary, const char *body)
|
||||||
|
{
|
||||||
|
E_Notification_Notify n;
|
||||||
|
|
||||||
|
memset(&n, 0, sizeof(E_Notification_Notify));
|
||||||
|
n.timeout = 3000;
|
||||||
|
n.summary = summary;
|
||||||
|
n.body = body;
|
||||||
|
n.urgency = E_NOTIFICATION_NOTIFY_URGENCY_NORMAL;
|
||||||
|
return e_notification_client_send(&n, NULL, NULL);
|
||||||
|
}
|
||||||
|
|
|
@ -81,7 +81,7 @@ E_API Evas_Object *e_notification_notify_raw_image_get(E_Notification_Notify *no
|
||||||
//client
|
//client
|
||||||
typedef void (*E_Notification_Client_Send_Cb)(void *data, unsigned int id);
|
typedef void (*E_Notification_Client_Send_Cb)(void *data, unsigned int id);
|
||||||
E_API Eina_Bool e_notification_client_send(E_Notification_Notify *notify, E_Notification_Client_Send_Cb cb, const void *data);
|
E_API Eina_Bool e_notification_client_send(E_Notification_Notify *notify, E_Notification_Client_Send_Cb cb, const void *data);
|
||||||
|
E_API Eina_Bool e_notification_util_send(const char *summary, const char *body);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue