Important: The information in this document is obsolete and should not be used for new development.
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
yourDataPtrparameter. For icon caches, you initially set this value when you first create a cache usingMakeIconCache. You can change this value usingSetIconCacheData. 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
MakeIconCachefunction 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 theGetIconCacheProcandSetIconCacheProcfunctions. You can also specify an icon getter function for use by thePlotIconMethod,IconMethodToRgn,PtInIconMethod, andRectInIconMethodfunctions.SEE ALSO
For descriptions of theMakeIconCache,GetIconCacheProc, andSetIconCacheProcfunctions, see "Working With Icon Caches" beginning on page 5-53.For information on the
PlotIconMethodfunction, see page 5-22. For a description of theIconMethodToRgnfunction, see "Converting an Icon Mask to a Region" beginning on page 5-43.For descriptions of the
PtInIconMethodandRectInIconMethodfunctions, see "Determining Whether a Point or Rectangle Is Within an Icon" beginning on page 5-46.