Module Notification

module Notification: sig .. end
Popup notifications


For complete details about notifications, look at the the official specifications
val app_name : string Pervasives.ref
Application name used for notification. The default value is taken from Sys.argv.(0)
val desktop_entry : string option Pervasives.ref
If the application has a desktop entry, it can be specified here

Operations on notifications

type 'a t 
Type of an opened notifications
val result : 'a t -> 'a Lwt.t
Waits for a notification to be closed then returns:


val close : 'a t -> unit Lwt.t
Close the notification now

Opening notifications

type urgency = [ `Critical | `Low | `Normal ] 
Urgency level of popups
type image = {
   img_width : int;
   img_height : int;
   img_rowstride : int;
   img_has_alpha : bool;
   img_bits_per_sample : int;
   img_channels : int;
   img_data : string;
}
An image description
val notify : ?app_name:string ->
?desktop_entry:string ->
?replace:'b t ->
?icon:string ->
?image:image ->
summary:string ->
?body:string ->
?actions:(string * ([> `Closed | `Default ] as 'a)) list ->
?urgency:urgency ->
?category:string ->
?sound_file:string ->
?suppress_sound:bool ->
?pos:int * int ->
?hints:(string * OBus_value.V.single) list ->
?timeout:int -> unit -> 'a t Lwt.t
Open a notification.



Informations

type server_info = {
   server_name : string;
   server_vendor : string;
   server_version : string;
   server_spec_version : string;
}
Server informations
val get_server_information : unit -> server_info Lwt.t
Retreive server informations
val get_capabilities : unit -> string list Lwt.t
Retreive server capabilities, see specification for details