Leopold Toetsch wrote:
Stephane Peiry wrote:

g_return_val_if_fail (G_IS_OBJECT (gobject), 0); <<<< Fails here

gtk shouldn't make assumption on the user_data argument IMHO.

I now tried calling g_cclosure_new_object() and g_signal_connect_closure() directly. Doesn't segfault anymore (at least, when you pass a String as user_data) But the return value of the first call is NULL, because of the same check, G_IS_OBJECT(gobject).


The whole idea behind callbacks is, that there is a userdata argument that get's passed through transparently. GTK is taking a gobject only. So there is currently no way to use the existing callback scheme.

*If* that is solved then the next problem is of course that by calling
gtk_main() the GTK event loop is running. That means, while Parrot_callback_C() would get called, the callback fuction itself wouldn't get run because Parrot isn't executing any code at that point. Parrot is stuck in the NCI call to gtk_main().


leo



Reply via email to