1 #ifndef ELM_SYS_NOTIFY_H 2 #define ELM_SYS_NOTIFY_H 3 4 typedef void (*Elm_Sys_Notify_Send_Cb)(void *data, unsigned int id); 5 6 #ifndef EFL_NOLEGACY_API_SUPPORT 7 #include "elm_sys_notify_interface_eo.legacy.h" 8 #include "elm_sys_notify_eo.legacy.h" 9 #endif 10 11 /** 12 * Emitted when the signal NotificationClosed is received. 13 * @since 1.8 14 */ 15 EAPI extern int ELM_EVENT_SYS_NOTIFY_NOTIFICATION_CLOSED; 16 17 /** 18 * Emitted when the signal ActionInvoked is received. 19 * @since 1.8 20 */ 21 EAPI extern int ELM_EVENT_SYS_NOTIFY_ACTION_INVOKED; /**< A Action has been invoked. */ 22 23 24 /** 25 * @def elm_sys_notify_simple_send 26 * 27 * Create a new notification just with Icon, Body and Summary. 28 * 29 * @param[in] icon 30 * @param[in] summary 31 * @param[in] body 32 * 33 * @see elm_sys_notify_send() 34 * 35 * @since 1.8 36 */ 37 #define elm_sys_notify_simple_send(icon, summary, body) \ 38 elm_sys_notify_send(0, icon, summary, body, \ 39 ELM_SYS_NOTIFY_URGENCY_NORMAL, \ 40 -1, NULL, NULL) 41 42 /** 43 * Sends a notification to the notification servers that have 44 * been registered by elm_need_sys_notify() or 45 * elm_sys_notify_servers_set(). 46 * 47 * @param replaces_id Notification ID that this notification replaces. 48 * The value 0 means a new notification. 49 * @param icon The optional program icon of the calling application. 50 * @param summary The summary text briefly describing the notification. 51 * @param body The optional detailed body text. Can be empty. 52 * @param urgency The urgency level. 53 * @param timeout Timeout display in milliseconds. 54 * @param cb Callback used to retrieve the notification id 55 * return by the Notification Server. 56 * @param cb_data Optional context data 57 * 58 * @since 1.8 59 */ 60 EAPI void elm_sys_notify_send(unsigned int replaces_id, 61 const char *icon, 62 const char *summary, 63 const char *body, 64 Elm_Sys_Notify_Urgency urgency, 65 int timeout, 66 Elm_Sys_Notify_Send_Cb cb, 67 const void *cb_data); 68 69 /** 70 * Causes a notification to be forcefully closed and removed from the user's 71 * view. It can be used, for example, in the event that what the notification 72 * pertains to is no longer relevant, or to cancel a notification * with no 73 * expiration time. 74 * 75 * @param id Notification id 76 * 77 * @note If the notification no longer exists, 78 * an empty D-BUS Error message is sent back. 79 * 80 * @since 1.8 81 */ 82 EAPI void elm_sys_notify_close(unsigned int id); 83 84 #endif 85 86