xgetstandardcolormap(3) [hpux 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()
Check Out this Related 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()