EnklX started as a project for a programming course. I wanted to program X-windows, and thought Xlib would be a suitable level to start at. I soon realized that Xlib was not really suited for application programming, and decided to make yet another toolkit. Since it's prime goal was to make it simple to program X-windows, I named it enklX (simplX in english). The first version worked, but it forced every program that used it to #include <X11/Xlib.h>, a rather large file, which ment slow compilation (on our machines). So I decided to reorganize enklX so that only a few base classes would have to know about X. And that's what I'm doing now.
EnklX contains the following major classes:
Screen is the interface to enklX seen by all programs using it. The acctual work is done by the x_screen class. X_screen handles the connection to the X-server, and various resources like pixmaps, bitmaps, fonts, colors, gcs etc. It also makes sure the events arrive at the right window. Drawable encapsulates most of the drawing primitives. X_window encapsulates events and window-creation.
The idea is that more complicated windows (I suppose you could call 'em widgets if you wanted) should be built ontop of x_window. They should only have to include files from enklX. They would however have to follow the event-driven programming model, and redraw themself when they get an expose event.
In the future I intend to make another level of abstraction using classes inhereting x_window, where you don't have to think about stuff like redrawing at expose-events. But that is far in the future.
Basic_window is a x_window that gives public access to all drawing primitives. It can also redraw the widnow when an expose event arrives. It's intended for fast hacks, and is the only higer level window that has been finished. A program called enklX_server gives access to the capabilities of basic_window from the command-line, thereby making it possible to make even worse hacks.