1997-01-31 16:15:11 +00:00
|
|
|
/***********************************************************
|
|
|
|
Copyright 1991-1997 by Stichting Mathematisch Centrum, Amsterdam,
|
|
|
|
The Netherlands.
|
|
|
|
|
|
|
|
All Rights Reserved
|
|
|
|
|
|
|
|
Permission to use, copy, modify, and distribute this software and its
|
|
|
|
documentation for any purpose and without fee is hereby granted,
|
|
|
|
provided that the above copyright notice appear in all copies and that
|
|
|
|
both that copyright notice and this permission notice appear in
|
|
|
|
supporting documentation, and that the names of Stichting Mathematisch
|
|
|
|
Centrum or CWI not be used in advertising or publicity pertaining to
|
|
|
|
distribution of the software without specific, written prior permission.
|
|
|
|
|
|
|
|
STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
|
|
|
|
THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
|
|
FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
|
|
|
|
FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
|
|
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
|
|
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
|
|
|
|
OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
|
|
|
|
|
|
******************************************************************/
|
|
|
|
|
1995-08-14 12:34:42 +00:00
|
|
|
/*
|
|
|
|
** Resource-IDs in use by Python.
|
|
|
|
**
|
|
|
|
** All resources used by the python interpreter itself fall
|
1998-01-06 16:48:49 +00:00
|
|
|
** in the range 228-256. The range 128-228 is not used, because
|
|
|
|
** there is too much chance of conflicts with other packages.
|
1995-08-14 12:34:42 +00:00
|
|
|
**
|
|
|
|
** Standard python modules use resources in the range
|
|
|
|
** 256-512.
|
|
|
|
**
|
|
|
|
** Python programs that use their own resources are advised to
|
|
|
|
** choose resource numbers higher than 512.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
** Resources that reside in the python executable (or, for
|
|
|
|
** shared ppc python, in the core dynamic library)
|
|
|
|
*/
|
|
|
|
|
1999-12-07 23:08:10 +00:00
|
|
|
#define BASE_ID 228
|
|
|
|
|
1995-08-31 13:59:36 +00:00
|
|
|
/* The alert for "No Python directory, where is it?" (OBSOLETE) */
|
1999-12-07 23:08:10 +00:00
|
|
|
#define NOPYTHON_ALERT BASE_ID+0
|
1995-08-31 13:59:36 +00:00
|
|
|
#define YES_ITEM 1
|
|
|
|
#define NO_ITEM 2
|
|
|
|
#define CURWD_ITEM 3
|
1995-08-14 12:34:42 +00:00
|
|
|
|
|
|
|
/* The alert for "this is an applet template" */
|
1999-12-07 23:08:10 +00:00
|
|
|
#define NOPYC_ALERT BASE_ID+1
|
1995-08-14 12:34:42 +00:00
|
|
|
|
|
|
|
/* The dialog for our GetDirectory and PromptGetFile call */
|
1999-12-07 23:08:10 +00:00
|
|
|
#define GETDIR_ID BASE_ID+2 /* Resource ID for our "get directory" */
|
|
|
|
#define GETFILEPROMPT_ID BASE_ID+4 /* Resource id for prompted get file */
|
|
|
|
#define PROMPT_ITEM 10 /* The prompt, at the top */
|
|
|
|
#define SELECTCUR_ITEM 11 /* "Select current directory" button */
|
1995-08-14 12:34:42 +00:00
|
|
|
|
|
|
|
|
|
|
|
/* The dialog for interactive options */
|
1999-12-07 23:08:10 +00:00
|
|
|
#define OPT_DIALOG BASE_ID+3 /* Resource ID for dialog */
|
1995-08-14 12:34:42 +00:00
|
|
|
#define OPT_OK 1
|
|
|
|
#define OPT_CANCEL 2
|
|
|
|
#define OPT_INSPECT 3
|
|
|
|
#define OPT_VERBOSE 4
|
1997-09-09 13:50:40 +00:00
|
|
|
#define OPT_OPTIMIZE 5
|
1995-08-14 12:34:42 +00:00
|
|
|
#define OPT_UNBUFFERED 6
|
|
|
|
#define OPT_DEBUGGING 7
|
2000-09-22 21:50:11 +00:00
|
|
|
#define OPT_KEEPALWAYS 8
|
|
|
|
#define OPT_KEEPOUTPUT 9
|
|
|
|
#define OPT_KEEPERROR 10
|
|
|
|
#define OPT_KEEPNEVER 11
|
|
|
|
#define OPT_CMDLINE 12
|
2000-05-07 22:07:26 +00:00
|
|
|
#define OPT_TABWARN 13
|
1997-09-09 13:50:40 +00:00
|
|
|
#define OPT_NOSITE 14
|
2000-05-07 22:07:26 +00:00
|
|
|
#define OPT_HELP 15
|
|
|
|
#define OPT_NONAVSERV 16
|
1995-08-14 12:34:42 +00:00
|
|
|
|
1995-08-31 13:59:36 +00:00
|
|
|
/* Dialog for 'No preferences directory' */
|
1999-12-07 23:08:10 +00:00
|
|
|
#define NOPREFDIR_ID BASE_ID+5
|
1995-08-31 13:59:36 +00:00
|
|
|
|
1997-09-08 13:24:54 +00:00
|
|
|
/* Dialog for 'Bad or outdated preferences' */
|
1999-12-07 23:08:10 +00:00
|
|
|
#define BADPREFERENCES_ID BASE_ID+6
|
1997-09-08 13:24:54 +00:00
|
|
|
#define BADPREF_DELETE 1
|
|
|
|
#define BADPREF_CONTINUE 2
|
|
|
|
#define BADPREF_QUIT 3
|
1995-08-31 13:59:36 +00:00
|
|
|
/* Dialog for 'Bad preference file' */
|
1999-12-07 23:08:10 +00:00
|
|
|
#define BADPREFFILE_ID BASE_ID+7
|
1995-08-31 13:59:36 +00:00
|
|
|
|
1996-09-06 00:30:45 +00:00
|
|
|
/* About box */
|
1999-12-07 23:08:10 +00:00
|
|
|
#define ABOUT_ID BASE_ID+8
|
1996-09-06 00:30:45 +00:00
|
|
|
|
1996-10-22 15:24:21 +00:00
|
|
|
/* No preferences file name resource */
|
1999-12-07 23:08:10 +00:00
|
|
|
#define NOPREFNAME_ID BASE_ID+9
|
1996-10-22 15:24:21 +00:00
|
|
|
|
1996-10-11 13:19:52 +00:00
|
|
|
/* EditPythonPrefs range. Needed here to forestall conflicts with applets */
|
1996-12-23 17:23:23 +00:00
|
|
|
#define EDITPYTHONPREFS_MIN 508
|
1996-10-11 13:19:52 +00:00
|
|
|
#define EDITPYTHONPREFS_MAX 511
|
1996-12-23 17:23:23 +00:00
|
|
|
/* twit range. Again needed to forestall conflicts with scripts using their own resources */
|
|
|
|
#define TWIT_MIN 500
|
|
|
|
#define TWIT_MAX 507
|
1997-05-28 11:54:43 +00:00
|
|
|
/* Bruce range. The same */
|
|
|
|
#define BRUCE_MIN 468
|
|
|
|
#define BRUCE_MAX 499
|
1996-10-11 13:19:52 +00:00
|
|
|
|
1995-08-14 12:34:42 +00:00
|
|
|
/*
|
|
|
|
** The following are valid both in the binary (or shared library)
|
1996-04-04 15:39:42 +00:00
|
|
|
** and in the Preferences file.
|
1996-09-06 22:18:40 +00:00
|
|
|
** For all these the override is tried first, in the application resource fork
|
|
|
|
** only, this allows an applet to override standard settings.
|
|
|
|
** If there is no override resource the preferences file is added to the head
|
|
|
|
** of the resource file chain and the non-override version of the resource is
|
|
|
|
** searched in any resource file.
|
|
|
|
**
|
1998-01-06 16:48:49 +00:00
|
|
|
** The effect of this is that, for example, a 'Popt' of 228 in the application or
|
1996-09-06 22:18:40 +00:00
|
|
|
** shared library provides default options for use when no preferences are set,
|
1998-01-06 16:48:49 +00:00
|
|
|
** while a 'Popt' of 229 (in the application *only*) overrides any options in the
|
1996-09-06 22:18:40 +00:00
|
|
|
** preferences file.
|
1995-08-14 12:34:42 +00:00
|
|
|
*/
|
|
|
|
|
1996-10-22 15:24:21 +00:00
|
|
|
/* The STR resource that holds the preference file name */
|
1999-01-30 13:21:24 +00:00
|
|
|
#define PREFFILENAME_ID 228 /* For Rez only */
|
|
|
|
#define PREFFILENAME_PASCAL_NAME "PythonPreferenceFileName"
|
1996-10-22 15:24:21 +00:00
|
|
|
#define PREFFILENAME_NAME "\pPythonPreferenceFileName"
|
|
|
|
|
1995-08-14 12:34:42 +00:00
|
|
|
/* The STR# resource for sys.path initialization */
|
1998-01-06 16:48:49 +00:00
|
|
|
#define PYTHONPATH_ID 228
|
|
|
|
#define PYTHONPATHOVERRIDE_ID 229
|
1995-08-14 12:34:42 +00:00
|
|
|
|
|
|
|
/* The alis resource for locating the python home directory */
|
1998-01-06 16:48:49 +00:00
|
|
|
#define PYTHONHOME_ID 228
|
|
|
|
#define PYTHONHOMEOVERRIDE_ID 229
|
1996-02-21 16:46:57 +00:00
|
|
|
|
|
|
|
/* The Python options resource and offset of its members */
|
1998-01-06 16:48:49 +00:00
|
|
|
#define PYTHONOPTIONS_ID 228
|
|
|
|
#define PYTHONOPTIONSOVERRIDE_ID 229
|
1997-09-08 13:24:54 +00:00
|
|
|
|
2000-09-22 21:50:11 +00:00
|
|
|
#define POPT_VERSION_CURRENT 6 /* Current version number */
|
|
|
|
#define POPT_KEEPCONSOLE_NEVER 0
|
|
|
|
#define POPT_KEEPCONSOLE_OUTPUT 1
|
|
|
|
#define POPT_KEEPCONSOLE_ERROR 2
|
|
|
|
#define POPT_KEEPCONSOLE_ALWAYS 3
|
1996-02-28 15:42:47 +00:00
|
|
|
|
1999-01-30 13:21:24 +00:00
|
|
|
#ifndef rez
|
1996-09-07 17:09:31 +00:00
|
|
|
typedef struct PyMac_PrefRecord {
|
1997-09-08 13:24:54 +00:00
|
|
|
unsigned char version;
|
1996-09-07 17:09:31 +00:00
|
|
|
unsigned char inspect;
|
|
|
|
unsigned char verbose;
|
1997-09-08 13:24:54 +00:00
|
|
|
unsigned char optimize;
|
1996-09-07 17:09:31 +00:00
|
|
|
unsigned char unbuffered;
|
|
|
|
unsigned char debugging;
|
2000-09-22 21:50:11 +00:00
|
|
|
unsigned char unused;
|
|
|
|
unsigned char keep_console;
|
1996-09-07 17:09:31 +00:00
|
|
|
unsigned char nointopt;
|
|
|
|
unsigned char noargs;
|
2000-05-07 22:07:26 +00:00
|
|
|
unsigned char tabwarn;
|
1997-09-09 13:50:40 +00:00
|
|
|
unsigned char nosite;
|
2000-05-07 22:07:26 +00:00
|
|
|
unsigned char nonavservice;
|
1996-09-07 17:09:31 +00:00
|
|
|
} PyMac_PrefRecord;
|
1999-01-30 13:21:24 +00:00
|
|
|
#endif
|
1996-09-07 17:09:31 +00:00
|
|
|
|
1996-09-06 22:18:40 +00:00
|
|
|
/* The GUSI options resources */
|
|
|
|
#define GUSIOPTIONS_ID 10240
|
|
|
|
#define GUSIOPTIONSOVERRIDE_ID 10241
|
1996-09-06 00:30:45 +00:00
|
|
|
|
1999-01-30 13:21:24 +00:00
|
|
|
#ifndef rez
|
1996-02-28 15:42:47 +00:00
|
|
|
/* From macgetpath.c: */
|
2000-07-11 19:51:05 +00:00
|
|
|
void PyMac_PreferenceOptions(PyMac_PrefRecord *);
|
|
|
|
char * PyMac_GetPythonDir(void);
|
1999-12-07 23:08:10 +00:00
|
|
|
#endif
|