Important: The information in this document is obsolete and should not be used for new development.
File Type SpecificationsYou use file type specifications to describe document formats in a file translation list. (See the next section for a description of file translation lists.) The interpretation of some of the fields of a file type specification depends on whether the specification occurs in the list of source document types or in the list of destination document types. A file type specification is defined by the
TYPE FileTypeSpec = RECORD format: FileType; hint: LongInt; flags: TranslationAttributes; catInfoType: OSType; catInfoCreator: OSType; END;
- The translation file type of the document. Macintosh Easy Open uses this field as the canonical way to describe the format of a file for translation purposes.
- A 4-byte value reserved for use by your translation extension.
- A 4-byte value consisting of bit flags that specify how to control the translation. This field is used only for destination file types; you should set it to 0 for all source file type specifications. Currently 2 bits are defined; all other bits should be cleared to 0:CONST taDstDocNeedsResourceFork = 1; taDstIsAppTranslation = 2;
In file type specifications occurring in the list of source document types in a file translation list, Macintosh Easy Open uses the
- Before Macintosh Easy Open sends your translation extension the
kTranslateTranslateFilerequest code, it has already created the destination file's data fork. The bit specified by the constant
taDstDocNeedsResourceForkshould be set if the translated document also needs a resource fork.
- The bit specified by the constant
taDstIsAppTranslationshould be set if your extension doesn't actually perform the translation because an associated application can already translate the specified file type into the desired format. See "Writing Application Translation Extensions" on page 7-35 for more details.
- The type of the file as contained in the volume's catalog file.
- The creator of the file as contained in the volume's catalog file.
catInfoCreatorfields to determine the kind string displayed in the "From" format specification of the translation progress dialog box (see Figure 7-4 on page 7-7).
In file type specifications occurring in the list of destination document types in a file translation list, Macintosh Easy Open uses the
catInfoCreatorfields to determine the kind string displayed in the "To" format specification in the translation progress dialog box (see Figure 7-4 on page 7-7). The
catInfoCreatorfields are also used to get the information displayed in the Document Converter dialog box (Figure 7-7 on page 7-9). However, Macintosh Easy Open uses the
catInfoCreatorfields to set the catalog type and creator of the destination file.
- See page 7-19 for a discussion of why the translation file type described in the
formatfield may differ from the catalog type described in the