![]() |
PickerGetColorProcPtr |
||||
Header: | ColorPickerComponents.h | Carbon status: | Supported | |
Defines a pointer to a color picker-defined color retrieval callback function. Your color retrieval function returns an original or a new color.
typedef ComponentResult(* PickerGetColorProcPtr) ( SInt32 storage, PickerColorType whichColor, PMColorPtr color );
You would declare your function like this if you were to name it MyPickerGetColorCallback:
ComponentResult MyPickerGetColorCallback ( SInt32 storage, PickerColorType whichColor, PMColorPtr color );
A handle to your color pickers global data.
A type of coloreither original or newrequested from your color picker. Your function should respond to the value represented by either the kOriginalColor or kNewColor constant. If your MyPickerGetColorCallback function is passed the value represented by the kOriginalColor constants, it should return the color that the user first begins to edit. If your MyPickerGetColorCallback is passed the value represented by the kNewColor constants, it should return the last color selected by the user.
A pointer to a PMColor structure where your MyPickerGetColorCallback function should return the color requested.
Your function should return noErr if successful, or an appropriate result code otherwise.
If you create a color picker, it must respond to the kGetColor request code, by calling a color picker-defined subroutine (MyPickerGetColorCallback, for example).
When you create a color picker, the Color Picker Manager uses the Component Manager to request services from your color picker. The code for your color picker should be contained in a resource. The Component Manager expects that the entry point into this resource is a color picker-defined dispatch function. For information on how to create this dispatch function, see the Component Manager callback, ComponentRoutineProcPtr.
© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)