Programming guideline of WinDom
WinDom supports an automatic color palette handling. Each window has
its own palette. When a window is topped, EvntWindom() applies to the
screen the window specific palette located in the field
win->graf.palette. It is a table containing groups of 3 words the
number of which depends on the screen résolution. It can be 2,
4, 16 or 256. For other resolutions (i.e. when the global variable
app.nplane contains a value higher than 8), VDI doesnot use a color
palette and the WinDom disable its color palette handling. It is the
case with 16-plane, 24-plane and 32-plane resolution.
A window palette can be NULL. In this case, EvntWindom() uses the
application desktop palette, located in the field app.palette. If any
window belonging to another application is topped, EvntWindom()
applies the desktop palette. The ApplInit() initialises the desktop
palette using the current palette when the application is launched.