Skip to Main Content
Volume 7B: XView Reference Manual
book

Volume 7B: XView Reference Manual

by Dan Heller
September 1991
Intermediate to advanced content levelIntermediate to advanced
311 pages
7h 17m
English
O'Reilly Media, Inc.
Content preview from Volume 7B: XView Reference Manual
1.4 The CMS Package
The X Window System has various ways of allocating, specifying, and using colors. While
all of these methods are available to applications without XView intervening, XView pro-
vides its own model for color specification that may be used as an alternative. It does not
provide anything more than what is already available, but it may provide a simpler interface
to request and specify colors. This model is especially useful when specifying colors for
XView objects, such as panel buttons and scrollbars.
XView applications deal with color by using colormap segments. Window-based objects
(canvases, panels, textsw, etc.) use colormap segments to get their colors. These objects get
a default colormap segment when they are created, but you can assign a new one using the
WIN_CMS attribute. Colormap segments must be applied to windows to assure that the win-
dow can access the color you are attempting to draw into.
A colormap segment from the CMS package is a subset of the available cells in a colormap on
the X server. These are XView entities (i.e., not Xlib) that provide a veneer over the Xlib
color mechanism. Colormap segments can be created as either static or dynamic and are
derived from an underlying colormap of the same type.
Applications that use color must include the file <xview/cms.h>. The owner of a colormap
segment is the XView screen object with which the colormap is associated. If an owner is
not specified (NULL owner), the default screen of the default server is used as ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Gestion des couleurs pas à pas

Gestion des couleurs pas à pas

Jean Delmas
1,000 Garment Graphics

1,000 Garment Graphics

Jeffrey Everett

Publisher Resources

ISBN: 9780937175880