![]() |
PickerEventProcPtr |
||||
Header: | ColorPickerComponents.h | Carbon status: | Supported | |
Defines a pointer to a color picker-defined event handler callback function. Your color picker event handler function handles events that the Dialog Manager does not handle.
typedef ComponentResult(* PickerEventProcPtr) ( SInt32 storage, PickerEventData *data );
You would declare your function like this if you were to name it MyPickerEventCallback:
ComponentResult MyPickerEventCallback ( SInt32 storage, PickerEventData *data );
A handle to your color pickers global data.
A pointer to an EventData structure. Your function should return information about any event handling performed by your MyPickerEventCallback function in this structure. If your function handles the event, it should set the value of the handled field to true, in which case the Dialog Manager performs no additional handling of the event. Your function should set the action field to the particular action it performed. See
Your function should return noErr if successful, or an appropriate result code otherwise.
If you create a color picker, it must respond to the kEvent request code, by calling a color picker-defined subroutine (MyPickerEventCallback, for example).
If your color picker needs to perform any event processing in addition to or instead of that normally performed by the Dialog Manager, your MyPickerEventCallback function should perform it. The event is passed to your function in the event record pointed to in the event field of the EventData structure which, in turn, is pointed to in the data parameter.
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)