custom event loop



Hi.

I am sorry is this is something very basic, but I am just wondering about
the best way (if any) to implement custom event-dispatching loop.

This is an example I used in my Motif code:

void process_events(){
  XEvent e;
  XmUpdateDisplay(toplevel);
  while(XEventsQueued(XtDisplay(toplevel),QueuedAfterFlush)){
    XNextEvent(XtDisplay(toplevel),&e);
    XtDispatchEvent(&e);
  }
}

Thanks a lot.

Alex Y.
-- 
   _ 
 _( )_
(     (o___           +-------------------------------------------+
 |      _ 7           |            Alexander Yukhimets            |
  \    (")            |       http://pages.nyu.edu/~aqy6633/      |
  /     \ \           +-------------------------------------------+



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