https://invisible-island.net/xterm/xtoolkit/
XtBuildEventMask - retrieve a widget's event mask
#include <X11/Intrinsic.h> EventMask XtBuildEventMask(Widget w);
w Specifies the widget.
The XtBuildEventMask function returns the event mask representing the logical OR of all event masks for event handlers registered on the wid- get with XtAddEventHandler and all event translations, including accel- erators, installed on the widget. This is the same event mask stored into the XSetWindowAttributes structure by XtRealizeWidget and sent to the server when event handlers and translations are installed or removed on the realized widget.
XtAddEventHandler(3) X Toolkit Intrinsics – C Language Interface Xlib - C Language X Interface X Version 11 libXt 1.1.5.2 XtBuildEventMask(3)