Important: The information in this document is obsolete and should not be used for new development.
DoGetScrapTranslationListA scrap translation extension must respond to the
kTranslateGetScrapTranslationListrequest code. At system startup time, the Translation Manager calls your extension with this request code to obtain a list of the scrap types that the extension can translate. You can handle this request by calling the
CallComponentFunctionWithStoragefunction and passing it a pointer to a function with the syntax defined by the
FUNCTION DoGetScrapTranslationList (self: ComponentInstance; list: ScrapTranslationListHandle) : ComponentResult;
- A component instance that identifies the component containing the translation extension.
- A handle to a scrap translation list.
DoGetScrapTranslationListfunction returns, through the
listparameter, a handle to a list of the scrap types from and into which your translation extension can translate. On entry to
listparameter contains a handle to a structure of type
ScrapTranslationList. If your translation extension can translate any scrap types at all, your
DoGetScrapTranslationListfunction should resize that handle and fill the block with a list of the scrap types it can translate. If the translation list whose handle you return in
groupCountfield set to 0, Macintosh Easy Open assumes that your extension cannot translate any scrap types.
When it first becomes aware of your extension, Macintosh Easy Open calls your translation extension's
DoGetScrapTranslationListfunction. For improved performance, Macintosh Easy Open remembers each translation extension's most recently returned scrap translation list and passes that list to
listparameter. If you determine that the list hasn't changed, you should simply return the same handle to Macintosh Easy Open.
DoGetScrapTranslationListfunction should return
noErrif successful, or an appropriate result code otherwise.
SEE ALSOSee "Scrap Translation Lists" on page 7-49 for a description of the
ScrapTranslationListdata structure. See "Writing a Translation Extension" beginning on page 7-18 for more information about implementing a translation extension.