Important: The information in this document is obsolete and should not be used for new development.
MyInitPicker
Color picker-defined subroutine that handles akInitPickerrequest.If you create a color picker, it must respond to the
kInitPickerrequest code. The Color Picker Manager sends this code to request your color picker to instantiate any private data it needs. A color picker responds to thekInitPickerrequest code by calling a color picker-defined subroutine (for example,MyInitPicker) to handle the request.
pascal ComponentResult MyInitPicker ( PickerStorageHndl storage, PickerInitData *data);
storage- A handle to your color picker's newly initialized global data.
data- A pointer to a
PickerInitDatastructure (page 2-18), in which one or more color picker flags may be set. You may want your color picker to store this information in its global data.DISCUSSION
Using the storage allocated in thestorageparameter, yourMyInitPickerfunction should initialize any private data needed by your color picker.The Color Picker Manager uses the Component Manager to send the
kInitPickerrequest code after your color picker has set up all of its external data. If the Color Picker Manager has opened your color picker only to obtain a list of color pickers for the More Choices list, your color picker will not receive this message unless it is actually chosen by the user.Before handling the
kInitPickerrequest code, your color picker must be able to handle thekTestGraphicsWorldrequest code, thekGetDialogrequest code, and thekGetItemListrequest code. These constants are described in "Request Codes" (page 2-12).Your function should return
noErrif successful, or an appropriate result code otherwise.SEE ALSO
Listing 2-17 (page 2-34) in Advanced Color Imaging on the Mac OS illustrates how to implement this function.