if (AE_Error == NULL ||
PyDict_SetItemString(d, "Error", AE_Error) != 0)
Py_FatalError("can't initialize AE.Error");
+ AEDesc_Type.ob_type = &PyType_Type;
+ Py_INCREF(&AEDesc_Type);
+ if (PyDict_SetItemString(d, "AEDescType", (PyObject *)&AEDesc_Type) != 0)
+ Py_FatalError("can't initialize AEDescType");
}
/* ========================= End module AE ========================== */
if (Cm_Error == NULL ||
PyDict_SetItemString(d, "Error", Cm_Error) != 0)
Py_FatalError("can't initialize Cm.Error");
+ ComponentInstance_Type.ob_type = &PyType_Type;
+ Py_INCREF(&ComponentInstance_Type);
+ if (PyDict_SetItemString(d, "ComponentInstanceType", (PyObject *)&ComponentInstance_Type) != 0)
+ Py_FatalError("can't initialize ComponentInstanceType");
+ Component_Type.ob_type = &PyType_Type;
+ Py_INCREF(&Component_Type);
+ if (PyDict_SetItemString(d, "ComponentType", (PyObject *)&Component_Type) != 0)
+ Py_FatalError("can't initialize ComponentType");
}
/* ========================= End module Cm ========================== */
statichere PyTypeObject ctbcmtype = {
PyObject_HEAD_INIT(&PyType_Type)
0, /*ob_size*/
- "ctbcm", /*tp_name*/
+ "CTBConnectionMgr", /*tp_name*/
sizeof(ctbcmobject), /*tp_basicsize*/
0, /*tp_itemsize*/
/* methods */
ErrorObject = PyString_FromString("ctb.error");
PyDict_SetItemString(d, "error", ErrorObject);
+ ctbcmtype.ob_type = &PyType_Type;
+ Py_INCREF(&ctbcmtype);
+ PyDict_SetItemString(d, "CTBConnectionMgrType", (PyObject *)&ctbcmtype);
/* Check for errors */
if (PyErr_Occurred())
if (Ctl_Error == NULL ||
PyDict_SetItemString(d, "Error", Ctl_Error) != 0)
Py_FatalError("can't initialize Ctl.Error");
+ Control_Type.ob_type = &PyType_Type;
+ Py_INCREF(&Control_Type);
+ if (PyDict_SetItemString(d, "ControlType", (PyObject *)&Control_Type) != 0)
+ Py_FatalError("can't initialize ControlType");
}
/* ========================= End module Ctl ========================= */
if (!PyArg_ParseTuple(_args, ""))
return NULL;
if ( _self->ob_itself ) {
- SetCRefCon(_self->ob_itself, (long)0); /* Make it forget about us */
+ SetControlReference(_self->ob_itself, (long)0); /* Make it forget about us */
DisposeControl(_self->ob_itself);
_self->ob_itself = NULL;
}
if (Dlg_Error == NULL ||
PyDict_SetItemString(d, "Error", Dlg_Error) != 0)
Py_FatalError("can't initialize Dlg.Error");
+ Dialog_Type.ob_type = &PyType_Type;
+ Py_INCREF(&Dialog_Type);
+ if (PyDict_SetItemString(d, "DialogType", (PyObject *)&Dialog_Type) != 0)
+ Py_FatalError("can't initialize DialogType");
}
/* ========================= End module Dlg ========================= */
_err = HMGetHelpMenuHandle(&mh);
if (_err != noErr) return PyMac_Error(_err);
_res = Py_BuildValue("O&",
- ResObj_New, mh);
+ MenuObj_New, mh);
return _res;
}
from macsupport import *
# Create the type objects
-MenuRef = OpaqueByValueType("MenuRef", "ResObj")
+MenuRef = OpaqueByValueType("MenuRef", "MenuObj")
#WindowPeek = OpaqueByValueType("WindowPeek", OBJECTPREFIX)
if (List_Error == NULL ||
PyDict_SetItemString(d, "Error", List_Error) != 0)
Py_FatalError("can't initialize List.Error");
+ List_Type.ob_type = &PyType_Type;
+ Py_INCREF(&List_Type);
+ if (PyDict_SetItemString(d, "ListType", (PyObject *)&List_Type) != 0)
+ Py_FatalError("can't initialize ListType");
}
/* ======================== End module List ========================= */
static PyTypeObject Mfsitype = {
PyObject_HEAD_INIT(&PyType_Type)
0, /*ob_size*/
- "FInfo object", /*tp_name*/
+ "FInfo", /*tp_name*/
sizeof(mfsiobject), /*tp_basicsize*/
0, /*tp_itemsize*/
/* methods */
ErrorObject = PyString_FromString("macfs.error");
PyDict_SetItemString(d, "error", ErrorObject);
+ Mfsatype.ob_type = &PyType_Type;
+ Py_INCREF(&Mfsatype);
+ PyDict_SetItemString(d, "AliasType", (PyObject *)&Mfsatype);
+ Mfsstype.ob_type = &PyType_Type;
+ Py_INCREF(&Mfsstype);
+ PyDict_SetItemString(d, "FSSpecType", (PyObject *)&Mfsstype);
+ Mfsitype.ob_type = &PyType_Type;
+ Py_INCREF(&Mfsitype);
+ PyDict_SetItemString(d, "FInfoType", (PyObject *)&Mfsitype);
/* XXXX Add constants here */
/* Check for errors */
static PyTypeObject Rftype = {
PyObject_HEAD_INIT(&PyType_Type)
0, /*ob_size*/
- "Resource fork", /*tp_name*/
+ "ResourceFork", /*tp_name*/
sizeof(rfobject), /*tp_basicsize*/
0, /*tp_itemsize*/
/* methods */
MacOS_Error = PyMac_GetOSErrException();
if (MacOS_Error == NULL || PyDict_SetItemString(d, "Error", MacOS_Error) != 0)
Py_FatalError("can't define MacOS.Error");
+ Rftype.ob_type = &PyType_Type;
+ Py_INCREF(&Rftype);
+ if (PyDict_SetItemString(d, "ResourceForkType", (PyObject *)&Rftype) != 0)
+ Py_FatalError("can't define MacOS.ResourceForkType");
/*
** This is a hack: the following constant added to the id() of a string
** object gives you the address of the data. Unfortunately, it is needed for
if (Menu_Error == NULL ||
PyDict_SetItemString(d, "Error", Menu_Error) != 0)
Py_FatalError("can't initialize Menu.Error");
+ Menu_Type.ob_type = &PyType_Type;
+ Py_INCREF(&Menu_Type);
+ if (PyDict_SetItemString(d, "MenuType", (PyObject *)&Menu_Type) != 0)
+ Py_FatalError("can't initialize MenuType");
}
/* ======================== End module Menu ========================= */
if (Qd_Error == NULL ||
PyDict_SetItemString(d, "Error", Qd_Error) != 0)
Py_FatalError("can't initialize Qd.Error");
+ GrafPort_Type.ob_type = &PyType_Type;
+ Py_INCREF(&GrafPort_Type);
+ if (PyDict_SetItemString(d, "GrafPortType", (PyObject *)&GrafPort_Type) != 0)
+ Py_FatalError("can't initialize GrafPortType");
+ BitMap_Type.ob_type = &PyType_Type;
+ Py_INCREF(&BitMap_Type);
+ if (PyDict_SetItemString(d, "BitMapType", (PyObject *)&BitMap_Type) != 0)
+ Py_FatalError("can't initialize BitMapType");
+ QDGlobalsAccess_Type.ob_type = &PyType_Type;
+ Py_INCREF(&QDGlobalsAccess_Type);
+ if (PyDict_SetItemString(d, "QDGlobalsAccessType", (PyObject *)&QDGlobalsAccess_Type) != 0)
+ Py_FatalError("can't initialize QDGlobalsAccessType");
{
PyObject *o;
if (Qt_Error == NULL ||
PyDict_SetItemString(d, "Error", Qt_Error) != 0)
Py_FatalError("can't initialize Qt.Error");
+ MovieController_Type.ob_type = &PyType_Type;
+ Py_INCREF(&MovieController_Type);
+ if (PyDict_SetItemString(d, "MovieControllerType", (PyObject *)&MovieController_Type) != 0)
+ Py_FatalError("can't initialize MovieControllerType");
+ TimeBase_Type.ob_type = &PyType_Type;
+ Py_INCREF(&TimeBase_Type);
+ if (PyDict_SetItemString(d, "TimeBaseType", (PyObject *)&TimeBase_Type) != 0)
+ Py_FatalError("can't initialize TimeBaseType");
+ UserData_Type.ob_type = &PyType_Type;
+ Py_INCREF(&UserData_Type);
+ if (PyDict_SetItemString(d, "UserDataType", (PyObject *)&UserData_Type) != 0)
+ Py_FatalError("can't initialize UserDataType");
+ Media_Type.ob_type = &PyType_Type;
+ Py_INCREF(&Media_Type);
+ if (PyDict_SetItemString(d, "MediaType", (PyObject *)&Media_Type) != 0)
+ Py_FatalError("can't initialize MediaType");
+ Track_Type.ob_type = &PyType_Type;
+ Py_INCREF(&Track_Type);
+ if (PyDict_SetItemString(d, "TrackType", (PyObject *)&Track_Type) != 0)
+ Py_FatalError("can't initialize TrackType");
+ Movie_Type.ob_type = &PyType_Type;
+ Py_INCREF(&Movie_Type);
+ if (PyDict_SetItemString(d, "MovieType", (PyObject *)&Movie_Type) != 0)
+ Py_FatalError("can't initialize MovieType");
}
/* ========================= End module Qt ========================== */
if (Res_Error == NULL ||
PyDict_SetItemString(d, "Error", Res_Error) != 0)
Py_FatalError("can't initialize Res.Error");
+ Resource_Type.ob_type = &PyType_Type;
+ Py_INCREF(&Resource_Type);
+ if (PyDict_SetItemString(d, "ResourceType", (PyObject *)&Resource_Type) != 0)
+ Py_FatalError("can't initialize ResourceType");
}
/* ========================= End module Res ========================= */
if (Snd_Error == NULL ||
PyDict_SetItemString(d, "Error", Snd_Error) != 0)
Py_FatalError("can't initialize Snd.Error");
+ SndChannel_Type.ob_type = &PyType_Type;
+ Py_INCREF(&SndChannel_Type);
+ if (PyDict_SetItemString(d, "SndChannelType", (PyObject *)&SndChannel_Type) != 0)
+ Py_FatalError("can't initialize SndChannelType");
}
/* ========================= End module Snd ========================= */
if (TE_Error == NULL ||
PyDict_SetItemString(d, "Error", TE_Error) != 0)
Py_FatalError("can't initialize TE.Error");
+ TE_Type.ob_type = &PyType_Type;
+ Py_INCREF(&TE_Type);
+ if (PyDict_SetItemString(d, "TEType", (PyObject *)&TE_Type) != 0)
+ Py_FatalError("can't initialize TEType");
}
/* ========================= End module TE ========================== */
extern PyObject *WinObj_WhichWindow(WindowPtr);
#include <WASTE.h>
-#include <WETabs.h>
#include <WEObjectHandlers.h>
+#include <WETabs.h>
/* Exported by Qdmodule.c: */
extern PyObject *QdRGB_New(RGBColor *);
if (waste_Error == NULL ||
PyDict_SetItemString(d, "Error", waste_Error) != 0)
Py_FatalError("can't initialize waste.Error");
+ WEO_Type.ob_type = &PyType_Type;
+ Py_INCREF(&WEO_Type);
+ if (PyDict_SetItemString(d, "WEOType", (PyObject *)&WEO_Type) != 0)
+ Py_FatalError("can't initialize WEOType");
+ waste_Type.ob_type = &PyType_Type;
+ Py_INCREF(&waste_Type);
+ if (PyDict_SetItemString(d, "wasteType", (PyObject *)&waste_Type) != 0)
+ Py_FatalError("can't initialize wasteType");
callbackdict = PyDict_New();
if (callbackdict == NULL || PyDict_SetItemString(d, "callbacks", callbackdict) != 0)
if (Win_Error == NULL ||
PyDict_SetItemString(d, "Error", Win_Error) != 0)
Py_FatalError("can't initialize Win.Error");
+ Window_Type.ob_type = &PyType_Type;
+ Py_INCREF(&Window_Type);
+ if (PyDict_SetItemString(d, "WindowType", (PyObject *)&Window_Type) != 0)
+ Py_FatalError("can't initialize WindowType");
}
/* ========================= End module Win ========================= */