outdated things.
#define AEDesc_Convert _AEDesc_Convert
#endif
-#if UNIVERSAL_INTERFACES_VERSION >= 0x0340
typedef long refcontype;
-#else
-typedef unsigned long refcontype;
-#endif
static pascal OSErr GenericEventHandler(const AppleEvent *request, AppleEvent *reply, refcontype refcon); /* Forward */
upp_AEIdleProc = NewAEIdleUPP(AEIdleProc);
-#if UNIVERSAL_INTERFACES_VERSION >= 0x03400
- upp_GenericEventHandler = NewAEEventHandlerUPP(&GenericEventHandler);
-#else
upp_GenericEventHandler = NewAEEventHandlerUPP(GenericEventHandler);
-#endif
PyMac_INIT_TOOLBOX_OBJECT_NEW(AEDesc *, AEDesc_New);
PyMac_INIT_TOOLBOX_OBJECT_CONVERT(AEDesc, AEDesc_Convert);
#define AEDesc_Convert _AEDesc_Convert
#endif
-#if UNIVERSAL_INTERFACES_VERSION >= 0x0340
typedef long refcontype;
-#else
-typedef unsigned long refcontype;
-#endif
static pascal OSErr GenericEventHandler(const AppleEvent *request, AppleEvent *reply, refcontype refcon); /* Forward */
initstuff = initstuff + """
upp_AEIdleProc = NewAEIdleUPP(AEIdleProc);
-#if UNIVERSAL_INTERFACES_VERSION >= 0x03400
- upp_GenericEventHandler = NewAEEventHandlerUPP(&GenericEventHandler);
-#else
upp_GenericEventHandler = NewAEEventHandlerUPP(GenericEventHandler);
-#endif
PyMac_INIT_TOOLBOX_OBJECT_NEW(AEDesc *, AEDesc_New);
PyMac_INIT_TOOLBOX_OBJECT_CONVERT(AEDesc, AEDesc_Convert);
"""
#define DlgObj_Convert _DlgObj_Convert
#endif
-#if !ACCESSOR_CALLS_ARE_FUNCTIONS && UNIVERSAL_INTERFACES_VERSION < 0x340
-#define GetDialogTextEditHandle(dlg) (((DialogPeek)(dlg))->textH)
-#define SetPortDialogPort(dlg) SetPort(dlg)
-#define GetDialogPort(dlg) ((CGrafPtr)(dlg))
-#define GetDialogFromWindow(win) ((DialogRef)(win))
-#endif
-
/* XXX Shouldn't this be a stack? */
static PyObject *Dlg_FilterProc_callback = NULL;
#define DlgObj_Convert _DlgObj_Convert
#endif
-#if !ACCESSOR_CALLS_ARE_FUNCTIONS && UNIVERSAL_INTERFACES_VERSION < 0x340
-#define GetDialogTextEditHandle(dlg) (((DialogPeek)(dlg))->textH)
-#define SetPortDialogPort(dlg) SetPort(dlg)
-#define GetDialogPort(dlg) ((CGrafPtr)(dlg))
-#define GetDialogFromWindow(win) ((DialogRef)(win))
-#endif
-
/* XXX Shouldn't this be a stack? */
static PyObject *Dlg_FilterProc_callback = NULL;
int cataloginfo_from_dict(FSCatalogInfoBitmap bitmap, FSCatalogInfo *info, const PyObject *dict)
{
UInt32 storage;
-#if UNIVERSAL_INTERFACES_VERSION > 0x0332
FSPermissionInfo *permissions;
-#endif
// Dates
if (fetch_utcdatetime(bitmap, kFSCatInfoCreateDate, dict, _kFSCatInfoCreateDate, &info->createDate)) return NULL;
if (fetch_utcdatetime(bitmap, kFSCatInfoAccessDate, dict, _kFSCatInfoAccessDate, &info->accessDate)) return NULL;
if (fetch_utcdatetime(bitmap, kFSCatInfoBackupDate, dict, _kFSCatInfoBackupDate, &info->backupDate)) return NULL;
-#if UNIVERSAL_INTERFACES_VERSION > 0x0332
// Permissions
permissions = (FSPermissionInfo *) info->permissions;
if (fetch_long(bitmap, kFSCatInfoPermissions, dict, _kFSCatInfoUserID, &permissions->userID)) return NULL;
permissions->mode = (UInt16) storage;
if (fetch_long(bitmap, kFSCatInfoPermissions, dict, _kFSCatInfoUserAccess, &storage)) return NULL;
permissions->userAccess = (UInt8) storage;
-#endif
// IDs
if (fetch_long(bitmap, kFSCatInfoTextEncoding, dict, _kFSCatInfoTextEncoding, &info->textEncodingHint)) return NULL;
if (fetch_long(bitmap, kFSCatInfoNodeFlags, dict, _kFSCatInfoNodeFlags, &storage)) return NULL;
{
PyObject *dict;
PyObject *id;
-#if UNIVERSAL_INTERFACES_VERSION > 0x0332
FSPermissionInfo *permissions;
-#endif
char buffer[1024];
dict = PyDict_New();
if (insert_longlong(bitmap, kFSCatInfoRsrcSizes, dict, _kFSCatInfoRsrcLogical, info->rsrcLogicalSize)) return NULL;
if (insert_longlong(bitmap, kFSCatInfoRsrcSizes, dict, _kFSCatInfoRsrcPhysical, info->rsrcPhysicalSize)) return NULL;
-#if UNIVERSAL_INTERFACES_VERSION > 0x0332
// Permissions
permissions = (FSPermissionInfo *) info->permissions;
if (insert_long(bitmap, kFSCatInfoPermissions, dict, _kFSCatInfoUserID, permissions->userID)) return NULL;
if (insert_long(bitmap, kFSCatInfoPermissions, dict, _kFSCatInfoGroupID, permissions->groupID)) return NULL;
if (insert_long(bitmap, kFSCatInfoPermissions, dict, _kFSCatInfoUserAccess, permissions->userAccess)) return NULL;
if (insert_long(bitmap, kFSCatInfoPermissions, dict, _kFSCatInfoMode, permissions->mode)) return NULL;
-#endif
// Dates
if (insert_utcdatetime(bitmap, kFSCatInfoCreateDate, dict, _kFSCatInfoCreateDate, &info->createDate)) return NULL;
** Parse/generate TextStyle records
*/
static
-PyObject *TextStyle_New(itself)
- TextStylePtr itself;
+PyObject *TextStyle_New(TextStylePtr itself)
{
return Py_BuildValue("lllO&", (long)itself->tsFont, (long)itself->tsFace, (long)itself->tsSize, QdRGB_New,
}
static
-TextStyle_Convert(v, p_itself)
- PyObject *v;
- TextStylePtr p_itself;
+TextStyle_Convert(PyObject *v, TextStylePtr p_itself)
{
long font, face, size;
** Parse/generate RunInfo records
*/
static
-PyObject *RunInfo_New(itself)
- WERunInfo *itself;
+PyObject *RunInfo_New(WERunInfo *itself)
{
return Py_BuildValue("llhhO&O&", itself->runStart, itself->runEnd, itself->runHeight,
** Parse/generate TextStyle records
*/
static
-PyObject *TextStyle_New(itself)
- TextStylePtr itself;
+PyObject *TextStyle_New(TextStylePtr itself)
{
return Py_BuildValue("lllO&", (long)itself->tsFont, (long)itself->tsFace, (long)itself->tsSize, QdRGB_New,
}
static
-TextStyle_Convert(v, p_itself)
- PyObject *v;
- TextStylePtr p_itself;
+TextStyle_Convert(PyObject *v, TextStylePtr p_itself)
{
long font, face, size;
** Parse/generate RunInfo records
*/
static
-PyObject *RunInfo_New(itself)
- WERunInfo *itself;
+PyObject *RunInfo_New(WERunInfo *itself)
{
return Py_BuildValue("llhhO&O&", itself->runStart, itself->runEnd, itself->runHeight,
#define WinObj_Convert _WinObj_Convert
#endif
-#if !ACCESSOR_CALLS_ARE_FUNCTIONS && UNIVERSAL_INTERFACES_VERSION < 0x340
-/* Carbon calls that we emulate in classic mode */
-#define GetWindowSpareFlag(win) (((CWindowPeek)(win))->spareFlag)
-#define GetWindowFromPort(port) ((WindowRef)(port))
-#define GetWindowPortBounds(win, rectp) (*(rectp) = ((CWindowPeek)(win))->port.portRect)
-#endif
-#if !ACCESSOR_CALLS_ARE_FUNCTIONS
-#define IsPointerValid(p) (((long)p&3) == 0)
-#endif
-#if ACCESSOR_CALLS_ARE_FUNCTIONS
/* Classic calls that we emulate in carbon mode */
#define GetWindowUpdateRgn(win, rgn) GetWindowRegion((win), kWindowUpdateRgn, (rgn))
#define GetWindowStructureRgn(win, rgn) GetWindowRegion((win), kWindowStructureRgn, (rgn))
#define GetWindowContentRgn(win, rgn) GetWindowRegion((win), kWindowContentRgn, (rgn))
-#endif
/* Function to dispose a window, with a "normal" calling sequence */
static void
#define WinObj_Convert _WinObj_Convert
#endif
-#if !ACCESSOR_CALLS_ARE_FUNCTIONS && UNIVERSAL_INTERFACES_VERSION < 0x340
-/* Carbon calls that we emulate in classic mode */
-#define GetWindowSpareFlag(win) (((CWindowPeek)(win))->spareFlag)
-#define GetWindowFromPort(port) ((WindowRef)(port))
-#define GetWindowPortBounds(win, rectp) (*(rectp) = ((CWindowPeek)(win))->port.portRect)
-#endif
-#if !ACCESSOR_CALLS_ARE_FUNCTIONS
-#define IsPointerValid(p) (((long)p&3) == 0)
-#endif
-#if ACCESSOR_CALLS_ARE_FUNCTIONS
/* Classic calls that we emulate in carbon mode */
#define GetWindowUpdateRgn(win, rgn) GetWindowRegion((win), kWindowUpdateRgn, (rgn))
#define GetWindowStructureRgn(win, rgn) GetWindowRegion((win), kWindowStructureRgn, (rgn))
#define GetWindowContentRgn(win, rgn) GetWindowRegion((win), kWindowContentRgn, (rgn))
-#endif
/* Function to dispose a window, with a "normal" calling sequence */
static void
#include <Carbon/Carbon.h>
#endif /* WITHOUT_FRAMEWORKS */
-#if UNIVERSAL_INTERFACES_VERSION >= 0x0340
typedef long refcontype;
-#else
-typedef unsigned long refcontype;
-#endif
#include "Python.h"
#include "macglue.h"