diff options
Diffstat (limited to 'Mac/Modules/ctl')
-rw-r--r-- | Mac/Modules/ctl/Ctlmodule.c | 10 | ||||
-rw-r--r-- | Mac/Modules/ctl/ctlsupport.py | 10 |
2 files changed, 20 insertions, 0 deletions
diff --git a/Mac/Modules/ctl/Ctlmodule.c b/Mac/Modules/ctl/Ctlmodule.c index 91df945..083929d 100644 --- a/Mac/Modules/ctl/Ctlmodule.c +++ b/Mac/Modules/ctl/Ctlmodule.c @@ -13,6 +13,14 @@ #include <ControlDefinitions.h> #endif +#ifdef USE_TOOLBOX_OBJECT_GLUE +extern PyObject *_CtlObj_New(ControlHandle); +extern int _CtlObj_Convert(PyObject *, ControlHandle *); + +#define CtlObj_New _CtlObj_New +#define CtlObj_Convert _CtlObj_Convert +#endif + staticforward PyObject *CtlObj_WhichControl(ControlHandle); #define as_Control(h) ((ControlHandle)h) @@ -2925,6 +2933,8 @@ void initCtl() 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); m = Py_InitModule("Ctl", Ctl_methods); diff --git a/Mac/Modules/ctl/ctlsupport.py b/Mac/Modules/ctl/ctlsupport.py index 557ff48..da28d04 100644 --- a/Mac/Modules/ctl/ctlsupport.py +++ b/Mac/Modules/ctl/ctlsupport.py @@ -54,6 +54,14 @@ includestuff = includestuff + """ #include <ControlDefinitions.h> #endif +#ifdef USE_TOOLBOX_OBJECT_GLUE +extern PyObject *_CtlObj_New(ControlHandle); +extern int _CtlObj_Convert(PyObject *, ControlHandle *); + +#define CtlObj_New _CtlObj_New +#define CtlObj_Convert _CtlObj_Convert +#endif + staticforward PyObject *CtlObj_WhichControl(ControlHandle); #define as_Control(h) ((ControlHandle)h) @@ -316,6 +324,8 @@ 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); """ class MyObjectDefinition(ObjectIdentityMixin, GlobalObjectDefinition): |