The SetEntries control routine is required. If the video card is an indexed device, the SetEntries control routine should change the contents of the card's CLUT.
OSErr = PBControl(theDeviceRefNum, cscSetEntries, &theVDSetEntryRecord);
--> csTable Pointer to ColorSpec array
--> csStart First entry in table
--> csCount Number of entries to set
If the value of csStart is 0 or positive, the routine must install csStart entries starting at that position. If it is -1, the routine must access the contents of the value field in csTable to determine which entries are to be changed. Both csStart and csCount are 0 based--their values are 1 less than the desired amount. For a description of a CLUT and the ColorSpec structure, see the Color QuickDraw section of Inside Macintosh: Imaging With QuickDraw.
If the card does not have a CLUT (that is, if the csDeviceType returned from GetVideoParameters does not equal clutType ), the system should never issue a SetEntries control call. If it does, the SetEntries control routine should return controlErr. With direct devices, the GrayPage and SetGamma routines are responsible for initializing the hardware properly.