![]() |
PickerGetItemListProcPtr |
||||
Header: | ColorPickerComponents.h | Carbon status: | Supported | |
Defines a pointer to a color picker-defined dialog item callback function. Your dialog item callback function provides the dialog items for your color picker.
typedef ComponentResult(* PickerGetItemListProcPtr) ( SInt32 storage );
You would declare your function like this if you were to name it MyPickerGetItemListCallback:
ComponentResult MyPickerGetItemListCallback ( SInt32 storage );
A handle to your color pickers global data.
Your MyPickerGetItemListCallback function should coerce a handle for one or more dialog items into a long integer and return this as a function result. The Color Picker Manager adds these items to the color picker dialog box. If your color picker has no items to add, it should return NULL.
If you create a color picker, it must respond to the kGetItemList request code, by calling a color picker-defined subroutine (MyPickerGetItemListCallback, for example).
If your color picker saved the items in a dialog item list ('DITL') resource, your color picker should use the Resource Manager function GetResource to obtain the handle, and the Resource Manager function DetachResource to detach the resource.
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)