diff --git a/Mac/Modules/ae/AEmodule.c b/Mac/Modules/ae/AEmodule.c index d4aab79be7e..9fd51fee4fb 100644 --- a/Mac/Modules/ae/AEmodule.c +++ b/Mac/Modules/ae/AEmodule.c @@ -8,8 +8,12 @@ #include "macglue.h" #include "pymactoolbox.h" +#ifdef WITHOUT_FRAMEWORKS #include #include +#else +#include +#endif #ifdef USE_TOOLBOX_OBJECT_GLUE extern PyObject *_AEDesc_New(AEDesc *); @@ -49,8 +53,7 @@ typedef struct AEDescObject { AEDesc ob_itself; } AEDescObject; -PyObject *AEDesc_New(itself) - AEDesc *itself; +PyObject *AEDesc_New(AEDesc *itself) { AEDescObject *it; it = PyObject_NEW(AEDescObject, &AEDesc_Type); @@ -58,9 +61,7 @@ PyObject *AEDesc_New(itself) it->ob_itself = *itself; return (PyObject *)it; } -AEDesc_Convert(v, p_itself) - PyObject *v; - AEDesc *p_itself; +AEDesc_Convert(PyObject *v, AEDesc *p_itself) { if (!AEDesc_Check(v)) { @@ -71,16 +72,13 @@ AEDesc_Convert(v, p_itself) return 1; } -static void AEDesc_dealloc(self) - AEDescObject *self; +static void AEDesc_dealloc(AEDescObject *self) { AEDisposeDesc(&self->ob_itself); PyMem_DEL(self); } -static PyObject *AEDesc_AECoerceDesc(_self, _args) - AEDescObject *_self; - PyObject *_args; +static PyObject *AEDesc_AECoerceDesc(AEDescObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -98,9 +96,7 @@ static PyObject *AEDesc_AECoerceDesc(_self, _args) return _res; } -static PyObject *AEDesc_AEDuplicateDesc(_self, _args) - AEDescObject *_self; - PyObject *_args; +static PyObject *AEDesc_AEDuplicateDesc(AEDescObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -115,9 +111,7 @@ static PyObject *AEDesc_AEDuplicateDesc(_self, _args) return _res; } -static PyObject *AEDesc_AECountItems(_self, _args) - AEDescObject *_self; - PyObject *_args; +static PyObject *AEDesc_AECountItems(AEDescObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -132,9 +126,7 @@ static PyObject *AEDesc_AECountItems(_self, _args) return _res; } -static PyObject *AEDesc_AEPutPtr(_self, _args) - AEDescObject *_self; - PyObject *_args; +static PyObject *AEDesc_AEPutPtr(AEDescObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -160,9 +152,7 @@ static PyObject *AEDesc_AEPutPtr(_self, _args) return _res; } -static PyObject *AEDesc_AEPutDesc(_self, _args) - AEDescObject *_self; - PyObject *_args; +static PyObject *AEDesc_AEPutDesc(AEDescObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -181,9 +171,7 @@ static PyObject *AEDesc_AEPutDesc(_self, _args) return _res; } -static PyObject *AEDesc_AEGetNthPtr(_self, _args) - AEDescObject *_self; - PyObject *_args; +static PyObject *AEDesc_AEGetNthPtr(AEDescObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -221,9 +209,7 @@ static PyObject *AEDesc_AEGetNthPtr(_self, _args) return _res; } -static PyObject *AEDesc_AEGetNthDesc(_self, _args) - AEDescObject *_self; - PyObject *_args; +static PyObject *AEDesc_AEGetNthDesc(AEDescObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -247,9 +233,7 @@ static PyObject *AEDesc_AEGetNthDesc(_self, _args) return _res; } -static PyObject *AEDesc_AESizeOfNthItem(_self, _args) - AEDescObject *_self; - PyObject *_args; +static PyObject *AEDesc_AESizeOfNthItem(AEDescObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -270,9 +254,7 @@ static PyObject *AEDesc_AESizeOfNthItem(_self, _args) return _res; } -static PyObject *AEDesc_AEDeleteItem(_self, _args) - AEDescObject *_self; - PyObject *_args; +static PyObject *AEDesc_AEDeleteItem(AEDescObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -288,9 +270,7 @@ static PyObject *AEDesc_AEDeleteItem(_self, _args) return _res; } -static PyObject *AEDesc_AEPutParamPtr(_self, _args) - AEDescObject *_self; - PyObject *_args; +static PyObject *AEDesc_AEPutParamPtr(AEDescObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -316,9 +296,7 @@ static PyObject *AEDesc_AEPutParamPtr(_self, _args) return _res; } -static PyObject *AEDesc_AEPutParamDesc(_self, _args) - AEDescObject *_self; - PyObject *_args; +static PyObject *AEDesc_AEPutParamDesc(AEDescObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -337,9 +315,7 @@ static PyObject *AEDesc_AEPutParamDesc(_self, _args) return _res; } -static PyObject *AEDesc_AEGetParamPtr(_self, _args) - AEDescObject *_self; - PyObject *_args; +static PyObject *AEDesc_AEGetParamPtr(AEDescObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -374,9 +350,7 @@ static PyObject *AEDesc_AEGetParamPtr(_self, _args) return _res; } -static PyObject *AEDesc_AEGetParamDesc(_self, _args) - AEDescObject *_self; - PyObject *_args; +static PyObject *AEDesc_AEGetParamDesc(AEDescObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -397,9 +371,7 @@ static PyObject *AEDesc_AEGetParamDesc(_self, _args) return _res; } -static PyObject *AEDesc_AESizeOfParam(_self, _args) - AEDescObject *_self; - PyObject *_args; +static PyObject *AEDesc_AESizeOfParam(AEDescObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -420,9 +392,7 @@ static PyObject *AEDesc_AESizeOfParam(_self, _args) return _res; } -static PyObject *AEDesc_AEDeleteParam(_self, _args) - AEDescObject *_self; - PyObject *_args; +static PyObject *AEDesc_AEDeleteParam(AEDescObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -438,9 +408,7 @@ static PyObject *AEDesc_AEDeleteParam(_self, _args) return _res; } -static PyObject *AEDesc_AEGetAttributePtr(_self, _args) - AEDescObject *_self; - PyObject *_args; +static PyObject *AEDesc_AEGetAttributePtr(AEDescObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -475,9 +443,7 @@ static PyObject *AEDesc_AEGetAttributePtr(_self, _args) return _res; } -static PyObject *AEDesc_AEGetAttributeDesc(_self, _args) - AEDescObject *_self; - PyObject *_args; +static PyObject *AEDesc_AEGetAttributeDesc(AEDescObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -498,9 +464,7 @@ static PyObject *AEDesc_AEGetAttributeDesc(_self, _args) return _res; } -static PyObject *AEDesc_AESizeOfAttribute(_self, _args) - AEDescObject *_self; - PyObject *_args; +static PyObject *AEDesc_AESizeOfAttribute(AEDescObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -521,9 +485,7 @@ static PyObject *AEDesc_AESizeOfAttribute(_self, _args) return _res; } -static PyObject *AEDesc_AEPutAttributePtr(_self, _args) - AEDescObject *_self; - PyObject *_args; +static PyObject *AEDesc_AEPutAttributePtr(AEDescObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -549,9 +511,7 @@ static PyObject *AEDesc_AEPutAttributePtr(_self, _args) return _res; } -static PyObject *AEDesc_AEPutAttributeDesc(_self, _args) - AEDescObject *_self; - PyObject *_args; +static PyObject *AEDesc_AEPutAttributeDesc(AEDescObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -572,9 +532,7 @@ static PyObject *AEDesc_AEPutAttributeDesc(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *AEDesc_AEGetDescDataSize(_self, _args) - AEDescObject *_self; - PyObject *_args; +static PyObject *AEDesc_AEGetDescDataSize(AEDescObject *_self, PyObject *_args) { PyObject *_res = NULL; Size _rv; @@ -587,9 +545,7 @@ static PyObject *AEDesc_AEGetDescDataSize(_self, _args) } #endif -static PyObject *AEDesc_AESend(_self, _args) - AEDescObject *_self; - PyObject *_args; +static PyObject *AEDesc_AESend(AEDescObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -615,9 +571,7 @@ static PyObject *AEDesc_AESend(_self, _args) return _res; } -static PyObject *AEDesc_AEResetTimer(_self, _args) - AEDescObject *_self; - PyObject *_args; +static PyObject *AEDesc_AEResetTimer(AEDescObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -630,9 +584,7 @@ static PyObject *AEDesc_AEResetTimer(_self, _args) return _res; } -static PyObject *AEDesc_AESuspendTheCurrentEvent(_self, _args) - AEDescObject *_self; - PyObject *_args; +static PyObject *AEDesc_AESuspendTheCurrentEvent(AEDescObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -645,9 +597,7 @@ static PyObject *AEDesc_AESuspendTheCurrentEvent(_self, _args) return _res; } -static PyObject *AEDesc_AEResumeTheCurrentEvent(_self, _args) - AEDescObject *_self; - PyObject *_args; +static PyObject *AEDesc_AEResumeTheCurrentEvent(AEDescObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -668,9 +618,7 @@ static PyObject *AEDesc_AEResumeTheCurrentEvent(_self, _args) return _res; } -static PyObject *AEDesc_AEGetTheCurrentEvent(_self, _args) - AEDescObject *_self; - PyObject *_args; +static PyObject *AEDesc_AEGetTheCurrentEvent(AEDescObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -683,9 +631,7 @@ static PyObject *AEDesc_AEGetTheCurrentEvent(_self, _args) return _res; } -static PyObject *AEDesc_AESetTheCurrentEvent(_self, _args) - AEDescObject *_self; - PyObject *_args; +static PyObject *AEDesc_AESetTheCurrentEvent(AEDescObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -698,9 +644,7 @@ static PyObject *AEDesc_AESetTheCurrentEvent(_self, _args) return _res; } -static PyObject *AEDesc_AEResolve(_self, _args) - AEDescObject *_self; - PyObject *_args; +static PyObject *AEDesc_AEResolve(AEDescObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -783,9 +727,7 @@ static PyMethodDef AEDesc_methods[] = { PyMethodChain AEDesc_chain = { AEDesc_methods, NULL }; -static PyObject *AEDesc_getattr(self, name) - AEDescObject *self; - char *name; +static PyObject *AEDesc_getattr(AEDescObject *self, char *name) { if (strcmp(name, "type") == 0) @@ -852,9 +794,7 @@ PyTypeObject AEDesc_Type = { /* --------------------- End object type AEDesc --------------------- */ -static PyObject *AE_AECoercePtr(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *AE_AECoercePtr(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -881,9 +821,7 @@ static PyObject *AE_AECoercePtr(_self, _args) return _res; } -static PyObject *AE_AECreateDesc(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *AE_AECreateDesc(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -907,9 +845,7 @@ static PyObject *AE_AECreateDesc(_self, _args) return _res; } -static PyObject *AE_AECreateList(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *AE_AECreateList(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -933,9 +869,7 @@ static PyObject *AE_AECreateList(_self, _args) return _res; } -static PyObject *AE_AECreateAppleEvent(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *AE_AECreateAppleEvent(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -966,9 +900,7 @@ static PyObject *AE_AECreateAppleEvent(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *AE_AEReplaceDescData(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *AE_AEReplaceDescData(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -993,9 +925,7 @@ static PyObject *AE_AEReplaceDescData(_self, _args) } #endif -static PyObject *AE_AEProcessAppleEvent(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *AE_AEProcessAppleEvent(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1010,9 +940,7 @@ static PyObject *AE_AEProcessAppleEvent(_self, _args) return _res; } -static PyObject *AE_AEGetInteractionAllowed(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *AE_AEGetInteractionAllowed(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1026,9 +954,7 @@ static PyObject *AE_AEGetInteractionAllowed(_self, _args) return _res; } -static PyObject *AE_AESetInteractionAllowed(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *AE_AESetInteractionAllowed(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1043,9 +969,7 @@ static PyObject *AE_AESetInteractionAllowed(_self, _args) return _res; } -static PyObject *AE_AEInteractWithUser(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *AE_AEInteractWithUser(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1062,9 +986,7 @@ static PyObject *AE_AEInteractWithUser(_self, _args) return _res; } -static PyObject *AE_AEInstallEventHandler(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *AE_AEInstallEventHandler(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1088,9 +1010,7 @@ static PyObject *AE_AEInstallEventHandler(_self, _args) return _res; } -static PyObject *AE_AERemoveEventHandler(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *AE_AERemoveEventHandler(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1110,9 +1030,7 @@ static PyObject *AE_AERemoveEventHandler(_self, _args) return _res; } -static PyObject *AE_AEGetEventHandler(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *AE_AEGetEventHandler(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1135,9 +1053,7 @@ static PyObject *AE_AEGetEventHandler(_self, _args) return _res; } -static PyObject *AE_AEInstallSpecialHandler(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *AE_AEInstallSpecialHandler(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1154,9 +1070,7 @@ static PyObject *AE_AEInstallSpecialHandler(_self, _args) return _res; } -static PyObject *AE_AERemoveSpecialHandler(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *AE_AERemoveSpecialHandler(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1173,9 +1087,7 @@ static PyObject *AE_AERemoveSpecialHandler(_self, _args) return _res; } -static PyObject *AE_AEManagerInfo(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *AE_AEManagerInfo(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1192,9 +1104,7 @@ static PyObject *AE_AEManagerInfo(_self, _args) return _res; } -static PyObject *AE_AEObjectInit(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *AE_AEObjectInit(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1207,9 +1117,7 @@ static PyObject *AE_AEObjectInit(_self, _args) return _res; } -static PyObject *AE_AEDisposeToken(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *AE_AEDisposeToken(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1223,9 +1131,7 @@ static PyObject *AE_AEDisposeToken(_self, _args) return _res; } -static PyObject *AE_AECallObjectAccessor(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *AE_AECallObjectAccessor(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1330,17 +1236,17 @@ GenericEventHandler(const AppleEvent *request, AppleEvent *reply, unsigned long } -void initAE() +void initAE(void) { PyObject *m; PyObject *d; - upp_AEIdleProc = NewAEIdleProc(AEIdleProc); - upp_GenericEventHandler = NewAEEventHandlerProc(GenericEventHandler); - PyMac_INIT_TOOLBOX_OBJECT_NEW(AEDesc_New); - PyMac_INIT_TOOLBOX_OBJECT_CONVERT(AEDesc_Convert); + upp_AEIdleProc = NewAEIdleUPP(AEIdleProc); + upp_GenericEventHandler = NewAEEventHandlerUPP(GenericEventHandler); + PyMac_INIT_TOOLBOX_OBJECT_NEW(AEDesc *, AEDesc_New); + PyMac_INIT_TOOLBOX_OBJECT_CONVERT(AEDesc, AEDesc_Convert); m = Py_InitModule("AE", AE_methods); diff --git a/Mac/Modules/ae/aesupport.py b/Mac/Modules/ae/aesupport.py index 094a3096698..321a2107091 100644 --- a/Mac/Modules/ae/aesupport.py +++ b/Mac/Modules/ae/aesupport.py @@ -82,8 +82,12 @@ AEMethod = OSErrMethodGenerator includestuff = includestuff + """ +#ifdef WITHOUT_FRAMEWORKS #include #include +#else +#include +#endif #ifdef USE_TOOLBOX_OBJECT_GLUE extern PyObject *_AEDesc_New(AEDesc *); @@ -144,10 +148,10 @@ GenericEventHandler(const AppleEvent *request, AppleEvent *reply, unsigned long """ initstuff = initstuff + """ - upp_AEIdleProc = NewAEIdleProc(AEIdleProc); - upp_GenericEventHandler = NewAEEventHandlerProc(GenericEventHandler); - PyMac_INIT_TOOLBOX_OBJECT_NEW(AEDesc_New); - PyMac_INIT_TOOLBOX_OBJECT_CONVERT(AEDesc_Convert); + upp_AEIdleProc = NewAEIdleUPP(AEIdleProc); + upp_GenericEventHandler = NewAEEventHandlerUPP(GenericEventHandler); + PyMac_INIT_TOOLBOX_OBJECT_NEW(AEDesc *, AEDesc_New); + PyMac_INIT_TOOLBOX_OBJECT_CONVERT(AEDesc, AEDesc_Convert); """ module = MacModule('AE', 'AE', includestuff, finalstuff, initstuff) diff --git a/Mac/Modules/app/Appmodule.c b/Mac/Modules/app/Appmodule.c index 929c34f7bc9..4e06f41898d 100644 --- a/Mac/Modules/app/Appmodule.c +++ b/Mac/Modules/app/Appmodule.c @@ -8,13 +8,16 @@ #include "macglue.h" #include "pymactoolbox.h" +#ifdef WITHOUT_FRAMEWORKS #include +#else +#include +#endif + static PyObject *App_Error; -static PyObject *App_RegisterAppearanceClient(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *App_RegisterAppearanceClient(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -27,9 +30,7 @@ static PyObject *App_RegisterAppearanceClient(_self, _args) return _res; } -static PyObject *App_UnregisterAppearanceClient(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *App_UnregisterAppearanceClient(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -42,9 +43,7 @@ static PyObject *App_UnregisterAppearanceClient(_self, _args) return _res; } -static PyObject *App_SetThemePen(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *App_SetThemePen(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -65,9 +64,7 @@ static PyObject *App_SetThemePen(_self, _args) return _res; } -static PyObject *App_SetThemeBackground(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *App_SetThemeBackground(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -88,9 +85,7 @@ static PyObject *App_SetThemeBackground(_self, _args) return _res; } -static PyObject *App_SetThemeTextColor(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *App_SetThemeTextColor(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -111,9 +106,7 @@ static PyObject *App_SetThemeTextColor(_self, _args) return _res; } -static PyObject *App_SetThemeWindowBackground(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *App_SetThemeWindowBackground(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -134,9 +127,7 @@ static PyObject *App_SetThemeWindowBackground(_self, _args) return _res; } -static PyObject *App_DrawThemeWindowHeader(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *App_DrawThemeWindowHeader(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -154,9 +145,7 @@ static PyObject *App_DrawThemeWindowHeader(_self, _args) return _res; } -static PyObject *App_DrawThemeWindowListViewHeader(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *App_DrawThemeWindowListViewHeader(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -174,9 +163,7 @@ static PyObject *App_DrawThemeWindowListViewHeader(_self, _args) return _res; } -static PyObject *App_DrawThemePlacard(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *App_DrawThemePlacard(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -194,9 +181,7 @@ static PyObject *App_DrawThemePlacard(_self, _args) return _res; } -static PyObject *App_DrawThemeEditTextFrame(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *App_DrawThemeEditTextFrame(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -214,9 +199,7 @@ static PyObject *App_DrawThemeEditTextFrame(_self, _args) return _res; } -static PyObject *App_DrawThemeListBoxFrame(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *App_DrawThemeListBoxFrame(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -234,9 +217,7 @@ static PyObject *App_DrawThemeListBoxFrame(_self, _args) return _res; } -static PyObject *App_DrawThemeFocusRect(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *App_DrawThemeFocusRect(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -254,9 +235,7 @@ static PyObject *App_DrawThemeFocusRect(_self, _args) return _res; } -static PyObject *App_DrawThemePrimaryGroup(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *App_DrawThemePrimaryGroup(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -274,9 +253,7 @@ static PyObject *App_DrawThemePrimaryGroup(_self, _args) return _res; } -static PyObject *App_DrawThemeSecondaryGroup(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *App_DrawThemeSecondaryGroup(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -294,9 +271,7 @@ static PyObject *App_DrawThemeSecondaryGroup(_self, _args) return _res; } -static PyObject *App_DrawThemeSeparator(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *App_DrawThemeSeparator(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -314,9 +289,7 @@ static PyObject *App_DrawThemeSeparator(_self, _args) return _res; } -static PyObject *App_DrawThemeModelessDialogFrame(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *App_DrawThemeModelessDialogFrame(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -334,9 +307,7 @@ static PyObject *App_DrawThemeModelessDialogFrame(_self, _args) return _res; } -static PyObject *App_DrawThemeGenericWell(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *App_DrawThemeGenericWell(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -357,9 +328,7 @@ static PyObject *App_DrawThemeGenericWell(_self, _args) return _res; } -static PyObject *App_DrawThemeFocusRegion(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *App_DrawThemeFocusRegion(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -375,9 +344,7 @@ static PyObject *App_DrawThemeFocusRegion(_self, _args) return _res; } -static PyObject *App_IsThemeInColor(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *App_IsThemeInColor(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -394,9 +361,7 @@ static PyObject *App_IsThemeInColor(_self, _args) return _res; } -static PyObject *App_GetThemeAccentColors(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *App_GetThemeAccentColors(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -410,9 +375,7 @@ static PyObject *App_GetThemeAccentColors(_self, _args) return _res; } -static PyObject *App_DrawThemeMenuBarBackground(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *App_DrawThemeMenuBarBackground(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -433,9 +396,7 @@ static PyObject *App_DrawThemeMenuBarBackground(_self, _args) return _res; } -static PyObject *App_GetThemeMenuBarHeight(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *App_GetThemeMenuBarHeight(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -449,9 +410,7 @@ static PyObject *App_GetThemeMenuBarHeight(_self, _args) return _res; } -static PyObject *App_DrawThemeMenuBackground(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *App_DrawThemeMenuBackground(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -469,9 +428,7 @@ static PyObject *App_DrawThemeMenuBackground(_self, _args) return _res; } -static PyObject *App_GetThemeMenuBackgroundRegion(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *App_GetThemeMenuBackgroundRegion(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -490,9 +447,7 @@ static PyObject *App_GetThemeMenuBackgroundRegion(_self, _args) return _res; } -static PyObject *App_DrawThemeMenuSeparator(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *App_DrawThemeMenuSeparator(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -507,9 +462,7 @@ static PyObject *App_DrawThemeMenuSeparator(_self, _args) return _res; } -static PyObject *App_GetThemeMenuSeparatorHeight(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *App_GetThemeMenuSeparatorHeight(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -523,9 +476,7 @@ static PyObject *App_GetThemeMenuSeparatorHeight(_self, _args) return _res; } -static PyObject *App_GetThemeMenuItemExtra(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *App_GetThemeMenuItemExtra(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -545,9 +496,7 @@ static PyObject *App_GetThemeMenuItemExtra(_self, _args) return _res; } -static PyObject *App_GetThemeMenuTitleExtra(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *App_GetThemeMenuTitleExtra(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -564,9 +513,7 @@ static PyObject *App_GetThemeMenuTitleExtra(_self, _args) return _res; } -static PyObject *App_DrawThemeTabPane(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *App_DrawThemeTabPane(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -584,9 +531,7 @@ static PyObject *App_DrawThemeTabPane(_self, _args) return _res; } -static PyObject *App_GetThemeTabRegion(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *App_GetThemeTabRegion(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -608,9 +553,7 @@ static PyObject *App_GetThemeTabRegion(_self, _args) return _res; } -static PyObject *App_SetThemeCursor(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *App_SetThemeCursor(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -625,9 +568,7 @@ static PyObject *App_SetThemeCursor(_self, _args) return _res; } -static PyObject *App_SetAnimatedThemeCursor(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *App_SetAnimatedThemeCursor(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -645,9 +586,7 @@ static PyObject *App_SetAnimatedThemeCursor(_self, _args) return _res; } -static PyObject *App_GetThemeScrollBarThumbStyle(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *App_GetThemeScrollBarThumbStyle(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -661,9 +600,7 @@ static PyObject *App_GetThemeScrollBarThumbStyle(_self, _args) return _res; } -static PyObject *App_GetThemeScrollBarArrowStyle(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *App_GetThemeScrollBarArrowStyle(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -677,9 +614,7 @@ static PyObject *App_GetThemeScrollBarArrowStyle(_self, _args) return _res; } -static PyObject *App_GetThemeCheckBoxStyle(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *App_GetThemeCheckBoxStyle(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -693,9 +628,7 @@ static PyObject *App_GetThemeCheckBoxStyle(_self, _args) return _res; } -static PyObject *App_UseThemeFont(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *App_UseThemeFont(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -713,9 +646,7 @@ static PyObject *App_UseThemeFont(_self, _args) return _res; } -static PyObject *App_DrawThemeScrollBarArrows(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *App_DrawThemeScrollBarArrows(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -741,9 +672,7 @@ static PyObject *App_DrawThemeScrollBarArrows(_self, _args) return _res; } -static PyObject *App_GetThemeScrollBarTrackRect(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *App_GetThemeScrollBarTrackRect(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -769,9 +698,7 @@ static PyObject *App_GetThemeScrollBarTrackRect(_self, _args) return _res; } -static PyObject *App_HitTestThemeScrollBarArrows(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *App_HitTestThemeScrollBarArrows(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -803,9 +730,7 @@ static PyObject *App_HitTestThemeScrollBarArrows(_self, _args) return _res; } -static PyObject *App_DrawThemeScrollBarDelimiters(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *App_DrawThemeScrollBarDelimiters(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -829,9 +754,7 @@ static PyObject *App_DrawThemeScrollBarDelimiters(_self, _args) return _res; } -static PyObject *App_PlayThemeSound(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *App_PlayThemeSound(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -846,9 +769,7 @@ static PyObject *App_PlayThemeSound(_self, _args) return _res; } -static PyObject *App_BeginThemeDragSound(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *App_BeginThemeDragSound(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -863,9 +784,7 @@ static PyObject *App_BeginThemeDragSound(_self, _args) return _res; } -static PyObject *App_EndThemeDragSound(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *App_EndThemeDragSound(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -878,9 +797,7 @@ static PyObject *App_EndThemeDragSound(_self, _args) return _res; } -static PyObject *App_DrawThemeTickMark(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *App_DrawThemeTickMark(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -898,9 +815,7 @@ static PyObject *App_DrawThemeTickMark(_self, _args) return _res; } -static PyObject *App_DrawThemeStandaloneGrowBox(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *App_DrawThemeStandaloneGrowBox(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -924,9 +839,7 @@ static PyObject *App_DrawThemeStandaloneGrowBox(_self, _args) return _res; } -static PyObject *App_DrawThemeStandaloneNoGrowBox(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *App_DrawThemeStandaloneNoGrowBox(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -950,9 +863,7 @@ static PyObject *App_DrawThemeStandaloneNoGrowBox(_self, _args) return _res; } -static PyObject *App_GetThemeStandaloneGrowBoxBounds(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *App_GetThemeStandaloneGrowBoxBounds(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -975,9 +886,7 @@ static PyObject *App_GetThemeStandaloneGrowBoxBounds(_self, _args) return _res; } -static PyObject *App_NormalizeThemeDrawingState(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *App_NormalizeThemeDrawingState(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -990,9 +899,7 @@ static PyObject *App_NormalizeThemeDrawingState(_self, _args) return _res; } -static PyObject *App_ApplyThemeBackground(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *App_ApplyThemeBackground(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -1019,9 +926,7 @@ static PyObject *App_ApplyThemeBackground(_self, _args) return _res; } -static PyObject *App_SetThemeTextColorForWindow(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *App_SetThemeTextColorForWindow(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -1045,9 +950,7 @@ static PyObject *App_SetThemeTextColorForWindow(_self, _args) return _res; } -static PyObject *App_IsValidAppearanceFileType(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *App_IsValidAppearanceFileType(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -1061,9 +964,7 @@ static PyObject *App_IsValidAppearanceFileType(_self, _args) return _res; } -static PyObject *App_GetThemeBrushAsColor(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *App_GetThemeBrushAsColor(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -1086,9 +987,7 @@ static PyObject *App_GetThemeBrushAsColor(_self, _args) return _res; } -static PyObject *App_GetThemeTextColor(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *App_GetThemeTextColor(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -1113,9 +1012,7 @@ static PyObject *App_GetThemeTextColor(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *App_GetThemeMetric(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *App_GetThemeMetric(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -1251,7 +1148,7 @@ static PyMethodDef App_methods[] = { -void initApp() +void initApp(void) { PyObject *m; PyObject *d; diff --git a/Mac/Modules/app/appsupport.py b/Mac/Modules/app/appsupport.py index bd314dde5f4..d370a573dd5 100644 --- a/Mac/Modules/app/appsupport.py +++ b/Mac/Modules/app/appsupport.py @@ -69,7 +69,12 @@ ThemeMetric = Type("ThemeMetric", "l") RGBColor = OpaqueType("RGBColor", "QdRGB") includestuff = includestuff + """ -#include <%s>""" % MACHEADERFILE + """ +#ifdef WITHOUT_FRAMEWORKS +#include +#else +#include +#endif + """ ## class MyObjectDefinition(GlobalObjectDefinition): diff --git a/Mac/Modules/cm/Cmmodule.c b/Mac/Modules/cm/Cmmodule.c index 5e8a17c443a..1738f3e3445 100644 --- a/Mac/Modules/cm/Cmmodule.c +++ b/Mac/Modules/cm/Cmmodule.c @@ -8,7 +8,12 @@ #include "macglue.h" #include "pymactoolbox.h" +#ifdef WITHOUT_FRAMEWORKS #include +#else +#include +#endif + #ifdef USE_TOOLBOX_OBJECT_GLUE extern PyObject *_CmpObj_New(Component); extern int _CmpObj_Convert(PyObject *, Component *); @@ -25,8 +30,7 @@ extern int _CmpInstObj_Convert(PyObject *, ComponentInstance *); ** Parse/generate ComponentDescriptor records */ static PyObject * -CmpDesc_New(itself) - ComponentDescription *itself; +CmpDesc_New(ComponentDescription *itself) { return Py_BuildValue("O&O&O&ll", @@ -37,9 +41,7 @@ CmpDesc_New(itself) } static int -CmpDesc_Convert(v, p_itself) - PyObject *v; - ComponentDescription *p_itself; +CmpDesc_Convert(PyObject *v, ComponentDescription *p_itself) { return PyArg_ParseTuple(v, "O&O&O&ll", PyMac_GetOSType, &p_itself->componentType, @@ -62,8 +64,7 @@ typedef struct ComponentInstanceObject { ComponentInstance ob_itself; } ComponentInstanceObject; -PyObject *CmpInstObj_New(itself) - ComponentInstance itself; +PyObject *CmpInstObj_New(ComponentInstance itself) { ComponentInstanceObject *it; if (itself == NULL) { @@ -75,9 +76,7 @@ PyObject *CmpInstObj_New(itself) it->ob_itself = itself; return (PyObject *)it; } -CmpInstObj_Convert(v, p_itself) - PyObject *v; - ComponentInstance *p_itself; +CmpInstObj_Convert(PyObject *v, ComponentInstance *p_itself) { if (!CmpInstObj_Check(v)) { @@ -88,16 +87,13 @@ CmpInstObj_Convert(v, p_itself) return 1; } -static void CmpInstObj_dealloc(self) - ComponentInstanceObject *self; +static void CmpInstObj_dealloc(ComponentInstanceObject *self) { /* Cleanup of self->ob_itself goes here */ PyMem_DEL(self); } -static PyObject *CmpInstObj_CloseComponent(_self, _args) - ComponentInstanceObject *_self; - PyObject *_args; +static PyObject *CmpInstObj_CloseComponent(ComponentInstanceObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -110,9 +106,7 @@ static PyObject *CmpInstObj_CloseComponent(_self, _args) return _res; } -static PyObject *CmpInstObj_GetComponentInstanceError(_self, _args) - ComponentInstanceObject *_self; - PyObject *_args; +static PyObject *CmpInstObj_GetComponentInstanceError(ComponentInstanceObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -125,9 +119,7 @@ static PyObject *CmpInstObj_GetComponentInstanceError(_self, _args) return _res; } -static PyObject *CmpInstObj_SetComponentInstanceError(_self, _args) - ComponentInstanceObject *_self; - PyObject *_args; +static PyObject *CmpInstObj_SetComponentInstanceError(ComponentInstanceObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr theError; @@ -141,9 +133,7 @@ static PyObject *CmpInstObj_SetComponentInstanceError(_self, _args) return _res; } -static PyObject *CmpInstObj_GetComponentInstanceStorage(_self, _args) - ComponentInstanceObject *_self; - PyObject *_args; +static PyObject *CmpInstObj_GetComponentInstanceStorage(ComponentInstanceObject *_self, PyObject *_args) { PyObject *_res = NULL; Handle _rv; @@ -155,9 +145,7 @@ static PyObject *CmpInstObj_GetComponentInstanceStorage(_self, _args) return _res; } -static PyObject *CmpInstObj_SetComponentInstanceStorage(_self, _args) - ComponentInstanceObject *_self; - PyObject *_args; +static PyObject *CmpInstObj_SetComponentInstanceStorage(ComponentInstanceObject *_self, PyObject *_args) { PyObject *_res = NULL; Handle theStorage; @@ -173,9 +161,7 @@ static PyObject *CmpInstObj_SetComponentInstanceStorage(_self, _args) #if !TARGET_API_MAC_CARBON -static PyObject *CmpInstObj_GetComponentInstanceA5(_self, _args) - ComponentInstanceObject *_self; - PyObject *_args; +static PyObject *CmpInstObj_GetComponentInstanceA5(ComponentInstanceObject *_self, PyObject *_args) { PyObject *_res = NULL; long _rv; @@ -190,9 +176,7 @@ static PyObject *CmpInstObj_GetComponentInstanceA5(_self, _args) #if !TARGET_API_MAC_CARBON -static PyObject *CmpInstObj_SetComponentInstanceA5(_self, _args) - ComponentInstanceObject *_self; - PyObject *_args; +static PyObject *CmpInstObj_SetComponentInstanceA5(ComponentInstanceObject *_self, PyObject *_args) { PyObject *_res = NULL; long theA5; @@ -207,9 +191,7 @@ static PyObject *CmpInstObj_SetComponentInstanceA5(_self, _args) } #endif -static PyObject *CmpInstObj_ComponentFunctionImplemented(_self, _args) - ComponentInstanceObject *_self; - PyObject *_args; +static PyObject *CmpInstObj_ComponentFunctionImplemented(ComponentInstanceObject *_self, PyObject *_args) { PyObject *_res = NULL; long _rv; @@ -224,9 +206,7 @@ static PyObject *CmpInstObj_ComponentFunctionImplemented(_self, _args) return _res; } -static PyObject *CmpInstObj_GetComponentVersion(_self, _args) - ComponentInstanceObject *_self; - PyObject *_args; +static PyObject *CmpInstObj_GetComponentVersion(ComponentInstanceObject *_self, PyObject *_args) { PyObject *_res = NULL; long _rv; @@ -238,9 +218,7 @@ static PyObject *CmpInstObj_GetComponentVersion(_self, _args) return _res; } -static PyObject *CmpInstObj_ComponentSetTarget(_self, _args) - ComponentInstanceObject *_self; - PyObject *_args; +static PyObject *CmpInstObj_ComponentSetTarget(ComponentInstanceObject *_self, PyObject *_args) { PyObject *_res = NULL; long _rv; @@ -287,9 +265,7 @@ static PyMethodDef CmpInstObj_methods[] = { PyMethodChain CmpInstObj_chain = { CmpInstObj_methods, NULL }; -static PyObject *CmpInstObj_getattr(self, name) - ComponentInstanceObject *self; - char *name; +static PyObject *CmpInstObj_getattr(ComponentInstanceObject *self, char *name) { return Py_FindMethodInChain(&CmpInstObj_chain, (PyObject *)self, name); } @@ -335,8 +311,7 @@ typedef struct ComponentObject { Component ob_itself; } ComponentObject; -PyObject *CmpObj_New(itself) - Component itself; +PyObject *CmpObj_New(Component itself) { ComponentObject *it; if (itself == NULL) { @@ -349,9 +324,7 @@ PyObject *CmpObj_New(itself) it->ob_itself = itself; return (PyObject *)it; } -CmpObj_Convert(v, p_itself) - PyObject *v; - Component *p_itself; +CmpObj_Convert(PyObject *v, Component *p_itself) { if ( v == Py_None ) { *p_itself = 0; @@ -366,16 +339,13 @@ CmpObj_Convert(v, p_itself) return 1; } -static void CmpObj_dealloc(self) - ComponentObject *self; +static void CmpObj_dealloc(ComponentObject *self) { /* Cleanup of self->ob_itself goes here */ PyMem_DEL(self); } -static PyObject *CmpObj_UnregisterComponent(_self, _args) - ComponentObject *_self; - PyObject *_args; +static PyObject *CmpObj_UnregisterComponent(ComponentObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -388,9 +358,7 @@ static PyObject *CmpObj_UnregisterComponent(_self, _args) return _res; } -static PyObject *CmpObj_GetComponentInfo(_self, _args) - ComponentObject *_self; - PyObject *_args; +static PyObject *CmpObj_GetComponentInfo(ComponentObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -414,9 +382,7 @@ static PyObject *CmpObj_GetComponentInfo(_self, _args) return _res; } -static PyObject *CmpObj_OpenComponent(_self, _args) - ComponentObject *_self; - PyObject *_args; +static PyObject *CmpObj_OpenComponent(ComponentObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentInstance _rv; @@ -428,9 +394,7 @@ static PyObject *CmpObj_OpenComponent(_self, _args) return _res; } -static PyObject *CmpObj_GetComponentRefcon(_self, _args) - ComponentObject *_self; - PyObject *_args; +static PyObject *CmpObj_GetComponentRefcon(ComponentObject *_self, PyObject *_args) { PyObject *_res = NULL; long _rv; @@ -442,9 +406,7 @@ static PyObject *CmpObj_GetComponentRefcon(_self, _args) return _res; } -static PyObject *CmpObj_SetComponentRefcon(_self, _args) - ComponentObject *_self; - PyObject *_args; +static PyObject *CmpObj_SetComponentRefcon(ComponentObject *_self, PyObject *_args) { PyObject *_res = NULL; long theRefcon; @@ -458,9 +420,7 @@ static PyObject *CmpObj_SetComponentRefcon(_self, _args) return _res; } -static PyObject *CmpObj_OpenComponentResFile(_self, _args) - ComponentObject *_self; - PyObject *_args; +static PyObject *CmpObj_OpenComponentResFile(ComponentObject *_self, PyObject *_args) { PyObject *_res = NULL; short _rv; @@ -472,9 +432,7 @@ static PyObject *CmpObj_OpenComponentResFile(_self, _args) return _res; } -static PyObject *CmpObj_GetComponentResource(_self, _args) - ComponentObject *_self; - PyObject *_args; +static PyObject *CmpObj_GetComponentResource(ComponentObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -495,9 +453,7 @@ static PyObject *CmpObj_GetComponentResource(_self, _args) return _res; } -static PyObject *CmpObj_GetComponentIndString(_self, _args) - ComponentObject *_self; - PyObject *_args; +static PyObject *CmpObj_GetComponentIndString(ComponentObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -519,9 +475,7 @@ static PyObject *CmpObj_GetComponentIndString(_self, _args) return _res; } -static PyObject *CmpObj_ResolveComponentAlias(_self, _args) - ComponentObject *_self; - PyObject *_args; +static PyObject *CmpObj_ResolveComponentAlias(ComponentObject *_self, PyObject *_args) { PyObject *_res = NULL; Component _rv; @@ -533,9 +487,7 @@ static PyObject *CmpObj_ResolveComponentAlias(_self, _args) return _res; } -static PyObject *CmpObj_CountComponentInstances(_self, _args) - ComponentObject *_self; - PyObject *_args; +static PyObject *CmpObj_CountComponentInstances(ComponentObject *_self, PyObject *_args) { PyObject *_res = NULL; long _rv; @@ -547,9 +499,7 @@ static PyObject *CmpObj_CountComponentInstances(_self, _args) return _res; } -static PyObject *CmpObj_SetDefaultComponent(_self, _args) - ComponentObject *_self; - PyObject *_args; +static PyObject *CmpObj_SetDefaultComponent(ComponentObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -565,9 +515,7 @@ static PyObject *CmpObj_SetDefaultComponent(_self, _args) return _res; } -static PyObject *CmpObj_CaptureComponent(_self, _args) - ComponentObject *_self; - PyObject *_args; +static PyObject *CmpObj_CaptureComponent(ComponentObject *_self, PyObject *_args) { PyObject *_res = NULL; Component _rv; @@ -582,9 +530,7 @@ static PyObject *CmpObj_CaptureComponent(_self, _args) return _res; } -static PyObject *CmpObj_UncaptureComponent(_self, _args) - ComponentObject *_self; - PyObject *_args; +static PyObject *CmpObj_UncaptureComponent(ComponentObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -597,9 +543,7 @@ static PyObject *CmpObj_UncaptureComponent(_self, _args) return _res; } -static PyObject *CmpObj_GetComponentIconSuite(_self, _args) - ComponentObject *_self; - PyObject *_args; +static PyObject *CmpObj_GetComponentIconSuite(ComponentObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -648,9 +592,7 @@ static PyMethodDef CmpObj_methods[] = { PyMethodChain CmpObj_chain = { CmpObj_methods, NULL }; -static PyObject *CmpObj_getattr(self, name) - ComponentObject *self; - char *name; +static PyObject *CmpObj_getattr(ComponentObject *self, char *name) { return Py_FindMethodInChain(&CmpObj_chain, (PyObject *)self, name); } @@ -685,9 +627,7 @@ PyTypeObject Component_Type = { /* ------------------- End object type Component -------------------- */ -static PyObject *Cm_RegisterComponentResource(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Cm_RegisterComponentResource(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Component _rv; @@ -704,9 +644,7 @@ static PyObject *Cm_RegisterComponentResource(_self, _args) return _res; } -static PyObject *Cm_FindNextComponent(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Cm_FindNextComponent(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Component _rv; @@ -723,9 +661,7 @@ static PyObject *Cm_FindNextComponent(_self, _args) return _res; } -static PyObject *Cm_CountComponents(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Cm_CountComponents(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; long _rv; @@ -739,9 +675,7 @@ static PyObject *Cm_CountComponents(_self, _args) return _res; } -static PyObject *Cm_GetComponentListModSeed(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Cm_GetComponentListModSeed(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; long _rv; @@ -753,9 +687,7 @@ static PyObject *Cm_GetComponentListModSeed(_self, _args) return _res; } -static PyObject *Cm_CloseComponentResFile(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Cm_CloseComponentResFile(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -770,9 +702,7 @@ static PyObject *Cm_CloseComponentResFile(_self, _args) return _res; } -static PyObject *Cm_OpenDefaultComponent(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Cm_OpenDefaultComponent(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentInstance _rv; @@ -789,9 +719,7 @@ static PyObject *Cm_OpenDefaultComponent(_self, _args) return _res; } -static PyObject *Cm_RegisterComponentResourceFile(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Cm_RegisterComponentResourceFile(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; long _rv; @@ -829,17 +757,17 @@ static PyMethodDef Cm_methods[] = { -void initCm() +void initCm(void) { PyObject *m; PyObject *d; - PyMac_INIT_TOOLBOX_OBJECT_NEW(CmpObj_New); - PyMac_INIT_TOOLBOX_OBJECT_CONVERT(CmpObj_Convert); - PyMac_INIT_TOOLBOX_OBJECT_NEW(CmpInstObj_New); - PyMac_INIT_TOOLBOX_OBJECT_CONVERT(CmpInstObj_Convert); + PyMac_INIT_TOOLBOX_OBJECT_NEW(Component, CmpObj_New); + PyMac_INIT_TOOLBOX_OBJECT_CONVERT(Component, CmpObj_Convert); + PyMac_INIT_TOOLBOX_OBJECT_NEW(ComponentInstance, CmpInstObj_New); + PyMac_INIT_TOOLBOX_OBJECT_CONVERT(ComponentInstance, CmpInstObj_Convert); m = Py_InitModule("Cm", Cm_methods); diff --git a/Mac/Modules/cm/cmsupport.py b/Mac/Modules/cm/cmsupport.py index 5681c8130a1..cb9112b9581 100644 --- a/Mac/Modules/cm/cmsupport.py +++ b/Mac/Modules/cm/cmsupport.py @@ -21,7 +21,12 @@ from macsupport import * # Create the type objects includestuff = includestuff + """ -#include <%s>""" % MACHEADERFILE + """ +#ifdef WITHOUT_FRAMEWORKS +#include +#else +#include +#endif + #ifdef USE_TOOLBOX_OBJECT_GLUE extern PyObject *_CmpObj_New(Component); extern int _CmpObj_Convert(PyObject *, Component *); @@ -38,8 +43,7 @@ extern int _CmpInstObj_Convert(PyObject *, ComponentInstance *); ** Parse/generate ComponentDescriptor records */ static PyObject * -CmpDesc_New(itself) - ComponentDescription *itself; +CmpDesc_New(ComponentDescription *itself) { return Py_BuildValue("O&O&O&ll", @@ -50,9 +54,7 @@ CmpDesc_New(itself) } static int -CmpDesc_Convert(v, p_itself) - PyObject *v; - ComponentDescription *p_itself; +CmpDesc_Convert(PyObject *v, ComponentDescription *p_itself) { return PyArg_ParseTuple(v, "O&O&O&ll", PyMac_GetOSType, &p_itself->componentType, @@ -64,10 +66,10 @@ CmpDesc_Convert(v, p_itself) """ initstuff = initstuff + """ - PyMac_INIT_TOOLBOX_OBJECT_NEW(CmpObj_New); - PyMac_INIT_TOOLBOX_OBJECT_CONVERT(CmpObj_Convert); - PyMac_INIT_TOOLBOX_OBJECT_NEW(CmpInstObj_New); - PyMac_INIT_TOOLBOX_OBJECT_CONVERT(CmpInstObj_Convert); + PyMac_INIT_TOOLBOX_OBJECT_NEW(Component, CmpObj_New); + PyMac_INIT_TOOLBOX_OBJECT_CONVERT(Component, CmpObj_Convert); + PyMac_INIT_TOOLBOX_OBJECT_NEW(ComponentInstance, CmpInstObj_New); + PyMac_INIT_TOOLBOX_OBJECT_CONVERT(ComponentInstance, CmpInstObj_Convert); """ ComponentDescription = OpaqueType('ComponentDescription', 'CmpDesc') diff --git a/Mac/Modules/ctl/Ctlmodule.c b/Mac/Modules/ctl/Ctlmodule.c index 083929deb43..a7fdfcee3e3 100644 --- a/Mac/Modules/ctl/Ctlmodule.c +++ b/Mac/Modules/ctl/Ctlmodule.c @@ -8,9 +8,11 @@ #include "macglue.h" #include "pymactoolbox.h" +#ifdef WITHOUT_FRAMEWORKS #include -#ifndef kControlCheckBoxUncheckedValue #include +#else +#include #endif #ifdef USE_TOOLBOX_OBJECT_GLUE @@ -36,8 +38,7 @@ staticforward PyObject *CtlObj_WhichControl(ControlHandle); */ #if 0 /* Not needed */ static PyObject * -ControlFontStyle_New(itself) - ControlFontStyleRec *itself; +ControlFontStyle_New(ControlFontStyleRec *itself) { return Py_BuildValue("hhhhhhO&O&", itself->flags, itself->font, @@ -47,9 +48,7 @@ ControlFontStyle_New(itself) #endif static int -ControlFontStyle_Convert(v, itself) - PyObject *v; - ControlFontStyleRec *itself; +ControlFontStyle_Convert(PyObject *v, ControlFontStyleRec *itself) { return PyArg_ParseTuple(v, "hhhhhhO&O&", &itself->flags, &itself->font, &itself->size, &itself->style, &itself->mode, @@ -61,17 +60,14 @@ ControlFontStyle_Convert(v, itself) ** Parse/generate ControlID records */ static PyObject * -PyControlID_New(itself) - ControlID *itself; +PyControlID_New(ControlID *itself) { return Py_BuildValue("O&l", PyMac_BuildOSType, itself->signature, itself->id); } static int -PyControlID_Convert(v, itself) - PyObject *v; - ControlID *itself; +PyControlID_Convert(PyObject *v, ControlID *itself) { return PyArg_ParseTuple(v, "O&l", PyMac_GetOSType, &itself->signature, &itself->id); } @@ -103,8 +99,7 @@ typedef struct ControlObject { PyObject *ob_callbackdict; } ControlObject; -PyObject *CtlObj_New(itself) - ControlHandle itself; +PyObject *CtlObj_New(ControlHandle itself) { ControlObject *it; if (itself == NULL) return PyMac_Error(resNotFound); @@ -115,9 +110,7 @@ PyObject *CtlObj_New(itself) it->ob_callbackdict = NULL; return (PyObject *)it; } -CtlObj_Convert(v, p_itself) - PyObject *v; - ControlHandle *p_itself; +CtlObj_Convert(PyObject *v, ControlHandle *p_itself) { if (!CtlObj_Check(v)) { @@ -128,17 +121,14 @@ CtlObj_Convert(v, p_itself) return 1; } -static void CtlObj_dealloc(self) - ControlObject *self; +static void CtlObj_dealloc(ControlObject *self) { Py_XDECREF(self->ob_callbackdict); if (self->ob_itself)SetControlReference(self->ob_itself, (long)0); /* Make it forget about us */ PyMem_DEL(self); } -static PyObject *CtlObj_HiliteControl(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_HiliteControl(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; ControlPartCode hiliteState; @@ -152,9 +142,7 @@ static PyObject *CtlObj_HiliteControl(_self, _args) return _res; } -static PyObject *CtlObj_ShowControl(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_ShowControl(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -165,9 +153,7 @@ static PyObject *CtlObj_ShowControl(_self, _args) return _res; } -static PyObject *CtlObj_HideControl(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_HideControl(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -178,9 +164,7 @@ static PyObject *CtlObj_HideControl(_self, _args) return _res; } -static PyObject *CtlObj_IsControlActive(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_IsControlActive(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -192,9 +176,7 @@ static PyObject *CtlObj_IsControlActive(_self, _args) return _res; } -static PyObject *CtlObj_IsControlVisible(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_IsControlVisible(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -206,9 +188,7 @@ static PyObject *CtlObj_IsControlVisible(_self, _args) return _res; } -static PyObject *CtlObj_ActivateControl(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_ActivateControl(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -221,9 +201,7 @@ static PyObject *CtlObj_ActivateControl(_self, _args) return _res; } -static PyObject *CtlObj_DeactivateControl(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_DeactivateControl(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -236,9 +214,7 @@ static PyObject *CtlObj_DeactivateControl(_self, _args) return _res; } -static PyObject *CtlObj_SetControlVisibility(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_SetControlVisibility(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -257,9 +233,7 @@ static PyObject *CtlObj_SetControlVisibility(_self, _args) return _res; } -static PyObject *CtlObj_Draw1Control(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_Draw1Control(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -270,9 +244,7 @@ static PyObject *CtlObj_Draw1Control(_self, _args) return _res; } -static PyObject *CtlObj_GetBestControlRect(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_GetBestControlRect(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -290,9 +262,7 @@ static PyObject *CtlObj_GetBestControlRect(_self, _args) return _res; } -static PyObject *CtlObj_SetControlFontStyle(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_SetControlFontStyle(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -308,9 +278,7 @@ static PyObject *CtlObj_SetControlFontStyle(_self, _args) return _res; } -static PyObject *CtlObj_DrawControlInCurrentPort(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_DrawControlInCurrentPort(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -321,9 +289,7 @@ static PyObject *CtlObj_DrawControlInCurrentPort(_self, _args) return _res; } -static PyObject *CtlObj_SetUpControlBackground(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_SetUpControlBackground(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -342,9 +308,7 @@ static PyObject *CtlObj_SetUpControlBackground(_self, _args) return _res; } -static PyObject *CtlObj_SetUpControlTextColor(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_SetUpControlTextColor(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -363,9 +327,7 @@ static PyObject *CtlObj_SetUpControlTextColor(_self, _args) return _res; } -static PyObject *CtlObj_DragControl(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_DragControl(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; Point startPoint; @@ -388,9 +350,7 @@ static PyObject *CtlObj_DragControl(_self, _args) return _res; } -static PyObject *CtlObj_TestControl(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_TestControl(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; ControlPartCode _rv; @@ -407,9 +367,7 @@ static PyObject *CtlObj_TestControl(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *CtlObj_HandleControlContextualMenuClick(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_HandleControlContextualMenuClick(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -430,9 +388,7 @@ static PyObject *CtlObj_HandleControlContextualMenuClick(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *CtlObj_GetControlClickActivation(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_GetControlClickActivation(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -454,9 +410,7 @@ static PyObject *CtlObj_GetControlClickActivation(_self, _args) } #endif -static PyObject *CtlObj_HandleControlKey(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_HandleControlKey(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; SInt16 _rv; @@ -479,9 +433,7 @@ static PyObject *CtlObj_HandleControlKey(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *CtlObj_HandleControlSetCursor(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_HandleControlSetCursor(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -503,9 +455,7 @@ static PyObject *CtlObj_HandleControlSetCursor(_self, _args) } #endif -static PyObject *CtlObj_MoveControl(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_MoveControl(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; SInt16 h; @@ -522,9 +472,7 @@ static PyObject *CtlObj_MoveControl(_self, _args) return _res; } -static PyObject *CtlObj_SizeControl(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_SizeControl(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; SInt16 w; @@ -541,9 +489,7 @@ static PyObject *CtlObj_SizeControl(_self, _args) return _res; } -static PyObject *CtlObj_SetControlTitle(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_SetControlTitle(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; Str255 title; @@ -557,9 +503,7 @@ static PyObject *CtlObj_SetControlTitle(_self, _args) return _res; } -static PyObject *CtlObj_GetControlTitle(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_GetControlTitle(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; Str255 title; @@ -572,9 +516,7 @@ static PyObject *CtlObj_GetControlTitle(_self, _args) return _res; } -static PyObject *CtlObj_GetControlValue(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_GetControlValue(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; SInt16 _rv; @@ -586,9 +528,7 @@ static PyObject *CtlObj_GetControlValue(_self, _args) return _res; } -static PyObject *CtlObj_SetControlValue(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_SetControlValue(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; SInt16 newValue; @@ -602,9 +542,7 @@ static PyObject *CtlObj_SetControlValue(_self, _args) return _res; } -static PyObject *CtlObj_GetControlMinimum(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_GetControlMinimum(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; SInt16 _rv; @@ -616,9 +554,7 @@ static PyObject *CtlObj_GetControlMinimum(_self, _args) return _res; } -static PyObject *CtlObj_SetControlMinimum(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_SetControlMinimum(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; SInt16 newMinimum; @@ -632,9 +568,7 @@ static PyObject *CtlObj_SetControlMinimum(_self, _args) return _res; } -static PyObject *CtlObj_GetControlMaximum(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_GetControlMaximum(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; SInt16 _rv; @@ -646,9 +580,7 @@ static PyObject *CtlObj_GetControlMaximum(_self, _args) return _res; } -static PyObject *CtlObj_SetControlMaximum(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_SetControlMaximum(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; SInt16 newMaximum; @@ -662,9 +594,7 @@ static PyObject *CtlObj_SetControlMaximum(_self, _args) return _res; } -static PyObject *CtlObj_GetControlViewSize(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_GetControlViewSize(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; SInt32 _rv; @@ -676,9 +606,7 @@ static PyObject *CtlObj_GetControlViewSize(_self, _args) return _res; } -static PyObject *CtlObj_SetControlViewSize(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_SetControlViewSize(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; SInt32 newViewSize; @@ -692,9 +620,7 @@ static PyObject *CtlObj_SetControlViewSize(_self, _args) return _res; } -static PyObject *CtlObj_GetControl32BitValue(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_GetControl32BitValue(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; SInt32 _rv; @@ -706,9 +632,7 @@ static PyObject *CtlObj_GetControl32BitValue(_self, _args) return _res; } -static PyObject *CtlObj_SetControl32BitValue(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_SetControl32BitValue(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; SInt32 newValue; @@ -722,9 +646,7 @@ static PyObject *CtlObj_SetControl32BitValue(_self, _args) return _res; } -static PyObject *CtlObj_GetControl32BitMaximum(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_GetControl32BitMaximum(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; SInt32 _rv; @@ -736,9 +658,7 @@ static PyObject *CtlObj_GetControl32BitMaximum(_self, _args) return _res; } -static PyObject *CtlObj_SetControl32BitMaximum(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_SetControl32BitMaximum(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; SInt32 newMaximum; @@ -752,9 +672,7 @@ static PyObject *CtlObj_SetControl32BitMaximum(_self, _args) return _res; } -static PyObject *CtlObj_GetControl32BitMinimum(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_GetControl32BitMinimum(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; SInt32 _rv; @@ -766,9 +684,7 @@ static PyObject *CtlObj_GetControl32BitMinimum(_self, _args) return _res; } -static PyObject *CtlObj_SetControl32BitMinimum(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_SetControl32BitMinimum(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; SInt32 newMinimum; @@ -782,9 +698,7 @@ static PyObject *CtlObj_SetControl32BitMinimum(_self, _args) return _res; } -static PyObject *CtlObj_IsValidControlHandle(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_IsValidControlHandle(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -798,9 +712,7 @@ static PyObject *CtlObj_IsValidControlHandle(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *CtlObj_SetControlID(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_SetControlID(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -819,9 +731,7 @@ static PyObject *CtlObj_SetControlID(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *CtlObj_GetControlID(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_GetControlID(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -837,9 +747,7 @@ static PyObject *CtlObj_GetControlID(_self, _args) } #endif -static PyObject *CtlObj_RemoveControlProperty(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_RemoveControlProperty(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -860,9 +768,7 @@ static PyObject *CtlObj_RemoveControlProperty(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *CtlObj_GetControlPropertyAttributes(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_GetControlPropertyAttributes(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -886,9 +792,7 @@ static PyObject *CtlObj_GetControlPropertyAttributes(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *CtlObj_ChangeControlPropertyAttributes(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_ChangeControlPropertyAttributes(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -914,9 +818,7 @@ static PyObject *CtlObj_ChangeControlPropertyAttributes(_self, _args) } #endif -static PyObject *CtlObj_GetControlRegion(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_GetControlRegion(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -935,9 +837,7 @@ static PyObject *CtlObj_GetControlRegion(_self, _args) return _res; } -static PyObject *CtlObj_GetControlVariant(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_GetControlVariant(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; ControlVariant _rv; @@ -949,9 +849,7 @@ static PyObject *CtlObj_GetControlVariant(_self, _args) return _res; } -static PyObject *CtlObj_SetControlReference(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_SetControlReference(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; SInt32 data; @@ -965,9 +863,7 @@ static PyObject *CtlObj_SetControlReference(_self, _args) return _res; } -static PyObject *CtlObj_GetControlReference(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_GetControlReference(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; SInt32 _rv; @@ -981,9 +877,7 @@ static PyObject *CtlObj_GetControlReference(_self, _args) #if !TARGET_API_MAC_CARBON -static PyObject *CtlObj_GetAuxiliaryControlRecord(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_GetAuxiliaryControlRecord(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -1001,9 +895,7 @@ static PyObject *CtlObj_GetAuxiliaryControlRecord(_self, _args) #if !TARGET_API_MAC_CARBON -static PyObject *CtlObj_SetControlColor(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_SetControlColor(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; CCTabHandle newColorTable; @@ -1018,9 +910,7 @@ static PyObject *CtlObj_SetControlColor(_self, _args) } #endif -static PyObject *CtlObj_SendControlMessage(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_SendControlMessage(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; SInt32 _rv; @@ -1038,9 +928,7 @@ static PyObject *CtlObj_SendControlMessage(_self, _args) return _res; } -static PyObject *CtlObj_EmbedControl(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_EmbedControl(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1056,9 +944,7 @@ static PyObject *CtlObj_EmbedControl(_self, _args) return _res; } -static PyObject *CtlObj_AutoEmbedControl(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_AutoEmbedControl(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1074,9 +960,7 @@ static PyObject *CtlObj_AutoEmbedControl(_self, _args) return _res; } -static PyObject *CtlObj_GetSuperControl(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_GetSuperControl(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1091,9 +975,7 @@ static PyObject *CtlObj_GetSuperControl(_self, _args) return _res; } -static PyObject *CtlObj_CountSubControls(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_CountSubControls(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1108,9 +990,7 @@ static PyObject *CtlObj_CountSubControls(_self, _args) return _res; } -static PyObject *CtlObj_GetIndexedSubControl(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_GetIndexedSubControl(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1128,9 +1008,7 @@ static PyObject *CtlObj_GetIndexedSubControl(_self, _args) return _res; } -static PyObject *CtlObj_SetControlSupervisor(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_SetControlSupervisor(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1146,9 +1024,7 @@ static PyObject *CtlObj_SetControlSupervisor(_self, _args) return _res; } -static PyObject *CtlObj_GetControlFeatures(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_GetControlFeatures(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1163,9 +1039,7 @@ static PyObject *CtlObj_GetControlFeatures(_self, _args) return _res; } -static PyObject *CtlObj_GetControlDataSize(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_GetControlDataSize(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1188,9 +1062,7 @@ static PyObject *CtlObj_GetControlDataSize(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *CtlObj_HandleControlDragTracking(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_HandleControlDragTracking(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -1214,9 +1086,7 @@ static PyObject *CtlObj_HandleControlDragTracking(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *CtlObj_HandleControlDragReceive(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_HandleControlDragReceive(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -1235,9 +1105,7 @@ static PyObject *CtlObj_HandleControlDragReceive(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *CtlObj_SetControlDragTrackingEnabled(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_SetControlDragTrackingEnabled(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -1256,9 +1124,7 @@ static PyObject *CtlObj_SetControlDragTrackingEnabled(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *CtlObj_IsControlDragTrackingEnabled(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_IsControlDragTrackingEnabled(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -1276,9 +1142,7 @@ static PyObject *CtlObj_IsControlDragTrackingEnabled(_self, _args) #if ACCESSOR_CALLS_ARE_FUNCTIONS -static PyObject *CtlObj_GetControlBounds(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_GetControlBounds(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; Rect bounds; @@ -1294,9 +1158,7 @@ static PyObject *CtlObj_GetControlBounds(_self, _args) #if ACCESSOR_CALLS_ARE_FUNCTIONS -static PyObject *CtlObj_IsControlHilited(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_IsControlHilited(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -1311,9 +1173,7 @@ static PyObject *CtlObj_IsControlHilited(_self, _args) #if ACCESSOR_CALLS_ARE_FUNCTIONS -static PyObject *CtlObj_GetControlHilite(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_GetControlHilite(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; UInt16 _rv; @@ -1328,9 +1188,7 @@ static PyObject *CtlObj_GetControlHilite(_self, _args) #if ACCESSOR_CALLS_ARE_FUNCTIONS -static PyObject *CtlObj_GetControlOwner(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_GetControlOwner(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; WindowPtr _rv; @@ -1345,9 +1203,7 @@ static PyObject *CtlObj_GetControlOwner(_self, _args) #if ACCESSOR_CALLS_ARE_FUNCTIONS -static PyObject *CtlObj_GetControlDataHandle(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_GetControlDataHandle(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; Handle _rv; @@ -1362,9 +1218,7 @@ static PyObject *CtlObj_GetControlDataHandle(_self, _args) #if ACCESSOR_CALLS_ARE_FUNCTIONS -static PyObject *CtlObj_GetControlPopupMenuHandle(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_GetControlPopupMenuHandle(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; MenuHandle _rv; @@ -1379,9 +1233,7 @@ static PyObject *CtlObj_GetControlPopupMenuHandle(_self, _args) #if ACCESSOR_CALLS_ARE_FUNCTIONS -static PyObject *CtlObj_GetControlPopupMenuID(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_GetControlPopupMenuID(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; short _rv; @@ -1396,9 +1248,7 @@ static PyObject *CtlObj_GetControlPopupMenuID(_self, _args) #if ACCESSOR_CALLS_ARE_FUNCTIONS -static PyObject *CtlObj_SetControlDataHandle(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_SetControlDataHandle(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; Handle dataHandle; @@ -1415,9 +1265,7 @@ static PyObject *CtlObj_SetControlDataHandle(_self, _args) #if ACCESSOR_CALLS_ARE_FUNCTIONS -static PyObject *CtlObj_SetControlBounds(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_SetControlBounds(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; Rect bounds; @@ -1434,9 +1282,7 @@ static PyObject *CtlObj_SetControlBounds(_self, _args) #if ACCESSOR_CALLS_ARE_FUNCTIONS -static PyObject *CtlObj_SetControlPopupMenuHandle(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_SetControlPopupMenuHandle(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; MenuHandle popupMenu; @@ -1453,9 +1299,7 @@ static PyObject *CtlObj_SetControlPopupMenuHandle(_self, _args) #if ACCESSOR_CALLS_ARE_FUNCTIONS -static PyObject *CtlObj_SetControlPopupMenuID(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_SetControlPopupMenuID(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; short menuID; @@ -1470,9 +1314,7 @@ static PyObject *CtlObj_SetControlPopupMenuID(_self, _args) } #endif -static PyObject *CtlObj_GetBevelButtonMenuValue(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_GetBevelButtonMenuValue(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1487,9 +1329,7 @@ static PyObject *CtlObj_GetBevelButtonMenuValue(_self, _args) return _res; } -static PyObject *CtlObj_SetBevelButtonMenuValue(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_SetBevelButtonMenuValue(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1505,9 +1345,7 @@ static PyObject *CtlObj_SetBevelButtonMenuValue(_self, _args) return _res; } -static PyObject *CtlObj_GetBevelButtonMenuHandle(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_GetBevelButtonMenuHandle(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1522,9 +1360,7 @@ static PyObject *CtlObj_GetBevelButtonMenuHandle(_self, _args) return _res; } -static PyObject *CtlObj_SetBevelButtonTransform(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_SetBevelButtonTransform(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1540,9 +1376,7 @@ static PyObject *CtlObj_SetBevelButtonTransform(_self, _args) return _res; } -static PyObject *CtlObj_SetDisclosureTriangleLastValue(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_SetDisclosureTriangleLastValue(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1558,9 +1392,7 @@ static PyObject *CtlObj_SetDisclosureTriangleLastValue(_self, _args) return _res; } -static PyObject *CtlObj_GetTabContentRect(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_GetTabContentRect(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1575,9 +1407,7 @@ static PyObject *CtlObj_GetTabContentRect(_self, _args) return _res; } -static PyObject *CtlObj_SetTabEnabled(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_SetTabEnabled(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1596,9 +1426,7 @@ static PyObject *CtlObj_SetTabEnabled(_self, _args) return _res; } -static PyObject *CtlObj_SetImageWellTransform(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_SetImageWellTransform(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1614,9 +1442,7 @@ static PyObject *CtlObj_SetImageWellTransform(_self, _args) return _res; } -static PyObject *CtlObj_as_Resource(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_as_Resource(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; Handle _rv; @@ -1628,9 +1454,7 @@ static PyObject *CtlObj_as_Resource(_self, _args) return _res; } -static PyObject *CtlObj_GetControlRect(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_GetControlRect(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; Rect rect; @@ -1643,9 +1467,7 @@ static PyObject *CtlObj_GetControlRect(_self, _args) return _res; } -static PyObject *CtlObj_DisposeControl(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_DisposeControl(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; @@ -1662,9 +1484,7 @@ static PyObject *CtlObj_DisposeControl(_self, _args) } -static PyObject *CtlObj_TrackControl(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_TrackControl(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; @@ -1694,9 +1514,7 @@ static PyObject *CtlObj_TrackControl(_self, _args) } -static PyObject *CtlObj_HandleControlClick(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_HandleControlClick(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; @@ -1730,9 +1548,7 @@ static PyObject *CtlObj_HandleControlClick(_self, _args) } -static PyObject *CtlObj_SetControlData(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_SetControlData(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; @@ -1761,9 +1577,7 @@ static PyObject *CtlObj_SetControlData(_self, _args) } -static PyObject *CtlObj_GetControlData(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_GetControlData(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; @@ -1807,9 +1621,7 @@ static PyObject *CtlObj_GetControlData(_self, _args) } -static PyObject *CtlObj_SetControlData_Handle(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_SetControlData_Handle(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; @@ -1837,9 +1649,7 @@ static PyObject *CtlObj_SetControlData_Handle(_self, _args) } -static PyObject *CtlObj_GetControlData_Handle(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_GetControlData_Handle(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; @@ -1880,9 +1690,7 @@ static PyObject *CtlObj_GetControlData_Handle(_self, _args) } -static PyObject *CtlObj_SetControlData_Callback(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_SetControlData_Callback(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; @@ -1915,9 +1723,7 @@ static PyObject *CtlObj_SetControlData_Callback(_self, _args) #if !TARGET_API_MAC_CARBON -static PyObject *CtlObj_GetPopupData(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_GetPopupData(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; @@ -1938,9 +1744,7 @@ static PyObject *CtlObj_GetPopupData(_self, _args) #if !TARGET_API_MAC_CARBON -static PyObject *CtlObj_SetPopupData(_self, _args) - ControlObject *_self; - PyObject *_args; +static PyObject *CtlObj_SetPopupData(ControlObject *_self, PyObject *_args) { PyObject *_res = NULL; @@ -2235,17 +2039,14 @@ static PyMethodDef CtlObj_methods[] = { PyMethodChain CtlObj_chain = { CtlObj_methods, NULL }; -static PyObject *CtlObj_getattr(self, name) - ControlObject *self; - char *name; +static PyObject *CtlObj_getattr(ControlObject *self, char *name) { return Py_FindMethodInChain(&CtlObj_chain, (PyObject *)self, name); } #define CtlObj_setattr NULL -static int CtlObj_compare(self, other) - ControlObject *self, *other; +static int CtlObj_compare(ControlObject *self, ControlObject *other) { unsigned long v, w; @@ -2266,8 +2067,7 @@ static int CtlObj_compare(self, other) #define CtlObj_repr NULL -static long CtlObj_hash(self) - ControlObject *self; +static long CtlObj_hash(ControlObject *self) { return (long)self->ob_itself; } @@ -2294,9 +2094,7 @@ PyTypeObject Control_Type = { /* -------------------- End object type Control --------------------- */ -static PyObject *Ctl_NewControl(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Ctl_NewControl(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ControlHandle _rv; @@ -2334,9 +2132,7 @@ static PyObject *Ctl_NewControl(_self, _args) return _res; } -static PyObject *Ctl_GetNewControl(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Ctl_GetNewControl(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ControlHandle _rv; @@ -2353,9 +2149,7 @@ static PyObject *Ctl_GetNewControl(_self, _args) return _res; } -static PyObject *Ctl_DrawControls(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Ctl_DrawControls(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; WindowPtr theWindow; @@ -2368,9 +2162,7 @@ static PyObject *Ctl_DrawControls(_self, _args) return _res; } -static PyObject *Ctl_UpdateControls(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Ctl_UpdateControls(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; WindowPtr theWindow; @@ -2386,9 +2178,7 @@ static PyObject *Ctl_UpdateControls(_self, _args) return _res; } -static PyObject *Ctl_FindControl(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Ctl_FindControl(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ControlPartCode _rv; @@ -2408,9 +2198,7 @@ static PyObject *Ctl_FindControl(_self, _args) return _res; } -static PyObject *Ctl_FindControlUnderMouse(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Ctl_FindControlUnderMouse(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ControlHandle _rv; @@ -2430,9 +2218,7 @@ static PyObject *Ctl_FindControlUnderMouse(_self, _args) return _res; } -static PyObject *Ctl_IdleControls(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Ctl_IdleControls(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; WindowPtr inWindow; @@ -2447,9 +2233,7 @@ static PyObject *Ctl_IdleControls(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *Ctl_GetControlByID(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Ctl_GetControlByID(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -2470,9 +2254,7 @@ static PyObject *Ctl_GetControlByID(_self, _args) } #endif -static PyObject *Ctl_DumpControlHierarchy(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Ctl_DumpControlHierarchy(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -2490,9 +2272,7 @@ static PyObject *Ctl_DumpControlHierarchy(_self, _args) return _res; } -static PyObject *Ctl_CreateRootControl(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Ctl_CreateRootControl(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -2509,9 +2289,7 @@ static PyObject *Ctl_CreateRootControl(_self, _args) return _res; } -static PyObject *Ctl_GetRootControl(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Ctl_GetRootControl(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -2528,9 +2306,7 @@ static PyObject *Ctl_GetRootControl(_self, _args) return _res; } -static PyObject *Ctl_GetKeyboardFocus(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Ctl_GetKeyboardFocus(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -2547,9 +2323,7 @@ static PyObject *Ctl_GetKeyboardFocus(_self, _args) return _res; } -static PyObject *Ctl_SetKeyboardFocus(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Ctl_SetKeyboardFocus(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -2570,9 +2344,7 @@ static PyObject *Ctl_SetKeyboardFocus(_self, _args) return _res; } -static PyObject *Ctl_AdvanceKeyboardFocus(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Ctl_AdvanceKeyboardFocus(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -2587,9 +2359,7 @@ static PyObject *Ctl_AdvanceKeyboardFocus(_self, _args) return _res; } -static PyObject *Ctl_ReverseKeyboardFocus(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Ctl_ReverseKeyboardFocus(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -2604,9 +2374,7 @@ static PyObject *Ctl_ReverseKeyboardFocus(_self, _args) return _res; } -static PyObject *Ctl_ClearKeyboardFocus(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Ctl_ClearKeyboardFocus(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -2623,9 +2391,7 @@ static PyObject *Ctl_ClearKeyboardFocus(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *Ctl_SetAutomaticControlDragTrackingEnabledForWindow(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Ctl_SetAutomaticControlDragTrackingEnabledForWindow(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -2646,9 +2412,7 @@ static PyObject *Ctl_SetAutomaticControlDragTrackingEnabledForWindow(_self, _arg #if TARGET_API_MAC_CARBON -static PyObject *Ctl_IsAutomaticControlDragTrackingEnabledForWindow(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Ctl_IsAutomaticControlDragTrackingEnabledForWindow(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -2666,9 +2430,7 @@ static PyObject *Ctl_IsAutomaticControlDragTrackingEnabledForWindow(_self, _args } #endif -static PyObject *Ctl_as_Control(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Ctl_as_Control(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ControlHandle _rv; @@ -2736,8 +2498,7 @@ static PyMethodDef Ctl_methods[] = { static PyObject * -CtlObj_NewUnmanaged(itself) - ControlHandle itself; +CtlObj_NewUnmanaged(ControlHandle itself) { ControlObject *it; if (itself == NULL) return PyMac_Error(resNotFound); @@ -2769,8 +2530,7 @@ CtlObj_WhichControl(ControlHandle c) } static int -settrackfunc(obj) - PyObject *obj; +settrackfunc(PyObject *obj) { if (tracker) { PyErr_SetString(Ctl_Error, "Tracker function in use"); @@ -2781,7 +2541,7 @@ settrackfunc(obj) } static void -clrtrackfunc() +clrtrackfunc(void) { Py_XDECREF(tracker); tracker = 0; @@ -2804,11 +2564,7 @@ mytracker(ControlHandle ctl, short part) } static int -setcallback(myself, which, callback, uppp) - PyObject *myself; - OSType which; - PyObject *callback; - UniversalProcPtr *uppp; +setcallback(PyObject *myself, OSType which, PyObject *callback, UniversalProcPtr *uppp) { ControlObject *self = (ControlObject *)myself; char keybuf[9]; @@ -2838,10 +2594,7 @@ setcallback(myself, which, callback, uppp) } static PyObject * -callcallback(self, which, arglist) - ControlObject *self; - OSType which; - PyObject *arglist; +callcallback(ControlObject *self, OSType which, PyObject *arglist) { char keybuf[9]; PyObject *func, *rv; @@ -2921,20 +2674,20 @@ mytrackingproc(ControlHandle control, Point startPt, ControlActionUPP actionProc } -void initCtl() +void initCtl(void) { PyObject *m; PyObject *d; - mytracker_upp = NewControlActionProc(mytracker); - mydrawproc_upp = NewControlUserPaneDrawProc(mydrawproc); - myidleproc_upp = NewControlUserPaneIdleProc(myidleproc); - myhittestproc_upp = NewControlUserPaneHitTestProc(myhittestproc); - mytrackingproc_upp = NewControlUserPaneTrackingProc(mytrackingproc); - PyMac_INIT_TOOLBOX_OBJECT_NEW(CtlObj_New); - PyMac_INIT_TOOLBOX_OBJECT_CONVERT(CtlObj_Convert); + mytracker_upp = NewControlActionUPP(mytracker); + mydrawproc_upp = NewControlUserPaneDrawUPP(mydrawproc); + myidleproc_upp = NewControlUserPaneIdleUPP(myidleproc); + myhittestproc_upp = NewControlUserPaneHitTestUPP(myhittestproc); + mytrackingproc_upp = NewControlUserPaneTrackingUPP(mytrackingproc); + PyMac_INIT_TOOLBOX_OBJECT_NEW(ControlHandle, CtlObj_New); + PyMac_INIT_TOOLBOX_OBJECT_CONVERT(ControlHandle, CtlObj_Convert); m = Py_InitModule("Ctl", Ctl_methods); diff --git a/Mac/Modules/ctl/ctlsupport.py b/Mac/Modules/ctl/ctlsupport.py index da28d041d32..651326be32c 100644 --- a/Mac/Modules/ctl/ctlsupport.py +++ b/Mac/Modules/ctl/ctlsupport.py @@ -49,9 +49,11 @@ DragTrackingMessage = Type("DragTrackingMessage", "h") DragReference = OpaqueByValueType("DragReference", "DragObj") includestuff = includestuff + """ -#include <%s>""" % MACHEADERFILE + """ -#ifndef kControlCheckBoxUncheckedValue +#ifdef WITHOUT_FRAMEWORKS +#include #include +#else +#include #endif #ifdef USE_TOOLBOX_OBJECT_GLUE @@ -77,8 +79,7 @@ staticforward PyObject *CtlObj_WhichControl(ControlHandle); */ #if 0 /* Not needed */ static PyObject * -ControlFontStyle_New(itself) - ControlFontStyleRec *itself; +ControlFontStyle_New(ControlFontStyleRec *itself) { return Py_BuildValue("hhhhhhO&O&", itself->flags, itself->font, @@ -88,9 +89,7 @@ ControlFontStyle_New(itself) #endif static int -ControlFontStyle_Convert(v, itself) - PyObject *v; - ControlFontStyleRec *itself; +ControlFontStyle_Convert(PyObject *v, ControlFontStyleRec *itself) { return PyArg_ParseTuple(v, "hhhhhhO&O&", &itself->flags, &itself->font, &itself->size, &itself->style, &itself->mode, @@ -102,17 +101,14 @@ ControlFontStyle_Convert(v, itself) ** Parse/generate ControlID records */ static PyObject * -PyControlID_New(itself) - ControlID *itself; +PyControlID_New(ControlID *itself) { return Py_BuildValue("O&l", PyMac_BuildOSType, itself->signature, itself->id); } static int -PyControlID_Convert(v, itself) - PyObject *v; - ControlID *itself; +PyControlID_Convert(PyObject *v, ControlID *itself) { return PyArg_ParseTuple(v, "O&l", PyMac_GetOSType, &itself->signature, &itself->id); } @@ -133,8 +129,7 @@ staticforward int setcallback(PyObject *, OSType, PyObject *, UniversalProcPtr * finalstuff = finalstuff + """ static PyObject * -CtlObj_NewUnmanaged(itself) - ControlHandle itself; +CtlObj_NewUnmanaged(ControlHandle itself) { ControlObject *it; if (itself == NULL) return PyMac_Error(resNotFound); @@ -166,8 +161,7 @@ CtlObj_WhichControl(ControlHandle c) } static int -settrackfunc(obj) - PyObject *obj; +settrackfunc(PyObject *obj) { if (tracker) { PyErr_SetString(Ctl_Error, "Tracker function in use"); @@ -178,7 +172,7 @@ settrackfunc(obj) } static void -clrtrackfunc() +clrtrackfunc(void) { Py_XDECREF(tracker); tracker = 0; @@ -201,11 +195,7 @@ mytracker(ControlHandle ctl, short part) } static int -setcallback(myself, which, callback, uppp) - PyObject *myself; - OSType which; - PyObject *callback; - UniversalProcPtr *uppp; +setcallback(PyObject *myself, OSType which, PyObject *callback, UniversalProcPtr *uppp) { ControlObject *self = (ControlObject *)myself; char keybuf[9]; @@ -235,10 +225,7 @@ setcallback(myself, which, callback, uppp) } static PyObject * -callcallback(self, which, arglist) - ControlObject *self; - OSType which; - PyObject *arglist; +callcallback(ControlObject *self, OSType which, PyObject *arglist) { char keybuf[9]; PyObject *func, *rv; @@ -319,13 +306,13 @@ mytrackingproc(ControlHandle control, Point startPt, ControlActionUPP actionProc """ initstuff = initstuff + """ -mytracker_upp = NewControlActionProc(mytracker); -mydrawproc_upp = NewControlUserPaneDrawProc(mydrawproc); -myidleproc_upp = NewControlUserPaneIdleProc(myidleproc); -myhittestproc_upp = NewControlUserPaneHitTestProc(myhittestproc); -mytrackingproc_upp = NewControlUserPaneTrackingProc(mytrackingproc); -PyMac_INIT_TOOLBOX_OBJECT_NEW(CtlObj_New); -PyMac_INIT_TOOLBOX_OBJECT_CONVERT(CtlObj_Convert); +mytracker_upp = NewControlActionUPP(mytracker); +mydrawproc_upp = NewControlUserPaneDrawUPP(mydrawproc); +myidleproc_upp = NewControlUserPaneIdleUPP(myidleproc); +myhittestproc_upp = NewControlUserPaneHitTestUPP(myhittestproc); +mytrackingproc_upp = NewControlUserPaneTrackingUPP(mytrackingproc); +PyMac_INIT_TOOLBOX_OBJECT_NEW(ControlHandle, CtlObj_New); +PyMac_INIT_TOOLBOX_OBJECT_CONVERT(ControlHandle, CtlObj_Convert); """ class MyObjectDefinition(ObjectIdentityMixin, GlobalObjectDefinition): diff --git a/Mac/Modules/dlg/Dlgmodule.c b/Mac/Modules/dlg/Dlgmodule.c index be68b75c107..3c3c855a087 100644 --- a/Mac/Modules/dlg/Dlgmodule.c +++ b/Mac/Modules/dlg/Dlgmodule.c @@ -8,7 +8,12 @@ #include "macglue.h" #include "pymactoolbox.h" +#ifdef WITHOUT_FRAMEWORKS #include +#else +#include +#endif + #ifdef USE_TOOLBOX_OBJECT_GLUE extern PyObject *_DlgObj_New(DialogRef); extern PyObject *_DlgObj_WhichDialog(DialogRef); @@ -135,8 +140,7 @@ typedef struct DialogObject { DialogPtr ob_itself; } DialogObject; -PyObject *DlgObj_New(itself) - DialogPtr itself; +PyObject *DlgObj_New(DialogPtr itself) { DialogObject *it; if (itself == NULL) return Py_None; @@ -146,9 +150,7 @@ PyObject *DlgObj_New(itself) SetWRefCon(GetDialogWindow(itself), (long)it); return (PyObject *)it; } -DlgObj_Convert(v, p_itself) - PyObject *v; - DialogPtr *p_itself; +DlgObj_Convert(PyObject *v, DialogPtr *p_itself) { if (v == Py_None) { *p_itself = NULL; return 1; } if (PyInt_Check(v)) { *p_itself = (DialogPtr)PyInt_AsLong(v); @@ -162,16 +164,13 @@ DlgObj_Convert(v, p_itself) return 1; } -static void DlgObj_dealloc(self) - DialogObject *self; +static void DlgObj_dealloc(DialogObject *self) { DisposeDialog(self->ob_itself); PyMem_DEL(self); } -static PyObject *DlgObj_DrawDialog(_self, _args) - DialogObject *_self; - PyObject *_args; +static PyObject *DlgObj_DrawDialog(DialogObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -182,9 +181,7 @@ static PyObject *DlgObj_DrawDialog(_self, _args) return _res; } -static PyObject *DlgObj_UpdateDialog(_self, _args) - DialogObject *_self; - PyObject *_args; +static PyObject *DlgObj_UpdateDialog(DialogObject *_self, PyObject *_args) { PyObject *_res = NULL; RgnHandle updateRgn; @@ -198,9 +195,7 @@ static PyObject *DlgObj_UpdateDialog(_self, _args) return _res; } -static PyObject *DlgObj_HideDialogItem(_self, _args) - DialogObject *_self; - PyObject *_args; +static PyObject *DlgObj_HideDialogItem(DialogObject *_self, PyObject *_args) { PyObject *_res = NULL; DialogItemIndex itemNo; @@ -214,9 +209,7 @@ static PyObject *DlgObj_HideDialogItem(_self, _args) return _res; } -static PyObject *DlgObj_ShowDialogItem(_self, _args) - DialogObject *_self; - PyObject *_args; +static PyObject *DlgObj_ShowDialogItem(DialogObject *_self, PyObject *_args) { PyObject *_res = NULL; DialogItemIndex itemNo; @@ -230,9 +223,7 @@ static PyObject *DlgObj_ShowDialogItem(_self, _args) return _res; } -static PyObject *DlgObj_FindDialogItem(_self, _args) - DialogObject *_self; - PyObject *_args; +static PyObject *DlgObj_FindDialogItem(DialogObject *_self, PyObject *_args) { PyObject *_res = NULL; DialogItemIndexZeroBased _rv; @@ -247,9 +238,7 @@ static PyObject *DlgObj_FindDialogItem(_self, _args) return _res; } -static PyObject *DlgObj_DialogCut(_self, _args) - DialogObject *_self; - PyObject *_args; +static PyObject *DlgObj_DialogCut(DialogObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -260,9 +249,7 @@ static PyObject *DlgObj_DialogCut(_self, _args) return _res; } -static PyObject *DlgObj_DialogPaste(_self, _args) - DialogObject *_self; - PyObject *_args; +static PyObject *DlgObj_DialogPaste(DialogObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -273,9 +260,7 @@ static PyObject *DlgObj_DialogPaste(_self, _args) return _res; } -static PyObject *DlgObj_DialogCopy(_self, _args) - DialogObject *_self; - PyObject *_args; +static PyObject *DlgObj_DialogCopy(DialogObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -286,9 +271,7 @@ static PyObject *DlgObj_DialogCopy(_self, _args) return _res; } -static PyObject *DlgObj_DialogDelete(_self, _args) - DialogObject *_self; - PyObject *_args; +static PyObject *DlgObj_DialogDelete(DialogObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -299,9 +282,7 @@ static PyObject *DlgObj_DialogDelete(_self, _args) return _res; } -static PyObject *DlgObj_GetDialogItem(_self, _args) - DialogObject *_self; - PyObject *_args; +static PyObject *DlgObj_GetDialogItem(DialogObject *_self, PyObject *_args) { PyObject *_res = NULL; DialogItemIndex itemNo; @@ -323,9 +304,7 @@ static PyObject *DlgObj_GetDialogItem(_self, _args) return _res; } -static PyObject *DlgObj_SetDialogItem(_self, _args) - DialogObject *_self; - PyObject *_args; +static PyObject *DlgObj_SetDialogItem(DialogObject *_self, PyObject *_args) { PyObject *_res = NULL; DialogItemIndex itemNo; @@ -348,9 +327,7 @@ static PyObject *DlgObj_SetDialogItem(_self, _args) return _res; } -static PyObject *DlgObj_SelectDialogItemText(_self, _args) - DialogObject *_self; - PyObject *_args; +static PyObject *DlgObj_SelectDialogItemText(DialogObject *_self, PyObject *_args) { PyObject *_res = NULL; DialogItemIndex itemNo; @@ -370,9 +347,7 @@ static PyObject *DlgObj_SelectDialogItemText(_self, _args) return _res; } -static PyObject *DlgObj_AppendDITL(_self, _args) - DialogObject *_self; - PyObject *_args; +static PyObject *DlgObj_AppendDITL(DialogObject *_self, PyObject *_args) { PyObject *_res = NULL; Handle theHandle; @@ -389,9 +364,7 @@ static PyObject *DlgObj_AppendDITL(_self, _args) return _res; } -static PyObject *DlgObj_CountDITL(_self, _args) - DialogObject *_self; - PyObject *_args; +static PyObject *DlgObj_CountDITL(DialogObject *_self, PyObject *_args) { PyObject *_res = NULL; DialogItemIndex _rv; @@ -403,9 +376,7 @@ static PyObject *DlgObj_CountDITL(_self, _args) return _res; } -static PyObject *DlgObj_ShortenDITL(_self, _args) - DialogObject *_self; - PyObject *_args; +static PyObject *DlgObj_ShortenDITL(DialogObject *_self, PyObject *_args) { PyObject *_res = NULL; DialogItemIndex numberItems; @@ -421,9 +392,7 @@ static PyObject *DlgObj_ShortenDITL(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *DlgObj_InsertDialogItem(_self, _args) - DialogObject *_self; - PyObject *_args; +static PyObject *DlgObj_InsertDialogItem(DialogObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -451,9 +420,7 @@ static PyObject *DlgObj_InsertDialogItem(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *DlgObj_RemoveDialogItems(_self, _args) - DialogObject *_self; - PyObject *_args; +static PyObject *DlgObj_RemoveDialogItems(DialogObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -476,9 +443,7 @@ static PyObject *DlgObj_RemoveDialogItems(_self, _args) } #endif -static PyObject *DlgObj_StdFilterProc(_self, _args) - DialogObject *_self; - PyObject *_args; +static PyObject *DlgObj_StdFilterProc(DialogObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -496,9 +461,7 @@ static PyObject *DlgObj_StdFilterProc(_self, _args) return _res; } -static PyObject *DlgObj_SetDialogDefaultItem(_self, _args) - DialogObject *_self; - PyObject *_args; +static PyObject *DlgObj_SetDialogDefaultItem(DialogObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -514,9 +477,7 @@ static PyObject *DlgObj_SetDialogDefaultItem(_self, _args) return _res; } -static PyObject *DlgObj_SetDialogCancelItem(_self, _args) - DialogObject *_self; - PyObject *_args; +static PyObject *DlgObj_SetDialogCancelItem(DialogObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -532,9 +493,7 @@ static PyObject *DlgObj_SetDialogCancelItem(_self, _args) return _res; } -static PyObject *DlgObj_SetDialogTracksCursor(_self, _args) - DialogObject *_self; - PyObject *_args; +static PyObject *DlgObj_SetDialogTracksCursor(DialogObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -550,9 +509,7 @@ static PyObject *DlgObj_SetDialogTracksCursor(_self, _args) return _res; } -static PyObject *DlgObj_AutoSizeDialog(_self, _args) - DialogObject *_self; - PyObject *_args; +static PyObject *DlgObj_AutoSizeDialog(DialogObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -565,9 +522,7 @@ static PyObject *DlgObj_AutoSizeDialog(_self, _args) return _res; } -static PyObject *DlgObj_GetDialogItemAsControl(_self, _args) - DialogObject *_self; - PyObject *_args; +static PyObject *DlgObj_GetDialogItemAsControl(DialogObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -585,9 +540,7 @@ static PyObject *DlgObj_GetDialogItemAsControl(_self, _args) return _res; } -static PyObject *DlgObj_MoveDialogItem(_self, _args) - DialogObject *_self; - PyObject *_args; +static PyObject *DlgObj_MoveDialogItem(DialogObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -609,9 +562,7 @@ static PyObject *DlgObj_MoveDialogItem(_self, _args) return _res; } -static PyObject *DlgObj_SizeDialogItem(_self, _args) - DialogObject *_self; - PyObject *_args; +static PyObject *DlgObj_SizeDialogItem(DialogObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -633,9 +584,7 @@ static PyObject *DlgObj_SizeDialogItem(_self, _args) return _res; } -static PyObject *DlgObj_AppendDialogItemList(_self, _args) - DialogObject *_self; - PyObject *_args; +static PyObject *DlgObj_AppendDialogItemList(DialogObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -654,9 +603,7 @@ static PyObject *DlgObj_AppendDialogItemList(_self, _args) return _res; } -static PyObject *DlgObj_SetDialogTimeout(_self, _args) - DialogObject *_self; - PyObject *_args; +static PyObject *DlgObj_SetDialogTimeout(DialogObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -675,9 +622,7 @@ static PyObject *DlgObj_SetDialogTimeout(_self, _args) return _res; } -static PyObject *DlgObj_GetDialogTimeout(_self, _args) - DialogObject *_self; - PyObject *_args; +static PyObject *DlgObj_GetDialogTimeout(DialogObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -698,9 +643,7 @@ static PyObject *DlgObj_GetDialogTimeout(_self, _args) return _res; } -static PyObject *DlgObj_SetModalDialogEventMask(_self, _args) - DialogObject *_self; - PyObject *_args; +static PyObject *DlgObj_SetModalDialogEventMask(DialogObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -716,9 +659,7 @@ static PyObject *DlgObj_SetModalDialogEventMask(_self, _args) return _res; } -static PyObject *DlgObj_GetModalDialogEventMask(_self, _args) - DialogObject *_self; - PyObject *_args; +static PyObject *DlgObj_GetModalDialogEventMask(DialogObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -733,9 +674,7 @@ static PyObject *DlgObj_GetModalDialogEventMask(_self, _args) return _res; } -static PyObject *DlgObj_GetDialogWindow(_self, _args) - DialogObject *_self; - PyObject *_args; +static PyObject *DlgObj_GetDialogWindow(DialogObject *_self, PyObject *_args) { PyObject *_res = NULL; WindowPtr _rv; @@ -747,9 +686,7 @@ static PyObject *DlgObj_GetDialogWindow(_self, _args) return _res; } -static PyObject *DlgObj_GetDialogTextEditHandle(_self, _args) - DialogObject *_self; - PyObject *_args; +static PyObject *DlgObj_GetDialogTextEditHandle(DialogObject *_self, PyObject *_args) { PyObject *_res = NULL; TEHandle _rv; @@ -761,9 +698,7 @@ static PyObject *DlgObj_GetDialogTextEditHandle(_self, _args) return _res; } -static PyObject *DlgObj_GetDialogDefaultItem(_self, _args) - DialogObject *_self; - PyObject *_args; +static PyObject *DlgObj_GetDialogDefaultItem(DialogObject *_self, PyObject *_args) { PyObject *_res = NULL; SInt16 _rv; @@ -775,9 +710,7 @@ static PyObject *DlgObj_GetDialogDefaultItem(_self, _args) return _res; } -static PyObject *DlgObj_GetDialogCancelItem(_self, _args) - DialogObject *_self; - PyObject *_args; +static PyObject *DlgObj_GetDialogCancelItem(DialogObject *_self, PyObject *_args) { PyObject *_res = NULL; SInt16 _rv; @@ -789,9 +722,7 @@ static PyObject *DlgObj_GetDialogCancelItem(_self, _args) return _res; } -static PyObject *DlgObj_GetDialogKeyboardFocusItem(_self, _args) - DialogObject *_self; - PyObject *_args; +static PyObject *DlgObj_GetDialogKeyboardFocusItem(DialogObject *_self, PyObject *_args) { PyObject *_res = NULL; SInt16 _rv; @@ -803,9 +734,7 @@ static PyObject *DlgObj_GetDialogKeyboardFocusItem(_self, _args) return _res; } -static PyObject *DlgObj_SetPortDialogPort(_self, _args) - DialogObject *_self; - PyObject *_args; +static PyObject *DlgObj_SetPortDialogPort(DialogObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -816,9 +745,7 @@ static PyObject *DlgObj_SetPortDialogPort(_self, _args) return _res; } -static PyObject *DlgObj_GetDialogPort(_self, _args) - DialogObject *_self; - PyObject *_args; +static PyObject *DlgObj_GetDialogPort(DialogObject *_self, PyObject *_args) { PyObject *_res = NULL; CGrafPtr _rv; @@ -832,9 +759,7 @@ static PyObject *DlgObj_GetDialogPort(_self, _args) #if !TARGET_API_MAC_CARBON -static PyObject *DlgObj_SetGrafPortOfDialog(_self, _args) - DialogObject *_self; - PyObject *_args; +static PyObject *DlgObj_SetGrafPortOfDialog(DialogObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -937,17 +862,14 @@ static PyMethodDef DlgObj_methods[] = { PyMethodChain DlgObj_chain = { DlgObj_methods, NULL }; -static PyObject *DlgObj_getattr(self, name) - DialogObject *self; - char *name; +static PyObject *DlgObj_getattr(DialogObject *self, char *name) { return Py_FindMethodInChain(&DlgObj_chain, (PyObject *)self, name); } #define DlgObj_setattr NULL -static int DlgObj_compare(self, other) - DialogObject *self, *other; +static int DlgObj_compare(DialogObject *self, DialogObject *other) { if ( self->ob_itself > other->ob_itself ) return 1; if ( self->ob_itself < other->ob_itself ) return -1; @@ -956,8 +878,7 @@ static int DlgObj_compare(self, other) #define DlgObj_repr NULL -static int DlgObj_hash(self) - DialogObject *self; +static int DlgObj_hash(DialogObject *self) { return (int)self->ob_itself; } @@ -984,9 +905,7 @@ PyTypeObject Dialog_Type = { /* --------------------- End object type Dialog --------------------- */ -static PyObject *Dlg_NewDialog(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Dlg_NewDialog(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; DialogPtr _rv; @@ -1022,9 +941,7 @@ static PyObject *Dlg_NewDialog(_self, _args) return _res; } -static PyObject *Dlg_GetNewDialog(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Dlg_GetNewDialog(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; DialogPtr _rv; @@ -1042,9 +959,7 @@ static PyObject *Dlg_GetNewDialog(_self, _args) return _res; } -static PyObject *Dlg_NewColorDialog(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Dlg_NewColorDialog(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; DialogPtr _rv; @@ -1080,9 +995,7 @@ static PyObject *Dlg_NewColorDialog(_self, _args) return _res; } -static PyObject *Dlg_ModalDialog(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Dlg_ModalDialog(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; PyObject* modalFilter; @@ -1097,9 +1010,7 @@ static PyObject *Dlg_ModalDialog(_self, _args) return _res; } -static PyObject *Dlg_IsDialogEvent(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Dlg_IsDialogEvent(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -1113,9 +1024,7 @@ static PyObject *Dlg_IsDialogEvent(_self, _args) return _res; } -static PyObject *Dlg_DialogSelect(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Dlg_DialogSelect(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -1135,9 +1044,7 @@ static PyObject *Dlg_DialogSelect(_self, _args) return _res; } -static PyObject *Dlg_Alert(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Dlg_Alert(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; DialogItemIndex _rv; @@ -1154,9 +1061,7 @@ static PyObject *Dlg_Alert(_self, _args) return _res; } -static PyObject *Dlg_StopAlert(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Dlg_StopAlert(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; DialogItemIndex _rv; @@ -1173,9 +1078,7 @@ static PyObject *Dlg_StopAlert(_self, _args) return _res; } -static PyObject *Dlg_NoteAlert(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Dlg_NoteAlert(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; DialogItemIndex _rv; @@ -1192,9 +1095,7 @@ static PyObject *Dlg_NoteAlert(_self, _args) return _res; } -static PyObject *Dlg_CautionAlert(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Dlg_CautionAlert(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; DialogItemIndex _rv; @@ -1211,9 +1112,7 @@ static PyObject *Dlg_CautionAlert(_self, _args) return _res; } -static PyObject *Dlg_ParamText(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Dlg_ParamText(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Str255 param0; @@ -1235,9 +1134,7 @@ static PyObject *Dlg_ParamText(_self, _args) return _res; } -static PyObject *Dlg_GetDialogItemText(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Dlg_GetDialogItemText(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Handle item; @@ -1252,9 +1149,7 @@ static PyObject *Dlg_GetDialogItemText(_self, _args) return _res; } -static PyObject *Dlg_SetDialogItemText(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Dlg_SetDialogItemText(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Handle item; @@ -1270,9 +1165,7 @@ static PyObject *Dlg_SetDialogItemText(_self, _args) return _res; } -static PyObject *Dlg_GetAlertStage(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Dlg_GetAlertStage(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; SInt16 _rv; @@ -1284,9 +1177,7 @@ static PyObject *Dlg_GetAlertStage(_self, _args) return _res; } -static PyObject *Dlg_SetDialogFont(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Dlg_SetDialogFont(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; SInt16 fontNum; @@ -1299,9 +1190,7 @@ static PyObject *Dlg_SetDialogFont(_self, _args) return _res; } -static PyObject *Dlg_ResetAlertStage(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Dlg_ResetAlertStage(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -1314,9 +1203,7 @@ static PyObject *Dlg_ResetAlertStage(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *Dlg_GetParamText(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Dlg_GetParamText(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Str255 param0; @@ -1339,9 +1226,7 @@ static PyObject *Dlg_GetParamText(_self, _args) } #endif -static PyObject *Dlg_NewFeaturesDialog(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Dlg_NewFeaturesDialog(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; DialogPtr _rv; @@ -1380,9 +1265,7 @@ static PyObject *Dlg_NewFeaturesDialog(_self, _args) return _res; } -static PyObject *Dlg_GetDialogFromWindow(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Dlg_GetDialogFromWindow(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; DialogPtr _rv; @@ -1396,9 +1279,7 @@ static PyObject *Dlg_GetDialogFromWindow(_self, _args) return _res; } -static PyObject *Dlg_SetUserItemHandler(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Dlg_SetUserItemHandler(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; @@ -1419,7 +1300,7 @@ static PyObject *Dlg_SetUserItemHandler(_self, _args) Py_INCREF(Py_None); } else { Py_INCREF(new); - _res = Py_BuildValue("O&", ResObj_New, (Handle)NewUserItemProc(Dlg_UnivUserItemProc)); + _res = Py_BuildValue("O&", ResObj_New, (Handle)NewUserItemUPP(Dlg_UnivUserItemProc)); } Dlg_UserItemProc_callback = new; @@ -1479,8 +1360,7 @@ static PyMethodDef Dlg_methods[] = { /* Return the WindowPtr corresponding to a DialogObject */ #if 0 WindowPtr -DlgObj_ConvertToWindow(self) - PyObject *self; +DlgObj_ConvertToWindow(PyObject *self) { if ( DlgObj_Check(self) ) return GetDialogWindow(((DialogObject *)self)->ob_itself); @@ -1490,8 +1370,7 @@ DlgObj_ConvertToWindow(self) /* Return the object corresponding to the dialog, or None */ PyObject * -DlgObj_WhichDialog(d) - DialogPtr d; +DlgObj_WhichDialog(DialogPtr d) { PyObject *it; @@ -1519,16 +1398,16 @@ DlgObj_WhichDialog(d) } -void initDlg() +void initDlg(void) { PyObject *m; PyObject *d; - PyMac_INIT_TOOLBOX_OBJECT_NEW(DlgObj_New); - PyMac_INIT_TOOLBOX_OBJECT_NEW(DlgObj_WhichDialog); - PyMac_INIT_TOOLBOX_OBJECT_CONVERT(DlgObj_Convert); + PyMac_INIT_TOOLBOX_OBJECT_NEW(DialogPtr, DlgObj_New); + PyMac_INIT_TOOLBOX_OBJECT_NEW(DialogPtr, DlgObj_WhichDialog); + PyMac_INIT_TOOLBOX_OBJECT_CONVERT(DialogPtr, DlgObj_Convert); m = Py_InitModule("Dlg", Dlg_methods); diff --git a/Mac/Modules/dlg/dlgsupport.py b/Mac/Modules/dlg/dlgsupport.py index 460d3b95433..b166b4242d2 100644 --- a/Mac/Modules/dlg/dlgsupport.py +++ b/Mac/Modules/dlg/dlgsupport.py @@ -31,7 +31,12 @@ StringPtr = Str255 EventMask = Type("EventMask", "H") includestuff = includestuff + """ +#ifdef WITHOUT_FRAMEWORKS #include +#else +#include +#endif + #ifdef USE_TOOLBOX_OBJECT_GLUE extern PyObject *_DlgObj_New(DialogRef); extern PyObject *_DlgObj_WhichDialog(DialogRef); @@ -150,8 +155,7 @@ finalstuff = finalstuff + """ /* Return the WindowPtr corresponding to a DialogObject */ #if 0 WindowPtr -DlgObj_ConvertToWindow(self) - PyObject *self; +DlgObj_ConvertToWindow(PyObject *self) { if ( DlgObj_Check(self) ) return GetDialogWindow(((DialogObject *)self)->ob_itself); @@ -161,8 +165,7 @@ DlgObj_ConvertToWindow(self) /* Return the object corresponding to the dialog, or None */ PyObject * -DlgObj_WhichDialog(d) - DialogPtr d; +DlgObj_WhichDialog(DialogPtr d) { PyObject *it; @@ -191,9 +194,9 @@ DlgObj_WhichDialog(d) """ initstuff = initstuff + """ - PyMac_INIT_TOOLBOX_OBJECT_NEW(DlgObj_New); - PyMac_INIT_TOOLBOX_OBJECT_NEW(DlgObj_WhichDialog); - PyMac_INIT_TOOLBOX_OBJECT_CONVERT(DlgObj_Convert); + PyMac_INIT_TOOLBOX_OBJECT_NEW(DialogPtr, DlgObj_New); + PyMac_INIT_TOOLBOX_OBJECT_NEW(DialogPtr, DlgObj_WhichDialog); + PyMac_INIT_TOOLBOX_OBJECT_CONVERT(DialogPtr, DlgObj_Convert); """ @@ -219,10 +222,7 @@ class MyObjectDefinition(GlobalObjectDefinition): def outputCompare(self): Output() - Output("static int %s_compare(self, other)", self.prefix) - IndentLevel() - Output("%s *self, *other;", self.objecttype) - DedentLevel() + Output("static int %s_compare(%s *self, %s *other)", self.prefix, self.objecttype, self.objecttype) OutLbrace() Output("if ( self->ob_itself > other->ob_itself ) return 1;") Output("if ( self->ob_itself < other->ob_itself ) return -1;") @@ -231,10 +231,7 @@ class MyObjectDefinition(GlobalObjectDefinition): def outputHash(self): Output() - Output("static int %s_hash(self)", self.prefix) - IndentLevel() - Output("%s *self;", self.objecttype) - DedentLevel() + Output("static int %s_hash(%s *self)", self.prefix, self.objecttype) OutLbrace() Output("return (int)self->ob_itself;") OutRbrace() @@ -293,7 +290,7 @@ setuseritembody = """ Py_INCREF(Py_None); } else { Py_INCREF(new); - _res = Py_BuildValue("O&", ResObj_New, (Handle)NewUserItemProc(Dlg_UnivUserItemProc)); + _res = Py_BuildValue("O&", ResObj_New, (Handle)NewUserItemUPP(Dlg_UnivUserItemProc)); } Dlg_UserItemProc_callback = new; diff --git a/Mac/Modules/drag/Dragmodule.c b/Mac/Modules/drag/Dragmodule.c index 3ce19b74632..2fd7cfe3ebf 100644 --- a/Mac/Modules/drag/Dragmodule.c +++ b/Mac/Modules/drag/Dragmodule.c @@ -8,7 +8,11 @@ #include "macglue.h" #include "pymactoolbox.h" +#ifdef WITHOUT_FRAMEWORKS #include +#else +#include +#endif /* Callback glue routines */ DragTrackingHandlerUPP dragglue_TrackingHandlerUPP; @@ -41,8 +45,7 @@ typedef struct DragObjObject { PyObject *sendproc; } DragObjObject; -PyObject *DragObj_New(itself) - DragRef itself; +PyObject *DragObj_New(DragRef itself) { DragObjObject *it; if (itself == NULL) { @@ -55,9 +58,7 @@ PyObject *DragObj_New(itself) it->sendproc = NULL; return (PyObject *)it; } -DragObj_Convert(v, p_itself) - PyObject *v; - DragRef *p_itself; +DragObj_Convert(PyObject *v, DragRef *p_itself) { if (!DragObj_Check(v)) { @@ -68,16 +69,13 @@ DragObj_Convert(v, p_itself) return 1; } -static void DragObj_dealloc(self) - DragObjObject *self; +static void DragObj_dealloc(DragObjObject *self) { Py_XDECREF(self->sendproc); PyMem_DEL(self); } -static PyObject *DragObj_DisposeDrag(_self, _args) - DragObjObject *_self; - PyObject *_args; +static PyObject *DragObj_DisposeDrag(DragObjObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -90,9 +88,7 @@ static PyObject *DragObj_DisposeDrag(_self, _args) return _res; } -static PyObject *DragObj_AddDragItemFlavor(_self, _args) - DragObjObject *_self; - PyObject *_args; +static PyObject *DragObj_AddDragItemFlavor(DragObjObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -121,9 +117,7 @@ static PyObject *DragObj_AddDragItemFlavor(_self, _args) return _res; } -static PyObject *DragObj_SetDragItemFlavorData(_self, _args) - DragObjObject *_self; - PyObject *_args; +static PyObject *DragObj_SetDragItemFlavorData(DragObjObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -152,9 +146,7 @@ static PyObject *DragObj_SetDragItemFlavorData(_self, _args) return _res; } -static PyObject *DragObj_SetDragImage(_self, _args) - DragObjObject *_self; - PyObject *_args; +static PyObject *DragObj_SetDragImage(DragObjObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -179,9 +171,7 @@ static PyObject *DragObj_SetDragImage(_self, _args) return _res; } -static PyObject *DragObj_ChangeDragBehaviors(_self, _args) - DragObjObject *_self; - PyObject *_args; +static PyObject *DragObj_ChangeDragBehaviors(DragObjObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -200,9 +190,7 @@ static PyObject *DragObj_ChangeDragBehaviors(_self, _args) return _res; } -static PyObject *DragObj_TrackDrag(_self, _args) - DragObjObject *_self; - PyObject *_args; +static PyObject *DragObj_TrackDrag(DragObjObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -221,9 +209,7 @@ static PyObject *DragObj_TrackDrag(_self, _args) return _res; } -static PyObject *DragObj_CountDragItems(_self, _args) - DragObjObject *_self; - PyObject *_args; +static PyObject *DragObj_CountDragItems(DragObjObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -238,9 +224,7 @@ static PyObject *DragObj_CountDragItems(_self, _args) return _res; } -static PyObject *DragObj_GetDragItemReferenceNumber(_self, _args) - DragObjObject *_self; - PyObject *_args; +static PyObject *DragObj_GetDragItemReferenceNumber(DragObjObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -258,9 +242,7 @@ static PyObject *DragObj_GetDragItemReferenceNumber(_self, _args) return _res; } -static PyObject *DragObj_CountDragItemFlavors(_self, _args) - DragObjObject *_self; - PyObject *_args; +static PyObject *DragObj_CountDragItemFlavors(DragObjObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -278,9 +260,7 @@ static PyObject *DragObj_CountDragItemFlavors(_self, _args) return _res; } -static PyObject *DragObj_GetFlavorType(_self, _args) - DragObjObject *_self; - PyObject *_args; +static PyObject *DragObj_GetFlavorType(DragObjObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -301,9 +281,7 @@ static PyObject *DragObj_GetFlavorType(_self, _args) return _res; } -static PyObject *DragObj_GetFlavorFlags(_self, _args) - DragObjObject *_self; - PyObject *_args; +static PyObject *DragObj_GetFlavorFlags(DragObjObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -324,9 +302,7 @@ static PyObject *DragObj_GetFlavorFlags(_self, _args) return _res; } -static PyObject *DragObj_GetFlavorDataSize(_self, _args) - DragObjObject *_self; - PyObject *_args; +static PyObject *DragObj_GetFlavorDataSize(DragObjObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -347,9 +323,7 @@ static PyObject *DragObj_GetFlavorDataSize(_self, _args) return _res; } -static PyObject *DragObj_GetFlavorData(_self, _args) - DragObjObject *_self; - PyObject *_args; +static PyObject *DragObj_GetFlavorData(DragObjObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -384,9 +358,7 @@ static PyObject *DragObj_GetFlavorData(_self, _args) return _res; } -static PyObject *DragObj_GetDragItemBounds(_self, _args) - DragObjObject *_self; - PyObject *_args; +static PyObject *DragObj_GetDragItemBounds(DragObjObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -404,9 +376,7 @@ static PyObject *DragObj_GetDragItemBounds(_self, _args) return _res; } -static PyObject *DragObj_SetDragItemBounds(_self, _args) - DragObjObject *_self; - PyObject *_args; +static PyObject *DragObj_SetDragItemBounds(DragObjObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -425,9 +395,7 @@ static PyObject *DragObj_SetDragItemBounds(_self, _args) return _res; } -static PyObject *DragObj_GetDropLocation(_self, _args) - DragObjObject *_self; - PyObject *_args; +static PyObject *DragObj_GetDropLocation(DragObjObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -442,9 +410,7 @@ static PyObject *DragObj_GetDropLocation(_self, _args) return _res; } -static PyObject *DragObj_SetDropLocation(_self, _args) - DragObjObject *_self; - PyObject *_args; +static PyObject *DragObj_SetDropLocation(DragObjObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -460,9 +426,7 @@ static PyObject *DragObj_SetDropLocation(_self, _args) return _res; } -static PyObject *DragObj_GetDragAttributes(_self, _args) - DragObjObject *_self; - PyObject *_args; +static PyObject *DragObj_GetDragAttributes(DragObjObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -477,9 +441,7 @@ static PyObject *DragObj_GetDragAttributes(_self, _args) return _res; } -static PyObject *DragObj_GetDragMouse(_self, _args) - DragObjObject *_self; - PyObject *_args; +static PyObject *DragObj_GetDragMouse(DragObjObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -497,9 +459,7 @@ static PyObject *DragObj_GetDragMouse(_self, _args) return _res; } -static PyObject *DragObj_SetDragMouse(_self, _args) - DragObjObject *_self; - PyObject *_args; +static PyObject *DragObj_SetDragMouse(DragObjObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -515,9 +475,7 @@ static PyObject *DragObj_SetDragMouse(_self, _args) return _res; } -static PyObject *DragObj_GetDragOrigin(_self, _args) - DragObjObject *_self; - PyObject *_args; +static PyObject *DragObj_GetDragOrigin(DragObjObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -532,9 +490,7 @@ static PyObject *DragObj_GetDragOrigin(_self, _args) return _res; } -static PyObject *DragObj_GetDragModifiers(_self, _args) - DragObjObject *_self; - PyObject *_args; +static PyObject *DragObj_GetDragModifiers(DragObjObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -555,9 +511,7 @@ static PyObject *DragObj_GetDragModifiers(_self, _args) return _res; } -static PyObject *DragObj_ShowDragHilite(_self, _args) - DragObjObject *_self; - PyObject *_args; +static PyObject *DragObj_ShowDragHilite(DragObjObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -576,9 +530,7 @@ static PyObject *DragObj_ShowDragHilite(_self, _args) return _res; } -static PyObject *DragObj_HideDragHilite(_self, _args) - DragObjObject *_self; - PyObject *_args; +static PyObject *DragObj_HideDragHilite(DragObjObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -591,9 +543,7 @@ static PyObject *DragObj_HideDragHilite(_self, _args) return _res; } -static PyObject *DragObj_DragPreScroll(_self, _args) - DragObjObject *_self; - PyObject *_args; +static PyObject *DragObj_DragPreScroll(DragObjObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -612,9 +562,7 @@ static PyObject *DragObj_DragPreScroll(_self, _args) return _res; } -static PyObject *DragObj_DragPostScroll(_self, _args) - DragObjObject *_self; - PyObject *_args; +static PyObject *DragObj_DragPostScroll(DragObjObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -627,9 +575,7 @@ static PyObject *DragObj_DragPostScroll(_self, _args) return _res; } -static PyObject *DragObj_UpdateDragHilite(_self, _args) - DragObjObject *_self; - PyObject *_args; +static PyObject *DragObj_UpdateDragHilite(DragObjObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -705,9 +651,7 @@ static PyMethodDef DragObj_methods[] = { PyMethodChain DragObj_chain = { DragObj_methods, NULL }; -static PyObject *DragObj_getattr(self, name) - DragObjObject *self; - char *name; +static PyObject *DragObj_getattr(DragObjObject *self, char *name) { return Py_FindMethodInChain(&DragObj_chain, (PyObject *)self, name); } @@ -742,9 +686,7 @@ PyTypeObject DragObj_Type = { /* -------------------- End object type DragObj --------------------- */ -static PyObject *Drag_NewDrag(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Drag_NewDrag(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -758,9 +700,7 @@ static PyObject *Drag_NewDrag(_self, _args) return _res; } -static PyObject *Drag_GetDragHiliteColor(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Drag_GetDragHiliteColor(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -777,9 +717,7 @@ static PyObject *Drag_GetDragHiliteColor(_self, _args) return _res; } -static PyObject *Drag_WaitMouseMoved(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Drag_WaitMouseMoved(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -793,9 +731,7 @@ static PyObject *Drag_WaitMouseMoved(_self, _args) return _res; } -static PyObject *Drag_ZoomRects(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Drag_ZoomRects(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -819,9 +755,7 @@ static PyObject *Drag_ZoomRects(_self, _args) return _res; } -static PyObject *Drag_ZoomRegion(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Drag_ZoomRegion(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -845,9 +779,7 @@ static PyObject *Drag_ZoomRegion(_self, _args) return _res; } -static PyObject *Drag_InstallTrackingHandler(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Drag_InstallTrackingHandler(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; @@ -865,9 +797,7 @@ static PyObject *Drag_InstallTrackingHandler(_self, _args) } -static PyObject *Drag_InstallReceiveHandler(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Drag_InstallReceiveHandler(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; @@ -885,9 +815,7 @@ static PyObject *Drag_InstallReceiveHandler(_self, _args) } -static PyObject *Drag_RemoveTrackingHandler(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Drag_RemoveTrackingHandler(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; @@ -903,9 +831,7 @@ static PyObject *Drag_RemoveTrackingHandler(_self, _args) } -static PyObject *Drag_RemoveReceiveHandler(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Drag_RemoveReceiveHandler(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; @@ -1041,15 +967,15 @@ dragglue_Drawing(xxxx -void initDrag() +void initDrag(void) { PyObject *m; PyObject *d; - PyMac_INIT_TOOLBOX_OBJECT_NEW(DragObj_New); - PyMac_INIT_TOOLBOX_OBJECT_CONVERT(DragObj_Convert); + PyMac_INIT_TOOLBOX_OBJECT_NEW(DragRef, DragObj_New); + PyMac_INIT_TOOLBOX_OBJECT_CONVERT(DragRef, DragObj_Convert); m = Py_InitModule("Drag", Drag_methods); @@ -1063,12 +989,12 @@ void initDrag() if (PyDict_SetItemString(d, "DragObjType", (PyObject *)&DragObj_Type) != 0) Py_FatalError("can't initialize DragObjType"); - dragglue_TrackingHandlerUPP = NewDragTrackingHandlerProc(dragglue_TrackingHandler); - dragglue_ReceiveHandlerUPP = NewDragReceiveHandlerProc(dragglue_ReceiveHandler); - dragglue_SendDataUPP = NewDragSendDataProc(dragglue_SendData); + dragglue_TrackingHandlerUPP = NewDragTrackingHandlerUPP(dragglue_TrackingHandler); + dragglue_ReceiveHandlerUPP = NewDragReceiveHandlerUPP(dragglue_ReceiveHandler); + dragglue_SendDataUPP = NewDragSendDataUPP(dragglue_SendData); #if 0 - dragglue_InputUPP = NewDragInputProc(dragglue_Input); - dragglue_DrawingUPP = NewDragDrawingProc(dragglue_Drawing); + dragglue_InputUPP = NewDragInputUPP(dragglue_Input); + dragglue_DrawingUPP = NewDragDrawingUPP(dragglue_Drawing); #endif diff --git a/Mac/Modules/drag/dragsupport.py b/Mac/Modules/drag/dragsupport.py index 79bf00cf88c..c35111ef48d 100644 --- a/Mac/Modules/drag/dragsupport.py +++ b/Mac/Modules/drag/dragsupport.py @@ -44,7 +44,11 @@ FlavorFlags = Type("FlavorFlags", "l") DragTrackingMessage = Type("DragTrackingMessage", "h") includestuff = includestuff + """ -#include <%s>""" % MACHEADERFILE + """ +#ifdef WITHOUT_FRAMEWORKS +#include +#else +#include +#endif /* Callback glue routines */ DragTrackingHandlerUPP dragglue_TrackingHandlerUPP; @@ -162,17 +166,17 @@ dragglue_Drawing(xxxx """ initstuff = initstuff + """ - PyMac_INIT_TOOLBOX_OBJECT_NEW(DragObj_New); - PyMac_INIT_TOOLBOX_OBJECT_CONVERT(DragObj_Convert); + PyMac_INIT_TOOLBOX_OBJECT_NEW(DragRef, DragObj_New); + PyMac_INIT_TOOLBOX_OBJECT_CONVERT(DragRef, DragObj_Convert); """ variablestuff = """ -dragglue_TrackingHandlerUPP = NewDragTrackingHandlerProc(dragglue_TrackingHandler); -dragglue_ReceiveHandlerUPP = NewDragReceiveHandlerProc(dragglue_ReceiveHandler); -dragglue_SendDataUPP = NewDragSendDataProc(dragglue_SendData); +dragglue_TrackingHandlerUPP = NewDragTrackingHandlerUPP(dragglue_TrackingHandler); +dragglue_ReceiveHandlerUPP = NewDragReceiveHandlerUPP(dragglue_ReceiveHandler); +dragglue_SendDataUPP = NewDragSendDataUPP(dragglue_SendData); #if 0 -dragglue_InputUPP = NewDragInputProc(dragglue_Input); -dragglue_DrawingUPP = NewDragDrawingProc(dragglue_Drawing); +dragglue_InputUPP = NewDragInputUPP(dragglue_Input); +dragglue_DrawingUPP = NewDragDrawingUPP(dragglue_Drawing); #endif """ diff --git a/Mac/Modules/evt/Evtmodule.c b/Mac/Modules/evt/Evtmodule.c index ed18f9c8941..bff6e1e56c7 100644 --- a/Mac/Modules/evt/Evtmodule.c +++ b/Mac/Modules/evt/Evtmodule.c @@ -8,13 +8,16 @@ #include "macglue.h" #include "pymactoolbox.h" +#ifdef WITHOUT_FRAMEWORKS #include +#else +#include +#endif + static PyObject *Evt_Error; -static PyObject *Evt_GetMouse(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Evt_GetMouse(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Point mouseLoc; @@ -26,9 +29,7 @@ static PyObject *Evt_GetMouse(_self, _args) return _res; } -static PyObject *Evt_Button(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Evt_Button(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -40,9 +41,7 @@ static PyObject *Evt_Button(_self, _args) return _res; } -static PyObject *Evt_StillDown(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Evt_StillDown(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -54,9 +53,7 @@ static PyObject *Evt_StillDown(_self, _args) return _res; } -static PyObject *Evt_WaitMouseUp(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Evt_WaitMouseUp(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -68,9 +65,7 @@ static PyObject *Evt_WaitMouseUp(_self, _args) return _res; } -static PyObject *Evt_TickCount(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Evt_TickCount(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; UInt32 _rv; @@ -82,9 +77,7 @@ static PyObject *Evt_TickCount(_self, _args) return _res; } -static PyObject *Evt_GetCaretTime(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Evt_GetCaretTime(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; UInt32 _rv; @@ -96,9 +89,7 @@ static PyObject *Evt_GetCaretTime(_self, _args) return _res; } -static PyObject *Evt_GetKeys(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Evt_GetKeys(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; KeyMap theKeys__out__; @@ -111,9 +102,7 @@ static PyObject *Evt_GetKeys(_self, _args) return _res; } -static PyObject *Evt_GetDblTime(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Evt_GetDblTime(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; UInt32 _rv; @@ -125,9 +114,7 @@ static PyObject *Evt_GetDblTime(_self, _args) return _res; } -static PyObject *Evt_SetEventMask(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Evt_SetEventMask(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; EventMask value; @@ -140,9 +127,7 @@ static PyObject *Evt_SetEventMask(_self, _args) return _res; } -static PyObject *Evt_GetNextEvent(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Evt_GetNextEvent(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -159,9 +144,7 @@ static PyObject *Evt_GetNextEvent(_self, _args) return _res; } -static PyObject *Evt_EventAvail(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Evt_EventAvail(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -178,9 +161,7 @@ static PyObject *Evt_EventAvail(_self, _args) return _res; } -static PyObject *Evt_PostEvent(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Evt_PostEvent(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -200,9 +181,7 @@ static PyObject *Evt_PostEvent(_self, _args) #if !TARGET_API_MAC_CARBON -static PyObject *Evt_OSEventAvail(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Evt_OSEventAvail(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -222,9 +201,7 @@ static PyObject *Evt_OSEventAvail(_self, _args) #if !TARGET_API_MAC_CARBON -static PyObject *Evt_GetOSEvent(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Evt_GetOSEvent(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -242,9 +219,7 @@ static PyObject *Evt_GetOSEvent(_self, _args) } #endif -static PyObject *Evt_FlushEvents(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Evt_FlushEvents(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; EventMask whichMask; @@ -262,9 +237,7 @@ static PyObject *Evt_FlushEvents(_self, _args) #if !TARGET_API_MAC_CARBON -static PyObject *Evt_SystemClick(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Evt_SystemClick(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; EventRecord theEvent; @@ -283,9 +256,7 @@ static PyObject *Evt_SystemClick(_self, _args) #if !TARGET_API_MAC_CARBON -static PyObject *Evt_SystemTask(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Evt_SystemTask(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -299,9 +270,7 @@ static PyObject *Evt_SystemTask(_self, _args) #if !TARGET_API_MAC_CARBON -static PyObject *Evt_SystemEvent(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Evt_SystemEvent(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -318,9 +287,7 @@ static PyObject *Evt_SystemEvent(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *Evt_GetGlobalMouse(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Evt_GetGlobalMouse(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Point globalMouse; @@ -335,9 +302,7 @@ static PyObject *Evt_GetGlobalMouse(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *Evt_GetCurrentKeyModifiers(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Evt_GetCurrentKeyModifiers(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; UInt32 _rv; @@ -352,9 +317,7 @@ static PyObject *Evt_GetCurrentKeyModifiers(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *Evt_CheckEventQueueForUserCancel(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Evt_CheckEventQueueForUserCancel(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -367,9 +330,7 @@ static PyObject *Evt_CheckEventQueueForUserCancel(_self, _args) } #endif -static PyObject *Evt_WaitNextEvent(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Evt_WaitNextEvent(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; @@ -470,7 +431,7 @@ static PyMethodDef Evt_methods[] = { -void initEvt() +void initEvt(void) { PyObject *m; PyObject *d; diff --git a/Mac/Modules/evt/evtsupport.py b/Mac/Modules/evt/evtsupport.py index 7725ded54ba..88ee6c23cf6 100644 --- a/Mac/Modules/evt/evtsupport.py +++ b/Mac/Modules/evt/evtsupport.py @@ -35,7 +35,12 @@ EventMask = Type("EventMask", "H") EventKind = Type("EventKind", "H") includestuff = includestuff + """ -#include <%s>""" % MACHEADERFILE + """ +#ifdef WITHOUT_FRAMEWORKS +#include +#else +#include +#endif + """ class MyObjectDefinition(GlobalObjectDefinition): diff --git a/Mac/Modules/fm/Fmmodule.c b/Mac/Modules/fm/Fmmodule.c index 0d66d16912c..0a072670fd0 100644 --- a/Mac/Modules/fm/Fmmodule.c +++ b/Mac/Modules/fm/Fmmodule.c @@ -8,14 +8,18 @@ #include "macglue.h" #include "pymactoolbox.h" +#ifdef WITHOUT_FRAMEWORKS #include +#else +#include +#endif + /* ** Parse/generate ComponentDescriptor records */ static PyObject * -FMRec_New(itself) - FMetricRec *itself; +FMRec_New(FMetricRec *itself) { return Py_BuildValue("O&O&O&O&O&", @@ -29,9 +33,7 @@ FMRec_New(itself) #if 0 /* Not needed... */ static int -FMRec_Convert(v, p_itself) - PyObject *v; - FMetricRec *p_itself; +FMRec_Convert(PyObject *v, FMetricRec *p_itself) { return PyArg_ParseTuple(v, "O&O&O&O&O&", PyMac_GetFixed, &itself->ascent, @@ -47,9 +49,7 @@ static PyObject *Fm_Error; #if !TARGET_API_MAC_CARBON -static PyObject *Fm_InitFonts(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Fm_InitFonts(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -61,9 +61,7 @@ static PyObject *Fm_InitFonts(_self, _args) } #endif -static PyObject *Fm_GetFontName(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Fm_GetFontName(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; short familyID; @@ -78,9 +76,7 @@ static PyObject *Fm_GetFontName(_self, _args) return _res; } -static PyObject *Fm_GetFNum(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Fm_GetFNum(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Str255 name; @@ -95,9 +91,7 @@ static PyObject *Fm_GetFNum(_self, _args) return _res; } -static PyObject *Fm_RealFont(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Fm_RealFont(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -116,9 +110,7 @@ static PyObject *Fm_RealFont(_self, _args) #if !TARGET_API_MAC_CARBON -static PyObject *Fm_SetFontLock(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Fm_SetFontLock(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean lockFlag; @@ -132,9 +124,7 @@ static PyObject *Fm_SetFontLock(_self, _args) } #endif -static PyObject *Fm_SetFScaleDisable(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Fm_SetFScaleDisable(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean fscaleDisable; @@ -147,9 +137,7 @@ static PyObject *Fm_SetFScaleDisable(_self, _args) return _res; } -static PyObject *Fm_FontMetrics(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Fm_FontMetrics(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; FMetricRec theMetrics; @@ -161,9 +149,7 @@ static PyObject *Fm_FontMetrics(_self, _args) return _res; } -static PyObject *Fm_SetFractEnable(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Fm_SetFractEnable(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean fractEnable; @@ -176,9 +162,7 @@ static PyObject *Fm_SetFractEnable(_self, _args) return _res; } -static PyObject *Fm_GetDefFontSize(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Fm_GetDefFontSize(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; short _rv; @@ -190,9 +174,7 @@ static PyObject *Fm_GetDefFontSize(_self, _args) return _res; } -static PyObject *Fm_IsOutline(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Fm_IsOutline(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -209,9 +191,7 @@ static PyObject *Fm_IsOutline(_self, _args) return _res; } -static PyObject *Fm_SetOutlinePreferred(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Fm_SetOutlinePreferred(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean outlinePreferred; @@ -224,9 +204,7 @@ static PyObject *Fm_SetOutlinePreferred(_self, _args) return _res; } -static PyObject *Fm_GetOutlinePreferred(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Fm_GetOutlinePreferred(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -238,9 +216,7 @@ static PyObject *Fm_GetOutlinePreferred(_self, _args) return _res; } -static PyObject *Fm_SetPreserveGlyph(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Fm_SetPreserveGlyph(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean preserveGlyph; @@ -253,9 +229,7 @@ static PyObject *Fm_SetPreserveGlyph(_self, _args) return _res; } -static PyObject *Fm_GetPreserveGlyph(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Fm_GetPreserveGlyph(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -269,9 +243,7 @@ static PyObject *Fm_GetPreserveGlyph(_self, _args) #if !TARGET_API_MAC_CARBON -static PyObject *Fm_FlushFonts(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Fm_FlushFonts(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -285,9 +257,7 @@ static PyObject *Fm_FlushFonts(_self, _args) } #endif -static PyObject *Fm_GetSysFont(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Fm_GetSysFont(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; short _rv; @@ -299,9 +269,7 @@ static PyObject *Fm_GetSysFont(_self, _args) return _res; } -static PyObject *Fm_GetAppFont(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Fm_GetAppFont(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; short _rv; @@ -313,9 +281,7 @@ static PyObject *Fm_GetAppFont(_self, _args) return _res; } -static PyObject *Fm_SetAntiAliasedTextEnabled(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Fm_SetAntiAliasedTextEnabled(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -333,9 +299,7 @@ static PyObject *Fm_SetAntiAliasedTextEnabled(_self, _args) return _res; } -static PyObject *Fm_IsAntiAliasedTextEnabled(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Fm_IsAntiAliasedTextEnabled(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -403,7 +367,7 @@ static PyMethodDef Fm_methods[] = { -void initFm() +void initFm(void) { PyObject *m; PyObject *d; diff --git a/Mac/Modules/fm/fmsupport.py b/Mac/Modules/fm/fmsupport.py index 1afc8b85222..9ec1e0e0211 100644 --- a/Mac/Modules/fm/fmsupport.py +++ b/Mac/Modules/fm/fmsupport.py @@ -19,14 +19,18 @@ from macsupport import * # Create the type objects includestuff = includestuff + """ -#include <%s>""" % MACHEADERFILE + """ +#ifdef WITHOUT_FRAMEWORKS +#include +#else +#include +#endif + /* ** Parse/generate ComponentDescriptor records */ static PyObject * -FMRec_New(itself) - FMetricRec *itself; +FMRec_New(FMetricRec *itself) { return Py_BuildValue("O&O&O&O&O&", @@ -40,9 +44,7 @@ FMRec_New(itself) #if 0 /* Not needed... */ static int -FMRec_Convert(v, p_itself) - PyObject *v; - FMetricRec *p_itself; +FMRec_Convert(PyObject *v, FMetricRec *p_itself) { return PyArg_ParseTuple(v, "O&O&O&O&O&", PyMac_GetFixed, &itself->ascent, diff --git a/Mac/Modules/help/Helpmodule.c b/Mac/Modules/help/Helpmodule.c index 3a446327593..3c26cda03b7 100644 --- a/Mac/Modules/help/Helpmodule.c +++ b/Mac/Modules/help/Helpmodule.c @@ -12,9 +12,7 @@ static PyObject *Help_Error; -static PyObject *Help_HMGetHelpMenuHandle(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Help_HMGetHelpMenuHandle(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -28,9 +26,7 @@ static PyObject *Help_HMGetHelpMenuHandle(_self, _args) return _res; } -static PyObject *Help_HMRemoveBalloon(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Help_HMRemoveBalloon(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -43,9 +39,7 @@ static PyObject *Help_HMRemoveBalloon(_self, _args) return _res; } -static PyObject *Help_HMIsBalloon(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Help_HMIsBalloon(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -57,9 +51,7 @@ static PyObject *Help_HMIsBalloon(_self, _args) return _res; } -static PyObject *Help_HMGetBalloons(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Help_HMGetBalloons(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -71,9 +63,7 @@ static PyObject *Help_HMGetBalloons(_self, _args) return _res; } -static PyObject *Help_HMSetBalloons(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Help_HMSetBalloons(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -88,9 +78,7 @@ static PyObject *Help_HMSetBalloons(_self, _args) return _res; } -static PyObject *Help_HMSetFont(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Help_HMSetFont(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -105,9 +93,7 @@ static PyObject *Help_HMSetFont(_self, _args) return _res; } -static PyObject *Help_HMSetFontSize(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Help_HMSetFontSize(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -122,9 +108,7 @@ static PyObject *Help_HMSetFontSize(_self, _args) return _res; } -static PyObject *Help_HMGetFont(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Help_HMGetFont(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -138,9 +122,7 @@ static PyObject *Help_HMGetFont(_self, _args) return _res; } -static PyObject *Help_HMGetFontSize(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Help_HMGetFontSize(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -154,9 +136,7 @@ static PyObject *Help_HMGetFontSize(_self, _args) return _res; } -static PyObject *Help_HMSetDialogResID(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Help_HMSetDialogResID(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -171,9 +151,7 @@ static PyObject *Help_HMSetDialogResID(_self, _args) return _res; } -static PyObject *Help_HMSetMenuResID(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Help_HMSetMenuResID(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -191,9 +169,7 @@ static PyObject *Help_HMSetMenuResID(_self, _args) return _res; } -static PyObject *Help_HMScanTemplateItems(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Help_HMScanTemplateItems(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -214,9 +190,7 @@ static PyObject *Help_HMScanTemplateItems(_self, _args) return _res; } -static PyObject *Help_HMGetDialogResID(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Help_HMGetDialogResID(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -230,9 +204,7 @@ static PyObject *Help_HMGetDialogResID(_self, _args) return _res; } -static PyObject *Help_HMGetMenuResID(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Help_HMGetMenuResID(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -249,9 +221,7 @@ static PyObject *Help_HMGetMenuResID(_self, _args) return _res; } -static PyObject *Help_HMGetBalloonWindow(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Help_HMGetBalloonWindow(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -302,7 +272,7 @@ static PyMethodDef Help_methods[] = { -void initHelp() +void initHelp(void) { PyObject *m; PyObject *d; diff --git a/Mac/Modules/icn/Icnmodule.c b/Mac/Modules/icn/Icnmodule.c index 4a5eda03249..5d68ed9fd6d 100644 --- a/Mac/Modules/icn/Icnmodule.c +++ b/Mac/Modules/icn/Icnmodule.c @@ -8,13 +8,16 @@ #include "macglue.h" #include "pymactoolbox.h" +#ifdef WITHOUT_FRAMEWORKS #include +#else +#include +#endif + static PyObject *Icn_Error; -static PyObject *Icn_GetCIcon(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Icn_GetCIcon(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; CIconHandle _rv; @@ -28,9 +31,7 @@ static PyObject *Icn_GetCIcon(_self, _args) return _res; } -static PyObject *Icn_PlotCIcon(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Icn_PlotCIcon(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Rect theRect; @@ -46,9 +47,7 @@ static PyObject *Icn_PlotCIcon(_self, _args) return _res; } -static PyObject *Icn_DisposeCIcon(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Icn_DisposeCIcon(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; CIconHandle theIcon; @@ -61,9 +60,7 @@ static PyObject *Icn_DisposeCIcon(_self, _args) return _res; } -static PyObject *Icn_GetIcon(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Icn_GetIcon(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Handle _rv; @@ -77,9 +74,7 @@ static PyObject *Icn_GetIcon(_self, _args) return _res; } -static PyObject *Icn_PlotIcon(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Icn_PlotIcon(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Rect theRect; @@ -95,9 +90,7 @@ static PyObject *Icn_PlotIcon(_self, _args) return _res; } -static PyObject *Icn_PlotIconID(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Icn_PlotIconID(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -121,9 +114,7 @@ static PyObject *Icn_PlotIconID(_self, _args) return _res; } -static PyObject *Icn_NewIconSuite(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Icn_NewIconSuite(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -137,9 +128,7 @@ static PyObject *Icn_NewIconSuite(_self, _args) return _res; } -static PyObject *Icn_AddIconToSuite(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Icn_AddIconToSuite(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -160,9 +149,7 @@ static PyObject *Icn_AddIconToSuite(_self, _args) return _res; } -static PyObject *Icn_GetIconFromSuite(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Icn_GetIconFromSuite(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -182,9 +169,7 @@ static PyObject *Icn_GetIconFromSuite(_self, _args) return _res; } -static PyObject *Icn_GetIconSuite(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Icn_GetIconSuite(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -204,9 +189,7 @@ static PyObject *Icn_GetIconSuite(_self, _args) return _res; } -static PyObject *Icn_DisposeIconSuite(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Icn_DisposeIconSuite(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -224,9 +207,7 @@ static PyObject *Icn_DisposeIconSuite(_self, _args) return _res; } -static PyObject *Icn_PlotIconSuite(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Icn_PlotIconSuite(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -250,9 +231,7 @@ static PyObject *Icn_PlotIconSuite(_self, _args) return _res; } -static PyObject *Icn_LoadIconCache(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Icn_LoadIconCache(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -276,9 +255,7 @@ static PyObject *Icn_LoadIconCache(_self, _args) return _res; } -static PyObject *Icn_GetLabel(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Icn_GetLabel(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -298,9 +275,7 @@ static PyObject *Icn_GetLabel(_self, _args) return _res; } -static PyObject *Icn_PtInIconID(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Icn_PtInIconID(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -323,9 +298,7 @@ static PyObject *Icn_PtInIconID(_self, _args) return _res; } -static PyObject *Icn_PtInIconSuite(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Icn_PtInIconSuite(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -348,9 +321,7 @@ static PyObject *Icn_PtInIconSuite(_self, _args) return _res; } -static PyObject *Icn_RectInIconID(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Icn_RectInIconID(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -373,9 +344,7 @@ static PyObject *Icn_RectInIconID(_self, _args) return _res; } -static PyObject *Icn_RectInIconSuite(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Icn_RectInIconSuite(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -398,9 +367,7 @@ static PyObject *Icn_RectInIconSuite(_self, _args) return _res; } -static PyObject *Icn_IconIDToRgn(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Icn_IconIDToRgn(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -424,9 +391,7 @@ static PyObject *Icn_IconIDToRgn(_self, _args) return _res; } -static PyObject *Icn_IconSuiteToRgn(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Icn_IconSuiteToRgn(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -450,9 +415,7 @@ static PyObject *Icn_IconSuiteToRgn(_self, _args) return _res; } -static PyObject *Icn_SetSuiteLabel(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Icn_SetSuiteLabel(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -470,9 +433,7 @@ static PyObject *Icn_SetSuiteLabel(_self, _args) return _res; } -static PyObject *Icn_GetSuiteLabel(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Icn_GetSuiteLabel(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; SInt16 _rv; @@ -486,9 +447,7 @@ static PyObject *Icn_GetSuiteLabel(_self, _args) return _res; } -static PyObject *Icn_PlotIconHandle(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Icn_PlotIconHandle(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -512,9 +471,7 @@ static PyObject *Icn_PlotIconHandle(_self, _args) return _res; } -static PyObject *Icn_PlotSICNHandle(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Icn_PlotSICNHandle(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -538,9 +495,7 @@ static PyObject *Icn_PlotSICNHandle(_self, _args) return _res; } -static PyObject *Icn_PlotCIconHandle(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Icn_PlotCIconHandle(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -566,9 +521,7 @@ static PyObject *Icn_PlotCIconHandle(_self, _args) #if !TARGET_API_MAC_CARBON -static PyObject *Icn_IconServicesTerminate(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Icn_IconServicesTerminate(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -580,9 +533,7 @@ static PyObject *Icn_IconServicesTerminate(_self, _args) } #endif -static PyObject *Icn_IconRefToIconFamily(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Icn_IconRefToIconFamily(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -602,9 +553,7 @@ static PyObject *Icn_IconRefToIconFamily(_self, _args) return _res; } -static PyObject *Icn_IconFamilyToIconSuite(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Icn_IconFamilyToIconSuite(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -624,9 +573,7 @@ static PyObject *Icn_IconFamilyToIconSuite(_self, _args) return _res; } -static PyObject *Icn_IconSuiteToIconFamily(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Icn_IconSuiteToIconFamily(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -646,9 +593,7 @@ static PyObject *Icn_IconSuiteToIconFamily(_self, _args) return _res; } -static PyObject *Icn_SetIconFamilyData(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Icn_SetIconFamilyData(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -669,9 +614,7 @@ static PyObject *Icn_SetIconFamilyData(_self, _args) return _res; } -static PyObject *Icn_GetIconFamilyData(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Icn_GetIconFamilyData(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -692,9 +635,7 @@ static PyObject *Icn_GetIconFamilyData(_self, _args) return _res; } -static PyObject *Icn_GetIconRefOwners(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Icn_GetIconRefOwners(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -711,9 +652,7 @@ static PyObject *Icn_GetIconRefOwners(_self, _args) return _res; } -static PyObject *Icn_AcquireIconRef(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Icn_AcquireIconRef(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -728,9 +667,7 @@ static PyObject *Icn_AcquireIconRef(_self, _args) return _res; } -static PyObject *Icn_ReleaseIconRef(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Icn_ReleaseIconRef(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -745,9 +682,7 @@ static PyObject *Icn_ReleaseIconRef(_self, _args) return _res; } -static PyObject *Icn_GetIconRefFromFile(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Icn_GetIconRefFromFile(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -767,9 +702,7 @@ static PyObject *Icn_GetIconRefFromFile(_self, _args) return _res; } -static PyObject *Icn_GetIconRef(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Icn_GetIconRef(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -792,9 +725,7 @@ static PyObject *Icn_GetIconRef(_self, _args) return _res; } -static PyObject *Icn_GetIconRefFromFolder(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Icn_GetIconRefFromFolder(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -823,9 +754,7 @@ static PyObject *Icn_GetIconRefFromFolder(_self, _args) return _res; } -static PyObject *Icn_RegisterIconRefFromIconFamily(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Icn_RegisterIconRefFromIconFamily(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -848,9 +777,7 @@ static PyObject *Icn_RegisterIconRefFromIconFamily(_self, _args) return _res; } -static PyObject *Icn_RegisterIconRefFromResource(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Icn_RegisterIconRefFromResource(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -876,9 +803,7 @@ static PyObject *Icn_RegisterIconRefFromResource(_self, _args) return _res; } -static PyObject *Icn_UnregisterIconRef(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Icn_UnregisterIconRef(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -896,9 +821,7 @@ static PyObject *Icn_UnregisterIconRef(_self, _args) return _res; } -static PyObject *Icn_UpdateIconRef(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Icn_UpdateIconRef(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -913,9 +836,7 @@ static PyObject *Icn_UpdateIconRef(_self, _args) return _res; } -static PyObject *Icn_OverrideIconRefFromResource(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Icn_OverrideIconRefFromResource(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -936,9 +857,7 @@ static PyObject *Icn_OverrideIconRefFromResource(_self, _args) return _res; } -static PyObject *Icn_OverrideIconRef(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Icn_OverrideIconRef(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -956,9 +875,7 @@ static PyObject *Icn_OverrideIconRef(_self, _args) return _res; } -static PyObject *Icn_RemoveIconRefOverride(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Icn_RemoveIconRefOverride(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -973,9 +890,7 @@ static PyObject *Icn_RemoveIconRefOverride(_self, _args) return _res; } -static PyObject *Icn_CompositeIconRef(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Icn_CompositeIconRef(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -995,9 +910,7 @@ static PyObject *Icn_CompositeIconRef(_self, _args) return _res; } -static PyObject *Icn_IsIconRefComposite(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Icn_IsIconRefComposite(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1017,9 +930,7 @@ static PyObject *Icn_IsIconRefComposite(_self, _args) return _res; } -static PyObject *Icn_IsValidIconRef(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Icn_IsValidIconRef(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -1033,9 +944,7 @@ static PyObject *Icn_IsValidIconRef(_self, _args) return _res; } -static PyObject *Icn_PlotIconRef(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Icn_PlotIconRef(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1062,9 +971,7 @@ static PyObject *Icn_PlotIconRef(_self, _args) return _res; } -static PyObject *Icn_PtInIconRef(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Icn_PtInIconRef(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -1090,9 +997,7 @@ static PyObject *Icn_PtInIconRef(_self, _args) return _res; } -static PyObject *Icn_RectInIconRef(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Icn_RectInIconRef(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -1118,9 +1023,7 @@ static PyObject *Icn_RectInIconRef(_self, _args) return _res; } -static PyObject *Icn_IconRefToRgn(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Icn_IconRefToRgn(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1147,9 +1050,7 @@ static PyObject *Icn_IconRefToRgn(_self, _args) return _res; } -static PyObject *Icn_GetIconSizesFromIconRef(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Icn_GetIconSizesFromIconRef(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1172,9 +1073,7 @@ static PyObject *Icn_GetIconSizesFromIconRef(_self, _args) return _res; } -static PyObject *Icn_FlushIconRefs(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Icn_FlushIconRefs(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1192,9 +1091,7 @@ static PyObject *Icn_FlushIconRefs(_self, _args) return _res; } -static PyObject *Icn_FlushIconRefsByVolume(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Icn_FlushIconRefsByVolume(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1209,9 +1106,7 @@ static PyObject *Icn_FlushIconRefsByVolume(_self, _args) return _res; } -static PyObject *Icn_SetCustomIconsEnabled(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Icn_SetCustomIconsEnabled(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1229,9 +1124,7 @@ static PyObject *Icn_SetCustomIconsEnabled(_self, _args) return _res; } -static PyObject *Icn_GetCustomIconsEnabled(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Icn_GetCustomIconsEnabled(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1248,9 +1141,7 @@ static PyObject *Icn_GetCustomIconsEnabled(_self, _args) return _res; } -static PyObject *Icn_IsIconRefMaskEmpty(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Icn_IsIconRefMaskEmpty(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -1266,9 +1157,7 @@ static PyObject *Icn_IsIconRefMaskEmpty(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *Icn_GetIconRefVariant(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Icn_GetIconRefVariant(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; IconRef _rv; @@ -1291,9 +1180,7 @@ static PyObject *Icn_GetIconRefVariant(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *Icn_RegisterIconRefFromIconFile(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Icn_RegisterIconRefFromIconFile(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1319,9 +1206,7 @@ static PyObject *Icn_RegisterIconRefFromIconFile(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *Icn_ReadIconFile(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Icn_ReadIconFile(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1341,9 +1226,7 @@ static PyObject *Icn_ReadIconFile(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *Icn_WriteIconFile(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Icn_WriteIconFile(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1506,7 +1389,7 @@ static PyMethodDef Icn_methods[] = { -void initIcn() +void initIcn(void) { PyObject *m; PyObject *d; diff --git a/Mac/Modules/icn/icnsupport.py b/Mac/Modules/icn/icnsupport.py index 5ea6a455630..bfdc555ca0f 100644 --- a/Mac/Modules/icn/icnsupport.py +++ b/Mac/Modules/icn/icnsupport.py @@ -46,7 +46,12 @@ RGBColor = OpaqueType("RGBColor", "QdRGB") #EventKind = Type("EventKind", "H") includestuff = includestuff + """ -#include <%s>""" % MACHEADERFILE + """ +#ifdef WITHOUT_FRAMEWORKS +#include +#else +#include +#endif + """ class MyObjectDefinition(GlobalObjectDefinition): diff --git a/Mac/Modules/list/Listmodule.c b/Mac/Modules/list/Listmodule.c index 53d070f07dd..6e286134129 100644 --- a/Mac/Modules/list/Listmodule.c +++ b/Mac/Modules/list/Listmodule.c @@ -8,8 +8,11 @@ #include "macglue.h" #include "pymactoolbox.h" +#ifdef WITHOUT_FRAMEWORKS #include - +#else +#include +#endif #ifdef USE_TOOLBOX_OBJECT_GLUE extern PyObject *_ListObj_New(ListHandle); @@ -61,8 +64,7 @@ typedef struct ListObject { int ob_must_be_disposed; } ListObject; -PyObject *ListObj_New(itself) - ListHandle itself; +PyObject *ListObj_New(ListHandle itself) { ListObject *it; if (itself == NULL) { @@ -75,9 +77,7 @@ PyObject *ListObj_New(itself) it->ob_must_be_disposed = 1; return (PyObject *)it; } -ListObj_Convert(v, p_itself) - PyObject *v; - ListHandle *p_itself; +ListObj_Convert(PyObject *v, ListHandle *p_itself) { if (!ListObj_Check(v)) { @@ -88,16 +88,13 @@ ListObj_Convert(v, p_itself) return 1; } -static void ListObj_dealloc(self) - ListObject *self; +static void ListObj_dealloc(ListObject *self) { if (self->ob_must_be_disposed && self->ob_itself) LDispose(self->ob_itself); PyMem_DEL(self); } -static PyObject *ListObj_LAddColumn(_self, _args) - ListObject *_self; - PyObject *_args; +static PyObject *ListObj_LAddColumn(ListObject *_self, PyObject *_args) { PyObject *_res = NULL; short _rv; @@ -115,9 +112,7 @@ static PyObject *ListObj_LAddColumn(_self, _args) return _res; } -static PyObject *ListObj_LAddRow(_self, _args) - ListObject *_self; - PyObject *_args; +static PyObject *ListObj_LAddRow(ListObject *_self, PyObject *_args) { PyObject *_res = NULL; short _rv; @@ -135,9 +130,7 @@ static PyObject *ListObj_LAddRow(_self, _args) return _res; } -static PyObject *ListObj_LDelColumn(_self, _args) - ListObject *_self; - PyObject *_args; +static PyObject *ListObj_LDelColumn(ListObject *_self, PyObject *_args) { PyObject *_res = NULL; short count; @@ -154,9 +147,7 @@ static PyObject *ListObj_LDelColumn(_self, _args) return _res; } -static PyObject *ListObj_LDelRow(_self, _args) - ListObject *_self; - PyObject *_args; +static PyObject *ListObj_LDelRow(ListObject *_self, PyObject *_args) { PyObject *_res = NULL; short count; @@ -173,9 +164,7 @@ static PyObject *ListObj_LDelRow(_self, _args) return _res; } -static PyObject *ListObj_LGetSelect(_self, _args) - ListObject *_self; - PyObject *_args; +static PyObject *ListObj_LGetSelect(ListObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -194,9 +183,7 @@ static PyObject *ListObj_LGetSelect(_self, _args) return _res; } -static PyObject *ListObj_LLastClick(_self, _args) - ListObject *_self; - PyObject *_args; +static PyObject *ListObj_LLastClick(ListObject *_self, PyObject *_args) { PyObject *_res = NULL; Point _rv; @@ -208,9 +195,7 @@ static PyObject *ListObj_LLastClick(_self, _args) return _res; } -static PyObject *ListObj_LNextCell(_self, _args) - ListObject *_self; - PyObject *_args; +static PyObject *ListObj_LNextCell(ListObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -232,9 +217,7 @@ static PyObject *ListObj_LNextCell(_self, _args) return _res; } -static PyObject *ListObj_LSize(_self, _args) - ListObject *_self; - PyObject *_args; +static PyObject *ListObj_LSize(ListObject *_self, PyObject *_args) { PyObject *_res = NULL; short listWidth; @@ -251,9 +234,7 @@ static PyObject *ListObj_LSize(_self, _args) return _res; } -static PyObject *ListObj_LSetDrawingMode(_self, _args) - ListObject *_self; - PyObject *_args; +static PyObject *ListObj_LSetDrawingMode(ListObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean drawIt; @@ -267,9 +248,7 @@ static PyObject *ListObj_LSetDrawingMode(_self, _args) return _res; } -static PyObject *ListObj_LScroll(_self, _args) - ListObject *_self; - PyObject *_args; +static PyObject *ListObj_LScroll(ListObject *_self, PyObject *_args) { PyObject *_res = NULL; short dCols; @@ -286,9 +265,7 @@ static PyObject *ListObj_LScroll(_self, _args) return _res; } -static PyObject *ListObj_LAutoScroll(_self, _args) - ListObject *_self; - PyObject *_args; +static PyObject *ListObj_LAutoScroll(ListObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -299,9 +276,7 @@ static PyObject *ListObj_LAutoScroll(_self, _args) return _res; } -static PyObject *ListObj_LUpdate(_self, _args) - ListObject *_self; - PyObject *_args; +static PyObject *ListObj_LUpdate(ListObject *_self, PyObject *_args) { PyObject *_res = NULL; RgnHandle theRgn; @@ -315,9 +290,7 @@ static PyObject *ListObj_LUpdate(_self, _args) return _res; } -static PyObject *ListObj_LActivate(_self, _args) - ListObject *_self; - PyObject *_args; +static PyObject *ListObj_LActivate(ListObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean act; @@ -331,9 +304,7 @@ static PyObject *ListObj_LActivate(_self, _args) return _res; } -static PyObject *ListObj_LCellSize(_self, _args) - ListObject *_self; - PyObject *_args; +static PyObject *ListObj_LCellSize(ListObject *_self, PyObject *_args) { PyObject *_res = NULL; Point cSize; @@ -347,9 +318,7 @@ static PyObject *ListObj_LCellSize(_self, _args) return _res; } -static PyObject *ListObj_LClick(_self, _args) - ListObject *_self; - PyObject *_args; +static PyObject *ListObj_LClick(ListObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -367,9 +336,7 @@ static PyObject *ListObj_LClick(_self, _args) return _res; } -static PyObject *ListObj_LAddToCell(_self, _args) - ListObject *_self; - PyObject *_args; +static PyObject *ListObj_LAddToCell(ListObject *_self, PyObject *_args) { PyObject *_res = NULL; char *dataPtr__in__; @@ -390,9 +357,7 @@ static PyObject *ListObj_LAddToCell(_self, _args) return _res; } -static PyObject *ListObj_LClrCell(_self, _args) - ListObject *_self; - PyObject *_args; +static PyObject *ListObj_LClrCell(ListObject *_self, PyObject *_args) { PyObject *_res = NULL; Point theCell; @@ -406,9 +371,7 @@ static PyObject *ListObj_LClrCell(_self, _args) return _res; } -static PyObject *ListObj_LGetCell(_self, _args) - ListObject *_self; - PyObject *_args; +static PyObject *ListObj_LGetCell(ListObject *_self, PyObject *_args) { PyObject *_res = NULL; char *dataPtr__out__; @@ -435,9 +398,7 @@ static PyObject *ListObj_LGetCell(_self, _args) return _res; } -static PyObject *ListObj_LRect(_self, _args) - ListObject *_self; - PyObject *_args; +static PyObject *ListObj_LRect(ListObject *_self, PyObject *_args) { PyObject *_res = NULL; Rect cellRect; @@ -453,9 +414,7 @@ static PyObject *ListObj_LRect(_self, _args) return _res; } -static PyObject *ListObj_LSetCell(_self, _args) - ListObject *_self; - PyObject *_args; +static PyObject *ListObj_LSetCell(ListObject *_self, PyObject *_args) { PyObject *_res = NULL; char *dataPtr__in__; @@ -476,9 +435,7 @@ static PyObject *ListObj_LSetCell(_self, _args) return _res; } -static PyObject *ListObj_LSetSelect(_self, _args) - ListObject *_self; - PyObject *_args; +static PyObject *ListObj_LSetSelect(ListObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean setIt; @@ -495,9 +452,7 @@ static PyObject *ListObj_LSetSelect(_self, _args) return _res; } -static PyObject *ListObj_LDraw(_self, _args) - ListObject *_self; - PyObject *_args; +static PyObject *ListObj_LDraw(ListObject *_self, PyObject *_args) { PyObject *_res = NULL; Point theCell; @@ -511,9 +466,7 @@ static PyObject *ListObj_LDraw(_self, _args) return _res; } -static PyObject *ListObj_as_Resource(_self, _args) - ListObject *_self; - PyObject *_args; +static PyObject *ListObj_as_Resource(ListObject *_self, PyObject *_args) { PyObject *_res = NULL; Handle _rv; @@ -577,9 +530,7 @@ static PyMethodDef ListObj_methods[] = { PyMethodChain ListObj_chain = { ListObj_methods, NULL }; -static PyObject *ListObj_getattr(self, name) - ListObject *self; - char *name; +static PyObject *ListObj_getattr(ListObject *self, char *name) { { /* XXXX Should we HLock() here?? */ @@ -592,10 +543,7 @@ static PyObject *ListObj_getattr(self, name) } static int -ListObj_setattr(self, name, value) - ListObject *self; - char *name; - PyObject *value; +ListObj_setattr(ListObject *self, char *name, PyObject *value) { long intval; @@ -643,9 +591,7 @@ PyTypeObject List_Type = { /* ---------------------- End object type List ---------------------- */ -static PyObject *List_LNew(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *List_LNew(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ListHandle _rv; @@ -683,9 +629,7 @@ static PyObject *List_LNew(_self, _args) return _res; } -static PyObject *List_GetListPort(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *List_GetListPort(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; CGrafPtr _rv; @@ -699,9 +643,7 @@ static PyObject *List_GetListPort(_self, _args) return _res; } -static PyObject *List_GetListVerticalScrollBar(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *List_GetListVerticalScrollBar(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ControlHandle _rv; @@ -715,9 +657,7 @@ static PyObject *List_GetListVerticalScrollBar(_self, _args) return _res; } -static PyObject *List_GetListHorizontalScrollBar(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *List_GetListHorizontalScrollBar(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ControlHandle _rv; @@ -731,9 +671,7 @@ static PyObject *List_GetListHorizontalScrollBar(_self, _args) return _res; } -static PyObject *List_GetListActive(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *List_GetListActive(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -747,9 +685,7 @@ static PyObject *List_GetListActive(_self, _args) return _res; } -static PyObject *List_GetListClickTime(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *List_GetListClickTime(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; SInt32 _rv; @@ -763,9 +699,7 @@ static PyObject *List_GetListClickTime(_self, _args) return _res; } -static PyObject *List_GetListRefCon(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *List_GetListRefCon(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; SInt32 _rv; @@ -779,9 +713,7 @@ static PyObject *List_GetListRefCon(_self, _args) return _res; } -static PyObject *List_GetListDefinition(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *List_GetListDefinition(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Handle _rv; @@ -795,9 +727,7 @@ static PyObject *List_GetListDefinition(_self, _args) return _res; } -static PyObject *List_GetListUserHandle(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *List_GetListUserHandle(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Handle _rv; @@ -811,9 +741,7 @@ static PyObject *List_GetListUserHandle(_self, _args) return _res; } -static PyObject *List_GetListDataHandle(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *List_GetListDataHandle(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; DataHandle _rv; @@ -827,9 +755,7 @@ static PyObject *List_GetListDataHandle(_self, _args) return _res; } -static PyObject *List_GetListFlags(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *List_GetListFlags(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OptionBits _rv; @@ -843,9 +769,7 @@ static PyObject *List_GetListFlags(_self, _args) return _res; } -static PyObject *List_GetListSelectionFlags(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *List_GetListSelectionFlags(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OptionBits _rv; @@ -859,9 +783,7 @@ static PyObject *List_GetListSelectionFlags(_self, _args) return _res; } -static PyObject *List_SetListViewBounds(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *List_SetListViewBounds(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ListHandle list; @@ -877,9 +799,7 @@ static PyObject *List_SetListViewBounds(_self, _args) return _res; } -static PyObject *List_SetListPort(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *List_SetListPort(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ListHandle list; @@ -895,9 +815,7 @@ static PyObject *List_SetListPort(_self, _args) return _res; } -static PyObject *List_SetListCellIndent(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *List_SetListCellIndent(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ListHandle list; @@ -913,9 +831,7 @@ static PyObject *List_SetListCellIndent(_self, _args) return _res; } -static PyObject *List_SetListClickTime(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *List_SetListClickTime(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ListHandle list; @@ -931,9 +847,7 @@ static PyObject *List_SetListClickTime(_self, _args) return _res; } -static PyObject *List_SetListRefCon(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *List_SetListRefCon(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ListHandle list; @@ -949,9 +863,7 @@ static PyObject *List_SetListRefCon(_self, _args) return _res; } -static PyObject *List_SetListUserHandle(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *List_SetListUserHandle(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ListHandle list; @@ -967,9 +879,7 @@ static PyObject *List_SetListUserHandle(_self, _args) return _res; } -static PyObject *List_SetListFlags(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *List_SetListFlags(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ListHandle list; @@ -985,9 +895,7 @@ static PyObject *List_SetListFlags(_self, _args) return _res; } -static PyObject *List_SetListSelectionFlags(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *List_SetListSelectionFlags(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ListHandle list; @@ -1003,9 +911,7 @@ static PyObject *List_SetListSelectionFlags(_self, _args) return _res; } -static PyObject *List_as_List(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *List_as_List(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; @@ -1068,15 +974,15 @@ static PyMethodDef List_methods[] = { -void initList() +void initList(void) { PyObject *m; PyObject *d; - PyMac_INIT_TOOLBOX_OBJECT_NEW(ListObj_New); - PyMac_INIT_TOOLBOX_OBJECT_CONVERT(ListObj_Convert); + PyMac_INIT_TOOLBOX_OBJECT_NEW(ListHandle, ListObj_New); + PyMac_INIT_TOOLBOX_OBJECT_CONVERT(ListHandle, ListObj_Convert); m = Py_InitModule("List", List_methods); diff --git a/Mac/Modules/list/listsupport.py b/Mac/Modules/list/listsupport.py index 751f16b1484..d5ddd5b770b 100644 --- a/Mac/Modules/list/listsupport.py +++ b/Mac/Modules/list/listsupport.py @@ -35,8 +35,11 @@ Handle = OpaqueByValueType("Handle", "ResObj") CGrafPtr = OpaqueByValueType("CGrafPtr", "GrafObj") includestuff = includestuff + """ -#include <%s>""" % MACHEADERFILE + """ - +#ifdef WITHOUT_FRAMEWORKS +#include +#else +#include +#endif #ifdef USE_TOOLBOX_OBJECT_GLUE extern PyObject *_ListObj_New(ListHandle); @@ -76,8 +79,8 @@ extern int _ListObj_Convert(PyObject *, ListHandle *); """ initstuff = initstuff + """ - PyMac_INIT_TOOLBOX_OBJECT_NEW(ListObj_New); - PyMac_INIT_TOOLBOX_OBJECT_CONVERT(ListObj_Convert); + PyMac_INIT_TOOLBOX_OBJECT_NEW(ListHandle, ListObj_New); + PyMac_INIT_TOOLBOX_OBJECT_CONVERT(ListHandle, ListObj_Convert); """ class ListMethodGenerator(MethodGenerator): @@ -102,10 +105,7 @@ getattrHookCode = """{ setattrCode = """ static int -ListObj_setattr(self, name, value) - ListObject *self; - char *name; - PyObject *value; +ListObj_setattr(ListObject *self, char *name, PyObject *value) { long intval; diff --git a/Mac/Modules/menu/Menumodule.c b/Mac/Modules/menu/Menumodule.c index f965586252f..f3c2df96a85 100644 --- a/Mac/Modules/menu/Menumodule.c +++ b/Mac/Modules/menu/Menumodule.c @@ -8,8 +8,13 @@ #include "macglue.h" #include "pymactoolbox.h" +#ifdef WITHOUT_FRAMEWORKS #include /* Defines OpenDeskAcc in universal headers */ #include +#else +#include +#endif + #ifdef USE_TOOLBOX_OBJECT_GLUE @@ -46,8 +51,7 @@ typedef struct MenuObject { MenuHandle ob_itself; } MenuObject; -PyObject *MenuObj_New(itself) - MenuHandle itself; +PyObject *MenuObj_New(MenuHandle itself) { MenuObject *it; it = PyObject_NEW(MenuObject, &Menu_Type); @@ -55,9 +59,7 @@ PyObject *MenuObj_New(itself) it->ob_itself = itself; return (PyObject *)it; } -MenuObj_Convert(v, p_itself) - PyObject *v; - MenuHandle *p_itself; +MenuObj_Convert(PyObject *v, MenuHandle *p_itself) { if (!MenuObj_Check(v)) { @@ -68,16 +70,13 @@ MenuObj_Convert(v, p_itself) return 1; } -static void MenuObj_dealloc(self) - MenuObject *self; +static void MenuObj_dealloc(MenuObject *self) { /* Cleanup of self->ob_itself goes here */ PyMem_DEL(self); } -static PyObject *MenuObj_DisposeMenu(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_DisposeMenu(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -88,9 +87,7 @@ static PyObject *MenuObj_DisposeMenu(_self, _args) return _res; } -static PyObject *MenuObj_CalcMenuSize(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_CalcMenuSize(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -101,9 +98,7 @@ static PyObject *MenuObj_CalcMenuSize(_self, _args) return _res; } -static PyObject *MenuObj_CountMenuItems(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_CountMenuItems(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; short _rv; @@ -117,9 +112,7 @@ static PyObject *MenuObj_CountMenuItems(_self, _args) #if !TARGET_API_MAC_CARBON -static PyObject *MenuObj_CountMItems(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_CountMItems(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; short _rv; @@ -132,9 +125,7 @@ static PyObject *MenuObj_CountMItems(_self, _args) } #endif -static PyObject *MenuObj_GetMenuFont(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_GetMenuFont(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -152,9 +143,7 @@ static PyObject *MenuObj_GetMenuFont(_self, _args) return _res; } -static PyObject *MenuObj_SetMenuFont(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_SetMenuFont(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -173,9 +162,7 @@ static PyObject *MenuObj_SetMenuFont(_self, _args) return _res; } -static PyObject *MenuObj_GetMenuExcludesMarkColumn(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_GetMenuExcludesMarkColumn(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -187,9 +174,7 @@ static PyObject *MenuObj_GetMenuExcludesMarkColumn(_self, _args) return _res; } -static PyObject *MenuObj_SetMenuExcludesMarkColumn(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_SetMenuExcludesMarkColumn(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -205,9 +190,7 @@ static PyObject *MenuObj_SetMenuExcludesMarkColumn(_self, _args) return _res; } -static PyObject *MenuObj_MacAppendMenu(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_MacAppendMenu(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; Str255 data; @@ -221,9 +204,7 @@ static PyObject *MenuObj_MacAppendMenu(_self, _args) return _res; } -static PyObject *MenuObj_InsertResMenu(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_InsertResMenu(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; ResType theType; @@ -240,9 +221,7 @@ static PyObject *MenuObj_InsertResMenu(_self, _args) return _res; } -static PyObject *MenuObj_AppendResMenu(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_AppendResMenu(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; ResType theType; @@ -256,9 +235,7 @@ static PyObject *MenuObj_AppendResMenu(_self, _args) return _res; } -static PyObject *MenuObj_MacInsertMenuItem(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_MacInsertMenuItem(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; Str255 itemString; @@ -275,9 +252,7 @@ static PyObject *MenuObj_MacInsertMenuItem(_self, _args) return _res; } -static PyObject *MenuObj_DeleteMenuItem(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_DeleteMenuItem(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; short item; @@ -291,9 +266,7 @@ static PyObject *MenuObj_DeleteMenuItem(_self, _args) return _res; } -static PyObject *MenuObj_InsertFontResMenu(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_InsertFontResMenu(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; short afterItem; @@ -310,9 +283,7 @@ static PyObject *MenuObj_InsertFontResMenu(_self, _args) return _res; } -static PyObject *MenuObj_InsertIntlResMenu(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_InsertIntlResMenu(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; ResType theType; @@ -332,9 +303,7 @@ static PyObject *MenuObj_InsertIntlResMenu(_self, _args) return _res; } -static PyObject *MenuObj_AppendMenuItemText(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_AppendMenuItemText(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -350,9 +319,7 @@ static PyObject *MenuObj_AppendMenuItemText(_self, _args) return _res; } -static PyObject *MenuObj_InsertMenuItemText(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_InsertMenuItemText(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -371,9 +338,7 @@ static PyObject *MenuObj_InsertMenuItemText(_self, _args) return _res; } -static PyObject *MenuObj_PopUpMenuSelect(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_PopUpMenuSelect(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; long _rv; @@ -394,9 +359,7 @@ static PyObject *MenuObj_PopUpMenuSelect(_self, _args) return _res; } -static PyObject *MenuObj_MacInsertMenu(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_MacInsertMenu(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; MenuID beforeID; @@ -410,9 +373,7 @@ static PyObject *MenuObj_MacInsertMenu(_self, _args) return _res; } -static PyObject *MenuObj_MacCheckMenuItem(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_MacCheckMenuItem(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; short item; @@ -431,9 +392,7 @@ static PyObject *MenuObj_MacCheckMenuItem(_self, _args) #if !TARGET_API_MAC_CARBON -static PyObject *MenuObj_CheckItem(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_CheckItem(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; short item; @@ -451,9 +410,7 @@ static PyObject *MenuObj_CheckItem(_self, _args) } #endif -static PyObject *MenuObj_SetMenuItemText(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_SetMenuItemText(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; short item; @@ -470,9 +427,7 @@ static PyObject *MenuObj_SetMenuItemText(_self, _args) return _res; } -static PyObject *MenuObj_GetMenuItemText(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_GetMenuItemText(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; short item; @@ -488,9 +443,7 @@ static PyObject *MenuObj_GetMenuItemText(_self, _args) return _res; } -static PyObject *MenuObj_SetItemMark(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_SetItemMark(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; short item; @@ -507,9 +460,7 @@ static PyObject *MenuObj_SetItemMark(_self, _args) return _res; } -static PyObject *MenuObj_GetItemMark(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_GetItemMark(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; short item; @@ -525,9 +476,7 @@ static PyObject *MenuObj_GetItemMark(_self, _args) return _res; } -static PyObject *MenuObj_SetItemCmd(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_SetItemCmd(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; short item; @@ -544,9 +493,7 @@ static PyObject *MenuObj_SetItemCmd(_self, _args) return _res; } -static PyObject *MenuObj_GetItemCmd(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_GetItemCmd(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; short item; @@ -562,9 +509,7 @@ static PyObject *MenuObj_GetItemCmd(_self, _args) return _res; } -static PyObject *MenuObj_SetItemIcon(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_SetItemIcon(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; short item; @@ -581,9 +526,7 @@ static PyObject *MenuObj_SetItemIcon(_self, _args) return _res; } -static PyObject *MenuObj_GetItemIcon(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_GetItemIcon(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; short item; @@ -599,9 +542,7 @@ static PyObject *MenuObj_GetItemIcon(_self, _args) return _res; } -static PyObject *MenuObj_SetItemStyle(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_SetItemStyle(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; short item; @@ -618,9 +559,7 @@ static PyObject *MenuObj_SetItemStyle(_self, _args) return _res; } -static PyObject *MenuObj_GetItemStyle(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_GetItemStyle(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; short item; @@ -638,9 +577,7 @@ static PyObject *MenuObj_GetItemStyle(_self, _args) #if !TARGET_API_MAC_CARBON -static PyObject *MenuObj_DisableItem(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_DisableItem(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; short item; @@ -657,9 +594,7 @@ static PyObject *MenuObj_DisableItem(_self, _args) #if !TARGET_API_MAC_CARBON -static PyObject *MenuObj_EnableItem(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_EnableItem(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; short item; @@ -674,9 +609,7 @@ static PyObject *MenuObj_EnableItem(_self, _args) } #endif -static PyObject *MenuObj_SetMenuItemCommandID(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_SetMenuItemCommandID(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -695,9 +628,7 @@ static PyObject *MenuObj_SetMenuItemCommandID(_self, _args) return _res; } -static PyObject *MenuObj_GetMenuItemCommandID(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_GetMenuItemCommandID(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -715,9 +646,7 @@ static PyObject *MenuObj_GetMenuItemCommandID(_self, _args) return _res; } -static PyObject *MenuObj_SetMenuItemModifiers(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_SetMenuItemModifiers(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -736,9 +665,7 @@ static PyObject *MenuObj_SetMenuItemModifiers(_self, _args) return _res; } -static PyObject *MenuObj_GetMenuItemModifiers(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_GetMenuItemModifiers(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -756,9 +683,7 @@ static PyObject *MenuObj_GetMenuItemModifiers(_self, _args) return _res; } -static PyObject *MenuObj_SetMenuItemIconHandle(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_SetMenuItemIconHandle(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -780,9 +705,7 @@ static PyObject *MenuObj_SetMenuItemIconHandle(_self, _args) return _res; } -static PyObject *MenuObj_GetMenuItemIconHandle(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_GetMenuItemIconHandle(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -803,9 +726,7 @@ static PyObject *MenuObj_GetMenuItemIconHandle(_self, _args) return _res; } -static PyObject *MenuObj_SetMenuItemTextEncoding(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_SetMenuItemTextEncoding(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -824,9 +745,7 @@ static PyObject *MenuObj_SetMenuItemTextEncoding(_self, _args) return _res; } -static PyObject *MenuObj_GetMenuItemTextEncoding(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_GetMenuItemTextEncoding(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -844,9 +763,7 @@ static PyObject *MenuObj_GetMenuItemTextEncoding(_self, _args) return _res; } -static PyObject *MenuObj_SetMenuItemHierarchicalID(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_SetMenuItemHierarchicalID(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -865,9 +782,7 @@ static PyObject *MenuObj_SetMenuItemHierarchicalID(_self, _args) return _res; } -static PyObject *MenuObj_GetMenuItemHierarchicalID(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_GetMenuItemHierarchicalID(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -885,9 +800,7 @@ static PyObject *MenuObj_GetMenuItemHierarchicalID(_self, _args) return _res; } -static PyObject *MenuObj_SetMenuItemFontID(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_SetMenuItemFontID(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -906,9 +819,7 @@ static PyObject *MenuObj_SetMenuItemFontID(_self, _args) return _res; } -static PyObject *MenuObj_GetMenuItemFontID(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_GetMenuItemFontID(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -926,9 +837,7 @@ static PyObject *MenuObj_GetMenuItemFontID(_self, _args) return _res; } -static PyObject *MenuObj_SetMenuItemRefCon(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_SetMenuItemRefCon(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -947,9 +856,7 @@ static PyObject *MenuObj_SetMenuItemRefCon(_self, _args) return _res; } -static PyObject *MenuObj_GetMenuItemRefCon(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_GetMenuItemRefCon(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -969,9 +876,7 @@ static PyObject *MenuObj_GetMenuItemRefCon(_self, _args) #if !TARGET_API_MAC_CARBON -static PyObject *MenuObj_SetMenuItemRefCon2(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_SetMenuItemRefCon2(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -993,9 +898,7 @@ static PyObject *MenuObj_SetMenuItemRefCon2(_self, _args) #if !TARGET_API_MAC_CARBON -static PyObject *MenuObj_GetMenuItemRefCon2(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_GetMenuItemRefCon2(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1014,9 +917,7 @@ static PyObject *MenuObj_GetMenuItemRefCon2(_self, _args) } #endif -static PyObject *MenuObj_SetMenuItemKeyGlyph(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_SetMenuItemKeyGlyph(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1035,9 +936,7 @@ static PyObject *MenuObj_SetMenuItemKeyGlyph(_self, _args) return _res; } -static PyObject *MenuObj_GetMenuItemKeyGlyph(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_GetMenuItemKeyGlyph(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1055,9 +954,7 @@ static PyObject *MenuObj_GetMenuItemKeyGlyph(_self, _args) return _res; } -static PyObject *MenuObj_MacEnableMenuItem(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_MacEnableMenuItem(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; MenuItemIndex item; @@ -1071,9 +968,7 @@ static PyObject *MenuObj_MacEnableMenuItem(_self, _args) return _res; } -static PyObject *MenuObj_DisableMenuItem(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_DisableMenuItem(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; MenuItemIndex item; @@ -1087,9 +982,7 @@ static PyObject *MenuObj_DisableMenuItem(_self, _args) return _res; } -static PyObject *MenuObj_IsMenuItemEnabled(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_IsMenuItemEnabled(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -1104,9 +997,7 @@ static PyObject *MenuObj_IsMenuItemEnabled(_self, _args) return _res; } -static PyObject *MenuObj_EnableMenuItemIcon(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_EnableMenuItemIcon(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; MenuItemIndex item; @@ -1120,9 +1011,7 @@ static PyObject *MenuObj_EnableMenuItemIcon(_self, _args) return _res; } -static PyObject *MenuObj_DisableMenuItemIcon(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_DisableMenuItemIcon(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; MenuItemIndex item; @@ -1136,9 +1025,7 @@ static PyObject *MenuObj_DisableMenuItemIcon(_self, _args) return _res; } -static PyObject *MenuObj_IsMenuItemIconEnabled(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_IsMenuItemIconEnabled(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -1155,9 +1042,7 @@ static PyObject *MenuObj_IsMenuItemIconEnabled(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *MenuObj_GetMenuItemPropertyAttributes(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_GetMenuItemPropertyAttributes(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -1184,9 +1069,7 @@ static PyObject *MenuObj_GetMenuItemPropertyAttributes(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *MenuObj_ChangeMenuItemPropertyAttributes(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_ChangeMenuItemPropertyAttributes(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -1217,9 +1100,7 @@ static PyObject *MenuObj_ChangeMenuItemPropertyAttributes(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *MenuObj_GetMenuAttributes(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_GetMenuAttributes(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -1237,9 +1118,7 @@ static PyObject *MenuObj_GetMenuAttributes(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *MenuObj_ChangeMenuAttributes(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_ChangeMenuAttributes(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -1261,9 +1140,7 @@ static PyObject *MenuObj_ChangeMenuAttributes(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *MenuObj_GetMenuItemAttributes(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_GetMenuItemAttributes(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -1284,9 +1161,7 @@ static PyObject *MenuObj_GetMenuItemAttributes(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *MenuObj_ChangeMenuItemAttributes(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_ChangeMenuItemAttributes(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -1311,9 +1186,7 @@ static PyObject *MenuObj_ChangeMenuItemAttributes(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *MenuObj_DisableAllMenuItems(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_DisableAllMenuItems(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -1327,9 +1200,7 @@ static PyObject *MenuObj_DisableAllMenuItems(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *MenuObj_EnableAllMenuItems(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_EnableAllMenuItems(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -1343,9 +1214,7 @@ static PyObject *MenuObj_EnableAllMenuItems(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *MenuObj_MenuHasEnabledItems(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_MenuHasEnabledItems(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -1360,9 +1229,7 @@ static PyObject *MenuObj_MenuHasEnabledItems(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *MenuObj_CountMenuItemsWithCommandID(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_CountMenuItemsWithCommandID(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; ItemCount _rv; @@ -1380,9 +1247,7 @@ static PyObject *MenuObj_CountMenuItemsWithCommandID(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *MenuObj_GetIndMenuItemWithCommandID(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_GetIndMenuItemWithCommandID(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -1409,9 +1274,7 @@ static PyObject *MenuObj_GetIndMenuItemWithCommandID(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *MenuObj_EnableMenuCommand(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_EnableMenuCommand(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; MenuCommand commandID; @@ -1428,9 +1291,7 @@ static PyObject *MenuObj_EnableMenuCommand(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *MenuObj_DisableMenuCommand(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_DisableMenuCommand(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; MenuCommand commandID; @@ -1447,9 +1308,7 @@ static PyObject *MenuObj_DisableMenuCommand(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *MenuObj_IsMenuCommandEnabled(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_IsMenuCommandEnabled(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -1467,9 +1326,7 @@ static PyObject *MenuObj_IsMenuCommandEnabled(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *MenuObj_GetMenuCommandPropertySize(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_GetMenuCommandPropertySize(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -1496,9 +1353,7 @@ static PyObject *MenuObj_GetMenuCommandPropertySize(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *MenuObj_RemoveMenuCommandProperty(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_RemoveMenuCommandProperty(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -1523,9 +1378,7 @@ static PyObject *MenuObj_RemoveMenuCommandProperty(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *MenuObj_CreateStandardFontMenu(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_CreateStandardFontMenu(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -1552,9 +1405,7 @@ static PyObject *MenuObj_CreateStandardFontMenu(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *MenuObj_UpdateStandardFontMenu(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_UpdateStandardFontMenu(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -1572,9 +1423,7 @@ static PyObject *MenuObj_UpdateStandardFontMenu(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *MenuObj_GetFontFamilyFromMenuSelection(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_GetFontFamilyFromMenuSelection(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -1596,9 +1445,7 @@ static PyObject *MenuObj_GetFontFamilyFromMenuSelection(_self, _args) } #endif -static PyObject *MenuObj_GetMenuID(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_GetMenuID(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; MenuID _rv; @@ -1610,9 +1457,7 @@ static PyObject *MenuObj_GetMenuID(_self, _args) return _res; } -static PyObject *MenuObj_GetMenuWidth(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_GetMenuWidth(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; SInt16 _rv; @@ -1624,9 +1469,7 @@ static PyObject *MenuObj_GetMenuWidth(_self, _args) return _res; } -static PyObject *MenuObj_GetMenuHeight(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_GetMenuHeight(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; SInt16 _rv; @@ -1638,9 +1481,7 @@ static PyObject *MenuObj_GetMenuHeight(_self, _args) return _res; } -static PyObject *MenuObj_SetMenuID(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_SetMenuID(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; MenuID menuID; @@ -1654,9 +1495,7 @@ static PyObject *MenuObj_SetMenuID(_self, _args) return _res; } -static PyObject *MenuObj_SetMenuWidth(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_SetMenuWidth(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; SInt16 width; @@ -1670,9 +1509,7 @@ static PyObject *MenuObj_SetMenuWidth(_self, _args) return _res; } -static PyObject *MenuObj_SetMenuHeight(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_SetMenuHeight(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; SInt16 height; @@ -1686,9 +1523,7 @@ static PyObject *MenuObj_SetMenuHeight(_self, _args) return _res; } -static PyObject *MenuObj_as_Resource(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_as_Resource(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; Handle _rv; @@ -1700,9 +1535,7 @@ static PyObject *MenuObj_as_Resource(_self, _args) return _res; } -static PyObject *MenuObj_AppendMenu(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_AppendMenu(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; Str255 data; @@ -1716,9 +1549,7 @@ static PyObject *MenuObj_AppendMenu(_self, _args) return _res; } -static PyObject *MenuObj_InsertMenu(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_InsertMenu(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; short beforeID; @@ -1732,9 +1563,7 @@ static PyObject *MenuObj_InsertMenu(_self, _args) return _res; } -static PyObject *MenuObj_InsertMenuItem(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_InsertMenuItem(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; Str255 itemString; @@ -1751,9 +1580,7 @@ static PyObject *MenuObj_InsertMenuItem(_self, _args) return _res; } -static PyObject *MenuObj_EnableMenuItem(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_EnableMenuItem(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; UInt16 item; @@ -1767,9 +1594,7 @@ static PyObject *MenuObj_EnableMenuItem(_self, _args) return _res; } -static PyObject *MenuObj_CheckMenuItem(_self, _args) - MenuObject *_self; - PyObject *_args; +static PyObject *MenuObj_CheckMenuItem(MenuObject *_self, PyObject *_args) { PyObject *_res = NULL; short item; @@ -2043,9 +1868,7 @@ static PyMethodDef MenuObj_methods[] = { PyMethodChain MenuObj_chain = { MenuObj_methods, NULL }; -static PyObject *MenuObj_getattr(self, name) - MenuObject *self; - char *name; +static PyObject *MenuObj_getattr(MenuObject *self, char *name) { return Py_FindMethodInChain(&MenuObj_chain, (PyObject *)self, name); } @@ -2082,9 +1905,7 @@ PyTypeObject Menu_Type = { #if !TARGET_API_MAC_CARBON -static PyObject *Menu_InitProcMenu(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Menu_InitProcMenu(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; short resID; @@ -2100,9 +1921,7 @@ static PyObject *Menu_InitProcMenu(_self, _args) #if !TARGET_API_MAC_CARBON -static PyObject *Menu_InitMenus(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Menu_InitMenus(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -2114,9 +1933,7 @@ static PyObject *Menu_InitMenus(_self, _args) } #endif -static PyObject *Menu_NewMenu(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Menu_NewMenu(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; MenuHandle _rv; @@ -2133,9 +1950,7 @@ static PyObject *Menu_NewMenu(_self, _args) return _res; } -static PyObject *Menu_MacGetMenu(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Menu_MacGetMenu(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; MenuHandle _rv; @@ -2151,9 +1966,7 @@ static PyObject *Menu_MacGetMenu(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *Menu_CreateNewMenu(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Menu_CreateNewMenu(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -2174,9 +1987,7 @@ static PyObject *Menu_CreateNewMenu(_self, _args) } #endif -static PyObject *Menu_MenuKey(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Menu_MenuKey(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; long _rv; @@ -2190,9 +2001,7 @@ static PyObject *Menu_MenuKey(_self, _args) return _res; } -static PyObject *Menu_MenuSelect(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Menu_MenuSelect(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; long _rv; @@ -2206,9 +2015,7 @@ static PyObject *Menu_MenuSelect(_self, _args) return _res; } -static PyObject *Menu_MenuChoice(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Menu_MenuChoice(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; long _rv; @@ -2220,9 +2027,7 @@ static PyObject *Menu_MenuChoice(_self, _args) return _res; } -static PyObject *Menu_MenuEvent(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Menu_MenuEvent(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; UInt32 _rv; @@ -2236,9 +2041,7 @@ static PyObject *Menu_MenuEvent(_self, _args) return _res; } -static PyObject *Menu_GetMBarHeight(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Menu_GetMBarHeight(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; short _rv; @@ -2250,9 +2053,7 @@ static PyObject *Menu_GetMBarHeight(_self, _args) return _res; } -static PyObject *Menu_MacDrawMenuBar(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Menu_MacDrawMenuBar(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -2263,9 +2064,7 @@ static PyObject *Menu_MacDrawMenuBar(_self, _args) return _res; } -static PyObject *Menu_InvalMenuBar(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Menu_InvalMenuBar(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -2276,9 +2075,7 @@ static PyObject *Menu_InvalMenuBar(_self, _args) return _res; } -static PyObject *Menu_HiliteMenu(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Menu_HiliteMenu(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; MenuID menuID; @@ -2291,9 +2088,7 @@ static PyObject *Menu_HiliteMenu(_self, _args) return _res; } -static PyObject *Menu_GetNewMBar(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Menu_GetNewMBar(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; MenuBarHandle _rv; @@ -2307,9 +2102,7 @@ static PyObject *Menu_GetNewMBar(_self, _args) return _res; } -static PyObject *Menu_GetMenuBar(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Menu_GetMenuBar(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; MenuBarHandle _rv; @@ -2321,9 +2114,7 @@ static PyObject *Menu_GetMenuBar(_self, _args) return _res; } -static PyObject *Menu_SetMenuBar(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Menu_SetMenuBar(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; MenuBarHandle mbar; @@ -2338,9 +2129,7 @@ static PyObject *Menu_SetMenuBar(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *Menu_DuplicateMenuBar(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Menu_DuplicateMenuBar(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -2360,9 +2149,7 @@ static PyObject *Menu_DuplicateMenuBar(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *Menu_DisposeMenuBar(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Menu_DisposeMenuBar(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -2378,9 +2165,7 @@ static PyObject *Menu_DisposeMenuBar(_self, _args) } #endif -static PyObject *Menu_GetMenuHandle(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Menu_GetMenuHandle(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; MenuHandle _rv; @@ -2394,9 +2179,7 @@ static PyObject *Menu_GetMenuHandle(_self, _args) return _res; } -static PyObject *Menu_MacDeleteMenu(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Menu_MacDeleteMenu(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; MenuID menuID; @@ -2409,9 +2192,7 @@ static PyObject *Menu_MacDeleteMenu(_self, _args) return _res; } -static PyObject *Menu_ClearMenuBar(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Menu_ClearMenuBar(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -2422,9 +2203,7 @@ static PyObject *Menu_ClearMenuBar(_self, _args) return _res; } -static PyObject *Menu_SetMenuFlashCount(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Menu_SetMenuFlashCount(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; short count; @@ -2439,9 +2218,7 @@ static PyObject *Menu_SetMenuFlashCount(_self, _args) #if !TARGET_API_MAC_CARBON -static PyObject *Menu_SetMenuFlash(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Menu_SetMenuFlash(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; short count; @@ -2455,9 +2232,7 @@ static PyObject *Menu_SetMenuFlash(_self, _args) } #endif -static PyObject *Menu_FlashMenuBar(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Menu_FlashMenuBar(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; MenuID menuID; @@ -2472,9 +2247,7 @@ static PyObject *Menu_FlashMenuBar(_self, _args) #if !TARGET_API_MAC_CARBON -static PyObject *Menu_SystemEdit(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Menu_SystemEdit(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -2491,9 +2264,7 @@ static PyObject *Menu_SystemEdit(_self, _args) #if !TARGET_API_MAC_CARBON -static PyObject *Menu_SystemMenu(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Menu_SystemMenu(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; long menuResult; @@ -2507,9 +2278,7 @@ static PyObject *Menu_SystemMenu(_self, _args) } #endif -static PyObject *Menu_IsMenuBarVisible(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Menu_IsMenuBarVisible(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -2521,9 +2290,7 @@ static PyObject *Menu_IsMenuBarVisible(_self, _args) return _res; } -static PyObject *Menu_ShowMenuBar(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Menu_ShowMenuBar(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -2534,9 +2301,7 @@ static PyObject *Menu_ShowMenuBar(_self, _args) return _res; } -static PyObject *Menu_HideMenuBar(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Menu_HideMenuBar(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -2547,9 +2312,7 @@ static PyObject *Menu_HideMenuBar(_self, _args) return _res; } -static PyObject *Menu_DeleteMCEntries(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Menu_DeleteMCEntries(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; MenuID menuID; @@ -2565,9 +2328,7 @@ static PyObject *Menu_DeleteMCEntries(_self, _args) return _res; } -static PyObject *Menu_InitContextualMenus(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Menu_InitContextualMenus(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -2580,9 +2341,7 @@ static PyObject *Menu_InitContextualMenus(_self, _args) return _res; } -static PyObject *Menu_IsShowContextualMenuClick(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Menu_IsShowContextualMenuClick(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -2598,9 +2357,7 @@ static PyObject *Menu_IsShowContextualMenuClick(_self, _args) #if !TARGET_API_MAC_CARBON -static PyObject *Menu_OpenDeskAcc(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Menu_OpenDeskAcc(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Str255 name; @@ -2614,9 +2371,7 @@ static PyObject *Menu_OpenDeskAcc(_self, _args) } #endif -static PyObject *Menu_as_Menu(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Menu_as_Menu(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; MenuHandle _rv; @@ -2630,9 +2385,7 @@ static PyObject *Menu_as_Menu(_self, _args) return _res; } -static PyObject *Menu_GetMenu(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Menu_GetMenu(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; MenuHandle _rv; @@ -2646,9 +2399,7 @@ static PyObject *Menu_GetMenu(_self, _args) return _res; } -static PyObject *Menu_DeleteMenu(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Menu_DeleteMenu(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; short menuID; @@ -2661,9 +2412,7 @@ static PyObject *Menu_DeleteMenu(_self, _args) return _res; } -static PyObject *Menu_DrawMenuBar(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Menu_DrawMenuBar(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -2782,15 +2531,15 @@ static PyMethodDef Menu_methods[] = { -void initMenu() +void initMenu(void) { PyObject *m; PyObject *d; - PyMac_INIT_TOOLBOX_OBJECT_NEW(MenuObj_New); - PyMac_INIT_TOOLBOX_OBJECT_CONVERT(MenuObj_Convert); + PyMac_INIT_TOOLBOX_OBJECT_NEW(MenuHandle, MenuObj_New); + PyMac_INIT_TOOLBOX_OBJECT_CONVERT(MenuHandle, MenuObj_Convert); m = Py_InitModule("Menu", Menu_methods); diff --git a/Mac/Modules/menu/menusupport.py b/Mac/Modules/menu/menusupport.py index 4de26a2f004..a438f141994 100644 --- a/Mac/Modules/menu/menusupport.py +++ b/Mac/Modules/menu/menusupport.py @@ -36,8 +36,13 @@ FMFontFamily = Type("FMFontFamily", "h") FMFontStyle = Type("FMFontStyle", "h") includestuff = includestuff + """ +#ifdef WITHOUT_FRAMEWORKS #include /* Defines OpenDeskAcc in universal headers */ -#include <%s>""" % MACHEADERFILE + """ +#include +#else +#include +#endif + #ifdef USE_TOOLBOX_OBJECT_GLUE @@ -63,8 +68,8 @@ extern int _MenuObj_Convert(PyObject *, MenuHandle *); """ initstuff = initstuff + """ - PyMac_INIT_TOOLBOX_OBJECT_NEW(MenuObj_New); - PyMac_INIT_TOOLBOX_OBJECT_CONVERT(MenuObj_Convert); + PyMac_INIT_TOOLBOX_OBJECT_NEW(MenuHandle, MenuObj_New); + PyMac_INIT_TOOLBOX_OBJECT_CONVERT(MenuHandle, MenuObj_Convert); """ class MyObjectDefinition(GlobalObjectDefinition): diff --git a/Mac/Modules/qd/Qdmodule.c b/Mac/Modules/qd/Qdmodule.c index 9c3280e0715..3547fd87546 100644 --- a/Mac/Modules/qd/Qdmodule.c +++ b/Mac/Modules/qd/Qdmodule.c @@ -8,7 +8,11 @@ #include "macglue.h" #include "pymactoolbox.h" +#ifdef WITHOUT_FRAMEWORKS #include +#else +#include +#endif #ifdef USE_TOOLBOX_OBJECT_GLUE extern PyObject *_GrafObj_New(GrafPtr); @@ -100,16 +104,13 @@ staticforward PyObject *BMObj_NewCopied(BitMapPtr); /* ** Parse/generate RGB records */ -PyObject *QdRGB_New(itself) - RGBColorPtr itself; +PyObject *QdRGB_New(RGBColorPtr itself) { return Py_BuildValue("lll", (long)itself->red, (long)itself->green, (long)itself->blue); } -QdRGB_Convert(v, p_itself) - PyObject *v; - RGBColorPtr p_itself; +QdRGB_Convert(PyObject *v, RGBColorPtr p_itself) { long red, green, blue; @@ -125,8 +126,7 @@ QdRGB_Convert(v, p_itself) ** Generate FontInfo records */ static -PyObject *QdFI_New(itself) - FontInfo *itself; +PyObject *QdFI_New(FontInfo *itself) { return Py_BuildValue("hhhh", itself->ascent, itself->descent, @@ -146,8 +146,7 @@ typedef struct GrafPortObject { GrafPtr ob_itself; } GrafPortObject; -PyObject *GrafObj_New(itself) - GrafPtr itself; +PyObject *GrafObj_New(GrafPtr itself) { GrafPortObject *it; if (itself == NULL) return PyMac_Error(resNotFound); @@ -156,9 +155,7 @@ PyObject *GrafObj_New(itself) it->ob_itself = itself; return (PyObject *)it; } -GrafObj_Convert(v, p_itself) - PyObject *v; - GrafPtr *p_itself; +GrafObj_Convert(PyObject *v, GrafPtr *p_itself) { #if 1 { @@ -190,8 +187,7 @@ GrafObj_Convert(v, p_itself) return 1; } -static void GrafObj_dealloc(self) - GrafPortObject *self; +static void GrafObj_dealloc(GrafPortObject *self) { /* Cleanup of self->ob_itself goes here */ PyMem_DEL(self); @@ -203,9 +199,7 @@ static PyMethodDef GrafObj_methods[] = { PyMethodChain GrafObj_chain = { GrafObj_methods, NULL }; -static PyObject *GrafObj_getattr(self, name) - GrafPortObject *self; - char *name; +static PyObject *GrafObj_getattr(GrafPortObject *self, char *name) { #if !ACCESSOR_CALLS_ARE_FUNCTIONS @@ -401,8 +395,7 @@ typedef struct BitMapObject { BitMap *referred_bitmap; } BitMapObject; -PyObject *BMObj_New(itself) - BitMapPtr itself; +PyObject *BMObj_New(BitMapPtr itself) { BitMapObject *it; if (itself == NULL) return PyMac_Error(resNotFound); @@ -413,9 +406,7 @@ PyObject *BMObj_New(itself) it->referred_bitmap = NULL; return (PyObject *)it; } -BMObj_Convert(v, p_itself) - PyObject *v; - BitMapPtr *p_itself; +BMObj_Convert(PyObject *v, BitMapPtr *p_itself) { if (!BMObj_Check(v)) { @@ -426,17 +417,14 @@ BMObj_Convert(v, p_itself) return 1; } -static void BMObj_dealloc(self) - BitMapObject *self; +static void BMObj_dealloc(BitMapObject *self) { Py_XDECREF(self->referred_object); if (self->referred_bitmap) free(self->referred_bitmap); PyMem_DEL(self); } -static PyObject *BMObj_getdata(_self, _args) - BitMapObject *_self; - PyObject *_args; +static PyObject *BMObj_getdata(BitMapObject *_self, PyObject *_args) { PyObject *_res = NULL; @@ -450,9 +438,7 @@ static PyObject *BMObj_getdata(_self, _args) } -static PyObject *BMObj_putdata(_self, _args) - BitMapObject *_self; - PyObject *_args; +static PyObject *BMObj_putdata(BitMapObject *_self, PyObject *_args) { PyObject *_res = NULL; @@ -478,9 +464,7 @@ static PyMethodDef BMObj_methods[] = { PyMethodChain BMObj_chain = { BMObj_methods, NULL }; -static PyObject *BMObj_getattr(self, name) - BitMapObject *self; - char *name; +static PyObject *BMObj_getattr(BitMapObject *self, char *name) { if ( strcmp(name, "baseAddr") == 0 ) return PyInt_FromLong((long)self->ob_itself->baseAddr); @@ -545,8 +529,7 @@ static PyObject *QDGA_New() return (PyObject *)it; } -static void QDGA_dealloc(self) - QDGlobalsAccessObject *self; +static void QDGA_dealloc(QDGlobalsAccessObject *self) { PyMem_DEL(self); } @@ -557,9 +540,7 @@ static PyMethodDef QDGA_methods[] = { static PyMethodChain QDGA_chain = { QDGA_methods, NULL }; -static PyObject *QDGA_getattr(self, name) - QDGlobalsAccessObject *self; - char *name; +static PyObject *QDGA_getattr(QDGlobalsAccessObject *self, char *name) { #if !ACCESSOR_CALLS_ARE_FUNCTIONS @@ -658,9 +639,7 @@ staticforward PyTypeObject QDGlobalsAccess_Type = { /* ---------------- End object type QDGlobalsAccess ----------------- */ -static PyObject *Qd_MacSetPort(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_MacSetPort(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; GrafPtr port; @@ -673,9 +652,7 @@ static PyObject *Qd_MacSetPort(_self, _args) return _res; } -static PyObject *Qd_GetPort(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_GetPort(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; GrafPtr port; @@ -687,9 +664,7 @@ static PyObject *Qd_GetPort(_self, _args) return _res; } -static PyObject *Qd_GrafDevice(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_GrafDevice(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; short device; @@ -702,9 +677,7 @@ static PyObject *Qd_GrafDevice(_self, _args) return _res; } -static PyObject *Qd_SetPortBits(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_SetPortBits(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; BitMapPtr bm; @@ -717,9 +690,7 @@ static PyObject *Qd_SetPortBits(_self, _args) return _res; } -static PyObject *Qd_PortSize(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_PortSize(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; short width; @@ -735,9 +706,7 @@ static PyObject *Qd_PortSize(_self, _args) return _res; } -static PyObject *Qd_MovePortTo(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_MovePortTo(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; short leftGlobal; @@ -753,9 +722,7 @@ static PyObject *Qd_MovePortTo(_self, _args) return _res; } -static PyObject *Qd_SetOrigin(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_SetOrigin(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; short h; @@ -771,9 +738,7 @@ static PyObject *Qd_SetOrigin(_self, _args) return _res; } -static PyObject *Qd_SetClip(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_SetClip(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; RgnHandle rgn; @@ -786,9 +751,7 @@ static PyObject *Qd_SetClip(_self, _args) return _res; } -static PyObject *Qd_GetClip(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_GetClip(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; RgnHandle rgn; @@ -801,9 +764,7 @@ static PyObject *Qd_GetClip(_self, _args) return _res; } -static PyObject *Qd_ClipRect(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_ClipRect(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Rect r; @@ -816,9 +777,7 @@ static PyObject *Qd_ClipRect(_self, _args) return _res; } -static PyObject *Qd_BackPat(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_BackPat(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Pattern *pat__in__; @@ -838,9 +797,7 @@ static PyObject *Qd_BackPat(_self, _args) return _res; } -static PyObject *Qd_InitCursor(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_InitCursor(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -851,9 +808,7 @@ static PyObject *Qd_InitCursor(_self, _args) return _res; } -static PyObject *Qd_MacSetCursor(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_MacSetCursor(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Cursor *crsr__in__; @@ -873,9 +828,7 @@ static PyObject *Qd_MacSetCursor(_self, _args) return _res; } -static PyObject *Qd_HideCursor(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_HideCursor(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -886,9 +839,7 @@ static PyObject *Qd_HideCursor(_self, _args) return _res; } -static PyObject *Qd_MacShowCursor(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_MacShowCursor(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -899,9 +850,7 @@ static PyObject *Qd_MacShowCursor(_self, _args) return _res; } -static PyObject *Qd_ObscureCursor(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_ObscureCursor(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -912,9 +861,7 @@ static PyObject *Qd_ObscureCursor(_self, _args) return _res; } -static PyObject *Qd_HidePen(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_HidePen(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -925,9 +872,7 @@ static PyObject *Qd_HidePen(_self, _args) return _res; } -static PyObject *Qd_ShowPen(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_ShowPen(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -938,9 +883,7 @@ static PyObject *Qd_ShowPen(_self, _args) return _res; } -static PyObject *Qd_GetPen(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_GetPen(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Point pt; @@ -952,9 +895,7 @@ static PyObject *Qd_GetPen(_self, _args) return _res; } -static PyObject *Qd_GetPenState(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_GetPenState(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; PenState pnState__out__; @@ -967,9 +908,7 @@ static PyObject *Qd_GetPenState(_self, _args) return _res; } -static PyObject *Qd_SetPenState(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_SetPenState(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; PenState *pnState__in__; @@ -989,9 +928,7 @@ static PyObject *Qd_SetPenState(_self, _args) return _res; } -static PyObject *Qd_PenSize(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_PenSize(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; short width; @@ -1007,9 +944,7 @@ static PyObject *Qd_PenSize(_self, _args) return _res; } -static PyObject *Qd_PenMode(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_PenMode(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; short mode; @@ -1022,9 +957,7 @@ static PyObject *Qd_PenMode(_self, _args) return _res; } -static PyObject *Qd_PenPat(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_PenPat(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Pattern *pat__in__; @@ -1044,9 +977,7 @@ static PyObject *Qd_PenPat(_self, _args) return _res; } -static PyObject *Qd_PenNormal(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_PenNormal(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -1057,9 +988,7 @@ static PyObject *Qd_PenNormal(_self, _args) return _res; } -static PyObject *Qd_MoveTo(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_MoveTo(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; short h; @@ -1075,9 +1004,7 @@ static PyObject *Qd_MoveTo(_self, _args) return _res; } -static PyObject *Qd_Move(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_Move(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; short dh; @@ -1093,9 +1020,7 @@ static PyObject *Qd_Move(_self, _args) return _res; } -static PyObject *Qd_MacLineTo(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_MacLineTo(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; short h; @@ -1111,9 +1036,7 @@ static PyObject *Qd_MacLineTo(_self, _args) return _res; } -static PyObject *Qd_Line(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_Line(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; short dh; @@ -1129,9 +1052,7 @@ static PyObject *Qd_Line(_self, _args) return _res; } -static PyObject *Qd_ForeColor(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_ForeColor(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; long color; @@ -1144,9 +1065,7 @@ static PyObject *Qd_ForeColor(_self, _args) return _res; } -static PyObject *Qd_BackColor(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_BackColor(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; long color; @@ -1159,9 +1078,7 @@ static PyObject *Qd_BackColor(_self, _args) return _res; } -static PyObject *Qd_ColorBit(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_ColorBit(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; short whichBit; @@ -1174,9 +1091,7 @@ static PyObject *Qd_ColorBit(_self, _args) return _res; } -static PyObject *Qd_MacSetRect(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_MacSetRect(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Rect r; @@ -1200,9 +1115,7 @@ static PyObject *Qd_MacSetRect(_self, _args) return _res; } -static PyObject *Qd_MacOffsetRect(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_MacOffsetRect(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Rect r; @@ -1221,9 +1134,7 @@ static PyObject *Qd_MacOffsetRect(_self, _args) return _res; } -static PyObject *Qd_MacInsetRect(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_MacInsetRect(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Rect r; @@ -1242,9 +1153,7 @@ static PyObject *Qd_MacInsetRect(_self, _args) return _res; } -static PyObject *Qd_SectRect(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_SectRect(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -1264,9 +1173,7 @@ static PyObject *Qd_SectRect(_self, _args) return _res; } -static PyObject *Qd_MacUnionRect(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_MacUnionRect(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Rect src1; @@ -1284,9 +1191,7 @@ static PyObject *Qd_MacUnionRect(_self, _args) return _res; } -static PyObject *Qd_MacEqualRect(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_MacEqualRect(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -1303,9 +1208,7 @@ static PyObject *Qd_MacEqualRect(_self, _args) return _res; } -static PyObject *Qd_EmptyRect(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_EmptyRect(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -1319,9 +1222,7 @@ static PyObject *Qd_EmptyRect(_self, _args) return _res; } -static PyObject *Qd_MacFrameRect(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_MacFrameRect(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Rect r; @@ -1334,9 +1235,7 @@ static PyObject *Qd_MacFrameRect(_self, _args) return _res; } -static PyObject *Qd_PaintRect(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_PaintRect(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Rect r; @@ -1349,9 +1248,7 @@ static PyObject *Qd_PaintRect(_self, _args) return _res; } -static PyObject *Qd_EraseRect(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_EraseRect(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Rect r; @@ -1364,9 +1261,7 @@ static PyObject *Qd_EraseRect(_self, _args) return _res; } -static PyObject *Qd_MacInvertRect(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_MacInvertRect(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Rect r; @@ -1379,9 +1274,7 @@ static PyObject *Qd_MacInvertRect(_self, _args) return _res; } -static PyObject *Qd_MacFillRect(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_MacFillRect(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Rect r; @@ -1404,9 +1297,7 @@ static PyObject *Qd_MacFillRect(_self, _args) return _res; } -static PyObject *Qd_FrameOval(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_FrameOval(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Rect r; @@ -1419,9 +1310,7 @@ static PyObject *Qd_FrameOval(_self, _args) return _res; } -static PyObject *Qd_PaintOval(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_PaintOval(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Rect r; @@ -1434,9 +1323,7 @@ static PyObject *Qd_PaintOval(_self, _args) return _res; } -static PyObject *Qd_EraseOval(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_EraseOval(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Rect r; @@ -1449,9 +1336,7 @@ static PyObject *Qd_EraseOval(_self, _args) return _res; } -static PyObject *Qd_InvertOval(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_InvertOval(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Rect r; @@ -1464,9 +1349,7 @@ static PyObject *Qd_InvertOval(_self, _args) return _res; } -static PyObject *Qd_FillOval(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_FillOval(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Rect r; @@ -1489,9 +1372,7 @@ static PyObject *Qd_FillOval(_self, _args) return _res; } -static PyObject *Qd_FrameRoundRect(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_FrameRoundRect(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Rect r; @@ -1510,9 +1391,7 @@ static PyObject *Qd_FrameRoundRect(_self, _args) return _res; } -static PyObject *Qd_PaintRoundRect(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_PaintRoundRect(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Rect r; @@ -1531,9 +1410,7 @@ static PyObject *Qd_PaintRoundRect(_self, _args) return _res; } -static PyObject *Qd_EraseRoundRect(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_EraseRoundRect(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Rect r; @@ -1552,9 +1429,7 @@ static PyObject *Qd_EraseRoundRect(_self, _args) return _res; } -static PyObject *Qd_InvertRoundRect(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_InvertRoundRect(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Rect r; @@ -1573,9 +1448,7 @@ static PyObject *Qd_InvertRoundRect(_self, _args) return _res; } -static PyObject *Qd_FillRoundRect(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_FillRoundRect(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Rect r; @@ -1604,9 +1477,7 @@ static PyObject *Qd_FillRoundRect(_self, _args) return _res; } -static PyObject *Qd_FrameArc(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_FrameArc(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Rect r; @@ -1625,9 +1496,7 @@ static PyObject *Qd_FrameArc(_self, _args) return _res; } -static PyObject *Qd_PaintArc(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_PaintArc(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Rect r; @@ -1646,9 +1515,7 @@ static PyObject *Qd_PaintArc(_self, _args) return _res; } -static PyObject *Qd_EraseArc(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_EraseArc(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Rect r; @@ -1667,9 +1534,7 @@ static PyObject *Qd_EraseArc(_self, _args) return _res; } -static PyObject *Qd_InvertArc(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_InvertArc(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Rect r; @@ -1688,9 +1553,7 @@ static PyObject *Qd_InvertArc(_self, _args) return _res; } -static PyObject *Qd_FillArc(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_FillArc(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Rect r; @@ -1719,9 +1582,7 @@ static PyObject *Qd_FillArc(_self, _args) return _res; } -static PyObject *Qd_NewRgn(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_NewRgn(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; RgnHandle _rv; @@ -1733,9 +1594,7 @@ static PyObject *Qd_NewRgn(_self, _args) return _res; } -static PyObject *Qd_OpenRgn(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_OpenRgn(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -1746,9 +1605,7 @@ static PyObject *Qd_OpenRgn(_self, _args) return _res; } -static PyObject *Qd_CloseRgn(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_CloseRgn(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; RgnHandle dstRgn; @@ -1761,9 +1618,7 @@ static PyObject *Qd_CloseRgn(_self, _args) return _res; } -static PyObject *Qd_BitMapToRegion(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_BitMapToRegion(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1781,9 +1636,7 @@ static PyObject *Qd_BitMapToRegion(_self, _args) return _res; } -static PyObject *Qd_DisposeRgn(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_DisposeRgn(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; RgnHandle rgn; @@ -1796,9 +1649,7 @@ static PyObject *Qd_DisposeRgn(_self, _args) return _res; } -static PyObject *Qd_MacCopyRgn(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_MacCopyRgn(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; RgnHandle srcRgn; @@ -1814,9 +1665,7 @@ static PyObject *Qd_MacCopyRgn(_self, _args) return _res; } -static PyObject *Qd_SetEmptyRgn(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_SetEmptyRgn(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; RgnHandle rgn; @@ -1829,9 +1678,7 @@ static PyObject *Qd_SetEmptyRgn(_self, _args) return _res; } -static PyObject *Qd_MacSetRectRgn(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_MacSetRectRgn(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; RgnHandle rgn; @@ -1856,9 +1703,7 @@ static PyObject *Qd_MacSetRectRgn(_self, _args) return _res; } -static PyObject *Qd_RectRgn(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_RectRgn(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; RgnHandle rgn; @@ -1874,9 +1719,7 @@ static PyObject *Qd_RectRgn(_self, _args) return _res; } -static PyObject *Qd_MacOffsetRgn(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_MacOffsetRgn(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; RgnHandle rgn; @@ -1895,9 +1738,7 @@ static PyObject *Qd_MacOffsetRgn(_self, _args) return _res; } -static PyObject *Qd_InsetRgn(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_InsetRgn(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; RgnHandle rgn; @@ -1916,9 +1757,7 @@ static PyObject *Qd_InsetRgn(_self, _args) return _res; } -static PyObject *Qd_SectRgn(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_SectRgn(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; RgnHandle srcRgnA; @@ -1937,9 +1776,7 @@ static PyObject *Qd_SectRgn(_self, _args) return _res; } -static PyObject *Qd_MacUnionRgn(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_MacUnionRgn(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; RgnHandle srcRgnA; @@ -1958,9 +1795,7 @@ static PyObject *Qd_MacUnionRgn(_self, _args) return _res; } -static PyObject *Qd_DiffRgn(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_DiffRgn(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; RgnHandle srcRgnA; @@ -1979,9 +1814,7 @@ static PyObject *Qd_DiffRgn(_self, _args) return _res; } -static PyObject *Qd_MacXorRgn(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_MacXorRgn(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; RgnHandle srcRgnA; @@ -2000,9 +1833,7 @@ static PyObject *Qd_MacXorRgn(_self, _args) return _res; } -static PyObject *Qd_RectInRgn(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_RectInRgn(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -2019,9 +1850,7 @@ static PyObject *Qd_RectInRgn(_self, _args) return _res; } -static PyObject *Qd_MacEqualRgn(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_MacEqualRgn(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -2038,9 +1867,7 @@ static PyObject *Qd_MacEqualRgn(_self, _args) return _res; } -static PyObject *Qd_EmptyRgn(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_EmptyRgn(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -2054,9 +1881,7 @@ static PyObject *Qd_EmptyRgn(_self, _args) return _res; } -static PyObject *Qd_MacFrameRgn(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_MacFrameRgn(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; RgnHandle rgn; @@ -2069,9 +1894,7 @@ static PyObject *Qd_MacFrameRgn(_self, _args) return _res; } -static PyObject *Qd_MacPaintRgn(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_MacPaintRgn(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; RgnHandle rgn; @@ -2084,9 +1907,7 @@ static PyObject *Qd_MacPaintRgn(_self, _args) return _res; } -static PyObject *Qd_EraseRgn(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_EraseRgn(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; RgnHandle rgn; @@ -2099,9 +1920,7 @@ static PyObject *Qd_EraseRgn(_self, _args) return _res; } -static PyObject *Qd_MacInvertRgn(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_MacInvertRgn(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; RgnHandle rgn; @@ -2114,9 +1933,7 @@ static PyObject *Qd_MacInvertRgn(_self, _args) return _res; } -static PyObject *Qd_MacFillRgn(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_MacFillRgn(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; RgnHandle rgn; @@ -2139,9 +1956,7 @@ static PyObject *Qd_MacFillRgn(_self, _args) return _res; } -static PyObject *Qd_ScrollRect(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_ScrollRect(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Rect r; @@ -2163,9 +1978,7 @@ static PyObject *Qd_ScrollRect(_self, _args) return _res; } -static PyObject *Qd_CopyBits(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_CopyBits(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; BitMapPtr srcBits; @@ -2193,9 +2006,7 @@ static PyObject *Qd_CopyBits(_self, _args) return _res; } -static PyObject *Qd_CopyMask(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_CopyMask(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; BitMapPtr srcBits; @@ -2223,9 +2034,7 @@ static PyObject *Qd_CopyMask(_self, _args) return _res; } -static PyObject *Qd_OpenPicture(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_OpenPicture(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; PicHandle _rv; @@ -2239,9 +2048,7 @@ static PyObject *Qd_OpenPicture(_self, _args) return _res; } -static PyObject *Qd_PicComment(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_PicComment(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; short kind; @@ -2260,9 +2067,7 @@ static PyObject *Qd_PicComment(_self, _args) return _res; } -static PyObject *Qd_ClosePicture(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_ClosePicture(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -2273,9 +2078,7 @@ static PyObject *Qd_ClosePicture(_self, _args) return _res; } -static PyObject *Qd_DrawPicture(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_DrawPicture(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; PicHandle myPicture; @@ -2291,9 +2094,7 @@ static PyObject *Qd_DrawPicture(_self, _args) return _res; } -static PyObject *Qd_KillPicture(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_KillPicture(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; PicHandle myPicture; @@ -2306,9 +2107,7 @@ static PyObject *Qd_KillPicture(_self, _args) return _res; } -static PyObject *Qd_OpenPoly(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_OpenPoly(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; PolyHandle _rv; @@ -2320,9 +2119,7 @@ static PyObject *Qd_OpenPoly(_self, _args) return _res; } -static PyObject *Qd_ClosePoly(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_ClosePoly(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -2333,9 +2130,7 @@ static PyObject *Qd_ClosePoly(_self, _args) return _res; } -static PyObject *Qd_KillPoly(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_KillPoly(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; PolyHandle poly; @@ -2348,9 +2143,7 @@ static PyObject *Qd_KillPoly(_self, _args) return _res; } -static PyObject *Qd_OffsetPoly(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_OffsetPoly(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; PolyHandle poly; @@ -2369,9 +2162,7 @@ static PyObject *Qd_OffsetPoly(_self, _args) return _res; } -static PyObject *Qd_FramePoly(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_FramePoly(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; PolyHandle poly; @@ -2384,9 +2175,7 @@ static PyObject *Qd_FramePoly(_self, _args) return _res; } -static PyObject *Qd_PaintPoly(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_PaintPoly(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; PolyHandle poly; @@ -2399,9 +2188,7 @@ static PyObject *Qd_PaintPoly(_self, _args) return _res; } -static PyObject *Qd_ErasePoly(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_ErasePoly(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; PolyHandle poly; @@ -2414,9 +2201,7 @@ static PyObject *Qd_ErasePoly(_self, _args) return _res; } -static PyObject *Qd_InvertPoly(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_InvertPoly(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; PolyHandle poly; @@ -2429,9 +2214,7 @@ static PyObject *Qd_InvertPoly(_self, _args) return _res; } -static PyObject *Qd_FillPoly(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_FillPoly(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; PolyHandle poly; @@ -2454,9 +2237,7 @@ static PyObject *Qd_FillPoly(_self, _args) return _res; } -static PyObject *Qd_SetPt(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_SetPt(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Point pt; @@ -2474,9 +2255,7 @@ static PyObject *Qd_SetPt(_self, _args) return _res; } -static PyObject *Qd_LocalToGlobal(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_LocalToGlobal(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Point pt; @@ -2489,9 +2268,7 @@ static PyObject *Qd_LocalToGlobal(_self, _args) return _res; } -static PyObject *Qd_GlobalToLocal(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_GlobalToLocal(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Point pt; @@ -2504,9 +2281,7 @@ static PyObject *Qd_GlobalToLocal(_self, _args) return _res; } -static PyObject *Qd_Random(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_Random(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; short _rv; @@ -2518,9 +2293,7 @@ static PyObject *Qd_Random(_self, _args) return _res; } -static PyObject *Qd_MacGetPixel(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_MacGetPixel(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -2537,9 +2310,7 @@ static PyObject *Qd_MacGetPixel(_self, _args) return _res; } -static PyObject *Qd_ScalePt(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_ScalePt(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Point pt; @@ -2558,9 +2329,7 @@ static PyObject *Qd_ScalePt(_self, _args) return _res; } -static PyObject *Qd_MapPt(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_MapPt(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Point pt; @@ -2579,9 +2348,7 @@ static PyObject *Qd_MapPt(_self, _args) return _res; } -static PyObject *Qd_MapRect(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_MapRect(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Rect r; @@ -2600,9 +2367,7 @@ static PyObject *Qd_MapRect(_self, _args) return _res; } -static PyObject *Qd_MapRgn(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_MapRgn(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; RgnHandle rgn; @@ -2621,9 +2386,7 @@ static PyObject *Qd_MapRgn(_self, _args) return _res; } -static PyObject *Qd_MapPoly(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_MapPoly(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; PolyHandle poly; @@ -2642,9 +2405,7 @@ static PyObject *Qd_MapPoly(_self, _args) return _res; } -static PyObject *Qd_StdBits(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_StdBits(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; BitMapPtr srcBits; @@ -2669,9 +2430,7 @@ static PyObject *Qd_StdBits(_self, _args) return _res; } -static PyObject *Qd_AddPt(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_AddPt(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Point src; @@ -2687,9 +2446,7 @@ static PyObject *Qd_AddPt(_self, _args) return _res; } -static PyObject *Qd_EqualPt(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_EqualPt(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -2706,9 +2463,7 @@ static PyObject *Qd_EqualPt(_self, _args) return _res; } -static PyObject *Qd_MacPtInRect(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_MacPtInRect(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -2725,9 +2480,7 @@ static PyObject *Qd_MacPtInRect(_self, _args) return _res; } -static PyObject *Qd_Pt2Rect(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_Pt2Rect(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Point pt1; @@ -2745,9 +2498,7 @@ static PyObject *Qd_Pt2Rect(_self, _args) return _res; } -static PyObject *Qd_PtToAngle(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_PtToAngle(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Rect r; @@ -2765,9 +2516,7 @@ static PyObject *Qd_PtToAngle(_self, _args) return _res; } -static PyObject *Qd_SubPt(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_SubPt(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Point src; @@ -2783,9 +2532,7 @@ static PyObject *Qd_SubPt(_self, _args) return _res; } -static PyObject *Qd_PtInRgn(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_PtInRgn(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -2802,9 +2549,7 @@ static PyObject *Qd_PtInRgn(_self, _args) return _res; } -static PyObject *Qd_NewPixMap(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_NewPixMap(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; PixMapHandle _rv; @@ -2816,9 +2561,7 @@ static PyObject *Qd_NewPixMap(_self, _args) return _res; } -static PyObject *Qd_DisposePixMap(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_DisposePixMap(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; PixMapHandle pm; @@ -2831,9 +2574,7 @@ static PyObject *Qd_DisposePixMap(_self, _args) return _res; } -static PyObject *Qd_CopyPixMap(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_CopyPixMap(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; PixMapHandle srcPM; @@ -2849,9 +2590,7 @@ static PyObject *Qd_CopyPixMap(_self, _args) return _res; } -static PyObject *Qd_NewPixPat(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_NewPixPat(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; PixPatHandle _rv; @@ -2863,9 +2602,7 @@ static PyObject *Qd_NewPixPat(_self, _args) return _res; } -static PyObject *Qd_DisposePixPat(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_DisposePixPat(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; PixPatHandle pp; @@ -2878,9 +2615,7 @@ static PyObject *Qd_DisposePixPat(_self, _args) return _res; } -static PyObject *Qd_CopyPixPat(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_CopyPixPat(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; PixPatHandle srcPP; @@ -2896,9 +2631,7 @@ static PyObject *Qd_CopyPixPat(_self, _args) return _res; } -static PyObject *Qd_PenPixPat(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_PenPixPat(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; PixPatHandle pp; @@ -2911,9 +2644,7 @@ static PyObject *Qd_PenPixPat(_self, _args) return _res; } -static PyObject *Qd_BackPixPat(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_BackPixPat(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; PixPatHandle pp; @@ -2926,9 +2657,7 @@ static PyObject *Qd_BackPixPat(_self, _args) return _res; } -static PyObject *Qd_GetPixPat(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_GetPixPat(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; PixPatHandle _rv; @@ -2942,9 +2671,7 @@ static PyObject *Qd_GetPixPat(_self, _args) return _res; } -static PyObject *Qd_MakeRGBPat(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_MakeRGBPat(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; PixPatHandle pp; @@ -2960,9 +2687,7 @@ static PyObject *Qd_MakeRGBPat(_self, _args) return _res; } -static PyObject *Qd_FillCRect(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_FillCRect(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Rect r; @@ -2978,9 +2703,7 @@ static PyObject *Qd_FillCRect(_self, _args) return _res; } -static PyObject *Qd_FillCOval(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_FillCOval(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Rect r; @@ -2996,9 +2719,7 @@ static PyObject *Qd_FillCOval(_self, _args) return _res; } -static PyObject *Qd_FillCRoundRect(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_FillCRoundRect(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Rect r; @@ -3020,9 +2741,7 @@ static PyObject *Qd_FillCRoundRect(_self, _args) return _res; } -static PyObject *Qd_FillCArc(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_FillCArc(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Rect r; @@ -3044,9 +2763,7 @@ static PyObject *Qd_FillCArc(_self, _args) return _res; } -static PyObject *Qd_FillCRgn(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_FillCRgn(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; RgnHandle rgn; @@ -3062,9 +2779,7 @@ static PyObject *Qd_FillCRgn(_self, _args) return _res; } -static PyObject *Qd_FillCPoly(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_FillCPoly(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; PolyHandle poly; @@ -3080,9 +2795,7 @@ static PyObject *Qd_FillCPoly(_self, _args) return _res; } -static PyObject *Qd_RGBForeColor(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_RGBForeColor(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; RGBColor color; @@ -3095,9 +2808,7 @@ static PyObject *Qd_RGBForeColor(_self, _args) return _res; } -static PyObject *Qd_RGBBackColor(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_RGBBackColor(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; RGBColor color; @@ -3110,9 +2821,7 @@ static PyObject *Qd_RGBBackColor(_self, _args) return _res; } -static PyObject *Qd_SetCPixel(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_SetCPixel(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; short h; @@ -3131,9 +2840,7 @@ static PyObject *Qd_SetCPixel(_self, _args) return _res; } -static PyObject *Qd_SetPortPix(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_SetPortPix(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; PixMapHandle pm; @@ -3146,9 +2853,7 @@ static PyObject *Qd_SetPortPix(_self, _args) return _res; } -static PyObject *Qd_GetCPixel(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_GetCPixel(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; short h; @@ -3166,9 +2871,7 @@ static PyObject *Qd_GetCPixel(_self, _args) return _res; } -static PyObject *Qd_GetForeColor(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_GetForeColor(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; RGBColor color; @@ -3180,9 +2883,7 @@ static PyObject *Qd_GetForeColor(_self, _args) return _res; } -static PyObject *Qd_GetBackColor(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_GetBackColor(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; RGBColor color; @@ -3194,9 +2895,7 @@ static PyObject *Qd_GetBackColor(_self, _args) return _res; } -static PyObject *Qd_OpColor(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_OpColor(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; RGBColor color; @@ -3209,9 +2908,7 @@ static PyObject *Qd_OpColor(_self, _args) return _res; } -static PyObject *Qd_HiliteColor(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_HiliteColor(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; RGBColor color; @@ -3224,9 +2921,7 @@ static PyObject *Qd_HiliteColor(_self, _args) return _res; } -static PyObject *Qd_DisposeCTable(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_DisposeCTable(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; CTabHandle cTable; @@ -3239,9 +2934,7 @@ static PyObject *Qd_DisposeCTable(_self, _args) return _res; } -static PyObject *Qd_GetCTable(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_GetCTable(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; CTabHandle _rv; @@ -3255,9 +2948,7 @@ static PyObject *Qd_GetCTable(_self, _args) return _res; } -static PyObject *Qd_GetCCursor(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_GetCCursor(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; CCrsrHandle _rv; @@ -3271,9 +2962,7 @@ static PyObject *Qd_GetCCursor(_self, _args) return _res; } -static PyObject *Qd_SetCCursor(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_SetCCursor(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; CCrsrHandle cCrsr; @@ -3286,9 +2975,7 @@ static PyObject *Qd_SetCCursor(_self, _args) return _res; } -static PyObject *Qd_AllocCursor(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_AllocCursor(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -3299,9 +2986,7 @@ static PyObject *Qd_AllocCursor(_self, _args) return _res; } -static PyObject *Qd_DisposeCCursor(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_DisposeCCursor(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; CCrsrHandle cCrsr; @@ -3314,9 +2999,7 @@ static PyObject *Qd_DisposeCCursor(_self, _args) return _res; } -static PyObject *Qd_GetMaxDevice(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_GetMaxDevice(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; GDHandle _rv; @@ -3330,9 +3013,7 @@ static PyObject *Qd_GetMaxDevice(_self, _args) return _res; } -static PyObject *Qd_GetCTSeed(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_GetCTSeed(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; long _rv; @@ -3344,9 +3025,7 @@ static PyObject *Qd_GetCTSeed(_self, _args) return _res; } -static PyObject *Qd_GetDeviceList(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_GetDeviceList(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; GDHandle _rv; @@ -3358,9 +3037,7 @@ static PyObject *Qd_GetDeviceList(_self, _args) return _res; } -static PyObject *Qd_GetMainDevice(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_GetMainDevice(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; GDHandle _rv; @@ -3372,9 +3049,7 @@ static PyObject *Qd_GetMainDevice(_self, _args) return _res; } -static PyObject *Qd_GetNextDevice(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_GetNextDevice(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; GDHandle _rv; @@ -3388,9 +3063,7 @@ static PyObject *Qd_GetNextDevice(_self, _args) return _res; } -static PyObject *Qd_TestDeviceAttribute(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_TestDeviceAttribute(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -3407,9 +3080,7 @@ static PyObject *Qd_TestDeviceAttribute(_self, _args) return _res; } -static PyObject *Qd_SetDeviceAttribute(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_SetDeviceAttribute(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; GDHandle gdh; @@ -3428,9 +3099,7 @@ static PyObject *Qd_SetDeviceAttribute(_self, _args) return _res; } -static PyObject *Qd_InitGDevice(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_InitGDevice(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; short qdRefNum; @@ -3449,9 +3118,7 @@ static PyObject *Qd_InitGDevice(_self, _args) return _res; } -static PyObject *Qd_NewGDevice(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_NewGDevice(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; GDHandle _rv; @@ -3468,9 +3135,7 @@ static PyObject *Qd_NewGDevice(_self, _args) return _res; } -static PyObject *Qd_DisposeGDevice(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_DisposeGDevice(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; GDHandle gdh; @@ -3483,9 +3148,7 @@ static PyObject *Qd_DisposeGDevice(_self, _args) return _res; } -static PyObject *Qd_SetGDevice(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_SetGDevice(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; GDHandle gd; @@ -3498,9 +3161,7 @@ static PyObject *Qd_SetGDevice(_self, _args) return _res; } -static PyObject *Qd_GetGDevice(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_GetGDevice(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; GDHandle _rv; @@ -3512,9 +3173,7 @@ static PyObject *Qd_GetGDevice(_self, _args) return _res; } -static PyObject *Qd_Color2Index(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_Color2Index(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; long _rv; @@ -3528,9 +3187,7 @@ static PyObject *Qd_Color2Index(_self, _args) return _res; } -static PyObject *Qd_Index2Color(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_Index2Color(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; long index; @@ -3545,9 +3202,7 @@ static PyObject *Qd_Index2Color(_self, _args) return _res; } -static PyObject *Qd_InvertColor(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_InvertColor(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; RGBColor myColor; @@ -3559,9 +3214,7 @@ static PyObject *Qd_InvertColor(_self, _args) return _res; } -static PyObject *Qd_RealColor(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_RealColor(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -3575,9 +3228,7 @@ static PyObject *Qd_RealColor(_self, _args) return _res; } -static PyObject *Qd_GetSubTable(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_GetSubTable(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; CTabHandle myColors; @@ -3596,9 +3247,7 @@ static PyObject *Qd_GetSubTable(_self, _args) return _res; } -static PyObject *Qd_MakeITable(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_MakeITable(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; CTabHandle cTabH; @@ -3617,9 +3266,7 @@ static PyObject *Qd_MakeITable(_self, _args) return _res; } -static PyObject *Qd_SetClientID(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_SetClientID(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; short id; @@ -3632,9 +3279,7 @@ static PyObject *Qd_SetClientID(_self, _args) return _res; } -static PyObject *Qd_ProtectEntry(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_ProtectEntry(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; short index; @@ -3650,9 +3295,7 @@ static PyObject *Qd_ProtectEntry(_self, _args) return _res; } -static PyObject *Qd_ReserveEntry(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_ReserveEntry(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; short index; @@ -3668,9 +3311,7 @@ static PyObject *Qd_ReserveEntry(_self, _args) return _res; } -static PyObject *Qd_QDError(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_QDError(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; short _rv; @@ -3682,9 +3323,7 @@ static PyObject *Qd_QDError(_self, _args) return _res; } -static PyObject *Qd_CopyDeepMask(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_CopyDeepMask(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; BitMapPtr srcBits; @@ -3718,9 +3357,7 @@ static PyObject *Qd_CopyDeepMask(_self, _args) return _res; } -static PyObject *Qd_GetPattern(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_GetPattern(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; PatHandle _rv; @@ -3734,9 +3371,7 @@ static PyObject *Qd_GetPattern(_self, _args) return _res; } -static PyObject *Qd_MacGetCursor(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_MacGetCursor(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; CursHandle _rv; @@ -3750,9 +3385,7 @@ static PyObject *Qd_MacGetCursor(_self, _args) return _res; } -static PyObject *Qd_GetPicture(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_GetPicture(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; PicHandle _rv; @@ -3766,9 +3399,7 @@ static PyObject *Qd_GetPicture(_self, _args) return _res; } -static PyObject *Qd_DeltaPoint(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_DeltaPoint(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; long _rv; @@ -3785,9 +3416,7 @@ static PyObject *Qd_DeltaPoint(_self, _args) return _res; } -static PyObject *Qd_ShieldCursor(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_ShieldCursor(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Rect shieldRect; @@ -3803,9 +3432,7 @@ static PyObject *Qd_ShieldCursor(_self, _args) return _res; } -static PyObject *Qd_ScreenRes(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_ScreenRes(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; short scrnHRes; @@ -3820,9 +3447,7 @@ static PyObject *Qd_ScreenRes(_self, _args) return _res; } -static PyObject *Qd_GetIndPattern(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_GetIndPattern(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Pattern thePat__out__; @@ -3841,9 +3466,7 @@ static PyObject *Qd_GetIndPattern(_self, _args) return _res; } -static PyObject *Qd_SlopeFromAngle(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_SlopeFromAngle(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Fixed _rv; @@ -3857,9 +3480,7 @@ static PyObject *Qd_SlopeFromAngle(_self, _args) return _res; } -static PyObject *Qd_AngleFromSlope(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_AngleFromSlope(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; short _rv; @@ -3873,9 +3494,7 @@ static PyObject *Qd_AngleFromSlope(_self, _args) return _res; } -static PyObject *Qd_GetPortPixMap(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_GetPortPixMap(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; PixMapHandle _rv; @@ -3889,9 +3508,7 @@ static PyObject *Qd_GetPortPixMap(_self, _args) return _res; } -static PyObject *Qd_GetPortBitMapForCopyBits(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_GetPortBitMapForCopyBits(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; const BitMap * _rv; @@ -3905,9 +3522,7 @@ static PyObject *Qd_GetPortBitMapForCopyBits(_self, _args) return _res; } -static PyObject *Qd_GetPortBounds(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_GetPortBounds(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; CGrafPtr port; @@ -3922,9 +3537,7 @@ static PyObject *Qd_GetPortBounds(_self, _args) return _res; } -static PyObject *Qd_GetPortForeColor(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_GetPortForeColor(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; CGrafPtr port; @@ -3939,9 +3552,7 @@ static PyObject *Qd_GetPortForeColor(_self, _args) return _res; } -static PyObject *Qd_GetPortBackColor(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_GetPortBackColor(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; CGrafPtr port; @@ -3956,9 +3567,7 @@ static PyObject *Qd_GetPortBackColor(_self, _args) return _res; } -static PyObject *Qd_GetPortOpColor(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_GetPortOpColor(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; CGrafPtr port; @@ -3973,9 +3582,7 @@ static PyObject *Qd_GetPortOpColor(_self, _args) return _res; } -static PyObject *Qd_GetPortHiliteColor(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_GetPortHiliteColor(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; CGrafPtr port; @@ -3990,9 +3597,7 @@ static PyObject *Qd_GetPortHiliteColor(_self, _args) return _res; } -static PyObject *Qd_GetPortTextFont(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_GetPortTextFont(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; short _rv; @@ -4006,9 +3611,7 @@ static PyObject *Qd_GetPortTextFont(_self, _args) return _res; } -static PyObject *Qd_GetPortTextFace(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_GetPortTextFace(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Style _rv; @@ -4022,9 +3625,7 @@ static PyObject *Qd_GetPortTextFace(_self, _args) return _res; } -static PyObject *Qd_GetPortTextMode(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_GetPortTextMode(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; short _rv; @@ -4038,9 +3639,7 @@ static PyObject *Qd_GetPortTextMode(_self, _args) return _res; } -static PyObject *Qd_GetPortTextSize(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_GetPortTextSize(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; short _rv; @@ -4054,9 +3653,7 @@ static PyObject *Qd_GetPortTextSize(_self, _args) return _res; } -static PyObject *Qd_GetPortChExtra(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_GetPortChExtra(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; short _rv; @@ -4070,9 +3667,7 @@ static PyObject *Qd_GetPortChExtra(_self, _args) return _res; } -static PyObject *Qd_GetPortFracHPenLocation(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_GetPortFracHPenLocation(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; short _rv; @@ -4086,9 +3681,7 @@ static PyObject *Qd_GetPortFracHPenLocation(_self, _args) return _res; } -static PyObject *Qd_GetPortSpExtra(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_GetPortSpExtra(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Fixed _rv; @@ -4102,9 +3695,7 @@ static PyObject *Qd_GetPortSpExtra(_self, _args) return _res; } -static PyObject *Qd_GetPortPenVisibility(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_GetPortPenVisibility(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; short _rv; @@ -4118,9 +3709,7 @@ static PyObject *Qd_GetPortPenVisibility(_self, _args) return _res; } -static PyObject *Qd_GetPortVisibleRegion(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_GetPortVisibleRegion(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; RgnHandle _rv; @@ -4137,9 +3726,7 @@ static PyObject *Qd_GetPortVisibleRegion(_self, _args) return _res; } -static PyObject *Qd_GetPortClipRegion(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_GetPortClipRegion(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; RgnHandle _rv; @@ -4156,9 +3743,7 @@ static PyObject *Qd_GetPortClipRegion(_self, _args) return _res; } -static PyObject *Qd_GetPortBackPixPat(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_GetPortBackPixPat(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; PixPatHandle _rv; @@ -4175,9 +3760,7 @@ static PyObject *Qd_GetPortBackPixPat(_self, _args) return _res; } -static PyObject *Qd_GetPortPenPixPat(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_GetPortPenPixPat(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; PixPatHandle _rv; @@ -4194,9 +3777,7 @@ static PyObject *Qd_GetPortPenPixPat(_self, _args) return _res; } -static PyObject *Qd_GetPortFillPixPat(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_GetPortFillPixPat(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; PixPatHandle _rv; @@ -4213,9 +3794,7 @@ static PyObject *Qd_GetPortFillPixPat(_self, _args) return _res; } -static PyObject *Qd_GetPortPenSize(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_GetPortPenSize(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; CGrafPtr port; @@ -4231,9 +3810,7 @@ static PyObject *Qd_GetPortPenSize(_self, _args) return _res; } -static PyObject *Qd_GetPortPenMode(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_GetPortPenMode(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; SInt32 _rv; @@ -4247,9 +3824,7 @@ static PyObject *Qd_GetPortPenMode(_self, _args) return _res; } -static PyObject *Qd_GetPortPenLocation(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_GetPortPenLocation(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; CGrafPtr port; @@ -4265,9 +3840,7 @@ static PyObject *Qd_GetPortPenLocation(_self, _args) return _res; } -static PyObject *Qd_IsPortRegionBeingDefined(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_IsPortRegionBeingDefined(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -4281,9 +3854,7 @@ static PyObject *Qd_IsPortRegionBeingDefined(_self, _args) return _res; } -static PyObject *Qd_IsPortPictureBeingDefined(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_IsPortPictureBeingDefined(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -4299,9 +3870,7 @@ static PyObject *Qd_IsPortPictureBeingDefined(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *Qd_IsPortOffscreen(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_IsPortOffscreen(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -4318,9 +3887,7 @@ static PyObject *Qd_IsPortOffscreen(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *Qd_IsPortColor(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_IsPortColor(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -4335,9 +3902,7 @@ static PyObject *Qd_IsPortColor(_self, _args) } #endif -static PyObject *Qd_SetPortBounds(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_SetPortBounds(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; CGrafPtr port; @@ -4353,9 +3918,7 @@ static PyObject *Qd_SetPortBounds(_self, _args) return _res; } -static PyObject *Qd_SetPortOpColor(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_SetPortOpColor(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; CGrafPtr port; @@ -4371,9 +3934,7 @@ static PyObject *Qd_SetPortOpColor(_self, _args) return _res; } -static PyObject *Qd_SetPortVisibleRegion(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_SetPortVisibleRegion(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; CGrafPtr port; @@ -4389,9 +3950,7 @@ static PyObject *Qd_SetPortVisibleRegion(_self, _args) return _res; } -static PyObject *Qd_SetPortClipRegion(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_SetPortClipRegion(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; CGrafPtr port; @@ -4407,9 +3966,7 @@ static PyObject *Qd_SetPortClipRegion(_self, _args) return _res; } -static PyObject *Qd_SetPortPenPixPat(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_SetPortPenPixPat(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; CGrafPtr port; @@ -4425,9 +3982,7 @@ static PyObject *Qd_SetPortPenPixPat(_self, _args) return _res; } -static PyObject *Qd_SetPortBackPixPat(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_SetPortBackPixPat(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; CGrafPtr port; @@ -4443,9 +3998,7 @@ static PyObject *Qd_SetPortBackPixPat(_self, _args) return _res; } -static PyObject *Qd_SetPortPenSize(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_SetPortPenSize(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; CGrafPtr port; @@ -4461,9 +4014,7 @@ static PyObject *Qd_SetPortPenSize(_self, _args) return _res; } -static PyObject *Qd_SetPortPenMode(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_SetPortPenMode(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; CGrafPtr port; @@ -4479,9 +4030,7 @@ static PyObject *Qd_SetPortPenMode(_self, _args) return _res; } -static PyObject *Qd_SetPortFracHPenLocation(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_SetPortFracHPenLocation(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; CGrafPtr port; @@ -4497,9 +4046,7 @@ static PyObject *Qd_SetPortFracHPenLocation(_self, _args) return _res; } -static PyObject *Qd_GetPixBounds(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_GetPixBounds(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; PixMapHandle pixMap; @@ -4514,9 +4061,7 @@ static PyObject *Qd_GetPixBounds(_self, _args) return _res; } -static PyObject *Qd_GetPixDepth(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_GetPixDepth(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; short _rv; @@ -4530,9 +4075,7 @@ static PyObject *Qd_GetPixDepth(_self, _args) return _res; } -static PyObject *Qd_GetQDGlobalsRandomSeed(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_GetQDGlobalsRandomSeed(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; long _rv; @@ -4544,9 +4087,7 @@ static PyObject *Qd_GetQDGlobalsRandomSeed(_self, _args) return _res; } -static PyObject *Qd_GetQDGlobalsScreenBits(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_GetQDGlobalsScreenBits(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; BitMap screenBits; @@ -4558,9 +4099,7 @@ static PyObject *Qd_GetQDGlobalsScreenBits(_self, _args) return _res; } -static PyObject *Qd_GetQDGlobalsArrow(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_GetQDGlobalsArrow(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Cursor arrow__out__; @@ -4573,9 +4112,7 @@ static PyObject *Qd_GetQDGlobalsArrow(_self, _args) return _res; } -static PyObject *Qd_GetQDGlobalsDarkGray(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_GetQDGlobalsDarkGray(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Pattern dkGray__out__; @@ -4588,9 +4125,7 @@ static PyObject *Qd_GetQDGlobalsDarkGray(_self, _args) return _res; } -static PyObject *Qd_GetQDGlobalsLightGray(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_GetQDGlobalsLightGray(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Pattern ltGray__out__; @@ -4603,9 +4138,7 @@ static PyObject *Qd_GetQDGlobalsLightGray(_self, _args) return _res; } -static PyObject *Qd_GetQDGlobalsGray(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_GetQDGlobalsGray(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Pattern gray__out__; @@ -4618,9 +4151,7 @@ static PyObject *Qd_GetQDGlobalsGray(_self, _args) return _res; } -static PyObject *Qd_GetQDGlobalsBlack(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_GetQDGlobalsBlack(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Pattern black__out__; @@ -4633,9 +4164,7 @@ static PyObject *Qd_GetQDGlobalsBlack(_self, _args) return _res; } -static PyObject *Qd_GetQDGlobalsWhite(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_GetQDGlobalsWhite(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Pattern white__out__; @@ -4648,9 +4177,7 @@ static PyObject *Qd_GetQDGlobalsWhite(_self, _args) return _res; } -static PyObject *Qd_GetQDGlobalsThePort(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_GetQDGlobalsThePort(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; CGrafPtr _rv; @@ -4662,9 +4189,7 @@ static PyObject *Qd_GetQDGlobalsThePort(_self, _args) return _res; } -static PyObject *Qd_SetQDGlobalsRandomSeed(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_SetQDGlobalsRandomSeed(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; long randomSeed; @@ -4677,9 +4202,7 @@ static PyObject *Qd_SetQDGlobalsRandomSeed(_self, _args) return _res; } -static PyObject *Qd_SetQDGlobalsArrow(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_SetQDGlobalsArrow(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Cursor *arrow__in__; @@ -4699,9 +4222,7 @@ static PyObject *Qd_SetQDGlobalsArrow(_self, _args) return _res; } -static PyObject *Qd_GetRegionBounds(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_GetRegionBounds(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; RgnHandle region; @@ -4718,9 +4239,7 @@ static PyObject *Qd_GetRegionBounds(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *Qd_IsRegionRectangular(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_IsRegionRectangular(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -4737,9 +4256,7 @@ static PyObject *Qd_IsRegionRectangular(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *Qd_CreateNewPort(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_CreateNewPort(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; CGrafPtr _rv; @@ -4754,9 +4271,7 @@ static PyObject *Qd_CreateNewPort(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *Qd_DisposePort(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_DisposePort(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; CGrafPtr port; @@ -4772,9 +4287,7 @@ static PyObject *Qd_DisposePort(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *Qd_SetQDError(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_SetQDError(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr err; @@ -4788,9 +4301,7 @@ static PyObject *Qd_SetQDError(_self, _args) } #endif -static PyObject *Qd_QDIsPortBuffered(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_QDIsPortBuffered(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -4804,9 +4315,7 @@ static PyObject *Qd_QDIsPortBuffered(_self, _args) return _res; } -static PyObject *Qd_QDIsPortBufferDirty(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_QDIsPortBufferDirty(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -4820,9 +4329,7 @@ static PyObject *Qd_QDIsPortBufferDirty(_self, _args) return _res; } -static PyObject *Qd_QDFlushPortBuffer(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_QDFlushPortBuffer(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; CGrafPtr port; @@ -4838,9 +4345,7 @@ static PyObject *Qd_QDFlushPortBuffer(_self, _args) return _res; } -static PyObject *Qd_TextFont(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_TextFont(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; short font; @@ -4853,9 +4358,7 @@ static PyObject *Qd_TextFont(_self, _args) return _res; } -static PyObject *Qd_TextFace(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_TextFace(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; StyleParameter face; @@ -4868,9 +4371,7 @@ static PyObject *Qd_TextFace(_self, _args) return _res; } -static PyObject *Qd_TextMode(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_TextMode(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; short mode; @@ -4883,9 +4384,7 @@ static PyObject *Qd_TextMode(_self, _args) return _res; } -static PyObject *Qd_TextSize(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_TextSize(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; short size; @@ -4898,9 +4397,7 @@ static PyObject *Qd_TextSize(_self, _args) return _res; } -static PyObject *Qd_SpaceExtra(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_SpaceExtra(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Fixed extra; @@ -4913,9 +4410,7 @@ static PyObject *Qd_SpaceExtra(_self, _args) return _res; } -static PyObject *Qd_DrawChar(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_DrawChar(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; CharParameter ch; @@ -4928,9 +4423,7 @@ static PyObject *Qd_DrawChar(_self, _args) return _res; } -static PyObject *Qd_DrawString(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_DrawString(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Str255 s; @@ -4943,9 +4436,7 @@ static PyObject *Qd_DrawString(_self, _args) return _res; } -static PyObject *Qd_MacDrawText(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_MacDrawText(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; char *textBuf__in__; @@ -4967,9 +4458,7 @@ static PyObject *Qd_MacDrawText(_self, _args) return _res; } -static PyObject *Qd_CharWidth(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_CharWidth(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; short _rv; @@ -4983,9 +4472,7 @@ static PyObject *Qd_CharWidth(_self, _args) return _res; } -static PyObject *Qd_StringWidth(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_StringWidth(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; short _rv; @@ -4999,9 +4486,7 @@ static PyObject *Qd_StringWidth(_self, _args) return _res; } -static PyObject *Qd_TextWidth(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_TextWidth(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; short _rv; @@ -5024,9 +4509,7 @@ static PyObject *Qd_TextWidth(_self, _args) return _res; } -static PyObject *Qd_GetFontInfo(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_GetFontInfo(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; FontInfo info; @@ -5038,9 +4521,7 @@ static PyObject *Qd_GetFontInfo(_self, _args) return _res; } -static PyObject *Qd_CharExtra(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_CharExtra(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Fixed extra; @@ -5053,9 +4534,7 @@ static PyObject *Qd_CharExtra(_self, _args) return _res; } -static PyObject *Qd_SetPort(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_SetPort(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; GrafPtr thePort; @@ -5068,9 +4547,7 @@ static PyObject *Qd_SetPort(_self, _args) return _res; } -static PyObject *Qd_GetCursor(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_GetCursor(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; CursHandle _rv; @@ -5084,9 +4561,7 @@ static PyObject *Qd_GetCursor(_self, _args) return _res; } -static PyObject *Qd_SetCursor(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_SetCursor(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Cursor *crsr__in__; @@ -5106,9 +4581,7 @@ static PyObject *Qd_SetCursor(_self, _args) return _res; } -static PyObject *Qd_ShowCursor(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_ShowCursor(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -5119,9 +4592,7 @@ static PyObject *Qd_ShowCursor(_self, _args) return _res; } -static PyObject *Qd_LineTo(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_LineTo(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; short h; @@ -5137,9 +4608,7 @@ static PyObject *Qd_LineTo(_self, _args) return _res; } -static PyObject *Qd_SetRect(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_SetRect(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Rect r; @@ -5163,9 +4632,7 @@ static PyObject *Qd_SetRect(_self, _args) return _res; } -static PyObject *Qd_OffsetRect(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_OffsetRect(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Rect r; @@ -5184,9 +4651,7 @@ static PyObject *Qd_OffsetRect(_self, _args) return _res; } -static PyObject *Qd_InsetRect(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_InsetRect(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Rect r; @@ -5205,9 +4670,7 @@ static PyObject *Qd_InsetRect(_self, _args) return _res; } -static PyObject *Qd_UnionRect(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_UnionRect(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Rect src1; @@ -5225,9 +4688,7 @@ static PyObject *Qd_UnionRect(_self, _args) return _res; } -static PyObject *Qd_EqualRect(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_EqualRect(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -5244,9 +4705,7 @@ static PyObject *Qd_EqualRect(_self, _args) return _res; } -static PyObject *Qd_FrameRect(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_FrameRect(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Rect r; @@ -5259,9 +4718,7 @@ static PyObject *Qd_FrameRect(_self, _args) return _res; } -static PyObject *Qd_InvertRect(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_InvertRect(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Rect r; @@ -5274,9 +4731,7 @@ static PyObject *Qd_InvertRect(_self, _args) return _res; } -static PyObject *Qd_FillRect(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_FillRect(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Rect r; @@ -5299,9 +4754,7 @@ static PyObject *Qd_FillRect(_self, _args) return _res; } -static PyObject *Qd_CopyRgn(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_CopyRgn(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; RgnHandle srcRgn; @@ -5317,9 +4770,7 @@ static PyObject *Qd_CopyRgn(_self, _args) return _res; } -static PyObject *Qd_SetRectRgn(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_SetRectRgn(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; RgnHandle rgn; @@ -5344,9 +4795,7 @@ static PyObject *Qd_SetRectRgn(_self, _args) return _res; } -static PyObject *Qd_OffsetRgn(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_OffsetRgn(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; RgnHandle rgn; @@ -5365,9 +4814,7 @@ static PyObject *Qd_OffsetRgn(_self, _args) return _res; } -static PyObject *Qd_UnionRgn(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_UnionRgn(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; RgnHandle srcRgnA; @@ -5386,9 +4833,7 @@ static PyObject *Qd_UnionRgn(_self, _args) return _res; } -static PyObject *Qd_XorRgn(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_XorRgn(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; RgnHandle srcRgnA; @@ -5407,9 +4852,7 @@ static PyObject *Qd_XorRgn(_self, _args) return _res; } -static PyObject *Qd_EqualRgn(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_EqualRgn(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -5426,9 +4869,7 @@ static PyObject *Qd_EqualRgn(_self, _args) return _res; } -static PyObject *Qd_FrameRgn(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_FrameRgn(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; RgnHandle rgn; @@ -5441,9 +4882,7 @@ static PyObject *Qd_FrameRgn(_self, _args) return _res; } -static PyObject *Qd_PaintRgn(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_PaintRgn(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; RgnHandle rgn; @@ -5456,9 +4895,7 @@ static PyObject *Qd_PaintRgn(_self, _args) return _res; } -static PyObject *Qd_InvertRgn(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_InvertRgn(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; RgnHandle rgn; @@ -5471,9 +4908,7 @@ static PyObject *Qd_InvertRgn(_self, _args) return _res; } -static PyObject *Qd_FillRgn(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_FillRgn(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; RgnHandle rgn; @@ -5496,9 +4931,7 @@ static PyObject *Qd_FillRgn(_self, _args) return _res; } -static PyObject *Qd_GetPixel(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_GetPixel(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -5515,9 +4948,7 @@ static PyObject *Qd_GetPixel(_self, _args) return _res; } -static PyObject *Qd_PtInRect(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_PtInRect(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -5534,9 +4965,7 @@ static PyObject *Qd_PtInRect(_self, _args) return _res; } -static PyObject *Qd_DrawText(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_DrawText(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; char *textBuf__in__; @@ -5558,9 +4987,7 @@ static PyObject *Qd_DrawText(_self, _args) return _res; } -static PyObject *Qd_BitMap(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_BitMap(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; @@ -5590,9 +5017,7 @@ static PyObject *Qd_BitMap(_self, _args) } -static PyObject *Qd_RawBitMap(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qd_RawBitMap(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; @@ -6198,8 +5623,7 @@ static PyMethodDef Qd_methods[] = { /* Like BMObj_New, but the original bitmap data structure is copied (and ** released when the object is released) */ -PyObject *BMObj_NewCopied(itself) - BitMapPtr itself; +PyObject *BMObj_NewCopied(BitMapPtr itself) { BitMapObject *it; BitMapPtr itself_copy; @@ -6214,19 +5638,19 @@ PyObject *BMObj_NewCopied(itself) -void initQd() +void initQd(void) { PyObject *m; PyObject *d; - PyMac_INIT_TOOLBOX_OBJECT_NEW(BMObj_New); - PyMac_INIT_TOOLBOX_OBJECT_CONVERT(BMObj_Convert); - PyMac_INIT_TOOLBOX_OBJECT_NEW(GrafObj_New); - PyMac_INIT_TOOLBOX_OBJECT_CONVERT(GrafObj_Convert); - PyMac_INIT_TOOLBOX_OBJECT_NEW(QdRGB_New); - PyMac_INIT_TOOLBOX_OBJECT_CONVERT(QdRGB_Convert); + PyMac_INIT_TOOLBOX_OBJECT_NEW(BitMapPtr, BMObj_New); + PyMac_INIT_TOOLBOX_OBJECT_CONVERT(BitMapPtr, BMObj_Convert); + PyMac_INIT_TOOLBOX_OBJECT_NEW(GrafPtr, GrafObj_New); + PyMac_INIT_TOOLBOX_OBJECT_CONVERT(GrafPtr, GrafObj_Convert); + PyMac_INIT_TOOLBOX_OBJECT_NEW(RGBColorPtr, QdRGB_New); + PyMac_INIT_TOOLBOX_OBJECT_CONVERT(RGBColorPtr, QdRGB_Convert); m = Py_InitModule("Qd", Qd_methods); diff --git a/Mac/Modules/qd/qdsupport.py b/Mac/Modules/qd/qdsupport.py index 705cc4e9451..1bfda553f1a 100644 --- a/Mac/Modules/qd/qdsupport.py +++ b/Mac/Modules/qd/qdsupport.py @@ -61,7 +61,11 @@ PenState = StructOutputBufferType('PenState') PenState_ptr = StructInputBufferType('PenState') includestuff = includestuff + """ -#include <%s>""" % MACHEADERFILE + """ +#ifdef WITHOUT_FRAMEWORKS +#include +#else +#include +#endif #ifdef USE_TOOLBOX_OBJECT_GLUE extern PyObject *_GrafObj_New(GrafPtr); @@ -153,16 +157,13 @@ staticforward PyObject *BMObj_NewCopied(BitMapPtr); /* ** Parse/generate RGB records */ -PyObject *QdRGB_New(itself) - RGBColorPtr itself; +PyObject *QdRGB_New(RGBColorPtr itself) { return Py_BuildValue("lll", (long)itself->red, (long)itself->green, (long)itself->blue); } -QdRGB_Convert(v, p_itself) - PyObject *v; - RGBColorPtr p_itself; +QdRGB_Convert(PyObject *v, RGBColorPtr p_itself) { long red, green, blue; @@ -178,8 +179,7 @@ QdRGB_Convert(v, p_itself) ** Generate FontInfo records */ static -PyObject *QdFI_New(itself) - FontInfo *itself; +PyObject *QdFI_New(FontInfo *itself) { return Py_BuildValue("hhhh", itself->ascent, itself->descent, @@ -191,8 +191,7 @@ finalstuff = finalstuff + """ /* Like BMObj_New, but the original bitmap data structure is copied (and ** released when the object is released) */ -PyObject *BMObj_NewCopied(itself) - BitMapPtr itself; +PyObject *BMObj_NewCopied(BitMapPtr itself) { BitMapObject *it; BitMapPtr itself_copy; @@ -218,12 +217,12 @@ variablestuff = """ """ initstuff = initstuff + """ - PyMac_INIT_TOOLBOX_OBJECT_NEW(BMObj_New); - PyMac_INIT_TOOLBOX_OBJECT_CONVERT(BMObj_Convert); - PyMac_INIT_TOOLBOX_OBJECT_NEW(GrafObj_New); - PyMac_INIT_TOOLBOX_OBJECT_CONVERT(GrafObj_Convert); - PyMac_INIT_TOOLBOX_OBJECT_NEW(QdRGB_New); - PyMac_INIT_TOOLBOX_OBJECT_CONVERT(QdRGB_Convert); + PyMac_INIT_TOOLBOX_OBJECT_NEW(BitMapPtr, BMObj_New); + PyMac_INIT_TOOLBOX_OBJECT_CONVERT(BitMapPtr, BMObj_Convert); + PyMac_INIT_TOOLBOX_OBJECT_NEW(GrafPtr, GrafObj_New); + PyMac_INIT_TOOLBOX_OBJECT_CONVERT(GrafPtr, GrafObj_Convert); + PyMac_INIT_TOOLBOX_OBJECT_NEW(RGBColorPtr, QdRGB_New); + PyMac_INIT_TOOLBOX_OBJECT_CONVERT(RGBColorPtr, QdRGB_Convert); """ ## not yet... diff --git a/Mac/Modules/qdoffs/Qdoffsmodule.c b/Mac/Modules/qdoffs/Qdoffsmodule.c index caa997e180a..abe36305d36 100644 --- a/Mac/Modules/qdoffs/Qdoffsmodule.c +++ b/Mac/Modules/qdoffs/Qdoffsmodule.c @@ -8,7 +8,11 @@ #include "macglue.h" #include "pymactoolbox.h" +#ifdef WITHOUT_FRAMEWORKS #include +#else +#include +#endif #ifdef USE_TOOLBOX_OBJECT_GLUE extern PyObject *_GWorldObj_New(GWorldPtr); @@ -34,8 +38,7 @@ typedef struct GWorldObject { GWorldPtr ob_itself; } GWorldObject; -PyObject *GWorldObj_New(itself) - GWorldPtr itself; +PyObject *GWorldObj_New(GWorldPtr itself) { GWorldObject *it; if (itself == NULL) return PyMac_Error(resNotFound); @@ -44,9 +47,7 @@ PyObject *GWorldObj_New(itself) it->ob_itself = itself; return (PyObject *)it; } -GWorldObj_Convert(v, p_itself) - PyObject *v; - GWorldPtr *p_itself; +GWorldObj_Convert(PyObject *v, GWorldPtr *p_itself) { if (!GWorldObj_Check(v)) { @@ -57,16 +58,13 @@ GWorldObj_Convert(v, p_itself) return 1; } -static void GWorldObj_dealloc(self) - GWorldObject *self; +static void GWorldObj_dealloc(GWorldObject *self) { DisposeGWorld(self->ob_itself); PyMem_DEL(self); } -static PyObject *GWorldObj_GetGWorldDevice(_self, _args) - GWorldObject *_self; - PyObject *_args; +static PyObject *GWorldObj_GetGWorldDevice(GWorldObject *_self, PyObject *_args) { PyObject *_res = NULL; GDHandle _rv; @@ -78,9 +76,7 @@ static PyObject *GWorldObj_GetGWorldDevice(_self, _args) return _res; } -static PyObject *GWorldObj_GetGWorldPixMap(_self, _args) - GWorldObject *_self; - PyObject *_args; +static PyObject *GWorldObj_GetGWorldPixMap(GWorldObject *_self, PyObject *_args) { PyObject *_res = NULL; PixMapHandle _rv; @@ -92,9 +88,7 @@ static PyObject *GWorldObj_GetGWorldPixMap(_self, _args) return _res; } -static PyObject *GWorldObj_as_GrafPtr(_self, _args) - GWorldObject *_self; - PyObject *_args; +static PyObject *GWorldObj_as_GrafPtr(GWorldObject *_self, PyObject *_args) { PyObject *_res = NULL; GrafPtr _rv; @@ -118,9 +112,7 @@ static PyMethodDef GWorldObj_methods[] = { PyMethodChain GWorldObj_chain = { GWorldObj_methods, NULL }; -static PyObject *GWorldObj_getattr(self, name) - GWorldObject *self; - char *name; +static PyObject *GWorldObj_getattr(GWorldObject *self, char *name) { return Py_FindMethodInChain(&GWorldObj_chain, (PyObject *)self, name); } @@ -155,9 +147,7 @@ PyTypeObject GWorld_Type = { /* --------------------- End object type GWorld --------------------- */ -static PyObject *Qdoffs_NewGWorld(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qdoffs_NewGWorld(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; QDErr _err; @@ -186,9 +176,7 @@ static PyObject *Qdoffs_NewGWorld(_self, _args) return _res; } -static PyObject *Qdoffs_LockPixels(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qdoffs_LockPixels(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -202,9 +190,7 @@ static PyObject *Qdoffs_LockPixels(_self, _args) return _res; } -static PyObject *Qdoffs_UnlockPixels(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qdoffs_UnlockPixels(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; PixMapHandle pm; @@ -217,9 +203,7 @@ static PyObject *Qdoffs_UnlockPixels(_self, _args) return _res; } -static PyObject *Qdoffs_UpdateGWorld(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qdoffs_UpdateGWorld(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; GWorldFlags _rv; @@ -248,9 +232,7 @@ static PyObject *Qdoffs_UpdateGWorld(_self, _args) return _res; } -static PyObject *Qdoffs_GetGWorld(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qdoffs_GetGWorld(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; CGrafPtr port; @@ -265,9 +247,7 @@ static PyObject *Qdoffs_GetGWorld(_self, _args) return _res; } -static PyObject *Qdoffs_SetGWorld(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qdoffs_SetGWorld(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; CGrafPtr port; @@ -283,9 +263,7 @@ static PyObject *Qdoffs_SetGWorld(_self, _args) return _res; } -static PyObject *Qdoffs_CTabChanged(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qdoffs_CTabChanged(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; CTabHandle ctab; @@ -298,9 +276,7 @@ static PyObject *Qdoffs_CTabChanged(_self, _args) return _res; } -static PyObject *Qdoffs_PixPatChanged(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qdoffs_PixPatChanged(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; PixPatHandle ppat; @@ -313,9 +289,7 @@ static PyObject *Qdoffs_PixPatChanged(_self, _args) return _res; } -static PyObject *Qdoffs_PortChanged(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qdoffs_PortChanged(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; GrafPtr port; @@ -328,9 +302,7 @@ static PyObject *Qdoffs_PortChanged(_self, _args) return _res; } -static PyObject *Qdoffs_GDeviceChanged(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qdoffs_GDeviceChanged(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; GDHandle gdh; @@ -343,9 +315,7 @@ static PyObject *Qdoffs_GDeviceChanged(_self, _args) return _res; } -static PyObject *Qdoffs_AllowPurgePixels(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qdoffs_AllowPurgePixels(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; PixMapHandle pm; @@ -358,9 +328,7 @@ static PyObject *Qdoffs_AllowPurgePixels(_self, _args) return _res; } -static PyObject *Qdoffs_NoPurgePixels(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qdoffs_NoPurgePixels(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; PixMapHandle pm; @@ -373,9 +341,7 @@ static PyObject *Qdoffs_NoPurgePixels(_self, _args) return _res; } -static PyObject *Qdoffs_GetPixelsState(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qdoffs_GetPixelsState(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; GWorldFlags _rv; @@ -389,9 +355,7 @@ static PyObject *Qdoffs_GetPixelsState(_self, _args) return _res; } -static PyObject *Qdoffs_SetPixelsState(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qdoffs_SetPixelsState(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; PixMapHandle pm; @@ -407,9 +371,7 @@ static PyObject *Qdoffs_SetPixelsState(_self, _args) return _res; } -static PyObject *Qdoffs_GetPixRowBytes(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qdoffs_GetPixRowBytes(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; long _rv; @@ -423,9 +385,7 @@ static PyObject *Qdoffs_GetPixRowBytes(_self, _args) return _res; } -static PyObject *Qdoffs_NewScreenBuffer(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qdoffs_NewScreenBuffer(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; QDErr _err; @@ -448,9 +408,7 @@ static PyObject *Qdoffs_NewScreenBuffer(_self, _args) return _res; } -static PyObject *Qdoffs_DisposeScreenBuffer(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qdoffs_DisposeScreenBuffer(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; PixMapHandle offscreenPixMap; @@ -463,9 +421,7 @@ static PyObject *Qdoffs_DisposeScreenBuffer(_self, _args) return _res; } -static PyObject *Qdoffs_QDDone(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qdoffs_QDDone(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -479,9 +435,7 @@ static PyObject *Qdoffs_QDDone(_self, _args) return _res; } -static PyObject *Qdoffs_OffscreenVersion(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qdoffs_OffscreenVersion(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; long _rv; @@ -493,9 +447,7 @@ static PyObject *Qdoffs_OffscreenVersion(_self, _args) return _res; } -static PyObject *Qdoffs_NewTempScreenBuffer(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qdoffs_NewTempScreenBuffer(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; QDErr _err; @@ -518,9 +470,7 @@ static PyObject *Qdoffs_NewTempScreenBuffer(_self, _args) return _res; } -static PyObject *Qdoffs_PixMap32Bit(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qdoffs_PixMap32Bit(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -534,9 +484,7 @@ static PyObject *Qdoffs_PixMap32Bit(_self, _args) return _res; } -static PyObject *Qdoffs_GetPixMapBytes(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qdoffs_GetPixMapBytes(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; @@ -551,9 +499,7 @@ static PyObject *Qdoffs_GetPixMapBytes(_self, _args) } -static PyObject *Qdoffs_PutPixMapBytes(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qdoffs_PutPixMapBytes(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; @@ -623,15 +569,15 @@ static PyMethodDef Qdoffs_methods[] = { -void initQdoffs() +void initQdoffs(void) { PyObject *m; PyObject *d; - PyMac_INIT_TOOLBOX_OBJECT_NEW(GWorldObj_New); - PyMac_INIT_TOOLBOX_OBJECT_CONVERT(GWorldObj_Convert); + PyMac_INIT_TOOLBOX_OBJECT_NEW(GWorldPtr, GWorldObj_New); + PyMac_INIT_TOOLBOX_OBJECT_CONVERT(GWorldPtr, GWorldObj_Convert); m = Py_InitModule("Qdoffs", Qdoffs_methods); diff --git a/Mac/Modules/qdoffs/qdoffssupport.py b/Mac/Modules/qdoffs/qdoffssupport.py index 3d96ca4f677..bc21531b6ca 100644 --- a/Mac/Modules/qdoffs/qdoffssupport.py +++ b/Mac/Modules/qdoffs/qdoffssupport.py @@ -34,7 +34,11 @@ GrafPtr = OpaqueByValueType("GrafPtr", "GrafObj") QDErr = OSErrType("QDErr", 'h') includestuff = includestuff + """ -#include <%s>""" % MACHEADERFILE + """ +#ifdef WITHOUT_FRAMEWORKS +#include +#else +#include +#endif #ifdef USE_TOOLBOX_OBJECT_GLUE extern PyObject *_GWorldObj_New(GWorldPtr); @@ -49,8 +53,8 @@ extern int _GWorldObj_Convert(PyObject *, GWorldPtr *); """ initstuff = initstuff + """ - PyMac_INIT_TOOLBOX_OBJECT_NEW(GWorldObj_New); - PyMac_INIT_TOOLBOX_OBJECT_CONVERT(GWorldObj_Convert); + PyMac_INIT_TOOLBOX_OBJECT_NEW(GWorldPtr, GWorldObj_New); + PyMac_INIT_TOOLBOX_OBJECT_CONVERT(GWorldPtr, GWorldObj_Convert); """ class MyObjectDefinition(GlobalObjectDefinition): diff --git a/Mac/Modules/qt/Qtmodule.c b/Mac/Modules/qt/Qtmodule.c index 20ba37063bf..12c67cafd3b 100644 --- a/Mac/Modules/qt/Qtmodule.c +++ b/Mac/Modules/qt/Qtmodule.c @@ -8,7 +8,13 @@ #include "macglue.h" #include "pymactoolbox.h" +#ifdef WITHOUT_FRAMEWORKS #include +#else +/* #include */ +#include +#endif + #ifdef USE_TOOLBOX_OBJECT_GLUE extern PyObject *_TrackObj_New(Track); @@ -45,8 +51,7 @@ extern int _MediaObj_Convert(PyObject *, Media *); ** Parse/generate time records */ static PyObject * -QtTimeRecord_New(itself) - TimeRecord *itself; +QtTimeRecord_New(TimeRecord *itself) { if (itself->base) return Py_BuildValue("O&lO&", PyMac_Buildwide, &itself->value, itself->scale, @@ -57,9 +62,7 @@ QtTimeRecord_New(itself) } static int -QtTimeRecord_Convert(v, p_itself) - PyObject *v; - TimeRecord *p_itself; +QtTimeRecord_Convert(PyObject *v, TimeRecord *p_itself) { PyObject *base = NULL; if( !PyArg_ParseTuple(v, "O&l|O", PyMac_Getwide, &p_itself->value, &p_itself->scale, @@ -89,8 +92,7 @@ typedef struct MovieControllerObject { MovieController ob_itself; } MovieControllerObject; -PyObject *MovieCtlObj_New(itself) - MovieController itself; +PyObject *MovieCtlObj_New(MovieController itself) { MovieControllerObject *it; if (itself == NULL) { @@ -102,9 +104,7 @@ PyObject *MovieCtlObj_New(itself) it->ob_itself = itself; return (PyObject *)it; } -MovieCtlObj_Convert(v, p_itself) - PyObject *v; - MovieController *p_itself; +MovieCtlObj_Convert(PyObject *v, MovieController *p_itself) { if (!MovieCtlObj_Check(v)) { @@ -115,16 +115,13 @@ MovieCtlObj_Convert(v, p_itself) return 1; } -static void MovieCtlObj_dealloc(self) - MovieControllerObject *self; +static void MovieCtlObj_dealloc(MovieControllerObject *self) { DisposeMovieController(self->ob_itself); PyMem_DEL(self); } -static PyObject *MovieCtlObj_MCSetMovie(_self, _args) - MovieControllerObject *_self; - PyObject *_args; +static PyObject *MovieCtlObj_MCSetMovie(MovieControllerObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -145,9 +142,7 @@ static PyObject *MovieCtlObj_MCSetMovie(_self, _args) return _res; } -static PyObject *MovieCtlObj_MCGetIndMovie(_self, _args) - MovieControllerObject *_self; - PyObject *_args; +static PyObject *MovieCtlObj_MCGetIndMovie(MovieControllerObject *_self, PyObject *_args) { PyObject *_res = NULL; Movie _rv; @@ -162,9 +157,7 @@ static PyObject *MovieCtlObj_MCGetIndMovie(_self, _args) return _res; } -static PyObject *MovieCtlObj_MCRemoveAllMovies(_self, _args) - MovieControllerObject *_self; - PyObject *_args; +static PyObject *MovieCtlObj_MCRemoveAllMovies(MovieControllerObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -176,9 +169,7 @@ static PyObject *MovieCtlObj_MCRemoveAllMovies(_self, _args) return _res; } -static PyObject *MovieCtlObj_MCRemoveAMovie(_self, _args) - MovieControllerObject *_self; - PyObject *_args; +static PyObject *MovieCtlObj_MCRemoveAMovie(MovieControllerObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -193,9 +184,7 @@ static PyObject *MovieCtlObj_MCRemoveAMovie(_self, _args) return _res; } -static PyObject *MovieCtlObj_MCRemoveMovie(_self, _args) - MovieControllerObject *_self; - PyObject *_args; +static PyObject *MovieCtlObj_MCRemoveMovie(MovieControllerObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -207,9 +196,7 @@ static PyObject *MovieCtlObj_MCRemoveMovie(_self, _args) return _res; } -static PyObject *MovieCtlObj_MCIsPlayerEvent(_self, _args) - MovieControllerObject *_self; - PyObject *_args; +static PyObject *MovieCtlObj_MCIsPlayerEvent(MovieControllerObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -224,9 +211,7 @@ static PyObject *MovieCtlObj_MCIsPlayerEvent(_self, _args) return _res; } -static PyObject *MovieCtlObj_MCDoAction(_self, _args) - MovieControllerObject *_self; - PyObject *_args; +static PyObject *MovieCtlObj_MCDoAction(MovieControllerObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -244,9 +229,7 @@ static PyObject *MovieCtlObj_MCDoAction(_self, _args) return _res; } -static PyObject *MovieCtlObj_MCSetControllerAttached(_self, _args) - MovieControllerObject *_self; - PyObject *_args; +static PyObject *MovieCtlObj_MCSetControllerAttached(MovieControllerObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -261,9 +244,7 @@ static PyObject *MovieCtlObj_MCSetControllerAttached(_self, _args) return _res; } -static PyObject *MovieCtlObj_MCIsControllerAttached(_self, _args) - MovieControllerObject *_self; - PyObject *_args; +static PyObject *MovieCtlObj_MCIsControllerAttached(MovieControllerObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -275,9 +256,7 @@ static PyObject *MovieCtlObj_MCIsControllerAttached(_self, _args) return _res; } -static PyObject *MovieCtlObj_MCSetControllerPort(_self, _args) - MovieControllerObject *_self; - PyObject *_args; +static PyObject *MovieCtlObj_MCSetControllerPort(MovieControllerObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -292,9 +271,7 @@ static PyObject *MovieCtlObj_MCSetControllerPort(_self, _args) return _res; } -static PyObject *MovieCtlObj_MCGetControllerPort(_self, _args) - MovieControllerObject *_self; - PyObject *_args; +static PyObject *MovieCtlObj_MCGetControllerPort(MovieControllerObject *_self, PyObject *_args) { PyObject *_res = NULL; CGrafPtr _rv; @@ -306,9 +283,7 @@ static PyObject *MovieCtlObj_MCGetControllerPort(_self, _args) return _res; } -static PyObject *MovieCtlObj_MCSetVisible(_self, _args) - MovieControllerObject *_self; - PyObject *_args; +static PyObject *MovieCtlObj_MCSetVisible(MovieControllerObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -323,9 +298,7 @@ static PyObject *MovieCtlObj_MCSetVisible(_self, _args) return _res; } -static PyObject *MovieCtlObj_MCGetVisible(_self, _args) - MovieControllerObject *_self; - PyObject *_args; +static PyObject *MovieCtlObj_MCGetVisible(MovieControllerObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -337,9 +310,7 @@ static PyObject *MovieCtlObj_MCGetVisible(_self, _args) return _res; } -static PyObject *MovieCtlObj_MCGetControllerBoundsRect(_self, _args) - MovieControllerObject *_self; - PyObject *_args; +static PyObject *MovieCtlObj_MCGetControllerBoundsRect(MovieControllerObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -354,9 +325,7 @@ static PyObject *MovieCtlObj_MCGetControllerBoundsRect(_self, _args) return _res; } -static PyObject *MovieCtlObj_MCSetControllerBoundsRect(_self, _args) - MovieControllerObject *_self; - PyObject *_args; +static PyObject *MovieCtlObj_MCSetControllerBoundsRect(MovieControllerObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -371,9 +340,7 @@ static PyObject *MovieCtlObj_MCSetControllerBoundsRect(_self, _args) return _res; } -static PyObject *MovieCtlObj_MCGetControllerBoundsRgn(_self, _args) - MovieControllerObject *_self; - PyObject *_args; +static PyObject *MovieCtlObj_MCGetControllerBoundsRgn(MovieControllerObject *_self, PyObject *_args) { PyObject *_res = NULL; RgnHandle _rv; @@ -385,9 +352,7 @@ static PyObject *MovieCtlObj_MCGetControllerBoundsRgn(_self, _args) return _res; } -static PyObject *MovieCtlObj_MCGetWindowRgn(_self, _args) - MovieControllerObject *_self; - PyObject *_args; +static PyObject *MovieCtlObj_MCGetWindowRgn(MovieControllerObject *_self, PyObject *_args) { PyObject *_res = NULL; RgnHandle _rv; @@ -402,9 +367,7 @@ static PyObject *MovieCtlObj_MCGetWindowRgn(_self, _args) return _res; } -static PyObject *MovieCtlObj_MCMovieChanged(_self, _args) - MovieControllerObject *_self; - PyObject *_args; +static PyObject *MovieCtlObj_MCMovieChanged(MovieControllerObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -419,9 +382,7 @@ static PyObject *MovieCtlObj_MCMovieChanged(_self, _args) return _res; } -static PyObject *MovieCtlObj_MCSetDuration(_self, _args) - MovieControllerObject *_self; - PyObject *_args; +static PyObject *MovieCtlObj_MCSetDuration(MovieControllerObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -436,9 +397,7 @@ static PyObject *MovieCtlObj_MCSetDuration(_self, _args) return _res; } -static PyObject *MovieCtlObj_MCGetCurrentTime(_self, _args) - MovieControllerObject *_self; - PyObject *_args; +static PyObject *MovieCtlObj_MCGetCurrentTime(MovieControllerObject *_self, PyObject *_args) { PyObject *_res = NULL; TimeValue _rv; @@ -453,9 +412,7 @@ static PyObject *MovieCtlObj_MCGetCurrentTime(_self, _args) return _res; } -static PyObject *MovieCtlObj_MCNewAttachedController(_self, _args) - MovieControllerObject *_self; - PyObject *_args; +static PyObject *MovieCtlObj_MCNewAttachedController(MovieControllerObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -476,9 +433,7 @@ static PyObject *MovieCtlObj_MCNewAttachedController(_self, _args) return _res; } -static PyObject *MovieCtlObj_MCDraw(_self, _args) - MovieControllerObject *_self; - PyObject *_args; +static PyObject *MovieCtlObj_MCDraw(MovieControllerObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -493,9 +448,7 @@ static PyObject *MovieCtlObj_MCDraw(_self, _args) return _res; } -static PyObject *MovieCtlObj_MCActivate(_self, _args) - MovieControllerObject *_self; - PyObject *_args; +static PyObject *MovieCtlObj_MCActivate(MovieControllerObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -513,9 +466,7 @@ static PyObject *MovieCtlObj_MCActivate(_self, _args) return _res; } -static PyObject *MovieCtlObj_MCIdle(_self, _args) - MovieControllerObject *_self; - PyObject *_args; +static PyObject *MovieCtlObj_MCIdle(MovieControllerObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -527,9 +478,7 @@ static PyObject *MovieCtlObj_MCIdle(_self, _args) return _res; } -static PyObject *MovieCtlObj_MCKey(_self, _args) - MovieControllerObject *_self; - PyObject *_args; +static PyObject *MovieCtlObj_MCKey(MovieControllerObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -547,9 +496,7 @@ static PyObject *MovieCtlObj_MCKey(_self, _args) return _res; } -static PyObject *MovieCtlObj_MCClick(_self, _args) - MovieControllerObject *_self; - PyObject *_args; +static PyObject *MovieCtlObj_MCClick(MovieControllerObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -573,9 +520,7 @@ static PyObject *MovieCtlObj_MCClick(_self, _args) return _res; } -static PyObject *MovieCtlObj_MCEnableEditing(_self, _args) - MovieControllerObject *_self; - PyObject *_args; +static PyObject *MovieCtlObj_MCEnableEditing(MovieControllerObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -590,9 +535,7 @@ static PyObject *MovieCtlObj_MCEnableEditing(_self, _args) return _res; } -static PyObject *MovieCtlObj_MCIsEditingEnabled(_self, _args) - MovieControllerObject *_self; - PyObject *_args; +static PyObject *MovieCtlObj_MCIsEditingEnabled(MovieControllerObject *_self, PyObject *_args) { PyObject *_res = NULL; long _rv; @@ -604,9 +547,7 @@ static PyObject *MovieCtlObj_MCIsEditingEnabled(_self, _args) return _res; } -static PyObject *MovieCtlObj_MCCopy(_self, _args) - MovieControllerObject *_self; - PyObject *_args; +static PyObject *MovieCtlObj_MCCopy(MovieControllerObject *_self, PyObject *_args) { PyObject *_res = NULL; Movie _rv; @@ -618,9 +559,7 @@ static PyObject *MovieCtlObj_MCCopy(_self, _args) return _res; } -static PyObject *MovieCtlObj_MCCut(_self, _args) - MovieControllerObject *_self; - PyObject *_args; +static PyObject *MovieCtlObj_MCCut(MovieControllerObject *_self, PyObject *_args) { PyObject *_res = NULL; Movie _rv; @@ -632,9 +571,7 @@ static PyObject *MovieCtlObj_MCCut(_self, _args) return _res; } -static PyObject *MovieCtlObj_MCPaste(_self, _args) - MovieControllerObject *_self; - PyObject *_args; +static PyObject *MovieCtlObj_MCPaste(MovieControllerObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -649,9 +586,7 @@ static PyObject *MovieCtlObj_MCPaste(_self, _args) return _res; } -static PyObject *MovieCtlObj_MCClear(_self, _args) - MovieControllerObject *_self; - PyObject *_args; +static PyObject *MovieCtlObj_MCClear(MovieControllerObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -663,9 +598,7 @@ static PyObject *MovieCtlObj_MCClear(_self, _args) return _res; } -static PyObject *MovieCtlObj_MCUndo(_self, _args) - MovieControllerObject *_self; - PyObject *_args; +static PyObject *MovieCtlObj_MCUndo(MovieControllerObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -677,9 +610,7 @@ static PyObject *MovieCtlObj_MCUndo(_self, _args) return _res; } -static PyObject *MovieCtlObj_MCPositionController(_self, _args) - MovieControllerObject *_self; - PyObject *_args; +static PyObject *MovieCtlObj_MCPositionController(MovieControllerObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -700,9 +631,7 @@ static PyObject *MovieCtlObj_MCPositionController(_self, _args) return _res; } -static PyObject *MovieCtlObj_MCGetControllerInfo(_self, _args) - MovieControllerObject *_self; - PyObject *_args; +static PyObject *MovieCtlObj_MCGetControllerInfo(MovieControllerObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -717,9 +646,7 @@ static PyObject *MovieCtlObj_MCGetControllerInfo(_self, _args) return _res; } -static PyObject *MovieCtlObj_MCSetClip(_self, _args) - MovieControllerObject *_self; - PyObject *_args; +static PyObject *MovieCtlObj_MCSetClip(MovieControllerObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -737,9 +664,7 @@ static PyObject *MovieCtlObj_MCSetClip(_self, _args) return _res; } -static PyObject *MovieCtlObj_MCGetClip(_self, _args) - MovieControllerObject *_self; - PyObject *_args; +static PyObject *MovieCtlObj_MCGetClip(MovieControllerObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -757,9 +682,7 @@ static PyObject *MovieCtlObj_MCGetClip(_self, _args) return _res; } -static PyObject *MovieCtlObj_MCDrawBadge(_self, _args) - MovieControllerObject *_self; - PyObject *_args; +static PyObject *MovieCtlObj_MCDrawBadge(MovieControllerObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -777,9 +700,7 @@ static PyObject *MovieCtlObj_MCDrawBadge(_self, _args) return _res; } -static PyObject *MovieCtlObj_MCSetUpEditMenu(_self, _args) - MovieControllerObject *_self; - PyObject *_args; +static PyObject *MovieCtlObj_MCSetUpEditMenu(MovieControllerObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -797,9 +718,7 @@ static PyObject *MovieCtlObj_MCSetUpEditMenu(_self, _args) return _res; } -static PyObject *MovieCtlObj_MCGetMenuString(_self, _args) - MovieControllerObject *_self; - PyObject *_args; +static PyObject *MovieCtlObj_MCGetMenuString(MovieControllerObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -820,9 +739,7 @@ static PyObject *MovieCtlObj_MCGetMenuString(_self, _args) return _res; } -static PyObject *MovieCtlObj_MCPtInController(_self, _args) - MovieControllerObject *_self; - PyObject *_args; +static PyObject *MovieCtlObj_MCPtInController(MovieControllerObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -840,9 +757,7 @@ static PyObject *MovieCtlObj_MCPtInController(_self, _args) return _res; } -static PyObject *MovieCtlObj_MCInvalidate(_self, _args) - MovieControllerObject *_self; - PyObject *_args; +static PyObject *MovieCtlObj_MCInvalidate(MovieControllerObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -860,9 +775,7 @@ static PyObject *MovieCtlObj_MCInvalidate(_self, _args) return _res; } -static PyObject *MovieCtlObj_MCAdjustCursor(_self, _args) - MovieControllerObject *_self; - PyObject *_args; +static PyObject *MovieCtlObj_MCAdjustCursor(MovieControllerObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -883,9 +796,7 @@ static PyObject *MovieCtlObj_MCAdjustCursor(_self, _args) return _res; } -static PyObject *MovieCtlObj_MCGetInterfaceElement(_self, _args) - MovieControllerObject *_self; - PyObject *_args; +static PyObject *MovieCtlObj_MCGetInterfaceElement(MovieControllerObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -997,9 +908,7 @@ static PyMethodDef MovieCtlObj_methods[] = { PyMethodChain MovieCtlObj_chain = { MovieCtlObj_methods, NULL }; -static PyObject *MovieCtlObj_getattr(self, name) - MovieControllerObject *self; - char *name; +static PyObject *MovieCtlObj_getattr(MovieControllerObject *self, char *name) { return Py_FindMethodInChain(&MovieCtlObj_chain, (PyObject *)self, name); } @@ -1045,8 +954,7 @@ typedef struct TimeBaseObject { TimeBase ob_itself; } TimeBaseObject; -PyObject *TimeBaseObj_New(itself) - TimeBase itself; +PyObject *TimeBaseObj_New(TimeBase itself) { TimeBaseObject *it; if (itself == NULL) { @@ -1058,9 +966,7 @@ PyObject *TimeBaseObj_New(itself) it->ob_itself = itself; return (PyObject *)it; } -TimeBaseObj_Convert(v, p_itself) - PyObject *v; - TimeBase *p_itself; +TimeBaseObj_Convert(PyObject *v, TimeBase *p_itself) { if (!TimeBaseObj_Check(v)) { @@ -1071,16 +977,13 @@ TimeBaseObj_Convert(v, p_itself) return 1; } -static void TimeBaseObj_dealloc(self) - TimeBaseObject *self; +static void TimeBaseObj_dealloc(TimeBaseObject *self) { /* Cleanup of self->ob_itself goes here */ PyMem_DEL(self); } -static PyObject *TimeBaseObj_DisposeTimeBase(_self, _args) - TimeBaseObject *_self; - PyObject *_args; +static PyObject *TimeBaseObj_DisposeTimeBase(TimeBaseObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -1091,9 +994,7 @@ static PyObject *TimeBaseObj_DisposeTimeBase(_self, _args) return _res; } -static PyObject *TimeBaseObj_GetTimeBaseTime(_self, _args) - TimeBaseObject *_self; - PyObject *_args; +static PyObject *TimeBaseObj_GetTimeBaseTime(TimeBaseObject *_self, PyObject *_args) { PyObject *_res = NULL; TimeValue _rv; @@ -1111,9 +1012,7 @@ static PyObject *TimeBaseObj_GetTimeBaseTime(_self, _args) return _res; } -static PyObject *TimeBaseObj_SetTimeBaseTime(_self, _args) - TimeBaseObject *_self; - PyObject *_args; +static PyObject *TimeBaseObj_SetTimeBaseTime(TimeBaseObject *_self, PyObject *_args) { PyObject *_res = NULL; TimeRecord tr; @@ -1127,9 +1026,7 @@ static PyObject *TimeBaseObj_SetTimeBaseTime(_self, _args) return _res; } -static PyObject *TimeBaseObj_SetTimeBaseValue(_self, _args) - TimeBaseObject *_self; - PyObject *_args; +static PyObject *TimeBaseObj_SetTimeBaseValue(TimeBaseObject *_self, PyObject *_args) { PyObject *_res = NULL; TimeValue t; @@ -1146,9 +1043,7 @@ static PyObject *TimeBaseObj_SetTimeBaseValue(_self, _args) return _res; } -static PyObject *TimeBaseObj_GetTimeBaseRate(_self, _args) - TimeBaseObject *_self; - PyObject *_args; +static PyObject *TimeBaseObj_GetTimeBaseRate(TimeBaseObject *_self, PyObject *_args) { PyObject *_res = NULL; Fixed _rv; @@ -1160,9 +1055,7 @@ static PyObject *TimeBaseObj_GetTimeBaseRate(_self, _args) return _res; } -static PyObject *TimeBaseObj_SetTimeBaseRate(_self, _args) - TimeBaseObject *_self; - PyObject *_args; +static PyObject *TimeBaseObj_SetTimeBaseRate(TimeBaseObject *_self, PyObject *_args) { PyObject *_res = NULL; Fixed r; @@ -1176,9 +1069,7 @@ static PyObject *TimeBaseObj_SetTimeBaseRate(_self, _args) return _res; } -static PyObject *TimeBaseObj_GetTimeBaseStartTime(_self, _args) - TimeBaseObject *_self; - PyObject *_args; +static PyObject *TimeBaseObj_GetTimeBaseStartTime(TimeBaseObject *_self, PyObject *_args) { PyObject *_res = NULL; TimeValue _rv; @@ -1196,9 +1087,7 @@ static PyObject *TimeBaseObj_GetTimeBaseStartTime(_self, _args) return _res; } -static PyObject *TimeBaseObj_SetTimeBaseStartTime(_self, _args) - TimeBaseObject *_self; - PyObject *_args; +static PyObject *TimeBaseObj_SetTimeBaseStartTime(TimeBaseObject *_self, PyObject *_args) { PyObject *_res = NULL; TimeRecord tr; @@ -1212,9 +1101,7 @@ static PyObject *TimeBaseObj_SetTimeBaseStartTime(_self, _args) return _res; } -static PyObject *TimeBaseObj_GetTimeBaseStopTime(_self, _args) - TimeBaseObject *_self; - PyObject *_args; +static PyObject *TimeBaseObj_GetTimeBaseStopTime(TimeBaseObject *_self, PyObject *_args) { PyObject *_res = NULL; TimeValue _rv; @@ -1232,9 +1119,7 @@ static PyObject *TimeBaseObj_GetTimeBaseStopTime(_self, _args) return _res; } -static PyObject *TimeBaseObj_SetTimeBaseStopTime(_self, _args) - TimeBaseObject *_self; - PyObject *_args; +static PyObject *TimeBaseObj_SetTimeBaseStopTime(TimeBaseObject *_self, PyObject *_args) { PyObject *_res = NULL; TimeRecord tr; @@ -1248,9 +1133,7 @@ static PyObject *TimeBaseObj_SetTimeBaseStopTime(_self, _args) return _res; } -static PyObject *TimeBaseObj_GetTimeBaseFlags(_self, _args) - TimeBaseObject *_self; - PyObject *_args; +static PyObject *TimeBaseObj_GetTimeBaseFlags(TimeBaseObject *_self, PyObject *_args) { PyObject *_res = NULL; long _rv; @@ -1262,9 +1145,7 @@ static PyObject *TimeBaseObj_GetTimeBaseFlags(_self, _args) return _res; } -static PyObject *TimeBaseObj_SetTimeBaseFlags(_self, _args) - TimeBaseObject *_self; - PyObject *_args; +static PyObject *TimeBaseObj_SetTimeBaseFlags(TimeBaseObject *_self, PyObject *_args) { PyObject *_res = NULL; long timeBaseFlags; @@ -1278,9 +1159,7 @@ static PyObject *TimeBaseObj_SetTimeBaseFlags(_self, _args) return _res; } -static PyObject *TimeBaseObj_SetTimeBaseMasterTimeBase(_self, _args) - TimeBaseObject *_self; - PyObject *_args; +static PyObject *TimeBaseObj_SetTimeBaseMasterTimeBase(TimeBaseObject *_self, PyObject *_args) { PyObject *_res = NULL; TimeBase master; @@ -1297,9 +1176,7 @@ static PyObject *TimeBaseObj_SetTimeBaseMasterTimeBase(_self, _args) return _res; } -static PyObject *TimeBaseObj_GetTimeBaseMasterTimeBase(_self, _args) - TimeBaseObject *_self; - PyObject *_args; +static PyObject *TimeBaseObj_GetTimeBaseMasterTimeBase(TimeBaseObject *_self, PyObject *_args) { PyObject *_res = NULL; TimeBase _rv; @@ -1311,9 +1188,7 @@ static PyObject *TimeBaseObj_GetTimeBaseMasterTimeBase(_self, _args) return _res; } -static PyObject *TimeBaseObj_SetTimeBaseMasterClock(_self, _args) - TimeBaseObject *_self; - PyObject *_args; +static PyObject *TimeBaseObj_SetTimeBaseMasterClock(TimeBaseObject *_self, PyObject *_args) { PyObject *_res = NULL; Component clockMeister; @@ -1330,9 +1205,7 @@ static PyObject *TimeBaseObj_SetTimeBaseMasterClock(_self, _args) return _res; } -static PyObject *TimeBaseObj_GetTimeBaseMasterClock(_self, _args) - TimeBaseObject *_self; - PyObject *_args; +static PyObject *TimeBaseObj_GetTimeBaseMasterClock(TimeBaseObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentInstance _rv; @@ -1344,9 +1217,7 @@ static PyObject *TimeBaseObj_GetTimeBaseMasterClock(_self, _args) return _res; } -static PyObject *TimeBaseObj_GetTimeBaseStatus(_self, _args) - TimeBaseObject *_self; - PyObject *_args; +static PyObject *TimeBaseObj_GetTimeBaseStatus(TimeBaseObject *_self, PyObject *_args) { PyObject *_res = NULL; long _rv; @@ -1361,9 +1232,7 @@ static PyObject *TimeBaseObj_GetTimeBaseStatus(_self, _args) return _res; } -static PyObject *TimeBaseObj_SetTimeBaseZero(_self, _args) - TimeBaseObject *_self; - PyObject *_args; +static PyObject *TimeBaseObj_SetTimeBaseZero(TimeBaseObject *_self, PyObject *_args) { PyObject *_res = NULL; TimeRecord zero; @@ -1377,9 +1246,7 @@ static PyObject *TimeBaseObj_SetTimeBaseZero(_self, _args) return _res; } -static PyObject *TimeBaseObj_GetTimeBaseEffectiveRate(_self, _args) - TimeBaseObject *_self; - PyObject *_args; +static PyObject *TimeBaseObj_GetTimeBaseEffectiveRate(TimeBaseObject *_self, PyObject *_args) { PyObject *_res = NULL; Fixed _rv; @@ -1435,9 +1302,7 @@ static PyMethodDef TimeBaseObj_methods[] = { PyMethodChain TimeBaseObj_chain = { TimeBaseObj_methods, NULL }; -static PyObject *TimeBaseObj_getattr(self, name) - TimeBaseObject *self; - char *name; +static PyObject *TimeBaseObj_getattr(TimeBaseObject *self, char *name) { return Py_FindMethodInChain(&TimeBaseObj_chain, (PyObject *)self, name); } @@ -1483,8 +1348,7 @@ typedef struct UserDataObject { UserData ob_itself; } UserDataObject; -PyObject *UserDataObj_New(itself) - UserData itself; +PyObject *UserDataObj_New(UserData itself) { UserDataObject *it; if (itself == NULL) { @@ -1496,9 +1360,7 @@ PyObject *UserDataObj_New(itself) it->ob_itself = itself; return (PyObject *)it; } -UserDataObj_Convert(v, p_itself) - PyObject *v; - UserData *p_itself; +UserDataObj_Convert(PyObject *v, UserData *p_itself) { if (!UserDataObj_Check(v)) { @@ -1509,16 +1371,13 @@ UserDataObj_Convert(v, p_itself) return 1; } -static void UserDataObj_dealloc(self) - UserDataObject *self; +static void UserDataObj_dealloc(UserDataObject *self) { DisposeUserData(self->ob_itself); PyMem_DEL(self); } -static PyObject *UserDataObj_GetUserData(_self, _args) - UserDataObject *_self; - PyObject *_args; +static PyObject *UserDataObj_GetUserData(UserDataObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1540,9 +1399,7 @@ static PyObject *UserDataObj_GetUserData(_self, _args) return _res; } -static PyObject *UserDataObj_AddUserData(_self, _args) - UserDataObject *_self; - PyObject *_args; +static PyObject *UserDataObj_AddUserData(UserDataObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1561,9 +1418,7 @@ static PyObject *UserDataObj_AddUserData(_self, _args) return _res; } -static PyObject *UserDataObj_RemoveUserData(_self, _args) - UserDataObject *_self; - PyObject *_args; +static PyObject *UserDataObj_RemoveUserData(UserDataObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1582,9 +1437,7 @@ static PyObject *UserDataObj_RemoveUserData(_self, _args) return _res; } -static PyObject *UserDataObj_CountUserDataType(_self, _args) - UserDataObject *_self; - PyObject *_args; +static PyObject *UserDataObj_CountUserDataType(UserDataObject *_self, PyObject *_args) { PyObject *_res = NULL; short _rv; @@ -1599,9 +1452,7 @@ static PyObject *UserDataObj_CountUserDataType(_self, _args) return _res; } -static PyObject *UserDataObj_GetNextUserDataType(_self, _args) - UserDataObject *_self; - PyObject *_args; +static PyObject *UserDataObj_GetNextUserDataType(UserDataObject *_self, PyObject *_args) { PyObject *_res = NULL; long _rv; @@ -1616,9 +1467,7 @@ static PyObject *UserDataObj_GetNextUserDataType(_self, _args) return _res; } -static PyObject *UserDataObj_AddUserDataText(_self, _args) - UserDataObject *_self; - PyObject *_args; +static PyObject *UserDataObj_AddUserDataText(UserDataObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1643,9 +1492,7 @@ static PyObject *UserDataObj_AddUserDataText(_self, _args) return _res; } -static PyObject *UserDataObj_GetUserDataText(_self, _args) - UserDataObject *_self; - PyObject *_args; +static PyObject *UserDataObj_GetUserDataText(UserDataObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1670,9 +1517,7 @@ static PyObject *UserDataObj_GetUserDataText(_self, _args) return _res; } -static PyObject *UserDataObj_RemoveUserDataText(_self, _args) - UserDataObject *_self; - PyObject *_args; +static PyObject *UserDataObj_RemoveUserDataText(UserDataObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1694,9 +1539,7 @@ static PyObject *UserDataObj_RemoveUserDataText(_self, _args) return _res; } -static PyObject *UserDataObj_PutUserDataIntoHandle(_self, _args) - UserDataObject *_self; - PyObject *_args; +static PyObject *UserDataObj_PutUserDataIntoHandle(UserDataObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1736,9 +1579,7 @@ static PyMethodDef UserDataObj_methods[] = { PyMethodChain UserDataObj_chain = { UserDataObj_methods, NULL }; -static PyObject *UserDataObj_getattr(self, name) - UserDataObject *self; - char *name; +static PyObject *UserDataObj_getattr(UserDataObject *self, char *name) { return Py_FindMethodInChain(&UserDataObj_chain, (PyObject *)self, name); } @@ -1784,8 +1625,7 @@ typedef struct MediaObject { Media ob_itself; } MediaObject; -PyObject *MediaObj_New(itself) - Media itself; +PyObject *MediaObj_New(Media itself) { MediaObject *it; if (itself == NULL) { @@ -1797,9 +1637,7 @@ PyObject *MediaObj_New(itself) it->ob_itself = itself; return (PyObject *)it; } -MediaObj_Convert(v, p_itself) - PyObject *v; - Media *p_itself; +MediaObj_Convert(PyObject *v, Media *p_itself) { if (!MediaObj_Check(v)) { @@ -1810,16 +1648,13 @@ MediaObj_Convert(v, p_itself) return 1; } -static void MediaObj_dealloc(self) - MediaObject *self; +static void MediaObj_dealloc(MediaObject *self) { DisposeTrackMedia(self->ob_itself); PyMem_DEL(self); } -static PyObject *MediaObj_LoadMediaIntoRam(_self, _args) - MediaObject *_self; - PyObject *_args; +static PyObject *MediaObj_LoadMediaIntoRam(MediaObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1841,9 +1676,7 @@ static PyObject *MediaObj_LoadMediaIntoRam(_self, _args) return _res; } -static PyObject *MediaObj_GetMediaTrack(_self, _args) - MediaObject *_self; - PyObject *_args; +static PyObject *MediaObj_GetMediaTrack(MediaObject *_self, PyObject *_args) { PyObject *_res = NULL; Track _rv; @@ -1855,9 +1688,7 @@ static PyObject *MediaObj_GetMediaTrack(_self, _args) return _res; } -static PyObject *MediaObj_GetMediaCreationTime(_self, _args) - MediaObject *_self; - PyObject *_args; +static PyObject *MediaObj_GetMediaCreationTime(MediaObject *_self, PyObject *_args) { PyObject *_res = NULL; unsigned long _rv; @@ -1869,9 +1700,7 @@ static PyObject *MediaObj_GetMediaCreationTime(_self, _args) return _res; } -static PyObject *MediaObj_GetMediaModificationTime(_self, _args) - MediaObject *_self; - PyObject *_args; +static PyObject *MediaObj_GetMediaModificationTime(MediaObject *_self, PyObject *_args) { PyObject *_res = NULL; unsigned long _rv; @@ -1883,9 +1712,7 @@ static PyObject *MediaObj_GetMediaModificationTime(_self, _args) return _res; } -static PyObject *MediaObj_GetMediaTimeScale(_self, _args) - MediaObject *_self; - PyObject *_args; +static PyObject *MediaObj_GetMediaTimeScale(MediaObject *_self, PyObject *_args) { PyObject *_res = NULL; TimeScale _rv; @@ -1897,9 +1724,7 @@ static PyObject *MediaObj_GetMediaTimeScale(_self, _args) return _res; } -static PyObject *MediaObj_SetMediaTimeScale(_self, _args) - MediaObject *_self; - PyObject *_args; +static PyObject *MediaObj_SetMediaTimeScale(MediaObject *_self, PyObject *_args) { PyObject *_res = NULL; TimeScale timeScale; @@ -1913,9 +1738,7 @@ static PyObject *MediaObj_SetMediaTimeScale(_self, _args) return _res; } -static PyObject *MediaObj_GetMediaDuration(_self, _args) - MediaObject *_self; - PyObject *_args; +static PyObject *MediaObj_GetMediaDuration(MediaObject *_self, PyObject *_args) { PyObject *_res = NULL; TimeValue _rv; @@ -1927,9 +1750,7 @@ static PyObject *MediaObj_GetMediaDuration(_self, _args) return _res; } -static PyObject *MediaObj_GetMediaLanguage(_self, _args) - MediaObject *_self; - PyObject *_args; +static PyObject *MediaObj_GetMediaLanguage(MediaObject *_self, PyObject *_args) { PyObject *_res = NULL; short _rv; @@ -1941,9 +1762,7 @@ static PyObject *MediaObj_GetMediaLanguage(_self, _args) return _res; } -static PyObject *MediaObj_SetMediaLanguage(_self, _args) - MediaObject *_self; - PyObject *_args; +static PyObject *MediaObj_SetMediaLanguage(MediaObject *_self, PyObject *_args) { PyObject *_res = NULL; short language; @@ -1957,9 +1776,7 @@ static PyObject *MediaObj_SetMediaLanguage(_self, _args) return _res; } -static PyObject *MediaObj_GetMediaQuality(_self, _args) - MediaObject *_self; - PyObject *_args; +static PyObject *MediaObj_GetMediaQuality(MediaObject *_self, PyObject *_args) { PyObject *_res = NULL; short _rv; @@ -1971,9 +1788,7 @@ static PyObject *MediaObj_GetMediaQuality(_self, _args) return _res; } -static PyObject *MediaObj_SetMediaQuality(_self, _args) - MediaObject *_self; - PyObject *_args; +static PyObject *MediaObj_SetMediaQuality(MediaObject *_self, PyObject *_args) { PyObject *_res = NULL; short quality; @@ -1987,9 +1802,7 @@ static PyObject *MediaObj_SetMediaQuality(_self, _args) return _res; } -static PyObject *MediaObj_GetMediaHandlerDescription(_self, _args) - MediaObject *_self; - PyObject *_args; +static PyObject *MediaObj_GetMediaHandlerDescription(MediaObject *_self, PyObject *_args) { PyObject *_res = NULL; OSType mediaType; @@ -2008,9 +1821,7 @@ static PyObject *MediaObj_GetMediaHandlerDescription(_self, _args) return _res; } -static PyObject *MediaObj_GetMediaUserData(_self, _args) - MediaObject *_self; - PyObject *_args; +static PyObject *MediaObj_GetMediaUserData(MediaObject *_self, PyObject *_args) { PyObject *_res = NULL; UserData _rv; @@ -2022,9 +1833,7 @@ static PyObject *MediaObj_GetMediaUserData(_self, _args) return _res; } -static PyObject *MediaObj_GetMediaHandler(_self, _args) - MediaObject *_self; - PyObject *_args; +static PyObject *MediaObj_GetMediaHandler(MediaObject *_self, PyObject *_args) { PyObject *_res = NULL; MediaHandler _rv; @@ -2036,9 +1845,7 @@ static PyObject *MediaObj_GetMediaHandler(_self, _args) return _res; } -static PyObject *MediaObj_SetMediaHandler(_self, _args) - MediaObject *_self; - PyObject *_args; +static PyObject *MediaObj_SetMediaHandler(MediaObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -2054,9 +1861,7 @@ static PyObject *MediaObj_SetMediaHandler(_self, _args) return _res; } -static PyObject *MediaObj_BeginMediaEdits(_self, _args) - MediaObject *_self; - PyObject *_args; +static PyObject *MediaObj_BeginMediaEdits(MediaObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -2069,9 +1874,7 @@ static PyObject *MediaObj_BeginMediaEdits(_self, _args) return _res; } -static PyObject *MediaObj_EndMediaEdits(_self, _args) - MediaObject *_self; - PyObject *_args; +static PyObject *MediaObj_EndMediaEdits(MediaObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -2084,9 +1887,7 @@ static PyObject *MediaObj_EndMediaEdits(_self, _args) return _res; } -static PyObject *MediaObj_SetMediaDefaultDataRefIndex(_self, _args) - MediaObject *_self; - PyObject *_args; +static PyObject *MediaObj_SetMediaDefaultDataRefIndex(MediaObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -2102,9 +1903,7 @@ static PyObject *MediaObj_SetMediaDefaultDataRefIndex(_self, _args) return _res; } -static PyObject *MediaObj_GetMediaDataHandlerDescription(_self, _args) - MediaObject *_self; - PyObject *_args; +static PyObject *MediaObj_GetMediaDataHandlerDescription(MediaObject *_self, PyObject *_args) { PyObject *_res = NULL; short index; @@ -2126,9 +1925,7 @@ static PyObject *MediaObj_GetMediaDataHandlerDescription(_self, _args) return _res; } -static PyObject *MediaObj_GetMediaDataHandler(_self, _args) - MediaObject *_self; - PyObject *_args; +static PyObject *MediaObj_GetMediaDataHandler(MediaObject *_self, PyObject *_args) { PyObject *_res = NULL; DataHandler _rv; @@ -2143,9 +1940,7 @@ static PyObject *MediaObj_GetMediaDataHandler(_self, _args) return _res; } -static PyObject *MediaObj_SetMediaDataHandler(_self, _args) - MediaObject *_self; - PyObject *_args; +static PyObject *MediaObj_SetMediaDataHandler(MediaObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -2164,9 +1959,7 @@ static PyObject *MediaObj_SetMediaDataHandler(_self, _args) return _res; } -static PyObject *MediaObj_GetMediaSampleDescriptionCount(_self, _args) - MediaObject *_self; - PyObject *_args; +static PyObject *MediaObj_GetMediaSampleDescriptionCount(MediaObject *_self, PyObject *_args) { PyObject *_res = NULL; long _rv; @@ -2178,9 +1971,7 @@ static PyObject *MediaObj_GetMediaSampleDescriptionCount(_self, _args) return _res; } -static PyObject *MediaObj_GetMediaSampleDescription(_self, _args) - MediaObject *_self; - PyObject *_args; +static PyObject *MediaObj_GetMediaSampleDescription(MediaObject *_self, PyObject *_args) { PyObject *_res = NULL; long index; @@ -2197,9 +1988,7 @@ static PyObject *MediaObj_GetMediaSampleDescription(_self, _args) return _res; } -static PyObject *MediaObj_SetMediaSampleDescription(_self, _args) - MediaObject *_self; - PyObject *_args; +static PyObject *MediaObj_SetMediaSampleDescription(MediaObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -2218,9 +2007,7 @@ static PyObject *MediaObj_SetMediaSampleDescription(_self, _args) return _res; } -static PyObject *MediaObj_GetMediaSampleCount(_self, _args) - MediaObject *_self; - PyObject *_args; +static PyObject *MediaObj_GetMediaSampleCount(MediaObject *_self, PyObject *_args) { PyObject *_res = NULL; long _rv; @@ -2232,9 +2019,7 @@ static PyObject *MediaObj_GetMediaSampleCount(_self, _args) return _res; } -static PyObject *MediaObj_GetMediaSyncSampleCount(_self, _args) - MediaObject *_self; - PyObject *_args; +static PyObject *MediaObj_GetMediaSyncSampleCount(MediaObject *_self, PyObject *_args) { PyObject *_res = NULL; long _rv; @@ -2246,9 +2031,7 @@ static PyObject *MediaObj_GetMediaSyncSampleCount(_self, _args) return _res; } -static PyObject *MediaObj_SampleNumToMediaTime(_self, _args) - MediaObject *_self; - PyObject *_args; +static PyObject *MediaObj_SampleNumToMediaTime(MediaObject *_self, PyObject *_args) { PyObject *_res = NULL; long logicalSampleNum; @@ -2267,9 +2050,7 @@ static PyObject *MediaObj_SampleNumToMediaTime(_self, _args) return _res; } -static PyObject *MediaObj_MediaTimeToSampleNum(_self, _args) - MediaObject *_self; - PyObject *_args; +static PyObject *MediaObj_MediaTimeToSampleNum(MediaObject *_self, PyObject *_args) { PyObject *_res = NULL; TimeValue time; @@ -2291,9 +2072,7 @@ static PyObject *MediaObj_MediaTimeToSampleNum(_self, _args) return _res; } -static PyObject *MediaObj_AddMediaSample(_self, _args) - MediaObject *_self; - PyObject *_args; +static PyObject *MediaObj_AddMediaSample(MediaObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -2329,9 +2108,7 @@ static PyObject *MediaObj_AddMediaSample(_self, _args) return _res; } -static PyObject *MediaObj_AddMediaSampleReference(_self, _args) - MediaObject *_self; - PyObject *_args; +static PyObject *MediaObj_AddMediaSampleReference(MediaObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -2364,9 +2141,7 @@ static PyObject *MediaObj_AddMediaSampleReference(_self, _args) return _res; } -static PyObject *MediaObj_GetMediaSample(_self, _args) - MediaObject *_self; - PyObject *_args; +static PyObject *MediaObj_GetMediaSample(MediaObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -2411,9 +2186,7 @@ static PyObject *MediaObj_GetMediaSample(_self, _args) return _res; } -static PyObject *MediaObj_GetMediaSampleReference(_self, _args) - MediaObject *_self; - PyObject *_args; +static PyObject *MediaObj_GetMediaSampleReference(MediaObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -2455,9 +2228,7 @@ static PyObject *MediaObj_GetMediaSampleReference(_self, _args) return _res; } -static PyObject *MediaObj_SetMediaPreferredChunkSize(_self, _args) - MediaObject *_self; - PyObject *_args; +static PyObject *MediaObj_SetMediaPreferredChunkSize(MediaObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -2473,9 +2244,7 @@ static PyObject *MediaObj_SetMediaPreferredChunkSize(_self, _args) return _res; } -static PyObject *MediaObj_GetMediaPreferredChunkSize(_self, _args) - MediaObject *_self; - PyObject *_args; +static PyObject *MediaObj_GetMediaPreferredChunkSize(MediaObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -2490,9 +2259,7 @@ static PyObject *MediaObj_GetMediaPreferredChunkSize(_self, _args) return _res; } -static PyObject *MediaObj_SetMediaShadowSync(_self, _args) - MediaObject *_self; - PyObject *_args; +static PyObject *MediaObj_SetMediaShadowSync(MediaObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -2511,9 +2278,7 @@ static PyObject *MediaObj_SetMediaShadowSync(_self, _args) return _res; } -static PyObject *MediaObj_GetMediaShadowSync(_self, _args) - MediaObject *_self; - PyObject *_args; +static PyObject *MediaObj_GetMediaShadowSync(MediaObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -2531,9 +2296,7 @@ static PyObject *MediaObj_GetMediaShadowSync(_self, _args) return _res; } -static PyObject *MediaObj_GetMediaDataSize(_self, _args) - MediaObject *_self; - PyObject *_args; +static PyObject *MediaObj_GetMediaDataSize(MediaObject *_self, PyObject *_args) { PyObject *_res = NULL; long _rv; @@ -2551,9 +2314,7 @@ static PyObject *MediaObj_GetMediaDataSize(_self, _args) return _res; } -static PyObject *MediaObj_GetMediaDataSize64(_self, _args) - MediaObject *_self; - PyObject *_args; +static PyObject *MediaObj_GetMediaDataSize64(MediaObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -2574,9 +2335,7 @@ static PyObject *MediaObj_GetMediaDataSize64(_self, _args) return _res; } -static PyObject *MediaObj_GetMediaNextInterestingTime(_self, _args) - MediaObject *_self; - PyObject *_args; +static PyObject *MediaObj_GetMediaNextInterestingTime(MediaObject *_self, PyObject *_args) { PyObject *_res = NULL; short interestingTimeFlags; @@ -2601,9 +2360,7 @@ static PyObject *MediaObj_GetMediaNextInterestingTime(_self, _args) return _res; } -static PyObject *MediaObj_GetMediaDataRef(_self, _args) - MediaObject *_self; - PyObject *_args; +static PyObject *MediaObj_GetMediaDataRef(MediaObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -2627,9 +2384,7 @@ static PyObject *MediaObj_GetMediaDataRef(_self, _args) return _res; } -static PyObject *MediaObj_SetMediaDataRef(_self, _args) - MediaObject *_self; - PyObject *_args; +static PyObject *MediaObj_SetMediaDataRef(MediaObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -2651,9 +2406,7 @@ static PyObject *MediaObj_SetMediaDataRef(_self, _args) return _res; } -static PyObject *MediaObj_SetMediaDataRefAttributes(_self, _args) - MediaObject *_self; - PyObject *_args; +static PyObject *MediaObj_SetMediaDataRefAttributes(MediaObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -2672,9 +2425,7 @@ static PyObject *MediaObj_SetMediaDataRefAttributes(_self, _args) return _res; } -static PyObject *MediaObj_AddMediaDataRef(_self, _args) - MediaObject *_self; - PyObject *_args; +static PyObject *MediaObj_AddMediaDataRef(MediaObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -2695,9 +2446,7 @@ static PyObject *MediaObj_AddMediaDataRef(_self, _args) return _res; } -static PyObject *MediaObj_GetMediaDataRefCount(_self, _args) - MediaObject *_self; - PyObject *_args; +static PyObject *MediaObj_GetMediaDataRefCount(MediaObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -2712,9 +2461,7 @@ static PyObject *MediaObj_GetMediaDataRefCount(_self, _args) return _res; } -static PyObject *MediaObj_SetMediaPlayHints(_self, _args) - MediaObject *_self; - PyObject *_args; +static PyObject *MediaObj_SetMediaPlayHints(MediaObject *_self, PyObject *_args) { PyObject *_res = NULL; long flags; @@ -2731,9 +2478,7 @@ static PyObject *MediaObj_SetMediaPlayHints(_self, _args) return _res; } -static PyObject *MediaObj_GetMediaPlayHints(_self, _args) - MediaObject *_self; - PyObject *_args; +static PyObject *MediaObj_GetMediaPlayHints(MediaObject *_self, PyObject *_args) { PyObject *_res = NULL; long flags; @@ -2746,9 +2491,7 @@ static PyObject *MediaObj_GetMediaPlayHints(_self, _args) return _res; } -static PyObject *MediaObj_GetMediaNextInterestingTimeOnly(_self, _args) - MediaObject *_self; - PyObject *_args; +static PyObject *MediaObj_GetMediaNextInterestingTimeOnly(MediaObject *_self, PyObject *_args) { PyObject *_res = NULL; short interestingTimeFlags; @@ -2870,9 +2613,7 @@ static PyMethodDef MediaObj_methods[] = { PyMethodChain MediaObj_chain = { MediaObj_methods, NULL }; -static PyObject *MediaObj_getattr(self, name) - MediaObject *self; - char *name; +static PyObject *MediaObj_getattr(MediaObject *self, char *name) { return Py_FindMethodInChain(&MediaObj_chain, (PyObject *)self, name); } @@ -2918,8 +2659,7 @@ typedef struct TrackObject { Track ob_itself; } TrackObject; -PyObject *TrackObj_New(itself) - Track itself; +PyObject *TrackObj_New(Track itself) { TrackObject *it; if (itself == NULL) { @@ -2931,9 +2671,7 @@ PyObject *TrackObj_New(itself) it->ob_itself = itself; return (PyObject *)it; } -TrackObj_Convert(v, p_itself) - PyObject *v; - Track *p_itself; +TrackObj_Convert(PyObject *v, Track *p_itself) { if (!TrackObj_Check(v)) { @@ -2944,16 +2682,13 @@ TrackObj_Convert(v, p_itself) return 1; } -static void TrackObj_dealloc(self) - TrackObject *self; +static void TrackObj_dealloc(TrackObject *self) { DisposeMovieTrack(self->ob_itself); PyMem_DEL(self); } -static PyObject *TrackObj_LoadTrackIntoRam(_self, _args) - TrackObject *_self; - PyObject *_args; +static PyObject *TrackObj_LoadTrackIntoRam(TrackObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -2975,9 +2710,7 @@ static PyObject *TrackObj_LoadTrackIntoRam(_self, _args) return _res; } -static PyObject *TrackObj_GetTrackPict(_self, _args) - TrackObject *_self; - PyObject *_args; +static PyObject *TrackObj_GetTrackPict(TrackObject *_self, PyObject *_args) { PyObject *_res = NULL; PicHandle _rv; @@ -2992,9 +2725,7 @@ static PyObject *TrackObj_GetTrackPict(_self, _args) return _res; } -static PyObject *TrackObj_GetTrackClipRgn(_self, _args) - TrackObject *_self; - PyObject *_args; +static PyObject *TrackObj_GetTrackClipRgn(TrackObject *_self, PyObject *_args) { PyObject *_res = NULL; RgnHandle _rv; @@ -3006,9 +2737,7 @@ static PyObject *TrackObj_GetTrackClipRgn(_self, _args) return _res; } -static PyObject *TrackObj_SetTrackClipRgn(_self, _args) - TrackObject *_self; - PyObject *_args; +static PyObject *TrackObj_SetTrackClipRgn(TrackObject *_self, PyObject *_args) { PyObject *_res = NULL; RgnHandle theClip; @@ -3022,9 +2751,7 @@ static PyObject *TrackObj_SetTrackClipRgn(_self, _args) return _res; } -static PyObject *TrackObj_GetTrackDisplayBoundsRgn(_self, _args) - TrackObject *_self; - PyObject *_args; +static PyObject *TrackObj_GetTrackDisplayBoundsRgn(TrackObject *_self, PyObject *_args) { PyObject *_res = NULL; RgnHandle _rv; @@ -3036,9 +2763,7 @@ static PyObject *TrackObj_GetTrackDisplayBoundsRgn(_self, _args) return _res; } -static PyObject *TrackObj_GetTrackMovieBoundsRgn(_self, _args) - TrackObject *_self; - PyObject *_args; +static PyObject *TrackObj_GetTrackMovieBoundsRgn(TrackObject *_self, PyObject *_args) { PyObject *_res = NULL; RgnHandle _rv; @@ -3050,9 +2775,7 @@ static PyObject *TrackObj_GetTrackMovieBoundsRgn(_self, _args) return _res; } -static PyObject *TrackObj_GetTrackBoundsRgn(_self, _args) - TrackObject *_self; - PyObject *_args; +static PyObject *TrackObj_GetTrackBoundsRgn(TrackObject *_self, PyObject *_args) { PyObject *_res = NULL; RgnHandle _rv; @@ -3064,9 +2787,7 @@ static PyObject *TrackObj_GetTrackBoundsRgn(_self, _args) return _res; } -static PyObject *TrackObj_GetTrackMatte(_self, _args) - TrackObject *_self; - PyObject *_args; +static PyObject *TrackObj_GetTrackMatte(TrackObject *_self, PyObject *_args) { PyObject *_res = NULL; PixMapHandle _rv; @@ -3078,9 +2799,7 @@ static PyObject *TrackObj_GetTrackMatte(_self, _args) return _res; } -static PyObject *TrackObj_SetTrackMatte(_self, _args) - TrackObject *_self; - PyObject *_args; +static PyObject *TrackObj_SetTrackMatte(TrackObject *_self, PyObject *_args) { PyObject *_res = NULL; PixMapHandle theMatte; @@ -3094,9 +2813,7 @@ static PyObject *TrackObj_SetTrackMatte(_self, _args) return _res; } -static PyObject *TrackObj_GetTrackID(_self, _args) - TrackObject *_self; - PyObject *_args; +static PyObject *TrackObj_GetTrackID(TrackObject *_self, PyObject *_args) { PyObject *_res = NULL; long _rv; @@ -3108,9 +2825,7 @@ static PyObject *TrackObj_GetTrackID(_self, _args) return _res; } -static PyObject *TrackObj_GetTrackMovie(_self, _args) - TrackObject *_self; - PyObject *_args; +static PyObject *TrackObj_GetTrackMovie(TrackObject *_self, PyObject *_args) { PyObject *_res = NULL; Movie _rv; @@ -3122,9 +2837,7 @@ static PyObject *TrackObj_GetTrackMovie(_self, _args) return _res; } -static PyObject *TrackObj_GetTrackCreationTime(_self, _args) - TrackObject *_self; - PyObject *_args; +static PyObject *TrackObj_GetTrackCreationTime(TrackObject *_self, PyObject *_args) { PyObject *_res = NULL; unsigned long _rv; @@ -3136,9 +2849,7 @@ static PyObject *TrackObj_GetTrackCreationTime(_self, _args) return _res; } -static PyObject *TrackObj_GetTrackModificationTime(_self, _args) - TrackObject *_self; - PyObject *_args; +static PyObject *TrackObj_GetTrackModificationTime(TrackObject *_self, PyObject *_args) { PyObject *_res = NULL; unsigned long _rv; @@ -3150,9 +2861,7 @@ static PyObject *TrackObj_GetTrackModificationTime(_self, _args) return _res; } -static PyObject *TrackObj_GetTrackEnabled(_self, _args) - TrackObject *_self; - PyObject *_args; +static PyObject *TrackObj_GetTrackEnabled(TrackObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -3164,9 +2873,7 @@ static PyObject *TrackObj_GetTrackEnabled(_self, _args) return _res; } -static PyObject *TrackObj_SetTrackEnabled(_self, _args) - TrackObject *_self; - PyObject *_args; +static PyObject *TrackObj_SetTrackEnabled(TrackObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean isEnabled; @@ -3180,9 +2887,7 @@ static PyObject *TrackObj_SetTrackEnabled(_self, _args) return _res; } -static PyObject *TrackObj_GetTrackUsage(_self, _args) - TrackObject *_self; - PyObject *_args; +static PyObject *TrackObj_GetTrackUsage(TrackObject *_self, PyObject *_args) { PyObject *_res = NULL; long _rv; @@ -3194,9 +2899,7 @@ static PyObject *TrackObj_GetTrackUsage(_self, _args) return _res; } -static PyObject *TrackObj_SetTrackUsage(_self, _args) - TrackObject *_self; - PyObject *_args; +static PyObject *TrackObj_SetTrackUsage(TrackObject *_self, PyObject *_args) { PyObject *_res = NULL; long usage; @@ -3210,9 +2913,7 @@ static PyObject *TrackObj_SetTrackUsage(_self, _args) return _res; } -static PyObject *TrackObj_GetTrackDuration(_self, _args) - TrackObject *_self; - PyObject *_args; +static PyObject *TrackObj_GetTrackDuration(TrackObject *_self, PyObject *_args) { PyObject *_res = NULL; TimeValue _rv; @@ -3224,9 +2925,7 @@ static PyObject *TrackObj_GetTrackDuration(_self, _args) return _res; } -static PyObject *TrackObj_GetTrackOffset(_self, _args) - TrackObject *_self; - PyObject *_args; +static PyObject *TrackObj_GetTrackOffset(TrackObject *_self, PyObject *_args) { PyObject *_res = NULL; TimeValue _rv; @@ -3238,9 +2937,7 @@ static PyObject *TrackObj_GetTrackOffset(_self, _args) return _res; } -static PyObject *TrackObj_SetTrackOffset(_self, _args) - TrackObject *_self; - PyObject *_args; +static PyObject *TrackObj_SetTrackOffset(TrackObject *_self, PyObject *_args) { PyObject *_res = NULL; TimeValue movieOffsetTime; @@ -3254,9 +2951,7 @@ static PyObject *TrackObj_SetTrackOffset(_self, _args) return _res; } -static PyObject *TrackObj_GetTrackLayer(_self, _args) - TrackObject *_self; - PyObject *_args; +static PyObject *TrackObj_GetTrackLayer(TrackObject *_self, PyObject *_args) { PyObject *_res = NULL; short _rv; @@ -3268,9 +2963,7 @@ static PyObject *TrackObj_GetTrackLayer(_self, _args) return _res; } -static PyObject *TrackObj_SetTrackLayer(_self, _args) - TrackObject *_self; - PyObject *_args; +static PyObject *TrackObj_SetTrackLayer(TrackObject *_self, PyObject *_args) { PyObject *_res = NULL; short layer; @@ -3284,9 +2977,7 @@ static PyObject *TrackObj_SetTrackLayer(_self, _args) return _res; } -static PyObject *TrackObj_GetTrackAlternate(_self, _args) - TrackObject *_self; - PyObject *_args; +static PyObject *TrackObj_GetTrackAlternate(TrackObject *_self, PyObject *_args) { PyObject *_res = NULL; Track _rv; @@ -3298,9 +2989,7 @@ static PyObject *TrackObj_GetTrackAlternate(_self, _args) return _res; } -static PyObject *TrackObj_SetTrackAlternate(_self, _args) - TrackObject *_self; - PyObject *_args; +static PyObject *TrackObj_SetTrackAlternate(TrackObject *_self, PyObject *_args) { PyObject *_res = NULL; Track alternateT; @@ -3314,9 +3003,7 @@ static PyObject *TrackObj_SetTrackAlternate(_self, _args) return _res; } -static PyObject *TrackObj_GetTrackVolume(_self, _args) - TrackObject *_self; - PyObject *_args; +static PyObject *TrackObj_GetTrackVolume(TrackObject *_self, PyObject *_args) { PyObject *_res = NULL; short _rv; @@ -3328,9 +3015,7 @@ static PyObject *TrackObj_GetTrackVolume(_self, _args) return _res; } -static PyObject *TrackObj_SetTrackVolume(_self, _args) - TrackObject *_self; - PyObject *_args; +static PyObject *TrackObj_SetTrackVolume(TrackObject *_self, PyObject *_args) { PyObject *_res = NULL; short volume; @@ -3344,9 +3029,7 @@ static PyObject *TrackObj_SetTrackVolume(_self, _args) return _res; } -static PyObject *TrackObj_GetTrackDimensions(_self, _args) - TrackObject *_self; - PyObject *_args; +static PyObject *TrackObj_GetTrackDimensions(TrackObject *_self, PyObject *_args) { PyObject *_res = NULL; Fixed width; @@ -3362,9 +3045,7 @@ static PyObject *TrackObj_GetTrackDimensions(_self, _args) return _res; } -static PyObject *TrackObj_SetTrackDimensions(_self, _args) - TrackObject *_self; - PyObject *_args; +static PyObject *TrackObj_SetTrackDimensions(TrackObject *_self, PyObject *_args) { PyObject *_res = NULL; Fixed width; @@ -3381,9 +3062,7 @@ static PyObject *TrackObj_SetTrackDimensions(_self, _args) return _res; } -static PyObject *TrackObj_GetTrackUserData(_self, _args) - TrackObject *_self; - PyObject *_args; +static PyObject *TrackObj_GetTrackUserData(TrackObject *_self, PyObject *_args) { PyObject *_res = NULL; UserData _rv; @@ -3395,9 +3074,7 @@ static PyObject *TrackObj_GetTrackUserData(_self, _args) return _res; } -static PyObject *TrackObj_GetTrackSoundLocalizationSettings(_self, _args) - TrackObject *_self; - PyObject *_args; +static PyObject *TrackObj_GetTrackSoundLocalizationSettings(TrackObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -3412,9 +3089,7 @@ static PyObject *TrackObj_GetTrackSoundLocalizationSettings(_self, _args) return _res; } -static PyObject *TrackObj_SetTrackSoundLocalizationSettings(_self, _args) - TrackObject *_self; - PyObject *_args; +static PyObject *TrackObj_SetTrackSoundLocalizationSettings(TrackObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -3430,9 +3105,7 @@ static PyObject *TrackObj_SetTrackSoundLocalizationSettings(_self, _args) return _res; } -static PyObject *TrackObj_NewTrackMedia(_self, _args) - TrackObject *_self; - PyObject *_args; +static PyObject *TrackObj_NewTrackMedia(TrackObject *_self, PyObject *_args) { PyObject *_res = NULL; Media _rv; @@ -3456,9 +3129,7 @@ static PyObject *TrackObj_NewTrackMedia(_self, _args) return _res; } -static PyObject *TrackObj_GetTrackMedia(_self, _args) - TrackObject *_self; - PyObject *_args; +static PyObject *TrackObj_GetTrackMedia(TrackObject *_self, PyObject *_args) { PyObject *_res = NULL; Media _rv; @@ -3470,9 +3141,7 @@ static PyObject *TrackObj_GetTrackMedia(_self, _args) return _res; } -static PyObject *TrackObj_InsertMediaIntoTrack(_self, _args) - TrackObject *_self; - PyObject *_args; +static PyObject *TrackObj_InsertMediaIntoTrack(TrackObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -3497,9 +3166,7 @@ static PyObject *TrackObj_InsertMediaIntoTrack(_self, _args) return _res; } -static PyObject *TrackObj_InsertTrackSegment(_self, _args) - TrackObject *_self; - PyObject *_args; +static PyObject *TrackObj_InsertTrackSegment(TrackObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -3524,9 +3191,7 @@ static PyObject *TrackObj_InsertTrackSegment(_self, _args) return _res; } -static PyObject *TrackObj_InsertEmptyTrackSegment(_self, _args) - TrackObject *_self; - PyObject *_args; +static PyObject *TrackObj_InsertEmptyTrackSegment(TrackObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -3545,9 +3210,7 @@ static PyObject *TrackObj_InsertEmptyTrackSegment(_self, _args) return _res; } -static PyObject *TrackObj_DeleteTrackSegment(_self, _args) - TrackObject *_self; - PyObject *_args; +static PyObject *TrackObj_DeleteTrackSegment(TrackObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -3566,9 +3229,7 @@ static PyObject *TrackObj_DeleteTrackSegment(_self, _args) return _res; } -static PyObject *TrackObj_ScaleTrackSegment(_self, _args) - TrackObject *_self; - PyObject *_args; +static PyObject *TrackObj_ScaleTrackSegment(TrackObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -3590,9 +3251,7 @@ static PyObject *TrackObj_ScaleTrackSegment(_self, _args) return _res; } -static PyObject *TrackObj_IsScrapMovie(_self, _args) - TrackObject *_self; - PyObject *_args; +static PyObject *TrackObj_IsScrapMovie(TrackObject *_self, PyObject *_args) { PyObject *_res = NULL; Component _rv; @@ -3604,9 +3263,7 @@ static PyObject *TrackObj_IsScrapMovie(_self, _args) return _res; } -static PyObject *TrackObj_CopyTrackSettings(_self, _args) - TrackObject *_self; - PyObject *_args; +static PyObject *TrackObj_CopyTrackSettings(TrackObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -3622,9 +3279,7 @@ static PyObject *TrackObj_CopyTrackSettings(_self, _args) return _res; } -static PyObject *TrackObj_AddEmptyTrackToMovie(_self, _args) - TrackObject *_self; - PyObject *_args; +static PyObject *TrackObj_AddEmptyTrackToMovie(TrackObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -3648,9 +3303,7 @@ static PyObject *TrackObj_AddEmptyTrackToMovie(_self, _args) return _res; } -static PyObject *TrackObj_AddTrackReference(_self, _args) - TrackObject *_self; - PyObject *_args; +static PyObject *TrackObj_AddTrackReference(TrackObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -3671,9 +3324,7 @@ static PyObject *TrackObj_AddTrackReference(_self, _args) return _res; } -static PyObject *TrackObj_DeleteTrackReference(_self, _args) - TrackObject *_self; - PyObject *_args; +static PyObject *TrackObj_DeleteTrackReference(TrackObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -3692,9 +3343,7 @@ static PyObject *TrackObj_DeleteTrackReference(_self, _args) return _res; } -static PyObject *TrackObj_SetTrackReference(_self, _args) - TrackObject *_self; - PyObject *_args; +static PyObject *TrackObj_SetTrackReference(TrackObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -3716,9 +3365,7 @@ static PyObject *TrackObj_SetTrackReference(_self, _args) return _res; } -static PyObject *TrackObj_GetTrackReference(_self, _args) - TrackObject *_self; - PyObject *_args; +static PyObject *TrackObj_GetTrackReference(TrackObject *_self, PyObject *_args) { PyObject *_res = NULL; Track _rv; @@ -3736,9 +3383,7 @@ static PyObject *TrackObj_GetTrackReference(_self, _args) return _res; } -static PyObject *TrackObj_GetNextTrackReferenceType(_self, _args) - TrackObject *_self; - PyObject *_args; +static PyObject *TrackObj_GetNextTrackReferenceType(TrackObject *_self, PyObject *_args) { PyObject *_res = NULL; OSType _rv; @@ -3753,9 +3398,7 @@ static PyObject *TrackObj_GetNextTrackReferenceType(_self, _args) return _res; } -static PyObject *TrackObj_GetTrackReferenceCount(_self, _args) - TrackObject *_self; - PyObject *_args; +static PyObject *TrackObj_GetTrackReferenceCount(TrackObject *_self, PyObject *_args) { PyObject *_res = NULL; long _rv; @@ -3770,9 +3413,7 @@ static PyObject *TrackObj_GetTrackReferenceCount(_self, _args) return _res; } -static PyObject *TrackObj_GetTrackEditRate(_self, _args) - TrackObject *_self; - PyObject *_args; +static PyObject *TrackObj_GetTrackEditRate(TrackObject *_self, PyObject *_args) { PyObject *_res = NULL; Fixed _rv; @@ -3787,9 +3428,7 @@ static PyObject *TrackObj_GetTrackEditRate(_self, _args) return _res; } -static PyObject *TrackObj_GetTrackDataSize(_self, _args) - TrackObject *_self; - PyObject *_args; +static PyObject *TrackObj_GetTrackDataSize(TrackObject *_self, PyObject *_args) { PyObject *_res = NULL; long _rv; @@ -3807,9 +3446,7 @@ static PyObject *TrackObj_GetTrackDataSize(_self, _args) return _res; } -static PyObject *TrackObj_GetTrackDataSize64(_self, _args) - TrackObject *_self; - PyObject *_args; +static PyObject *TrackObj_GetTrackDataSize64(TrackObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -3830,9 +3467,7 @@ static PyObject *TrackObj_GetTrackDataSize64(_self, _args) return _res; } -static PyObject *TrackObj_PtInTrack(_self, _args) - TrackObject *_self; - PyObject *_args; +static PyObject *TrackObj_PtInTrack(TrackObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -3847,9 +3482,7 @@ static PyObject *TrackObj_PtInTrack(_self, _args) return _res; } -static PyObject *TrackObj_GetTrackNextInterestingTime(_self, _args) - TrackObject *_self; - PyObject *_args; +static PyObject *TrackObj_GetTrackNextInterestingTime(TrackObject *_self, PyObject *_args) { PyObject *_res = NULL; short interestingTimeFlags; @@ -3874,9 +3507,7 @@ static PyObject *TrackObj_GetTrackNextInterestingTime(_self, _args) return _res; } -static PyObject *TrackObj_GetTrackSegmentDisplayBoundsRgn(_self, _args) - TrackObject *_self; - PyObject *_args; +static PyObject *TrackObj_GetTrackSegmentDisplayBoundsRgn(TrackObject *_self, PyObject *_args) { PyObject *_res = NULL; RgnHandle _rv; @@ -3894,9 +3525,7 @@ static PyObject *TrackObj_GetTrackSegmentDisplayBoundsRgn(_self, _args) return _res; } -static PyObject *TrackObj_GetTrackStatus(_self, _args) - TrackObject *_self; - PyObject *_args; +static PyObject *TrackObj_GetTrackStatus(TrackObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -3908,9 +3537,7 @@ static PyObject *TrackObj_GetTrackStatus(_self, _args) return _res; } -static PyObject *TrackObj_SetTrackLoadSettings(_self, _args) - TrackObject *_self; - PyObject *_args; +static PyObject *TrackObj_SetTrackLoadSettings(TrackObject *_self, PyObject *_args) { PyObject *_res = NULL; TimeValue preloadTime; @@ -3933,9 +3560,7 @@ static PyObject *TrackObj_SetTrackLoadSettings(_self, _args) return _res; } -static PyObject *TrackObj_GetTrackLoadSettings(_self, _args) - TrackObject *_self; - PyObject *_args; +static PyObject *TrackObj_GetTrackLoadSettings(TrackObject *_self, PyObject *_args) { PyObject *_res = NULL; TimeValue preloadTime; @@ -4075,9 +3700,7 @@ static PyMethodDef TrackObj_methods[] = { PyMethodChain TrackObj_chain = { TrackObj_methods, NULL }; -static PyObject *TrackObj_getattr(self, name) - TrackObject *self; - char *name; +static PyObject *TrackObj_getattr(TrackObject *self, char *name) { return Py_FindMethodInChain(&TrackObj_chain, (PyObject *)self, name); } @@ -4123,8 +3746,7 @@ typedef struct MovieObject { Movie ob_itself; } MovieObject; -PyObject *MovieObj_New(itself) - Movie itself; +PyObject *MovieObj_New(Movie itself) { MovieObject *it; if (itself == NULL) { @@ -4136,9 +3758,7 @@ PyObject *MovieObj_New(itself) it->ob_itself = itself; return (PyObject *)it; } -MovieObj_Convert(v, p_itself) - PyObject *v; - Movie *p_itself; +MovieObj_Convert(PyObject *v, Movie *p_itself) { if (!MovieObj_Check(v)) { @@ -4149,16 +3769,13 @@ MovieObj_Convert(v, p_itself) return 1; } -static void MovieObj_dealloc(self) - MovieObject *self; +static void MovieObj_dealloc(MovieObject *self) { DisposeMovie(self->ob_itself); PyMem_DEL(self); } -static PyObject *MovieObj_MoviesTask(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_MoviesTask(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; long maxMilliSecToUse; @@ -4172,9 +3789,7 @@ static PyObject *MovieObj_MoviesTask(_self, _args) return _res; } -static PyObject *MovieObj_PrerollMovie(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_PrerollMovie(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -4193,9 +3808,7 @@ static PyObject *MovieObj_PrerollMovie(_self, _args) return _res; } -static PyObject *MovieObj_AbortPrePrerollMovie(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_AbortPrePrerollMovie(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr err; @@ -4209,9 +3822,7 @@ static PyObject *MovieObj_AbortPrePrerollMovie(_self, _args) return _res; } -static PyObject *MovieObj_LoadMovieIntoRam(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_LoadMovieIntoRam(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -4233,9 +3844,7 @@ static PyObject *MovieObj_LoadMovieIntoRam(_self, _args) return _res; } -static PyObject *MovieObj_SetMovieActive(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_SetMovieActive(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean active; @@ -4249,9 +3858,7 @@ static PyObject *MovieObj_SetMovieActive(_self, _args) return _res; } -static PyObject *MovieObj_GetMovieActive(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_GetMovieActive(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -4263,9 +3870,7 @@ static PyObject *MovieObj_GetMovieActive(_self, _args) return _res; } -static PyObject *MovieObj_StartMovie(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_StartMovie(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -4276,9 +3881,7 @@ static PyObject *MovieObj_StartMovie(_self, _args) return _res; } -static PyObject *MovieObj_StopMovie(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_StopMovie(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -4289,9 +3892,7 @@ static PyObject *MovieObj_StopMovie(_self, _args) return _res; } -static PyObject *MovieObj_GoToBeginningOfMovie(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_GoToBeginningOfMovie(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -4302,9 +3903,7 @@ static PyObject *MovieObj_GoToBeginningOfMovie(_self, _args) return _res; } -static PyObject *MovieObj_GoToEndOfMovie(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_GoToEndOfMovie(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -4315,9 +3914,7 @@ static PyObject *MovieObj_GoToEndOfMovie(_self, _args) return _res; } -static PyObject *MovieObj_IsMovieDone(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_IsMovieDone(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -4329,9 +3926,7 @@ static PyObject *MovieObj_IsMovieDone(_self, _args) return _res; } -static PyObject *MovieObj_GetMoviePreviewMode(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_GetMoviePreviewMode(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -4343,9 +3938,7 @@ static PyObject *MovieObj_GetMoviePreviewMode(_self, _args) return _res; } -static PyObject *MovieObj_SetMoviePreviewMode(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_SetMoviePreviewMode(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean usePreview; @@ -4359,9 +3952,7 @@ static PyObject *MovieObj_SetMoviePreviewMode(_self, _args) return _res; } -static PyObject *MovieObj_ShowMoviePoster(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_ShowMoviePoster(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -4372,9 +3963,7 @@ static PyObject *MovieObj_ShowMoviePoster(_self, _args) return _res; } -static PyObject *MovieObj_GetMovieTimeBase(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_GetMovieTimeBase(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; TimeBase _rv; @@ -4386,9 +3975,7 @@ static PyObject *MovieObj_GetMovieTimeBase(_self, _args) return _res; } -static PyObject *MovieObj_SetMovieMasterTimeBase(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_SetMovieMasterTimeBase(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; TimeBase tb; @@ -4405,9 +3992,7 @@ static PyObject *MovieObj_SetMovieMasterTimeBase(_self, _args) return _res; } -static PyObject *MovieObj_SetMovieMasterClock(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_SetMovieMasterClock(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; Component clockMeister; @@ -4424,9 +4009,7 @@ static PyObject *MovieObj_SetMovieMasterClock(_self, _args) return _res; } -static PyObject *MovieObj_GetMovieGWorld(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_GetMovieGWorld(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; CGrafPtr port; @@ -4442,9 +4025,7 @@ static PyObject *MovieObj_GetMovieGWorld(_self, _args) return _res; } -static PyObject *MovieObj_SetMovieGWorld(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_SetMovieGWorld(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; CGrafPtr port; @@ -4461,9 +4042,7 @@ static PyObject *MovieObj_SetMovieGWorld(_self, _args) return _res; } -static PyObject *MovieObj_GetMovieNaturalBoundsRect(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_GetMovieNaturalBoundsRect(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; Rect naturalBounds; @@ -4476,9 +4055,7 @@ static PyObject *MovieObj_GetMovieNaturalBoundsRect(_self, _args) return _res; } -static PyObject *MovieObj_GetNextTrackForCompositing(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_GetNextTrackForCompositing(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; Track _rv; @@ -4493,9 +4070,7 @@ static PyObject *MovieObj_GetNextTrackForCompositing(_self, _args) return _res; } -static PyObject *MovieObj_GetPrevTrackForCompositing(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_GetPrevTrackForCompositing(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; Track _rv; @@ -4510,9 +4085,7 @@ static PyObject *MovieObj_GetPrevTrackForCompositing(_self, _args) return _res; } -static PyObject *MovieObj_GetMoviePict(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_GetMoviePict(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; PicHandle _rv; @@ -4527,9 +4100,7 @@ static PyObject *MovieObj_GetMoviePict(_self, _args) return _res; } -static PyObject *MovieObj_GetMoviePosterPict(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_GetMoviePosterPict(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; PicHandle _rv; @@ -4541,9 +4112,7 @@ static PyObject *MovieObj_GetMoviePosterPict(_self, _args) return _res; } -static PyObject *MovieObj_UpdateMovie(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_UpdateMovie(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -4556,9 +4125,7 @@ static PyObject *MovieObj_UpdateMovie(_self, _args) return _res; } -static PyObject *MovieObj_InvalidateMovieRegion(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_InvalidateMovieRegion(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -4574,9 +4141,7 @@ static PyObject *MovieObj_InvalidateMovieRegion(_self, _args) return _res; } -static PyObject *MovieObj_GetMovieBox(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_GetMovieBox(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; Rect boxRect; @@ -4589,9 +4154,7 @@ static PyObject *MovieObj_GetMovieBox(_self, _args) return _res; } -static PyObject *MovieObj_SetMovieBox(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_SetMovieBox(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; Rect boxRect; @@ -4605,9 +4168,7 @@ static PyObject *MovieObj_SetMovieBox(_self, _args) return _res; } -static PyObject *MovieObj_GetMovieDisplayClipRgn(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_GetMovieDisplayClipRgn(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; RgnHandle _rv; @@ -4619,9 +4180,7 @@ static PyObject *MovieObj_GetMovieDisplayClipRgn(_self, _args) return _res; } -static PyObject *MovieObj_SetMovieDisplayClipRgn(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_SetMovieDisplayClipRgn(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; RgnHandle theClip; @@ -4635,9 +4194,7 @@ static PyObject *MovieObj_SetMovieDisplayClipRgn(_self, _args) return _res; } -static PyObject *MovieObj_GetMovieClipRgn(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_GetMovieClipRgn(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; RgnHandle _rv; @@ -4649,9 +4206,7 @@ static PyObject *MovieObj_GetMovieClipRgn(_self, _args) return _res; } -static PyObject *MovieObj_SetMovieClipRgn(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_SetMovieClipRgn(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; RgnHandle theClip; @@ -4665,9 +4220,7 @@ static PyObject *MovieObj_SetMovieClipRgn(_self, _args) return _res; } -static PyObject *MovieObj_GetMovieDisplayBoundsRgn(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_GetMovieDisplayBoundsRgn(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; RgnHandle _rv; @@ -4679,9 +4232,7 @@ static PyObject *MovieObj_GetMovieDisplayBoundsRgn(_self, _args) return _res; } -static PyObject *MovieObj_GetMovieBoundsRgn(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_GetMovieBoundsRgn(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; RgnHandle _rv; @@ -4693,9 +4244,7 @@ static PyObject *MovieObj_GetMovieBoundsRgn(_self, _args) return _res; } -static PyObject *MovieObj_PutMovieIntoHandle(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_PutMovieIntoHandle(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -4711,9 +4260,7 @@ static PyObject *MovieObj_PutMovieIntoHandle(_self, _args) return _res; } -static PyObject *MovieObj_PutMovieIntoDataFork(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_PutMovieIntoDataFork(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -4735,9 +4282,7 @@ static PyObject *MovieObj_PutMovieIntoDataFork(_self, _args) return _res; } -static PyObject *MovieObj_PutMovieIntoDataFork64(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_PutMovieIntoDataFork64(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -4759,9 +4304,7 @@ static PyObject *MovieObj_PutMovieIntoDataFork64(_self, _args) return _res; } -static PyObject *MovieObj_GetMovieCreationTime(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_GetMovieCreationTime(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; unsigned long _rv; @@ -4773,9 +4316,7 @@ static PyObject *MovieObj_GetMovieCreationTime(_self, _args) return _res; } -static PyObject *MovieObj_GetMovieModificationTime(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_GetMovieModificationTime(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; unsigned long _rv; @@ -4787,9 +4328,7 @@ static PyObject *MovieObj_GetMovieModificationTime(_self, _args) return _res; } -static PyObject *MovieObj_GetMovieTimeScale(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_GetMovieTimeScale(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; TimeScale _rv; @@ -4801,9 +4340,7 @@ static PyObject *MovieObj_GetMovieTimeScale(_self, _args) return _res; } -static PyObject *MovieObj_SetMovieTimeScale(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_SetMovieTimeScale(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; TimeScale timeScale; @@ -4817,9 +4354,7 @@ static PyObject *MovieObj_SetMovieTimeScale(_self, _args) return _res; } -static PyObject *MovieObj_GetMovieDuration(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_GetMovieDuration(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; TimeValue _rv; @@ -4831,9 +4366,7 @@ static PyObject *MovieObj_GetMovieDuration(_self, _args) return _res; } -static PyObject *MovieObj_GetMovieRate(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_GetMovieRate(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; Fixed _rv; @@ -4845,9 +4378,7 @@ static PyObject *MovieObj_GetMovieRate(_self, _args) return _res; } -static PyObject *MovieObj_SetMovieRate(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_SetMovieRate(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; Fixed rate; @@ -4861,9 +4392,7 @@ static PyObject *MovieObj_SetMovieRate(_self, _args) return _res; } -static PyObject *MovieObj_GetMoviePreferredRate(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_GetMoviePreferredRate(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; Fixed _rv; @@ -4875,9 +4404,7 @@ static PyObject *MovieObj_GetMoviePreferredRate(_self, _args) return _res; } -static PyObject *MovieObj_SetMoviePreferredRate(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_SetMoviePreferredRate(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; Fixed rate; @@ -4891,9 +4418,7 @@ static PyObject *MovieObj_SetMoviePreferredRate(_self, _args) return _res; } -static PyObject *MovieObj_GetMoviePreferredVolume(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_GetMoviePreferredVolume(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; short _rv; @@ -4905,9 +4430,7 @@ static PyObject *MovieObj_GetMoviePreferredVolume(_self, _args) return _res; } -static PyObject *MovieObj_SetMoviePreferredVolume(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_SetMoviePreferredVolume(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; short volume; @@ -4921,9 +4444,7 @@ static PyObject *MovieObj_SetMoviePreferredVolume(_self, _args) return _res; } -static PyObject *MovieObj_GetMovieVolume(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_GetMovieVolume(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; short _rv; @@ -4935,9 +4456,7 @@ static PyObject *MovieObj_GetMovieVolume(_self, _args) return _res; } -static PyObject *MovieObj_SetMovieVolume(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_SetMovieVolume(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; short volume; @@ -4951,9 +4470,7 @@ static PyObject *MovieObj_SetMovieVolume(_self, _args) return _res; } -static PyObject *MovieObj_GetMoviePreviewTime(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_GetMoviePreviewTime(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; TimeValue previewTime; @@ -4969,9 +4486,7 @@ static PyObject *MovieObj_GetMoviePreviewTime(_self, _args) return _res; } -static PyObject *MovieObj_SetMoviePreviewTime(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_SetMoviePreviewTime(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; TimeValue previewTime; @@ -4988,9 +4503,7 @@ static PyObject *MovieObj_SetMoviePreviewTime(_self, _args) return _res; } -static PyObject *MovieObj_GetMoviePosterTime(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_GetMoviePosterTime(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; TimeValue _rv; @@ -5002,9 +4515,7 @@ static PyObject *MovieObj_GetMoviePosterTime(_self, _args) return _res; } -static PyObject *MovieObj_SetMoviePosterTime(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_SetMoviePosterTime(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; TimeValue posterTime; @@ -5018,9 +4529,7 @@ static PyObject *MovieObj_SetMoviePosterTime(_self, _args) return _res; } -static PyObject *MovieObj_GetMovieSelection(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_GetMovieSelection(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; TimeValue selectionTime; @@ -5036,9 +4545,7 @@ static PyObject *MovieObj_GetMovieSelection(_self, _args) return _res; } -static PyObject *MovieObj_SetMovieSelection(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_SetMovieSelection(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; TimeValue selectionTime; @@ -5055,9 +4562,7 @@ static PyObject *MovieObj_SetMovieSelection(_self, _args) return _res; } -static PyObject *MovieObj_SetMovieActiveSegment(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_SetMovieActiveSegment(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; TimeValue startTime; @@ -5074,9 +4579,7 @@ static PyObject *MovieObj_SetMovieActiveSegment(_self, _args) return _res; } -static PyObject *MovieObj_GetMovieActiveSegment(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_GetMovieActiveSegment(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; TimeValue startTime; @@ -5092,9 +4595,7 @@ static PyObject *MovieObj_GetMovieActiveSegment(_self, _args) return _res; } -static PyObject *MovieObj_GetMovieTime(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_GetMovieTime(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; TimeValue _rv; @@ -5109,9 +4610,7 @@ static PyObject *MovieObj_GetMovieTime(_self, _args) return _res; } -static PyObject *MovieObj_SetMovieTime(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_SetMovieTime(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; TimeRecord newtime; @@ -5125,9 +4624,7 @@ static PyObject *MovieObj_SetMovieTime(_self, _args) return _res; } -static PyObject *MovieObj_SetMovieTimeValue(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_SetMovieTimeValue(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; TimeValue newtime; @@ -5141,9 +4638,7 @@ static PyObject *MovieObj_SetMovieTimeValue(_self, _args) return _res; } -static PyObject *MovieObj_GetMovieUserData(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_GetMovieUserData(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; UserData _rv; @@ -5155,9 +4650,7 @@ static PyObject *MovieObj_GetMovieUserData(_self, _args) return _res; } -static PyObject *MovieObj_GetMovieTrackCount(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_GetMovieTrackCount(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; long _rv; @@ -5169,9 +4662,7 @@ static PyObject *MovieObj_GetMovieTrackCount(_self, _args) return _res; } -static PyObject *MovieObj_GetMovieTrack(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_GetMovieTrack(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; Track _rv; @@ -5186,9 +4677,7 @@ static PyObject *MovieObj_GetMovieTrack(_self, _args) return _res; } -static PyObject *MovieObj_GetMovieIndTrack(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_GetMovieIndTrack(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; Track _rv; @@ -5203,9 +4692,7 @@ static PyObject *MovieObj_GetMovieIndTrack(_self, _args) return _res; } -static PyObject *MovieObj_GetMovieIndTrackType(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_GetMovieIndTrackType(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; Track _rv; @@ -5226,9 +4713,7 @@ static PyObject *MovieObj_GetMovieIndTrackType(_self, _args) return _res; } -static PyObject *MovieObj_NewMovieTrack(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_NewMovieTrack(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; Track _rv; @@ -5249,9 +4734,7 @@ static PyObject *MovieObj_NewMovieTrack(_self, _args) return _res; } -static PyObject *MovieObj_SetAutoTrackAlternatesEnabled(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_SetAutoTrackAlternatesEnabled(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean enable; @@ -5265,9 +4748,7 @@ static PyObject *MovieObj_SetAutoTrackAlternatesEnabled(_self, _args) return _res; } -static PyObject *MovieObj_SelectMovieAlternates(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_SelectMovieAlternates(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -5278,9 +4759,7 @@ static PyObject *MovieObj_SelectMovieAlternates(_self, _args) return _res; } -static PyObject *MovieObj_InsertMovieSegment(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_InsertMovieSegment(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -5305,9 +4784,7 @@ static PyObject *MovieObj_InsertMovieSegment(_self, _args) return _res; } -static PyObject *MovieObj_InsertEmptyMovieSegment(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_InsertEmptyMovieSegment(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -5326,9 +4803,7 @@ static PyObject *MovieObj_InsertEmptyMovieSegment(_self, _args) return _res; } -static PyObject *MovieObj_DeleteMovieSegment(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_DeleteMovieSegment(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -5347,9 +4822,7 @@ static PyObject *MovieObj_DeleteMovieSegment(_self, _args) return _res; } -static PyObject *MovieObj_ScaleMovieSegment(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_ScaleMovieSegment(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -5371,9 +4844,7 @@ static PyObject *MovieObj_ScaleMovieSegment(_self, _args) return _res; } -static PyObject *MovieObj_CutMovieSelection(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_CutMovieSelection(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; Movie _rv; @@ -5385,9 +4856,7 @@ static PyObject *MovieObj_CutMovieSelection(_self, _args) return _res; } -static PyObject *MovieObj_CopyMovieSelection(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_CopyMovieSelection(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; Movie _rv; @@ -5399,9 +4868,7 @@ static PyObject *MovieObj_CopyMovieSelection(_self, _args) return _res; } -static PyObject *MovieObj_PasteMovieSelection(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_PasteMovieSelection(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; Movie src; @@ -5415,9 +4882,7 @@ static PyObject *MovieObj_PasteMovieSelection(_self, _args) return _res; } -static PyObject *MovieObj_AddMovieSelection(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_AddMovieSelection(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; Movie src; @@ -5431,9 +4896,7 @@ static PyObject *MovieObj_AddMovieSelection(_self, _args) return _res; } -static PyObject *MovieObj_ClearMovieSelection(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_ClearMovieSelection(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -5444,9 +4907,7 @@ static PyObject *MovieObj_ClearMovieSelection(_self, _args) return _res; } -static PyObject *MovieObj_PutMovieIntoTypedHandle(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_PutMovieIntoTypedHandle(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -5480,9 +4941,7 @@ static PyObject *MovieObj_PutMovieIntoTypedHandle(_self, _args) return _res; } -static PyObject *MovieObj_CopyMovieSettings(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_CopyMovieSettings(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -5498,9 +4957,7 @@ static PyObject *MovieObj_CopyMovieSettings(_self, _args) return _res; } -static PyObject *MovieObj_ConvertMovieToFile(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_ConvertMovieToFile(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -5536,9 +4993,7 @@ static PyObject *MovieObj_ConvertMovieToFile(_self, _args) return _res; } -static PyObject *MovieObj_GetMovieDataSize(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_GetMovieDataSize(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; long _rv; @@ -5556,9 +5011,7 @@ static PyObject *MovieObj_GetMovieDataSize(_self, _args) return _res; } -static PyObject *MovieObj_GetMovieDataSize64(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_GetMovieDataSize64(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -5579,9 +5032,7 @@ static PyObject *MovieObj_GetMovieDataSize64(_self, _args) return _res; } -static PyObject *MovieObj_PtInMovie(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_PtInMovie(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -5596,9 +5047,7 @@ static PyObject *MovieObj_PtInMovie(_self, _args) return _res; } -static PyObject *MovieObj_SetMovieLanguage(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_SetMovieLanguage(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; long language; @@ -5612,9 +5061,7 @@ static PyObject *MovieObj_SetMovieLanguage(_self, _args) return _res; } -static PyObject *MovieObj_GetMovieNextInterestingTime(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_GetMovieNextInterestingTime(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; short interestingTimeFlags; @@ -5645,9 +5092,7 @@ static PyObject *MovieObj_GetMovieNextInterestingTime(_self, _args) return _res; } -static PyObject *MovieObj_AddMovieResource(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_AddMovieResource(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -5668,9 +5113,7 @@ static PyObject *MovieObj_AddMovieResource(_self, _args) return _res; } -static PyObject *MovieObj_UpdateMovieResource(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_UpdateMovieResource(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -5692,9 +5135,7 @@ static PyObject *MovieObj_UpdateMovieResource(_self, _args) return _res; } -static PyObject *MovieObj_HasMovieChanged(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_HasMovieChanged(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -5706,9 +5147,7 @@ static PyObject *MovieObj_HasMovieChanged(_self, _args) return _res; } -static PyObject *MovieObj_ClearMovieChanged(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_ClearMovieChanged(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -5719,9 +5158,7 @@ static PyObject *MovieObj_ClearMovieChanged(_self, _args) return _res; } -static PyObject *MovieObj_SetMovieDefaultDataRef(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_SetMovieDefaultDataRef(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -5740,9 +5177,7 @@ static PyObject *MovieObj_SetMovieDefaultDataRef(_self, _args) return _res; } -static PyObject *MovieObj_GetMovieDefaultDataRef(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_GetMovieDefaultDataRef(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -5762,9 +5197,7 @@ static PyObject *MovieObj_GetMovieDefaultDataRef(_self, _args) #if !TARGET_API_MAC_CARBON -static PyObject *MovieObj_SetMovieAnchorDataRef(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_SetMovieAnchorDataRef(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -5786,9 +5219,7 @@ static PyObject *MovieObj_SetMovieAnchorDataRef(_self, _args) #if !TARGET_API_MAC_CARBON -static PyObject *MovieObj_GetMovieAnchorDataRef(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_GetMovieAnchorDataRef(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -5810,9 +5241,7 @@ static PyObject *MovieObj_GetMovieAnchorDataRef(_self, _args) } #endif -static PyObject *MovieObj_SetMovieColorTable(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_SetMovieColorTable(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -5828,9 +5257,7 @@ static PyObject *MovieObj_SetMovieColorTable(_self, _args) return _res; } -static PyObject *MovieObj_GetMovieColorTable(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_GetMovieColorTable(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -5845,9 +5272,7 @@ static PyObject *MovieObj_GetMovieColorTable(_self, _args) return _res; } -static PyObject *MovieObj_FlattenMovie(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_FlattenMovie(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; long movieFlattenFlags; @@ -5878,9 +5303,7 @@ static PyObject *MovieObj_FlattenMovie(_self, _args) return _res; } -static PyObject *MovieObj_FlattenMovieData(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_FlattenMovieData(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; Movie _rv; @@ -5907,9 +5330,7 @@ static PyObject *MovieObj_FlattenMovieData(_self, _args) return _res; } -static PyObject *MovieObj_MovieSearchText(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_MovieSearchText(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -5939,9 +5360,7 @@ static PyObject *MovieObj_MovieSearchText(_self, _args) return _res; } -static PyObject *MovieObj_GetPosterBox(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_GetPosterBox(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; Rect boxRect; @@ -5954,9 +5373,7 @@ static PyObject *MovieObj_GetPosterBox(_self, _args) return _res; } -static PyObject *MovieObj_SetPosterBox(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_SetPosterBox(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; Rect boxRect; @@ -5970,9 +5387,7 @@ static PyObject *MovieObj_SetPosterBox(_self, _args) return _res; } -static PyObject *MovieObj_GetMovieSegmentDisplayBoundsRgn(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_GetMovieSegmentDisplayBoundsRgn(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; RgnHandle _rv; @@ -5990,9 +5405,7 @@ static PyObject *MovieObj_GetMovieSegmentDisplayBoundsRgn(_self, _args) return _res; } -static PyObject *MovieObj_GetMovieStatus(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_GetMovieStatus(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -6009,9 +5422,7 @@ static PyObject *MovieObj_GetMovieStatus(_self, _args) #if !TARGET_API_MAC_CARBON -static PyObject *MovieObj_GetMovieLoadState(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_GetMovieLoadState(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; long _rv; @@ -6024,9 +5435,7 @@ static PyObject *MovieObj_GetMovieLoadState(_self, _args) } #endif -static PyObject *MovieObj_NewMovieController(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_NewMovieController(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; MovieController _rv; @@ -6044,9 +5453,7 @@ static PyObject *MovieObj_NewMovieController(_self, _args) return _res; } -static PyObject *MovieObj_PutMovieOnScrap(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_PutMovieOnScrap(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -6062,9 +5469,7 @@ static PyObject *MovieObj_PutMovieOnScrap(_self, _args) return _res; } -static PyObject *MovieObj_SetMoviePlayHints(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_SetMoviePlayHints(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; long flags; @@ -6081,9 +5486,7 @@ static PyObject *MovieObj_SetMoviePlayHints(_self, _args) return _res; } -static PyObject *MovieObj_GetMaxLoadedTimeInMovie(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_GetMaxLoadedTimeInMovie(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -6098,9 +5501,7 @@ static PyObject *MovieObj_GetMaxLoadedTimeInMovie(_self, _args) return _res; } -static PyObject *MovieObj_QTMovieNeedsTimeTable(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_QTMovieNeedsTimeTable(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -6115,9 +5516,7 @@ static PyObject *MovieObj_QTMovieNeedsTimeTable(_self, _args) return _res; } -static PyObject *MovieObj_QTGetDataRefMaxFileOffset(_self, _args) - MovieObject *_self; - PyObject *_args; +static PyObject *MovieObj_QTGetDataRefMaxFileOffset(MovieObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -6373,9 +5772,7 @@ static PyMethodDef MovieObj_methods[] = { PyMethodChain MovieObj_chain = { MovieObj_methods, NULL }; -static PyObject *MovieObj_getattr(self, name) - MovieObject *self; - char *name; +static PyObject *MovieObj_getattr(MovieObject *self, char *name) { return Py_FindMethodInChain(&MovieObj_chain, (PyObject *)self, name); } @@ -6412,9 +5809,7 @@ PyTypeObject Movie_Type = { #if !TARGET_API_MAC_CARBON -static PyObject *Qt_CheckQuickTimeRegistration(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_CheckQuickTimeRegistration(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; void * registrationKey; @@ -6431,9 +5826,7 @@ static PyObject *Qt_CheckQuickTimeRegistration(_self, _args) } #endif -static PyObject *Qt_EnterMovies(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_EnterMovies(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -6446,9 +5839,7 @@ static PyObject *Qt_EnterMovies(_self, _args) return _res; } -static PyObject *Qt_ExitMovies(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_ExitMovies(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -6459,9 +5850,7 @@ static PyObject *Qt_ExitMovies(_self, _args) return _res; } -static PyObject *Qt_GetMoviesError(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_GetMoviesError(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -6474,9 +5863,7 @@ static PyObject *Qt_GetMoviesError(_self, _args) return _res; } -static PyObject *Qt_ClearMoviesStickyError(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_ClearMoviesStickyError(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -6487,9 +5874,7 @@ static PyObject *Qt_ClearMoviesStickyError(_self, _args) return _res; } -static PyObject *Qt_GetMoviesStickyError(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_GetMoviesStickyError(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -6502,9 +5887,7 @@ static PyObject *Qt_GetMoviesStickyError(_self, _args) return _res; } -static PyObject *Qt_DisposeMatte(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_DisposeMatte(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; PixMapHandle theMatte; @@ -6517,9 +5900,7 @@ static PyObject *Qt_DisposeMatte(_self, _args) return _res; } -static PyObject *Qt_NewMovie(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_NewMovie(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Movie _rv; @@ -6533,9 +5914,7 @@ static PyObject *Qt_NewMovie(_self, _args) return _res; } -static PyObject *Qt_GetDataHandler(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_GetDataHandler(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Component _rv; @@ -6557,9 +5936,7 @@ static PyObject *Qt_GetDataHandler(_self, _args) #if !TARGET_API_MAC_CARBON -static PyObject *Qt_OpenADataHandler(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_OpenADataHandler(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -6592,9 +5969,7 @@ static PyObject *Qt_OpenADataHandler(_self, _args) } #endif -static PyObject *Qt_PasteHandleIntoMovie(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_PasteHandleIntoMovie(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -6621,9 +5996,7 @@ static PyObject *Qt_PasteHandleIntoMovie(_self, _args) return _res; } -static PyObject *Qt_GetMovieImporterForDataRef(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_GetMovieImporterForDataRef(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -6646,9 +6019,7 @@ static PyObject *Qt_GetMovieImporterForDataRef(_self, _args) return _res; } -static PyObject *Qt_TrackTimeToMediaTime(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_TrackTimeToMediaTime(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; TimeValue _rv; @@ -6665,9 +6036,7 @@ static PyObject *Qt_TrackTimeToMediaTime(_self, _args) return _res; } -static PyObject *Qt_NewUserData(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_NewUserData(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -6681,9 +6050,7 @@ static PyObject *Qt_NewUserData(_self, _args) return _res; } -static PyObject *Qt_NewUserDataFromHandle(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_NewUserDataFromHandle(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -6700,9 +6067,7 @@ static PyObject *Qt_NewUserDataFromHandle(_self, _args) return _res; } -static PyObject *Qt_CreateMovieFile(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_CreateMovieFile(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -6731,9 +6096,7 @@ static PyObject *Qt_CreateMovieFile(_self, _args) return _res; } -static PyObject *Qt_OpenMovieFile(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_OpenMovieFile(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -6753,9 +6116,7 @@ static PyObject *Qt_OpenMovieFile(_self, _args) return _res; } -static PyObject *Qt_CloseMovieFile(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_CloseMovieFile(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -6770,9 +6131,7 @@ static PyObject *Qt_CloseMovieFile(_self, _args) return _res; } -static PyObject *Qt_DeleteMovieFile(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_DeleteMovieFile(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -6787,9 +6146,7 @@ static PyObject *Qt_DeleteMovieFile(_self, _args) return _res; } -static PyObject *Qt_NewMovieFromFile(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_NewMovieFromFile(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -6817,9 +6174,7 @@ static PyObject *Qt_NewMovieFromFile(_self, _args) return _res; } -static PyObject *Qt_NewMovieFromHandle(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_NewMovieFromHandle(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -6842,9 +6197,7 @@ static PyObject *Qt_NewMovieFromHandle(_self, _args) return _res; } -static PyObject *Qt_NewMovieFromDataFork(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_NewMovieFromDataFork(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -6870,9 +6223,7 @@ static PyObject *Qt_NewMovieFromDataFork(_self, _args) return _res; } -static PyObject *Qt_NewMovieFromDataFork64(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_NewMovieFromDataFork64(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -6898,9 +6249,7 @@ static PyObject *Qt_NewMovieFromDataFork64(_self, _args) return _res; } -static PyObject *Qt_NewMovieFromDataRef(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_NewMovieFromDataRef(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -6926,9 +6275,7 @@ static PyObject *Qt_NewMovieFromDataRef(_self, _args) return _res; } -static PyObject *Qt_RemoveMovieResource(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_RemoveMovieResource(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -6946,9 +6293,7 @@ static PyObject *Qt_RemoveMovieResource(_self, _args) return _res; } -static PyObject *Qt_CreateShortcutMovieFile(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_CreateShortcutMovieFile(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -6978,9 +6323,7 @@ static PyObject *Qt_CreateShortcutMovieFile(_self, _args) return _res; } -static PyObject *Qt_NewMovieFromScrap(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_NewMovieFromScrap(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Movie _rv; @@ -6994,9 +6337,7 @@ static PyObject *Qt_NewMovieFromScrap(_self, _args) return _res; } -static PyObject *Qt_QTNewAlias(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_QTNewAlias(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -7016,9 +6357,7 @@ static PyObject *Qt_QTNewAlias(_self, _args) return _res; } -static PyObject *Qt_EndFullScreen(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_EndFullScreen(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -7036,9 +6375,7 @@ static PyObject *Qt_EndFullScreen(_self, _args) return _res; } -static PyObject *Qt_AddSoundDescriptionExtension(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_AddSoundDescriptionExtension(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -7059,9 +6396,7 @@ static PyObject *Qt_AddSoundDescriptionExtension(_self, _args) return _res; } -static PyObject *Qt_GetSoundDescriptionExtension(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_GetSoundDescriptionExtension(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -7081,9 +6416,7 @@ static PyObject *Qt_GetSoundDescriptionExtension(_self, _args) return _res; } -static PyObject *Qt_RemoveSoundDescriptionExtension(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_RemoveSoundDescriptionExtension(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -7101,9 +6434,7 @@ static PyObject *Qt_RemoveSoundDescriptionExtension(_self, _args) return _res; } -static PyObject *Qt_QTIsStandardParameterDialogEvent(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_QTIsStandardParameterDialogEvent(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -7120,9 +6451,7 @@ static PyObject *Qt_QTIsStandardParameterDialogEvent(_self, _args) return _res; } -static PyObject *Qt_QTDismissStandardParameterDialog(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_QTDismissStandardParameterDialog(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -7137,9 +6466,7 @@ static PyObject *Qt_QTDismissStandardParameterDialog(_self, _args) return _res; } -static PyObject *Qt_QTStandardParameterDialogDoAction(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_QTStandardParameterDialogDoAction(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -7160,9 +6487,7 @@ static PyObject *Qt_QTStandardParameterDialogDoAction(_self, _args) return _res; } -static PyObject *Qt_QTRegisterAccessKey(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_QTRegisterAccessKey(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -7183,9 +6508,7 @@ static PyObject *Qt_QTRegisterAccessKey(_self, _args) return _res; } -static PyObject *Qt_QTUnregisterAccessKey(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_QTUnregisterAccessKey(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -7206,9 +6529,7 @@ static PyObject *Qt_QTUnregisterAccessKey(_self, _args) return _res; } -static PyObject *Qt_QTTextToNativeText(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_QTTextToNativeText(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -7229,9 +6550,7 @@ static PyObject *Qt_QTTextToNativeText(_self, _args) return _res; } -static PyObject *Qt_VideoMediaResetStatistics(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_VideoMediaResetStatistics(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -7245,9 +6564,7 @@ static PyObject *Qt_VideoMediaResetStatistics(_self, _args) return _res; } -static PyObject *Qt_VideoMediaGetStatistics(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_VideoMediaGetStatistics(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -7261,9 +6578,7 @@ static PyObject *Qt_VideoMediaGetStatistics(_self, _args) return _res; } -static PyObject *Qt_VideoMediaGetStallCount(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_VideoMediaGetStallCount(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -7280,9 +6595,7 @@ static PyObject *Qt_VideoMediaGetStallCount(_self, _args) return _res; } -static PyObject *Qt_VideoMediaSetCodecParameter(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_VideoMediaSetCodecParameter(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -7311,9 +6624,7 @@ static PyObject *Qt_VideoMediaSetCodecParameter(_self, _args) return _res; } -static PyObject *Qt_VideoMediaGetCodecParameter(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_VideoMediaGetCodecParameter(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -7336,9 +6647,7 @@ static PyObject *Qt_VideoMediaGetCodecParameter(_self, _args) return _res; } -static PyObject *Qt_TextMediaAddTextSample(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_TextMediaAddTextSample(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -7400,9 +6709,7 @@ static PyObject *Qt_TextMediaAddTextSample(_self, _args) return _res; } -static PyObject *Qt_TextMediaAddTESample(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_TextMediaAddTESample(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -7449,9 +6756,7 @@ static PyObject *Qt_TextMediaAddTESample(_self, _args) return _res; } -static PyObject *Qt_TextMediaAddHiliteSample(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_TextMediaAddHiliteSample(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -7480,9 +6785,7 @@ static PyObject *Qt_TextMediaAddHiliteSample(_self, _args) return _res; } -static PyObject *Qt_TextMediaDrawRaw(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_TextMediaDrawRaw(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -7511,9 +6814,7 @@ static PyObject *Qt_TextMediaDrawRaw(_self, _args) return _res; } -static PyObject *Qt_TextMediaSetTextProperty(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_TextMediaSetTextProperty(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -7539,9 +6840,7 @@ static PyObject *Qt_TextMediaSetTextProperty(_self, _args) return _res; } -static PyObject *Qt_TextMediaRawSetup(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_TextMediaRawSetup(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -7573,9 +6872,7 @@ static PyObject *Qt_TextMediaRawSetup(_self, _args) return _res; } -static PyObject *Qt_TextMediaRawIdle(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_TextMediaRawIdle(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -7604,9 +6901,7 @@ static PyObject *Qt_TextMediaRawIdle(_self, _args) return _res; } -static PyObject *Qt_TextMediaFindNextText(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_TextMediaFindNextText(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -7641,9 +6936,7 @@ static PyObject *Qt_TextMediaFindNextText(_self, _args) return _res; } -static PyObject *Qt_TextMediaHiliteTextSample(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_TextMediaHiliteTextSample(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -7669,9 +6962,7 @@ static PyObject *Qt_TextMediaHiliteTextSample(_self, _args) return _res; } -static PyObject *Qt_TextMediaSetTextSampleData(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_TextMediaSetTextSampleData(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -7691,9 +6982,7 @@ static PyObject *Qt_TextMediaSetTextSampleData(_self, _args) return _res; } -static PyObject *Qt_SpriteMediaSetProperty(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_SpriteMediaSetProperty(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -7716,9 +7005,7 @@ static PyObject *Qt_SpriteMediaSetProperty(_self, _args) return _res; } -static PyObject *Qt_SpriteMediaGetProperty(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_SpriteMediaGetProperty(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -7741,9 +7028,7 @@ static PyObject *Qt_SpriteMediaGetProperty(_self, _args) return _res; } -static PyObject *Qt_SpriteMediaHitTestSprites(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_SpriteMediaHitTestSprites(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -7766,9 +7051,7 @@ static PyObject *Qt_SpriteMediaHitTestSprites(_self, _args) return _res; } -static PyObject *Qt_SpriteMediaCountSprites(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_SpriteMediaCountSprites(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -7785,9 +7068,7 @@ static PyObject *Qt_SpriteMediaCountSprites(_self, _args) return _res; } -static PyObject *Qt_SpriteMediaCountImages(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_SpriteMediaCountImages(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -7804,9 +7085,7 @@ static PyObject *Qt_SpriteMediaCountImages(_self, _args) return _res; } -static PyObject *Qt_SpriteMediaGetIndImageDescription(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_SpriteMediaGetIndImageDescription(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -7826,9 +7105,7 @@ static PyObject *Qt_SpriteMediaGetIndImageDescription(_self, _args) return _res; } -static PyObject *Qt_SpriteMediaGetDisplayedSampleNumber(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_SpriteMediaGetDisplayedSampleNumber(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -7845,9 +7122,7 @@ static PyObject *Qt_SpriteMediaGetDisplayedSampleNumber(_self, _args) return _res; } -static PyObject *Qt_SpriteMediaGetSpriteName(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_SpriteMediaGetSpriteName(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -7867,9 +7142,7 @@ static PyObject *Qt_SpriteMediaGetSpriteName(_self, _args) return _res; } -static PyObject *Qt_SpriteMediaGetImageName(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_SpriteMediaGetImageName(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -7889,9 +7162,7 @@ static PyObject *Qt_SpriteMediaGetImageName(_self, _args) return _res; } -static PyObject *Qt_SpriteMediaSetSpriteProperty(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_SpriteMediaSetSpriteProperty(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -7914,9 +7185,7 @@ static PyObject *Qt_SpriteMediaSetSpriteProperty(_self, _args) return _res; } -static PyObject *Qt_SpriteMediaGetSpriteProperty(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_SpriteMediaGetSpriteProperty(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -7939,9 +7208,7 @@ static PyObject *Qt_SpriteMediaGetSpriteProperty(_self, _args) return _res; } -static PyObject *Qt_SpriteMediaHitTestAllSprites(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_SpriteMediaHitTestAllSprites(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -7964,9 +7231,7 @@ static PyObject *Qt_SpriteMediaHitTestAllSprites(_self, _args) return _res; } -static PyObject *Qt_SpriteMediaHitTestOneSprite(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_SpriteMediaHitTestOneSprite(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -7992,9 +7257,7 @@ static PyObject *Qt_SpriteMediaHitTestOneSprite(_self, _args) return _res; } -static PyObject *Qt_SpriteMediaSpriteIndexToID(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_SpriteMediaSpriteIndexToID(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -8014,9 +7277,7 @@ static PyObject *Qt_SpriteMediaSpriteIndexToID(_self, _args) return _res; } -static PyObject *Qt_SpriteMediaSpriteIDToIndex(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_SpriteMediaSpriteIDToIndex(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -8036,9 +7297,7 @@ static PyObject *Qt_SpriteMediaSpriteIDToIndex(_self, _args) return _res; } -static PyObject *Qt_SpriteMediaSetActionVariable(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_SpriteMediaSetActionVariable(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -8058,9 +7317,7 @@ static PyObject *Qt_SpriteMediaSetActionVariable(_self, _args) return _res; } -static PyObject *Qt_SpriteMediaGetActionVariable(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_SpriteMediaGetActionVariable(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -8082,9 +7339,7 @@ static PyObject *Qt_SpriteMediaGetActionVariable(_self, _args) #if !TARGET_API_MAC_CARBON -static PyObject *Qt_SpriteMediaGetIndImageProperty(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_SpriteMediaGetIndImageProperty(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -8108,9 +7363,7 @@ static PyObject *Qt_SpriteMediaGetIndImageProperty(_self, _args) } #endif -static PyObject *Qt_SpriteMediaDisposeSprite(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_SpriteMediaDisposeSprite(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -8127,9 +7380,7 @@ static PyObject *Qt_SpriteMediaDisposeSprite(_self, _args) return _res; } -static PyObject *Qt_SpriteMediaSetActionVariableToString(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_SpriteMediaSetActionVariableToString(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -8149,9 +7400,7 @@ static PyObject *Qt_SpriteMediaSetActionVariableToString(_self, _args) return _res; } -static PyObject *Qt_SpriteMediaGetActionVariableAsString(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_SpriteMediaGetActionVariableAsString(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -8171,9 +7420,7 @@ static PyObject *Qt_SpriteMediaGetActionVariableAsString(_self, _args) return _res; } -static PyObject *Qt_FlashMediaSetPan(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_FlashMediaSetPan(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -8193,9 +7440,7 @@ static PyObject *Qt_FlashMediaSetPan(_self, _args) return _res; } -static PyObject *Qt_FlashMediaSetZoom(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_FlashMediaSetZoom(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -8212,9 +7457,7 @@ static PyObject *Qt_FlashMediaSetZoom(_self, _args) return _res; } -static PyObject *Qt_FlashMediaSetZoomRect(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_FlashMediaSetZoomRect(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -8240,9 +7483,7 @@ static PyObject *Qt_FlashMediaSetZoomRect(_self, _args) return _res; } -static PyObject *Qt_FlashMediaGetRefConBounds(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_FlashMediaGetRefConBounds(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -8271,9 +7512,7 @@ static PyObject *Qt_FlashMediaGetRefConBounds(_self, _args) return _res; } -static PyObject *Qt_FlashMediaGetRefConID(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_FlashMediaGetRefConID(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -8293,9 +7532,7 @@ static PyObject *Qt_FlashMediaGetRefConID(_self, _args) return _res; } -static PyObject *Qt_FlashMediaIDToRefCon(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_FlashMediaIDToRefCon(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -8315,9 +7552,7 @@ static PyObject *Qt_FlashMediaIDToRefCon(_self, _args) return _res; } -static PyObject *Qt_FlashMediaGetDisplayedFrameNumber(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_FlashMediaGetDisplayedFrameNumber(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -8334,9 +7569,7 @@ static PyObject *Qt_FlashMediaGetDisplayedFrameNumber(_self, _args) return _res; } -static PyObject *Qt_FlashMediaFrameNumberToMovieTime(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_FlashMediaFrameNumberToMovieTime(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -8356,9 +7589,7 @@ static PyObject *Qt_FlashMediaFrameNumberToMovieTime(_self, _args) return _res; } -static PyObject *Qt_FlashMediaFrameLabelToMovieTime(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_FlashMediaFrameLabelToMovieTime(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -8380,9 +7611,7 @@ static PyObject *Qt_FlashMediaFrameLabelToMovieTime(_self, _args) #if !TARGET_API_MAC_CARBON -static PyObject *Qt_MovieMediaGetCurrentMovieProperty(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_MovieMediaGetCurrentMovieProperty(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -8405,9 +7634,7 @@ static PyObject *Qt_MovieMediaGetCurrentMovieProperty(_self, _args) #if !TARGET_API_MAC_CARBON -static PyObject *Qt_MovieMediaGetCurrentTrackProperty(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_MovieMediaGetCurrentTrackProperty(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -8433,9 +7660,7 @@ static PyObject *Qt_MovieMediaGetCurrentTrackProperty(_self, _args) #if !TARGET_API_MAC_CARBON -static PyObject *Qt_MovieMediaGetChildMovieDataReference(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_MovieMediaGetChildMovieDataReference(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -8470,9 +7695,7 @@ static PyObject *Qt_MovieMediaGetChildMovieDataReference(_self, _args) #if !TARGET_API_MAC_CARBON -static PyObject *Qt_MovieMediaSetChildMovieDataReference(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_MovieMediaSetChildMovieDataReference(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -8498,9 +7721,7 @@ static PyObject *Qt_MovieMediaSetChildMovieDataReference(_self, _args) #if !TARGET_API_MAC_CARBON -static PyObject *Qt_MovieMediaLoadChildMovieFromDataReference(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_MovieMediaLoadChildMovieFromDataReference(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -8518,9 +7739,7 @@ static PyObject *Qt_MovieMediaLoadChildMovieFromDataReference(_self, _args) } #endif -static PyObject *Qt_Media3DGetCurrentGroup(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_Media3DGetCurrentGroup(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -8537,9 +7756,7 @@ static PyObject *Qt_Media3DGetCurrentGroup(_self, _args) return _res; } -static PyObject *Qt_Media3DTranslateNamedObjectTo(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_Media3DTranslateNamedObjectTo(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -8565,9 +7782,7 @@ static PyObject *Qt_Media3DTranslateNamedObjectTo(_self, _args) return _res; } -static PyObject *Qt_Media3DScaleNamedObjectTo(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_Media3DScaleNamedObjectTo(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -8593,9 +7808,7 @@ static PyObject *Qt_Media3DScaleNamedObjectTo(_self, _args) return _res; } -static PyObject *Qt_Media3DRotateNamedObjectTo(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_Media3DRotateNamedObjectTo(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -8621,9 +7834,7 @@ static PyObject *Qt_Media3DRotateNamedObjectTo(_self, _args) return _res; } -static PyObject *Qt_Media3DSetCameraData(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_Media3DSetCameraData(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -8640,9 +7851,7 @@ static PyObject *Qt_Media3DSetCameraData(_self, _args) return _res; } -static PyObject *Qt_Media3DGetCameraData(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_Media3DGetCameraData(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -8659,9 +7868,7 @@ static PyObject *Qt_Media3DGetCameraData(_self, _args) return _res; } -static PyObject *Qt_Media3DSetCameraAngleAspect(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_Media3DSetCameraAngleAspect(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -8681,9 +7888,7 @@ static PyObject *Qt_Media3DSetCameraAngleAspect(_self, _args) return _res; } -static PyObject *Qt_Media3DGetCameraAngleAspect(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_Media3DGetCameraAngleAspect(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -8703,9 +7908,7 @@ static PyObject *Qt_Media3DGetCameraAngleAspect(_self, _args) return _res; } -static PyObject *Qt_Media3DSetCameraRange(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_Media3DSetCameraRange(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -8722,9 +7925,7 @@ static PyObject *Qt_Media3DSetCameraRange(_self, _args) return _res; } -static PyObject *Qt_Media3DGetCameraRange(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_Media3DGetCameraRange(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -8743,9 +7944,7 @@ static PyObject *Qt_Media3DGetCameraRange(_self, _args) #if !TARGET_API_MAC_CARBON -static PyObject *Qt_Media3DGetViewObject(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_Media3DGetViewObject(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -8763,9 +7962,7 @@ static PyObject *Qt_Media3DGetViewObject(_self, _args) } #endif -static PyObject *Qt_NewTimeBase(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_NewTimeBase(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; TimeBase _rv; @@ -8777,9 +7974,7 @@ static PyObject *Qt_NewTimeBase(_self, _args) return _res; } -static PyObject *Qt_ConvertTime(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_ConvertTime(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; TimeRecord inout; @@ -8795,9 +7990,7 @@ static PyObject *Qt_ConvertTime(_self, _args) return _res; } -static PyObject *Qt_ConvertTimeScale(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_ConvertTimeScale(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; TimeRecord inout; @@ -8813,9 +8006,7 @@ static PyObject *Qt_ConvertTimeScale(_self, _args) return _res; } -static PyObject *Qt_AddTime(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_AddTime(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; TimeRecord dst; @@ -8831,9 +8022,7 @@ static PyObject *Qt_AddTime(_self, _args) return _res; } -static PyObject *Qt_SubtractTime(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_SubtractTime(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; TimeRecord dst; @@ -8849,9 +8038,7 @@ static PyObject *Qt_SubtractTime(_self, _args) return _res; } -static PyObject *Qt_MusicMediaGetIndexedTunePlayer(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_MusicMediaGetIndexedTunePlayer(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ComponentResult _rv; @@ -8871,9 +8058,7 @@ static PyObject *Qt_MusicMediaGetIndexedTunePlayer(_self, _args) return _res; } -static PyObject *Qt_AlignWindow(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_AlignWindow(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; WindowPtr wp; @@ -8891,9 +8076,7 @@ static PyObject *Qt_AlignWindow(_self, _args) return _res; } -static PyObject *Qt_DragAlignedWindow(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_DragAlignedWindow(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; WindowPtr wp; @@ -8914,9 +8097,7 @@ static PyObject *Qt_DragAlignedWindow(_self, _args) return _res; } -static PyObject *Qt_MoviesTask(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Qt_MoviesTask(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; long maxMilliSecToUse; @@ -9180,25 +8361,25 @@ static PyMethodDef Qt_methods[] = { -void initQt() +void initQt(void) { PyObject *m; PyObject *d; - PyMac_INIT_TOOLBOX_OBJECT_NEW(TrackObj_New); - PyMac_INIT_TOOLBOX_OBJECT_CONVERT(TrackObj_Convert); - PyMac_INIT_TOOLBOX_OBJECT_NEW(MovieObj_New); - PyMac_INIT_TOOLBOX_OBJECT_CONVERT(MovieObj_Convert); - PyMac_INIT_TOOLBOX_OBJECT_NEW(MovieCtlObj_New); - PyMac_INIT_TOOLBOX_OBJECT_CONVERT(MovieCtlObj_Convert); - PyMac_INIT_TOOLBOX_OBJECT_NEW(TimeBaseObj_New); - PyMac_INIT_TOOLBOX_OBJECT_CONVERT(TimeBaseObj_Convert); - PyMac_INIT_TOOLBOX_OBJECT_NEW(UserDataObj_New); - PyMac_INIT_TOOLBOX_OBJECT_CONVERT(UserDataObj_Convert); - PyMac_INIT_TOOLBOX_OBJECT_NEW(MediaObj_New); - PyMac_INIT_TOOLBOX_OBJECT_CONVERT(MediaObj_Convert); + PyMac_INIT_TOOLBOX_OBJECT_NEW(Track, TrackObj_New); + PyMac_INIT_TOOLBOX_OBJECT_CONVERT(Track, TrackObj_Convert); + PyMac_INIT_TOOLBOX_OBJECT_NEW(Movie, MovieObj_New); + PyMac_INIT_TOOLBOX_OBJECT_CONVERT(Movie, MovieObj_Convert); + PyMac_INIT_TOOLBOX_OBJECT_NEW(MovieController, MovieCtlObj_New); + PyMac_INIT_TOOLBOX_OBJECT_CONVERT(MovieController, MovieCtlObj_Convert); + PyMac_INIT_TOOLBOX_OBJECT_NEW(TimeBase, TimeBaseObj_New); + PyMac_INIT_TOOLBOX_OBJECT_CONVERT(TimeBase, TimeBaseObj_Convert); + PyMac_INIT_TOOLBOX_OBJECT_NEW(UserData, UserDataObj_New); + PyMac_INIT_TOOLBOX_OBJECT_CONVERT(UserData, UserDataObj_Convert); + PyMac_INIT_TOOLBOX_OBJECT_NEW(Media, MediaObj_New); + PyMac_INIT_TOOLBOX_OBJECT_CONVERT(Media, MediaObj_Convert); m = Py_InitModule("Qt", Qt_methods); diff --git a/Mac/Modules/qt/qtsupport.py b/Mac/Modules/qt/qtsupport.py index 02ce57eb348..e1b7374f0c8 100644 --- a/Mac/Modules/qt/qtsupport.py +++ b/Mac/Modules/qt/qtsupport.py @@ -24,7 +24,13 @@ from macsupport import * # Create the type objects includestuff = includestuff + """ -#include <%s>""" % MACHEADERFILE + """ +#ifdef WITHOUT_FRAMEWORKS +#include +#else +/* #include */ +#include +#endif + #ifdef USE_TOOLBOX_OBJECT_GLUE extern PyObject *_TrackObj_New(Track); @@ -62,8 +68,7 @@ extern int _MediaObj_Convert(PyObject *, Media *); ** Parse/generate time records */ static PyObject * -QtTimeRecord_New(itself) - TimeRecord *itself; +QtTimeRecord_New(TimeRecord *itself) { if (itself->base) return Py_BuildValue("O&lO&", PyMac_Buildwide, &itself->value, itself->scale, @@ -74,9 +79,7 @@ QtTimeRecord_New(itself) } static int -QtTimeRecord_Convert(v, p_itself) - PyObject *v; - TimeRecord *p_itself; +QtTimeRecord_Convert(PyObject *v, TimeRecord *p_itself) { PyObject *base = NULL; if( !PyArg_ParseTuple(v, "O&l|O", PyMac_Getwide, &p_itself->value, &p_itself->scale, @@ -95,18 +98,18 @@ QtTimeRecord_Convert(v, p_itself) """ initstuff = initstuff + """ - PyMac_INIT_TOOLBOX_OBJECT_NEW(TrackObj_New); - PyMac_INIT_TOOLBOX_OBJECT_CONVERT(TrackObj_Convert); - PyMac_INIT_TOOLBOX_OBJECT_NEW(MovieObj_New); - PyMac_INIT_TOOLBOX_OBJECT_CONVERT(MovieObj_Convert); - PyMac_INIT_TOOLBOX_OBJECT_NEW(MovieCtlObj_New); - PyMac_INIT_TOOLBOX_OBJECT_CONVERT(MovieCtlObj_Convert); - PyMac_INIT_TOOLBOX_OBJECT_NEW(TimeBaseObj_New); - PyMac_INIT_TOOLBOX_OBJECT_CONVERT(TimeBaseObj_Convert); - PyMac_INIT_TOOLBOX_OBJECT_NEW(UserDataObj_New); - PyMac_INIT_TOOLBOX_OBJECT_CONVERT(UserDataObj_Convert); - PyMac_INIT_TOOLBOX_OBJECT_NEW(MediaObj_New); - PyMac_INIT_TOOLBOX_OBJECT_CONVERT(MediaObj_Convert); + PyMac_INIT_TOOLBOX_OBJECT_NEW(Track, TrackObj_New); + PyMac_INIT_TOOLBOX_OBJECT_CONVERT(Track, TrackObj_Convert); + PyMac_INIT_TOOLBOX_OBJECT_NEW(Movie, MovieObj_New); + PyMac_INIT_TOOLBOX_OBJECT_CONVERT(Movie, MovieObj_Convert); + PyMac_INIT_TOOLBOX_OBJECT_NEW(MovieController, MovieCtlObj_New); + PyMac_INIT_TOOLBOX_OBJECT_CONVERT(MovieController, MovieCtlObj_Convert); + PyMac_INIT_TOOLBOX_OBJECT_NEW(TimeBase, TimeBaseObj_New); + PyMac_INIT_TOOLBOX_OBJECT_CONVERT(TimeBase, TimeBaseObj_Convert); + PyMac_INIT_TOOLBOX_OBJECT_NEW(UserData, UserDataObj_New); + PyMac_INIT_TOOLBOX_OBJECT_CONVERT(UserData, UserDataObj_Convert); + PyMac_INIT_TOOLBOX_OBJECT_NEW(Media, MediaObj_New); + PyMac_INIT_TOOLBOX_OBJECT_CONVERT(Media, MediaObj_Convert); """ # Our (opaque) objects diff --git a/Mac/Modules/res/Resmodule.c b/Mac/Modules/res/Resmodule.c index 26007b42e6e..8790080b571 100644 --- a/Mac/Modules/res/Resmodule.c +++ b/Mac/Modules/res/Resmodule.c @@ -8,8 +8,12 @@ #include "macglue.h" #include "pymactoolbox.h" +#ifdef WITHOUT_FRAMEWORKS #include #include +#else +#include +#endif #ifdef USE_TOOLBOX_OBJECT_GLUE extern PyObject *_ResObj_New(Handle); @@ -43,8 +47,7 @@ typedef struct ResourceObject { void (*ob_freeit)(Handle ptr); } ResourceObject; -PyObject *ResObj_New(itself) - Handle itself; +PyObject *ResObj_New(Handle itself) { ResourceObject *it; if (itself == NULL) return PyMac_Error(resNotFound); @@ -54,9 +57,7 @@ PyObject *ResObj_New(itself) it->ob_freeit = NULL; return (PyObject *)it; } -ResObj_Convert(v, p_itself) - PyObject *v; - Handle *p_itself; +ResObj_Convert(PyObject *v, Handle *p_itself) { if (!ResObj_Check(v)) { @@ -78,8 +79,7 @@ ResObj_Convert(v, p_itself) return 1; } -static void ResObj_dealloc(self) - ResourceObject *self; +static void ResObj_dealloc(ResourceObject *self) { if (self->ob_freeit && self->ob_itself) { @@ -89,9 +89,7 @@ static void ResObj_dealloc(self) PyMem_DEL(self); } -static PyObject *ResObj_HomeResFile(_self, _args) - ResourceObject *_self; - PyObject *_args; +static PyObject *ResObj_HomeResFile(ResourceObject *_self, PyObject *_args) { PyObject *_res = NULL; short _rv; @@ -107,9 +105,7 @@ static PyObject *ResObj_HomeResFile(_self, _args) return _res; } -static PyObject *ResObj_MacLoadResource(_self, _args) - ResourceObject *_self; - PyObject *_args; +static PyObject *ResObj_MacLoadResource(ResourceObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -124,9 +120,7 @@ static PyObject *ResObj_MacLoadResource(_self, _args) return _res; } -static PyObject *ResObj_ReleaseResource(_self, _args) - ResourceObject *_self; - PyObject *_args; +static PyObject *ResObj_ReleaseResource(ResourceObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -141,9 +135,7 @@ static PyObject *ResObj_ReleaseResource(_self, _args) return _res; } -static PyObject *ResObj_DetachResource(_self, _args) - ResourceObject *_self; - PyObject *_args; +static PyObject *ResObj_DetachResource(ResourceObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -158,9 +150,7 @@ static PyObject *ResObj_DetachResource(_self, _args) return _res; } -static PyObject *ResObj_GetResAttrs(_self, _args) - ResourceObject *_self; - PyObject *_args; +static PyObject *ResObj_GetResAttrs(ResourceObject *_self, PyObject *_args) { PyObject *_res = NULL; short _rv; @@ -176,9 +166,7 @@ static PyObject *ResObj_GetResAttrs(_self, _args) return _res; } -static PyObject *ResObj_GetResInfo(_self, _args) - ResourceObject *_self; - PyObject *_args; +static PyObject *ResObj_GetResInfo(ResourceObject *_self, PyObject *_args) { PyObject *_res = NULL; short theID; @@ -201,9 +189,7 @@ static PyObject *ResObj_GetResInfo(_self, _args) return _res; } -static PyObject *ResObj_SetResInfo(_self, _args) - ResourceObject *_self; - PyObject *_args; +static PyObject *ResObj_SetResInfo(ResourceObject *_self, PyObject *_args) { PyObject *_res = NULL; short theID; @@ -224,9 +210,7 @@ static PyObject *ResObj_SetResInfo(_self, _args) return _res; } -static PyObject *ResObj_AddResource(_self, _args) - ResourceObject *_self; - PyObject *_args; +static PyObject *ResObj_AddResource(ResourceObject *_self, PyObject *_args) { PyObject *_res = NULL; ResType theType; @@ -250,9 +234,7 @@ static PyObject *ResObj_AddResource(_self, _args) return _res; } -static PyObject *ResObj_GetResourceSizeOnDisk(_self, _args) - ResourceObject *_self; - PyObject *_args; +static PyObject *ResObj_GetResourceSizeOnDisk(ResourceObject *_self, PyObject *_args) { PyObject *_res = NULL; long _rv; @@ -268,9 +250,7 @@ static PyObject *ResObj_GetResourceSizeOnDisk(_self, _args) return _res; } -static PyObject *ResObj_GetMaxResourceSize(_self, _args) - ResourceObject *_self; - PyObject *_args; +static PyObject *ResObj_GetMaxResourceSize(ResourceObject *_self, PyObject *_args) { PyObject *_res = NULL; long _rv; @@ -286,11 +266,9 @@ static PyObject *ResObj_GetMaxResourceSize(_self, _args) return _res; } -#if !TARGET_API_MAC_CARBON +#if TARGET_API_MAC_OS8 -static PyObject *ResObj_RsrcMapEntry(_self, _args) - ResourceObject *_self; - PyObject *_args; +static PyObject *ResObj_RsrcMapEntry(ResourceObject *_self, PyObject *_args) { PyObject *_res = NULL; long _rv; @@ -307,9 +285,7 @@ static PyObject *ResObj_RsrcMapEntry(_self, _args) } #endif -static PyObject *ResObj_SetResAttrs(_self, _args) - ResourceObject *_self; - PyObject *_args; +static PyObject *ResObj_SetResAttrs(ResourceObject *_self, PyObject *_args) { PyObject *_res = NULL; short attrs; @@ -327,9 +303,7 @@ static PyObject *ResObj_SetResAttrs(_self, _args) return _res; } -static PyObject *ResObj_ChangedResource(_self, _args) - ResourceObject *_self; - PyObject *_args; +static PyObject *ResObj_ChangedResource(ResourceObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -344,9 +318,7 @@ static PyObject *ResObj_ChangedResource(_self, _args) return _res; } -static PyObject *ResObj_RemoveResource(_self, _args) - ResourceObject *_self; - PyObject *_args; +static PyObject *ResObj_RemoveResource(ResourceObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -361,9 +333,7 @@ static PyObject *ResObj_RemoveResource(_self, _args) return _res; } -static PyObject *ResObj_WriteResource(_self, _args) - ResourceObject *_self; - PyObject *_args; +static PyObject *ResObj_WriteResource(ResourceObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -378,9 +348,7 @@ static PyObject *ResObj_WriteResource(_self, _args) return _res; } -static PyObject *ResObj_SetResourceSize(_self, _args) - ResourceObject *_self; - PyObject *_args; +static PyObject *ResObj_SetResourceSize(ResourceObject *_self, PyObject *_args) { PyObject *_res = NULL; long newSize; @@ -398,9 +366,7 @@ static PyObject *ResObj_SetResourceSize(_self, _args) return _res; } -static PyObject *ResObj_GetNextFOND(_self, _args) - ResourceObject *_self; - PyObject *_args; +static PyObject *ResObj_GetNextFOND(ResourceObject *_self, PyObject *_args) { PyObject *_res = NULL; Handle _rv; @@ -416,9 +382,7 @@ static PyObject *ResObj_GetNextFOND(_self, _args) return _res; } -static PyObject *ResObj_as_Control(_self, _args) - ResourceObject *_self; - PyObject *_args; +static PyObject *ResObj_as_Control(ResourceObject *_self, PyObject *_args) { PyObject *_res = NULL; @@ -426,9 +390,7 @@ static PyObject *ResObj_as_Control(_self, _args) } -static PyObject *ResObj_as_Menu(_self, _args) - ResourceObject *_self; - PyObject *_args; +static PyObject *ResObj_as_Menu(ResourceObject *_self, PyObject *_args) { PyObject *_res = NULL; @@ -436,9 +398,7 @@ static PyObject *ResObj_as_Menu(_self, _args) } -static PyObject *ResObj_LoadResource(_self, _args) - ResourceObject *_self; - PyObject *_args; +static PyObject *ResObj_LoadResource(ResourceObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -453,9 +413,7 @@ static PyObject *ResObj_LoadResource(_self, _args) return _res; } -static PyObject *ResObj_AutoDispose(_self, _args) - ResourceObject *_self; - PyObject *_args; +static PyObject *ResObj_AutoDispose(ResourceObject *_self, PyObject *_args) { PyObject *_res = NULL; @@ -494,7 +452,7 @@ static PyMethodDef ResObj_methods[] = { {"GetMaxResourceSize", (PyCFunction)ResObj_GetMaxResourceSize, 1, "() -> (long _rv)"}, -#if !TARGET_API_MAC_CARBON +#if TARGET_API_MAC_OS8 {"RsrcMapEntry", (PyCFunction)ResObj_RsrcMapEntry, 1, "() -> (long _rv)"}, #endif @@ -523,9 +481,7 @@ static PyMethodDef ResObj_methods[] = { PyMethodChain ResObj_chain = { ResObj_methods, NULL }; -static PyObject *ResObj_getattr(self, name) - ResourceObject *self; - char *name; +static PyObject *ResObj_getattr(ResourceObject *self, char *name) { if (strcmp(name, "size") == 0) @@ -549,10 +505,7 @@ static PyObject *ResObj_getattr(self, name) } static int -ResObj_setattr(self, name, value) - ResourceObject *self; - char *name; - PyObject *value; +ResObj_setattr(ResourceObject *self, char *name, PyObject *value) { char *data; long size; @@ -603,11 +556,9 @@ PyTypeObject Resource_Type = { /* -------------------- End object type Resource -------------------- */ -#if !TARGET_API_MAC_CARBON +#if TARGET_API_MAC_OS8 -static PyObject *Res_InitResources(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Res_InitResources(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; short _rv; @@ -624,11 +575,9 @@ static PyObject *Res_InitResources(_self, _args) } #endif -#if !TARGET_API_MAC_CARBON +#if TARGET_API_MAC_OS8 -static PyObject *Res_RsrcZoneInit(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Res_RsrcZoneInit(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -644,9 +593,7 @@ static PyObject *Res_RsrcZoneInit(_self, _args) } #endif -static PyObject *Res_CloseResFile(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Res_CloseResFile(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; short refNum; @@ -663,9 +610,7 @@ static PyObject *Res_CloseResFile(_self, _args) return _res; } -static PyObject *Res_ResError(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Res_ResError(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _rv; @@ -681,9 +626,7 @@ static PyObject *Res_ResError(_self, _args) return _res; } -static PyObject *Res_CurResFile(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Res_CurResFile(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; short _rv; @@ -699,11 +642,9 @@ static PyObject *Res_CurResFile(_self, _args) return _res; } -#if !TARGET_API_MAC_CARBON +#if TARGET_API_MAC_OS8 -static PyObject *Res_CreateResFile(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Res_CreateResFile(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Str255 fileName; @@ -721,11 +662,9 @@ static PyObject *Res_CreateResFile(_self, _args) } #endif -#if !TARGET_API_MAC_CARBON +#if TARGET_API_MAC_OS8 -static PyObject *Res_OpenResFile(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Res_OpenResFile(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; short _rv; @@ -744,9 +683,7 @@ static PyObject *Res_OpenResFile(_self, _args) } #endif -static PyObject *Res_UseResFile(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Res_UseResFile(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; short refNum; @@ -763,9 +700,7 @@ static PyObject *Res_UseResFile(_self, _args) return _res; } -static PyObject *Res_CountTypes(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Res_CountTypes(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; short _rv; @@ -781,9 +716,7 @@ static PyObject *Res_CountTypes(_self, _args) return _res; } -static PyObject *Res_Count1Types(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Res_Count1Types(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; short _rv; @@ -799,9 +732,7 @@ static PyObject *Res_Count1Types(_self, _args) return _res; } -static PyObject *Res_GetIndType(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Res_GetIndType(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ResType theType; @@ -820,9 +751,7 @@ static PyObject *Res_GetIndType(_self, _args) return _res; } -static PyObject *Res_Get1IndType(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Res_Get1IndType(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; ResType theType; @@ -841,9 +770,7 @@ static PyObject *Res_Get1IndType(_self, _args) return _res; } -static PyObject *Res_SetResLoad(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Res_SetResLoad(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean load; @@ -860,9 +787,7 @@ static PyObject *Res_SetResLoad(_self, _args) return _res; } -static PyObject *Res_CountResources(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Res_CountResources(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; short _rv; @@ -880,9 +805,7 @@ static PyObject *Res_CountResources(_self, _args) return _res; } -static PyObject *Res_Count1Resources(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Res_Count1Resources(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; short _rv; @@ -900,9 +823,7 @@ static PyObject *Res_Count1Resources(_self, _args) return _res; } -static PyObject *Res_GetIndResource(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Res_GetIndResource(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Handle _rv; @@ -923,9 +844,7 @@ static PyObject *Res_GetIndResource(_self, _args) return _res; } -static PyObject *Res_Get1IndResource(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Res_Get1IndResource(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Handle _rv; @@ -946,9 +865,7 @@ static PyObject *Res_Get1IndResource(_self, _args) return _res; } -static PyObject *Res_GetResource(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Res_GetResource(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Handle _rv; @@ -969,9 +886,7 @@ static PyObject *Res_GetResource(_self, _args) return _res; } -static PyObject *Res_Get1Resource(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Res_Get1Resource(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Handle _rv; @@ -992,9 +907,7 @@ static PyObject *Res_Get1Resource(_self, _args) return _res; } -static PyObject *Res_GetNamedResource(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Res_GetNamedResource(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Handle _rv; @@ -1015,9 +928,7 @@ static PyObject *Res_GetNamedResource(_self, _args) return _res; } -static PyObject *Res_Get1NamedResource(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Res_Get1NamedResource(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Handle _rv; @@ -1038,9 +949,7 @@ static PyObject *Res_Get1NamedResource(_self, _args) return _res; } -static PyObject *Res_UniqueID(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Res_UniqueID(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; short _rv; @@ -1058,9 +967,7 @@ static PyObject *Res_UniqueID(_self, _args) return _res; } -static PyObject *Res_Unique1ID(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Res_Unique1ID(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; short _rv; @@ -1078,9 +985,7 @@ static PyObject *Res_Unique1ID(_self, _args) return _res; } -static PyObject *Res_UpdateResFile(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Res_UpdateResFile(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; short refNum; @@ -1097,9 +1002,7 @@ static PyObject *Res_UpdateResFile(_self, _args) return _res; } -static PyObject *Res_SetResPurge(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Res_SetResPurge(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean install; @@ -1116,9 +1019,7 @@ static PyObject *Res_SetResPurge(_self, _args) return _res; } -static PyObject *Res_GetResFileAttrs(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Res_GetResFileAttrs(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; short _rv; @@ -1136,9 +1037,7 @@ static PyObject *Res_GetResFileAttrs(_self, _args) return _res; } -static PyObject *Res_SetResFileAttrs(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Res_SetResFileAttrs(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; short refNum; @@ -1158,9 +1057,7 @@ static PyObject *Res_SetResFileAttrs(_self, _args) return _res; } -static PyObject *Res_OpenRFPerm(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Res_OpenRFPerm(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; short _rv; @@ -1184,11 +1081,9 @@ static PyObject *Res_OpenRFPerm(_self, _args) return _res; } -#if !TARGET_API_MAC_CARBON +#if TARGET_API_MAC_OS8 -static PyObject *Res_RGetResource(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Res_RGetResource(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Handle _rv; @@ -1210,9 +1105,7 @@ static PyObject *Res_RGetResource(_self, _args) } #endif -static PyObject *Res_HOpenResFile(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Res_HOpenResFile(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; short _rv; @@ -1239,9 +1132,7 @@ static PyObject *Res_HOpenResFile(_self, _args) return _res; } -static PyObject *Res_HCreateResFile(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Res_HCreateResFile(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; short vRefNum; @@ -1264,9 +1155,7 @@ static PyObject *Res_HCreateResFile(_self, _args) return _res; } -static PyObject *Res_FSpOpenResFile(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Res_FSpOpenResFile(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; short _rv; @@ -1287,9 +1176,7 @@ static PyObject *Res_FSpOpenResFile(_self, _args) return _res; } -static PyObject *Res_FSpCreateResFile(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Res_FSpCreateResFile(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; FSSpec spec; @@ -1317,9 +1204,7 @@ static PyObject *Res_FSpCreateResFile(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *Res_InsertResourceFile(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Res_InsertResourceFile(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _rv; @@ -1343,9 +1228,7 @@ static PyObject *Res_InsertResourceFile(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *Res_DetachResourceFile(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Res_DetachResourceFile(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _rv; @@ -1366,9 +1249,7 @@ static PyObject *Res_DetachResourceFile(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *Res_FSpResourceFileAlreadyOpen(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Res_FSpResourceFileAlreadyOpen(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -1395,9 +1276,7 @@ static PyObject *Res_FSpResourceFileAlreadyOpen(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *Res_FSpOpenOrphanResFile(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Res_FSpOpenOrphanResFile(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _rv; @@ -1424,9 +1303,7 @@ static PyObject *Res_FSpOpenOrphanResFile(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *Res_GetTopResourceFile(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Res_GetTopResourceFile(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _rv; @@ -1447,9 +1324,7 @@ static PyObject *Res_GetTopResourceFile(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *Res_GetNextResourceFile(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Res_GetNextResourceFile(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _rv; @@ -1471,9 +1346,7 @@ static PyObject *Res_GetNextResourceFile(_self, _args) } #endif -static PyObject *Res_Resource(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Res_Resource(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; @@ -1495,9 +1368,7 @@ static PyObject *Res_Resource(_self, _args) } -static PyObject *Res_Handle(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Res_Handle(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; @@ -1524,12 +1395,12 @@ static PyObject *Res_Handle(_self, _args) static PyMethodDef Res_methods[] = { -#if !TARGET_API_MAC_CARBON +#if TARGET_API_MAC_OS8 {"InitResources", (PyCFunction)Res_InitResources, 1, "() -> (short _rv)"}, #endif -#if !TARGET_API_MAC_CARBON +#if TARGET_API_MAC_OS8 {"RsrcZoneInit", (PyCFunction)Res_RsrcZoneInit, 1, "() -> None"}, #endif @@ -1540,12 +1411,12 @@ static PyMethodDef Res_methods[] = { {"CurResFile", (PyCFunction)Res_CurResFile, 1, "() -> (short _rv)"}, -#if !TARGET_API_MAC_CARBON +#if TARGET_API_MAC_OS8 {"CreateResFile", (PyCFunction)Res_CreateResFile, 1, "(Str255 fileName) -> None"}, #endif -#if !TARGET_API_MAC_CARBON +#if TARGET_API_MAC_OS8 {"OpenResFile", (PyCFunction)Res_OpenResFile, 1, "(Str255 fileName) -> (short _rv)"}, #endif @@ -1592,7 +1463,7 @@ static PyMethodDef Res_methods[] = { {"OpenRFPerm", (PyCFunction)Res_OpenRFPerm, 1, "(Str255 fileName, short vRefNum, SignedByte permission) -> (short _rv)"}, -#if !TARGET_API_MAC_CARBON +#if TARGET_API_MAC_OS8 {"RGetResource", (PyCFunction)Res_RGetResource, 1, "(ResType theType, short theID) -> (Handle _rv)"}, #endif @@ -1645,8 +1516,7 @@ static PyMethodDef Res_methods[] = { /* Alternative version of ResObj_New, which returns None for null argument */ -PyObject *OptResObj_New(itself) - Handle itself; +PyObject *OptResObj_New(Handle itself) { if (itself == NULL) { Py_INCREF(Py_None); @@ -1655,9 +1525,7 @@ PyObject *OptResObj_New(itself) return ResObj_New(itself); } -OptResObj_Convert(v, p_itself) - PyObject *v; - Handle *p_itself; +OptResObj_Convert(PyObject *v, Handle *p_itself) { PyObject *tmp; @@ -1682,17 +1550,17 @@ OptResObj_Convert(v, p_itself) } -void initRes() +void initRes(void) { PyObject *m; PyObject *d; - PyMac_INIT_TOOLBOX_OBJECT_NEW(ResObj_New); - PyMac_INIT_TOOLBOX_OBJECT_CONVERT(ResObj_Convert); - PyMac_INIT_TOOLBOX_OBJECT_NEW(OptResObj_New); - PyMac_INIT_TOOLBOX_OBJECT_CONVERT(OptResObj_Convert); + PyMac_INIT_TOOLBOX_OBJECT_NEW(Handle, ResObj_New); + PyMac_INIT_TOOLBOX_OBJECT_CONVERT(Handle, ResObj_Convert); + PyMac_INIT_TOOLBOX_OBJECT_NEW(Handle, OptResObj_New); + PyMac_INIT_TOOLBOX_OBJECT_CONVERT(Handle, OptResObj_Convert); m = Py_InitModule("Res", Res_methods); diff --git a/Mac/Modules/res/resscan.py b/Mac/Modules/res/resscan.py index 544e303fda2..5b68623f389 100644 --- a/Mac/Modules/res/resscan.py +++ b/Mac/Modules/res/resscan.py @@ -49,7 +49,7 @@ class ResourcesScanner(Scanner): def makegreylist(self): return [ - ('#if !TARGET_API_MAC_CARBON', [ + ('#if TARGET_API_MAC_OS8', [ 'RGetResource', 'OpenResFile', 'CreateResFile', diff --git a/Mac/Modules/res/ressupport.py b/Mac/Modules/res/ressupport.py index cdbb7788688..8be1b94cf96 100644 --- a/Mac/Modules/res/ressupport.py +++ b/Mac/Modules/res/ressupport.py @@ -23,8 +23,12 @@ RsrcChainLocation = Type("RsrcChainLocation", "h") # includestuff etc. are imported from macsupport includestuff = includestuff + """ +#ifdef WITHOUT_FRAMEWORKS #include #include +#else +#include +#endif #ifdef USE_TOOLBOX_OBJECT_GLUE extern PyObject *_ResObj_New(Handle); @@ -48,8 +52,7 @@ PyMac_AutoDisposeHandle(Handle h) finalstuff = finalstuff + """ /* Alternative version of ResObj_New, which returns None for null argument */ -PyObject *OptResObj_New(itself) - Handle itself; +PyObject *OptResObj_New(Handle itself) { if (itself == NULL) { Py_INCREF(Py_None); @@ -58,9 +61,7 @@ PyObject *OptResObj_New(itself) return ResObj_New(itself); } -OptResObj_Convert(v, p_itself) - PyObject *v; - Handle *p_itself; +OptResObj_Convert(PyObject *v, Handle *p_itself) { PyObject *tmp; @@ -86,10 +87,10 @@ OptResObj_Convert(v, p_itself) """ initstuff = initstuff + """ - PyMac_INIT_TOOLBOX_OBJECT_NEW(ResObj_New); - PyMac_INIT_TOOLBOX_OBJECT_CONVERT(ResObj_Convert); - PyMac_INIT_TOOLBOX_OBJECT_NEW(OptResObj_New); - PyMac_INIT_TOOLBOX_OBJECT_CONVERT(OptResObj_Convert); + PyMac_INIT_TOOLBOX_OBJECT_NEW(Handle, ResObj_New); + PyMac_INIT_TOOLBOX_OBJECT_CONVERT(Handle, ResObj_Convert); + PyMac_INIT_TOOLBOX_OBJECT_NEW(Handle, OptResObj_New); + PyMac_INIT_TOOLBOX_OBJECT_CONVERT(Handle, OptResObj_Convert); """ module = MacModule('Res', 'Res', includestuff, finalstuff, initstuff) @@ -115,10 +116,7 @@ if (strcmp(name, "__members__") == 0) setattrCode = """ static int -ResObj_setattr(self, name, value) - ResourceObject *self; - char *name; - PyObject *value; +ResObj_setattr(ResourceObject *self, char *name, PyObject *value) { char *data; long size; diff --git a/Mac/Modules/scrap/Scrapmodule.c b/Mac/Modules/scrap/Scrapmodule.c index 436cbede624..50402990494 100644 --- a/Mac/Modules/scrap/Scrapmodule.c +++ b/Mac/Modules/scrap/Scrapmodule.c @@ -8,7 +8,11 @@ #include "macglue.h" #include "pymactoolbox.h" +#ifdef WITHOUT_FRAMEWORKS #include +#else +#include +#endif /* ** Generate ScrapInfo records diff --git a/Mac/Modules/scrap/scrapsupport.py b/Mac/Modules/scrap/scrapsupport.py index 1fe9ac23c11..44dee333abf 100644 --- a/Mac/Modules/scrap/scrapsupport.py +++ b/Mac/Modules/scrap/scrapsupport.py @@ -22,7 +22,11 @@ from macsupport import * # Create the type objects includestuff = includestuff + """ -#include <%s>""" % MACHEADERFILE + """ +#ifdef WITHOUT_FRAMEWORKS +#include +#else +#include +#endif /* ** Generate ScrapInfo records diff --git a/Mac/Modules/snd/Sndmodule.c b/Mac/Modules/snd/Sndmodule.c index bb1f7dffa26..dea89ed3185 100644 --- a/Mac/Modules/snd/Sndmodule.c +++ b/Mac/Modules/snd/Sndmodule.c @@ -8,9 +8,13 @@ #include "macglue.h" #include "pymactoolbox.h" +#ifdef WITHOUT_FRAMEWORKS #include - #include /* for Set(Current)A5 */ +#else +#include +#endif + /* Create a SndCommand object (an (int, int, int) tuple) */ static PyObject * @@ -58,8 +62,7 @@ typedef struct SndChannelObject { SndCommand ob_cmd; } SndChannelObject; -static PyObject *SndCh_New(itself) - SndChannelPtr itself; +static PyObject *SndCh_New(SndChannelPtr itself) { SndChannelObject *it; it = PyObject_NEW(SndChannelObject, &SndChannel_Type); @@ -69,9 +72,7 @@ static PyObject *SndCh_New(itself) it->ob_A5 = SetCurrentA5(); return (PyObject *)it; } -static SndCh_Convert(v, p_itself) - PyObject *v; - SndChannelPtr *p_itself; +static SndCh_Convert(PyObject *v, SndChannelPtr *p_itself) { if (!SndCh_Check(v)) { @@ -82,17 +83,14 @@ static SndCh_Convert(v, p_itself) return 1; } -static void SndCh_dealloc(self) - SndChannelObject *self; +static void SndCh_dealloc(SndChannelObject *self) { SndDisposeChannel(self->ob_itself, 1); Py_XDECREF(self->ob_callback); PyMem_DEL(self); } -static PyObject *SndCh_SndDoCommand(_self, _args) - SndChannelObject *_self; - PyObject *_args; +static PyObject *SndCh_SndDoCommand(SndChannelObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -111,9 +109,7 @@ static PyObject *SndCh_SndDoCommand(_self, _args) return _res; } -static PyObject *SndCh_SndDoImmediate(_self, _args) - SndChannelObject *_self; - PyObject *_args; +static PyObject *SndCh_SndDoImmediate(SndChannelObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -129,9 +125,7 @@ static PyObject *SndCh_SndDoImmediate(_self, _args) return _res; } -static PyObject *SndCh_SndPlay(_self, _args) - SndChannelObject *_self; - PyObject *_args; +static PyObject *SndCh_SndPlay(SndChannelObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -152,9 +146,7 @@ static PyObject *SndCh_SndPlay(_self, _args) #if !TARGET_API_MAC_CARBON -static PyObject *SndCh_SndStartFilePlay(_self, _args) - SndChannelObject *_self; - PyObject *_args; +static PyObject *SndCh_SndStartFilePlay(SndChannelObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -185,9 +177,7 @@ static PyObject *SndCh_SndStartFilePlay(_self, _args) #if !TARGET_API_MAC_CARBON -static PyObject *SndCh_SndPauseFilePlay(_self, _args) - SndChannelObject *_self; - PyObject *_args; +static PyObject *SndCh_SndPauseFilePlay(SndChannelObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -203,9 +193,7 @@ static PyObject *SndCh_SndPauseFilePlay(_self, _args) #if !TARGET_API_MAC_CARBON -static PyObject *SndCh_SndStopFilePlay(_self, _args) - SndChannelObject *_self; - PyObject *_args; +static PyObject *SndCh_SndStopFilePlay(SndChannelObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -222,9 +210,7 @@ static PyObject *SndCh_SndStopFilePlay(_self, _args) } #endif -static PyObject *SndCh_SndChannelStatus(_self, _args) - SndChannelObject *_self; - PyObject *_args; +static PyObject *SndCh_SndChannelStatus(SndChannelObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -243,9 +229,7 @@ static PyObject *SndCh_SndChannelStatus(_self, _args) return _res; } -static PyObject *SndCh_SndGetInfo(_self, _args) - SndChannelObject *_self; - PyObject *_args; +static PyObject *SndCh_SndGetInfo(SndChannelObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -264,9 +248,7 @@ static PyObject *SndCh_SndGetInfo(_self, _args) return _res; } -static PyObject *SndCh_SndSetInfo(_self, _args) - SndChannelObject *_self; - PyObject *_args; +static PyObject *SndCh_SndSetInfo(SndChannelObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -318,9 +300,7 @@ static PyMethodDef SndCh_methods[] = { static PyMethodChain SndCh_chain = { SndCh_methods, NULL }; -static PyObject *SndCh_getattr(self, name) - SndChannelObject *self; - char *name; +static PyObject *SndCh_getattr(SndChannelObject *self, char *name) { return Py_FindMethodInChain(&SndCh_chain, (PyObject *)self, name); } @@ -384,9 +364,7 @@ static PyObject *SPBObj_New() it->ob_spb.userLong = (long)it; return (PyObject *)it; } -static SPBObj_Convert(v, p_itself) - PyObject *v; - SPBPtr *p_itself; +static SPBObj_Convert(PyObject *v, SPBPtr *p_itself) { if (!SPBObj_Check(v)) { @@ -397,8 +375,7 @@ static SPBObj_Convert(v, p_itself) return 1; } -static void SPBObj_dealloc(self) - SPBObject *self; +static void SPBObj_dealloc(SPBObject *self) { /* Cleanup of self->ob_itself goes here */ self->ob_spb.userLong = 0; @@ -414,9 +391,7 @@ static PyMethodDef SPBObj_methods[] = { static PyMethodChain SPBObj_chain = { SPBObj_methods, NULL }; -static PyObject *SPBObj_getattr(self, name) - SPBObject *self; - char *name; +static PyObject *SPBObj_getattr(SPBObject *self, char *name) { if (strcmp(name, "inRefNum") == 0) @@ -430,10 +405,7 @@ static PyObject *SPBObj_getattr(self, name) return Py_FindMethodInChain(&SPBObj_chain, (PyObject *)self, name); } -static int SPBObj_setattr(self, name, value) - SPBObject *self; - char *name; - PyObject *value; +static int SPBObj_setattr(SPBObject *self, char *name, PyObject *value) { int rv = 0; @@ -447,13 +419,13 @@ static int SPBObj_setattr(self, name, value) else if (strcmp(name, "buffer") == 0) rv = PyArg_Parse(value, "w#", &self->ob_spb.bufferPtr, &self->ob_spb.bufferLength); else if (strcmp(name, "completionRoutine") == 0) { - self->ob_spb.completionRoutine = NewSICompletionProc(SPB_completion); + self->ob_spb.completionRoutine = NewSICompletionUPP(SPB_completion); self->ob_completion = value; Py_INCREF(value); rv = 1; #if !TARGET_API_MAC_CARBON } else if (strcmp(name, "interruptRoutine") == 0) { - self->ob_spb.completionRoutine = NewSIInterruptProc(SPB_interrupt); + self->ob_spb.completionRoutine = NewSIInterruptUPP(SPB_interrupt); self->ob_interrupt = value; Py_INCREF(value); rv = 1; @@ -491,17 +463,13 @@ staticforward PyTypeObject SPB_Type = { /* ---------------------- End object type SPB ----------------------- */ -static PyObject *Snd_SPB(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Snd_SPB(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; return SPBObj_New(); } -static PyObject *Snd_SysBeep(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Snd_SysBeep(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; short duration; @@ -514,9 +482,7 @@ static PyObject *Snd_SysBeep(_self, _args) return _res; } -static PyObject *Snd_SndNewChannel(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Snd_SndNewChannel(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -537,7 +503,7 @@ static PyObject *Snd_SndNewChannel(_self, _args) _err = SndNewChannel(&chan, synth, init, - NewSndCallBackProc(SndCh_UserRoutine)); + NewSndCallBackUPP(SndCh_UserRoutine)); if (_err != noErr) return PyMac_Error(_err); _res = Py_BuildValue("O&", SndCh_New, chan); @@ -554,9 +520,7 @@ static PyObject *Snd_SndNewChannel(_self, _args) #if !TARGET_API_MAC_CARBON -static PyObject *Snd_SndControl(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Snd_SndControl(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -574,9 +538,7 @@ static PyObject *Snd_SndControl(_self, _args) } #endif -static PyObject *Snd_SndSoundManagerVersion(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Snd_SndSoundManagerVersion(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; NumVersion _rv; @@ -588,9 +550,7 @@ static PyObject *Snd_SndSoundManagerVersion(_self, _args) return _res; } -static PyObject *Snd_SndManagerStatus(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Snd_SndManagerStatus(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -608,9 +568,7 @@ static PyObject *Snd_SndManagerStatus(_self, _args) return _res; } -static PyObject *Snd_SndGetSysBeepState(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Snd_SndGetSysBeepState(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; short sysBeepState; @@ -622,9 +580,7 @@ static PyObject *Snd_SndGetSysBeepState(_self, _args) return _res; } -static PyObject *Snd_SndSetSysBeepState(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Snd_SndSetSysBeepState(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -641,9 +597,7 @@ static PyObject *Snd_SndSetSysBeepState(_self, _args) #if !TARGET_API_MAC_CARBON -static PyObject *Snd_MACEVersion(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Snd_MACEVersion(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; NumVersion _rv; @@ -658,9 +612,7 @@ static PyObject *Snd_MACEVersion(_self, _args) #if !TARGET_API_MAC_CARBON -static PyObject *Snd_Comp3to1(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Snd_Comp3to1(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; char *buffer__in__; @@ -705,9 +657,7 @@ static PyObject *Snd_Comp3to1(_self, _args) #if !TARGET_API_MAC_CARBON -static PyObject *Snd_Exp1to3(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Snd_Exp1to3(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; char *buffer__in__; @@ -752,9 +702,7 @@ static PyObject *Snd_Exp1to3(_self, _args) #if !TARGET_API_MAC_CARBON -static PyObject *Snd_Comp6to1(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Snd_Comp6to1(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; char *buffer__in__; @@ -799,9 +747,7 @@ static PyObject *Snd_Comp6to1(_self, _args) #if !TARGET_API_MAC_CARBON -static PyObject *Snd_Exp1to6(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Snd_Exp1to6(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; char *buffer__in__; @@ -844,9 +790,7 @@ static PyObject *Snd_Exp1to6(_self, _args) } #endif -static PyObject *Snd_GetSysBeepVolume(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Snd_GetSysBeepVolume(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -860,9 +804,7 @@ static PyObject *Snd_GetSysBeepVolume(_self, _args) return _res; } -static PyObject *Snd_SetSysBeepVolume(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Snd_SetSysBeepVolume(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -877,9 +819,7 @@ static PyObject *Snd_SetSysBeepVolume(_self, _args) return _res; } -static PyObject *Snd_GetDefaultOutputVolume(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Snd_GetDefaultOutputVolume(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -893,9 +833,7 @@ static PyObject *Snd_GetDefaultOutputVolume(_self, _args) return _res; } -static PyObject *Snd_SetDefaultOutputVolume(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Snd_SetDefaultOutputVolume(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -910,9 +848,7 @@ static PyObject *Snd_SetDefaultOutputVolume(_self, _args) return _res; } -static PyObject *Snd_GetSoundHeaderOffset(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Snd_GetSoundHeaderOffset(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -929,9 +865,7 @@ static PyObject *Snd_GetSoundHeaderOffset(_self, _args) return _res; } -static PyObject *Snd_GetCompressionInfo(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Snd_GetCompressionInfo(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -958,9 +892,7 @@ static PyObject *Snd_GetCompressionInfo(_self, _args) return _res; } -static PyObject *Snd_SetSoundPreference(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Snd_SetSoundPreference(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -980,9 +912,7 @@ static PyObject *Snd_SetSoundPreference(_self, _args) return _res; } -static PyObject *Snd_GetSoundPreference(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Snd_GetSoundPreference(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1002,9 +932,7 @@ static PyObject *Snd_GetSoundPreference(_self, _args) return _res; } -static PyObject *Snd_GetCompressionName(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Snd_GetCompressionName(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1021,9 +949,7 @@ static PyObject *Snd_GetCompressionName(_self, _args) return _res; } -static PyObject *Snd_SPBVersion(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Snd_SPBVersion(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; NumVersion _rv; @@ -1035,9 +961,7 @@ static PyObject *Snd_SPBVersion(_self, _args) return _res; } -static PyObject *Snd_SPBSignInDevice(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Snd_SPBSignInDevice(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1055,9 +979,7 @@ static PyObject *Snd_SPBSignInDevice(_self, _args) return _res; } -static PyObject *Snd_SPBSignOutDevice(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Snd_SPBSignOutDevice(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1072,9 +994,7 @@ static PyObject *Snd_SPBSignOutDevice(_self, _args) return _res; } -static PyObject *Snd_SPBGetIndexedDevice(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Snd_SPBGetIndexedDevice(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1094,9 +1014,7 @@ static PyObject *Snd_SPBGetIndexedDevice(_self, _args) return _res; } -static PyObject *Snd_SPBOpenDevice(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Snd_SPBOpenDevice(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1116,9 +1034,7 @@ static PyObject *Snd_SPBOpenDevice(_self, _args) return _res; } -static PyObject *Snd_SPBCloseDevice(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Snd_SPBCloseDevice(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1133,9 +1049,7 @@ static PyObject *Snd_SPBCloseDevice(_self, _args) return _res; } -static PyObject *Snd_SPBRecord(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Snd_SPBRecord(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1155,9 +1069,7 @@ static PyObject *Snd_SPBRecord(_self, _args) #if !TARGET_API_MAC_CARBON -static PyObject *Snd_SPBRecordToFile(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Snd_SPBRecordToFile(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1179,9 +1091,7 @@ static PyObject *Snd_SPBRecordToFile(_self, _args) } #endif -static PyObject *Snd_SPBPauseRecording(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Snd_SPBPauseRecording(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1196,9 +1106,7 @@ static PyObject *Snd_SPBPauseRecording(_self, _args) return _res; } -static PyObject *Snd_SPBResumeRecording(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Snd_SPBResumeRecording(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1213,9 +1121,7 @@ static PyObject *Snd_SPBResumeRecording(_self, _args) return _res; } -static PyObject *Snd_SPBStopRecording(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Snd_SPBStopRecording(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1230,9 +1136,7 @@ static PyObject *Snd_SPBStopRecording(_self, _args) return _res; } -static PyObject *Snd_SPBGetRecordingStatus(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Snd_SPBGetRecordingStatus(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1264,9 +1168,7 @@ static PyObject *Snd_SPBGetRecordingStatus(_self, _args) return _res; } -static PyObject *Snd_SPBGetDeviceInfo(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Snd_SPBGetDeviceInfo(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1287,9 +1189,7 @@ static PyObject *Snd_SPBGetDeviceInfo(_self, _args) return _res; } -static PyObject *Snd_SPBSetDeviceInfo(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Snd_SPBSetDeviceInfo(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1310,9 +1210,7 @@ static PyObject *Snd_SPBSetDeviceInfo(_self, _args) return _res; } -static PyObject *Snd_SPBMillisecondsToBytes(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Snd_SPBMillisecondsToBytes(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1329,9 +1227,7 @@ static PyObject *Snd_SPBMillisecondsToBytes(_self, _args) return _res; } -static PyObject *Snd_SPBBytesToMilliseconds(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Snd_SPBBytesToMilliseconds(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1453,8 +1349,7 @@ static PyMethodDef Snd_methods[] = { /* Routine passed to Py_AddPendingCall -- call the Python callback */ static int -SndCh_CallCallBack(arg) - void *arg; +SndCh_CallCallBack(void *arg) { SndChannelObject *p = (SndChannelObject *)arg; PyObject *args; @@ -1484,8 +1379,7 @@ SndCh_UserRoutine(SndChannelPtr chan, SndCommand *cmd) /* SPB callbacks - Schedule callbacks to Python */ static int -SPB_CallCallBack(arg) - void *arg; +SPB_CallCallBack(void *arg) { SPBObject *p = (SPBObject *)arg; PyObject *args; @@ -1531,7 +1425,7 @@ SPB_interrupt(SPBPtr my_spb) #endif -void initSnd() +void initSnd(void) { PyObject *m; PyObject *d; diff --git a/Mac/Modules/snd/sndsupport.py b/Mac/Modules/snd/sndsupport.py index 89b3657c29f..d0b8c8bde00 100644 --- a/Mac/Modules/snd/sndsupport.py +++ b/Mac/Modules/snd/sndsupport.py @@ -17,7 +17,12 @@ class SndMethod(SndMixIn, OSErrMethodGenerator): pass # includestuff etc. are imported from macsupport includestuff = includestuff + """ +#ifdef WITHOUT_FRAMEWORKS #include +#include /* for Set(Current)A5 */ +#else +#include +#endif """ initstuff = initstuff + """ @@ -57,7 +62,7 @@ class SndCallBackType(InputOnlyType): Output("goto %s__error__;", name) OutRbrace() def passInput(self, name): - return "NewSndCallBackProc(SndCh_UserRoutine)" + return "NewSndCallBackUPP(SndCh_UserRoutine)" def cleanup(self, name): # XXX This knows it is executing inside the SndNewChannel wrapper Output("if (_res != NULL && %s != Py_None)", name) @@ -90,7 +95,6 @@ SMStatus = StructOutputBufferType('SMStatus') CompressionInfo = StructOutputBufferType('CompressionInfo') includestuff = includestuff + """ -#include /* for Set(Current)A5 */ /* Create a SndCommand object (an (int, int, int) tuple) */ static PyObject * @@ -126,8 +130,7 @@ static pascal void SPB_interrupt(SPBPtr my_spb); /* Forward */ finalstuff = finalstuff + """ /* Routine passed to Py_AddPendingCall -- call the Python callback */ static int -SndCh_CallCallBack(arg) - void *arg; +SndCh_CallCallBack(void *arg) { SndChannelObject *p = (SndChannelObject *)arg; PyObject *args; @@ -157,8 +160,7 @@ SndCh_UserRoutine(SndChannelPtr chan, SndCommand *cmd) /* SPB callbacks - Schedule callbacks to Python */ static int -SPB_CallCallBack(arg) - void *arg; +SPB_CallCallBack(void *arg) { SPBObject *p = (SPBObject *)arg; PyObject *args; @@ -268,11 +270,7 @@ class SpbObjectDefinition(ObjectDefinition): Output("Py_XDECREF(self->ob_interrupt);") def outputConvert(self): - Output("%s%s_Convert(v, p_itself)", self.static, self.prefix) - IndentLevel() - Output("PyObject *v;") - Output("%s *p_itself;", self.itselftype) - DedentLevel() + Output("%s%s_Convert(PyObject *v, %s *p_itself)", self.static, self.prefix, self.itselftype) OutLbrace() self.outputCheckConvertArg() Output("if (!%s_Check(v))", self.prefix) @@ -286,12 +284,8 @@ class SpbObjectDefinition(ObjectDefinition): def outputSetattr(self): Output() - Output("static int %s_setattr(self, name, value)", self.prefix) - IndentLevel() - Output("%s *self;", self.objecttype) - Output("char *name;") - Output("PyObject *value;") - DedentLevel() + Output("static int %s_setattr(%s *self, char *name, PyObject *value)", + self.prefix, self.objecttype) OutLbrace() self.outputSetattrBody() OutRbrace() @@ -309,13 +303,13 @@ class SpbObjectDefinition(ObjectDefinition): else if (strcmp(name, "buffer") == 0) rv = PyArg_Parse(value, "w#", &self->ob_spb.bufferPtr, &self->ob_spb.bufferLength); else if (strcmp(name, "completionRoutine") == 0) { - self->ob_spb.completionRoutine = NewSICompletionProc(SPB_completion); + self->ob_spb.completionRoutine = NewSICompletionUPP(SPB_completion); self->ob_completion = value; Py_INCREF(value); rv = 1; #if !TARGET_API_MAC_CARBON } else if (strcmp(name, "interruptRoutine") == 0) { - self->ob_spb.completionRoutine = NewSIInterruptProc(SPB_interrupt); + self->ob_spb.completionRoutine = NewSIInterruptUPP(SPB_interrupt); self->ob_interrupt = value; Py_INCREF(value); rv = 1; diff --git a/Mac/Modules/te/TEmodule.c b/Mac/Modules/te/TEmodule.c index 05b9b0c413c..d37908bf03b 100644 --- a/Mac/Modules/te/TEmodule.c +++ b/Mac/Modules/te/TEmodule.c @@ -8,7 +8,11 @@ #include "macglue.h" #include "pymactoolbox.h" +#ifdef WITHOUT_FRAMEWORKS #include +#else +#include +#endif #ifdef USE_TOOLBOX_OBJECT_GLUE extern PyObject *_TEObj_New(TEHandle); @@ -25,8 +29,7 @@ extern int _TEObj_Convert(PyObject *, TEHandle *); ** Parse/generate TextStyle records */ static PyObject * -TextStyle_New(itself) - TextStylePtr itself; +TextStyle_New(TextStylePtr itself) { return Py_BuildValue("lllO&", (long)itself->tsFont, (long)itself->tsFace, (long)itself->tsSize, QdRGB_New, @@ -34,9 +37,7 @@ TextStyle_New(itself) } static int -TextStyle_Convert(v, p_itself) - PyObject *v; - TextStylePtr p_itself; +TextStyle_Convert(PyObject *v, TextStylePtr p_itself) { long font, face, size; @@ -61,8 +62,7 @@ typedef struct TEObject { TEHandle ob_itself; } TEObject; -PyObject *TEObj_New(itself) - TEHandle itself; +PyObject *TEObj_New(TEHandle itself) { TEObject *it; if (itself == NULL) { @@ -74,9 +74,7 @@ PyObject *TEObj_New(itself) it->ob_itself = itself; return (PyObject *)it; } -TEObj_Convert(v, p_itself) - PyObject *v; - TEHandle *p_itself; +TEObj_Convert(PyObject *v, TEHandle *p_itself) { if (!TEObj_Check(v)) { @@ -87,16 +85,13 @@ TEObj_Convert(v, p_itself) return 1; } -static void TEObj_dealloc(self) - TEObject *self; +static void TEObj_dealloc(TEObject *self) { TEDispose(self->ob_itself); PyMem_DEL(self); } -static PyObject *TEObj_TESetText(_self, _args) - TEObject *_self; - PyObject *_args; +static PyObject *TEObj_TESetText(TEObject *_self, PyObject *_args) { PyObject *_res = NULL; char *text__in__; @@ -114,9 +109,7 @@ static PyObject *TEObj_TESetText(_self, _args) return _res; } -static PyObject *TEObj_TEGetText(_self, _args) - TEObject *_self; - PyObject *_args; +static PyObject *TEObj_TEGetText(TEObject *_self, PyObject *_args) { PyObject *_res = NULL; CharsHandle _rv; @@ -128,9 +121,7 @@ static PyObject *TEObj_TEGetText(_self, _args) return _res; } -static PyObject *TEObj_TEIdle(_self, _args) - TEObject *_self; - PyObject *_args; +static PyObject *TEObj_TEIdle(TEObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -141,9 +132,7 @@ static PyObject *TEObj_TEIdle(_self, _args) return _res; } -static PyObject *TEObj_TESetSelect(_self, _args) - TEObject *_self; - PyObject *_args; +static PyObject *TEObj_TESetSelect(TEObject *_self, PyObject *_args) { PyObject *_res = NULL; long selStart; @@ -160,9 +149,7 @@ static PyObject *TEObj_TESetSelect(_self, _args) return _res; } -static PyObject *TEObj_TEActivate(_self, _args) - TEObject *_self; - PyObject *_args; +static PyObject *TEObj_TEActivate(TEObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -173,9 +160,7 @@ static PyObject *TEObj_TEActivate(_self, _args) return _res; } -static PyObject *TEObj_TEDeactivate(_self, _args) - TEObject *_self; - PyObject *_args; +static PyObject *TEObj_TEDeactivate(TEObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -186,9 +171,7 @@ static PyObject *TEObj_TEDeactivate(_self, _args) return _res; } -static PyObject *TEObj_TEKey(_self, _args) - TEObject *_self; - PyObject *_args; +static PyObject *TEObj_TEKey(TEObject *_self, PyObject *_args) { PyObject *_res = NULL; CharParameter key; @@ -202,9 +185,7 @@ static PyObject *TEObj_TEKey(_self, _args) return _res; } -static PyObject *TEObj_TECut(_self, _args) - TEObject *_self; - PyObject *_args; +static PyObject *TEObj_TECut(TEObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -215,9 +196,7 @@ static PyObject *TEObj_TECut(_self, _args) return _res; } -static PyObject *TEObj_TECopy(_self, _args) - TEObject *_self; - PyObject *_args; +static PyObject *TEObj_TECopy(TEObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -228,9 +207,7 @@ static PyObject *TEObj_TECopy(_self, _args) return _res; } -static PyObject *TEObj_TEPaste(_self, _args) - TEObject *_self; - PyObject *_args; +static PyObject *TEObj_TEPaste(TEObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -241,9 +218,7 @@ static PyObject *TEObj_TEPaste(_self, _args) return _res; } -static PyObject *TEObj_TEDelete(_self, _args) - TEObject *_self; - PyObject *_args; +static PyObject *TEObj_TEDelete(TEObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -254,9 +229,7 @@ static PyObject *TEObj_TEDelete(_self, _args) return _res; } -static PyObject *TEObj_TEInsert(_self, _args) - TEObject *_self; - PyObject *_args; +static PyObject *TEObj_TEInsert(TEObject *_self, PyObject *_args) { PyObject *_res = NULL; char *text__in__; @@ -274,9 +247,7 @@ static PyObject *TEObj_TEInsert(_self, _args) return _res; } -static PyObject *TEObj_TESetAlignment(_self, _args) - TEObject *_self; - PyObject *_args; +static PyObject *TEObj_TESetAlignment(TEObject *_self, PyObject *_args) { PyObject *_res = NULL; short just; @@ -290,9 +261,7 @@ static PyObject *TEObj_TESetAlignment(_self, _args) return _res; } -static PyObject *TEObj_TEUpdate(_self, _args) - TEObject *_self; - PyObject *_args; +static PyObject *TEObj_TEUpdate(TEObject *_self, PyObject *_args) { PyObject *_res = NULL; Rect rUpdate; @@ -306,9 +275,7 @@ static PyObject *TEObj_TEUpdate(_self, _args) return _res; } -static PyObject *TEObj_TEScroll(_self, _args) - TEObject *_self; - PyObject *_args; +static PyObject *TEObj_TEScroll(TEObject *_self, PyObject *_args) { PyObject *_res = NULL; short dh; @@ -325,9 +292,7 @@ static PyObject *TEObj_TEScroll(_self, _args) return _res; } -static PyObject *TEObj_TESelView(_self, _args) - TEObject *_self; - PyObject *_args; +static PyObject *TEObj_TESelView(TEObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -338,9 +303,7 @@ static PyObject *TEObj_TESelView(_self, _args) return _res; } -static PyObject *TEObj_TEPinScroll(_self, _args) - TEObject *_self; - PyObject *_args; +static PyObject *TEObj_TEPinScroll(TEObject *_self, PyObject *_args) { PyObject *_res = NULL; short dh; @@ -357,9 +320,7 @@ static PyObject *TEObj_TEPinScroll(_self, _args) return _res; } -static PyObject *TEObj_TEAutoView(_self, _args) - TEObject *_self; - PyObject *_args; +static PyObject *TEObj_TEAutoView(TEObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean fAuto; @@ -373,9 +334,7 @@ static PyObject *TEObj_TEAutoView(_self, _args) return _res; } -static PyObject *TEObj_TECalText(_self, _args) - TEObject *_self; - PyObject *_args; +static PyObject *TEObj_TECalText(TEObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -386,9 +345,7 @@ static PyObject *TEObj_TECalText(_self, _args) return _res; } -static PyObject *TEObj_TEGetOffset(_self, _args) - TEObject *_self; - PyObject *_args; +static PyObject *TEObj_TEGetOffset(TEObject *_self, PyObject *_args) { PyObject *_res = NULL; short _rv; @@ -403,9 +360,7 @@ static PyObject *TEObj_TEGetOffset(_self, _args) return _res; } -static PyObject *TEObj_TEGetPoint(_self, _args) - TEObject *_self; - PyObject *_args; +static PyObject *TEObj_TEGetPoint(TEObject *_self, PyObject *_args) { PyObject *_res = NULL; Point _rv; @@ -420,9 +375,7 @@ static PyObject *TEObj_TEGetPoint(_self, _args) return _res; } -static PyObject *TEObj_TEClick(_self, _args) - TEObject *_self; - PyObject *_args; +static PyObject *TEObj_TEClick(TEObject *_self, PyObject *_args) { PyObject *_res = NULL; Point pt; @@ -439,9 +392,7 @@ static PyObject *TEObj_TEClick(_self, _args) return _res; } -static PyObject *TEObj_TESetStyleHandle(_self, _args) - TEObject *_self; - PyObject *_args; +static PyObject *TEObj_TESetStyleHandle(TEObject *_self, PyObject *_args) { PyObject *_res = NULL; TEStyleHandle theHandle; @@ -455,9 +406,7 @@ static PyObject *TEObj_TESetStyleHandle(_self, _args) return _res; } -static PyObject *TEObj_TEGetStyleHandle(_self, _args) - TEObject *_self; - PyObject *_args; +static PyObject *TEObj_TEGetStyleHandle(TEObject *_self, PyObject *_args) { PyObject *_res = NULL; TEStyleHandle _rv; @@ -469,9 +418,7 @@ static PyObject *TEObj_TEGetStyleHandle(_self, _args) return _res; } -static PyObject *TEObj_TEGetStyle(_self, _args) - TEObject *_self; - PyObject *_args; +static PyObject *TEObj_TEGetStyle(TEObject *_self, PyObject *_args) { PyObject *_res = NULL; short offset; @@ -493,9 +440,7 @@ static PyObject *TEObj_TEGetStyle(_self, _args) return _res; } -static PyObject *TEObj_TEStylePaste(_self, _args) - TEObject *_self; - PyObject *_args; +static PyObject *TEObj_TEStylePaste(TEObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -506,9 +451,7 @@ static PyObject *TEObj_TEStylePaste(_self, _args) return _res; } -static PyObject *TEObj_TESetStyle(_self, _args) - TEObject *_self; - PyObject *_args; +static PyObject *TEObj_TESetStyle(TEObject *_self, PyObject *_args) { PyObject *_res = NULL; short mode; @@ -528,9 +471,7 @@ static PyObject *TEObj_TESetStyle(_self, _args) return _res; } -static PyObject *TEObj_TEReplaceStyle(_self, _args) - TEObject *_self; - PyObject *_args; +static PyObject *TEObj_TEReplaceStyle(TEObject *_self, PyObject *_args) { PyObject *_res = NULL; short mode; @@ -553,9 +494,7 @@ static PyObject *TEObj_TEReplaceStyle(_self, _args) return _res; } -static PyObject *TEObj_TEGetStyleScrapHandle(_self, _args) - TEObject *_self; - PyObject *_args; +static PyObject *TEObj_TEGetStyleScrapHandle(TEObject *_self, PyObject *_args) { PyObject *_res = NULL; StScrpHandle _rv; @@ -567,9 +506,7 @@ static PyObject *TEObj_TEGetStyleScrapHandle(_self, _args) return _res; } -static PyObject *TEObj_TEStyleInsert(_self, _args) - TEObject *_self; - PyObject *_args; +static PyObject *TEObj_TEStyleInsert(TEObject *_self, PyObject *_args) { PyObject *_res = NULL; char *text__in__; @@ -590,9 +527,7 @@ static PyObject *TEObj_TEStyleInsert(_self, _args) return _res; } -static PyObject *TEObj_TEGetHeight(_self, _args) - TEObject *_self; - PyObject *_args; +static PyObject *TEObj_TEGetHeight(TEObject *_self, PyObject *_args) { PyObject *_res = NULL; long _rv; @@ -610,9 +545,7 @@ static PyObject *TEObj_TEGetHeight(_self, _args) return _res; } -static PyObject *TEObj_TEContinuousStyle(_self, _args) - TEObject *_self; - PyObject *_args; +static PyObject *TEObj_TEContinuousStyle(TEObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -632,9 +565,7 @@ static PyObject *TEObj_TEContinuousStyle(_self, _args) return _res; } -static PyObject *TEObj_TEUseStyleScrap(_self, _args) - TEObject *_self; - PyObject *_args; +static PyObject *TEObj_TEUseStyleScrap(TEObject *_self, PyObject *_args) { PyObject *_res = NULL; long rangeStart; @@ -657,9 +588,7 @@ static PyObject *TEObj_TEUseStyleScrap(_self, _args) return _res; } -static PyObject *TEObj_TENumStyles(_self, _args) - TEObject *_self; - PyObject *_args; +static PyObject *TEObj_TENumStyles(TEObject *_self, PyObject *_args) { PyObject *_res = NULL; long _rv; @@ -677,9 +606,7 @@ static PyObject *TEObj_TENumStyles(_self, _args) return _res; } -static PyObject *TEObj_TEFeatureFlag(_self, _args) - TEObject *_self; - PyObject *_args; +static PyObject *TEObj_TEFeatureFlag(TEObject *_self, PyObject *_args) { PyObject *_res = NULL; short _rv; @@ -697,9 +624,7 @@ static PyObject *TEObj_TEFeatureFlag(_self, _args) return _res; } -static PyObject *TEObj_TEGetHiliteRgn(_self, _args) - TEObject *_self; - PyObject *_args; +static PyObject *TEObj_TEGetHiliteRgn(TEObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -715,9 +640,7 @@ static PyObject *TEObj_TEGetHiliteRgn(_self, _args) return _res; } -static PyObject *TEObj_as_Resource(_self, _args) - TEObject *_self; - PyObject *_args; +static PyObject *TEObj_as_Resource(TEObject *_self, PyObject *_args) { PyObject *_res = NULL; Handle _rv; @@ -809,9 +732,7 @@ static PyMethodDef TEObj_methods[] = { PyMethodChain TEObj_chain = { TEObj_methods, NULL }; -static PyObject *TEObj_getattr(self, name) - TEObject *self; - char *name; +static PyObject *TEObj_getattr(TEObject *self, char *name) { if( strcmp(name, "destRect") == 0 ) @@ -884,9 +805,7 @@ PyTypeObject TE_Type = { /* ----------------------- End object type TE ----------------------- */ -static PyObject *TE_TEScrapHandle(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *TE_TEScrapHandle(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Handle _rv; @@ -898,9 +817,7 @@ static PyObject *TE_TEScrapHandle(_self, _args) return _res; } -static PyObject *TE_TEGetScrapLength(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *TE_TEGetScrapLength(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; long _rv; @@ -912,9 +829,7 @@ static PyObject *TE_TEGetScrapLength(_self, _args) return _res; } -static PyObject *TE_TENew(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *TE_TENew(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; TEHandle _rv; @@ -931,9 +846,7 @@ static PyObject *TE_TENew(_self, _args) return _res; } -static PyObject *TE_TETextBox(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *TE_TETextBox(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; char *text__in__; @@ -956,9 +869,7 @@ static PyObject *TE_TETextBox(_self, _args) return _res; } -static PyObject *TE_TEStyleNew(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *TE_TEStyleNew(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; TEHandle _rv; @@ -975,9 +886,7 @@ static PyObject *TE_TEStyleNew(_self, _args) return _res; } -static PyObject *TE_TESetScrapLength(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *TE_TESetScrapLength(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; long length; @@ -990,9 +899,7 @@ static PyObject *TE_TESetScrapLength(_self, _args) return _res; } -static PyObject *TE_TEFromScrap(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *TE_TEFromScrap(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1005,9 +912,7 @@ static PyObject *TE_TEFromScrap(_self, _args) return _res; } -static PyObject *TE_TEToScrap(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *TE_TEToScrap(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1022,9 +927,7 @@ static PyObject *TE_TEToScrap(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *TE_TEGetScrapHandle(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *TE_TEGetScrapHandle(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Handle _rv; @@ -1039,9 +942,7 @@ static PyObject *TE_TEGetScrapHandle(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *TE_TESetScrapHandle(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *TE_TESetScrapHandle(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Handle value; @@ -1055,9 +956,7 @@ static PyObject *TE_TESetScrapHandle(_self, _args) } #endif -static PyObject *TE_as_TE(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *TE_as_TE(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; TEHandle _rv; @@ -1106,15 +1005,15 @@ static PyMethodDef TE_methods[] = { -void initTE() +void initTE(void) { PyObject *m; PyObject *d; - PyMac_INIT_TOOLBOX_OBJECT_NEW(TEObj_New); - PyMac_INIT_TOOLBOX_OBJECT_CONVERT(TEObj_Convert); + PyMac_INIT_TOOLBOX_OBJECT_NEW(TEHandle, TEObj_New); + PyMac_INIT_TOOLBOX_OBJECT_CONVERT(TEHandle, TEObj_Convert); m = Py_InitModule("TE", TE_methods); diff --git a/Mac/Modules/te/tesupport.py b/Mac/Modules/te/tesupport.py index 5512be002fc..6cb96e2f0a3 100644 --- a/Mac/Modules/te/tesupport.py +++ b/Mac/Modules/te/tesupport.py @@ -32,7 +32,11 @@ TextStyle = OpaqueType("TextStyle", "TextStyle") TextStyle_ptr = TextStyle includestuff = includestuff + """ -#include <%s>""" % MACHEADERFILE + """ +#ifdef WITHOUT_FRAMEWORKS +#include +#else +#include +#endif #ifdef USE_TOOLBOX_OBJECT_GLUE extern PyObject *_TEObj_New(TEHandle); @@ -49,8 +53,7 @@ extern int _TEObj_Convert(PyObject *, TEHandle *); ** Parse/generate TextStyle records */ static PyObject * -TextStyle_New(itself) - TextStylePtr itself; +TextStyle_New(TextStylePtr itself) { return Py_BuildValue("lllO&", (long)itself->tsFont, (long)itself->tsFace, (long)itself->tsSize, QdRGB_New, @@ -58,9 +61,7 @@ TextStyle_New(itself) } static int -TextStyle_Convert(v, p_itself) - PyObject *v; - TextStylePtr p_itself; +TextStyle_Convert(PyObject *v, TextStylePtr p_itself) { long font, face, size; @@ -74,8 +75,8 @@ TextStyle_Convert(v, p_itself) """ initstuff = initstuff + """ - PyMac_INIT_TOOLBOX_OBJECT_NEW(TEObj_New); - PyMac_INIT_TOOLBOX_OBJECT_CONVERT(TEObj_Convert); + PyMac_INIT_TOOLBOX_OBJECT_NEW(TEHandle, TEObj_New); + PyMac_INIT_TOOLBOX_OBJECT_CONVERT(TEHandle, TEObj_Convert); """ class TEMethodGenerator(OSErrMethodGenerator): diff --git a/Mac/Modules/waste/wastemodule.c b/Mac/Modules/waste/wastemodule.c index 6f8c53dcd35..0b2526aae74 100644 --- a/Mac/Modules/waste/wastemodule.c +++ b/Mac/Modules/waste/wastemodule.c @@ -154,7 +154,7 @@ my_dispose_handler(WEObjectReference objref) } static pascal OSErr -my_draw_handler(const Rect *destRect, WEObjectReference objref) +my_draw_handler(Rect *destRect, WEObjectReference objref) { PyObject *args=NULL, *rv=NULL; OSErr err; @@ -201,8 +201,7 @@ typedef struct WEOObject { WEObjectReference ob_itself; } WEOObject; -PyObject *WEOObj_New(itself) - WEObjectReference itself; +PyObject *WEOObj_New(WEObjectReference itself) { WEOObject *it; if (itself == NULL) { @@ -214,9 +213,7 @@ PyObject *WEOObj_New(itself) it->ob_itself = itself; return (PyObject *)it; } -WEOObj_Convert(v, p_itself) - PyObject *v; - WEObjectReference *p_itself; +WEOObj_Convert(PyObject *v, WEObjectReference *p_itself) { if (!WEOObj_Check(v)) { @@ -227,16 +224,13 @@ WEOObj_Convert(v, p_itself) return 1; } -static void WEOObj_dealloc(self) - WEOObject *self; +static void WEOObj_dealloc(WEOObject *self) { /* Cleanup of self->ob_itself goes here */ PyMem_DEL(self); } -static PyObject *WEOObj_WEGetObjectType(_self, _args) - WEOObject *_self; - PyObject *_args; +static PyObject *WEOObj_WEGetObjectType(WEOObject *_self, PyObject *_args) { PyObject *_res = NULL; FlavorType _rv; @@ -248,9 +242,7 @@ static PyObject *WEOObj_WEGetObjectType(_self, _args) return _res; } -static PyObject *WEOObj_WEGetObjectDataHandle(_self, _args) - WEOObject *_self; - PyObject *_args; +static PyObject *WEOObj_WEGetObjectDataHandle(WEOObject *_self, PyObject *_args) { PyObject *_res = NULL; Handle _rv; @@ -262,9 +254,7 @@ static PyObject *WEOObj_WEGetObjectDataHandle(_self, _args) return _res; } -static PyObject *WEOObj_WEGetObjectSize(_self, _args) - WEOObject *_self; - PyObject *_args; +static PyObject *WEOObj_WEGetObjectSize(WEOObject *_self, PyObject *_args) { PyObject *_res = NULL; Point _rv; @@ -276,9 +266,7 @@ static PyObject *WEOObj_WEGetObjectSize(_self, _args) return _res; } -static PyObject *WEOObj_WEGetObjectOwner(_self, _args) - WEOObject *_self; - PyObject *_args; +static PyObject *WEOObj_WEGetObjectOwner(WEOObject *_self, PyObject *_args) { PyObject *_res = NULL; WEReference _rv; @@ -290,9 +278,7 @@ static PyObject *WEOObj_WEGetObjectOwner(_self, _args) return _res; } -static PyObject *WEOObj_WEGetObjectRefCon(_self, _args) - WEOObject *_self; - PyObject *_args; +static PyObject *WEOObj_WEGetObjectRefCon(WEOObject *_self, PyObject *_args) { PyObject *_res = NULL; SInt32 _rv; @@ -304,9 +290,7 @@ static PyObject *WEOObj_WEGetObjectRefCon(_self, _args) return _res; } -static PyObject *WEOObj_WESetObjectRefCon(_self, _args) - WEOObject *_self; - PyObject *_args; +static PyObject *WEOObj_WESetObjectRefCon(WEOObject *_self, PyObject *_args) { PyObject *_res = NULL; SInt32 refCon; @@ -338,9 +322,7 @@ static PyMethodDef WEOObj_methods[] = { PyMethodChain WEOObj_chain = { WEOObj_methods, NULL }; -static PyObject *WEOObj_getattr(self, name) - WEOObject *self; - char *name; +static PyObject *WEOObj_getattr(WEOObject *self, char *name) { return Py_FindMethodInChain(&WEOObj_chain, (PyObject *)self, name); } @@ -386,8 +368,7 @@ typedef struct wasteObject { WEReference ob_itself; } wasteObject; -PyObject *wasteObj_New(itself) - WEReference itself; +PyObject *wasteObj_New(WEReference itself) { wasteObject *it; if (itself == NULL) { @@ -400,9 +381,7 @@ PyObject *wasteObj_New(itself) WESetInfo(weRefCon, (void *)&it, itself); return (PyObject *)it; } -wasteObj_Convert(v, p_itself) - PyObject *v; - WEReference *p_itself; +wasteObj_Convert(PyObject *v, WEReference *p_itself) { if (!wasteObj_Check(v)) { @@ -413,16 +392,13 @@ wasteObj_Convert(v, p_itself) return 1; } -static void wasteObj_dealloc(self) - wasteObject *self; +static void wasteObj_dealloc(wasteObject *self) { WEDispose(self->ob_itself); PyMem_DEL(self); } -static PyObject *wasteObj_WEGetText(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WEGetText(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; Handle _rv; @@ -434,9 +410,7 @@ static PyObject *wasteObj_WEGetText(_self, _args) return _res; } -static PyObject *wasteObj_WEGetChar(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WEGetChar(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; SInt16 _rv; @@ -451,9 +425,7 @@ static PyObject *wasteObj_WEGetChar(_self, _args) return _res; } -static PyObject *wasteObj_WEGetTextLength(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WEGetTextLength(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; SInt32 _rv; @@ -465,9 +437,7 @@ static PyObject *wasteObj_WEGetTextLength(_self, _args) return _res; } -static PyObject *wasteObj_WEGetHeight(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WEGetHeight(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; SInt32 _rv; @@ -485,9 +455,7 @@ static PyObject *wasteObj_WEGetHeight(_self, _args) return _res; } -static PyObject *wasteObj_WEGetSelection(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WEGetSelection(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; SInt32 selStart; @@ -503,9 +471,7 @@ static PyObject *wasteObj_WEGetSelection(_self, _args) return _res; } -static PyObject *wasteObj_WEGetDestRect(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WEGetDestRect(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; LongRect destRect; @@ -518,9 +484,7 @@ static PyObject *wasteObj_WEGetDestRect(_self, _args) return _res; } -static PyObject *wasteObj_WEGetViewRect(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WEGetViewRect(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; LongRect viewRect; @@ -533,9 +497,7 @@ static PyObject *wasteObj_WEGetViewRect(_self, _args) return _res; } -static PyObject *wasteObj_WEIsActive(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WEIsActive(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -547,9 +509,7 @@ static PyObject *wasteObj_WEIsActive(_self, _args) return _res; } -static PyObject *wasteObj_WEOffsetToLine(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WEOffsetToLine(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; SInt32 _rv; @@ -564,9 +524,7 @@ static PyObject *wasteObj_WEOffsetToLine(_self, _args) return _res; } -static PyObject *wasteObj_WEGetLineRange(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WEGetLineRange(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; SInt32 lineIndex; @@ -585,9 +543,7 @@ static PyObject *wasteObj_WEGetLineRange(_self, _args) return _res; } -static PyObject *wasteObj_WECountLines(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WECountLines(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; SInt32 _rv; @@ -599,9 +555,7 @@ static PyObject *wasteObj_WECountLines(_self, _args) return _res; } -static PyObject *wasteObj_WEOffsetToRun(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WEOffsetToRun(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; SInt32 _rv; @@ -616,9 +570,7 @@ static PyObject *wasteObj_WEOffsetToRun(_self, _args) return _res; } -static PyObject *wasteObj_WEGetRunRange(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WEGetRunRange(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; SInt32 runIndex; @@ -637,9 +589,7 @@ static PyObject *wasteObj_WEGetRunRange(_self, _args) return _res; } -static PyObject *wasteObj_WECountRuns(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WECountRuns(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; SInt32 _rv; @@ -651,9 +601,7 @@ static PyObject *wasteObj_WECountRuns(_self, _args) return _res; } -static PyObject *wasteObj_WEGetClickCount(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WEGetClickCount(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; UInt16 _rv; @@ -665,9 +613,7 @@ static PyObject *wasteObj_WEGetClickCount(_self, _args) return _res; } -static PyObject *wasteObj_WESetSelection(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WESetSelection(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; SInt32 selStart; @@ -684,9 +630,7 @@ static PyObject *wasteObj_WESetSelection(_self, _args) return _res; } -static PyObject *wasteObj_WESetDestRect(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WESetDestRect(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; LongRect destRect; @@ -700,9 +644,7 @@ static PyObject *wasteObj_WESetDestRect(_self, _args) return _res; } -static PyObject *wasteObj_WESetViewRect(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WESetViewRect(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; LongRect viewRect; @@ -716,9 +658,7 @@ static PyObject *wasteObj_WESetViewRect(_self, _args) return _res; } -static PyObject *wasteObj_WEContinuousStyle(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WEContinuousStyle(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -737,9 +677,7 @@ static PyObject *wasteObj_WEContinuousStyle(_self, _args) return _res; } -static PyObject *wasteObj_WEGetRunInfo(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WEGetRunInfo(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; SInt32 offset; @@ -755,9 +693,7 @@ static PyObject *wasteObj_WEGetRunInfo(_self, _args) return _res; } -static PyObject *wasteObj_WEGetRunDirection(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WEGetRunDirection(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -772,9 +708,7 @@ static PyObject *wasteObj_WEGetRunDirection(_self, _args) return _res; } -static PyObject *wasteObj_WEGetOffset(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WEGetOffset(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; SInt32 _rv; @@ -792,9 +726,7 @@ static PyObject *wasteObj_WEGetOffset(_self, _args) return _res; } -static PyObject *wasteObj_WEGetPoint(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WEGetPoint(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; SInt32 offset; @@ -816,9 +748,7 @@ static PyObject *wasteObj_WEGetPoint(_self, _args) return _res; } -static PyObject *wasteObj_WEFindWord(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WEFindWord(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; SInt32 offset; @@ -840,9 +770,7 @@ static PyObject *wasteObj_WEFindWord(_self, _args) return _res; } -static PyObject *wasteObj_WEFindLine(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WEFindLine(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; SInt32 offset; @@ -864,9 +792,7 @@ static PyObject *wasteObj_WEFindLine(_self, _args) return _res; } -static PyObject *wasteObj_WEFindParagraph(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WEFindParagraph(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; SInt32 offset; @@ -888,9 +814,7 @@ static PyObject *wasteObj_WEFindParagraph(_self, _args) return _res; } -static PyObject *wasteObj_WECopyRange(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WECopyRange(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -918,9 +842,7 @@ static PyObject *wasteObj_WECopyRange(_self, _args) return _res; } -static PyObject *wasteObj_WEGetAlignment(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WEGetAlignment(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; WEAlignment _rv; @@ -932,9 +854,7 @@ static PyObject *wasteObj_WEGetAlignment(_self, _args) return _res; } -static PyObject *wasteObj_WESetAlignment(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WESetAlignment(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; WEAlignment alignment; @@ -948,9 +868,7 @@ static PyObject *wasteObj_WESetAlignment(_self, _args) return _res; } -static PyObject *wasteObj_WEGetDirection(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WEGetDirection(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; WEDirection _rv; @@ -962,9 +880,7 @@ static PyObject *wasteObj_WEGetDirection(_self, _args) return _res; } -static PyObject *wasteObj_WESetDirection(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WESetDirection(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; WEDirection direction; @@ -978,9 +894,7 @@ static PyObject *wasteObj_WESetDirection(_self, _args) return _res; } -static PyObject *wasteObj_WECalText(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WECalText(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -993,9 +907,7 @@ static PyObject *wasteObj_WECalText(_self, _args) return _res; } -static PyObject *wasteObj_WEUpdate(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WEUpdate(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; RgnHandle updateRgn; @@ -1009,9 +921,7 @@ static PyObject *wasteObj_WEUpdate(_self, _args) return _res; } -static PyObject *wasteObj_WEScroll(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WEScroll(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; SInt32 hOffset; @@ -1028,9 +938,7 @@ static PyObject *wasteObj_WEScroll(_self, _args) return _res; } -static PyObject *wasteObj_WESelView(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WESelView(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -1041,9 +949,7 @@ static PyObject *wasteObj_WESelView(_self, _args) return _res; } -static PyObject *wasteObj_WEActivate(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WEActivate(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -1054,9 +960,7 @@ static PyObject *wasteObj_WEActivate(_self, _args) return _res; } -static PyObject *wasteObj_WEDeactivate(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WEDeactivate(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -1067,9 +971,7 @@ static PyObject *wasteObj_WEDeactivate(_self, _args) return _res; } -static PyObject *wasteObj_WEKey(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WEKey(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; SInt16 key; @@ -1086,9 +988,7 @@ static PyObject *wasteObj_WEKey(_self, _args) return _res; } -static PyObject *wasteObj_WEClick(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WEClick(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; Point hitPt; @@ -1108,9 +1008,7 @@ static PyObject *wasteObj_WEClick(_self, _args) return _res; } -static PyObject *wasteObj_WEAdjustCursor(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WEAdjustCursor(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -1128,9 +1026,7 @@ static PyObject *wasteObj_WEAdjustCursor(_self, _args) return _res; } -static PyObject *wasteObj_WEIdle(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WEIdle(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; UInt32 maxSleep; @@ -1143,9 +1039,7 @@ static PyObject *wasteObj_WEIdle(_self, _args) return _res; } -static PyObject *wasteObj_WEInsert(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WEInsert(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1171,9 +1065,7 @@ static PyObject *wasteObj_WEInsert(_self, _args) return _res; } -static PyObject *wasteObj_WEDelete(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WEDelete(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1186,9 +1078,7 @@ static PyObject *wasteObj_WEDelete(_self, _args) return _res; } -static PyObject *wasteObj_WESetStyle(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WESetStyle(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1207,9 +1097,7 @@ static PyObject *wasteObj_WESetStyle(_self, _args) return _res; } -static PyObject *wasteObj_WEUseStyleScrap(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WEUseStyleScrap(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1225,9 +1113,7 @@ static PyObject *wasteObj_WEUseStyleScrap(_self, _args) return _res; } -static PyObject *wasteObj_WEUseText(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WEUseText(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1243,9 +1129,7 @@ static PyObject *wasteObj_WEUseText(_self, _args) return _res; } -static PyObject *wasteObj_WEUndo(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WEUndo(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1258,9 +1142,7 @@ static PyObject *wasteObj_WEUndo(_self, _args) return _res; } -static PyObject *wasteObj_WEClearUndo(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WEClearUndo(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -1271,9 +1153,7 @@ static PyObject *wasteObj_WEClearUndo(_self, _args) return _res; } -static PyObject *wasteObj_WEGetUndoInfo(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WEGetUndoInfo(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; WEActionKind _rv; @@ -1288,9 +1168,7 @@ static PyObject *wasteObj_WEGetUndoInfo(_self, _args) return _res; } -static PyObject *wasteObj_WEIsTyping(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WEIsTyping(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -1302,9 +1180,7 @@ static PyObject *wasteObj_WEIsTyping(_self, _args) return _res; } -static PyObject *wasteObj_WEBeginAction(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WEBeginAction(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1317,9 +1193,7 @@ static PyObject *wasteObj_WEBeginAction(_self, _args) return _res; } -static PyObject *wasteObj_WEEndAction(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WEEndAction(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1335,9 +1209,7 @@ static PyObject *wasteObj_WEEndAction(_self, _args) return _res; } -static PyObject *wasteObj_WEGetModCount(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WEGetModCount(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; UInt32 _rv; @@ -1349,9 +1221,7 @@ static PyObject *wasteObj_WEGetModCount(_self, _args) return _res; } -static PyObject *wasteObj_WEResetModCount(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WEResetModCount(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -1362,9 +1232,7 @@ static PyObject *wasteObj_WEResetModCount(_self, _args) return _res; } -static PyObject *wasteObj_WEInsertObject(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WEInsertObject(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1386,9 +1254,7 @@ static PyObject *wasteObj_WEInsertObject(_self, _args) return _res; } -static PyObject *wasteObj_WEGetSelectedObject(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WEGetSelectedObject(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1403,9 +1269,7 @@ static PyObject *wasteObj_WEGetSelectedObject(_self, _args) return _res; } -static PyObject *wasteObj_WEFindNextObject(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WEFindNextObject(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; SInt32 _rv; @@ -1423,9 +1287,7 @@ static PyObject *wasteObj_WEFindNextObject(_self, _args) return _res; } -static PyObject *wasteObj_WEUseSoup(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WEUseSoup(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1441,9 +1303,7 @@ static PyObject *wasteObj_WEUseSoup(_self, _args) return _res; } -static PyObject *wasteObj_WECut(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WECut(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1456,9 +1316,7 @@ static PyObject *wasteObj_WECut(_self, _args) return _res; } -static PyObject *wasteObj_WECopy(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WECopy(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1471,9 +1329,7 @@ static PyObject *wasteObj_WECopy(_self, _args) return _res; } -static PyObject *wasteObj_WEPaste(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WEPaste(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1486,9 +1342,7 @@ static PyObject *wasteObj_WEPaste(_self, _args) return _res; } -static PyObject *wasteObj_WECanPaste(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WECanPaste(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -1500,9 +1354,7 @@ static PyObject *wasteObj_WECanPaste(_self, _args) return _res; } -static PyObject *wasteObj_WEGetHiliteRgn(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WEGetHiliteRgn(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; RgnHandle _rv; @@ -1520,9 +1372,7 @@ static PyObject *wasteObj_WEGetHiliteRgn(_self, _args) return _res; } -static PyObject *wasteObj_WECharByte(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WECharByte(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; SInt16 _rv; @@ -1537,9 +1387,7 @@ static PyObject *wasteObj_WECharByte(_self, _args) return _res; } -static PyObject *wasteObj_WECharType(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WECharType(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; SInt16 _rv; @@ -1554,9 +1402,7 @@ static PyObject *wasteObj_WECharType(_self, _args) return _res; } -static PyObject *wasteObj_WEStopInlineSession(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WEStopInlineSession(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -1567,9 +1413,7 @@ static PyObject *wasteObj_WEStopInlineSession(_self, _args) return _res; } -static PyObject *wasteObj_WEFeatureFlag(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WEFeatureFlag(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; SInt16 _rv; @@ -1587,9 +1431,7 @@ static PyObject *wasteObj_WEFeatureFlag(_self, _args) return _res; } -static PyObject *wasteObj_WEGetUserInfo(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WEGetUserInfo(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1607,9 +1449,7 @@ static PyObject *wasteObj_WEGetUserInfo(_self, _args) return _res; } -static PyObject *wasteObj_WESetUserInfo(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WESetUserInfo(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1628,9 +1468,7 @@ static PyObject *wasteObj_WESetUserInfo(_self, _args) return _res; } -static PyObject *wasteObj_WEInstallTabHooks(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WEInstallTabHooks(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1643,9 +1481,7 @@ static PyObject *wasteObj_WEInstallTabHooks(_self, _args) return _res; } -static PyObject *wasteObj_WERemoveTabHooks(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WERemoveTabHooks(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1658,9 +1494,7 @@ static PyObject *wasteObj_WERemoveTabHooks(_self, _args) return _res; } -static PyObject *wasteObj_WEIsTabHooks(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WEIsTabHooks(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -1672,9 +1506,7 @@ static PyObject *wasteObj_WEIsTabHooks(_self, _args) return _res; } -static PyObject *wasteObj_WEGetTabSize(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WEGetTabSize(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; SInt16 _rv; @@ -1686,9 +1518,7 @@ static PyObject *wasteObj_WEGetTabSize(_self, _args) return _res; } -static PyObject *wasteObj_WESetTabSize(_self, _args) - wasteObject *_self; - PyObject *_args; +static PyObject *wasteObj_WESetTabSize(wasteObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1858,9 +1688,7 @@ static PyMethodDef wasteObj_methods[] = { PyMethodChain wasteObj_chain = { wasteObj_methods, NULL }; -static PyObject *wasteObj_getattr(self, name) - wasteObject *self; - char *name; +static PyObject *wasteObj_getattr(wasteObject *self, char *name) { return Py_FindMethodInChain(&wasteObj_chain, (PyObject *)self, name); } @@ -1895,9 +1723,7 @@ PyTypeObject waste_Type = { /* --------------------- End object type waste ---------------------- */ -static PyObject *waste_WENew(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *waste_WENew(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1920,9 +1746,7 @@ static PyObject *waste_WENew(_self, _args) return _res; } -static PyObject *waste_WEUpdateStyleScrap(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *waste_WEUpdateStyleScrap(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1940,9 +1764,7 @@ static PyObject *waste_WEUpdateStyleScrap(_self, _args) return _res; } -static PyObject *waste_WEInstallTSMHandlers(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *waste_WEInstallTSMHandlers(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1955,9 +1777,7 @@ static PyObject *waste_WEInstallTSMHandlers(_self, _args) return _res; } -static PyObject *waste_WERemoveTSMHandlers(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *waste_WERemoveTSMHandlers(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1970,9 +1790,7 @@ static PyObject *waste_WERemoveTSMHandlers(_self, _args) return _res; } -static PyObject *waste_WEHandleTSMEvent(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *waste_WEHandleTSMEvent(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSErr _err; @@ -1989,9 +1807,7 @@ static PyObject *waste_WEHandleTSMEvent(_self, _args) return _res; } -static PyObject *waste_WELongPointToPoint(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *waste_WELongPointToPoint(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; LongPt lp; @@ -2006,9 +1822,7 @@ static PyObject *waste_WELongPointToPoint(_self, _args) return _res; } -static PyObject *waste_WEPointToLongPoint(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *waste_WEPointToLongPoint(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Point p; @@ -2023,9 +1837,7 @@ static PyObject *waste_WEPointToLongPoint(_self, _args) return _res; } -static PyObject *waste_WESetLongRect(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *waste_WESetLongRect(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; LongRect lr; @@ -2049,9 +1861,7 @@ static PyObject *waste_WESetLongRect(_self, _args) return _res; } -static PyObject *waste_WELongRectToRect(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *waste_WELongRectToRect(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; LongRect lr; @@ -2066,9 +1876,7 @@ static PyObject *waste_WELongRectToRect(_self, _args) return _res; } -static PyObject *waste_WERectToLongRect(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *waste_WERectToLongRect(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Rect r; @@ -2083,9 +1891,7 @@ static PyObject *waste_WERectToLongRect(_self, _args) return _res; } -static PyObject *waste_WEOffsetLongRect(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *waste_WEOffsetLongRect(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; LongRect lr; @@ -2103,9 +1909,7 @@ static PyObject *waste_WEOffsetLongRect(_self, _args) return _res; } -static PyObject *waste_WELongPointInLongRect(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *waste_WELongPointInLongRect(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -2122,9 +1926,7 @@ static PyObject *waste_WELongPointInLongRect(_self, _args) return _res; } -static PyObject *waste_STDObjectHandlers(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *waste_STDObjectHandlers(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; @@ -2166,9 +1968,7 @@ static PyObject *waste_STDObjectHandlers(_self, _args) } -static PyObject *waste_WEInstallObjectHandler(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *waste_WEInstallObjectHandler(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; @@ -2260,7 +2060,7 @@ ExistingwasteObj_New(w) } -void initwaste() +void initwaste(void) { PyObject *m; PyObject *d; diff --git a/Mac/Modules/win/Winmodule.c b/Mac/Modules/win/Winmodule.c index 6a9ded36269..639844a8bed 100644 --- a/Mac/Modules/win/Winmodule.c +++ b/Mac/Modules/win/Winmodule.c @@ -8,7 +8,11 @@ #include "macglue.h" #include "pymactoolbox.h" +#ifdef WITHOUT_FRAMEWORKS #include +#else +#include +#endif #ifdef USE_TOOLBOX_OBJECT_GLUE extern PyObject *_WinObj_New(WindowRef); @@ -55,8 +59,7 @@ typedef struct WindowObject { void (*ob_freeit)(WindowPtr ptr); } WindowObject; -PyObject *WinObj_New(itself) - WindowPtr itself; +PyObject *WinObj_New(WindowPtr itself) { WindowObject *it; if (itself == NULL) return PyMac_Error(resNotFound); @@ -71,9 +74,7 @@ PyObject *WinObj_New(itself) } return (PyObject *)it; } -WinObj_Convert(v, p_itself) - PyObject *v; - WindowPtr *p_itself; +WinObj_Convert(PyObject *v, WindowPtr *p_itself) { #if 1 { @@ -103,8 +104,7 @@ WinObj_Convert(v, p_itself) return 1; } -static void WinObj_dealloc(self) - WindowObject *self; +static void WinObj_dealloc(WindowObject *self) { if (self->ob_freeit && self->ob_itself) { @@ -116,9 +116,7 @@ static void WinObj_dealloc(self) PyMem_DEL(self); } -static PyObject *WinObj_GetWindowOwnerCount(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_GetWindowOwnerCount(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -133,9 +131,7 @@ static PyObject *WinObj_GetWindowOwnerCount(_self, _args) return _res; } -static PyObject *WinObj_CloneWindow(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_CloneWindow(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -150,9 +146,7 @@ static PyObject *WinObj_CloneWindow(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *WinObj_ReshapeCustomWindow(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_ReshapeCustomWindow(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -166,9 +160,7 @@ static PyObject *WinObj_ReshapeCustomWindow(_self, _args) } #endif -static PyObject *WinObj_GetWindowClass(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_GetWindowClass(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -183,9 +175,7 @@ static PyObject *WinObj_GetWindowClass(_self, _args) return _res; } -static PyObject *WinObj_GetWindowAttributes(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_GetWindowAttributes(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -202,9 +192,7 @@ static PyObject *WinObj_GetWindowAttributes(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *WinObj_ChangeWindowAttributes(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_ChangeWindowAttributes(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -226,9 +214,7 @@ static PyObject *WinObj_ChangeWindowAttributes(_self, _args) #if !TARGET_API_MAC_CARBON -static PyObject *WinObj_SetWinColor(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_SetWinColor(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; WCTabHandle newColorTable; @@ -243,9 +229,7 @@ static PyObject *WinObj_SetWinColor(_self, _args) } #endif -static PyObject *WinObj_SetWindowContentColor(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_SetWindowContentColor(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -261,9 +245,7 @@ static PyObject *WinObj_SetWindowContentColor(_self, _args) return _res; } -static PyObject *WinObj_GetWindowContentColor(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_GetWindowContentColor(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -278,9 +260,7 @@ static PyObject *WinObj_GetWindowContentColor(_self, _args) return _res; } -static PyObject *WinObj_GetWindowContentPattern(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_GetWindowContentPattern(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -296,9 +276,7 @@ static PyObject *WinObj_GetWindowContentPattern(_self, _args) return _res; } -static PyObject *WinObj_SetWindowContentPattern(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_SetWindowContentPattern(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -316,9 +294,7 @@ static PyObject *WinObj_SetWindowContentPattern(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *WinObj_ScrollWindowRect(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_ScrollWindowRect(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -349,9 +325,7 @@ static PyObject *WinObj_ScrollWindowRect(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *WinObj_ScrollWindowRegion(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_ScrollWindowRegion(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -380,9 +354,7 @@ static PyObject *WinObj_ScrollWindowRegion(_self, _args) } #endif -static PyObject *WinObj_ClipAbove(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_ClipAbove(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -395,9 +367,7 @@ static PyObject *WinObj_ClipAbove(_self, _args) #if !TARGET_API_MAC_CARBON -static PyObject *WinObj_SaveOld(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_SaveOld(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -411,9 +381,7 @@ static PyObject *WinObj_SaveOld(_self, _args) #if !TARGET_API_MAC_CARBON -static PyObject *WinObj_DrawNew(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_DrawNew(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean update; @@ -428,9 +396,7 @@ static PyObject *WinObj_DrawNew(_self, _args) } #endif -static PyObject *WinObj_PaintOne(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_PaintOne(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; RgnHandle clobberedRgn; @@ -444,9 +410,7 @@ static PyObject *WinObj_PaintOne(_self, _args) return _res; } -static PyObject *WinObj_PaintBehind(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_PaintBehind(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; RgnHandle clobberedRgn; @@ -460,9 +424,7 @@ static PyObject *WinObj_PaintBehind(_self, _args) return _res; } -static PyObject *WinObj_CalcVis(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_CalcVis(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -473,9 +435,7 @@ static PyObject *WinObj_CalcVis(_self, _args) return _res; } -static PyObject *WinObj_CalcVisBehind(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_CalcVisBehind(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; RgnHandle clobberedRgn; @@ -489,9 +449,7 @@ static PyObject *WinObj_CalcVisBehind(_self, _args) return _res; } -static PyObject *WinObj_BringToFront(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_BringToFront(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -502,9 +460,7 @@ static PyObject *WinObj_BringToFront(_self, _args) return _res; } -static PyObject *WinObj_SendBehind(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_SendBehind(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; WindowPtr behindWindow; @@ -518,9 +474,7 @@ static PyObject *WinObj_SendBehind(_self, _args) return _res; } -static PyObject *WinObj_SelectWindow(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_SelectWindow(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -533,9 +487,7 @@ static PyObject *WinObj_SelectWindow(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *WinObj_GetNextWindowOfClass(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_GetNextWindowOfClass(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; WindowPtr _rv; @@ -556,9 +508,7 @@ static PyObject *WinObj_GetNextWindowOfClass(_self, _args) #if !TARGET_API_MAC_CARBON -static PyObject *WinObj_IsValidWindowPtr(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_IsValidWindowPtr(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -571,9 +521,7 @@ static PyObject *WinObj_IsValidWindowPtr(_self, _args) } #endif -static PyObject *WinObj_HiliteWindow(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_HiliteWindow(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean fHilite; @@ -587,9 +535,7 @@ static PyObject *WinObj_HiliteWindow(_self, _args) return _res; } -static PyObject *WinObj_SetWRefCon(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_SetWRefCon(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; long data; @@ -603,9 +549,7 @@ static PyObject *WinObj_SetWRefCon(_self, _args) return _res; } -static PyObject *WinObj_GetWRefCon(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_GetWRefCon(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; long _rv; @@ -617,9 +561,7 @@ static PyObject *WinObj_GetWRefCon(_self, _args) return _res; } -static PyObject *WinObj_SetWindowPic(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_SetWindowPic(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; PicHandle pic; @@ -633,9 +575,7 @@ static PyObject *WinObj_SetWindowPic(_self, _args) return _res; } -static PyObject *WinObj_GetWindowPic(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_GetWindowPic(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; PicHandle _rv; @@ -647,9 +587,7 @@ static PyObject *WinObj_GetWindowPic(_self, _args) return _res; } -static PyObject *WinObj_GetWVariant(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_GetWVariant(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; short _rv; @@ -661,9 +599,7 @@ static PyObject *WinObj_GetWVariant(_self, _args) return _res; } -static PyObject *WinObj_GetWindowFeatures(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_GetWindowFeatures(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -678,9 +614,7 @@ static PyObject *WinObj_GetWindowFeatures(_self, _args) return _res; } -static PyObject *WinObj_GetWindowRegion(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_GetWindowRegion(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -699,9 +633,7 @@ static PyObject *WinObj_GetWindowRegion(_self, _args) return _res; } -static PyObject *WinObj_BeginUpdate(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_BeginUpdate(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -712,9 +644,7 @@ static PyObject *WinObj_BeginUpdate(_self, _args) return _res; } -static PyObject *WinObj_EndUpdate(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_EndUpdate(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -725,9 +655,7 @@ static PyObject *WinObj_EndUpdate(_self, _args) return _res; } -static PyObject *WinObj_InvalWindowRgn(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_InvalWindowRgn(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -743,9 +671,7 @@ static PyObject *WinObj_InvalWindowRgn(_self, _args) return _res; } -static PyObject *WinObj_InvalWindowRect(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_InvalWindowRect(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -761,9 +687,7 @@ static PyObject *WinObj_InvalWindowRect(_self, _args) return _res; } -static PyObject *WinObj_ValidWindowRgn(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_ValidWindowRgn(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -779,9 +703,7 @@ static PyObject *WinObj_ValidWindowRgn(_self, _args) return _res; } -static PyObject *WinObj_ValidWindowRect(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_ValidWindowRect(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -797,9 +719,7 @@ static PyObject *WinObj_ValidWindowRect(_self, _args) return _res; } -static PyObject *WinObj_DrawGrowIcon(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_DrawGrowIcon(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -810,9 +730,7 @@ static PyObject *WinObj_DrawGrowIcon(_self, _args) return _res; } -static PyObject *WinObj_SetWTitle(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_SetWTitle(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; Str255 title; @@ -826,9 +744,7 @@ static PyObject *WinObj_SetWTitle(_self, _args) return _res; } -static PyObject *WinObj_GetWTitle(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_GetWTitle(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; Str255 title; @@ -841,9 +757,7 @@ static PyObject *WinObj_GetWTitle(_self, _args) return _res; } -static PyObject *WinObj_SetWindowProxyFSSpec(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_SetWindowProxyFSSpec(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -859,9 +773,7 @@ static PyObject *WinObj_SetWindowProxyFSSpec(_self, _args) return _res; } -static PyObject *WinObj_GetWindowProxyFSSpec(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_GetWindowProxyFSSpec(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -876,9 +788,7 @@ static PyObject *WinObj_GetWindowProxyFSSpec(_self, _args) return _res; } -static PyObject *WinObj_SetWindowProxyAlias(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_SetWindowProxyAlias(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -894,9 +804,7 @@ static PyObject *WinObj_SetWindowProxyAlias(_self, _args) return _res; } -static PyObject *WinObj_GetWindowProxyAlias(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_GetWindowProxyAlias(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -911,9 +819,7 @@ static PyObject *WinObj_GetWindowProxyAlias(_self, _args) return _res; } -static PyObject *WinObj_SetWindowProxyCreatorAndType(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_SetWindowProxyCreatorAndType(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -935,9 +841,7 @@ static PyObject *WinObj_SetWindowProxyCreatorAndType(_self, _args) return _res; } -static PyObject *WinObj_GetWindowProxyIcon(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_GetWindowProxyIcon(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -952,9 +856,7 @@ static PyObject *WinObj_GetWindowProxyIcon(_self, _args) return _res; } -static PyObject *WinObj_SetWindowProxyIcon(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_SetWindowProxyIcon(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -970,9 +872,7 @@ static PyObject *WinObj_SetWindowProxyIcon(_self, _args) return _res; } -static PyObject *WinObj_RemoveWindowProxy(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_RemoveWindowProxy(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -985,9 +885,7 @@ static PyObject *WinObj_RemoveWindowProxy(_self, _args) return _res; } -static PyObject *WinObj_BeginWindowProxyDrag(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_BeginWindowProxyDrag(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -1005,9 +903,7 @@ static PyObject *WinObj_BeginWindowProxyDrag(_self, _args) return _res; } -static PyObject *WinObj_EndWindowProxyDrag(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_EndWindowProxyDrag(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -1023,9 +919,7 @@ static PyObject *WinObj_EndWindowProxyDrag(_self, _args) return _res; } -static PyObject *WinObj_TrackWindowProxyFromExistingDrag(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_TrackWindowProxyFromExistingDrag(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -1047,9 +941,7 @@ static PyObject *WinObj_TrackWindowProxyFromExistingDrag(_self, _args) return _res; } -static PyObject *WinObj_TrackWindowProxyDrag(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_TrackWindowProxyDrag(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -1065,9 +957,7 @@ static PyObject *WinObj_TrackWindowProxyDrag(_self, _args) return _res; } -static PyObject *WinObj_IsWindowModified(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_IsWindowModified(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -1079,9 +969,7 @@ static PyObject *WinObj_IsWindowModified(_self, _args) return _res; } -static PyObject *WinObj_SetWindowModified(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_SetWindowModified(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -1097,9 +985,7 @@ static PyObject *WinObj_SetWindowModified(_self, _args) return _res; } -static PyObject *WinObj_IsWindowPathSelectClick(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_IsWindowPathSelectClick(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -1114,9 +1000,7 @@ static PyObject *WinObj_IsWindowPathSelectClick(_self, _args) return _res; } -static PyObject *WinObj_WindowPathSelect(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_WindowPathSelect(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -1134,9 +1018,7 @@ static PyObject *WinObj_WindowPathSelect(_self, _args) return _res; } -static PyObject *WinObj_HiliteWindowFrameForDrag(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_HiliteWindowFrameForDrag(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -1152,9 +1034,7 @@ static PyObject *WinObj_HiliteWindowFrameForDrag(_self, _args) return _res; } -static PyObject *WinObj_TransitionWindow(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_TransitionWindow(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -1176,9 +1056,7 @@ static PyObject *WinObj_TransitionWindow(_self, _args) return _res; } -static PyObject *WinObj_MacMoveWindow(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_MacMoveWindow(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; short hGlobal; @@ -1198,9 +1076,7 @@ static PyObject *WinObj_MacMoveWindow(_self, _args) return _res; } -static PyObject *WinObj_SizeWindow(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_SizeWindow(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; short w; @@ -1220,9 +1096,7 @@ static PyObject *WinObj_SizeWindow(_self, _args) return _res; } -static PyObject *WinObj_GrowWindow(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_GrowWindow(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; long _rv; @@ -1240,9 +1114,7 @@ static PyObject *WinObj_GrowWindow(_self, _args) return _res; } -static PyObject *WinObj_DragWindow(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_DragWindow(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; Point startPt; @@ -1259,9 +1131,7 @@ static PyObject *WinObj_DragWindow(_self, _args) return _res; } -static PyObject *WinObj_ZoomWindow(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_ZoomWindow(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; WindowPartCode partCode; @@ -1278,9 +1148,7 @@ static PyObject *WinObj_ZoomWindow(_self, _args) return _res; } -static PyObject *WinObj_IsWindowCollapsable(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_IsWindowCollapsable(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -1292,9 +1160,7 @@ static PyObject *WinObj_IsWindowCollapsable(_self, _args) return _res; } -static PyObject *WinObj_IsWindowCollapsed(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_IsWindowCollapsed(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -1306,9 +1172,7 @@ static PyObject *WinObj_IsWindowCollapsed(_self, _args) return _res; } -static PyObject *WinObj_CollapseWindow(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_CollapseWindow(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -1324,9 +1188,7 @@ static PyObject *WinObj_CollapseWindow(_self, _args) return _res; } -static PyObject *WinObj_GetWindowBounds(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_GetWindowBounds(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -1344,9 +1206,7 @@ static PyObject *WinObj_GetWindowBounds(_self, _args) return _res; } -static PyObject *WinObj_ResizeWindow(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_ResizeWindow(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -1367,9 +1227,7 @@ static PyObject *WinObj_ResizeWindow(_self, _args) return _res; } -static PyObject *WinObj_SetWindowBounds(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_SetWindowBounds(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -1388,9 +1246,7 @@ static PyObject *WinObj_SetWindowBounds(_self, _args) return _res; } -static PyObject *WinObj_RepositionWindow(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_RepositionWindow(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -1409,9 +1265,7 @@ static PyObject *WinObj_RepositionWindow(_self, _args) return _res; } -static PyObject *WinObj_MoveWindowStructure(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_MoveWindowStructure(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -1430,9 +1284,7 @@ static PyObject *WinObj_MoveWindowStructure(_self, _args) return _res; } -static PyObject *WinObj_IsWindowInStandardState(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_IsWindowInStandardState(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -1450,9 +1302,7 @@ static PyObject *WinObj_IsWindowInStandardState(_self, _args) return _res; } -static PyObject *WinObj_ZoomWindowIdeal(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_ZoomWindowIdeal(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -1470,9 +1320,7 @@ static PyObject *WinObj_ZoomWindowIdeal(_self, _args) return _res; } -static PyObject *WinObj_GetWindowIdealUserState(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_GetWindowIdealUserState(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -1487,9 +1335,7 @@ static PyObject *WinObj_GetWindowIdealUserState(_self, _args) return _res; } -static PyObject *WinObj_SetWindowIdealUserState(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_SetWindowIdealUserState(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -1504,9 +1350,7 @@ static PyObject *WinObj_SetWindowIdealUserState(_self, _args) return _res; } -static PyObject *WinObj_HideWindow(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_HideWindow(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -1517,9 +1361,7 @@ static PyObject *WinObj_HideWindow(_self, _args) return _res; } -static PyObject *WinObj_MacShowWindow(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_MacShowWindow(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -1530,9 +1372,7 @@ static PyObject *WinObj_MacShowWindow(_self, _args) return _res; } -static PyObject *WinObj_ShowHide(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_ShowHide(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean showFlag; @@ -1548,9 +1388,7 @@ static PyObject *WinObj_ShowHide(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *WinObj_GetWindowPropertyAttributes(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_GetWindowPropertyAttributes(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -1574,9 +1412,7 @@ static PyObject *WinObj_GetWindowPropertyAttributes(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *WinObj_ChangeWindowPropertyAttributes(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_ChangeWindowPropertyAttributes(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -1602,9 +1438,7 @@ static PyObject *WinObj_ChangeWindowPropertyAttributes(_self, _args) } #endif -static PyObject *WinObj_TrackBox(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_TrackBox(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -1622,9 +1456,7 @@ static PyObject *WinObj_TrackBox(_self, _args) return _res; } -static PyObject *WinObj_TrackGoAway(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_TrackGoAway(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -1641,9 +1473,7 @@ static PyObject *WinObj_TrackGoAway(_self, _args) #if !TARGET_API_MAC_CARBON -static PyObject *WinObj_GetAuxWin(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_GetAuxWin(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -1661,9 +1491,7 @@ static PyObject *WinObj_GetAuxWin(_self, _args) #if !TARGET_API_MAC_CARBON -static PyObject *WinObj_GetWindowGoAwayFlag(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_GetWindowGoAwayFlag(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -1678,9 +1506,7 @@ static PyObject *WinObj_GetWindowGoAwayFlag(_self, _args) #if !TARGET_API_MAC_CARBON -static PyObject *WinObj_GetWindowSpareFlag(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_GetWindowSpareFlag(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -1693,9 +1519,7 @@ static PyObject *WinObj_GetWindowSpareFlag(_self, _args) } #endif -static PyObject *WinObj_GetWindowPort(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_GetWindowPort(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; CGrafPtr _rv; @@ -1707,9 +1531,7 @@ static PyObject *WinObj_GetWindowPort(_self, _args) return _res; } -static PyObject *WinObj_GetWindowKind(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_GetWindowKind(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; short _rv; @@ -1721,9 +1543,7 @@ static PyObject *WinObj_GetWindowKind(_self, _args) return _res; } -static PyObject *WinObj_MacIsWindowVisible(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_MacIsWindowVisible(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -1735,9 +1555,7 @@ static PyObject *WinObj_MacIsWindowVisible(_self, _args) return _res; } -static PyObject *WinObj_IsWindowHilited(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_IsWindowHilited(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -1751,9 +1569,7 @@ static PyObject *WinObj_IsWindowHilited(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *WinObj_IsWindowUpdatePending(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_IsWindowUpdatePending(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -1766,9 +1582,7 @@ static PyObject *WinObj_IsWindowUpdatePending(_self, _args) } #endif -static PyObject *WinObj_MacGetNextWindow(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_MacGetNextWindow(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; WindowPtr _rv; @@ -1780,9 +1594,7 @@ static PyObject *WinObj_MacGetNextWindow(_self, _args) return _res; } -static PyObject *WinObj_GetWindowStandardState(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_GetWindowStandardState(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; Rect rect; @@ -1795,9 +1607,7 @@ static PyObject *WinObj_GetWindowStandardState(_self, _args) return _res; } -static PyObject *WinObj_GetWindowUserState(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_GetWindowUserState(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; Rect rect; @@ -1810,9 +1620,7 @@ static PyObject *WinObj_GetWindowUserState(_self, _args) return _res; } -static PyObject *WinObj_SetWindowKind(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_SetWindowKind(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; short kind; @@ -1826,9 +1634,7 @@ static PyObject *WinObj_SetWindowKind(_self, _args) return _res; } -static PyObject *WinObj_SetWindowStandardState(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_SetWindowStandardState(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; Rect rect; @@ -1842,9 +1648,7 @@ static PyObject *WinObj_SetWindowStandardState(_self, _args) return _res; } -static PyObject *WinObj_SetWindowUserState(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_SetWindowUserState(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; Rect rect; @@ -1858,9 +1662,7 @@ static PyObject *WinObj_SetWindowUserState(_self, _args) return _res; } -static PyObject *WinObj_SetPortWindowPort(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_SetPortWindowPort(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -1871,9 +1673,7 @@ static PyObject *WinObj_SetPortWindowPort(_self, _args) return _res; } -static PyObject *WinObj_GetWindowPortBounds(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_GetWindowPortBounds(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; Rect bounds; @@ -1886,9 +1686,7 @@ static PyObject *WinObj_GetWindowPortBounds(_self, _args) return _res; } -static PyObject *WinObj_IsWindowVisible(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_IsWindowVisible(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -1902,9 +1700,7 @@ static PyObject *WinObj_IsWindowVisible(_self, _args) #if !TARGET_API_MAC_CARBON -static PyObject *WinObj_GetWindowZoomFlag(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_GetWindowZoomFlag(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -1917,9 +1713,7 @@ static PyObject *WinObj_GetWindowZoomFlag(_self, _args) } #endif -static PyObject *WinObj_GetWindowStructureRgn(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_GetWindowStructureRgn(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; RgnHandle r; @@ -1933,9 +1727,7 @@ static PyObject *WinObj_GetWindowStructureRgn(_self, _args) return _res; } -static PyObject *WinObj_GetWindowContentRgn(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_GetWindowContentRgn(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; RgnHandle r; @@ -1949,9 +1741,7 @@ static PyObject *WinObj_GetWindowContentRgn(_self, _args) return _res; } -static PyObject *WinObj_GetWindowUpdateRgn(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_GetWindowUpdateRgn(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; RgnHandle r; @@ -1967,9 +1757,7 @@ static PyObject *WinObj_GetWindowUpdateRgn(_self, _args) #if !TARGET_API_MAC_CARBON -static PyObject *WinObj_GetWindowTitleWidth(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_GetWindowTitleWidth(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; short _rv; @@ -1982,9 +1770,7 @@ static PyObject *WinObj_GetWindowTitleWidth(_self, _args) } #endif -static PyObject *WinObj_GetNextWindow(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_GetNextWindow(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; WindowPtr _rv; @@ -1998,9 +1784,7 @@ static PyObject *WinObj_GetNextWindow(_self, _args) #if !TARGET_API_MAC_CARBON -static PyObject *WinObj_CloseWindow(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_CloseWindow(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -2012,9 +1796,7 @@ static PyObject *WinObj_CloseWindow(_self, _args) } #endif -static PyObject *WinObj_MoveWindow(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_MoveWindow(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; short hGlobal; @@ -2034,9 +1816,7 @@ static PyObject *WinObj_MoveWindow(_self, _args) return _res; } -static PyObject *WinObj_ShowWindow(_self, _args) - WindowObject *_self; - PyObject *_args; +static PyObject *WinObj_ShowWindow(WindowObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -2327,33 +2107,28 @@ static PyMethodDef WinObj_methods[] = { PyMethodChain WinObj_chain = { WinObj_methods, NULL }; -static PyObject *WinObj_getattr(self, name) - WindowObject *self; - char *name; +static PyObject *WinObj_getattr(WindowObject *self, char *name) { return Py_FindMethodInChain(&WinObj_chain, (PyObject *)self, name); } #define WinObj_setattr NULL -static int WinObj_compare(self, other) - WindowObject *self, *other; +static int WinObj_compare(WindowObject *self, WindowObject *other) { if ( self->ob_itself > other->ob_itself ) return 1; if ( self->ob_itself < other->ob_itself ) return -1; return 0; } -static PyObject * WinObj_repr(self) - WindowObject *self; +static PyObject * WinObj_repr(WindowObject *self) { char buf[100]; sprintf(buf, "", self, self->ob_itself); return PyString_FromString(buf); } -static int WinObj_hash(self) - WindowObject *self; +static int WinObj_hash(WindowObject *self) { return (int)self->ob_itself; } @@ -2380,9 +2155,7 @@ PyTypeObject Window_Type = { /* --------------------- End object type Window --------------------- */ -static PyObject *Win_GetNewCWindow(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Win_GetNewCWindow(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; WindowPtr _rv; @@ -2400,9 +2173,7 @@ static PyObject *Win_GetNewCWindow(_self, _args) return _res; } -static PyObject *Win_NewWindow(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Win_NewWindow(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; WindowPtr _rv; @@ -2435,9 +2206,7 @@ static PyObject *Win_NewWindow(_self, _args) return _res; } -static PyObject *Win_GetNewWindow(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Win_GetNewWindow(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; WindowPtr _rv; @@ -2455,9 +2224,7 @@ static PyObject *Win_GetNewWindow(_self, _args) return _res; } -static PyObject *Win_NewCWindow(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Win_NewCWindow(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; WindowPtr _rv; @@ -2490,9 +2257,7 @@ static PyObject *Win_NewCWindow(_self, _args) return _res; } -static PyObject *Win_CreateNewWindow(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Win_CreateNewWindow(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -2515,9 +2280,7 @@ static PyObject *Win_CreateNewWindow(_self, _args) return _res; } -static PyObject *Win_CreateWindowFromResource(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Win_CreateWindowFromResource(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -2534,9 +2297,7 @@ static PyObject *Win_CreateWindowFromResource(_self, _args) return _res; } -static PyObject *Win_ShowFloatingWindows(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Win_ShowFloatingWindows(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -2549,9 +2310,7 @@ static PyObject *Win_ShowFloatingWindows(_self, _args) return _res; } -static PyObject *Win_HideFloatingWindows(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Win_HideFloatingWindows(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -2564,9 +2323,7 @@ static PyObject *Win_HideFloatingWindows(_self, _args) return _res; } -static PyObject *Win_AreFloatingWindowsVisible(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Win_AreFloatingWindowsVisible(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -2580,9 +2337,7 @@ static PyObject *Win_AreFloatingWindowsVisible(_self, _args) #if !TARGET_API_MAC_CARBON -static PyObject *Win_SetDeskCPat(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Win_SetDeskCPat(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; PixPatHandle deskPixPat; @@ -2596,9 +2351,7 @@ static PyObject *Win_SetDeskCPat(_self, _args) } #endif -static PyObject *Win_CheckUpdate(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Win_CheckUpdate(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Boolean _rv; @@ -2612,9 +2365,7 @@ static PyObject *Win_CheckUpdate(_self, _args) return _res; } -static PyObject *Win_MacFindWindow(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Win_MacFindWindow(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; WindowPartCode _rv; @@ -2631,9 +2382,7 @@ static PyObject *Win_MacFindWindow(_self, _args) return _res; } -static PyObject *Win_FrontWindow(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Win_FrontWindow(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; WindowPtr _rv; @@ -2645,9 +2394,7 @@ static PyObject *Win_FrontWindow(_self, _args) return _res; } -static PyObject *Win_FrontNonFloatingWindow(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Win_FrontNonFloatingWindow(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; WindowPtr _rv; @@ -2661,9 +2408,7 @@ static PyObject *Win_FrontNonFloatingWindow(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *Win_GetFrontWindowOfClass(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Win_GetFrontWindowOfClass(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; WindowPtr _rv; @@ -2683,9 +2428,7 @@ static PyObject *Win_GetFrontWindowOfClass(_self, _args) #if TARGET_API_MAC_CARBON -static PyObject *Win_FindWindowOfClass(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Win_FindWindowOfClass(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -2711,9 +2454,7 @@ static PyObject *Win_FindWindowOfClass(_self, _args) #if !TARGET_API_MAC_CARBON -static PyObject *Win_InitWindows(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Win_InitWindows(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; if (!PyArg_ParseTuple(_args, "")) @@ -2727,9 +2468,7 @@ static PyObject *Win_InitWindows(_self, _args) #if !TARGET_API_MAC_CARBON -static PyObject *Win_GetWMgrPort(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Win_GetWMgrPort(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; GrafPtr wPort; @@ -2744,9 +2483,7 @@ static PyObject *Win_GetWMgrPort(_self, _args) #if !TARGET_API_MAC_CARBON -static PyObject *Win_GetCWMgrPort(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Win_GetCWMgrPort(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; CGrafPtr wMgrCPort; @@ -2761,9 +2498,7 @@ static PyObject *Win_GetCWMgrPort(_self, _args) #if !TARGET_API_MAC_CARBON -static PyObject *Win_InitFloatingWindows(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Win_InitFloatingWindows(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -2779,9 +2514,7 @@ static PyObject *Win_InitFloatingWindows(_self, _args) #if !TARGET_API_MAC_CARBON -static PyObject *Win_InvalRect(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Win_InvalRect(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Rect badRect; @@ -2797,9 +2530,7 @@ static PyObject *Win_InvalRect(_self, _args) #if !TARGET_API_MAC_CARBON -static PyObject *Win_InvalRgn(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Win_InvalRgn(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; RgnHandle badRgn; @@ -2815,9 +2546,7 @@ static PyObject *Win_InvalRgn(_self, _args) #if !TARGET_API_MAC_CARBON -static PyObject *Win_ValidRect(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Win_ValidRect(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; Rect goodRect; @@ -2833,9 +2562,7 @@ static PyObject *Win_ValidRect(_self, _args) #if !TARGET_API_MAC_CARBON -static PyObject *Win_ValidRgn(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Win_ValidRgn(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; RgnHandle goodRgn; @@ -2849,9 +2576,7 @@ static PyObject *Win_ValidRgn(_self, _args) } #endif -static PyObject *Win_CollapseAllWindows(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Win_CollapseAllWindows(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; OSStatus _err; @@ -2866,9 +2591,7 @@ static PyObject *Win_CollapseAllWindows(_self, _args) return _res; } -static PyObject *Win_PinRect(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Win_PinRect(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; long _rv; @@ -2885,9 +2608,7 @@ static PyObject *Win_PinRect(_self, _args) return _res; } -static PyObject *Win_GetGrayRgn(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Win_GetGrayRgn(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; RgnHandle _rv; @@ -2899,9 +2620,7 @@ static PyObject *Win_GetGrayRgn(_self, _args) return _res; } -static PyObject *Win_GetWindowFromPort(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Win_GetWindowFromPort(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; WindowPtr _rv; @@ -2915,9 +2634,7 @@ static PyObject *Win_GetWindowFromPort(_self, _args) return _res; } -static PyObject *Win_WhichWindow(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Win_WhichWindow(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; @@ -2929,9 +2646,7 @@ static PyObject *Win_WhichWindow(_self, _args) } -static PyObject *Win_FindWindow(_self, _args) - PyObject *_self; - PyObject *_args; +static PyObject *Win_FindWindow(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; short _rv; @@ -3050,8 +2765,7 @@ static PyMethodDef Win_methods[] = { /* Return the object corresponding to the window, or NULL */ PyObject * -WinObj_WhichWindow(w) - WindowPtr w; +WinObj_WhichWindow(WindowPtr w) { PyObject *it; @@ -3071,16 +2785,16 @@ WinObj_WhichWindow(w) } -void initWin() +void initWin(void) { PyObject *m; PyObject *d; - PyMac_INIT_TOOLBOX_OBJECT_NEW(WinObj_New); - PyMac_INIT_TOOLBOX_OBJECT_NEW(WinObj_WhichWindow); - PyMac_INIT_TOOLBOX_OBJECT_CONVERT(WinObj_Convert); + PyMac_INIT_TOOLBOX_OBJECT_NEW(WindowPtr, WinObj_New); + PyMac_INIT_TOOLBOX_OBJECT_NEW(WindowPtr, WinObj_WhichWindow); + PyMac_INIT_TOOLBOX_OBJECT_CONVERT(WindowPtr, WinObj_Convert); m = Py_InitModule("Win", Win_methods); diff --git a/Mac/Modules/win/winsupport.py b/Mac/Modules/win/winsupport.py index e55d273c787..92d1f47d638 100644 --- a/Mac/Modules/win/winsupport.py +++ b/Mac/Modules/win/winsupport.py @@ -54,7 +54,11 @@ PropertyCreator = OSTypeType("PropertyCreator") PropertyTag = OSTypeType("PropertyTag") includestuff = includestuff + """ -#include <%s>""" % MACHEADERFILE + """ +#ifdef WITHOUT_FRAMEWORKS +#include +#else +#include +#endif #ifdef USE_TOOLBOX_OBJECT_GLUE extern PyObject *_WinObj_New(WindowRef); @@ -92,8 +96,7 @@ finalstuff = finalstuff + """ /* Return the object corresponding to the window, or NULL */ PyObject * -WinObj_WhichWindow(w) - WindowPtr w; +WinObj_WhichWindow(WindowPtr w) { PyObject *it; @@ -114,9 +117,9 @@ WinObj_WhichWindow(w) """ initstuff = initstuff + """ - PyMac_INIT_TOOLBOX_OBJECT_NEW(WinObj_New); - PyMac_INIT_TOOLBOX_OBJECT_NEW(WinObj_WhichWindow); - PyMac_INIT_TOOLBOX_OBJECT_CONVERT(WinObj_Convert); + PyMac_INIT_TOOLBOX_OBJECT_NEW(WindowPtr, WinObj_New); + PyMac_INIT_TOOLBOX_OBJECT_NEW(WindowPtr, WinObj_WhichWindow); + PyMac_INIT_TOOLBOX_OBJECT_CONVERT(WindowPtr, WinObj_Convert); """ class MyObjectDefinition(GlobalObjectDefinition): @@ -164,10 +167,7 @@ class MyObjectDefinition(GlobalObjectDefinition): def outputCompare(self): Output() - Output("static int %s_compare(self, other)", self.prefix) - IndentLevel() - Output("%s *self, *other;", self.objecttype) - DedentLevel() + Output("static int %s_compare(%s *self, %s *other)", self.prefix, self.objecttype, self.objecttype) OutLbrace() Output("if ( self->ob_itself > other->ob_itself ) return 1;") Output("if ( self->ob_itself < other->ob_itself ) return -1;") @@ -176,20 +176,14 @@ class MyObjectDefinition(GlobalObjectDefinition): def outputHash(self): Output() - Output("static int %s_hash(self)", self.prefix) - IndentLevel() - Output("%s *self;", self.objecttype) - DedentLevel() + Output("static int %s_hash(%s *self)", self.prefix, self.objecttype) OutLbrace() Output("return (int)self->ob_itself;") OutRbrace() def outputRepr(self): Output() - Output("static PyObject * %s_repr(self)", self.prefix) - IndentLevel() - Output("%s *self;", self.objecttype) - DedentLevel() + Output("static PyObject * %s_repr(%s *self)", self.prefix, self.objecttype) OutLbrace() Output("char buf[100];") Output("""sprintf(buf, "", self, self->ob_itself);""")