[gtkada] GtkAda and tasking
Emmanuel Briot
briot at gnat.com
Tue Apr 18 12:15:19 CEST 2000
> Other tasks need to communicate with the UI task, but the UI task is
> normally stuck in the main loop. Apparently, if another task calls
> Gtk.Main.Main_Quit, this forces the UI task out of the main loop, but only
> after an UI event (i.e. moving the mouse over the window). Is there a way to
> not even have to wait for a window event ?
You can in fact rewrite the main loop yourself, with something like (extract
from the GtkAda documentation, package Gtk.Main):
loop
-- test entries
...
-- process events
while Gtk.Main.Events_Pending loop
Dead := Gtk.Main.Main_Iteration;
end loop;
end loop;
Is this good enough for you ?
More information about the gtkada
mailing list