sprintf(cwd, "I/O error %d in PBHGetVolSync", err);
return NULL;
}
-#ifdef TARGET_API_MAC_CARBON
+#if TARGET_API_MAC_CARBON
p2cstrcpy(cwd, (StringPtr)cwd);
ecwd = strchr(cwd, EOS);
#else
return NULL;
}
dirid= pb.d.ioDrParID;
-#ifdef TARGET_API_MAC_CARBON
+#if TARGET_API_MAC_CARBON
p2cstrcpy(ebuf, (StringPtr)ebuf);
ebuf += strlen(ebuf);
#else
opendir(path)
char *path;
{
-#ifdef TARGET_API_MAC_CARBON
+#if TARGET_API_MAC_CARBON
Str255 ppath;
FSSpec fss;
int plen;
closedir(dirp)
DIR *dirp;
{
-#ifdef TARGET_API_MAC_CARBON
+#if TARGET_API_MAC_CARBON
dirp->nextfile = 0;
#else
WDPBRec pb;
dir.d_name[0]= 0;
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.ioDrDirID= dp->dirid;
#else
errno = EIO;
return NULL;
}
-#ifdef TARGET_API_MAC_CARBON
+#if TARGET_API_MAC_CARBON
p2cstrcpy(dir.d_name, (StringPtr)dir.d_name);
#else
(void) p2cstr((unsigned char *)dir.d_name);
PyObject * PyMac_LoadCodeResourceModule(char *, char *); /* Load 'PYD ' resource from file */
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 */
void PyMac_PromptGetFile(short numTypes, ConstSFTypeListPtr typeList,
StandardFileReply *reply, char *prompt); /* Ask user for file, with prompt */
PyErr_Mac(ErrorObject, err);
return NULL;
}
-#ifdef TARGET_API_MAC_CARBON
+#if TARGET_API_MAC_CARBON
if (err=AEGetDescData(&desc, &fss, sizeof(FSSpec))) {
Py_DECREF(rv);
PyErr_Mac(ErrorObject, err);
return PyMac_BuildOSType(self->ob_itself.descriptorType);
if (strcmp(name, "data") == 0) {
PyObject *res;
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
char state;
state = HGetState(self->ob_itself.dataHandle);
HLock(self->ob_itself.dataHandle);
return PyMac_BuildOSType(self->ob_itself.descriptorType);
if (strcmp(name, "data") == 0) {
PyObject *res;
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
char state;
state = HGetState(self->ob_itself.dataHandle);
HLock(self->ob_itself.dataHandle);
return _res;
}
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *CmpInstObj_GetComponentInstanceA5(_self, _args)
ComponentInstanceObject *_self;
}
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *CmpInstObj_SetComponentInstanceA5(_self, _args)
ComponentInstanceObject *_self;
{"SetComponentInstanceStorage", (PyCFunction)CmpInstObj_SetComponentInstanceStorage, 1,
"(Handle theStorage) -> None"},
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"GetComponentInstanceA5", (PyCFunction)CmpInstObj_GetComponentInstanceA5, 1,
"() -> (long _rv)"},
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"SetComponentInstanceA5", (PyCFunction)CmpInstObj_SetComponentInstanceA5, 1,
"(long theA5) -> None"},
#endif
def makegreylist(self):
return [
- ('#ifndef TARGET_API_MAC_CARBON', [
+ ('#if !TARGET_API_MAC_CARBON', [
'SetComponentInstanceA5',
'GetComponentInstanceA5',
])]
#define as_Control(h) ((ControlHandle)h)
#define as_Resource(ctl) ((Handle)ctl)
-#ifdef TARGET_API_MAC_CARBON
+#if TARGET_API_MAC_CARBON
#define GetControlRect(ctl, rectp) GetControlBounds(ctl, rectp)
#else
#define GetControlRect(ctl, rectp) (*(rectp) = ((*(ctl))->contrlRect))
/* TrackControl and HandleControlClick callback support */
static PyObject *tracker;
static ControlActionUPP mytracker_upp;
-#ifndef TARGET_API_MAC_CARBON_NOTYET
+#if !TARGET_API_MAC_CARBON_NOTYET
static ControlUserPaneDrawUPP mydrawproc_upp;
static ControlUserPaneIdleUPP myidleproc_upp;
static ControlUserPaneHitTestUPP myhittestproc_upp;
extern int settrackfunc(PyObject *); /* 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 *);
#endif
return _res;
}
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *CtlObj_GetAuxiliaryControlRecord(_self, _args)
ControlObject *_self;
}
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *CtlObj_SetControlColor(_self, _args)
ControlObject *_self;
}
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *CtlObj_GetBevelButtonMenuValue(_self, _args)
ControlObject *_self;
}
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *CtlObj_SetBevelButtonMenuValue(_self, _args)
ControlObject *_self;
}
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *CtlObj_GetBevelButtonMenuHandle(_self, _args)
ControlObject *_self;
}
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *CtlObj_SetBevelButtonTransform(_self, _args)
ControlObject *_self;
}
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *CtlObj_SetImageWellTransform(_self, _args)
ControlObject *_self;
}
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *CtlObj_GetTabContentRect(_self, _args)
ControlObject *_self;
}
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *CtlObj_SetTabEnabled(_self, _args)
ControlObject *_self;
}
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *CtlObj_SetDisclosureTriangleLastValue(_self, _args)
ControlObject *_self;
}
-#ifndef TARGET_API_MAC_CARBON_NOTYET
+#if !TARGET_API_MAC_CARBON_NOTYET
static PyObject *CtlObj_SetControlDataCallback(_self, _args)
ControlObject *_self;
}
#endif
-#ifndef TARGET_API_MAC_CARBON_NOTYET
+#if !TARGET_API_MAC_CARBON_NOTYET
static PyObject *CtlObj_GetPopupData(_self, _args)
ControlObject *_self;
}
#endif
-#ifndef TARGET_API_MAC_CARBON_NOTYET
+#if !TARGET_API_MAC_CARBON_NOTYET
static PyObject *CtlObj_SetPopupData(_self, _args)
ControlObject *_self;
{"GetControlReference", (PyCFunction)CtlObj_GetControlReference, 1,
"() -> (SInt32 _rv)"},
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"GetAuxiliaryControlRecord", (PyCFunction)CtlObj_GetAuxiliaryControlRecord, 1,
"() -> (Boolean _rv, AuxCtlHandle acHndl)"},
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"SetControlColor", (PyCFunction)CtlObj_SetControlColor, 1,
"(CCTabHandle newColorTable) -> None"},
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"GetBevelButtonMenuValue", (PyCFunction)CtlObj_GetBevelButtonMenuValue, 1,
"() -> (SInt16 outValue)"},
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"SetBevelButtonMenuValue", (PyCFunction)CtlObj_SetBevelButtonMenuValue, 1,
"(SInt16 inValue) -> None"},
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"GetBevelButtonMenuHandle", (PyCFunction)CtlObj_GetBevelButtonMenuHandle, 1,
"() -> (MenuHandle outHandle)"},
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"SetBevelButtonTransform", (PyCFunction)CtlObj_SetBevelButtonTransform, 1,
"(IconTransformType transform) -> None"},
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"SetImageWellTransform", (PyCFunction)CtlObj_SetImageWellTransform, 1,
"(IconTransformType inTransform) -> None"},
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"GetTabContentRect", (PyCFunction)CtlObj_GetTabContentRect, 1,
"() -> (Rect outContentRect)"},
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"SetTabEnabled", (PyCFunction)CtlObj_SetTabEnabled, 1,
"(SInt16 inTabToHilite, Boolean inEnabled) -> None"},
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"SetDisclosureTriangleLastValue", (PyCFunction)CtlObj_SetDisclosureTriangleLastValue, 1,
"(SInt16 inValue) -> None"},
#endif
{"GetControlDataHandle", (PyCFunction)CtlObj_GetControlDataHandle, 1,
"(part, type) -> ResObj"},
-#ifndef TARGET_API_MAC_CARBON_NOTYET
+#if !TARGET_API_MAC_CARBON_NOTYET
{"SetControlDataCallback", (PyCFunction)CtlObj_SetControlDataCallback, 1,
"(callbackfunc) -> None"},
#endif
-#ifndef TARGET_API_MAC_CARBON_NOTYET
+#if !TARGET_API_MAC_CARBON_NOTYET
{"GetPopupData", (PyCFunction)CtlObj_GetPopupData, 1,
NULL},
#endif
-#ifndef TARGET_API_MAC_CARBON_NOTYET
+#if !TARGET_API_MAC_CARBON_NOTYET
{"SetPopupData", (PyCFunction)CtlObj_SetPopupData, 1,
NULL},
#endif
PySys_WriteStderr("TrackControl or HandleControlClick: exception in tracker function\n");
}
-#ifndef TARGET_API_MAC_CARBON_NOTYET
+#if !TARGET_API_MAC_CARBON_NOTYET
static int
setcallback(myself, which, callback, uppp)
PyObject *myself;
mytracker_upp = NewControlActionProc(mytracker);
-#ifndef TARGET_API_MAC_CARBON_NOTYET
+#if !TARGET_API_MAC_CARBON_NOTYET
mydrawproc_upp = NewControlUserPaneDrawProc(mydrawproc);
myidleproc_upp = NewControlUserPaneIdleProc(myidleproc);
myhittestproc_upp = NewControlUserPaneHitTestProc(myhittestproc);
def makegreylist(self):
return [
- ('#ifndef TARGET_API_MAC_CARBON', [
+ ('#if !TARGET_API_MAC_CARBON', [
'GetAuxiliaryControlRecord',
'SetControlColor',
# These have suddenly disappeared in UH 3.3.2...
#define as_Control(h) ((ControlHandle)h)
#define as_Resource(ctl) ((Handle)ctl)
-#ifdef TARGET_API_MAC_CARBON
+#if TARGET_API_MAC_CARBON
#define GetControlRect(ctl, rectp) GetControlBounds(ctl, rectp)
#else
#define GetControlRect(ctl, rectp) (*(rectp) = ((*(ctl))->contrlRect))
/* TrackControl and HandleControlClick callback support */
static PyObject *tracker;
static ControlActionUPP mytracker_upp;
-#ifndef TARGET_API_MAC_CARBON_NOTYET
+#if !TARGET_API_MAC_CARBON_NOTYET
static ControlUserPaneDrawUPP mydrawproc_upp;
static ControlUserPaneIdleUPP myidleproc_upp;
static ControlUserPaneHitTestUPP myhittestproc_upp;
extern int settrackfunc(PyObject *); /* 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 *);
#endif
"""
PySys_WriteStderr("TrackControl or HandleControlClick: exception in tracker function\\n");
}
-#ifndef TARGET_API_MAC_CARBON_NOTYET
+#if !TARGET_API_MAC_CARBON_NOTYET
static int
setcallback(myself, which, callback, uppp)
PyObject *myself;
initstuff = initstuff + """
mytracker_upp = NewControlActionProc(mytracker);
-#ifndef TARGET_API_MAC_CARBON_NOTYET
+#if !TARGET_API_MAC_CARBON_NOTYET
mydrawproc_upp = NewControlUserPaneDrawProc(mydrawproc);
myidleproc_upp = NewControlUserPaneIdleProc(myidleproc);
myhittestproc_upp = NewControlUserPaneHitTestProc(myhittestproc);
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"
object.add(f)
HUnlock((Handle)hdl);
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)
setpopupdata_body = """
Py_INCREF(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)
return _res;
}
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *DlgObj_SetGrafPortOfDialog(_self, _args)
DialogObject *_self;
{"GetDialogKeyboardFocusItem", (PyCFunction)DlgObj_GetDialogKeyboardFocusItem, 1,
"() -> (SInt16 _rv)"},
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"SetGrafPortOfDialog", (PyCFunction)DlgObj_SetGrafPortOfDialog, 1,
"() -> None"},
#endif
def makegreylist(self):
return [
- ('#ifndef TARGET_API_MAC_CARBON', [
+ ('#if !TARGET_API_MAC_CARBON', [
'SetGrafPortOfDialog',
])]
f = Method(SInt16, 'GetDialogKeyboardFocusItem', (DialogRef, 'dialog', InMode))
object.add(f)
f = Method(void, 'SetGrafPortOfDialog', (DialogRef, 'dialog', InMode),
- condition='#ifndef TARGET_API_MAC_CARBON')
+ condition='#if !TARGET_API_MAC_CARBON')
object.add(f)
setuseritembody = """
return _res;
}
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *Evt_OSEventAvail(_self, _args)
PyObject *_self;
}
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *Evt_GetOSEvent(_self, _args)
PyObject *_self;
return _res;
}
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *Evt_SystemClick(_self, _args)
PyObject *_self;
}
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *Evt_SystemTask(_self, _args)
PyObject *_self;
}
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *Evt_SystemEvent(_self, _args)
PyObject *_self;
{"PostEvent", (PyCFunction)Evt_PostEvent, 1,
"(EventKind eventNum, UInt32 eventMsg) -> None"},
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"OSEventAvail", (PyCFunction)Evt_OSEventAvail, 1,
"(EventMask mask) -> (Boolean _rv, EventRecord theEvent)"},
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"GetOSEvent", (PyCFunction)Evt_GetOSEvent, 1,
"(EventMask mask) -> (Boolean _rv, EventRecord theEvent)"},
#endif
{"FlushEvents", (PyCFunction)Evt_FlushEvents, 1,
"(EventMask whichMask, EventMask stopMask) -> None"},
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"SystemClick", (PyCFunction)Evt_SystemClick, 1,
"(EventRecord theEvent, WindowPtr theWindow) -> None"},
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"SystemTask", (PyCFunction)Evt_SystemTask, 1,
"() -> None"},
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"SystemEvent", (PyCFunction)Evt_SystemEvent, 1,
"(EventRecord theEvent) -> (Boolean _rv)"},
#endif
def makegreylist(self):
return [
- ('#ifndef TARGET_API_MAC_CARBON', [
+ ('#if !TARGET_API_MAC_CARBON', [
'SystemEvent',
'SystemTask',
'SystemClick',
static PyObject *Fm_Error;
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *Fm_InitFonts(_self, _args)
PyObject *_self;
return _res;
}
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *Fm_SetFontLock(_self, _args)
PyObject *_self;
return _res;
}
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *Fm_FlushFonts(_self, _args)
PyObject *_self;
static PyMethodDef Fm_methods[] = {
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"InitFonts", (PyCFunction)Fm_InitFonts, 1,
"() -> None"},
#endif
{"RealFont", (PyCFunction)Fm_RealFont, 1,
"(short fontNum, short size) -> (Boolean _rv)"},
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"SetFontLock", (PyCFunction)Fm_SetFontLock, 1,
"(Boolean lockFlag) -> None"},
#endif
{"GetPreserveGlyph", (PyCFunction)Fm_GetPreserveGlyph, 1,
"() -> (Boolean _rv)"},
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"FlushFonts", (PyCFunction)Fm_FlushFonts, 1,
"() -> None"},
#endif
def makegreylist(self):
return [
- ('#ifndef TARGET_API_MAC_CARBON', [
+ ('#if !TARGET_API_MAC_CARBON', [
'InitFonts',
'SetFontLock',
'FlushFonts',
return _res;
}
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *Icn_IconServicesTerminate(_self, _args)
PyObject *_self;
{"PlotCIconHandle", (PyCFunction)Icn_PlotCIconHandle, 1,
"(Rect theRect, IconAlignmentType align, IconTransformType transform, CIconHandle theCIcon) -> None"},
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"IconServicesTerminate", (PyCFunction)Icn_IconServicesTerminate, 1,
"() -> None"},
#endif
def makegreylist(self):
return [
- ('#ifndef TARGET_API_MAC_CARBON', [
+ ('#if !TARGET_API_MAC_CARBON', [
'IconServicesTerminate',
])]
{"List", initList},
{"Snd", initSnd},
{"Sndihooks", initSndihooks},
-#ifndef TARGET_API_MAC_CARBON_NOTYET
+#if !TARGET_API_MAC_CARBON_NOTYET
/* Carbon scrap manager is completely different */
{"Scrap", initScrap},
#endif
{"TE", initTE},
{"ColorPicker", initColorPicker},
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"Help", initHelp},
{"Printing", initPrinting},
#endif
return Py_BuildValue("Oii", newmfssobject(&fss), (int)isfolder, (int)wasaliased);
}
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *
mfs_StandardGetFile(self, args)
PyObject *self; /* Not used */
return (PyObject *)newmfsaobject((AliasHandle)h);
}
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *
mfs_GetDirectory(self, args)
PyObject *self; /* Not used */
static struct PyMethodDef mfs_methods[] = {
{"ResolveAliasFile", mfs_ResolveAliasFile, 1},
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"StandardGetFile", mfs_StandardGetFile, 1},
{"PromptGetFile", mfs_PromptGetFile, 1},
{"StandardPutFile", mfs_StandardPutFile, 1},
#include <string.h>
#include <errno.h>
-#ifndef TARGET_API_MAC_CARBON_NOTYET
+#if !TARGET_API_MAC_CARBON_NOTYET
/* XXXX Skip for Carbon, for now */
#include "macstat.h"
#endif
#include <sys/types.h>
#include <sys/stat.h>
#else /* USE_GUSI */
-#ifndef TARGET_API_MAC_CARBON_NOTYET
+#if !TARGET_API_MAC_CARBON_NOTYET
#define stat macstat
#endif
#endif /* USE_GUSI */
}
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *
mac_getbootvol(self, args)
PyObject *self;
}
#endif /* WEHAVE_FSTAT */
-#ifndef TARGET_API_MAC_CARBON_NOTYET
+#if !TARGET_API_MAC_CARBON_NOTYET
static PyObject *
mac_xstat(self, args)
PyObject *self;
#ifdef WEHAVE_FSTAT
{"fstat", mac_fstat},
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"getbootvol", mac_getbootvol}, /* non-standard */
#endif
{"getcwd", mac_getcwd},
{"rename", mac_rename},
{"rmdir", mac_rmdir},
{"stat", mac_stat},
-#ifndef TARGET_API_MAC_CARBON_NOTYET
+#if !TARGET_API_MAC_CARBON_NOTYET
{"xstat", mac_xstat},
#endif
{"sync", mac_sync},
#include <EPPC.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 PyObject *
}
static PyMethodDef MacOS_Methods[] = {
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"AcceptHighLevelEvent", MacOS_AcceptHighLevelEvent, 1, accepthle_doc},
#endif
{"GetCreatorAndType", MacOS_GetCreatorAndType, 1, getcrtp_doc},
return _res;
}
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *MenuObj_CountMItems(_self, _args)
MenuObject *_self;
return _res;
}
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *MenuObj_CheckItem(_self, _args)
MenuObject *_self;
return _res;
}
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *MenuObj_DisableItem(_self, _args)
MenuObject *_self;
}
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *MenuObj_EnableItem(_self, _args)
MenuObject *_self;
return _res;
}
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *MenuObj_SetMenuItemRefCon2(_self, _args)
MenuObject *_self;
}
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *MenuObj_GetMenuItemRefCon2(_self, _args)
MenuObject *_self;
{"CalcMenuSize", (PyCFunction)MenuObj_CalcMenuSize, 1,
"() -> None"},
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"CountMItems", (PyCFunction)MenuObj_CountMItems, 1,
"() -> (short _rv)"},
#endif
{"MacInsertMenu", (PyCFunction)MenuObj_MacInsertMenu, 1,
"(short beforeID) -> None"},
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"CheckItem", (PyCFunction)MenuObj_CheckItem, 1,
"(short item, Boolean checked) -> None"},
#endif
{"GetItemStyle", (PyCFunction)MenuObj_GetItemStyle, 1,
"(short item) -> (Style chStyle)"},
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"DisableItem", (PyCFunction)MenuObj_DisableItem, 1,
"(short item) -> None"},
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"EnableItem", (PyCFunction)MenuObj_EnableItem, 1,
"(short item) -> None"},
#endif
{"GetMenuItemRefCon", (PyCFunction)MenuObj_GetMenuItemRefCon, 1,
"(SInt16 inItem) -> (UInt32 outRefCon)"},
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"SetMenuItemRefCon2", (PyCFunction)MenuObj_SetMenuItemRefCon2, 1,
"(SInt16 inItem, UInt32 inRefCon2) -> None"},
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"GetMenuItemRefCon2", (PyCFunction)MenuObj_GetMenuItemRefCon2, 1,
"(SInt16 inItem) -> (UInt32 outRefCon2)"},
#endif
/* ---------------------- End object type Menu ---------------------- */
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *Menu_InitProcMenu(_self, _args)
PyObject *_self;
}
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *Menu_InitMenus(_self, _args)
PyObject *_self;
return _res;
}
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *Menu_SetMenuFlash(_self, _args)
PyObject *_self;
return _res;
}
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *Menu_SystemEdit(_self, _args)
PyObject *_self;
}
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *Menu_SystemMenu(_self, _args)
PyObject *_self;
return _res;
}
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *Menu_OpenDeskAcc(_self, _args)
PyObject *_self;
static PyMethodDef Menu_methods[] = {
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"InitProcMenu", (PyCFunction)Menu_InitProcMenu, 1,
"(short resID) -> None"},
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"InitMenus", (PyCFunction)Menu_InitMenus, 1,
"() -> None"},
#endif
{"ClearMenuBar", (PyCFunction)Menu_ClearMenuBar, 1,
"() -> None"},
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"SetMenuFlash", (PyCFunction)Menu_SetMenuFlash, 1,
"(short count) -> None"},
#endif
{"FlashMenuBar", (PyCFunction)Menu_FlashMenuBar, 1,
"(short menuID) -> None"},
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"SystemEdit", (PyCFunction)Menu_SystemEdit, 1,
"(short editCmd) -> (Boolean _rv)"},
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"SystemMenu", (PyCFunction)Menu_SystemMenu, 1,
"(long menuResult) -> None"},
#endif
{"IsShowContextualMenuClick", (PyCFunction)Menu_IsShowContextualMenuClick, 1,
"(EventRecord inEvent) -> (Boolean _rv)"},
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"OpenDeskAcc", (PyCFunction)Menu_OpenDeskAcc, 1,
"(Str255 name) -> None"},
#endif
f = Function(void, 'OpenDeskAcc',
(Str255, 'name', InMode),
- condition='#ifndef TARGET_API_MAC_CARBON'
+ condition='#if !TARGET_API_MAC_CARBON'
)
functions.append(f)
def makegreylist(self):
return [
- ('#ifndef TARGET_API_MAC_CARBON', [
+ ('#if !TARGET_API_MAC_CARBON', [
'GetMenuItemRefCon2',
'SetMenuItemRefCon2',
'EnableItem',
GrafPortObject *self;
char *name;
{
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{ CGrafPtr itself_color = (CGrafPtr)self->ob_itself;
QDGlobalsAccessObject *self;
char *name;
{
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
if ( strcmp(name, "arrow") == 0 )
return PyString_FromStringAndSize((char *)&qd.arrow, sizeof(qd.arrow));
Output("return 1;")
OutRbrace()
def outputGetattrHook(self):
- Output("#ifndef TARGET_API_MAC_CARBON")
+ Output("#if !TARGET_API_MAC_CARBON")
Output("""
{ CGrafPtr itself_color = (CGrafPtr)self->ob_itself;
pass
def outputGetattrHook(self):
- Output("#ifndef TARGET_API_MAC_CARBON")
+ Output("#if !TARGET_API_MAC_CARBON")
Output("""
if ( strcmp(name, "arrow") == 0 )
return PyString_FromStringAndSize((char *)&qd.arrow, sizeof(qd.arrow));
/* --------------------- End object type Movie ---------------------- */
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *Qt_CheckQuickTimeRegistration(_self, _args)
PyObject *_self;
return _res;
}
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *Qt_SpriteMediaGetIndImageProperty(_self, _args)
PyObject *_self;
static PyMethodDef Qt_methods[] = {
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"CheckQuickTimeRegistration", (PyCFunction)Qt_CheckQuickTimeRegistration, 1,
"(void * registrationKey, long flags) -> None"},
#endif
{"SpriteMediaGetActionVariable", (PyCFunction)Qt_SpriteMediaGetActionVariable, 1,
"(MediaHandler mh, QTAtomID variableID) -> (ComponentResult _rv, float value)"},
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"SpriteMediaGetIndImageProperty", (PyCFunction)Qt_SpriteMediaGetIndImageProperty, 1,
"(MediaHandler mh, short imageIndex, long imagePropertyType, void * imagePropertyValue) -> (ComponentResult _rv)"},
#endif
def makegreylist(self):
return [
- ('#ifndef TARGET_API_MAC_CARBON', [
+ ('#if !TARGET_API_MAC_CARBON', [
'SpriteMediaGetIndImageProperty', # XXXX Why isn't this in carbon?
'CheckQuickTimeRegistration',
])]
return _res;
}
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *ResObj_RsrcMapEntry(_self, _args)
ResourceObject *_self;
{"GetMaxResourceSize", (PyCFunction)ResObj_GetMaxResourceSize, 1,
"() -> (long _rv)"},
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"RsrcMapEntry", (PyCFunction)ResObj_RsrcMapEntry, 1,
"() -> (long _rv)"},
#endif
/* -------------------- End object type Resource -------------------- */
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *Res_InitResources(_self, _args)
PyObject *_self;
}
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *Res_RsrcZoneInit(_self, _args)
PyObject *_self;
return _res;
}
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *Res_CreateResFile(_self, _args)
PyObject *_self;
}
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *Res_OpenResFile(_self, _args)
PyObject *_self;
return _res;
}
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *Res_RGetResource(_self, _args)
PyObject *_self;
static PyMethodDef Res_methods[] = {
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"InitResources", (PyCFunction)Res_InitResources, 1,
"() -> (short _rv)"},
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"RsrcZoneInit", (PyCFunction)Res_RsrcZoneInit, 1,
"() -> None"},
#endif
{"CurResFile", (PyCFunction)Res_CurResFile, 1,
"() -> (short _rv)"},
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"CreateResFile", (PyCFunction)Res_CreateResFile, 1,
"(Str255 fileName) -> None"},
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"OpenResFile", (PyCFunction)Res_OpenResFile, 1,
"(Str255 fileName) -> (short _rv)"},
#endif
{"OpenRFPerm", (PyCFunction)Res_OpenRFPerm, 1,
"(Str255 fileName, short vRefNum, SignedByte permission) -> (short _rv)"},
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"RGetResource", (PyCFunction)Res_RGetResource, 1,
"(ResType theType, short theID) -> (Handle _rv)"},
#endif
def makegreylist(self):
return [
- ('#ifndef TARGET_API_MAC_CARBON', [
+ ('#if !TARGET_API_MAC_CARBON', [
'RGetResource',
'OpenResFile',
'CreateResFile',
return _res;
}
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *SndCh_SndStartFilePlay(_self, _args)
SndChannelObject *_self;
}
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *SndCh_SndPauseFilePlay(_self, _args)
SndChannelObject *_self;
}
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *SndCh_SndStopFilePlay(_self, _args)
SndChannelObject *_self;
{"SndPlay", (PyCFunction)SndCh_SndPlay, 1,
"(SndListHandle sndHandle, Boolean async) -> None"},
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"SndStartFilePlay", (PyCFunction)SndCh_SndStartFilePlay, 1,
"(short fRefNum, short resNum, long bufferSize, Boolean async) -> None"},
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"SndPauseFilePlay", (PyCFunction)SndCh_SndPauseFilePlay, 1,
"() -> None"},
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"SndStopFilePlay", (PyCFunction)SndCh_SndStopFilePlay, 1,
"(Boolean quietNow) -> None"},
#endif
self->ob_completion = value;
Py_INCREF(value);
rv = 1;
-#ifndef TARGET_API_MAC_CARBON_NOTYET
+#if !TARGET_API_MAC_CARBON_NOTYET
} else if (strcmp(name, "interruptRoutine") == 0) {
self->ob_spb.completionRoutine = NewSIInterruptProc(SPB_interrupt);
self->ob_interrupt = value;
return _res;
}
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *Snd_SndControl(_self, _args)
PyObject *_self;
return _res;
}
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *Snd_MACEVersion(_self, _args)
PyObject *_self;
}
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *Snd_Comp3to1(_self, _args)
PyObject *_self;
}
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *Snd_Exp1to3(_self, _args)
PyObject *_self;
}
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *Snd_Comp6to1(_self, _args)
PyObject *_self;
}
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *Snd_Exp1to6(_self, _args)
PyObject *_self;
return _res;
}
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *Snd_SPBRecordToFile(_self, _args)
PyObject *_self;
{"SndNewChannel", (PyCFunction)Snd_SndNewChannel, 1,
"(short synth, long init, PyObject* userRoutine) -> (SndChannelPtr chan)"},
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"SndControl", (PyCFunction)Snd_SndControl, 1,
"(short id) -> (SndCommand cmd)"},
#endif
{"SndSetSysBeepState", (PyCFunction)Snd_SndSetSysBeepState, 1,
"(short sysBeepState) -> None"},
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"MACEVersion", (PyCFunction)Snd_MACEVersion, 1,
"() -> (NumVersion _rv)"},
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"Comp3to1", (PyCFunction)Snd_Comp3to1, 1,
"(Buffer buffer, StateBlock state, unsigned long numChannels, unsigned long whichChannel) -> (Buffer buffer, StateBlock state)"},
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"Exp1to3", (PyCFunction)Snd_Exp1to3, 1,
"(Buffer buffer, StateBlock state, unsigned long numChannels, unsigned long whichChannel) -> (Buffer buffer, StateBlock state)"},
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"Comp6to1", (PyCFunction)Snd_Comp6to1, 1,
"(Buffer buffer, StateBlock state, unsigned long numChannels, unsigned long whichChannel) -> (Buffer buffer, StateBlock state)"},
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"Exp1to6", (PyCFunction)Snd_Exp1to6, 1,
"(Buffer buffer, StateBlock state, unsigned long numChannels, unsigned long whichChannel) -> (Buffer buffer, StateBlock state)"},
#endif
{"SPBRecord", (PyCFunction)Snd_SPBRecord, 1,
"(SPBPtr inParamPtr, Boolean asynchFlag) -> None"},
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"SPBRecordToFile", (PyCFunction)Snd_SPBRecordToFile, 1,
"(short fRefNum, SPBPtr inParamPtr, Boolean asynchFlag) -> None"},
#endif
def makegreylist(self):
return [
- ('#ifndef TARGET_API_MAC_CARBON', [
+ ('#if !TARGET_API_MAC_CARBON', [
'MACEVersion',
'SPBRecordToFile',
'Exp1to6',
self->ob_completion = value;
Py_INCREF(value);
rv = 1;
-#ifndef TARGET_API_MAC_CARBON_NOTYET
+#if !TARGET_API_MAC_CARBON_NOTYET
} else if (strcmp(name, "interruptRoutine") == 0) {
self->ob_spb.completionRoutine = NewSIInterruptProc(SPB_interrupt);
self->ob_interrupt = value;
PyObject *v;
WindowPtr *p_itself;
{
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
if (DlgObj_Check(v)) {
*p_itself = ((WindowObject *)v)->ob_itself;
return 1;
return _res;
}
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *WinObj_SetWinColor(_self, _args)
WindowObject *_self;
return _res;
}
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *WinObj_SaveOld(_self, _args)
WindowObject *_self;
}
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *WinObj_DrawNew(_self, _args)
WindowObject *_self;
return _res;
}
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *WinObj_GetAuxWin(_self, _args)
WindowObject *_self;
return _res;
}
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *WinObj_GetWindowZoomFlag(_self, _args)
WindowObject *_self;
}
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *WinObj_GetWindowStructureRgn(_self, _args)
WindowObject *_self;
}
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *WinObj_GetWindowContentRgn(_self, _args)
WindowObject *_self;
}
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *WinObj_GetWindowUpdateRgn(_self, _args)
WindowObject *_self;
}
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *WinObj_GetWindowTitleWidth(_self, _args)
WindowObject *_self;
return _res;
}
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *WinObj_CloseWindow(_self, _args)
WindowObject *_self;
{"GetWindowAttributes", (PyCFunction)WinObj_GetWindowAttributes, 1,
"() -> (WindowAttributes outAttributes)"},
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"SetWinColor", (PyCFunction)WinObj_SetWinColor, 1,
"(WCTabHandle newColorTable) -> None"},
#endif
{"ClipAbove", (PyCFunction)WinObj_ClipAbove, 1,
"() -> None"},
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"SaveOld", (PyCFunction)WinObj_SaveOld, 1,
"() -> None"},
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"DrawNew", (PyCFunction)WinObj_DrawNew, 1,
"(Boolean update) -> None"},
#endif
{"TrackGoAway", (PyCFunction)WinObj_TrackGoAway, 1,
"(Point thePt) -> (Boolean _rv)"},
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"GetAuxWin", (PyCFunction)WinObj_GetAuxWin, 1,
"() -> (Boolean _rv, AuxWinHandle awHndl)"},
#endif
{"GetWindowGoAwayFlag", (PyCFunction)WinObj_GetWindowGoAwayFlag, 1,
"() -> (Boolean _rv)"},
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"GetWindowZoomFlag", (PyCFunction)WinObj_GetWindowZoomFlag, 1,
"() -> (Boolean _rv)"},
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"GetWindowStructureRgn", (PyCFunction)WinObj_GetWindowStructureRgn, 1,
"(RgnHandle r) -> None"},
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"GetWindowContentRgn", (PyCFunction)WinObj_GetWindowContentRgn, 1,
"(RgnHandle r) -> None"},
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"GetWindowUpdateRgn", (PyCFunction)WinObj_GetWindowUpdateRgn, 1,
"(RgnHandle r) -> None"},
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"GetWindowTitleWidth", (PyCFunction)WinObj_GetWindowTitleWidth, 1,
"() -> (short _rv)"},
#endif
{"SetWindowUserState", (PyCFunction)WinObj_SetWindowUserState, 1,
"(Rect r) -> None"},
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"CloseWindow", (PyCFunction)WinObj_CloseWindow, 1,
"() -> None"},
#endif
return _res;
}
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *Win_SetDeskCPat(_self, _args)
PyObject *_self;
return _res;
}
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *Win_InitWindows(_self, _args)
PyObject *_self;
}
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *Win_GetWMgrPort(_self, _args)
PyObject *_self;
}
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *Win_GetCWMgrPort(_self, _args)
PyObject *_self;
}
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *Win_IsValidWindowPtr(_self, _args)
PyObject *_self;
}
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *Win_InitFloatingWindows(_self, _args)
PyObject *_self;
}
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *Win_InvalRect(_self, _args)
PyObject *_self;
}
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *Win_InvalRgn(_self, _args)
PyObject *_self;
}
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *Win_ValidRect(_self, _args)
PyObject *_self;
}
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
static PyObject *Win_ValidRgn(_self, _args)
PyObject *_self;
{"FrontNonFloatingWindow", (PyCFunction)Win_FrontNonFloatingWindow, 1,
"() -> (WindowPtr _rv)"},
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"SetDeskCPat", (PyCFunction)Win_SetDeskCPat, 1,
"(PixPatHandle deskPixPat) -> None"},
#endif
{"FrontWindow", (PyCFunction)Win_FrontWindow, 1,
"() -> (WindowPtr _rv)"},
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"InitWindows", (PyCFunction)Win_InitWindows, 1,
"() -> None"},
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"GetWMgrPort", (PyCFunction)Win_GetWMgrPort, 1,
"() -> (GrafPtr wPort)"},
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"GetCWMgrPort", (PyCFunction)Win_GetCWMgrPort, 1,
"() -> (CGrafPtr wMgrCPort)"},
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"IsValidWindowPtr", (PyCFunction)Win_IsValidWindowPtr, 1,
"(GrafPtr grafPort) -> (Boolean _rv)"},
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"InitFloatingWindows", (PyCFunction)Win_InitFloatingWindows, 1,
"() -> None"},
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"InvalRect", (PyCFunction)Win_InvalRect, 1,
"(Rect badRect) -> None"},
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"InvalRgn", (PyCFunction)Win_InvalRgn, 1,
"(RgnHandle badRgn) -> None"},
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"ValidRect", (PyCFunction)Win_ValidRect, 1,
"(Rect goodRect) -> None"},
#endif
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
{"ValidRgn", (PyCFunction)Win_ValidRgn, 1,
"(RgnHandle goodRgn) -> None"},
#endif
f = Method(Boolean, 'GetWindowZoomFlag',
(WindowRef, 'theWindow', InMode),
- condition='#ifndef TARGET_API_MAC_CARBON'
+ condition='#if !TARGET_API_MAC_CARBON'
)
methods.append(f)
f = Method(void, 'GetWindowStructureRgn',
(WindowRef, 'theWindow', InMode),
(RgnHandle, 'r', InMode),
- condition='#ifndef TARGET_API_MAC_CARBON'
+ condition='#if !TARGET_API_MAC_CARBON'
)
methods.append(f)
f = Method(void, 'GetWindowContentRgn',
(WindowRef, 'theWindow', InMode),
(RgnHandle, 'r', InMode),
- condition='#ifndef TARGET_API_MAC_CARBON'
+ condition='#if !TARGET_API_MAC_CARBON'
)
methods.append(f)
f = Method(void, 'GetWindowUpdateRgn',
(WindowRef, 'theWindow', InMode),
(RgnHandle, 'r', InMode),
- condition='#ifndef TARGET_API_MAC_CARBON'
+ condition='#if !TARGET_API_MAC_CARBON'
)
methods.append(f)
f = Method(short, 'GetWindowTitleWidth',
(WindowRef, 'theWindow', InMode),
- condition='#ifndef TARGET_API_MAC_CARBON'
+ condition='#if !TARGET_API_MAC_CARBON'
)
methods.append(f)
# so we add the old/real names by hand.
f = Method(void, 'CloseWindow',
(WindowPtr, 'theWindow', InMode),
- condition='#ifndef TARGET_API_MAC_CARBON'
+ condition='#if !TARGET_API_MAC_CARBON'
)
methods.append(f)
def makegreylist(self):
return [
- ('#ifndef TARGET_API_MAC_CARBON', [
+ ('#if !TARGET_API_MAC_CARBON', [
'GetAuxWin',
'GetWindowDataHandle',
'SaveOld',
GlobalObjectDefinition.outputInitStructMembers(self)
Output("SetWRefCon(itself, (long)it);")
def outputCheckConvertArg(self):
- Output("#ifndef TARGET_API_MAC_CARBON")
+ Output("#if !TARGET_API_MAC_CARBON")
OutLbrace("if (DlgObj_Check(v))")
Output("*p_itself = ((WindowObject *)v)->ob_itself;")
Output("return 1;")
got_one = 0;
for (n = 0; n < 100 && !got_one; n++) {
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
SystemTask();
#endif
ok = GetNextEvent(everyEvent, &event);
#define HASTHREAD ""
#endif
-#ifdef TARGET_API_MAC_CARBON
+#if TARGET_API_MAC_CARBON
#define TARGET_API " CARBON"
#else
#define TARGET_API ""
#include <Events.h>
-#ifdef TARGET_API_MAC_CARBON
+#if TARGET_API_MAC_CARBON
/* Unfortunately this call is probably slower... */
#define LMGetTicks() TickCount()
#endif
int selectcur_hit; /* Set to true when "select current" selected */
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,
** but the macfsn code will replace it by a NavServices version anyway.
*/
scan_event_queue(flush)
int flush;
{
-#ifdef TARGET_API_MAC_CARBON
+#if TARGET_API_MAC_CARBON
/* CARBONXXXX To be implemented */
return;
#else
PyMac_HandleEventIntern(evp)
EventRecord *evp;
{
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
if ( evp->what == mouseDown ) {
WindowPtr wp;
*/
if( in_here > 1 || !schedparams.process_events ||
(python_event_handler && !maycallpython) ) {
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
if ( maxsleep >= 0 ) {
SystemTask();
}
}
return item;
}
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
/*
** Ask the user for a directory. I still can't understand
** why Apple doesn't provide a standard solution for this...
static void
init_mac_world()
{
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
/* These aren't needed for carbon */
MaxApplZone();
InitGraf(&qd.thePort);
DisposeDialog(dialog);
exit(0);
}
-#ifndef TARGET_API_MAC_CARBON
+#if !TARGET_API_MAC_CARBON
if ( item == OPT_HELP ) {
HMSetBalloons(!HMGetBalloons());
}