mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-18 00:49:19 +02:00
modify and cleanup python headers and libs
This commit is contained in:
@@ -9,9 +9,24 @@
|
||||
|
||||
#include <Carbon/Carbon.h>
|
||||
|
||||
#ifndef __LP64__
|
||||
/*
|
||||
** Issue #27806: Workaround for gcc 4.x which does not have _has_include.
|
||||
*/
|
||||
#ifndef __has_include
|
||||
#define __has_include(x) 0
|
||||
#endif
|
||||
/* Workaround */
|
||||
|
||||
#if __has_include(<Availability.h>)
|
||||
#include <Availability.h>
|
||||
#define APPLE_SUPPORTS_QUICKTIME (__MAC_OS_X_VERSION_MAX_ALLOWED < 101200) && !__LP64__
|
||||
#else
|
||||
#define APPLE_SUPPORTS_QUICKTIME !__LP64__
|
||||
#endif
|
||||
|
||||
#if APPLE_SUPPORTS_QUICKTIME
|
||||
#include <QuickTime/QuickTime.h>
|
||||
#endif /* !__LP64__ */
|
||||
#endif /* APPLE_SUPPORTS_QUICKTIME */
|
||||
|
||||
/*
|
||||
** Helper routines for error codes and such.
|
||||
@@ -21,10 +36,10 @@ extern PyObject *PyMac_OSErrException; /* Exception for OSErr */
|
||||
PyObject *PyMac_GetOSErrException(void); /* Initialize & return it */
|
||||
PyObject *PyErr_Mac(PyObject *, int); /* Exception with a mac error */
|
||||
PyObject *PyMac_Error(OSErr); /* Uses PyMac_GetOSErrException */
|
||||
#ifndef __LP64__
|
||||
#if APPLE_SUPPORTS_QUICKTIME
|
||||
extern OSErr PyMac_GetFullPathname(FSSpec *, char *, int); /* convert
|
||||
fsspec->path */
|
||||
#endif /* __LP64__ */
|
||||
#endif /* APPLE_SUPPORTS_QUICKTIME */
|
||||
|
||||
/*
|
||||
** These conversion routines are defined in mactoolboxglue.c itself.
|
||||
@@ -109,54 +124,54 @@ extern PyObject *CmpInstObj_New(ComponentInstance);
|
||||
extern int CmpInstObj_Convert(PyObject *, ComponentInstance *);
|
||||
|
||||
/* Ctl exports */
|
||||
#ifndef __LP64__
|
||||
#if APPLE_SUPPORTS_QUICKTIME
|
||||
extern PyObject *CtlObj_New(ControlHandle);
|
||||
extern int CtlObj_Convert(PyObject *, ControlHandle *);
|
||||
#endif /* !__LP64__ */
|
||||
#endif /* APPLE_SUPPORTS_QUICKTIME */
|
||||
|
||||
/* Dlg exports */
|
||||
#ifndef __LP64__
|
||||
#if APPLE_SUPPORTS_QUICKTIME
|
||||
extern PyObject *DlgObj_New(DialogPtr);
|
||||
extern int DlgObj_Convert(PyObject *, DialogPtr *);
|
||||
extern PyObject *DlgObj_WhichDialog(DialogPtr);
|
||||
#endif /* !__LP64__ */
|
||||
#endif /* APPLE_SUPPORTS_QUICKTIME */
|
||||
|
||||
/* Drag exports */
|
||||
#ifndef __LP64__
|
||||
#if APPLE_SUPPORTS_QUICKTIME
|
||||
extern PyObject *DragObj_New(DragReference);
|
||||
extern int DragObj_Convert(PyObject *, DragReference *);
|
||||
#endif /* !__LP64__ */
|
||||
#endif /* APPLE_SUPPORTS_QUICKTIME */
|
||||
|
||||
/* List exports */
|
||||
#ifndef __LP64__
|
||||
#if APPLE_SUPPORTS_QUICKTIME
|
||||
extern PyObject *ListObj_New(ListHandle);
|
||||
extern int ListObj_Convert(PyObject *, ListHandle *);
|
||||
#endif /* !__LP64__ */
|
||||
#endif /* APPLE_SUPPORTS_QUICKTIME */
|
||||
|
||||
/* Menu exports */
|
||||
#ifndef __LP64__
|
||||
#if APPLE_SUPPORTS_QUICKTIME
|
||||
extern PyObject *MenuObj_New(MenuHandle);
|
||||
extern int MenuObj_Convert(PyObject *, MenuHandle *);
|
||||
#endif /* !__LP64__ */
|
||||
#endif /* APPLE_SUPPORTS_QUICKTIME */
|
||||
|
||||
/* Qd exports */
|
||||
#ifndef __LP64__
|
||||
#if APPLE_SUPPORTS_QUICKTIME
|
||||
extern PyObject *GrafObj_New(GrafPtr);
|
||||
extern int GrafObj_Convert(PyObject *, GrafPtr *);
|
||||
extern PyObject *BMObj_New(BitMapPtr);
|
||||
extern int BMObj_Convert(PyObject *, BitMapPtr *);
|
||||
extern PyObject *QdRGB_New(RGBColor *);
|
||||
extern int QdRGB_Convert(PyObject *, RGBColor *);
|
||||
#endif /* !__LP64__ */
|
||||
#endif /* APPLE_SUPPORTS_QUICKTIME */
|
||||
|
||||
/* Qdoffs exports */
|
||||
#ifndef __LP64__
|
||||
#if APPLE_SUPPORTS_QUICKTIME
|
||||
extern PyObject *GWorldObj_New(GWorldPtr);
|
||||
extern int GWorldObj_Convert(PyObject *, GWorldPtr *);
|
||||
#endif /* !__LP64__ */
|
||||
#endif /* APPLE_SUPPORTS_QUICKTIME */
|
||||
|
||||
/* Qt exports */
|
||||
#ifndef __LP64__
|
||||
#if APPLE_SUPPORTS_QUICKTIME
|
||||
extern PyObject *TrackObj_New(Track);
|
||||
extern int TrackObj_Convert(PyObject *, Track *);
|
||||
extern PyObject *MovieObj_New(Movie);
|
||||
@@ -169,7 +184,7 @@ extern PyObject *UserDataObj_New(UserData);
|
||||
extern int UserDataObj_Convert(PyObject *, UserData *);
|
||||
extern PyObject *MediaObj_New(Media);
|
||||
extern int MediaObj_Convert(PyObject *, Media *);
|
||||
#endif /* !__LP64__ */
|
||||
#endif /* APPLE_SUPPORTS_QUICKTIME */
|
||||
|
||||
/* Res exports */
|
||||
extern PyObject *ResObj_New(Handle);
|
||||
@@ -178,17 +193,17 @@ extern PyObject *OptResObj_New(Handle);
|
||||
extern int OptResObj_Convert(PyObject *, Handle *);
|
||||
|
||||
/* TE exports */
|
||||
#ifndef __LP64__
|
||||
#if APPLE_SUPPORTS_QUICKTIME
|
||||
extern PyObject *TEObj_New(TEHandle);
|
||||
extern int TEObj_Convert(PyObject *, TEHandle *);
|
||||
#endif /* !__LP64__ */
|
||||
#endif /* APPLE_SUPPORTS_QUICKTIME */
|
||||
|
||||
/* Win exports */
|
||||
#ifndef __LP64__
|
||||
#if APPLE_SUPPORTS_QUICKTIME
|
||||
extern PyObject *WinObj_New(WindowPtr);
|
||||
extern int WinObj_Convert(PyObject *, WindowPtr *);
|
||||
extern PyObject *WinObj_WhichWindow(WindowPtr);
|
||||
#endif /* !__LP64__ */
|
||||
#endif /* APPLE_SUPPORTS_QUICKTIME */
|
||||
|
||||
/* CF exports */
|
||||
extern PyObject *CFObj_New(CFTypeRef);
|
||||
|
||||
Reference in New Issue
Block a user