Next: , Previous: , Up: Screens   [Contents][Index]


4.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 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:

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:

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 Colormaps and Colors).


Next: , Previous: , Up: Screens   [Contents][Index]