newbie question: connecting signals to callbacks



Hello,

I have a basic question which I would like to ask:

The function prototype for gtk_main_quit() is:

void gtk_main_quit(void);

The GtkObject signal prototype for the "destroy" callback is:

void user_function(GtkObject *object, gpointer user_data);

Yet I can connect the two as follows:

g_signal_connect(widget, "destroy", G_CALLBACK(gtk_main_quit), NULL);

My question is, is it always legal to connect a signal to a function
with less parameter arguments than those described in the API?

Thanks,

Neil



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