blob: c783628736aad071237548d7ee1c6f818879c783 [file] [log] [blame]
Jack Jansenc2e6dd81995-08-14 12:34:42 +00001/*
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 Jansen41fa7ea1995-08-31 13:59:36 +000019/* 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 Jansenc2e6dd81995-08-14 12:34:42 +000024
25/* The alert for "this is an applet template" */
Jack Jansen41fa7ea1995-08-31 13:59:36 +000026#define NOPYC_ALERT 129
Jack Jansenc2e6dd81995-08-14 12:34:42 +000027
28/* The dialog for our GetDirectory and PromptGetFile call */
Jack Jansen41fa7ea1995-08-31 13:59:36 +000029#define GETDIR_ID 130 /* Resource ID for our "get directory" */
Jack Jansenc2e6dd81995-08-14 12:34:42 +000030#define GETFILEPROMPT_ID 132 /* Resource id for prompted get file */
Jack Jansen41fa7ea1995-08-31 13:59:36 +000031#define PROMPT_ITEM 10 /* The prompt, at the top */
32#define SELECTCUR_ITEM 11 /* "Select current directory" button */
Jack Jansenc2e6dd81995-08-14 12:34:42 +000033
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 Jansen0168f271995-10-27 13:32:30 +000044#define OPT_KEEPNORMAL 8
45#define OPT_KEEPERROR 9
Jack Jansene355c451996-03-12 13:29:04 +000046#define OPT_CMDLINE 10
Jack Jansenc2e6dd81995-08-14 12:34:42 +000047
Jack Jansen41fa7ea1995-08-31 13:59:36 +000048/* 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 Jansen3469e991996-09-06 00:30:45 +000059/* About box */
60#define ABOUT_ID 136
61
Jack Jansend081b131996-10-22 15:24:21 +000062/* No preferences file name resource */
63#define NOPREFNAME_ID 137
64
Jack Jansena58d89e1996-10-11 13:19:52 +000065/* EditPythonPrefs range. Needed here to forestall conflicts with applets */
Jack Jansena83caa01996-12-23 17:23:23 +000066#define EDITPYTHONPREFS_MIN 508
Jack Jansena58d89e1996-10-11 13:19:52 +000067#define EDITPYTHONPREFS_MAX 511
Jack Jansena83caa01996-12-23 17:23:23 +000068/* twit range. Again needed to forestall conflicts with scripts using their own resources */
69#define TWIT_MIN 500
70#define TWIT_MAX 507
Jack Jansena58d89e1996-10-11 13:19:52 +000071
Jack Jansenc2e6dd81995-08-14 12:34:42 +000072/*
73** The following are valid both in the binary (or shared library)
Jack Jansenab69eb91996-04-04 15:39:42 +000074** and in the Preferences file.
Jack Jansen3d228871996-09-06 22:18:40 +000075** 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 Jansenc2e6dd81995-08-14 12:34:42 +000085*/
86
Jack Jansend081b131996-10-22 15:24:21 +000087/* The STR resource that holds the preference file name */
88/* #define PREFFILENAME_ID 128 */
89#define PREFFILENAME_NAME "\pPythonPreferenceFileName"
90
Jack Jansenc2e6dd81995-08-14 12:34:42 +000091/* The STR# resource for sys.path initialization */
92#define PYTHONPATH_ID 128
Jack Jansenab69eb91996-04-04 15:39:42 +000093#define PYTHONPATHOVERRIDE_ID 129
Jack Jansenc2e6dd81995-08-14 12:34:42 +000094
95/* The alis resource for locating the python home directory */
96#define PYTHONHOME_ID 128
Jack Jansenab69eb91996-04-04 15:39:42 +000097#define PYTHONHOMEOVERRIDE_ID 129
Jack Jansena4b7e141996-02-21 16:46:57 +000098
99/* The Python options resource and offset of its members */
100#define PYTHONOPTIONS_ID 128
Jack Jansenab69eb91996-04-04 15:39:42 +0000101#define PYTHONOPTIONSOVERRIDE_ID 129
Jack Jansena4b7e141996-02-21 16:46:57 +0000102#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 Jansen3d228871996-09-06 22:18:40 +0000109#define POPT_NOINTOPT 7 /* Not settable interactively */
110#define POPT_NOARGS 8 /* Not settable interactively */
Jack Jansen01fbc681996-02-28 15:42:47 +0000111
Jack Jansen7d5f9e81996-09-07 17:09:31 +0000112typedef 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 Jansen3d228871996-09-06 22:18:40 +0000124/* The GUSI options resources */
125#define GUSIOPTIONS_ID 10240
126#define GUSIOPTIONSOVERRIDE_ID 10241
Jack Jansen3469e991996-09-06 00:30:45 +0000127
Jack Jansen01fbc681996-02-28 15:42:47 +0000128/* From macgetpath.c: */
Jack Jansen7d5f9e81996-09-07 17:09:31 +0000129void PyMac_PreferenceOptions Py_PROTO((PyMac_PrefRecord *));
Jack Jansen01fbc681996-02-28 15:42:47 +0000130
Jack Jansena4b7e141996-02-21 16:46:57 +0000131