On 11/19/20 7:02 PM, Tim Meehan wrote:
I figured that I would try and do something simple-ish to see how well I understood the FFI. I found this GTK tutorial, written in Chez Scheme: https://github.com/jhidding/lyonesse/blob/master/gtk-tutorial/window.scm I just tried to replace the Chez FFI calls with Guile FFI calls. I'm not sure how to tell GTK about a callback that is written in Guile. I'm not sure how to pass a string to GTK ... Cheers,
;; HELP: This obviously won't work. ;; How would I give GTK a Guile callback? (define (callback p) (let ([code (foreign-callable p (iptr iptr) void)]) (lock-object code) (foreign-callable-entry-point code)))
try reading the manual section on procedure->pointer