Re: [gtk-list] Making the event loop run normally
- From: Lyndon Drake <lyndon stat auckland ac nz>
- To: GTK+ list <gtk-list redhat com>
- Subject: Re: [gtk-list] Making the event loop run normally
- Date: Thu, 26 Nov 1998 15:18:10 +1300
I've been looking through the source of gtk_main etc. to try
to work this out for myself. As far as I can tell, I should
either just call
or have a small block of code:
old_done = iteration_done;
iteration_done = old_done;
The only difference is that the second way of running the
event loop doesn't call the init and quit functions.
Can anyone make some informed comments on the purpose of the
init and quit function lists, and whether they need to be
called from this "inner" event loop?
On Wed, Nov 25, 1998 at 02:46:06PM +1300, Lyndon Drake wrote:
> Yet another question for the Gtk gurus out there.
> In R, the front end calls an eval() function, passing it an
> expression to evaluate. This expression may call R_ReadConsole,
> which (in the text mode version) just read()s from the tty.
> In the gtk interface, I want to read from a subclass of a text
> widget. The problem I have is how to ensure that events get
> processed while this happens.
> One way to do it would be to:
> or whatever it is.
> The problem with that is that it will spin round in the loop,
> using up 100% processor time, for as long as it takes the user
> to type in a line.
> What needs to happen is:
> - R eval calls R_ReadConsole
> - R_ReadConsole enables input in my GtkConsole widget and
> connects to a signal which indicates when a line of input is
> - R_ReadConsole should somehow get the gtk event loop running,
> so that the application's interface (especially the console
> widget) keeps going. Eventually there will be other windows
> that could (for example) accept mouse input, so I want all
> events for the application (not just the current window) to
> be processed.
> Can anyone suggest a function to call from my R_ReadConsole
> function that will just drop into the gtk event loop?
> To unsubscribe: mail -s unsubscribe email@example.com < /dev/null
] [Thread Prev