1 (in-package :cl-notify
)
3 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; The library ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
5 (define-foreign-library libnotify
6 (:unix
(:or
"libnotify.so.1" "libnotify.so"))
7 (t (:default
"libnotify")))
9 (use-foreign-library libnotify
)
11 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Types ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
13 (defctype gboolean
:int
)
14 (defctype NotifyNotification
:pointer
)
16 (defcenum NotifyUrgency
17 :low
:normal
:critical
)
19 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Glib ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
21 (defcfun "g_object_unref" :void
(object :pointer
))
22 (defcfun "g_free" :void
(mem :pointer
))
24 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; libnotify ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
26 (defcfun ("notify_init" notify_init
) gboolean
(name :string
))
28 (defcfun "notify_notification_new" NotifyNotification
29 (summary :string
) (body :string
) (icon :string
)
32 (defcfun "notify_notification_set_timeout" :void
33 (n NotifyNotification
)
36 (defcfun "notify_notification_show" gboolean
37 (n NotifyNotification
)
40 (defcfun "notify_notification_update" gboolean
41 (n NotifyNotification
)
42 (summary :string
) (body :string
) (icon :string
))
44 (defcfun "notify_get_server_info" gboolean
48 (spec-version :pointer
))
50 (defcfun "notify_notification_set_urgency" :void
51 (n NotifyNotification
)
57 (defcfun "notify_notification_set_hint_int32" :void
58 (n NotifyNotification
)
62 (defcfun "notify_notification_set_hint_double" :void
63 (n NotifyNotification
)
67 (defcfun "notify_notification_set_hint_string" :void
68 (n NotifyNotification
)
72 (defcfun "notify_notification_set_hint_byte" :void
73 (n NotifyNotification
)
77 (defcfun "notify_notification_set_hint_byte_array" :void
78 (n NotifyNotification
)
83 (defcfun "notify_notification_clear_hints" :void
84 (n NotifyNotification
))