Re: Newbie question about signal handler args



The (*data) IS a pointer (i think it's a 'void *' pointer ) to the
argToPass, and the *widget is a pointer to the "caller widget" ... So
, when button gets the focus in, this signal will be throwed, and the
callback 'buttonHandler' will the called ... To use the argToPass
inside the callback, just cast it to the desired type ...

> gtk_signal_connect( GTK_OBJECT( button ), "focus-in-event",
>                               GTK_SIGNAL_FUNC( buttonHandler ), argToPass );
> 
> In my handler,
> 
> void buttonHandler( GtkWidget *widget, gpointer *data )
> {
> }
> 
> I think that (*data) should be my "argToPass", but is "widget" a pointer to the button that got the focus change event?

Best Regards

-- 
Antonio Gomes
E-mail: antonio gomes indt org br
Embedded Linux Lab - 10LE
INdT - Instituto Nokia de Tecnologia (Manaus/Br)
NOKIA's Technology Institute



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