1. NAME

XInstallColormap, XUninstallColormap, XListInstalledColormaps - control colormaps

2. SYNTAX

int XInstallColormap(Display *display, Colormap colormap); int XUninstallColormap(Display *display, Colormap colormap); Colormap *XListInstalledColormaps(Display *display, Window w, int *num_return);

3. ARGUMENTS

colormap 1i Specifies the colormap.

display 1i Specifies the connection to the X server.

num_return 1i Returns the number of currently installed colormaps.

w 1i Specifies the window \*(Wi.

4. DESCRIPTION

The .ZN XInstallColormap function installs the specified colormap for its associated screen. All windows associated with this colormap immediately display with true colors. You associated the windows with this colormap when you created them by calling .ZN XCreateWindow , .ZN XCreateSimpleWindow , .ZN XChangeWindowAttributes , or .ZN XSetWindowColormap .

If the specified colormap is not already an installed colormap, the X server generates a .ZN 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 .ZN XInstallColormap , the X server generates a .ZN ColormapNotify event on each window that has that colormap.

.ZN XInstallColormap can generate a .ZN BadColor error.

The .ZN 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 uninstalled is server dependent except that the required list must remain installed.

If the specified colormap becomes uninstalled, the X server generates a .ZN 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 .ZN XUninstallColormap , the X server generates a .ZN ColormapNotify event on each window that has that colormap.

.ZN XUninstallColormap can generate a .ZN BadColor error.

The .ZN 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 .ZN XFree .

.ZN XListInstalledColormaps can generate a .ZN BadWindow error.

5. DIAGNOSTICS

  • .ZN BadColor
     A value for a Colormap argument does not name a defined Colormap.
  • .ZN BadWindow
     A value for a Window argument does not name a defined Window.

6. SEE ALSO