(define-module (agar gui) #:use-module (agar util) #:use-module (system foreign) #:use-module (system foreign-library) #:export (init-graphics window-new &window-main window-show label-new)) (define* (init-graphics #:optional (drivers #f)) ((with-string-inputs '(0) (foreign-library-function "libag_gui" "AG_InitGraphics" #:return-type int #:arg-types (list '*))) drivers)) (define window-new (foreign-library-function "libag_gui" "AG_WindowNew" #:return-type '* #:arg-types (list unsigned-int))) (define &window-main #x10000) (define window-show (foreign-library-function "libag_gui" "AG_WindowShow" #:return-type void #:arg-types (list '*))) (define label-new (with-string-inputs '(2) (foreign-library-function "libag_gui" "AG_LabelNew" #:return-type '* #:arg-types (list '* unsigned-int '*))))