Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

NAME

XFreeColors − free colormap cells or planes. 

Synopsis

XFreeColors(display, colormap, pixels, npixels, planes)
Display *display;
Colormap colormap;
unsigned long pixels[];
int npixels;
unsigned long planes;

Arguments

displaySpecifies a connection to an X server; returned from XOpenDisplay(). 

colormapSpecifies the colormap. 

pixelsSpecifies an array of pixel values. 

npixelsSpecifies the number of pixels. 

planesSpecifies the planes you want to free. 

Description

XFreeColors() frees the cells whose values are computed by ORing together subsets of the planes argument with each pixel value in the pixels array.  If the cells are read/write, they become available for reuse, unless they were allocated with XAllocColorPlanes(), in which case all the related pixels may need to be freed before any become available.  If the cells were read-only, they become available only if this is the last client to have allocated those shared cells.  For more information, see Volume One, Chapter 7, Color. 

Errors

BadAccessAttempt to free a colorcell not allocated by this client (either unallocated or allocated by another client). 

BadColorcolormap is invalid. 

BadValueA pixel value is not a valid index into colormap.  Note:  if more than one pixel value is in error, the one reported is arbitrary. 

See Also

BlackPixel(), WhitePixel(), XAllocColor(), XAllocColorCells(), XAllocColorPlanes(), XLookupColor(), XParseColor(), XQueryColor(), XQueryColors(), XStoreColor(), XStoreColors(),

Copyright O’Reilly & Assoc.  —  

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