Carbon


PickerTestGraphicsWorldProcPtr

Header: ColorPickerComponents.h Carbon status: Supported

Defines a pointer to a color picker-defined graphics world test callback function. Your graphics world test callback function reveals whether your color picker can operate under existing conditions.

typedef ComponentResult(* PickerTestGraphicsWorldProcPtr) (
    SInt32 storage, 
    PickerInitData *data
);

You would declare your function like this if you were to name it MyPickerTestGraphicsWorldCallback:

ComponentResult MyPickerTestGraphicsWorldCallback (
    SInt32 storage, 
    PickerInitData *data
);
Parameter descriptions
storage

A handle to your color picker’s global data.

data

A pointer to a PickerInitData structure, in which one or more color picker flags may be set by the application. Your color picker may need to change some of these flags (such as those indicating the type of dialog box in which it appears).

function result

Your MyPickerTestGraphicsWorldCallback function should return noErr if your color picker can operate on the current system with the restrictions pointed to in the data parameter. Otherwise, it should return a result code other than noErr.

DISCUSSION

If you create a color picker, it must respond to the kTestGraphicsWorld request code. A color picker typically responds to the kTestGraphicsWorld request code by calling a color picker-defined subroutine such as this to handle the request.

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)