Name
XtDispatchEvent — dispatch registered handlers for an event.
Synopsis
void XtDispatchEvent(event)
XEvent ∗event;
Arguments
eventSpecifies a pointer to the event structure to be dispatched to the appropriate event handler.
Description
XtDispatchEvent sends events to handler functions previously registered with XtAddEventHandler. Since the entire translation manager is an event handler, XtDispatchEvent results in action functions being called if a translation matches the event being dispatched. XtDispatchEvent calls the appropriate handler functions and passes them the widget, the event, and client-specific data.
If no handlers for the event are registered, the event is ignored. If there are multiple handlers registered for an event, the order in which handlers are called is undefined.
XtDispatchEvent returns True if it dispatched the event to some handler and False if it found no handler to dispatch the event to. In most applications, XtAppMainLoop is used to dispatch events transparently. XtAddEventHandler and XtAddRawEventHandler are used to register event handlers.
The most common use of XtDispatchEvent is to dispatch events acquired with XtAppNextEvent. However, it also can be used to dispatch user-constructed events. XtDispatchEvent records the last timestamp in any event which contains a timestamp (see XtLastTimestampProcessed) and also is responsible for implementing the grab semantics of XtAddGrab.
See Also
XtAddEventHandler(1), XtAddGrab(1), XtAddRawEventHandler(1), XtAppNextEvent(1), XtEventHandler(1), XtMainLoop(1).