Test for TARGET_API_MAC_CARBON with #if in stead of #ifdef.
This commit is contained in:
parent
2d391f2f39
commit
74a1e63a89
|
@ -53,7 +53,7 @@ getwd(char *cwd)
|
||||||
sprintf(cwd, "I/O error %d in PBHGetVolSync", err);
|
sprintf(cwd, "I/O error %d in PBHGetVolSync", err);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
#ifdef TARGET_API_MAC_CARBON
|
#if TARGET_API_MAC_CARBON
|
||||||
p2cstrcpy(cwd, (StringPtr)cwd);
|
p2cstrcpy(cwd, (StringPtr)cwd);
|
||||||
ecwd = strchr(cwd, EOS);
|
ecwd = strchr(cwd, EOS);
|
||||||
#else
|
#else
|
||||||
|
@ -77,7 +77,7 @@ getwd(char *cwd)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
dirid= pb.d.ioDrParID;
|
dirid= pb.d.ioDrParID;
|
||||||
#ifdef TARGET_API_MAC_CARBON
|
#if TARGET_API_MAC_CARBON
|
||||||
p2cstrcpy(ebuf, (StringPtr)ebuf);
|
p2cstrcpy(ebuf, (StringPtr)ebuf);
|
||||||
ebuf += strlen(ebuf);
|
ebuf += strlen(ebuf);
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -20,7 +20,7 @@ DIR *
|
||||||
opendir(path)
|
opendir(path)
|
||||||
char *path;
|
char *path;
|
||||||
{
|
{
|
||||||
#ifdef TARGET_API_MAC_CARBON
|
#if TARGET_API_MAC_CARBON
|
||||||
Str255 ppath;
|
Str255 ppath;
|
||||||
FSSpec fss;
|
FSSpec fss;
|
||||||
int plen;
|
int plen;
|
||||||
|
@ -80,7 +80,7 @@ void
|
||||||
closedir(dirp)
|
closedir(dirp)
|
||||||
DIR *dirp;
|
DIR *dirp;
|
||||||
{
|
{
|
||||||
#ifdef TARGET_API_MAC_CARBON
|
#if TARGET_API_MAC_CARBON
|
||||||
dirp->nextfile = 0;
|
dirp->nextfile = 0;
|
||||||
#else
|
#else
|
||||||
WDPBRec pb;
|
WDPBRec pb;
|
||||||
|
@ -110,7 +110,7 @@ readdir(dp)
|
||||||
|
|
||||||
dir.d_name[0]= 0;
|
dir.d_name[0]= 0;
|
||||||
pb.d.ioNamePtr= (unsigned char *)dir.d_name;
|
pb.d.ioNamePtr= (unsigned char *)dir.d_name;
|
||||||
#ifdef TARGET_API_MAC_CARBON
|
#if TARGET_API_MAC_CARBON
|
||||||
pb.d.ioVRefNum= dp->vrefnum;
|
pb.d.ioVRefNum= dp->vrefnum;
|
||||||
pb.d.ioDrDirID= dp->dirid;
|
pb.d.ioDrDirID= dp->dirid;
|
||||||
#else
|
#else
|
||||||
|
@ -123,7 +123,7 @@ readdir(dp)
|
||||||
errno = EIO;
|
errno = EIO;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
#ifdef TARGET_API_MAC_CARBON
|
#if TARGET_API_MAC_CARBON
|
||||||
p2cstrcpy(dir.d_name, (StringPtr)dir.d_name);
|
p2cstrcpy(dir.d_name, (StringPtr)dir.d_name);
|
||||||
#else
|
#else
|
||||||
(void) p2cstr((unsigned char *)dir.d_name);
|
(void) p2cstr((unsigned char *)dir.d_name);
|
||||||
|
|
|
@ -92,7 +92,7 @@ int PyMac_FindCodeResourceModule(PyStringObject *, char *, char *); /* Test for
|
||||||
PyObject * PyMac_LoadCodeResourceModule(char *, char *); /* Load 'PYD ' resource from file */
|
PyObject * PyMac_LoadCodeResourceModule(char *, char *); /* Load 'PYD ' resource from file */
|
||||||
struct filedescr *PyMac_FindModuleExtension(char *, size_t *, char *); /* Look for module in single folder */
|
struct filedescr *PyMac_FindModuleExtension(char *, size_t *, char *); /* Look for module in single folder */
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
int PyMac_GetDirectory(FSSpec *dirfss, char *prompt); /* Ask user for a directory */
|
int PyMac_GetDirectory(FSSpec *dirfss, char *prompt); /* Ask user for a directory */
|
||||||
void PyMac_PromptGetFile(short numTypes, ConstSFTypeListPtr typeList,
|
void PyMac_PromptGetFile(short numTypes, ConstSFTypeListPtr typeList,
|
||||||
StandardFileReply *reply, char *prompt); /* Ask user for file, with prompt */
|
StandardFileReply *reply, char *prompt); /* Ask user for file, with prompt */
|
||||||
|
|
|
@ -350,7 +350,7 @@ navrr_getattr(self, name)
|
||||||
PyErr_Mac(ErrorObject, err);
|
PyErr_Mac(ErrorObject, err);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
#ifdef TARGET_API_MAC_CARBON
|
#if TARGET_API_MAC_CARBON
|
||||||
if (err=AEGetDescData(&desc, &fss, sizeof(FSSpec))) {
|
if (err=AEGetDescData(&desc, &fss, sizeof(FSSpec))) {
|
||||||
Py_DECREF(rv);
|
Py_DECREF(rv);
|
||||||
PyErr_Mac(ErrorObject, err);
|
PyErr_Mac(ErrorObject, err);
|
||||||
|
|
|
@ -761,7 +761,7 @@ static PyObject *AEDesc_getattr(self, name)
|
||||||
return PyMac_BuildOSType(self->ob_itself.descriptorType);
|
return PyMac_BuildOSType(self->ob_itself.descriptorType);
|
||||||
if (strcmp(name, "data") == 0) {
|
if (strcmp(name, "data") == 0) {
|
||||||
PyObject *res;
|
PyObject *res;
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
char state;
|
char state;
|
||||||
state = HGetState(self->ob_itself.dataHandle);
|
state = HGetState(self->ob_itself.dataHandle);
|
||||||
HLock(self->ob_itself.dataHandle);
|
HLock(self->ob_itself.dataHandle);
|
||||||
|
|
|
@ -178,7 +178,7 @@ if (strcmp(name, "type") == 0)
|
||||||
return PyMac_BuildOSType(self->ob_itself.descriptorType);
|
return PyMac_BuildOSType(self->ob_itself.descriptorType);
|
||||||
if (strcmp(name, "data") == 0) {
|
if (strcmp(name, "data") == 0) {
|
||||||
PyObject *res;
|
PyObject *res;
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
char state;
|
char state;
|
||||||
state = HGetState(self->ob_itself.dataHandle);
|
state = HGetState(self->ob_itself.dataHandle);
|
||||||
HLock(self->ob_itself.dataHandle);
|
HLock(self->ob_itself.dataHandle);
|
||||||
|
|
|
@ -160,7 +160,7 @@ static PyObject *CmpInstObj_SetComponentInstanceStorage(_self, _args)
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *CmpInstObj_GetComponentInstanceA5(_self, _args)
|
static PyObject *CmpInstObj_GetComponentInstanceA5(_self, _args)
|
||||||
ComponentInstanceObject *_self;
|
ComponentInstanceObject *_self;
|
||||||
|
@ -177,7 +177,7 @@ static PyObject *CmpInstObj_GetComponentInstanceA5(_self, _args)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *CmpInstObj_SetComponentInstanceA5(_self, _args)
|
static PyObject *CmpInstObj_SetComponentInstanceA5(_self, _args)
|
||||||
ComponentInstanceObject *_self;
|
ComponentInstanceObject *_self;
|
||||||
|
@ -256,12 +256,12 @@ static PyMethodDef CmpInstObj_methods[] = {
|
||||||
{"SetComponentInstanceStorage", (PyCFunction)CmpInstObj_SetComponentInstanceStorage, 1,
|
{"SetComponentInstanceStorage", (PyCFunction)CmpInstObj_SetComponentInstanceStorage, 1,
|
||||||
"(Handle theStorage) -> None"},
|
"(Handle theStorage) -> None"},
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"GetComponentInstanceA5", (PyCFunction)CmpInstObj_GetComponentInstanceA5, 1,
|
{"GetComponentInstanceA5", (PyCFunction)CmpInstObj_GetComponentInstanceA5, 1,
|
||||||
"() -> (long _rv)"},
|
"() -> (long _rv)"},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"SetComponentInstanceA5", (PyCFunction)CmpInstObj_SetComponentInstanceA5, 1,
|
{"SetComponentInstanceA5", (PyCFunction)CmpInstObj_SetComponentInstanceA5, 1,
|
||||||
"(long theA5) -> None"},
|
"(long theA5) -> None"},
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -60,7 +60,7 @@ class MyScanner(Scanner):
|
||||||
|
|
||||||
def makegreylist(self):
|
def makegreylist(self):
|
||||||
return [
|
return [
|
||||||
('#ifndef TARGET_API_MAC_CARBON', [
|
('#if !TARGET_API_MAC_CARBON', [
|
||||||
'SetComponentInstanceA5',
|
'SetComponentInstanceA5',
|
||||||
'GetComponentInstanceA5',
|
'GetComponentInstanceA5',
|
||||||
])]
|
])]
|
||||||
|
|
|
@ -14,7 +14,7 @@ staticforward PyObject *CtlObj_WhichControl(ControlHandle);
|
||||||
|
|
||||||
#define as_Control(h) ((ControlHandle)h)
|
#define as_Control(h) ((ControlHandle)h)
|
||||||
#define as_Resource(ctl) ((Handle)ctl)
|
#define as_Resource(ctl) ((Handle)ctl)
|
||||||
#ifdef TARGET_API_MAC_CARBON
|
#if TARGET_API_MAC_CARBON
|
||||||
#define GetControlRect(ctl, rectp) GetControlBounds(ctl, rectp)
|
#define GetControlRect(ctl, rectp) GetControlBounds(ctl, rectp)
|
||||||
#else
|
#else
|
||||||
#define GetControlRect(ctl, rectp) (*(rectp) = ((*(ctl))->contrlRect))
|
#define GetControlRect(ctl, rectp) (*(rectp) = ((*(ctl))->contrlRect))
|
||||||
|
@ -49,7 +49,7 @@ ControlFontStyle_Convert(v, itself)
|
||||||
/* TrackControl and HandleControlClick callback support */
|
/* TrackControl and HandleControlClick callback support */
|
||||||
static PyObject *tracker;
|
static PyObject *tracker;
|
||||||
static ControlActionUPP mytracker_upp;
|
static ControlActionUPP mytracker_upp;
|
||||||
#ifndef TARGET_API_MAC_CARBON_NOTYET
|
#if !TARGET_API_MAC_CARBON_NOTYET
|
||||||
static ControlUserPaneDrawUPP mydrawproc_upp;
|
static ControlUserPaneDrawUPP mydrawproc_upp;
|
||||||
static ControlUserPaneIdleUPP myidleproc_upp;
|
static ControlUserPaneIdleUPP myidleproc_upp;
|
||||||
static ControlUserPaneHitTestUPP myhittestproc_upp;
|
static ControlUserPaneHitTestUPP myhittestproc_upp;
|
||||||
|
@ -58,7 +58,7 @@ static ControlUserPaneTrackingUPP mytrackingproc_upp;
|
||||||
|
|
||||||
extern int settrackfunc(PyObject *); /* forward */
|
extern int settrackfunc(PyObject *); /* forward */
|
||||||
extern void clrtrackfunc(void); /* forward */
|
extern void clrtrackfunc(void); /* forward */
|
||||||
#ifndef TARGET_API_MAC_CARBON_NOTYET
|
#if !TARGET_API_MAC_CARBON_NOTYET
|
||||||
staticforward int setcallback(PyObject *, OSType, PyObject *, UniversalProcPtr *);
|
staticforward int setcallback(PyObject *, OSType, PyObject *, UniversalProcPtr *);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -780,7 +780,7 @@ static PyObject *CtlObj_GetControlReference(_self, _args)
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *CtlObj_GetAuxiliaryControlRecord(_self, _args)
|
static PyObject *CtlObj_GetAuxiliaryControlRecord(_self, _args)
|
||||||
ControlObject *_self;
|
ControlObject *_self;
|
||||||
|
@ -800,7 +800,7 @@ static PyObject *CtlObj_GetAuxiliaryControlRecord(_self, _args)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *CtlObj_SetControlColor(_self, _args)
|
static PyObject *CtlObj_SetControlColor(_self, _args)
|
||||||
ControlObject *_self;
|
ControlObject *_self;
|
||||||
|
@ -819,7 +819,7 @@ static PyObject *CtlObj_SetControlColor(_self, _args)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *CtlObj_GetBevelButtonMenuValue(_self, _args)
|
static PyObject *CtlObj_GetBevelButtonMenuValue(_self, _args)
|
||||||
ControlObject *_self;
|
ControlObject *_self;
|
||||||
|
@ -839,7 +839,7 @@ static PyObject *CtlObj_GetBevelButtonMenuValue(_self, _args)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *CtlObj_SetBevelButtonMenuValue(_self, _args)
|
static PyObject *CtlObj_SetBevelButtonMenuValue(_self, _args)
|
||||||
ControlObject *_self;
|
ControlObject *_self;
|
||||||
|
@ -860,7 +860,7 @@ static PyObject *CtlObj_SetBevelButtonMenuValue(_self, _args)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *CtlObj_GetBevelButtonMenuHandle(_self, _args)
|
static PyObject *CtlObj_GetBevelButtonMenuHandle(_self, _args)
|
||||||
ControlObject *_self;
|
ControlObject *_self;
|
||||||
|
@ -880,7 +880,7 @@ static PyObject *CtlObj_GetBevelButtonMenuHandle(_self, _args)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *CtlObj_SetBevelButtonTransform(_self, _args)
|
static PyObject *CtlObj_SetBevelButtonTransform(_self, _args)
|
||||||
ControlObject *_self;
|
ControlObject *_self;
|
||||||
|
@ -901,7 +901,7 @@ static PyObject *CtlObj_SetBevelButtonTransform(_self, _args)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *CtlObj_SetImageWellTransform(_self, _args)
|
static PyObject *CtlObj_SetImageWellTransform(_self, _args)
|
||||||
ControlObject *_self;
|
ControlObject *_self;
|
||||||
|
@ -922,7 +922,7 @@ static PyObject *CtlObj_SetImageWellTransform(_self, _args)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *CtlObj_GetTabContentRect(_self, _args)
|
static PyObject *CtlObj_GetTabContentRect(_self, _args)
|
||||||
ControlObject *_self;
|
ControlObject *_self;
|
||||||
|
@ -942,7 +942,7 @@ static PyObject *CtlObj_GetTabContentRect(_self, _args)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *CtlObj_SetTabEnabled(_self, _args)
|
static PyObject *CtlObj_SetTabEnabled(_self, _args)
|
||||||
ControlObject *_self;
|
ControlObject *_self;
|
||||||
|
@ -966,7 +966,7 @@ static PyObject *CtlObj_SetTabEnabled(_self, _args)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *CtlObj_SetDisclosureTriangleLastValue(_self, _args)
|
static PyObject *CtlObj_SetDisclosureTriangleLastValue(_self, _args)
|
||||||
ControlObject *_self;
|
ControlObject *_self;
|
||||||
|
@ -1421,7 +1421,7 @@ static PyObject *CtlObj_GetControlDataHandle(_self, _args)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON_NOTYET
|
#if !TARGET_API_MAC_CARBON_NOTYET
|
||||||
|
|
||||||
static PyObject *CtlObj_SetControlDataCallback(_self, _args)
|
static PyObject *CtlObj_SetControlDataCallback(_self, _args)
|
||||||
ControlObject *_self;
|
ControlObject *_self;
|
||||||
|
@ -1457,7 +1457,7 @@ static PyObject *CtlObj_SetControlDataCallback(_self, _args)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON_NOTYET
|
#if !TARGET_API_MAC_CARBON_NOTYET
|
||||||
|
|
||||||
static PyObject *CtlObj_GetPopupData(_self, _args)
|
static PyObject *CtlObj_GetPopupData(_self, _args)
|
||||||
ControlObject *_self;
|
ControlObject *_self;
|
||||||
|
@ -1480,7 +1480,7 @@ static PyObject *CtlObj_GetPopupData(_self, _args)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON_NOTYET
|
#if !TARGET_API_MAC_CARBON_NOTYET
|
||||||
|
|
||||||
static PyObject *CtlObj_SetPopupData(_self, _args)
|
static PyObject *CtlObj_SetPopupData(_self, _args)
|
||||||
ControlObject *_self;
|
ControlObject *_self;
|
||||||
|
@ -1591,52 +1591,52 @@ static PyMethodDef CtlObj_methods[] = {
|
||||||
{"GetControlReference", (PyCFunction)CtlObj_GetControlReference, 1,
|
{"GetControlReference", (PyCFunction)CtlObj_GetControlReference, 1,
|
||||||
"() -> (SInt32 _rv)"},
|
"() -> (SInt32 _rv)"},
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"GetAuxiliaryControlRecord", (PyCFunction)CtlObj_GetAuxiliaryControlRecord, 1,
|
{"GetAuxiliaryControlRecord", (PyCFunction)CtlObj_GetAuxiliaryControlRecord, 1,
|
||||||
"() -> (Boolean _rv, AuxCtlHandle acHndl)"},
|
"() -> (Boolean _rv, AuxCtlHandle acHndl)"},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"SetControlColor", (PyCFunction)CtlObj_SetControlColor, 1,
|
{"SetControlColor", (PyCFunction)CtlObj_SetControlColor, 1,
|
||||||
"(CCTabHandle newColorTable) -> None"},
|
"(CCTabHandle newColorTable) -> None"},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"GetBevelButtonMenuValue", (PyCFunction)CtlObj_GetBevelButtonMenuValue, 1,
|
{"GetBevelButtonMenuValue", (PyCFunction)CtlObj_GetBevelButtonMenuValue, 1,
|
||||||
"() -> (SInt16 outValue)"},
|
"() -> (SInt16 outValue)"},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"SetBevelButtonMenuValue", (PyCFunction)CtlObj_SetBevelButtonMenuValue, 1,
|
{"SetBevelButtonMenuValue", (PyCFunction)CtlObj_SetBevelButtonMenuValue, 1,
|
||||||
"(SInt16 inValue) -> None"},
|
"(SInt16 inValue) -> None"},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"GetBevelButtonMenuHandle", (PyCFunction)CtlObj_GetBevelButtonMenuHandle, 1,
|
{"GetBevelButtonMenuHandle", (PyCFunction)CtlObj_GetBevelButtonMenuHandle, 1,
|
||||||
"() -> (MenuHandle outHandle)"},
|
"() -> (MenuHandle outHandle)"},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"SetBevelButtonTransform", (PyCFunction)CtlObj_SetBevelButtonTransform, 1,
|
{"SetBevelButtonTransform", (PyCFunction)CtlObj_SetBevelButtonTransform, 1,
|
||||||
"(IconTransformType transform) -> None"},
|
"(IconTransformType transform) -> None"},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"SetImageWellTransform", (PyCFunction)CtlObj_SetImageWellTransform, 1,
|
{"SetImageWellTransform", (PyCFunction)CtlObj_SetImageWellTransform, 1,
|
||||||
"(IconTransformType inTransform) -> None"},
|
"(IconTransformType inTransform) -> None"},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"GetTabContentRect", (PyCFunction)CtlObj_GetTabContentRect, 1,
|
{"GetTabContentRect", (PyCFunction)CtlObj_GetTabContentRect, 1,
|
||||||
"() -> (Rect outContentRect)"},
|
"() -> (Rect outContentRect)"},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"SetTabEnabled", (PyCFunction)CtlObj_SetTabEnabled, 1,
|
{"SetTabEnabled", (PyCFunction)CtlObj_SetTabEnabled, 1,
|
||||||
"(SInt16 inTabToHilite, Boolean inEnabled) -> None"},
|
"(SInt16 inTabToHilite, Boolean inEnabled) -> None"},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"SetDisclosureTriangleLastValue", (PyCFunction)CtlObj_SetDisclosureTriangleLastValue, 1,
|
{"SetDisclosureTriangleLastValue", (PyCFunction)CtlObj_SetDisclosureTriangleLastValue, 1,
|
||||||
"(SInt16 inValue) -> None"},
|
"(SInt16 inValue) -> None"},
|
||||||
#endif
|
#endif
|
||||||
|
@ -1677,17 +1677,17 @@ static PyMethodDef CtlObj_methods[] = {
|
||||||
{"GetControlDataHandle", (PyCFunction)CtlObj_GetControlDataHandle, 1,
|
{"GetControlDataHandle", (PyCFunction)CtlObj_GetControlDataHandle, 1,
|
||||||
"(part, type) -> ResObj"},
|
"(part, type) -> ResObj"},
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON_NOTYET
|
#if !TARGET_API_MAC_CARBON_NOTYET
|
||||||
{"SetControlDataCallback", (PyCFunction)CtlObj_SetControlDataCallback, 1,
|
{"SetControlDataCallback", (PyCFunction)CtlObj_SetControlDataCallback, 1,
|
||||||
"(callbackfunc) -> None"},
|
"(callbackfunc) -> None"},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON_NOTYET
|
#if !TARGET_API_MAC_CARBON_NOTYET
|
||||||
{"GetPopupData", (PyCFunction)CtlObj_GetPopupData, 1,
|
{"GetPopupData", (PyCFunction)CtlObj_GetPopupData, 1,
|
||||||
NULL},
|
NULL},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON_NOTYET
|
#if !TARGET_API_MAC_CARBON_NOTYET
|
||||||
{"SetPopupData", (PyCFunction)CtlObj_SetPopupData, 1,
|
{"SetPopupData", (PyCFunction)CtlObj_SetPopupData, 1,
|
||||||
NULL},
|
NULL},
|
||||||
#endif
|
#endif
|
||||||
|
@ -2179,7 +2179,7 @@ mytracker(ControlHandle ctl, short part)
|
||||||
PySys_WriteStderr("TrackControl or HandleControlClick: exception in tracker function\n");
|
PySys_WriteStderr("TrackControl or HandleControlClick: exception in tracker function\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON_NOTYET
|
#if !TARGET_API_MAC_CARBON_NOTYET
|
||||||
static int
|
static int
|
||||||
setcallback(myself, which, callback, uppp)
|
setcallback(myself, which, callback, uppp)
|
||||||
PyObject *myself;
|
PyObject *myself;
|
||||||
|
@ -2307,7 +2307,7 @@ void initCtl()
|
||||||
|
|
||||||
|
|
||||||
mytracker_upp = NewControlActionProc(mytracker);
|
mytracker_upp = NewControlActionProc(mytracker);
|
||||||
#ifndef TARGET_API_MAC_CARBON_NOTYET
|
#if !TARGET_API_MAC_CARBON_NOTYET
|
||||||
mydrawproc_upp = NewControlUserPaneDrawProc(mydrawproc);
|
mydrawproc_upp = NewControlUserPaneDrawProc(mydrawproc);
|
||||||
myidleproc_upp = NewControlUserPaneIdleProc(myidleproc);
|
myidleproc_upp = NewControlUserPaneIdleProc(myidleproc);
|
||||||
myhittestproc_upp = NewControlUserPaneHitTestProc(myhittestproc);
|
myhittestproc_upp = NewControlUserPaneHitTestProc(myhittestproc);
|
||||||
|
|
|
@ -81,7 +81,7 @@ class MyScanner(Scanner):
|
||||||
|
|
||||||
def makegreylist(self):
|
def makegreylist(self):
|
||||||
return [
|
return [
|
||||||
('#ifndef TARGET_API_MAC_CARBON', [
|
('#if !TARGET_API_MAC_CARBON', [
|
||||||
'GetAuxiliaryControlRecord',
|
'GetAuxiliaryControlRecord',
|
||||||
'SetControlColor',
|
'SetControlColor',
|
||||||
# These have suddenly disappeared in UH 3.3.2...
|
# These have suddenly disappeared in UH 3.3.2...
|
||||||
|
|
|
@ -48,7 +48,7 @@ staticforward PyObject *CtlObj_WhichControl(ControlHandle);
|
||||||
|
|
||||||
#define as_Control(h) ((ControlHandle)h)
|
#define as_Control(h) ((ControlHandle)h)
|
||||||
#define as_Resource(ctl) ((Handle)ctl)
|
#define as_Resource(ctl) ((Handle)ctl)
|
||||||
#ifdef TARGET_API_MAC_CARBON
|
#if TARGET_API_MAC_CARBON
|
||||||
#define GetControlRect(ctl, rectp) GetControlBounds(ctl, rectp)
|
#define GetControlRect(ctl, rectp) GetControlBounds(ctl, rectp)
|
||||||
#else
|
#else
|
||||||
#define GetControlRect(ctl, rectp) (*(rectp) = ((*(ctl))->contrlRect))
|
#define GetControlRect(ctl, rectp) (*(rectp) = ((*(ctl))->contrlRect))
|
||||||
|
@ -83,7 +83,7 @@ ControlFontStyle_Convert(v, itself)
|
||||||
/* TrackControl and HandleControlClick callback support */
|
/* TrackControl and HandleControlClick callback support */
|
||||||
static PyObject *tracker;
|
static PyObject *tracker;
|
||||||
static ControlActionUPP mytracker_upp;
|
static ControlActionUPP mytracker_upp;
|
||||||
#ifndef TARGET_API_MAC_CARBON_NOTYET
|
#if !TARGET_API_MAC_CARBON_NOTYET
|
||||||
static ControlUserPaneDrawUPP mydrawproc_upp;
|
static ControlUserPaneDrawUPP mydrawproc_upp;
|
||||||
static ControlUserPaneIdleUPP myidleproc_upp;
|
static ControlUserPaneIdleUPP myidleproc_upp;
|
||||||
static ControlUserPaneHitTestUPP myhittestproc_upp;
|
static ControlUserPaneHitTestUPP myhittestproc_upp;
|
||||||
|
@ -92,7 +92,7 @@ static ControlUserPaneTrackingUPP mytrackingproc_upp;
|
||||||
|
|
||||||
extern int settrackfunc(PyObject *); /* forward */
|
extern int settrackfunc(PyObject *); /* forward */
|
||||||
extern void clrtrackfunc(void); /* forward */
|
extern void clrtrackfunc(void); /* forward */
|
||||||
#ifndef TARGET_API_MAC_CARBON_NOTYET
|
#if !TARGET_API_MAC_CARBON_NOTYET
|
||||||
staticforward int setcallback(PyObject *, OSType, PyObject *, UniversalProcPtr *);
|
staticforward int setcallback(PyObject *, OSType, PyObject *, UniversalProcPtr *);
|
||||||
#endif
|
#endif
|
||||||
"""
|
"""
|
||||||
|
@ -166,7 +166,7 @@ mytracker(ControlHandle ctl, short part)
|
||||||
PySys_WriteStderr("TrackControl or HandleControlClick: exception in tracker function\\n");
|
PySys_WriteStderr("TrackControl or HandleControlClick: exception in tracker function\\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON_NOTYET
|
#if !TARGET_API_MAC_CARBON_NOTYET
|
||||||
static int
|
static int
|
||||||
setcallback(myself, which, callback, uppp)
|
setcallback(myself, which, callback, uppp)
|
||||||
PyObject *myself;
|
PyObject *myself;
|
||||||
|
@ -288,7 +288,7 @@ mytrackingproc(ControlHandle control, Point startPt, ControlActionUPP actionProc
|
||||||
|
|
||||||
initstuff = initstuff + """
|
initstuff = initstuff + """
|
||||||
mytracker_upp = NewControlActionProc(mytracker);
|
mytracker_upp = NewControlActionProc(mytracker);
|
||||||
#ifndef TARGET_API_MAC_CARBON_NOTYET
|
#if !TARGET_API_MAC_CARBON_NOTYET
|
||||||
mydrawproc_upp = NewControlUserPaneDrawProc(mydrawproc);
|
mydrawproc_upp = NewControlUserPaneDrawProc(mydrawproc);
|
||||||
myidleproc_upp = NewControlUserPaneIdleProc(myidleproc);
|
myidleproc_upp = NewControlUserPaneIdleProc(myidleproc);
|
||||||
myhittestproc_upp = NewControlUserPaneHitTestProc(myhittestproc);
|
myhittestproc_upp = NewControlUserPaneHitTestProc(myhittestproc);
|
||||||
|
@ -570,7 +570,7 @@ _res = Py_None;
|
||||||
return _res;
|
return _res;
|
||||||
"""
|
"""
|
||||||
|
|
||||||
f = ManualGenerator("SetControlDataCallback", setcontroldatacallback_body, condition="#ifndef TARGET_API_MAC_CARBON_NOTYET");
|
f = ManualGenerator("SetControlDataCallback", setcontroldatacallback_body, condition="#if !TARGET_API_MAC_CARBON_NOTYET");
|
||||||
f.docstring = lambda: "(callbackfunc) -> None"
|
f.docstring = lambda: "(callbackfunc) -> None"
|
||||||
object.add(f)
|
object.add(f)
|
||||||
|
|
||||||
|
@ -588,7 +588,7 @@ _res = Py_BuildValue("O&i", MenuObj_New, (*hdl)->mHandle, (int)(*hdl)->mID);
|
||||||
HUnlock((Handle)hdl);
|
HUnlock((Handle)hdl);
|
||||||
return _res;
|
return _res;
|
||||||
"""
|
"""
|
||||||
f = ManualGenerator("GetPopupData", getpopupdata_body, condition="#ifndef TARGET_API_MAC_CARBON_NOTYET")
|
f = ManualGenerator("GetPopupData", getpopupdata_body, condition="#if !TARGET_API_MAC_CARBON_NOTYET")
|
||||||
object.add(f)
|
object.add(f)
|
||||||
|
|
||||||
setpopupdata_body = """
|
setpopupdata_body = """
|
||||||
|
@ -608,7 +608,7 @@ hdl = (PopupPrivateDataHandle)(*_self->ob_itself)->contrlData;
|
||||||
Py_INCREF(Py_None);
|
Py_INCREF(Py_None);
|
||||||
return Py_None;
|
return Py_None;
|
||||||
"""
|
"""
|
||||||
f = ManualGenerator("SetPopupData", setpopupdata_body, condition="#ifndef TARGET_API_MAC_CARBON_NOTYET")
|
f = ManualGenerator("SetPopupData", setpopupdata_body, condition="#if !TARGET_API_MAC_CARBON_NOTYET")
|
||||||
object.add(f)
|
object.add(f)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -705,7 +705,7 @@ static PyObject *DlgObj_GetDialogKeyboardFocusItem(_self, _args)
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *DlgObj_SetGrafPortOfDialog(_self, _args)
|
static PyObject *DlgObj_SetGrafPortOfDialog(_self, _args)
|
||||||
DialogObject *_self;
|
DialogObject *_self;
|
||||||
|
@ -787,7 +787,7 @@ static PyMethodDef DlgObj_methods[] = {
|
||||||
{"GetDialogKeyboardFocusItem", (PyCFunction)DlgObj_GetDialogKeyboardFocusItem, 1,
|
{"GetDialogKeyboardFocusItem", (PyCFunction)DlgObj_GetDialogKeyboardFocusItem, 1,
|
||||||
"() -> (SInt16 _rv)"},
|
"() -> (SInt16 _rv)"},
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"SetGrafPortOfDialog", (PyCFunction)DlgObj_SetGrafPortOfDialog, 1,
|
{"SetGrafPortOfDialog", (PyCFunction)DlgObj_SetGrafPortOfDialog, 1,
|
||||||
"() -> None"},
|
"() -> None"},
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -57,7 +57,7 @@ class MyScanner(Scanner):
|
||||||
|
|
||||||
def makegreylist(self):
|
def makegreylist(self):
|
||||||
return [
|
return [
|
||||||
('#ifndef TARGET_API_MAC_CARBON', [
|
('#if !TARGET_API_MAC_CARBON', [
|
||||||
'SetGrafPortOfDialog',
|
'SetGrafPortOfDialog',
|
||||||
])]
|
])]
|
||||||
|
|
||||||
|
|
|
@ -165,7 +165,7 @@ object.add(f)
|
||||||
f = Method(SInt16, 'GetDialogKeyboardFocusItem', (DialogRef, 'dialog', InMode))
|
f = Method(SInt16, 'GetDialogKeyboardFocusItem', (DialogRef, 'dialog', InMode))
|
||||||
object.add(f)
|
object.add(f)
|
||||||
f = Method(void, 'SetGrafPortOfDialog', (DialogRef, 'dialog', InMode),
|
f = Method(void, 'SetGrafPortOfDialog', (DialogRef, 'dialog', InMode),
|
||||||
condition='#ifndef TARGET_API_MAC_CARBON')
|
condition='#if !TARGET_API_MAC_CARBON')
|
||||||
object.add(f)
|
object.add(f)
|
||||||
|
|
||||||
setuseritembody = """
|
setuseritembody = """
|
||||||
|
|
|
@ -198,7 +198,7 @@ static PyObject *Evt_PostEvent(_self, _args)
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *Evt_OSEventAvail(_self, _args)
|
static PyObject *Evt_OSEventAvail(_self, _args)
|
||||||
PyObject *_self;
|
PyObject *_self;
|
||||||
|
@ -220,7 +220,7 @@ static PyObject *Evt_OSEventAvail(_self, _args)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *Evt_GetOSEvent(_self, _args)
|
static PyObject *Evt_GetOSEvent(_self, _args)
|
||||||
PyObject *_self;
|
PyObject *_self;
|
||||||
|
@ -260,7 +260,7 @@ static PyObject *Evt_FlushEvents(_self, _args)
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *Evt_SystemClick(_self, _args)
|
static PyObject *Evt_SystemClick(_self, _args)
|
||||||
PyObject *_self;
|
PyObject *_self;
|
||||||
|
@ -281,7 +281,7 @@ static PyObject *Evt_SystemClick(_self, _args)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *Evt_SystemTask(_self, _args)
|
static PyObject *Evt_SystemTask(_self, _args)
|
||||||
PyObject *_self;
|
PyObject *_self;
|
||||||
|
@ -297,7 +297,7 @@ static PyObject *Evt_SystemTask(_self, _args)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *Evt_SystemEvent(_self, _args)
|
static PyObject *Evt_SystemEvent(_self, _args)
|
||||||
PyObject *_self;
|
PyObject *_self;
|
||||||
|
@ -370,29 +370,29 @@ static PyMethodDef Evt_methods[] = {
|
||||||
{"PostEvent", (PyCFunction)Evt_PostEvent, 1,
|
{"PostEvent", (PyCFunction)Evt_PostEvent, 1,
|
||||||
"(EventKind eventNum, UInt32 eventMsg) -> None"},
|
"(EventKind eventNum, UInt32 eventMsg) -> None"},
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"OSEventAvail", (PyCFunction)Evt_OSEventAvail, 1,
|
{"OSEventAvail", (PyCFunction)Evt_OSEventAvail, 1,
|
||||||
"(EventMask mask) -> (Boolean _rv, EventRecord theEvent)"},
|
"(EventMask mask) -> (Boolean _rv, EventRecord theEvent)"},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"GetOSEvent", (PyCFunction)Evt_GetOSEvent, 1,
|
{"GetOSEvent", (PyCFunction)Evt_GetOSEvent, 1,
|
||||||
"(EventMask mask) -> (Boolean _rv, EventRecord theEvent)"},
|
"(EventMask mask) -> (Boolean _rv, EventRecord theEvent)"},
|
||||||
#endif
|
#endif
|
||||||
{"FlushEvents", (PyCFunction)Evt_FlushEvents, 1,
|
{"FlushEvents", (PyCFunction)Evt_FlushEvents, 1,
|
||||||
"(EventMask whichMask, EventMask stopMask) -> None"},
|
"(EventMask whichMask, EventMask stopMask) -> None"},
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"SystemClick", (PyCFunction)Evt_SystemClick, 1,
|
{"SystemClick", (PyCFunction)Evt_SystemClick, 1,
|
||||||
"(EventRecord theEvent, WindowPtr theWindow) -> None"},
|
"(EventRecord theEvent, WindowPtr theWindow) -> None"},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"SystemTask", (PyCFunction)Evt_SystemTask, 1,
|
{"SystemTask", (PyCFunction)Evt_SystemTask, 1,
|
||||||
"() -> None"},
|
"() -> None"},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"SystemEvent", (PyCFunction)Evt_SystemEvent, 1,
|
{"SystemEvent", (PyCFunction)Evt_SystemEvent, 1,
|
||||||
"(EventRecord theEvent) -> (Boolean _rv)"},
|
"(EventRecord theEvent) -> (Boolean _rv)"},
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -37,7 +37,7 @@ class MyScanner(Scanner):
|
||||||
|
|
||||||
def makegreylist(self):
|
def makegreylist(self):
|
||||||
return [
|
return [
|
||||||
('#ifndef TARGET_API_MAC_CARBON', [
|
('#if !TARGET_API_MAC_CARBON', [
|
||||||
'SystemEvent',
|
'SystemEvent',
|
||||||
'SystemTask',
|
'SystemTask',
|
||||||
'SystemClick',
|
'SystemClick',
|
||||||
|
|
|
@ -45,7 +45,7 @@ FMRec_Convert(v, p_itself)
|
||||||
|
|
||||||
static PyObject *Fm_Error;
|
static PyObject *Fm_Error;
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *Fm_InitFonts(_self, _args)
|
static PyObject *Fm_InitFonts(_self, _args)
|
||||||
PyObject *_self;
|
PyObject *_self;
|
||||||
|
@ -114,7 +114,7 @@ static PyObject *Fm_RealFont(_self, _args)
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *Fm_SetFontLock(_self, _args)
|
static PyObject *Fm_SetFontLock(_self, _args)
|
||||||
PyObject *_self;
|
PyObject *_self;
|
||||||
|
@ -267,7 +267,7 @@ static PyObject *Fm_GetPreserveGlyph(_self, _args)
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *Fm_FlushFonts(_self, _args)
|
static PyObject *Fm_FlushFonts(_self, _args)
|
||||||
PyObject *_self;
|
PyObject *_self;
|
||||||
|
@ -351,7 +351,7 @@ static PyObject *Fm_IsAntiAliasedTextEnabled(_self, _args)
|
||||||
|
|
||||||
static PyMethodDef Fm_methods[] = {
|
static PyMethodDef Fm_methods[] = {
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"InitFonts", (PyCFunction)Fm_InitFonts, 1,
|
{"InitFonts", (PyCFunction)Fm_InitFonts, 1,
|
||||||
"() -> None"},
|
"() -> None"},
|
||||||
#endif
|
#endif
|
||||||
|
@ -362,7 +362,7 @@ static PyMethodDef Fm_methods[] = {
|
||||||
{"RealFont", (PyCFunction)Fm_RealFont, 1,
|
{"RealFont", (PyCFunction)Fm_RealFont, 1,
|
||||||
"(short fontNum, short size) -> (Boolean _rv)"},
|
"(short fontNum, short size) -> (Boolean _rv)"},
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"SetFontLock", (PyCFunction)Fm_SetFontLock, 1,
|
{"SetFontLock", (PyCFunction)Fm_SetFontLock, 1,
|
||||||
"(Boolean lockFlag) -> None"},
|
"(Boolean lockFlag) -> None"},
|
||||||
#endif
|
#endif
|
||||||
|
@ -385,7 +385,7 @@ static PyMethodDef Fm_methods[] = {
|
||||||
{"GetPreserveGlyph", (PyCFunction)Fm_GetPreserveGlyph, 1,
|
{"GetPreserveGlyph", (PyCFunction)Fm_GetPreserveGlyph, 1,
|
||||||
"() -> (Boolean _rv)"},
|
"() -> (Boolean _rv)"},
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"FlushFonts", (PyCFunction)Fm_FlushFonts, 1,
|
{"FlushFonts", (PyCFunction)Fm_FlushFonts, 1,
|
||||||
"() -> None"},
|
"() -> None"},
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -40,7 +40,7 @@ class MyScanner(Scanner):
|
||||||
|
|
||||||
def makegreylist(self):
|
def makegreylist(self):
|
||||||
return [
|
return [
|
||||||
('#ifndef TARGET_API_MAC_CARBON', [
|
('#if !TARGET_API_MAC_CARBON', [
|
||||||
'InitFonts',
|
'InitFonts',
|
||||||
'SetFontLock',
|
'SetFontLock',
|
||||||
'FlushFonts',
|
'FlushFonts',
|
||||||
|
|
|
@ -564,7 +564,7 @@ static PyObject *Icn_PlotCIconHandle(_self, _args)
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *Icn_IconServicesTerminate(_self, _args)
|
static PyObject *Icn_IconServicesTerminate(_self, _args)
|
||||||
PyObject *_self;
|
PyObject *_self;
|
||||||
|
@ -1300,7 +1300,7 @@ static PyMethodDef Icn_methods[] = {
|
||||||
{"PlotCIconHandle", (PyCFunction)Icn_PlotCIconHandle, 1,
|
{"PlotCIconHandle", (PyCFunction)Icn_PlotCIconHandle, 1,
|
||||||
"(Rect theRect, IconAlignmentType align, IconTransformType transform, CIconHandle theCIcon) -> None"},
|
"(Rect theRect, IconAlignmentType align, IconTransformType transform, CIconHandle theCIcon) -> None"},
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"IconServicesTerminate", (PyCFunction)Icn_IconServicesTerminate, 1,
|
{"IconServicesTerminate", (PyCFunction)Icn_IconServicesTerminate, 1,
|
||||||
"() -> None"},
|
"() -> None"},
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -47,7 +47,7 @@ class MyScanner(Scanner):
|
||||||
|
|
||||||
def makegreylist(self):
|
def makegreylist(self):
|
||||||
return [
|
return [
|
||||||
('#ifndef TARGET_API_MAC_CARBON', [
|
('#if !TARGET_API_MAC_CARBON', [
|
||||||
'IconServicesTerminate',
|
'IconServicesTerminate',
|
||||||
])]
|
])]
|
||||||
|
|
||||||
|
|
|
@ -228,13 +228,13 @@ struct _inittab _PyImport_Inittab[] = {
|
||||||
{"List", initList},
|
{"List", initList},
|
||||||
{"Snd", initSnd},
|
{"Snd", initSnd},
|
||||||
{"Sndihooks", initSndihooks},
|
{"Sndihooks", initSndihooks},
|
||||||
#ifndef TARGET_API_MAC_CARBON_NOTYET
|
#if !TARGET_API_MAC_CARBON_NOTYET
|
||||||
/* Carbon scrap manager is completely different */
|
/* Carbon scrap manager is completely different */
|
||||||
{"Scrap", initScrap},
|
{"Scrap", initScrap},
|
||||||
#endif
|
#endif
|
||||||
{"TE", initTE},
|
{"TE", initTE},
|
||||||
{"ColorPicker", initColorPicker},
|
{"ColorPicker", initColorPicker},
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"Help", initHelp},
|
{"Help", initHelp},
|
||||||
{"Printing", initPrinting},
|
{"Printing", initPrinting},
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -710,7 +710,7 @@ mfs_ResolveAliasFile(self, args)
|
||||||
return Py_BuildValue("Oii", newmfssobject(&fss), (int)isfolder, (int)wasaliased);
|
return Py_BuildValue("Oii", newmfssobject(&fss), (int)isfolder, (int)wasaliased);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
static PyObject *
|
static PyObject *
|
||||||
mfs_StandardGetFile(self, args)
|
mfs_StandardGetFile(self, args)
|
||||||
PyObject *self; /* Not used */
|
PyObject *self; /* Not used */
|
||||||
|
@ -854,7 +854,7 @@ mfs_RawAlias(self, args)
|
||||||
return (PyObject *)newmfsaobject((AliasHandle)h);
|
return (PyObject *)newmfsaobject((AliasHandle)h);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
static PyObject *
|
static PyObject *
|
||||||
mfs_GetDirectory(self, args)
|
mfs_GetDirectory(self, args)
|
||||||
PyObject *self; /* Not used */
|
PyObject *self; /* Not used */
|
||||||
|
@ -951,7 +951,7 @@ mfs_NewAliasMinimalFromFullPath(self, args)
|
||||||
|
|
||||||
static struct PyMethodDef mfs_methods[] = {
|
static struct PyMethodDef mfs_methods[] = {
|
||||||
{"ResolveAliasFile", mfs_ResolveAliasFile, 1},
|
{"ResolveAliasFile", mfs_ResolveAliasFile, 1},
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"StandardGetFile", mfs_StandardGetFile, 1},
|
{"StandardGetFile", mfs_StandardGetFile, 1},
|
||||||
{"PromptGetFile", mfs_PromptGetFile, 1},
|
{"PromptGetFile", mfs_PromptGetFile, 1},
|
||||||
{"StandardPutFile", mfs_StandardPutFile, 1},
|
{"StandardPutFile", mfs_StandardPutFile, 1},
|
||||||
|
|
|
@ -31,7 +31,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON_NOTYET
|
#if !TARGET_API_MAC_CARBON_NOTYET
|
||||||
/* XXXX Skip for Carbon, for now */
|
/* XXXX Skip for Carbon, for now */
|
||||||
#include "macstat.h"
|
#include "macstat.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -51,7 +51,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#else /* USE_GUSI */
|
#else /* USE_GUSI */
|
||||||
#ifndef TARGET_API_MAC_CARBON_NOTYET
|
#if !TARGET_API_MAC_CARBON_NOTYET
|
||||||
#define stat macstat
|
#define stat macstat
|
||||||
#endif
|
#endif
|
||||||
#endif /* USE_GUSI */
|
#endif /* USE_GUSI */
|
||||||
|
@ -259,7 +259,7 @@ mac_fdopen(self, args)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
static PyObject *
|
static PyObject *
|
||||||
mac_getbootvol(self, args)
|
mac_getbootvol(self, args)
|
||||||
PyObject *self;
|
PyObject *self;
|
||||||
|
@ -499,7 +499,7 @@ mac_fstat(self, args)
|
||||||
}
|
}
|
||||||
#endif /* WEHAVE_FSTAT */
|
#endif /* WEHAVE_FSTAT */
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON_NOTYET
|
#if !TARGET_API_MAC_CARBON_NOTYET
|
||||||
static PyObject *
|
static PyObject *
|
||||||
mac_xstat(self, args)
|
mac_xstat(self, args)
|
||||||
PyObject *self;
|
PyObject *self;
|
||||||
|
@ -609,7 +609,7 @@ static struct PyMethodDef mac_methods[] = {
|
||||||
#ifdef WEHAVE_FSTAT
|
#ifdef WEHAVE_FSTAT
|
||||||
{"fstat", mac_fstat},
|
{"fstat", mac_fstat},
|
||||||
#endif
|
#endif
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"getbootvol", mac_getbootvol}, /* non-standard */
|
{"getbootvol", mac_getbootvol}, /* non-standard */
|
||||||
#endif
|
#endif
|
||||||
{"getcwd", mac_getcwd},
|
{"getcwd", mac_getcwd},
|
||||||
|
@ -621,7 +621,7 @@ static struct PyMethodDef mac_methods[] = {
|
||||||
{"rename", mac_rename},
|
{"rename", mac_rename},
|
||||||
{"rmdir", mac_rmdir},
|
{"rmdir", mac_rmdir},
|
||||||
{"stat", mac_stat},
|
{"stat", mac_stat},
|
||||||
#ifndef TARGET_API_MAC_CARBON_NOTYET
|
#if !TARGET_API_MAC_CARBON_NOTYET
|
||||||
{"xstat", mac_xstat},
|
{"xstat", mac_xstat},
|
||||||
#endif
|
#endif
|
||||||
{"sync", mac_sync},
|
{"sync", mac_sync},
|
||||||
|
|
|
@ -359,7 +359,7 @@ MacOS_SetCreatorAndType(PyObject *self, PyObject *args)
|
||||||
#include <EPPC.h>
|
#include <EPPC.h>
|
||||||
#include <Events.h>
|
#include <Events.h>
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
static char accepthle_doc[] = "Get arguments of pending high-level event";
|
static char accepthle_doc[] = "Get arguments of pending high-level event";
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
|
@ -677,7 +677,7 @@ MacOS_CompactMem(PyObject *self, PyObject *args)
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyMethodDef MacOS_Methods[] = {
|
static PyMethodDef MacOS_Methods[] = {
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"AcceptHighLevelEvent", MacOS_AcceptHighLevelEvent, 1, accepthle_doc},
|
{"AcceptHighLevelEvent", MacOS_AcceptHighLevelEvent, 1, accepthle_doc},
|
||||||
#endif
|
#endif
|
||||||
{"GetCreatorAndType", MacOS_GetCreatorAndType, 1, getcrtp_doc},
|
{"GetCreatorAndType", MacOS_GetCreatorAndType, 1, getcrtp_doc},
|
||||||
|
|
|
@ -82,7 +82,7 @@ static PyObject *MenuObj_CalcMenuSize(_self, _args)
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *MenuObj_CountMItems(_self, _args)
|
static PyObject *MenuObj_CountMItems(_self, _args)
|
||||||
MenuObject *_self;
|
MenuObject *_self;
|
||||||
|
@ -377,7 +377,7 @@ static PyObject *MenuObj_MacInsertMenu(_self, _args)
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *MenuObj_CheckItem(_self, _args)
|
static PyObject *MenuObj_CheckItem(_self, _args)
|
||||||
MenuObject *_self;
|
MenuObject *_self;
|
||||||
|
@ -584,7 +584,7 @@ static PyObject *MenuObj_GetItemStyle(_self, _args)
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *MenuObj_DisableItem(_self, _args)
|
static PyObject *MenuObj_DisableItem(_self, _args)
|
||||||
MenuObject *_self;
|
MenuObject *_self;
|
||||||
|
@ -603,7 +603,7 @@ static PyObject *MenuObj_DisableItem(_self, _args)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *MenuObj_EnableItem(_self, _args)
|
static PyObject *MenuObj_EnableItem(_self, _args)
|
||||||
MenuObject *_self;
|
MenuObject *_self;
|
||||||
|
@ -915,7 +915,7 @@ static PyObject *MenuObj_GetMenuItemRefCon(_self, _args)
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *MenuObj_SetMenuItemRefCon2(_self, _args)
|
static PyObject *MenuObj_SetMenuItemRefCon2(_self, _args)
|
||||||
MenuObject *_self;
|
MenuObject *_self;
|
||||||
|
@ -939,7 +939,7 @@ static PyObject *MenuObj_SetMenuItemRefCon2(_self, _args)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *MenuObj_GetMenuItemRefCon2(_self, _args)
|
static PyObject *MenuObj_GetMenuItemRefCon2(_self, _args)
|
||||||
MenuObject *_self;
|
MenuObject *_self;
|
||||||
|
@ -1172,7 +1172,7 @@ static PyMethodDef MenuObj_methods[] = {
|
||||||
{"CalcMenuSize", (PyCFunction)MenuObj_CalcMenuSize, 1,
|
{"CalcMenuSize", (PyCFunction)MenuObj_CalcMenuSize, 1,
|
||||||
"() -> None"},
|
"() -> None"},
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"CountMItems", (PyCFunction)MenuObj_CountMItems, 1,
|
{"CountMItems", (PyCFunction)MenuObj_CountMItems, 1,
|
||||||
"() -> (short _rv)"},
|
"() -> (short _rv)"},
|
||||||
#endif
|
#endif
|
||||||
|
@ -1207,7 +1207,7 @@ static PyMethodDef MenuObj_methods[] = {
|
||||||
{"MacInsertMenu", (PyCFunction)MenuObj_MacInsertMenu, 1,
|
{"MacInsertMenu", (PyCFunction)MenuObj_MacInsertMenu, 1,
|
||||||
"(short beforeID) -> None"},
|
"(short beforeID) -> None"},
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"CheckItem", (PyCFunction)MenuObj_CheckItem, 1,
|
{"CheckItem", (PyCFunction)MenuObj_CheckItem, 1,
|
||||||
"(short item, Boolean checked) -> None"},
|
"(short item, Boolean checked) -> None"},
|
||||||
#endif
|
#endif
|
||||||
|
@ -1232,12 +1232,12 @@ static PyMethodDef MenuObj_methods[] = {
|
||||||
{"GetItemStyle", (PyCFunction)MenuObj_GetItemStyle, 1,
|
{"GetItemStyle", (PyCFunction)MenuObj_GetItemStyle, 1,
|
||||||
"(short item) -> (Style chStyle)"},
|
"(short item) -> (Style chStyle)"},
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"DisableItem", (PyCFunction)MenuObj_DisableItem, 1,
|
{"DisableItem", (PyCFunction)MenuObj_DisableItem, 1,
|
||||||
"(short item) -> None"},
|
"(short item) -> None"},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"EnableItem", (PyCFunction)MenuObj_EnableItem, 1,
|
{"EnableItem", (PyCFunction)MenuObj_EnableItem, 1,
|
||||||
"(short item) -> None"},
|
"(short item) -> None"},
|
||||||
#endif
|
#endif
|
||||||
|
@ -1270,12 +1270,12 @@ static PyMethodDef MenuObj_methods[] = {
|
||||||
{"GetMenuItemRefCon", (PyCFunction)MenuObj_GetMenuItemRefCon, 1,
|
{"GetMenuItemRefCon", (PyCFunction)MenuObj_GetMenuItemRefCon, 1,
|
||||||
"(SInt16 inItem) -> (UInt32 outRefCon)"},
|
"(SInt16 inItem) -> (UInt32 outRefCon)"},
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"SetMenuItemRefCon2", (PyCFunction)MenuObj_SetMenuItemRefCon2, 1,
|
{"SetMenuItemRefCon2", (PyCFunction)MenuObj_SetMenuItemRefCon2, 1,
|
||||||
"(SInt16 inItem, UInt32 inRefCon2) -> None"},
|
"(SInt16 inItem, UInt32 inRefCon2) -> None"},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"GetMenuItemRefCon2", (PyCFunction)MenuObj_GetMenuItemRefCon2, 1,
|
{"GetMenuItemRefCon2", (PyCFunction)MenuObj_GetMenuItemRefCon2, 1,
|
||||||
"(SInt16 inItem) -> (UInt32 outRefCon2)"},
|
"(SInt16 inItem) -> (UInt32 outRefCon2)"},
|
||||||
#endif
|
#endif
|
||||||
|
@ -1345,7 +1345,7 @@ PyTypeObject Menu_Type = {
|
||||||
/* ---------------------- End object type Menu ---------------------- */
|
/* ---------------------- End object type Menu ---------------------- */
|
||||||
|
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *Menu_InitProcMenu(_self, _args)
|
static PyObject *Menu_InitProcMenu(_self, _args)
|
||||||
PyObject *_self;
|
PyObject *_self;
|
||||||
|
@ -1363,7 +1363,7 @@ static PyObject *Menu_InitProcMenu(_self, _args)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *Menu_InitMenus(_self, _args)
|
static PyObject *Menu_InitMenus(_self, _args)
|
||||||
PyObject *_self;
|
PyObject *_self;
|
||||||
|
@ -1620,7 +1620,7 @@ static PyObject *Menu_ClearMenuBar(_self, _args)
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *Menu_SetMenuFlash(_self, _args)
|
static PyObject *Menu_SetMenuFlash(_self, _args)
|
||||||
PyObject *_self;
|
PyObject *_self;
|
||||||
|
@ -1653,7 +1653,7 @@ static PyObject *Menu_FlashMenuBar(_self, _args)
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *Menu_SystemEdit(_self, _args)
|
static PyObject *Menu_SystemEdit(_self, _args)
|
||||||
PyObject *_self;
|
PyObject *_self;
|
||||||
|
@ -1672,7 +1672,7 @@ static PyObject *Menu_SystemEdit(_self, _args)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *Menu_SystemMenu(_self, _args)
|
static PyObject *Menu_SystemMenu(_self, _args)
|
||||||
PyObject *_self;
|
PyObject *_self;
|
||||||
|
@ -1779,7 +1779,7 @@ static PyObject *Menu_IsShowContextualMenuClick(_self, _args)
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *Menu_OpenDeskAcc(_self, _args)
|
static PyObject *Menu_OpenDeskAcc(_self, _args)
|
||||||
PyObject *_self;
|
PyObject *_self;
|
||||||
|
@ -1859,12 +1859,12 @@ static PyObject *Menu_DrawMenuBar(_self, _args)
|
||||||
|
|
||||||
static PyMethodDef Menu_methods[] = {
|
static PyMethodDef Menu_methods[] = {
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"InitProcMenu", (PyCFunction)Menu_InitProcMenu, 1,
|
{"InitProcMenu", (PyCFunction)Menu_InitProcMenu, 1,
|
||||||
"(short resID) -> None"},
|
"(short resID) -> None"},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"InitMenus", (PyCFunction)Menu_InitMenus, 1,
|
{"InitMenus", (PyCFunction)Menu_InitMenus, 1,
|
||||||
"() -> None"},
|
"() -> None"},
|
||||||
#endif
|
#endif
|
||||||
|
@ -1901,19 +1901,19 @@ static PyMethodDef Menu_methods[] = {
|
||||||
{"ClearMenuBar", (PyCFunction)Menu_ClearMenuBar, 1,
|
{"ClearMenuBar", (PyCFunction)Menu_ClearMenuBar, 1,
|
||||||
"() -> None"},
|
"() -> None"},
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"SetMenuFlash", (PyCFunction)Menu_SetMenuFlash, 1,
|
{"SetMenuFlash", (PyCFunction)Menu_SetMenuFlash, 1,
|
||||||
"(short count) -> None"},
|
"(short count) -> None"},
|
||||||
#endif
|
#endif
|
||||||
{"FlashMenuBar", (PyCFunction)Menu_FlashMenuBar, 1,
|
{"FlashMenuBar", (PyCFunction)Menu_FlashMenuBar, 1,
|
||||||
"(short menuID) -> None"},
|
"(short menuID) -> None"},
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"SystemEdit", (PyCFunction)Menu_SystemEdit, 1,
|
{"SystemEdit", (PyCFunction)Menu_SystemEdit, 1,
|
||||||
"(short editCmd) -> (Boolean _rv)"},
|
"(short editCmd) -> (Boolean _rv)"},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"SystemMenu", (PyCFunction)Menu_SystemMenu, 1,
|
{"SystemMenu", (PyCFunction)Menu_SystemMenu, 1,
|
||||||
"(long menuResult) -> None"},
|
"(long menuResult) -> None"},
|
||||||
#endif
|
#endif
|
||||||
|
@ -1930,7 +1930,7 @@ static PyMethodDef Menu_methods[] = {
|
||||||
{"IsShowContextualMenuClick", (PyCFunction)Menu_IsShowContextualMenuClick, 1,
|
{"IsShowContextualMenuClick", (PyCFunction)Menu_IsShowContextualMenuClick, 1,
|
||||||
"(EventRecord inEvent) -> (Boolean _rv)"},
|
"(EventRecord inEvent) -> (Boolean _rv)"},
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"OpenDeskAcc", (PyCFunction)Menu_OpenDeskAcc, 1,
|
{"OpenDeskAcc", (PyCFunction)Menu_OpenDeskAcc, 1,
|
||||||
"(Str255 name) -> None"},
|
"(Str255 name) -> None"},
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
f = Function(void, 'OpenDeskAcc',
|
f = Function(void, 'OpenDeskAcc',
|
||||||
(Str255, 'name', InMode),
|
(Str255, 'name', InMode),
|
||||||
condition='#ifndef TARGET_API_MAC_CARBON'
|
condition='#if !TARGET_API_MAC_CARBON'
|
||||||
)
|
)
|
||||||
functions.append(f)
|
functions.append(f)
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ class MyScanner(Scanner):
|
||||||
|
|
||||||
def makegreylist(self):
|
def makegreylist(self):
|
||||||
return [
|
return [
|
||||||
('#ifndef TARGET_API_MAC_CARBON', [
|
('#if !TARGET_API_MAC_CARBON', [
|
||||||
'GetMenuItemRefCon2',
|
'GetMenuItemRefCon2',
|
||||||
'SetMenuItemRefCon2',
|
'SetMenuItemRefCon2',
|
||||||
'EnableItem',
|
'EnableItem',
|
||||||
|
|
|
@ -105,7 +105,7 @@ static PyObject *GrafObj_getattr(self, name)
|
||||||
GrafPortObject *self;
|
GrafPortObject *self;
|
||||||
char *name;
|
char *name;
|
||||||
{
|
{
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
{ CGrafPtr itself_color = (CGrafPtr)self->ob_itself;
|
{ CGrafPtr itself_color = (CGrafPtr)self->ob_itself;
|
||||||
|
|
||||||
|
@ -390,7 +390,7 @@ static PyObject *QDGA_getattr(self, name)
|
||||||
QDGlobalsAccessObject *self;
|
QDGlobalsAccessObject *self;
|
||||||
char *name;
|
char *name;
|
||||||
{
|
{
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
if ( strcmp(name, "arrow") == 0 )
|
if ( strcmp(name, "arrow") == 0 )
|
||||||
return PyString_FromStringAndSize((char *)&qd.arrow, sizeof(qd.arrow));
|
return PyString_FromStringAndSize((char *)&qd.arrow, sizeof(qd.arrow));
|
||||||
|
|
|
@ -130,7 +130,7 @@ class MyGRObjectDefinition(GlobalObjectDefinition):
|
||||||
Output("return 1;")
|
Output("return 1;")
|
||||||
OutRbrace()
|
OutRbrace()
|
||||||
def outputGetattrHook(self):
|
def outputGetattrHook(self):
|
||||||
Output("#ifndef TARGET_API_MAC_CARBON")
|
Output("#if !TARGET_API_MAC_CARBON")
|
||||||
Output("""
|
Output("""
|
||||||
{ CGrafPtr itself_color = (CGrafPtr)self->ob_itself;
|
{ CGrafPtr itself_color = (CGrafPtr)self->ob_itself;
|
||||||
|
|
||||||
|
@ -259,7 +259,7 @@ class QDGlobalsAccessObjectDefinition(ObjectDefinition):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def outputGetattrHook(self):
|
def outputGetattrHook(self):
|
||||||
Output("#ifndef TARGET_API_MAC_CARBON")
|
Output("#if !TARGET_API_MAC_CARBON")
|
||||||
Output("""
|
Output("""
|
||||||
if ( strcmp(name, "arrow") == 0 )
|
if ( strcmp(name, "arrow") == 0 )
|
||||||
return PyString_FromStringAndSize((char *)&qd.arrow, sizeof(qd.arrow));
|
return PyString_FromStringAndSize((char *)&qd.arrow, sizeof(qd.arrow));
|
||||||
|
|
|
@ -6182,7 +6182,7 @@ PyTypeObject Movie_Type = {
|
||||||
/* --------------------- End object type Movie ---------------------- */
|
/* --------------------- End object type Movie ---------------------- */
|
||||||
|
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *Qt_CheckQuickTimeRegistration(_self, _args)
|
static PyObject *Qt_CheckQuickTimeRegistration(_self, _args)
|
||||||
PyObject *_self;
|
PyObject *_self;
|
||||||
|
@ -7575,7 +7575,7 @@ static PyObject *Qt_SpriteMediaGetActionVariable(_self, _args)
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *Qt_SpriteMediaGetIndImageProperty(_self, _args)
|
static PyObject *Qt_SpriteMediaGetIndImageProperty(_self, _args)
|
||||||
PyObject *_self;
|
PyObject *_self;
|
||||||
|
@ -7772,7 +7772,7 @@ static PyObject *Qt_MoviesTask(_self, _args)
|
||||||
|
|
||||||
static PyMethodDef Qt_methods[] = {
|
static PyMethodDef Qt_methods[] = {
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"CheckQuickTimeRegistration", (PyCFunction)Qt_CheckQuickTimeRegistration, 1,
|
{"CheckQuickTimeRegistration", (PyCFunction)Qt_CheckQuickTimeRegistration, 1,
|
||||||
"(void * registrationKey, long flags) -> None"},
|
"(void * registrationKey, long flags) -> None"},
|
||||||
#endif
|
#endif
|
||||||
|
@ -7897,7 +7897,7 @@ static PyMethodDef Qt_methods[] = {
|
||||||
{"SpriteMediaGetActionVariable", (PyCFunction)Qt_SpriteMediaGetActionVariable, 1,
|
{"SpriteMediaGetActionVariable", (PyCFunction)Qt_SpriteMediaGetActionVariable, 1,
|
||||||
"(MediaHandler mh, QTAtomID variableID) -> (ComponentResult _rv, float value)"},
|
"(MediaHandler mh, QTAtomID variableID) -> (ComponentResult _rv, float value)"},
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"SpriteMediaGetIndImageProperty", (PyCFunction)Qt_SpriteMediaGetIndImageProperty, 1,
|
{"SpriteMediaGetIndImageProperty", (PyCFunction)Qt_SpriteMediaGetIndImageProperty, 1,
|
||||||
"(MediaHandler mh, short imageIndex, long imagePropertyType, void * imagePropertyValue) -> (ComponentResult _rv)"},
|
"(MediaHandler mh, short imageIndex, long imagePropertyType, void * imagePropertyValue) -> (ComponentResult _rv)"},
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -65,7 +65,7 @@ class MyScanner(Scanner):
|
||||||
|
|
||||||
def makegreylist(self):
|
def makegreylist(self):
|
||||||
return [
|
return [
|
||||||
('#ifndef TARGET_API_MAC_CARBON', [
|
('#if !TARGET_API_MAC_CARBON', [
|
||||||
'SpriteMediaGetIndImageProperty', # XXXX Why isn't this in carbon?
|
'SpriteMediaGetIndImageProperty', # XXXX Why isn't this in carbon?
|
||||||
'CheckQuickTimeRegistration',
|
'CheckQuickTimeRegistration',
|
||||||
])]
|
])]
|
||||||
|
|
|
@ -275,7 +275,7 @@ static PyObject *ResObj_GetMaxResourceSize(_self, _args)
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *ResObj_RsrcMapEntry(_self, _args)
|
static PyObject *ResObj_RsrcMapEntry(_self, _args)
|
||||||
ResourceObject *_self;
|
ResourceObject *_self;
|
||||||
|
@ -483,7 +483,7 @@ static PyMethodDef ResObj_methods[] = {
|
||||||
{"GetMaxResourceSize", (PyCFunction)ResObj_GetMaxResourceSize, 1,
|
{"GetMaxResourceSize", (PyCFunction)ResObj_GetMaxResourceSize, 1,
|
||||||
"() -> (long _rv)"},
|
"() -> (long _rv)"},
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"RsrcMapEntry", (PyCFunction)ResObj_RsrcMapEntry, 1,
|
{"RsrcMapEntry", (PyCFunction)ResObj_RsrcMapEntry, 1,
|
||||||
"() -> (long _rv)"},
|
"() -> (long _rv)"},
|
||||||
#endif
|
#endif
|
||||||
|
@ -592,7 +592,7 @@ PyTypeObject Resource_Type = {
|
||||||
/* -------------------- End object type Resource -------------------- */
|
/* -------------------- End object type Resource -------------------- */
|
||||||
|
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *Res_InitResources(_self, _args)
|
static PyObject *Res_InitResources(_self, _args)
|
||||||
PyObject *_self;
|
PyObject *_self;
|
||||||
|
@ -613,7 +613,7 @@ static PyObject *Res_InitResources(_self, _args)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *Res_RsrcZoneInit(_self, _args)
|
static PyObject *Res_RsrcZoneInit(_self, _args)
|
||||||
PyObject *_self;
|
PyObject *_self;
|
||||||
|
@ -688,7 +688,7 @@ static PyObject *Res_CurResFile(_self, _args)
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *Res_CreateResFile(_self, _args)
|
static PyObject *Res_CreateResFile(_self, _args)
|
||||||
PyObject *_self;
|
PyObject *_self;
|
||||||
|
@ -710,7 +710,7 @@ static PyObject *Res_CreateResFile(_self, _args)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *Res_OpenResFile(_self, _args)
|
static PyObject *Res_OpenResFile(_self, _args)
|
||||||
PyObject *_self;
|
PyObject *_self;
|
||||||
|
@ -1173,7 +1173,7 @@ static PyObject *Res_OpenRFPerm(_self, _args)
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *Res_RGetResource(_self, _args)
|
static PyObject *Res_RGetResource(_self, _args)
|
||||||
PyObject *_self;
|
PyObject *_self;
|
||||||
|
@ -1357,12 +1357,12 @@ static PyObject *Res_Handle(_self, _args)
|
||||||
|
|
||||||
static PyMethodDef Res_methods[] = {
|
static PyMethodDef Res_methods[] = {
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"InitResources", (PyCFunction)Res_InitResources, 1,
|
{"InitResources", (PyCFunction)Res_InitResources, 1,
|
||||||
"() -> (short _rv)"},
|
"() -> (short _rv)"},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"RsrcZoneInit", (PyCFunction)Res_RsrcZoneInit, 1,
|
{"RsrcZoneInit", (PyCFunction)Res_RsrcZoneInit, 1,
|
||||||
"() -> None"},
|
"() -> None"},
|
||||||
#endif
|
#endif
|
||||||
|
@ -1373,12 +1373,12 @@ static PyMethodDef Res_methods[] = {
|
||||||
{"CurResFile", (PyCFunction)Res_CurResFile, 1,
|
{"CurResFile", (PyCFunction)Res_CurResFile, 1,
|
||||||
"() -> (short _rv)"},
|
"() -> (short _rv)"},
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"CreateResFile", (PyCFunction)Res_CreateResFile, 1,
|
{"CreateResFile", (PyCFunction)Res_CreateResFile, 1,
|
||||||
"(Str255 fileName) -> None"},
|
"(Str255 fileName) -> None"},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"OpenResFile", (PyCFunction)Res_OpenResFile, 1,
|
{"OpenResFile", (PyCFunction)Res_OpenResFile, 1,
|
||||||
"(Str255 fileName) -> (short _rv)"},
|
"(Str255 fileName) -> (short _rv)"},
|
||||||
#endif
|
#endif
|
||||||
|
@ -1425,7 +1425,7 @@ static PyMethodDef Res_methods[] = {
|
||||||
{"OpenRFPerm", (PyCFunction)Res_OpenRFPerm, 1,
|
{"OpenRFPerm", (PyCFunction)Res_OpenRFPerm, 1,
|
||||||
"(Str255 fileName, short vRefNum, SignedByte permission) -> (short _rv)"},
|
"(Str255 fileName, short vRefNum, SignedByte permission) -> (short _rv)"},
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"RGetResource", (PyCFunction)Res_RGetResource, 1,
|
{"RGetResource", (PyCFunction)Res_RGetResource, 1,
|
||||||
"(ResType theType, short theID) -> (Handle _rv)"},
|
"(ResType theType, short theID) -> (Handle _rv)"},
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -50,7 +50,7 @@ class ResourcesScanner(Scanner):
|
||||||
|
|
||||||
def makegreylist(self):
|
def makegreylist(self):
|
||||||
return [
|
return [
|
||||||
('#ifndef TARGET_API_MAC_CARBON', [
|
('#if !TARGET_API_MAC_CARBON', [
|
||||||
'RGetResource',
|
'RGetResource',
|
||||||
'OpenResFile',
|
'OpenResFile',
|
||||||
'CreateResFile',
|
'CreateResFile',
|
||||||
|
|
|
@ -154,7 +154,7 @@ static PyObject *SndCh_SndPlay(_self, _args)
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *SndCh_SndStartFilePlay(_self, _args)
|
static PyObject *SndCh_SndStartFilePlay(_self, _args)
|
||||||
SndChannelObject *_self;
|
SndChannelObject *_self;
|
||||||
|
@ -187,7 +187,7 @@ static PyObject *SndCh_SndStartFilePlay(_self, _args)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *SndCh_SndPauseFilePlay(_self, _args)
|
static PyObject *SndCh_SndPauseFilePlay(_self, _args)
|
||||||
SndChannelObject *_self;
|
SndChannelObject *_self;
|
||||||
|
@ -205,7 +205,7 @@ static PyObject *SndCh_SndPauseFilePlay(_self, _args)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *SndCh_SndStopFilePlay(_self, _args)
|
static PyObject *SndCh_SndStopFilePlay(_self, _args)
|
||||||
SndChannelObject *_self;
|
SndChannelObject *_self;
|
||||||
|
@ -297,17 +297,17 @@ static PyMethodDef SndCh_methods[] = {
|
||||||
{"SndPlay", (PyCFunction)SndCh_SndPlay, 1,
|
{"SndPlay", (PyCFunction)SndCh_SndPlay, 1,
|
||||||
"(SndListHandle sndHandle, Boolean async) -> None"},
|
"(SndListHandle sndHandle, Boolean async) -> None"},
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"SndStartFilePlay", (PyCFunction)SndCh_SndStartFilePlay, 1,
|
{"SndStartFilePlay", (PyCFunction)SndCh_SndStartFilePlay, 1,
|
||||||
"(short fRefNum, short resNum, long bufferSize, Boolean async) -> None"},
|
"(short fRefNum, short resNum, long bufferSize, Boolean async) -> None"},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"SndPauseFilePlay", (PyCFunction)SndCh_SndPauseFilePlay, 1,
|
{"SndPauseFilePlay", (PyCFunction)SndCh_SndPauseFilePlay, 1,
|
||||||
"() -> None"},
|
"() -> None"},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"SndStopFilePlay", (PyCFunction)SndCh_SndStopFilePlay, 1,
|
{"SndStopFilePlay", (PyCFunction)SndCh_SndStopFilePlay, 1,
|
||||||
"(Boolean quietNow) -> None"},
|
"(Boolean quietNow) -> None"},
|
||||||
#endif
|
#endif
|
||||||
|
@ -455,7 +455,7 @@ static int SPBObj_setattr(self, name, value)
|
||||||
self->ob_completion = value;
|
self->ob_completion = value;
|
||||||
Py_INCREF(value);
|
Py_INCREF(value);
|
||||||
rv = 1;
|
rv = 1;
|
||||||
#ifndef TARGET_API_MAC_CARBON_NOTYET
|
#if !TARGET_API_MAC_CARBON_NOTYET
|
||||||
} else if (strcmp(name, "interruptRoutine") == 0) {
|
} else if (strcmp(name, "interruptRoutine") == 0) {
|
||||||
self->ob_spb.completionRoutine = NewSIInterruptProc(SPB_interrupt);
|
self->ob_spb.completionRoutine = NewSIInterruptProc(SPB_interrupt);
|
||||||
self->ob_interrupt = value;
|
self->ob_interrupt = value;
|
||||||
|
@ -556,7 +556,7 @@ static PyObject *Snd_SndNewChannel(_self, _args)
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *Snd_SndControl(_self, _args)
|
static PyObject *Snd_SndControl(_self, _args)
|
||||||
PyObject *_self;
|
PyObject *_self;
|
||||||
|
@ -643,7 +643,7 @@ static PyObject *Snd_SndSetSysBeepState(_self, _args)
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *Snd_MACEVersion(_self, _args)
|
static PyObject *Snd_MACEVersion(_self, _args)
|
||||||
PyObject *_self;
|
PyObject *_self;
|
||||||
|
@ -660,7 +660,7 @@ static PyObject *Snd_MACEVersion(_self, _args)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *Snd_Comp3to1(_self, _args)
|
static PyObject *Snd_Comp3to1(_self, _args)
|
||||||
PyObject *_self;
|
PyObject *_self;
|
||||||
|
@ -707,7 +707,7 @@ static PyObject *Snd_Comp3to1(_self, _args)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *Snd_Exp1to3(_self, _args)
|
static PyObject *Snd_Exp1to3(_self, _args)
|
||||||
PyObject *_self;
|
PyObject *_self;
|
||||||
|
@ -754,7 +754,7 @@ static PyObject *Snd_Exp1to3(_self, _args)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *Snd_Comp6to1(_self, _args)
|
static PyObject *Snd_Comp6to1(_self, _args)
|
||||||
PyObject *_self;
|
PyObject *_self;
|
||||||
|
@ -801,7 +801,7 @@ static PyObject *Snd_Comp6to1(_self, _args)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *Snd_Exp1to6(_self, _args)
|
static PyObject *Snd_Exp1to6(_self, _args)
|
||||||
PyObject *_self;
|
PyObject *_self;
|
||||||
|
@ -1157,7 +1157,7 @@ static PyObject *Snd_SPBRecord(_self, _args)
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *Snd_SPBRecordToFile(_self, _args)
|
static PyObject *Snd_SPBRecordToFile(_self, _args)
|
||||||
PyObject *_self;
|
PyObject *_self;
|
||||||
|
@ -1360,7 +1360,7 @@ static PyMethodDef Snd_methods[] = {
|
||||||
{"SndNewChannel", (PyCFunction)Snd_SndNewChannel, 1,
|
{"SndNewChannel", (PyCFunction)Snd_SndNewChannel, 1,
|
||||||
"(short synth, long init, PyObject* userRoutine) -> (SndChannelPtr chan)"},
|
"(short synth, long init, PyObject* userRoutine) -> (SndChannelPtr chan)"},
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"SndControl", (PyCFunction)Snd_SndControl, 1,
|
{"SndControl", (PyCFunction)Snd_SndControl, 1,
|
||||||
"(short id) -> (SndCommand cmd)"},
|
"(short id) -> (SndCommand cmd)"},
|
||||||
#endif
|
#endif
|
||||||
|
@ -1373,27 +1373,27 @@ static PyMethodDef Snd_methods[] = {
|
||||||
{"SndSetSysBeepState", (PyCFunction)Snd_SndSetSysBeepState, 1,
|
{"SndSetSysBeepState", (PyCFunction)Snd_SndSetSysBeepState, 1,
|
||||||
"(short sysBeepState) -> None"},
|
"(short sysBeepState) -> None"},
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"MACEVersion", (PyCFunction)Snd_MACEVersion, 1,
|
{"MACEVersion", (PyCFunction)Snd_MACEVersion, 1,
|
||||||
"() -> (NumVersion _rv)"},
|
"() -> (NumVersion _rv)"},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"Comp3to1", (PyCFunction)Snd_Comp3to1, 1,
|
{"Comp3to1", (PyCFunction)Snd_Comp3to1, 1,
|
||||||
"(Buffer buffer, StateBlock state, unsigned long numChannels, unsigned long whichChannel) -> (Buffer buffer, StateBlock state)"},
|
"(Buffer buffer, StateBlock state, unsigned long numChannels, unsigned long whichChannel) -> (Buffer buffer, StateBlock state)"},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"Exp1to3", (PyCFunction)Snd_Exp1to3, 1,
|
{"Exp1to3", (PyCFunction)Snd_Exp1to3, 1,
|
||||||
"(Buffer buffer, StateBlock state, unsigned long numChannels, unsigned long whichChannel) -> (Buffer buffer, StateBlock state)"},
|
"(Buffer buffer, StateBlock state, unsigned long numChannels, unsigned long whichChannel) -> (Buffer buffer, StateBlock state)"},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"Comp6to1", (PyCFunction)Snd_Comp6to1, 1,
|
{"Comp6to1", (PyCFunction)Snd_Comp6to1, 1,
|
||||||
"(Buffer buffer, StateBlock state, unsigned long numChannels, unsigned long whichChannel) -> (Buffer buffer, StateBlock state)"},
|
"(Buffer buffer, StateBlock state, unsigned long numChannels, unsigned long whichChannel) -> (Buffer buffer, StateBlock state)"},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"Exp1to6", (PyCFunction)Snd_Exp1to6, 1,
|
{"Exp1to6", (PyCFunction)Snd_Exp1to6, 1,
|
||||||
"(Buffer buffer, StateBlock state, unsigned long numChannels, unsigned long whichChannel) -> (Buffer buffer, StateBlock state)"},
|
"(Buffer buffer, StateBlock state, unsigned long numChannels, unsigned long whichChannel) -> (Buffer buffer, StateBlock state)"},
|
||||||
#endif
|
#endif
|
||||||
|
@ -1430,7 +1430,7 @@ static PyMethodDef Snd_methods[] = {
|
||||||
{"SPBRecord", (PyCFunction)Snd_SPBRecord, 1,
|
{"SPBRecord", (PyCFunction)Snd_SPBRecord, 1,
|
||||||
"(SPBPtr inParamPtr, Boolean asynchFlag) -> None"},
|
"(SPBPtr inParamPtr, Boolean asynchFlag) -> None"},
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"SPBRecordToFile", (PyCFunction)Snd_SPBRecordToFile, 1,
|
{"SPBRecordToFile", (PyCFunction)Snd_SPBRecordToFile, 1,
|
||||||
"(short fRefNum, SPBPtr inParamPtr, Boolean asynchFlag) -> None"},
|
"(short fRefNum, SPBPtr inParamPtr, Boolean asynchFlag) -> None"},
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -64,7 +64,7 @@ class SoundScanner(Scanner):
|
||||||
|
|
||||||
def makegreylist(self):
|
def makegreylist(self):
|
||||||
return [
|
return [
|
||||||
('#ifndef TARGET_API_MAC_CARBON', [
|
('#if !TARGET_API_MAC_CARBON', [
|
||||||
'MACEVersion',
|
'MACEVersion',
|
||||||
'SPBRecordToFile',
|
'SPBRecordToFile',
|
||||||
'Exp1to6',
|
'Exp1to6',
|
||||||
|
|
|
@ -315,7 +315,7 @@ class SpbObjectDefinition(ObjectDefinition):
|
||||||
self->ob_completion = value;
|
self->ob_completion = value;
|
||||||
Py_INCREF(value);
|
Py_INCREF(value);
|
||||||
rv = 1;
|
rv = 1;
|
||||||
#ifndef TARGET_API_MAC_CARBON_NOTYET
|
#if !TARGET_API_MAC_CARBON_NOTYET
|
||||||
} else if (strcmp(name, "interruptRoutine") == 0) {
|
} else if (strcmp(name, "interruptRoutine") == 0) {
|
||||||
self->ob_spb.completionRoutine = NewSIInterruptProc(SPB_interrupt);
|
self->ob_spb.completionRoutine = NewSIInterruptProc(SPB_interrupt);
|
||||||
self->ob_interrupt = value;
|
self->ob_interrupt = value;
|
||||||
|
|
|
@ -38,7 +38,7 @@ WinObj_Convert(v, p_itself)
|
||||||
PyObject *v;
|
PyObject *v;
|
||||||
WindowPtr *p_itself;
|
WindowPtr *p_itself;
|
||||||
{
|
{
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
if (DlgObj_Check(v)) {
|
if (DlgObj_Check(v)) {
|
||||||
*p_itself = ((WindowObject *)v)->ob_itself;
|
*p_itself = ((WindowObject *)v)->ob_itself;
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -130,7 +130,7 @@ static PyObject *WinObj_GetWindowAttributes(_self, _args)
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *WinObj_SetWinColor(_self, _args)
|
static PyObject *WinObj_SetWinColor(_self, _args)
|
||||||
WindowObject *_self;
|
WindowObject *_self;
|
||||||
|
@ -232,7 +232,7 @@ static PyObject *WinObj_ClipAbove(_self, _args)
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *WinObj_SaveOld(_self, _args)
|
static PyObject *WinObj_SaveOld(_self, _args)
|
||||||
WindowObject *_self;
|
WindowObject *_self;
|
||||||
|
@ -248,7 +248,7 @@ static PyObject *WinObj_SaveOld(_self, _args)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *WinObj_DrawNew(_self, _args)
|
static PyObject *WinObj_DrawNew(_self, _args)
|
||||||
WindowObject *_self;
|
WindowObject *_self;
|
||||||
|
@ -1277,7 +1277,7 @@ static PyObject *WinObj_TrackGoAway(_self, _args)
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *WinObj_GetAuxWin(_self, _args)
|
static PyObject *WinObj_GetAuxWin(_self, _args)
|
||||||
WindowObject *_self;
|
WindowObject *_self;
|
||||||
|
@ -1396,7 +1396,7 @@ static PyObject *WinObj_GetWindowGoAwayFlag(_self, _args)
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *WinObj_GetWindowZoomFlag(_self, _args)
|
static PyObject *WinObj_GetWindowZoomFlag(_self, _args)
|
||||||
WindowObject *_self;
|
WindowObject *_self;
|
||||||
|
@ -1413,7 +1413,7 @@ static PyObject *WinObj_GetWindowZoomFlag(_self, _args)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *WinObj_GetWindowStructureRgn(_self, _args)
|
static PyObject *WinObj_GetWindowStructureRgn(_self, _args)
|
||||||
WindowObject *_self;
|
WindowObject *_self;
|
||||||
|
@ -1432,7 +1432,7 @@ static PyObject *WinObj_GetWindowStructureRgn(_self, _args)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *WinObj_GetWindowContentRgn(_self, _args)
|
static PyObject *WinObj_GetWindowContentRgn(_self, _args)
|
||||||
WindowObject *_self;
|
WindowObject *_self;
|
||||||
|
@ -1451,7 +1451,7 @@ static PyObject *WinObj_GetWindowContentRgn(_self, _args)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *WinObj_GetWindowUpdateRgn(_self, _args)
|
static PyObject *WinObj_GetWindowUpdateRgn(_self, _args)
|
||||||
WindowObject *_self;
|
WindowObject *_self;
|
||||||
|
@ -1470,7 +1470,7 @@ static PyObject *WinObj_GetWindowUpdateRgn(_self, _args)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *WinObj_GetWindowTitleWidth(_self, _args)
|
static PyObject *WinObj_GetWindowTitleWidth(_self, _args)
|
||||||
WindowObject *_self;
|
WindowObject *_self;
|
||||||
|
@ -1563,7 +1563,7 @@ static PyObject *WinObj_SetWindowUserState(_self, _args)
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *WinObj_CloseWindow(_self, _args)
|
static PyObject *WinObj_CloseWindow(_self, _args)
|
||||||
WindowObject *_self;
|
WindowObject *_self;
|
||||||
|
@ -1624,7 +1624,7 @@ static PyMethodDef WinObj_methods[] = {
|
||||||
{"GetWindowAttributes", (PyCFunction)WinObj_GetWindowAttributes, 1,
|
{"GetWindowAttributes", (PyCFunction)WinObj_GetWindowAttributes, 1,
|
||||||
"() -> (WindowAttributes outAttributes)"},
|
"() -> (WindowAttributes outAttributes)"},
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"SetWinColor", (PyCFunction)WinObj_SetWinColor, 1,
|
{"SetWinColor", (PyCFunction)WinObj_SetWinColor, 1,
|
||||||
"(WCTabHandle newColorTable) -> None"},
|
"(WCTabHandle newColorTable) -> None"},
|
||||||
#endif
|
#endif
|
||||||
|
@ -1639,12 +1639,12 @@ static PyMethodDef WinObj_methods[] = {
|
||||||
{"ClipAbove", (PyCFunction)WinObj_ClipAbove, 1,
|
{"ClipAbove", (PyCFunction)WinObj_ClipAbove, 1,
|
||||||
"() -> None"},
|
"() -> None"},
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"SaveOld", (PyCFunction)WinObj_SaveOld, 1,
|
{"SaveOld", (PyCFunction)WinObj_SaveOld, 1,
|
||||||
"() -> None"},
|
"() -> None"},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"DrawNew", (PyCFunction)WinObj_DrawNew, 1,
|
{"DrawNew", (PyCFunction)WinObj_DrawNew, 1,
|
||||||
"(Boolean update) -> None"},
|
"(Boolean update) -> None"},
|
||||||
#endif
|
#endif
|
||||||
|
@ -1767,7 +1767,7 @@ static PyMethodDef WinObj_methods[] = {
|
||||||
{"TrackGoAway", (PyCFunction)WinObj_TrackGoAway, 1,
|
{"TrackGoAway", (PyCFunction)WinObj_TrackGoAway, 1,
|
||||||
"(Point thePt) -> (Boolean _rv)"},
|
"(Point thePt) -> (Boolean _rv)"},
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"GetAuxWin", (PyCFunction)WinObj_GetAuxWin, 1,
|
{"GetAuxWin", (PyCFunction)WinObj_GetAuxWin, 1,
|
||||||
"() -> (Boolean _rv, AuxWinHandle awHndl)"},
|
"() -> (Boolean _rv, AuxWinHandle awHndl)"},
|
||||||
#endif
|
#endif
|
||||||
|
@ -1786,27 +1786,27 @@ static PyMethodDef WinObj_methods[] = {
|
||||||
{"GetWindowGoAwayFlag", (PyCFunction)WinObj_GetWindowGoAwayFlag, 1,
|
{"GetWindowGoAwayFlag", (PyCFunction)WinObj_GetWindowGoAwayFlag, 1,
|
||||||
"() -> (Boolean _rv)"},
|
"() -> (Boolean _rv)"},
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"GetWindowZoomFlag", (PyCFunction)WinObj_GetWindowZoomFlag, 1,
|
{"GetWindowZoomFlag", (PyCFunction)WinObj_GetWindowZoomFlag, 1,
|
||||||
"() -> (Boolean _rv)"},
|
"() -> (Boolean _rv)"},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"GetWindowStructureRgn", (PyCFunction)WinObj_GetWindowStructureRgn, 1,
|
{"GetWindowStructureRgn", (PyCFunction)WinObj_GetWindowStructureRgn, 1,
|
||||||
"(RgnHandle r) -> None"},
|
"(RgnHandle r) -> None"},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"GetWindowContentRgn", (PyCFunction)WinObj_GetWindowContentRgn, 1,
|
{"GetWindowContentRgn", (PyCFunction)WinObj_GetWindowContentRgn, 1,
|
||||||
"(RgnHandle r) -> None"},
|
"(RgnHandle r) -> None"},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"GetWindowUpdateRgn", (PyCFunction)WinObj_GetWindowUpdateRgn, 1,
|
{"GetWindowUpdateRgn", (PyCFunction)WinObj_GetWindowUpdateRgn, 1,
|
||||||
"(RgnHandle r) -> None"},
|
"(RgnHandle r) -> None"},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"GetWindowTitleWidth", (PyCFunction)WinObj_GetWindowTitleWidth, 1,
|
{"GetWindowTitleWidth", (PyCFunction)WinObj_GetWindowTitleWidth, 1,
|
||||||
"() -> (short _rv)"},
|
"() -> (short _rv)"},
|
||||||
#endif
|
#endif
|
||||||
|
@ -1821,7 +1821,7 @@ static PyMethodDef WinObj_methods[] = {
|
||||||
{"SetWindowUserState", (PyCFunction)WinObj_SetWindowUserState, 1,
|
{"SetWindowUserState", (PyCFunction)WinObj_SetWindowUserState, 1,
|
||||||
"(Rect r) -> None"},
|
"(Rect r) -> None"},
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"CloseWindow", (PyCFunction)WinObj_CloseWindow, 1,
|
{"CloseWindow", (PyCFunction)WinObj_CloseWindow, 1,
|
||||||
"() -> None"},
|
"() -> None"},
|
||||||
#endif
|
#endif
|
||||||
|
@ -2083,7 +2083,7 @@ static PyObject *Win_FrontNonFloatingWindow(_self, _args)
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *Win_SetDeskCPat(_self, _args)
|
static PyObject *Win_SetDeskCPat(_self, _args)
|
||||||
PyObject *_self;
|
PyObject *_self;
|
||||||
|
@ -2150,7 +2150,7 @@ static PyObject *Win_FrontWindow(_self, _args)
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *Win_InitWindows(_self, _args)
|
static PyObject *Win_InitWindows(_self, _args)
|
||||||
PyObject *_self;
|
PyObject *_self;
|
||||||
|
@ -2166,7 +2166,7 @@ static PyObject *Win_InitWindows(_self, _args)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *Win_GetWMgrPort(_self, _args)
|
static PyObject *Win_GetWMgrPort(_self, _args)
|
||||||
PyObject *_self;
|
PyObject *_self;
|
||||||
|
@ -2183,7 +2183,7 @@ static PyObject *Win_GetWMgrPort(_self, _args)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *Win_GetCWMgrPort(_self, _args)
|
static PyObject *Win_GetCWMgrPort(_self, _args)
|
||||||
PyObject *_self;
|
PyObject *_self;
|
||||||
|
@ -2200,7 +2200,7 @@ static PyObject *Win_GetCWMgrPort(_self, _args)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *Win_IsValidWindowPtr(_self, _args)
|
static PyObject *Win_IsValidWindowPtr(_self, _args)
|
||||||
PyObject *_self;
|
PyObject *_self;
|
||||||
|
@ -2219,7 +2219,7 @@ static PyObject *Win_IsValidWindowPtr(_self, _args)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *Win_InitFloatingWindows(_self, _args)
|
static PyObject *Win_InitFloatingWindows(_self, _args)
|
||||||
PyObject *_self;
|
PyObject *_self;
|
||||||
|
@ -2237,7 +2237,7 @@ static PyObject *Win_InitFloatingWindows(_self, _args)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *Win_InvalRect(_self, _args)
|
static PyObject *Win_InvalRect(_self, _args)
|
||||||
PyObject *_self;
|
PyObject *_self;
|
||||||
|
@ -2255,7 +2255,7 @@ static PyObject *Win_InvalRect(_self, _args)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *Win_InvalRgn(_self, _args)
|
static PyObject *Win_InvalRgn(_self, _args)
|
||||||
PyObject *_self;
|
PyObject *_self;
|
||||||
|
@ -2273,7 +2273,7 @@ static PyObject *Win_InvalRgn(_self, _args)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *Win_ValidRect(_self, _args)
|
static PyObject *Win_ValidRect(_self, _args)
|
||||||
PyObject *_self;
|
PyObject *_self;
|
||||||
|
@ -2291,7 +2291,7 @@ static PyObject *Win_ValidRect(_self, _args)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
|
|
||||||
static PyObject *Win_ValidRgn(_self, _args)
|
static PyObject *Win_ValidRgn(_self, _args)
|
||||||
PyObject *_self;
|
PyObject *_self;
|
||||||
|
@ -2414,7 +2414,7 @@ static PyMethodDef Win_methods[] = {
|
||||||
{"FrontNonFloatingWindow", (PyCFunction)Win_FrontNonFloatingWindow, 1,
|
{"FrontNonFloatingWindow", (PyCFunction)Win_FrontNonFloatingWindow, 1,
|
||||||
"() -> (WindowPtr _rv)"},
|
"() -> (WindowPtr _rv)"},
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"SetDeskCPat", (PyCFunction)Win_SetDeskCPat, 1,
|
{"SetDeskCPat", (PyCFunction)Win_SetDeskCPat, 1,
|
||||||
"(PixPatHandle deskPixPat) -> None"},
|
"(PixPatHandle deskPixPat) -> None"},
|
||||||
#endif
|
#endif
|
||||||
|
@ -2425,47 +2425,47 @@ static PyMethodDef Win_methods[] = {
|
||||||
{"FrontWindow", (PyCFunction)Win_FrontWindow, 1,
|
{"FrontWindow", (PyCFunction)Win_FrontWindow, 1,
|
||||||
"() -> (WindowPtr _rv)"},
|
"() -> (WindowPtr _rv)"},
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"InitWindows", (PyCFunction)Win_InitWindows, 1,
|
{"InitWindows", (PyCFunction)Win_InitWindows, 1,
|
||||||
"() -> None"},
|
"() -> None"},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"GetWMgrPort", (PyCFunction)Win_GetWMgrPort, 1,
|
{"GetWMgrPort", (PyCFunction)Win_GetWMgrPort, 1,
|
||||||
"() -> (GrafPtr wPort)"},
|
"() -> (GrafPtr wPort)"},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"GetCWMgrPort", (PyCFunction)Win_GetCWMgrPort, 1,
|
{"GetCWMgrPort", (PyCFunction)Win_GetCWMgrPort, 1,
|
||||||
"() -> (CGrafPtr wMgrCPort)"},
|
"() -> (CGrafPtr wMgrCPort)"},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"IsValidWindowPtr", (PyCFunction)Win_IsValidWindowPtr, 1,
|
{"IsValidWindowPtr", (PyCFunction)Win_IsValidWindowPtr, 1,
|
||||||
"(GrafPtr grafPort) -> (Boolean _rv)"},
|
"(GrafPtr grafPort) -> (Boolean _rv)"},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"InitFloatingWindows", (PyCFunction)Win_InitFloatingWindows, 1,
|
{"InitFloatingWindows", (PyCFunction)Win_InitFloatingWindows, 1,
|
||||||
"() -> None"},
|
"() -> None"},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"InvalRect", (PyCFunction)Win_InvalRect, 1,
|
{"InvalRect", (PyCFunction)Win_InvalRect, 1,
|
||||||
"(Rect badRect) -> None"},
|
"(Rect badRect) -> None"},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"InvalRgn", (PyCFunction)Win_InvalRgn, 1,
|
{"InvalRgn", (PyCFunction)Win_InvalRgn, 1,
|
||||||
"(RgnHandle badRgn) -> None"},
|
"(RgnHandle badRgn) -> None"},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"ValidRect", (PyCFunction)Win_ValidRect, 1,
|
{"ValidRect", (PyCFunction)Win_ValidRect, 1,
|
||||||
"(Rect goodRect) -> None"},
|
"(Rect goodRect) -> None"},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
{"ValidRgn", (PyCFunction)Win_ValidRgn, 1,
|
{"ValidRgn", (PyCFunction)Win_ValidRgn, 1,
|
||||||
"(RgnHandle goodRgn) -> None"},
|
"(RgnHandle goodRgn) -> None"},
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -40,34 +40,34 @@ methods.append(f)
|
||||||
|
|
||||||
f = Method(Boolean, 'GetWindowZoomFlag',
|
f = Method(Boolean, 'GetWindowZoomFlag',
|
||||||
(WindowRef, 'theWindow', InMode),
|
(WindowRef, 'theWindow', InMode),
|
||||||
condition='#ifndef TARGET_API_MAC_CARBON'
|
condition='#if !TARGET_API_MAC_CARBON'
|
||||||
)
|
)
|
||||||
methods.append(f)
|
methods.append(f)
|
||||||
|
|
||||||
f = Method(void, 'GetWindowStructureRgn',
|
f = Method(void, 'GetWindowStructureRgn',
|
||||||
(WindowRef, 'theWindow', InMode),
|
(WindowRef, 'theWindow', InMode),
|
||||||
(RgnHandle, 'r', InMode),
|
(RgnHandle, 'r', InMode),
|
||||||
condition='#ifndef TARGET_API_MAC_CARBON'
|
condition='#if !TARGET_API_MAC_CARBON'
|
||||||
)
|
)
|
||||||
methods.append(f)
|
methods.append(f)
|
||||||
|
|
||||||
f = Method(void, 'GetWindowContentRgn',
|
f = Method(void, 'GetWindowContentRgn',
|
||||||
(WindowRef, 'theWindow', InMode),
|
(WindowRef, 'theWindow', InMode),
|
||||||
(RgnHandle, 'r', InMode),
|
(RgnHandle, 'r', InMode),
|
||||||
condition='#ifndef TARGET_API_MAC_CARBON'
|
condition='#if !TARGET_API_MAC_CARBON'
|
||||||
)
|
)
|
||||||
methods.append(f)
|
methods.append(f)
|
||||||
|
|
||||||
f = Method(void, 'GetWindowUpdateRgn',
|
f = Method(void, 'GetWindowUpdateRgn',
|
||||||
(WindowRef, 'theWindow', InMode),
|
(WindowRef, 'theWindow', InMode),
|
||||||
(RgnHandle, 'r', InMode),
|
(RgnHandle, 'r', InMode),
|
||||||
condition='#ifndef TARGET_API_MAC_CARBON'
|
condition='#if !TARGET_API_MAC_CARBON'
|
||||||
)
|
)
|
||||||
methods.append(f)
|
methods.append(f)
|
||||||
|
|
||||||
f = Method(short, 'GetWindowTitleWidth',
|
f = Method(short, 'GetWindowTitleWidth',
|
||||||
(WindowRef, 'theWindow', InMode),
|
(WindowRef, 'theWindow', InMode),
|
||||||
condition='#ifndef TARGET_API_MAC_CARBON'
|
condition='#if !TARGET_API_MAC_CARBON'
|
||||||
)
|
)
|
||||||
methods.append(f)
|
methods.append(f)
|
||||||
|
|
||||||
|
@ -105,7 +105,7 @@ methods.append(f)
|
||||||
# so we add the old/real names by hand.
|
# so we add the old/real names by hand.
|
||||||
f = Method(void, 'CloseWindow',
|
f = Method(void, 'CloseWindow',
|
||||||
(WindowPtr, 'theWindow', InMode),
|
(WindowPtr, 'theWindow', InMode),
|
||||||
condition='#ifndef TARGET_API_MAC_CARBON'
|
condition='#if !TARGET_API_MAC_CARBON'
|
||||||
)
|
)
|
||||||
methods.append(f)
|
methods.append(f)
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,7 @@ class MyScanner(Scanner):
|
||||||
|
|
||||||
def makegreylist(self):
|
def makegreylist(self):
|
||||||
return [
|
return [
|
||||||
('#ifndef TARGET_API_MAC_CARBON', [
|
('#if !TARGET_API_MAC_CARBON', [
|
||||||
'GetAuxWin',
|
'GetAuxWin',
|
||||||
'GetWindowDataHandle',
|
'GetWindowDataHandle',
|
||||||
'SaveOld',
|
'SaveOld',
|
||||||
|
|
|
@ -80,7 +80,7 @@ class MyObjectDefinition(GlobalObjectDefinition):
|
||||||
GlobalObjectDefinition.outputInitStructMembers(self)
|
GlobalObjectDefinition.outputInitStructMembers(self)
|
||||||
Output("SetWRefCon(itself, (long)it);")
|
Output("SetWRefCon(itself, (long)it);")
|
||||||
def outputCheckConvertArg(self):
|
def outputCheckConvertArg(self):
|
||||||
Output("#ifndef TARGET_API_MAC_CARBON")
|
Output("#if !TARGET_API_MAC_CARBON")
|
||||||
OutLbrace("if (DlgObj_Check(v))")
|
OutLbrace("if (DlgObj_Check(v))")
|
||||||
Output("*p_itself = ((WindowObject *)v)->ob_itself;")
|
Output("*p_itself = ((WindowObject *)v)->ob_itself;")
|
||||||
Output("return 1;")
|
Output("return 1;")
|
||||||
|
|
|
@ -271,7 +271,7 @@ event_loop()
|
||||||
|
|
||||||
got_one = 0;
|
got_one = 0;
|
||||||
for (n = 0; n < 100 && !got_one; n++) {
|
for (n = 0; n < 100 && !got_one; n++) {
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
SystemTask();
|
SystemTask();
|
||||||
#endif
|
#endif
|
||||||
ok = GetNextEvent(everyEvent, &event);
|
ok = GetNextEvent(everyEvent, &event);
|
||||||
|
|
|
@ -51,7 +51,7 @@ PERFORMANCE OF THIS SOFTWARE.
|
||||||
#define HASTHREAD ""
|
#define HASTHREAD ""
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef TARGET_API_MAC_CARBON
|
#if TARGET_API_MAC_CARBON
|
||||||
#define TARGET_API " CARBON"
|
#define TARGET_API " CARBON"
|
||||||
#else
|
#else
|
||||||
#define TARGET_API ""
|
#define TARGET_API ""
|
||||||
|
|
|
@ -32,7 +32,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
|
||||||
#include <Events.h>
|
#include <Events.h>
|
||||||
|
|
||||||
#ifdef TARGET_API_MAC_CARBON
|
#if TARGET_API_MAC_CARBON
|
||||||
/* Unfortunately this call is probably slower... */
|
/* Unfortunately this call is probably slower... */
|
||||||
#define LMGetTicks() TickCount()
|
#define LMGetTicks() TickCount()
|
||||||
#endif
|
#endif
|
||||||
|
@ -161,7 +161,7 @@ struct hook_args {
|
||||||
int selectcur_hit; /* Set to true when "select current" selected */
|
int selectcur_hit; /* Set to true when "select current" selected */
|
||||||
char *prompt; /* The prompt */
|
char *prompt; /* The prompt */
|
||||||
};
|
};
|
||||||
#ifdef TARGET_API_MAC_CARBON
|
#if TARGET_API_MAC_CARBON
|
||||||
/* The StandardFile hooks don't exist in Carbon. This breaks GetDirectory,
|
/* The StandardFile hooks don't exist in Carbon. This breaks GetDirectory,
|
||||||
** but the macfsn code will replace it by a NavServices version anyway.
|
** but the macfsn code will replace it by a NavServices version anyway.
|
||||||
*/
|
*/
|
||||||
|
@ -417,7 +417,7 @@ static void
|
||||||
scan_event_queue(flush)
|
scan_event_queue(flush)
|
||||||
int flush;
|
int flush;
|
||||||
{
|
{
|
||||||
#ifdef TARGET_API_MAC_CARBON
|
#if TARGET_API_MAC_CARBON
|
||||||
/* CARBONXXXX To be implemented */
|
/* CARBONXXXX To be implemented */
|
||||||
return;
|
return;
|
||||||
#else
|
#else
|
||||||
|
@ -508,7 +508,7 @@ void
|
||||||
PyMac_HandleEventIntern(evp)
|
PyMac_HandleEventIntern(evp)
|
||||||
EventRecord *evp;
|
EventRecord *evp;
|
||||||
{
|
{
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
if ( evp->what == mouseDown ) {
|
if ( evp->what == mouseDown ) {
|
||||||
WindowPtr wp;
|
WindowPtr wp;
|
||||||
|
|
||||||
|
@ -585,7 +585,7 @@ PyMac_DoYield(int maxsleep, int maycallpython)
|
||||||
*/
|
*/
|
||||||
if( in_here > 1 || !schedparams.process_events ||
|
if( in_here > 1 || !schedparams.process_events ||
|
||||||
(python_event_handler && !maycallpython) ) {
|
(python_event_handler && !maycallpython) ) {
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
if ( maxsleep >= 0 ) {
|
if ( maxsleep >= 0 ) {
|
||||||
SystemTask();
|
SystemTask();
|
||||||
}
|
}
|
||||||
|
@ -754,7 +754,7 @@ myhook_proc(short item, DialogPtr theDialog, struct hook_args *dataptr)
|
||||||
}
|
}
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
/*
|
/*
|
||||||
** Ask the user for a directory. I still can't understand
|
** Ask the user for a directory. I still can't understand
|
||||||
** why Apple doesn't provide a standard solution for this...
|
** why Apple doesn't provide a standard solution for this...
|
||||||
|
|
|
@ -86,7 +86,7 @@ no_appearance:
|
||||||
static void
|
static void
|
||||||
init_mac_world()
|
init_mac_world()
|
||||||
{
|
{
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
/* These aren't needed for carbon */
|
/* These aren't needed for carbon */
|
||||||
MaxApplZone();
|
MaxApplZone();
|
||||||
InitGraf(&qd.thePort);
|
InitGraf(&qd.thePort);
|
||||||
|
@ -162,7 +162,7 @@ PyMac_InteractiveOptions(PyMac_PrefRecord *p, int *argcp, char ***argvp)
|
||||||
DisposeDialog(dialog);
|
DisposeDialog(dialog);
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
#ifndef TARGET_API_MAC_CARBON
|
#if !TARGET_API_MAC_CARBON
|
||||||
if ( item == OPT_HELP ) {
|
if ( item == OPT_HELP ) {
|
||||||
HMSetBalloons(!HMGetBalloons());
|
HMSetBalloons(!HMGetBalloons());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue