See this GTK callback function:
static gboolean callback(GtkWidget *widget, GdkEventButton *event, gpointer *data)
{
AnyClass *obj = (AnyClass*) data;
// using obj works
}
(please note the gpointer* on the data). And then the signal is connected using:
AnyClass *obj2 = new AnyClass();
gtk_signal_connect(/*GTK params (...)*/, callback, obj2);
See that the *AnyClass is going to be cast to gpointer* (void**). In fact, this is working now. The callback prototype in GTK documentation is "gpointer data" and not "gpointer *data" as shown in code, what I want to know is: how this can work ? Is this safe ?