]> granicus.if.org Git - python/commitdiff
Getting rid of WITHOUT_FRAMEWORKS and ACCESSOR_CALLS_ARE_FUNCTIONS:
authorJack Jansen <jack.jansen@cwi.nl>
Wed, 19 Nov 2003 16:13:35 +0000 (16:13 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Wed, 19 Nov 2003 16:13:35 +0000 (16:13 +0000)
MacOS9isms.

57 files changed:
Mac/Modules/ae/_AEmodule.c
Mac/Modules/ae/aesupport.py
Mac/Modules/ah/_AHmodule.c
Mac/Modules/ah/ahsupport.py
Mac/Modules/app/_Appmodule.c
Mac/Modules/app/appsupport.py
Mac/Modules/carbonevt/CarbonEvtsupport.py
Mac/Modules/carbonevt/_CarbonEvtmodule.c
Mac/Modules/cf/_CFmodule.c
Mac/Modules/cf/cfsupport.py
Mac/Modules/cf/pycfbridge.c
Mac/Modules/cg/_CGmodule.c
Mac/Modules/cg/cgsupport.py
Mac/Modules/cm/_Cmmodule.c
Mac/Modules/cm/cmsupport.py
Mac/Modules/ctl/_Ctlmodule.c
Mac/Modules/ctl/ctlsupport.py
Mac/Modules/dlg/_Dlgmodule.c
Mac/Modules/dlg/dlgsupport.py
Mac/Modules/drag/_Dragmodule.c
Mac/Modules/drag/dragsupport.py
Mac/Modules/evt/_Evtmodule.c
Mac/Modules/evt/evtsupport.py
Mac/Modules/file/_Filemodule.c
Mac/Modules/file/filesupport.py
Mac/Modules/fm/_Fmmodule.c
Mac/Modules/fm/fmsupport.py
Mac/Modules/folder/_Foldermodule.c
Mac/Modules/folder/foldersupport.py
Mac/Modules/help/_Helpmodule.c
Mac/Modules/help/helpsupport.py
Mac/Modules/ibcarbon/IBCarbonsupport.py
Mac/Modules/ibcarbon/_IBCarbon.c
Mac/Modules/icn/_Icnmodule.c
Mac/Modules/icn/icnsupport.py
Mac/Modules/list/_Listmodule.c
Mac/Modules/list/listsupport.py
Mac/Modules/menu/_Menumodule.c
Mac/Modules/menu/menusupport.py
Mac/Modules/mlte/_Mltemodule.c
Mac/Modules/mlte/mltesupport.py
Mac/Modules/qd/_Qdmodule.c
Mac/Modules/qd/qdsupport.py
Mac/Modules/qdoffs/_Qdoffsmodule.c
Mac/Modules/qdoffs/qdoffssupport.py
Mac/Modules/qt/_Qtmodule.c
Mac/Modules/qt/qtsupport.py
Mac/Modules/res/_Resmodule.c
Mac/Modules/res/ressupport.py
Mac/Modules/scrap/_Scrapmodule.c
Mac/Modules/scrap/scrapsupport.py
Mac/Modules/snd/_Sndmodule.c
Mac/Modules/snd/sndsupport.py
Mac/Modules/te/_TEmodule.c
Mac/Modules/te/tesupport.py
Mac/Modules/win/_Winmodule.c
Mac/Modules/win/winsupport.py

index c5445dc883d35d1a97b486f269d83256cdae5d36..91364e7b236ba7a8400182967f05cfd67b094a80 100644 (file)
 
 /* Macro to test whether a weak-loaded CFM function exists */
 #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-       PyErr_SetString(PyExc_NotImplementedError, \
-       "Not available in this shared library/OS version"); \
-       return NULL; \
+        PyErr_SetString(PyExc_NotImplementedError, \
+        "Not available in this shared library/OS version"); \
+        return NULL; \
     }} while(0)
 
 
 #ifndef PyDoc_STR
 #define PyDoc_STR(x) (x)
 #endif
-#ifdef WITHOUT_FRAMEWORKS
-#include <AppleEvents.h>
-#include <AEObjects.h>
-#else
 #include <Carbon/Carbon.h>
-#endif
 
 #ifdef USE_TOOLBOX_OBJECT_GLUE
 extern PyObject *_AEDesc_New(AEDesc *);
index 89a571baa502aeefac1254c4b7eaf0b95f831861..672b5441f7d98295ed046de615c97013fb3e9f0d 100644 (file)
@@ -85,12 +85,7 @@ includestuff = includestuff + """
 #ifndef PyDoc_STR
 #define PyDoc_STR(x) (x)
 #endif
-#ifdef WITHOUT_FRAMEWORKS
-#include <AppleEvents.h>
-#include <AEObjects.h>
-#else
 #include <Carbon/Carbon.h>
-#endif
 
 #ifdef USE_TOOLBOX_OBJECT_GLUE
 extern PyObject *_AEDesc_New(AEDesc *);
index cf6907640790a7c9fe04371ca374086cd8f1d490..9408e530836bc478217c2e17a2fc0f141a0898e3 100644 (file)
 
 /* Macro to test whether a weak-loaded CFM function exists */
 #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-       PyErr_SetString(PyExc_NotImplementedError, \
-       "Not available in this shared library/OS version"); \
-       return NULL; \
+        PyErr_SetString(PyExc_NotImplementedError, \
+        "Not available in this shared library/OS version"); \
+        return NULL; \
     }} while(0)
 
 
-#ifdef WITHOUT_FRAMEWORKS
-#include <AppleHelp.h>
-#else
 #include <Carbon/Carbon.h>
-#endif
 
 
 static PyObject *Ah_Error;
index a1e6d00ac4779281ecbe354a79d3b9dde738fb98..c91c298ded91900c63dcd3168c050743e4afce7b 100644 (file)
@@ -20,11 +20,7 @@ from macsupport import *
 AHTOCType = Type("AHTOCType", "h")
 
 includestuff = includestuff + """
-#ifdef WITHOUT_FRAMEWORKS
-#include <AppleHelp.h>
-#else
 #include <Carbon/Carbon.h>
-#endif
 
 """
 
index 069c08feb1562cc3c563d8d3ea7096a9952e9929..2a743250c09a76c318e91783a694934930a0c44b 100644 (file)
 
 /* Macro to test whether a weak-loaded CFM function exists */
 #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-       PyErr_SetString(PyExc_NotImplementedError, \
-       "Not available in this shared library/OS version"); \
-       return NULL; \
+        PyErr_SetString(PyExc_NotImplementedError, \
+        "Not available in this shared library/OS version"); \
+        return NULL; \
     }} while(0)
 
 
-#ifdef WITHOUT_FRAMEWORKS
-#include <Appearance.h>
-#else
 #include <Carbon/Carbon.h>
-#endif
-
 
 
 int ThemeButtonDrawInfo_Convert(PyObject *v, ThemeButtonDrawInfo *p_itself)
index dc8ae4f41545b30905828b7073bfd14601157347..a9d87681b812e13a06311a3c674b9eed03dc02a9 100644 (file)
@@ -79,12 +79,7 @@ ThemeButtonDrawUPP = FakeType("NULL")
 
 
 includestuff = includestuff + """
