[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Pass more widgets as gpointer.
- From: Vlad Volodin <vest 84 gmail com>
- To: Jens Hansen <jensh604 gmail com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Pass more widgets as gpointer.
- Date: Tue, 21 Apr 2009 08:57:41 +0400
Hello, Jens
The other way is to make your widgets global. Especially, me? I use
GOjects, and always pass "self" object. For example, I inherit main
window object from GtkWindow and later in widgets definition pass
itself to callback. Also, you can use g_object_set_data for storing
some useful pointers.
Good luck
2009/4/20 Jens Hansen <jensh604 gmail com>:
> Hello All.
>
> I'm quite new to C, but have done some gtk programming in perl.
> I've been looking for answers on the web, and in various tutorials, without
> any luck.
> My question is how to pass more widgets as a gpointer, to a callback
> function. (in C )
>
> For instance if a "OK" button, has to read the state of three other
> widgets...
>
> In perl I would make an array of the widgets, and then pass the ref as the
> data argument to the callback. I cannot grasp how to do something like that
> in C.
>
> An example snippet would be really helpfull.
>
> Thx
>
> Jens
> _______________________________________________
> gtk-app-devel-list mailing list
> gtk-app-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
>
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]