Make mkfiles.pl less tied to PuTTY in particular, by inventing new
[u/mdw/putty] / mac / mac_res.r
index b0fdd5e..f30c72b 100644 (file)
@@ -1,6 +1,6 @@
-/* $Id: mac_res.r,v 1.19 2003/01/18 17:14:34 ben Exp $ */
+/* $Id: mac_res.r,v 1.40 2004/01/01 16:47:48 simon Exp $ */
 /*
 /*
- * Copyright (c) 1999, 2002 Ben Harris
+ * Copyright (c) 1999, 2002, 2003 Ben Harris
  * All rights reserved.
  *
  * Permission is hereby granted, free of charge, to any person
  * All rights reserved.
  *
  * Permission is hereby granted, free of charge, to any person
 /* Get resource IDs we share with C code */
 #include "macresid.h"
 
 /* Get resource IDs we share with C code */
 #include "macresid.h"
 
-/*
- * Current PuTTY version number.  Minor is in BCD
- */
-#define VERSION_MAJOR 0x00
-#define VERSION_MINOR 0x53
+#include "version.r"
 
 /*
  * Finder-related resources
 
 /*
  * Finder-related resources
@@ -61,23 +57,23 @@ resource 'pTTY' (0, purgeable) {
 
 resource 'SIZE' (-1) {
     reserved,
 
 resource 'SIZE' (-1) {
     reserved,
-    ignoreSuspendResumeEvents,
+    acceptSuspendResumeEvents,
     reserved,
     canBackground,
     reserved,
     canBackground,
-    needsActivateOnFGSwitch,
+    doesActivateOnFGSwitch,
     backgroundAndForeground,
     dontGetFrontClicks,
     ignoreAppDiedEvents,
     is32BitCompatible,
     backgroundAndForeground,
     dontGetFrontClicks,
     ignoreAppDiedEvents,
     is32BitCompatible,
-    notHighLevelEventAware,
-    onlyLocalHLEvents,
-    notStationeryAware,
+    isHighLevelEventAware,
+    localandRemoteHLEvents,
+    isStationeryAware,
     dontUseTextEditServices,
     reserved,
     reserved,
     reserved,
     dontUseTextEditServices,
     reserved,
     reserved,
     reserved,
+    2048 * 1024,       /* Preferred size */
     1024 * 1024,       /* Minimum size */
     1024 * 1024,       /* Minimum size */
-    1024 * 1024,       /* Preferred size */
 };
 
 #define FREF_APPL 128
 };
 
 #define FREF_APPL 128
@@ -142,6 +138,60 @@ resource 'BNDL' (129, purgeable) {
     };
 };
 
     };
 };
 
+/* Open resource, for the Translation Manager and Navigation Services */
+resource 'open' (open_pTTY) {
+    'pTTY',
+    { 'Sess' }
+};
+
+/* Kind resources, for Navigation services etc. */
+resource 'kind' (128) {
+    'pTTY',
+    verBritain,
+    {
+       'Sess', "PuTTY saved session",
+    }
+};
+
+resource 'kind' (129) {
+    'pTTI',
+    verBritain,
+    {
+       'HKey', "PuTTY host key database",
+       'Seed', "PuTTY random number seed",
+    }
+};
+
+#if TARGET_API_MAC_CARBON
+/*
+ * Mac OS X Info.plist.
+ * See Tech Note TN2013 for details.
+ * We don't bother with things that Mac OS X seems to be able to get from
+ * other resources.
+ */
+type 'plst' as 'TEXT';
+
+resource 'plst' (0) {
+    "<?xml version='1.0' encoding='UTF-8'?>\n"
+    "<!DOCTYPE plist PUBLIC '-//Apple Computer//DTD PLIST 1.0//EN'\n"
+    " 'http://www.apple.com/DTDs/PropertyList-1.0.dtd'>\n"
+    "<plist version='1.0'>\n"
+    "  <dict>\n"
+    "    <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string>\n"
+    "    <key>CFBundleIdentifier</key>\n"
+    "      <string>org.tartarus.projects.putty.putty</string>\n"
+    "    <key>CFBundleName</key>                  <string>PuTTY</string>\n"
+    "    <key>CFBundlePackageType</key>           <string>APPL</string>\n"
+    "    <key>CFBundleSignature</key>             <string>pTTY</string>\n"
+    "  </dict>\n"
+    "</plist>\n"
+};
+
+/* Mac OS X doesn't use this, but Mac OS 9 does. */
+type 'carb' as 'TEXT';
+resource 'carb' (0) { "" };
+#endif
+
 /* Icons, courtesy of DeRez */
 
 /* Application icon */
 /* Icons, courtesy of DeRez */
 
 /* Application icon */
