qml-old/examples/helloworld.scm

27 lines
795 B
Scheme
Raw Normal View History

2022-02-03 14:02:59 +00:00
(import
(chicken foreign)
(qml core)
2021-04-10 09:43:03 +00:00
coops)
(gui-application-create)
(define engine (make <QQmlApplicationEngine>))
(define loc (new-QUrl "examples/helloworld.qml"))
(load-url engine loc)
2022-02-03 14:02:59 +00:00
(define-external (windowCloseCallback (c-pointer cbdata) (int argc) ((c-pointer c-pointer) argv)) void
(print (string-append "Got back " argc " arguments.")))
(define callback-data (new-CallbackData "Test"))
(define conn (connect-lambda-static engine "quit"
windowCloseCallback
callback-data
(qt-connection-type auto:)))
2021-04-10 09:43:03 +00:00
(do ((loop #t))
((not loop) #t)
(process-events-timed (qevent-loop-process-event-flag process-all-events:) 50))
2022-02-03 14:02:59 +00:00
(type windowCloseCallback)
(type callback-data)