Files
guile-agar/agar/gui.scm
2026-03-31 19:52:07 -05:00

33 lines
1.1 KiB
Scheme

(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 '*))))