![]() |
DoGetScrapTranslationListProcPtr |
||||
Header: | TranslationExtensions.h | Carbon status: | Unsupported | |
Defines a pointer to a get scrap translation list callback function. Your get scrap translation list callback function returns a list of the scrap types that your extension can translate.
typedef ComponentResult(* DoGetScrapTranslationListProcPtr) ( ComponentInstance self, ScrapTranslationListHandle list );
You would declare your function like this if you were to name it MyDoGetScrapTranslationListCallback:
ComponentResult MyDoGetScrapTranslationListCallback ( ComponentInstance self, ScrapTranslationListHandle list );
A component instance that identifies the component containing the translation extension.
A handle to a ScrapTranslationList. Your function should return, through this parameter, a handle to a list of the scrap types from and into which your translation extension can translate. If your translation extension can translate any scrap types at all, your function should resize this handle and fill the block with a list of the scrap types it can translate. If the translation list whose handle you return in this parameter has the groupCount field set to 0, Macintosh Easy Open assumes that your extension cannot translate any scrap types.
On entry to your function, this parameter contains a handle to a structure of type ScrapTranslationList. When it first becomes aware of your extension, Macintosh Easy Open calls your translation extensions get scrap translation list function. For improved performance, Macintosh Easy Open remembers each translation extensions most recently returned scrap translation list and passes that list to your function in this parameter. If you determine that the list hasnt changed, you should simply return the same handle to Macintosh Easy Open.
If successful, your function should return noErr. Otherwise, your function should return an appropriate result code. The Component Manager requires this function to return a value of type ComponentResult to simplify dispatching.
A scrap translation extension must respond to the kTranslateGetScrapTranslationList request code. At system startup time, the Translation Manager calls your extension with this code. You can handle this request by calling the Component Manager function CallComponentFunctionWithStorage and passing it a pointer to your get scrap translation list callback function.
The functions contained in TranslationExtensions.h were originally written to be used only by someone implementing a Mac Easy Open translation component. Carbon, however, is for applications and not extensions. Therefore, this function is not supported.
© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)