XSetWindowColormap()XSetWindowColormap()NameXSetWindowColormap – set the colormap attribute for a window.
Synopsis
XSetWindowColormap(display, w, colormap)
Display *display;
Window w;
Colormap colormap;
Arguments
display Specifies a connection to an X server; returned from XOpenDis‐
play().
w Specifies the ID of the window for which you want to set the
colormap.
colormap
Specifies the colormap.
DescriptionXSetWindowColormap() sets the colormap attribute of the specified win‐
dow. The colormap need not be installed to be set as an attribute.
colormap will be used to translate pixel values drawn into this window
when colormap is installed in the hardware, which will be taken care of
by the window manager.
In Release 3, applications must install their own colormaps if they
cannot use the default colormap. In Release 4 and later, they should
never do so.
The colormap must have the same visual as the window.
Errors
BadColor Invalid colormap.
BadMatch
BadWindow
See AlsoXChangeWindowAttributes(), XGetGeometry(), XGetWindowAttributes(),
XSetWindowBackground(), XSetWindowBackgroundPixmap(), XSetWindowBor‐
der(), XSetWindowBorderPixmap(), XSetWMColormapWindows().
Xlib - Window Attributes XSetWindowColormap()