Previous Book Contents Book Index Next

Inside Macintosh: Advanced Color Imaging Reference /
Chapter 5 - Color Manager Reference /
Color Manager Functions / Managing Color Tables


Saves a selection of color table entries.

pascal void SaveEntries (
CTabHandle srcTable, 
CTabHandle resultTable, 
ReqListRec *selection);
The color table containing entries to be saved.
The color table in which to save the entries.
A pointer to a list of entries to be saved, as indicated not by a range of indexes, but by a request list structure. See ReqListRec data structure (page 5-5).
The SaveEntries function saves a selection of color table entries from the srcTable parameter in the resultTable parameter. You use the selection parameter, a ReqListRec data structure (page 5-5), to enumerate the entries to be set. The values specified by the selection parameter are offsets into a ColorTable data structure, not the contents of the ColorSpec.value field.

If an entry is not present in srcTable, then SaveEntries sets that position of the selection parameter to colReqErr, and that position of resultTable contains random values. If SaveEntries can't find one or more entries, then it posts an error code to QDError; however, for every entry in selection which is not colReqErr, the values in resultTable are valid. SaveEntries assumes that the color table specified by the srcTable parameter and the request list specified by the selection parameter have the same number of entries.

SaveEntries optionally allows NULL as the value of its source color table parameter. If you supply NULL, SaveEntries uses the current device's color table as the source. The output of SaveEntries is the same as the input for RestoreEntries, except for the order.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 NOV 1996