Re: accessing widget pointers



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]