Important: The information in this document is obsolete and should not be used for new development.
DoGetScrapTranslationList
A scrap translation extension must respond to thekTranslateGetScrapTranslationListrequest 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 theCallComponentFunctionWithStoragefunction and passing it a pointer to a function with the syntax defined by theDoGetScrapTranslationListfunction.
FUNCTION DoGetScrapTranslationList (self: ComponentInstance; list: ScrapTranslationListHandle) : ComponentResult;
self- A component instance that identifies the component containing the translation extension.
list- A handle to a scrap translation list.
DESCRIPTION
TheDoGetScrapTranslationListfunction returns, through thelistparameter, a handle to a list of the scrap types from and into which your translation extension can translate. On entry toDoGetScrapTranslationList, thelistparameter contains a handle to a structure of typeScrapTranslationList. If your translation extension can translate any scrap types at all, yourDoGetScrapTranslationListfunction 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 inlisthas thegroupCountfield 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 toDoGetScrapTranslationListin thelistparameter. If you determine that the list hasn't changed, you should simply return the same handle to Macintosh Easy Open.RESULT CODES
TheDoGetScrapTranslationListfunction should returnnoErrif successful, or an appropriate result code otherwise.SEE ALSO
See "Scrap Translation Lists" on page 7-49 for a description of theScrapTranslationListdata structure. See "Writing a Translation Extension" beginning on page 7-18 for more information about implementing a translation extension.