gtk_builder_connect_signals and user_data parameter

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

gtk_builder_connect_signals and user_data parameter

Mariusz W
Hi,
I am trying to pass data (pointer to struct) to handler but it doesn't work - handler don't have access to this struct. To configure handler I use gtk_builder_add_callback_symbol and it work (handler is called). What I have to check to make it work?

Regards,
Mariusz

_______________________________________________
gtk-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-list
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: gtk_builder_connect_signals and user_data parameter

Mariusz W
Ok, I resolved it - I had wrong callback signature - so callback was called but can't access arguments properly.

was:
static void some_cb(some_data *data)

should be:
static void some_cb(GtkButton *button, some_data *data)

Mariusz

On Fri, Aug 4, 2017 at 12:34 PM, Mariusz W <[hidden email]> wrote:
Hi,
I am trying to pass data (pointer to struct) to handler but it doesn't work - handler don't have access to this struct. To configure handler I use gtk_builder_add_callback_symbol and it work (handler is called). What I have to check to make it work?

Regards,
Mariusz


_______________________________________________
gtk-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-list
Loading...