how to process only some GTK events and leave the others in the queue
- From: Francesco Montorsi <f18m_cpp217828 yahoo it>
- To: gtk-app-devel-list gnome org
- Subject: how to process only some GTK events and leave the others in the queue
- Date: Sun, 28 Dec 2008 12:45:36 +0100
Hi,
is it possible to process only some specific events from the GTK/GDK event
queue and leave the others in the queue so they can be processed later by the
main loop?
I'll try to explain it better: I have a GTK-based app which runs the gtk_main()
in its void main().
However at a certain point (e.g. upon user click on a GtkButton), I need to
perform a long computation. I don't want to use a secondary thread; rather I'd
like to do everything from the main thread. To avoid blocking the GUI of my app
during the computation, I call from time to time:
while (gtk_events_pending() != 0)
gtk_main_iteration();
to process the pending events in the queue. However now I'd like to process only
_some_ of the events of the queue, and leave the others in the queue itself.
Is it possible?
Thanks!!
Francesco
--
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]