annotate DEPENDENCIES/mingw32/Python27/include/pymactoolbox.h @ 118:770eb830ec19 emscripten

Typo fix
author Chris Cannam
date Wed, 18 May 2016 16:14:08 +0100
parents 2a2c65a20a8b
children
rev   line source
Chris@87 1 /*
Chris@87 2 ** pymactoolbox.h - globals defined in mactoolboxglue.c
Chris@87 3 */
Chris@87 4 #ifndef Py_PYMACTOOLBOX_H
Chris@87 5 #define Py_PYMACTOOLBOX_H
Chris@87 6 #ifdef __cplusplus
Chris@87 7 extern "C" {
Chris@87 8 #endif
Chris@87 9
Chris@87 10 #include <Carbon/Carbon.h>
Chris@87 11
Chris@87 12 #ifndef __LP64__
Chris@87 13 #include <QuickTime/QuickTime.h>
Chris@87 14 #endif /* !__LP64__ */
Chris@87 15
Chris@87 16 /*
Chris@87 17 ** Helper routines for error codes and such.
Chris@87 18 */
Chris@87 19 char *PyMac_StrError(int); /* strerror with mac errors */
Chris@87 20 extern PyObject *PyMac_OSErrException; /* Exception for OSErr */
Chris@87 21 PyObject *PyMac_GetOSErrException(void); /* Initialize & return it */
Chris@87 22 PyObject *PyErr_Mac(PyObject *, int); /* Exception with a mac error */
Chris@87 23 PyObject *PyMac_Error(OSErr); /* Uses PyMac_GetOSErrException */
Chris@87 24 #ifndef __LP64__
Chris@87 25 extern OSErr PyMac_GetFullPathname(FSSpec *, char *, int); /* convert
Chris@87 26 fsspec->path */
Chris@87 27 #endif /* __LP64__ */
Chris@87 28
Chris@87 29 /*
Chris@87 30 ** These conversion routines are defined in mactoolboxglue.c itself.
Chris@87 31 */
Chris@87 32 int PyMac_GetOSType(PyObject *, OSType *); /* argument parser for OSType */
Chris@87 33 PyObject *PyMac_BuildOSType(OSType); /* Convert OSType to PyObject */
Chris@87 34
Chris@87 35 PyObject *PyMac_BuildNumVersion(NumVersion);/* Convert NumVersion to PyObject */
Chris@87 36
Chris@87 37 int PyMac_GetStr255(PyObject *, Str255); /* argument parser for Str255 */
Chris@87 38 PyObject *PyMac_BuildStr255(Str255); /* Convert Str255 to PyObject */
Chris@87 39 PyObject *PyMac_BuildOptStr255(Str255); /* Convert Str255 to PyObject,
Chris@87 40 NULL to None */
Chris@87 41
Chris@87 42 int PyMac_GetRect(PyObject *, Rect *); /* argument parser for Rect */
Chris@87 43 PyObject *PyMac_BuildRect(Rect *); /* Convert Rect to PyObject */
Chris@87 44
Chris@87 45 int PyMac_GetPoint(PyObject *, Point *); /* argument parser for Point */
Chris@87 46 PyObject *PyMac_BuildPoint(Point); /* Convert Point to PyObject */
Chris@87 47
Chris@87 48 int PyMac_GetEventRecord(PyObject *, EventRecord *); /* argument parser for
Chris@87 49 EventRecord */
Chris@87 50 PyObject *PyMac_BuildEventRecord(EventRecord *); /* Convert EventRecord to
Chris@87 51 PyObject */
Chris@87 52
Chris@87 53 int PyMac_GetFixed(PyObject *, Fixed *); /* argument parser for Fixed */
Chris@87 54 PyObject *PyMac_BuildFixed(Fixed); /* Convert Fixed to PyObject */
Chris@87 55 int PyMac_Getwide(PyObject *, wide *); /* argument parser for wide */
Chris@87 56 PyObject *PyMac_Buildwide(wide *); /* Convert wide to PyObject */
Chris@87 57
Chris@87 58 /*
Chris@87 59 ** The rest of the routines are implemented by extension modules. If they are
Chris@87 60 ** dynamically loaded mactoolboxglue will contain a stub implementation of the
Chris@87 61 ** routine, which imports the module, whereupon the module's init routine will
Chris@87 62 ** communicate the routine pointer back to the stub.
Chris@87 63 ** If USE_TOOLBOX_OBJECT_GLUE is not defined there is no glue code, and the
Chris@87 64 ** extension modules simply declare the routine. This is the case for static
Chris@87 65 ** builds (and could be the case for MacPython CFM builds, because CFM extension
Chris@87 66 ** modules can reference each other without problems).
Chris@87 67 */
Chris@87 68
Chris@87 69 #ifdef USE_TOOLBOX_OBJECT_GLUE
Chris@87 70 /*
Chris@87 71 ** These macros are used in the module init code. If we use toolbox object glue
Chris@87 72 ** it sets the function pointer to point to the real function.
Chris@87 73 */
Chris@87 74 #define PyMac_INIT_TOOLBOX_OBJECT_NEW(object, rtn) { \
Chris@87 75 extern PyObject *(*PyMacGluePtr_##rtn)(object); \
Chris@87 76 PyMacGluePtr_##rtn = _##rtn; \
Chris@87 77 }
Chris@87 78 #define PyMac_INIT_TOOLBOX_OBJECT_CONVERT(object, rtn) { \
Chris@87 79 extern int (*PyMacGluePtr_##rtn)(PyObject *, object *); \
Chris@87 80 PyMacGluePtr_##rtn = _##rtn; \
Chris@87 81 }
Chris@87 82 #else
Chris@87 83 /*
Chris@87 84 ** If we don't use toolbox object glue the init macros are empty. Moreover, we define
Chris@87 85 ** _xxx_New to be the same as xxx_New, and the code in mactoolboxglue isn't included.
Chris@87 86 */
Chris@87 87 #define PyMac_INIT_TOOLBOX_OBJECT_NEW(object, rtn)
Chris@87 88 #define PyMac_INIT_TOOLBOX_OBJECT_CONVERT(object, rtn)
Chris@87 89 #endif /* USE_TOOLBOX_OBJECT_GLUE */
Chris@87 90
Chris@87 91 /* macfs exports */
Chris@87 92 #ifndef __LP64__
Chris@87 93 int PyMac_GetFSSpec(PyObject *, FSSpec *); /* argument parser for FSSpec */
Chris@87 94 PyObject *PyMac_BuildFSSpec(FSSpec *); /* Convert FSSpec to PyObject */
Chris@87 95 #endif /* !__LP64__ */
Chris@87 96
Chris@87 97 int PyMac_GetFSRef(PyObject *, FSRef *); /* argument parser for FSRef */
Chris@87 98 PyObject *PyMac_BuildFSRef(FSRef *); /* Convert FSRef to PyObject */
Chris@87 99
Chris@87 100 /* AE exports */
Chris@87 101 extern PyObject *AEDesc_New(AppleEvent *); /* XXXX Why passed by address?? */
Chris@87 102 extern PyObject *AEDesc_NewBorrowed(AppleEvent *);
Chris@87 103 extern int AEDesc_Convert(PyObject *, AppleEvent *);
Chris@87 104
Chris@87 105 /* Cm exports */
Chris@87 106 extern PyObject *CmpObj_New(Component);
Chris@87 107 extern int CmpObj_Convert(PyObject *, Component *);
Chris@87 108 extern PyObject *CmpInstObj_New(ComponentInstance);
Chris@87 109 extern int CmpInstObj_Convert(PyObject *, ComponentInstance *);
Chris@87 110
Chris@87 111 /* Ctl exports */
Chris@87 112 #ifndef __LP64__
Chris@87 113 extern PyObject *CtlObj_New(ControlHandle);
Chris@87 114 extern int CtlObj_Convert(PyObject *, ControlHandle *);
Chris@87 115 #endif /* !__LP64__ */
Chris@87 116
Chris@87 117 /* Dlg exports */
Chris@87 118 #ifndef __LP64__
Chris@87 119 extern PyObject *DlgObj_New(DialogPtr);
Chris@87 120 extern int DlgObj_Convert(PyObject *, DialogPtr *);
Chris@87 121 extern PyObject *DlgObj_WhichDialog(DialogPtr);
Chris@87 122 #endif /* !__LP64__ */
Chris@87 123
Chris@87 124 /* Drag exports */
Chris@87 125 #ifndef __LP64__
Chris@87 126 extern PyObject *DragObj_New(DragReference);
Chris@87 127 extern int DragObj_Convert(PyObject *, DragReference *);
Chris@87 128 #endif /* !__LP64__ */
Chris@87 129
Chris@87 130 /* List exports */
Chris@87 131 #ifndef __LP64__
Chris@87 132 extern PyObject *ListObj_New(ListHandle);
Chris@87 133 extern int ListObj_Convert(PyObject *, ListHandle *);
Chris@87 134 #endif /* !__LP64__ */
Chris@87 135
Chris@87 136 /* Menu exports */
Chris@87 137 #ifndef __LP64__
Chris@87 138 extern PyObject *MenuObj_New(MenuHandle);
Chris@87 139 extern int MenuObj_Convert(PyObject *, MenuHandle *);
Chris@87 140 #endif /* !__LP64__ */
Chris@87 141
Chris@87 142 /* Qd exports */
Chris@87 143 #ifndef __LP64__
Chris@87 144 extern PyObject *GrafObj_New(GrafPtr);
Chris@87 145 extern int GrafObj_Convert(PyObject *, GrafPtr *);
Chris@87 146 extern PyObject *BMObj_New(BitMapPtr);
Chris@87 147 extern int BMObj_Convert(PyObject *, BitMapPtr *);
Chris@87 148 extern PyObject *QdRGB_New(RGBColor *);
Chris@87 149 extern int QdRGB_Convert(PyObject *, RGBColor *);
Chris@87 150 #endif /* !__LP64__ */
Chris@87 151
Chris@87 152 /* Qdoffs exports */
Chris@87 153 #ifndef __LP64__
Chris@87 154 extern PyObject *GWorldObj_New(GWorldPtr);
Chris@87 155 extern int GWorldObj_Convert(PyObject *, GWorldPtr *);
Chris@87 156 #endif /* !__LP64__ */
Chris@87 157
Chris@87 158 /* Qt exports */
Chris@87 159 #ifndef __LP64__
Chris@87 160 extern PyObject *TrackObj_New(Track);
Chris@87 161 extern int TrackObj_Convert(PyObject *, Track *);
Chris@87 162 extern PyObject *MovieObj_New(Movie);
Chris@87 163 extern int MovieObj_Convert(PyObject *, Movie *);
Chris@87 164 extern PyObject *MovieCtlObj_New(MovieController);
Chris@87 165 extern int MovieCtlObj_Convert(PyObject *, MovieController *);
Chris@87 166 extern PyObject *TimeBaseObj_New(TimeBase);
Chris@87 167 extern int TimeBaseObj_Convert(PyObject *, TimeBase *);
Chris@87 168 extern PyObject *UserDataObj_New(UserData);
Chris@87 169 extern int UserDataObj_Convert(PyObject *, UserData *);
Chris@87 170 extern PyObject *MediaObj_New(Media);
Chris@87 171 extern int MediaObj_Convert(PyObject *, Media *);
Chris@87 172 #endif /* !__LP64__ */
Chris@87 173
Chris@87 174 /* Res exports */
Chris@87 175 extern PyObject *ResObj_New(Handle);
Chris@87 176 extern int ResObj_Convert(PyObject *, Handle *);
Chris@87 177 extern PyObject *OptResObj_New(Handle);
Chris@87 178 extern int OptResObj_Convert(PyObject *, Handle *);
Chris@87 179
Chris@87 180 /* TE exports */
Chris@87 181 #ifndef __LP64__
Chris@87 182 extern PyObject *TEObj_New(TEHandle);
Chris@87 183 extern int TEObj_Convert(PyObject *, TEHandle *);
Chris@87 184 #endif /* !__LP64__ */
Chris@87 185
Chris@87 186 /* Win exports */
Chris@87 187 #ifndef __LP64__
Chris@87 188 extern PyObject *WinObj_New(WindowPtr);
Chris@87 189 extern int WinObj_Convert(PyObject *, WindowPtr *);
Chris@87 190 extern PyObject *WinObj_WhichWindow(WindowPtr);
Chris@87 191 #endif /* !__LP64__ */
Chris@87 192
Chris@87 193 /* CF exports */
Chris@87 194 extern PyObject *CFObj_New(CFTypeRef);
Chris@87 195 extern int CFObj_Convert(PyObject *, CFTypeRef *);
Chris@87 196 extern PyObject *CFTypeRefObj_New(CFTypeRef);
Chris@87 197 extern int CFTypeRefObj_Convert(PyObject *, CFTypeRef *);
Chris@87 198 extern PyObject *CFStringRefObj_New(CFStringRef);
Chris@87 199 extern int CFStringRefObj_Convert(PyObject *, CFStringRef *);
Chris@87 200 extern PyObject *CFMutableStringRefObj_New(CFMutableStringRef);
Chris@87 201 extern int CFMutableStringRefObj_Convert(PyObject *, CFMutableStringRef *);
Chris@87 202 extern PyObject *CFArrayRefObj_New(CFArrayRef);
Chris@87 203 extern int CFArrayRefObj_Convert(PyObject *, CFArrayRef *);
Chris@87 204 extern PyObject *CFMutableArrayRefObj_New(CFMutableArrayRef);
Chris@87 205 extern int CFMutableArrayRefObj_Convert(PyObject *, CFMutableArrayRef *);
Chris@87 206 extern PyObject *CFDictionaryRefObj_New(CFDictionaryRef);
Chris@87 207 extern int CFDictionaryRefObj_Convert(PyObject *, CFDictionaryRef *);
Chris@87 208 extern PyObject *CFMutableDictionaryRefObj_New(CFMutableDictionaryRef);
Chris@87 209 extern int CFMutableDictionaryRefObj_Convert(PyObject *, CFMutableDictionaryRef *);
Chris@87 210 extern PyObject *CFURLRefObj_New(CFURLRef);
Chris@87 211 extern int CFURLRefObj_Convert(PyObject *, CFURLRef *);
Chris@87 212 extern int OptionalCFURLRefObj_Convert(PyObject *, CFURLRef *);
Chris@87 213
Chris@87 214 #ifdef __cplusplus
Chris@87 215 }
Chris@87 216 #endif
Chris@87 217 #endif