home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 October: Mac OS SDK / Dev.CD Oct 96 SDK / Dev.CD Oct 96 SDK2.toast / Development Kits (Disc 2) / OpenDoc / OpenDoc Development / Debugging Support / OpenDoc Source Code / DocShell / DocStub.r < prev    next >
Encoding:
Text File  |  1996-04-22  |  6.8 KB  |  230 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        DocStub.r
  3.  
  4.     Contains:    Resources for the document stub application
  5.  
  6.     Owned by:    Tantek Çelik
  7.  
  8.     Copyright:    © 1993 - 1995 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     Change History (most recent first):
  11.  
  12.         <12>     9/29/95    eeh        1287262: use ShellDef.h
  13.         <11>     8/12/95    TÇ        1276809 Optimization: lower stack size to
  14.                                     64K and default heap size to 384K
  15.         <10>     8/11/95    jpa        Rename doc-stub fragment "DocStub"
  16.                                     [1276412]
  17.          <9>     6/30/95    TÇ        Changed default default document heap size
  18.                                     to 768K.
  19.          <8>      6/8/95    RR        #1257260 Collapse base classes. #1214898
  20.                                     StdTypes.r -> ODTypes.r
  21.          <7>     5/25/95    jpa        No more CODE 7. [1241078]
  22.          <6>     3/16/95    TÇ        #1228587 Can't run OD on w/8MB RAM (not
  23.                                     finished!)
  24.          <5>      1/6/95    jpa        Get code rsrcs from new libs [1196515]
  25.          <4>    10/20/94    NP        1159233: read statement seems to be working
  26.                                     now. Removed full path name.
  27.          <3>    10/10/94    TÇ        #1191470 Need both 68K and PPC document
  28.                                     stub application
  29.          <2>     10/7/94    TÇ        #1191470 Need both 68K and PPC document
  30.                                     stub application
  31.          <1>     10/7/94    TÇ        first checked in
  32. */
  33.  
  34. #ifndef _SHELLDEF_
  35. #include "ShellDef.h"
  36. #endif
  37.  
  38. #ifndef SOM_Module_OpenDoc_StdDefs_defined
  39. #include "StdDefs.r"
  40. #endif // _STDDEFS_
  41.  
  42.  
  43. //====================================================================================
  44. // Code Resources for document launching
  45. //====================================================================================
  46.  
  47. include "DocStubCode68k" ;
  48.  
  49. // I don't get it. Rez is not finding the below file unless we give it a full path name
  50. // even though it found it above in the include statement without a full path.  Hmmm...
  51. // NP-seems to be working now. Maybe the latest tools fixed it. 10/20/94 (rez V3.4d1)
  52.  
  53. read kMainCFMType (kMainCFMPPCID)    "DocStubCodePPC";
  54. read kMainCFMType (kSOMMemCFM68KID) "SOMMem68k";
  55. read kMainCFMType (kSOMMemCFMPPCID) "SOMMemPPC";
  56.  
  57. //====================================================================================
  58. // Other (nonexecutable) document resources
  59. //====================================================================================
  60.  
  61. #define SystemSevenOrBetter 1            // we want the extended types
  62. #define    SystemSevenOrLater    1            // Types.r uses this variable
  63.  
  64. #ifndef __TYPES_R__
  65. #include "Types.r"
  66. #endif
  67.  
  68. #ifndef __SYSTYPES_R__
  69. #include "SysTypes.r"
  70. #endif
  71.  
  72. #ifndef __AEWIDEUSERTERMTYPES__
  73. #include "AEUserTermTypes.r"
  74. #endif
  75.  
  76. #ifndef __CODEFRAGMENTTYPES__
  77. #include "CodeFragmentTypes.r"
  78. #define __CODEFRAGMENTTYPES__
  79. // The .r file itself does not define the symbol -- naughty!
  80. #endif
  81.  
  82.  
  83. //-------------------------------------------------------------------------------------
  84. // SIZE Resource
  85. // Size -1 resource for all OpenDoc documents
  86. //-------------------------------------------------------------------------------------
  87.  
  88.  RESOURCE 'SIZE' (-1) {
  89.     reserved,
  90.     acceptSuspendResumeEvents,
  91.     reserved,
  92.     canBackground,
  93.     doesActivateOnFGSwitch,
  94.     backgroundAndForeground,
  95.     dontGetFrontClicks,
  96.     acceptChildDiedEvents,        // necessary in case "New" command fails to launch doc
  97.     is32BitCompatible,
  98.     isHighLevelEventAware,
  99.     localAndRemoteHLEvents,
  100.     isStationeryAware,
  101.     dontUseTextEditServices,
  102.     reserved,
  103.     reserved,
  104.     reserved,
  105.     kDocStubDefaultSize,    
  106.     kDocStubMinHeapSize
  107. };
  108.  
  109. //-------------------------------------------------------------------------------------
  110. // scsz resource for AppleScript
  111. //-------------------------------------------------------------------------------------
  112.  
  113. resource 'scsz' (kscszID) {        // <eeh> was 129, but that didn't seem to work
  114.     readExtensionTerms,        // was dontReadExtensionTerms; why?
  115.     findAppBySignature,
  116.     alwaysSendSubject,
  117.     reserved,
  118.     reserved,
  119.     reserved,
  120.     reserved,
  121.     reserved,
  122.     reserved,
  123.     reserved,
  124.     reserved,
  125.     reserved,
  126.     reserved,
  127.     reserved,
  128.     reserved,
  129.     reserved,
  130.     8,
  131.     8,
  132.     8,
  133.     368640,
  134.     368640,
  135.     368640
  136. };
  137.  
  138.  
  139. //-------------------------------------------------------------------------------------
  140. // Code-fragment resource (cfrg)
  141. //-------------------------------------------------------------------------------------
  142.  
  143. resource 'cfrg' (kcfrgID) {
  144.     {
  145.         /* [1] Main document PPC code */
  146.         kPowerPC,
  147.         kFullLib,
  148.         kNoVersionNum,
  149.         kNoVersionNum,
  150.         kDocStubStackSize,
  151.         kNoAppSubFolder,
  152.         kIsApp,
  153.         kOnDiskSegmented,
  154.         kMainCFMType,
  155.         kMainCFMPPCID,
  156.         "DocumentStub",
  157.         
  158.         /* [2] Main document 68k code */
  159.         kMotorola,
  160.         kFullLib,
  161.         kNoVersionNum,
  162.         kNoVersionNum,
  163.         kDocStubStackSize,
  164.         kNoAppSubFolder,
  165.         kIsApp,
  166.         kOnDiskSegmented,
  167.         kMainCFMType,
  168.         kMainCFM68KID,
  169.         "DocumentStub",
  170.         
  171.         /* [3] SOMCustomMemoryMgr PPC lib */
  172.         kPowerPC,
  173.         kFullLib,
  174.         0,                     /*Erik sez use 1, but that doesn't work*/
  175.         kNoVersionNum,
  176.         4096,                /* was kDefaultStackSize */
  177.         kNoAppSubFolder,
  178.         kIsLib,
  179.         kOnDiskSegmented,
  180.         kMainCFMType,
  181.         kSOMMemCFMPPCID,
  182.         "SOMCustomMemoryMgr",
  183.         
  184.         /* [4] SOMCustomMemoryMgr 68k lib  */
  185.         kMotorola,
  186.         kFullLib,
  187.         0,                     /*Erik sez use 1, but that doesn't work*/
  188.         kNoVersionNum,
  189.         4096,                /* was kDefaultStackSize */
  190.         kNoAppSubFolder,
  191.         kIsLib,
  192.         kOnDiskSegmented,
  193.         kMainCFMType,
  194.         kSOMMemCFM68KID,
  195.         "SOMCustomMemoryMgr"
  196.     }
  197. };
  198.  
  199.  
  200. //====================================================================================
  201. // Finally convert all the resources into 'DSTB' resources:
  202. //====================================================================================
  203.  
  204. // Document Stub Data                    Document Stub App
  205. // kDocStubRsrcType kDocStubRsrcID0        kcfrgRsrcType    kcfrgID
  206. // kDocStubRsrcType kDocStubRsrcID1        kMainCFMType    kMainCFMPPCID
  207. // kDocStubRsrcType kDocStubRsrcID2        kscszRsrcType    kscszID
  208. // kDocStubRsrcType kDocStubRsrcID3        kMainCFMType     kMainCFM68KID
  209. // kDocStubRsrcType kDocStubRsrcID4        kMainCFMType     kMainCFM68KID1
  210. // kDocStubRsrcType kDocStubRsrcID5        kCODERsrcType    kCODEID0
  211. // kDocStubRsrcType kDocStubRsrcID6        kCODERsrcType    kCODEID1
  212. // kDocStubRsrcType kDocStubRsrcID7        kCODERsrcType     kCODEID6
  213. // kDocStubRsrcType kDocStubRsrcID8        kMainCFMType     kSOMMemCFM68KID
  214. // kDocStubRsrcType kDocStubRsrcID9        kMainCFMType     kSOMMemCFMPPCID
  215. // kSIZERsrcType     kDocStubSIZEID        kSIZERsrcType    kSIZEID
  216.  
  217. Change kSIZERsrcType (kSIZEID)        to kSIZERsrcType    (kDocStubSIZEID);
  218. Change kcfrgRsrcType (kcfrgID)         to kDocStubRSRCType (kDocStubRsrcID0);
  219. Change kMainCFMType    (kMainCFMPPCID) to kDocStubRSRCType (kDocStubRsrcID1);
  220. Change kscszRsrcType (kscszID)         to kDocStubRSRCType (kDocStubRsrcID2);
  221. Change kMainCFMType (kMainCFM68KID) to kDocStubRSRCType (kDocStubRsrcID3);
  222. Change kMainCFMType (kMainCFM68KID1) to kDocStubRSRCType (kDocStubRsrcID4);
  223. Change kCODERsrcType (kCODEID0)     to kDocStubRSRCType (kDocStubRsrcID5);
  224. Change kCODERsrcType (kCODEID1)     to kDocStubRSRCType (kDocStubRsrcID6);
  225. Change kCODERsrcType (kCODEID6)     to kDocStubRSRCType (kDocStubRsrcID7);
  226. // Change kCODERsrcType (kCODEID7)     to kDocStubRSRCType (kDocStubRsrcID8);
  227. // In CFM68K a3 there is no longer a CODE 7 generated for DocStub68K.
  228. Change kMainCFMType (kSOMMemCFM68KID) to kDocStubRSRCType (kDocStubRsrcID8);
  229. Change kMainCFMType (kSOMMemCFMPPCID) to kDocStubRSRCType (kDocStubRsrcID9);
  230.