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

30 lines
878 B
Scheme

(define-module (agar core)
#:use-module (agar util)
#:use-module (system foreign)
#:use-module (system foreign-library)
#:export (init-core get-error destroy event-loop)
#:replace (quit))
(define init-core
(with-string-inputs '(0)
(foreign-library-function "libag_core" "AG_InitCore"
#:return-type int
#:arg-types (list '* unsigned-int))))
(define get-error
(foreign-library-function "libag_core" "AG_GetError"
#:return-type int
#:arg-types (list '* unsigned-int)))
(define quit
(foreign-library-function "libag_core" "AG_Quit"
#:return-type void))
(define destroy
(foreign-library-function "libag_core" "AG_Destroy"
#:return-type void))
(define event-loop
(foreign-library-function "libag_core" "AG_EventLoop"
#:return-type void
#:arg-types '()))