ColorServicesInfo Struct Reference

This data structure is used in the ColorServicesProc callback function. More...

#include <PIGeneral.h>

Data Fields

int32 infoSize
 Size of the ColorServicesInfo record in bytes.
int16 selector
 Operation performed by the ColorServices callback.
int16 sourceSpace
 Indicates the color space of the input color contained in colorComponents.
int16 resultSpace
 Desired color space of the result color.
Boolean resultGamutInfoValid
 This output only field indicates whether the resultInGamut field has been set.
Boolean resultInGamut
 Indicates whether the returned color is in gamut for the currently selected printing setup.
void * reservedSourceSpaceInfo
 Both voids must be NULL or will return paramErr:
void * reservedResultSpaceInfo
 Must be NULL, otherwise returns parameter error.
int16 colorComponents [4]
 Actual color components of the input or output color.
void * reserved
 Reserved must be NULL or will return paramErr:
union {
   Str255 *   pickerPrompt
 Contains a pointer to a Pascal string which is used as a prompt in the color picker for the plugIncolorServicesChooseColor call.
   Point *   globalSamplePoint
 Points to a Point record that is the current sample point.
   int32   specialColorID
 should be either: 0=plugIncolorServicesForegroundColor or 1=plugIncolorServicesBackgroundColor.
selectorParameter
 This union is used for providing different information based on the selector field.

Detailed Description

This data structure is used in the ColorServicesProc callback function.


Field Documentation

Size of the ColorServicesInfo record in bytes.

The value is used as a version identifier in case this record is expanded in the future. It can be filled in as follows:

     ColorServicesInfo requestInfo;
     requestInfo.infoSize = sizeof(requestInfo); 

Operation performed by the ColorServices callback.

See Color Service Selectors.

Indicates the color space of the input color contained in colorComponents.

For plugIncolorServicesChooseColor the input color is used as an initial value for the picker. For plugIncolorServicesConvertColor the input color is converted from the color space indicated by sourceSpace to the one indicated by resultSpace. See Color Space for values.

Desired color space of the result color.

The result is contained in the colorComponents field. For the plugIncolorServicesChooseColor selector, resultSpace can be set to -1=plugIncolorServicesChosenSpace to return the color in whichever color space the user chose. In that case, resultSpace contains the chosen color space on output. See Color Space for values.

This output only field indicates whether the resultInGamut field has been set.

In Photoshop 3.0 and later, this is only true for colors returned in the plugIncolorServicesCMYKSpace color space.

Indicates whether the returned color is in gamut for the currently selected printing setup.

Only meaningful if resultGamutInfoValid=TRUE.

Both voids must be NULL or will return paramErr:

Must be NULL, otherwise returns parameter error.

Must be NULL, otherwise returns parameter error.

Actual color components of the input or output color.

The values of the array depend on the color space.

colorComponents array structure
Color Space[0][1][2][3]
RGBred from 0...255green from 0...255blue from 0...255undefined
HSBhue from 0...359 degreessaturation from 0...359 degrees (representing 0%...100%)brightness from 0...359 degrees(representing 0%...100%)undefined
CMYKcyan from 0...255 (representing 100%...0%)magenta from 0...255(representing 100%...0%)yellow from 0...255(representing 100%...0%)black from 0...255(representing 100%...0%)
HSLhue from 0...359 degreessaturation from 0...359 degrees(representing 0%...100%)luminance from 0...359 degrees(representing 0%...100%)undefined
LabLuminance from 0...255(representing 0...100)a. chromanance from 0...255 degrees(representing -128...127)b. chromanance from 0...255 degrees(representing -128...127)undefined
Gray Scalegray value from 0...255undefinedundefinedundefined
XYZx value from 0...255Y value from 0...255Z value from 0...255undefined

Reserved must be NULL or will return paramErr:

Must be NULL, otherwise returns parameter error.

Contains a pointer to a Pascal string which is used as a prompt in the color picker for the plugIncolorServicesChooseColor call.

NULL can be passed to indicate no prompt.

Points to a Point record that is the current sample point.

should be either: 0=plugIncolorServicesForegroundColor or 1=plugIncolorServicesBackgroundColor.

This union is used for providing different information based on the selector field.


The documentation for this struct was generated from the following file: