summaryrefslogtreecommitdiff
path: root/src/lib/elm_sys_notify_interface.eo
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/elm_sys_notify_interface.eo')
-rw-r--r--src/lib/elm_sys_notify_interface.eo66
1 files changed, 66 insertions, 0 deletions
diff --git a/src/lib/elm_sys_notify_interface.eo b/src/lib/elm_sys_notify_interface.eo
new file mode 100644
index 000000000..627586b09
--- /dev/null
+++ b/src/lib/elm_sys_notify_interface.eo
@@ -0,0 +1,66 @@
+enum Elm.Sys_Notify.Urgency
+{
+ [[Urgency levels of a notification
+
+ @since 1.8
+ ]]
+ low, [[Low urgency]]
+ normal, [[Normal urgency]]
+ critical [[Critical urgency]]
+}
+
+interface Elm.Sys_Notify_Interface
+{
+ eo_prefix: elm_obj_sys_notify_interface;
+ legacy_prefix: elm_sys_notify_interface;
+
+ methods {
+ send @const {
+ [[Causes a notification to be forcefully closed and removed from the
+ user's view. It can be used, for example, in the event that what the
+ notification pertains to is no longer relevant, or to cancel a
+ notification with no expiration time.
+
+ @since 1.8
+ ]]
+ params {
+ @in replaces_id: uint; [[Notification ID that this notification replaces.
+ The value 0 means a new notification.]]
+ @in icon: const(char) *; [[The optional program icon of the calling application]]
+ @in summary: const(char) *; [[The summary text briefly describing the notification]]
+ @in body: const(char) * @optional; [[The optional detailed body text. Can be empty]]
+ @in urgency: Elm.Sys_Notify.Urgency; [[The urgency level]]
+ @in timeout: int; [[Timeout display in milliseconds]]
+ @in cb: Elm_Sys_Notify_Send_Cb; [[Callback used to retrieve the notification id
+ returned by the Notification Server]]
+ @in cb_data: const(void) * @optional; [[Optional context data]]
+ }
+ }
+ simple_send @const {
+ [[Create a new notification just with Icon, Body and Summary.
+ It is a helper that wraps the send method
+
+ @since 1.16
+ ]]
+
+ params {
+ @in icon: const(char) *; [[The optional program icon of the calling application]]
+ @in summary: const(char) *; [[The summary text briefly describing the notification]]
+ @in body: const(char) *; [[The optional detailed body text. Can be empty]]
+ }
+ }
+ close @const {
+ [[Causes a notification to be forcefully closed and removed from the
+ user's view. It can be used, for example, in the event that what the
+ notification pertains to is no longer relevant, or to cancel a
+ notification with no expiration time.
+
+ @since 1.8
+ ]]
+ params {
+ @in id: uint; [[Notification ID]]
+ }
+ }
+ }
+}
+