how to put a custom Event into the main loop?
- From: Christopher Lang <christopher lang acurana de>
- To: "gtkmm-list" <gtkmm-list gnome org>
- Subject: how to put a custom Event into the main loop?
- Date: Mon, 25 Aug 2008 20:33:07 +0200
Hi,
since some time I am wondering about this: how can I put a custom *Event* in
the main loop? This Event then is supposed to call a function or do soemthing
etc.
Currently I am always connecting an "idle" function, in case of my custom
event, (which could be a thread terminating or something else). This fct
then returns "false" in order to emulate a kind of "run_once_on_event"
behaviour.
I am using this to step a state machine with functions executed in the the
main loop. Bad thing is, I always have to reconnect the fct for every custom
event/shot.
But I think there must be a better way without always having to connect an
idle function in order to get one shot event processing done through the main
loop.
I read Gtk::Main Class Reference, but there is no way of adding/issuing custom
Events.
With "event" I mean an event which is then recognized in the main loop for
example with the function events_pending(), and then executed with
iteration().
Help is much appreciated.
thanks in advance
cheers
Chris
--
http://www.acurana.de/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]