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       #include <X11/Intrinsic.h>
12
13       void XtInsertEventTypeHandler(Widget widget, int event_type, XtPointer
14              select_data, XtEventHandler proc, XtPointer client_data, XtList‐
15              Position position);
16
17       void XtRemoveEventTypeHandler(Widget widget, int event_type, XtPointer
18              select_data, XtEventHandler proc, XtPointer client_data);
19
20       void XtRegisterExtensionSelector(Display* display, int min_event_type,
21              int max_event_type, XtExtensionSelectProc proc, XtPointer
22              client_data);
23
24       XtEventDispatchProc XtSetEventDispatcher(Display* display, int
25              event_type, XtEventDispatchProc proc);
26
27       Boolean XtDispatchEventToWidget(Widget widget, XEvent* event);
28

ARGUMENTS

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

DESCRIPTION

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

SEE ALSO

136       XtGetKeyboardFocusWidget(3)
137       X Toolkit Intrinsics - C Language Interface
138       Xlib - C Language X Interface
139
140
141
142X Version 11                      libXt 1.2.1      XtInsertEventTypeHandler(3)
Impressum