Yield?
- From: Kenneth Albanowski <kjahds kjahds com>
- To: gtk-list redhat com
- Subject: Yield?
- Date: Fri, 28 Nov 1997 11:19:34 -0500 (EST)
What's the best way (if there is one) to let Gtk process events inside
another function? I'm not talking about a recursive main loop, but the
situation where you are running a time-consuming, and linear, task but
want to service window redraws, handle mouse input, etc.
gtk_main_iteration() seems to be close, but it doesn't handle window
redraws quickly enough for my tastes. I've played around a bit, and the
best variant I've found is:
do {
gtk_main_iteration();
} while(gdk_events_pending());
May I suggest a gtk_main_yield() function that does this, or whatever is
appropriate? Yielding to the current loop is a fairly common operation in
GUIs.
--
Kenneth Albanowski (kjahds@kjahds.com, CIS: 70705,126)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]