Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ AppPekEvent(3X) — DeltaWindows 1.3.3 Release 4 Version 4.3

Media Vault

Software Library

Restoration Projects

Artifacts Sought

 

NAME

XtAppPeekEvent − return, but do not remove the event at the head of an application’s input queue; block if no events are available. 

SYNOPSIS

Boolean XtAppPeekEvent(app_context, event_return)
    XtAppContext app_context;
    XEvent ∗event_return;

Inputs

app_context
Specifies the application context.

Outputs

event_return
Returns the event from the head of the queue, if that event is an X event.

Returns

True if the event at the head of the queue is an X event; False if it is a timer event or an alternate input source event. 

DESCRIPTION

If there are X events pending on any of the displays in app_context, XtAppPeekEvent() copies the event from the head of the application event queue into event_return (without removing the event from the queue) and returns True.  If there are no events, it flushes the output buffers of each display and checks again.  If there are still no pending X events on any of the displays, but there are timer or alternate input events ready, XtAppPeekEvent() returns False. 

If there are no events of any kind, XtAppPeekEvent() blocks until one occurs, and then if it is an X event, copies the event (without removing it from the queue) and returns True or returns False otherwise.  Note that XtAppPeekEvent() never calls background work procedures registered with XtAppAddWorkProc() . 

USAGE

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

If you want to get X events and remove them from the input queue, consider XtAppNextEvent().  This function also dispatches timer and alternate input events. 

If you want to check for input events without blocking, use XtAppPending().  This function returns a value that indicates which types of events are pending for an application context, or 0 if no events are pending. 

SEE ALSO

XtAppMainLoopUNIX SYSTEM V/68, XtAppNextEventUNIX SYSTEM V/68, XtAppPendingUNIX SYSTEM V/68. 

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