Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

openwin(1)

xnews(1)

cmap_compact(1)  —  USER COMMANDS

NAME

cmap_compact − Colormap configuration to reduce colormap flashing. 

SYNOPSIS

cmap_compact [ op ] [ −display dpyname ]

DESCRIPTION

cmap_compact is a utility which allows certain colors to be designated as special and to be promoted to the high end of the default colormap (toward pixel 255).  This reduces colormap flashing in many situations.  This technique has no effect for monochrome screens; it applies only to color screens.

OPTIONS

-display dpyname
Indicates the X11 display to use.  ’:0’ is the default.

op can be one of the following operations:

save Records the RGB color values of all shareable (read-only) colors in the default colormap for each active screen and saves these values on the file ~/.owcolors.  The black and white pixels (typically at pixels 254 and 255) are ignored during the save. Note: all colors are ignored for screens with a StaticColor default colormap. Note: the server is grabbed during the save.

init Reads the colors which have been saved in ~/.owcolors and allocates them as read-only colors at the high-end of the default colormap.  The color allocations for those applications which use these colors will be derived from these high colors.  If there is no ~/.owcolors file, nothing happens and no message is printed out.  The colors are allocated in reverse order of the order in which they were saved.  Thus, the lowest pixel in the colormap at save time becomes the highest pixel at initialization time. This operation is typically invoked from ~/.xinitrc prior to starting the color applications.  This operation creates on the root window of each screen a property named XA_COMPACTED_COLORS_COUNT of type XA_INTEGER.  The value of this property specifies the number of initialized colors for that screen.  Note: this value also includes the black and white pixels.  An X11 close down mode of RetainPermanent is set so that the colors this program allocates will stay around after cmap_compact exits.  These colors may be freed by calling cmap_compact dealloc.  Before this program allocates its colors, it frees any colors left over from a previous invocation.  If there are more saved colors than can fit in the default colormap, as many colors as will fit are allocated and a warning message is printed out.   This situation, for example, might occur if the the default visual were switched from an 8-bit to a 4-bit visual without discarding saved colors. Note: no allocations occur for screens with a StaticColor default colormap. Note: The server is grabbed during the initialization.

discard
This operation removes the file ~/.owcolors. 

dealloc
This operation frees colors allocated by a previous invocation of cmap_compact init. 

show This operation prints out the RGB values of the saved colors for each screen. 

NeWSinit
Invoked by xnews when it is being initialized to get a list of the saved colors in PostScript form.   The user should never use this option; it is reserved for use by the system only. 

EFFECT ON THE X11/NEWS SERVER

The xnews(1) server also reads the file ~/.owcolors to determine the amount that it should shift down the NeWS color cube in the StaticColor colormap (this is called the cube offset).  Because there is only a single StaticColor colormap in the server, a decision must be made about how to handle different numbers of saved workspace colors on different screens.  The server currently takes the simplest approach: the cube offset is the number of saved colors for the screen with the largest number of colors. The cube offset does not include the black and white pixels because these pixels are not shifted down with the rest of the cube; these pixels stay at the high end of the StaticColor colormap. No matter what the value of the cube offset, the base pixel of the cube is always greater or equal to 0. In addition to shifting the StaticColor color cube downward (toward 0) to avoid flashing with the saved colors, the black and white pixels which are allocated in the default colormap are moved to the high end of the default colormap (toward 255).

FILES

~/.owcolors
The file which is generated by cmap_compact save.  Contains a list of saved, read-only workspace colors for all screens. 

SEE ALSO

openwin(1), xnews(1), OpenWindows Programmer’s Guide. 

BUGS

Currently does not support using the same ~/.owcolors file for different machine architectures. 

Sun Release 4.1  —  Last change: 10 May 1991

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026