Re: learning gtk - callbacks



 greg wolski <gregwolski sbcglobal net> wrote:

> Subject: learning gtk - callbacks

> 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,

For learning purposes, I humbly suggest Euphoria/GTK.

Euphoria is an extremely fast interpreted language, and it, along with the GTK 
bindings, make creating GTK programs amazingly simple compared to C. There 
are no makefiles, compiling or linking to do, you just write code and run it.  
Once you have a  better understanding of how GTK works, you will have less 
trouble writing your programs in C, if you find it necessary.

Here are links to documentation, sample code, screenshots, etc:
http://databrook.com/users/irvm/
the project itself is hosted at http://sourceforge.net/projects/eugtk

Regards,
Irv





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