Re: Question about Timeouts
- From: <learfox furry ao net>
- To: Marco Quezada <mquezada nlxcorp com>
- Cc: GTK List <gtk-app-devel-list gnome org>
- Subject: Re: Question about Timeouts
- Date: Wed, 21 Mar 2001 17:45:35 -0800 (PST)
I have not quite figured this one out. I have a callback that shows a
pop_up menu that displays a series of pixmaps. It looks something like
this:
banner_window = create_banner_window ();
timeout_id = gtk_timeout_add(1500.0, timout_callback, banner_window);
gtk_widget_show(banner_window);
gtk_window_reposition(GTK_WINDOW(banner_window), x_pos, y_pos);
while(gtk_events_pending())
{
gtk_main_iteration();
}
//---- callback continues
My question is: Will the timeout function get called if the timer period
expires while still inside the callback? or does the timer only run
while gtk is in the gtk_main function?
From my experiance, the timeouts are called under two conditions,
when gtk_main_iteration() is called or when controlling returns to
the level of the highest gtk_main() and when the time interval has been
reached in both cases.
The timeout won't be called `async' when one of your functions is in
execution unless your function has a gtk_main_itteration() or a
gtk_main() in it.
I ask this because this pixmaps should display while the processes in
the callback are being run but it onlly seems to get run after the
callback exits.
Was there a callback placed in your example? It looks like the callbacks
are called *after* your gtk_events_pending() loop.
I think you need to put a gtk_main_iteration() inside yer callback
functions.
--
Sincerely, ,"-_ \|/
-Capt. Taura M. , O=__ --X--
..__ ,_JNMNNEO=_ /|\
OMNOUMmnne. {OMMNNNEEEEOO=_
UOOOBIOOOEOMMn. 'LONMMMMNNEEEOOO=.__..,,..
UUOOEUUOOOOOOOObe '"=OMMMMWNEEEOOOOO,"=OEEEOO=,._
OOUUUIEEIOONNOIUbe. "7OMMMMNNNNNWWEEEEOOOOOO" "'.
EEBNNMMMNWNWWEEIMMNe. __ 7EMMMNNNNNWWWEEEEEEEOO. " .
NNMMMMWWWMMMWEINMMMNn "=BBEEEEMMMMMMMMNNNWWWEEOOOOO=._ .
http://furry.ao.net/~learfox/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]