| 1 | /*
|
|---|
| 2 | ** pymactoolbox.h - globals defined in mactoolboxglue.c
|
|---|
| 3 | */
|
|---|
| 4 | #ifndef Py_PYMACTOOLBOX_H
|
|---|
| 5 | #define Py_PYMACTOOLBOX_H
|
|---|
| 6 | #ifdef __cplusplus
|
|---|
| 7 | extern "C" {
|
|---|
| 8 | #endif
|
|---|
| 9 |
|
|---|
| 10 | #include <Carbon/Carbon.h>
|
|---|
| 11 | #include <QuickTime/QuickTime.h>
|
|---|
| 12 |
|
|---|
| 13 | /*
|
|---|
| 14 | ** Helper routines for error codes and such.
|
|---|
| 15 | */
|
|---|
| 16 | char *PyMac_StrError(int); /* strerror with mac errors */
|
|---|
| 17 | extern PyObject *PyMac_OSErrException; /* Exception for OSErr */
|
|---|
| 18 | PyObject *PyMac_GetOSErrException(void); /* Initialize & return it */
|
|---|
| 19 | PyObject *PyErr_Mac(PyObject *, int); /* Exception with a mac error */
|
|---|
| 20 | PyObject *PyMac_Error(OSErr); /* Uses PyMac_GetOSErrException */
|
|---|
| 21 | extern OSErr PyMac_GetFullPathname(FSSpec *, char *, int); /* convert
|
|---|
| 22 | fsspec->path */
|
|---|
| 23 | /*
|
|---|
| 24 | ** These conversion routines are defined in mactoolboxglue.c itself.
|
|---|
| 25 | */
|
|---|
| 26 | int PyMac_GetOSType(PyObject *, OSType *); /* argument parser for OSType */
|
|---|
| 27 | PyObject *PyMac_BuildOSType(OSType); /* Convert OSType to PyObject */
|
|---|
| 28 |
|
|---|
| 29 | PyObject *PyMac_BuildNumVersion(NumVersion);/* Convert NumVersion to PyObject */
|
|---|
| 30 |
|
|---|
| 31 | int PyMac_GetStr255(PyObject *, Str255); /* argument parser for Str255 */
|
|---|
| 32 | PyObject *PyMac_BuildStr255(Str255); /* Convert Str255 to PyObject */
|
|---|
| 33 | PyObject *PyMac_BuildOptStr255(Str255); /* Convert Str255 to PyObject,
|
|---|
| 34 | NULL to None */
|
|---|
| 35 |
|
|---|
| 36 | int PyMac_GetRect(PyObject *, Rect *); /* argument parser for Rect */
|
|---|
| 37 | PyObject *PyMac_BuildRect(Rect *); /* Convert Rect to PyObject */
|
|---|
| 38 |
|
|---|
| 39 | int PyMac_GetPoint(PyObject *, Point *); /* argument parser for Point */
|
|---|
| 40 | PyObject *PyMac_BuildPoint(Point); /* Convert Point to PyObject */
|
|---|
| 41 |
|
|---|
| 42 | int PyMac_GetEventRecord(PyObject *, EventRecord *); /* argument parser for
|
|---|
| 43 | EventRecord */
|
|---|
| 44 | PyObject *PyMac_BuildEventRecord(EventRecord *); /* Convert EventRecord to
|
|---|
| 45 | PyObject */
|
|---|
| 46 |
|
|---|
| 47 | int PyMac_GetFixed(PyObject *, Fixed *); /* argument parser for Fixed */
|
|---|
| 48 | PyObject *PyMac_BuildFixed(Fixed); /* Convert Fixed to PyObject */
|
|---|
| 49 | int PyMac_Getwide(PyObject *, wide *); /* argument parser for wide */
|
|---|
| 50 | PyObject *PyMac_Buildwide(wide *); /* Convert wide to PyObject */
|
|---|
|
|---|