#include <ggi/gcp.h>
int gcpGetRGBAPalette(ggi_visual_t vis,
int s,int len,gcp_RGBAcolor *cmap);
int gcpSetRGBAPalette(ggi_visual_t vis,
int s,int len,gcp_RGBAcolor *cmap);
int gcpGetYUVPalette(ggi_visual_t vis,
int s,int len,gcp_YUVcolor *cmap);
int gcpSetYUVPalette(ggi_visual_t vis,
int s,int len,gcp_YUVcolor *cmap);
int gcpGetCMYKPalette(ggi_visual_t vis,
int s,int len,gcp_CMYKcolor *cmap);
int gcpSetCMYKPalette(ggi_visual_t vis,
int s,int len,gcp_CMYKcolor *cmap);
int gcpGetHSVPalette(ggi_visual_t vis,
int s,int len,gcp_HSVcolor *cmap);
int gcpSetHSVPalette(ggi_visual_t vis,
int s,int len,gcp_HSVcolor *cmap);
int gcpGetYCCPalette(ggi_visual_t vis,
int s,int len,gcp_YCCcolor *cmap);
int gcpSetYCCPalette(ggi_visual_t vis,
int s,int len,gcp_YCCcolor *cmap);
gcpSet*Palette sets a range of palette values of length len, starting at index number s. The index can be GCP_PALETTE_DONTCARE to indicate that the palette can be installed anywhere in the CLUT. This allows optimized use in windowing environments (to minimize color flashing between windows) and should be used if possible.
gcpGet*Palette copies the specified colors (starting from s, for len colors) from the visual's palette to the array pointed by cmap.
gcpGet*Palette returns 0 for OK, otherwise an ggi-error(3) code. When called with len=0 this function will not automatically succeed, but the return code will indicate whether there is a readable CLUT.