I’ve been looking at the way the signal dispatcher works in
rbgobj_signal.c to try to figure out how to call an exteral C function
which takes a callback function pointer. I have to say that being
unfamiliar with extending Ruby in C (except from getting luck with some
fairly blind cloning of existing bindings), being unfamiliar with the
API used within the ruby-gnome2 bindings and really not being all that
familiar with using GTK+ from C, I’m having some trouble figuring out
exactly what I need to do.
Given the following
typedf void (*callback)(char *p1, int *p2);
void my_function(int x, callback fn);
How would I implement the wrapper C function for the ruby class, e.g.
def my_function(x, &block)
but in C?
I know this isn’t specifically about ruby-gnome2, but I’m experimenting
with a set of bindings for GtkHTML3 since I’m not having much luck with
GtkHTML2. Since I’m trying to make it consistent with what’s already
part of the official bindings in case anyone else wants it, I figured
this was the best place to ask.
Thanks in advance,