-(in-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
+ )))