-#ifdef WITHOUT_FRAMEWORKS
-#include <Appearance.h>
-#else
 #include <Carbon/Carbon.h>
-#endif
-
 
 
 int ThemeButtonDrawInfo_Convert(PyObject *v, ThemeButtonDrawInfo *p_itself)
index 492720f851a500ab457220b3c4a0a2506696bd78..19d7d6d6fd2f429686ccd9f22520d8e095899a5f 100644 (file)
@@ -74,11 +74,7 @@ MouseTrackingResult = UInt16
 
 
 includestuff = r"""
-#ifdef WITHOUT_FRAMEWORKS
-#include <CarbonEvents.h>
-#else
 #include <Carbon/Carbon.h>
-#endif
 
 #include "macglue.h"
 
index 6d1aa0f2efaabdead4a9424712e3764382926a3a..46eb31e414b4f6a96e1c2429eda87d771c4ce556 100755 (executable)
@@ -5,11 +5,7 @@
 
 
 
-#ifdef WITHOUT_FRAMEWORKS
-#include <CarbonEvents.h>
-#else
 #include <Carbon/Carbon.h>
-#endif
 
 #include "macglue.h"
 
index d6dba45de379c36afbea95f8333499a59c649a39..8a82d2bd79c3c2b497814d307785617a0bee1473 100644 (file)
     }} while(0)
 
 
-#ifdef WITHOUT_FRAMEWORKS
-#include <CFBase.h>
-#include <CFArray.h>
-#include <CFData.h>
-#include <CFDictionary.h>
-#include <CFString.h>
-#include <CFURL.h>
-#include <CFPropertyList.h>
-#include <CFPreferences.h>
-#else
 #include <CoreServices/CoreServices.h>
-#endif
 
 #include "pycfbridge.h"
 
index f27c58b1613eb99118dd0c0752e2476177262fa5..e68ae034bdb8c896705c6fcbf3643b4c2d311733 100644 (file)
@@ -42,18 +42,7 @@ class MethodSkipArg1(MethodGenerator):
 # Create the type objects
 
 includestuff = includestuff + """
-#ifdef WITHOUT_FRAMEWORKS
-#include <CFBase.h>
-#include <CFArray.h>
-#include <CFData.h>
-#include <CFDictionary.h>
-#include <CFString.h>
-#include <CFURL.h>
-#include <CFPropertyList.h>
-#include <CFPreferences.h>
-#else
 #include <CoreServices/CoreServices.h>
-#endif
 
 #include "pycfbridge.h"
 
index 21a952262c4be8cc83b61dda1093b12830264901..3e4b89a77d8a27256b706362add89ff9d74a2c93 100644 (file)
@@ -2,17 +2,7 @@
 ** Convert objects from Python to CoreFoundation and vice-versa.
 */
 
-#ifdef WITHOUT_FRAMEWORKS
-#include <CFBase.h>
-#include <CFNumber.h>
-#include <CFArray.h>
-#include <CFData.h>
-#include <CFDictionary.h>
-#include <CFString.h>
-#include <CFURL.h>
-#else
 #include <CoreServices/CoreServices.h>
-#endif
 
 #include "Python.h"
 #include "macglue.h"
index 3bc114c82b164e6a0250a7ebf1b612c4d02fcf26..09b803c5a54c4434e7b2b5b68fb2a00d1fe2d7e8 100755 (executable)
 
 /* Macro to test whether a weak-loaded CFM function exists */
 #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-       PyErr_SetString(PyExc_NotImplementedError, \
-       "Not available in this shared library/OS version"); \
-       return NULL; \
+        PyErr_SetString(PyExc_NotImplementedError, \
+        "Not available in this shared library/OS version"); \
+        return NULL; \
     }} while(0)
 
 
-#ifdef WITHOUT_FRAMEWORKS
-#include <Quickdraw.h>
-#include <CGContext.h>
-#else
 #include <ApplicationServices/ApplicationServices.h>
-#endif
 
 #if !TARGET_API_MAC_OSX
        /* This code is adapted from the CallMachOFramework demo at:
index 7456b55d9d578118ecc279d037459e05cef0b1be..a8372f2472cdeb4299da0fa88ec64fe3dbdbd862 100755 (executable)
@@ -23,12 +23,7 @@ RgnHandle = OpaqueByValueType("RgnHandle", "ResObj")
 # Create the type objects
 
 includestuff = includestuff + """
-#ifdef WITHOUT_FRAMEWORKS
-#include <Quickdraw.h>
-#include <CGContext.h>
-#else
 #include <ApplicationServices/ApplicationServices.h>
-#endif
 
 #if !TARGET_API_MAC_OSX
        /* This code is adapted from the CallMachOFramework demo at:
index 7abdaa966e28ce6abea6ac500e2d9d80c1f266a2..f9b1bf7b959696ef72dd59b04341a92e6518838a 100644 (file)
 
 /* Macro to test whether a weak-loaded CFM function exists */
 #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-       PyErr_SetString(PyExc_NotImplementedError, \
-       "Not available in this shared library/OS version"); \
-       return NULL; \
+        PyErr_SetString(PyExc_NotImplementedError, \
+        "Not available in this shared library/OS version"); \
+        return NULL; \
     }} while(0)
 
 
-#ifdef WITHOUT_FRAMEWORKS
-#include <Components.h>
-#else
 #include <Carbon/Carbon.h>
-#endif
 
 #ifdef USE_TOOLBOX_OBJECT_GLUE
 extern PyObject *_CmpObj_New(Component);
index 2468193dcda6f6a37befeb22e12e7ddd557c7918..98018c45687502810267971a8e61e3006506eb58 100644 (file)
@@ -21,11 +21,7 @@ from macsupport import *
 # Create the type objects
 
 includestuff = includestuff + """
-#ifdef WITHOUT_FRAMEWORKS
-#include <Components.h>
-#else
 #include <Carbon/Carbon.h>
-#endif
 
 #ifdef USE_TOOLBOX_OBJECT_GLUE
 extern PyObject *_CmpObj_New(Component);
index 98c6f4f05be8a822e4800e5fe89d0276f5585b79..60fcef413c632c6591ec5923d0fa1c4dc102520e 100644 (file)
 
 /* Macro to test whether a weak-loaded CFM function exists */
 #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-       PyErr_SetString(PyExc_NotImplementedError, \
-       "Not available in this shared library/OS version"); \
-       return NULL; \
+        PyErr_SetString(PyExc_NotImplementedError, \
+        "Not available in this shared library/OS version"); \
+        return NULL; \
     }} while(0)
 
 
-#ifdef WITHOUT_FRAMEWORKS
-#include <Controls.h>
-#include <ControlDefinitions.h>
-#else
 #include <Carbon/Carbon.h>
-#endif
 
 #ifdef USE_TOOLBOX_OBJECT_GLUE
 extern PyObject *_CtlObj_New(ControlHandle);
index 2fc51cfd9a01d6fd4f154ed0cd0f54359ac506a7..b2d9ad55f66568bfb21c29c6c5ef8b5b5fd6f34a 100644 (file)
@@ -113,12 +113,7 @@ ControlSliderOrientation = UInt16
 
 
 includestuff = includestuff + """
