Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

xtinserteventhandler(3) [hpux man page]

XtInsertEventHandler()													    XtInsertEventHandler()

Name
  XtInsertEventHandler - register an event handler procedure that receives events before or after all previously registered event handlers.

Synopsis
void XtInsertEventHandler(w, event_mask, nonmaskable, proc, client_data, position)
	 Widget w;
	 EventMask event_mask;
	 Boolean nonmaskable;
	 XtEventHandler proc;
	 XtPointer client_data;
	 XtListPosition position;

Inputs
  w	    Specifies the widget for which this event handler is being registered.  Must be of class core or any subclass thereof.

  event_mask
	    Specifies the event mask for which to call this procedure.

  nonmaskable
	    Specifies whether this procedure should be called on nonmaskable events

  proc	    Specifies the procedure that is to be called.

  client_data
	    Specifies additional data to be passed to the client's event handler.

  position  Specifies when the event handler is to be called relative to other previously registered handlers.

Availability
  Release 4 and later.

Description
  XtInsertEventHandler()  registers  the  procedure  proc  and the data client_data with the Intrinsics event dispatching mechanism.  When an
  event of one of the types set in event_mask occurs on the window of the widget w, proc will be invoked and client_data passed as one of its
  arguments.

  The argument position specifies where in the list of event handlers proc should be inserted.	If it is XtListHead, proc will be inserted at
  the beginning of the list and will be called before all previously registered handlers.  If it is XtListTail, proc will be inserted at  the
  end of the list and will be called after all previously registered handlers.

  If the procedure is already registered with the same client_data, the specified event_mask augments the existing mask, and the procedure is
  repositioned in the list according to position.

  XtInsertEventHandler() is identical to XtAddEventHandler() with the additional position argument.  See XtAddEventHandler() for more  infor-
  mation.

  See XtEventHandler(2) for an explanation of how to write an event handler procedure.

Usage
  Neither applications nor widgets often need to use event handlers.  Using action procedures and translation tables provides a more flexible
  way to respond to input events.

Structures
  The XtListPosition type is as follows.

     typedef enum {
	 XtListHead,
	 XtListTail
     } XtListPosition;

  See XtAddEventHandler() for a list of bits that can be set in the event_mask argument.

See Also
  XtAddEventHandler(1), XtAddRawEventHandler(1), XtInsertRawEventHandler(1), XtRemoveEventHandler(1), XtRemoveRawEventHandler(1).

Xt - Event Handling													    XtInsertEventHandler()

Check Out this Related Man Page

XtAddEventHandler(3Xt)						   XT FUNCTIONS 					    XtAddEventHandler(3Xt)

NAME
XtAddEventHandler, XtAddRawEventHandler, XtRemoveEventHandler, XtRemoveRawEventHandler, XtInsertEventHandler, XtInsertRawEventHandler - add and remove event handlers SYNTAX
void XtAddEventHandler(w, event_mask, nonmaskable, proc, client_data) Widget w; EventMask event_mask; Boolean nonmaskable; XtEventHandler proc; XtPointer client_data; void XtAddRawEventHandler(w, event_mask, nonmaskable, proc, client_data) Widget w; EventMask event_mask; Boolean nonmaskable; XtEventHandler proc; XtPointer client_data; void XtRemoveEventHandler(w, event_mask, nonmaskable, proc, client_data) Widget w; EventMask event_mask; Boolean nonmaskable; XtEventHandler proc; XtPointer client_data; void XtRemoveRawEventHandler(w, event_mask, nonmaskable, proc, client_data) Widget w; EventMask event_mask; Boolean nonmaskable; XtEventHandler proc; XtPointer client_data; void XtInsertEventHandler(w, event_mask, nonmaskable, proc, client_data, position) Widget w; EventMask event_mask; Boolean nonmaskable; XtEventHandler proc; XtPointer client_data; XtListPosition position; void XtInsertRawEventHandler(w, event_mask, nonmaskable, proc, client_data, position) Widget w; EventMask event_mask; Boolean nonmaskable; XtEventHandler proc; XtPointer client_data; XtListPosition position; typedef enum { XtListHead, XtListTail } XtListPosition; ARGUMENTS
client_data Specifies additional data to be passed to the client's event handler. event_mask Specifies the event mask for which to call or unregister this procedure. nonmaskable Specifies a Boolean value that indicates whether this procedure should be called or removed on the nonmaskable events (Graphic- sExpose, NoExpose, SelectionClear, SelectionRequest, SelectionNotify, ClientMessage, and MappingNotify). proc Specifies the procedure that is to be added or removed. w Specifies the widget for which this event handler is being registered. position Specifies when the event handler is to be called relative to other previously registered handlers. DESCRIPTION
The XtAddEventHandler function registers a procedure with the dispatch mechanism that is to be called when an event that matches the mask occurs on the specified widget. If the procedure is already registered with the same client_data, the specified mask is ORed into the existing mask. If the widget is realized, XtAddEventHandler calls XSelectInput, if necessary. The XtAddRawEventHandler function is similar to XtAddEventHandler except that it does not affect the widget's mask and never causes an XSe- lectInput for its events. Note that the widget might already have those mask bits set because of other nonraw event handlers registered on it. The XtRemoveRawEventHandler function stops the specified procedure from receiving the specified events. Because the procedure is a raw event handler, this does not affect the widget's mask and never causes a call on XSelectInput. XtInsertEventHandler is identical to XtAddEventHandler with the additional position argument. if position is XtListHead, the event handler is registered to that it will be called before any event handlers that were previously registered for the same widget. If position is XtListTail, the event handler is registered to be called after any previously registered event handlers. If the procedure is already regis- tered with the same client_data value, the specified mask augments the existing mask and the procedure is repositioned in the list. XtInsertRawEventHandler is similar to XtInsertEventHandler except that it does not modify the widget's event mask and never causes an XSe- lectInput for the specified events. If the procedure is already registered with the same client_data value, the specified mask augments the existing mask and the procedure is repositioned in the list. SEE ALSO
XtAppNextEvent(3Xt), XtBuildEventMask(3Xt) X Toolkit Intrinsics - C Language Interface Xlib - C Language X Interface X Version 11 Release 6.6 XtAddEventHandler(3Xt)
Man Page