Callbacks and FFI
Ned Konz
ned at bike-nomad.com
Mon Jun 2 00:02:58 UTC 2003
On Sunday 01 June 2003 11:17 am, Emeric Rollo wrote:
> I'd like to use a C library in squeak. (using FFI) But I saw on
> squeak-dev's archives that callbacks functions are not supported by
> FFI stuff... However, these messages are old (2000-2001). Does
> anyone know if there is currently a way to call callback functions
> with FFI ? Thanks.
> Emeric.
No.
You'll have to use a plugin.
This is a weakness of the Squeak plugin architecture. What we usually
do is to signal a Semaphore on the callback. This wakes a Squeak
Process, which then goes to the plugin to get whatever data came with
the callback.
This is how the sound plugin works, for instance. I believe that the
drop plugin registers a callback as well.
--
Ned Konz
http://bike-nomad.com
GPG key ID: BEEA7EFE
More information about the Squeak-dev
mailing list
|