XtInsertEventTypeHandler, XtRemoveEventTypeHandler, XtRegisterExtensionSelector, XtSetEventDispatcher, XtDispatchEventToWidget − extension event handling


void XtInsertEventTypeHandler(Widget widget, int event_type, XtPointer select_data, XtEventHandler proc, XtPointer client_data, XtListPosition position);

void XtRemoveEventTypeHandler(Widget widget, int event_type, XtPointer select_data, XtEventHandler proc, XtPointer client_data);

void XtRegisterExtensionSelector(Display* display, int min_event_type, int max_event_type, XtExtensionSelectProc proc, XtPointer client_data);

XtEventDispatchProc XtSetEventDispatcher(Widget widget, int event_type, XtEventDispatchProc proc);

Boolean XtDispatchEventToWidget(Widget widget, XEvent* event);



Specifies the widget for this event handler. Must be of class Core or any subclass thereof.


Specifies the event type.


Specifies data used to select or deselect events from the server.


Specifies the proc.


Specifies additional data to be passed to the event handler.


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


Specifies the display.

min_event_type, max_event_type

Specifies the range of event types for this extension.


Specifies a pointer to the event to be dispatched.


The XtInsertEventTypeHandler function registers a procedure with the dispatch mechanism that is to be called when an event that matches the specified event_type is dispatched to the specified widget.

If event_type is one of the core X protocol events then select_data must be a pointer to a value of type EventMask, indicating the event mask to be used to select for the desired event. This event mask will be included in the value returned by XtBuildEventMask. If the widget is realized XtInsertEventTypeHandler calls XSelectInput if necessary. Specifying NULL for select_data is equivalent to specifying a pointer to an event mask containing 0. This is similar to the XtInsertRawEventHandler function.

If event_type specifies an extension event type then the semantics of the data pointed to by select_data are defined by the extension selector registered for the specified event type.

In either case the Intrinsics are not required to copy the data pointed to by select_data, so the caller must ensure that it remains valid as long as the event handler remains registered with this value of select_data.

The position argument allows the client to control the order of the invocation of event handlers registered for the same event type. If the client does not care about the order, it should normally specify XtListTail, which registers this event handler after any previously registered handlers for this event type.

The XtRemoveEventTypeHandler function unregisters an even handler registered with XtInsertEventTypeHandler for the specified event type. The request is ignored if client_data does not match the value given with the handler was registered.

If event_type specifies on of the core X protocol events, select_data must be a pointer to a value of type EventMask, indicating the mask to be used to deselect for the appropriate event. If the widget is realized, XtRemoveEventTypeHandler calls XSelectInput if necessary. Specifying NULL for select_data is equivalent to specifying a pointer to an event mask containing 0. This is similar to the XtRemoveRawEventHandler function.

If event_type specifies an extension event type then the semantics of the data pointed to by select_data are defined by the extension selector registered for the specified event type.

The XtRegisterExtensionSelector function registers a procedure to arrange for the delivery of extension events to widgets.

If min_event_type and max_event_type match the parameters to a previous call to XtRegisterExtensionSelector for the same display, the proc and client_data replace the previously registered values. If the range specified by min_event_type and max_event_type overlaps the range of the parameters to a previous call for the same display in any other way, an error results.

The XtSetEventDispatcher function registers the event dispatcher procedure specified by proc for events with the type event_type. The previously registered dispatcher (or the default dispatcher if there was no previously registered dispatcher) is returned. If proc is NULL, the default procedure is restored for the specified type.

In the future, when XtDispatchEvent is called with an event of event_type, the specified proc (or the default dispatcher) will be invoked to determine a widget ot which to dispatch the event.

The XtDispatchEventToWidget function scans the list of registered event handlers for the specified widget and calls each handler that has been registered for the specified event type, subject to the continue_to_dispatch value returned by each handler. The Intrinsics behave as if event handlers were registered at the head of the list for Expose, NoExpose, GraphicsExpose, and VisibilityNotify events to invoke the widget’s expose procedure according to the exposure compression rules and to update the widget’s visible field if visible_interest is True. These internal event handlers never set continue_to_dispatch to False.

XtDispatchEventToWidget returns True if any event handler was called and False otherwise.


X Toolkit Intrinsics − C Language Interface
Xlib − C Language X Interface

More Linux Commands

git-check-mailmap(1) Show canonical names and email addresse
For each Name <user@host> or <user@host> from the command-line or standard input (when using --stdin), look up the persons canonical name and email address (see

intro(7) - Introduction to overview, conventions, and miscel
Section 7 of the manual provides overviews on various topics, and describes conventions and protocols, character set standards, the standard filesystem layout,

profil(3) - execution time profile - Linux manual page......
This routine provides a means to find out in what areas your program spends most of its time. The argument buf points to bufsiz bytes of core. Every virtual 10

sasl_auxprop(3) - How to work with SASL auxiliary properties
SASL auxiliary properties are used to obtain properties from external sources during the authentication process. For example, a mechanism might need to query an

arp(7) - Linux ARP kernel module. - Linux manual page.......
This kernel protocol module implements the Address Resolution Protocol defined in RFC 826. It is used to convert between Layer2 hardware addresses and IPv4 prot

pam-config(8) - Adjust common PAM config files (Man Page)...
pam-config adjusts predefined PAM config files. OPTIONS COMMON OPTIONS --debug Print debug messages. -f, --force The new configuration will be activated regardl

getch.3ncurses - getch(3ncurses) - get (or push back) characters from curses
The getch, wgetch, mvgetch and mvwgetch, routines read a character from the window. In no-delay mode, if no input is waiting, the value ERR is returned. In dela

XStoreColor(3) - set colors (Library - Linux man page)......
The XStoreColors function changes the colormap entries of the pixel values specified in the pixel members of the XColor structures. You specify which color comp

Getopt::Std(3pm) - Process single-character switches with sw
The getopt() function processes single-character switches with switch clustering. Pass one argument which is a string containing all switches that take an argum

y0(3) - Bessel functions of the second kind - Linux man page
The y0() and y1() functions return Bessel functions of x of the second kind of orders 0 and 1, respectively. The yn() function returns the Bessel function of x

baudrate_sp(3ncurses) - curses screen-pointer extension.....
This implementation can be configured to provide a set of functions which improve the ability to manage multiple screens. This feature can be added to any of th

XmbufGetScreenInfo(3) - X multibuffering functions (ManPage)
The application programming library for the X11 Double-Buffering, Multi-Buffering, and Stereo Extension contains the interfaces described below. With the except

We can't live, work or learn in freedom unless the software we use is free.