Fix loading order.
[cl-notify.git] / hints.lisp
blobc04c62e55f184e7f63c5dc0cae5afc908aff9d59
1 (in-package :cl-notify)
3 (defmethod (setf hint) (value (n notification) key type)
4 (let ((cobj (slot-value n 'c-object)))
6 (ecase type
7 (:int
8 (notify-notification-set-hint-int32 cobj key value))
10 (:double
11 (notify-notification-set-hint-double cobj key value))
13 (:string
14 (notify-notification-set-hint-string cobj key value))
16 (:byte
17 (notify-notification-set-hint-byte cobj key value))
19 (:byte-array
20 (with-foreign-object (array :uchar (length value))
21 (loop
22 for x in value
23 for i upfrom 0
24 do (setf (mem-aref array :uchar i) x))
26 (notify-notification-set-hint-byte-array cobj key
27 array (length value)))))
29 (values)))