@@ -790,54 +840,6 @@ resource 'ics8' (FREF_Seed) {
        $"00FFFFFFFFFFFFFFFFFFFFFFFFFF"
 };
 
        $"00FFFFFFFFFFFFFFFFFFFFFFFFFF"
 };
 
-resource 'vers' (1, purgeable) {
-    /* XXX This needs to be updated for each new version */
-    VERSION_MAJOR, VERSION_MINOR,
-#ifdef RELEASE
-    beta,
-#else
-    development,
-#endif
-    0, /* No prerelease version */
-    verBritain,
-#ifdef RELEASESTR
-    RELEASESTR,
-    "Release " RELEASESTR,
-#else
-#ifdef SNAPSHOTSTR
-    SNAPSHOTSTR,
-    "Development snapshot " SNAPSHOTSTR,
-#else
-    "unknown",
-    "Unidentified build, " $$Date " " $$Time,
-#endif
-#endif
-};
-
-resource 'vers' (2, purgeable) {
-    /* XXX This needs to be updated for each new version */
-    VERSION_MAJOR, VERSION_MINOR,
-#ifdef RELEASE
-    beta,
-#else
-    development,
-#endif
-    0, /* No prerelease version */
-    verBritain,
-#ifdef RELEASESTR
-    RELEASESTR,
-    "PuTTY " RELEASESTR,
-#else
-#ifdef SNAPSHOTSTR
-    SNAPSHOTSTR,
-    "PuTTY snapshot " SNAPSHOTSTR,
-#else
-    "unknown",
-    "PuTTY",
-#endif
-#endif
-};
-
 /*
  * Resources to copy into created files
  */
 /*
  * Resources to copy into created files
  */
