https://invisible-island.net/xterm/xtoolkit/
XtCreateApplicationContext, XtDestroyApplicationContext, XtWidgetTo- ApplicationContext, XtToolkitInitialize - create, destroy, and obtain an application context
#include <X11/Intrinsic.h> XtAppContext XtCreateApplicationContext(void); void XtDestroyApplicationContext(XtAppContext app_context); XtAppContext XtWidgetToApplicationContext(Widget w); void XtToolkitInitialize(void);
app_context Specifies the application context. w Specifies the widget that you want the application context for.
The XtCreateApplicationContext function returns an application context, which is an opaque type. Every application must have at least one ap- plication context. The XtDestroyApplicationContext function destroys the specified appli- cation context as soon as it is safe to do so. If called from with an event dispatch (for example, a callback procedure), XtDestroy- ApplicationContext does not destroy the application context until the dispatch is complete. The XtWidgetToApplicationContext function returns the application con- text for the specified widget. The XtToolkitInitialize function initializes the Intrinsics internals. If XtToolkitInitialize was previously called it returns immediately.
XtDisplayInitialize(3) X Toolkit Intrinsics - C Language Interface Xlib - C Language X Interface X Version 11 libXt 1.3.1 XtCreateApplicationContext(3)