guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: getting to know the FFI ...


From: Matt Wette
Subject: Re: getting to know the FFI ...
Date: Sun, 22 Nov 2020 06:55:17 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0



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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]