X-Git-Url: https://git.distorted.org.uk/~mdw/clg/blobdiff_plain/1e5024665aa88cc70a5639b3a85fbc6469188b85..c07660b35e589c4ffc05b9b859808c4cca0a4435:/hello-world.lisp diff --git a/hello-world.lisp b/hello-world.lisp index 0f4b5ec..43245c9 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 :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 + )))