Important: The information in this document is obsolete and should not be used for new development.
MyColorChangedFunction
Application-defined function that handles color changes.Your application can supply the
colorProc
field of the color picker parameter block with a pointer to the application-defined function. Your function should take two parameters--one for data previously specified by your application, and another specifying the new color selected by the user. For example, this is how you would declare it if you were to name itMyColorChangedFunction
.
pascal void MyColorChangedFunction ( long userData, PMColorPtr newColor);
userData
- Data that your application supplies in the
colorProcData
field of the color picker parameter block (page 2-20). Your application can use this value for any purpose it needs.newColor
- A pointer to a
PMColor
structure (page 2-15) that contains the new color selected by the user.DISCUSSION
Your color-changed function should update the user's document to use the color specified in thenewColor
parameter.SEE ALSO
Listing 2-3 (page 2-9) in Advanced Color Imaging on the Mac OS provides an example of a color-changed function.