home *** CD-ROM | disk | FTP | other *** search
/ MacFormat UK 86 / MF_UK_86_1.iso / Shareware Plus / Utilities / Reaper 132 / Source Code / Reaper.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-11-21  |  2.1 KB  |  109 lines  |  [TEXT/CWIE]

  1. #ifndef        _ReaperH
  2. #define        _ReaperH    TRUE
  3.  
  4. #include    "911.h"
  5.  
  6.  
  7.  
  8. enum ReaperIDs
  9.  {
  10.     igsReaper            = 'Reáp'
  11.  };
  12.  
  13.  
  14. enum ReaperPrefVers
  15.  {
  16.     kvrReaper1            = 0x0100,
  17.  
  18.     kvrReaperMinCompat    = kvrReaper1,
  19.     kvrReaperCurrent    = kvrReaper1
  20.  };
  21.  
  22.  
  23.  
  24. typedef struct BadAppRec        BadApp, * badApp, ** BADAPP;
  25. typedef struct AppItemRec        AppItem, * appItem, ** APPITEM;
  26.  
  27. enum BadAppItemFlags
  28.  {
  29.     bbaFixFCB                = (1 << 6),        // Allow read access to LMGetFCBSPtr()
  30.     bbaRun68K                = (1 << 5),        // Give errResNotFound on 'cfrg' when launched
  31.     bbaLimitHeap            = (1 << 4),        // Limit temp allocation to double app heap size (HP PrintMonitor)
  32.     bbaSmartHeap            = (1 << 3),        // Allocate handles > 1/8th of heap size in temp mem
  33.     bbaExpand                = (1 << 2),        // Expand heap with temp mem
  34.     bbaByName                = (1 << 1),        // Recognize by name
  35.     bbaOnlyIfROM            = (1 << 0)        // Only if from Read-Only Volume
  36.  };
  37.  
  38. enum BadAppFlags
  39.  {
  40.     bapUnused                = (1 << 0)
  41.  };
  42.  
  43. #pragma options align=mac68k
  44.  
  45. struct AppItemRec
  46.  {
  47.     OSType        creator;
  48.     short        reap;        // < 0 = % to increase, > 0 = 16 KBs to increase
  49.     flag16        flags;        // Turn these on
  50.  };
  51.  
  52. struct BadAppRec
  53.  {
  54.     word        version;
  55.     short        reapROM;    // Default for read-only
  56.     ident        id;            // igsReaper
  57.     short        reapRWM;    // Default for all others
  58.     short        cnt;
  59.     AppItem        item[1];
  60.     // Followed by SLUT of item names
  61.  };
  62.  
  63. #define    mcPrefSlutOffset(ba)    ((sizeof(BadApp) - sizeof(AppItem)) + ((ba)->cnt * sizeof(AppItem)))
  64. #define    mcPrefSlut(ba)            mcPrefSlutX((ba)->item, (ba)->cnt)
  65. #define    mcPrefSlutX(i, n)        ((slut)((Ptr)(i) + ((n) * sizeof(AppItem))))
  66.  
  67. #pragma options align=reset
  68.  
  69.  
  70.  
  71.  
  72.  
  73. typedef struct ReaperGloRec    ReaperGlo, * reaperGlo, ** REAPERGLO;
  74.  
  75.  
  76. enum ReaperGloBits
  77.  {
  78.     brpIsLaunchingBit        = 0,
  79.     brpInOpenPictureBit
  80.  };
  81.  
  82.  
  83. enum ReaperGloFlags
  84.  {
  85.     brpInOpenPicture    = (1 << brpInOpenPictureBit),
  86.     brpIsLaunching        = (1 << brpIsLaunchingBit)
  87.  };
  88.  
  89.  
  90. #pragma options align=mac68k
  91.  
  92. struct ReaperGloRec
  93.  {
  94.     ident            id;            // = igsReaper
  95.     word            version;
  96.     flag16            flags;        // brp… flags
  97.     BADAPP            prefs;        // Other app infos
  98.     FCBSPtrProc        nextFCBP;    // Zone of temporary memory
  99.  };
  100.  
  101. #pragma options align=reset
  102.  
  103.  
  104.  
  105. #include    "Reaper Utils.proto.h"
  106.  
  107.  
  108. #endif    //    Already included
  109.