X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=irrlicht.scm;h=f3474c63dd48071b6eee9be7d459e7267f600ae7;hb=eaa186435f0c641c53841d8d15581525bd542249;hp=8c5178001bdd8384238219fd8347165c7cb95974;hpb=08677eca02dfe600ae413ec9f052308b322ad767;p=guile-irrlicht.git diff --git a/irrlicht.scm b/irrlicht.scm index 8c51780..f3474c6 100644 --- a/irrlicht.scm +++ b/irrlicht.scm @@ -18,24 +18,19 @@ ;;; . -(define-module (irrlicht) - #:use-module (ice-9 match) - #:use-module (system foreign) - #:use-module ((irrlicht bindings) #:prefix ffi:) - #:use-module ((irrlicht bindings core) #:prefix ffi-core:) - #:use-module ((irrlicht bindings video) #:prefix ffi-video:) - #:export (create-device)) +(define-module (irrlicht)) -(define* (create-device #:optional - (device-type 'software) - (window-size '(640 480))) - (let ((driver (match device-type - ('null ffi-video:EDT_NULL) - ('software ffi-video:EDT_SOFTWARE) - ('burnings ffi-video:EDT_BURNINGSVIDEO) - ('direct3d8 ffi-video:EDT_DIRECT3D8) - ('direct3d9 ffi-video:EDT_DIRECT3D9) - ('opengl ffi-video:EDT_OPENGL) - ('count ffi-video:EDT_COUNT))) - (wsize (make-c-struct ffi-core:dimension2d window-size))) - (ffi:create-device driver wsize))) +(eval-when (eval load compile) + ;; load public symbols into current module + (let ((public-modules + '((irrlicht device) + (irrlicht gui) + (irrlicht io) + (irrlicht scene) + (irrlicht video))) + (current-interface + (module-public-interface (current-module)))) + (for-each + (lambda (m) + (module-use! current-interface (resolve-interface m))) + public-modules)))