-#ifdef WITHOUT_FRAMEWORKS
-#include <Controls.h>
-#include <ControlDefinitions.h>
-#else
 #include <Carbon/Carbon.h>
-#endif
 
 #ifdef USE_TOOLBOX_OBJECT_GLUE
 extern PyObject *_CtlObj_New(ControlHandle);
index 3e0bc6df7c7b52b6aeb6755e58c9a7b4fdd374fc..966e1ff752545d8b0d3ab22aa99fb648251fe834 100644 (file)
     }} while(0)
 
 
-#ifdef WITHOUT_FRAMEWORKS
-#include <Dialogs.h>
-#else
 #include <Carbon/Carbon.h>
-#endif
 
 #ifdef USE_TOOLBOX_OBJECT_GLUE
 extern PyObject *_DlgObj_New(DialogRef);
index 1b561d97b76fa0d0a21b9a64f86ce26be19045c2..85bc607e811f111f7a69a025ad02a59dbf350d4b 100644 (file)
@@ -31,11 +31,7 @@ StringPtr = Str255
 EventMask = Type("EventMask", "H")
 
 includestuff = includestuff + """
-#ifdef WITHOUT_FRAMEWORKS
-#include <Dialogs.h>
-#else
 #include <Carbon/Carbon.h>
-#endif
 
 #ifdef USE_TOOLBOX_OBJECT_GLUE
 extern PyObject *_DlgObj_New(DialogRef);
index 3b00da81376335c21dcf3d18411bccbc8b19d411..79f03849cf6a464bca35b598dacdc0fe2d25e06d 100644 (file)
 
 /* Macro to test whether a weak-loaded CFM function exists */
 #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-       PyErr_SetString(PyExc_NotImplementedError, \
-       "Not available in this shared library/OS version"); \
-       return NULL; \
+        PyErr_SetString(PyExc_NotImplementedError, \
+        "Not available in this shared library/OS version"); \
+        return NULL; \
     }} while(0)
 
 
-#ifdef WITHOUT_FRAMEWORKS
-#include <Drag.h>
-#else
 #include <Carbon/Carbon.h>
-#endif
 
 /* Callback glue routines */
 DragTrackingHandlerUPP dragglue_TrackingHandlerUPP;
index 84c71a5ed7697d0491b4577109b1cd4162e01433..c200950428ab2500a94f6a29f939422248186902 100644 (file)
@@ -44,11 +44,7 @@ FlavorFlags = Type("FlavorFlags", "l")
 DragTrackingMessage = Type("DragTrackingMessage", "h")
 
 includestuff = includestuff + """
-#ifdef WITHOUT_FRAMEWORKS
-#include <Drag.h>
-#else
 #include <Carbon/Carbon.h>
-#endif
 
 /* Callback glue routines */
 DragTrackingHandlerUPP dragglue_TrackingHandlerUPP;
index 48c878d1ac19ac06d3ec6c554d8dacd0cffe48cb..9f62a2f7c9900f348c205508e122a624c65c11b7 100644 (file)
 
 /* Macro to test whether a weak-loaded CFM function exists */
 #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-       PyErr_SetString(PyExc_NotImplementedError, \
-       "Not available in this shared library/OS version"); \
-       return NULL; \
+        PyErr_SetString(PyExc_NotImplementedError, \
+        "Not available in this shared library/OS version"); \
+        return NULL; \
     }} while(0)
 
 
-#ifdef WITHOUT_FRAMEWORKS
-#include <Events.h>
-#else
 #include <Carbon/Carbon.h>
-#endif
 
 
 static PyObject *Evt_Error;
index 7dd7258a8f4aae3dca44260efc8ccbe89a0b78cf..ccdc1c59aaf38c4917ed425829dc85fda45ce5b7 100644 (file)
@@ -35,11 +35,7 @@ EventMask = Type("EventMask", "H")
 EventKind = Type("EventKind", "H")
 
 includestuff = includestuff + """
-#ifdef WITHOUT_FRAMEWORKS
-#include <Events.h>
-#else
 #include <Carbon/Carbon.h>
-#endif
 
 """
 
index 5a1cafd514d69521f87a4865f82eb6672a76fd67..9d6e371401e112ea4fd3c0a82f44099afc458675 100644 (file)
     }} while(0)
 
 
-#ifdef WITHOUT_FRAMEWORKS
-#include <Files.h>
-#else
 #include <Carbon/Carbon.h>
-#endif
 
 #ifdef USE_TOOLBOX_OBJECT_GLUE
 extern int _PyMac_GetFSSpec(PyObject *v, FSSpec *spec);
index 7223038b10f950759b63c1394ea1596fc3a9bb0e..9fa8edd8498b43185d4053a59c31d324b0dae40d 100644 (file)
@@ -122,11 +122,7 @@ FSCatalogInfo_ptr = OpaqueType("FSCatalogInfo", "FSCatalogInfo")
 #FSSpecArrayPtr
 
 includestuff = includestuff + """
-#ifdef WITHOUT_FRAMEWORKS
-#include <Files.h>
-#else
 #include <Carbon/Carbon.h>
-#endif
 
 #ifdef USE_TOOLBOX_OBJECT_GLUE
 extern int _PyMac_GetFSSpec(PyObject *v, FSSpec *spec);
index 095fe3a42e1104a83fd97e7fcfe6baa42464378d..cba96e02fea64f34f793d2a5c1d26b791af29acc 100644 (file)
 
 /* Macro to test whether a weak-loaded CFM function exists */
 #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-       PyErr_SetString(PyExc_NotImplementedError, \
-       "Not available in this shared library/OS version"); \
-       return NULL; \
+        PyErr_SetString(PyExc_NotImplementedError, \
+        "Not available in this shared library/OS version"); \
+        return NULL; \
     }} while(0)
 
 
-#ifdef WITHOUT_FRAMEWORKS
-#include <Fonts.h>
-#else
 #include <Carbon/Carbon.h>
-#endif
 
 
 /*
index 20ae292354574d74f0b6cdc757282cf6482856e7..07b944eac472db396133d54c84800ffb255d703b 100644 (file)
@@ -26,11 +26,7 @@ TextBuffer = RevVarInputBufferType()
 
 
 includestuff = includestuff + """
-#ifdef WITHOUT_FRAMEWORKS
-#include <Fonts.h>
-#else
 #include <Carbon/Carbon.h>
-#endif
 
 
 /*
index 07d7bf544b9e661ec799b701cdea89a2ca84799e..9c7afc666be4014d3426dd80fcc45265c2a19d5c 100644 (file)
 
 /* Macro to test whether a weak-loaded CFM function exists */
 #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-       PyErr_SetString(PyExc_NotImplementedError, \
-       "Not available in this shared library/OS version"); \
-       return NULL; \
+        PyErr_SetString(PyExc_NotImplementedError, \
+        "Not available in this shared library/OS version"); \
+        return NULL; \
     }} while(0)
 
 
