Important: The information in this document is obsolete and should not be used for new development.
DoGetScrapTranslationList
A scrap translation extension must respond to thekTranslateGetScrapTranslationList
request 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 theCallComponentFunctionWithStorage
function and passing it a pointer to a function with the syntax defined by theDoGetScrapTranslationList
function.
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
TheDoGetScrapTranslationList
function returns, through thelist
parameter, a handle to a list of the scrap types from and into which your translation extension can translate. On entry toDoGetScrapTranslationList
, thelist
parameter contains a handle to a structure of typeScrapTranslationList
. If your translation extension can translate any scrap types at all, yourDoGetScrapTranslationList
function 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 inlist
has thegroupCount
field 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
DoGetScrapTranslationList
function. For improved performance, Macintosh Easy Open remembers each translation extension's most recently returned scrap translation list and passes that list toDoGetScrapTranslationList
in thelist
parameter. If you determine that the list hasn't changed, you should simply return the same handle to Macintosh Easy Open.RESULT CODES
TheDoGetScrapTranslationList
function should returnnoErr
if successful, or an appropriate result code otherwise.SEE ALSO
See "Scrap Translation Lists" on page 7-49 for a description of theScrapTranslationList
data structure. See "Writing a Translation Extension" beginning on page 7-18 for more information about implementing a translation extension.