Re: Newbie question about signal handler args

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

 



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@xxxxxxxxxxx
Embedded Linux Lab - 10LE
INdT - Instituto Nokia de Tecnologia (Manaus/Br)
NOKIA's Technology Institute
_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list


[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux