(use-modules (gacela))
+(define counter-quit #f)
+(let ((n 0))
+ (set! counter-quit
+ (lambda ()
+ (set! n (+ n 1))
+ (format #t "Quit clicked ~a times !!~%" n)
+ (if (> n 2)
+ (stop-game)))))
+
(display-scene
- (window '(#:resolution (640 480))
- (bitmap "x.bmp")))
+ (window ((resolution '(640 480))
+ (when-quit counter-quit))
+ (image "x.bmp")))