|(require libnotify)||package: libnotify|
This library provides an FFI binding to the libnotify library which provides support for the desktop notifications API.
(new notification% [summary summary] [ [body body] [icon icon] [timeout timeout] [urgency urgency] [category category]]) → (is-a?/c notification%) summary : string? body : (or/c string? #f) = #f icon : (or/c (is-a?/c bitmap%) path-string? #f) = #f timeout : (or/c (>=/c 0) #f) = #f urgency : (or/c 'low 'normal 'critical) = 'normal category : (or/c string? #f) = #fConstructs a new notification object.
The summary, body, and icon describe the content of the notification when displayed. If icon describes a file system path, an icon will be loaded from that path. If it is a bitmap% object, it will be rendered directly.
The timeout argument specifies a timeout in seconds. Note that if the Racket process exits before the timeout triggers, it will have no effect and the timeout will be ignored.
See the Desktop Notification specification for details on the meaning and recommended use of the urgency and category arguments.Displays the notification on the screen.
If the display fails, then an instance of exn:fail:libnotify is raised.Closes the notification and removes it from the screen.If the close operation fails, then an instance of exn:fail:libnotify is raised.