Name
XtMainLoop — continuously process events.
Synopsis
void XtMainLoop()
Description
XtMainLoop has been superseded by XtAppMainLoop. XtMainLoop obtains the default application context and reads the next incoming X event by calling XtAppNextEvent. It then dispatches the appropriate registered procedure with XtDispatchEvent. This constitutes the main loop of Toolkit applications, and, as such, it does not return. Applications are expected to exit in response to some user action. (XtAppAddWorkProc provides a way of using an application’s idle time.) There is nothing special about XtMainLoop; it is simply an infinite loop that calls XtAppNextEvent and then XtDispatchEvent.
An application can provide its own version of this loop. For example, it might test an application-dependent global flag or other termination condition before looping back and calling XtAppNextEvent. Instead of exiting on a particular event (say a button press), it might exit if the number of top-level widgets drops to zero.
See Also
XtAppAddWorkProc(1), XtAppMainLoop(1), XtAppNextEvent(1), XtDispatchEvent(1).