Re: Pass 2 or more widgets in callback



You can allocate a structure and pass the structure as the data
parameter ; or you can use the _set_data()/_get_data() functions.
There is no 'correct' way to do it, just plenty of working methods.
You could have a look to the list archive to catch some of them.

Yours,

Emmanuel

What is the "correct" way to pass more than one widget in the data param
of a callback? I tried passing an array of GtkWidget* and a g_list, but
it didn't work. The approach that worked was to get one of the widget
and set pointers to the others with gtk_object_set_data, and then
gtk_object_get_data inside de callback. I wonder if there is a better
way to do it.

Thanks in advance,
Paulo Schreiner







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