Important: The information in this document is obsolete and should not be used for new development.
MyPickerFilterFunction
Application-defined filter function for handling user events meant for your application.Your application should supply the
eventProc
field of the color picker parameter block with a pointer to the application-defined filter function. Your filter function should take one parameter--a pointer to an event record--and it should return a Boolean value. For example, this is how you would declare it if your were to name itMyPickerFilterFunction
.
pascal Boolean MyPickerFilterFunction (EventRecord *event);
event
- A pointer to an event record specifying the event you may wish to filter. Event records are described in the chapter "Event Manager" in Inside Macintosh: Macintosh Toolbox Essentials.
DISCUSSION
Your filter function should examine the event record passed in the first parameter to determine whether your application needs to handle the event contained in the record. If your application handles the event, your filter function should returntrue
so that the Color Picker Manager won't process the event any further. If your application does not handle the event, your filter function should returnsfalse
so that the Color Picker Manager or the color picker can handle the event.SEE ALSO
Listing 2-2 (page 2-9) in Advanced Color Imaging on the Mac OS provides an example of an event filter function for a color picker.