Typo.
[cl-gtk2.git] / gtk / gtk.link-button.lisp
1 (in-package :gtk)
2
3 (defvar *link-button-uri-func* nil)
4
5 (defcallback link-button-uri-func-cb :void
6     ((button (g-object link-button)) (link (:string :free-from-foreign nil)) (user-data :pointer))
7   (declare (ignore user-data))
8   (funcall *link-button-uri-func* button link))
9
10 (defcallback link-button-uri-func-destroy-cb :void
11     ((data :pointer))
12   (declare (ignore data))
13   (setf *link-button-uri-func* nil))
14
15 (defcfun gtk-link-button-set-uri-hook :void
16   (func :pointer)
17   (data :pointer)
18   (destroy-notify :pointer))
19
20 (defun (setf link-button-global-uri-hook) (new-value)
21   (if new-value
22       (gtk-link-button-set-uri-hook (callback link-button-uri-func-cb)
23                                     (null-pointer)
24                                     (callback link-button-uri-func-destroy-cb))
25       (gtk-link-button-set-uri-hook (null-pointer)
26                                     (null-pointer)
27                                     (null-pointer)))
28   (setf *link-button-uri-func* new-value))
29
30 (export 'link-button-global-uri-hook)