XtPeekEvent()XtPeekEvent()NameXtPeekEvent - return, but do not remove the event at the head of an
application's input queue.
Synopsis
Boolean XtPeekEvent(event_return)
XEvent *event_return;
Inputs
event_return
Returns the event information from the head event structure
in the queue.
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.
AvailabilityXtPeekEvent() has been superseded by XtAppPeekEvent().
DescriptionXtPeekEvent() returns a copy of the X event at the head of the input
queue, without removing it from the queue. If there is an X event, it
returns True. If there are no X events pending, but there are timer or
alternate events, XtPeekEvent() returns False. If there are no events
pending, XtPeekEvent() blocks.
UsageXtPeekEvent() has been superseded by XtAppPeekEvent(), which performs
the same function on a per-application context basis. XtPeekEvent()
now calls XtAppPeekEvent() passing the default application context cre‐
ated by XtInitialize(). Very few programs need multiple application
contexts, and you can continue to use XtPeekEvent() if you initialize
your application with XtInitialize(). We recommend, however, that you
use XtAppInitialize(), XtAppPeekEvent(), and the other XtApp*() appli‐
cation context specific functions.
See XtAppPeekEvent() for more information.
Programs rarely need this much control over the event dispatching mech‐
anism. Most programs use XtAppMainLoop().
See AlsoXtAppMainLoop(1), XtAppPeekEvent(1), XtAppPending(1).
Xt - Event Handling XtPeekEvent()