1997-01-31 12:15:11 -04: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 09:34:42 -03:00
|
|
|
/*
|
|
|
|
** Resource-IDs in use by Python.
|
|
|
|
**
|
|
|
|
** All resources used by the python interpreter itself fall
|
1998-01-06 12:48:49 -04: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 09:34:42 -03: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)
|
|
|
|
*/
|
2002-09-10 09:32:47 -03:00
|
|
|
#ifndef Py_PYTHONRESOURCES_H
|
|
|
|
#define Py_PYTHONRESOURCES_H
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
1995-08-14 09:34:42 -03:00
|
|
|
|
1999-12-07 19:08:10 -04:00
|
|
|
#define BASE_ID 228
|
|
|
|
|
1995-08-31 10:59:36 -03:00
|
|
|
/* The alert for "No Python directory, where is it?" (OBSOLETE) */
|
1999-12-07 19:08:10 -04:00
|
|
|
#define NOPYTHON_ALERT BASE_ID+0
|
1995-08-31 10:59:36 -03:00
|
|
|
#define YES_ITEM 1
|
|
|
|
#define NO_ITEM 2
|
|
|
|
#define CURWD_ITEM 3
|
1995-08-14 09:34:42 -03:00
|
|
|
|
|
|
|
/* The alert for "this is an applet template" */
|
1999-12-07 19:08:10 -04:00
|
|
|
#define NOPYC_ALERT BASE_ID+1
|
1995-08-14 09:34:42 -03:00
|
|
|
|
|
|
|
/* The dialog for our GetDirectory and PromptGetFile call */
|
1999-12-07 19:08:10 -04: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 09:34:42 -03:00
|
|
|
|
|
|
|
|
|
|
|
/* The dialog for interactive options */
|
1999-12-07 19:08:10 -04:00
|
|
|
#define OPT_DIALOG BASE_ID+3 /* Resource ID for dialog */
|
1995-08-14 09:34:42 -03:00
|
|
|
#define OPT_OK 1
|
|
|
|
#define OPT_CANCEL 2
|
|
|
|
#define OPT_INSPECT 3
|
|
|
|
#define OPT_VERBOSE 4
|
1997-09-09 10:50:40 -03:00
|
|
|
#define OPT_OPTIMIZE 5
|
1995-08-14 09:34:42 -03:00
|
|
|
#define OPT_UNBUFFERED 6
|
|
|
|
#define OPT_DEBUGGING 7
|
2000-09-22 18:50:11 -03:00
|
|
|
#define OPT_KEEPALWAYS 8
|
|
|
|
#define OPT_KEEPOUTPUT 9
|
|
|
|
#define OPT_KEEPERROR 10
|
|
|
|
#define OPT_KEEPNEVER 11
|
|
|
|
#define OPT_CMDLINE 12
|
2000-05-07 19:07:26 -03:00
|
|
|
#define OPT_TABWARN 13
|
1997-09-09 10:50:40 -03:00
|
|
|
#define OPT_NOSITE 14
|
2000-05-07 19:07:26 -03:00
|
|
|
#define OPT_HELP 15
|
|
|
|
#define OPT_NONAVSERV 16
|
2001-09-01 19:36:29 -03:00
|
|
|
#define OPT_VERBOSEVERBOSE 19
|
|
|
|
#define OPT_DIVISIONWARN 20
|
|
|
|
#define OPT_UNIXNEWLINES 21
|
1995-08-14 09:34:42 -03:00
|
|
|
|
1995-08-31 10:59:36 -03:00
|
|
|
/* Dialog for 'No preferences directory' */
|
1999-12-07 19:08:10 -04:00
|
|
|
#define NOPREFDIR_ID BASE_ID+5
|
1995-08-31 10:59:36 -03:00
|
|
|
|
1997-09-08 10:24:54 -03:00
|
|
|
/* Dialog for 'Bad or outdated preferences' */
|
1999-12-07 19:08:10 -04:00
|
|
|
#define BADPREFERENCES_ID BASE_ID+6
|
1997-09-08 10:24:54 -03:00
|
|
|
#define BADPREF_DELETE 1
|
|
|
|
#define BADPREF_CONTINUE 2
|
|
|
|
#define BADPREF_QUIT 3
|
1995-08-31 10:59:36 -03:00
|
|
|
/* Dialog for 'Bad preference file' */
|
1999-12-07 19:08:10 -04:00
|
|
|
#define BADPREFFILE_ID BASE_ID+7
|
1995-08-31 10:59:36 -03:00
|
|
|
|
1996-09-05 21:30:45 -03:00
|
|
|
/* About box */
|
1999-12-07 19:08:10 -04:00
|
|
|
#define ABOUT_ID BASE_ID+8
|
1996-09-05 21:30:45 -03:00
|
|
|
|
1996-10-22 12:24:21 -03:00
|
|
|
/* No preferences file name resource */
|
1999-12-07 19:08:10 -04:00
|
|
|
#define NOPREFNAME_ID BASE_ID+9
|
1996-10-22 12:24:21 -03:00
|
|
|
|
2001-08-03 10:31:36 -03:00
|
|
|
/* Not a script */
|
|
|
|
#define NOTASCRIPT_ID BASE_ID+10
|
|
|
|
|
1996-10-11 10:19:52 -03:00
|
|
|
/* EditPythonPrefs range. Needed here to forestall conflicts with applets */
|
1996-12-23 13:23:23 -04:00
|
|
|
#define EDITPYTHONPREFS_MIN 508
|
1996-10-11 10:19:52 -03:00
|
|
|
#define EDITPYTHONPREFS_MAX 511
|
1996-12-23 13:23:23 -04: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 08:54:43 -03:00
|
|
|
/* Bruce range. The same */
|
|
|
|
#define BRUCE_MIN 468
|
|
|
|
#define BRUCE_MAX 499
|
1996-10-11 10:19:52 -03:00
|
|
|
|
1995-08-14 09:34:42 -03:00
|
|
|
/*
|
|
|
|
** The following are valid both in the binary (or shared library)
|
1996-04-04 11:39:42 -04:00
|
|
|
** and in the Preferences file.
|
1996-09-06 19:18:40 -03: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 12:48:49 -04:00
|
|
|
** The effect of this is that, for example, a 'Popt' of 228 in the application or
|
1996-09-06 19:18:40 -03:00
|
|
|
** shared library provides default options for use when no preferences are set,
|
1998-01-06 12:48:49 -04:00
|
|
|
** while a 'Popt' of 229 (in the application *only*) overrides any options in the
|
1996-09-06 19:18:40 -03:00
|
|
|
** preferences file.
|
1995-08-14 09:34:42 -03:00
|
|
|
*/
|
|
|
|
|
1996-10-22 12:24:21 -03:00
|
|
|
/* The STR resource that holds the preference file name */
|
1999-01-30 09:21:24 -04:00
|
|
|
#define PREFFILENAME_ID 228 /* For Rez only */
|
|
|
|
#define PREFFILENAME_PASCAL_NAME "PythonPreferenceFileName"
|
1996-10-22 12:24:21 -03:00
|
|
|
#define PREFFILENAME_NAME "\pPythonPreferenceFileName"
|
|
|
|
|
1995-08-14 09:34:42 -03:00
|
|
|
/* The STR# resource for sys.path initialization */
|
1998-01-06 12:48:49 -04:00
|
|
|
#define PYTHONPATH_ID 228
|
|
|
|
#define PYTHONPATHOVERRIDE_ID 229
|
1995-08-14 09:34:42 -03:00
|
|
|
|
|
|
|
/* The alis resource for locating the python home directory */
|
1998-01-06 12:48:49 -04:00
|
|
|
#define PYTHONHOME_ID 228
|
|
|
|
#define PYTHONHOMEOVERRIDE_ID 229
|
1996-02-21 12:46:57 -04:00
|
|
|
|
|
|
|
/* The Python options resource and offset of its members */
|
1998-01-06 12:48:49 -04:00
|
|
|
#define PYTHONOPTIONS_ID 228
|
|
|
|
#define PYTHONOPTIONSOVERRIDE_ID 229
|
1997-09-08 10:24:54 -03:00
|
|
|
|
2001-09-01 19:36:29 -03:00
|
|
|
#define POPT_VERSION_CURRENT 8 /* Current version number */
|
2000-09-22 18:50:11 -03:00
|
|
|
#define POPT_KEEPCONSOLE_NEVER 0
|
|
|
|
#define POPT_KEEPCONSOLE_OUTPUT 1
|
|
|
|
#define POPT_KEEPCONSOLE_ERROR 2
|
|
|
|
#define POPT_KEEPCONSOLE_ALWAYS 3
|
1996-02-28 11:42:47 -04:00
|
|
|
|
1999-01-30 09:21:24 -04:00
|
|
|
#ifndef rez
|
1996-09-07 14:09:31 -03:00
|
|
|
typedef struct PyMac_PrefRecord {
|
1997-09-08 10:24:54 -03:00
|
|
|
unsigned char version;
|
1996-09-07 14:09:31 -03:00
|
|
|
unsigned char inspect;
|
|
|
|
unsigned char verbose;
|
1997-09-08 10:24:54 -03:00
|
|
|
unsigned char optimize;
|
1996-09-07 14:09:31 -03:00
|
|
|
unsigned char unbuffered;
|
|
|
|
unsigned char debugging;
|
2000-09-22 18:50:11 -03:00
|
|
|
unsigned char unused;
|
|
|
|
unsigned char keep_console;
|
1996-09-07 14:09:31 -03:00
|
|
|
unsigned char nointopt;
|
|
|
|
unsigned char noargs;
|
2000-05-07 19:07:26 -03:00
|
|
|
unsigned char tabwarn;
|
1997-09-09 10:50:40 -03:00
|
|
|
unsigned char nosite;
|
2000-05-07 19:07:26 -03:00
|
|
|
unsigned char nonavservice;
|
2001-02-10 21:08:04 -04:00
|
|
|
unsigned char delayconsole;
|
2001-09-01 19:36:29 -03:00
|
|
|
unsigned char divisionwarn;
|
|
|
|
unsigned char unixnewlines;
|
1996-09-07 14:09:31 -03:00
|
|
|
} PyMac_PrefRecord;
|
1999-01-30 09:21:24 -04:00
|
|
|
#endif
|
1996-09-07 14:09:31 -03:00
|
|
|
|
1996-09-06 19:18:40 -03:00
|
|
|
/* The GUSI options resources */
|
|
|
|
#define GUSIOPTIONS_ID 10240
|
|
|
|
#define GUSIOPTIONSOVERRIDE_ID 10241
|
1996-09-05 21:30:45 -03:00
|
|
|
|
1999-01-30 09:21:24 -04:00
|
|
|
#ifndef rez
|
1996-02-28 11:42:47 -04:00
|
|
|
/* From macgetpath.c: */
|
2000-07-11 16:51:05 -03:00
|
|
|
void PyMac_PreferenceOptions(PyMac_PrefRecord *);
|
|
|
|
char * PyMac_GetPythonDir(void);
|
2000-10-13 16:44:40 -03:00
|
|
|
/* from macmain.c: */
|
|
|
|
extern PyMac_PrefRecord PyMac_options;
|
1999-12-07 19:08:10 -04:00
|
|
|
#endif
|
2002-09-10 09:32:47 -03:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|