console-stream.c console-stream.h console-tty.c console-tty.h console-x.c console-x.h console.c console.h
These modules implement the console Lisp object type. A console contains multiple display devices, but only one keyboard and mouse. Most of the time, a console will contain exactly one device.
Consoles are the top of a lisp object inclusion hierarchy. Consoles contain devices, which contain frames, which contain windows.
device-msw.c device-tty.c device-x.c device.c device.h
These modules implement the device Lisp object type. This abstracts a particular screen or connection on which frames are displayed. As with Lisp objects, event interfaces, and other subsystems, the device code is separated into a generic component that contains a standardized interface (in the form of a set of methods) onto particular device types.
The device subsystem defines all the methods and provides method services for not only device operations but also for the frame, window, menubar, scrollbar, toolbar, and other displayable-object subsystems. The reason for this is that all of these subsystems have the same subtypes (X, TTY, NeXTstep, Microsoft Windows, etc.) as devices do.
frame-msw.c frame-tty.c frame-x.c frame.c frame.h
Each device contains one or more frames in which objects (e.g. text) are displayed. A frame corresponds to a window in the window system; usually this is a top-level window but it could potentially be one of a number of overlapping child windows within a top-level window, using the MDI (Multiple Document Interface) protocol in Microsoft Windows or a similar scheme.
The frame-* files implement the frame Lisp object type and provide the generic and device-type-specific operations on frames (e.g. raising, lowering, resizing, moving, etc.).
Each frame consists of one or more non-overlapping windows (better known as panes in standard window-system terminology) in which a buffer’s text can be displayed. Windows can also have scrollbars displayed around their edges.
window.c and window.h implement the window Lisp object type and provide code to manage windows. Since windows have no associated resources in the window system (the window system knows only about the frame; no child windows or anything are used for SXEmacs windows), there is no device-type-specific code here; all of that code is part of the redisplay mechanism or the code for particular object types such as scrollbars.