Carbon


ColorChangedProcPtr

Header: ColorPicker.h Carbon status: Supported

Defines a pointer to a color-changed callback function. Your color-changed callback function applies a new color to a user’s document.

typedef void(* ColorChangedProcPtr) (
    SInt32 userData, 
    PMColor *newColor
);

You would declare your function like this if you were to name it MyColorChangedCallback:

void MyColorChangedCallback (
    SInt32 userData, 
    PMColor *newColor
);
Parameter descriptions
userData

Data that your application supplies in the colorProcData field of ColorPickerInfo. Your application can use this value for any purpose it needs.

newColor

A pointer to a PMColor structure that contains the new color selected by the user. Your color-changed function should update the user’s document to use this color.

DISCUSSION

Your application should supply the colorProc field of the color picker parameter with a pointer to your color change callback function.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)