Name
XtAddRawEventHandler — register an event handler without selecting for the event.
Synopsis
void XtAddRawEventHandler(w, event_mask, nonmaskable, proc, client_data)
Widget w;
EventMask event_mask;
Boolean nonmaskable;
XtEventHandler proc;
XtPointer client_data;
Arguments
wSpecifies the widget for which this event handler is being registered.
event_mask
Specifies the event mask for which to call this procedure. See XtAddEventHandler.
nonmaskable
Specifies a Boolean value that indicates whether this procedure should be called on the nonmaskable events (GraphicsExpose, NoExpose, SelectionClear, SelectionRequest, SelectionNotify, ClientMessage, and MappingNotify).
procSpecifies the procedure that is to be registered. See XtEventHandler(2).
client_data
Specifies additional data to be passed to the client’s event handler.
Description
XtAddRawEventHandler is similar to XtAddEventHandler except that it never causes an XSelectInput call to be made for its events. The event mask in XtAddRawEventHandler indicates which events the handler will be called in response to, but only when these events are selected elsewhere.
A raw event handler might be used to "shadow" another event handler (both added with the same event mask), such that until a primary event handler is added, the shadow handler will never be called. The primary handler will be added with XtAddEventHandler and will alter the event mask, and then both handlers will be called when the appropriate events occur.
However, the "shadowing" technique is not necessary to assure that multiple calls to XtAddEventHandler would not result in wasted XSelectInput calls in which the event mask has not changed. Xt keeps a cache of the event masks of each widget and calls XSelectInput only when it is necessary to change the window’s event mask attribute.
Raw event handlers are removed with a call to XtRemoveRawEventHandler.
A widget needs to register a raw handler only in extraordinary circumstances; most widgets use XtAddEventHandler.
See Also
XtAddEventHandler(1), XtRemoveRawEventHandler(1),
XtEventHandler(2).