Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ XtMainLoop(3) — OSF1 1.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

XtAppAddWorkProc(1)

XtAppMainLoop(1)

XtAppNextEvent(1)

XtDispatchEvent(1)

 

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). 

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026