-#ifdef WITHOUT_FRAMEWORKS
-#include <Folders.h>
-#else
 #include <Carbon/Carbon.h>
-#endif
 
 
 static PyObject *Folder_Error;
index 92003e8396f65fee0a745f472ae3159188c167ca..b9246150928d5226925668729dcb9f20f4dde2bc 100644 (file)
@@ -29,11 +29,7 @@ RoutingFlags = Type("RoutingFlags", "l")
 
 
 includestuff = includestuff + """
-#ifdef WITHOUT_FRAMEWORKS
-#include <Folders.h>
-#else
 #include <Carbon/Carbon.h>
-#endif
 
 """
 
index 66abdeb398b2172af867e0480830e5ab894bf728..8bd42705819ad6803f76df1a65f325f67aaadb60 100644 (file)
 
 /* Macro to test whether a weak-loaded CFM function exists */
 #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-       PyErr_SetString(PyExc_NotImplementedError, \
-       "Not available in this shared library/OS version"); \
-       return NULL; \
+        PyErr_SetString(PyExc_NotImplementedError, \
+        "Not available in this shared library/OS version"); \
+        return NULL; \
     }} while(0)
 
 
 #ifndef PyDoc_STR
 #define PyDoc_STR(x) (x)
 #endif
-#ifdef WITHOUT_FRAMEWORKS
-#include <MacHelp.h>
-#else
 #include <Carbon/Carbon.h>
-#endif
 
 static PyObject *Help_Error;
 
index 8d2237e3c0eb473fc6a4211a04c2fafecc7158ae..230ec0c57f814def829bb2ead93a4e108dfbd9a6 100644 (file)
@@ -39,11 +39,7 @@ includestuff = includestuff + """
 #ifndef PyDoc_STR
 #define PyDoc_STR(x) (x)
 #endif
-#ifdef WITHOUT_FRAMEWORKS
-#include <MacHelp.h>
-#else
 #include <Carbon/Carbon.h>
-#endif
 """
 
 class MyObjectDefinition(PEP253Mixin, GlobalObjectDefinition):
index 25406c7168d6c048d555dbf810207898fa4f88fe..04d4bc135ceee1f9bb0be0a1b28fbe6d5df20450 100644 (file)
@@ -9,11 +9,7 @@ IBCarbonFunction = OSErrFunctionGenerator
 IBCarbonMethod = OSErrMethodGenerator
 
 includestuff = """
-#ifdef WITHOUT_FRAMEWORKS
-#include <IBCarbonRuntime.h>
-#else
 #include <Carbon/Carbon.h>
-#endif /* WITHOUT_FRAMEWORKS */
 #include "macglue.h"
 
 #ifdef USE_TOOLBOX_OBJECT_GLUE
index 1a712c690a4e63377e4b88a238a920f587a1b01c..1d50db2ba4280ca71b2f9c186c1dcc2ce9366960 100644 (file)
@@ -5,11 +5,7 @@
 
 
 
-#ifdef WITHOUT_FRAMEWORKS
-#include <IBCarbonRuntime.h>
-#else
 #include <Carbon/Carbon.h>
-#endif /* WITHOUT_FRAMEWORKS */
 #include "macglue.h"
 
 #ifdef USE_TOOLBOX_OBJECT_GLUE
index ac4987509eac767438472988fbf44042068cb798..7ed2064e0a3cd5674e51a4937cd41a6d4ff5edc9 100644 (file)
 
 /* Macro to test whether a weak-loaded CFM function exists */
 #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-       PyErr_SetString(PyExc_NotImplementedError, \
-       "Not available in this shared library/OS version"); \
-       return NULL; \
+        PyErr_SetString(PyExc_NotImplementedError, \
+        "Not available in this shared library/OS version"); \
+        return NULL; \
     }} while(0)
 
 
-#ifdef WITHOUT_FRAMEWORKS
-#include <Icons.h>
-#else
 #include <Carbon/Carbon.h>
-#endif
 
 
 static PyObject *Icn_Error;
index 6f72235b8fc87ed1fdfea0325d337b6f598d807c..9b4a68fbe2d8b62304e549ec89504f4829c1f88a 100644 (file)
@@ -46,11 +46,7 @@ RGBColor = OpaqueType("RGBColor", "QdRGB")
 #EventKind = Type("EventKind", "H")
 
 includestuff = includestuff + """
-#ifdef WITHOUT_FRAMEWORKS
-#include <Icons.h>
-#else
 #include <Carbon/Carbon.h>
-#endif
 
 """
 
index 05af28e2b9077359439356cca3142d68ada1d770..cf9480198d8b6ac576facca74f1d9bbc1557137c 100644 (file)
 
 /* Macro to test whether a weak-loaded CFM function exists */
 #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-       PyErr_SetString(PyExc_NotImplementedError, \
-       "Not available in this shared library/OS version"); \
-       return NULL; \
+        PyErr_SetString(PyExc_NotImplementedError, \
+        "Not available in this shared library/OS version"); \
+        return NULL; \
     }} while(0)
 
 
-#ifdef WITHOUT_FRAMEWORKS
-#include <Lists.h>
-#else
 #include <Carbon/Carbon.h>
-#endif
 
 #ifdef USE_TOOLBOX_OBJECT_GLUE
 extern PyObject *_ListObj_New(ListHandle);
@@ -34,31 +30,6 @@ extern int _ListObj_Convert(PyObject *, ListHandle *);
 #define ListObj_Convert _ListObj_Convert
 #endif
 
-#if !ACCESSOR_CALLS_ARE_FUNCTIONS
-#define GetListPort(list) ((CGrafPtr)(*(list))->port)
-#define GetListVerticalScrollBar(list) ((*(list))->vScroll)
-#define GetListHorizontalScrollBar(list) ((*(list))->hScroll)
-#define GetListActive(list) ((*(list))->lActive)
-#define GetListClickTime(list) ((*(list))->clikTime)
-#define GetListRefCon(list) ((*(list))->refCon)
-#define GetListDefinition(list) ((*(list))->listDefProc) /* XXX Is this indeed the same? */
-#define GetListUserHandle(list) ((*(list))->userHandle)
-#define GetListDataHandle(list) ((*(list))->cells)
-#define GetListFlags(list) ((*(list))->listFlags)
-#define GetListSelectionFlags(list) ((*(list))->selFlags)
-#define SetListViewBounds(list, bounds) (((*(list))->rView) = *(bounds))
-
-#define SetListPort(list, port) (((*(list))->port) = (GrafPtr)(port))
-#define SetListCellIndent(list, ind) (((*(list))->indent) = *(ind))
-#define SetListClickTime(list, time) (((*(list))->clikTime) = (time))
-#define SetListLastClick(list, click) (((*(list)->lastClick) = *(click))
-#define SetListRefCon(list, refcon) (((*(list))->refCon) = (refcon))
-#define SetListUserHandle(list, handle) (((*(list))->userHandle) = (handle))
-#define SetListFlags(list, flags) (((*(list))->listFlags) = (flags))
-#define SetListSelectionFlags(list, flags) (((*(list))->selFlags) = (flags))
-
-#endif
-
 #define as_List(x) ((ListHandle)x)
 #define as_Resource(lh) ((Handle)lh)
 
index ab7cc3a3083258f6c7418824c6eccf7859c670b1..e44317a963dbe980a8c2a2c7cb412275c51337df 100644 (file)
@@ -39,11 +39,7 @@ CGrafPtr = OpaqueByValueType("CGrafPtr", "GrafObj")
 EventModifiers = Type("EventModifiers", "H")
 
 includestuff = includestuff + """
