;;; 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)
+ ...)))))))))