Re: Refreshing the GUI without gtk_main ()



On Fri, 16 Apr 2004 22:44:32 +0200
Andrej Prsa <andrej prsa fmf uni-lj si> wrote:

Hello everyone!

I wrote an interactive scripter with its own loop that runs in the
terminal. This scripter is a back-end of the dedicated GUI. But since it
has its own eternal loop, the GUI doesn't refresh. I can refresh it by
using:

      while (gtk_events_pending()) gtk_main_iteration ();

but this refreshes the GUI only when the scripter performs a particular
action. While it sits and waits for input, the GUI is frozen.

Any idea how to overcome this?

Andrej,

You could make your scripter event-driven. Connect, for example, a
GIOchannel to the input, and execute your code when input arrives.

John



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