void init_Cm(void) { PyObject *m; PyObject *d; 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); d = PyModule_GetDict(m); Cm_Error = PyMac_GetOSErrException(); if (Cm_Error == NULL || PyDict_SetItemString(d, "Error", Cm_Error) != 0) return; ComponentInstance_Type.ob_type = &PyType_Type; if (PyType_Ready(&ComponentInstance_Type) < 0) return; Py_INCREF(&ComponentInstance_Type); PyModule_AddObject(m, "ComponentInstance", (PyObject *)&ComponentInstance_Type); /* Backward-compatible name */ Py_INCREF(&ComponentInstance_Type); PyModule_AddObject(m, "ComponentInstanceType", (PyObject *)&ComponentInstance_Type); Component_Type.ob_type = &PyType_Type; if (PyType_Ready(&Component_Type) < 0) return; Py_INCREF(&Component_Type); PyModule_AddObject(m, "Component", (PyObject *)&Component_Type); /* Backward-compatible name */ Py_INCREF(&Component_Type); PyModule_AddObject(m, "ComponentType", (PyObject *)&Component_Type); }
void init_Res(void) { PyObject *m; PyObject *d; 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); d = PyModule_GetDict(m); Res_Error = PyMac_GetOSErrException(); if (Res_Error == NULL || PyDict_SetItemString(d, "Error", Res_Error) != 0) return; Resource_Type.ob_type = &PyType_Type; if (PyType_Ready(&Resource_Type) < 0) return; Py_INCREF(&Resource_Type); PyModule_AddObject(m, "Resource", (PyObject *)&Resource_Type); /* Backward-compatible name */ Py_INCREF(&Resource_Type); PyModule_AddObject(m, "ResourceType", (PyObject *)&Resource_Type); }
void init_TE(void) { PyObject *m; #ifndef __LP64__ PyObject *d; PyMac_INIT_TOOLBOX_OBJECT_NEW(TEHandle, TEObj_New); PyMac_INIT_TOOLBOX_OBJECT_CONVERT(TEHandle, TEObj_Convert); #endif /* __LP64__ */ m = Py_InitModule("_TE", TE_methods); #ifndef __LP64__ d = PyModule_GetDict(m); TE_Error = PyMac_GetOSErrException(); if (TE_Error == NULL || PyDict_SetItemString(d, "Error", TE_Error) != 0) return; TE_Type.ob_type = &PyType_Type; if (PyType_Ready(&TE_Type) < 0) return; Py_INCREF(&TE_Type); PyModule_AddObject(m, "TE", (PyObject *)&TE_Type); /* Backward-compatible name */ Py_INCREF(&TE_Type); PyModule_AddObject(m, "TEType", (PyObject *)&TE_Type); #endif /* __LP64__ */ }
void init_Drag(void) { PyObject *m; PyObject *d; PyMac_INIT_TOOLBOX_OBJECT_NEW(DragRef, DragObj_New); PyMac_INIT_TOOLBOX_OBJECT_CONVERT(DragRef, DragObj_Convert); m = Py_InitModule("_Drag", Drag_methods); d = PyModule_GetDict(m); Drag_Error = PyMac_GetOSErrException(); if (Drag_Error == NULL || PyDict_SetItemString(d, "Error", Drag_Error) != 0) return; DragObj_Type.ob_type = &PyType_Type; if (PyType_Ready(&DragObj_Type) < 0) return; Py_INCREF(&DragObj_Type); PyModule_AddObject(m, "DragObj", (PyObject *)&DragObj_Type); /* Backward-compatible name */ Py_INCREF(&DragObj_Type); PyModule_AddObject(m, "DragObjType", (PyObject *)&DragObj_Type); dragglue_TrackingHandlerUPP = NewDragTrackingHandlerUPP(dragglue_TrackingHandler); dragglue_ReceiveHandlerUPP = NewDragReceiveHandlerUPP(dragglue_ReceiveHandler); dragglue_SendDataUPP = NewDragSendDataUPP(dragglue_SendData); #if 0 dragglue_InputUPP = NewDragInputUPP(dragglue_Input); dragglue_DrawingUPP = NewDragDrawingUPP(dragglue_Drawing); #endif }