Apprarently simple signal/event question



Hi everyone, 

I have a problem understanding why something happens, which on the surface
would appear to be quite simple.

I understand that the callback on signals looks like this

    gint signalblahblah( GtkWidget *, gpointer *)

...and according to the documentation out there, a callback for an event
would look like this

    gint eventblahblah( GtkWidget *, GdkEvent*, gpointer *)

So, given that, why then can I connect the first format of handler function
to the delete_event event. Ie.

gtk_signal_connect( GTK_OBJECT(MyWindow),
                    "delete_event",
                    GTK_SIGNAL_FUNC( signalblahblah ),
                    NULL );

It occurs to me that based on what the docs say, that I should get an error
for connecting a signal handler to what is obviously an event. I don't, the
code works, and I've seen in numerous other pieces of code.

Any offers on why ?


Sorry if this basic, its just bugging me somewhat.

Thanks,

Pete
                    



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