X-Git-Url: https://git.distorted.org.uk/~mdw/clg/blobdiff_plain/3e5c51c7f17f2df716b4f18cac48808c6d2863b9..56c930d2e4de277384b4d766c31f645e993e9b64:/hello-world.lisp diff --git a/hello-world.lisp b/hello-world.lisp index 4334c17..ab99220 100644 --- a/hello-world.lisp +++ b/hello-world.lisp @@ -1,15 +1,20 @@ -(use-package "GTK") +(use-package :gtk) + +(clg-init) (make-instance 'window - :type :toplevel +; :type :toplevel :title "Test" :border-width 5 - :show-all t + :visible t :show-children t :child (make-instance 'button :label "Hello World!" :signal (list 'clicked - #'(lambda (button) - (print button) (write-line "clicked")) - :object t))) - - + #'(lambda () + (write-line "Hello World!")))) + :signal (list 'delete-event + #'(lambda (event) + (declare (ignore event)) + (write-line "Destroying window") + nil ; Returning NIL generates a destroy event + )))