Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ XtAppMainLo(3) — OSF1 1.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

XtAppAddWorkProc(1)

XtAppNextEvent(1)

XtDispatchEvent(1)

 

Name

XtAppMainLoop — process input from a given application. 

Synopsis

void XtAppMainLoop(app_context)

    XtAppContext app_context;

Arguments

app_context
Specifies the application context that identifies the application.

Description

XtAppMainLoop first reads the next incoming X event by calling XtAppNextEvent and dispatches it to the appropriate registered procedure by calling XtDispatchEvent.  This constitutes the main loop of X Toolkit applications, and as such, it does not return.  Applications are expected to exit in response to some user action. 

There is nothing special about XtAppMainLoop; 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.  For example, if the number of top-level widgets drops to zero, the application may be able to exit safely. 

See XtAppAddWorkProc for information on how to spend idle time. 

See Also

XtAppAddWorkProc(1), XtAppNextEvent(1), XtDispatchEvent(1). 

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