Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ XtAppProces(3) — OSF1 1.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

XtAppMainLoop(1)

XtAppNextEvent(1)

XtAppPeekEvent(1)

XtAppPending(1)

XtDispatchEvent(1)

 

Name

XtAppProcessEvent — process one input event. 

Synopsis

void XtAppProcessEvent(app_context, mask)

    XtAppContext app_context;
    XtInputMask mask;

Arguments

app_context
Specifies the application context for which to process input.

maskSpecifies what types of events to process.  The mask is the bitwise inclusive OR of XtIMXEvent (X event), XtIMTimer (timer events), or XtIMAlternateInput (alternate input events).  The symbolic name XtIMAll is the bitwise inclusive OR of all event types. 

Description

While most widgets will use the Resource Manager to handle events, the X Toolkit does provide a mechanism for widgets or application code to handle X events directly.  Every client interested in X events on a widget uses XtAddEventHandler to register which events it is interested in and a procedure (event handler) that is to be called when the event happens in that window.  The handler can then use XtAppProcessEvent to actually handle the events.  XtAppProcessEvent processes an X event, a timer event, or an alternate input event.  If there is nothing to process, XtAppProcessEvent blocks until there is.  If there is more than one type of event available, the one that will get processed is undefined. 

XtAppProcessEvent processes timer events and alternate input events by calling the appropriate callbacks, the same way XtAppPeekEvent and XtAppNextEvent do.  XtAppProcessEvent calls XtDispatchEvent to handle X events. 

When an X event is received, it is passed to XtDispatchEvent, which calls the appropriate event handlers and passes them the widget, the event, and client-specific data registered with each procedure.  If there are no handlers registered for that event, the event is ignored and the dispatcher simply returns.  The order in which the handlers are called is undefined. 

Programs rarely need this much control over the event dispatching mechanism.  Most programs use XtAppMainLoop. 

See Also

XtAppMainLoop(1), XtAppNextEvent(1), XtAppPeekEvent(1), XtAppPending(1), XtDispatchEvent(1). 

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