Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

xinstallcolormap(3) [hpux man page]

XInstallColormap()														XInstallColormap()

Name
  XInstallColormap - install a colormap.

Synopsis
  XInstallColormap(display, colormap_return)
	Display *display;
	Colormap colormap_return;

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

  colormap_return
	    Specifies the colormap to install.

Description
  XInstallColormap()  installs a virtual colormap into a hardware colormap.  If there is only one hardware colormap, XInstallColormap() loads
  a virtual colormap into the hardware colormap.  All windows associated with this colormap immediately display  with  their  chosen  colors.
  Other windows associated with the old colormap will display with false colors.  If additional hardware colormaps are possible, XInstallCol-
  ormap() loads the new hardware map and keeps the existing ones.  Other windows will then remain in their true colors unless the  limit  for
  colormaps has been reached.  If the maximum number of allowed hardware colormaps is already installed, an old colormap is swapped out.  The
  MinCmapsOfScreen(screen) and MaxCmapsOfScreen(screen) macros can be used to determine how many hardware colormaps are supported.

  If colormap_return is not already an installed map, a ColormapNotify event is generated  on  every  window  having  colormap_return  as  an
  attribute.   If  a colormap is uninstalled as a result of the install, a ColormapNotify event is generated on every window having that col-
  ormap as an attribute.

  Colormaps are usually installed and uninstalled by the window manager, not by clients.  At any time, there is a  subset  of  the  installed
  colormaps,  viewed  as  an ordered list, called the "required list."	The length of the required list is at most the min_maps specified for
  each screen in the Display structure.  When a colormap is installed with XInstallColormap() it is added to the head of  the  required  list
  and  the last colormap in the list is removed if necessary to keep the length of the list at min_maps.  When a colormap is uninstalled with
  XUninstallColormap() and it is in the required list, it is removed from the list.  No other actions by the server or the client change  the
  required list.  It is important to realize that on all but high-performance workstations, min_maps is likely to be 1.  If the hardware col-
  ormap is immutable, and therefore installing any colormap is impossible, XInstallColormap() will work but not do anything.

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

Errors
  BadColor  Invalid colormap.

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

Xlib - Colormaps														XInstallColormap()

Check Out this Related Man Page

XInstallColormap(3X11)													    XInstallColormap(3X11)

NAME
XInstallColormap, XUninstallColormap, XListInstalledColormaps - control colormaps SYNOPSIS
XInstallColormap(display, colormap) Display *display; Colormap colormap; XUninstallColormap(display, colormap) Display *display; Colormap colormap; Colormap *XListInstalledColormaps(display, w, num_return) Display *display; Window w; int *num_return; ARGUMENTS
Specifies the colormap. Specifies the connection to the X server. Returns the number of currently installed colormaps. Specifies the window that determines the screen. DESCRIPTION
The XInstallColormap function installs the specified colormap for its associated screen. All windows associated with this colormap immedi- ately display with true colors. You associated the windows with this colormap when you created them by calling XCreateWindow, XCreateSim- pleWindow, XChangeWindowAttributes, or XSetWindowColormap. If the specified colormap is not already an installed colormap, the X server generates a ColormapNotify event on each window that has that colormap. In addition, for every other colormap that is installed as a result of a call to XInstallColormap, the X server generates a Col- ormapNotify event on each window that has that colormap. XInstallColormap can generate a BadColor error. The XUninstallColormap function removes the specified colormap from the required list for its screen. As a result, the specified colormap might be uninstalled, and the X server might implicitly install or uninstall additional colormaps. Which colormaps get installed or unin- stalled is server dependent except that the required list must remain installed. If the specified colormap becomes uninstalled, the X server generates a ColormapNotify event on each window that has that colormap. In addition, for every other colormap that is installed or uninstalled as a result of a call to XUninstallColormap, the X server generates a ColormapNotify event on each window that has that colormap. XUninstallColormap can generate a BadColor error. The XListInstalledColormaps function returns a list of the currently installed colormaps for the screen of the specified window. The order of the colormaps in the list is not significant and is no explicit indication of the required list. When the allocated list is no longer needed, free it by using XFree. XListInstalledColormaps can generate a BadWindow error. DIAGNOSTICS
A value for a Colormap argument does not name a defined Colormap. A value for a Window argument does not name a defined Window. SEE ALSO
XChangeWindowAttributes(3X11), XCreateColormap(3X11), XCreateWindow(3X11), XFree(3X11) Xlib -- C Language X Interface XInstallColormap(3X11)
Man Page