chiark / gitweb /
Add a boundp-function slot, which is required by virtual slot getter.
[clg] / hello-world.lisp
index 0f4b5ec83188016b4515a970e7c32041498bf190..9af70abf56a8aadc93354469557693778a970716 100644 (file)
@@ -1,15 +1,19 @@
-(in-package "GTK")
-
-(make-instance 'window
- :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)))
-
+(gtk:clg-init)
 
 
+(gtk:within-main-loop
+  (make-instance 'gtk:window
+;   :type :toplevel
+   :title "Test"
+   :border-width 5
+   :visible t :show-children t
+   :child (make-instance 'gtk:button
+          :label "Hello World!"
+          :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
+               ))))