The graphical user interface (GUI) of cadiz comprises up to three windows, each displaying formatted text. Within cadiz, struct window in src/include/user.h provides operations on a particular window.
Each window is implemented as two separate processes: a formatting process responsible for preparing text to display in the window, and a window process responsible for the display. The case of two windows implemented by four processes can be seen on this illustration (along with some other processes).
Communication with a formatting process is performed using the operations declared (buried within) in src/include/page.h. Communication with a window process is performed using the operations declared in src/include/window.h. The operations in src/include/user.h are implemented in terms of these two lower level interfaces.
The aim here is to expain the two lower-level interfaces, so that alternative implementations of the formatter and window processes might be produced. When working on the functionality within cadiz, the higher-level interface should be used.
The interface between cadiz and a formatting process uses messages in which formal text is passed as troff instructions.
The interface between cadiz and a window process uses messages in which formulae are identified by their positions in files.
[Am thinking of revising this so that the communication with troff is moved out of cadiz and into the formatting process, so that the formatting process can choose whether to communicate with troff or some alternative. The communication between cadiz and the formatting process would use sequences of UCS characters, with additional UCS characters from the private use area inserted to delimit well-formed formulae and to indicate where lines can be broken and whether space or indentation would be appropriate.]