-#ifdef WITHOUT_FRAMEWORKS
-#include <Lists.h>
-#else
 #include <Carbon/Carbon.h>
-#endif
 
 #ifdef USE_TOOLBOX_OBJECT_GLUE
 extern PyObject *_ListObj_New(ListHandle);
@@ -53,31 +49,6 @@ extern int _ListObj_Convert(PyObject *, ListHandle *);
 #define ListObj_Convert _ListObj_Convert
 #endif
 
-#if !ACCESSOR_CALLS_ARE_FUNCTIONS
-#define GetListPort(list) ((CGrafPtr)(*(list))->port)
-#define GetListVerticalScrollBar(list) ((*(list))->vScroll)
-#define GetListHorizontalScrollBar(list) ((*(list))->hScroll)
-#define GetListActive(list) ((*(list))->lActive)
-#define GetListClickTime(list) ((*(list))->clikTime)
-#define GetListRefCon(list) ((*(list))->refCon)
-#define GetListDefinition(list) ((*(list))->listDefProc) /* XXX Is this indeed the same? */
-#define GetListUserHandle(list) ((*(list))->userHandle)
-#define GetListDataHandle(list) ((*(list))->cells)
-#define GetListFlags(list) ((*(list))->listFlags)
-#define GetListSelectionFlags(list) ((*(list))->selFlags)
-#define SetListViewBounds(list, bounds) (((*(list))->rView) = *(bounds))
-
-#define SetListPort(list, port) (((*(list))->port) = (GrafPtr)(port))
-#define SetListCellIndent(list, ind) (((*(list))->indent) = *(ind))
-#define SetListClickTime(list, time) (((*(list))->clikTime) = (time))
-#define SetListLastClick(list, click) (((*(list)->lastClick) = *(click))
-#define SetListRefCon(list, refcon) (((*(list))->refCon) = (refcon))
-#define SetListUserHandle(list, handle) (((*(list))->userHandle) = (handle))
-#define SetListFlags(list, flags) (((*(list))->listFlags) = (flags))
-#define SetListSelectionFlags(list, flags) (((*(list))->selFlags) = (flags))
-
-#endif
-
 #define as_List(x) ((ListHandle)x)
 #define as_Resource(lh) ((Handle)lh)
 
index 4e3aa20d87c8b77c08f4a29cca152840a5936c7b..c48edb140531b00b9bab16aed61c535d0962e4e2 100644 (file)
 
 /* Macro to test whether a weak-loaded CFM function exists */
 #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-       PyErr_SetString(PyExc_NotImplementedError, \
-       "Not available in this shared library/OS version"); \
-       return NULL; \
+        PyErr_SetString(PyExc_NotImplementedError, \
+        "Not available in this shared library/OS version"); \
+        return NULL; \
     }} while(0)
 
 
-#ifdef WITHOUT_FRAMEWORKS
-#include <Devices.h> /* Defines OpenDeskAcc in universal headers */
-#include <Menus.h>
-#else
 #include <Carbon/Carbon.h>
-#endif
 
 
 #ifdef USE_TOOLBOX_OBJECT_GLUE
@@ -37,16 +32,6 @@ extern int _MenuObj_Convert(PyObject *, MenuHandle *);
 #define MenuObj_Convert _MenuObj_Convert 
 #endif
 
-#if !ACCESSOR_CALLS_ARE_FUNCTIONS
-#define GetMenuID(menu) ((*(menu))->menuID)
-#define GetMenuWidth(menu) ((*(menu))->menuWidth)
-#define GetMenuHeight(menu) ((*(menu))->menuHeight)
-
-#define SetMenuID(menu, id) ((*(menu))->menuID = (id))
-#define SetMenuWidth(menu, width) ((*(menu))->menuWidth = (width))
-#define SetMenuHeight(menu, height) ((*(menu))->menuHeight = (height))
-#endif
-
 #define as_Menu(h) ((MenuHandle)h)
 #define as_Resource(h) ((Handle)h)
 
index 6c8229cc7201fa17e608b1137237dbf2071d504f..7c4ae0d560f65f9add3faecb79c9bed95db28c40 100644 (file)
@@ -39,12 +39,7 @@ FMFontStyle = Type("FMFontStyle", "h")
 UniChar = Type("UniChar", "h")
 
 includestuff = includestuff + """
-#ifdef WITHOUT_FRAMEWORKS
-#include <Devices.h> /* Defines OpenDeskAcc in universal headers */
-#include <Menus.h>
-#else
 #include <Carbon/Carbon.h>
-#endif
 
 
 #ifdef USE_TOOLBOX_OBJECT_GLUE
@@ -56,16 +51,6 @@ extern int _MenuObj_Convert(PyObject *, MenuHandle *);
 #define MenuObj_Convert _MenuObj_Convert 
 #endif
 
-#if !ACCESSOR_CALLS_ARE_FUNCTIONS
-#define GetMenuID(menu) ((*(menu))->menuID)
-#define GetMenuWidth(menu) ((*(menu))->menuWidth)
-#define GetMenuHeight(menu) ((*(menu))->menuHeight)
-
-#define SetMenuID(menu, id) ((*(menu))->menuID = (id))
-#define SetMenuWidth(menu, width) ((*(menu))->menuWidth = (width))
-#define SetMenuHeight(menu, height) ((*(menu))->menuHeight = (height))
-#endif
-
 #define as_Menu(h) ((MenuHandle)h)
 #define as_Resource(h) ((Handle)h)
 
index aebec02b5efb265e9a9570ff030955ebdd496878..18fdd45bc6e228fd25a0684bc2eb0e2f736214d4 100644 (file)
 
 /* Macro to test whether a weak-loaded CFM function exists */
 #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-       PyErr_SetString(PyExc_NotImplementedError, \
-       "Not available in this shared library/OS version"); \
-       return NULL; \
+        PyErr_SetString(PyExc_NotImplementedError, \
+        "Not available in this shared library/OS version"); \
+        return NULL; \
     }} while(0)
 
 
-#ifdef WITHOUT_FRAMEWORKS
-#include <MacTextEditor.h>
-#else
 #include <Carbon/Carbon.h>
-#endif
 
 /* For now we declare them forward here. They'll go to mactoolbox later */
 static PyObject *TXNObj_New(TXNObject);
index fe34fc77a0595c1b21f9b3dca5849bafdaf64fef..862d0bc898be9028dcfc222ada1f42d66de88c08 100644 (file)
@@ -20,11 +20,7 @@ from macsupport import *
 # Create the type objects
 
 includestuff = includestuff + """
