INITCACDCMAP(5ICD)

NAME
InitCacdCmap - initialize the CACD colormap

SYNOPSIS

InitCacdCmap (display, screen_number)
Display *display;
int screen_number;

PARAMETERS

display
    pointer to an Display structure obtained from XOpenDisplay().

screen_number
    the number of the screen of the display that is to be used.

DESCRIPTION
The function InitCacdCmap() initializes the Nelsis ICD CACD colormap. First it checks the existence of the property RGB_CACD_MAP on the root window, if it does not exist it tries to set this property by calling the program setcmap and does the check again. If the property exists it initializes some static data for later use. This function must be called before any of the other cacdcmap functions are called.

DIAGNOSTICS
If the call to InitCacdCmap() is successful 1 is returned. If InitCacdCmap() fails 0 will be returned and cacdcmaperrno will be set to one of the following values:

NOCMAP
    no CACD colormap exists.

BADCMAP
    the CACD colormap was found but has a bad format.

NOCORE
    not enough core could be allocated.

SEE ALSO
setcmap(1ICD) CacdCmapIntro(5ICD) CacdCmapError(5ICD) CreateGCforCmap(5ICD)