Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Advanced Color Imaging Reference /
Chapter 2 - Color Picker Manager Reference /
Application-Defined Functions / Handling Application-Directed Events in a Color Picker


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 it MyPickerFilterFunction.

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 return true 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 returns false 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.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 NOV 1996