-#ifdef WITHOUT_FRAMEWORKS
-#include <MacTextEditor.h>
-#else
 #include <Carbon/Carbon.h>
-#endif
 
 /* For now we declare them forward here. They'll go to mactoolbox later */
 static PyObject *TXNObj_New(TXNObject);
index f2994dbca271e61d420401846d5e8caf80014351..e15f84870df21ac91fb90cb6fa3e84b3787358da 100644 (file)
     }} while(0)
 
 
-#ifdef WITHOUT_FRAMEWORKS
-#include <QuickDraw.h>
-#else
 #include <Carbon/Carbon.h>
-#endif
 
 #ifdef USE_TOOLBOX_OBJECT_GLUE
 extern PyObject *_GrafObj_New(GrafPtr);
@@ -42,69 +38,6 @@ extern int _QdRGB_Convert(PyObject *, RGBColorPtr);
 #define QdRGB_Convert _QdRGB_Convert
 #endif
 
-#if !ACCESSOR_CALLS_ARE_FUNCTIONS
-#define GetPortBitMapForCopyBits(port) ((const struct BitMap *)&((GrafPort *)(port))->portBits)
-#define GetPortPixMap(port) (((CGrafPtr)(port))->portPixMap)
-#define GetPortBounds(port, bounds) (*(bounds) = (port)->portRect, (bounds))
-#define GetPortForeColor(port, color) (*(color) = (port)->rgbFgColor, (color))
-#define GetPortBackColor(port, color) (*(color) = (port)->rgbBkColor, (color))
-#define GetPortOpColor(port, color) (*(color) = (*(GVarHandle)((port)->grafVars))->rgbOpColor, (color))
-#define GetPortHiliteColor(port, color) (*(color) = (*(GVarHandle)((port)->grafVars))->rgbHiliteColor, (color))
-#define GetPortTextFont(port) ((port)->txFont)
-#define GetPortTextFace(port) ((port)->txFace)
-#define GetPortTextMode(port) ((port)->txMode)
-#define GetPortTextSize(port) ((port)->txSize)
-#define GetPortChExtra(port) ((port)->chExtra)
-#define GetPortFracHPenLocation(port) ((port)->pnLocHFrac)
-#define GetPortSpExtra(port) ((port)->spExtra)
-#define GetPortPenVisibility(port) ((port)->pnVis)
-#define GetPortVisibleRegion(port, rgn) ((rgn) = (port)->visRgn, (rgn))
-#define GetPortClipRegion(port, rgn) ((rgn) = (port)->clipRgn, (rgn))
-#define GetPortBackPixPat(port, pat) ((pat) = (port)->bkPixPat, (pat))
-#define GetPortPenPixPat(port, pat) ((pat) = (port)->pnPixPat, (pat))
-#define GetPortFillPixPat(port, pat) ((pat) = (port)->fillPixPat, (pat))
-#define GetPortPenSize(port, pensize) (*(pensize) = (port)->pnSize, (pensize))
-#define GetPortPenMode(port) ((port)->pnMode)
-#define GetPortPenLocation(port, location) ((*location) = (port)->pnLoc, (location))
-#define IsPortRegionBeingDefined(port) (!!((port)->rgnSave))
-#define IsPortPictureBeingDefined(port) (!!((port)->picSave))
-/* #define IsPortOffscreen(port) */
-/* #define IsPortColor(port) */
-
-#define SetPortBounds(port, bounds) ((port)->portRect = *(bounds))
-#define SetPortOpColor(port, color) ((*(GVarHandle)((port)->grafVars))->rgbOpColor = *(color))
-#define SetPortVisibleRegion(port, rgn) ((port)->visRgn = (rgn))
-#define SetPortClipRegion(port, rgn) ((port)->clipRgn = (rgn))
-#define SetPortBackPixPat(port, pat) ((port)->bkPixPat = (pat))
-#define SetPortPenPixPat(port, pat) ((port)->pnPixPat = (pat))
-#define SetPortFillPixPat(port, pat) ((port)->fillPixPat = (pat))
-#define SetPortPenSize(port, pensize) ((port)->pnSize = (pensize))
-#define SetPortPenMode(port, mode) ((port)->pnMode = (mode))
-#define SetPortFracHPenLocation(port, frac) ((port)->pnLocHFrac = (frac))
-
-/* On pixmaps */
-#define GetPixBounds(pixmap, rect) (*(rect) = (*(pixmap))->bounds, (rect))
-#define GetPixDepth(pixmap) ((*(pixmap))->pixelSize)
-
-/* On regions */
-#define GetRegionBounds(rgn, rect) (*(rect) = (*(rgn))->rgnBBox, (rect))
-
-/* On QD Globals */
-#define GetQDGlobalsRandomSeed() (qd.randSeed)
-#define GetQDGlobalsScreenBits(bits) (*(bits) = qd.screenBits, (bits))
-#define GetQDGlobalsArrow(crsr) (*(crsr) = qd.arrow, (crsr))
-#define GetQDGlobalsDarkGray(pat) (*(pat) = qd.dkGray, (pat))
-#define GetQDGlobalsLightGray(pat) (*(pat) = qd.ltGray, (pat))
-#define GetQDGlobalsGray(pat) (*(pat) = qd.gray, (pat))
-#define GetQDGlobalsBlack(pat) (*(pat) = qd.black, (pat))
-#define GetQDGlobalsWhite(pat) (*(pat) = qd.white, (pat))
-#define GetQDGlobalsThePort() ((CGrafPtr)qd.thePort)
-
-#define SetQDGlobalsRandomSeed(seed) (qd.randSeed = (seed))
-#define SetQDGlobalsArrow(crsr) (qd.arrow = *(crsr))
-
-#endif /* ACCESSOR_CALLS_ARE_FUNCTIONS */
-
 static PyObject *BMObj_NewCopied(BitMapPtr);
 
 /*
index 18e628f598e0125b27996b9e4b45a580d6a87e31..e361c01af7a4616f87e5fb120714e7f28f5eb8e3 100644 (file)
@@ -66,11 +66,7 @@ PenState_ptr = StructInputBufferType('PenState')
 TruncCode = Type("TruncCode", "h")
 
 includestuff = includestuff + """
-#ifdef WITHOUT_FRAMEWORKS
-#include <QuickDraw.h>
-#else
 #include <Carbon/Carbon.h>
-#endif
 
 #ifdef USE_TOOLBOX_OBJECT_GLUE
 extern PyObject *_GrafObj_New(GrafPtr);
@@ -88,69 +84,6 @@ extern int _QdRGB_Convert(PyObject *, RGBColorPtr);
 #define QdRGB_Convert _QdRGB_Convert
 #endif
 
-#if !ACCESSOR_CALLS_ARE_FUNCTIONS
-#define GetPortBitMapForCopyBits(port) ((const struct BitMap *)&((GrafPort *)(port))->portBits)
-#define GetPortPixMap(port) (((CGrafPtr)(port))->portPixMap)
-#define GetPortBounds(port, bounds) (*(bounds) = (port)->portRect, (bounds))
-#define GetPortForeColor(port, color) (*(color) = (port)->rgbFgColor, (color))
-#define GetPortBackColor(port, color) (*(color) = (port)->rgbBkColor, (color))
-#define GetPortOpColor(port, color) (*(color) = (*(GVarHandle)((port)->grafVars))->rgbOpColor, (color))
-#define GetPortHiliteColor(port, color) (*(color) = (*(GVarHandle)((port)->grafVars))->rgbHiliteColor, (color))
-#define GetPortTextFont(port) ((port)->txFont)
-#define GetPortTextFace(port) ((port)->txFace)
-#define GetPortTextMode(port) ((port)->txMode)
-#define GetPortTextSize(port) ((port)->txSize)
-#define GetPortChExtra(port) ((port)->chExtra)
-#define GetPortFracHPenLocation(port) ((port)->pnLocHFrac)
-#define GetPortSpExtra(port) ((port)->spExtra)
-#define GetPortPenVisibility(port) ((port)->pnVis)
-#define GetPortVisibleRegion(port, rgn) ((rgn) = (port)->visRgn, (rgn))
-#define GetPortClipRegion(port, rgn) ((rgn) = (port)->clipRgn, (rgn))
-#define GetPortBackPixPat(port, pat) ((pat) = (port)->bkPixPat, (pat))
-#define GetPortPenPixPat(port, pat) ((pat) = (port)->pnPixPat, (pat))
-#define GetPortFillPixPat(port, pat) ((pat) = (port)->fillPixPat, (pat))
-#define GetPortPenSize(port, pensize) (*(pensize) = (port)->pnSize, (pensize))
-#define GetPortPenMode(port) ((port)->pnMode)
-#define GetPortPenLocation(port, location) ((*location) = (port)->pnLoc, (location))
-#define IsPortRegionBeingDefined(port) (!!((port)->rgnSave))
-#define IsPortPictureBeingDefined(port) (!!((port)->picSave))
-/* #define IsPortOffscreen(port) */
-/* #define IsPortColor(port) */
-
-#define SetPortBounds(port, bounds) ((port)->portRect = *(bounds))
-#define SetPortOpColor(port, color) ((*(GVarHandle)((port)->grafVars))->rgbOpColor = *(color))
-#define SetPortVisibleRegion(port, rgn) ((port)->visRgn = (rgn))
-#define SetPortClipRegion(port, rgn) ((port)->clipRgn = (rgn))
-#define SetPortBackPixPat(port, pat) ((port)->bkPixPat = (pat))
-#define SetPortPenPixPat(port, pat) ((port)->pnPixPat = (pat))
-#define SetPortFillPixPat(port, pat) ((port)->fillPixPat = (pat))
-#define SetPortPenSize(port, pensize) ((port)->pnSize = (pensize))
-#define SetPortPenMode(port, mode) ((port)->pnMode = (mode))
-#define SetPortFracHPenLocation(port, frac) ((port)->pnLocHFrac = (frac))
-
-/* On pixmaps */
-#define GetPixBounds(pixmap, rect) (*(rect) = (*(pixmap))->bounds, (rect))
-#define GetPixDepth(pixmap) ((*(pixmap))->pixelSize)
-
-/* On regions */
-#define GetRegionBounds(rgn, rect) (*(rect) = (*(rgn))->rgnBBox, (rect))
-
-/* On QD Globals */
-#define GetQDGlobalsRandomSeed() (qd.randSeed)
-#define GetQDGlobalsScreenBits(bits) (*(bits) = qd.screenBits, (bits))
-#define GetQDGlobalsArrow(crsr) (*(crsr) = qd.arrow, (crsr))
-#define GetQDGlobalsDarkGray(pat) (*(pat) = qd.dkGray, (pat))
-#define GetQDGlobalsLightGray(pat) (*(pat) = qd.ltGray, (pat))
-#define GetQDGlobalsGray(pat) (*(pat) = qd.gray, (pat))
-#define GetQDGlobalsBlack(pat) (*(pat) = qd.black, (pat))
-#define GetQDGlobalsWhite(pat) (*(pat) = qd.white, (pat))
-#define GetQDGlobalsThePort() ((CGrafPtr)qd.thePort)
-
-#define SetQDGlobalsRandomSeed(seed) (qd.randSeed = (seed))
-#define SetQDGlobalsArrow(crsr) (qd.arrow = *(crsr))
-
-#endif /* ACCESSOR_CALLS_ARE_FUNCTIONS */
-
 static PyObject *BMObj_NewCopied(BitMapPtr);
 
 /*
index 8d9f7efd0d0cdf4205299d0422c2cfec5839c5f0..5bc0f968b2aa4b015a5d75d8a6e8255d57a8d6f2 100644 (file)
 
 /* Macro to test whether a weak-loaded CFM function exists */
 #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-       PyErr_SetString(PyExc_NotImplementedError, \
