1 #ifndef _ELM_SYS_NOTIFY_EO_H_ 2 #define _ELM_SYS_NOTIFY_EO_H_ 3 4 #ifndef _ELM_SYS_NOTIFY_EO_CLASS_TYPE 5 #define _ELM_SYS_NOTIFY_EO_CLASS_TYPE 6 7 typedef Eo Elm_Sys_Notify; 8 9 #endif 10 11 #ifndef _ELM_SYS_NOTIFY_EO_TYPES 12 #define _ELM_SYS_NOTIFY_EO_TYPES 13 14 /** System notification server types 15 * 16 * @ingroup Elm_Sys_Notify 17 */ 18 typedef enum 19 { 20 ELM_SYS_NOTIFY_SERVER_NONE = 0, /**< No notificationserver (disables 21 * notifications) */ 22 ELM_SYS_NOTIFY_SERVER_DBUS = 1 /* 1 >> 0 */ /**< Use DBus as a notification 23 * server */ 24 } Elm_Sys_Notify_Server; 25 26 /** The reason the notification was closed 27 * 28 * @since 1.8 29 * 30 * @ingroup Elm_Sys_Notify 31 */ 32 typedef enum 33 { 34 ELM_SYS_NOTIFY_CLOSED_EXPIRED = 0, /**< The notification expired */ 35 ELM_SYS_NOTIFY_CLOSED_DISMISSED, /**< The notification was dismissed by the 36 * user */ 37 ELM_SYS_NOTIFY_CLOSED_REQUESTED, /**< The notification was closed by a call to 38 * CloseNotification method */ 39 ELM_SYS_NOTIFY_CLOSED_UNDEFINED /**< Undefined/reserved reasons */ 40 } Elm_Sys_Notify_Closed_Reason; 41 42 /** Data on event when notification closed is emitted 43 * 44 * @since 1.8 45 * 46 * @ingroup Elm_Sys_Notify 47 */ 48 typedef struct _Elm_Sys_Notify_Notification_Closed 49 { 50 unsigned int id; /**< ID of the notification */ 51 Elm_Sys_Notify_Closed_Reason reason; /**< The reason the notification was 52 * closed */ 53 } Elm_Sys_Notify_Notification_Closed; 54 55 /** Data on event when the action invoked is emitted 56 * 57 * @since 1.8 58 * 59 * @ingroup Elm_Sys_Notify 60 */ 61 typedef struct _Elm_Sys_Notify_Action_Invoked 62 { 63 unsigned int id; /**< ID of the notification */ 64 char *action_key; /**< The key of the action invoked. These match the keys 65 * sent over in the list of actions */ 66 } Elm_Sys_Notify_Action_Invoked; 67 68 69 #endif 70 /** Elementary system notification class 71 * 72 * @ingroup Elm_Sys_Notify 73 */ 74 #define ELM_SYS_NOTIFY_CLASS elm_sys_notify_class_get() 75 76 EWAPI const Efl_Class *elm_sys_notify_class_get(void) EINA_CONST; 77 78 /** 79 * @brief Set the notifications server to be used. 80 * 81 * @note This is an advanced function that should be used only to fulfill very 82 * specific purposes. Use elm_need_sys_notify() which activates the default 83 * available notification servers. 84 * 85 * @param[in] obj The object. 86 * @param[in] servers Binary mask of servers to enable. If a server is not 87 * present in the binary mask but was previously registered, it will be 88 * unregistered. 89 * 90 * @return @c true on success, @c false on failure 91 * 92 * @since 1.17 93 * 94 * @ingroup Elm_Sys_Notify 95 */ 96 EOAPI Eina_Bool elm_obj_sys_notify_servers_set(Eo *obj, Elm_Sys_Notify_Server servers); 97 98 /** 99 * @brief Get the notification servers that have been registered 100 * 101 * @param[in] obj The object. 102 * 103 * @return Binary mask of servers to enable. If a server is not present in the 104 * binary mask but was previously registered, it will be unregistered. 105 * 106 * @since 1.17 107 * 108 * @ingroup Elm_Sys_Notify 109 */ 110 EOAPI Elm_Sys_Notify_Server elm_obj_sys_notify_servers_get(const Eo *obj); 111 112 /** 113 * @brief Returns the singleton instance of the notification manager 114 * Elm.Sys_Notify. It is initialized upon the first call of this function 115 * 116 * @return The unique notification manager 117 * 118 * @since 1.17 119 * 120 * @ingroup Elm_Sys_Notify 121 */ 122 EOAPI Elm_Sys_Notify *elm_obj_sys_notify_singleton_get(void); 123 124 #endif 125