X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/clg/blobdiff_plain/560af5c515eb5b6206040a9334de4254d2650147..f00b458df0b7bffa61aad20c483e24bafde87630:/hello-world.lisp diff --git a/hello-world.lisp b/hello-world.lisp index d89a585..f700cb2 100644 --- a/hello-world.lisp +++ b/hello-world.lisp @@ -1,15 +1,18 @@ -(use-package "GTK") +(use-package :gtk) (make-instance 'window - :type :toplevel +; :type :toplevel :title "Test" :border-width 5 - :visible t + :show-all t :child (make-instance 'button :label "Hello World!" - :visible t - :signals - (list (list 'clicked #'(lambda () (write-line "Button clicked")))))) - - - + :signal (list 'clicked + #'(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 + )))