Solaris X Window System Developer's Guide

Notes on X11 Programming

Common X11 programming issues are discussed in the following sections.

Compose Key Support

The OpenWindows version of Xlib supports Compose Key processing through calls to XLookupString.


x86 only –

On IA keyboards, use the Control-Shift-F1 key sequence for the Compose Key functionality.


NumLock Key Support

The OpenWindows version of Xlib supports NumLock Key processing through calls to XLookupString. This change does not affect the NumLock processing that exists in XView, OLIT, Motif, or X applications.


x86 only –

On IA keyboards, the NumLock Key resides in the top line of the keypad section of the keyboard.


Color Name Database

The color name database provides a mapping between ASCII color names and RGB color values. This mapping increases the portability of color programs and eases programming. Note that this mapping is subjective and has no objective scientific basis.

The source of the database is /usr/openwin/lib/X11/rgb.txt. This file is identical to the one provided in X11R6 from the X Consortium. rgb.txt is compiled into the dbm(3) database files, rgb.dir and rgb.pag. When the server starts up, it builds an internal representation of rgb.dir and rgb.pag used to map a color name to a color value.

X11 clients use XLookupColor or XAllocNamedColor to map a color name to a color value. The color name string passed to these routines is converted to lowercase before it is looked up in the database.

Color Recommendations

This section contains recommendations for using the Solaris X server color support facilities. Use these hints to maximize portability and color sharing: