Carbon


EventData

Header: ColorPickerComponents.h

struct EventData {
    EventRecord *event; 
    PickerAction action; 
    SInt16 itemHit; 
    Boolean handled; 
    SInt8 filler; 
    ColorChangedUPP colorProc; 
    SInt32 colorProcData; 
    EventForcaster forcast;
};

Field descriptions

event

A pointer to an event record. Your application supplies this field with an event to pass to the color picker. The event record is described in the Event Manager documentation.

action

The nature of the event. In this field, the Color Picker Manager returns a value, defined in the PickerAction enumeration, describing the event. See the “Picker Action Constants” enumeration for a discussion about how your application should respond to these actions.

itemHit

For the item associated with the event, the number corresponding to the item’s position with the item list resource of the color picker’s dialog box.

handled

A Boolean value indicating whether the color picker or the Color Picker Manager handled the event. If the Color Picker Manager returns the value true in this field, then the event was handled; otherwise, your application should process the event.

If your application sends an event forecaster to the color picker, the color picker informs your application about whether the color picker is ready for the action to occur by setting this field to true if it’s not ready and false if it is.

filler

A pointer to an application-defined function to handle color changes. This function, described in detail on ColorChangedProcPtr, should support the updating of colors in a document as the user selects them.

colorProc

A long integer that the Color Picker Manager passes to the application-defined function supplied in the colorProc field. Your application-defined function can use this value for any purpose it needs.

colorProcData

An event forecaster (that is, a warning) for the color picker. To send an event forecaster to the color picker, set the event field to NULL and set the forcast field to a value from the “Event Forcasters” enumeration.

forcast

When your application uses the PickerEvent function to pass an event to a color picker for handling, your application uses an EventData structure to supply the color picker with information about the event, and to receive information about how the color picker handled the event.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)