XInstallColormap(3X) XInstallColormap(3X)NAME XInstallColormap, XUninstallColormap, XListInstalledColormaps - install and uninstall 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; DESCRIPTION The XInstallColormap function installs the specified color- map for its associated screen. All windows associated with this colormap immediately display with true colors. You as- sociated the windows with this colormap when you created them by calling XCreateWindow, XCreateSimpleWindow, XChangeWindowAttributes, or XSetWindowColormap. If the specified colormap is not already an installed color- map, 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 XIn- stallColormap, the X server generates a ColormapNotify event on each window that has that colormap. The XUninstallColormap function removes the specified color- map 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 in- stalled. 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 XUnin- stallColormap, the X server generates a ColormapNotify event on each window that has that colormap. The XListInstalledColormaps function returns a list of the currently installed colormaps for the screen of the speci- fied window. The order of the colormaps in the list is not November, 1990 1
XInstallColormap(3X) XInstallColormap(3X)significant and is not explicit indication of the required list. When the allocated list is no longer needed, you can free the list by using XFree. Arguments These functions accept the following arguments: colormap Specifies the colormap ID. display Specifies the connection to the X server. num-return Returns the list of currently installed colormaps. w Specifies the window ID that determines the screen. ERRORS BadColor A value for a Colormap argument does not name a de- fined colormap. BadWindow A value for a Window argument does not name a de- fined window. The XInstallColormap and XUninstallColormap functions can generate a BadColor error. The XListInstalledColormaps function can generate a BadWin- dow error. SEE ALSO XChangeWindowAttributes(3X), XCreateColormap(3X), XCreateWindow(3X), XFree(3X)Xlib - C Language Interface2 November, 1990