summaryrefslogtreecommitdiffstats
path: root/Mac/Include/pythonresources.h
blob: 5156e23b5ac1f6cc50b5245f0b568e2bed32a7a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
/*
** Resource-IDs in use by Python.
**
** All resources used by the python interpreter itself fall
** in the range 128-256.
**
** 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)
*/

/* The alert for "No Python directory, where is it?" (OBSOLETE) */
#define NOPYTHON_ALERT	128
#define YES_ITEM		1
#define NO_ITEM			2
#define CURWD_ITEM		3

/* The alert for "this is an applet template" */
#define NOPYC_ALERT		129

/* The dialog for our GetDirectory and PromptGetFile call */
#define GETDIR_ID 		130		/* Resource ID for our "get directory" */
#define GETFILEPROMPT_ID 132	/* Resource id for prompted get file */
#define PROMPT_ITEM		10		/* The prompt, at the top */
#define SELECTCUR_ITEM	11	/* "Select current directory" button */


/* The dialog for interactive options */
#define OPT_DIALOG		131		/* Resource ID for dialog */
#define OPT_OK			1
#define OPT_CANCEL		2
#define OPT_INSPECT		3
#define OPT_VERBOSE		4
#define OPT_SUPPRESS	5
#define OPT_UNBUFFERED	6
#define OPT_DEBUGGING	7
#define OPT_KEEPNORMAL	8
#define OPT_KEEPERROR	9
#define OPT_CMDLINE		10

/* Dialog for 'No preferences directory' */
#define NOPREFDIR_ID	133

/* Dialog for 'Create preferences file?' */
#define NOPREFFILE_ID	134
#define NOPREFFILE_YES	1
#define NOPREFFILE_NO	2

/* Dialog for 'Bad preference file' */
#define BADPREFFILE_ID	135

/* About box */
#define ABOUT_ID		136

/* EditPythonPrefs range. Needed here to forestall conflicts with applets */
#define EDITPYTHONPREFS_MIN	500
#define EDITPYTHONPREFS_MAX 511

/*
** The following are valid both in the binary (or shared library)
** and in the Preferences file.
** 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.
**
** The effect of this is that, for example, a 'Popt' of 128 in the application or
** shared library provides default options for use when no preferences are set,
** while a 'Popt' of 129 (in the application *only*) overrides any options in the
** preferences file.
*/

/* The STR# resource for sys.path initialization */
#define PYTHONPATH_ID 128
#define PYTHONPATHOVERRIDE_ID 129

/* The alis resource for locating the python home directory */
#define PYTHONHOME_ID 128
#define PYTHONHOMEOVERRIDE_ID 129

/* The Python options resource and offset of its members */
#define PYTHONOPTIONS_ID 128
#define PYTHONOPTIONSOVERRIDE_ID 129
#define POPT_INSPECT	0
#define POPT_VERBOSE	1
#define POPT_SUPPRESS	2
#define POPT_UNBUFFERED	3
#define POPT_DEBUGGING	4
#define POPT_KEEPNORM	5
#define POPT_KEEPERR	6
#define POPT_NOINTOPT	7	/* Not settable interactively */
#define POPT_NOARGS		8	/* Not settable interactively */

typedef struct PyMac_PrefRecord {
	unsigned char	inspect;
	unsigned char	verbose;
	unsigned char	suppress_print;
	unsigned char	unbuffered;
	unsigned char	debugging;
	unsigned char	keep_normal;
	unsigned char	keep_error;
	unsigned char	nointopt;
	unsigned char	noargs;
} PyMac_PrefRecord;

/* The GUSI options resources */
#define GUSIOPTIONS_ID	10240
#define GUSIOPTIONSOVERRIDE_ID 10241

/* From macgetpath.c: */
void PyMac_PreferenceOptions Py_PROTO((PyMac_PrefRecord *));