1XtAddEventHandler(3)             XT FUNCTIONS             XtAddEventHandler(3)
2
3
4

NAME

6       XtAddEventHandler, XtAddRawEventHandler, XtRemoveEventHandler,
7       XtRemoveRawEventHandler, XtInsertEventHandler, XtInsertRawEventHandler
8       - add and remove event handlers
9

SYNTAX

11       void XtAddEventHandler(Widget w, EventMask event_mask, Boolean nonmask‐
12              able, XtEventHandler proc, XtPointer client_data);
13
14       void XtAddRawEventHandler(Widget w, EventMask event_mask, Boolean non‐
15              maskable, XtEventHandler proc, XtPointer client_data);
16
17       void XtRemoveEventHandler(Widget w, EventMask event_mask, Boolean non‐
18              maskable, XtEventHandler proc, XtPointer client_data);
19
20       void XtRemoveRawEventHandler(Widget w, EventMask event_mask, Boolean
21              nonmaskable, XtEventHandler proc, XtPointer client_data);
22
23       void XtInsertEventHandler(Widget w, EventMask event_mask, Boolean non‐
24              maskable, XtEventHandler proc, XtPointer client_data, XtListPo‐
25              sition position);
26
27       void XtInsertRawEventHandler(Widget w, EventMask event_mask, Boolean
28              nonmaskable, XtEventHandler proc, XtPointer client_data, XtList‐
29              Position position);
30
31       typedef enum { XtListHead, XtListTail } XtListPosition;
32

ARGUMENTS

34       client_data
35                 Specifies additional data to be passed to the client's event
36                 handler.
37
38       event_mask
39                 Specifies the event mask for which to call or unregister this
40                 procedure.
41
42       nonmaskable
43                 Specifies a Boolean value that indicates whether this proce‐
44                 dure should be called or removed on the nonmaskable events
45                 (GraphicsExpose, NoExpose, SelectionClear, SelectionRequest,
46                 SelectionNotify, ClientMessage, and MappingNotify).
47
48       proc      Specifies the procedure that is to be added or removed.
49
50       w         Specifies the widget for which this event handler is being
51                 registered.
52
53       position  Specifies when the event handler is to be called relative to
54                 other previously registered handlers.
55

DESCRIPTION

57       The XtAddEventHandler function registers a procedure with the dispatch
58       mechanism that is to be called when an event that matches the mask
59       occurs on the specified widget.  If the procedure is already registered
60       with the same client_data, the specified mask is ORed into the existing
61       mask.  If the widget is realized, XtAddEventHandler calls XSelectInput,
62       if necessary.
63
64       The XtAddRawEventHandler function is similar to XtAddEventHandler
65       except that it does not affect the widget's mask and never causes an
66       XSelectInput for its events.  Note that the widget might already have
67       those mask bits set because of other nonraw event handlers registered
68       on it.
69
70       The XtRemoveRawEventHandler function stops the specified procedure from
71       receiving the specified events.  Because the procedure is a raw event
72       handler, this does not affect the widget's mask and never causes a call
73       on XSelectInput.
74
75       XtInsertEventHandler is identical to XtAddEventHandler with the addi‐
76       tional position argument. if position is XtListHead, the event handler
77       is registered to that it will be called before any event handlers that
78       were previously registered for the same widget.  If position is XtList‐
79       Tail, the event handler is registered to be called after any previously
80       registered event handlers. If the procedure is already registered with
81       the same client_data value, the specified mask augments the existing
82       mask and the procedure is repositioned in the list.
83
84       XtInsertRawEventHandler is similar to XtInsertEventHandler except that
85       it does not modify the widget's event mask and never causes an XSelect‐
86       Input for the specified events. If the procedure is already registered
87       with the same client_data value, the specified mask augments the exist‐
88       ing mask and the procedure is repositioned in the list.
89

SEE ALSO

91       XtAppNextEvent(3), XtBuildEventMask(3)
92       X Toolkit Intrinsics - C Language Interface
93       Xlib - C Language X Interface
94
95
96
97X Version 11                      libXt 1.1.5             XtAddEventHandler(3)
Impressum