X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/clg/blobdiff_plain/53a94300685e9c34f59fa8889b22b0cbdd612428..fcdb9e3641b6b833f7f02538c2a777dda1d43602:/hello-world.lisp diff --git a/hello-world.lisp b/hello-world.lisp index 4334c17..2ce6269 100644 --- a/hello-world.lisp +++ b/hello-world.lisp @@ -1,15 +1,18 @@ -(use-package "GTK") +(gtk:clg-init) -(make-instance 'window - :type :toplevel +(make-instance 'gtk:window +; :type :toplevel :title "Test" :border-width 5 - :show-all t - :child (make-instance 'button + :visible t :show-children t + :child (make-instance 'gtk: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 + )))