Re: running a function



Yes, just use

 gboolean    (*timeout_callback)(gpointer data);

   int  tag = gtk_timeout_add( 100, timeout_callback, user_data);

to add your function and

   gtk_timeout_remove(tag);

to turn it off.

timothy johnson wrote:

I am new to gtk, and trying my hand at writing a mp3player, I am
working on the point of the player that when one song is done playing
it will load and play the next song. How do I run a test function
every couple milli seconds to check to see if it is still playing or
not? is g_timeout_add() what I need to use? Any example code?
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list





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