Jack Jansen | c2e6dd8 | 1995-08-14 12:34:42 +0000 | [diff] [blame] | 1 | /* |
| 2 | ** Resource-IDs in use by Python. |
| 3 | ** |
| 4 | ** All resources used by the python interpreter itself fall |
| 5 | ** in the range 128-256. |
| 6 | ** |
| 7 | ** Standard python modules use resources in the range |
| 8 | ** 256-512. |
| 9 | ** |
| 10 | ** Python programs that use their own resources are advised to |
| 11 | ** choose resource numbers higher than 512. |
| 12 | */ |
| 13 | |
| 14 | /* |
| 15 | ** Resources that reside in the python executable (or, for |
| 16 | ** shared ppc python, in the core dynamic library) |
| 17 | */ |
| 18 | |
Jack Jansen | 41fa7ea | 1995-08-31 13:59:36 +0000 | [diff] [blame] | 19 | /* The alert for "No Python directory, where is it?" (OBSOLETE) */ |
| 20 | #define NOPYTHON_ALERT 128 |
| 21 | #define YES_ITEM 1 |
| 22 | #define NO_ITEM 2 |
| 23 | #define CURWD_ITEM 3 |
Jack Jansen | c2e6dd8 | 1995-08-14 12:34:42 +0000 | [diff] [blame] | 24 | |
| 25 | /* The alert for "this is an applet template" */ |
Jack Jansen | 41fa7ea | 1995-08-31 13:59:36 +0000 | [diff] [blame] | 26 | #define NOPYC_ALERT 129 |
Jack Jansen | c2e6dd8 | 1995-08-14 12:34:42 +0000 | [diff] [blame] | 27 | |
| 28 | /* The dialog for our GetDirectory and PromptGetFile call */ |
Jack Jansen | 41fa7ea | 1995-08-31 13:59:36 +0000 | [diff] [blame] | 29 | #define GETDIR_ID 130 /* Resource ID for our "get directory" */ |
Jack Jansen | c2e6dd8 | 1995-08-14 12:34:42 +0000 | [diff] [blame] | 30 | #define GETFILEPROMPT_ID 132 /* Resource id for prompted get file */ |
Jack Jansen | 41fa7ea | 1995-08-31 13:59:36 +0000 | [diff] [blame] | 31 | #define PROMPT_ITEM 10 /* The prompt, at the top */ |
| 32 | #define SELECTCUR_ITEM 11 /* "Select current directory" button */ |
Jack Jansen | c2e6dd8 | 1995-08-14 12:34:42 +0000 | [diff] [blame] | 33 | |
| 34 | |
| 35 | /* The dialog for interactive options */ |
| 36 | #define OPT_DIALOG 131 /* Resource ID for dialog */ |
| 37 | #define OPT_OK 1 |
| 38 | #define OPT_CANCEL 2 |
| 39 | #define OPT_INSPECT 3 |
| 40 | #define OPT_VERBOSE 4 |
| 41 | #define OPT_SUPPRESS 5 |
| 42 | #define OPT_UNBUFFERED 6 |
| 43 | #define OPT_DEBUGGING 7 |
Jack Jansen | 0168f27 | 1995-10-27 13:32:30 +0000 | [diff] [blame] | 44 | #define OPT_KEEPNORMAL 8 |
| 45 | #define OPT_KEEPERROR 9 |
Jack Jansen | e355c45 | 1996-03-12 13:29:04 +0000 | [diff] [blame] | 46 | #define OPT_CMDLINE 10 |
Jack Jansen | c2e6dd8 | 1995-08-14 12:34:42 +0000 | [diff] [blame] | 47 | |
Jack Jansen | 41fa7ea | 1995-08-31 13:59:36 +0000 | [diff] [blame] | 48 | /* Dialog for 'No preferences directory' */ |
| 49 | #define NOPREFDIR_ID 133 |
| 50 | |
| 51 | /* Dialog for 'Create preferences file?' */ |
| 52 | #define NOPREFFILE_ID 134 |
| 53 | #define NOPREFFILE_YES 1 |
| 54 | #define NOPREFFILE_NO 2 |
| 55 | |
| 56 | /* Dialog for 'Bad preference file' */ |
| 57 | #define BADPREFFILE_ID 135 |
| 58 | |
Jack Jansen | 3469e99 | 1996-09-06 00:30:45 +0000 | [diff] [blame] | 59 | /* About box */ |
| 60 | #define ABOUT_ID 136 |
| 61 | |
Jack Jansen | d081b13 | 1996-10-22 15:24:21 +0000 | [diff] [blame] | 62 | /* No preferences file name resource */ |
| 63 | #define NOPREFNAME_ID 137 |
| 64 | |
Jack Jansen | a58d89e | 1996-10-11 13:19:52 +0000 | [diff] [blame] | 65 | /* EditPythonPrefs range. Needed here to forestall conflicts with applets */ |
Jack Jansen | a83caa0 | 1996-12-23 17:23:23 +0000 | [diff] [blame] | 66 | #define EDITPYTHONPREFS_MIN 508 |
Jack Jansen | a58d89e | 1996-10-11 13:19:52 +0000 | [diff] [blame] | 67 | #define EDITPYTHONPREFS_MAX 511 |
Jack Jansen | a83caa0 | 1996-12-23 17:23:23 +0000 | [diff] [blame] | 68 | /* twit range. Again needed to forestall conflicts with scripts using their own resources */ |
| 69 | #define TWIT_MIN 500 |
| 70 | #define TWIT_MAX 507 |
Jack Jansen | a58d89e | 1996-10-11 13:19:52 +0000 | [diff] [blame] | 71 | |
Jack Jansen | c2e6dd8 | 1995-08-14 12:34:42 +0000 | [diff] [blame] | 72 | /* |
| 73 | ** The following are valid both in the binary (or shared library) |
Jack Jansen | ab69eb9 | 1996-04-04 15:39:42 +0000 | [diff] [blame] | 74 | ** and in the Preferences file. |
Jack Jansen | 3d22887 | 1996-09-06 22:18:40 +0000 | [diff] [blame] | 75 | ** For all these the override is tried first, in the application resource fork |
| 76 | ** only, this allows an applet to override standard settings. |
| 77 | ** If there is no override resource the preferences file is added to the head |
| 78 | ** of the resource file chain and the non-override version of the resource is |
| 79 | ** searched in any resource file. |
| 80 | ** |
| 81 | ** The effect of this is that, for example, a 'Popt' of 128 in the application or |
| 82 | ** shared library provides default options for use when no preferences are set, |
| 83 | ** while a 'Popt' of 129 (in the application *only*) overrides any options in the |
| 84 | ** preferences file. |
Jack Jansen | c2e6dd8 | 1995-08-14 12:34:42 +0000 | [diff] [blame] | 85 | */ |
| 86 | |
Jack Jansen | d081b13 | 1996-10-22 15:24:21 +0000 | [diff] [blame] | 87 | /* The STR resource that holds the preference file name */ |
| 88 | /* #define PREFFILENAME_ID 128 */ |
| 89 | #define PREFFILENAME_NAME "\pPythonPreferenceFileName" |
| 90 | |
Jack Jansen | c2e6dd8 | 1995-08-14 12:34:42 +0000 | [diff] [blame] | 91 | /* The STR# resource for sys.path initialization */ |
| 92 | #define PYTHONPATH_ID 128 |
Jack Jansen | ab69eb9 | 1996-04-04 15:39:42 +0000 | [diff] [blame] | 93 | #define PYTHONPATHOVERRIDE_ID 129 |
Jack Jansen | c2e6dd8 | 1995-08-14 12:34:42 +0000 | [diff] [blame] | 94 | |
| 95 | /* The alis resource for locating the python home directory */ |
| 96 | #define PYTHONHOME_ID 128 |
Jack Jansen | ab69eb9 | 1996-04-04 15:39:42 +0000 | [diff] [blame] | 97 | #define PYTHONHOMEOVERRIDE_ID 129 |
Jack Jansen | a4b7e14 | 1996-02-21 16:46:57 +0000 | [diff] [blame] | 98 | |
| 99 | /* The Python options resource and offset of its members */ |
| 100 | #define PYTHONOPTIONS_ID 128 |
Jack Jansen | ab69eb9 | 1996-04-04 15:39:42 +0000 | [diff] [blame] | 101 | #define PYTHONOPTIONSOVERRIDE_ID 129 |
Jack Jansen | a4b7e14 | 1996-02-21 16:46:57 +0000 | [diff] [blame] | 102 | #define POPT_INSPECT 0 |
| 103 | #define POPT_VERBOSE 1 |
| 104 | #define POPT_SUPPRESS 2 |
| 105 | #define POPT_UNBUFFERED 3 |
| 106 | #define POPT_DEBUGGING 4 |
| 107 | #define POPT_KEEPNORM 5 |
| 108 | #define POPT_KEEPERR 6 |
Jack Jansen | 3d22887 | 1996-09-06 22:18:40 +0000 | [diff] [blame] | 109 | #define POPT_NOINTOPT 7 /* Not settable interactively */ |
| 110 | #define POPT_NOARGS 8 /* Not settable interactively */ |
Jack Jansen | 01fbc68 | 1996-02-28 15:42:47 +0000 | [diff] [blame] | 111 | |
Jack Jansen | 7d5f9e8 | 1996-09-07 17:09:31 +0000 | [diff] [blame] | 112 | typedef struct PyMac_PrefRecord { |
| 113 | unsigned char inspect; |
| 114 | unsigned char verbose; |
| 115 | unsigned char suppress_print; |
| 116 | unsigned char unbuffered; |
| 117 | unsigned char debugging; |
| 118 | unsigned char keep_normal; |
| 119 | unsigned char keep_error; |
| 120 | unsigned char nointopt; |
| 121 | unsigned char noargs; |
| 122 | } PyMac_PrefRecord; |
| 123 | |
Jack Jansen | 3d22887 | 1996-09-06 22:18:40 +0000 | [diff] [blame] | 124 | /* The GUSI options resources */ |
| 125 | #define GUSIOPTIONS_ID 10240 |
| 126 | #define GUSIOPTIONSOVERRIDE_ID 10241 |
Jack Jansen | 3469e99 | 1996-09-06 00:30:45 +0000 | [diff] [blame] | 127 | |
Jack Jansen | 01fbc68 | 1996-02-28 15:42:47 +0000 | [diff] [blame] | 128 | /* From macgetpath.c: */ |
Jack Jansen | 7d5f9e8 | 1996-09-07 17:09:31 +0000 | [diff] [blame] | 129 | void PyMac_PreferenceOptions Py_PROTO((PyMac_PrefRecord *)); |
Jack Jansen | 01fbc68 | 1996-02-28 15:42:47 +0000 | [diff] [blame] | 130 | |
Jack Jansen | a4b7e14 | 1996-02-21 16:46:57 +0000 | [diff] [blame] | 131 | |