@@ -875,7 +877,7 @@ resource 'TMPL' (TMPL_Int, "Int ", purgeable) {
 /* Menu bar */
 
 resource 'MBAR' (MBAR_Main, preload) {
 /* Menu bar */
 
 resource 'MBAR' (MBAR_Main, preload) {
-    { mApple, mFile, mEdit }
+    { mApple, mFile, mEdit, mWindow }
 };
 
 resource 'MENU' (mApple, preload) {
 };
 
 resource 'MENU' (mApple, preload) {
@@ -893,15 +895,17 @@ resource 'MENU' (mApple, preload) {
 resource 'MENU' (mFile, preload) {
     mFile,
     textMenuProc,
 resource 'MENU' (mFile, preload) {
     mFile,
     textMenuProc,
-    0b11111111111111111111111111011111,
+    0b11111111111111111111111101111011,
     enabled,
     "Session",
     {
        "New",                  noicon, "N",   nomark, plain,
        "Open\0xc9",            noicon, "O",   nomark, plain,
     enabled,
     "Session",
     {
        "New",                  noicon, "N",   nomark, plain,
        "Open\0xc9",            noicon, "O",   nomark, plain,
+       "-",                    noicon, nokey, nomark, plain,
        "Close",                noicon, "W",   nomark, plain,
        "Save",                 noicon, "S",   nomark, plain,
        "Save As\0xc9",         noicon, nokey, nomark, plain,
        "Close",                noicon, "W",   nomark, plain,
        "Save",                 noicon, "S",   nomark, plain,
        "Save As\0xc9",         noicon, nokey, nomark, plain,
+       "Duplicate",            noicon, "D",   nomark, plain,
        "-",                    noicon, nokey, nomark, plain,
        "Quit",                 noicon, "Q",   nomark, plain,
     }
        "-",                    noicon, nokey, nomark, plain,
        "Quit",                 noicon, "Q",   nomark, plain,
     }
@@ -924,6 +928,17 @@ resource 'MENU' (mEdit, preload) {
     }
 };
 
     }
 };
 
+resource 'MENU' (mWindow, preload) {
+    mWindow,
+    textMenuProc,
+    0b11111111111111111111111111111111,
+    enabled,
+    "Window",
+    {
+       "Show Event Log",       noicon, nokey, nomark, plain,
+    }
+};
+
 /* Fatal error box.  Stolen from the Finder. */
 
 resource 'ALRT' (wFatal, "fatalbox", purgeable) {
 /* Fatal error box.  Stolen from the Finder. */
 
 resource 'ALRT' (wFatal, "fatalbox", purgeable) {
@@ -956,6 +971,38 @@ resource 'DITL' (wFatal, "fatalbox", purgeable) {
        }
 };
 
        }
 };
 
+/* Caution box.  Stolen from the Finder. */
+
+resource 'ALRT' (wQuestion, "questionbox", purgeable) {
+       {54, 67, 152, 435},
+       wQuestion,
+       beepStages,
+       alertPositionMainScreen
+};
+
+resource 'DITL' (wQuestion, "fatalbox", purgeable) {
+       {       /* array DITLarray: 3 elements */
+               /* [1] */
+               {68, 299, 88, 358},
+               Button {
+                       enabled,
+                       "OK"
+               },
+               /* [2] */
+               {68, 227, 88, 286},
+               Button {
+                       enabled,
+                       "Cancel"
+               },
+               /* [3] */
+               {7, 74, 55, 358},
+               StaticText {
+                       disabled,
+                       "^0"
+               }
+       }
+};
+
 /* Terminal window */
 
 resource 'WIND' (wTerminal, "terminal", purgeable) {
 /* Terminal window */
 
 resource 'WIND' (wTerminal, "terminal", purgeable) {
@@ -976,30 +1023,27 @@ resource 'CNTL' (cVScroll, "vscroll", purgeable) {
 
 /* Settings dialogue */
 
 
 /* Settings dialogue */
 
-resource 'DLOG' (wSettings, "settings", purgeable) {
-    { 0, 0, 46, 240 },
+resource 'WIND' (wSettings, "settings", purgeable) {
+    { 0, 0, 432, 626 },
     noGrowDocProc,
     invisible,
     goAway,
     noGrowDocProc,
     invisible,
     goAway,
-    wSettings,
-    wSettings,
-    "Settings",
+    0x0,
+    "untitled",
     staggerParentWindowScreen
 };
 
     staggerParentWindowScreen
 };
 
-resource 'dlgx' (wSettings, "settings", purgeable) {
-    versionZero {
-       kDialogFlagsUseThemeBackground | kDialogFlagsUseThemeControls
-    }
+/* Event log */
+resource 'WIND' (wEventLog, "event log", purgeable) {
+    { 0, 0, 200, 200 },
+    zoomDocProc,
+    invisible,
+    goAway,
+    0x0,
+    "PuTTY Event Log",
+    staggerParentWindowScreen
 };
 
 };
 
-resource 'DITL' (wSettings, "settings", purgeable) {
-    {
-       { 13, 13, 33, 227 },
-       Button { enabled, "Open" },
-    }
-};        
-
 /* "About" box */
 
 resource 'DLOG' (wAbout, "about", purgeable) {
 /* "About" box */
 
 resource 'DLOG' (wAbout, "about", purgeable) {
@@ -1048,11 +1092,11 @@ type 'TEXT' {
 };
 
 resource 'TEXT' (wLicence, "licence", purgeable) {
 };
 
 resource 'TEXT' (wLicence, "licence", purgeable) {
-    "PuTTY is copyright 1997-2003 Simon Tatham.\n"
+    "PuTTY is copyright 1997-2004 Simon Tatham.\n"
     "\n"
     "Portions copyright Robert de Bath, Joris van Rantwijk, Delian"
     "Delchev, Andreas Schultz, Jeroen Massar, Wez Furlong, Nicolas Barry,"
     "\n"
     "Portions copyright Robert de Bath, Joris van Rantwijk, Delian"
     "Delchev, Andreas Schultz, Jeroen Massar, Wez Furlong, Nicolas Barry,"
-    "Justin Bradford, and CORE SDI S.A.\n"
+    "Justin Bradford, Ben Harris, and CORE SDI S.A.\n"
     "\n"    
     "Permission is hereby granted, free of charge, to any person "
     "obtaining a copy of this software and associated documentation "
     "\n"    
     "Permission is hereby granted, free of charge, to any person "
     "obtaining a copy of this software and associated documentation "
@@ -1075,3 +1119,28 @@ resource 'TEXT' (wLicence, "licence", purgeable) {
     "CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE "
     "SOFTWARE."
 };
     "CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE "
     "SOFTWARE."
 };
+
+/* Custom xDEFs */
+
+data 'CDEF' (CDEF_EditBox) {
+    $"4EF9 00000000"
+};
+data 'CDEF' (CDEF_Default) {
+    $"4EF9 00000000"
+};
+data 'CDEF' (CDEF_ListBox) {
+    $"4EF9 00000000"
+};
+
+/* List box template */
+
+resource 'ldes' (ldes_Default) {
+    versionZero {
+       0, /* rows */
+       1, /* cols */
+       0, 0, /* default cell size */
+       hasVertScroll, noHorizScroll,
+       0, /* LDEF number */
+       noGrowSpace
+    }
+};
\ No newline at end of file