We have seen that the Xlib API is a low-level but very efficient library for writing X Window applications.
The X toolkit (or intrinsics) library provides higher-level programming support for writing widgets.
Widgets are object-oriented display objects, like data entry fields, utilities for plotting data, and so on. They are usually written in the C language, but they're object-oriented in the sense that they support inheritance and maintain private data with a public API for accessing internal widget data.
Before an application can use the X toolkit, the following function must be called before any other toolkit functions (the type String is defined as char *, and a Cardinal is an int):