Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: More Macintosh Toolbox /
Chapter 7 - Translation Manager / Translation Extension Reference
Translation Extension Data Structures


Scrap Translation Lists

You use the ScrapTranslationList data structure to describe which scrap formats your extension can translate into which other scrap formats. The Translation Manager uses the scrap translation list that it gets from each translation system to create a master database of its translation capability.

TYPE ScrapTranslationList = 
   RECORD
      modDate:                LongInt;
      groupCount:             LongInt;
      {group1SrcCount:        LongInt;}
      {group1SrcEntrySize:    LongInt;}
      {group1SrcTypes:        ARRAY[1..group1SrcCount] OF ScrapTypeSpec;}
      {group1DstCount:        LongInt;}
      {group1DstEntrySize:    LongInt;}
      {group1DstTypes:        ARRAY[1..group1DstCount] OF ScrapTypeSpec;}
      {repeat above six lines for a total of groupCount times}
   END;
   ScrapTranslationListPtr    = ^ScrapTranslationList;
   ScrapTranslationListHandle = ^ScrapTranslationListPtr;
A scrap translation list consists of a field indicating the modification date of the list and a count of the number of groups that follow those two fields. The size of the translation list prepared by an extension is variable, depending upon the number of groups, the scrap specification record size, and the number of scrap types that the extension knows about.

Field Description
modDate
The creation date of the scrap translation list. If your extension uses external translators, you might set this field to the modification date of a folder containing those translators.
groupCount
The number of translation groups that follow.
group1SrcCount
The number of scrap types that the extension can read in a group.
group1SrcEntrySize
The size of the scrap specification records in the array that follows this field. In general, you can set this field to SizeOf(ScrapTypeSpec).
group1SrcTypes
An array of scrap specification records. You should include a scrap specification record in this array for each scrap type that your extension knows how to translate.
group1DstCount
The number of scrap types that the extension can write in a group.
group1DstEntrySize
The size of the scrap specification records in the array that follows this field. In general, you can set this field to SizeOf(ScrapTypeSpec).
group1DstTypes
An array of scrap specification records. You should include a scrap specification record in this array for each scrap type that your extension can translate into.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996