.
callback := ExternalCallback
block: [ :lplf :lptm :dwType :lpData | operation value: lplf
value: lptm value: dwType ]
argumentTypes: 'LOGFONT* lpvoid dword dword'
I see -- the most similar thing to this one is provided by msgSendf.
You would have to rewrite msgSendf as a function that follows the libffi
closure API, and then pass it to the ffi_prep_closure together with an
ffi_cif (there is already code to construct ffi_cif from a
CFunctionDescriptor). See for example
http://developer.apple.com/documentation/Darwin/Reference/ManPages/man3/ffi_prep_closure.3.html
(the main difference is that, in the example, foo_closure does not look
at its CIF argument).
Due to the fact that I need to create callbacks dynamically based on
third party data I get (dynamically as well :-( ) I think there is no
way around libffi. Maybe I can reuse the existing parameter stuff around
#cCall: for inbound calls.
Yes, most of it is written for libffi so it can be recycled for this
setting too. It's in cint.c.
Paolo
_______________________________________________
help-smalltalk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-smalltalk