-       "Not available in this shared library/OS version"); \
-       return NULL; \
+        PyErr_SetString(PyExc_NotImplementedError, \
+        "Not available in this shared library/OS version"); \
+        return NULL; \
     }} while(0)
 
 
-#ifdef WITHOUT_FRAMEWORKS
-#include <QDOffscreen.h>
-#else
 #include <Carbon/Carbon.h>
-#endif
 
 #ifdef USE_TOOLBOX_OBJECT_GLUE
 extern PyObject *_GWorldObj_New(GWorldPtr);
index 0c4dd2ae4f82045184a49bafa621079cf98e5ad8..1bd8f5ab586c9dacacdbda381381f55630721017 100644 (file)
@@ -34,11 +34,7 @@ GrafPtr = OpaqueByValueType("GrafPtr", "GrafObj")
 QDErr = OSErrType("QDErr", 'h')
 
 includestuff = includestuff + """
-#ifdef WITHOUT_FRAMEWORKS
-#include <QDOffscreen.h>
-#else
 #include <Carbon/Carbon.h>
-#endif
 
 #ifdef USE_TOOLBOX_OBJECT_GLUE
 extern PyObject *_GWorldObj_New(GWorldPtr);
index 66bca4ba2f51a3e79983e10939a1d5350ee86d0a..fd5db6fa2ae673b897e86bc82355a722cd193e14 100644 (file)
     }} while(0)
 
 
-#ifdef WITHOUT_FRAMEWORKS
-#include <Movies.h>
-#else
-/* #include <Carbon/Carbon.h> */
 #include <QuickTime/QuickTime.h>
-#endif
 
 
 #ifdef USE_TOOLBOX_OBJECT_GLUE
index c4e165362c4fc55f7baf04d05adfc001807544dc..589b837978794bb7ec3cae4ac2b2672cfcccc494 100644 (file)
@@ -24,12 +24,7 @@ from macsupport import *
 # Create the type objects
 
 includestuff = includestuff + """
-#ifdef WITHOUT_FRAMEWORKS
-#include <Movies.h>
-#else
-/* #include <Carbon/Carbon.h> */
 #include <QuickTime/QuickTime.h>
-#endif
 
 
 #ifdef USE_TOOLBOX_OBJECT_GLUE
