Re: accessing widget pointers
- From: Tristan Van Berkom <tvb gnome org>
- To: "Michael P. Soulier" <msoulier digitaltorque ca>
- Cc: gtk-list gnome org
- Subject: Re: accessing widget pointers
- Date: Fri, 05 Oct 2007 20:03:14 -0400
On Fri, 2007-10-05 at 16:14 -0400, Michael P. Soulier wrote:
> Hello,
>
> I'm a GTK newbie, and I'm wondering what people normally do in their signal
> callbacks to access the pointers to the widgets that they need. I have a
> separate callbacks.c, and all of the GtkWidget pointers are file-scope
> variables in main.c. Do you normally pass them in as additional data to the
> signal handler? Make them global?
Normally you would use a context specific or application wide
data structure or object, this struct/object can contain
context relative pointers and options and is a practical thing
to pass to all related callbacks.
Cheers,
-Tristan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]