X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/clg/blobdiff_plain/1e5024665aa88cc70a5639b3a85fbc6469188b85..735a29da709fc1701f77f0c051abde6043532ab3:/hello-world.lisp diff --git a/hello-world.lisp b/hello-world.lisp index 0f4b5ec..ab99220 100644 --- a/hello-world.lisp +++ b/hello-world.lisp @@ -1,15 +1,20 @@ -(in-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 + )))