Home > Articles > Operating Systems, Server > Linux/UNIX/Open Source

  • Print
  • + Share This
From the author of

X Window System Components

Multiple layers comprise the X Window system development environment. These layers include X library (Xlib), X Toolkit Intrinsics (Xt), and a widget set.

The next few sections introduce each layer and demonstrate their relationship to X Window application development.

The X Library

The X Library (Xlib) forms the lowest layer of X. This utility is responsible for translating the programmer's requests, which are generated by invoking the functions provided by the library, into the X byte-stream protocol that communicates with the X Server.

Functions from the X Library begin with the letter "X" and are followed by a capitalized first letter of the function name. (All layers of X follow the convention of capitalizing the first letter of each word that forms the function name, as in XSendEvent or XDrawLine).

All functions provided by the Xlib layer for X Window development are invoked relative to a window contained in the application.

A higher-level library is provided for development through a toolkit that is part of the standard release of X.

The X Toolkit Intrinsics

The Intrinsics layer of X Window development rests on top of Xlib. Although this layer does not entirely eliminate the need for invoking the lower-level X Library functions, it certainly minimizes it. As implied by the name, Intrinsics is a toolkit that is meant to facilitate the X Window programmer.

Functions provided by the Intrinsics layer of X development begin with the letters "Xt," and all functions provided by this layer are invoked relative to a widget.

Widget Sets

A widget set is a collection of graphical user interface components that have a common look and feel. Two common widget sets that are employed by X Window programmers are the Athena and the Motif widget sets.

Athena is generally released with the X Window system and follows the same licensing agreement as X. Motif, however, is a proprietary widget set that was commercially developed by the Open Software Foundation.

Although convenience functions are generally provided by a widget set, the primary purpose of such a set is to assemble interface components in order to create an application's GUI.

Combining all three of the X Window system components (described previously), produces the xevnts application that is introduced in the following section.

  • + Share This
  • 🔖 Save To Your Account