Thanks Lindley M French for the answer... it solve my problem.... only have other question. Reviewing documentation and found the event GDK_NOTHING, gtk_widget_add_events, gtk_widget_set_events for a widget (window), then I add the event GDK_NOTHING gtk_widget_set_events (window,GDK_NOTHING); gtk_widget_add_events (window,GDK_NOTHING); And connect the event with my function, gint nothing( GtkWidget *widget,GdkEvent *event,gpointer data ){ printf("\nPut your source here"); return FALSE; } g_signal_connect (G_OBJECT (window), "GDK_NOTHING",G_CALLBACK (nothing), NULL); but I get the following warnig GLib-GObject-WARNING **: gsignal.c:1667: signal `GDK_NOTHING' is invalid for instance `00CBA0E0' My question is how do I use the event? > It's very simple to use. > > After you call that function (and you've called > gtk_main() or g_main() as well), at some point very > soon the function you passed will be called with the > supplied arguments. It will be essentially as if you > had called the function yourself right there, except > that (a) if the program is multi-threaded, the > function will be called in the event-handling thread > no matter where g_idle_add was called, and (b) it's > a bit better for performance reasons in some cases. > > If the function you're adding is to do a one-time > task, have it return false and that will be all. If > it's something that you need to call continuously > for some reason, have it return true. Be careful: If > you have an idle function return true when it > doesn't need to, it will cause GTK to use far more > CPU time than it would otherwise. > > ----- Original Message ----- > From: Moises <ammoises@xxxxxxxxxxxx> > Date: Sunday, February 17, 2008 5:43 pm > Subject: Help with call to function > > > Thanks for the answer > > > > I do not know how to use the function: > > > > Guint g_idle_add (GSourceFunc function, gpointer > > data); > > > > Function: function to call > > Data: data to pass to function. > > Returns: the ID (greater than 0) of the event > source. > > > > But as I say the widget that uses the function > when > > does nothing > > > > > > > > > ____________________________________________________________________________________¡Capacidad > ilimitada de almacenamiento en tu correo! > > No te preocupes más por el espacio de tu cuenta > con Correo Yahoo!: > > > > http://correo.yahoo.com.mx/ > > _______________________________________________ > > gtk-list mailing list > > gtk-list@xxxxxxxxx > > http://mail.gnome.org/mailman/listinfo/gtk-list > > > ____________________________________________________________________________________ ¡Capacidad ilimitada de almacenamiento en tu correo! No te preocupes más por el espacio de tu cuenta con Correo Yahoo!: http://correo.yahoo.com.mx/ _______________________________________________ gtk-list mailing list gtk-list@xxxxxxxxx http://mail.gnome.org/mailman/listinfo/gtk-list