home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-09-17 | 4.9 KB | 210 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: Part.r
- // Release Version: $ ODF 2 $
- //
- // Author: Henri Lamiraux
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #define SystemSevenOrBetter 1 // we want the extended types
- #define SystemSevenOrLater 1 // Types.r uses this variable
-
- #include "Types.r"
- #include "SysTypes.r"
- #include "CodeFragmentTypes.r"
-
- #ifndef __ODTYPES_R__
- #include "ODTypes.r"
- #endif
-
- #ifndef FWBLDDEF_H
- #include "FWBldDef.h"
- #endif
-
- #ifndef BINDING_K
- #include "Binding.k"
- #endif
-
- #ifndef DEFINES_K
- #include "Defines.k"
- #endif
-
- // CyberDog is really only supported in Metrowerks builds. Unfortunately,
- // we can't detect that we are in Metrowerks REZ or the Metrowerks ODFRC
- // plugin, so we always define FW_SUPPORTS_CYBERDOG true for resource
- // compiles.
- #ifdef FW_SUPPORTS_CYBERDOG
- #undef FW_SUPPORTS_CYBERDOG
- #endif
-
- #define FW_SUPPORTS_CYBERDOG 1
-
- #if FW_SUPPORTS_CYBERDOG
- // Cyberdog: XXX
- #include "Cyberdog.h"
- #endif
-
- //-------------------------------------------------------------------------------------
- // cfrg Resource
- //-------------------------------------------------------------------------------------
-
- resource 'cfrg' (0) {
- { /* array memberArray: 2 elements */
- /* [1] */
- #ifdef FW_BUILD_MAC68K
- kMotorola,
- #else
- kPowerPC,
- #endif
- kFullLib,
- kNoVersionNum,
- kNoVersionNum,
- kDefaultStackSize,
- kNoAppSubFolder,
- kIsLib,
- kOnDiskFlat,
- kZeroOffset,
- kWholeFork,
- kODFBitmapEditor,
- /* [2] */
- #ifdef FW_BUILD_MAC68K
- kMotorola,
- #else
- kPowerPC,
- #endif
- kFullLib,
- kNoVersionNum,
- kNoVersionNum,
- kDefaultStackSize,
- kNoAppSubFolder,
- kIsLib,
- kOnDiskFlat,
- kZeroOffset,
- kWholeFork,
- "ODFBitmap"
- }
- };
-
- //-------------------------------------------------------------------------------------
- // NMAP Resources
- //-------------------------------------------------------------------------------------
-
- resource kODNameMappings (kKindCategoryMapID) {
- kODKind,
- {
- kODFBitmapKind,
- kODIsAnISOStringList
- {
- {
- kODCategoryPainting
- }
- }
- }
- };
-
- resource kODNameMappings (kEditorKindMapID) {
- kODEditorKinds,
- {
- kODFBitmapEditor,
- kODIsAnISOStringList
- {
- {
- kODFBitmapKind,
- // We also know how to read JPEG-compressed photographic images
- // Note that we don't *externalize* JPEGs, only internalize. For now.
- kJpegKind
- #if FW_SUPPORTS_CYBERDOG
- ,// Cyber-savvy parts are required to include this kind. It's a hack.
- kCyberPartKind
- #endif
- }
- }
- }
- };
-
- resource kODNameMappings (kEditorUserStringMapID) {
- kODEditorUserString,
- {
- kODFBitmapEditor,
- kODIsINTLText
- {
- smRoman, langEnglish, kODFBitmapEditorUserString
- }
- }
- };
-
- /*
- Kind Strings (kODKindUserString)
- These show up in the Editor Setup control panel, and the Document Info dialog.
- */
-
- resource kODNameMappings (kKindUserStringMapID) {
- kODKindUserString,
- {
- kODFBitmapKind, kODIsINTLText {
- smRoman, langEnglish, "Bitmap"
- },
- kJpegKind, kODIsINTLText {
- smRoman, langEnglish, "image/jpeg"
- }
- // We don't specify a user string for kJpegCyberItemKind
- }
- };
-
- /*
- Icon Mapping (kODKindOldMacOSType)
- We are mapping icon families (MacIcons.rsrc) to OpenDoc kinds.
-
- This has nothing to do with data - unlike normal MacOS documents,
- the OSType on an OpenDoc document is meaningless and does
- *absolutely nothing* except tell the Finder what icon to use.
- */
-
- resource kODNameMappings (kOldMacOSTypeMapID) {
- kODKindOldMacOSType,
- {
- kODFBitmapKind, kODIsMacOSType { 'DFBD' },
- kJpegKind, kODIsMacOSType { 'DFBJ' }
- #if FW_SUPPORTS_CYBERDOG
- ,
- kJpegCyberItemKind, kODIsMacOSType { 'uFBJ' }
- #endif
- }
- };
-
- /*
- Importing & Translation (kODEditorPlatformKind)
- This is where we specify foreign data kinds
- In our case we are declaring that we can import:
- Macintosh pictures (via files and drag&drop)
- JPEG images (via files and drag&drop)
-
- It really isn't necessary to import JPEG's via drag&drop since any program
- which exports JPEGs will also export PICT, but it's no trouble.
- */
-
- resource kODNameMappings (kEditorPlatformKinds) {
- kODEditorPlatformKind,
- {
- kODFBitmapEditor, kODIsPltfmTypeSpac {
- {
- kODPlatformFileType, kPICTOSType, smRoman, langEnglish, "Picture File", kODCategoryPainting,
- kODPlatformDataType, kPICTOSType, smRoman, langEnglish, "Picture Data", kODCategoryPainting,
- kODPlatformFileType, kJPEGOSType, smRoman, langEnglish, "JPEG File", kODCategoryPainting,
- kODPlatformDataType, kJPEGOSType, smRoman, langEnglish, "JPEG Data", kODCategoryPainting,
- kODPlatformFileType, kJFIFOSType, smRoman, langEnglish, "JPEG (JFIF) File", kODCategoryPainting,
- kODPlatformDataType, kJFIFOSType, smRoman, langEnglish, "JPEG (JFIF) Data", kODCategoryPainting
- }
- }
- }
- };
-
- include "MacIcons.rsrc" not 'ckid';
- include "Image.Pict" not 'ckid';
- #if FW_SUPPORTS_CYBERDOG
- include "FWSaveAs.rsrc" not 'ckid';
- #endif
-