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: More Macintosh Toolbox /
Chapter 5 - Icon Utilities / Icon Utilities Reference
Application-Defined Routines / Icon Getter Functions


MyIconGetter

Here is the syntax of an icon getter function:

FUNCTION MyIconGetter (theType: ResType; 
                       yourDataPtr: Ptr): Handle;
theType
The resource type of the icon.
yourDataPtr
If your icon getter was called by an icon cache routine, this parameter contains a pointer to the data associated with the icon cache. Otherwise, this parameter contains the value your application specified in the yourDataPtr parameter. For icon caches, you initially set this value when you first create a cache using MakeIconCache. You can change this value using SetIconCacheData. The icon getter function can use this data as needed.
DESCRIPTION
An icon getter function should return as its function result a handle to the requested icon's data.

The MakeIconCache function takes a pointer to an icon getter function for use with a new icon cache. To get and set an existing icon cache's icon getter function, use the GetIconCacheProc and SetIconCacheProc functions. You can also specify an icon getter function for use by the PlotIconMethod, IconMethodToRgn, PtInIconMethod, and RectInIconMethod functions.

SEE ALSO
For descriptions of the MakeIconCache, GetIconCacheProc, and SetIconCacheProc functions, see "Working With Icon Caches" beginning on page 5-53.

For information on the PlotIconMethod function, see page 5-22. For a description of the IconMethodToRgn function, see "Converting an Icon Mask to a Region" beginning on page 5-43.

For descriptions of the PtInIconMethod and RectInIconMethod functions, see "Determining Whether a Point or Rectangle Is Within an Icon" beginning on page 5-46.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996