Previous Book Contents Book Index Next

Inside Macintosh: Advanced Color Imaging Reference /
Chapter 2 - Color Picker Manager Reference /
Color Picker-Defined Functions / Responding to Requests to Return and Set Color Picker Information


Color picker-defined subroutine that handles a kGetIconData request.

If you create a color picker, it must respond to the kGetIconData request code. The Color Picker Manager sends this request code to obtain information about your color picker's icon family and script code. A color picker typically responds to the kGetIconData request code by calling a color picker-defined subroutine (for example, MyGetIconData) to handle the request.

pascal ComponentResult MyGetIconData (
PickerStorageHndl storage, 
PickerIconData *data);
A handle to your color picker's global data.
A pointer to a PickerIconData structure (page 2-17) returned by your color picker. In the scriptCode field of this structure, your color picker should return its script code, and in the iconSuiteID field, your color picker should return the resource ID of its icon family.
Your MyGetIconData function should return the data that the Color Picker Manager needs to display your picker in the More Choices list--specifically the script code for its name and the resource ID of your color picker's icon family. See the chapter "Finder Interface" in Inside Macintosh: Macintosh Toolbox Essentials for information about icon families.

Your function should return noErr if successful, or an appropriate result code otherwise.

Listing 2-26 (page 2-43) in Advanced Color Imaging on the Mac OS illustrates how to implement this function.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 NOV 1996