Version: $Revision: 1.1 $
Date: $Date: 2001/10/19 03:57:18 $
The backend is basically an implementation of the routines in the AppKit header NSGraphicsContext.h, functions in NSGraphics.h, Font management (gui/Headers/gnustep/gui/GSFontInfo.h), and a few other miscellanoues things.
The graphics routines are modeled after PostScript, so a little understanding of PostScript would be good, although most PostScript functions have obvious meanings (i.e. PSmoveto).
The following files implement the important parts of the backend. Although there maybe other files that support these, these are a function of the implementation and may change for different backends. This particular documentation describes the XGPS of the backend, which uses X11 for window management and Xlib routines for drawing graphics. Other backends may be simpler or more complicated but they should have the same basic structure.
Implements a subclass of NSGraphicContext called XGContext. Initializes the graphics system and does some basic implementation of PostScript functions (although it passes off most of the work to XGGState.m) of NSGraphicContext.
Implements the XGGState class. Does most of the graphics work. a 'gstate' is an encapsulation of the current graphics information, such as current drawing color, line width, clipping rectangles, etc.
A category of XGContext. Implements the basic window creation routines of NSGraphicContext, plus other things such as cursors, mouse.
A category of XGContext. Implements event handling routines of NSGraphicContext.
Implments the GSBackend class, which is a subclass of XGContext, but is the only backend class known to the frontend. The separation between XGContext and GSBackend is historical. There is no reason that the XGContext class couldn't be called GSBackend. Also implements miscellanous functions in NSGraphics that require special backend support.
Font management stuff, XGFont actually implements the backend part of GSFontInfo.
Implements the XGFontEnumerator class which does font management. XGFontEnumerator actually implements the backend part of GSFontEnumerator.