Re: learning gtk - callbacks



greg wolski wrote:
Hi there,
I am trying to learn gtk and I have a hard time to understand signals.
This comes from helloworld in tutorial

g_signal_connect (G_OBJECT (window), "delete_event",
                  G_CALLBACK (delete_event), NULL);
g_signal_connect (G_OBJECT (window), "destroy",
                  G_CALLBACK (destroy), NULL);


Question:
How does gtk know what functions it should call?
I mean for me it basically says: call this or this.
Is it about the arguments that are declared in callback functions?
This is a little bit confusing because no arguments are indicated in those connections.

Thanks for any help,

The best way to learn is to google for gobject. A lot of detail on
gobject is here: http://www.le-hacker.org/papers/gobject/
There's also previous posts on the gtk lists on tutorials
being written. There's also: http://www.gtk.org/tutorial/

It will take a long time to get the hang of it, but it's
much easier after you do.



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