Important: The information in this document is obsolete and should not be used for new development.
File Type Specifications
You 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 theFileTypeSpecdata structure.
TYPE FileTypeSpec = RECORD format: FileType; hint: LongInt; flags: TranslationAttributes; catInfoType: OSType; catInfoCreator: OSType; END;
Field Description
format- 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.
hint- A 4-byte value reserved for use by your translation extension.
flags- 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 constanttaDstDocNeedsResourceForkshould 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.catInfoType- The type of the file as contained in the volume's catalog file.
catInfoCreator- The creator of the file as contained in the volume's catalog file.
formatandcatInfoCreatorfields 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
formatandcatInfoCreatorfields 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). TheformatandcatInfoCreatorfields 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 thecatInfoTypeandcatInfoCreatorfields to set the catalog type and creator of the destination file.
- Note
- 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 thecatInfoTypefield.![]()