Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

xcopycolormapandfree(3) [hpux man page]

XCopyColormapAndFree()													    XCopyColormapAndFree()

Name
  XCopyColormapAndFree - copy a colormap and return a new colormap ID.

Synopsis
  Colormap XCopyColormapAndFree(display, colormap)
	Display *display;
	Colormap colormap;

Arguments
  display   Specifies a connection to an X server; returned from XOpenDisplay().

  colormap  Specifies the colormap you are moving out of.

Returns
  The created colormap.

Description
  XCopyColormapAndFree()  is  used  to	obtain a new virtual colormap when allocating colorcells out of a previous colormap has failed due to
  resource exhaustion (that is, too many cells or planes were in use in the original colormap).  The visual and screen for the	new  colormap
  is the same as for the old.

  XCopyColormapAndFree()  moves all of the client's existing allocations from colormap to the returned Colormap.  The read/write or read-only
  characteristics of each cell moved are preserved in the new colormap.

  If colormap was created by the client with the alloc argument set to AllocAll, the new colormap is also created with	AllocAll,  all	color
  values for all entries are copied from colormap, and then all entries in colormap are freed.

  If  colormap	was  created by the client with AllocNone, or not created by the client, the allocations to be moved are all those pixels and
  planes that have been allocated by the client using XAllocColor, XAllocNamedColor(), XAllocColorCells(), or  XAllocColorPlanes()  and  that
  have not been freed since they were allocated.  Values in other entries of the new Colormap are undefined.

  For more information, see Volume One, Chapter 7, Color.

Errors
  BadAlloc

  BadColor  colormap is invalid.

See Also
  XDefaultColormap(),  XDisplayCells(),  XCreateColormap(),  XFreeColormap(),  XGetStandardColormap(), XInstallColormap(), XListInstalledCol-
  ormaps(), XSetStandardColormap(), XSetWindowColormap(), XUninstallColormap().

Xlib - Colormaps													    XCopyColormapAndFree()

Check Out this Related Man Page

XGetStandardColormap()													    XGetStandardColormap()

Name
  XGetStandardColormap - get the standard colormap property.

Synopsis
  Status XGetStandardColormap(display, w, cmap_info_return, property)
	Display *display;
	Window w;
	XStandardColormap *colormap_return;
	Atom property;

Arguments
  display   Specifies a connection to an X server; returned from XOpenDisplay().

  w	    Specifies the ID of the window on which the property is set.  This is normally the root window.

  colormap_return
	    Returns the filled colormap information structure.

  property  Specifies  the atom indicating the type of standard colormap desired. The predefined standard colormap atoms are XA_RGB_BEST_MAP,
	    XA_RGB_RED_MAP, XA_RGB_GREEN_MAP, XA_RGB_BLUE_MAP, XA_RGB_DEFAULT_MAP, and XA_RGB_GRAY_MAP.

Returns
  Zero on failure, non-zero on success.

Description
  XGetStandardColormap() is superseded by XGetRGBColormaps() in Release 4.  XGetStandardColormap() gets a property on the  root  window  that
  describes a standard colormap.  XGetStandardColormap() returns zero if it fails, or non-zero if it succeeds.

  See Volume One, Chapter 7, Color, for a complete description of standard colormaps.

Structures
     typedef struct {
	 Colormap colormap;   /* ID of colormap created by XCreateColormap */
	 unsigned long red_max;
	 unsigned long red_mult;
	 unsigned long green_max;
	 unsigned long green_mult;
	 unsigned long blue_max;
	 unsigned long blue_mult;
	 unsigned long base_pixel;
	 VisualID visualid;
	 XID killid;
     } XStandardColormap;

Errors
  BadAtom
  BadWindow

See Also
  XDefaultColormap(),  XDisplayCells(),  XCopyColormapAndFree(),  XCreateColormap(),  XFreeColormap(), XInstallColormap(), XListInstalledCol-
  ormaps(), XSetStandardColormap(), XSetWindowColormap(), XUninstallColormap().

Xlib - Colormaps													    XGetStandardColormap()
Man Page