Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ XCreCmap(3X) — AOS 4.3

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

XAllocColor(3X)

XQueryColor(3X)

XStoreColors(3X)

XCreateColormap(3X)  —  X Version 11

NAME

XCreateColormap, XCopyColormapAndFree, XFreeColormap, XSetWindowColormap − create, copy, or destroy colormaps

SYNTAX

Colormap XCreateColormap(display, w, visual, alloc)
      Display ∗display;
      Window w;
      Visual ∗visual;
      int alloc;

Colormap XCopyColormapAndFree(display, cmap)
      Display ∗display;
      Colormap cmap;

XFreeColormap(display, cmap)
      Display ∗display;
      Colormap cmap;

XSetWindowColormap(display, w, cmap)
      Display ∗display;
      Window w;
      Colormap cmap;

ARGUMENTS

allocSpecifies the color map entries to be allocated.  You can pass one of these constants: AllocNone or AllocAll.

cmapSpecifies the color map ID. 

displaySpecifies the connection to the X server. 

visualSpecifies a pointer to a visual type supported on the screen.  If the visual type is not one supported by the screen, the function returns a BadMatch error.

wSpecifies the window ID. 

DESCRIPTION

The XCreateColormap function creates a color map of the specified visual type for the screen on which the specified window resides and associates the Colormap ID with it. .PN XCreateColormap can generate BadAlloc, BadMatch, BadValue, and BadWindow errors.

The XCopyColormapAndFree function obtains a new color map when allocating out of a previous color map has failed due to resource exhaustion (that is, too many cells or planes were in use in the original color map). .PN XCopyColormapAndFree can generate BadAlloc and BadColor errors.

The XFreeColormap function deletes the association between the color map resource ID and the color map. However, this function has no effect on the default color map for a screen. .PN XFreeColormap can generate a BadColor error.

The XSetWindowColormap function sets the specified color map of the specified window. .PN XSetWindowColormap can generate BadColor, BadMatch, and BadWindow errors.

DIAGNOSTICS

BadAlloc The server failed to allocate the requested resource or server memory. 

BadColor A value for a Colormap argument does not name a defined Colormap. 

BadMatch An InputOnly window is used as a Drawable.

BadMatch Some argument or pair of arguments has the correct type and range but fails to match in some other way required by the request. 

BadValue Some numeric value falls outside the range of values accepted by the request.  Unless a specific range is specified for an argument, the full range defined by the argument’s type is accepted.  Any argument defined as a set of alternatives can generate this error. 

BadWindow A value for a Window argument does not name a defined Window. 

SEE ALSO

XAllocColor(3X), XQueryColor(3X), XStoreColors(3X)
Xlib − C Language X Interface

1 March 1988

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