From: C. <dig...@us...> - 2000-11-22 03:02:54
|
Eae coders ? Num mail anterior que eu mandei prá lista, pedi o auxílio de vcs com o timeout no gtk... :) BOm, não precisa mais... hehehe acabei achando a solução aki... vejam este trecho do manual do gtk sobre o timeout: ---------------->8----- [corta] You may be wondering how you make GTK do useful work when in gtk_main. Well, you have several options. Using the following function you can create a timeout function that will be called every "interval" milliseconds. gint gtk_timeout_add( guint32 interval, GtkFunction function, gpointer data ); The first argument is the number of milliseconds between calls to your function. The second argument is the function you wish to have called, and the third, the data passed to this callback function. The return value is an integer "tag" which may be used to stop the timeout by calling: void gtk_timeout_remove( gint tag ); You may also stop the timeout function by returning zero or FALSE from your callback function. Obviously this means if you want your function to continue to be called, it should return a non-zero value, i.e., TRUE. The declaration of your callback should look something like this: gint timeout_callback( gpointer data ); ---------------------->8----- [corta] Interessante, não ? Os parâmetros não são como eu havia suposto... já corrigi isso e estou fazendo testes agora... Acredito que na quarta-feira estarei disponibilizando o primeiro beta _funcional_ da interface em gtk... []'s -- André Casteliano Analista de Sistemas +-=-=[ dig...@us...]=-=-+ [ Linux User: # 178853 Machine: # 79923 ] [ Linux Heavy User - Powered by Slackware 7.1 ] [ http://www.geocities.com/andre_casteliano/ ] +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+ [ LinuxCall - The Linux Dialer ] [ http://linuxcall.sourceforge.net ] +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+ |