Re[1]: Newbie Q: external event loop

>>>  Thu Apr 30 10:55:19 1998 seems to think that:
>Is it possible to use an external event loop instead of the gtk_main?
>I can not find any "gtk_do_one_event"-like function in gtk doc.
  [ ... ]

I also asked this question.  The mantra is not to do that, but I was
vaguely successful in making an external event loop work under gtk
after sufficient hacking.

The gtk_main function eventually boils down to code like this which is
probably not what you want:

  while(!gtk_main_iteration()) ;

I call my event loop based on X events pending, and then do this which
may be more what you want.


If you are doing fancy things to determine when you run your loop, be
warned that the menues all use timers to delay popup times.  This is
what makes the menus feel nice.  If this is the case, I'm not yet sure
how to find out what the current timout value is, but if you run the


it will run any out-of-date timers for you, so you may need to make
sure you run this after a sufficient short delay after handling

Doing this lets me keep my event loop which I use when I run my app in
curses mode.


|\/\/\___/\/\/|  Eric Ludlam       ;
\____ o o ____/  Homepage:            
     )   (       Trebuchets:
    ( * * )      FSF:				  
     \___/           "Have a fling with a Hudson Trebuchet Crew member"

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