Typo.
[cl-gtk2.git] / gtk / gtk.about-dialog.lisp
1 (in-package :gtk)
2
3 (defvar *about-dialog-url-func* nil)
4
5 (defcallback about-dialog-url-func-cb :void
6   ((dialog (g-object about-dialog)) (link (:string :free-from-foreign nil)) (user-data :pointer))
7   (declare (ignore user-data))
8   (funcall *about-dialog-url-func* dialog link))
9
10 (defcallback about-dialog-url-func-destroy-cb :void
11   ((data :pointer))
12   (declare (ignore data))
13   (setf *about-dialog-url-func* nil))
14
15 (defcfun gtk-about-dialog-set-url-hook :void
16   (func :pointer)
17   (data :pointer)
18   (destroy-notify :pointer))
19
20 (defun (setf about-dialog-global-url-hook) (new-value)
21   (if new-value
22       (gtk-about-dialog-set-url-hook (callback about-dialog-url-func-cb)
23                                      (null-pointer)
24                                      (callback about-dialog-url-func-destroy-cb))
25       (gtk-about-dialog-set-url-hook (null-pointer)
26                                      (null-pointer)
27                                      (null-pointer)))
28   (setf *about-dialog-url-func* new-value))
29
30 (export 'about-dialog-global-url-hook)
31
32 (defvar *about-dialog-email-func* nil)
33
34 (defcallback about-dialog-email-func-cb :void
35   ((dialog (g-object about-dialog)) (link (:string :free-from-foreign nil)) (user-data :pointer))
36   (declare (ignore user-data))
37   (funcall *about-dialog-email-func* dialog link))
38
39 (defcallback about-dialog-email-func-destroy-cb :void
40   ((data :pointer))
41   (declare (ignore data))
42   (setf *about-dialog-email-func* nil))
43
44 (defcfun gtk-about-dialog-set-email-hook :void
45   (func :pointer)
46   (data :pointer)
47   (destroy-notify :pointer))
48
49 (defun (setf about-dialog-global-email-hook) (new-value)
50   (if new-value
51       (gtk-about-dialog-set-email-hook (callback about-dialog-email-func-cb)
52                                        (null-pointer)
53                                        (callback about-dialog-email-func-destroy-cb))
54       (gtk-about-dialog-set-email-hook (null-pointer)
55                                        (null-pointer)
56                                        (null-pointer)))
57   (setf *about-dialog-email-func* new-value))
58
59 (export 'about-dialog-global-email-hook)
60