summaryrefslogtreecommitdiffstats
path: root/Mac/Include
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2001-05-12 22:46:35 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2001-05-12 22:46:35 (GMT)
commit0194ad5c7d2a0ffe473b87933768cb509417ff59 (patch)
tree8d0cec5b98d59c0931d2e54550fb4d9b1af17ff3 /Mac/Include
parent6e68a7e74f63f2aeda22e80e3fd9abdf3ada0f73 (diff)
downloadcpython-0194ad5c7d2a0ffe473b87933768cb509417ff59.zip
cpython-0194ad5c7d2a0ffe473b87933768cb509417ff59.tar.gz
cpython-0194ad5c7d2a0ffe473b87933768cb509417ff59.tar.bz2
Got the first MacPython module working under MacOSX/MachO (gestalt). Main changes
are including Carbon/Carbon.h in stead of the old headers (unless WITHOUT_FRAMEWORKS is defined, as it will be for classic MacPython) and selectively disabling all the stuff that is unneeded in a unix-Python (event handling, etc).
Diffstat (limited to 'Mac/Include')
-rw-r--r--Mac/Include/macglue.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/Mac/Include/macglue.h b/Mac/Include/macglue.h
index 100c204..9b55a4f 100644
--- a/Mac/Include/macglue.h
+++ b/Mac/Include/macglue.h
@@ -22,10 +22,14 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
******************************************************************/
+#ifdef WITHOUT_FRAMEWORKS
#include <Types.h>
#include <Files.h>
#include <Events.h>
#include <StandardFile.h>
+#else
+#include <Carbon/Carbon.h>
+#endif
#ifdef __cplusplus
extern "C" {
@@ -47,6 +51,8 @@ extern void PyMac_SetGUSISpin(void); /* Install our private GUSI spin routine *
#endif
char *PyMac_StrError(int); /* strerror with mac errors */
+PyObject *PyErr_Mac(PyObject *, int); /* Exception with a mac error */
+PyObject *PyMac_Error(OSErr); /* Uses PyMac_GetOSErrException */
unsigned char *Pstring(char *str); /* Convert c-string to pascal-string in static buffer */
#ifdef USE_GUSI
@@ -65,19 +71,20 @@ extern int PyMac_AppearanceCompliant; /* True if in appearance support mode */
extern PyObject *PyMac_OSErrException; /* Exception for OSErr */
PyObject *PyMac_GetOSErrException(void); /* Initialize & return it */
+#if !TARGET_API_MAC_OSX
void PyMac_GetSchedParams(PyMacSchedParams *); /* Get schedulers params */
void PyMac_SetSchedParams(PyMacSchedParams *); /* Set schedulers params */
-PyObject *PyErr_Mac(PyObject *, int); /* Exception with a mac error */
-PyObject *PyMac_Error(OSErr); /* Uses PyMac_GetOSErrException */
int PyMac_DoYield(int, int); /* Yield cpu. First arg is maxtime, second ok to call python */
+#endif
int PyMac_HandleEvent(EventRecord *); /* Handle one event, possibly in Python */
void PyMac_HandleEventIntern(EventRecord *); /* Handle one event internal only */
int PyMac_SetEventHandler(PyObject *); /* set python-coded event handler */
+#if !TARGET_API_MAC_OSX
void PyMac_InitMenuBar(void); /* Setup menu bar as we want it */
void PyMac_RestoreMenuBar(void); /* Restore menu bar for ease of exiting */
void PyMac_RaiseConsoleWindow(); /* Bring console window to front, if it exists */
-
+#endif
int PyMac_FindResourceModule(PyStringObject *, char *, char *); /* Test for 'PYC ' resource in a file */
PyObject * PyMac_LoadResourceModule(char *, char *); /* Load 'PYC ' resource from file */
int PyMac_FindCodeResourceModule(PyStringObject *, char *, char *); /* Test for 'PYD ' resource in a file */