Status XGetRGBColormaps(display, w, std_colormap_return, count_return, property)
      Display *display;
      Window w;
      XStandardColormap **std_colormap_return;
      int *count_return;
      Atom property;


display Specifies the connection to the X server.
w Specifies the window.
std_colormap_return Returns the XStandardColormap structure.
count_return Returns the number of colormaps.
property Specifies the property name.


The XGetRGBColormaps() function returns the RGB colormap definitions stored in the specified property on the named window. If the property exists, is of type RGB_COLOR_MAP, is of format 32, and is long enough to contain a colormap definition, XGetRGBColormaps() allocates and fills in space for the returned colormaps and returns a nonzero status. If the visualid is not present, XGetRGBColormaps() assumes the default visual for the screen on which the window is located; if the killid is not present, None is assumed, which indicates that the resources cannot be released. Otherwise, none of the fields are set, and XGetRGBColormaps() returns a zero status. Note that it is the caller's responsibility to honor the ICCCM restriction that only RGB_DEFAULT_MAP contain more than one definition.

XGetRGBColormaps() can generate BadAtom and BadWindow errors.


BadAtom A value for an Atom argument does not name a defined Atom.
BadWindow A value for a Window argument does not name a defined Window.

See also

XAllocStandardColormap(), XSetRGBColormaps(), XStandardColormap, XAllocColor(), XCreateColormap(), XFree(), XSetCloseDownMode(), "Setting and Obtaining Standard Colormaps".
Christophe Tronche, [email protected]