I have a small program where a gtk signal callback function needs 2 or 3 variables.
I don\'t want to make these global variables (The entire goal of the project is to be
You can use g_object_set_data() and g_object_get_data(). First, set the data:
g_object_set_data(G_OBJECT(my_edit), "my_label", my_label);
g_object_set_data(G_OBJECT(my_edit), "age", GINT_TO_POINTER(age));
and in the callback you can get the data like so:
gint age = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget), "age"));
GtkWidget *my_label = g_object_get_data(G_OBJECT(widget), "my_label");