FAQ volounteers (was: Re: more than one arg to signal/timeout handlers)



On Mon, 19 Jan 1998, Landshark wrote:

> > How would one effectively handle passing more than one argument to a
> > signal or timeout handler?  Forgive me if this has been answered
> > already, and I bet you can tell that I'm quite new to GTK.

> Try creating a struct for the information, and pass a pointer to that
> struct to the signal handler.

> struct dialogdata
> {
>   Widget *dialog_wnd;
>   Widget *ok_button;
>   Widget *cancel_button;
>   Widget *text1;
>   Widget *text2;
> };
> 
> struct dialogdata *data;

> gtk_signal_connect(........., data);

ohh, *please* people, some brave man stand up and take over
to volounteer the FAQ/tutorial (merge them?).

it is desperately needed and only requires regular reading
of gtk-list.



---
ciaoTJ



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