how to put a custom Event into the main loop?


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 

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" 

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 

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 
I read Gtk::Main Class Reference, but there is no way of adding/issuing custom 

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 

Help is much appreciated.

thanks in advance



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