To: Overview of X, Programming X, Window Managers, Fonts, Download X


Ring of Brodgar

Programming X APIs

There's a huge number of programming APIs and libraries for X. Normally, you choose the API that most fits your needs. Some are free and some are commerically-supported products you have to pay for. In most cases, you'll need APIs from more than one library to make a complete application. For example, most Motif programs use the Motif, Xt and Xlib APIs.

The next sections cover most of the available APIs. Most are C or C++ libraries, unless otherwise noted.

X Library
The lowest-level X library is a lot like Win32. It provides all the basic drawing and windowing functions, but is a bit ungainly because it sits at such a low level. Even so, just about every serious X application needs to use Xlib routines because no toolkit does everything. You can find out more in books such as:

Advanced X Window Applications Programming
X Window Applications Programming

X Toolkit Intrinsics
The X Toolkit Intrinsics, or Xt for short, provides a sort of C language object-oriented API on top of the low-level Xlib. Xt introduces the concept of a widget, encapsulating user interface elements such as menus, pushbuttons and scrollbars. Even so, Xt provides no look and feel. This is left for even higher-level libraries.

Xt-Based Toolkits

The main X toolkits like Motif are based on the Xt Intrinsics.

Motif
The main programming API for X applications, Motif uses the concepts of the Xt widget layer and provides a particular look and feel that is a lot like the look of Windows 95. Many books are available on Motif, including Power Programming Motif.

LessTif
A freeware version of Motif, still in development.

Athena Widgets
A very ugly, but free, Xt-based widget set that comes with X (although the Athena widgets are now migrating to being unsupported code). Also called Xaw after the library name, libXaw.a.

Xaw 3D
A 3D look and feel add-on for the Athena widget set. It is source code compatible with Xaw, the Athena widget set.

Xaw95
A library that upgrades Xaw3d to have the look of Windows 95. Mostly for Linux.

netXtaw
A library that upgrades Xaw3d to the look of NeXTStep/OpenStep. If you like this look, there's also TkSTEP, an extension to Tcl/Tk that provides the NeXTStep look. And, wait, there's more. The AfterStep window manager supports the NeXTStep look.

OLIT
For a long time, the Unix market was burdened with a stupid war over look and feel standards. The OLIT library is a lot like Motif in that it sits over the Xt Intrinsics. OLIT, though, provides an Open Look-style look and feel, rather than a Motif/Windows look. That war has now thankfully ended with Sun Microsystem adopting Motif.

XView
Designed originally to help SunView programmers migrate to X, the XView library also presents an Open Look interface, but it does not use any of the X Toolkit Intrinsics layer. Because XView is freeware, it remains popular, especially on Linux.

Java
Java's AWT toolkit (Abstract Window Toolkit) allows you to write GUI programs on any Java-supported platform. On Unix, AWT is implemented using Motif, although you don't need to know Motif to program Java AWT applications.

Tcl and Tk
Tcl is a free scripting language that allows you to quickly build X applications without a lot of hassle.

Perl/Tk
A Tk implementation for Perl.

InterViews
One of the first C++ toolkits for X, InterViews has now been replaced by Fresco.

ivtools
An alternative augmented version of InterViews, ivtools contains a number of new C++ classes.

Fresco
Designed as a follow-on to InterViews, Fresco provides a C++ toolkit and the ability to distribute objects over the network, using a CORBA object broker. Lately, there seems to be more activity on Fresco including work on a Fresco98.

XForms
An easy-to-use simple library for creating user interface applications. XForms sacrifices some flexibility for simplicity but makes X applications very easy to create. Free for non-commercial, non-profit use.

XClass '95
A C++ class library for UNIX/X that supports a Windows 95 look.

Xclasses
Billed as the X11 layout library, most of the documentation for this C++ library is in German.

FL
FL is a C++ library that appears somewhat like XForms. FL is intended for easy mixing with OpenGL and 3D graphics.

EZ Widgets
It's hard to classify this toolkit. EZWGL aims at allowing programmers to easily create GUI programs, EZWGL also contains a graphics librray for integration with OpenGL or Mesa.

Qt
Pronounced "cute", Qt is a C++ toolkit free for non-commercial use that costs for commercial use, with a confusing set of licenses. There's also a PerlQt.

KDE, or K Desktop Environment
An attempt to create something like the Common Desktop Environment on Linux using C++ and the Qt toolkit. KDE includes a window manager and a suite of applications.

GTK: GIMP Toolkit
Used to build a cool image processing application called GIMP, GTK is a C-based pseudo object-oriented toolkit that provides a Motif-like look and feeel. Also called General Toolkit instead of GIMP.

GNOME
A toolkit and set of applications built on top of GTK.

TOAD
An LGPL'd C++ toolkit. Provides a simple programming interface and supports OpenGL.

Linux Interface Project
A free C++ widget set for Linux in development. The link, http://blank.pages.de/lip/, has been bad for some time. link has been bad. Does anyone know of a better link?

Cross-Platform Toolkits
These toolkits run on a variety of operating systems, including Windows. There's also a list of cross-platform APIs.

wxWindows
A free cross-platform C++ toolkit. This library requires either Motif, XView or Win32. That's right, your wxWindows applications can run on Unix and Windows (with a recompile).

V
A portable C++ GUI framework library that runs on Windows and Unix.

MGUI (MORELLO Graphic User Interface)
A C cross-platform API from Italy.

Wind/U
Bristol's Wind/U offers the Microsoft Foundation Classes, or MFC, on Unix.

zApp
A commercial toolkit from Rogue Wave.

3D APIs

PEX
PEX is the official 3D API for X. It exists as an extension to the basic X protocol. in the past few years, PEX has lost a lot of ground to OpenGL.

OpenGL
A proprietary 3D API from Silicon Graphics, built as a follow-on to SGI's old GL library. OpenGL seems to have a lot more momentum behind it than PEX, its main competitor. one of the reasons is that Microsoft licensed OpenGL for use in Windows NT.

Mesa
A freely-distributable OpenGL-compatible library.

Utility APIs

Xpm
A library for color X image files, stored as snippets of C code.

XbaeMatrix
Two widgets for Motif programmers from Bellcore. XbaeMatrix acts like a spreadsheet widget and XbaeCaption connects a label to another widget.

MIT Shared Memory Extension
The MIT-SHM extension allows you to use Unix shared memory to hold images, improving performance because you don't have to transfer the images from your application's address space to the X server's address space.

Syd Logan's XIE Examples
Covers the X Image Extension.

Double-Buffering Extension
This paper from HP explains this extension that helps with real-time rotation, animation and updating. HP has a number of papers on X at http://www.hp.com/xwindow/main.html


All book covers are used with permission of the publisher.
Copyright ©1998-1999 Eric Foster-Johnson.


Home | Linux | Tcl | Perl | Motif | Computer User | Japanese | My Books | Contact Me

Last updated: August 30 1999