]> git.jsancho.org Git - gacela.git/blobdiff - gacela/window.scm
More keyboard events
[gacela.git] / gacela / window.scm
index eeed32d2beba1c6cc33a4adb928a7f48545f06b7..29e1662c8ec94c76ad6dc8ad62b902629a68fc10 100644 (file)
@@ -1,5 +1,5 @@
 ;;; Gacela, a GNU Guile extension for fast games development
-;;; Copyright (C) 2016 by Javier Sancho Fernandez <jsf at jsancho dot org>
+;;; Copyright (C) 2017 by Javier Sancho Fernandez <jsf at jsancho dot org>
 ;;;
 ;;; This program is free software: you can redistribute it and/or modify
 ;;; it under the terms of the GNU General Public License as published by
   #:export (window))
 
 
-(define* (window window-properties #:optional scene)
-  (make-scene
-   "window"
-   (lambda ()
-     (apply run-scene (cons scene window-properties)))))
+(define-syntax window
+  (lambda (x)
+    (syntax-case x ()
+      ((_ ((property-name property-value) ...) scene)
+       #'(make-scene
+         "window"
+         (lambda ()
+           (apply run-scene (cons scene
+                                  (append (list (symbol->keyword 'property-name) property-value)
+                                          ...)))))))))