home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc / OpenDoc Development / Debugging Support / OpenDoc™ Source Code / DocShell / DocStub.r < prev    next >
Encoding:
Text File  |  1996-08-28  |  7.0 KB  |  233 lines  |  [TEXT/MPS ]

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