[Glade-users] function pointers and signals

void on_button_clicked(GtkButton * button, gpointer user_data)
    void (* func) (gint) = user_data;

but in run-time I got "user_data = 0x0".
Is it possible past in Glade-GUI a function pointer?

No currently its not possible to get a function
pointer as user-data when defining the signal
in glade, it could be possible to resolve a user
defined string using dlsym(), effectively passing
any globally visible symbol's pointer into the
user_data argument.

This patch to libglade already does it:

I'll look it

But the future of glade is in the builder, so
I'd suggest you make an RFE for that on this bug:
(maybe it will help to grease the wheel :D)



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