https://invisible-island.net/xterm/xtoolkit/
XtDisplay, XtDisplayOfObject, XtScreen, XtScreenOfObject, XtWindow, XtWindowOfObject - obtain window information about a widget
#include <X11/Intrinsic.h> Display *XtDisplay(Widget w); Display *XtDisplayOfObject(Widget object); Screen *XtScreen(Widget w); Screen *XtScreenOfObject(Widget object); Window XtWindow(Widget w); Window XtWindowOfObject(Widget object);
w Specifies the widget. object Specifies the widget.
XtDisplay returns the display pointer for the specified widget. XtDisplayOfObject returns the display pointer for the specified object. XtScreen returns the screen pointer for the specified widget. XtScreenOfObject returns the screen pointer for the specified object. XtWindow returns the window of the specified widget. XtWindowOfObject returns the window of the specified object.
X Toolkit Intrinsics – C Language Interface Xlib - C Language X Interface X Version 11 libXt 1.1.5.2 XtDisplay(3)