index e759269db0d2ec6bf4844f57ed805f7ae040211a..0737b19dc46cb998e348b7fae8bd8451d01c6c78 100644 (file)
 
 /* Macro to test whether a weak-loaded CFM function exists */
 #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-       PyErr_SetString(PyExc_NotImplementedError, \
-       "Not available in this shared library/OS version"); \
-       return NULL; \
+        PyErr_SetString(PyExc_NotImplementedError, \
+        "Not available in this shared library/OS version"); \
+        return NULL; \
     }} while(0)
 
 
 #ifndef PyDoc_STR
 #define PyDoc_STR(x) (x)
 #endif
-#ifdef WITHOUT_FRAMEWORKS
-#include <Resources.h>
-#include <string.h>
-#else
 #include <Carbon/Carbon.h>
-#endif
 
 #ifdef USE_TOOLBOX_OBJECT_GLUE
 extern PyObject *_ResObj_New(Handle);
index 37cb6600bc9e3519895051e1d14fae81775986a7..91ab00a1c9413ba8a82698004ec783c36658a707 100644 (file)
@@ -28,12 +28,7 @@ includestuff = includestuff + """
 #ifndef PyDoc_STR
 #define PyDoc_STR(x) (x)
 #endif
-#ifdef WITHOUT_FRAMEWORKS
-#include <Resources.h>
-#include <string.h>
-#else
 #include <Carbon/Carbon.h>
-#endif
 
 #ifdef USE_TOOLBOX_OBJECT_GLUE
 extern PyObject *_ResObj_New(Handle);
index 288c65afa9c7bc44b09865b6d790af8ded2a1363..db8e58be24bd420a914afc1fa77d6b054ad59c0e 100644 (file)
     }} while(0)
 
 
-#ifdef WITHOUT_FRAMEWORKS
-#include <Scrap.h>
-#else
 #include <Carbon/Carbon.h>
-#endif
 
 static PyObject *Scrap_Error;
 
index b89b405e8f6471bdba11667a50e0544bfa361f54..85c1e3b930d16276493255654396f221c8adc7f0 100644 (file)
@@ -29,11 +29,7 @@ includestuff = includestuff + """
 #ifndef PyDoc_STR
 #define PyDoc_STR(x) (x)
 #endif
-#ifdef WITHOUT_FRAMEWORKS
-#include <Scrap.h>
-#else
 #include <Carbon/Carbon.h>
-#endif
 
 /*
 ** Generate ScrapInfo records
index 0075c986be236a00ea70bc9232e5d08b57258f3e..b8f5c33b241a23baec6ce6d625c10edee6989e79 100644 (file)
 
 /* Macro to test whether a weak-loaded CFM function exists */
 #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-       PyErr_SetString(PyExc_NotImplementedError, \
-       "Not available in this shared library/OS version"); \
-       return NULL; \
+        PyErr_SetString(PyExc_NotImplementedError, \
+        "Not available in this shared library/OS version"); \
+        return NULL; \
     }} while(0)
 
 
-#ifdef WITHOUT_FRAMEWORKS
-#include <Sound.h>
-#include <OSUtils.h> /* for Set(Current)A5 */
-#else
 #include <Carbon/Carbon.h>
-#endif
 
 /* Convert a SndCommand argument */
 static int
@@ -1150,11 +1145,8 @@ void init_Snd(void)
        PyModule_AddObject(m, "SndChannelType", (PyObject *)&SndChannel_Type);
        SPB_Type.ob_type = &PyType_Type;
        if (PyType_Ready(&SPB_Type) < 0) return;
-#if 0
-       /* This would shadow the SPB routine, which is bad news (it is important) */
        Py_INCREF(&SPB_Type);
        PyModule_AddObject(m, "SPB", (PyObject *)&SPB_Type);
-#endif
        /* Backward-compatible name */
        Py_INCREF(&SPB_Type);
        PyModule_AddObject(m, "SPBType", (PyObject *)&SPB_Type);
index 105fc661237ec7fb3b8994181a8a5a3ab93d513c..99df5bed8a2f38c00976e4840b52577344792ea0 100644 (file)
@@ -17,12 +17,7 @@ class SndMethod(SndMixIn, OSErrMethodGenerator): pass
 # includestuff etc. are imported from macsupport
 
 includestuff = includestuff + """
-#ifdef WITHOUT_FRAMEWORKS
-#include <Sound.h>
-#include <OSUtils.h> /* for Set(Current)A5 */
-#else
 #include <Carbon/Carbon.h>
-#endif
 """
 
 initstuff = initstuff + """
index 2da251350766fed3a6e8a11cd6319cdf06287068..c440640d17812f10fbbf28804fa84055020d3d25 100644 (file)
 
 /* Macro to test whether a weak-loaded CFM function exists */
 #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL )  {\
-       PyErr_SetString(PyExc_NotImplementedError, \
-       "Not available in this shared library/OS version"); \
-       return NULL; \
+        PyErr_SetString(PyExc_NotImplementedError, \
+        "Not available in this shared library/OS version"); \
+        return NULL; \
     }} while(0)
 
 
-#ifdef WITHOUT_FRAMEWORKS
-#include <TextEdit.h>
-#else
 #include <Carbon/Carbon.h>
-#endif
 
 #ifdef USE_TOOLBOX_OBJECT_GLUE
 extern PyObject *_TEObj_New(TEHandle);
index cac020b58e862eb171320c3ffd8a286122b9883f..13f1b9734d1519f7ba058dddbe3f05e954bf01ec 100644 (file)
@@ -32,11 +32,7 @@ TextStyle = OpaqueType("TextStyle", "TextStyle")
 TextStyle_ptr = TextStyle
 
 includestuff = includestuff + """
-#ifdef WITHOUT_FRAMEWORKS
-#include <TextEdit.h>
-#else
 #include <Carbon/Carbon.h>
-#endif
 
 #ifdef USE_TOOLBOX_OBJECT_GLUE
 extern PyObject *_TEObj_New(TEHandle);
index d1b3ada32ddb7b9c8f37e44a89d3198a5c7b987e..d88a5bcc372aac182807fbcf793a7c5fcf762e0e 100644 (file)
     }} while(0)
 
 
-#ifdef WITHOUT_FRAMEWORKS
-#include <Windows.h>
-#else
 #include <Carbon/Carbon.h>
-#endif
 
 #ifdef USE_TOOLBOX_OBJECT_GLUE
 extern PyObject *_WinObj_New(WindowRef);
index d99ca1eb637e529ba2130c808458c6cc41771341..640e33a7f9c154b595d9f8f948630ec0b0b98b68 100644 (file)
@@ -58,11 +58,7 @@ PropertyCreator = OSTypeType("PropertyCreator")
 PropertyTag = OSTypeType("PropertyTag")
 
 includestuff = includestuff + """
-#ifdef WITHOUT_FRAMEWORKS
-#include <Windows.h>
-#else
 #include <Carbon/Carbon.h>
-#endif
 
 #ifdef USE_TOOLBOX_OBJECT_GLUE
 extern PyObject *_WinObj_New(WindowRef);