]> granicus.if.org Git - python/commitdiff
Getting rid of pre-Carbon (MacOS8) support. All code depending on
authorJack Jansen <jack.jansen@cwi.nl>
Thu, 12 Dec 2002 10:31:54 +0000 (10:31 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Thu, 12 Dec 2002 10:31:54 +0000 (10:31 +0000)
TARGET_API_MAC_OS8 (or !TARGET_API_MAC_CARBON) is gone. Also some
TARGET_API_MAC_OSX conditional code is gone, because it is no longer
used on OSX-only Python (only in MacPython-OS9).

54 files changed:
Mac/Include/macglue.h
Mac/Modules/Nav.c
Mac/Modules/ae/_AEmodule.c
Mac/Modules/ae/aescan.py
Mac/Modules/app/_Appmodule.c
Mac/Modules/app/appscan.py
Mac/Modules/cm/_Cmmodule.c
Mac/Modules/cm/cmscan.py
Mac/Modules/ctl/_Ctlmodule.c
Mac/Modules/ctl/ctlscan.py
Mac/Modules/ctl/ctlsupport.py
Mac/Modules/dlg/_Dlgmodule.c
Mac/Modules/dlg/dlgscan.py
Mac/Modules/evt/_Evtmodule.c
Mac/Modules/evt/evtscan.py
Mac/Modules/fm/_Fmmodule.c
Mac/Modules/fm/fmscan.py
Mac/Modules/icgluemodule.c
Mac/Modules/icn/_Icnmodule.c
Mac/Modules/icn/icnscan.py
Mac/Modules/list/_Listmodule.c
Mac/Modules/list/listsupport.py
Mac/Modules/macconfig.c
Mac/Modules/macfsmodule.c
Mac/Modules/macmodule.c
Mac/Modules/macosmodule.c
Mac/Modules/menu/_Menumodule.c
Mac/Modules/menu/menuedit.py
Mac/Modules/menu/menuscan.py
Mac/Modules/mlte/_Mltemodule.c
Mac/Modules/mlte/mltescan.py
Mac/Modules/qd/_Qdmodule.c
Mac/Modules/qd/qdscan.py
Mac/Modules/qd/qdsupport.py
Mac/Modules/qt/_Qtmodule.c
Mac/Modules/qt/qtscan.py
Mac/Modules/res/_Resmodule.c
Mac/Modules/res/resscan.py
Mac/Modules/scrap/_Scrapmodule.c
Mac/Modules/scrap/scrapscan.py
Mac/Modules/snd/_Sndmodule.c
Mac/Modules/snd/sndscan.py
Mac/Modules/snd/sndsupport.py
Mac/Modules/te/_TEmodule.c
Mac/Modules/te/tescan.py
Mac/Modules/win/_Winmodule.c
Mac/Modules/win/winedit.py
Mac/Modules/win/winscan.py
Mac/Python/macgetargv.c
Mac/Python/macgetcompiler.c
Mac/Python/macgetpath.c
Mac/Python/macglue.c
Mac/Python/macmain.c
Mac/Python/pyGUSISIOUX.cp

index 170de35d5863f88b850bdb06836b0a7b395ebc31..f2b0bfbedbb1ca62e9aa6ceb13ce3693b94296a3 100644 (file)
@@ -83,12 +83,6 @@ int PyMac_FindCodeResourceModule(PyStringObject *, char *, char *); /* Test for
 PyObject * PyMac_LoadCodeResourceModule(char *, char *); /* Load 'PYD ' resource from file */
 struct filedescr *PyMac_FindModuleExtension(char *, size_t *, char *); /* Look for module in single folder */
 
-#if TARGET_API_MAC_OS8
-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 */
-#endif /* TARGET_API_MAC_OS8 */
-
 void PyMac_InitApplet(void);                   /* Initialize and run an Applet */
 void PyMac_Initialize(void);                   /* Initialize function for embedding Python */
 
index d9ca42ad3bf8eb31dc24e9adebaa5740abed5df8..8833a84ac46c86ffc7e4eb8ae833fd6469e9a43e 100644 (file)
@@ -351,15 +351,11 @@ navrr_getattr(navrrobject *self, char *name)
                                PyErr_Mac(ErrorObject, err);
                                return NULL;
                        }
-#if TARGET_API_MAC_CARBON
                        if (err=AEGetDescData(&desc, &fss, sizeof(FSSpec))) {
                                Py_DECREF(rv);
                                PyErr_Mac(ErrorObject, err);
                                return NULL;
                        }
-#else
-                       memcpy((void *)&fss, (void *)*desc.dataHandle, sizeof(FSSpec));
-#endif
                        rvitem = PyMac_BuildFSSpec(&fss);
                        PyList_SetItem(rv, i, rvitem);
                        AEDisposeDesc(&desc);
index 1a0f107a0fa5d777c9b38ccbdebdd607f4786d07..ab54ca0674d9819bee1c465ac5f36af0da1ae2e9 100644 (file)
@@ -610,8 +610,6 @@ static PyObject *AEDesc_AEPutAttributeDesc(AEDescObject *_self, PyObject *_args)
        return _res;
 }
 
-#if TARGET_API_MAC_CARBON
-
 static PyObject *AEDesc_AEGetDescDataSize(AEDescObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -626,7 +624,6 @@ static PyObject *AEDesc_AEGetDescDataSize(AEDescObject *_self, PyObject *_args)
                             _rv);
        return _res;
 }
-#endif
 
 static PyObject *AEDesc_AESend(AEDescObject *_self, PyObject *_args)
 {
@@ -807,11 +804,8 @@ static PyMethodDef AEDesc_methods[] = {
         PyDoc_STR("(AEKeyword theAEKeyword, DescType typeCode, Buffer dataPtr) -> None")},
        {"AEPutAttributeDesc", (PyCFunction)AEDesc_AEPutAttributeDesc, 1,
         PyDoc_STR("(AEKeyword theAEKeyword, AEDesc theAEDesc) -> None")},
-
-#if TARGET_API_MAC_CARBON
        {"AEGetDescDataSize", (PyCFunction)AEDesc_AEGetDescDataSize, 1,
         PyDoc_STR("() -> (Size _rv)")},
-#endif
        {"AESend", (PyCFunction)AEDesc_AESend, 1,
         PyDoc_STR("(AESendMode sendMode, AESendPriority sendPriority, long timeOutInTicks) -> (AppleEvent reply)")},
        {"AEResetTimer", (PyCFunction)AEDesc_AEResetTimer, 1,
@@ -1048,8 +1042,6 @@ static PyObject *AE_AECreateAppleEvent(PyObject *_self, PyObject *_args)
        return _res;
 }
 
-#if TARGET_API_MAC_CARBON
-
 static PyObject *AE_AEReplaceDescData(PyObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -1075,7 +1067,6 @@ static PyObject *AE_AEReplaceDescData(PyObject *_self, PyObject *_args)
                             AEDesc_New, &theAEDesc);
        return _res;
 }
-#endif
 
 static PyObject *AE_AEProcessAppleEvent(PyObject *_self, PyObject *_args)
 {
@@ -1360,11 +1351,8 @@ static PyMethodDef AE_methods[] = {
         PyDoc_STR("(Buffer factoringPtr, Boolean isRecord) -> (AEDescList resultList)")},
        {"AECreateAppleEvent", (PyCFunction)AE_AECreateAppleEvent, 1,
         PyDoc_STR("(AEEventClass theAEEventClass, AEEventID theAEEventID, AEAddressDesc target, AEReturnID returnID, AETransactionID transactionID) -> (AppleEvent result)")},
-
-#if TARGET_API_MAC_CARBON
        {"AEReplaceDescData", (PyCFunction)AE_AEReplaceDescData, 1,
         PyDoc_STR("(DescType typeCode, Buffer dataPtr) -> (AEDesc theAEDesc)")},
-#endif
        {"AEProcessAppleEvent", (PyCFunction)AE_AEProcessAppleEvent, 1,
         PyDoc_STR("(EventRecord theEventRecord) -> None")},
        {"AEGetInteractionAllowed", (PyCFunction)AE_AEGetInteractionAllowed, 1,
index 3a59ec8561eaea3b68c9b5954d8a33ff4decbab2..80c198c38a9ff485d915edbe283fa9ba1df8f3db 100644 (file)
@@ -51,12 +51,6 @@ class AppleEventsScanner(Scanner):
                        "kAEUseStandardDispatch",
                        ]
 
-       def makegreylist(self):
-               return [
-                       ('#if TARGET_API_MAC_CARBON', [
-                               'AEGetDescDataSize',
-                               'AEReplaceDescData',
-                       ])]
        def makeblacklisttypes(self):
                return [
                        "ProcPtr",
index 43d18e789491e3670cc152a0f77dc25fdffc2d8c..365ace3715dcd85ca3aadeb7b80eb8853ba710c6 100644 (file)
@@ -924,8 +924,6 @@ static PyObject *App_UseThemeFont(PyObject *_self, PyObject *_args)
        return _res;
 }
 
-#if TARGET_API_MAC_CARBON
-
 static PyObject *App_DrawThemeTextBox(PyObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -959,9 +957,6 @@ static PyObject *App_DrawThemeTextBox(PyObject *_self, PyObject *_args)
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *App_TruncateThemeText(PyObject *_self, PyObject *_args)
 {
@@ -994,9 +989,6 @@ static PyObject *App_TruncateThemeText(PyObject *_self, PyObject *_args)
                             outTruncated);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *App_GetThemeTextDimensions(PyObject *_self, PyObject *_args)
 {
@@ -1030,9 +1022,6 @@ static PyObject *App_GetThemeTextDimensions(PyObject *_self, PyObject *_args)
                             outBaseline);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *App_GetThemeTextShadowOutset(PyObject *_self, PyObject *_args)
 {
@@ -1056,7 +1045,6 @@ static PyObject *App_GetThemeTextShadowOutset(PyObject *_self, PyObject *_args)
                             PyMac_BuildRect, &outOutset);
        return _res;
 }
-#endif
 
 static PyObject *App_DrawThemeScrollBarArrows(PyObject *_self, PyObject *_args)
 {
@@ -1658,8 +1646,6 @@ static PyObject *App_GetThemeTextColor(PyObject *_self, PyObject *_args)
        return _res;
 }
 
-#if TARGET_API_MAC_CARBON
-
 static PyObject *App_GetThemeMetric(PyObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -1679,7 +1665,6 @@ static PyObject *App_GetThemeMetric(PyObject *_self, PyObject *_args)
                             outMetric);
        return _res;
 }
-#endif
 
 static PyMethodDef App_methods[] = {
        {"RegisterAppearanceClient", (PyCFunction)App_RegisterAppearanceClient, 1,
@@ -1754,26 +1739,14 @@ static PyMethodDef App_methods[] = {
         PyDoc_STR("() -> (ThemeCheckBoxStyle outStyle)")},
        {"UseThemeFont", (PyCFunction)App_UseThemeFont, 1,
         PyDoc_STR("(ThemeFontID inFontID, ScriptCode inScript) -> None")},
-
-#if TARGET_API_MAC_CARBON
        {"DrawThemeTextBox", (PyCFunction)App_DrawThemeTextBox, 1,
         PyDoc_STR("(CFStringRef inString, ThemeFontID inFontID, ThemeDrawState inState, Boolean inWrapToWidth, Rect inBoundingBox, SInt16 inJust) -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"TruncateThemeText", (PyCFunction)App_TruncateThemeText, 1,
         PyDoc_STR("(CFMutableStringRef inString, ThemeFontID inFontID, ThemeDrawState inState, SInt16 inPixelWidthLimit, TruncCode inTruncWhere) -> (Boolean outTruncated)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"GetThemeTextDimensions", (PyCFunction)App_GetThemeTextDimensions, 1,
         PyDoc_STR("(CFStringRef inString, ThemeFontID inFontID, ThemeDrawState inState, Boolean inWrapToWidth, Point ioBounds) -> (Point ioBounds, SInt16 outBaseline)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"GetThemeTextShadowOutset", (PyCFunction)App_GetThemeTextShadowOutset, 1,
         PyDoc_STR("(ThemeFontID inFontID, ThemeDrawState inState) -> (Rect outOutset)")},
-#endif
        {"DrawThemeScrollBarArrows", (PyCFunction)App_DrawThemeScrollBarArrows, 1,
         PyDoc_STR("(Rect bounds, ThemeTrackEnableState enableState, ThemeTrackPressState pressState, Boolean isHoriz) -> (Rect trackBounds)")},
        {"GetThemeScrollBarTrackRect", (PyCFunction)App_GetThemeScrollBarTrackRect, 1,
@@ -1822,11 +1795,8 @@ static PyMethodDef App_methods[] = {
         PyDoc_STR("(ThemeBrush inBrush, SInt16 inDepth, Boolean inColorDev) -> (RGBColor outColor)")},
        {"GetThemeTextColor", (PyCFunction)App_GetThemeTextColor, 1,
         PyDoc_STR("(ThemeTextColor inColor, SInt16 inDepth, Boolean inColorDev) -> (RGBColor outColor)")},
-
-#if TARGET_API_MAC_CARBON
        {"GetThemeMetric", (PyCFunction)App_GetThemeMetric, 1,
         PyDoc_STR("(ThemeMetric inMetric) -> (SInt32 outMetric)")},
-#endif
        {NULL, NULL, 0}
 };
 
index 695e0d94636ba704cbd23465121287610a795609..822651d8a17c2d86d4bcd88fc2798eab60fd06ec 100644 (file)
@@ -51,16 +51,6 @@ class MyScanner(Scanner):
                        "appearanceBadCursorIndexErr",
                        ]
 
-       def makegreylist(self):
-               return [
-                       ('#if TARGET_API_MAC_CARBON', [
-                               'GetThemeMetric',
-                               'GetThemeTextShadowOutset',
-                               'GetThemeTextDimensions',
-                               'TruncateThemeText',
-                               'DrawThemeTextBox',
-                       ])]
-                       
        def makeblacklisttypes(self):
                return [
                        "MenuTitleDrawingUPP",
index 1737fefa93229818846e77b203152b116b10cdc1..e21e6b04bbcd86cd3401264a06e91ebba9e1be45 100644 (file)
@@ -186,44 +186,6 @@ static PyObject *CmpInstObj_SetComponentInstanceStorage(ComponentInstanceObject
        return _res;
 }
 
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *CmpInstObj_GetComponentInstanceA5(ComponentInstanceObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long _rv;
-#ifndef GetComponentInstanceA5
-       PyMac_PRECHECK(GetComponentInstanceA5);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetComponentInstanceA5(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-#endif
-
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *CmpInstObj_SetComponentInstanceA5(ComponentInstanceObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long theA5;
-#ifndef SetComponentInstanceA5
-       PyMac_PRECHECK(SetComponentInstanceA5);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &theA5))
-               return NULL;
-       SetComponentInstanceA5(_self->ob_itself,
-                              theA5);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-#endif
-
 static PyObject *CmpInstObj_ComponentFunctionImplemented(ComponentInstanceObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -286,16 +248,6 @@ static PyMethodDef CmpInstObj_methods[] = {
         PyDoc_STR("() -> (Handle _rv)")},
        {"SetComponentInstanceStorage", (PyCFunction)CmpInstObj_SetComponentInstanceStorage, 1,
         PyDoc_STR("(Handle theStorage) -> None")},
-
-#if !TARGET_API_MAC_CARBON
-       {"GetComponentInstanceA5", (PyCFunction)CmpInstObj_GetComponentInstanceA5, 1,
-        PyDoc_STR("() -> (long _rv)")},
-#endif
-
-#if !TARGET_API_MAC_CARBON
-       {"SetComponentInstanceA5", (PyCFunction)CmpInstObj_SetComponentInstanceA5, 1,
-        PyDoc_STR("(long theA5) -> None")},
-#endif
        {"ComponentFunctionImplemented", (PyCFunction)CmpInstObj_ComponentFunctionImplemented, 1,
         PyDoc_STR("(short ftnNumber) -> (long _rv)")},
        {"GetComponentVersion", (PyCFunction)CmpInstObj_GetComponentVersion, 1,
index 7ca15f24fb17ffbf509444977917c17ba321eceb..6e56cb20159874705a0eb44947df22a889a34316 100644 (file)
@@ -59,15 +59,10 @@ class MyScanner(Scanner):
                        "OpenAComponent",
                        "GetComponentPublicResource", # Missing in CW Pro 6
                        "CallComponentGetPublicResource", # Missing in CW Pro 6
+                       'SetComponentInstanceA5',
+                       'GetComponentInstanceA5',
                        ]
 
-       def makegreylist(self):
-               return [
-                       ('#if !TARGET_API_MAC_CARBON', [
-                               'SetComponentInstanceA5',
-                               'GetComponentInstanceA5',
-                       ])]
-
        def makeblacklisttypes(self):
                return [
                        "ResourceSpec",
index 9c1e04196a330d04f76ebe63675def7ffd996e75..e9c946c62d1c28ecdc99f792fba61ac1e532d6fe 100644 (file)
@@ -39,11 +39,7 @@ static PyObject *CtlObj_WhichControl(ControlHandle);
 
 #define as_Control(h) ((ControlHandle)h)
 #define as_Resource(ctl) ((Handle)ctl)
-#if TARGET_API_MAC_CARBON
 #define GetControlRect(ctl, rectp) GetControlBounds(ctl, rectp)
-#else
-#define GetControlRect(ctl, rectp) (*(rectp) = ((*(ctl))->contrlRect))
-#endif
 
 #define MAXTABS 32  /* maximum number of tabs that we support in a tabs control */
 /*
@@ -527,8 +523,6 @@ static PyObject *CtlObj_TestControl(ControlObject *_self, PyObject *_args)
        return _res;
 }
 
-#if TARGET_API_MAC_CARBON
-
 static PyObject *CtlObj_HandleControlContextualMenuClick(ControlObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -549,9 +543,6 @@ static PyObject *CtlObj_HandleControlContextualMenuClick(ControlObject *_self, P
                             menuDisplayed);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_GetControlClickActivation(ControlObject *_self, PyObject *_args)
 {
@@ -576,7 +567,6 @@ static PyObject *CtlObj_GetControlClickActivation(ControlObject *_self, PyObject
                             outResult);
        return _res;
 }
-#endif
 
 static PyObject *CtlObj_HandleControlKey(ControlObject *_self, PyObject *_args)
 {
@@ -602,8 +592,6 @@ static PyObject *CtlObj_HandleControlKey(ControlObject *_self, PyObject *_args)
        return _res;
 }
 
-#if TARGET_API_MAC_CARBON
-
 static PyObject *CtlObj_HandleControlSetCursor(ControlObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -627,7 +615,6 @@ static PyObject *CtlObj_HandleControlSetCursor(ControlObject *_self, PyObject *_
                             cursorWasSet);
        return _res;
 }
-#endif
 
 static PyObject *CtlObj_MoveControl(ControlObject *_self, PyObject *_args)
 {
@@ -702,8 +689,6 @@ static PyObject *CtlObj_GetControlTitle(ControlObject *_self, PyObject *_args)
        return _res;
 }
 
-#if TARGET_API_MAC_CARBON
-
 static PyObject *CtlObj_SetControlTitleWithCFString(ControlObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -722,9 +707,6 @@ static PyObject *CtlObj_SetControlTitleWithCFString(ControlObject *_self, PyObje
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_CopyControlTitleAsCFString(ControlObject *_self, PyObject *_args)
 {
@@ -743,7 +725,6 @@ static PyObject *CtlObj_CopyControlTitleAsCFString(ControlObject *_self, PyObjec
                             CFStringRefObj_New, outString);
        return _res;
 }
-#endif
 
 static PyObject *CtlObj_GetControlValue(ControlObject *_self, PyObject *_args)
 {
@@ -984,8 +965,6 @@ static PyObject *CtlObj_IsValidControlHandle(ControlObject *_self, PyObject *_ar
        return _res;
 }
 
-#if TARGET_API_MAC_CARBON
-
 static PyObject *CtlObj_SetControlID(ControlObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -1004,9 +983,6 @@ static PyObject *CtlObj_SetControlID(ControlObject *_self, PyObject *_args)
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_GetControlID(ControlObject *_self, PyObject *_args)
 {
@@ -1025,9 +1001,6 @@ static PyObject *CtlObj_GetControlID(ControlObject *_self, PyObject *_args)
                             PyControlID_New, &outID);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_SetControlCommandID(ControlObject *_self, PyObject *_args)
 {
@@ -1047,9 +1020,6 @@ static PyObject *CtlObj_SetControlCommandID(ControlObject *_self, PyObject *_arg
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_GetControlCommandID(ControlObject *_self, PyObject *_args)
 {
@@ -1068,7 +1038,6 @@ static PyObject *CtlObj_GetControlCommandID(ControlObject *_self, PyObject *_arg
                             outCommandID);
        return _res;
 }
-#endif
 
 static PyObject *CtlObj_RemoveControlProperty(ControlObject *_self, PyObject *_args)
 {
@@ -1092,8 +1061,6 @@ static PyObject *CtlObj_RemoveControlProperty(ControlObject *_self, PyObject *_a
        return _res;
 }
 
-#if TARGET_API_MAC_CARBON
-
 static PyObject *CtlObj_GetControlPropertyAttributes(ControlObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -1117,9 +1084,6 @@ static PyObject *CtlObj_GetControlPropertyAttributes(ControlObject *_self, PyObj
                             attributes);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_ChangeControlPropertyAttributes(ControlObject *_self, PyObject *_args)
 {
@@ -1148,7 +1112,6 @@ static PyObject *CtlObj_ChangeControlPropertyAttributes(ControlObject *_self, Py
        _res = Py_None;
        return _res;
 }
-#endif
 
 static PyObject *CtlObj_GetControlRegion(ControlObject *_self, PyObject *_args)
 {
@@ -1238,47 +1201,6 @@ static PyObject *CtlObj_GetControlReference(ControlObject *_self, PyObject *_arg
        return _res;
 }
 
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *CtlObj_GetAuxiliaryControlRecord(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       AuxCtlHandle acHndl;
-#ifndef GetAuxiliaryControlRecord
-       PyMac_PRECHECK(GetAuxiliaryControlRecord);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetAuxiliaryControlRecord(_self->ob_itself,
-                                       &acHndl);
-       _res = Py_BuildValue("bO&",
-                            _rv,
-                            ResObj_New, acHndl);
-       return _res;
-}
-#endif
-
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *CtlObj_SetControlColor(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CCTabHandle newColorTable;
-#ifndef SetControlColor
-       PyMac_PRECHECK(SetControlColor);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &newColorTable))
-               return NULL;
-       SetControlColor(_self->ob_itself,
-                       newColorTable);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-#endif
-
 static PyObject *CtlObj_EmbedControl(ControlObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -1435,8 +1357,6 @@ static PyObject *CtlObj_GetControlDataSize(ControlObject *_self, PyObject *_args
        return _res;
 }
 
-#if TARGET_API_MAC_CARBON
-
 static PyObject *CtlObj_HandleControlDragTracking(ControlObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -1460,9 +1380,6 @@ static PyObject *CtlObj_HandleControlDragTracking(ControlObject *_self, PyObject
                             outLikesDrag);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_HandleControlDragReceive(ControlObject *_self, PyObject *_args)
 {
@@ -1482,9 +1399,6 @@ static PyObject *CtlObj_HandleControlDragReceive(ControlObject *_self, PyObject
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_SetControlDragTrackingEnabled(ControlObject *_self, PyObject *_args)
 {
@@ -1504,9 +1418,6 @@ static PyObject *CtlObj_SetControlDragTrackingEnabled(ControlObject *_self, PyOb
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_IsControlDragTrackingEnabled(ControlObject *_self, PyObject *_args)
 {
@@ -1525,9 +1436,6 @@ static PyObject *CtlObj_IsControlDragTrackingEnabled(ControlObject *_self, PyObj
                             tracks);
        return _res;
 }
-#endif
-
-#if ACCESSOR_CALLS_ARE_FUNCTIONS
 
 static PyObject *CtlObj_GetControlBounds(ControlObject *_self, PyObject *_args)
 {
@@ -1544,9 +1452,6 @@ static PyObject *CtlObj_GetControlBounds(ControlObject *_self, PyObject *_args)
                             PyMac_BuildRect, &bounds);
        return _res;
 }
-#endif
-
-#if ACCESSOR_CALLS_ARE_FUNCTIONS
 
 static PyObject *CtlObj_IsControlHilited(ControlObject *_self, PyObject *_args)
 {
@@ -1562,9 +1467,6 @@ static PyObject *CtlObj_IsControlHilited(ControlObject *_self, PyObject *_args)
                             _rv);
        return _res;
 }
-#endif
-
-#if ACCESSOR_CALLS_ARE_FUNCTIONS
 
 static PyObject *CtlObj_GetControlHilite(ControlObject *_self, PyObject *_args)
 {
@@ -1580,9 +1482,6 @@ static PyObject *CtlObj_GetControlHilite(ControlObject *_self, PyObject *_args)
                             _rv);
        return _res;
 }
-#endif
-
-#if ACCESSOR_CALLS_ARE_FUNCTIONS
 
 static PyObject *CtlObj_GetControlOwner(ControlObject *_self, PyObject *_args)
 {
@@ -1598,9 +1497,6 @@ static PyObject *CtlObj_GetControlOwner(ControlObject *_self, PyObject *_args)
                             WinObj_New, _rv);
        return _res;
 }
-#endif
-
-#if ACCESSOR_CALLS_ARE_FUNCTIONS
 
 static PyObject *CtlObj_GetControlDataHandle(ControlObject *_self, PyObject *_args)
 {
@@ -1616,9 +1512,6 @@ static PyObject *CtlObj_GetControlDataHandle(ControlObject *_self, PyObject *_ar
                             ResObj_New, _rv);
        return _res;
 }
-#endif
-
-#if ACCESSOR_CALLS_ARE_FUNCTIONS
 
 static PyObject *CtlObj_GetControlPopupMenuHandle(ControlObject *_self, PyObject *_args)
 {
@@ -1634,9 +1527,6 @@ static PyObject *CtlObj_GetControlPopupMenuHandle(ControlObject *_self, PyObject
                             MenuObj_New, _rv);
        return _res;
 }
-#endif
-
-#if ACCESSOR_CALLS_ARE_FUNCTIONS
 
 static PyObject *CtlObj_GetControlPopupMenuID(ControlObject *_self, PyObject *_args)
 {
@@ -1652,9 +1542,6 @@ static PyObject *CtlObj_GetControlPopupMenuID(ControlObject *_self, PyObject *_a
                             _rv);
        return _res;
 }
-#endif
-
-#if ACCESSOR_CALLS_ARE_FUNCTIONS
 
 static PyObject *CtlObj_SetControlDataHandle(ControlObject *_self, PyObject *_args)
 {
@@ -1672,9 +1559,6 @@ static PyObject *CtlObj_SetControlDataHandle(ControlObject *_self, PyObject *_ar
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if ACCESSOR_CALLS_ARE_FUNCTIONS
 
 static PyObject *CtlObj_SetControlBounds(ControlObject *_self, PyObject *_args)
 {
@@ -1692,9 +1576,6 @@ static PyObject *CtlObj_SetControlBounds(ControlObject *_self, PyObject *_args)
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if ACCESSOR_CALLS_ARE_FUNCTIONS
 
 static PyObject *CtlObj_SetControlPopupMenuHandle(ControlObject *_self, PyObject *_args)
 {
@@ -1712,9 +1593,6 @@ static PyObject *CtlObj_SetControlPopupMenuHandle(ControlObject *_self, PyObject
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if ACCESSOR_CALLS_ARE_FUNCTIONS
 
 static PyObject *CtlObj_SetControlPopupMenuID(ControlObject *_self, PyObject *_args)
 {
@@ -1732,7 +1610,6 @@ static PyObject *CtlObj_SetControlPopupMenuID(ControlObject *_self, PyObject *_a
        _res = Py_None;
        return _res;
 }
-#endif
 
 static PyObject *CtlObj_GetBevelButtonMenuValue(ControlObject *_self, PyObject *_args)
 {
@@ -1789,8 +1666,6 @@ static PyObject *CtlObj_GetBevelButtonMenuHandle(ControlObject *_self, PyObject
        return _res;
 }
 
-#if TARGET_API_MAC_CARBON
-
 static PyObject *CtlObj_SetBevelButtonContentInfo(ControlObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -1809,7 +1684,6 @@ static PyObject *CtlObj_SetBevelButtonContentInfo(ControlObject *_self, PyObject
        _res = Py_None;
        return _res;
 }
-#endif
 
 static PyObject *CtlObj_SetBevelButtonTransform(ControlObject *_self, PyObject *_args)
 {
@@ -1889,8 +1763,6 @@ static PyObject *CtlObj_SetTabEnabled(ControlObject *_self, PyObject *_args)
        return _res;
 }
 
-#if TARGET_API_MAC_CARBON
-
 static PyObject *CtlObj_SetImageWellContentInfo(ControlObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -1909,7 +1781,6 @@ static PyObject *CtlObj_SetImageWellContentInfo(ControlObject *_self, PyObject *
        _res = Py_None;
        return _res;
 }
-#endif
 
 static PyObject *CtlObj_SetImageWellTransform(ControlObject *_self, PyObject *_args)
 {
@@ -1930,8 +1801,6 @@ static PyObject *CtlObj_SetImageWellTransform(ControlObject *_self, PyObject *_a
        return _res;
 }
 
-#if TARGET_API_MAC_CARBON
-
 static PyObject *CtlObj_GetDataBrowserViewStyle(ControlObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -1949,9 +1818,6 @@ static PyObject *CtlObj_GetDataBrowserViewStyle(ControlObject *_self, PyObject *
                             PyMac_BuildOSType, style);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_SetDataBrowserViewStyle(ControlObject *_self, PyObject *_args)
 {
@@ -1971,9 +1837,6 @@ static PyObject *CtlObj_SetDataBrowserViewStyle(ControlObject *_self, PyObject *
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_EnableDataBrowserEditCommand(ControlObject *_self, PyObject *_args)
 {
@@ -1992,9 +1855,6 @@ static PyObject *CtlObj_EnableDataBrowserEditCommand(ControlObject *_self, PyObj
                             _rv);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_ExecuteDataBrowserEditCommand(ControlObject *_self, PyObject *_args)
 {
@@ -2014,9 +1874,6 @@ static PyObject *CtlObj_ExecuteDataBrowserEditCommand(ControlObject *_self, PyOb
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_GetDataBrowserSelectionAnchor(ControlObject *_self, PyObject *_args)
 {
@@ -2038,9 +1895,6 @@ static PyObject *CtlObj_GetDataBrowserSelectionAnchor(ControlObject *_self, PyOb
                             last);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_MoveDataBrowserSelectionAnchor(ControlObject *_self, PyObject *_args)
 {
@@ -2063,9 +1917,6 @@ static PyObject *CtlObj_MoveDataBrowserSelectionAnchor(ControlObject *_self, PyO
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_OpenDataBrowserContainer(ControlObject *_self, PyObject *_args)
 {
@@ -2085,9 +1936,6 @@ static PyObject *CtlObj_OpenDataBrowserContainer(ControlObject *_self, PyObject
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_CloseDataBrowserContainer(ControlObject *_self, PyObject *_args)
 {
@@ -2107,9 +1955,6 @@ static PyObject *CtlObj_CloseDataBrowserContainer(ControlObject *_self, PyObject
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_SortDataBrowserContainer(ControlObject *_self, PyObject *_args)
 {
@@ -2132,9 +1977,6 @@ static PyObject *CtlObj_SortDataBrowserContainer(ControlObject *_self, PyObject
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_GetDataBrowserItems(ControlObject *_self, PyObject *_args)
 {
@@ -2163,9 +2005,6 @@ static PyObject *CtlObj_GetDataBrowserItems(ControlObject *_self, PyObject *_arg
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_GetDataBrowserItemCount(ControlObject *_self, PyObject *_args)
 {
@@ -2193,9 +2032,6 @@ static PyObject *CtlObj_GetDataBrowserItemCount(ControlObject *_self, PyObject *
                             numItems);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_IsDataBrowserItemSelected(ControlObject *_self, PyObject *_args)
 {
@@ -2214,9 +2050,6 @@ static PyObject *CtlObj_IsDataBrowserItemSelected(ControlObject *_self, PyObject
                             _rv);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_GetDataBrowserItemState(ControlObject *_self, PyObject *_args)
 {
@@ -2238,9 +2071,6 @@ static PyObject *CtlObj_GetDataBrowserItemState(ControlObject *_self, PyObject *
                             state);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_RevealDataBrowserItem(ControlObject *_self, PyObject *_args)
 {
@@ -2266,9 +2096,6 @@ static PyObject *CtlObj_RevealDataBrowserItem(ControlObject *_self, PyObject *_a
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_SetDataBrowserActiveItems(ControlObject *_self, PyObject *_args)
 {
@@ -2288,9 +2115,6 @@ static PyObject *CtlObj_SetDataBrowserActiveItems(ControlObject *_self, PyObject
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_GetDataBrowserActiveItems(ControlObject *_self, PyObject *_args)
 {
@@ -2309,9 +2133,6 @@ static PyObject *CtlObj_GetDataBrowserActiveItems(ControlObject *_self, PyObject
                             active);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_SetDataBrowserScrollBarInset(ControlObject *_self, PyObject *_args)
 {
@@ -2330,9 +2151,6 @@ static PyObject *CtlObj_SetDataBrowserScrollBarInset(ControlObject *_self, PyObj
                             PyMac_BuildRect, &insetRect);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_GetDataBrowserScrollBarInset(ControlObject *_self, PyObject *_args)
 {
@@ -2351,9 +2169,6 @@ static PyObject *CtlObj_GetDataBrowserScrollBarInset(ControlObject *_self, PyObj
                             PyMac_BuildRect, &insetRect);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_SetDataBrowserTarget(ControlObject *_self, PyObject *_args)
 {
@@ -2373,9 +2188,6 @@ static PyObject *CtlObj_SetDataBrowserTarget(ControlObject *_self, PyObject *_ar
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_GetDataBrowserTarget(ControlObject *_self, PyObject *_args)
 {
@@ -2394,9 +2206,6 @@ static PyObject *CtlObj_GetDataBrowserTarget(ControlObject *_self, PyObject *_ar
                             target);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_SetDataBrowserSortOrder(ControlObject *_self, PyObject *_args)
 {
@@ -2416,9 +2225,6 @@ static PyObject *CtlObj_SetDataBrowserSortOrder(ControlObject *_self, PyObject *
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_GetDataBrowserSortOrder(ControlObject *_self, PyObject *_args)
 {
@@ -2437,9 +2243,6 @@ static PyObject *CtlObj_GetDataBrowserSortOrder(ControlObject *_self, PyObject *
                             order);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_SetDataBrowserScrollPosition(ControlObject *_self, PyObject *_args)
 {
@@ -2462,9 +2265,6 @@ static PyObject *CtlObj_SetDataBrowserScrollPosition(ControlObject *_self, PyObj
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_GetDataBrowserScrollPosition(ControlObject *_self, PyObject *_args)
 {
@@ -2486,9 +2286,6 @@ static PyObject *CtlObj_GetDataBrowserScrollPosition(ControlObject *_self, PyObj
                             left);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_SetDataBrowserHasScrollBars(ControlObject *_self, PyObject *_args)
 {
@@ -2511,9 +2308,6 @@ static PyObject *CtlObj_SetDataBrowserHasScrollBars(ControlObject *_self, PyObje
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_GetDataBrowserHasScrollBars(ControlObject *_self, PyObject *_args)
 {
@@ -2535,9 +2329,6 @@ static PyObject *CtlObj_GetDataBrowserHasScrollBars(ControlObject *_self, PyObje
                             vert);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_SetDataBrowserSortProperty(ControlObject *_self, PyObject *_args)
 {
@@ -2557,9 +2348,6 @@ static PyObject *CtlObj_SetDataBrowserSortProperty(ControlObject *_self, PyObjec
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_GetDataBrowserSortProperty(ControlObject *_self, PyObject *_args)
 {
@@ -2578,9 +2366,6 @@ static PyObject *CtlObj_GetDataBrowserSortProperty(ControlObject *_self, PyObjec
                             property);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_SetDataBrowserSelectionFlags(ControlObject *_self, PyObject *_args)
 {
@@ -2600,9 +2385,6 @@ static PyObject *CtlObj_SetDataBrowserSelectionFlags(ControlObject *_self, PyObj
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_GetDataBrowserSelectionFlags(ControlObject *_self, PyObject *_args)
 {
@@ -2621,9 +2403,6 @@ static PyObject *CtlObj_GetDataBrowserSelectionFlags(ControlObject *_self, PyObj
                             selectionFlags);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_SetDataBrowserPropertyFlags(ControlObject *_self, PyObject *_args)
 {
@@ -2646,9 +2425,6 @@ static PyObject *CtlObj_SetDataBrowserPropertyFlags(ControlObject *_self, PyObje
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_GetDataBrowserPropertyFlags(ControlObject *_self, PyObject *_args)
 {
@@ -2670,9 +2446,6 @@ static PyObject *CtlObj_GetDataBrowserPropertyFlags(ControlObject *_self, PyObje
                             flags);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_SetDataBrowserEditText(ControlObject *_self, PyObject *_args)
 {
@@ -2692,7 +2465,6 @@ static PyObject *CtlObj_SetDataBrowserEditText(ControlObject *_self, PyObject *_
        _res = Py_None;
        return _res;
 }
-#endif
 
 #if TARGET_API_MAC_OSX
 
@@ -2715,8 +2487,6 @@ static PyObject *CtlObj_CopyDataBrowserEditText(ControlObject *_self, PyObject *
 }
 #endif
 
-#if TARGET_API_MAC_CARBON
-
 static PyObject *CtlObj_GetDataBrowserEditText(ControlObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -2735,9 +2505,6 @@ static PyObject *CtlObj_GetDataBrowserEditText(ControlObject *_self, PyObject *_
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_SetDataBrowserEditItem(ControlObject *_self, PyObject *_args)
 {
@@ -2760,9 +2527,6 @@ static PyObject *CtlObj_SetDataBrowserEditItem(ControlObject *_self, PyObject *_
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_GetDataBrowserEditItem(ControlObject *_self, PyObject *_args)
 {
@@ -2784,9 +2548,6 @@ static PyObject *CtlObj_GetDataBrowserEditItem(ControlObject *_self, PyObject *_
                             property);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_GetDataBrowserItemPartBounds(ControlObject *_self, PyObject *_args)
 {
@@ -2814,9 +2575,6 @@ static PyObject *CtlObj_GetDataBrowserItemPartBounds(ControlObject *_self, PyObj
                             PyMac_BuildRect, &bounds);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_RemoveDataBrowserTableViewColumn(ControlObject *_self, PyObject *_args)
 {
@@ -2836,9 +2594,6 @@ static PyObject *CtlObj_RemoveDataBrowserTableViewColumn(ControlObject *_self, P
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_GetDataBrowserTableViewColumnCount(ControlObject *_self, PyObject *_args)
 {
@@ -2857,9 +2612,6 @@ static PyObject *CtlObj_GetDataBrowserTableViewColumnCount(ControlObject *_self,
                             numColumns);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_SetDataBrowserTableViewHiliteStyle(ControlObject *_self, PyObject *_args)
 {
@@ -2879,9 +2631,6 @@ static PyObject *CtlObj_SetDataBrowserTableViewHiliteStyle(ControlObject *_self,
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_GetDataBrowserTableViewHiliteStyle(ControlObject *_self, PyObject *_args)
 {
@@ -2900,9 +2649,6 @@ static PyObject *CtlObj_GetDataBrowserTableViewHiliteStyle(ControlObject *_self,
                             hiliteStyle);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_SetDataBrowserTableViewRowHeight(ControlObject *_self, PyObject *_args)
 {
@@ -2922,9 +2668,6 @@ static PyObject *CtlObj_SetDataBrowserTableViewRowHeight(ControlObject *_self, P
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_GetDataBrowserTableViewRowHeight(ControlObject *_self, PyObject *_args)
 {
@@ -2943,9 +2686,6 @@ static PyObject *CtlObj_GetDataBrowserTableViewRowHeight(ControlObject *_self, P
                             height);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_SetDataBrowserTableViewColumnWidth(ControlObject *_self, PyObject *_args)
 {
@@ -2965,9 +2705,6 @@ static PyObject *CtlObj_SetDataBrowserTableViewColumnWidth(ControlObject *_self,
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_GetDataBrowserTableViewColumnWidth(ControlObject *_self, PyObject *_args)
 {
@@ -2986,9 +2723,6 @@ static PyObject *CtlObj_GetDataBrowserTableViewColumnWidth(ControlObject *_self,
                             width);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_SetDataBrowserTableViewItemRowHeight(ControlObject *_self, PyObject *_args)
 {
@@ -3011,9 +2745,6 @@ static PyObject *CtlObj_SetDataBrowserTableViewItemRowHeight(ControlObject *_sel
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_GetDataBrowserTableViewItemRowHeight(ControlObject *_self, PyObject *_args)
 {
@@ -3035,9 +2766,6 @@ static PyObject *CtlObj_GetDataBrowserTableViewItemRowHeight(ControlObject *_sel
                             height);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_SetDataBrowserTableViewNamedColumnWidth(ControlObject *_self, PyObject *_args)
 {
@@ -3060,9 +2788,6 @@ static PyObject *CtlObj_SetDataBrowserTableViewNamedColumnWidth(ControlObject *_
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_GetDataBrowserTableViewNamedColumnWidth(ControlObject *_self, PyObject *_args)
 {
@@ -3084,9 +2809,6 @@ static PyObject *CtlObj_GetDataBrowserTableViewNamedColumnWidth(ControlObject *_
                             width);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_SetDataBrowserTableViewGeometry(ControlObject *_self, PyObject *_args)
 {
@@ -3109,9 +2831,6 @@ static PyObject *CtlObj_SetDataBrowserTableViewGeometry(ControlObject *_self, Py
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_GetDataBrowserTableViewGeometry(ControlObject *_self, PyObject *_args)
 {
@@ -3133,9 +2852,6 @@ static PyObject *CtlObj_GetDataBrowserTableViewGeometry(ControlObject *_self, Py
                             variableHeightRows);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_GetDataBrowserTableViewItemID(ControlObject *_self, PyObject *_args)
 {
@@ -3157,9 +2873,6 @@ static PyObject *CtlObj_GetDataBrowserTableViewItemID(ControlObject *_self, PyOb
                             item);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_SetDataBrowserTableViewItemRow(ControlObject *_self, PyObject *_args)
 {
@@ -3182,9 +2895,6 @@ static PyObject *CtlObj_SetDataBrowserTableViewItemRow(ControlObject *_self, PyO
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_GetDataBrowserTableViewItemRow(ControlObject *_self, PyObject *_args)
 {
@@ -3206,9 +2916,6 @@ static PyObject *CtlObj_GetDataBrowserTableViewItemRow(ControlObject *_self, PyO
                             row);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_SetDataBrowserTableViewColumnPosition(ControlObject *_self, PyObject *_args)
 {
@@ -3231,9 +2938,6 @@ static PyObject *CtlObj_SetDataBrowserTableViewColumnPosition(ControlObject *_se
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_GetDataBrowserTableViewColumnPosition(ControlObject *_self, PyObject *_args)
 {
@@ -3255,9 +2959,6 @@ static PyObject *CtlObj_GetDataBrowserTableViewColumnPosition(ControlObject *_se
                             position);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_GetDataBrowserTableViewColumnProperty(ControlObject *_self, PyObject *_args)
 {
@@ -3279,9 +2980,6 @@ static PyObject *CtlObj_GetDataBrowserTableViewColumnProperty(ControlObject *_se
                             property);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_AutoSizeDataBrowserListViewColumns(ControlObject *_self, PyObject *_args)
 {
@@ -3298,9 +2996,6 @@ static PyObject *CtlObj_AutoSizeDataBrowserListViewColumns(ControlObject *_self,
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_AddDataBrowserListViewColumn(ControlObject *_self, PyObject *_args)
 {
@@ -3323,9 +3018,6 @@ static PyObject *CtlObj_AddDataBrowserListViewColumn(ControlObject *_self, PyObj
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_SetDataBrowserListViewHeaderBtnHeight(ControlObject *_self, PyObject *_args)
 {
@@ -3345,9 +3037,6 @@ static PyObject *CtlObj_SetDataBrowserListViewHeaderBtnHeight(ControlObject *_se
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_GetDataBrowserListViewHeaderBtnHeight(ControlObject *_self, PyObject *_args)
 {
@@ -3366,9 +3055,6 @@ static PyObject *CtlObj_GetDataBrowserListViewHeaderBtnHeight(ControlObject *_se
                             height);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_SetDataBrowserListViewUsePlainBackground(ControlObject *_self, PyObject *_args)
 {
@@ -3388,9 +3074,6 @@ static PyObject *CtlObj_SetDataBrowserListViewUsePlainBackground(ControlObject *
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_GetDataBrowserListViewUsePlainBackground(ControlObject *_self, PyObject *_args)
 {
@@ -3409,9 +3092,6 @@ static PyObject *CtlObj_GetDataBrowserListViewUsePlainBackground(ControlObject *
                             usePlainBackground);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_SetDataBrowserListViewDisclosureColumn(ControlObject *_self, PyObject *_args)
 {
@@ -3434,9 +3114,6 @@ static PyObject *CtlObj_SetDataBrowserListViewDisclosureColumn(ControlObject *_s
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_GetDataBrowserListViewDisclosureColumn(ControlObject *_self, PyObject *_args)
 {
@@ -3458,9 +3135,6 @@ static PyObject *CtlObj_GetDataBrowserListViewDisclosureColumn(ControlObject *_s
                             expandableRows);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_GetDataBrowserColumnViewPath(ControlObject *_self, PyObject *_args)
 {
@@ -3480,9 +3154,6 @@ static PyObject *CtlObj_GetDataBrowserColumnViewPath(ControlObject *_self, PyObj
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_GetDataBrowserColumnViewPathLength(ControlObject *_self, PyObject *_args)
 {
@@ -3501,9 +3172,6 @@ static PyObject *CtlObj_GetDataBrowserColumnViewPathLength(ControlObject *_self,
                             pathLength);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_SetDataBrowserColumnViewDisplayType(ControlObject *_self, PyObject *_args)
 {
@@ -3523,9 +3191,6 @@ static PyObject *CtlObj_SetDataBrowserColumnViewDisplayType(ControlObject *_self
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *CtlObj_GetDataBrowserColumnViewDisplayType(ControlObject *_self, PyObject *_args)
 {
@@ -3544,7 +3209,6 @@ static PyObject *CtlObj_GetDataBrowserColumnViewDisplayType(ControlObject *_self
                             PyMac_BuildOSType, propertyType);
        return _res;
 }
-#endif
 
 static PyObject *CtlObj_as_Resource(ControlObject *_self, PyObject *_args)
 {
@@ -3832,52 +3496,6 @@ static PyObject *CtlObj_SetControlData_Callback(ControlObject *_self, PyObject *
 
 }
 
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *CtlObj_GetPopupData(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-
-       PopupPrivateDataHandle hdl;
-
-       if ( (*_self->ob_itself)->contrlData == NULL ) {
-               PyErr_SetString(Ctl_Error, "No contrlData handle in control");
-               return 0;
-       }
-       hdl = (PopupPrivateDataHandle)(*_self->ob_itself)->contrlData;
-       HLock((Handle)hdl);
-       _res = Py_BuildValue("O&i", MenuObj_New, (*hdl)->mHandle, (int)(*hdl)->mID);
-       HUnlock((Handle)hdl);
-       return _res;
-
-}
-#endif
-
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *CtlObj_SetPopupData(ControlObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-
-       PopupPrivateDataHandle hdl;
-       MenuHandle mHandle;
-       short mID;
-
-       if (!PyArg_ParseTuple(_args, "O&h", MenuObj_Convert, &mHandle, &mID) )
-               return 0;
-       if ( (*_self->ob_itself)->contrlData == NULL ) {
-               PyErr_SetString(Ctl_Error, "No contrlData handle in control");
-               return 0;
-       }
-       hdl = (PopupPrivateDataHandle)(*_self->ob_itself)->contrlData;
-       (*hdl)->mHandle = mHandle;
-       (*hdl)->mID = mID;
-       Py_INCREF(Py_None);
-       return Py_None;
-
-}
-#endif
-
 static PyMethodDef CtlObj_methods[] = {
        {"HiliteControl", (PyCFunction)CtlObj_HiliteControl, 1,
         PyDoc_STR("(ControlPartCode hiliteState) -> None")},
@@ -3926,23 +3544,14 @@ static PyMethodDef CtlObj_methods[] = {
         PyDoc_STR("(Point startPoint, Rect limitRect, Rect slopRect, DragConstraint axis) -> None")},
        {"TestControl", (PyCFunction)CtlObj_TestControl, 1,
         PyDoc_STR("(Point testPoint) -> (ControlPartCode _rv)")},
-
-#if TARGET_API_MAC_CARBON
        {"HandleControlContextualMenuClick", (PyCFunction)CtlObj_HandleControlContextualMenuClick, 1,
         PyDoc_STR("(Point inWhere) -> (Boolean menuDisplayed)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"GetControlClickActivation", (PyCFunction)CtlObj_GetControlClickActivation, 1,
         PyDoc_STR("(Point inWhere, EventModifiers inModifiers) -> (ClickActivationResult outResult)")},
-#endif
        {"HandleControlKey", (PyCFunction)CtlObj_HandleControlKey, 1,
         PyDoc_STR("(SInt16 inKeyCode, SInt16 inCharCode, EventModifiers inModifiers) -> (ControlPartCode _rv)")},
-
-#if TARGET_API_MAC_CARBON
        {"HandleControlSetCursor", (PyCFunction)CtlObj_HandleControlSetCursor, 1,
         PyDoc_STR("(Point localPoint, EventModifiers modifiers) -> (Boolean cursorWasSet)")},
-#endif
        {"MoveControl", (PyCFunction)CtlObj_MoveControl, 1,
         PyDoc_STR("(SInt16 h, SInt16 v) -> None")},
        {"SizeControl", (PyCFunction)CtlObj_SizeControl, 1,
@@ -3951,16 +3560,10 @@ static PyMethodDef CtlObj_methods[] = {
         PyDoc_STR("(Str255 title) -> None")},
        {"GetControlTitle", (PyCFunction)CtlObj_GetControlTitle, 1,
         PyDoc_STR("() -> (Str255 title)")},
-
-#if TARGET_API_MAC_CARBON
        {"SetControlTitleWithCFString", (PyCFunction)CtlObj_SetControlTitleWithCFString, 1,
         PyDoc_STR("(CFStringRef inString) -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"CopyControlTitleAsCFString", (PyCFunction)CtlObj_CopyControlTitleAsCFString, 1,
         PyDoc_STR("() -> (CFStringRef outString)")},
-#endif
        {"GetControlValue", (PyCFunction)CtlObj_GetControlValue, 1,
         PyDoc_STR("() -> (SInt16 _rv)")},
        {"SetControlValue", (PyCFunction)CtlObj_SetControlValue, 1,
@@ -3991,38 +3594,20 @@ static PyMethodDef CtlObj_methods[] = {
         PyDoc_STR("(SInt32 newMinimum) -> None")},
        {"IsValidControlHandle", (PyCFunction)CtlObj_IsValidControlHandle, 1,
         PyDoc_STR("() -> (Boolean _rv)")},
-
-#if TARGET_API_MAC_CARBON
        {"SetControlID", (PyCFunction)CtlObj_SetControlID, 1,
         PyDoc_STR("(ControlID inID) -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"GetControlID", (PyCFunction)CtlObj_GetControlID, 1,
         PyDoc_STR("() -> (ControlID outID)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"SetControlCommandID", (PyCFunction)CtlObj_SetControlCommandID, 1,
         PyDoc_STR("(UInt32 inCommandID) -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"GetControlCommandID", (PyCFunction)CtlObj_GetControlCommandID, 1,
         PyDoc_STR("() -> (UInt32 outCommandID)")},
-#endif
        {"RemoveControlProperty", (PyCFunction)CtlObj_RemoveControlProperty, 1,
         PyDoc_STR("(OSType propertyCreator, OSType propertyTag) -> None")},
-
-#if TARGET_API_MAC_CARBON
        {"GetControlPropertyAttributes", (PyCFunction)CtlObj_GetControlPropertyAttributes, 1,
         PyDoc_STR("(OSType propertyCreator, OSType propertyTag) -> (UInt32 attributes)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"ChangeControlPropertyAttributes", (PyCFunction)CtlObj_ChangeControlPropertyAttributes, 1,
         PyDoc_STR("(OSType propertyCreator, OSType propertyTag, UInt32 attributesToSet, UInt32 attributesToClear) -> None")},
-#endif
        {"GetControlRegion", (PyCFunction)CtlObj_GetControlRegion, 1,
         PyDoc_STR("(ControlPartCode inPart, RgnHandle outRegion) -> None")},
        {"GetControlVariant", (PyCFunction)CtlObj_GetControlVariant, 1,
@@ -4033,16 +3618,6 @@ static PyMethodDef CtlObj_methods[] = {
         PyDoc_STR("(SInt32 data) -> None")},
        {"GetControlReference", (PyCFunction)CtlObj_GetControlReference, 1,
         PyDoc_STR("() -> (SInt32 _rv)")},
-
-#if !TARGET_API_MAC_CARBON
-       {"GetAuxiliaryControlRecord", (PyCFunction)CtlObj_GetAuxiliaryControlRecord, 1,
-        PyDoc_STR("() -> (Boolean _rv, AuxCtlHandle acHndl)")},
-#endif
-
-#if !TARGET_API_MAC_CARBON
-       {"SetControlColor", (PyCFunction)CtlObj_SetControlColor, 1,
-        PyDoc_STR("(CCTabHandle newColorTable) -> None")},
-#endif
        {"EmbedControl", (PyCFunction)CtlObj_EmbedControl, 1,
         PyDoc_STR("(ControlHandle inContainer) -> None")},
        {"AutoEmbedControl", (PyCFunction)CtlObj_AutoEmbedControl, 1,
@@ -4059,92 +3634,44 @@ static PyMethodDef CtlObj_methods[] = {
         PyDoc_STR("() -> (UInt32 outFeatures)")},
        {"GetControlDataSize", (PyCFunction)CtlObj_GetControlDataSize, 1,
         PyDoc_STR("(ControlPartCode inPart, ResType inTagName) -> (Size outMaxSize)")},
-
-#if TARGET_API_MAC_CARBON
        {"HandleControlDragTracking", (PyCFunction)CtlObj_HandleControlDragTracking, 1,
         PyDoc_STR("(DragTrackingMessage inMessage, DragReference inDrag) -> (Boolean outLikesDrag)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"HandleControlDragReceive", (PyCFunction)CtlObj_HandleControlDragReceive, 1,
         PyDoc_STR("(DragReference inDrag) -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"SetControlDragTrackingEnabled", (PyCFunction)CtlObj_SetControlDragTrackingEnabled, 1,
         PyDoc_STR("(Boolean tracks) -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"IsControlDragTrackingEnabled", (PyCFunction)CtlObj_IsControlDragTrackingEnabled, 1,
         PyDoc_STR("() -> (Boolean tracks)")},
-#endif
-
-#if ACCESSOR_CALLS_ARE_FUNCTIONS
        {"GetControlBounds", (PyCFunction)CtlObj_GetControlBounds, 1,
         PyDoc_STR("() -> (Rect bounds)")},
-#endif
-
-#if ACCESSOR_CALLS_ARE_FUNCTIONS
        {"IsControlHilited", (PyCFunction)CtlObj_IsControlHilited, 1,
         PyDoc_STR("() -> (Boolean _rv)")},
-#endif
-
-#if ACCESSOR_CALLS_ARE_FUNCTIONS
        {"GetControlHilite", (PyCFunction)CtlObj_GetControlHilite, 1,
         PyDoc_STR("() -> (UInt16 _rv)")},
-#endif
-
-#if ACCESSOR_CALLS_ARE_FUNCTIONS
        {"GetControlOwner", (PyCFunction)CtlObj_GetControlOwner, 1,
         PyDoc_STR("() -> (WindowPtr _rv)")},
-#endif
-
-#if ACCESSOR_CALLS_ARE_FUNCTIONS
        {"GetControlDataHandle", (PyCFunction)CtlObj_GetControlDataHandle, 1,
         PyDoc_STR("() -> (Handle _rv)")},
-#endif
-
-#if ACCESSOR_CALLS_ARE_FUNCTIONS
        {"GetControlPopupMenuHandle", (PyCFunction)CtlObj_GetControlPopupMenuHandle, 1,
         PyDoc_STR("() -> (MenuHandle _rv)")},
-#endif
-
-#if ACCESSOR_CALLS_ARE_FUNCTIONS
        {"GetControlPopupMenuID", (PyCFunction)CtlObj_GetControlPopupMenuID, 1,
         PyDoc_STR("() -> (short _rv)")},
-#endif
-
-#if ACCESSOR_CALLS_ARE_FUNCTIONS
        {"SetControlDataHandle", (PyCFunction)CtlObj_SetControlDataHandle, 1,
         PyDoc_STR("(Handle dataHandle) -> None")},
-#endif
-
-#if ACCESSOR_CALLS_ARE_FUNCTIONS
        {"SetControlBounds", (PyCFunction)CtlObj_SetControlBounds, 1,
         PyDoc_STR("(Rect bounds) -> None")},
-#endif
-
-#if ACCESSOR_CALLS_ARE_FUNCTIONS
        {"SetControlPopupMenuHandle", (PyCFunction)CtlObj_SetControlPopupMenuHandle, 1,
         PyDoc_STR("(MenuHandle popupMenu) -> None")},
-#endif
-
-#if ACCESSOR_CALLS_ARE_FUNCTIONS
        {"SetControlPopupMenuID", (PyCFunction)CtlObj_SetControlPopupMenuID, 1,
         PyDoc_STR("(short menuID) -> None")},
-#endif
        {"GetBevelButtonMenuValue", (PyCFunction)CtlObj_GetBevelButtonMenuValue, 1,
         PyDoc_STR("() -> (SInt16 outValue)")},
        {"SetBevelButtonMenuValue", (PyCFunction)CtlObj_SetBevelButtonMenuValue, 1,
         PyDoc_STR("(SInt16 inValue) -> None")},
        {"GetBevelButtonMenuHandle", (PyCFunction)CtlObj_GetBevelButtonMenuHandle, 1,
         PyDoc_STR("() -> (MenuHandle outHandle)")},
-
-#if TARGET_API_MAC_CARBON
        {"SetBevelButtonContentInfo", (PyCFunction)CtlObj_SetBevelButtonContentInfo, 1,
         PyDoc_STR("(ControlButtonContentInfo inContent) -> None")},
-#endif
        {"SetBevelButtonTransform", (PyCFunction)CtlObj_SetBevelButtonTransform, 1,
         PyDoc_STR("(IconTransformType transform) -> None")},
        {"SetDisclosureTriangleLastValue", (PyCFunction)CtlObj_SetDisclosureTriangleLastValue, 1,
@@ -4153,363 +3680,153 @@ static PyMethodDef CtlObj_methods[] = {
         PyDoc_STR("() -> (Rect outContentRect)")},
        {"SetTabEnabled", (PyCFunction)CtlObj_SetTabEnabled, 1,
         PyDoc_STR("(SInt16 inTabToHilite, Boolean inEnabled) -> None")},
-
-#if TARGET_API_MAC_CARBON
        {"SetImageWellContentInfo", (PyCFunction)CtlObj_SetImageWellContentInfo, 1,
         PyDoc_STR("(ControlButtonContentInfo inContent) -> None")},
-#endif
        {"SetImageWellTransform", (PyCFunction)CtlObj_SetImageWellTransform, 1,
         PyDoc_STR("(IconTransformType inTransform) -> None")},
-
-#if TARGET_API_MAC_CARBON
        {"GetDataBrowserViewStyle", (PyCFunction)CtlObj_GetDataBrowserViewStyle, 1,
         PyDoc_STR("() -> (OSType style)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"SetDataBrowserViewStyle", (PyCFunction)CtlObj_SetDataBrowserViewStyle, 1,
         PyDoc_STR("(OSType style) -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"EnableDataBrowserEditCommand", (PyCFunction)CtlObj_EnableDataBrowserEditCommand, 1,
         PyDoc_STR("(UInt32 command) -> (Boolean _rv)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"ExecuteDataBrowserEditCommand", (PyCFunction)CtlObj_ExecuteDataBrowserEditCommand, 1,
         PyDoc_STR("(UInt32 command) -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"GetDataBrowserSelectionAnchor", (PyCFunction)CtlObj_GetDataBrowserSelectionAnchor, 1,
         PyDoc_STR("() -> (UInt32 first, UInt32 last)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"MoveDataBrowserSelectionAnchor", (PyCFunction)CtlObj_MoveDataBrowserSelectionAnchor, 1,
         PyDoc_STR("(UInt32 direction, Boolean extendSelection) -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"OpenDataBrowserContainer", (PyCFunction)CtlObj_OpenDataBrowserContainer, 1,
         PyDoc_STR("(UInt32 container) -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"CloseDataBrowserContainer", (PyCFunction)CtlObj_CloseDataBrowserContainer, 1,
         PyDoc_STR("(UInt32 container) -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"SortDataBrowserContainer", (PyCFunction)CtlObj_SortDataBrowserContainer, 1,
         PyDoc_STR("(UInt32 container, Boolean sortChildren) -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"GetDataBrowserItems", (PyCFunction)CtlObj_GetDataBrowserItems, 1,
         PyDoc_STR("(UInt32 container, Boolean recurse, UInt32 state, Handle items) -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"GetDataBrowserItemCount", (PyCFunction)CtlObj_GetDataBrowserItemCount, 1,
         PyDoc_STR("(UInt32 container, Boolean recurse, UInt32 state) -> (UInt32 numItems)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"IsDataBrowserItemSelected", (PyCFunction)CtlObj_IsDataBrowserItemSelected, 1,
         PyDoc_STR("(UInt32 item) -> (Boolean _rv)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"GetDataBrowserItemState", (PyCFunction)CtlObj_GetDataBrowserItemState, 1,
         PyDoc_STR("(UInt32 item) -> (UInt32 state)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"RevealDataBrowserItem", (PyCFunction)CtlObj_RevealDataBrowserItem, 1,
         PyDoc_STR("(UInt32 item, UInt32 propertyID, UInt8 options) -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"SetDataBrowserActiveItems", (PyCFunction)CtlObj_SetDataBrowserActiveItems, 1,
         PyDoc_STR("(Boolean active) -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"GetDataBrowserActiveItems", (PyCFunction)CtlObj_GetDataBrowserActiveItems, 1,
         PyDoc_STR("() -> (Boolean active)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"SetDataBrowserScrollBarInset", (PyCFunction)CtlObj_SetDataBrowserScrollBarInset, 1,
         PyDoc_STR("() -> (Rect insetRect)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"GetDataBrowserScrollBarInset", (PyCFunction)CtlObj_GetDataBrowserScrollBarInset, 1,
         PyDoc_STR("() -> (Rect insetRect)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"SetDataBrowserTarget", (PyCFunction)CtlObj_SetDataBrowserTarget, 1,
         PyDoc_STR("(UInt32 target) -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"GetDataBrowserTarget", (PyCFunction)CtlObj_GetDataBrowserTarget, 1,
         PyDoc_STR("() -> (UInt32 target)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"SetDataBrowserSortOrder", (PyCFunction)CtlObj_SetDataBrowserSortOrder, 1,
         PyDoc_STR("(UInt16 order) -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"GetDataBrowserSortOrder", (PyCFunction)CtlObj_GetDataBrowserSortOrder, 1,
         PyDoc_STR("() -> (UInt16 order)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"SetDataBrowserScrollPosition", (PyCFunction)CtlObj_SetDataBrowserScrollPosition, 1,
         PyDoc_STR("(UInt32 top, UInt32 left) -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"GetDataBrowserScrollPosition", (PyCFunction)CtlObj_GetDataBrowserScrollPosition, 1,
         PyDoc_STR("() -> (UInt32 top, UInt32 left)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"SetDataBrowserHasScrollBars", (PyCFunction)CtlObj_SetDataBrowserHasScrollBars, 1,
         PyDoc_STR("(Boolean horiz, Boolean vert) -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"GetDataBrowserHasScrollBars", (PyCFunction)CtlObj_GetDataBrowserHasScrollBars, 1,
         PyDoc_STR("() -> (Boolean horiz, Boolean vert)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"SetDataBrowserSortProperty", (PyCFunction)CtlObj_SetDataBrowserSortProperty, 1,
         PyDoc_STR("(UInt32 property) -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"GetDataBrowserSortProperty", (PyCFunction)CtlObj_GetDataBrowserSortProperty, 1,
         PyDoc_STR("() -> (UInt32 property)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"SetDataBrowserSelectionFlags", (PyCFunction)CtlObj_SetDataBrowserSelectionFlags, 1,
         PyDoc_STR("(UInt32 selectionFlags) -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"GetDataBrowserSelectionFlags", (PyCFunction)CtlObj_GetDataBrowserSelectionFlags, 1,
         PyDoc_STR("() -> (UInt32 selectionFlags)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"SetDataBrowserPropertyFlags", (PyCFunction)CtlObj_SetDataBrowserPropertyFlags, 1,
         PyDoc_STR("(UInt32 property, UInt32 flags) -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"GetDataBrowserPropertyFlags", (PyCFunction)CtlObj_GetDataBrowserPropertyFlags, 1,
         PyDoc_STR("(UInt32 property) -> (UInt32 flags)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"SetDataBrowserEditText", (PyCFunction)CtlObj_SetDataBrowserEditText, 1,
         PyDoc_STR("(CFStringRef text) -> None")},
-#endif
 
 #if TARGET_API_MAC_OSX
        {"CopyDataBrowserEditText", (PyCFunction)CtlObj_CopyDataBrowserEditText, 1,
         PyDoc_STR("() -> (CFStringRef text)")},
 #endif
-
-#if TARGET_API_MAC_CARBON
        {"GetDataBrowserEditText", (PyCFunction)CtlObj_GetDataBrowserEditText, 1,
         PyDoc_STR("(CFMutableStringRef text) -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"SetDataBrowserEditItem", (PyCFunction)CtlObj_SetDataBrowserEditItem, 1,
         PyDoc_STR("(UInt32 item, UInt32 property) -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"GetDataBrowserEditItem", (PyCFunction)CtlObj_GetDataBrowserEditItem, 1,
         PyDoc_STR("() -> (UInt32 item, UInt32 property)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"GetDataBrowserItemPartBounds", (PyCFunction)CtlObj_GetDataBrowserItemPartBounds, 1,
         PyDoc_STR("(UInt32 item, UInt32 property, OSType part) -> (Rect bounds)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"RemoveDataBrowserTableViewColumn", (PyCFunction)CtlObj_RemoveDataBrowserTableViewColumn, 1,
         PyDoc_STR("(UInt32 column) -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"GetDataBrowserTableViewColumnCount", (PyCFunction)CtlObj_GetDataBrowserTableViewColumnCount, 1,
         PyDoc_STR("() -> (UInt32 numColumns)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"SetDataBrowserTableViewHiliteStyle", (PyCFunction)CtlObj_SetDataBrowserTableViewHiliteStyle, 1,
         PyDoc_STR("(UInt32 hiliteStyle) -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"GetDataBrowserTableViewHiliteStyle", (PyCFunction)CtlObj_GetDataBrowserTableViewHiliteStyle, 1,
         PyDoc_STR("() -> (UInt32 hiliteStyle)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"SetDataBrowserTableViewRowHeight", (PyCFunction)CtlObj_SetDataBrowserTableViewRowHeight, 1,
         PyDoc_STR("(UInt16 height) -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"GetDataBrowserTableViewRowHeight", (PyCFunction)CtlObj_GetDataBrowserTableViewRowHeight, 1,
         PyDoc_STR("() -> (UInt16 height)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"SetDataBrowserTableViewColumnWidth", (PyCFunction)CtlObj_SetDataBrowserTableViewColumnWidth, 1,
         PyDoc_STR("(UInt16 width) -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"GetDataBrowserTableViewColumnWidth", (PyCFunction)CtlObj_GetDataBrowserTableViewColumnWidth, 1,
         PyDoc_STR("() -> (UInt16 width)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"SetDataBrowserTableViewItemRowHeight", (PyCFunction)CtlObj_SetDataBrowserTableViewItemRowHeight, 1,
         PyDoc_STR("(UInt32 item, UInt16 height) -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"GetDataBrowserTableViewItemRowHeight", (PyCFunction)CtlObj_GetDataBrowserTableViewItemRowHeight, 1,
         PyDoc_STR("(UInt32 item) -> (UInt16 height)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"SetDataBrowserTableViewNamedColumnWidth", (PyCFunction)CtlObj_SetDataBrowserTableViewNamedColumnWidth, 1,
         PyDoc_STR("(UInt32 column, UInt16 width) -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"GetDataBrowserTableViewNamedColumnWidth", (PyCFunction)CtlObj_GetDataBrowserTableViewNamedColumnWidth, 1,
         PyDoc_STR("(UInt32 column) -> (UInt16 width)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"SetDataBrowserTableViewGeometry", (PyCFunction)CtlObj_SetDataBrowserTableViewGeometry, 1,
         PyDoc_STR("(Boolean variableWidthColumns, Boolean variableHeightRows) -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"GetDataBrowserTableViewGeometry", (PyCFunction)CtlObj_GetDataBrowserTableViewGeometry, 1,
         PyDoc_STR("() -> (Boolean variableWidthColumns, Boolean variableHeightRows)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"GetDataBrowserTableViewItemID", (PyCFunction)CtlObj_GetDataBrowserTableViewItemID, 1,
         PyDoc_STR("(UInt32 row) -> (UInt32 item)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"SetDataBrowserTableViewItemRow", (PyCFunction)CtlObj_SetDataBrowserTableViewItemRow, 1,
         PyDoc_STR("(UInt32 item, UInt32 row) -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"GetDataBrowserTableViewItemRow", (PyCFunction)CtlObj_GetDataBrowserTableViewItemRow, 1,
         PyDoc_STR("(UInt32 item) -> (UInt32 row)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"SetDataBrowserTableViewColumnPosition", (PyCFunction)CtlObj_SetDataBrowserTableViewColumnPosition, 1,
         PyDoc_STR("(UInt32 column, UInt32 position) -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"GetDataBrowserTableViewColumnPosition", (PyCFunction)CtlObj_GetDataBrowserTableViewColumnPosition, 1,
         PyDoc_STR("(UInt32 column) -> (UInt32 position)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"GetDataBrowserTableViewColumnProperty", (PyCFunction)CtlObj_GetDataBrowserTableViewColumnProperty, 1,
         PyDoc_STR("(UInt32 column) -> (UInt32 property)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"AutoSizeDataBrowserListViewColumns", (PyCFunction)CtlObj_AutoSizeDataBrowserListViewColumns, 1,
         PyDoc_STR("() -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"AddDataBrowserListViewColumn", (PyCFunction)CtlObj_AddDataBrowserListViewColumn, 1,
         PyDoc_STR("(DataBrowserListViewColumnDesc columnDesc, UInt32 position) -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"SetDataBrowserListViewHeaderBtnHeight", (PyCFunction)CtlObj_SetDataBrowserListViewHeaderBtnHeight, 1,
         PyDoc_STR("(UInt16 height) -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"GetDataBrowserListViewHeaderBtnHeight", (PyCFunction)CtlObj_GetDataBrowserListViewHeaderBtnHeight, 1,
         PyDoc_STR("() -> (UInt16 height)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"SetDataBrowserListViewUsePlainBackground", (PyCFunction)CtlObj_SetDataBrowserListViewUsePlainBackground, 1,
         PyDoc_STR("(Boolean usePlainBackground) -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"GetDataBrowserListViewUsePlainBackground", (PyCFunction)CtlObj_GetDataBrowserListViewUsePlainBackground, 1,
         PyDoc_STR("() -> (Boolean usePlainBackground)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"SetDataBrowserListViewDisclosureColumn", (PyCFunction)CtlObj_SetDataBrowserListViewDisclosureColumn, 1,
         PyDoc_STR("(UInt32 column, Boolean expandableRows) -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"GetDataBrowserListViewDisclosureColumn", (PyCFunction)CtlObj_GetDataBrowserListViewDisclosureColumn, 1,
         PyDoc_STR("() -> (UInt32 column, Boolean expandableRows)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"GetDataBrowserColumnViewPath", (PyCFunction)CtlObj_GetDataBrowserColumnViewPath, 1,
         PyDoc_STR("(Handle path) -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"GetDataBrowserColumnViewPathLength", (PyCFunction)CtlObj_GetDataBrowserColumnViewPathLength, 1,
         PyDoc_STR("() -> (UInt32 pathLength)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"SetDataBrowserColumnViewDisplayType", (PyCFunction)CtlObj_SetDataBrowserColumnViewDisplayType, 1,
         PyDoc_STR("(OSType propertyType) -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"GetDataBrowserColumnViewDisplayType", (PyCFunction)CtlObj_GetDataBrowserColumnViewDisplayType, 1,
         PyDoc_STR("() -> (OSType propertyType)")},
-#endif
        {"as_Resource", (PyCFunction)CtlObj_as_Resource, 1,
         PyDoc_STR("() -> (Handle _rv)")},
        {"GetControlRect", (PyCFunction)CtlObj_GetControlRect, 1,
@@ -4530,16 +3847,6 @@ static PyMethodDef CtlObj_methods[] = {
         PyDoc_STR("(part, type) -> ResObj")},
        {"SetControlData_Callback", (PyCFunction)CtlObj_SetControlData_Callback, 1,
         PyDoc_STR("(callbackfunc) -> None")},
-
-#if !TARGET_API_MAC_CARBON
-       {"GetPopupData", (PyCFunction)CtlObj_GetPopupData, 1,
-        PyDoc_STR(NULL)},
-#endif
-
-#if !TARGET_API_MAC_CARBON
-       {"SetPopupData", (PyCFunction)CtlObj_SetPopupData, 1,
-        PyDoc_STR(NULL)},
-#endif
        {NULL, NULL, 0}
 };
 
@@ -4772,8 +4079,6 @@ static PyObject *Ctl_IdleControls(PyObject *_self, PyObject *_args)
        return _res;
 }
 
-#if TARGET_API_MAC_CARBON
-
 static PyObject *Ctl_GetControlByID(PyObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -4796,7 +4101,6 @@ static PyObject *Ctl_GetControlByID(PyObject *_self, PyObject *_args)
                             CtlObj_WhichControl, outControl);
        return _res;
 }
-#endif
 
 static PyObject *Ctl_DumpControlHierarchy(PyObject *_self, PyObject *_args)
 {
@@ -4957,8 +4261,6 @@ static PyObject *Ctl_ClearKeyboardFocus(PyObject *_self, PyObject *_args)
        return _res;
 }
 
-#if TARGET_API_MAC_CARBON
-
 static PyObject *Ctl_SetAutomaticControlDragTrackingEnabledForWindow(PyObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -4979,9 +4281,6 @@ static PyObject *Ctl_SetAutomaticControlDragTrackingEnabledForWindow(PyObject *_
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *Ctl_IsAutomaticControlDragTrackingEnabledForWindow(PyObject *_self, PyObject *_args)
 {
@@ -5002,9 +4301,6 @@ static PyObject *Ctl_IsAutomaticControlDragTrackingEnabledForWindow(PyObject *_s
                             tracks);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *Ctl_CreateBevelButtonControl(PyObject *_self, PyObject *_args)
 {
@@ -5049,9 +4345,6 @@ static PyObject *Ctl_CreateBevelButtonControl(PyObject *_self, PyObject *_args)
                             CtlObj_New, outControl);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *Ctl_CreateSliderControl(PyObject *_self, PyObject *_args)
 {
@@ -5098,9 +4391,6 @@ static PyObject *Ctl_CreateSliderControl(PyObject *_self, PyObject *_args)
        setcallback(_res, kMyControlActionProcTag, liveTrackingProc, &c_callback);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *Ctl_CreateDisclosureTriangleControl(PyObject *_self, PyObject *_args)
 {
@@ -5139,9 +4429,6 @@ static PyObject *Ctl_CreateDisclosureTriangleControl(PyObject *_self, PyObject *
                             CtlObj_New, outControl);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *Ctl_CreateProgressBarControl(PyObject *_self, PyObject *_args)
 {
@@ -5177,7 +4464,6 @@ static PyObject *Ctl_CreateProgressBarControl(PyObject *_self, PyObject *_args)
                             CtlObj_New, outControl);
        return _res;
 }
-#endif
 
 #if TARGET_API_MAC_OSX
 
@@ -5214,8 +4500,6 @@ static PyObject *Ctl_CreateRelevanceBarControl(PyObject *_self, PyObject *_args)
 }
 #endif
 
-#if TARGET_API_MAC_CARBON
-
 static PyObject *Ctl_CreateLittleArrowsControl(PyObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -5250,9 +4534,6 @@ static PyObject *Ctl_CreateLittleArrowsControl(PyObject *_self, PyObject *_args)
                             CtlObj_New, outControl);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *Ctl_CreateChasingArrowsControl(PyObject *_self, PyObject *_args)
 {
@@ -5276,9 +4557,6 @@ static PyObject *Ctl_CreateChasingArrowsControl(PyObject *_self, PyObject *_args
                             CtlObj_New, outControl);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *Ctl_CreateSeparatorControl(PyObject *_self, PyObject *_args)
 {
@@ -5302,9 +4580,6 @@ static PyObject *Ctl_CreateSeparatorControl(PyObject *_self, PyObject *_args)
                             CtlObj_New, outControl);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *Ctl_CreateGroupBoxControl(PyObject *_self, PyObject *_args)
 {
@@ -5334,9 +4609,6 @@ static PyObject *Ctl_CreateGroupBoxControl(PyObject *_self, PyObject *_args)
                             CtlObj_New, outControl);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *Ctl_CreateCheckGroupBoxControl(PyObject *_self, PyObject *_args)
 {
@@ -5372,9 +4644,6 @@ static PyObject *Ctl_CreateCheckGroupBoxControl(PyObject *_self, PyObject *_args
                             CtlObj_New, outControl);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *Ctl_CreatePopupGroupBoxControl(PyObject *_self, PyObject *_args)
 {
@@ -5419,9 +4688,6 @@ static PyObject *Ctl_CreatePopupGroupBoxControl(PyObject *_self, PyObject *_args
                             CtlObj_New, outControl);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *Ctl_CreateImageWellControl(PyObject *_self, PyObject *_args)
 {
@@ -5448,9 +4714,6 @@ static PyObject *Ctl_CreateImageWellControl(PyObject *_self, PyObject *_args)
                             CtlObj_New, outControl);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *Ctl_CreatePopupArrowControl(PyObject *_self, PyObject *_args)
 {
@@ -5480,9 +4743,6 @@ static PyObject *Ctl_CreatePopupArrowControl(PyObject *_self, PyObject *_args)
                             CtlObj_New, outControl);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *Ctl_CreatePlacardControl(PyObject *_self, PyObject *_args)
 {
@@ -5506,9 +4766,6 @@ static PyObject *Ctl_CreatePlacardControl(PyObject *_self, PyObject *_args)
                             CtlObj_New, outControl);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *Ctl_CreateClockControl(PyObject *_self, PyObject *_args)
 {
@@ -5538,9 +4795,6 @@ static PyObject *Ctl_CreateClockControl(PyObject *_self, PyObject *_args)
                             CtlObj_New, outControl);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *Ctl_CreateUserPaneControl(PyObject *_self, PyObject *_args)
 {
@@ -5567,9 +4821,6 @@ static PyObject *Ctl_CreateUserPaneControl(PyObject *_self, PyObject *_args)
                             CtlObj_New, outControl);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *Ctl_CreateEditTextControl(PyObject *_self, PyObject *_args)
 {
@@ -5605,9 +4856,6 @@ static PyObject *Ctl_CreateEditTextControl(PyObject *_self, PyObject *_args)
                             CtlObj_New, outControl);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *Ctl_CreateStaticTextControl(PyObject *_self, PyObject *_args)
 {
@@ -5637,9 +4885,6 @@ static PyObject *Ctl_CreateStaticTextControl(PyObject *_self, PyObject *_args)
                             CtlObj_New, outControl);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *Ctl_CreatePictureControl(PyObject *_self, PyObject *_args)
 {
@@ -5669,9 +4914,6 @@ static PyObject *Ctl_CreatePictureControl(PyObject *_self, PyObject *_args)
                             CtlObj_New, outControl);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *Ctl_CreateIconControl(PyObject *_self, PyObject *_args)
 {
@@ -5701,9 +4943,6 @@ static PyObject *Ctl_CreateIconControl(PyObject *_self, PyObject *_args)
                             CtlObj_New, outControl);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *Ctl_CreateWindowHeaderControl(PyObject *_self, PyObject *_args)
 {
@@ -5730,9 +4969,6 @@ static PyObject *Ctl_CreateWindowHeaderControl(PyObject *_self, PyObject *_args)
                             CtlObj_New, outControl);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *Ctl_CreatePushButtonControl(PyObject *_self, PyObject *_args)
 {
@@ -5759,9 +4995,6 @@ static PyObject *Ctl_CreatePushButtonControl(PyObject *_self, PyObject *_args)
                             CtlObj_New, outControl);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *Ctl_CreatePushButtonWithIconControl(PyObject *_self, PyObject *_args)
 {
@@ -5794,9 +5027,6 @@ static PyObject *Ctl_CreatePushButtonWithIconControl(PyObject *_self, PyObject *
                             CtlObj_New, outControl);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *Ctl_CreateRadioButtonControl(PyObject *_self, PyObject *_args)
 {
@@ -5829,9 +5059,6 @@ static PyObject *Ctl_CreateRadioButtonControl(PyObject *_self, PyObject *_args)
                             CtlObj_New, outControl);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *Ctl_CreateCheckBoxControl(PyObject *_self, PyObject *_args)
 {
@@ -5864,9 +5091,6 @@ static PyObject *Ctl_CreateCheckBoxControl(PyObject *_self, PyObject *_args)
                             CtlObj_New, outControl);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *Ctl_CreateScrollBarControl(PyObject *_self, PyObject *_args)
 {
@@ -5910,9 +5134,6 @@ static PyObject *Ctl_CreateScrollBarControl(PyObject *_self, PyObject *_args)
        setcallback(_res, kMyControlActionProcTag, liveTrackingProc, &c_callback);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *Ctl_CreatePopupButtonControl(PyObject *_self, PyObject *_args)
 {
@@ -5954,9 +5175,6 @@ static PyObject *Ctl_CreatePopupButtonControl(PyObject *_self, PyObject *_args)
                             CtlObj_New, outControl);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *Ctl_CreateRadioGroupControl(PyObject *_self, PyObject *_args)
 {
@@ -5980,9 +5198,6 @@ static PyObject *Ctl_CreateRadioGroupControl(PyObject *_self, PyObject *_args)
                             CtlObj_New, outControl);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *Ctl_CreateScrollingTextBoxControl(PyObject *_self, PyObject *_args)
 {
@@ -6021,7 +5236,6 @@ static PyObject *Ctl_CreateScrollingTextBoxControl(PyObject *_self, PyObject *_a
                             CtlObj_New, outControl);
        return _res;
 }
-#endif
 
 #if TARGET_API_MAC_OSX
 
@@ -6087,8 +5301,6 @@ static PyObject *Ctl_CreateRoundButtonControl(PyObject *_self, PyObject *_args)
 }
 #endif
 
-#if TARGET_API_MAC_CARBON
-
 static PyObject *Ctl_CreateDataBrowserControl(PyObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -6114,7 +5326,6 @@ static PyObject *Ctl_CreateDataBrowserControl(PyObject *_self, PyObject *_args)
                             CtlObj_New, outControl);
        return _res;
 }
-#endif
 
 #if TARGET_API_MAC_OSX
 
@@ -6191,8 +5402,6 @@ static PyObject *Ctl_as_Control(PyObject *_self, PyObject *_args)
        return _res;
 }
 
-#if TARGET_API_MAC_CARBON
-
 static PyObject *Ctl_CreateTabsControl(PyObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -6250,7 +5459,6 @@ static PyObject *Ctl_CreateTabsControl(PyObject *_self, PyObject *_args)
                             CtlObj_New, outControl);
        return _res;
 }
-#endif
 
 static PyMethodDef Ctl_methods[] = {
        {"NewControl", (PyCFunction)Ctl_NewControl, 1,
@@ -6265,11 +5473,8 @@ static PyMethodDef Ctl_methods[] = {
         PyDoc_STR("(Point testPoint, WindowPtr theWindow) -> (ControlPartCode _rv, ControlHandle theControl)")},
        {"IdleControls", (PyCFunction)Ctl_IdleControls, 1,
         PyDoc_STR("(WindowPtr inWindow) -> None")},
-
-#if TARGET_API_MAC_CARBON
        {"GetControlByID", (PyCFunction)Ctl_GetControlByID, 1,
         PyDoc_STR("(WindowPtr inWindow, ControlID inID) -> (ControlHandle outControl)")},
-#endif
        {"DumpControlHierarchy", (PyCFunction)Ctl_DumpControlHierarchy, 1,
         PyDoc_STR("(WindowPtr inWindow, FSSpec inDumpFile) -> None")},
        {"CreateRootControl", (PyCFunction)Ctl_CreateRootControl, 1,
@@ -6286,161 +5491,71 @@ static PyMethodDef Ctl_methods[] = {
         PyDoc_STR("(WindowPtr inWindow) -> None")},
        {"ClearKeyboardFocus", (PyCFunction)Ctl_ClearKeyboardFocus, 1,
         PyDoc_STR("(WindowPtr inWindow) -> None")},
-
-#if TARGET_API_MAC_CARBON
        {"SetAutomaticControlDragTrackingEnabledForWindow", (PyCFunction)Ctl_SetAutomaticControlDragTrackingEnabledForWindow, 1,
         PyDoc_STR("(WindowPtr theWindow, Boolean tracks) -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"IsAutomaticControlDragTrackingEnabledForWindow", (PyCFunction)Ctl_IsAutomaticControlDragTrackingEnabledForWindow, 1,
         PyDoc_STR("(WindowPtr theWindow) -> (Boolean tracks)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"CreateBevelButtonControl", (PyCFunction)Ctl_CreateBevelButtonControl, 1,
         PyDoc_STR("(WindowPtr window, Rect boundsRect, CFStringRef title, UInt16 thickness, UInt16 behavior, ControlButtonContentInfo info, SInt16 menuID, UInt16 menuBehavior, UInt16 menuPlacement) -> (ControlHandle outControl)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"CreateSliderControl", (PyCFunction)Ctl_CreateSliderControl, 1,
         PyDoc_STR("(WindowPtr window, Rect boundsRect, SInt32 value, SInt32 minimum, SInt32 maximum, UInt16 orientation, UInt16 numTickMarks, Boolean liveTracking, PyObject* liveTrackingProc) -> (ControlHandle outControl)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"CreateDisclosureTriangleControl", (PyCFunction)Ctl_CreateDisclosureTriangleControl, 1,
         PyDoc_STR("(WindowPtr window, Rect boundsRect, UInt16 orientation, CFStringRef title, SInt32 initialValue, Boolean drawTitle, Boolean autoToggles) -> (ControlHandle outControl)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"CreateProgressBarControl", (PyCFunction)Ctl_CreateProgressBarControl, 1,
         PyDoc_STR("(WindowPtr window, Rect boundsRect, SInt32 value, SInt32 minimum, SInt32 maximum, Boolean indeterminate) -> (ControlHandle outControl)")},
-#endif
 
 #if TARGET_API_MAC_OSX
        {"CreateRelevanceBarControl", (PyCFunction)Ctl_CreateRelevanceBarControl, 1,
         PyDoc_STR("(WindowPtr window, Rect boundsRect, SInt32 value, SInt32 minimum, SInt32 maximum) -> (ControlHandle outControl)")},
 #endif
-
-#if TARGET_API_MAC_CARBON
        {"CreateLittleArrowsControl", (PyCFunction)Ctl_CreateLittleArrowsControl, 1,
         PyDoc_STR("(WindowPtr window, Rect boundsRect, SInt32 value, SInt32 minimum, SInt32 maximum, SInt32 increment) -> (ControlHandle outControl)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"CreateChasingArrowsControl", (PyCFunction)Ctl_CreateChasingArrowsControl, 1,
         PyDoc_STR("(WindowPtr window, Rect boundsRect) -> (ControlHandle outControl)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"CreateSeparatorControl", (PyCFunction)Ctl_CreateSeparatorControl, 1,
         PyDoc_STR("(WindowPtr window, Rect boundsRect) -> (ControlHandle outControl)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"CreateGroupBoxControl", (PyCFunction)Ctl_CreateGroupBoxControl, 1,
         PyDoc_STR("(WindowPtr window, Rect boundsRect, CFStringRef title, Boolean primary) -> (ControlHandle outControl)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"CreateCheckGroupBoxControl", (PyCFunction)Ctl_CreateCheckGroupBoxControl, 1,
         PyDoc_STR("(WindowPtr window, Rect boundsRect, CFStringRef title, SInt32 initialValue, Boolean primary, Boolean autoToggle) -> (ControlHandle outControl)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"CreatePopupGroupBoxControl", (PyCFunction)Ctl_CreatePopupGroupBoxControl, 1,
         PyDoc_STR("(WindowPtr window, Rect boundsRect, CFStringRef title, Boolean primary, SInt16 menuID, Boolean variableWidth, SInt16 titleWidth, SInt16 titleJustification, Style titleStyle) -> (ControlHandle outControl)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"CreateImageWellControl", (PyCFunction)Ctl_CreateImageWellControl, 1,
         PyDoc_STR("(WindowPtr window, Rect boundsRect, ControlButtonContentInfo info) -> (ControlHandle outControl)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"CreatePopupArrowControl", (PyCFunction)Ctl_CreatePopupArrowControl, 1,
         PyDoc_STR("(WindowPtr window, Rect boundsRect, UInt16 orientation, UInt16 size) -> (ControlHandle outControl)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"CreatePlacardControl", (PyCFunction)Ctl_CreatePlacardControl, 1,
         PyDoc_STR("(WindowPtr window, Rect boundsRect) -> (ControlHandle outControl)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"CreateClockControl", (PyCFunction)Ctl_CreateClockControl, 1,
         PyDoc_STR("(WindowPtr window, Rect boundsRect, UInt16 clockType, UInt32 clockFlags) -> (ControlHandle outControl)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"CreateUserPaneControl", (PyCFunction)Ctl_CreateUserPaneControl, 1,
         PyDoc_STR("(WindowPtr window, Rect boundsRect, UInt32 features) -> (ControlHandle outControl)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"CreateEditTextControl", (PyCFunction)Ctl_CreateEditTextControl, 1,
         PyDoc_STR("(WindowPtr window, Rect boundsRect, CFStringRef text, Boolean isPassword, Boolean useInlineInput, ControlFontStyleRec style) -> (ControlHandle outControl)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"CreateStaticTextControl", (PyCFunction)Ctl_CreateStaticTextControl, 1,
         PyDoc_STR("(WindowPtr window, Rect boundsRect, CFStringRef text, ControlFontStyleRec style) -> (ControlHandle outControl)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"CreatePictureControl", (PyCFunction)Ctl_CreatePictureControl, 1,
         PyDoc_STR("(WindowPtr window, Rect boundsRect, ControlButtonContentInfo content, Boolean dontTrack) -> (ControlHandle outControl)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"CreateIconControl", (PyCFunction)Ctl_CreateIconControl, 1,
         PyDoc_STR("(WindowPtr window, Rect boundsRect, ControlButtonContentInfo icon, Boolean dontTrack) -> (ControlHandle outControl)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"CreateWindowHeaderControl", (PyCFunction)Ctl_CreateWindowHeaderControl, 1,
         PyDoc_STR("(WindowPtr window, Rect boundsRect, Boolean isListHeader) -> (ControlHandle outControl)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"CreatePushButtonControl", (PyCFunction)Ctl_CreatePushButtonControl, 1,
         PyDoc_STR("(WindowPtr window, Rect boundsRect, CFStringRef title) -> (ControlHandle outControl)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"CreatePushButtonWithIconControl", (PyCFunction)Ctl_CreatePushButtonWithIconControl, 1,
         PyDoc_STR("(WindowPtr window, Rect boundsRect, CFStringRef title, ControlButtonContentInfo icon, UInt16 iconAlignment) -> (ControlHandle outControl)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"CreateRadioButtonControl", (PyCFunction)Ctl_CreateRadioButtonControl, 1,
         PyDoc_STR("(WindowPtr window, Rect boundsRect, CFStringRef title, SInt32 initialValue, Boolean autoToggle) -> (ControlHandle outControl)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"CreateCheckBoxControl", (PyCFunction)Ctl_CreateCheckBoxControl, 1,
         PyDoc_STR("(WindowPtr window, Rect boundsRect, CFStringRef title, SInt32 initialValue, Boolean autoToggle) -> (ControlHandle outControl)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"CreateScrollBarControl", (PyCFunction)Ctl_CreateScrollBarControl, 1,
         PyDoc_STR("(WindowPtr window, Rect boundsRect, SInt32 value, SInt32 minimum, SInt32 maximum, SInt32 viewSize, Boolean liveTracking, PyObject* liveTrackingProc) -> (ControlHandle outControl)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"CreatePopupButtonControl", (PyCFunction)Ctl_CreatePopupButtonControl, 1,
         PyDoc_STR("(WindowPtr window, Rect boundsRect, CFStringRef title, SInt16 menuID, Boolean variableWidth, SInt16 titleWidth, SInt16 titleJustification, Style titleStyle) -> (ControlHandle outControl)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"CreateRadioGroupControl", (PyCFunction)Ctl_CreateRadioGroupControl, 1,
         PyDoc_STR("(WindowPtr window, Rect boundsRect) -> (ControlHandle outControl)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"CreateScrollingTextBoxControl", (PyCFunction)Ctl_CreateScrollingTextBoxControl, 1,
         PyDoc_STR("(WindowPtr window, Rect boundsRect, SInt16 contentResID, Boolean autoScroll, UInt32 delayBeforeAutoScroll, UInt32 delayBetweenAutoScroll, UInt16 autoScrollAmount) -> (ControlHandle outControl)")},
-#endif
 
 #if TARGET_API_MAC_OSX
        {"CreateDisclosureButtonControl", (PyCFunction)Ctl_CreateDisclosureButtonControl, 1,
@@ -6451,11 +5566,8 @@ static PyMethodDef Ctl_methods[] = {
        {"CreateRoundButtonControl", (PyCFunction)Ctl_CreateRoundButtonControl, 1,
         PyDoc_STR("(WindowPtr inWindow, Rect inBoundsRect, SInt16 inSize, ControlButtonContentInfo inContent) -> (ControlHandle outControl)")},
 #endif
-
-#if TARGET_API_MAC_CARBON
        {"CreateDataBrowserControl", (PyCFunction)Ctl_CreateDataBrowserControl, 1,
         PyDoc_STR("(WindowPtr window, Rect boundsRect, OSType style) -> (ControlHandle outControl)")},
-#endif
 
 #if TARGET_API_MAC_OSX
        {"CreateEditUnicodeTextControl", (PyCFunction)Ctl_CreateEditUnicodeTextControl, 1,
@@ -6465,11 +5577,8 @@ static PyMethodDef Ctl_methods[] = {
         PyDoc_STR("(Point inWhere, WindowPtr inWindow) -> (ControlHandle _rv, SInt16 outPart)")},
        {"as_Control", (PyCFunction)Ctl_as_Control, 1,
         PyDoc_STR("(Handle h) -> (ControlHandle _rv)")},
-
-#if TARGET_API_MAC_CARBON
        {"CreateTabsControl", (PyCFunction)Ctl_CreateTabsControl, 1,
         PyDoc_STR("(WindowPtr window, Rect boundsRect, UInt16 size, UInt16 direction, ControlTabEntry tabArray) -> (ControlHandle outControl)")},
-#endif
        {NULL, NULL, 0}
 };
 
index eb6d789025dd7900089eac2e241e8a8a4f963bb6..f7bd888761af0bebe6cab09c240cca3e4971d016 100644 (file)
@@ -94,160 +94,13 @@ class MyScanner(Scanner):
                        # too lazy for now
                        'GetImageWellContentInfo',
                        'GetBevelButtonContentInfo',
+                       # OS8 only
+                       'GetAuxiliaryControlRecord',
+                       'SetControlColor',
                        ]
 
        def makegreylist(self):
                return [
-                       ('#if !TARGET_API_MAC_CARBON', [
-                               'GetAuxiliaryControlRecord',
-                               'SetControlColor',
-                               # These have suddenly disappeared in UH 3.3.2...
-##                             'GetBevelButtonMenuValue',
-##                             'SetBevelButtonMenuValue',
-##                             'GetBevelButtonMenuHandle',
-##                             'SetBevelButtonTransform',
-##                             'SetImageWellTransform',
-##                             'GetTabContentRect',
-##                             'SetTabEnabled',
-##                             'SetDisclosureTriangleLastValue',
-                       ]),
-                       ('#if TARGET_API_MAC_CARBON', [
-                               'IsAutomaticControlDragTrackingEnabledForWindow',
-                               'SetAutomaticControlDragTrackingEnabledForWindow',
-                               'HandleControlDragReceive',
-                               'HandleControlDragTracking',
-                               'GetControlByID',
-                               'IsControlDragTrackingEnabled',
-                               'SetControlDragTrackingEnabled',
-                               'GetControlPropertyAttributes',
-                               'ChangeControlPropertyAttributes',
-                               'GetControlID',
-                               'SetControlID',
-                               'HandleControlSetCursor',
-                               'GetControlClickActivation',
-                               'HandleControlContextualMenuClick',
-                               
-                               "CreateScrollBarControl",
-                               "CreateSliderControl",
-                               "CreateBevelButtonControl",
-                               "CreateImageWellControl",
-                               "CreatePictureControl",
-                               "CreateIconControl",
-                               "CreatePushButtonWithIconControl",
-                               "SetBevelButtonContentInfo",
-                               "SetImageWellContentInfo",
-                               "AddDataBrowserListViewColumn",
-                               
-                               "CreateDataBrowserControl",
-                               "CreateScrollingTextBoxControl",
-                               "CreateRadioGroupControl",
-                               "CreatePopupButtonControl",
-                               "CreateCheckBoxControl",
-                               "CreateRadioButtonControl",
-                               "CreatePushButtonControl",
-                               "CreateWindowHeaderControl",
-                               "CreateStaticTextControl",
-                               "CreateEditTextControl",
-                               "CreateUserPaneControl",
-                               "CreateClockControl",
-                               "CreatePlacardControl",
-                               "CreatePopupArrowControl",
-                               "CreatePopupGroupBoxControl",
-                               "CreateCheckGroupBoxControl",
-                               "CreateGroupBoxControl",
-                               "CreateSeparatorControl",
-                               "CreateChasingArrowsControl",
-                               "CreateLittleArrowsControl",
-                               "CreateProgressBarControl",
-                               "CreateDisclosureTriangleControl",
-                               "GetDataBrowserColumnViewDisplayType",
-                               "SetDataBrowserColumnViewDisplayType",
-                               "GetDataBrowserColumnViewPathLength",
-                               "GetDataBrowserColumnViewPath",
-                               "GetDataBrowserListViewDisclosureColumn",
-                               "SetDataBrowserListViewDisclosureColumn",
-                               "GetDataBrowserListViewUsePlainBackground",
-                               "SetDataBrowserListViewUsePlainBackground",
-                               "GetDataBrowserListViewHeaderBtnHeight",
-                               "SetDataBrowserListViewHeaderBtnHeight",
-                               "AutoSizeDataBrowserListViewColumns",
-                               "GetDataBrowserTableViewColumnProperty",
-                               "GetDataBrowserTableViewColumnPosition",
-                               "SetDataBrowserTableViewColumnPosition",
-                               "GetDataBrowserTableViewItemRow",
-                               "SetDataBrowserTableViewItemRow",
-                               "GetDataBrowserTableViewItemID",
-                               "GetDataBrowserTableViewGeometry",
-                               "SetDataBrowserTableViewGeometry",
-                               "GetDataBrowserTableViewNamedColumnWidth",
-                               "SetDataBrowserTableViewNamedColumnWidth",
-                               "GetDataBrowserTableViewItemRowHeight",
-                               "SetDataBrowserTableViewItemRowHeight",
-                               "GetDataBrowserTableViewColumnWidth",
-                               "SetDataBrowserTableViewColumnWidth",
-                               "GetDataBrowserTableViewRowHeight",
-                               "SetDataBrowserTableViewRowHeight",
-                               "GetDataBrowserTableViewHiliteStyle",
-                               "SetDataBrowserTableViewHiliteStyle",
-                               "GetDataBrowserTableViewColumnCount",
-                               "RemoveDataBrowserTableViewColumn",
-                               "GetDataBrowserItemPartBounds",
-                               "GetDataBrowserEditItem",
-                               "SetDataBrowserEditItem",
-                               "GetDataBrowserEditText",
-                               "SetDataBrowserEditText",
-                               "GetDataBrowserPropertyFlags",
-                               "SetDataBrowserPropertyFlags",
-                               "GetDataBrowserSelectionFlags",
-                               "SetDataBrowserSelectionFlags",
-                               "GetDataBrowserSortProperty",
-                               "SetDataBrowserSortProperty",
-                               "GetDataBrowserHasScrollBars",
-                               "SetDataBrowserHasScrollBars",
-                               "GetDataBrowserScrollPosition",
-                               "SetDataBrowserScrollPosition",
-                               "GetDataBrowserSortOrder",
-                               "SetDataBrowserSortOrder",
-                               "GetDataBrowserTarget",
-                               "SetDataBrowserTarget",
-                               "GetDataBrowserScrollBarInset",
-                               "SetDataBrowserScrollBarInset",
-                               "GetDataBrowserActiveItems",
-                               "SetDataBrowserActiveItems",
-                               "RevealDataBrowserItem",
-                               "GetDataBrowserItemState",
-                               "IsDataBrowserItemSelected",
-                               "GetDataBrowserItemCount",
-                               "GetDataBrowserItems",
-                               "SortDataBrowserContainer",
-                               "CloseDataBrowserContainer",
-                               "OpenDataBrowserContainer",
-                               "MoveDataBrowserSelectionAnchor",
-                               "GetDataBrowserSelectionAnchor",
-                               "ExecuteDataBrowserEditCommand",
-                               "EnableDataBrowserEditCommand",
-                               "SetDataBrowserViewStyle",
-                               "GetDataBrowserViewStyle",
-                               "GetControlCommandID",
-                               "SetControlCommandID",
-                               "CopyControlTitleAsCFString",
-                               "SetControlTitleWithCFString",
-                       ]),
-                       ('#if ACCESSOR_CALLS_ARE_FUNCTIONS', [
-                               # XXX These are silly, they should be #defined to access the fields
-                               # directly. Later...
-                               'GetControlBounds',
-                               'IsControlHilited',
-                               'GetControlHilite',
-                               'GetControlOwner',
-                               'GetControlDataHandle',
-                               'GetControlPopupMenuHandle',
-                               'GetControlPopupMenuID',
-                               'SetControlDataHandle',
-                               'SetControlBounds',
-                               'SetControlPopupMenuHandle',
-                               'SetControlPopupMenuID',
-                       ]),
                        ('#if TARGET_API_MAC_OSX', [
                                'CreateRoundButtonControl',
                                'CreateDisclosureButtonControl',
index 2fa575773f2f45964519d15957ce87c245cdce51..2fc51cfd9a01d6fd4f154ed0cd0f54359ac506a7 100644 (file)
@@ -132,11 +132,7 @@ static PyObject *CtlObj_WhichControl(ControlHandle);
 
 #define as_Control(h) ((ControlHandle)h)
 #define as_Resource(ctl) ((Handle)ctl)
-#if TARGET_API_MAC_CARBON
 #define GetControlRect(ctl, rectp) GetControlBounds(ctl, rectp)
-#else
-#define GetControlRect(ctl, rectp) (*(rectp) = ((*(ctl))->contrlRect))
-#endif
 
 #define MAXTABS 32  /* maximum number of tabs that we support in a tabs control */
 /*
@@ -769,42 +765,6 @@ f = ManualGenerator("SetControlData_Callback", setcontroldata_callback_body);
 f.docstring = lambda: "(callbackfunc) -> None"
 object.add(f)
 
-# And manual generators to get/set popup menu information
-getpopupdata_body = """
-PopupPrivateDataHandle hdl;
-
-if ( (*_self->ob_itself)->contrlData == NULL ) {
-       PyErr_SetString(Ctl_Error, "No contrlData handle in control");
-       return 0;
-}
-hdl = (PopupPrivateDataHandle)(*_self->ob_itself)->contrlData;
-HLock((Handle)hdl);
-_res = Py_BuildValue("O&i", MenuObj_New, (*hdl)->mHandle, (int)(*hdl)->mID);
-HUnlock((Handle)hdl);
-return _res;
-"""
-f = ManualGenerator("GetPopupData", getpopupdata_body, condition="#if !TARGET_API_MAC_CARBON")
-object.add(f)
-
-setpopupdata_body = """
-PopupPrivateDataHandle hdl;
-MenuHandle mHandle;
-short mID;
-
-if (!PyArg_ParseTuple(_args, "O&h", MenuObj_Convert, &mHandle, &mID) )
-       return 0;
-if ( (*_self->ob_itself)->contrlData == NULL ) {
-       PyErr_SetString(Ctl_Error, "No contrlData handle in control");
-       return 0;
-}
-hdl = (PopupPrivateDataHandle)(*_self->ob_itself)->contrlData;
-(*hdl)->mHandle = mHandle;
-(*hdl)->mID = mID;
-Py_INCREF(Py_None);
-return Py_None;
-"""
-f = ManualGenerator("SetPopupData", setpopupdata_body, condition="#if !TARGET_API_MAC_CARBON")
-object.add(f)
 
 
 createtabscontrol_body = """\
@@ -862,7 +822,7 @@ _res = Py_BuildValue("O&",
                      CtlObj_New, outControl);
 return _res;"""
 
-f = ManualGenerator("CreateTabsControl", createtabscontrol_body, condition="#if TARGET_API_MAC_CARBON")
+f = ManualGenerator("CreateTabsControl", createtabscontrol_body)
 f.docstring = lambda: "(WindowPtr window, Rect boundsRect, UInt16 size, UInt16 direction, ControlTabEntry tabArray) -> (ControlHandle outControl)"
 module.add(f)
 
index 1a52c168851c783e9b7e5c5dfaffae8c34b609fc..70db0f882488404601ec97ce31e6958717b535ff 100644 (file)
@@ -447,8 +447,6 @@ static PyObject *DlgObj_ShortenDITL(DialogObject *_self, PyObject *_args)
        return _res;
 }
 
-#if TARGET_API_MAC_CARBON
-
 static PyObject *DlgObj_InsertDialogItem(DialogObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -476,9 +474,6 @@ static PyObject *DlgObj_InsertDialogItem(DialogObject *_self, PyObject *_args)
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *DlgObj_RemoveDialogItems(DialogObject *_self, PyObject *_args)
 {
@@ -504,7 +499,6 @@ static PyObject *DlgObj_RemoveDialogItems(DialogObject *_self, PyObject *_args)
        _res = Py_None;
        return _res;
 }
-#endif
 
 static PyObject *DlgObj_StdFilterProc(DialogObject *_self, PyObject *_args)
 {
@@ -911,16 +905,10 @@ static PyMethodDef DlgObj_methods[] = {
         PyDoc_STR("() -> (DialogItemIndex _rv)")},
        {"ShortenDITL", (PyCFunction)DlgObj_ShortenDITL, 1,
         PyDoc_STR("(DialogItemIndex numberItems) -> None")},
-
-#if TARGET_API_MAC_CARBON
        {"InsertDialogItem", (PyCFunction)DlgObj_InsertDialogItem, 1,
         PyDoc_STR("(DialogItemIndex afterItem, DialogItemType itemType, Handle itemHandle, Rect box) -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"RemoveDialogItems", (PyCFunction)DlgObj_RemoveDialogItems, 1,
         PyDoc_STR("(DialogItemIndex itemNo, DialogItemIndex amountToRemove, Boolean disposeItemData) -> None")},
-#endif
        {"StdFilterProc", (PyCFunction)DlgObj_StdFilterProc, 1,
         PyDoc_STR("() -> (Boolean _rv, EventRecord event, DialogItemIndex itemHit)")},
        {"SetDialogDefaultItem", (PyCFunction)DlgObj_SetDialogDefaultItem, 1,
@@ -1390,8 +1378,6 @@ static PyObject *Dlg_ResetAlertStage(PyObject *_self, PyObject *_args)
        return _res;
 }
 
-#if TARGET_API_MAC_CARBON
-
 static PyObject *Dlg_GetParamText(PyObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -1416,7 +1402,6 @@ static PyObject *Dlg_GetParamText(PyObject *_self, PyObject *_args)
        _res = Py_None;
        return _res;
 }
-#endif
 
 static PyObject *Dlg_NewFeaturesDialog(PyObject *_self, PyObject *_args)
 {
@@ -1539,11 +1524,8 @@ static PyMethodDef Dlg_methods[] = {
         PyDoc_STR("(SInt16 fontNum) -> None")},
        {"ResetAlertStage", (PyCFunction)Dlg_ResetAlertStage, 1,
         PyDoc_STR("() -> None")},
-
-#if TARGET_API_MAC_CARBON
        {"GetParamText", (PyCFunction)Dlg_GetParamText, 1,
         PyDoc_STR("(Str255 param0, Str255 param1, Str255 param2, Str255 param3) -> None")},
-#endif
        {"NewFeaturesDialog", (PyCFunction)Dlg_NewFeaturesDialog, 1,
         PyDoc_STR("(Rect inBoundsRect, Str255 inTitle, Boolean inIsVisible, SInt16 inProcID, WindowPtr inBehind, Boolean inGoAwayFlag, SInt32 inRefCon, Handle inItemListHandle, UInt32 inFlags) -> (DialogPtr _rv)")},
        {"GetDialogFromWindow", (PyCFunction)Dlg_GetDialogFromWindow, 1,
index 770d4d21892141e519f55f112e2cb1f6b6c2c879..9567419359998b331371fe387f9fa706fd719922 100644 (file)
@@ -60,16 +60,6 @@ class MyScanner(Scanner):
                        'RunStandardAlert',
                        ]
 
-       def makegreylist(self):
-               return [
-                       ('#if TARGET_API_MAC_CARBON', [
-                               'InsertDialogItem',
-                               'RemoveDialogItems',
-                               'GetParamText',
-                               'CloseStandardSheet',
-                               'RunStandardAlert',
-                       ])]
-                       
        def makeblacklisttypes(self):
                return [
                        "AlertStdAlertParamPtr",        # Too much work, for now
index ff754033ff828e06b30043668ca91fe8e523ee2c..48c878d1ac19ac06d3ec6c554d8dacd0cffe48cb 100644 (file)
@@ -211,52 +211,6 @@ static PyObject *Evt_PostEvent(PyObject *_self, PyObject *_args)
        return _res;
 }
 
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *Evt_OSEventAvail(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       EventMask mask;
-       EventRecord theEvent;
-#ifndef OSEventAvail
-       PyMac_PRECHECK(OSEventAvail);
-#endif
-       if (!PyArg_ParseTuple(_args, "H",
-                             &mask))
-               return NULL;
-       _rv = OSEventAvail(mask,
-                          &theEvent);
-       _res = Py_BuildValue("bO&",
-                            _rv,
-                            PyMac_BuildEventRecord, &theEvent);
-       return _res;
-}
-#endif
-
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *Evt_GetOSEvent(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       EventMask mask;
-       EventRecord theEvent;
-#ifndef GetOSEvent
-       PyMac_PRECHECK(GetOSEvent);
-#endif
-       if (!PyArg_ParseTuple(_args, "H",
-                             &mask))
-               return NULL;
-       _rv = GetOSEvent(mask,
-                        &theEvent);
-       _res = Py_BuildValue("bO&",
-                            _rv,
-                            PyMac_BuildEventRecord, &theEvent);
-       return _res;
-}
-#endif
-
 static PyObject *Evt_FlushEvents(PyObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -276,67 +230,6 @@ static PyObject *Evt_FlushEvents(PyObject *_self, PyObject *_args)
        return _res;
 }
 
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *Evt_SystemClick(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       EventRecord theEvent;
-       WindowPtr theWindow;
-#ifndef SystemClick
-       PyMac_PRECHECK(SystemClick);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             PyMac_GetEventRecord, &theEvent,
-                             WinObj_Convert, &theWindow))
-               return NULL;
-       SystemClick(&theEvent,
-                   theWindow);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-#endif
-
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *Evt_SystemTask(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef SystemTask
-       PyMac_PRECHECK(SystemTask);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       SystemTask();
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-#endif
-
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *Evt_SystemEvent(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       EventRecord theEvent;
-#ifndef SystemEvent
-       PyMac_PRECHECK(SystemEvent);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetEventRecord, &theEvent))
-               return NULL;
-       _rv = SystemEvent(&theEvent);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-#endif
-
-#if TARGET_API_MAC_CARBON
-
 static PyObject *Evt_GetGlobalMouse(PyObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -351,9 +244,6 @@ static PyObject *Evt_GetGlobalMouse(PyObject *_self, PyObject *_args)
                             PyMac_BuildPoint, globalMouse);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *Evt_GetCurrentKeyModifiers(PyObject *_self, PyObject *_args)
 {
@@ -369,9 +259,6 @@ static PyObject *Evt_GetCurrentKeyModifiers(PyObject *_self, PyObject *_args)
                             _rv);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *Evt_CheckEventQueueForUserCancel(PyObject *_self, PyObject *_args)
 {
@@ -387,7 +274,6 @@ static PyObject *Evt_CheckEventQueueForUserCancel(PyObject *_self, PyObject *_ar
                             _rv);
        return _res;
 }
-#endif
 
 static PyObject *Evt_KeyScript(PyObject *_self, PyObject *_args)
 {
@@ -613,48 +499,14 @@ static PyMethodDef Evt_methods[] = {
         PyDoc_STR("(EventMask eventMask) -> (Boolean _rv, EventRecord theEvent)")},
        {"PostEvent", (PyCFunction)Evt_PostEvent, 1,
         PyDoc_STR("(EventKind eventNum, UInt32 eventMsg) -> None")},
-
-#if !TARGET_API_MAC_CARBON
-       {"OSEventAvail", (PyCFunction)Evt_OSEventAvail, 1,
-        PyDoc_STR("(EventMask mask) -> (Boolean _rv, EventRecord theEvent)")},
-#endif
-
-#if !TARGET_API_MAC_CARBON
-       {"GetOSEvent", (PyCFunction)Evt_GetOSEvent, 1,
-        PyDoc_STR("(EventMask mask) -> (Boolean _rv, EventRecord theEvent)")},
-#endif
        {"FlushEvents", (PyCFunction)Evt_FlushEvents, 1,
         PyDoc_STR("(EventMask whichMask, EventMask stopMask) -> None")},
-
-#if !TARGET_API_MAC_CARBON
-       {"SystemClick", (PyCFunction)Evt_SystemClick, 1,
-        PyDoc_STR("(EventRecord theEvent, WindowPtr theWindow) -> None")},
-#endif
-
-#if !TARGET_API_MAC_CARBON
-       {"SystemTask", (PyCFunction)Evt_SystemTask, 1,
-        PyDoc_STR("() -> None")},
-#endif
-
-#if !TARGET_API_MAC_CARBON
-       {"SystemEvent", (PyCFunction)Evt_SystemEvent, 1,
-        PyDoc_STR("(EventRecord theEvent) -> (Boolean _rv)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"GetGlobalMouse", (PyCFunction)Evt_GetGlobalMouse, 1,
         PyDoc_STR("() -> (Point globalMouse)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"GetCurrentKeyModifiers", (PyCFunction)Evt_GetCurrentKeyModifiers, 1,
         PyDoc_STR("() -> (UInt32 _rv)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"CheckEventQueueForUserCancel", (PyCFunction)Evt_CheckEventQueueForUserCancel, 1,
         PyDoc_STR("() -> (Boolean _rv)")},
-#endif
        {"KeyScript", (PyCFunction)Evt_KeyScript, 1,
         PyDoc_STR("(short code) -> None")},
        {"IsCmdChar", (PyCFunction)Evt_IsCmdChar, 1,
index 0c0ff4948fbb65b9bd89dab86ba11434d3f5dafa..e5762d932847dfba2f4d32c0fc4124b4b29352d7 100644 (file)
@@ -36,21 +36,6 @@ class MyScanner(Scanner):
                                listname = "methods"
                return classname, listname
 
-       def makegreylist(self):
-               return [
-                       ('#if !TARGET_API_MAC_CARBON', [
-                               'SystemEvent',
-                               'SystemTask',
-                               'SystemClick',
-                               'GetOSEvent',
-                               'OSEventAvail',
-                       ]),
-                       ('#if TARGET_API_MAC_CARBON', [
-                               'CheckEventQueueForUserCancel',
-                               'GetCurrentKeyModifiers',
-                               'GetGlobalMouse',
-                       ])]
-
        def makeblacklistnames(self):
                return [
                        "KeyTranslate",
@@ -58,6 +43,12 @@ class MyScanner(Scanner):
                        "WaitNextEvent",        # Manually generated because of optional region
                        # Constants with funny definitions
                        "osEvtMessageMask",
+                       # OS8 calls
+                       'SystemEvent',
+                       'SystemTask',
+                       'SystemClick',
+                       'GetOSEvent',
+                       'OSEventAvail',
                        ]
 
        def makeblacklisttypes(self):
index 245dcb07a878f5be192e4cca234a9d24953bb2bf..095fe3a42e1104a83fd97e7fcfe6baa42464378d 100644 (file)
@@ -59,23 +59,6 @@ FMRec_Convert(PyObject *v, FMetricRec *p_itself)
 
 static PyObject *Fm_Error;
 
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *Fm_InitFonts(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef InitFonts
-       PyMac_PRECHECK(InitFonts);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       InitFonts();
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-#endif
-
 static PyObject *Fm_GetFontName(PyObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -132,25 +115,6 @@ static PyObject *Fm_RealFont(PyObject *_self, PyObject *_args)
        return _res;
 }
 
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *Fm_SetFontLock(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean lockFlag;
-#ifndef SetFontLock
-       PyMac_PRECHECK(SetFontLock);
-#endif
-       if (!PyArg_ParseTuple(_args, "b",
-                             &lockFlag))
-               return NULL;
-       SetFontLock(lockFlag);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-#endif
-
 static PyObject *Fm_SetFScaleDisable(PyObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -295,25 +259,6 @@ static PyObject *Fm_GetPreserveGlyph(PyObject *_self, PyObject *_args)
        return _res;
 }
 
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *Fm_FlushFonts(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-#ifndef FlushFonts
-       PyMac_PRECHECK(FlushFonts);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = FlushFonts();
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-#endif
-
 static PyObject *Fm_GetSysFont(PyObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -366,22 +311,12 @@ static PyObject *Fm_QDTextBounds(PyObject *_self, PyObject *_args)
 }
 
 static PyMethodDef Fm_methods[] = {
-
-#if !TARGET_API_MAC_CARBON
-       {"InitFonts", (PyCFunction)Fm_InitFonts, 1,
-        PyDoc_STR("() -> None")},
-#endif
        {"GetFontName", (PyCFunction)Fm_GetFontName, 1,
         PyDoc_STR("(short familyID) -> (Str255 name)")},
        {"GetFNum", (PyCFunction)Fm_GetFNum, 1,
         PyDoc_STR("(Str255 name) -> (short familyID)")},
        {"RealFont", (PyCFunction)Fm_RealFont, 1,
         PyDoc_STR("(short fontNum, short size) -> (Boolean _rv)")},
-
-#if !TARGET_API_MAC_CARBON
-       {"SetFontLock", (PyCFunction)Fm_SetFontLock, 1,
-        PyDoc_STR("(Boolean lockFlag) -> None")},
-#endif
        {"SetFScaleDisable", (PyCFunction)Fm_SetFScaleDisable, 1,
         PyDoc_STR("(Boolean fscaleDisable) -> None")},
        {"FontMetrics", (PyCFunction)Fm_FontMetrics, 1,
@@ -400,11 +335,6 @@ static PyMethodDef Fm_methods[] = {
         PyDoc_STR("(Boolean preserveGlyph) -> None")},
        {"GetPreserveGlyph", (PyCFunction)Fm_GetPreserveGlyph, 1,
         PyDoc_STR("() -> (Boolean _rv)")},
-
-#if !TARGET_API_MAC_CARBON
-       {"FlushFonts", (PyCFunction)Fm_FlushFonts, 1,
-        PyDoc_STR("() -> None")},
-#endif
        {"GetSysFont", (PyCFunction)Fm_GetSysFont, 1,
         PyDoc_STR("() -> (short _rv)")},
        {"GetAppFont", (PyCFunction)Fm_GetAppFont, 1,
index 2364980bfc9ba0a4e4322af02868a3f0cc3a88f5..12fb52e764c80d4936047d0c4cb6a44fa79944e6 100644 (file)
@@ -42,14 +42,15 @@ class MyScanner(Scanner):
                        # Disabling them is the easiest path.
                        'SetAntiAliasedTextEnabled',
                        'IsAntiAliasedTextEnabled',
+                       # OS8-only
+                       'InitFonts',
+                       'SetFontLock',
+                       'FlushFonts',
                        ]
 
        def makegreylist(self):
                return [
                        ('#if !TARGET_API_MAC_CARBON', [
-                               'InitFonts',
-                               'SetFontLock',
-                               'FlushFonts',
                        ])]
        def makeblacklisttypes(self):
                return [
index c974a0c10f4b520ffcaf4b151da9694c0de6b700..56c20a3f0734621b61b8f6b8c241e8574005dff4 100644 (file)
@@ -35,16 +35,6 @@ PERFORMANCE OF THIS SOFTWARE.
 extern int ResObj_Convert(PyObject *, Handle *); /* From Resmodule.c */
 
 #ifdef WITHOUT_FRAMEWORKS
-// #if !TARGET_API_MAC_OS8
-// /* The Carbon headers define PRAGMA_ALIGN_SUPPORT to something illegal,
-// ** because you shouldn't use it for Carbon. All good and well, but portable
-// ** code still needs it. So, we undefine it here.
-// */
-// #undef PRAGMA_ALIGN_SUPPORTED
-// #define PRAGMA_ALIGN_SUPPORTED 0
-// #endif /* !TARGET_API_MAC_OS8 */
-
-// #include "ICAPI.h"
 #include <InternetConfig.h>
 #else
 #include <Carbon/Carbon.h>
@@ -67,79 +57,6 @@ static PyTypeObject Icitype;
 
 /* ---------------------------------------------------------------- */
 
-#if TARGET_API_MAC_OS8
-static char ici_ICFindConfigFile__doc__[] = 
-"()->None; Find config file in standard places"
-;
-
-static PyObject *
-ici_ICFindConfigFile(iciobject *self, PyObject *args)
-{
-       OSStatus err;
-       
-       if (!PyArg_ParseTuple(args, ""))
-               return NULL;
-       if ((err=ICFindConfigFile(self->inst, 0, NULL)) != 0 )
-               return PyMac_Error(err);
-       Py_INCREF(Py_None);
-       return Py_None;
-}
-
-
-static char ici_ICFindUserConfigFile__doc__[] = 
-"(vRefNum, dirID)->None; Find config file in specified place"
-;
-
-static PyObject *
-ici_ICFindUserConfigFile(iciobject *self, PyObject *args)
-{
-       OSStatus err;
-       ICDirSpec where;        
-
-       if (!PyArg_ParseTuple(args, "sl", &where.vRefNum, &where.dirID))
-               return NULL;
-       if ((err=ICFindUserConfigFile(self->inst, &where)) != 0 )
-               return PyMac_Error(err);
-       Py_INCREF(Py_None);
-       return Py_None;
-}
-
-
-static char ici_ICChooseConfig__doc__[] = 
-"()->None; Let the user choose a config file"
-;
-
-static PyObject *
-ici_ICChooseConfig(iciobject *self, PyObject *args)
-{
-       OSStatus err;
-       
-       if (!PyArg_ParseTuple(args, ""))
-               return NULL;
-       if ((err=ICChooseConfig(self->inst)) != 0 )
-               return PyMac_Error(err);
-       Py_INCREF(Py_None);
-       return Py_None;
-}
-
-static char ici_ICChooseNewConfig__doc__[] = 
-"()->None; Let the user choose a new config file"
-;
-
-static PyObject *
-ici_ICChooseNewConfig(iciobject *self, PyObject *args)
-{
-       OSStatus err;
-       
-       if (!PyArg_ParseTuple(args, ""))
-               return NULL;
-       if ((err=ICChooseNewConfig(self->inst)) != 0 )
-               return PyMac_Error(err);
-       Py_INCREF(Py_None);
-       return Py_None;
-}
-#endif /* TARGET_API_MAC_OS8 */
-
 
 static char ici_ICGetSeed__doc__[] = 
 "()->int; Returns int that changes when configuration does"
@@ -423,12 +340,6 @@ ici_ICMapTypeCreator(iciobject *self, PyObject *args)
 
 
 static struct PyMethodDef ici_methods[] = {
-#if TARGET_API_MAC_OS8
- {"ICFindConfigFile",  (PyCFunction)ici_ICFindConfigFile,      METH_VARARGS,   ici_ICFindConfigFile__doc__},
- {"ICFindUserConfigFile",      (PyCFunction)ici_ICFindUserConfigFile,  METH_VARARGS,   ici_ICFindUserConfigFile__doc__},
- {"ICChooseConfig",    (PyCFunction)ici_ICChooseConfig,        METH_VARARGS,   ici_ICChooseConfig__doc__},
- {"ICChooseNewConfig", (PyCFunction)ici_ICChooseNewConfig,     METH_VARARGS,   ici_ICChooseNewConfig__doc__},
-#endif /* TARGET_API_MAC_OS8 */
  {"ICGetSeed", (PyCFunction)ici_ICGetSeed,     METH_VARARGS,   ici_ICGetSeed__doc__},
  {"ICBegin",   (PyCFunction)ici_ICBegin,       METH_VARARGS,   ici_ICBegin__doc__},
  {"ICFindPrefHandle",  (PyCFunction)ici_ICFindPrefHandle,      METH_VARARGS,   ici_ICFindPrefHandle__doc__},
index 93b96ac3876482787ff8eb4f13b46665f46f709a..ac4987509eac767438472988fbf44042068cb798 100644 (file)
@@ -606,23 +606,6 @@ static PyObject *Icn_PlotCIconHandle(PyObject *_self, PyObject *_args)
        return _res;
 }
 
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *Icn_IconServicesTerminate(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef IconServicesTerminate
-       PyMac_PRECHECK(IconServicesTerminate);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       IconServicesTerminate();
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-#endif
-
 static PyObject *Icn_IconRefToIconFamily(PyObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -1338,8 +1321,6 @@ static PyObject *Icn_IsIconRefMaskEmpty(PyObject *_self, PyObject *_args)
        return _res;
 }
 
-#if TARGET_API_MAC_CARBON
-
 static PyObject *Icn_GetIconRefVariant(PyObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -1362,9 +1343,6 @@ static PyObject *Icn_GetIconRefVariant(PyObject *_self, PyObject *_args)
                             outTransform);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *Icn_RegisterIconRefFromIconFile(PyObject *_self, PyObject *_args)
 {
@@ -1391,9 +1369,6 @@ static PyObject *Icn_RegisterIconRefFromIconFile(PyObject *_self, PyObject *_arg
                             ResObj_New, theIconRef);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *Icn_ReadIconFile(PyObject *_self, PyObject *_args)
 {
@@ -1414,9 +1389,6 @@ static PyObject *Icn_ReadIconFile(PyObject *_self, PyObject *_args)
                             ResObj_New, iconFamily);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *Icn_WriteIconFile(PyObject *_self, PyObject *_args)
 {
@@ -1438,7 +1410,6 @@ static PyObject *Icn_WriteIconFile(PyObject *_self, PyObject *_args)
        _res = Py_None;
        return _res;
 }
-#endif
 
 static PyMethodDef Icn_methods[] = {
        {"GetCIcon", (PyCFunction)Icn_GetCIcon, 1,
@@ -1491,11 +1462,6 @@ static PyMethodDef Icn_methods[] = {
         PyDoc_STR("(Rect theRect, IconAlignmentType align, IconTransformType transform, Handle theSICN) -> None")},
        {"PlotCIconHandle", (PyCFunction)Icn_PlotCIconHandle, 1,
         PyDoc_STR("(Rect theRect, IconAlignmentType align, IconTransformType transform, CIconHandle theCIcon) -> None")},
-
-#if !TARGET_API_MAC_CARBON
-       {"IconServicesTerminate", (PyCFunction)Icn_IconServicesTerminate, 1,
-        PyDoc_STR("() -> None")},
-#endif
        {"IconRefToIconFamily", (PyCFunction)Icn_IconRefToIconFamily, 1,
         PyDoc_STR("(IconRef theIconRef, IconSelectorValue whichIcons) -> (IconFamilyHandle iconFamily)")},
        {"IconFamilyToIconSuite", (PyCFunction)Icn_IconFamilyToIconSuite, 1,
@@ -1558,26 +1524,14 @@ static PyMethodDef Icn_methods[] = {
         PyDoc_STR("(SInt16 vRefNum) -> (Boolean customIconsEnabled)")},
        {"IsIconRefMaskEmpty", (PyCFunction)Icn_IsIconRefMaskEmpty, 1,
         PyDoc_STR("(IconRef iconRef) -> (Boolean _rv)")},
-
-#if TARGET_API_MAC_CARBON
        {"GetIconRefVariant", (PyCFunction)Icn_GetIconRefVariant, 1,
         PyDoc_STR("(IconRef inIconRef, OSType inVariant) -> (IconRef _rv, IconTransformType outTransform)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"RegisterIconRefFromIconFile", (PyCFunction)Icn_RegisterIconRefFromIconFile, 1,
         PyDoc_STR("(OSType creator, OSType iconType, FSSpec iconFile) -> (IconRef theIconRef)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"ReadIconFile", (PyCFunction)Icn_ReadIconFile, 1,
         PyDoc_STR("(FSSpec iconFile) -> (IconFamilyHandle iconFamily)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"WriteIconFile", (PyCFunction)Icn_WriteIconFile, 1,
         PyDoc_STR("(IconFamilyHandle iconFamily, FSSpec iconFile) -> None")},
-#endif
        {NULL, NULL, 0}
 };
 
index 6ed3108831e5ad5545fda8bdfb61d926d03ca482..138cc628990920ca2a65bdd6e8b1aa8a29dc6d1c 100644 (file)
@@ -46,20 +46,10 @@ class MyScanner(Scanner):
                        "svAllAvailableData",
                        # Something in a comment accidentally seen as a const definition
                        "err",
+                       # OS8 only
+                       'IconServicesTerminate',
                        ]
 
-       def makegreylist(self):
-               return [
-                       ('#if !TARGET_API_MAC_CARBON', [
-                               'IconServicesTerminate',
-                       ]),
-                       ('#if TARGET_API_MAC_CARBON', [
-                               'WriteIconFile',
-                               'ReadIconFile',
-                               'RegisterIconRefFromIconFile',
-                               'GetIconRefVariant',
-                       ])]
-
        def makeblacklisttypes(self):
                return [
                        "IconActionUPP",
index 6f89cbf5feaf85acb49ff6d57faf4ecc12b41e30..7f365295583f12d5b0222504e6d39b4b789aef00 100644 (file)
@@ -64,39 +64,6 @@ extern int _ListObj_Convert(PyObject *, ListHandle *);
 
 static ListDefUPP myListDefFunctionUPP;
 
-#if !TARGET_API_MAC_CARBON
-
-#define kJumpAbs 0x4EF9
-
-#pragma options align=mac68k
-typedef struct {
-       short jmpabs;       /* 4EF9 */
-       ListDefUPP theUPP;  /* 00000000 */
-} LDEFStub, **LDEFStubHandle;
-#pragma options align=reset
-
-static OSErr installLDEFStub(ListHandle list) {
-       LDEFStubHandle stubH;
-
-       stubH = (LDEFStubHandle)NewHandleClear(sizeof(LDEFStub));
-       if (stubH == NULL)
-               return MemError();
-       
-       (*stubH)->jmpabs = kJumpAbs;
-       (*stubH)->theUPP = myListDefFunctionUPP;
-       HLock((Handle) stubH);
-       
-       (*list)->listDefProc = (Handle)stubH;
-       return noErr;
-}
-
-static void removeLDEFStub(ListHandle list) {
-       if ((*list)->listDefProc)
-               DisposeHandle((Handle)(*list)->listDefProc);
-       (*list)->listDefProc = NULL;
-}
-
-#endif
 
 static PyObject *List_Error;
 
@@ -110,7 +77,6 @@ typedef struct ListObject {
        PyObject_HEAD
        ListHandle ob_itself;
        PyObject *ob_ldef_func;
-       int ob_have_ldef_stub;
        int ob_must_be_disposed;
 } ListObject;
 
@@ -125,7 +91,6 @@ PyObject *ListObj_New(ListHandle itself)
        if (it == NULL) return NULL;
        it->ob_itself = itself;
        it->ob_ldef_func = NULL;
-       it->ob_have_ldef_stub = 0;
        it->ob_must_be_disposed = 1;
        SetListRefCon(itself, (long)it);
        return (PyObject *)it;
@@ -145,9 +110,6 @@ static void ListObj_dealloc(ListObject *self)
 {
        Py_XDECREF(self->ob_ldef_func);
        self->ob_ldef_func = NULL;
-#if !TARGET_API_MAC_CARBON
-       if (self->ob_have_ldef_stub) removeLDEFStub(self->ob_itself);
-#endif
        SetListRefCon(self->ob_itself, (long)0);
        if (self->ob_must_be_disposed && self->ob_itself) LDispose(self->ob_itself);
        PyObject_Del(self);
@@ -901,7 +863,6 @@ static PyObject *List_CreateCustomList(PyObject *_self, PyObject *_args)
                return NULL;
 
 
-#if TARGET_API_MAC_CARBON
        /* Carbon applications use the CreateCustomList API */ 
        theSpec.u.userProc = myListDefFunctionUPP;
        CreateCustomList(&rView,
@@ -915,33 +876,12 @@ static PyObject *List_CreateCustomList(PyObject *_self, PyObject *_args)
                         scrollVert,
                         &outList);
 
-#else
-       /* pre-Carbon applications set the address in the LDEF
-       to a routine descriptor referring to their list
-       definition routine. */
-       outList = LNew(&rView,
-                      &dataBounds,
-                      cellSize,
-                      0,
-                      theWindow,
-                      drawIt, /* XXX must be false */
-                      hasGrow,
-                      scrollHoriz,
-                      scrollVert);
-       if (installLDEFStub(outList) != noErr) {
-               PyErr_SetString(PyExc_MemoryError, "can't create LDEF stub");
-               return NULL;
-       }
-#endif
 
        _res = ListObj_New(outList);
        if (_res == NULL)
                return NULL;
        Py_INCREF(listDefFunc);
        ((ListObject*)_res)->ob_ldef_func = listDefFunc;
-#if !TARGET_API_MAC_CARBON
-       ((ListObject*)_res)->ob_have_ldef_stub = 1;
-#endif
        return _res;
 }
 
index d1f2f1043940771c6b2d2c46151289bdfc3bb0fc..ab7cc3a3083258f6c7418824c6eccf7859c670b1 100644 (file)
@@ -83,39 +83,6 @@ extern int _ListObj_Convert(PyObject *, ListHandle *);
 
 static ListDefUPP myListDefFunctionUPP;
 
-#if !TARGET_API_MAC_CARBON
-
-#define kJumpAbs 0x4EF9
-
-#pragma options align=mac68k
-typedef struct {
-       short jmpabs;       /* 4EF9 */
-       ListDefUPP theUPP;  /* 00000000 */
-} LDEFStub, **LDEFStubHandle;
-#pragma options align=reset
-
-static OSErr installLDEFStub(ListHandle list) {
-       LDEFStubHandle stubH;
-
-       stubH = (LDEFStubHandle)NewHandleClear(sizeof(LDEFStub));
-       if (stubH == NULL)
-               return MemError();
-       
-       (*stubH)->jmpabs = kJumpAbs;
-       (*stubH)->theUPP = myListDefFunctionUPP;
-       HLock((Handle) stubH);
-       
-       (*list)->listDefProc = (Handle)stubH;
-       return noErr;
-}
-
-static void removeLDEFStub(ListHandle list) {
-       if ((*list)->listDefProc)
-               DisposeHandle((Handle)(*list)->listDefProc);
-       (*list)->listDefProc = NULL;
-}
-
-#endif
 """
 
 initstuff = initstuff + """
@@ -159,7 +126,6 @@ class MyObjectDefinition(PEP253Mixin, GlobalObjectDefinition):
        def outputStructMembers(self):
                ObjectDefinition.outputStructMembers(self)
                Output("PyObject *ob_ldef_func;")
-               Output("int ob_have_ldef_stub;")
                Output("int ob_must_be_disposed;")
 
        def outputCheckNewArg(self):
@@ -171,16 +137,12 @@ class MyObjectDefinition(PEP253Mixin, GlobalObjectDefinition):
        def outputInitStructMembers(self):
                ObjectDefinition.outputInitStructMembers(self)
                Output("it->ob_ldef_func = NULL;")
-               Output("it->ob_have_ldef_stub = 0;")
                Output("it->ob_must_be_disposed = 1;")
                Output("SetListRefCon(itself, (long)it);")
 
        def outputFreeIt(self, itselfname):
                Output("Py_XDECREF(self->ob_ldef_func);")
                Output("self->ob_ldef_func = NULL;")
-               Output("#if !TARGET_API_MAC_CARBON")
-               Output("if (self->ob_have_ldef_stub) removeLDEFStub(self->ob_itself);");
-               Output("#endif");
                Output("SetListRefCon(self->ob_itself, (long)0);")
                Output("if (self->ob_must_be_disposed && %s) LDispose(%s);", itselfname, itselfname)
                
@@ -285,7 +247,6 @@ if (!PyArg_ParseTuple(_args, "O&O&O&(iO)O&bbbb",
        return NULL;
 
 
-#if TARGET_API_MAC_CARBON
 /* Carbon applications use the CreateCustomList API */ 
 theSpec.u.userProc = myListDefFunctionUPP;
 CreateCustomList(&rView,
@@ -299,33 +260,12 @@ CreateCustomList(&rView,
                  scrollVert,
                  &outList);
 
-#else
-/* pre-Carbon applications set the address in the LDEF
-to a routine descriptor referring to their list
-definition routine. */
-outList = LNew(&rView,
-               &dataBounds,
-               cellSize,
-               0,
-               theWindow,
-               drawIt, /* XXX must be false */
-               hasGrow,
-               scrollHoriz,
-               scrollVert);
-if (installLDEFStub(outList) != noErr) {
-       PyErr_SetString(PyExc_MemoryError, "can't create LDEF stub");
-       return NULL;
-}
-#endif
 
 _res = ListObj_New(outList);
 if (_res == NULL)
        return NULL;
 Py_INCREF(listDefFunc);
 ((ListObject*)_res)->ob_ldef_func = listDefFunc;
-#if !TARGET_API_MAC_CARBON
-((ListObject*)_res)->ob_have_ldef_stub = 1;
-#endif
 return _res;\
 """
 
index 558f136ee0681057ba0301bdf268e967e0f32248..89f547dae43bf4c436d6122c559af90eb94e74a4 100644 (file)
@@ -244,16 +244,8 @@ struct _inittab _PyImport_Inittab[] = {
        {"_Scrap", init_Scrap},
        {"_TE", init_TE},
        {"ColorPicker", initColorPicker},
-#if !TARGET_API_MAC_CARBON
-       {"_Help", init_Help},
-       {"Printing", initPrinting},
-#endif
-#if TARGET_API_MAC_CARBON
        {"_CF", init_CF},
-#endif
-#if TARGET_API_MAC_CARBON
        {"hfsplus", inithfsplus},
-#endif
 #endif /* USE_TOOLBOX */
 #ifdef USE_QT
        {"_Cm", init_Cm},
index f8c3428ce73cc220a54e6bc1493f238f2d200b73..eaa81647043ce5aab1baf9b98ad5457a07fd5835 100644 (file)
@@ -382,7 +382,6 @@ _mfs_GetFSSpecFromFSSpec(PyObject *self, FSSpec *fssp)
 static int
 _mfs_GetFSSpecFromFSRef(PyObject *self, FSSpec *fssp)
 {
-#if !TARGET_API_MAC_OS8
        static FSRef *fsrp;
        
        if ( is_mfsrobject(self) ) {
@@ -390,7 +389,6 @@ _mfs_GetFSSpecFromFSRef(PyObject *self, FSSpec *fssp)
                if ( FSGetCatalogInfo(&((mfsrobject *)self)->fsref, kFSCatInfoNone, NULL, NULL, fssp, NULL) == noErr )
                        return 1;
        }
-#endif
        return 0;
 }
 
@@ -398,12 +396,10 @@ _mfs_GetFSSpecFromFSRef(PyObject *self, FSSpec *fssp)
 static int
 _mfs_GetFSRefFromFSRef(PyObject *self, FSRef *fsrp)
 {
-#if !TARGET_API_MAC_OS8
        if ( is_mfsrobject(self) ) {
                *fsrp = ((mfsrobject *)self)->fsref;
                return 1;
        }
-#endif
        return 0;
 }
 
@@ -411,12 +407,10 @@ _mfs_GetFSRefFromFSRef(PyObject *self, FSRef *fsrp)
 static int
 _mfs_GetFSRefFromFSSpec(PyObject *self, FSRef *fsrp)
 {
-#if !TARGET_API_MAC_OS8
        if ( is_mfssobject(self) ) {
                if ( FSpMakeFSRef(&((mfssobject *)self)->fsspec, fsrp) == noErr )
                        return 1;
        }
-#endif
        return 0;
 }
 
@@ -533,10 +527,6 @@ mfss_NewAliasMinimal(mfssobject *self, PyObject *args)
 static PyObject *
 mfss_FSpMakeFSRef(mfssobject *self, PyObject *args)
 {
-#if TARGET_API_MAC_OS8
-       PyErr_SetString(PyExc_NotImplementedError, "FSRef objects not supported on this platform");
-       return 0;
-#else
        OSErr err;
        FSRef fsref;
        
@@ -548,7 +538,6 @@ mfss_FSpMakeFSRef(mfssobject *self, PyObject *args)
                return NULL;
        }
        return (PyObject *)newmfsrobject(&fsref);
-#endif
 }
 
 /* XXXX These routines should be replaced by a wrapper to the *FInfo routines */
@@ -777,7 +766,6 @@ statichere PyTypeObject Mfsstype = {
 
 /* End of code for FSSpec objects */
 /* -------------------------------------------------------- */
-#if !TARGET_API_MAC_OS8
 static PyObject *
 mfsr_as_fsspec(mfsrobject *self, PyObject *args)
 {
@@ -891,7 +879,6 @@ statichere PyTypeObject Mfsrtype = {
 };
 
 /* End of code for FSRef objects */
-#endif /* !TARGET_API_MAC_OS8 */
 /* -------------------------------------------------------- */
 
 static PyObject *
@@ -911,91 +898,6 @@ mfs_ResolveAliasFile(PyObject *self, PyObject *args)
        return Py_BuildValue("Oii", newmfssobject(&fss), (int)isfolder, (int)wasaliased);
 }
 
-#if !TARGET_API_MAC_CARBON
-static PyObject *
-mfs_StandardGetFile(PyObject *self, PyObject *args)
-{
-       SFTypeList list;
-       short numtypes;
-       StandardFileReply reply;
-       
-       list[0] = list[1] = list[2] = list[3] = 0;
-       numtypes = 0;
-       if (!PyArg_ParseTuple(args, "|O&O&O&O&", PyMac_GetOSType, &list[0],
-                        PyMac_GetOSType, &list[1], PyMac_GetOSType, &list[2],
-                         PyMac_GetOSType, &list[3]) )
-               return NULL;
-       while ( numtypes < 4 && list[numtypes] ) {
-               numtypes++;
-       }
-       if ( numtypes == 0 )
-               numtypes = -1;
-       StandardGetFile((FileFilterUPP)0, numtypes, list, &reply);
-       return Py_BuildValue("(Oi)", newmfssobject(&reply.sfFile), reply.sfGood);
-}
-
-static PyObject *
-mfs_PromptGetFile(PyObject *self, PyObject *args)
-{
-       SFTypeList list;
-       short numtypes;
-       StandardFileReply reply;
-       char *prompt = NULL;
-       
-       list[0] = list[1] = list[2] = list[3] = 0;
-       numtypes = 0;
-       if (!PyArg_ParseTuple(args, "s|O&O&O&O&", &prompt, PyMac_GetOSType, &list[0],
-                        PyMac_GetOSType, &list[1], PyMac_GetOSType, &list[2],
-                         PyMac_GetOSType, &list[3]) )
-               return NULL;
-       while ( numtypes < 4 && list[numtypes] ) {
-               numtypes++;
-       }
-       if ( numtypes == 0 )
-               numtypes = -1;
-       PyMac_PromptGetFile(numtypes, list, &reply, prompt);
-       return Py_BuildValue("(Oi)", newmfssobject(&reply.sfFile), reply.sfGood);
-}
-
-static PyObject *
-mfs_StandardPutFile(PyObject *self, PyObject *args)
-{
-       Str255 prompt, dft;
-       StandardFileReply reply;
-       
-       dft[0] = 0;
-       if (!PyArg_ParseTuple(args, "O&|O&", PyMac_GetStr255, &prompt, PyMac_GetStr255, &dft) )
-               return NULL;
-       StandardPutFile(prompt, dft, &reply);
-       return Py_BuildValue("(Oi)",newmfssobject(&reply.sfFile), reply.sfGood);
-}
-
-/*
-** Set initial directory for file dialogs */
-static PyObject *
-mfs_SetFolder(PyObject *self, PyObject *args)
-{
-       FSSpec spec;
-       FSSpec ospec;
-       short orefnum;
-       long oparid;
-       
-       /* Get old values */
-       orefnum = -LMGetSFSaveDisk();
-       oparid = LMGetCurDirStore();
-       (void)FSMakeFSSpec(orefnum, oparid, "\pplaceholder", &ospec);
-       
-       /* Go to working directory by default */
-       (void)FSMakeFSSpec(0, 0, "\p:placeholder", &spec);
-       if (!PyArg_ParseTuple(args, "|O&", PyMac_GetFSSpec, &spec))
-               return NULL;
-       /* Set standard-file working directory */
-       LMSetSFSaveDisk(-spec.vRefNum);
-       LMSetCurDirStore(spec.parID);
-       return (PyObject *)newmfssobject(&ospec);
-}
-#endif
-
 static PyObject *
 mfs_FSSpec(PyObject *self, PyObject *args)
 {
@@ -1009,16 +911,11 @@ mfs_FSSpec(PyObject *self, PyObject *args)
 static PyObject *
 mfs_FSRef(PyObject *self, PyObject *args)
 {
-#if TARGET_API_MAC_OS8
-       PyErr_SetString(PyExc_NotImplementedError, "FSRef objects not supported on this platform");
-       return 0;
-#else
        FSRef fsr;
 
        if (!PyArg_ParseTuple(args, "O&", PyMac_GetFSRef, &fsr))
                return NULL;
        return (PyObject *)newmfsrobject(&fsr);
-#endif
 }
 
 static PyObject *
@@ -1056,22 +953,6 @@ mfs_RawAlias(PyObject *self, PyObject *args)
        return (PyObject *)newmfsaobject((AliasHandle)h);
 }
 
-#if !TARGET_API_MAC_CARBON
-static PyObject *
-mfs_GetDirectory(PyObject *self, PyObject *args)
-{
-       FSSpec fsdir;
-       int ok;
-       char *prompt = NULL;
-               
-       if (!PyArg_ParseTuple(args, "|s", &prompt) )
-               return NULL;
-               
-       ok = PyMac_GetDirectory(&fsdir, prompt);
-       return Py_BuildValue("(Oi)", newmfssobject(&fsdir), ok);
-}
-#endif
-
 static PyObject *
 mfs_FindFolder(PyObject *self, PyObject *args)
 {
@@ -1143,13 +1024,6 @@ mfs_NewAliasMinimalFromFullPath(PyObject *self, PyObject *args)
 
 static struct PyMethodDef mfs_methods[] = {
        {"ResolveAliasFile",    mfs_ResolveAliasFile,   1},
-#if !TARGET_API_MAC_CARBON
-       {"StandardGetFile",             mfs_StandardGetFile,    1},
-       {"PromptGetFile",               mfs_PromptGetFile,              1},
-       {"StandardPutFile",             mfs_StandardPutFile,    1},
-       {"GetDirectory",                mfs_GetDirectory,               1},
-       {"SetFolder",                   mfs_SetFolder,                  1},
-#endif
        {"FSSpec",                              mfs_FSSpec,                             1},
        {"FSRef",                               mfs_FSRef,                              1},
        {"RawFSSpec",                   mfs_RawFSSpec,                  1},
@@ -1170,10 +1044,6 @@ static struct PyMethodDef mfs_methods[] = {
 int
 PyMac_GetFSRef(PyObject *v, FSRef *fsr)
 {
-#if TARGET_API_MAC_OS8
-       PyErr_SetString(PyExc_TypeError, "FSRef objects not supported on this platform");
-       return 0;
-#else
        /* If it's an FSRef we're also okay. */
        if (_mfs_GetFSRefFromFSRef(v, fsr))
                return 1;
@@ -1195,17 +1065,12 @@ PyMac_GetFSRef(PyObject *v, FSRef *fsr)
        }
        PyErr_SetString(PyExc_TypeError, "FSRef argument should be existing FSRef, FSSpec or (OSX only) pathname");
        return 0;
-#endif
 }
 
 /* Convert FSSpec to PyObject */
 PyObject *PyMac_BuildFSRef(FSRef *v)
 {
-#if TARGET_API_MAC_OS8
-       return NULL;
-#else
        return (PyObject *)newmfsrobject(v);
-#endif
 }
 
 /*
index 8b3bcc53148eaf4d5c5bdee1bfe76a5847c0b71b..e6ac8812c4ea1a90716f578e11e68b598a7cff5f 100644 (file)
@@ -32,11 +32,6 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 #include <string.h>
 #include <errno.h>
 
-#if TARGET_API_MAC_OS8
-/* Skip for Carbon */
-#include "macstat.h"
-#endif
-
 #ifdef USE_GUSI
 /* Remove defines from macstat.h */
 #undef S_IFMT
@@ -49,9 +44,6 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 #include <sys/types.h>
 #include <sys/stat.h>
 #else /* USE_GUSI */
-#if TARGET_API_MAC_OS8
-#define stat macstat
-#endif
 #endif /* USE_GUSI */
 
 #ifdef USE_GUSI2
@@ -239,24 +231,6 @@ mac_fdopen(self, args)
 }
 #endif
 
-#if TARGET_API_MAC_OS8
-static PyObject *
-mac_getbootvol(self, args)
-       PyObject *self;
-       PyObject *args;
-{
-       char *res;
-       if (!PyArg_ParseTuple(args, ""))
-               return NULL;
-       Py_BEGIN_ALLOW_THREADS
-       res = getbootvol();
-       Py_END_ALLOW_THREADS
-       if (res == NULL)
-               return mac_error();
-       return PyString_FromString(res);
-}
-#endif
-
 static PyObject *
 mac_getcwd(self, args)
        PyObject *self;
@@ -471,38 +445,12 @@ static PyStructSequence_Desc stat_result_desc = {
 
 static PyTypeObject StatResultType;
 
-#ifdef TARGET_API_MAC_OS8
-static PyStructSequence_Field xstat_result_fields[] = {
-       COMMON_STAT_RESULT_FIELDS
-       { "st_rsize" },
-       { "st_creator" },
-       { "st_type "},
-       {0}
-};
-
-static PyStructSequence_Desc xstat_result_desc = {
-       "mac.xstat_result",
-       stat_result__doc__,
-       xstat_result_fields,
-       13
-};
-
-static PyTypeObject XStatResultType;
-#endif
-
 static PyObject *
 _pystat_from_struct_stat(struct stat st, void* _mst) 
 {
        PyObject *v;
 
-#if TARGET_API_MAC_OS8
-       struct macstat *mst;
-
-       if (_mst != NULL)
-               v = PyStructSequence_New(&XStatResultType);
-       else
-#endif
-               v = PyStructSequence_New(&StatResultType);
+       v = PyStructSequence_New(&StatResultType);
        PyStructSequence_SET_ITEM(v, 0, PyInt_FromLong((long)st.st_mode));
        PyStructSequence_SET_ITEM(v, 1, PyInt_FromLong((long)st.st_ino));
        PyStructSequence_SET_ITEM(v, 2, PyInt_FromLong((long)st.st_dev));
@@ -516,26 +464,12 @@ _pystat_from_struct_stat(struct stat st, void* _mst)
                                  PyFloat_FromDouble((double)st.st_mtime));
        PyStructSequence_SET_ITEM(v, 9, 
                                  PyFloat_FromDouble((double)st.st_ctime));
-#if TARGET_API_MAC_OS8
-       if (_mst != NULL) {
-               mst = (struct macstat *) _mst;
-               PyStructSequence_SET_ITEM(v, 10, 
-                                         PyInt_FromLong((long)mst->st_rsize));
-               PyStructSequence_SET_ITEM(v, 11, 
-                               PyString_FromStringAndSize(mst->st_creator, 
-                                                          4));
-               PyStructSequence_SET_ITEM(v, 12, 
-                               PyString_FromStringAndSize(mst->st_type, 
-                                                          4));
+       if (PyErr_Occurred()) {
+                       Py_DECREF(v);
+                       return NULL;
        }
-#endif
-
-        if (PyErr_Occurred()) {
-                Py_DECREF(v);
-                return NULL;
-        }
 
-        return v;
+       return v;
 }
 
 
@@ -579,38 +513,6 @@ mac_fstat(self, args)
 }
 #endif /* WEHAVE_FSTAT */
 
-#if TARGET_API_MAC_OS8
-static PyObject *
-mac_xstat(self, args)
-       PyObject *self;
-       PyObject *args;
-{
-       struct macstat mst;
-       struct stat st;
-       char *path;
-       int res;
-       if (!PyArg_ParseTuple(args, "s", &path))
-               return NULL;
-       /*
-       ** Convoluted: we want stat() and xstat() to agree, so we call both
-       ** stat and macstat, and use the latter only for values not provided by
-       ** the former.
-       */
-       Py_BEGIN_ALLOW_THREADS
-       res = macstat(path, &mst);
-       Py_END_ALLOW_THREADS
-       if (res != 0)
-               return mac_error();
-       Py_BEGIN_ALLOW_THREADS
-       res = stat(path, &st);
-       Py_END_ALLOW_THREADS
-       if (res != 0)
-               return mac_error();
-
-       return _pystat_from_struct_stat(st, (void*) &mst);
-}
-#endif
-
 static PyObject *
 mac_sync(self, args)
        PyObject *self;
@@ -683,9 +585,6 @@ static struct PyMethodDef mac_methods[] = {
 #endif
 #ifdef WEHAVE_FSTAT
        {"fstat",       mac_fstat, 1},
-#endif
-#if TARGET_API_MAC_OS8
-       {"getbootvol",  mac_getbootvol, 1}, /* non-standard */
 #endif
        {"getcwd",      mac_getcwd, 1},
        {"listdir",     mac_listdir, 1},
@@ -696,9 +595,6 @@ static struct PyMethodDef mac_methods[] = {
        {"rename",      mac_rename, 1},
        {"rmdir",       mac_rmdir, 1},
        {"stat",        mac_stat, 1},
-#if TARGET_API_MAC_OS8
-       {"xstat",       mac_xstat, 1},
-#endif
        {"sync",        mac_sync, 1},
        {"remove",      mac_unlink, 1},
        {"unlink",      mac_unlink, 1},
@@ -823,8 +719,4 @@ initmac()
        PyStructSequence_InitType(&StatResultType, &stat_result_desc);
        PyDict_SetItemString(d, "stat_result", (PyObject*) &StatResultType);
 
-#if TARGET_API_MAC_OS8
-       PyStructSequence_InitType(&XStatResultType, &xstat_result_desc);
-       PyDict_SetItemString(d, "xstat_result", (PyObject*) &XStatResultType);
-#endif
 }
index dc9a94ff383636272bed1c02df548d44818330c1..2ff58958537b969f19dabffa9097a6ed25f7a27f 100644 (file)
@@ -348,49 +348,6 @@ MacOS_SetCreatorAndType(PyObject *self, PyObject *args)
        return Py_None;
 }
 
-#if TARGET_API_MAC_OS8
-/*----------------------------------------------------------------------*/
-/* STDWIN High Level Event interface */
-
-#include <EPPC.h>
-#include <Events.h>
-
-static char accepthle_doc[] = "Get arguments of pending high-level event";
-
-static PyObject *
-MacOS_AcceptHighLevelEvent(self, args)
-       PyObject *self;
-       PyObject *args;
-{
-       TargetID sender;
-       unsigned long refcon;
-       Ptr buf;
-       unsigned long len;
-       OSErr err;
-       PyObject *res;
-       
-       buf = NULL;
-       len = 0;
-       err = AcceptHighLevelEvent(&sender, &refcon, buf, &len);
-       if (err == bufferIsSmall) {
-               buf = malloc(len);
-               if (buf == NULL)
-                       return PyErr_NoMemory();
-               err = AcceptHighLevelEvent(&sender, &refcon, buf, &len);
-               if (err != noErr) {
-                       free(buf);
-                       return PyErr_Mac(MacOS_Error, (int)err);
-               }
-       }
-       else if (err != noErr)
-               return PyErr_Mac(MacOS_Error, (int)err);
-       res = Py_BuildValue("s#ls#",
-               (char *)&sender, (int)(sizeof sender), refcon, (char *)buf, (int)len);
-       free(buf);
-       return res;
-}
-#endif
-
 #if !TARGET_API_MAC_OSX
 static char schedparams_doc[] = "Set/return mainloop interrupt check flag, etc";
 
@@ -701,9 +658,6 @@ MacOS_OutputSeen(PyObject *self, PyObject *args)
 #endif /* !TARGET_API_MAC_OSX */
 
 static PyMethodDef MacOS_Methods[] = {
-#if TARGET_API_MAC_OS8
-       {"AcceptHighLevelEvent",        MacOS_AcceptHighLevelEvent, 1,  accepthle_doc},
-#endif
        {"GetCreatorAndType",           MacOS_GetCreatorAndType, 1,     getcrtp_doc},
        {"SetCreatorAndType",           MacOS_SetCreatorAndType, 1,     setcrtp_doc},
 #if !TARGET_API_MAC_OSX
@@ -759,8 +713,6 @@ initMacOS(void)
        }
 #if TARGET_API_MAC_OSX
 #define PY_RUNTIMEMODEL "macho"
-#elif TARGET_API_MAC_OS8
-#define PY_RUNTIMEMODEL "ppc"
 #elif TARGET_API_MAC_CARBON
 #define PY_RUNTIMEMODEL "carbon"
 #else
index 4f44c6f53b720e7dfc3403e05f2f8cdbc7f830d4..ecdd15663fcd110a2afc9b466297bc0817f2d177 100644 (file)
@@ -139,24 +139,6 @@ static PyObject *MenuObj_CalcMenuSize(MenuObject *_self, PyObject *_args)
        return _res;
 }
 
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *MenuObj_CountMItems(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short _rv;
-#ifndef CountMItems
-       PyMac_PRECHECK(CountMItems);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = CountMItems(_self->ob_itself);
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-#endif
-
 static PyObject *MenuObj_CountMenuItems(MenuObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -249,8 +231,6 @@ static PyObject *MenuObj_SetMenuExcludesMarkColumn(MenuObject *_self, PyObject *
        return _res;
 }
 
-#if TARGET_API_MAC_CARBON
-
 static PyObject *MenuObj_IsValidMenu(MenuObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -265,9 +245,6 @@ static PyObject *MenuObj_IsValidMenu(MenuObject *_self, PyObject *_args)
                             _rv);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *MenuObj_GetMenuRetainCount(MenuObject *_self, PyObject *_args)
 {
@@ -283,9 +260,6 @@ static PyObject *MenuObj_GetMenuRetainCount(MenuObject *_self, PyObject *_args)
                             _rv);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *MenuObj_RetainMenu(MenuObject *_self, PyObject *_args)
 {
@@ -302,9 +276,6 @@ static PyObject *MenuObj_RetainMenu(MenuObject *_self, PyObject *_args)
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *MenuObj_ReleaseMenu(MenuObject *_self, PyObject *_args)
 {
@@ -321,9 +292,6 @@ static PyObject *MenuObj_ReleaseMenu(MenuObject *_self, PyObject *_args)
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *MenuObj_DuplicateMenu(MenuObject *_self, PyObject *_args)
 {
@@ -342,9 +310,6 @@ static PyObject *MenuObj_DuplicateMenu(MenuObject *_self, PyObject *_args)
                             MenuObj_New, outMenu);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *MenuObj_CopyMenuTitleAsCFString(MenuObject *_self, PyObject *_args)
 {
@@ -363,9 +328,6 @@ static PyObject *MenuObj_CopyMenuTitleAsCFString(MenuObject *_self, PyObject *_a
                             CFStringRefObj_New, outString);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *MenuObj_SetMenuTitleWithCFString(MenuObject *_self, PyObject *_args)
 {
@@ -385,9 +347,6 @@ static PyObject *MenuObj_SetMenuTitleWithCFString(MenuObject *_self, PyObject *_
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *MenuObj_InvalidateMenuSize(MenuObject *_self, PyObject *_args)
 {
@@ -404,9 +363,6 @@ static PyObject *MenuObj_InvalidateMenuSize(MenuObject *_self, PyObject *_args)
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *MenuObj_IsMenuSizeInvalid(MenuObject *_self, PyObject *_args)
 {
@@ -422,7 +378,6 @@ static PyObject *MenuObj_IsMenuSizeInvalid(MenuObject *_self, PyObject *_args)
                             _rv);
        return _res;
 }
-#endif
 
 static PyObject *MenuObj_MacAppendMenu(MenuObject *_self, PyObject *_args)
 {
@@ -599,8 +554,6 @@ static PyObject *MenuObj_InsertMenuItemText(MenuObject *_self, PyObject *_args)
        return _res;
 }
 
-#if TARGET_API_MAC_CARBON
-
 static PyObject *MenuObj_CopyMenuItems(MenuObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -628,9 +581,6 @@ static PyObject *MenuObj_CopyMenuItems(MenuObject *_self, PyObject *_args)
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *MenuObj_DeleteMenuItems(MenuObject *_self, PyObject *_args)
 {
@@ -653,9 +603,6 @@ static PyObject *MenuObj_DeleteMenuItems(MenuObject *_self, PyObject *_args)
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *MenuObj_AppendMenuItemTextWithCFString(MenuObject *_self, PyObject *_args)
 {
@@ -683,9 +630,6 @@ static PyObject *MenuObj_AppendMenuItemTextWithCFString(MenuObject *_self, PyObj
                             outNewItem);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *MenuObj_InsertMenuItemTextWithCFString(MenuObject *_self, PyObject *_args)
 {
@@ -714,7 +658,6 @@ static PyObject *MenuObj_InsertMenuItemTextWithCFString(MenuObject *_self, PyObj
        _res = Py_None;
        return _res;
 }
-#endif
 
 static PyObject *MenuObj_PopUpMenuSelect(MenuObject *_self, PyObject *_args)
 {
@@ -740,8 +683,6 @@ static PyObject *MenuObj_PopUpMenuSelect(MenuObject *_self, PyObject *_args)
        return _res;
 }
 
-#if TARGET_API_MAC_CARBON
-
 static PyObject *MenuObj_InvalidateMenuEnabling(MenuObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -757,9 +698,6 @@ static PyObject *MenuObj_InvalidateMenuEnabling(MenuObject *_self, PyObject *_ar
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *MenuObj_IsMenuBarInvalid(MenuObject *_self, PyObject *_args)
 {
@@ -775,7 +713,6 @@ static PyObject *MenuObj_IsMenuBarInvalid(MenuObject *_self, PyObject *_args)
                             _rv);
        return _res;
 }
-#endif
 
 static PyObject *MenuObj_MacInsertMenu(MenuObject *_self, PyObject *_args)
 {
@@ -794,8 +731,6 @@ static PyObject *MenuObj_MacInsertMenu(MenuObject *_self, PyObject *_args)
        return _res;
 }
 
-#if TARGET_API_MAC_CARBON
-
 static PyObject *MenuObj_SetRootMenu(MenuObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -811,30 +746,6 @@ static PyObject *MenuObj_SetRootMenu(MenuObject *_self, PyObject *_args)
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *MenuObj_CheckItem(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short item;
-       Boolean checked;
-#ifndef CheckItem
-       PyMac_PRECHECK(CheckItem);
-#endif
-       if (!PyArg_ParseTuple(_args, "hb",
-                             &item,
-                             &checked))
-               return NULL;
-       CheckItem(_self->ob_itself,
-                 item,
-                 checked);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-#endif
 
 static PyObject *MenuObj_MacCheckMenuItem(MenuObject *_self, PyObject *_args)
 {
@@ -1051,46 +962,6 @@ static PyObject *MenuObj_GetItemStyle(MenuObject *_self, PyObject *_args)
        return _res;
 }
 
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *MenuObj_DisableItem(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short item;
-#ifndef DisableItem
-       PyMac_PRECHECK(DisableItem);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &item))
-               return NULL;
-       DisableItem(_self->ob_itself,
-                   item);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-#endif
-
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *MenuObj_EnableItem(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short item;
-#ifndef EnableItem
-       PyMac_PRECHECK(EnableItem);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &item))
-               return NULL;
-       EnableItem(_self->ob_itself,
-                  item);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-#endif
-
 static PyObject *MenuObj_SetMenuItemCommandID(MenuObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -1398,55 +1269,6 @@ static PyObject *MenuObj_GetMenuItemRefCon(MenuObject *_self, PyObject *_args)
        return _res;
 }
 
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *MenuObj_SetMenuItemRefCon2(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       SInt16 inItem;
-       UInt32 inRefCon2;
-#ifndef SetMenuItemRefCon2
-       PyMac_PRECHECK(SetMenuItemRefCon2);
-#endif
-       if (!PyArg_ParseTuple(_args, "hl",
-                             &inItem,
-                             &inRefCon2))
-               return NULL;
-       _err = SetMenuItemRefCon2(_self->ob_itself,
-                                 inItem,
-                                 inRefCon2);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-#endif
-
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *MenuObj_GetMenuItemRefCon2(MenuObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       SInt16 inItem;
-       UInt32 outRefCon2;
-#ifndef GetMenuItemRefCon2
-       PyMac_PRECHECK(GetMenuItemRefCon2);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &inItem))
-               return NULL;
-       _err = GetMenuItemRefCon2(_self->ob_itself,
-                                 inItem,
-                                 &outRefCon2);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("l",
-                            outRefCon2);
-       return _res;
-}
-#endif
-
 static PyObject *MenuObj_SetMenuItemKeyGlyph(MenuObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -1594,8 +1416,6 @@ static PyObject *MenuObj_IsMenuItemIconEnabled(MenuObject *_self, PyObject *_arg
        return _res;
 }
 
-#if TARGET_API_MAC_CARBON
-
 static PyObject *MenuObj_SetMenuItemHierarchicalMenu(MenuObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -1617,9 +1437,6 @@ static PyObject *MenuObj_SetMenuItemHierarchicalMenu(MenuObject *_self, PyObject
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *MenuObj_GetMenuItemHierarchicalMenu(MenuObject *_self, PyObject *_args)
 {
@@ -1641,9 +1458,6 @@ static PyObject *MenuObj_GetMenuItemHierarchicalMenu(MenuObject *_self, PyObject
                             OptMenuObj_New, outHierMenu);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *MenuObj_CopyMenuItemTextAsCFString(MenuObject *_self, PyObject *_args)
 {
@@ -1665,9 +1479,6 @@ static PyObject *MenuObj_CopyMenuItemTextAsCFString(MenuObject *_self, PyObject
                             CFStringRefObj_New, outString);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *MenuObj_SetMenuItemTextWithCFString(MenuObject *_self, PyObject *_args)
 {
@@ -1690,9 +1501,6 @@ static PyObject *MenuObj_SetMenuItemTextWithCFString(MenuObject *_self, PyObject
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *MenuObj_GetMenuItemIndent(MenuObject *_self, PyObject *_args)
 {
@@ -1714,9 +1522,6 @@ static PyObject *MenuObj_GetMenuItemIndent(MenuObject *_self, PyObject *_args)
                             outIndent);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *MenuObj_SetMenuItemIndent(MenuObject *_self, PyObject *_args)
 {
@@ -1739,9 +1544,6 @@ static PyObject *MenuObj_SetMenuItemIndent(MenuObject *_self, PyObject *_args)
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *MenuObj_GetMenuItemCommandKey(MenuObject *_self, PyObject *_args)
 {
@@ -1766,9 +1568,6 @@ static PyObject *MenuObj_GetMenuItemCommandKey(MenuObject *_self, PyObject *_arg
                             outKey);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *MenuObj_SetMenuItemCommandKey(MenuObject *_self, PyObject *_args)
 {
@@ -1794,9 +1593,6 @@ static PyObject *MenuObj_SetMenuItemCommandKey(MenuObject *_self, PyObject *_arg
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *MenuObj_GetMenuItemPropertyAttributes(MenuObject *_self, PyObject *_args)
 {
@@ -1824,9 +1620,6 @@ static PyObject *MenuObj_GetMenuItemPropertyAttributes(MenuObject *_self, PyObje
                             attributes);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *MenuObj_ChangeMenuItemPropertyAttributes(MenuObject *_self, PyObject *_args)
 {
@@ -1858,9 +1651,6 @@ static PyObject *MenuObj_ChangeMenuItemPropertyAttributes(MenuObject *_self, PyO
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *MenuObj_GetMenuAttributes(MenuObject *_self, PyObject *_args)
 {
@@ -1879,9 +1669,6 @@ static PyObject *MenuObj_GetMenuAttributes(MenuObject *_self, PyObject *_args)
                             outAttributes);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *MenuObj_ChangeMenuAttributes(MenuObject *_self, PyObject *_args)
 {
@@ -1904,9 +1691,6 @@ static PyObject *MenuObj_ChangeMenuAttributes(MenuObject *_self, PyObject *_args
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *MenuObj_GetMenuItemAttributes(MenuObject *_self, PyObject *_args)
 {
@@ -1928,9 +1712,6 @@ static PyObject *MenuObj_GetMenuItemAttributes(MenuObject *_self, PyObject *_arg
                             outAttributes);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *MenuObj_ChangeMenuItemAttributes(MenuObject *_self, PyObject *_args)
 {
@@ -1956,9 +1737,6 @@ static PyObject *MenuObj_ChangeMenuItemAttributes(MenuObject *_self, PyObject *_
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *MenuObj_DisableAllMenuItems(MenuObject *_self, PyObject *_args)
 {
@@ -1973,9 +1751,6 @@ static PyObject *MenuObj_DisableAllMenuItems(MenuObject *_self, PyObject *_args)
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *MenuObj_EnableAllMenuItems(MenuObject *_self, PyObject *_args)
 {
@@ -1990,9 +1765,6 @@ static PyObject *MenuObj_EnableAllMenuItems(MenuObject *_self, PyObject *_args)
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *MenuObj_MenuHasEnabledItems(MenuObject *_self, PyObject *_args)
 {
@@ -2008,9 +1780,6 @@ static PyObject *MenuObj_MenuHasEnabledItems(MenuObject *_self, PyObject *_args)
                             _rv);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *MenuObj_GetMenuType(MenuObject *_self, PyObject *_args)
 {
@@ -2029,9 +1798,6 @@ static PyObject *MenuObj_GetMenuType(MenuObject *_self, PyObject *_args)
                             outType);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *MenuObj_CountMenuItemsWithCommandID(MenuObject *_self, PyObject *_args)
 {
@@ -2050,9 +1816,6 @@ static PyObject *MenuObj_CountMenuItemsWithCommandID(MenuObject *_self, PyObject
                             _rv);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *MenuObj_GetIndMenuItemWithCommandID(MenuObject *_self, PyObject *_args)
 {
@@ -2080,9 +1843,6 @@ static PyObject *MenuObj_GetIndMenuItemWithCommandID(MenuObject *_self, PyObject
                             outIndex);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *MenuObj_EnableMenuCommand(MenuObject *_self, PyObject *_args)
 {
@@ -2100,9 +1860,6 @@ static PyObject *MenuObj_EnableMenuCommand(MenuObject *_self, PyObject *_args)
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *MenuObj_DisableMenuCommand(MenuObject *_self, PyObject *_args)
 {
@@ -2120,9 +1877,6 @@ static PyObject *MenuObj_DisableMenuCommand(MenuObject *_self, PyObject *_args)
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *MenuObj_IsMenuCommandEnabled(MenuObject *_self, PyObject *_args)
 {
@@ -2141,9 +1895,6 @@ static PyObject *MenuObj_IsMenuCommandEnabled(MenuObject *_self, PyObject *_args
                             _rv);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *MenuObj_SetMenuCommandMark(MenuObject *_self, PyObject *_args)
 {
@@ -2166,9 +1917,6 @@ static PyObject *MenuObj_SetMenuCommandMark(MenuObject *_self, PyObject *_args)
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *MenuObj_GetMenuCommandMark(MenuObject *_self, PyObject *_args)
 {
@@ -2190,9 +1938,6 @@ static PyObject *MenuObj_GetMenuCommandMark(MenuObject *_self, PyObject *_args)
                             outMark);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *MenuObj_GetMenuCommandPropertySize(MenuObject *_self, PyObject *_args)
 {
@@ -2220,9 +1965,6 @@ static PyObject *MenuObj_GetMenuCommandPropertySize(MenuObject *_self, PyObject
                             outSize);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *MenuObj_RemoveMenuCommandProperty(MenuObject *_self, PyObject *_args)
 {
@@ -2248,9 +1990,6 @@ static PyObject *MenuObj_RemoveMenuCommandProperty(MenuObject *_self, PyObject *
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *MenuObj_IsMenuItemInvalid(MenuObject *_self, PyObject *_args)
 {
@@ -2269,9 +2008,6 @@ static PyObject *MenuObj_IsMenuItemInvalid(MenuObject *_self, PyObject *_args)
                             _rv);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *MenuObj_InvalidateMenuItems(MenuObject *_self, PyObject *_args)
 {
@@ -2294,9 +2030,6 @@ static PyObject *MenuObj_InvalidateMenuItems(MenuObject *_self, PyObject *_args)
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *MenuObj_UpdateInvalidMenuItems(MenuObject *_self, PyObject *_args)
 {
@@ -2313,9 +2046,6 @@ static PyObject *MenuObj_UpdateInvalidMenuItems(MenuObject *_self, PyObject *_ar
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *MenuObj_CreateStandardFontMenu(MenuObject *_self, PyObject *_args)
 {
@@ -2343,9 +2073,6 @@ static PyObject *MenuObj_CreateStandardFontMenu(MenuObject *_self, PyObject *_ar
                             outHierMenuCount);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *MenuObj_UpdateStandardFontMenu(MenuObject *_self, PyObject *_args)
 {
@@ -2364,9 +2091,6 @@ static PyObject *MenuObj_UpdateStandardFontMenu(MenuObject *_self, PyObject *_ar
                             outHierMenuCount);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *MenuObj_GetFontFamilyFromMenuSelection(MenuObject *_self, PyObject *_args)
 {
@@ -2391,7 +2115,6 @@ static PyObject *MenuObj_GetFontFamilyFromMenuSelection(MenuObject *_self, PyObj
                             outStyle);
        return _res;
 }
-#endif
 
 static PyObject *MenuObj_GetMenuID(MenuObject *_self, PyObject *_args)
 {
@@ -2600,11 +2323,6 @@ static PyMethodDef MenuObj_methods[] = {
         PyDoc_STR("() -> None")},
        {"CalcMenuSize", (PyCFunction)MenuObj_CalcMenuSize, 1,
         PyDoc_STR("() -> None")},
-
-#if !TARGET_API_MAC_CARBON
-       {"CountMItems", (PyCFunction)MenuObj_CountMItems, 1,
-        PyDoc_STR("() -> (short _rv)")},
-#endif
        {"CountMenuItems", (PyCFunction)MenuObj_CountMenuItems, 1,
         PyDoc_STR("() -> (short _rv)")},
        {"GetMenuFont", (PyCFunction)MenuObj_GetMenuFont, 1,
@@ -2615,51 +2333,24 @@ static PyMethodDef MenuObj_methods[] = {
         PyDoc_STR("() -> (Boolean _rv)")},
        {"SetMenuExcludesMarkColumn", (PyCFunction)MenuObj_SetMenuExcludesMarkColumn, 1,
         PyDoc_STR("(Boolean excludesMark) -> None")},
-
-#if TARGET_API_MAC_CARBON
        {"IsValidMenu", (PyCFunction)MenuObj_IsValidMenu, 1,
         PyDoc_STR("() -> (Boolean _rv)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"GetMenuRetainCount", (PyCFunction)MenuObj_GetMenuRetainCount, 1,
         PyDoc_STR("() -> (ItemCount _rv)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"RetainMenu", (PyCFunction)MenuObj_RetainMenu, 1,
         PyDoc_STR("() -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"ReleaseMenu", (PyCFunction)MenuObj_ReleaseMenu, 1,
         PyDoc_STR("() -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"DuplicateMenu", (PyCFunction)MenuObj_DuplicateMenu, 1,
         PyDoc_STR("() -> (MenuHandle outMenu)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"CopyMenuTitleAsCFString", (PyCFunction)MenuObj_CopyMenuTitleAsCFString, 1,
         PyDoc_STR("() -> (CFStringRef outString)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"SetMenuTitleWithCFString", (PyCFunction)MenuObj_SetMenuTitleWithCFString, 1,
         PyDoc_STR("(CFStringRef inString) -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"InvalidateMenuSize", (PyCFunction)MenuObj_InvalidateMenuSize, 1,
         PyDoc_STR("() -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"IsMenuSizeInvalid", (PyCFunction)MenuObj_IsMenuSizeInvalid, 1,
         PyDoc_STR("() -> (Boolean _rv)")},
-#endif
        {"MacAppendMenu", (PyCFunction)MenuObj_MacAppendMenu, 1,
         PyDoc_STR("(Str255 data) -> None")},
        {"InsertResMenu", (PyCFunction)MenuObj_InsertResMenu, 1,
@@ -2678,50 +2369,24 @@ static PyMethodDef MenuObj_methods[] = {
         PyDoc_STR("(Str255 inString) -> None")},
        {"InsertMenuItemText", (PyCFunction)MenuObj_InsertMenuItemText, 1,
         PyDoc_STR("(Str255 inString, MenuItemIndex afterItem) -> None")},
-
-#if TARGET_API_MAC_CARBON
        {"CopyMenuItems", (PyCFunction)MenuObj_CopyMenuItems, 1,
         PyDoc_STR("(MenuItemIndex inFirstItem, ItemCount inNumItems, MenuHandle inDestMenu, MenuItemIndex inInsertAfter) -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"DeleteMenuItems", (PyCFunction)MenuObj_DeleteMenuItems, 1,
         PyDoc_STR("(MenuItemIndex inFirstItem, ItemCount inNumItems) -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"AppendMenuItemTextWithCFString", (PyCFunction)MenuObj_AppendMenuItemTextWithCFString, 1,
         PyDoc_STR("(CFStringRef inString, MenuItemAttributes inAttributes, MenuCommand inCommandID) -> (MenuItemIndex outNewItem)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"InsertMenuItemTextWithCFString", (PyCFunction)MenuObj_InsertMenuItemTextWithCFString, 1,
         PyDoc_STR("(CFStringRef inString, MenuItemIndex inAfterItem, MenuItemAttributes inAttributes, MenuCommand inCommandID) -> None")},
-#endif
        {"PopUpMenuSelect", (PyCFunction)MenuObj_PopUpMenuSelect, 1,
         PyDoc_STR("(short top, short left, short popUpItem) -> (long _rv)")},
-
-#if TARGET_API_MAC_CARBON
        {"InvalidateMenuEnabling", (PyCFunction)MenuObj_InvalidateMenuEnabling, 1,
         PyDoc_STR("() -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"IsMenuBarInvalid", (PyCFunction)MenuObj_IsMenuBarInvalid, 1,
         PyDoc_STR("() -> (Boolean _rv)")},
-#endif
        {"MacInsertMenu", (PyCFunction)MenuObj_MacInsertMenu, 1,
         PyDoc_STR("(MenuID beforeID) -> None")},
-
-#if TARGET_API_MAC_CARBON
        {"SetRootMenu", (PyCFunction)MenuObj_SetRootMenu, 1,
         PyDoc_STR("() -> None")},
-#endif
-
-#if !TARGET_API_MAC_CARBON
-       {"CheckItem", (PyCFunction)MenuObj_CheckItem, 1,
-        PyDoc_STR("(short item, Boolean checked) -> None")},
-#endif
        {"MacCheckMenuItem", (PyCFunction)MenuObj_MacCheckMenuItem, 1,
         PyDoc_STR("(short item, Boolean checked) -> None")},
        {"SetMenuItemText", (PyCFunction)MenuObj_SetMenuItemText, 1,
@@ -2744,16 +2409,6 @@ static PyMethodDef MenuObj_methods[] = {
         PyDoc_STR("(short item, StyleParameter chStyle) -> None")},
        {"GetItemStyle", (PyCFunction)MenuObj_GetItemStyle, 1,
         PyDoc_STR("(short item) -> (Style chStyle)")},
-
-#if !TARGET_API_MAC_CARBON
-       {"DisableItem", (PyCFunction)MenuObj_DisableItem, 1,
-        PyDoc_STR("(short item) -> None")},
-#endif
-
-#if !TARGET_API_MAC_CARBON
-       {"EnableItem", (PyCFunction)MenuObj_EnableItem, 1,
-        PyDoc_STR("(short item) -> None")},
-#endif
        {"SetMenuItemCommandID", (PyCFunction)MenuObj_SetMenuItemCommandID, 1,
         PyDoc_STR("(SInt16 inItem, MenuCommand inCommandID) -> None")},
        {"GetMenuItemCommandID", (PyCFunction)MenuObj_GetMenuItemCommandID, 1,
@@ -2782,16 +2437,6 @@ static PyMethodDef MenuObj_methods[] = {
         PyDoc_STR("(SInt16 inItem, UInt32 inRefCon) -> None")},
        {"GetMenuItemRefCon", (PyCFunction)MenuObj_GetMenuItemRefCon, 1,
         PyDoc_STR("(SInt16 inItem) -> (UInt32 outRefCon)")},
-
-#if !TARGET_API_MAC_CARBON
-       {"SetMenuItemRefCon2", (PyCFunction)MenuObj_SetMenuItemRefCon2, 1,
-        PyDoc_STR("(SInt16 inItem, UInt32 inRefCon2) -> None")},
-#endif
-
-#if !TARGET_API_MAC_CARBON
-       {"GetMenuItemRefCon2", (PyCFunction)MenuObj_GetMenuItemRefCon2, 1,
-        PyDoc_STR("(SInt16 inItem) -> (UInt32 outRefCon2)")},
-#endif
        {"SetMenuItemKeyGlyph", (PyCFunction)MenuObj_SetMenuItemKeyGlyph, 1,
         PyDoc_STR("(SInt16 inItem, SInt16 inGlyph) -> None")},
        {"GetMenuItemKeyGlyph", (PyCFunction)MenuObj_GetMenuItemKeyGlyph, 1,
@@ -2808,171 +2453,72 @@ static PyMethodDef MenuObj_methods[] = {
         PyDoc_STR("(MenuItemIndex item) -> None")},
        {"IsMenuItemIconEnabled", (PyCFunction)MenuObj_IsMenuItemIconEnabled, 1,
         PyDoc_STR("(MenuItemIndex item) -> (Boolean _rv)")},
-
-#if TARGET_API_MAC_CARBON
        {"SetMenuItemHierarchicalMenu", (PyCFunction)MenuObj_SetMenuItemHierarchicalMenu, 1,
         PyDoc_STR("(MenuItemIndex inItem, MenuHandle inHierMenu) -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"GetMenuItemHierarchicalMenu", (PyCFunction)MenuObj_GetMenuItemHierarchicalMenu, 1,
         PyDoc_STR("(MenuItemIndex inItem) -> (MenuHandle outHierMenu)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"CopyMenuItemTextAsCFString", (PyCFunction)MenuObj_CopyMenuItemTextAsCFString, 1,
         PyDoc_STR("(MenuItemIndex inItem) -> (CFStringRef outString)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"SetMenuItemTextWithCFString", (PyCFunction)MenuObj_SetMenuItemTextWithCFString, 1,
         PyDoc_STR("(MenuItemIndex inItem, CFStringRef inString) -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"GetMenuItemIndent", (PyCFunction)MenuObj_GetMenuItemIndent, 1,
         PyDoc_STR("(MenuItemIndex inItem) -> (UInt32 outIndent)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"SetMenuItemIndent", (PyCFunction)MenuObj_SetMenuItemIndent, 1,
         PyDoc_STR("(MenuItemIndex inItem, UInt32 inIndent) -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"GetMenuItemCommandKey", (PyCFunction)MenuObj_GetMenuItemCommandKey, 1,
         PyDoc_STR("(MenuItemIndex inItem, Boolean inGetVirtualKey) -> (UInt16 outKey)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"SetMenuItemCommandKey", (PyCFunction)MenuObj_SetMenuItemCommandKey, 1,
         PyDoc_STR("(MenuItemIndex inItem, Boolean inSetVirtualKey, UInt16 inKey) -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"GetMenuItemPropertyAttributes", (PyCFunction)MenuObj_GetMenuItemPropertyAttributes, 1,
         PyDoc_STR("(MenuItemIndex item, OSType propertyCreator, OSType propertyTag) -> (UInt32 attributes)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"ChangeMenuItemPropertyAttributes", (PyCFunction)MenuObj_ChangeMenuItemPropertyAttributes, 1,
         PyDoc_STR("(MenuItemIndex item, OSType propertyCreator, OSType propertyTag, UInt32 attributesToSet, UInt32 attributesToClear) -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"GetMenuAttributes", (PyCFunction)MenuObj_GetMenuAttributes, 1,
         PyDoc_STR("() -> (MenuAttributes outAttributes)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"ChangeMenuAttributes", (PyCFunction)MenuObj_ChangeMenuAttributes, 1,
         PyDoc_STR("(MenuAttributes setTheseAttributes, MenuAttributes clearTheseAttributes) -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"GetMenuItemAttributes", (PyCFunction)MenuObj_GetMenuItemAttributes, 1,
         PyDoc_STR("(MenuItemIndex item) -> (MenuItemAttributes outAttributes)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"ChangeMenuItemAttributes", (PyCFunction)MenuObj_ChangeMenuItemAttributes, 1,
         PyDoc_STR("(MenuItemIndex item, MenuItemAttributes setTheseAttributes, MenuItemAttributes clearTheseAttributes) -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"DisableAllMenuItems", (PyCFunction)MenuObj_DisableAllMenuItems, 1,
         PyDoc_STR("() -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"EnableAllMenuItems", (PyCFunction)MenuObj_EnableAllMenuItems, 1,
         PyDoc_STR("() -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"MenuHasEnabledItems", (PyCFunction)MenuObj_MenuHasEnabledItems, 1,
         PyDoc_STR("() -> (Boolean _rv)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"GetMenuType", (PyCFunction)MenuObj_GetMenuType, 1,
         PyDoc_STR("() -> (UInt16 outType)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"CountMenuItemsWithCommandID", (PyCFunction)MenuObj_CountMenuItemsWithCommandID, 1,
         PyDoc_STR("(MenuCommand inCommandID) -> (ItemCount _rv)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"GetIndMenuItemWithCommandID", (PyCFunction)MenuObj_GetIndMenuItemWithCommandID, 1,
         PyDoc_STR("(MenuCommand inCommandID, UInt32 inItemIndex) -> (MenuHandle outMenu, MenuItemIndex outIndex)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"EnableMenuCommand", (PyCFunction)MenuObj_EnableMenuCommand, 1,
         PyDoc_STR("(MenuCommand inCommandID) -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"DisableMenuCommand", (PyCFunction)MenuObj_DisableMenuCommand, 1,
         PyDoc_STR("(MenuCommand inCommandID) -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"IsMenuCommandEnabled", (PyCFunction)MenuObj_IsMenuCommandEnabled, 1,
         PyDoc_STR("(MenuCommand inCommandID) -> (Boolean _rv)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"SetMenuCommandMark", (PyCFunction)MenuObj_SetMenuCommandMark, 1,
         PyDoc_STR("(MenuCommand inCommandID, UniChar inMark) -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"GetMenuCommandMark", (PyCFunction)MenuObj_GetMenuCommandMark, 1,
         PyDoc_STR("(MenuCommand inCommandID) -> (UniChar outMark)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"GetMenuCommandPropertySize", (PyCFunction)MenuObj_GetMenuCommandPropertySize, 1,
         PyDoc_STR("(MenuCommand inCommandID, OSType inPropertyCreator, OSType inPropertyTag) -> (ByteCount outSize)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"RemoveMenuCommandProperty", (PyCFunction)MenuObj_RemoveMenuCommandProperty, 1,
         PyDoc_STR("(MenuCommand inCommandID, OSType inPropertyCreator, OSType inPropertyTag) -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"IsMenuItemInvalid", (PyCFunction)MenuObj_IsMenuItemInvalid, 1,
         PyDoc_STR("(MenuItemIndex item) -> (Boolean _rv)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"InvalidateMenuItems", (PyCFunction)MenuObj_InvalidateMenuItems, 1,
         PyDoc_STR("(MenuItemIndex firstItem, ItemCount numItems) -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"UpdateInvalidMenuItems", (PyCFunction)MenuObj_UpdateInvalidMenuItems, 1,
         PyDoc_STR("() -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"CreateStandardFontMenu", (PyCFunction)MenuObj_CreateStandardFontMenu, 1,
         PyDoc_STR("(MenuItemIndex afterItem, MenuID firstHierMenuID, OptionBits options) -> (ItemCount outHierMenuCount)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"UpdateStandardFontMenu", (PyCFunction)MenuObj_UpdateStandardFontMenu, 1,
         PyDoc_STR("() -> (ItemCount outHierMenuCount)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"GetFontFamilyFromMenuSelection", (PyCFunction)MenuObj_GetFontFamilyFromMenuSelection, 1,
         PyDoc_STR("(MenuItemIndex item) -> (FMFontFamily outFontFamily, FMFontStyle outStyle)")},
-#endif
        {"GetMenuID", (PyCFunction)MenuObj_GetMenuID, 1,
         PyDoc_STR("() -> (MenuID _rv)")},
        {"GetMenuWidth", (PyCFunction)MenuObj_GetMenuWidth, 1,
@@ -3074,42 +2620,6 @@ PyTypeObject Menu_Type = {
 /* ---------------------- End object type Menu ---------------------- */
 
 
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *Menu_InitProcMenu(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short resID;
-#ifndef InitProcMenu
-       PyMac_PRECHECK(InitProcMenu);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &resID))
-               return NULL;
-       InitProcMenu(resID);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-#endif
-
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *Menu_InitMenus(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef InitMenus
-       PyMac_PRECHECK(InitMenus);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       InitMenus();
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-#endif
-
 static PyObject *Menu_NewMenu(PyObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -3147,8 +2657,6 @@ static PyObject *Menu_MacGetMenu(PyObject *_self, PyObject *_args)
        return _res;
 }
 
-#if TARGET_API_MAC_CARBON
-
 static PyObject *Menu_CreateNewMenu(PyObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -3171,7 +2679,6 @@ static PyObject *Menu_CreateNewMenu(PyObject *_self, PyObject *_args)
                             MenuObj_New, outMenuRef);
        return _res;
 }
-#endif
 
 static PyObject *Menu_MenuKey(PyObject *_self, PyObject *_args)
 {
@@ -3346,8 +2853,6 @@ static PyObject *Menu_SetMenuBar(PyObject *_self, PyObject *_args)
        return _res;
 }
 
-#if TARGET_API_MAC_CARBON
-
 static PyObject *Menu_DuplicateMenuBar(PyObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -3367,9 +2872,6 @@ static PyObject *Menu_DuplicateMenuBar(PyObject *_self, PyObject *_args)
                             ResObj_New, outMbar);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *Menu_DisposeMenuBar(PyObject *_self, PyObject *_args)
 {
@@ -3388,7 +2890,6 @@ static PyObject *Menu_DisposeMenuBar(PyObject *_self, PyObject *_args)
        _res = Py_None;
        return _res;
 }
-#endif
 
 static PyObject *Menu_GetMenuHandle(PyObject *_self, PyObject *_args)
 {
@@ -3437,25 +2938,6 @@ static PyObject *Menu_ClearMenuBar(PyObject *_self, PyObject *_args)
        return _res;
 }
 
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *Menu_SetMenuFlash(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short count;
-#ifndef SetMenuFlash
-       PyMac_PRECHECK(SetMenuFlash);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &count))
-               return NULL;
-       SetMenuFlash(count);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-#endif
-
 static PyObject *Menu_SetMenuFlashCount(PyObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -3488,45 +2970,6 @@ static PyObject *Menu_FlashMenuBar(PyObject *_self, PyObject *_args)
        return _res;
 }
 
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *Menu_SystemEdit(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       short editCmd;
-#ifndef SystemEdit
-       PyMac_PRECHECK(SystemEdit);
-#endif
-       if (!PyArg_ParseTuple(_args, "h",
-                             &editCmd))
-               return NULL;
-       _rv = SystemEdit(editCmd);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-#endif
-
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *Menu_SystemMenu(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long menuResult;
-#ifndef SystemMenu
-       PyMac_PRECHECK(SystemMenu);
-#endif
-       if (!PyArg_ParseTuple(_args, "l",
-                             &menuResult))
-               return NULL;
-       SystemMenu(menuResult);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-#endif
-
 static PyObject *Menu_IsMenuBarVisible(PyObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -3570,8 +3013,6 @@ static PyObject *Menu_HideMenuBar(PyObject *_self, PyObject *_args)
        return _res;
 }
 
-#if TARGET_API_MAC_CARBON
-
 static PyObject *Menu_AcquireRootMenu(PyObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -3586,7 +3027,6 @@ static PyObject *Menu_AcquireRootMenu(PyObject *_self, PyObject *_args)
                             MenuObj_New, _rv);
        return _res;
 }
-#endif
 
 static PyObject *Menu_DeleteMCEntries(PyObject *_self, PyObject *_args)
 {
@@ -3655,25 +3095,6 @@ static PyObject *Menu_LMGetTheMenu(PyObject *_self, PyObject *_args)
        return _res;
 }
 
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *Menu_OpenDeskAcc(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Str255 name;
-#ifndef OpenDeskAcc
-       PyMac_PRECHECK(OpenDeskAcc);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetStr255, name))
-               return NULL;
-       OpenDeskAcc(name);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-#endif
-
 static PyObject *Menu_as_Menu(PyObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -3738,8 +3159,6 @@ static PyObject *Menu_DrawMenuBar(PyObject *_self, PyObject *_args)
        return _res;
 }
 
-#if TARGET_API_MAC_CARBON
-
 static PyObject *Menu_CountMenuItemsWithCommandID(PyObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -3759,9 +3178,6 @@ static PyObject *Menu_CountMenuItemsWithCommandID(PyObject *_self, PyObject *_ar
                             _rv);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *Menu_GetIndMenuItemWithCommandID(PyObject *_self, PyObject *_args)
 {
@@ -3791,9 +3207,6 @@ static PyObject *Menu_GetIndMenuItemWithCommandID(PyObject *_self, PyObject *_ar
                             outIndex);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *Menu_EnableMenuCommand(PyObject *_self, PyObject *_args)
 {
@@ -3813,9 +3226,6 @@ static PyObject *Menu_EnableMenuCommand(PyObject *_self, PyObject *_args)
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *Menu_DisableMenuCommand(PyObject *_self, PyObject *_args)
 {
@@ -3835,9 +3245,6 @@ static PyObject *Menu_DisableMenuCommand(PyObject *_self, PyObject *_args)
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *Menu_IsMenuCommandEnabled(PyObject *_self, PyObject *_args)
 {
@@ -3858,9 +3265,6 @@ static PyObject *Menu_IsMenuCommandEnabled(PyObject *_self, PyObject *_args)
                             _rv);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *Menu_SetMenuCommandMark(PyObject *_self, PyObject *_args)
 {
@@ -3885,9 +3289,6 @@ static PyObject *Menu_SetMenuCommandMark(PyObject *_self, PyObject *_args)
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *Menu_GetMenuCommandMark(PyObject *_self, PyObject *_args)
 {
@@ -3911,9 +3312,6 @@ static PyObject *Menu_GetMenuCommandMark(PyObject *_self, PyObject *_args)
                             outMark);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *Menu_GetMenuCommandPropertySize(PyObject *_self, PyObject *_args)
 {
@@ -3943,9 +3341,6 @@ static PyObject *Menu_GetMenuCommandPropertySize(PyObject *_self, PyObject *_arg
                             outSize);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *Menu_RemoveMenuCommandProperty(PyObject *_self, PyObject *_args)
 {
@@ -3973,28 +3368,14 @@ static PyObject *Menu_RemoveMenuCommandProperty(PyObject *_self, PyObject *_args
        _res = Py_None;
        return _res;
 }
-#endif
 
 static PyMethodDef Menu_methods[] = {
-
-#if !TARGET_API_MAC_CARBON
-       {"InitProcMenu", (PyCFunction)Menu_InitProcMenu, 1,
-        PyDoc_STR("(short resID) -> None")},
-#endif
-
-#if !TARGET_API_MAC_CARBON
-       {"InitMenus", (PyCFunction)Menu_InitMenus, 1,
-        PyDoc_STR("() -> None")},
-#endif
        {"NewMenu", (PyCFunction)Menu_NewMenu, 1,
         PyDoc_STR("(MenuID menuID, Str255 menuTitle) -> (MenuHandle _rv)")},
        {"MacGetMenu", (PyCFunction)Menu_MacGetMenu, 1,
         PyDoc_STR("(short resourceID) -> (MenuHandle _rv)")},
-
-#if TARGET_API_MAC_CARBON
        {"CreateNewMenu", (PyCFunction)Menu_CreateNewMenu, 1,
         PyDoc_STR("(MenuID inMenuID, MenuAttributes inMenuAttributes) -> (MenuHandle outMenuRef)")},
-#endif
        {"MenuKey", (PyCFunction)Menu_MenuKey, 1,
         PyDoc_STR("(CharParameter ch) -> (long _rv)")},
        {"MenuSelect", (PyCFunction)Menu_MenuSelect, 1,
@@ -4017,52 +3398,28 @@ static PyMethodDef Menu_methods[] = {
         PyDoc_STR("() -> (MenuBarHandle _rv)")},
        {"SetMenuBar", (PyCFunction)Menu_SetMenuBar, 1,
         PyDoc_STR("(MenuBarHandle mbar) -> None")},
-
-#if TARGET_API_MAC_CARBON
        {"DuplicateMenuBar", (PyCFunction)Menu_DuplicateMenuBar, 1,
         PyDoc_STR("(MenuBarHandle inMbar) -> (MenuBarHandle outMbar)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"DisposeMenuBar", (PyCFunction)Menu_DisposeMenuBar, 1,
         PyDoc_STR("(MenuBarHandle inMbar) -> None")},
-#endif
        {"GetMenuHandle", (PyCFunction)Menu_GetMenuHandle, 1,
         PyDoc_STR("(MenuID menuID) -> (MenuHandle _rv)")},
        {"MacDeleteMenu", (PyCFunction)Menu_MacDeleteMenu, 1,
         PyDoc_STR("(MenuID menuID) -> None")},
        {"ClearMenuBar", (PyCFunction)Menu_ClearMenuBar, 1,
         PyDoc_STR("() -> None")},
-
-#if !TARGET_API_MAC_CARBON
-       {"SetMenuFlash", (PyCFunction)Menu_SetMenuFlash, 1,
-        PyDoc_STR("(short count) -> None")},
-#endif
        {"SetMenuFlashCount", (PyCFunction)Menu_SetMenuFlashCount, 1,
         PyDoc_STR("(short count) -> None")},
        {"FlashMenuBar", (PyCFunction)Menu_FlashMenuBar, 1,
         PyDoc_STR("(MenuID menuID) -> None")},
-
-#if !TARGET_API_MAC_CARBON
-       {"SystemEdit", (PyCFunction)Menu_SystemEdit, 1,
-        PyDoc_STR("(short editCmd) -> (Boolean _rv)")},
-#endif
-
-#if !TARGET_API_MAC_CARBON
-       {"SystemMenu", (PyCFunction)Menu_SystemMenu, 1,
-        PyDoc_STR("(long menuResult) -> None")},
-#endif
        {"IsMenuBarVisible", (PyCFunction)Menu_IsMenuBarVisible, 1,
         PyDoc_STR("() -> (Boolean _rv)")},
        {"ShowMenuBar", (PyCFunction)Menu_ShowMenuBar, 1,
         PyDoc_STR("() -> None")},
        {"HideMenuBar", (PyCFunction)Menu_HideMenuBar, 1,
         PyDoc_STR("() -> None")},
-
-#if TARGET_API_MAC_CARBON
        {"AcquireRootMenu", (PyCFunction)Menu_AcquireRootMenu, 1,
         PyDoc_STR("() -> (MenuHandle _rv)")},
-#endif
        {"DeleteMCEntries", (PyCFunction)Menu_DeleteMCEntries, 1,
         PyDoc_STR("(MenuID menuID, short menuItem) -> None")},
        {"InitContextualMenus", (PyCFunction)Menu_InitContextualMenus, 1,
@@ -4071,11 +3428,6 @@ static PyMethodDef Menu_methods[] = {
         PyDoc_STR("(EventRecord inEvent) -> (Boolean _rv)")},
        {"LMGetTheMenu", (PyCFunction)Menu_LMGetTheMenu, 1,
         PyDoc_STR("() -> (SInt16 _rv)")},
-
-#if !TARGET_API_MAC_CARBON
-       {"OpenDeskAcc", (PyCFunction)Menu_OpenDeskAcc, 1,
-        PyDoc_STR("(Str255 name) -> None")},
-#endif
        {"as_Menu", (PyCFunction)Menu_as_Menu, 1,
         PyDoc_STR("(Handle h) -> (MenuHandle _rv)")},
        {"GetMenu", (PyCFunction)Menu_GetMenu, 1,
@@ -4084,51 +3436,24 @@ static PyMethodDef Menu_methods[] = {
         PyDoc_STR("(short menuID) -> None")},
        {"DrawMenuBar", (PyCFunction)Menu_DrawMenuBar, 1,
         PyDoc_STR("() -> None")},
-
-#if TARGET_API_MAC_CARBON
        {"CountMenuItemsWithCommandID", (PyCFunction)Menu_CountMenuItemsWithCommandID, 1,
         PyDoc_STR("(MenuHandle inMenu, MenuCommand inCommandID) -> (ItemCount _rv)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"GetIndMenuItemWithCommandID", (PyCFunction)Menu_GetIndMenuItemWithCommandID, 1,
         PyDoc_STR("(MenuHandle inMenu, MenuCommand inCommandID, UInt32 inItemIndex) -> (MenuHandle outMenu, MenuItemIndex outIndex)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"EnableMenuCommand", (PyCFunction)Menu_EnableMenuCommand, 1,
         PyDoc_STR("(MenuHandle inMenu, MenuCommand inCommandID) -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"DisableMenuCommand", (PyCFunction)Menu_DisableMenuCommand, 1,
         PyDoc_STR("(MenuHandle inMenu, MenuCommand inCommandID) -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"IsMenuCommandEnabled", (PyCFunction)Menu_IsMenuCommandEnabled, 1,
         PyDoc_STR("(MenuHandle inMenu, MenuCommand inCommandID) -> (Boolean _rv)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"SetMenuCommandMark", (PyCFunction)Menu_SetMenuCommandMark, 1,
         PyDoc_STR("(MenuHandle inMenu, MenuCommand inCommandID, UniChar inMark) -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"GetMenuCommandMark", (PyCFunction)Menu_GetMenuCommandMark, 1,
         PyDoc_STR("(MenuHandle inMenu, MenuCommand inCommandID) -> (UniChar outMark)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"GetMenuCommandPropertySize", (PyCFunction)Menu_GetMenuCommandPropertySize, 1,
         PyDoc_STR("(MenuHandle inMenu, MenuCommand inCommandID, OSType inPropertyCreator, OSType inPropertyTag) -> (ByteCount outSize)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"RemoveMenuCommandProperty", (PyCFunction)Menu_RemoveMenuCommandProperty, 1,
         PyDoc_STR("(MenuHandle inMenu, MenuCommand inCommandID, OSType inPropertyCreator, OSType inPropertyTag) -> None")},
-#endif
        {NULL, NULL, 0}
 };
 
index d1f1f24a6b311db0e504d9d6d6cfb8174ff741eb..f613d8b5ccbecbdac65f3966f5837d2b56cb2c39 100644 (file)
@@ -1,9 +1,3 @@
-f = Function(void, 'OpenDeskAcc',
-       (Str255, 'name', InMode),
-       condition='#if !TARGET_API_MAC_CARBON'
-)
-functions.append(f)
-
 f = Function(MenuHandle, 'as_Menu', (Handle, 'h', InMode))
 functions.append(f)
 
@@ -67,7 +61,6 @@ functions.append(f)
 f = Function(ItemCount, 'CountMenuItemsWithCommandID',
     (OptMenuRef, 'inMenu', InMode),
     (MenuCommand, 'inCommandID', InMode),
-    condition='#if TARGET_API_MAC_CARBON',
 )
 functions.append(f)
 
@@ -77,28 +70,24 @@ f = Function(OSStatus, 'GetIndMenuItemWithCommandID',
     (UInt32, 'inItemIndex', InMode),
     (MenuRef, 'outMenu', OutMode),
     (MenuItemIndex, 'outIndex', OutMode),
-    condition='#if TARGET_API_MAC_CARBON',
 )
 functions.append(f)
 
 f = Function(void, 'EnableMenuCommand',
     (OptMenuRef, 'inMenu', InMode),
     (MenuCommand, 'inCommandID', InMode),
-    condition='#if TARGET_API_MAC_CARBON',
 )
 functions.append(f)
 
 f = Function(void, 'DisableMenuCommand',
     (OptMenuRef, 'inMenu', InMode),
     (MenuCommand, 'inCommandID', InMode),
-    condition='#if TARGET_API_MAC_CARBON',
 )
 functions.append(f)
 
 f = Function(Boolean, 'IsMenuCommandEnabled',
     (OptMenuRef, 'inMenu', InMode),
     (MenuCommand, 'inCommandID', InMode),
-    condition='#if TARGET_API_MAC_CARBON',
 )
 functions.append(f)
 
@@ -106,7 +95,6 @@ f = Function(OSStatus, 'SetMenuCommandMark',
     (OptMenuRef, 'inMenu', InMode),
     (MenuCommand, 'inCommandID', InMode),
     (UniChar, 'inMark', InMode),
-    condition='#if TARGET_API_MAC_CARBON',
 )
 functions.append(f)
 
@@ -114,7 +102,6 @@ f = Function(OSStatus, 'GetMenuCommandMark',
     (OptMenuRef, 'inMenu', InMode),
     (MenuCommand, 'inCommandID', InMode),
     (UniChar, 'outMark', OutMode),
-    condition='#if TARGET_API_MAC_CARBON',
 )
 functions.append(f)
 
@@ -124,7 +111,6 @@ f = Function(OSStatus, 'GetMenuCommandPropertySize',
     (OSType, 'inPropertyCreator', InMode),
     (OSType, 'inPropertyTag', InMode),
     (ByteCount, 'outSize', OutMode),
-    condition='#if TARGET_API_MAC_CARBON',
 )
 functions.append(f)
 
@@ -133,7 +119,6 @@ f = Function(OSStatus, 'RemoveMenuCommandProperty',
     (MenuCommand, 'inCommandID', InMode),
     (OSType, 'inPropertyCreator', InMode),
     (OSType, 'inPropertyTag', InMode),
-    condition='#if TARGET_API_MAC_CARBON',
 )
 functions.append(f)
 
index 60c691525f1cec39b337faadb13de691f5351ee7..281cc8693efcaf10def902966f7439f8abb581cb 100644 (file)
@@ -44,80 +44,21 @@ class MyScanner(Scanner):
                        "GetMenuTitle", # Funny arg/returnvalue
                        "SetMenuTitle",
                        "SetMenuTitleIcon", # void*
+                       # OS8 calls:
+                       'GetMenuItemRefCon2',
+                       'SetMenuItemRefCon2',
+                       'EnableItem',
+                       'DisableItem',
+                       'CheckItem',
+                       'CountMItems',
+                       'OpenDeskAcc',
+                       'SystemEdit',
+                       'SystemMenu',
+                       'SetMenuFlash',
+                       'InitMenus',
+                       'InitProcMenu',
                        ]
 
-       def makegreylist(self):
-               return [
-                       ('#if !TARGET_API_MAC_CARBON', [
-                               'GetMenuItemRefCon2',
-                               'SetMenuItemRefCon2',
-                               'EnableItem',
-                               'DisableItem',
-                               'CheckItem',
-                               'CountMItems',
-                               'OpenDeskAcc',
-                               'SystemEdit',
-                               'SystemMenu',
-                               'SetMenuFlash',
-                               'InitMenus',
-                               'InitProcMenu',
-                       ]),
-                       ('#if TARGET_API_MAC_CARBON', [
-                               'DisposeMenuBar',
-                               'DuplicateMenuBar',
-                               'CreateNewMenu',
-                               'GetFontFamilyFromMenuSelection',
-                               'UpdateStandardFontMenu',
-                               'CreateStandardFontMenu',
-                               'RemoveMenuCommandProperty',
-                               'GetMenuCommandPropertySize',
-                               'IsMenuCommandEnabled',
-                               'DisableMenuCommand',
-                               'EnableMenuCommand',
-                               'GetIndMenuItemWithCommandID',
-                               'CountMenuItemsWithCommandID',
-                               'MenuHasEnabledItems',
-                               'EnableAllMenuItems',
-                               'DisableAllMenuItems',
-                               'ChangeMenuItemAttributes',
-                               'GetMenuItemAttributes',
-                               'ChangeMenuAttributes',
-                               'GetMenuAttributes',
-                               'ChangeMenuItemPropertyAttributes',
-                               'GetMenuItemPropertyAttributes',
-                               'AcquireRootMenu',
-                               'UpdateInvalidMenuItems',
-                               'InvalidateMenuItems',
-                               'IsMenuItemInvalid',
-                               'GetMenuCommandMark',
-                               'SetMenuCommandMark',
-                               'GetMenuType',
-                               'SetMenuItemCommandKey',
-                               'GetMenuItemCommandKey',
-                               'SetMenuItemIndent',
-                               'GetMenuItemIndent',
-                               'SetMenuItemTextWithCFString',
-                               'CopyMenuItemTextAsCFString',
-                               'GetMenuItemHierarchicalMenu',
-                               'SetMenuItemHierarchicalMenu',
-                               'SetRootMenu',
-                               'IsMenuBarInvalid',
-                               'InvalidateMenuEnabling',
-                               'InsertMenuItemTextWithCFString',
-                               'AppendMenuItemTextWithCFString',
-                               'DeleteMenuItems',
-                               'CopyMenuItems',
-                               'IsMenuSizeInvalid',
-                               'InvalidateMenuSize',
-                               'SetMenuTitleWithCFString',
-                               'CopyMenuTitleAsCFString',
-                               'DuplicateMenu',
-                               'ReleaseMenu',
-                               'RetainMenu',
-                               'GetMenuRetainCount',
-                               'IsValidMenu',
-                       ])]
-                       
        def makeblacklisttypes(self):
                return [
                        'MCTableHandle',
index 83bbbf8432c2833b2e7bb3cbce0d68bdb28c6b1e..f481f52c7a5ab0f9b0ba0319edc0c91c56475355 100644 (file)
@@ -245,27 +245,6 @@ static PyObject *TXNObj_TXNClick(TXNObjectObject *_self, PyObject *_args)
        return _res;
 }
 
-#if TARGET_API_MAC_OS8
-
-static PyObject *TXNObj_TXNTSMCheck(TXNObjectObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       EventRecord ioEvent;
-#ifndef TXNTSMCheck
-       PyMac_PRECHECK(TXNTSMCheck);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = TXNTSMCheck(_self->ob_itself,
-                         &ioEvent);
-       _res = Py_BuildValue("bO&",
-                            _rv,
-                            PyMac_BuildEventRecord, &ioEvent);
-       return _res;
-}
-#endif
-
 static PyObject *TXNObj_TXNSelectAll(TXNObjectObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -1193,11 +1172,6 @@ static PyMethodDef TXNObj_methods[] = {
         PyDoc_STR("(RgnHandle ioCursorRgn) -> None")},
        {"TXNClick", (PyCFunction)TXNObj_TXNClick, 1,
         PyDoc_STR("(EventRecord iEvent) -> None")},
-
-#if TARGET_API_MAC_OS8
-       {"TXNTSMCheck", (PyCFunction)TXNObj_TXNTSMCheck, 1,
-        PyDoc_STR("() -> (Boolean _rv, EventRecord ioEvent)")},
-#endif
        {"TXNSelectAll", (PyCFunction)TXNObj_TXNSelectAll, 1,
         PyDoc_STR("() -> None")},
        {"TXNFocus", (PyCFunction)TXNObj_TXNFocus, 1,
index f6c93e208aa090599dfcd24d38160b6ad6f534f7..9bd1dfcdc752d09018e75e488b9705dab0481064 100644 (file)
@@ -78,12 +78,12 @@ kTXNFontSizeAttributeSize = 4
                        "kTXNFontSizeAttributeSize",
                        "status",
                        "justification",
+                       'TXNTSMCheck', # OS8
                        ]
 
        def makegreylist(self):
                return [
                        ('#if TARGET_API_MAC_OS8', [
-                               'TXNTSMCheck',
                        ])]
 
 
index a1be3462ba292a5785b49385829f216d509c7739..0db52995f1ad1f66d05ab3e23f96f72f77d1a339 100644 (file)
@@ -105,12 +105,6 @@ extern int _QdRGB_Convert(PyObject *, RGBColorPtr);
 
 #endif /* ACCESSOR_CALLS_ARE_FUNCTIONS */
 
-#if !TARGET_API_MAC_CARBON
-#define QDFlushPortBuffer(port, rgn) /* pass */
-#define QDIsPortBufferDirty(port) 0
-#define QDIsPortBuffered(port) 0
-#endif /* !TARGET_API_MAC_CARBON  */
-
 static PyObject *BMObj_NewCopied(BitMapPtr);
 
 /*
@@ -219,8 +213,6 @@ static PyObject *GrafObj_MacSetPort(GrafPortObject *_self, PyObject *_args)
        return _res;
 }
 
-#if TARGET_API_MAC_CARBON
-
 static PyObject *GrafObj_IsValidPort(GrafPortObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -235,7 +227,6 @@ static PyObject *GrafObj_IsValidPort(GrafPortObject *_self, PyObject *_args)
                             _rv);
        return _res;
 }
-#endif
 
 static PyObject *GrafObj_GetPortPixMap(GrafPortObject *_self, PyObject *_args)
 {
@@ -636,8 +627,6 @@ static PyObject *GrafObj_IsPortPictureBeingDefined(GrafPortObject *_self, PyObje
        return _res;
 }
 
-#if TARGET_API_MAC_CARBON
-
 static PyObject *GrafObj_IsPortPolyBeingDefined(GrafPortObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -652,9 +641,6 @@ static PyObject *GrafObj_IsPortPolyBeingDefined(GrafPortObject *_self, PyObject
                             _rv);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *GrafObj_IsPortOffscreen(GrafPortObject *_self, PyObject *_args)
 {
@@ -670,9 +656,6 @@ static PyObject *GrafObj_IsPortOffscreen(GrafPortObject *_self, PyObject *_args)
                             _rv);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *GrafObj_IsPortColor(GrafPortObject *_self, PyObject *_args)
 {
@@ -688,7 +671,6 @@ static PyObject *GrafObj_IsPortColor(GrafPortObject *_self, PyObject *_args)
                             _rv);
        return _res;
 }
-#endif
 
 static PyObject *GrafObj_SetPortBounds(GrafPortObject *_self, PyObject *_args)
 {
@@ -860,8 +842,6 @@ static PyObject *GrafObj_SetPortFracHPenLocation(GrafPortObject *_self, PyObject
        return _res;
 }
 
-#if TARGET_API_MAC_CARBON
-
 static PyObject *GrafObj_DisposePort(GrafPortObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -875,7 +855,6 @@ static PyObject *GrafObj_DisposePort(GrafPortObject *_self, PyObject *_args)
        _res = Py_None;
        return _res;
 }
-#endif
 
 static PyObject *GrafObj_QDIsPortBuffered(GrafPortObject *_self, PyObject *_args)
 {
@@ -924,8 +903,6 @@ static PyObject *GrafObj_QDFlushPortBuffer(GrafPortObject *_self, PyObject *_arg
        return _res;
 }
 
-#if TARGET_API_MAC_CARBON
-
 static PyObject *GrafObj_QDGetDirtyRegion(GrafPortObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -944,9 +921,6 @@ static PyObject *GrafObj_QDGetDirtyRegion(GrafPortObject *_self, PyObject *_args
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *GrafObj_QDSetDirtyRegion(GrafPortObject *_self, PyObject *_args)
 {
@@ -966,16 +940,12 @@ static PyObject *GrafObj_QDSetDirtyRegion(GrafPortObject *_self, PyObject *_args
        _res = Py_None;
        return _res;
 }
-#endif
 
 static PyMethodDef GrafObj_methods[] = {
        {"MacSetPort", (PyCFunction)GrafObj_MacSetPort, 1,
         PyDoc_STR("() -> None")},
-
-#if TARGET_API_MAC_CARBON
        {"IsValidPort", (PyCFunction)GrafObj_IsValidPort, 1,
         PyDoc_STR("() -> (Boolean _rv)")},
-#endif
        {"GetPortPixMap", (PyCFunction)GrafObj_GetPortPixMap, 1,
         PyDoc_STR("() -> (PixMapHandle _rv)")},
        {"GetPortBitMapForCopyBits", (PyCFunction)GrafObj_GetPortBitMapForCopyBits, 1,
@@ -1026,21 +996,12 @@ static PyMethodDef GrafObj_methods[] = {
         PyDoc_STR("() -> (Boolean _rv)")},
        {"IsPortPictureBeingDefined", (PyCFunction)GrafObj_IsPortPictureBeingDefined, 1,
         PyDoc_STR("() -> (Boolean _rv)")},
-
-#if TARGET_API_MAC_CARBON
        {"IsPortPolyBeingDefined", (PyCFunction)GrafObj_IsPortPolyBeingDefined, 1,
         PyDoc_STR("() -> (Boolean _rv)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"IsPortOffscreen", (PyCFunction)GrafObj_IsPortOffscreen, 1,
         PyDoc_STR("() -> (Boolean _rv)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"IsPortColor", (PyCFunction)GrafObj_IsPortColor, 1,
         PyDoc_STR("() -> (Boolean _rv)")},
-#endif
        {"SetPortBounds", (PyCFunction)GrafObj_SetPortBounds, 1,
         PyDoc_STR("(Rect rect) -> None")},
        {"SetPortOpColor", (PyCFunction)GrafObj_SetPortOpColor, 1,
@@ -1061,27 +1022,18 @@ static PyMethodDef GrafObj_methods[] = {
         PyDoc_STR("(SInt32 penMode) -> None")},
        {"SetPortFracHPenLocation", (PyCFunction)GrafObj_SetPortFracHPenLocation, 1,
         PyDoc_STR("(short pnLocHFrac) -> None")},
-
-#if TARGET_API_MAC_CARBON
        {"DisposePort", (PyCFunction)GrafObj_DisposePort, 1,
         PyDoc_STR("() -> None")},
-#endif
        {"QDIsPortBuffered", (PyCFunction)GrafObj_QDIsPortBuffered, 1,
         PyDoc_STR("() -> (Boolean _rv)")},
        {"QDIsPortBufferDirty", (PyCFunction)GrafObj_QDIsPortBufferDirty, 1,
         PyDoc_STR("() -> (Boolean _rv)")},
        {"QDFlushPortBuffer", (PyCFunction)GrafObj_QDFlushPortBuffer, 1,
         PyDoc_STR("(RgnHandle region) -> None")},
-
-#if TARGET_API_MAC_CARBON
        {"QDGetDirtyRegion", (PyCFunction)GrafObj_QDGetDirtyRegion, 1,
         PyDoc_STR("(RgnHandle rgn) -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"QDSetDirtyRegion", (PyCFunction)GrafObj_QDSetDirtyRegion, 1,
         PyDoc_STR("(RgnHandle rgn) -> None")},
-#endif
        {NULL, NULL, 0}
 };
 
@@ -2548,8 +2500,6 @@ static PyObject *Qd_BitMapToRegion(PyObject *_self, PyObject *_args)
        return _res;
 }
 
-#if TARGET_API_MAC_CARBON
-
 static PyObject *Qd_RgnToHandle(PyObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -2568,7 +2518,6 @@ static PyObject *Qd_RgnToHandle(PyObject *_self, PyObject *_args)
        _res = Py_None;
        return _res;
 }
-#endif
 
 static PyObject *Qd_DisposeRgn(PyObject *_self, PyObject *_args)
 {
@@ -5005,8 +4954,6 @@ static PyObject *Qd_GetRegionBounds(PyObject *_self, PyObject *_args)
        return _res;
 }
 
-#if TARGET_API_MAC_CARBON
-
 static PyObject *Qd_IsRegionRectangular(PyObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -5023,9 +4970,6 @@ static PyObject *Qd_IsRegionRectangular(PyObject *_self, PyObject *_args)
                             _rv);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *Qd_CreateNewPort(PyObject *_self, PyObject *_args)
 {
@@ -5041,9 +4985,6 @@ static PyObject *Qd_CreateNewPort(PyObject *_self, PyObject *_args)
                             GrafObj_New, _rv);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *Qd_SetQDError(PyObject *_self, PyObject *_args)
 {
@@ -5060,7 +5001,6 @@ static PyObject *Qd_SetQDError(PyObject *_self, PyObject *_args)
        _res = Py_None;
        return _res;
 }
-#endif
 
 static PyObject *Qd_LMGetScrVRes(PyObject *_self, PyObject *_args)
 {
@@ -6456,11 +6396,8 @@ static PyMethodDef Qd_methods[] = {
         PyDoc_STR("(RgnHandle dstRgn) -> None")},
        {"BitMapToRegion", (PyCFunction)Qd_BitMapToRegion, 1,
         PyDoc_STR("(RgnHandle region, BitMapPtr bMap) -> None")},
-
-#if TARGET_API_MAC_CARBON
        {"RgnToHandle", (PyCFunction)Qd_RgnToHandle, 1,
         PyDoc_STR("(RgnHandle region, Handle flattenedRgnDataHdl) -> None")},
-#endif
        {"DisposeRgn", (PyCFunction)Qd_DisposeRgn, 1,
         PyDoc_STR("(RgnHandle rgn) -> None")},
        {"MacCopyRgn", (PyCFunction)Qd_MacCopyRgn, 1,
@@ -6723,21 +6660,12 @@ static PyMethodDef Qd_methods[] = {
         PyDoc_STR("(Cursor arrow) -> None")},
        {"GetRegionBounds", (PyCFunction)Qd_GetRegionBounds, 1,
         PyDoc_STR("(RgnHandle region) -> (Rect bounds)")},
-
-#if TARGET_API_MAC_CARBON
        {"IsRegionRectangular", (PyCFunction)Qd_IsRegionRectangular, 1,
         PyDoc_STR("(RgnHandle region) -> (Boolean _rv)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"CreateNewPort", (PyCFunction)Qd_CreateNewPort, 1,
         PyDoc_STR("() -> (CGrafPtr _rv)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"SetQDError", (PyCFunction)Qd_SetQDError, 1,
         PyDoc_STR("(OSErr err) -> None")},
-#endif
        {"LMGetScrVRes", (PyCFunction)Qd_LMGetScrVRes, 1,
         PyDoc_STR("() -> (SInt16 _rv)")},
        {"LMSetScrVRes", (PyCFunction)Qd_LMSetScrVRes, 1,
index 15f5f921fbb0a1a1fd21cf199dee20c67cbc8fb7..2c54c3fc56d7221339d6c310b786290e1546933e 100644 (file)
@@ -118,25 +118,6 @@ extend                                             = 0x40
                        'CursorComponentSetData',
                        ]
 
-       def makegreylist(self):
-               return [
-                       ('#if !TARGET_API_MAC_CARBON', [
-                       ]),
-                       ('#if TARGET_API_MAC_CARBON', [
-                               'IsPortOffscreen',      # Lazy
-                               'IsPortColor',  # Lazy
-                               'IsRegionRectangular',
-                               'CreateNewPort',
-                               'DisposePort',
-                               'SetQDError',
-                               'IsPortPolyBeingDefined',
-                               'QDSetDirtyRegion',
-                               'QDGetDirtyRegion',
-                               'IsValidPort',
-                               'RgnToHandle',
-                       ])]
-
-
        def makeblacklisttypes(self):
                return [
                        'CIconHandle', # Obsolete
index 16a99d552b7a5f698e514ab33bce67614802474f..1e96980c1798a313827ad3a12c79e0dd616e29e7 100644 (file)
@@ -151,12 +151,6 @@ extern int _QdRGB_Convert(PyObject *, RGBColorPtr);
 
 #endif /* ACCESSOR_CALLS_ARE_FUNCTIONS */
 
-#if !TARGET_API_MAC_CARBON
-#define QDFlushPortBuffer(port, rgn) /* pass */
-#define QDIsPortBufferDirty(port) 0
-#define QDIsPortBuffered(port) 0
-#endif /* !TARGET_API_MAC_CARBON  */
-
 static PyObject *BMObj_NewCopied(BitMapPtr);
 
 /*
index 8e0783cc77c800ca7e4c88b954fe4f1cbde47384..bd9f59c9d2b4e098c3e97fb4e9c2c86320a7080a 100644 (file)
@@ -6276,58 +6276,6 @@ static PyObject *MovieObj_GetMovieDefaultDataRef(MovieObject *_self, PyObject *_
        return _res;
 }
 
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *MovieObj_SetMovieAnchorDataRef(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Handle dataRef;
-       OSType dataRefType;
-#ifndef SetMovieAnchorDataRef
-       PyMac_PRECHECK(SetMovieAnchorDataRef);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             ResObj_Convert, &dataRef,
-                             PyMac_GetOSType, &dataRefType))
-               return NULL;
-       _err = SetMovieAnchorDataRef(_self->ob_itself,
-                                    dataRef,
-                                    dataRefType);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-#endif
-
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *MovieObj_GetMovieAnchorDataRef(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Handle dataRef;
-       OSType dataRefType;
-       long outFlags;
-#ifndef GetMovieAnchorDataRef
-       PyMac_PRECHECK(GetMovieAnchorDataRef);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = GetMovieAnchorDataRef(_self->ob_itself,
-                                    &dataRef,
-                                    &dataRefType,
-                                    &outFlags);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&O&l",
-                            ResObj_New, dataRef,
-                            PyMac_BuildOSType, dataRefType,
-                            outFlags);
-       return _res;
-}
-#endif
-
 static PyObject *MovieObj_SetMovieColorTable(MovieObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -6534,24 +6482,6 @@ static PyObject *MovieObj_GetMovieStatus(MovieObject *_self, PyObject *_args)
        return _res;
 }
 
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *MovieObj_GetMovieLoadState(MovieObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long _rv;
-#ifndef GetMovieLoadState
-       PyMac_PRECHECK(GetMovieLoadState);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetMovieLoadState(_self->ob_itself);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-#endif
-
 static PyObject *MovieObj_NewMovieController(MovieObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -6859,16 +6789,6 @@ static PyMethodDef MovieObj_methods[] = {
         PyDoc_STR("(Handle dataRef, OSType dataRefType) -> None")},
        {"GetMovieDefaultDataRef", (PyCFunction)MovieObj_GetMovieDefaultDataRef, 1,
         PyDoc_STR("() -> (Handle dataRef, OSType dataRefType)")},
-
-#if !TARGET_API_MAC_CARBON
-       {"SetMovieAnchorDataRef", (PyCFunction)MovieObj_SetMovieAnchorDataRef, 1,
-        PyDoc_STR("(Handle dataRef, OSType dataRefType) -> None")},
-#endif
-
-#if !TARGET_API_MAC_CARBON
-       {"GetMovieAnchorDataRef", (PyCFunction)MovieObj_GetMovieAnchorDataRef, 1,
-        PyDoc_STR("() -> (Handle dataRef, OSType dataRefType, long outFlags)")},
-#endif
        {"SetMovieColorTable", (PyCFunction)MovieObj_SetMovieColorTable, 1,
         PyDoc_STR("(CTabHandle ctab) -> None")},
        {"GetMovieColorTable", (PyCFunction)MovieObj_GetMovieColorTable, 1,
@@ -6887,11 +6807,6 @@ static PyMethodDef MovieObj_methods[] = {
         PyDoc_STR("(TimeValue time, TimeValue duration) -> (RgnHandle _rv)")},
        {"GetMovieStatus", (PyCFunction)MovieObj_GetMovieStatus, 1,
         PyDoc_STR("() -> (ComponentResult _rv, Track firstProblemTrack)")},
-
-#if !TARGET_API_MAC_CARBON
-       {"GetMovieLoadState", (PyCFunction)MovieObj_GetMovieLoadState, 1,
-        PyDoc_STR("() -> (long _rv)")},
-#endif
        {"NewMovieController", (PyCFunction)MovieObj_NewMovieController, 1,
         PyDoc_STR("(Rect movieRect, long someFlags) -> (MovieController _rv)")},
        {"PutMovieOnScrap", (PyCFunction)MovieObj_PutMovieOnScrap, 1,
@@ -6981,28 +6896,6 @@ PyTypeObject Movie_Type = {
 /* --------------------- End object type Movie ---------------------- */
 
 
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *Qt_CheckQuickTimeRegistration(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       void * registrationKey;
-       long flags;
-#ifndef CheckQuickTimeRegistration
-       PyMac_PRECHECK(CheckQuickTimeRegistration);
-#endif
-       if (!PyArg_ParseTuple(_args, "sl",
-                             &registrationKey,
-                             &flags))
-               return NULL;
-       CheckQuickTimeRegistration(registrationKey,
-                                  flags);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-#endif
-
 static PyObject *Qt_EnterMovies(PyObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -7135,44 +7028,6 @@ static PyObject *Qt_GetDataHandler(PyObject *_self, PyObject *_args)
        return _res;
 }
 
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *Qt_OpenADataHandler(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Handle dataRef;
-       OSType dataHandlerSubType;
-       Handle anchorDataRef;
-       OSType anchorDataRefType;
-       TimeBase tb;
-       long flags;
-       ComponentInstance dh;
-#ifndef OpenADataHandler
-       PyMac_PRECHECK(OpenADataHandler);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&O&O&O&l",
-                             ResObj_Convert, &dataRef,
-                             PyMac_GetOSType, &dataHandlerSubType,
-                             ResObj_Convert, &anchorDataRef,
-                             PyMac_GetOSType, &anchorDataRefType,
-                             TimeBaseObj_Convert, &tb,
-                             &flags))
-               return NULL;
-       _err = OpenADataHandler(dataRef,
-                               dataHandlerSubType,
-                               anchorDataRef,
-                               anchorDataRefType,
-                               tb,
-                               flags,
-                               &dh);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            CmpInstObj_New, dh);
-       return _res;
-}
-#endif
-
 static PyObject *Qt_PasteHandleIntoMovie(PyObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -8846,35 +8701,6 @@ static PyObject *Qt_SpriteMediaGetActionVariable(PyObject *_self, PyObject *_arg
        return _res;
 }
 
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *Qt_SpriteMediaGetIndImageProperty(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       short imageIndex;
-       long imagePropertyType;
-       void * imagePropertyValue;
-#ifndef SpriteMediaGetIndImageProperty
-       PyMac_PRECHECK(SpriteMediaGetIndImageProperty);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&hls",
-                             CmpInstObj_Convert, &mh,
-                             &imageIndex,
-                             &imagePropertyType,
-                             &imagePropertyValue))
-               return NULL;
-       _rv = SpriteMediaGetIndImageProperty(mh,
-                                            imageIndex,
-                                            imagePropertyType,
-                                            imagePropertyValue);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-#endif
-
 static PyObject *Qt_SpriteMediaDisposeSprite(PyObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -9258,151 +9084,6 @@ static PyObject *Qt_FlashMediaGetSupportedSwfVersion(PyObject *_self, PyObject *
        return _res;
 }
 
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *Qt_MovieMediaGetCurrentMovieProperty(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       OSType whichProperty;
-       void * value;
-#ifndef MovieMediaGetCurrentMovieProperty
-       PyMac_PRECHECK(MovieMediaGetCurrentMovieProperty);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&O&s",
-                             CmpInstObj_Convert, &mh,
-                             PyMac_GetOSType, &whichProperty,
-                             &value))
-               return NULL;
-       _rv = MovieMediaGetCurrentMovieProperty(mh,
-                                               whichProperty,
-                                               value);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-#endif
-
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *Qt_MovieMediaGetCurrentTrackProperty(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       long trackID;
-       OSType whichProperty;
-       void * value;
-#ifndef MovieMediaGetCurrentTrackProperty
-       PyMac_PRECHECK(MovieMediaGetCurrentTrackProperty);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&lO&s",
-                             CmpInstObj_Convert, &mh,
-                             &trackID,
-                             PyMac_GetOSType, &whichProperty,
-                             &value))
-               return NULL;
-       _rv = MovieMediaGetCurrentTrackProperty(mh,
-                                               trackID,
-                                               whichProperty,
-                                               value);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-#endif
-
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *Qt_MovieMediaGetChildMovieDataReference(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       QTAtomID dataRefID;
-       short dataRefIndex;
-       OSType dataRefType;
-       Handle dataRef;
-       QTAtomID dataRefIDOut;
-       short dataRefIndexOut;
-#ifndef MovieMediaGetChildMovieDataReference
-       PyMac_PRECHECK(MovieMediaGetChildMovieDataReference);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&lh",
-                             CmpInstObj_Convert, &mh,
-                             &dataRefID,
-                             &dataRefIndex))
-               return NULL;
-       _rv = MovieMediaGetChildMovieDataReference(mh,
-                                                  dataRefID,
-                                                  dataRefIndex,
-                                                  &dataRefType,
-                                                  &dataRef,
-                                                  &dataRefIDOut,
-                                                  &dataRefIndexOut);
-       _res = Py_BuildValue("lO&O&lh",
-                            _rv,
-                            PyMac_BuildOSType, dataRefType,
-                            ResObj_New, dataRef,
-                            dataRefIDOut,
-                            dataRefIndexOut);
-       return _res;
-}
-#endif
-
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *Qt_MovieMediaSetChildMovieDataReference(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       QTAtomID dataRefID;
-       OSType dataRefType;
-       Handle dataRef;
-#ifndef MovieMediaSetChildMovieDataReference
-       PyMac_PRECHECK(MovieMediaSetChildMovieDataReference);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&lO&O&",
-                             CmpInstObj_Convert, &mh,
-                             &dataRefID,
-                             PyMac_GetOSType, &dataRefType,
-                             ResObj_Convert, &dataRef))
-               return NULL;
-       _rv = MovieMediaSetChildMovieDataReference(mh,
-                                                  dataRefID,
-                                                  dataRefType,
-                                                  dataRef);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-#endif
-
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *Qt_MovieMediaLoadChildMovieFromDataReference(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       QTAtomID dataRefID;
-#ifndef MovieMediaLoadChildMovieFromDataReference
-       PyMac_PRECHECK(MovieMediaLoadChildMovieFromDataReference);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&l",
-                             CmpInstObj_Convert, &mh,
-                             &dataRefID))
-               return NULL;
-       _rv = MovieMediaLoadChildMovieFromDataReference(mh,
-                                                       dataRefID);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-#endif
-
 static PyObject *Qt_Media3DGetCurrentGroup(PyObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -9636,29 +9317,6 @@ static PyObject *Qt_Media3DGetCameraRange(PyObject *_self, PyObject *_args)
        return _res;
 }
 
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *Qt_Media3DGetViewObject(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ComponentResult _rv;
-       MediaHandler mh;
-       void * tq3viewObject;
-#ifndef Media3DGetViewObject
-       PyMac_PRECHECK(Media3DGetViewObject);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&s",
-                             CmpInstObj_Convert, &mh,
-                             &tq3viewObject))
-               return NULL;
-       _rv = Media3DGetViewObject(mh,
-                                  tq3viewObject);
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-#endif
-
 static PyObject *Qt_NewTimeBase(PyObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -9834,11 +9492,6 @@ static PyObject *Qt_MoviesTask(PyObject *_self, PyObject *_args)
 }
 
 static PyMethodDef Qt_methods[] = {
-
-#if !TARGET_API_MAC_CARBON
-       {"CheckQuickTimeRegistration", (PyCFunction)Qt_CheckQuickTimeRegistration, 1,
-        PyDoc_STR("(void * registrationKey, long flags) -> None")},
-#endif
        {"EnterMovies", (PyCFunction)Qt_EnterMovies, 1,
         PyDoc_STR("() -> None")},
        {"ExitMovies", (PyCFunction)Qt_ExitMovies, 1,
@@ -9855,11 +9508,6 @@ static PyMethodDef Qt_methods[] = {
         PyDoc_STR("(long flags) -> (Movie _rv)")},
        {"GetDataHandler", (PyCFunction)Qt_GetDataHandler, 1,
         PyDoc_STR("(Handle dataRef, OSType dataHandlerSubType, long flags) -> (Component _rv)")},
-
-#if !TARGET_API_MAC_CARBON
-       {"OpenADataHandler", (PyCFunction)Qt_OpenADataHandler, 1,
-        PyDoc_STR("(Handle dataRef, OSType dataHandlerSubType, Handle anchorDataRef, OSType anchorDataRefType, TimeBase tb, long flags) -> (ComponentInstance dh)")},
-#endif
        {"PasteHandleIntoMovie", (PyCFunction)Qt_PasteHandleIntoMovie, 1,
         PyDoc_STR("(Handle h, OSType handleType, Movie theMovie, long flags, ComponentInstance userComp) -> None")},
        {"GetMovieImporterForDataRef", (PyCFunction)Qt_GetMovieImporterForDataRef, 1,
@@ -9988,11 +9636,6 @@ static PyMethodDef Qt_methods[] = {
         PyDoc_STR("(MediaHandler mh, QTAtomID variableID, float value) -> (ComponentResult _rv)")},
        {"SpriteMediaGetActionVariable", (PyCFunction)Qt_SpriteMediaGetActionVariable, 1,
         PyDoc_STR("(MediaHandler mh, QTAtomID variableID) -> (ComponentResult _rv, float value)")},
-
-#if !TARGET_API_MAC_CARBON
-       {"SpriteMediaGetIndImageProperty", (PyCFunction)Qt_SpriteMediaGetIndImageProperty, 1,
-        PyDoc_STR("(MediaHandler mh, short imageIndex, long imagePropertyType, void * imagePropertyValue) -> (ComponentResult _rv)")},
-#endif
        {"SpriteMediaDisposeSprite", (PyCFunction)Qt_SpriteMediaDisposeSprite, 1,
         PyDoc_STR("(MediaHandler mh, QTAtomID spriteID) -> (ComponentResult _rv)")},
        {"SpriteMediaSetActionVariableToString", (PyCFunction)Qt_SpriteMediaSetActionVariableToString, 1,
@@ -10025,31 +9668,6 @@ static PyMethodDef Qt_methods[] = {
         PyDoc_STR("(MediaHandler mh, long buttonID, long transition) -> (ComponentResult _rv, char path)")},
        {"FlashMediaGetSupportedSwfVersion", (PyCFunction)Qt_FlashMediaGetSupportedSwfVersion, 1,
         PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, UInt8 swfVersion)")},
-
-#if !TARGET_API_MAC_CARBON
-       {"MovieMediaGetCurrentMovieProperty", (PyCFunction)Qt_MovieMediaGetCurrentMovieProperty, 1,
-        PyDoc_STR("(MediaHandler mh, OSType whichProperty, void * value) -> (ComponentResult _rv)")},
-#endif
-
-#if !TARGET_API_MAC_CARBON
-       {"MovieMediaGetCurrentTrackProperty", (PyCFunction)Qt_MovieMediaGetCurrentTrackProperty, 1,
-        PyDoc_STR("(MediaHandler mh, long trackID, OSType whichProperty, void * value) -> (ComponentResult _rv)")},
-#endif
-
-#if !TARGET_API_MAC_CARBON
-       {"MovieMediaGetChildMovieDataReference", (PyCFunction)Qt_MovieMediaGetChildMovieDataReference, 1,
-        PyDoc_STR("(MediaHandler mh, QTAtomID dataRefID, short dataRefIndex) -> (ComponentResult _rv, OSType dataRefType, Handle dataRef, QTAtomID dataRefIDOut, short dataRefIndexOut)")},
-#endif
-
-#if !TARGET_API_MAC_CARBON
-       {"MovieMediaSetChildMovieDataReference", (PyCFunction)Qt_MovieMediaSetChildMovieDataReference, 1,
-        PyDoc_STR("(MediaHandler mh, QTAtomID dataRefID, OSType dataRefType, Handle dataRef) -> (ComponentResult _rv)")},
-#endif
-
-#if !TARGET_API_MAC_CARBON
-       {"MovieMediaLoadChildMovieFromDataReference", (PyCFunction)Qt_MovieMediaLoadChildMovieFromDataReference, 1,
-        PyDoc_STR("(MediaHandler mh, QTAtomID dataRefID) -> (ComponentResult _rv)")},
-#endif
        {"Media3DGetCurrentGroup", (PyCFunction)Qt_Media3DGetCurrentGroup, 1,
         PyDoc_STR("(MediaHandler mh, void * group) -> (ComponentResult _rv)")},
        {"Media3DTranslateNamedObjectTo", (PyCFunction)Qt_Media3DTranslateNamedObjectTo, 1,
@@ -10070,11 +9688,6 @@ static PyMethodDef Qt_methods[] = {
         PyDoc_STR("(MediaHandler mh, void * tQ3CameraRange) -> (ComponentResult _rv)")},
        {"Media3DGetCameraRange", (PyCFunction)Qt_Media3DGetCameraRange, 1,
         PyDoc_STR("(MediaHandler mh, void * tQ3CameraRange) -> (ComponentResult _rv)")},
-
-#if !TARGET_API_MAC_CARBON
-       {"Media3DGetViewObject", (PyCFunction)Qt_Media3DGetViewObject, 1,
-        PyDoc_STR("(MediaHandler mh, void * tq3viewObject) -> (ComponentResult _rv)")},
-#endif
        {"NewTimeBase", (PyCFunction)Qt_NewTimeBase, 1,
         PyDoc_STR("() -> (TimeBase _rv)")},
        {"ConvertTime", (PyCFunction)Qt_ConvertTime, 1,
index 3edf870b1ce5c67031b88745055ddfcf61b92dfa..9c26ceba0aa67784d02b8a56b38b5e0a89585db7 100644 (file)
@@ -62,24 +62,21 @@ class MyScanner(Scanner):
                        "MakeTrackTimeTable", # Uses long * return?
                        "MakeMediaTimeTable", # ditto
 ##                     "VideoMediaGetStallCount", # Undefined in CW Pro 3 library
-                       ]
+                       # OS8 only:
+                       'SpriteMediaGetIndImageProperty',       # XXXX Why isn't this in carbon?
+                       'CheckQuickTimeRegistration',
+                       'SetMovieAnchorDataRef',
+                       'GetMovieAnchorDataRef',
+                       'GetMovieLoadState',
+                       'OpenADataHandler',
+                       'MovieMediaGetCurrentMovieProperty',
+                       'MovieMediaGetCurrentTrackProperty',
+                       'MovieMediaGetChildMovieDataReference',
+                       'MovieMediaSetChildMovieDataReference',
+                       'MovieMediaLoadChildMovieFromDataReference',
+                       'Media3DGetViewObject',
 
-       def makegreylist(self):
-               return [
-                       ('#if !TARGET_API_MAC_CARBON', [
-                               'SpriteMediaGetIndImageProperty',       # XXXX Why isn't this in carbon?
-                               'CheckQuickTimeRegistration',
-                               'SetMovieAnchorDataRef',
-                               'GetMovieAnchorDataRef',
-                               'GetMovieLoadState',
-                               'OpenADataHandler',
-                               'MovieMediaGetCurrentMovieProperty',
-                               'MovieMediaGetCurrentTrackProperty',
-                               'MovieMediaGetChildMovieDataReference',
-                               'MovieMediaSetChildMovieDataReference',
-                               'MovieMediaLoadChildMovieFromDataReference',
-                               'Media3DGetViewObject',
-                       ])]
+                       ]
 
        def makeblacklisttypes(self):
                return [
index 27b096757dad0aa748622fba6dcae19c1887d378..9ebfba28a0391621d04a92333187fdb67096a741 100644 (file)
@@ -311,28 +311,6 @@ static PyObject *ResObj_GetMaxResourceSize(ResourceObject *_self, PyObject *_arg
        return _res;
 }
 
-#if TARGET_API_MAC_OS8
-
-static PyObject *ResObj_RsrcMapEntry(ResourceObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long _rv;
-#ifndef RsrcMapEntry
-       PyMac_PRECHECK(RsrcMapEntry);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = RsrcMapEntry(_self->ob_itself);
-       {
-               OSErr _err = ResError();
-               if (_err != noErr) return PyMac_Error(_err);
-       }
-       _res = Py_BuildValue("l",
-                            _rv);
-       return _res;
-}
-#endif
-
 static PyObject *ResObj_SetResAttrs(ResourceObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -523,11 +501,6 @@ static PyMethodDef ResObj_methods[] = {
         PyDoc_STR("() -> (long _rv)")},
        {"GetMaxResourceSize", (PyCFunction)ResObj_GetMaxResourceSize, 1,
         PyDoc_STR("() -> (long _rv)")},
-
-#if TARGET_API_MAC_OS8
-       {"RsrcMapEntry", (PyCFunction)ResObj_RsrcMapEntry, 1,
-        PyDoc_STR("() -> (long _rv)")},
-#endif
        {"SetResAttrs", (PyCFunction)ResObj_SetResAttrs, 1,
         PyDoc_STR("(short attrs) -> None")},
        {"ChangedResource", (PyCFunction)ResObj_ChangedResource, 1,
@@ -702,49 +675,6 @@ PyTypeObject Resource_Type = {
 /* -------------------- End object type Resource -------------------- */
 
 
-#if TARGET_API_MAC_OS8
-
-static PyObject *Res_InitResources(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short _rv;
-#ifndef InitResources
-       PyMac_PRECHECK(InitResources);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = InitResources();
-       {
-               OSErr _err = ResError();
-               if (_err != noErr) return PyMac_Error(_err);
-       }
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-#endif
-
-#if TARGET_API_MAC_OS8
-
-static PyObject *Res_RsrcZoneInit(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef RsrcZoneInit
-       PyMac_PRECHECK(RsrcZoneInit);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       RsrcZoneInit();
-       {
-               OSErr _err = ResError();
-               if (_err != noErr) return PyMac_Error(_err);
-       }
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-#endif
-
 static PyObject *Res_CloseResFile(PyObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -800,53 +730,6 @@ static PyObject *Res_CurResFile(PyObject *_self, PyObject *_args)
        return _res;
 }
 
-#if TARGET_API_MAC_OS8
-
-static PyObject *Res_CreateResFile(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Str255 fileName;
-#ifndef CreateResFile
-       PyMac_PRECHECK(CreateResFile);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetStr255, fileName))
-               return NULL;
-       CreateResFile(fileName);
-       {
-               OSErr _err = ResError();
-               if (_err != noErr) return PyMac_Error(_err);
-       }
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-#endif
-
-#if TARGET_API_MAC_OS8
-
-static PyObject *Res_OpenResFile(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short _rv;
-       Str255 fileName;
-#ifndef OpenResFile
-       PyMac_PRECHECK(OpenResFile);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetStr255, fileName))
-               return NULL;
-       _rv = OpenResFile(fileName);
-       {
-               OSErr _err = ResError();
-               if (_err != noErr) return PyMac_Error(_err);
-       }
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-#endif
-
 static PyObject *Res_UseResFile(PyObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -1308,33 +1191,6 @@ static PyObject *Res_OpenRFPerm(PyObject *_self, PyObject *_args)
        return _res;
 }
 
-#if TARGET_API_MAC_OS8
-
-static PyObject *Res_RGetResource(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Handle _rv;
-       ResType theType;
-       short theID;
-#ifndef RGetResource
-       PyMac_PRECHECK(RGetResource);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&h",
-                             PyMac_GetOSType, &theType,
-                             &theID))
-               return NULL;
-       _rv = RGetResource(theType,
-                          theID);
-       {
-               OSErr _err = ResError();
-               if (_err != noErr) return PyMac_Error(_err);
-       }
-       _res = Py_BuildValue("O&",
-                            ResObj_New, _rv);
-       return _res;
-}
-#endif
-
 static PyObject *Res_HOpenResFile(PyObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -1444,8 +1300,6 @@ static PyObject *Res_FSpCreateResFile(PyObject *_self, PyObject *_args)
        return _res;
 }
 
-#if TARGET_API_MAC_CARBON
-
 static PyObject *Res_InsertResourceFile(PyObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -1466,9 +1320,6 @@ static PyObject *Res_InsertResourceFile(PyObject *_self, PyObject *_args)
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *Res_DetachResourceFile(PyObject *_self, PyObject *_args)
 {
@@ -1487,9 +1338,6 @@ static PyObject *Res_DetachResourceFile(PyObject *_self, PyObject *_args)
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *Res_FSpResourceFileAlreadyOpen(PyObject *_self, PyObject *_args)
 {
@@ -1517,9 +1365,6 @@ static PyObject *Res_FSpResourceFileAlreadyOpen(PyObject *_self, PyObject *_args
                             refNum);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *Res_FSpOpenOrphanResFile(PyObject *_self, PyObject *_args)
 {
@@ -1543,9 +1388,6 @@ static PyObject *Res_FSpOpenOrphanResFile(PyObject *_self, PyObject *_args)
                             refNum);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *Res_GetTopResourceFile(PyObject *_self, PyObject *_args)
 {
@@ -1563,9 +1405,6 @@ static PyObject *Res_GetTopResourceFile(PyObject *_self, PyObject *_args)
                             refNum);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *Res_GetNextResourceFile(PyObject *_self, PyObject *_args)
 {
@@ -1586,7 +1425,6 @@ static PyObject *Res_GetNextResourceFile(PyObject *_self, PyObject *_args)
                             nextRefNum);
        return _res;
 }
-#endif
 
 static PyObject *Res_FSOpenResFile(PyObject *_self, PyObject *_args)
 {
@@ -1672,8 +1510,6 @@ static PyObject *Res_FSResourceFileAlreadyOpen(PyObject *_self, PyObject *_args)
        return _res;
 }
 
-#if TARGET_API_MAC_CARBON
-
 static PyObject *Res_FSCreateResourceFile(PyObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -1710,9 +1546,6 @@ static PyObject *Res_FSCreateResourceFile(PyObject *_self, PyObject *_args)
                             PyMac_BuildFSSpec, &newSpec);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *Res_FSOpenResourceFile(PyObject *_self, PyObject *_args)
 {
@@ -1742,7 +1575,6 @@ static PyObject *Res_FSOpenResourceFile(PyObject *_self, PyObject *_args)
                             refNum);
        return _res;
 }
-#endif
 
 static PyObject *Res_Handle(PyObject *_self, PyObject *_args)
 {
@@ -1771,32 +1603,12 @@ static PyObject *Res_Handle(PyObject *_self, PyObject *_args)
 }
 
 static PyMethodDef Res_methods[] = {
-
-#if TARGET_API_MAC_OS8
-       {"InitResources", (PyCFunction)Res_InitResources, 1,
-        PyDoc_STR("() -> (short _rv)")},
-#endif
-
-#if TARGET_API_MAC_OS8
-       {"RsrcZoneInit", (PyCFunction)Res_RsrcZoneInit, 1,
-        PyDoc_STR("() -> None")},
-#endif
        {"CloseResFile", (PyCFunction)Res_CloseResFile, 1,
         PyDoc_STR("(short refNum) -> None")},
        {"ResError", (PyCFunction)Res_ResError, 1,
         PyDoc_STR("() -> None")},
        {"CurResFile", (PyCFunction)Res_CurResFile, 1,
         PyDoc_STR("() -> (short _rv)")},
-
-#if TARGET_API_MAC_OS8
-       {"CreateResFile", (PyCFunction)Res_CreateResFile, 1,
-        PyDoc_STR("(Str255 fileName) -> None")},
-#endif
-
-#if TARGET_API_MAC_OS8
-       {"OpenResFile", (PyCFunction)Res_OpenResFile, 1,
-        PyDoc_STR("(Str255 fileName) -> (short _rv)")},
-#endif
        {"UseResFile", (PyCFunction)Res_UseResFile, 1,
         PyDoc_STR("(short refNum) -> None")},
        {"CountTypes", (PyCFunction)Res_CountTypes, 1,
@@ -1839,11 +1651,6 @@ static PyMethodDef Res_methods[] = {
         PyDoc_STR("(short refNum, short attrs) -> None")},
        {"OpenRFPerm", (PyCFunction)Res_OpenRFPerm, 1,
         PyDoc_STR("(Str255 fileName, short vRefNum, SignedByte permission) -> (short _rv)")},
-
-#if TARGET_API_MAC_OS8
-       {"RGetResource", (PyCFunction)Res_RGetResource, 1,
-        PyDoc_STR("(ResType theType, short theID) -> (Handle _rv)")},
-#endif
        {"HOpenResFile", (PyCFunction)Res_HOpenResFile, 1,
         PyDoc_STR("(short vRefNum, long dirID, Str255 fileName, SignedByte permission) -> (short _rv)")},
        {"HCreateResFile", (PyCFunction)Res_HCreateResFile, 1,
@@ -1852,52 +1659,28 @@ static PyMethodDef Res_methods[] = {
         PyDoc_STR("(FSSpec spec, SignedByte permission) -> (short _rv)")},
        {"FSpCreateResFile", (PyCFunction)Res_FSpCreateResFile, 1,
         PyDoc_STR("(FSSpec spec, OSType creator, OSType fileType, ScriptCode scriptTag) -> None")},
-
-#if TARGET_API_MAC_CARBON
        {"InsertResourceFile", (PyCFunction)Res_InsertResourceFile, 1,
         PyDoc_STR("(SInt16 refNum, RsrcChainLocation where) -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"DetachResourceFile", (PyCFunction)Res_DetachResourceFile, 1,
         PyDoc_STR("(SInt16 refNum) -> None")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"FSpResourceFileAlreadyOpen", (PyCFunction)Res_FSpResourceFileAlreadyOpen, 1,
         PyDoc_STR("(FSSpec resourceFile) -> (Boolean _rv, Boolean inChain, SInt16 refNum)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"FSpOpenOrphanResFile", (PyCFunction)Res_FSpOpenOrphanResFile, 1,
         PyDoc_STR("(FSSpec spec, SignedByte permission) -> (SInt16 refNum)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"GetTopResourceFile", (PyCFunction)Res_GetTopResourceFile, 1,
         PyDoc_STR("() -> (SInt16 refNum)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"GetNextResourceFile", (PyCFunction)Res_GetNextResourceFile, 1,
         PyDoc_STR("(SInt16 curRefNum) -> (SInt16 nextRefNum)")},
-#endif
        {"FSOpenResFile", (PyCFunction)Res_FSOpenResFile, 1,
         PyDoc_STR("(FSRef ref, SignedByte permission) -> (short _rv)")},
        {"FSCreateResFile", (PyCFunction)Res_FSCreateResFile, 1,
         PyDoc_STR("(FSRef parentRef, Buffer nameLength) -> (FSRef newRef, FSSpec newSpec)")},
        {"FSResourceFileAlreadyOpen", (PyCFunction)Res_FSResourceFileAlreadyOpen, 1,
         PyDoc_STR("(FSRef resourceFileRef) -> (Boolean _rv, Boolean inChain, SInt16 refNum)")},
-
-#if TARGET_API_MAC_CARBON
        {"FSCreateResourceFile", (PyCFunction)Res_FSCreateResourceFile, 1,
         PyDoc_STR("(FSRef parentRef, Buffer nameLength, Buffer forkNameLength) -> (FSRef newRef, FSSpec newSpec)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"FSOpenResourceFile", (PyCFunction)Res_FSOpenResourceFile, 1,
         PyDoc_STR("(FSRef ref, Buffer forkNameLength, SignedByte permissions) -> (SInt16 refNum)")},
-#endif
        {"Handle", (PyCFunction)Res_Handle, 1,
         PyDoc_STR("Convert a string to a Handle object.\n\nResource() and Handle() are very similar, but objects created with Handle() are\nby default automatically DisposeHandle()d upon object cleanup. Use AutoDispose()\nto change this.\n")},
        {NULL, NULL, 0}
index 51bf38d4550e71eb9919bdd11f24e5acb4296099..47a19a660241ac912a5919e111a5e04745d921cd 100644 (file)
@@ -45,33 +45,19 @@ class ResourcesScanner(Scanner):
 ##                     "RmveResource",         # RemoveResource
 ##                     "SizeResource",         # GetResourceSizeOnDisk
 ##                     "MaxSizeRsrc",          # GetMaxResourceSize
+                       # OS8 only
+                       'RGetResource',
+                       'OpenResFile',
+                       'CreateResFile',
+                       'RsrcZoneInit',
+                       'InitResources',
+                       'RsrcMapEntry',
                        ]
                        
        def makeblacklisttypes(self):
                return [
                        ]
                        
-       def makegreylist(self):
-               return [
-                       ('#if TARGET_API_MAC_OS8', [
-                               'RGetResource',
-                               'OpenResFile',
-                               'CreateResFile',
-                               'RsrcZoneInit',
-                               'InitResources',
-                               'RsrcMapEntry',
-                       ]),
-                       ('#if TARGET_API_MAC_CARBON', [
-                               'GetNextResourceFile',
-                               'GetTopResourceFile',
-                               'FSpOpenOrphanResFile',
-                               'DetachResourceFile',
-                               'InsertResourceFile',
-                               'FSpResourceFileAlreadyOpen',
-                               'FSOpenResourceFile',
-                               'FSCreateResourceFile',
-                       ])]
-
        def makerepairinstructions(self):
                return [
                        ([("Str255", "*", "InMode")],
index b12db06d143dc198261675029d99304d7cc75bfd..9c681d3c5b39d02200e53fca2606e386381d49a6 100644 (file)
 #include <Carbon/Carbon.h>
 #endif
 
-#if TARGET_API_MAC_OS8
-
-/*
-** Generate ScrapInfo records
-*/
-static PyObject *
-SCRRec_New(itself)
-       ScrapStuff *itself;
-{
-
-       return Py_BuildValue("lO&hhO&", itself->scrapSize,
-               ResObj_New, itself->scrapHandle, itself->scrapCount, itself->scrapState,
-               PyMac_BuildStr255, itself->scrapName);
-}
-#endif
-
 static PyObject *Scrap_Error;
 
-#if !TARGET_API_MAC_OS8
 /* ----------------------- Object type Scrap ------------------------ */
 
 PyTypeObject Scrap_Type;
@@ -280,7 +263,6 @@ PyTypeObject Scrap_Type = {
 };
 
 /* --------------------- End object type Scrap ---------------------- */
-#endif /* !TARGET_API_MAC_OS8 */
 
 static PyObject *Scrap_LoadScrap(PyObject *_self, PyObject *_args)
 {
@@ -308,79 +290,6 @@ static PyObject *Scrap_UnloadScrap(PyObject *_self, PyObject *_args)
        return _res;
 }
 
-#if TARGET_API_MAC_OS8
-
-static PyObject *Scrap_InfoScrap(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       ScrapStuffPtr _rv;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = InfoScrap();
-       _res = Py_BuildValue("O&",
-                            SCRRec_New, _rv);
-       return _res;
-}
-
-static PyObject *Scrap_GetScrap(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       long _rv;
-       Handle destination;
-       ScrapFlavorType flavorType;
-       SInt32 offset;
-       if (!PyArg_ParseTuple(_args, "O&O&",
-                             ResObj_Convert, &destination,
-                             PyMac_GetOSType, &flavorType))
-               return NULL;
-       _rv = GetScrap(destination,
-                      flavorType,
-                      &offset);
-       _res = Py_BuildValue("ll",
-                            _rv,
-                            offset);
-       return _res;
-}
-
-static PyObject *Scrap_ZeroScrap(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = ZeroScrap();
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-
-static PyObject *Scrap_PutScrap(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-       SInt32 sourceBufferByteCount;
-       ScrapFlavorType flavorType;
-       char *sourceBuffer__in__;
-       int sourceBuffer__len__;
-       int sourceBuffer__in_len__;
-       if (!PyArg_ParseTuple(_args, "lO&s#",
-                             &sourceBufferByteCount,
-                             PyMac_GetOSType, &flavorType,
-                             &sourceBuffer__in__, &sourceBuffer__in_len__))
-               return NULL;
-       _err = PutScrap(sourceBufferByteCount,
-                       flavorType,
-                       sourceBuffer__in__);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
- sourceBuffer__error__: ;
-       return _res;
-}
-#endif /* TARGET_API_MAC_OS8 */
-
-#if !TARGET_API_MAC_OS8
 static PyObject *Scrap_GetCurrentScrap(PyObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -420,33 +329,18 @@ static PyObject *Scrap_CallInScrapPromises(PyObject *_self, PyObject *_args)
        _res = Py_None;
        return _res;
 }
-#endif
 
 static PyMethodDef Scrap_methods[] = {
        {"LoadScrap", (PyCFunction)Scrap_LoadScrap, 1,
         "() -> None"},
        {"UnloadScrap", (PyCFunction)Scrap_UnloadScrap, 1,
         "() -> None"},
-
-#if TARGET_API_MAC_OS8
-       {"InfoScrap", (PyCFunction)Scrap_InfoScrap, 1,
-        "() -> (ScrapStuffPtr _rv)"},
-       {"GetScrap", (PyCFunction)Scrap_GetScrap, 1,
-        "(Handle destination, ScrapFlavorType flavorType) -> (long _rv, SInt32 offset)"},
-       {"ZeroScrap", (PyCFunction)Scrap_ZeroScrap, 1,
-        "() -> None"},
-       {"PutScrap", (PyCFunction)Scrap_PutScrap, 1,
-        "(SInt32 sourceBufferByteCount, ScrapFlavorType flavorType, Buffer sourceBuffer) -> None"},
-#endif
-
-#if !TARGET_API_MAC_OS8
        {"GetCurrentScrap", (PyCFunction)Scrap_GetCurrentScrap, 1,
         "() -> (ScrapRef scrap)"},
        {"ClearCurrentScrap", (PyCFunction)Scrap_ClearCurrentScrap, 1,
         "() -> None"},
        {"CallInScrapPromises", (PyCFunction)Scrap_CallInScrapPromises, 1,
         "() -> None"},
-#endif
        {NULL, NULL, 0}
 };
 
@@ -467,12 +361,10 @@ void init_Scrap(void)
        if (Scrap_Error == NULL ||
            PyDict_SetItemString(d, "Error", Scrap_Error) != 0)
                return;
-#if !TARGET_API_MAC_OS8
        Scrap_Type.ob_type = &PyType_Type;
        Py_INCREF(&Scrap_Type);
        if (PyDict_SetItemString(d, "ScrapType", (PyObject *)&Scrap_Type) != 0)
                Py_FatalError("can't initialize ScrapType");
-#endif
 }
 
 /* ======================= End module _Scrap ======================== */
index 379ded3c01bd05c0369894b4801258cf6e7b0264..0b173a4c88e0f63977c6299cbb1770f82843fc26 100644 (file)
@@ -40,21 +40,12 @@ class MyScanner(Scanner):
        def makeblacklistnames(self):
                return [
                        "GetScrapFlavorInfoList",
+                       'InfoScrap',
+                       'GetScrap',
+                       'ZeroScrap',
+                       'PutScrap',
                        ]
 
-       def makegreylist(self):
-               return [
-                       ('#if !TARGET_API_MAC_CARBON', [
-                               'InfoScrap',
-                               'GetScrap',
-                               'ZeroScrap',
-                               'PutScrap',
-                       ]),
-                       ('#if TARGET_API_MAC_CARBON', [
-                               'CallInScrapPromises',
-                               'ClearCurrentScrap',
-                       ])]
-
        def makeblacklisttypes(self):
                return [
                        'ScrapPromiseKeeperUPP',
index 5f8c1729e23d0d5c644d7ed645e002c9b87b2627..80b1e98c15fbd8d23d7777a7b1f3c8bd9f9ef3c4 100644 (file)
 #include <Carbon/Carbon.h>
 #endif
 
-#if !TARGET_API_MAC_CARBON
-/* Create a SndCommand object (an (int, int, int) tuple) */
-static PyObject *
-SndCmd_New(SndCommand *pc)
-{
-       return Py_BuildValue("hhl", pc->cmd, pc->param1, pc->param2);
-}
-#endif
-
 /* Convert a SndCommand argument */
 static int
 SndCmd_Convert(PyObject *v, SndCommand *pc)
@@ -54,9 +45,6 @@ SndCmd_Convert(PyObject *v, SndCommand *pc)
 
 static pascal void SndCh_UserRoutine(SndChannelPtr chan, SndCommand *cmd); /* Forward */
 static pascal void SPB_completion(SPBPtr my_spb); /* Forward */
-#if !TARGET_API_MAC_CARBON
-static pascal void SPB_interrupt(SPBPtr my_spb); /* Forward */
-#endif
 
 static PyObject *Snd_Error;
 
@@ -147,72 +135,6 @@ static PyObject *SndCh_SndPlay(SndChannelObject *_self, PyObject *_args)
        return _res;
 }
 
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *SndCh_SndStartFilePlay(SndChannelObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       short fRefNum;
-       short resNum;
-       long bufferSize;
-       Boolean async;
-       if (!PyArg_ParseTuple(_args, "hhlb",
-                             &fRefNum,
-                             &resNum,
-                             &bufferSize,
-                             &async))
-               return NULL;
-       _err = SndStartFilePlay(_self->ob_itself,
-                               fRefNum,
-                               resNum,
-                               bufferSize,
-                               0,
-                               0,
-                               0,
-                               async);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-#endif
-
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *SndCh_SndPauseFilePlay(SndChannelObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = SndPauseFilePlay(_self->ob_itself);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-#endif
-
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *SndCh_SndStopFilePlay(SndChannelObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Boolean quietNow;
-       if (!PyArg_ParseTuple(_args, "b",
-                             &quietNow))
-               return NULL;
-       _err = SndStopFilePlay(_self->ob_itself,
-                              quietNow);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-#endif
-
 static PyObject *SndCh_SndChannelStatus(SndChannelObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -276,21 +198,6 @@ static PyMethodDef SndCh_methods[] = {
         PyDoc_STR("(SndCommand cmd) -> None")},
        {"SndPlay", (PyCFunction)SndCh_SndPlay, 1,
         PyDoc_STR("(SndListHandle sndHandle, Boolean async) -> None")},
-
-#if !TARGET_API_MAC_CARBON
-       {"SndStartFilePlay", (PyCFunction)SndCh_SndStartFilePlay, 1,
-        PyDoc_STR("(short fRefNum, short resNum, long bufferSize, Boolean async) -> None")},
-#endif
-
-#if !TARGET_API_MAC_CARBON
-       {"SndPauseFilePlay", (PyCFunction)SndCh_SndPauseFilePlay, 1,
-        PyDoc_STR("() -> None")},
-#endif
-
-#if !TARGET_API_MAC_CARBON
-       {"SndStopFilePlay", (PyCFunction)SndCh_SndStopFilePlay, 1,
-        PyDoc_STR("(Boolean quietNow) -> None")},
-#endif
        {"SndChannelStatus", (PyCFunction)SndCh_SndChannelStatus, 1,
         PyDoc_STR("(short theLength) -> (SCStatus theStatus)")},
        {"SndGetInfo", (PyCFunction)SndCh_SndGetInfo, 1,
@@ -579,26 +486,6 @@ static PyObject *Snd_SndNewChannel(PyObject *_self, PyObject *_args)
        return _res;
 }
 
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *Snd_SndControl(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       short id;
-       SndCommand cmd;
-       if (!PyArg_ParseTuple(_args, "h",
-                             &id))
-               return NULL;
-       _err = SndControl(id,
-                         &cmd);
-       if (_err != noErr) return PyMac_Error(_err);
-       _res = Py_BuildValue("O&",
-                            SndCmd_New, &cmd);
-       return _res;
-}
-#endif
-
 static PyObject *Snd_SndSoundManagerVersion(PyObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -655,201 +542,6 @@ static PyObject *Snd_SndSetSysBeepState(PyObject *_self, PyObject *_args)
        return _res;
 }
 
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *Snd_MACEVersion(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       NumVersion _rv;
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = MACEVersion();
-       _res = Py_BuildValue("O&",
-                            PyMac_BuildNumVersion, _rv);
-       return _res;
-}
-#endif
-
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *Snd_Comp3to1(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       char *buffer__in__;
-       char *buffer__out__;
-       long buffer__len__;
-       int buffer__in_len__;
-       StateBlock *state__in__;
-       StateBlock state__out__;
-       int state__in_len__;
-       unsigned long numChannels;
-       unsigned long whichChannel;
-       if (!PyArg_ParseTuple(_args, "s#s#ll",
-                             &buffer__in__, &buffer__in_len__,
-                             (char **)&state__in__, &state__in_len__,
-                             &numChannels,
-                             &whichChannel))
-               return NULL;
-       if ((buffer__out__ = malloc(buffer__in_len__)) == NULL)
-       {
-               PyErr_NoMemory();
-               goto buffer__error__;
-       }
-       buffer__len__ = buffer__in_len__;
-       if (state__in_len__ != sizeof(StateBlock))
-       {
-               PyErr_SetString(PyExc_TypeError, "buffer length should be sizeof(StateBlock)");
-               goto state__error__;
-       }
-       Comp3to1(buffer__in__, buffer__out__, (long)buffer__len__,
-                state__in__, &state__out__,
-                numChannels,
-                whichChannel);
-       _res = Py_BuildValue("s#s#",
-                            buffer__out__, (int)buffer__len__,
-                            (char *)&state__out__, (int)sizeof(StateBlock));
- state__error__: ;
-       free(buffer__out__);
- buffer__error__: ;
-       return _res;
-}
-#endif
-
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *Snd_Exp1to3(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       char *buffer__in__;
-       char *buffer__out__;
-       long buffer__len__;
-       int buffer__in_len__;
-       StateBlock *state__in__;
-       StateBlock state__out__;
-       int state__in_len__;
-       unsigned long numChannels;
-       unsigned long whichChannel;
-       if (!PyArg_ParseTuple(_args, "s#s#ll",
-                             &buffer__in__, &buffer__in_len__,
-                             (char **)&state__in__, &state__in_len__,
-                             &numChannels,
-                             &whichChannel))
-               return NULL;
-       if ((buffer__out__ = malloc(buffer__in_len__)) == NULL)
-       {
-               PyErr_NoMemory();
-               goto buffer__error__;
-       }
-       buffer__len__ = buffer__in_len__;
-       if (state__in_len__ != sizeof(StateBlock))
-       {
-               PyErr_SetString(PyExc_TypeError, "buffer length should be sizeof(StateBlock)");
-               goto state__error__;
-       }
-       Exp1to3(buffer__in__, buffer__out__, (long)buffer__len__,
-               state__in__, &state__out__,
-               numChannels,
-               whichChannel);
-       _res = Py_BuildValue("s#s#",
-                            buffer__out__, (int)buffer__len__,
-                            (char *)&state__out__, (int)sizeof(StateBlock));
- state__error__: ;
-       free(buffer__out__);
- buffer__error__: ;
-       return _res;
-}
-#endif
-
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *Snd_Comp6to1(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       char *buffer__in__;
-       char *buffer__out__;
-       long buffer__len__;
-       int buffer__in_len__;
-       StateBlock *state__in__;
-       StateBlock state__out__;
-       int state__in_len__;
-       unsigned long numChannels;
-       unsigned long whichChannel;
-       if (!PyArg_ParseTuple(_args, "s#s#ll",
-                             &buffer__in__, &buffer__in_len__,
-                             (char **)&state__in__, &state__in_len__,
-                             &numChannels,
-                             &whichChannel))
-               return NULL;
-       if ((buffer__out__ = malloc(buffer__in_len__)) == NULL)
-       {
-               PyErr_NoMemory();
-               goto buffer__error__;
-       }
-       buffer__len__ = buffer__in_len__;
-       if (state__in_len__ != sizeof(StateBlock))
-       {
-               PyErr_SetString(PyExc_TypeError, "buffer length should be sizeof(StateBlock)");
-               goto state__error__;
-       }
-       Comp6to1(buffer__in__, buffer__out__, (long)buffer__len__,
-                state__in__, &state__out__,
-                numChannels,
-                whichChannel);
-       _res = Py_BuildValue("s#s#",
-                            buffer__out__, (int)buffer__len__,
-                            (char *)&state__out__, (int)sizeof(StateBlock));
- state__error__: ;
-       free(buffer__out__);
- buffer__error__: ;
-       return _res;
-}
-#endif
-
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *Snd_Exp1to6(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       char *buffer__in__;
-       char *buffer__out__;
-       long buffer__len__;
-       int buffer__in_len__;
-       StateBlock *state__in__;
-       StateBlock state__out__;
-       int state__in_len__;
-       unsigned long numChannels;
-       unsigned long whichChannel;
-       if (!PyArg_ParseTuple(_args, "s#s#ll",
-                             &buffer__in__, &buffer__in_len__,
-                             (char **)&state__in__, &state__in_len__,
-                             &numChannels,
-                             &whichChannel))
-               return NULL;
-       if ((buffer__out__ = malloc(buffer__in_len__)) == NULL)
-       {
-               PyErr_NoMemory();
-               goto buffer__error__;
-       }
-       buffer__len__ = buffer__in_len__;
-       if (state__in_len__ != sizeof(StateBlock))
-       {
-               PyErr_SetString(PyExc_TypeError, "buffer length should be sizeof(StateBlock)");
-               goto state__error__;
-       }
-       Exp1to6(buffer__in__, buffer__out__, (long)buffer__len__,
-               state__in__, &state__out__,
-               numChannels,
-               whichChannel);
-       _res = Py_BuildValue("s#s#",
-                            buffer__out__, (int)buffer__len__,
-                            (char *)&state__out__, (int)sizeof(StateBlock));
- state__error__: ;
-       free(buffer__out__);
- buffer__error__: ;
-       return _res;
-}
-#endif
-
 static PyObject *Snd_GetSysBeepVolume(PyObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -1041,31 +733,6 @@ static PyObject *Snd_SndRecord(PyObject *_self, PyObject *_args)
        return _res;
 }
 
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *Snd_SndRecordToFile(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       Point corner;
-       OSType quality;
-       short fRefNum;
-       if (!PyArg_ParseTuple(_args, "O&O&h",
-                             PyMac_GetPoint, &corner,
-                             PyMac_GetOSType, &quality,
-                             &fRefNum))
-               return NULL;
-       _err = SndRecordToFile((ModalFilterUPP)0,
-                              corner,
-                              quality,
-                              fRefNum);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-#endif
-
 static PyObject *Snd_SPBSignInDevice(PyObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -1172,30 +839,6 @@ static PyObject *Snd_SPBRecord(PyObject *_self, PyObject *_args)
        return _res;
 }
 
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *Snd_SPBRecordToFile(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSErr _err;
-       short fRefNum;
-       SPBPtr inParamPtr;
-       Boolean asynchFlag;
-       if (!PyArg_ParseTuple(_args, "hO&b",
-                             &fRefNum,
-                             SPBObj_Convert, &inParamPtr,
-                             &asynchFlag))
-               return NULL;
-       _err = SPBRecordToFile(fRefNum,
-                              inParamPtr,
-                              asynchFlag);
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-#endif
-
 static PyObject *Snd_SPBPauseRecording(PyObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -1356,11 +999,6 @@ static PyMethodDef Snd_methods[] = {
         PyDoc_STR("(short duration) -> None")},
        {"SndNewChannel", (PyCFunction)Snd_SndNewChannel, 1,
         PyDoc_STR("(short synth, long init, PyObject* userRoutine) -> (SndChannelPtr chan)")},
-
-#if !TARGET_API_MAC_CARBON
-       {"SndControl", (PyCFunction)Snd_SndControl, 1,
-        PyDoc_STR("(short id) -> (SndCommand cmd)")},
-#endif
        {"SndSoundManagerVersion", (PyCFunction)Snd_SndSoundManagerVersion, 1,
         PyDoc_STR("() -> (NumVersion _rv)")},
        {"SndManagerStatus", (PyCFunction)Snd_SndManagerStatus, 1,
@@ -1369,31 +1007,6 @@ static PyMethodDef Snd_methods[] = {
         PyDoc_STR("() -> (short sysBeepState)")},
        {"SndSetSysBeepState", (PyCFunction)Snd_SndSetSysBeepState, 1,
         PyDoc_STR("(short sysBeepState) -> None")},
-
-#if !TARGET_API_MAC_CARBON
-       {"MACEVersion", (PyCFunction)Snd_MACEVersion, 1,
-        PyDoc_STR("() -> (NumVersion _rv)")},
-#endif
-
-#if !TARGET_API_MAC_CARBON
-       {"Comp3to1", (PyCFunction)Snd_Comp3to1, 1,
-        PyDoc_STR("(Buffer buffer, StateBlock state, unsigned long numChannels, unsigned long whichChannel) -> (Buffer buffer, StateBlock state)")},
-#endif
-
-#if !TARGET_API_MAC_CARBON
-       {"Exp1to3", (PyCFunction)Snd_Exp1to3, 1,
-        PyDoc_STR("(Buffer buffer, StateBlock state, unsigned long numChannels, unsigned long whichChannel) -> (Buffer buffer, StateBlock state)")},
-#endif
-
-#if !TARGET_API_MAC_CARBON
-       {"Comp6to1", (PyCFunction)Snd_Comp6to1, 1,
-        PyDoc_STR("(Buffer buffer, StateBlock state, unsigned long numChannels, unsigned long whichChannel) -> (Buffer buffer, StateBlock state)")},
-#endif
-
-#if !TARGET_API_MAC_CARBON
-       {"Exp1to6", (PyCFunction)Snd_Exp1to6, 1,
-        PyDoc_STR("(Buffer buffer, StateBlock state, unsigned long numChannels, unsigned long whichChannel) -> (Buffer buffer, StateBlock state)")},
-#endif
        {"GetSysBeepVolume", (PyCFunction)Snd_GetSysBeepVolume, 1,
         PyDoc_STR("() -> (long level)")},
        {"SetSysBeepVolume", (PyCFunction)Snd_SetSysBeepVolume, 1,
@@ -1416,11 +1029,6 @@ static PyMethodDef Snd_methods[] = {
         PyDoc_STR("() -> (NumVersion _rv)")},
        {"SndRecord", (PyCFunction)Snd_SndRecord, 1,
         PyDoc_STR("(Point corner, OSType quality) -> (SndListHandle sndHandle)")},
-
-#if !TARGET_API_MAC_CARBON
-       {"SndRecordToFile", (PyCFunction)Snd_SndRecordToFile, 1,
-        PyDoc_STR("(Point corner, OSType quality, short fRefNum) -> None")},
-#endif
        {"SPBSignInDevice", (PyCFunction)Snd_SPBSignInDevice, 1,
         PyDoc_STR("(short deviceRefNum, Str255 deviceName) -> None")},
        {"SPBSignOutDevice", (PyCFunction)Snd_SPBSignOutDevice, 1,
@@ -1433,11 +1041,6 @@ static PyMethodDef Snd_methods[] = {
         PyDoc_STR("(long inRefNum) -> None")},
        {"SPBRecord", (PyCFunction)Snd_SPBRecord, 1,
         PyDoc_STR("(SPBPtr inParamPtr, Boolean asynchFlag) -> None")},
-
-#if !TARGET_API_MAC_CARBON
-       {"SPBRecordToFile", (PyCFunction)Snd_SPBRecordToFile, 1,
-        PyDoc_STR("(short fRefNum, SPBPtr inParamPtr, Boolean asynchFlag) -> None")},
-#endif
        {"SPBPauseRecording", (PyCFunction)Snd_SPBPauseRecording, 1,
         PyDoc_STR("(long inRefNum) -> None")},
        {"SPBResumeRecording", (PyCFunction)Snd_SPBResumeRecording, 1,
@@ -1521,20 +1124,6 @@ SPB_completion(SPBPtr my_spb)
        }
 }
 
-#if !TARGET_API_MAC_CARBON
-static pascal void
-SPB_interrupt(SPBPtr my_spb)
-{
-       SPBObject *p = (SPBObject *)(my_spb->userLong);
-       
-       if (p && p->ob_interrupt) {
-               long A5 = SetA5(p->ob_A5);
-               p->ob_thiscallback = p->ob_interrupt;   /* Hope we cannot get two at the same time */
-               Py_AddPendingCall(SPB_CallCallBack, (void *)p);
-               SetA5(A5);
-       }
-}
-#endif
 
 
 void init_Snd(void)
index fc358a047afaee9cef799ed776e828cf82dee9b8..a287c73a424f14f38e14c79827bc94302f2786ac 100644 (file)
@@ -49,25 +49,21 @@ class SoundScanner(Scanner):
                        'rate48khz',
                        'rate44khz',
                        'kInvalidSource',
+                       # OS8 only:
+                       'MACEVersion',
+                       'SPBRecordToFile',
+                       'Exp1to6',
+                       'Comp6to1',
+                       'Exp1to3',
+                       'Comp3to1',
+                       'SndControl',
+                       'SndStopFilePlay',
+                       'SndStartFilePlay',
+                       'SndPauseFilePlay',
+                       'SndRecordToFile',
 
                        ]
 
-       def makegreylist(self):
-               return [
-                       ('#if !TARGET_API_MAC_CARBON', [
-                               'MACEVersion',
-                               'SPBRecordToFile',
-                               'Exp1to6',
-                               'Comp6to1',
-                               'Exp1to3',
-                               'Comp3to1',
-                               'SndControl',
-                               'SndStopFilePlay',
-                               'SndStartFilePlay',
-                               'SndPauseFilePlay',
-                               'SndRecordToFile',
-                       ])]
-
        def makeblacklisttypes(self):
                return [
                        "GetSoundVol",
index 073f612ed9459123842756b4f6a9b619ac6db015..105fc661237ec7fb3b8994181a8a5a3ab93d513c 100644 (file)
@@ -96,15 +96,6 @@ SMStatus = StructOutputBufferType('SMStatus')
 CompressionInfo = StructOutputBufferType('CompressionInfo')
 
 includestuff = includestuff + """
-#if !TARGET_API_MAC_CARBON
-/* Create a SndCommand object (an (int, int, int) tuple) */
-static PyObject *
-SndCmd_New(SndCommand *pc)
-{
-       return Py_BuildValue("hhl", pc->cmd, pc->param1, pc->param2);
-}
-#endif
-
 /* Convert a SndCommand argument */
 static int
 SndCmd_Convert(PyObject *v, SndCommand *pc)
@@ -123,9 +114,6 @@ SndCmd_Convert(PyObject *v, SndCommand *pc)
 
 static pascal void SndCh_UserRoutine(SndChannelPtr chan, SndCommand *cmd); /* Forward */
 static pascal void SPB_completion(SPBPtr my_spb); /* Forward */
-#if !TARGET_API_MAC_CARBON
-static pascal void SPB_interrupt(SPBPtr my_spb); /* Forward */
-#endif
 """
 
 
@@ -192,20 +180,6 @@ SPB_completion(SPBPtr my_spb)
        }
 }
 
-#if !TARGET_API_MAC_CARBON
-static pascal void
-SPB_interrupt(SPBPtr my_spb)
-{
-       SPBObject *p = (SPBObject *)(my_spb->userLong);
-       
-       if (p && p->ob_interrupt) {
-               long A5 = SetA5(p->ob_A5);
-               p->ob_thiscallback = p->ob_interrupt;   /* Hope we cannot get two at the same time */
-               Py_AddPendingCall(SPB_CallCallBack, (void *)p);
-               SetA5(A5);
-       }
-}
-#endif
 """
 
 
index 03031d2aaf6877f70874083e187ea3845d6095e8..990efa2978754dcaf2cdaba4c77dcc5cc146be8f 100644 (file)
@@ -1197,8 +1197,6 @@ static PyObject *TE_TEToScrap(PyObject *_self, PyObject *_args)
        return _res;
 }
 
-#if TARGET_API_MAC_CARBON
-
 static PyObject *TE_TEGetScrapHandle(PyObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -1213,9 +1211,6 @@ static PyObject *TE_TEGetScrapHandle(PyObject *_self, PyObject *_args)
                             ResObj_New, _rv);
        return _res;
 }
-#endif
-
-#if TARGET_API_MAC_CARBON
 
 static PyObject *TE_TESetScrapHandle(PyObject *_self, PyObject *_args)
 {
@@ -1232,7 +1227,6 @@ static PyObject *TE_TESetScrapHandle(PyObject *_self, PyObject *_args)
        _res = Py_None;
        return _res;
 }
-#endif
 
 static PyObject *TE_LMGetWordRedraw(PyObject *_self, PyObject *_args)
 {
@@ -1299,16 +1293,10 @@ static PyMethodDef TE_methods[] = {
         PyDoc_STR("() -> None")},
        {"TEToScrap", (PyCFunction)TE_TEToScrap, 1,
         PyDoc_STR("() -> None")},
-
-#if TARGET_API_MAC_CARBON
        {"TEGetScrapHandle", (PyCFunction)TE_TEGetScrapHandle, 1,
         PyDoc_STR("() -> (Handle _rv)")},
-#endif
-
-#if TARGET_API_MAC_CARBON
        {"TESetScrapHandle", (PyCFunction)TE_TESetScrapHandle, 1,
         PyDoc_STR("(Handle value) -> None")},
-#endif
        {"LMGetWordRedraw", (PyCFunction)TE_LMGetWordRedraw, 1,
         PyDoc_STR("() -> (UInt8 _rv)")},
        {"LMSetWordRedraw", (PyCFunction)TE_LMSetWordRedraw, 1,
index ed37dbbe253dfcdc77c3346628a094b720dda927..c81a8bf4f89d6a66635c1330c697286b69b6af67 100644 (file)
@@ -43,13 +43,6 @@ class MyScanner(Scanner):
 ##                     "TEGetHiliteRgn",
                        ]
 
-       def makegreylist(self):
-               return [
-                       ('#if TARGET_API_MAC_CARBON', [
-                               'TEGetScrapHandle',
-                               'TESetScrapHandle',
-                       ])]
-
        def makeblacklisttypes(self):
                return [
                        "TEClickLoopUPP",
index 6629cfa19705036b65b3d25953e6acfdb1194697..db3e31e5c9933d84409b23646ebbf98e7be7f950 100644 (file)
@@ -158,8 +158,6 @@ static PyObject *WinObj_CloneWindow(WindowObject *_self, PyObject *_args)
        return _res;
 }
 
-#if !TARGET_API_MAC_OS8
-
 static PyObject *WinObj_GetWindowRetainCount(WindowObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -174,9 +172,6 @@ static PyObject *WinObj_GetWindowRetainCount(WindowObject *_self, PyObject *_arg
                             _rv);
        return _res;
 }
-#endif
-
-#if !TARGET_API_MAC_OS8
 
 static PyObject *WinObj_RetainWindow(WindowObject *_self, PyObject *_args)
 {
@@ -193,9 +188,6 @@ static PyObject *WinObj_RetainWindow(WindowObject *_self, PyObject *_args)
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if !TARGET_API_MAC_OS8
 
 static PyObject *WinObj_ReleaseWindow(WindowObject *_self, PyObject *_args)
 {
@@ -212,9 +204,6 @@ static PyObject *WinObj_ReleaseWindow(WindowObject *_self, PyObject *_args)
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if !TARGET_API_MAC_OS8
 
 static PyObject *WinObj_ReshapeCustomWindow(WindowObject *_self, PyObject *_args)
 {
@@ -231,7 +220,6 @@ static PyObject *WinObj_ReshapeCustomWindow(WindowObject *_self, PyObject *_args
        _res = Py_None;
        return _res;
 }
-#endif
 
 static PyObject *WinObj_GetWindowWidgetHilite(WindowObject *_self, PyObject *_args)
 {
@@ -287,8 +275,6 @@ static PyObject *WinObj_GetWindowAttributes(WindowObject *_self, PyObject *_args
        return _res;
 }
 
-#if !TARGET_API_MAC_OS8
-
 static PyObject *WinObj_ChangeWindowAttributes(WindowObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -310,9 +296,6 @@ static PyObject *WinObj_ChangeWindowAttributes(WindowObject *_self, PyObject *_a
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if !TARGET_API_MAC_OS8
 
 static PyObject *WinObj_SetWindowClass(WindowObject *_self, PyObject *_args)
 {
@@ -332,9 +315,6 @@ static PyObject *WinObj_SetWindowClass(WindowObject *_self, PyObject *_args)
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if !TARGET_API_MAC_OS8
 
 static PyObject *WinObj_SetWindowModality(WindowObject *_self, PyObject *_args)
 {
@@ -357,9 +337,6 @@ static PyObject *WinObj_SetWindowModality(WindowObject *_self, PyObject *_args)
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if !TARGET_API_MAC_OS8
 
 static PyObject *WinObj_GetWindowModality(WindowObject *_self, PyObject *_args)
 {
@@ -381,27 +358,6 @@ static PyObject *WinObj_GetWindowModality(WindowObject *_self, PyObject *_args)
                             WinObj_WhichWindow, outUnavailableWindow);
        return _res;
 }
-#endif
-
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *WinObj_SetWinColor(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       WCTabHandle newColorTable;
-#ifndef SetWinColor
-       PyMac_PRECHECK(SetWinColor);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &newColorTable))
-               return NULL;
-       SetWinColor(_self->ob_itself,
-                   newColorTable);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-#endif
 
 static PyObject *WinObj_SetWindowContentColor(WindowObject *_self, PyObject *_args)
 {
@@ -478,8 +434,6 @@ static PyObject *WinObj_SetWindowContentPattern(WindowObject *_self, PyObject *_
        return _res;
 }
 
-#if !TARGET_API_MAC_OS8
-
 static PyObject *WinObj_ScrollWindowRect(WindowObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -510,9 +464,6 @@ static PyObject *WinObj_ScrollWindowRect(WindowObject *_self, PyObject *_args)
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if !TARGET_API_MAC_OS8
 
 static PyObject *WinObj_ScrollWindowRegion(WindowObject *_self, PyObject *_args)
 {
@@ -544,7 +495,6 @@ static PyObject *WinObj_ScrollWindowRegion(WindowObject *_self, PyObject *_args)
        _res = Py_None;
        return _res;
 }
-#endif
 
 static PyObject *WinObj_ClipAbove(WindowObject *_self, PyObject *_args)
 {
@@ -560,43 +510,6 @@ static PyObject *WinObj_ClipAbove(WindowObject *_self, PyObject *_args)
        return _res;
 }
 
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *WinObj_SaveOld(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef SaveOld
-       PyMac_PRECHECK(SaveOld);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       SaveOld(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-#endif
-
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *WinObj_DrawNew(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean update;
-#ifndef DrawNew
-       PyMac_PRECHECK(DrawNew);
-#endif
-       if (!PyArg_ParseTuple(_args, "b",
-                             &update))
-               return NULL;
-       DrawNew(_self->ob_itself,
-               update);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-#endif
-
 static PyObject *WinObj_PaintOne(WindowObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -707,8 +620,6 @@ static PyObject *WinObj_SelectWindow(WindowObject *_self, PyObject *_args)
        return _res;
 }
 
-#if !TARGET_API_MAC_OS8
-
 static PyObject *WinObj_GetNextWindowOfClass(WindowObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -729,9 +640,6 @@ static PyObject *WinObj_GetNextWindowOfClass(WindowObject *_self, PyObject *_arg
                             WinObj_New, _rv);
        return _res;
 }
-#endif
-
-#if !TARGET_API_MAC_OS8
 
 static PyObject *WinObj_SetWindowAlternateTitle(WindowObject *_self, PyObject *_args)
 {
@@ -751,9 +659,6 @@ static PyObject *WinObj_SetWindowAlternateTitle(WindowObject *_self, PyObject *_
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if !TARGET_API_MAC_OS8
 
 static PyObject *WinObj_CopyWindowAlternateTitle(WindowObject *_self, PyObject *_args)
 {
@@ -772,25 +677,6 @@ static PyObject *WinObj_CopyWindowAlternateTitle(WindowObject *_self, PyObject *
                             CFStringRefObj_New, outTitle);
        return _res;
 }
-#endif
-
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *WinObj_IsValidWindowPtr(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-#ifndef IsValidWindowPtr
-       PyMac_PRECHECK(IsValidWindowPtr);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = IsValidWindowPtr(_self->ob_itself);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-#endif
 
 static PyObject *WinObj_HiliteWindow(WindowObject *_self, PyObject *_args)
 {
@@ -1097,8 +983,6 @@ static PyObject *WinObj_GetWTitle(WindowObject *_self, PyObject *_args)
        return _res;
 }
 
-#if !TARGET_API_MAC_OS8
-
 static PyObject *WinObj_SetWindowTitleWithCFString(WindowObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -1117,9 +1001,6 @@ static PyObject *WinObj_SetWindowTitleWithCFString(WindowObject *_self, PyObject
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if !TARGET_API_MAC_OS8
 
 static PyObject *WinObj_CopyWindowTitleAsCFString(WindowObject *_self, PyObject *_args)
 {
@@ -1138,7 +1019,6 @@ static PyObject *WinObj_CopyWindowTitleAsCFString(WindowObject *_self, PyObject
                             CFStringRefObj_New, outString);
        return _res;
 }
-#endif
 
 static PyObject *WinObj_SetWindowProxyFSSpec(WindowObject *_self, PyObject *_args)
 {
@@ -1870,8 +1750,6 @@ static PyObject *WinObj_SetWindowIdealUserState(WindowObject *_self, PyObject *_
        return _res;
 }
 
-#if !TARGET_API_MAC_OS8
-
 static PyObject *WinObj_GetWindowGreatestAreaDevice(WindowObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -1895,9 +1773,6 @@ static PyObject *WinObj_GetWindowGreatestAreaDevice(WindowObject *_self, PyObjec
                             PyMac_BuildRect, &outGreatestDeviceRect);
        return _res;
 }
-#endif
-
-#if !TARGET_API_MAC_OS8
 
 static PyObject *WinObj_ConstrainWindowToScreen(WindowObject *_self, PyObject *_args)
 {
@@ -1925,7 +1800,6 @@ static PyObject *WinObj_ConstrainWindowToScreen(WindowObject *_self, PyObject *_
                             PyMac_BuildRect, &outStructure);
        return _res;
 }
-#endif
 
 static PyObject *WinObj_HideWindow(WindowObject *_self, PyObject *_args)
 {
@@ -1987,8 +1861,6 @@ static PyObject *WinObj_MacIsWindowVisible(WindowObject *_self, PyObject *_args)
        return _res;
 }
 
-#if !TARGET_API_MAC_OS8
-
 static PyObject *WinObj_ShowSheetWindow(WindowObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -2007,9 +1879,6 @@ static PyObject *WinObj_ShowSheetWindow(WindowObject *_self, PyObject *_args)
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if !TARGET_API_MAC_OS8
 
 static PyObject *WinObj_HideSheetWindow(WindowObject *_self, PyObject *_args)
 {
@@ -2026,9 +1895,6 @@ static PyObject *WinObj_HideSheetWindow(WindowObject *_self, PyObject *_args)
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if !TARGET_API_MAC_OS8
 
 static PyObject *WinObj_GetSheetWindowParent(WindowObject *_self, PyObject *_args)
 {
@@ -2047,9 +1913,6 @@ static PyObject *WinObj_GetSheetWindowParent(WindowObject *_self, PyObject *_arg
                             WinObj_WhichWindow, outParentWindow);
        return _res;
 }
-#endif
-
-#if !TARGET_API_MAC_OS8
 
 static PyObject *WinObj_GetWindowPropertyAttributes(WindowObject *_self, PyObject *_args)
 {
@@ -2074,9 +1937,6 @@ static PyObject *WinObj_GetWindowPropertyAttributes(WindowObject *_self, PyObjec
                             attributes);
        return _res;
 }
-#endif
-
-#if !TARGET_API_MAC_OS8
 
 static PyObject *WinObj_ChangeWindowPropertyAttributes(WindowObject *_self, PyObject *_args)
 {
@@ -2105,7 +1965,6 @@ static PyObject *WinObj_ChangeWindowPropertyAttributes(WindowObject *_self, PyOb
        _res = Py_None;
        return _res;
 }
-#endif
 
 static PyObject *WinObj_TrackBox(WindowObject *_self, PyObject *_args)
 {
@@ -2146,63 +2005,6 @@ static PyObject *WinObj_TrackGoAway(WindowObject *_self, PyObject *_args)
        return _res;
 }
 
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *WinObj_GetAuxWin(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-       AuxWinHandle awHndl;
-#ifndef GetAuxWin
-       PyMac_PRECHECK(GetAuxWin);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetAuxWin(_self->ob_itself,
-                       &awHndl);
-       _res = Py_BuildValue("bO&",
-                            _rv,
-                            ResObj_New, awHndl);
-       return _res;
-}
-#endif
-
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *WinObj_GetWindowGoAwayFlag(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-#ifndef GetWindowGoAwayFlag
-       PyMac_PRECHECK(GetWindowGoAwayFlag);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetWindowGoAwayFlag(_self->ob_itself);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-#endif
-
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *WinObj_GetWindowSpareFlag(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-#ifndef GetWindowSpareFlag
-       PyMac_PRECHECK(GetWindowSpareFlag);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetWindowSpareFlag(_self->ob_itself);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-#endif
-
 static PyObject *WinObj_GetWindowPort(WindowObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -2248,8 +2050,6 @@ static PyObject *WinObj_IsWindowHilited(WindowObject *_self, PyObject *_args)
        return _res;
 }
 
-#if !TARGET_API_MAC_OS8
-
 static PyObject *WinObj_IsWindowUpdatePending(WindowObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -2264,7 +2064,6 @@ static PyObject *WinObj_IsWindowUpdatePending(WindowObject *_self, PyObject *_ar
                             _rv);
        return _res;
 }
-#endif
 
 static PyObject *WinObj_MacGetNextWindow(WindowObject *_self, PyObject *_args)
 {
@@ -2409,24 +2208,6 @@ static PyObject *WinObj_IsWindowVisible(WindowObject *_self, PyObject *_args)
        return _res;
 }
 
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *WinObj_GetWindowZoomFlag(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Boolean _rv;
-#ifndef GetWindowZoomFlag
-       PyMac_PRECHECK(GetWindowZoomFlag);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetWindowZoomFlag(_self->ob_itself);
-       _res = Py_BuildValue("b",
-                            _rv);
-       return _res;
-}
-#endif
-
 static PyObject *WinObj_GetWindowStructureRgn(WindowObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -2478,24 +2259,6 @@ static PyObject *WinObj_GetWindowUpdateRgn(WindowObject *_self, PyObject *_args)
        return _res;
 }
 
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *WinObj_GetWindowTitleWidth(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       short _rv;
-#ifndef GetWindowTitleWidth
-       PyMac_PRECHECK(GetWindowTitleWidth);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _rv = GetWindowTitleWidth(_self->ob_itself);
-       _res = Py_BuildValue("h",
-                            _rv);
-       return _res;
-}
-#endif
-
 static PyObject *WinObj_GetNextWindow(WindowObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -2511,23 +2274,6 @@ static PyObject *WinObj_GetNextWindow(WindowObject *_self, PyObject *_args)
        return _res;
 }
 
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *WinObj_CloseWindow(WindowObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef CloseWindow
-       PyMac_PRECHECK(CloseWindow);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       CloseWindow(_self->ob_itself);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-#endif
-
 static PyObject *WinObj_MoveWindow(WindowObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -2570,57 +2316,28 @@ static PyMethodDef WinObj_methods[] = {
         PyDoc_STR("() -> (UInt32 outCount)")},
        {"CloneWindow", (PyCFunction)WinObj_CloneWindow, 1,
         PyDoc_STR("() -> None")},
-
-#if !TARGET_API_MAC_OS8
        {"GetWindowRetainCount", (PyCFunction)WinObj_GetWindowRetainCount, 1,
         PyDoc_STR("() -> (ItemCount _rv)")},
-#endif
-
-#if !TARGET_API_MAC_OS8
        {"RetainWindow", (PyCFunction)WinObj_RetainWindow, 1,
         PyDoc_STR("() -> None")},
-#endif
-
-#if !TARGET_API_MAC_OS8
        {"ReleaseWindow", (PyCFunction)WinObj_ReleaseWindow, 1,
         PyDoc_STR("() -> None")},
-#endif
-
-#if !TARGET_API_MAC_OS8
        {"ReshapeCustomWindow", (PyCFunction)WinObj_ReshapeCustomWindow, 1,
         PyDoc_STR("() -> None")},
-#endif
        {"GetWindowWidgetHilite", (PyCFunction)WinObj_GetWindowWidgetHilite, 1,
         PyDoc_STR("() -> (WindowDefPartCode outHilite)")},
        {"GetWindowClass", (PyCFunction)WinObj_GetWindowClass, 1,
         PyDoc_STR("() -> (WindowClass outClass)")},
        {"GetWindowAttributes", (PyCFunction)WinObj_GetWindowAttributes, 1,
         PyDoc_STR("() -> (WindowAttributes outAttributes)")},
-
-#if !TARGET_API_MAC_OS8
        {"ChangeWindowAttributes", (PyCFunction)WinObj_ChangeWindowAttributes, 1,
         PyDoc_STR("(WindowAttributes setTheseAttributes, WindowAttributes clearTheseAttributes) -> None")},
-#endif
-
-#if !TARGET_API_MAC_OS8
        {"SetWindowClass", (PyCFunction)WinObj_SetWindowClass, 1,
         PyDoc_STR("(WindowClass inWindowClass) -> None")},
-#endif
-
-#if !TARGET_API_MAC_OS8
        {"SetWindowModality", (PyCFunction)WinObj_SetWindowModality, 1,
         PyDoc_STR("(WindowModality inModalKind, WindowPtr inUnavailableWindow) -> None")},
-#endif
-
-#if !TARGET_API_MAC_OS8
        {"GetWindowModality", (PyCFunction)WinObj_GetWindowModality, 1,
         PyDoc_STR("() -> (WindowModality outModalKind, WindowPtr outUnavailableWindow)")},
-#endif
-
-#if !TARGET_API_MAC_CARBON
-       {"SetWinColor", (PyCFunction)WinObj_SetWinColor, 1,
-        PyDoc_STR("(WCTabHandle newColorTable) -> None")},
-#endif
        {"SetWindowContentColor", (PyCFunction)WinObj_SetWindowContentColor, 1,
         PyDoc_STR("(RGBColor color) -> None")},
        {"GetWindowContentColor", (PyCFunction)WinObj_GetWindowContentColor, 1,
@@ -2629,28 +2346,12 @@ static PyMethodDef WinObj_methods[] = {
         PyDoc_STR("(PixPatHandle outPixPat) -> None")},
        {"SetWindowContentPattern", (PyCFunction)WinObj_SetWindowContentPattern, 1,
         PyDoc_STR("(PixPatHandle pixPat) -> None")},
-
-#if !TARGET_API_MAC_OS8
        {"ScrollWindowRect", (PyCFunction)WinObj_ScrollWindowRect, 1,
         PyDoc_STR("(Rect inScrollRect, SInt16 inHPixels, SInt16 inVPixels, ScrollWindowOptions inOptions, RgnHandle outExposedRgn) -> None")},
-#endif
-
-#if !TARGET_API_MAC_OS8
        {"ScrollWindowRegion", (PyCFunction)WinObj_ScrollWindowRegion, 1,
         PyDoc_STR("(RgnHandle inScrollRgn, SInt16 inHPixels, SInt16 inVPixels, ScrollWindowOptions inOptions, RgnHandle outExposedRgn) -> None")},
-#endif
        {"ClipAbove", (PyCFunction)WinObj_ClipAbove, 1,
         PyDoc_STR("() -> None")},
-
-#if !TARGET_API_MAC_CARBON
-       {"SaveOld", (PyCFunction)WinObj_SaveOld, 1,
-        PyDoc_STR("() -> None")},
-#endif
-
-#if !TARGET_API_MAC_CARBON
-       {"DrawNew", (PyCFunction)WinObj_DrawNew, 1,
-        PyDoc_STR("(Boolean update) -> None")},
-#endif
        {"PaintOne", (PyCFunction)WinObj_PaintOne, 1,
         PyDoc_STR("(RgnHandle clobberedRgn) -> None")},
        {"PaintBehind", (PyCFunction)WinObj_PaintBehind, 1,
@@ -2665,26 +2366,12 @@ static PyMethodDef WinObj_methods[] = {
         PyDoc_STR("(WindowPtr behindWindow) -> None")},
        {"SelectWindow", (PyCFunction)WinObj_SelectWindow, 1,
         PyDoc_STR("() -> None")},
-
-#if !TARGET_API_MAC_OS8
        {"GetNextWindowOfClass", (PyCFunction)WinObj_GetNextWindowOfClass, 1,
         PyDoc_STR("(WindowClass inWindowClass, Boolean mustBeVisible) -> (WindowPtr _rv)")},
-#endif
-
-#if !TARGET_API_MAC_OS8
        {"SetWindowAlternateTitle", (PyCFunction)WinObj_SetWindowAlternateTitle, 1,
         PyDoc_STR("(CFStringRef inTitle) -> None")},
-#endif
-
-#if !TARGET_API_MAC_OS8
        {"CopyWindowAlternateTitle", (PyCFunction)WinObj_CopyWindowAlternateTitle, 1,
         PyDoc_STR("() -> (CFStringRef outTitle)")},
-#endif
-
-#if !TARGET_API_MAC_CARBON
-       {"IsValidWindowPtr", (PyCFunction)WinObj_IsValidWindowPtr, 1,
-        PyDoc_STR("() -> (Boolean _rv)")},
-#endif
        {"HiliteWindow", (PyCFunction)WinObj_HiliteWindow, 1,
         PyDoc_STR("(Boolean fHilite) -> None")},
        {"SetWRefCon", (PyCFunction)WinObj_SetWRefCon, 1,
@@ -2721,16 +2408,10 @@ static PyMethodDef WinObj_methods[] = {
         PyDoc_STR("(Str255 title) -> None")},
        {"GetWTitle", (PyCFunction)WinObj_GetWTitle, 1,
         PyDoc_STR("() -> (Str255 title)")},
-
-#if !TARGET_API_MAC_OS8
        {"SetWindowTitleWithCFString", (PyCFunction)WinObj_SetWindowTitleWithCFString, 1,
         PyDoc_STR("(CFStringRef inString) -> None")},
-#endif
-
-#if !TARGET_API_MAC_OS8
        {"CopyWindowTitleAsCFString", (PyCFunction)WinObj_CopyWindowTitleAsCFString, 1,
         PyDoc_STR("() -> (CFStringRef outString)")},
-#endif
        {"SetWindowProxyFSSpec", (PyCFunction)WinObj_SetWindowProxyFSSpec, 1,
         PyDoc_STR("(FSSpec inFile) -> None")},
        {"GetWindowProxyFSSpec", (PyCFunction)WinObj_GetWindowProxyFSSpec, 1,
@@ -2806,16 +2487,10 @@ static PyMethodDef WinObj_methods[] = {
         PyDoc_STR("() -> (Rect userState)")},
        {"SetWindowIdealUserState", (PyCFunction)WinObj_SetWindowIdealUserState, 1,
         PyDoc_STR("(Rect userState) -> None")},
-
-#if !TARGET_API_MAC_OS8
        {"GetWindowGreatestAreaDevice", (PyCFunction)WinObj_GetWindowGreatestAreaDevice, 1,
         PyDoc_STR("(WindowRegionCode inRegion) -> (GDHandle outGreatestDevice, Rect outGreatestDeviceRect)")},
-#endif
-
-#if !TARGET_API_MAC_OS8
        {"ConstrainWindowToScreen", (PyCFunction)WinObj_ConstrainWindowToScreen, 1,
         PyDoc_STR("(WindowRegionCode inRegionCode, WindowConstrainOptions inOptions, Rect inScreenRect) -> (Rect outStructure)")},
-#endif
        {"HideWindow", (PyCFunction)WinObj_HideWindow, 1,
         PyDoc_STR("() -> None")},
        {"MacShowWindow", (PyCFunction)WinObj_MacShowWindow, 1,
@@ -2824,61 +2499,28 @@ static PyMethodDef WinObj_methods[] = {
         PyDoc_STR("(Boolean showFlag) -> None")},
        {"MacIsWindowVisible", (PyCFunction)WinObj_MacIsWindowVisible, 1,
         PyDoc_STR("() -> (Boolean _rv)")},
-
-#if !TARGET_API_MAC_OS8
        {"ShowSheetWindow", (PyCFunction)WinObj_ShowSheetWindow, 1,
         PyDoc_STR("(WindowPtr inParentWindow) -> None")},
-#endif
-
-#if !TARGET_API_MAC_OS8
        {"HideSheetWindow", (PyCFunction)WinObj_HideSheetWindow, 1,
         PyDoc_STR("() -> None")},
-#endif
-
-#if !TARGET_API_MAC_OS8
        {"GetSheetWindowParent", (PyCFunction)WinObj_GetSheetWindowParent, 1,
         PyDoc_STR("() -> (WindowPtr outParentWindow)")},
-#endif
-
-#if !TARGET_API_MAC_OS8
        {"GetWindowPropertyAttributes", (PyCFunction)WinObj_GetWindowPropertyAttributes, 1,
         PyDoc_STR("(OSType propertyCreator, OSType propertyTag) -> (UInt32 attributes)")},
-#endif
-
-#if !TARGET_API_MAC_OS8
        {"ChangeWindowPropertyAttributes", (PyCFunction)WinObj_ChangeWindowPropertyAttributes, 1,
         PyDoc_STR("(OSType propertyCreator, OSType propertyTag, UInt32 attributesToSet, UInt32 attributesToClear) -> None")},
-#endif
        {"TrackBox", (PyCFunction)WinObj_TrackBox, 1,
         PyDoc_STR("(Point thePt, WindowPartCode partCode) -> (Boolean _rv)")},
        {"TrackGoAway", (PyCFunction)WinObj_TrackGoAway, 1,
         PyDoc_STR("(Point thePt) -> (Boolean _rv)")},
-
-#if !TARGET_API_MAC_CARBON
-       {"GetAuxWin", (PyCFunction)WinObj_GetAuxWin, 1,
-        PyDoc_STR("() -> (Boolean _rv, AuxWinHandle awHndl)")},
-#endif
-
-#if !TARGET_API_MAC_CARBON
-       {"GetWindowGoAwayFlag", (PyCFunction)WinObj_GetWindowGoAwayFlag, 1,
-        PyDoc_STR("() -> (Boolean _rv)")},
-#endif
-
-#if !TARGET_API_MAC_CARBON
-       {"GetWindowSpareFlag", (PyCFunction)WinObj_GetWindowSpareFlag, 1,
-        PyDoc_STR("() -> (Boolean _rv)")},
-#endif
        {"GetWindowPort", (PyCFunction)WinObj_GetWindowPort, 1,
         PyDoc_STR("() -> (CGrafPtr _rv)")},
        {"GetWindowKind", (PyCFunction)WinObj_GetWindowKind, 1,
         PyDoc_STR("() -> (short _rv)")},
        {"IsWindowHilited", (PyCFunction)WinObj_IsWindowHilited, 1,
         PyDoc_STR("() -> (Boolean _rv)")},
-
-#if !TARGET_API_MAC_OS8
        {"IsWindowUpdatePending", (PyCFunction)WinObj_IsWindowUpdatePending, 1,
         PyDoc_STR("() -> (Boolean _rv)")},
-#endif
        {"MacGetNextWindow", (PyCFunction)WinObj_MacGetNextWindow, 1,
         PyDoc_STR("() -> (WindowPtr _rv)")},
        {"GetWindowStandardState", (PyCFunction)WinObj_GetWindowStandardState, 1,
@@ -2897,29 +2539,14 @@ static PyMethodDef WinObj_methods[] = {
         PyDoc_STR("() -> (Rect bounds)")},
        {"IsWindowVisible", (PyCFunction)WinObj_IsWindowVisible, 1,
         PyDoc_STR("() -> (Boolean _rv)")},
-
-#if !TARGET_API_MAC_CARBON
-       {"GetWindowZoomFlag", (PyCFunction)WinObj_GetWindowZoomFlag, 1,
-        PyDoc_STR("() -> (Boolean _rv)")},
-#endif
        {"GetWindowStructureRgn", (PyCFunction)WinObj_GetWindowStructureRgn, 1,
         PyDoc_STR("(RgnHandle r) -> None")},
        {"GetWindowContentRgn", (PyCFunction)WinObj_GetWindowContentRgn, 1,
         PyDoc_STR("(RgnHandle r) -> None")},
        {"GetWindowUpdateRgn", (PyCFunction)WinObj_GetWindowUpdateRgn, 1,
         PyDoc_STR("(RgnHandle r) -> None")},
-
-#if !TARGET_API_MAC_CARBON
-       {"GetWindowTitleWidth", (PyCFunction)WinObj_GetWindowTitleWidth, 1,
-        PyDoc_STR("() -> (short _rv)")},
-#endif
        {"GetNextWindow", (PyCFunction)WinObj_GetNextWindow, 1,
         PyDoc_STR("() -> (WindowPtr _rv)")},
-
-#if !TARGET_API_MAC_CARBON
-       {"CloseWindow", (PyCFunction)WinObj_CloseWindow, 1,
-        PyDoc_STR("() -> None")},
-#endif
        {"MoveWindow", (PyCFunction)WinObj_MoveWindow, 1,
         PyDoc_STR("(short hGlobal, short vGlobal, Boolean front) -> None")},
        {"ShowWindow", (PyCFunction)WinObj_ShowWindow, 1,
@@ -3221,25 +2848,6 @@ static PyObject *Win_AreFloatingWindowsVisible(PyObject *_self, PyObject *_args)
        return _res;
 }
 
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *Win_SetDeskCPat(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       PixPatHandle deskPixPat;
-#ifndef SetDeskCPat
-       PyMac_PRECHECK(SetDeskCPat);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &deskPixPat))
-               return NULL;
-       SetDeskCPat(deskPixPat);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-#endif
-
 static PyObject *Win_CheckUpdate(PyObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -3307,8 +2915,6 @@ static PyObject *Win_FrontNonFloatingWindow(PyObject *_self, PyObject *_args)
        return _res;
 }
 
-#if !TARGET_API_MAC_OS8
-
 static PyObject *Win_GetFrontWindowOfClass(PyObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -3328,9 +2934,6 @@ static PyObject *Win_GetFrontWindowOfClass(PyObject *_self, PyObject *_args)
                             WinObj_New, _rv);
        return _res;
 }
-#endif
-
-#if !TARGET_API_MAC_OS8
 
 static PyObject *Win_FindWindowOfClass(PyObject *_self, PyObject *_args)
 {
@@ -3357,9 +2960,6 @@ static PyObject *Win_FindWindowOfClass(PyObject *_self, PyObject *_args)
                             outWindowPart);
        return _res;
 }
-#endif
-
-#if !TARGET_API_MAC_OS8
 
 static PyObject *Win_CreateStandardWindowMenu(PyObject *_self, PyObject *_args)
 {
@@ -3380,155 +2980,6 @@ static PyObject *Win_CreateStandardWindowMenu(PyObject *_self, PyObject *_args)
                             MenuObj_New, outMenu);
        return _res;
 }
-#endif
-
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *Win_InitWindows(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-#ifndef InitWindows
-       PyMac_PRECHECK(InitWindows);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       InitWindows();
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-#endif
-
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *Win_GetWMgrPort(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       GrafPtr wPort;
-#ifndef GetWMgrPort
-       PyMac_PRECHECK(GetWMgrPort);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       GetWMgrPort(&wPort);
-       _res = Py_BuildValue("O&",
-                            GrafObj_New, wPort);
-       return _res;
-}
-#endif
-
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *Win_GetCWMgrPort(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       CGrafPtr wMgrCPort;
-#ifndef GetCWMgrPort
-       PyMac_PRECHECK(GetCWMgrPort);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       GetCWMgrPort(&wMgrCPort);
-       _res = Py_BuildValue("O&",
-                            GrafObj_New, wMgrCPort);
-       return _res;
-}
-#endif
-
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *Win_InitFloatingWindows(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       OSStatus _err;
-#ifndef InitFloatingWindows
-       PyMac_PRECHECK(InitFloatingWindows);
-#endif
-       if (!PyArg_ParseTuple(_args, ""))
-               return NULL;
-       _err = InitFloatingWindows();
-       if (_err != noErr) return PyMac_Error(_err);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-#endif
-
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *Win_InvalRect(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Rect badRect;
-#ifndef InvalRect
-       PyMac_PRECHECK(InvalRect);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetRect, &badRect))
-               return NULL;
-       InvalRect(&badRect);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-#endif
-
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *Win_InvalRgn(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle badRgn;
-#ifndef InvalRgn
-       PyMac_PRECHECK(InvalRgn);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &badRgn))
-               return NULL;
-       InvalRgn(badRgn);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-#endif
-
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *Win_ValidRect(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       Rect goodRect;
-#ifndef ValidRect
-       PyMac_PRECHECK(ValidRect);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             PyMac_GetRect, &goodRect))
-               return NULL;
-       ValidRect(&goodRect);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-#endif
-
-#if !TARGET_API_MAC_CARBON
-
-static PyObject *Win_ValidRgn(PyObject *_self, PyObject *_args)
-{
-       PyObject *_res = NULL;
-       RgnHandle goodRgn;
-#ifndef ValidRgn
-       PyMac_PRECHECK(ValidRgn);
-#endif
-       if (!PyArg_ParseTuple(_args, "O&",
-                             ResObj_Convert, &goodRgn))
-               return NULL;
-       ValidRgn(goodRgn);
-       Py_INCREF(Py_None);
-       _res = Py_None;
-       return _res;
-}
-#endif
 
 static PyObject *Win_CollapseAllWindows(PyObject *_self, PyObject *_args)
 {
@@ -3548,8 +2999,6 @@ static PyObject *Win_CollapseAllWindows(PyObject *_self, PyObject *_args)
        return _res;
 }
 
-#if !TARGET_API_MAC_OS8
-
 static PyObject *Win_GetAvailableWindowPositioningBounds(PyObject *_self, PyObject *_args)
 {
        PyObject *_res = NULL;
@@ -3569,9 +3018,6 @@ static PyObject *Win_GetAvailableWindowPositioningBounds(PyObject *_self, PyObje
                             PyMac_BuildRect, &availableRect);
        return _res;
 }
-#endif
-
-#if !TARGET_API_MAC_OS8
 
 static PyObject *Win_DisableScreenUpdates(PyObject *_self, PyObject *_args)
 {
@@ -3588,9 +3034,6 @@ static PyObject *Win_DisableScreenUpdates(PyObject *_self, PyObject *_args)
        _res = Py_None;
        return _res;
 }
-#endif
-
-#if !TARGET_API_MAC_OS8
 
 static PyObject *Win_EnableScreenUpdates(PyObject *_self, PyObject *_args)
 {
@@ -3607,7 +3050,6 @@ static PyObject *Win_EnableScreenUpdates(PyObject *_self, PyObject *_args)
        _res = Py_None;
        return _res;
 }
-#endif
 
 static PyObject *Win_PinRect(PyObject *_self, PyObject *_args)
 {
@@ -3713,11 +3155,6 @@ static PyMethodDef Win_methods[] = {
         PyDoc_STR("() -> None")},
        {"AreFloatingWindowsVisible", (PyCFunction)Win_AreFloatingWindowsVisible, 1,
         PyDoc_STR("() -> (Boolean _rv)")},
-
-#if !TARGET_API_MAC_CARBON
-       {"SetDeskCPat", (PyCFunction)Win_SetDeskCPat, 1,
-        PyDoc_STR("(PixPatHandle deskPixPat) -> None")},
-#endif
        {"CheckUpdate", (PyCFunction)Win_CheckUpdate, 1,
         PyDoc_STR("() -> (Boolean _rv, EventRecord theEvent)")},
        {"MacFindWindow", (PyCFunction)Win_MacFindWindow, 1,
@@ -3726,78 +3163,20 @@ static PyMethodDef Win_methods[] = {
         PyDoc_STR("() -> (WindowPtr _rv)")},
        {"FrontNonFloatingWindow", (PyCFunction)Win_FrontNonFloatingWindow, 1,
         PyDoc_STR("() -> (WindowPtr _rv)")},
-
-#if !TARGET_API_MAC_OS8
        {"GetFrontWindowOfClass", (PyCFunction)Win_GetFrontWindowOfClass, 1,
         PyDoc_STR("(WindowClass inWindowClass, Boolean mustBeVisible) -> (WindowPtr _rv)")},
-#endif
-
-#if !TARGET_API_MAC_OS8
        {"FindWindowOfClass", (PyCFunction)Win_FindWindowOfClass, 1,
         PyDoc_STR("(Point where, WindowClass inWindowClass) -> (WindowPtr outWindow, WindowPartCode outWindowPart)")},
-#endif
-
-#if !TARGET_API_MAC_OS8
        {"CreateStandardWindowMenu", (PyCFunction)Win_CreateStandardWindowMenu, 1,
         PyDoc_STR("(OptionBits inOptions) -> (MenuHandle outMenu)")},
-#endif
-
-#if !TARGET_API_MAC_CARBON
-       {"InitWindows", (PyCFunction)Win_InitWindows, 1,
-        PyDoc_STR("() -> None")},
-#endif
-
-#if !TARGET_API_MAC_CARBON
-       {"GetWMgrPort", (PyCFunction)Win_GetWMgrPort, 1,
-        PyDoc_STR("() -> (GrafPtr wPort)")},
-#endif
-
-#if !TARGET_API_MAC_CARBON
-       {"GetCWMgrPort", (PyCFunction)Win_GetCWMgrPort, 1,
-        PyDoc_STR("() -> (CGrafPtr wMgrCPort)")},
-#endif
-
-#if !TARGET_API_MAC_CARBON
-       {"InitFloatingWindows", (PyCFunction)Win_InitFloatingWindows, 1,
-        PyDoc_STR("() -> None")},
-#endif
-
-#if !TARGET_API_MAC_CARBON
-       {"InvalRect", (PyCFunction)Win_InvalRect, 1,
-        PyDoc_STR("(Rect badRect) -> None")},
-#endif
-
-#if !TARGET_API_MAC_CARBON
-       {"InvalRgn", (PyCFunction)Win_InvalRgn, 1,
-        PyDoc_STR("(RgnHandle badRgn) -> None")},
-#endif
-
-#if !TARGET_API_MAC_CARBON
-       {"ValidRect", (PyCFunction)Win_ValidRect, 1,
-        PyDoc_STR("(Rect goodRect) -> None")},
-#endif
-
-#if !TARGET_API_MAC_CARBON
-       {"ValidRgn", (PyCFunction)Win_ValidRgn, 1,
-        PyDoc_STR("(RgnHandle goodRgn) -> None")},
-#endif
        {"CollapseAllWindows", (PyCFunction)Win_CollapseAllWindows, 1,
         PyDoc_STR("(Boolean collapse) -> None")},
-
-#if !TARGET_API_MAC_OS8
        {"GetAvailableWindowPositioningBounds", (PyCFunction)Win_GetAvailableWindowPositioningBounds, 1,
         PyDoc_STR("(GDHandle inDevice) -> (Rect availableRect)")},
-#endif
-
-#if !TARGET_API_MAC_OS8
        {"DisableScreenUpdates", (PyCFunction)Win_DisableScreenUpdates, 1,
         PyDoc_STR("() -> None")},
-#endif
-
-#if !TARGET_API_MAC_OS8
        {"EnableScreenUpdates", (PyCFunction)Win_EnableScreenUpdates, 1,
         PyDoc_STR("() -> None")},
-#endif
        {"PinRect", (PyCFunction)Win_PinRect, 1,
         PyDoc_STR("(Rect theRect, Point thePt) -> (long _rv)")},
        {"GetGrayRgn", (PyCFunction)Win_GetGrayRgn, 1,
index b1e27c356bc1c69835bf074ce839abf6b583098b..d2551afda19d2071f0358d94900450f812eb9bb8 100644 (file)
@@ -6,12 +6,6 @@ f = Method(Boolean, 'IsWindowVisible',
 )
 methods.append(f)
 
-f = Method(Boolean, 'GetWindowZoomFlag',
-    (WindowRef, 'theWindow', InMode),
-    condition='#if !TARGET_API_MAC_CARBON'
-)
-methods.append(f)
-
 f = Method(void, 'GetWindowStructureRgn',
        (WindowRef, 'theWindow', InMode),
        (RgnHandle, 'r', InMode),
@@ -30,25 +24,11 @@ f = Method(void, 'GetWindowUpdateRgn',
 )
 methods.append(f)
 
-f = Method(short, 'GetWindowTitleWidth',
-    (WindowRef, 'theWindow', InMode),
-    condition='#if !TARGET_API_MAC_CARBON'
-)
-methods.append(f)
-
 f = Method(ExistingWindowPtr, 'GetNextWindow',
        (WindowRef, 'theWindow', InMode),
 )
 methods.append(f)
 
-# These have Mac prefixed to their name in the 3.1 universal headers,
-# so we add the old/real names by hand.
-f = Method(void, 'CloseWindow',
-    (WindowPtr, 'theWindow', InMode),
-    condition='#if !TARGET_API_MAC_CARBON'
-)
-methods.append(f)
-
 f = Function(short, 'FindWindow',
     (Point, 'thePoint', InMode),
     (ExistingWindowPtr, 'theWindow', OutMode),
index 06b421f830a744a2a72fbea79cf616bfb3117f4f..a79381d3b179abdc6758e5dacb9b688503018ee8 100644 (file)
@@ -49,62 +49,30 @@ class MyScanner(Scanner):
                        # Constants with funny definitions
                        'kMouseUpOutOfSlop',
                        'kAllWindowClasses',
+                       # OS8 only:
+                       'GetAuxWin',
+                       'GetWindowDataHandle',
+                       'SaveOld',
+                       'DrawNew',
+                       'SetWinColor',
+                       'SetDeskCPat',
+                       'InitWindows',
+                       'InitFloatingWindows',
+                       'GetWMgrPort',
+                       'GetCWMgrPort',
+                       'ValidRgn',             # Use versions with Window in their name
+                       'ValidRect',
+                       'InvalRgn',
+                       'InvalRect',
+                       'IsValidWindowPtr', # I think this is useless for Python, but not sure...
+                       'GetWindowZoomFlag',    # Not available in Carbon
+                       'GetWindowTitleWidth',  # Ditto
+                       'GetWindowGoAwayFlag',
+                       'GetWindowSpareFlag',
                        ]
                        
        def makegreylist(self):
                return [
-                       ('#if !TARGET_API_MAC_CARBON', [
-                               'GetAuxWin',
-                               'GetWindowDataHandle',
-                               'SaveOld',
-                               'DrawNew',
-                               'SetWinColor',
-                               'SetDeskCPat',
-                               'InitWindows',
-                               'InitFloatingWindows',
-                               'GetWMgrPort',
-                               'GetCWMgrPort',
-                               'ValidRgn',             # Use versions with Window in their name
-                               'ValidRect',
-                               'InvalRgn',
-                               'InvalRect',
-                               'IsValidWindowPtr', # I think this is useless for Python, but not sure...
-                               'GetWindowZoomFlag',    # Not available in Carbon
-                               'GetWindowTitleWidth',  # Ditto
-                               'GetWindowGoAwayFlag',
-                               'GetWindowSpareFlag',
-                       ]),
-                       ('#if !TARGET_API_MAC_OS8', [
-                               'IsWindowUpdatePending',
-                               'FindWindowOfClass',
-                               'GetFrontWindowOfClass',
-                               'ChangeWindowPropertyAttributes',
-                               'GetWindowPropertyAttributes',
-                               'GetNextWindowOfClass',
-                               'ScrollWindowRegion',
-                               'ScrollWindowRect',
-                               'ChangeWindowAttributes',
-                               'ReshapeCustomWindow',
-                               'EnableScreenUpdates',
-                               'DisableScreenUpdates',
-                               'GetAvailableWindowPositioningBounds',
-                               'CreateStandardWindowMenu',
-                               'GetSheetWindowParent',
-                               'HideSheetWindow',
-                               'ShowSheetWindow',
-                               'ConstrainWindowToScreen',
-                               'GetWindowGreatestAreaDevice',
-                               'CopyWindowTitleAsCFString',
-                               'SetWindowTitleWithCFString',
-                               'CopyWindowAlternateTitle',
-                               'SetWindowAlternateTitle',
-                               'GetWindowModality',
-                               'SetWindowModality',
-                               'SetWindowClass',
-                               'ReleaseWindow',
-                               'RetainWindow',
-                               'GetWindowRetainCount',
-                       ]),
                        ('#if TARGET_API_MAC_OSX', [
                                'TransitionWindowAndParent',
                        ])]
index 8fdbad508726f26ca36abe556aae7e84b9db0ad9..180de33d13c9e6bbb71bb72ecffc5057a67727ba 100644 (file)
@@ -54,11 +54,7 @@ typedef unsigned long refcontype;
 #include "Python.h"
 #include "macglue.h"
 
-#ifdef TARGET_API_MAC_OSX
-#define PATHNAMELEN 1024
-#else
 #define PATHNAMELEN 256
-#endif
 
 static int arg_count;
 static char *arg_vector[256];
@@ -79,8 +75,6 @@ strdup(const char *src)
 }
 #endif
 
-
-#if !TARGET_API_MAC_OSX
 /* Initialize FSSpec and full name of current application */
 
 OSErr
@@ -104,7 +98,6 @@ PyMac_init_process_location(void)
        applocation_inited = 1;
        return 0;
 }
-#endif /* !TARGET_API_MAC_OSX */
 
 /* Check that there aren't any args remaining in the event */
 
@@ -229,9 +222,6 @@ event_loop(void)
        
        got_one = 0;
        for (n = 0; n < 100 && !got_one; n++) {
-#if !TARGET_API_MAC_CARBON
-               SystemTask();
-#endif
                ok = GetNextEvent(everyEvent, &event);
                if (ok && event.what == kHighLevelEvent) {
                        AEProcessAppleEvent(&event);
@@ -245,13 +235,8 @@ int
 PyMac_GetArgv(char ***pargv, int noevents)
 {
        arg_count = 0;
-#if TARGET_API_MAC_OSX
-       /* In an OSX bundle argv[0] is okay */
-       arg_count++;
-#else
        (void)PyMac_init_process_location();
        arg_vector[arg_count++] = strdup(PyMac_ApplicationPath);
-#endif /* TARGET_API_MAC_OSX */
        
        if( !noevents ) {
                set_ae_handlers();
index a5c72faf1c5192d5f98cb2fe7bfdb8c9b3cc35f0..b5da2bf6dc8542ed010d3fbf396a7e5e749ee77a 100644 (file)
@@ -47,13 +47,7 @@ PERFORMANCE OF THIS SOFTWARE.
 #define HASTHREAD " WITHOUT_THREAD"
 #endif
 
-#if TARGET_API_MAC_CARBON
-#define TARGET_API ""
-#else
-#define TARGET_API " PPC"
-#endif
-
-#define COMPILER " [CW" TARGET_API HASGUSI HASTHREAD"]"
+#define COMPILER " [CW" HASGUSI HASTHREAD"]"
 #endif
 
 #ifdef MPW
index b79d55511f07772e4e79e259a5200adf421dcf8e..d98d481206050884617eb252acad1024bf769a26 100644 (file)
@@ -38,11 +38,7 @@ PERFORMANCE OF THIS SOFTWARE.
 #include <unistd.h>
 #endif
 
-#ifdef TARGET_API_MAC_OSX
-#define PATHNAMELEN 1024
-#else
 #define PATHNAMELEN 256
-#endif
 
 /* Return the initial python search path.  This is called once from
 ** initsys() to initialize sys.path.
index 25bc3f76f9fff78d51dc285a47aa3847a5cac7ac..51d73edb64508f53bf2705e1db5dd295ae66c801 100644 (file)
@@ -51,11 +51,6 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 #include <Carbon/Carbon.h>
 #endif
 
-#if !TARGET_API_MAC_OS8
-/* Unfortunately this call is probably slower... */
-#define LMGetTicks() TickCount()
-#endif
-
 #ifdef __MWERKS__
 #include <SIOUX.h>
 extern void SIOUXSetupMenus(void);
@@ -85,7 +80,6 @@ extern pascal char *PLstrrchr(const unsigned char *, short);
 #define MINIMUM_STACK_SIZE 8192
 #endif
 
-#if TARGET_API_MAC_CARBON
 /*
 ** On MacOSX StackSpace() lies: it gives the distance from heap end to stack pointer,
 ** but the stack cannot grow that far due to rlimit values. We cannot get at this value
@@ -93,7 +87,6 @@ extern pascal char *PLstrrchr(const unsigned char *, short);
 ** stack limit of 512K.
 */
 #define MAXIMUM_STACK_SIZE (256*1024)
-#endif
 
 /*
 ** We have to be careful, since we can't handle
@@ -147,23 +140,6 @@ int PyMac_ConsoleIsDead;
 */
 static MenuBarHandle sioux_mbar;
 
-/*
-** Some stuff for our GetDirectory and PromptGetFile routines
-*/
-struct hook_args {
-       int selectcur_hit;              /* Set to true when "select current" selected */
-       char *prompt;                   /* The prompt */
-};
-#if !TARGET_API_MAC_OS8
-/* The StandardFile hooks don't exist in Carbon. This breaks GetDirectory,
-** but the macfsn code will replace it by a NavServices version anyway.
-*/
-#define myhook_upp NULL
-#else
-static DlgHookYDUPP myhook_upp;
-static int upp_inited = 0;
-#endif
-
 /*
 ** The python-code event handler
 */
@@ -256,48 +232,6 @@ PyMac_StopGUSISpin() {
        PyMac_ConsoleIsDead = 1;
 }
 
-#if TARGET_API_MAC_OS8
-/*
-** Replacement routines for the PLstr... functions so we don't need
-** StdCLib.
-*/
-pascal void
-PLstrcpy(unsigned char *to, unsigned char *fr)
-{
-       memcpy(to, fr, fr[0]+1);
-}
-
-pascal int
-PLstrcmp(unsigned char *s1, unsigned char *s2)
-{
-       int res;
-       int l = s1[0] < s2[0] ? s1[0] : s2[0];
-       
-       res = memcmp(s1+1, s2+1, l);
-       if ( res != 0 )
-               return res;
-       
-       if ( s1[0] < s2[0] )
-               return -1;
-       else if ( s1[0] > s2[0] )
-               return 1;
-       else
-               return 0;
-}
-
-pascal unsigned char *
-PLstrrchr(unsigned char *str, unsigned char chr)
-{
-       unsigned char *ptr = 0;
-       unsigned char *p;
-       
-       for(p=str+1; p<str+str[0]; p++)
-               if ( *p == chr )
-                       ptr = p;
-       return ptr;
-}
-       
-#endif /* TARGET_API_MAC_OS8 */
 #endif /* USE_GUSI */
 
 
@@ -316,29 +250,6 @@ Pstring(char *str)
        return buf;
 }
 
-#if TARGET_API_MAC_OS8
-Point
-LMGetMouse(void)
-{
-       return LMGetMouseLocation();
-}
-
-long LMGetExpandMem(void)
-{
-       return 0;
-}
-
-void
-c2pstrcpy(unsigned char *dst, const char *src)
-{
-       int len;
-       
-       len = strlen(src);
-       if ( len > 255 ) len = 255;
-       strncpy((char *)dst+1, src, len);
-       dst[0] = len;
-}
-#endif /* TARGET_API_MAC_OS8 */
 
 #ifdef USE_STACKCHECK
 /* Check for stack overflow */
@@ -420,35 +331,17 @@ static void
 scan_event_queue(force)
        int force;
 {
-#if !TARGET_API_MAC_OS8
        if ( interrupted || (!schedparams.check_interrupt && !force) )
                return;
        if ( CheckEventQueueForUserCancel() )
                interrupted = 1;
-#else
-       register EvQElPtr q;
-       
-       if ( interrupted || (!schedparams.check_interrupt && !force) || !PyMac_InForeground() )
-               return;
-       q = (EvQElPtr) LMGetEventQueue()->qHead;
-       
-       for (; q; q = (EvQElPtr)q->qLink) {
-               if (q->evtQWhat == keyDown &&
-                               (char)q->evtQMessage == '.' &&
-                               (q->evtQModifiers & cmdKey) != 0) {
-                       FlushEvents(keyDownMask, 0);
-                       interrupted = 1;
-                       break;
-               }
-       }
-#endif
 }
 
 int
 PyErr_CheckSignals()
 {
        if (schedparams.enabled) {
-               if ( interrupted || (unsigned long)LMGetTicks() > schedparams.next_check ) {
+               if ( interrupted || (unsigned long)TickCount() > schedparams.next_check ) {
                        scan_event_queue(0);
                        if (interrupted) {
                                interrupted = 0;
@@ -457,7 +350,7 @@ PyErr_CheckSignals()
                        }
                        if ( PyMac_Yield() < 0)
                                return -1;
-                       schedparams.next_check = (unsigned long)LMGetTicks()
+                       schedparams.next_check = (unsigned long)TickCount()
                                         + schedparams.check_interval;
                }
        }
@@ -498,16 +391,6 @@ void
 PyMac_HandleEventIntern(evp)
        EventRecord *evp;
 {
-#if TARGET_API_MAC_OS8
-       if ( evp->what == mouseDown ) {
-               WindowPtr wp;
-               
-               if ( FindWindow(evp->where, &wp) == inSysWindow ) {
-                       SystemClick(evp, wp);
-                       return;
-               }
-       }
-#endif
 #ifdef __MWERKS__
        {
                int siouxdidit;
@@ -568,14 +451,10 @@ PyMac_DoYield(int maxsleep, int maycallpython)
        if( in_here > 1 || !schedparams.process_events || 
            (python_event_handler && !maycallpython) ) {
                if ( maxsleep >= 0 ) {
-#if TARGET_API_MAC_OS8
-                       SystemTask();
-#else
-                       int xxx = 0;
-#endif
+                       /* XXXX Need to do something here */
                }
        } else {
-               latest_time_ready = LMGetTicks() + maxsleep;
+               latest_time_ready = TickCount() + maxsleep;
                do {
                        /* XXXX Hack by Jack.
                        ** In time.sleep() you can click to another application
@@ -590,7 +469,7 @@ PyMac_DoYield(int maxsleep, int maycallpython)
                                in_here--;
                                return -1;
                        }
-                       maxsleep = latest_time_ready - LMGetTicks();
+                       maxsleep = latest_time_ready - TickCount();
                } while ( maxsleep > 0 );
        }
        in_here--;
@@ -730,82 +609,3 @@ SIOUXDoAboutBox(void)
 }
 
 #endif /* !TARGET_API_MAC_OSX */
-
-#if TARGET_API_MAC_OS8
-/*
-** Helper routine for GetDirectory
-*/
-static pascal short
-myhook_proc(short item, DialogPtr theDialog, struct hook_args *dataptr)
-{
-       if ( item == sfHookFirstCall && dataptr->prompt) {
-               Handle prompth;
-               short type;
-               Rect rect;
-               
-               GetDialogItem(theDialog, PROMPT_ITEM, &type, &prompth, &rect);
-               if ( prompth )
-                       SetDialogItemText(prompth, (unsigned char *)dataptr->prompt);
-       } else
-       if ( item == SELECTCUR_ITEM ) {
-               item = sfItemCancelButton;
-               dataptr->selectcur_hit = 1;
-       }
-       return item;
-}      
-
-/*
-** Ask the user for a directory. I still can't understand
-** why Apple doesn't provide a standard solution for this...
-*/
-int
-PyMac_GetDirectory(dirfss, prompt)
-       FSSpec *dirfss;
-       char *prompt;
-{
-       static SFTypeList list = {'fldr', 0, 0, 0};
-       static Point where = {-1, -1};
-       StandardFileReply reply;
-       struct hook_args hook_args;
-       
-       if ( !upp_inited ) {
-               myhook_upp = NewDlgHookYDProc(myhook_proc);
-               upp_inited = 1;
-       }
-       if ( prompt && *prompt )
-               hook_args.prompt = (char *)Pstring(prompt);
-       else
-               hook_args.prompt = NULL;
-       hook_args.selectcur_hit = 0;
-       CustomGetFile((FileFilterYDUPP)0, 1, list, &reply, GETDIR_ID, where, myhook_upp,
-                               NULL, NULL, NULL, (void *)&hook_args);
-                               
-       reply.sfFile.name[0] = 0;
-       if( FSMakeFSSpec(reply.sfFile.vRefNum, reply.sfFile.parID, reply.sfFile.name, dirfss) )
-               return 0;
-       return hook_args.selectcur_hit;
-}
-
-/*
-** Slightly extended StandardGetFile: accepts a prompt */
-void PyMac_PromptGetFile(short numTypes, ConstSFTypeListPtr typeList, 
-               StandardFileReply *reply, char *prompt)
-{
-       static Point where = {-1, -1};
-       struct hook_args hook_args;
-       
-       if ( !upp_inited ) {
-               myhook_upp = NewDlgHookYDProc(myhook_proc);
-               upp_inited = 1;
-       }
-       if ( prompt && *prompt )
-               hook_args.prompt = (char *)Pstring(prompt);
-       else
-               hook_args.prompt = NULL;
-       hook_args.selectcur_hit = 0;
-       CustomGetFile((FileFilterYDUPP)0, numTypes, typeList, reply, GETFILEPROMPT_ID, where,
-                               myhook_upp, NULL, NULL, NULL, (void *)&hook_args);
-}
-#endif /* TARGET_API_MAC_OS8 */
-
-
index 9e5a30013834e19fdf89094b86af7074164b88d2..1af38eb3e10cad36da80535f06968c87a20ef8b2 100644 (file)
@@ -38,13 +38,11 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 #include <Windows.h>
 #include <Fonts.h>
 #include <Balloons.h>
-#if TARGET_API_MAC_CARBON
 #include <CFBundle.h>
 #include <CFURL.h>
 #include <CFString.h>
 #include <CFBase.h>
 #include <CFArray.h>
-#endif /* TARGET_API_MAC_CARBON */
 #include <Gestalt.h>
 #include <Appearance.h>
 #else
@@ -94,16 +92,6 @@ void PyMac_Exit(int); /* Forward */
 static void
 init_mac_world(void)
 {
-#if !TARGET_API_MAC_CARBON
-       /* These aren't needed for carbon */
-       MaxApplZone();
-       InitGraf(&qd.thePort);
-       InitFonts();
-       InitWindows();
-       TEInit();
-       InitDialogs((long)0);
-       InitMenus();
-#endif
        InitCursor();
 }
 
@@ -176,12 +164,6 @@ PyMac_InteractiveOptions(PyMac_PrefRecord *p, int *argcp, char ***argvp)
                        DisposeDialog(dialog);
                        exit(0);
                }
-#if !TARGET_API_MAC_CARBON
-               if ( item == OPT_HELP ) {
-                       HMSetBalloons(!HMGetBalloons());
-               }
-#endif
-#if !TARGET_API_MAC_OSX
                if ( item == OPT_CMDLINE ) {
                        int old_argc = *argcp;
                        int i;
@@ -202,7 +184,6 @@ PyMac_InteractiveOptions(PyMac_PrefRecord *p, int *argcp, char ***argvp)
                        
                        /* XXXX Is it not safe to use free() here, apparently */
                }
-#endif /* !TARGET_API_MAC_OSX */
 #define OPT_ITEM(num, var) \
                if ( item == (num) ) { \
                        p->var = !p->var; \
@@ -279,9 +260,7 @@ init_common(int *argcp, char ***argvp, int embedded)
        /* Get options from preference file (or from applet resource fork) */
        PyMac_options.keep_console = POPT_KEEPCONSOLE_OUTPUT;           /* default-default */
        PyMac_options.unixnewlines = 1;
-#if !TARGET_API_MAC_OSX
        PyMac_PreferenceOptions(&PyMac_options);
-#endif
 
        if ( embedded ) {
                static char *emb_argv[] = {"embedded-python", 0};
@@ -293,11 +272,7 @@ init_common(int *argcp, char ***argvp, int embedded)
                ** In MachoPython we skip this step if we already have plausible
                ** command line arguments.
                */
-#if TARGET_API_MAC_OSX
-               if (*argcp == 2 && strncmp((*argvp)[1], "-psn_", 5) == 0)
-#endif
                        *argcp = PyMac_GetArgv(argvp, PyMac_options.noargs);
-#if !TARGET_API_MAC_OSX
 #ifndef NO_ARGV0_CHDIR
                if (*argcp >= 1 && (*argvp)[0] && (*argvp)[0][0]) {
                        /* Workaround for MacOS X, which currently (DP4) doesn't set
@@ -310,7 +285,6 @@ init_common(int *argcp, char ***argvp, int embedded)
                        if ( p ) *p = 0;
                        chdir(app_wd);
                }
-#endif
 #endif
                /* Do interactive option setting, if allowed and <option> depressed */
                PyMac_InteractiveOptions(&PyMac_options, argcp, argvp);
@@ -324,7 +298,6 @@ init_common(int *argcp, char ***argvp, int embedded)
        Py_NoSiteFlag = PyMac_options.nosite;
        Py_TabcheckFlag = PyMac_options.tabwarn;
        Py_DivisionWarningFlag = PyMac_options.divisionwarn;
-#if !TARGET_API_MAC_OSX
        if ( PyMac_options.noargs ) {
                /* don't process events at all without the scripts permission */
                PyMacSchedParams scp;
@@ -334,7 +307,6 @@ init_common(int *argcp, char ***argvp, int embedded)
                /* Should we disable command-dot as well? */
                PyMac_SetSchedParams(&scp);
        }
-#endif /* !TARGET_API_MAC_OSX */
 
        /* Set buffering */
        if (PyMac_options.unbuffered) {
@@ -446,103 +418,6 @@ PyMac_Initialize(void)
 
 #endif /* USE_MAC_APPLET_SUPPORT */
 
-#if TARGET_API_MAC_OSX /* Really: TARGET_API_MAC_CARBON */
-
-static int
-locateResourcePy(CFStringRef resourceType, char *resourceName, char *resourceURLCStr, int length)
-{
-    CFBundleRef mainBundle = NULL;
-    CFURLRef URL, absoluteURL;
-    CFStringRef filenameString, filepathString, rsrcString;
-    CFIndex size, i;
-    CFArrayRef arrayRef = NULL;
-    int success = 0;
-    
-#if TARGET_API_MAC_OSX
-       CFURLPathStyle thePathStyle = kCFURLPOSIXPathStyle;
-#else
-       CFURLPathStyle thePathStyle = kCFURLHFSPathStyle;
-#endif
-
-    /* Get a reference to our main bundle */
-    mainBundle = CFBundleGetMainBundle();
-
-       /* If we are running inside a bundle, look through it. Otherwise, do nothing. */
-       if (mainBundle) {
-           /* Create a CFString with the resource name in it */
-           rsrcString = CFStringCreateWithCString(0, resourceName, kCFStringEncodingMacRoman);
-
-           /* Look for py files in the main bundle by type */
-           arrayRef = CFBundleCopyResourceURLsOfType( mainBundle, 
-                   resourceType, 
-                  NULL );
-
-           /* See if there are any filename matches */
-           size = CFArrayGetCount(arrayRef);
-           for (i = 0; i < size; i++) {
-               URL = CFArrayGetValueAtIndex(arrayRef, i);
-               filenameString = CFURLCopyLastPathComponent(URL);
-               if (CFStringCompare(filenameString, rsrcString, 0) == kCFCompareEqualTo) {
-                   /* We found a match, get the file's full path */
-                   absoluteURL = CFURLCopyAbsoluteURL(URL);
-                   filepathString = CFURLCopyFileSystemPath(absoluteURL, thePathStyle);
-                   CFRelease(absoluteURL);
-
-                   /* Copy the full path into the caller's character buffer */
-                   success = CFStringGetCString(filepathString, resourceURLCStr, length,
-                                               kCFStringEncodingMacRoman);
-
-                   CFRelease(filepathString);
-               }
-               CFRelease(filenameString);
-           }
-               CFRelease(arrayRef);
-           CFRelease(rsrcString);
-       }
-    return success;
-}
-
-#endif /* TARGET_API_MAC_CARBON */
-
-#if TARGET_API_MAC_OSX
-
-int
-main(int argc, char **argv)
-{
-    static char scriptpath[1024];
-    char *script = NULL;
-
-       /* First we see whether we have __rawmain__.py and run that if it
-       ** is there
-       */
-       if (locateResourcePy(CFSTR("py"), "__rawmain__.py", scriptpath, 1024)) {
-               /* If we have a raw main we don't do AppleEvent processing.
-               ** Notice that this also means we keep the -psn.... argv[1]
-               ** value intact. Not sure whether that is important to someone,
-               ** but you never know...
-               */
-               script = scriptpath;
-       } else if (locateResourcePy(CFSTR("pyc"), "__rawmain__.pyc", scriptpath, 1024)) {
-               script = scriptpath;
-       } else {
-               /* Otherwise we look for __main__.py. Whether that is
-               ** found or not we also process AppleEvent arguments.
-               */
-               if (locateResourcePy(CFSTR("py"), "__main__.py", scriptpath, 1024))
-                       script = scriptpath;
-               else if (locateResourcePy(CFSTR("pyc"), "__main__.pyc", scriptpath, 1024))
-                       script = scriptpath;
-                       
-               init_common(&argc, &argv, 0);
-
-       }
-
-       PyMac_Main(argc, argv, script);
-    return 0;
-}
-
-#else
-
 /* For normal application */
 void
 PyMac_InitApplication(void)
@@ -556,12 +431,6 @@ PyMac_InitApplication(void)
 
        init_common(&argc, &argv, 0);
 
-#if TARGET_API_MAC_OSX /* Really: TARGET_API_MAC_CARBON */
-       /* If we are running inside of a bundle, and a __main__.py is available, use it */
-       if (locateResourcePy("__main__.py", scriptpath, 1024))
-               script = scriptpath;
-#endif
-       
        if ( argc > 1 ) {
                /* We're running a script. Attempt to change current directory */
                char curwd[256], *endp;
@@ -582,7 +451,6 @@ PyMac_InitApplication(void)
        }
        PyMac_Main(argc, argv, script);
 }
-#endif /* TARGET_API_MAC_OSX */
 
 /* Main program */
 
@@ -605,11 +473,7 @@ PyMac_Main(int argc, char **argv, char *filename)
        if (Py_VerboseFlag ||
            (command == NULL && filename == NULL && isatty((int)fileno(fp))))
                fprintf(stderr, "%s %s on %s\n%s\n",
-#if !TARGET_API_MAC_OSX
                        "Python",
-#else
-                       "Pythonw",
-#endif
                        Py_GetVersion(), Py_GetPlatform(), COPYRIGHT);
        
        if (filename != NULL) {
@@ -620,10 +484,8 @@ PyMac_Main(int argc, char **argv, char *filename)
                }
        }
        
-#if !TARGET_API_MAC_OSX
        /* We initialize the menubar here, hoping SIOUX is initialized by now */
        PyMac_InitMenuBar();
-#endif
 
        Py_Initialize();
        
@@ -651,7 +513,6 @@ PyMac_Main(int argc, char **argv, char *filename)
        /*NOTREACHED*/
 }
 
-#if !TARGET_API_MAC_OSX
 /*
 ** Reset the "unseen output" flag
 */
@@ -683,7 +544,6 @@ abort(void)
        console_output_state = STATE_LASTWRITE;
        PyMac_Exit(1);
 }
-#endif /* !TARGET_API_MAC_OSX */
 
 /*
 ** Terminate application
@@ -739,7 +599,6 @@ PyMac_Exit(int status)
        exit(status);
 }
 
-#if !TARGET_API_MAC_OSX
 /* Make the *original* argc/argv available to other modules.
    This is rare, but it is needed by the secureware extension. */
 
@@ -749,10 +608,8 @@ Py_GetArgcArgv(int *argc,char ***argv)
        *argc = orig_argc;
        *argv = orig_argv;
 }
-#endif
 
 /* More cruft that shouldn't really be here, used in sysmodule.c */
-#if !TARGET_API_MAC_OSX
 /* Return the program name -- some code out there needs this. */
 char *
 Py_GetProgramFullPath(void)
@@ -796,5 +653,4 @@ __convert_to_newlines(unsigned char * buf, size_t * n_ptr)
                        *p = '\r';
 }
 #endif /* WITHOUT_UNIX_NEWLINES */
-#endif /* !TARGET_API_MAC_OSX */
 
index 8a5161863f597c56e1ec4bd65e371c0f546c2c7f..4e63ebe616e13c2261cc9db6f77a476e3b2525ae 100644 (file)
@@ -174,19 +174,6 @@ int GUSISIOUXSocket::isatty()
 }
 static bool input_pending()
 {
-#if !TARGET_API_MAC_CARBON
-       // Jack thinks that completely removing this code is a bit
-       // too much...
-       QHdrPtr eventQueue = LMGetEventQueue();
-       EvQElPtr element = (EvQElPtr)eventQueue->qHead;
-       
-       // now, count the number of pending keyDown events.
-       while (element != nil) {
-               if (element->evtQWhat == keyDown || element->evtQWhat == autoKey)
-                       return true;
-               element = (EvQElPtr)element->qLink;
-       }
-#endif
        return false;
 }