Next Prev Up

# 3.1 Screens and Visuals

An X display supports graphical output to one or more screens. Each screen has its own root window and window hierarchy. Each window belongs to exactly one screen and cannot simultaneously appear on another screen.

The kinds of graphics hardware used by X screens can vary greatly in their support for color and in their methods for accessing raster memory. X uses the concept of a visual type (usually referred to simply as a visual) which uniquely identifies the hardware capabilities of a display screen. Fundamentally, a visual is represented by a card29 integer ID, which uniquely identifies the visual type relative to a single display. CLX also represents a visual with a visual-info structure that contains other attributes associated with a visual (see paragraph 1.6, Data Types). A screen can support more than one depth (that is, pixel size), and for each supported depth, a screen may support more than one visual. However, it is more typical for a screen to have only a single depth and a single visual type.

A visual represents various aspects of the screen hardware, as follows:

- A screen can be color or gray-scale.
- A screen can have a colormap that is either writable or read-only.
- A screen can have a single colormap or separate colormaps for each of the red, green, and blue components. With separate colormaps, a pixel value is decomposed into three parts to determine indexes into each of the red, green, and blue colormaps.

CLX supports the following classes of visual types: :direct-color , :gray-scale, :pseudo-color, :static-color, :static-gray, and :true-color. The following tables show how the characteristics of a screen determine the class of its visual type.

For screens with a single colormap:

| Color | Gray-Scale
Read-only | :static-color | :static-gray
Writable | :pseudo-color | :gray-scale

For screens with red, green, and blue colormaps:

Read-only | :true-color
Writable | :direct-color | :gray-scale

The visual class also indicates how screen colormaps are handled. See paragraph 9.1, Colormaps and Colors.

Next Prev Up

© 1988, 1989 Texas Instruments Incorporated
Conversion to HTML made by Gilbert Baumann.
Last build: Tue Dec 16 23:30:42 1997