#include <X11/Xmu/StdCmap.h>Status XmuLookupStandardColormap(dpy, screen, visualid, depth, property, replace, retain) Display *dpy; int screen; VisualID visualid; unsigned int depth; Atom property; Bool replace; Bool retain;
Given a screen, a visual, and a property, this function determines the best allocation for the property under the specified visual, and determines whether to create a new colormap or to use the default colormap of the screen.
If replace is True, any previous definition of the property is replaced. If retain is True, the property and the colormap will be made permanent for the duration of the server session. However, pre-existing property definitions that are not replaced cannot be made permanent by a call to this function; a request to retain resources pertains to newly created resources.
This function returns 0 on failure, non-zero on success. A request to create a standard colormap upon a visual which cannot support such a map is considered a failure. An example of this would be requesting any standard colormap property on a monochrome visual, or requesting an RGB_BEST_MAP on a display whose colormap size is 16.