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

NAME

6       XtInsertEventTypeHandler, XtRemoveEventTypeHandler, XtRegisterExten‐
7       sionSelector, XtSetEventDispatcher, XtDispatchEventToWidget - extension
8       event handling
9

SYNTAX

11       void XtInsertEventTypeHandler(Widget widget, int event_type, XtPointer
12              select_data, XtEventHandler proc, XtPointer client_data, XtList‐
13              Position position);
14
15       void XtRemoveEventTypeHandler(Widget widget, int event_type, XtPointer
16              select_data, XtEventHandler proc, XtPointer client_data);
17
18       void XtRegisterExtensionSelector(Display* display, int min_event_type,
19              int max_event_type, XtExtensionSelectProc proc, XtPointer
20              client_data);
21
22       XtEventDispatchProc XtSetEventDispatcher(Widget widget, int event_type,
23              XtEventDispatchProc proc);
24
25       Boolean XtDispatchEventToWidget(Widget widget, XEvent* event);
26

ARGUMENTS

28       widget    Specifies the widget for this event handler.  Must be of
29                 class Core or any subclass thereof.
30
31       event_type
32                 Specifies the event type.
33
34       select_data
35                 Specifies data used to select or deselect events from the
36                 server.
37
38       proc      Specifies the proc.
39
40       client_data
41                 Specifies additional data to be passed to the event handler.
42
43       position  Specifies when the event handler is to be called relative to
44                 other previously registered handlers.
45
46       display   Specifies the display.
47
48       min_event_type, max_event_type
49                 Specifies the range of event types for this extension.
50
51       event     Specifies a pointer to the event to be dispatched.
52

DESCRIPTION

54       The XtInsertEventTypeHandler function registers a procedure with the
55       dispatch mechanism that is to be called when an event that matches the
56       specified event_type is dispatched to the specified widget.
57
58       If event_type is one of the core X protocol events then select_data
59       must be a pointer to a value of type EventMask, indicating the event
60       mask to be used to select for the desired event.  This event mask will
61       be included in the value returned by XtBuildEventMask.  If the widget
62       is realized XtInsertEventTypeHandler calls XSelectInput if necessary.
63       Specifying NULL for select_data is equivalent to specifying a pointer
64       to an event mask containing 0. This is similar to the XtInsertRawEven‐
65       tHandler function.
66
67       If event_type specifies an extension event type then the semantics of
68       the data pointed to by select_data are defined by the extension selec‐
69       tor registered for the specified event type.
70
71       In either case the Intrinsics are not required to copy the data pointed
72       to by select_data, so the caller must ensure that it remains valid as
73       long as the event handler remains registered with this value of
74       select_data.
75
76       The position argument allows the client to control the order of the
77       invocation of event handlers registered for the same event type. If the
78       client does not care about the order, it should normally specify
79       XtListTail, which registers this event handler after any previously
80       registered handlers for this event type.
81
82       The XtRemoveEventTypeHandler function unregisters an even handler reg‐
83       istered with XtInsertEventTypeHandler for the specified event type. The
84       request is ignored if client_data does not match the value given with
85       the handler was registered.
86
87       If event_type specifies on of the core X protocol events, select_data
88       must be a pointer to a value of type EventMask, indicating the mask to
89       be used to deselect for the appropriate event.  If the widget is real‐
90       ized, XtRemoveEventTypeHandler calls XSelectInput if necessary. Speci‐
91       fying NULL for select_data is equivalent to specifying a pointer to an
92       event mask containing 0. This is similar to the XtRemoveRawEventHandler
93       function.
94
95       If event_type specifies an extension event type then the semantics of
96       the data pointed to by select_data are defined by the extension selec‐
97       tor registered for the specified event type.
98
99       The XtRegisterExtensionSelector function registers a procedure to
100       arrange for the delivery of extension events to widgets.
101
102       If min_event_type and max_event_type match the parameters to a previous
103       call to XtRegisterExtensionSelector for the same display, the proc and
104       client_data replace the previously registered values. If the range
105       specified by min_event_type and max_event_type overlaps the range of
106       the parameters to a previous call for the same display in any other
107       way, an error results.
108
109       The XtSetEventDispatcher function registers the event dispatcher proce‐
110       dure specified by proc for events with the type event_type. The previ‐
111       ously registered dispatcher (or the default dispatcher if there was no
112       previously registered dispatcher) is returned. If proc is NULL, the
113       default procedure is restored for the specified type.
114
115       In the future, when XtDispatchEvent is called with an event of
116       event_type, the specified proc (or the default dispatcher) will be
117       invoked to determine a widget ot which to dispatch the event.
118
119       The XtDispatchEventToWidget function scans the list of registered event
120       handlers for the specified widget and calls each handler that has been
121       registered for the specified event type, subject to the con‐
122       tinue_to_dispatch value returned by each handler. The Intrinsics behave
123       as if event handlers were registered at the head of the list for
124       Expose, NoExpose, GraphicsExpose, and VisibilityNotify events to invoke
125       the widget's expose procedure according to the exposure compression
126       rules and to update the widget's visible field if visible_interest is
127       True.  These internal event handlers never set continue_to_dispatch to
128       False.
129
130       XtDispatchEventToWidget returns True if any event handler was called
131       and False otherwise.
132

SEE ALSO

134       XtGetKeyboardFocusWidget(3)
135       X Toolkit Intrinsics - C Language Interface
136       Xlib - C Language X Interface
137
138
139
140X Version 11                      libXt 1.1.5      XtInsertEventTypeHandler(3)
Impressum