mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Added PEP253 support to most Carbon modules. This isn't complete yet:
some of the more compilcated cases (CF, Res) haven't been done yet. Also, various types should inherit from each other (anything with an as_Resource method should be a Resource subtype, the CF types should become one family).
This commit is contained in:
parent
99899b92b8
commit
96cebde909
43 changed files with 1592 additions and 534 deletions
|
@ -869,6 +869,24 @@ static PyGetSetDef AEDesc_getsetlist[] = {
|
||||||
#define AEDesc_repr NULL
|
#define AEDesc_repr NULL
|
||||||
|
|
||||||
#define AEDesc_hash NULL
|
#define AEDesc_hash NULL
|
||||||
|
#define AEDesc_tp_init 0
|
||||||
|
|
||||||
|
#define AEDesc_tp_alloc PyType_GenericAlloc
|
||||||
|
|
||||||
|
static PyObject *AEDesc_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||||
|
{
|
||||||
|
PyObject *self;
|
||||||
|
AEDesc itself;
|
||||||
|
char *kw[] = {"itself", 0};
|
||||||
|
|
||||||
|
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, AEDesc_Convert, &itself)) return NULL;
|
||||||
|
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
|
||||||
|
((AEDescObject *)self)->ob_itself = itself;
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define AEDesc_tp_free PyObject_Del
|
||||||
|
|
||||||
|
|
||||||
PyTypeObject AEDesc_Type = {
|
PyTypeObject AEDesc_Type = {
|
||||||
PyObject_HEAD_INIT(NULL)
|
PyObject_HEAD_INIT(NULL)
|
||||||
|
@ -891,19 +909,27 @@ PyTypeObject AEDesc_Type = {
|
||||||
0, /*tp_str*/
|
0, /*tp_str*/
|
||||||
PyObject_GenericGetAttr, /*tp_getattro*/
|
PyObject_GenericGetAttr, /*tp_getattro*/
|
||||||
PyObject_GenericSetAttr, /*tp_setattro */
|
PyObject_GenericSetAttr, /*tp_setattro */
|
||||||
0, /*outputHook_tp_as_buffer*/
|
0, /*tp_as_buffer*/
|
||||||
0, /*outputHook_tp_flags*/
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||||
0, /*outputHook_tp_doc*/
|
0, /*tp_doc*/
|
||||||
0, /*outputHook_tp_traverse*/
|
0, /*tp_traverse*/
|
||||||
0, /*outputHook_tp_clear*/
|
0, /*tp_clear*/
|
||||||
0, /*outputHook_tp_richcompare*/
|
0, /*tp_richcompare*/
|
||||||
0, /*outputHook_tp_weaklistoffset*/
|
0, /*tp_weaklistoffset*/
|
||||||
0, /*outputHook_tp_iter*/
|
0, /*tp_iter*/
|
||||||
0, /*outputHook_tp_iternext*/
|
0, /*tp_iternext*/
|
||||||
AEDesc_methods, /* tp_methods */
|
AEDesc_methods, /* tp_methods */
|
||||||
0, /*outputHook_tp_members*/
|
0, /*tp_members*/
|
||||||
AEDesc_getsetlist, /*tp_getset*/
|
AEDesc_getsetlist, /*tp_getset*/
|
||||||
0, /*outputHook_tp_base*/
|
0, /*tp_base*/
|
||||||
|
0, /*tp_dict*/
|
||||||
|
0, /*tp_descr_get*/
|
||||||
|
0, /*tp_descr_set*/
|
||||||
|
0, /*tp_dictoffset*/
|
||||||
|
AEDesc_tp_init, /* tp_init */
|
||||||
|
AEDesc_tp_alloc, /* tp_alloc */
|
||||||
|
AEDesc_tp_new, /* tp_new */
|
||||||
|
AEDesc_tp_free, /* tp_free */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* --------------------- End object type AEDesc --------------------- */
|
/* --------------------- End object type AEDesc --------------------- */
|
||||||
|
@ -1429,8 +1455,10 @@ void init_AE(void)
|
||||||
return;
|
return;
|
||||||
AEDesc_Type.ob_type = &PyType_Type;
|
AEDesc_Type.ob_type = &PyType_Type;
|
||||||
Py_INCREF(&AEDesc_Type);
|
Py_INCREF(&AEDesc_Type);
|
||||||
if (PyDict_SetItemString(d, "AEDescType", (PyObject *)&AEDesc_Type) != 0)
|
PyModule_AddObject(m, "AEDesc", (PyObject *)&AEDesc_Type);
|
||||||
Py_FatalError("can't initialize AEDescType");
|
/* Backward-compatible name */
|
||||||
|
Py_INCREF(&AEDesc_Type);
|
||||||
|
PyModule_AddObject(m, "AEDescType", (PyObject *)&AEDesc_Type);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ========================= End module _AE ========================= */
|
/* ========================= End module _AE ========================= */
|
||||||
|
|
|
@ -174,7 +174,7 @@ initstuff = initstuff + """
|
||||||
|
|
||||||
module = MacModule('_AE', 'AE', includestuff, finalstuff, initstuff)
|
module = MacModule('_AE', 'AE', includestuff, finalstuff, initstuff)
|
||||||
|
|
||||||
class AEDescDefinition(PEP252Mixin, GlobalObjectDefinition):
|
class AEDescDefinition(PEP253Mixin, GlobalObjectDefinition):
|
||||||
getsetlist = [(
|
getsetlist = [(
|
||||||
'type',
|
'type',
|
||||||
'return PyMac_BuildOSType(self->ob_itself.descriptorType);',
|
'return PyMac_BuildOSType(self->ob_itself.descriptorType);',
|
||||||
|
|
|
@ -97,11 +97,30 @@ static PyMethodDef AliasObj_methods[] = {
|
||||||
|
|
||||||
#define AliasObj_getsetlist NULL
|
#define AliasObj_getsetlist NULL
|
||||||
|
|
||||||
|
|
||||||
#define AliasObj_compare NULL
|
#define AliasObj_compare NULL
|
||||||
|
|
||||||
#define AliasObj_repr NULL
|
#define AliasObj_repr NULL
|
||||||
|
|
||||||
#define AliasObj_hash NULL
|
#define AliasObj_hash NULL
|
||||||
|
#define AliasObj_tp_init 0
|
||||||
|
|
||||||
|
#define AliasObj_tp_alloc PyType_GenericAlloc
|
||||||
|
|
||||||
|
static PyObject *AliasObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||||
|
{
|
||||||
|
PyObject *self;
|
||||||
|
AliasHandle itself;
|
||||||
|
char *kw[] = {"itself", 0};
|
||||||
|
|
||||||
|
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, AliasObj_Convert, &itself)) return NULL;
|
||||||
|
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
|
||||||
|
((AliasObject *)self)->ob_itself = itself;
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define AliasObj_tp_free PyObject_Del
|
||||||
|
|
||||||
|
|
||||||
PyTypeObject Alias_Type = {
|
PyTypeObject Alias_Type = {
|
||||||
PyObject_HEAD_INIT(NULL)
|
PyObject_HEAD_INIT(NULL)
|
||||||
|
@ -124,19 +143,27 @@ PyTypeObject Alias_Type = {
|
||||||
0, /*tp_str*/
|
0, /*tp_str*/
|
||||||
PyObject_GenericGetAttr, /*tp_getattro*/
|
PyObject_GenericGetAttr, /*tp_getattro*/
|
||||||
PyObject_GenericSetAttr, /*tp_setattro */
|
PyObject_GenericSetAttr, /*tp_setattro */
|
||||||
0, /*outputHook_tp_as_buffer*/
|
0, /*tp_as_buffer*/
|
||||||
0, /*outputHook_tp_flags*/
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||||
0, /*outputHook_tp_doc*/
|
0, /*tp_doc*/
|
||||||
0, /*outputHook_tp_traverse*/
|
0, /*tp_traverse*/
|
||||||
0, /*outputHook_tp_clear*/
|
0, /*tp_clear*/
|
||||||
0, /*outputHook_tp_richcompare*/
|
0, /*tp_richcompare*/
|
||||||
0, /*outputHook_tp_weaklistoffset*/
|
0, /*tp_weaklistoffset*/
|
||||||
0, /*outputHook_tp_iter*/
|
0, /*tp_iter*/
|
||||||
0, /*outputHook_tp_iternext*/
|
0, /*tp_iternext*/
|
||||||
AliasObj_methods, /* tp_methods */
|
AliasObj_methods, /* tp_methods */
|
||||||
0, /*outputHook_tp_members*/
|
0, /*tp_members*/
|
||||||
AliasObj_getsetlist, /*tp_getset*/
|
AliasObj_getsetlist, /*tp_getset*/
|
||||||
0, /*outputHook_tp_base*/
|
0, /*tp_base*/
|
||||||
|
0, /*tp_dict*/
|
||||||
|
0, /*tp_descr_get*/
|
||||||
|
0, /*tp_descr_set*/
|
||||||
|
0, /*tp_dictoffset*/
|
||||||
|
AliasObj_tp_init, /* tp_init */
|
||||||
|
AliasObj_tp_alloc, /* tp_alloc */
|
||||||
|
AliasObj_tp_new, /* tp_new */
|
||||||
|
AliasObj_tp_free, /* tp_free */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* --------------------- End object type Alias ---------------------- */
|
/* --------------------- End object type Alias ---------------------- */
|
||||||
|
@ -665,8 +692,10 @@ void init_Alias(void)
|
||||||
return;
|
return;
|
||||||
Alias_Type.ob_type = &PyType_Type;
|
Alias_Type.ob_type = &PyType_Type;
|
||||||
Py_INCREF(&Alias_Type);
|
Py_INCREF(&Alias_Type);
|
||||||
if (PyDict_SetItemString(d, "AliasType", (PyObject *)&Alias_Type) != 0)
|
PyModule_AddObject(m, "Alias", (PyObject *)&Alias_Type);
|
||||||
Py_FatalError("can't initialize AliasType");
|
/* Backward-compatible name */
|
||||||
|
Py_INCREF(&Alias_Type);
|
||||||
|
PyModule_AddObject(m, "AliasType", (PyObject *)&Alias_Type);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ======================= End module _Alias ======================== */
|
/* ======================= End module _Alias ======================== */
|
||||||
|
|
|
@ -72,7 +72,8 @@ execfile(string.lower(MODPREFIX) + 'typetest.py')
|
||||||
# Create the generator groups and link them
|
# Create the generator groups and link them
|
||||||
module = MacModule(MODNAME, MODPREFIX, includestuff, finalstuff, initstuff)
|
module = MacModule(MODNAME, MODPREFIX, includestuff, finalstuff, initstuff)
|
||||||
|
|
||||||
class AliasDefinition(PEP252Mixin, GlobalObjectDefinition):
|
class AliasDefinition(PEP253Mixin, GlobalObjectDefinition):
|
||||||
|
# XXXX Should inherit from resource?
|
||||||
|
|
||||||
def outputCheckNewArg(self):
|
def outputCheckNewArg(self):
|
||||||
Output("if (itself == NULL) return PyMac_Error(resNotFound);")
|
Output("if (itself == NULL) return PyMac_Error(resNotFound);")
|
||||||
|
|
|
@ -115,11 +115,30 @@ static PyMethodDef ThemeDrawingStateObj_methods[] = {
|
||||||
|
|
||||||
#define ThemeDrawingStateObj_getsetlist NULL
|
#define ThemeDrawingStateObj_getsetlist NULL
|
||||||
|
|
||||||
|
|
||||||
#define ThemeDrawingStateObj_compare NULL
|
#define ThemeDrawingStateObj_compare NULL
|
||||||
|
|
||||||
#define ThemeDrawingStateObj_repr NULL
|
#define ThemeDrawingStateObj_repr NULL
|
||||||
|
|
||||||
#define ThemeDrawingStateObj_hash NULL
|
#define ThemeDrawingStateObj_hash NULL
|
||||||
|
#define ThemeDrawingStateObj_tp_init 0
|
||||||
|
|
||||||
|
#define ThemeDrawingStateObj_tp_alloc PyType_GenericAlloc
|
||||||
|
|
||||||
|
static PyObject *ThemeDrawingStateObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||||
|
{
|
||||||
|
PyObject *self;
|
||||||
|
ThemeDrawingState itself;
|
||||||
|
char *kw[] = {"itself", 0};
|
||||||
|
|
||||||
|
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, ThemeDrawingStateObj_Convert, &itself)) return NULL;
|
||||||
|
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
|
||||||
|
((ThemeDrawingStateObject *)self)->ob_itself = itself;
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define ThemeDrawingStateObj_tp_free PyObject_Del
|
||||||
|
|
||||||
|
|
||||||
PyTypeObject ThemeDrawingState_Type = {
|
PyTypeObject ThemeDrawingState_Type = {
|
||||||
PyObject_HEAD_INIT(NULL)
|
PyObject_HEAD_INIT(NULL)
|
||||||
|
@ -142,19 +161,27 @@ PyTypeObject ThemeDrawingState_Type = {
|
||||||
0, /*tp_str*/
|
0, /*tp_str*/
|
||||||
PyObject_GenericGetAttr, /*tp_getattro*/
|
PyObject_GenericGetAttr, /*tp_getattro*/
|
||||||
PyObject_GenericSetAttr, /*tp_setattro */
|
PyObject_GenericSetAttr, /*tp_setattro */
|
||||||
0, /*outputHook_tp_as_buffer*/
|
0, /*tp_as_buffer*/
|
||||||
0, /*outputHook_tp_flags*/
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||||
0, /*outputHook_tp_doc*/
|
0, /*tp_doc*/
|
||||||
0, /*outputHook_tp_traverse*/
|
0, /*tp_traverse*/
|
||||||
0, /*outputHook_tp_clear*/
|
0, /*tp_clear*/
|
||||||
0, /*outputHook_tp_richcompare*/
|
0, /*tp_richcompare*/
|
||||||
0, /*outputHook_tp_weaklistoffset*/
|
0, /*tp_weaklistoffset*/
|
||||||
0, /*outputHook_tp_iter*/
|
0, /*tp_iter*/
|
||||||
0, /*outputHook_tp_iternext*/
|
0, /*tp_iternext*/
|
||||||
ThemeDrawingStateObj_methods, /* tp_methods */
|
ThemeDrawingStateObj_methods, /* tp_methods */
|
||||||
0, /*outputHook_tp_members*/
|
0, /*tp_members*/
|
||||||
ThemeDrawingStateObj_getsetlist, /*tp_getset*/
|
ThemeDrawingStateObj_getsetlist, /*tp_getset*/
|
||||||
0, /*outputHook_tp_base*/
|
0, /*tp_base*/
|
||||||
|
0, /*tp_dict*/
|
||||||
|
0, /*tp_descr_get*/
|
||||||
|
0, /*tp_descr_set*/
|
||||||
|
0, /*tp_dictoffset*/
|
||||||
|
ThemeDrawingStateObj_tp_init, /* tp_init */
|
||||||
|
ThemeDrawingStateObj_tp_alloc, /* tp_alloc */
|
||||||
|
ThemeDrawingStateObj_tp_new, /* tp_new */
|
||||||
|
ThemeDrawingStateObj_tp_free, /* tp_free */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* --------------- End object type ThemeDrawingState ---------------- */
|
/* --------------- End object type ThemeDrawingState ---------------- */
|
||||||
|
@ -1822,8 +1849,10 @@ void init_App(void)
|
||||||
return;
|
return;
|
||||||
ThemeDrawingState_Type.ob_type = &PyType_Type;
|
ThemeDrawingState_Type.ob_type = &PyType_Type;
|
||||||
Py_INCREF(&ThemeDrawingState_Type);
|
Py_INCREF(&ThemeDrawingState_Type);
|
||||||
if (PyDict_SetItemString(d, "ThemeDrawingStateType", (PyObject *)&ThemeDrawingState_Type) != 0)
|
PyModule_AddObject(m, "ThemeDrawingState", (PyObject *)&ThemeDrawingState_Type);
|
||||||
Py_FatalError("can't initialize ThemeDrawingStateType");
|
/* Backward-compatible name */
|
||||||
|
Py_INCREF(&ThemeDrawingState_Type);
|
||||||
|
PyModule_AddObject(m, "ThemeDrawingStateType", (PyObject *)&ThemeDrawingState_Type);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ======================== End module _App ========================= */
|
/* ======================== End module _App ========================= */
|
||||||
|
|
|
@ -94,7 +94,7 @@ int ThemeButtonDrawInfo_Convert(PyObject *v, ThemeButtonDrawInfo *p_itself)
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
class MyObjectDefinition(PEP252Mixin, GlobalObjectDefinition):
|
class MyObjectDefinition(PEP253Mixin, GlobalObjectDefinition):
|
||||||
pass
|
pass
|
||||||
## def outputCheckNewArg(self):
|
## def outputCheckNewArg(self):
|
||||||
## Output("if (itself == NULL) return PyMac_Error(resNotFound);")
|
## Output("if (itself == NULL) return PyMac_Error(resNotFound);")
|
||||||
|
|
|
@ -215,7 +215,7 @@ module = MacModule('_CarbonEvt', 'CarbonEvents', includestuff, finalstuff, inits
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class EventHandlerRefObjectDefinition(PEP252Mixin, GlobalObjectDefinition):
|
class EventHandlerRefObjectDefinition(PEP253Mixin, GlobalObjectDefinition):
|
||||||
def outputStructMembers(self):
|
def outputStructMembers(self):
|
||||||
Output("%s ob_itself;", self.itselftype)
|
Output("%s ob_itself;", self.itselftype)
|
||||||
Output("PyObject *ob_callback;")
|
Output("PyObject *ob_callback;")
|
||||||
|
@ -228,7 +228,7 @@ class EventHandlerRefObjectDefinition(PEP252Mixin, GlobalObjectDefinition):
|
||||||
Output("Py_DECREF(self->ob_callback);")
|
Output("Py_DECREF(self->ob_callback);")
|
||||||
OutRbrace()
|
OutRbrace()
|
||||||
|
|
||||||
class MyGlobalObjectDefinition(PEP252Mixin, GlobalObjectDefinition):
|
class MyGlobalObjectDefinition(PEP253Mixin, GlobalObjectDefinition):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
for typ in RefObjectTypes:
|
for typ in RefObjectTypes:
|
||||||
|
|
|
@ -410,11 +410,30 @@ static PyMethodDef EventRef_methods[] = {
|
||||||
|
|
||||||
#define EventRef_getsetlist NULL
|
#define EventRef_getsetlist NULL
|
||||||
|
|
||||||
|
|
||||||
#define EventRef_compare NULL
|
#define EventRef_compare NULL
|
||||||
|
|
||||||
#define EventRef_repr NULL
|
#define EventRef_repr NULL
|
||||||
|
|
||||||
#define EventRef_hash NULL
|
#define EventRef_hash NULL
|
||||||
|
#define EventRef_tp_init 0
|
||||||
|
|
||||||
|
#define EventRef_tp_alloc PyType_GenericAlloc
|
||||||
|
|
||||||
|
static PyObject *EventRef_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||||
|
{
|
||||||
|
PyObject *self;
|
||||||
|
EventRef itself;
|
||||||
|
char *kw[] = {"itself", 0};
|
||||||
|
|
||||||
|
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, EventRef_Convert, &itself)) return NULL;
|
||||||
|
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
|
||||||
|
((EventRefObject *)self)->ob_itself = itself;
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define EventRef_tp_free PyObject_Del
|
||||||
|
|
||||||
|
|
||||||
PyTypeObject EventRef_Type = {
|
PyTypeObject EventRef_Type = {
|
||||||
PyObject_HEAD_INIT(NULL)
|
PyObject_HEAD_INIT(NULL)
|
||||||
|
@ -437,19 +456,27 @@ PyTypeObject EventRef_Type = {
|
||||||
0, /*tp_str*/
|
0, /*tp_str*/
|
||||||
PyObject_GenericGetAttr, /*tp_getattro*/
|
PyObject_GenericGetAttr, /*tp_getattro*/
|
||||||
PyObject_GenericSetAttr, /*tp_setattro */
|
PyObject_GenericSetAttr, /*tp_setattro */
|
||||||
0, /*outputHook_tp_as_buffer*/
|
0, /*tp_as_buffer*/
|
||||||
0, /*outputHook_tp_flags*/
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||||
0, /*outputHook_tp_doc*/
|
0, /*tp_doc*/
|
||||||
0, /*outputHook_tp_traverse*/
|
0, /*tp_traverse*/
|
||||||
0, /*outputHook_tp_clear*/
|
0, /*tp_clear*/
|
||||||
0, /*outputHook_tp_richcompare*/
|
0, /*tp_richcompare*/
|
||||||
0, /*outputHook_tp_weaklistoffset*/
|
0, /*tp_weaklistoffset*/
|
||||||
0, /*outputHook_tp_iter*/
|
0, /*tp_iter*/
|
||||||
0, /*outputHook_tp_iternext*/
|
0, /*tp_iternext*/
|
||||||
EventRef_methods, /* tp_methods */
|
EventRef_methods, /* tp_methods */
|
||||||
0, /*outputHook_tp_members*/
|
0, /*tp_members*/
|
||||||
EventRef_getsetlist, /*tp_getset*/
|
EventRef_getsetlist, /*tp_getset*/
|
||||||
0, /*outputHook_tp_base*/
|
0, /*tp_base*/
|
||||||
|
0, /*tp_dict*/
|
||||||
|
0, /*tp_descr_get*/
|
||||||
|
0, /*tp_descr_set*/
|
||||||
|
0, /*tp_dictoffset*/
|
||||||
|
EventRef_tp_init, /* tp_init */
|
||||||
|
EventRef_tp_alloc, /* tp_alloc */
|
||||||
|
EventRef_tp_new, /* tp_new */
|
||||||
|
EventRef_tp_free, /* tp_free */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* -------------------- End object type EventRef -------------------- */
|
/* -------------------- End object type EventRef -------------------- */
|
||||||
|
@ -603,11 +630,30 @@ static PyMethodDef EventQueueRef_methods[] = {
|
||||||
|
|
||||||
#define EventQueueRef_getsetlist NULL
|
#define EventQueueRef_getsetlist NULL
|
||||||
|
|
||||||
|
|
||||||
#define EventQueueRef_compare NULL
|
#define EventQueueRef_compare NULL
|
||||||
|
|
||||||
#define EventQueueRef_repr NULL
|
#define EventQueueRef_repr NULL
|
||||||
|
|
||||||
#define EventQueueRef_hash NULL
|
#define EventQueueRef_hash NULL
|
||||||
|
#define EventQueueRef_tp_init 0
|
||||||
|
|
||||||
|
#define EventQueueRef_tp_alloc PyType_GenericAlloc
|
||||||
|
|
||||||
|
static PyObject *EventQueueRef_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||||
|
{
|
||||||
|
PyObject *self;
|
||||||
|
EventQueueRef itself;
|
||||||
|
char *kw[] = {"itself", 0};
|
||||||
|
|
||||||
|
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, EventQueueRef_Convert, &itself)) return NULL;
|
||||||
|
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
|
||||||
|
((EventQueueRefObject *)self)->ob_itself = itself;
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define EventQueueRef_tp_free PyObject_Del
|
||||||
|
|
||||||
|
|
||||||
PyTypeObject EventQueueRef_Type = {
|
PyTypeObject EventQueueRef_Type = {
|
||||||
PyObject_HEAD_INIT(NULL)
|
PyObject_HEAD_INIT(NULL)
|
||||||
|
@ -630,19 +676,27 @@ PyTypeObject EventQueueRef_Type = {
|
||||||
0, /*tp_str*/
|
0, /*tp_str*/
|
||||||
PyObject_GenericGetAttr, /*tp_getattro*/
|
PyObject_GenericGetAttr, /*tp_getattro*/
|
||||||
PyObject_GenericSetAttr, /*tp_setattro */
|
PyObject_GenericSetAttr, /*tp_setattro */
|
||||||
0, /*outputHook_tp_as_buffer*/
|
0, /*tp_as_buffer*/
|
||||||
0, /*outputHook_tp_flags*/
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||||
0, /*outputHook_tp_doc*/
|
0, /*tp_doc*/
|
||||||
0, /*outputHook_tp_traverse*/
|
0, /*tp_traverse*/
|
||||||
0, /*outputHook_tp_clear*/
|
0, /*tp_clear*/
|
||||||
0, /*outputHook_tp_richcompare*/
|
0, /*tp_richcompare*/
|
||||||
0, /*outputHook_tp_weaklistoffset*/
|
0, /*tp_weaklistoffset*/
|
||||||
0, /*outputHook_tp_iter*/
|
0, /*tp_iter*/
|
||||||
0, /*outputHook_tp_iternext*/
|
0, /*tp_iternext*/
|
||||||
EventQueueRef_methods, /* tp_methods */
|
EventQueueRef_methods, /* tp_methods */
|
||||||
0, /*outputHook_tp_members*/
|
0, /*tp_members*/
|
||||||
EventQueueRef_getsetlist, /*tp_getset*/
|
EventQueueRef_getsetlist, /*tp_getset*/
|
||||||
0, /*outputHook_tp_base*/
|
0, /*tp_base*/
|
||||||
|
0, /*tp_dict*/
|
||||||
|
0, /*tp_descr_get*/
|
||||||
|
0, /*tp_descr_set*/
|
||||||
|
0, /*tp_dictoffset*/
|
||||||
|
EventQueueRef_tp_init, /* tp_init */
|
||||||
|
EventQueueRef_tp_alloc, /* tp_alloc */
|
||||||
|
EventQueueRef_tp_new, /* tp_new */
|
||||||
|
EventQueueRef_tp_free, /* tp_free */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* ----------------- End object type EventQueueRef ------------------ */
|
/* ----------------- End object type EventQueueRef ------------------ */
|
||||||
|
@ -705,11 +759,30 @@ static PyMethodDef EventLoopRef_methods[] = {
|
||||||
|
|
||||||
#define EventLoopRef_getsetlist NULL
|
#define EventLoopRef_getsetlist NULL
|
||||||
|
|
||||||
|
|
||||||
#define EventLoopRef_compare NULL
|
#define EventLoopRef_compare NULL
|
||||||
|
|
||||||
#define EventLoopRef_repr NULL
|
#define EventLoopRef_repr NULL
|
||||||
|
|
||||||
#define EventLoopRef_hash NULL
|
#define EventLoopRef_hash NULL
|
||||||
|
#define EventLoopRef_tp_init 0
|
||||||
|
|
||||||
|
#define EventLoopRef_tp_alloc PyType_GenericAlloc
|
||||||
|
|
||||||
|
static PyObject *EventLoopRef_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||||
|
{
|
||||||
|
PyObject *self;
|
||||||
|
EventLoopRef itself;
|
||||||
|
char *kw[] = {"itself", 0};
|
||||||
|
|
||||||
|
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, EventLoopRef_Convert, &itself)) return NULL;
|
||||||
|
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
|
||||||
|
((EventLoopRefObject *)self)->ob_itself = itself;
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define EventLoopRef_tp_free PyObject_Del
|
||||||
|
|
||||||
|
|
||||||
PyTypeObject EventLoopRef_Type = {
|
PyTypeObject EventLoopRef_Type = {
|
||||||
PyObject_HEAD_INIT(NULL)
|
PyObject_HEAD_INIT(NULL)
|
||||||
|
@ -732,19 +805,27 @@ PyTypeObject EventLoopRef_Type = {
|
||||||
0, /*tp_str*/
|
0, /*tp_str*/
|
||||||
PyObject_GenericGetAttr, /*tp_getattro*/
|
PyObject_GenericGetAttr, /*tp_getattro*/
|
||||||
PyObject_GenericSetAttr, /*tp_setattro */
|
PyObject_GenericSetAttr, /*tp_setattro */
|
||||||
0, /*outputHook_tp_as_buffer*/
|
0, /*tp_as_buffer*/
|
||||||
0, /*outputHook_tp_flags*/
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||||
0, /*outputHook_tp_doc*/
|
0, /*tp_doc*/
|
||||||
0, /*outputHook_tp_traverse*/
|
0, /*tp_traverse*/
|
||||||
0, /*outputHook_tp_clear*/
|
0, /*tp_clear*/
|
||||||
0, /*outputHook_tp_richcompare*/
|
0, /*tp_richcompare*/
|
||||||
0, /*outputHook_tp_weaklistoffset*/
|
0, /*tp_weaklistoffset*/
|
||||||
0, /*outputHook_tp_iter*/
|
0, /*tp_iter*/
|
||||||
0, /*outputHook_tp_iternext*/
|
0, /*tp_iternext*/
|
||||||
EventLoopRef_methods, /* tp_methods */
|
EventLoopRef_methods, /* tp_methods */
|
||||||
0, /*outputHook_tp_members*/
|
0, /*tp_members*/
|
||||||
EventLoopRef_getsetlist, /*tp_getset*/
|
EventLoopRef_getsetlist, /*tp_getset*/
|
||||||
0, /*outputHook_tp_base*/
|
0, /*tp_base*/
|
||||||
|
0, /*tp_dict*/
|
||||||
|
0, /*tp_descr_get*/
|
||||||
|
0, /*tp_descr_set*/
|
||||||
|
0, /*tp_dictoffset*/
|
||||||
|
EventLoopRef_tp_init, /* tp_init */
|
||||||
|
EventLoopRef_tp_alloc, /* tp_alloc */
|
||||||
|
EventLoopRef_tp_new, /* tp_new */
|
||||||
|
EventLoopRef_tp_free, /* tp_free */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* ------------------ End object type EventLoopRef ------------------ */
|
/* ------------------ End object type EventLoopRef ------------------ */
|
||||||
|
@ -825,11 +906,30 @@ static PyMethodDef EventLoopTimerRef_methods[] = {
|
||||||
|
|
||||||
#define EventLoopTimerRef_getsetlist NULL
|
#define EventLoopTimerRef_getsetlist NULL
|
||||||
|
|
||||||
|
|
||||||
#define EventLoopTimerRef_compare NULL
|
#define EventLoopTimerRef_compare NULL
|
||||||
|
|
||||||
#define EventLoopTimerRef_repr NULL
|
#define EventLoopTimerRef_repr NULL
|
||||||
|
|
||||||
#define EventLoopTimerRef_hash NULL
|
#define EventLoopTimerRef_hash NULL
|
||||||
|
#define EventLoopTimerRef_tp_init 0
|
||||||
|
|
||||||
|
#define EventLoopTimerRef_tp_alloc PyType_GenericAlloc
|
||||||
|
|
||||||
|
static PyObject *EventLoopTimerRef_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||||
|
{
|
||||||
|
PyObject *self;
|
||||||
|
EventLoopTimerRef itself;
|
||||||
|
char *kw[] = {"itself", 0};
|
||||||
|
|
||||||
|
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, EventLoopTimerRef_Convert, &itself)) return NULL;
|
||||||
|
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
|
||||||
|
((EventLoopTimerRefObject *)self)->ob_itself = itself;
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define EventLoopTimerRef_tp_free PyObject_Del
|
||||||
|
|
||||||
|
|
||||||
PyTypeObject EventLoopTimerRef_Type = {
|
PyTypeObject EventLoopTimerRef_Type = {
|
||||||
PyObject_HEAD_INIT(NULL)
|
PyObject_HEAD_INIT(NULL)
|
||||||
|
@ -852,19 +952,27 @@ PyTypeObject EventLoopTimerRef_Type = {
|
||||||
0, /*tp_str*/
|
0, /*tp_str*/
|
||||||
PyObject_GenericGetAttr, /*tp_getattro*/
|
PyObject_GenericGetAttr, /*tp_getattro*/
|
||||||
PyObject_GenericSetAttr, /*tp_setattro */
|
PyObject_GenericSetAttr, /*tp_setattro */
|
||||||
0, /*outputHook_tp_as_buffer*/
|
0, /*tp_as_buffer*/
|
||||||
0, /*outputHook_tp_flags*/
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||||
0, /*outputHook_tp_doc*/
|
0, /*tp_doc*/
|
||||||
0, /*outputHook_tp_traverse*/
|
0, /*tp_traverse*/
|
||||||
0, /*outputHook_tp_clear*/
|
0, /*tp_clear*/
|
||||||
0, /*outputHook_tp_richcompare*/
|
0, /*tp_richcompare*/
|
||||||
0, /*outputHook_tp_weaklistoffset*/
|
0, /*tp_weaklistoffset*/
|
||||||
0, /*outputHook_tp_iter*/
|
0, /*tp_iter*/
|
||||||
0, /*outputHook_tp_iternext*/
|
0, /*tp_iternext*/
|
||||||
EventLoopTimerRef_methods, /* tp_methods */
|
EventLoopTimerRef_methods, /* tp_methods */
|
||||||
0, /*outputHook_tp_members*/
|
0, /*tp_members*/
|
||||||
EventLoopTimerRef_getsetlist, /*tp_getset*/
|
EventLoopTimerRef_getsetlist, /*tp_getset*/
|
||||||
0, /*outputHook_tp_base*/
|
0, /*tp_base*/
|
||||||
|
0, /*tp_dict*/
|
||||||
|
0, /*tp_descr_get*/
|
||||||
|
0, /*tp_descr_set*/
|
||||||
|
0, /*tp_dictoffset*/
|
||||||
|
EventLoopTimerRef_tp_init, /* tp_init */
|
||||||
|
EventLoopTimerRef_tp_alloc, /* tp_alloc */
|
||||||
|
EventLoopTimerRef_tp_new, /* tp_new */
|
||||||
|
EventLoopTimerRef_tp_free, /* tp_free */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* --------------- End object type EventLoopTimerRef ---------------- */
|
/* --------------- End object type EventLoopTimerRef ---------------- */
|
||||||
|
@ -990,11 +1098,30 @@ static PyMethodDef EventHandlerRef_methods[] = {
|
||||||
|
|
||||||
#define EventHandlerRef_getsetlist NULL
|
#define EventHandlerRef_getsetlist NULL
|
||||||
|
|
||||||
|
|
||||||
#define EventHandlerRef_compare NULL
|
#define EventHandlerRef_compare NULL
|
||||||
|
|
||||||
#define EventHandlerRef_repr NULL
|
#define EventHandlerRef_repr NULL
|
||||||
|
|
||||||
#define EventHandlerRef_hash NULL
|
#define EventHandlerRef_hash NULL
|
||||||
|
#define EventHandlerRef_tp_init 0
|
||||||
|
|
||||||
|
#define EventHandlerRef_tp_alloc PyType_GenericAlloc
|
||||||
|
|
||||||
|
static PyObject *EventHandlerRef_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||||
|
{
|
||||||
|
PyObject *self;
|
||||||
|
EventHandlerRef itself;
|
||||||
|
char *kw[] = {"itself", 0};
|
||||||
|
|
||||||
|
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, EventHandlerRef_Convert, &itself)) return NULL;
|
||||||
|
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
|
||||||
|
((EventHandlerRefObject *)self)->ob_itself = itself;
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define EventHandlerRef_tp_free PyObject_Del
|
||||||
|
|
||||||
|
|
||||||
PyTypeObject EventHandlerRef_Type = {
|
PyTypeObject EventHandlerRef_Type = {
|
||||||
PyObject_HEAD_INIT(NULL)
|
PyObject_HEAD_INIT(NULL)
|
||||||
|
@ -1017,19 +1144,27 @@ PyTypeObject EventHandlerRef_Type = {
|
||||||
0, /*tp_str*/
|
0, /*tp_str*/
|
||||||
PyObject_GenericGetAttr, /*tp_getattro*/
|
PyObject_GenericGetAttr, /*tp_getattro*/
|
||||||
PyObject_GenericSetAttr, /*tp_setattro */
|
PyObject_GenericSetAttr, /*tp_setattro */
|
||||||
0, /*outputHook_tp_as_buffer*/
|
0, /*tp_as_buffer*/
|
||||||
0, /*outputHook_tp_flags*/
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||||
0, /*outputHook_tp_doc*/
|
0, /*tp_doc*/
|
||||||
0, /*outputHook_tp_traverse*/
|
0, /*tp_traverse*/
|
||||||
0, /*outputHook_tp_clear*/
|
0, /*tp_clear*/
|
||||||
0, /*outputHook_tp_richcompare*/
|
0, /*tp_richcompare*/
|
||||||
0, /*outputHook_tp_weaklistoffset*/
|
0, /*tp_weaklistoffset*/
|
||||||
0, /*outputHook_tp_iter*/
|
0, /*tp_iter*/
|
||||||
0, /*outputHook_tp_iternext*/
|
0, /*tp_iternext*/
|
||||||
EventHandlerRef_methods, /* tp_methods */
|
EventHandlerRef_methods, /* tp_methods */
|
||||||
0, /*outputHook_tp_members*/
|
0, /*tp_members*/
|
||||||
EventHandlerRef_getsetlist, /*tp_getset*/
|
EventHandlerRef_getsetlist, /*tp_getset*/
|
||||||
0, /*outputHook_tp_base*/
|
0, /*tp_base*/
|
||||||
|
0, /*tp_dict*/
|
||||||
|
0, /*tp_descr_get*/
|
||||||
|
0, /*tp_descr_set*/
|
||||||
|
0, /*tp_dictoffset*/
|
||||||
|
EventHandlerRef_tp_init, /* tp_init */
|
||||||
|
EventHandlerRef_tp_alloc, /* tp_alloc */
|
||||||
|
EventHandlerRef_tp_new, /* tp_new */
|
||||||
|
EventHandlerRef_tp_free, /* tp_free */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* ---------------- End object type EventHandlerRef ----------------- */
|
/* ---------------- End object type EventHandlerRef ----------------- */
|
||||||
|
@ -1095,11 +1230,30 @@ static PyMethodDef EventHandlerCallRef_methods[] = {
|
||||||
|
|
||||||
#define EventHandlerCallRef_getsetlist NULL
|
#define EventHandlerCallRef_getsetlist NULL
|
||||||
|
|
||||||
|
|
||||||
#define EventHandlerCallRef_compare NULL
|
#define EventHandlerCallRef_compare NULL
|
||||||
|
|
||||||
#define EventHandlerCallRef_repr NULL
|
#define EventHandlerCallRef_repr NULL
|
||||||
|
|
||||||
#define EventHandlerCallRef_hash NULL
|
#define EventHandlerCallRef_hash NULL
|
||||||
|
#define EventHandlerCallRef_tp_init 0
|
||||||
|
|
||||||
|
#define EventHandlerCallRef_tp_alloc PyType_GenericAlloc
|
||||||
|
|
||||||
|
static PyObject *EventHandlerCallRef_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||||
|
{
|
||||||
|
PyObject *self;
|
||||||
|
EventHandlerCallRef itself;
|
||||||
|
char *kw[] = {"itself", 0};
|
||||||
|
|
||||||
|
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, EventHandlerCallRef_Convert, &itself)) return NULL;
|
||||||
|
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
|
||||||
|
((EventHandlerCallRefObject *)self)->ob_itself = itself;
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define EventHandlerCallRef_tp_free PyObject_Del
|
||||||
|
|
||||||
|
|
||||||
PyTypeObject EventHandlerCallRef_Type = {
|
PyTypeObject EventHandlerCallRef_Type = {
|
||||||
PyObject_HEAD_INIT(NULL)
|
PyObject_HEAD_INIT(NULL)
|
||||||
|
@ -1122,19 +1276,27 @@ PyTypeObject EventHandlerCallRef_Type = {
|
||||||
0, /*tp_str*/
|
0, /*tp_str*/
|
||||||
PyObject_GenericGetAttr, /*tp_getattro*/
|
PyObject_GenericGetAttr, /*tp_getattro*/
|
||||||
PyObject_GenericSetAttr, /*tp_setattro */
|
PyObject_GenericSetAttr, /*tp_setattro */
|
||||||
0, /*outputHook_tp_as_buffer*/
|
0, /*tp_as_buffer*/
|
||||||
0, /*outputHook_tp_flags*/
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||||
0, /*outputHook_tp_doc*/
|
0, /*tp_doc*/
|
||||||
0, /*outputHook_tp_traverse*/
|
0, /*tp_traverse*/
|
||||||
0, /*outputHook_tp_clear*/
|
0, /*tp_clear*/
|
||||||
0, /*outputHook_tp_richcompare*/
|
0, /*tp_richcompare*/
|
||||||
0, /*outputHook_tp_weaklistoffset*/
|
0, /*tp_weaklistoffset*/
|
||||||
0, /*outputHook_tp_iter*/
|
0, /*tp_iter*/
|
||||||
0, /*outputHook_tp_iternext*/
|
0, /*tp_iternext*/
|
||||||
EventHandlerCallRef_methods, /* tp_methods */
|
EventHandlerCallRef_methods, /* tp_methods */
|
||||||
0, /*outputHook_tp_members*/
|
0, /*tp_members*/
|
||||||
EventHandlerCallRef_getsetlist, /*tp_getset*/
|
EventHandlerCallRef_getsetlist, /*tp_getset*/
|
||||||
0, /*outputHook_tp_base*/
|
0, /*tp_base*/
|
||||||
|
0, /*tp_dict*/
|
||||||
|
0, /*tp_descr_get*/
|
||||||
|
0, /*tp_descr_set*/
|
||||||
|
0, /*tp_dictoffset*/
|
||||||
|
EventHandlerCallRef_tp_init, /* tp_init */
|
||||||
|
EventHandlerCallRef_tp_alloc, /* tp_alloc */
|
||||||
|
EventHandlerCallRef_tp_new, /* tp_new */
|
||||||
|
EventHandlerCallRef_tp_free, /* tp_free */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* -------------- End object type EventHandlerCallRef --------------- */
|
/* -------------- End object type EventHandlerCallRef --------------- */
|
||||||
|
@ -1222,11 +1384,30 @@ static PyMethodDef EventTargetRef_methods[] = {
|
||||||
|
|
||||||
#define EventTargetRef_getsetlist NULL
|
#define EventTargetRef_getsetlist NULL
|
||||||
|
|
||||||
|
|
||||||
#define EventTargetRef_compare NULL
|
#define EventTargetRef_compare NULL
|
||||||
|
|
||||||
#define EventTargetRef_repr NULL
|
#define EventTargetRef_repr NULL
|
||||||
|
|
||||||
#define EventTargetRef_hash NULL
|
#define EventTargetRef_hash NULL
|
||||||
|
#define EventTargetRef_tp_init 0
|
||||||
|
|
||||||
|
#define EventTargetRef_tp_alloc PyType_GenericAlloc
|
||||||
|
|
||||||
|
static PyObject *EventTargetRef_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||||
|
{
|
||||||
|
PyObject *self;
|
||||||
|
EventTargetRef itself;
|
||||||
|
char *kw[] = {"itself", 0};
|
||||||
|
|
||||||
|
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, EventTargetRef_Convert, &itself)) return NULL;
|
||||||
|
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
|
||||||
|
((EventTargetRefObject *)self)->ob_itself = itself;
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define EventTargetRef_tp_free PyObject_Del
|
||||||
|
|
||||||
|
|
||||||
PyTypeObject EventTargetRef_Type = {
|
PyTypeObject EventTargetRef_Type = {
|
||||||
PyObject_HEAD_INIT(NULL)
|
PyObject_HEAD_INIT(NULL)
|
||||||
|
@ -1249,19 +1430,27 @@ PyTypeObject EventTargetRef_Type = {
|
||||||
0, /*tp_str*/
|
0, /*tp_str*/
|
||||||
PyObject_GenericGetAttr, /*tp_getattro*/
|
PyObject_GenericGetAttr, /*tp_getattro*/
|
||||||
PyObject_GenericSetAttr, /*tp_setattro */
|
PyObject_GenericSetAttr, /*tp_setattro */
|
||||||
0, /*outputHook_tp_as_buffer*/
|
0, /*tp_as_buffer*/
|
||||||
0, /*outputHook_tp_flags*/
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||||
0, /*outputHook_tp_doc*/
|
0, /*tp_doc*/
|
||||||
0, /*outputHook_tp_traverse*/
|
0, /*tp_traverse*/
|
||||||
0, /*outputHook_tp_clear*/
|
0, /*tp_clear*/
|
||||||
0, /*outputHook_tp_richcompare*/
|
0, /*tp_richcompare*/
|
||||||
0, /*outputHook_tp_weaklistoffset*/
|
0, /*tp_weaklistoffset*/
|
||||||
0, /*outputHook_tp_iter*/
|
0, /*tp_iter*/
|
||||||
0, /*outputHook_tp_iternext*/
|
0, /*tp_iternext*/
|
||||||
EventTargetRef_methods, /* tp_methods */
|
EventTargetRef_methods, /* tp_methods */
|
||||||
0, /*outputHook_tp_members*/
|
0, /*tp_members*/
|
||||||
EventTargetRef_getsetlist, /*tp_getset*/
|
EventTargetRef_getsetlist, /*tp_getset*/
|
||||||
0, /*outputHook_tp_base*/
|
0, /*tp_base*/
|
||||||
|
0, /*tp_dict*/
|
||||||
|
0, /*tp_descr_get*/
|
||||||
|
0, /*tp_descr_set*/
|
||||||
|
0, /*tp_dictoffset*/
|
||||||
|
EventTargetRef_tp_init, /* tp_init */
|
||||||
|
EventTargetRef_tp_alloc, /* tp_alloc */
|
||||||
|
EventTargetRef_tp_new, /* tp_new */
|
||||||
|
EventTargetRef_tp_free, /* tp_free */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* ----------------- End object type EventTargetRef ----------------- */
|
/* ----------------- End object type EventTargetRef ----------------- */
|
||||||
|
@ -1324,11 +1513,30 @@ static PyMethodDef EventHotKeyRef_methods[] = {
|
||||||
|
|
||||||
#define EventHotKeyRef_getsetlist NULL
|
#define EventHotKeyRef_getsetlist NULL
|
||||||
|
|
||||||
|
|
||||||
#define EventHotKeyRef_compare NULL
|
#define EventHotKeyRef_compare NULL
|
||||||
|
|
||||||
#define EventHotKeyRef_repr NULL
|
#define EventHotKeyRef_repr NULL
|
||||||
|
|
||||||
#define EventHotKeyRef_hash NULL
|
#define EventHotKeyRef_hash NULL
|
||||||
|
#define EventHotKeyRef_tp_init 0
|
||||||
|
|
||||||
|
#define EventHotKeyRef_tp_alloc PyType_GenericAlloc
|
||||||
|
|
||||||
|
static PyObject *EventHotKeyRef_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||||
|
{
|
||||||
|
PyObject *self;
|
||||||
|
EventHotKeyRef itself;
|
||||||
|
char *kw[] = {"itself", 0};
|
||||||
|
|
||||||
|
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, EventHotKeyRef_Convert, &itself)) return NULL;
|
||||||
|
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
|
||||||
|
((EventHotKeyRefObject *)self)->ob_itself = itself;
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define EventHotKeyRef_tp_free PyObject_Del
|
||||||
|
|
||||||
|
|
||||||
PyTypeObject EventHotKeyRef_Type = {
|
PyTypeObject EventHotKeyRef_Type = {
|
||||||
PyObject_HEAD_INIT(NULL)
|
PyObject_HEAD_INIT(NULL)
|
||||||
|
@ -1351,19 +1559,27 @@ PyTypeObject EventHotKeyRef_Type = {
|
||||||
0, /*tp_str*/
|
0, /*tp_str*/
|
||||||
PyObject_GenericGetAttr, /*tp_getattro*/
|
PyObject_GenericGetAttr, /*tp_getattro*/
|
||||||
PyObject_GenericSetAttr, /*tp_setattro */
|
PyObject_GenericSetAttr, /*tp_setattro */
|
||||||
0, /*outputHook_tp_as_buffer*/
|
0, /*tp_as_buffer*/
|
||||||
0, /*outputHook_tp_flags*/
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||||
0, /*outputHook_tp_doc*/
|
0, /*tp_doc*/
|
||||||
0, /*outputHook_tp_traverse*/
|
0, /*tp_traverse*/
|
||||||
0, /*outputHook_tp_clear*/
|
0, /*tp_clear*/
|
||||||
0, /*outputHook_tp_richcompare*/
|
0, /*tp_richcompare*/
|
||||||
0, /*outputHook_tp_weaklistoffset*/
|
0, /*tp_weaklistoffset*/
|
||||||
0, /*outputHook_tp_iter*/
|
0, /*tp_iter*/
|
||||||
0, /*outputHook_tp_iternext*/
|
0, /*tp_iternext*/
|
||||||
EventHotKeyRef_methods, /* tp_methods */
|
EventHotKeyRef_methods, /* tp_methods */
|
||||||
0, /*outputHook_tp_members*/
|
0, /*tp_members*/
|
||||||
EventHotKeyRef_getsetlist, /*tp_getset*/
|
EventHotKeyRef_getsetlist, /*tp_getset*/
|
||||||
0, /*outputHook_tp_base*/
|
0, /*tp_base*/
|
||||||
|
0, /*tp_dict*/
|
||||||
|
0, /*tp_descr_get*/
|
||||||
|
0, /*tp_descr_set*/
|
||||||
|
0, /*tp_dictoffset*/
|
||||||
|
EventHotKeyRef_tp_init, /* tp_init */
|
||||||
|
EventHotKeyRef_tp_alloc, /* tp_alloc */
|
||||||
|
EventHotKeyRef_tp_new, /* tp_new */
|
||||||
|
EventHotKeyRef_tp_free, /* tp_free */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* ----------------- End object type EventHotKeyRef ----------------- */
|
/* ----------------- End object type EventHotKeyRef ----------------- */
|
||||||
|
@ -1942,36 +2158,52 @@ void init_CarbonEvt(void)
|
||||||
return;
|
return;
|
||||||
EventRef_Type.ob_type = &PyType_Type;
|
EventRef_Type.ob_type = &PyType_Type;
|
||||||
Py_INCREF(&EventRef_Type);
|
Py_INCREF(&EventRef_Type);
|
||||||
if (PyDict_SetItemString(d, "EventRefType", (PyObject *)&EventRef_Type) != 0)
|
PyModule_AddObject(m, "EventRef", (PyObject *)&EventRef_Type);
|
||||||
Py_FatalError("can't initialize EventRefType");
|
/* Backward-compatible name */
|
||||||
|
Py_INCREF(&EventRef_Type);
|
||||||
|
PyModule_AddObject(m, "EventRefType", (PyObject *)&EventRef_Type);
|
||||||
EventQueueRef_Type.ob_type = &PyType_Type;
|
EventQueueRef_Type.ob_type = &PyType_Type;
|
||||||
Py_INCREF(&EventQueueRef_Type);
|
Py_INCREF(&EventQueueRef_Type);
|
||||||
if (PyDict_SetItemString(d, "EventQueueRefType", (PyObject *)&EventQueueRef_Type) != 0)
|
PyModule_AddObject(m, "EventQueueRef", (PyObject *)&EventQueueRef_Type);
|
||||||
Py_FatalError("can't initialize EventQueueRefType");
|
/* Backward-compatible name */
|
||||||
|
Py_INCREF(&EventQueueRef_Type);
|
||||||
|
PyModule_AddObject(m, "EventQueueRefType", (PyObject *)&EventQueueRef_Type);
|
||||||
EventLoopRef_Type.ob_type = &PyType_Type;
|
EventLoopRef_Type.ob_type = &PyType_Type;
|
||||||
Py_INCREF(&EventLoopRef_Type);
|
Py_INCREF(&EventLoopRef_Type);
|
||||||
if (PyDict_SetItemString(d, "EventLoopRefType", (PyObject *)&EventLoopRef_Type) != 0)
|
PyModule_AddObject(m, "EventLoopRef", (PyObject *)&EventLoopRef_Type);
|
||||||
Py_FatalError("can't initialize EventLoopRefType");
|
/* Backward-compatible name */
|
||||||
|
Py_INCREF(&EventLoopRef_Type);
|
||||||
|
PyModule_AddObject(m, "EventLoopRefType", (PyObject *)&EventLoopRef_Type);
|
||||||
EventLoopTimerRef_Type.ob_type = &PyType_Type;
|
EventLoopTimerRef_Type.ob_type = &PyType_Type;
|
||||||
Py_INCREF(&EventLoopTimerRef_Type);
|
Py_INCREF(&EventLoopTimerRef_Type);
|
||||||
if (PyDict_SetItemString(d, "EventLoopTimerRefType", (PyObject *)&EventLoopTimerRef_Type) != 0)
|
PyModule_AddObject(m, "EventLoopTimerRef", (PyObject *)&EventLoopTimerRef_Type);
|
||||||
Py_FatalError("can't initialize EventLoopTimerRefType");
|
/* Backward-compatible name */
|
||||||
|
Py_INCREF(&EventLoopTimerRef_Type);
|
||||||
|
PyModule_AddObject(m, "EventLoopTimerRefType", (PyObject *)&EventLoopTimerRef_Type);
|
||||||
EventHandlerRef_Type.ob_type = &PyType_Type;
|
EventHandlerRef_Type.ob_type = &PyType_Type;
|
||||||
Py_INCREF(&EventHandlerRef_Type);
|
Py_INCREF(&EventHandlerRef_Type);
|
||||||
if (PyDict_SetItemString(d, "EventHandlerRefType", (PyObject *)&EventHandlerRef_Type) != 0)
|
PyModule_AddObject(m, "EventHandlerRef", (PyObject *)&EventHandlerRef_Type);
|
||||||
Py_FatalError("can't initialize EventHandlerRefType");
|
/* Backward-compatible name */
|
||||||
|
Py_INCREF(&EventHandlerRef_Type);
|
||||||
|
PyModule_AddObject(m, "EventHandlerRefType", (PyObject *)&EventHandlerRef_Type);
|
||||||
EventHandlerCallRef_Type.ob_type = &PyType_Type;
|
EventHandlerCallRef_Type.ob_type = &PyType_Type;
|
||||||
Py_INCREF(&EventHandlerCallRef_Type);
|
Py_INCREF(&EventHandlerCallRef_Type);
|
||||||
if (PyDict_SetItemString(d, "EventHandlerCallRefType", (PyObject *)&EventHandlerCallRef_Type) != 0)
|
PyModule_AddObject(m, "EventHandlerCallRef", (PyObject *)&EventHandlerCallRef_Type);
|
||||||
Py_FatalError("can't initialize EventHandlerCallRefType");
|
/* Backward-compatible name */
|
||||||
|
Py_INCREF(&EventHandlerCallRef_Type);
|
||||||
|
PyModule_AddObject(m, "EventHandlerCallRefType", (PyObject *)&EventHandlerCallRef_Type);
|
||||||
EventTargetRef_Type.ob_type = &PyType_Type;
|
EventTargetRef_Type.ob_type = &PyType_Type;
|
||||||
Py_INCREF(&EventTargetRef_Type);
|
Py_INCREF(&EventTargetRef_Type);
|
||||||
if (PyDict_SetItemString(d, "EventTargetRefType", (PyObject *)&EventTargetRef_Type) != 0)
|
PyModule_AddObject(m, "EventTargetRef", (PyObject *)&EventTargetRef_Type);
|
||||||
Py_FatalError("can't initialize EventTargetRefType");
|
/* Backward-compatible name */
|
||||||
|
Py_INCREF(&EventTargetRef_Type);
|
||||||
|
PyModule_AddObject(m, "EventTargetRefType", (PyObject *)&EventTargetRef_Type);
|
||||||
EventHotKeyRef_Type.ob_type = &PyType_Type;
|
EventHotKeyRef_Type.ob_type = &PyType_Type;
|
||||||
Py_INCREF(&EventHotKeyRef_Type);
|
Py_INCREF(&EventHotKeyRef_Type);
|
||||||
if (PyDict_SetItemString(d, "EventHotKeyRefType", (PyObject *)&EventHotKeyRef_Type) != 0)
|
PyModule_AddObject(m, "EventHotKeyRef", (PyObject *)&EventHotKeyRef_Type);
|
||||||
Py_FatalError("can't initialize EventHotKeyRefType");
|
/* Backward-compatible name */
|
||||||
|
Py_INCREF(&EventHotKeyRef_Type);
|
||||||
|
PyModule_AddObject(m, "EventHotKeyRefType", (PyObject *)&EventHotKeyRef_Type);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ===================== End module _CarbonEvt ====================== */
|
/* ===================== End module _CarbonEvt ====================== */
|
||||||
|
|
|
@ -4325,44 +4325,64 @@ void init_CF(void)
|
||||||
return;
|
return;
|
||||||
CFTypeRef_Type.ob_type = &PyType_Type;
|
CFTypeRef_Type.ob_type = &PyType_Type;
|
||||||
Py_INCREF(&CFTypeRef_Type);
|
Py_INCREF(&CFTypeRef_Type);
|
||||||
if (PyDict_SetItemString(d, "CFTypeRefType", (PyObject *)&CFTypeRef_Type) != 0)
|
PyModule_AddObject(m, "CFTypeRef", (PyObject *)&CFTypeRef_Type);
|
||||||
Py_FatalError("can't initialize CFTypeRefType");
|
/* Backward-compatible name */
|
||||||
|
Py_INCREF(&CFTypeRef_Type);
|
||||||
|
PyModule_AddObject(m, "CFTypeRefType", (PyObject *)&CFTypeRef_Type);
|
||||||
CFArrayRef_Type.ob_type = &PyType_Type;
|
CFArrayRef_Type.ob_type = &PyType_Type;
|
||||||
Py_INCREF(&CFArrayRef_Type);
|
Py_INCREF(&CFArrayRef_Type);
|
||||||
if (PyDict_SetItemString(d, "CFArrayRefType", (PyObject *)&CFArrayRef_Type) != 0)
|
PyModule_AddObject(m, "CFArrayRef", (PyObject *)&CFArrayRef_Type);
|
||||||
Py_FatalError("can't initialize CFArrayRefType");
|
/* Backward-compatible name */
|
||||||
|
Py_INCREF(&CFArrayRef_Type);
|
||||||
|
PyModule_AddObject(m, "CFArrayRefType", (PyObject *)&CFArrayRef_Type);
|
||||||
CFMutableArrayRef_Type.ob_type = &PyType_Type;
|
CFMutableArrayRef_Type.ob_type = &PyType_Type;
|
||||||
Py_INCREF(&CFMutableArrayRef_Type);
|
Py_INCREF(&CFMutableArrayRef_Type);
|
||||||
if (PyDict_SetItemString(d, "CFMutableArrayRefType", (PyObject *)&CFMutableArrayRef_Type) != 0)
|
PyModule_AddObject(m, "CFMutableArrayRef", (PyObject *)&CFMutableArrayRef_Type);
|
||||||
Py_FatalError("can't initialize CFMutableArrayRefType");
|
/* Backward-compatible name */
|
||||||
|
Py_INCREF(&CFMutableArrayRef_Type);
|
||||||
|
PyModule_AddObject(m, "CFMutableArrayRefType", (PyObject *)&CFMutableArrayRef_Type);
|
||||||
CFDictionaryRef_Type.ob_type = &PyType_Type;
|
CFDictionaryRef_Type.ob_type = &PyType_Type;
|
||||||
Py_INCREF(&CFDictionaryRef_Type);
|
Py_INCREF(&CFDictionaryRef_Type);
|
||||||
if (PyDict_SetItemString(d, "CFDictionaryRefType", (PyObject *)&CFDictionaryRef_Type) != 0)
|
PyModule_AddObject(m, "CFDictionaryRef", (PyObject *)&CFDictionaryRef_Type);
|
||||||
Py_FatalError("can't initialize CFDictionaryRefType");
|
/* Backward-compatible name */
|
||||||
|
Py_INCREF(&CFDictionaryRef_Type);
|
||||||
|
PyModule_AddObject(m, "CFDictionaryRefType", (PyObject *)&CFDictionaryRef_Type);
|
||||||
CFMutableDictionaryRef_Type.ob_type = &PyType_Type;
|
CFMutableDictionaryRef_Type.ob_type = &PyType_Type;
|
||||||
Py_INCREF(&CFMutableDictionaryRef_Type);
|
Py_INCREF(&CFMutableDictionaryRef_Type);
|
||||||
if (PyDict_SetItemString(d, "CFMutableDictionaryRefType", (PyObject *)&CFMutableDictionaryRef_Type) != 0)
|
PyModule_AddObject(m, "CFMutableDictionaryRef", (PyObject *)&CFMutableDictionaryRef_Type);
|
||||||
Py_FatalError("can't initialize CFMutableDictionaryRefType");
|
/* Backward-compatible name */
|
||||||
|
Py_INCREF(&CFMutableDictionaryRef_Type);
|
||||||
|
PyModule_AddObject(m, "CFMutableDictionaryRefType", (PyObject *)&CFMutableDictionaryRef_Type);
|
||||||
CFDataRef_Type.ob_type = &PyType_Type;
|
CFDataRef_Type.ob_type = &PyType_Type;
|
||||||
Py_INCREF(&CFDataRef_Type);
|
Py_INCREF(&CFDataRef_Type);
|
||||||
if (PyDict_SetItemString(d, "CFDataRefType", (PyObject *)&CFDataRef_Type) != 0)
|
PyModule_AddObject(m, "CFDataRef", (PyObject *)&CFDataRef_Type);
|
||||||
Py_FatalError("can't initialize CFDataRefType");
|
/* Backward-compatible name */
|
||||||
|
Py_INCREF(&CFDataRef_Type);
|
||||||
|
PyModule_AddObject(m, "CFDataRefType", (PyObject *)&CFDataRef_Type);
|
||||||
CFMutableDataRef_Type.ob_type = &PyType_Type;
|
CFMutableDataRef_Type.ob_type = &PyType_Type;
|
||||||
Py_INCREF(&CFMutableDataRef_Type);
|
Py_INCREF(&CFMutableDataRef_Type);
|
||||||
if (PyDict_SetItemString(d, "CFMutableDataRefType", (PyObject *)&CFMutableDataRef_Type) != 0)
|
PyModule_AddObject(m, "CFMutableDataRef", (PyObject *)&CFMutableDataRef_Type);
|
||||||
Py_FatalError("can't initialize CFMutableDataRefType");
|
/* Backward-compatible name */
|
||||||
|
Py_INCREF(&CFMutableDataRef_Type);
|
||||||
|
PyModule_AddObject(m, "CFMutableDataRefType", (PyObject *)&CFMutableDataRef_Type);
|
||||||
CFStringRef_Type.ob_type = &PyType_Type;
|
CFStringRef_Type.ob_type = &PyType_Type;
|
||||||
Py_INCREF(&CFStringRef_Type);
|
Py_INCREF(&CFStringRef_Type);
|
||||||
if (PyDict_SetItemString(d, "CFStringRefType", (PyObject *)&CFStringRef_Type) != 0)
|
PyModule_AddObject(m, "CFStringRef", (PyObject *)&CFStringRef_Type);
|
||||||
Py_FatalError("can't initialize CFStringRefType");
|
/* Backward-compatible name */
|
||||||
|
Py_INCREF(&CFStringRef_Type);
|
||||||
|
PyModule_AddObject(m, "CFStringRefType", (PyObject *)&CFStringRef_Type);
|
||||||
CFMutableStringRef_Type.ob_type = &PyType_Type;
|
CFMutableStringRef_Type.ob_type = &PyType_Type;
|
||||||
Py_INCREF(&CFMutableStringRef_Type);
|
Py_INCREF(&CFMutableStringRef_Type);
|
||||||
if (PyDict_SetItemString(d, "CFMutableStringRefType", (PyObject *)&CFMutableStringRef_Type) != 0)
|
PyModule_AddObject(m, "CFMutableStringRef", (PyObject *)&CFMutableStringRef_Type);
|
||||||
Py_FatalError("can't initialize CFMutableStringRefType");
|
/* Backward-compatible name */
|
||||||
|
Py_INCREF(&CFMutableStringRef_Type);
|
||||||
|
PyModule_AddObject(m, "CFMutableStringRefType", (PyObject *)&CFMutableStringRef_Type);
|
||||||
CFURLRef_Type.ob_type = &PyType_Type;
|
CFURLRef_Type.ob_type = &PyType_Type;
|
||||||
Py_INCREF(&CFURLRef_Type);
|
Py_INCREF(&CFURLRef_Type);
|
||||||
if (PyDict_SetItemString(d, "CFURLRefType", (PyObject *)&CFURLRef_Type) != 0)
|
PyModule_AddObject(m, "CFURLRef", (PyObject *)&CFURLRef_Type);
|
||||||
Py_FatalError("can't initialize CFURLRefType");
|
/* Backward-compatible name */
|
||||||
|
Py_INCREF(&CFURLRef_Type);
|
||||||
|
PyModule_AddObject(m, "CFURLRefType", (PyObject *)&CFURLRef_Type);
|
||||||
|
|
||||||
#define _STRINGCONST(name) PyModule_AddObject(m, #name, CFStringRefObj_New(name))
|
#define _STRINGCONST(name) PyModule_AddObject(m, #name, CFStringRefObj_New(name))
|
||||||
_STRINGCONST(kCFPreferencesAnyApplication);
|
_STRINGCONST(kCFPreferencesAnyApplication);
|
||||||
|
|
|
@ -1268,11 +1268,30 @@ static PyMethodDef CGContextRefObj_methods[] = {
|
||||||
|
|
||||||
#define CGContextRefObj_getsetlist NULL
|
#define CGContextRefObj_getsetlist NULL
|
||||||
|
|
||||||
|
|
||||||
#define CGContextRefObj_compare NULL
|
#define CGContextRefObj_compare NULL
|
||||||
|
|
||||||
#define CGContextRefObj_repr NULL
|
#define CGContextRefObj_repr NULL
|
||||||
|
|
||||||
#define CGContextRefObj_hash NULL
|
#define CGContextRefObj_hash NULL
|
||||||
|
#define CGContextRefObj_tp_init 0
|
||||||
|
|
||||||
|
#define CGContextRefObj_tp_alloc PyType_GenericAlloc
|
||||||
|
|
||||||
|
static PyObject *CGContextRefObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||||
|
{
|
||||||
|
PyObject *self;
|
||||||
|
CGContextRef itself;
|
||||||
|
char *kw[] = {"itself", 0};
|
||||||
|
|
||||||
|
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, CGContextRefObj_Convert, &itself)) return NULL;
|
||||||
|
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
|
||||||
|
((CGContextRefObject *)self)->ob_itself = itself;
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define CGContextRefObj_tp_free PyObject_Del
|
||||||
|
|
||||||
|
|
||||||
PyTypeObject CGContextRef_Type = {
|
PyTypeObject CGContextRef_Type = {
|
||||||
PyObject_HEAD_INIT(NULL)
|
PyObject_HEAD_INIT(NULL)
|
||||||
|
@ -1295,19 +1314,27 @@ PyTypeObject CGContextRef_Type = {
|
||||||
0, /*tp_str*/
|
0, /*tp_str*/
|
||||||
PyObject_GenericGetAttr, /*tp_getattro*/
|
PyObject_GenericGetAttr, /*tp_getattro*/
|
||||||
PyObject_GenericSetAttr, /*tp_setattro */
|
PyObject_GenericSetAttr, /*tp_setattro */
|
||||||
0, /*outputHook_tp_as_buffer*/
|
0, /*tp_as_buffer*/
|
||||||
0, /*outputHook_tp_flags*/
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||||
0, /*outputHook_tp_doc*/
|
0, /*tp_doc*/
|
||||||
0, /*outputHook_tp_traverse*/
|
0, /*tp_traverse*/
|
||||||
0, /*outputHook_tp_clear*/
|
0, /*tp_clear*/
|
||||||
0, /*outputHook_tp_richcompare*/
|
0, /*tp_richcompare*/
|
||||||
0, /*outputHook_tp_weaklistoffset*/
|
0, /*tp_weaklistoffset*/
|
||||||
0, /*outputHook_tp_iter*/
|
0, /*tp_iter*/
|
||||||
0, /*outputHook_tp_iternext*/
|
0, /*tp_iternext*/
|
||||||
CGContextRefObj_methods, /* tp_methods */
|
CGContextRefObj_methods, /* tp_methods */
|
||||||
0, /*outputHook_tp_members*/
|
0, /*tp_members*/
|
||||||
CGContextRefObj_getsetlist, /*tp_getset*/
|
CGContextRefObj_getsetlist, /*tp_getset*/
|
||||||
0, /*outputHook_tp_base*/
|
0, /*tp_base*/
|
||||||
|
0, /*tp_dict*/
|
||||||
|
0, /*tp_descr_get*/
|
||||||
|
0, /*tp_descr_set*/
|
||||||
|
0, /*tp_dictoffset*/
|
||||||
|
CGContextRefObj_tp_init, /* tp_init */
|
||||||
|
CGContextRefObj_tp_alloc, /* tp_alloc */
|
||||||
|
CGContextRefObj_tp_new, /* tp_new */
|
||||||
|
CGContextRefObj_tp_free, /* tp_free */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* ------------------ End object type CGContextRef ------------------ */
|
/* ------------------ End object type CGContextRef ------------------ */
|
||||||
|
@ -1373,8 +1400,10 @@ void init_CG(void)
|
||||||
return;
|
return;
|
||||||
CGContextRef_Type.ob_type = &PyType_Type;
|
CGContextRef_Type.ob_type = &PyType_Type;
|
||||||
Py_INCREF(&CGContextRef_Type);
|
Py_INCREF(&CGContextRef_Type);
|
||||||
if (PyDict_SetItemString(d, "CGContextRefType", (PyObject *)&CGContextRef_Type) != 0)
|
PyModule_AddObject(m, "CGContextRef", (PyObject *)&CGContextRef_Type);
|
||||||
Py_FatalError("can't initialize CGContextRefType");
|
/* Backward-compatible name */
|
||||||
|
Py_INCREF(&CGContextRef_Type);
|
||||||
|
PyModule_AddObject(m, "CGContextRefType", (PyObject *)&CGContextRef_Type);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ========================= End module _CG ========================= */
|
/* ========================= End module _CG ========================= */
|
||||||
|
|
|
@ -250,7 +250,7 @@ CGPathDrawingMode = int
|
||||||
CGContextRef = OpaqueByValueType("CGContextRef", "CGContextRefObj")
|
CGContextRef = OpaqueByValueType("CGContextRef", "CGContextRefObj")
|
||||||
|
|
||||||
|
|
||||||
class MyObjectDefinition(PEP252Mixin, GlobalObjectDefinition):
|
class MyObjectDefinition(PEP253Mixin, GlobalObjectDefinition):
|
||||||
def outputStructMembers(self):
|
def outputStructMembers(self):
|
||||||
ObjectDefinition.outputStructMembers(self)
|
ObjectDefinition.outputStructMembers(self)
|
||||||
def outputCleanupStructMembers(self):
|
def outputCleanupStructMembers(self):
|
||||||
|
|
|
@ -307,11 +307,30 @@ static PyMethodDef CmpInstObj_methods[] = {
|
||||||
|
|
||||||
#define CmpInstObj_getsetlist NULL
|
#define CmpInstObj_getsetlist NULL
|
||||||
|
|
||||||
|
|
||||||
#define CmpInstObj_compare NULL
|
#define CmpInstObj_compare NULL
|
||||||
|
|
||||||
#define CmpInstObj_repr NULL
|
#define CmpInstObj_repr NULL
|
||||||
|
|
||||||
#define CmpInstObj_hash NULL
|
#define CmpInstObj_hash NULL
|
||||||
|
#define CmpInstObj_tp_init 0
|
||||||
|
|
||||||
|
#define CmpInstObj_tp_alloc PyType_GenericAlloc
|
||||||
|
|
||||||
|
static PyObject *CmpInstObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||||
|
{
|
||||||
|
PyObject *self;
|
||||||
|
ComponentInstance itself;
|
||||||
|
char *kw[] = {"itself", 0};
|
||||||
|
|
||||||
|
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, CmpInstObj_Convert, &itself)) return NULL;
|
||||||
|
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
|
||||||
|
((ComponentInstanceObject *)self)->ob_itself = itself;
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define CmpInstObj_tp_free PyObject_Del
|
||||||
|
|
||||||
|
|
||||||
PyTypeObject ComponentInstance_Type = {
|
PyTypeObject ComponentInstance_Type = {
|
||||||
PyObject_HEAD_INIT(NULL)
|
PyObject_HEAD_INIT(NULL)
|
||||||
|
@ -334,19 +353,27 @@ PyTypeObject ComponentInstance_Type = {
|
||||||
0, /*tp_str*/
|
0, /*tp_str*/
|
||||||
PyObject_GenericGetAttr, /*tp_getattro*/
|
PyObject_GenericGetAttr, /*tp_getattro*/
|
||||||
PyObject_GenericSetAttr, /*tp_setattro */
|
PyObject_GenericSetAttr, /*tp_setattro */
|
||||||
0, /*outputHook_tp_as_buffer*/
|
0, /*tp_as_buffer*/
|
||||||
0, /*outputHook_tp_flags*/
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||||
0, /*outputHook_tp_doc*/
|
0, /*tp_doc*/
|
||||||
0, /*outputHook_tp_traverse*/
|
0, /*tp_traverse*/
|
||||||
0, /*outputHook_tp_clear*/
|
0, /*tp_clear*/
|
||||||
0, /*outputHook_tp_richcompare*/
|
0, /*tp_richcompare*/
|
||||||
0, /*outputHook_tp_weaklistoffset*/
|
0, /*tp_weaklistoffset*/
|
||||||
0, /*outputHook_tp_iter*/
|
0, /*tp_iter*/
|
||||||
0, /*outputHook_tp_iternext*/
|
0, /*tp_iternext*/
|
||||||
CmpInstObj_methods, /* tp_methods */
|
CmpInstObj_methods, /* tp_methods */
|
||||||
0, /*outputHook_tp_members*/
|
0, /*tp_members*/
|
||||||
CmpInstObj_getsetlist, /*tp_getset*/
|
CmpInstObj_getsetlist, /*tp_getset*/
|
||||||
0, /*outputHook_tp_base*/
|
0, /*tp_base*/
|
||||||
|
0, /*tp_dict*/
|
||||||
|
0, /*tp_descr_get*/
|
||||||
|
0, /*tp_descr_set*/
|
||||||
|
0, /*tp_dictoffset*/
|
||||||
|
CmpInstObj_tp_init, /* tp_init */
|
||||||
|
CmpInstObj_tp_alloc, /* tp_alloc */
|
||||||
|
CmpInstObj_tp_new, /* tp_new */
|
||||||
|
CmpInstObj_tp_free, /* tp_free */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* --------------- End object type ComponentInstance ---------------- */
|
/* --------------- End object type ComponentInstance ---------------- */
|
||||||
|
@ -713,11 +740,30 @@ static PyMethodDef CmpObj_methods[] = {
|
||||||
|
|
||||||
#define CmpObj_getsetlist NULL
|
#define CmpObj_getsetlist NULL
|
||||||
|
|
||||||
|
|
||||||
#define CmpObj_compare NULL
|
#define CmpObj_compare NULL
|
||||||
|
|
||||||
#define CmpObj_repr NULL
|
#define CmpObj_repr NULL
|
||||||
|
|
||||||
#define CmpObj_hash NULL
|
#define CmpObj_hash NULL
|
||||||
|
#define CmpObj_tp_init 0
|
||||||
|
|
||||||
|
#define CmpObj_tp_alloc PyType_GenericAlloc
|
||||||
|
|
||||||
|
static PyObject *CmpObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||||
|
{
|
||||||
|
PyObject *self;
|
||||||
|
Component itself;
|
||||||
|
char *kw[] = {"itself", 0};
|
||||||
|
|
||||||
|
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, CmpObj_Convert, &itself)) return NULL;
|
||||||
|
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
|
||||||
|
((ComponentObject *)self)->ob_itself = itself;
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define CmpObj_tp_free PyObject_Del
|
||||||
|
|
||||||
|
|
||||||
PyTypeObject Component_Type = {
|
PyTypeObject Component_Type = {
|
||||||
PyObject_HEAD_INIT(NULL)
|
PyObject_HEAD_INIT(NULL)
|
||||||
|
@ -740,19 +786,27 @@ PyTypeObject Component_Type = {
|
||||||
0, /*tp_str*/
|
0, /*tp_str*/
|
||||||
PyObject_GenericGetAttr, /*tp_getattro*/
|
PyObject_GenericGetAttr, /*tp_getattro*/
|
||||||
PyObject_GenericSetAttr, /*tp_setattro */
|
PyObject_GenericSetAttr, /*tp_setattro */
|
||||||
0, /*outputHook_tp_as_buffer*/
|
0, /*tp_as_buffer*/
|
||||||
0, /*outputHook_tp_flags*/
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||||
0, /*outputHook_tp_doc*/
|
0, /*tp_doc*/
|
||||||
0, /*outputHook_tp_traverse*/
|
0, /*tp_traverse*/
|
||||||
0, /*outputHook_tp_clear*/
|
0, /*tp_clear*/
|
||||||
0, /*outputHook_tp_richcompare*/
|
0, /*tp_richcompare*/
|
||||||
0, /*outputHook_tp_weaklistoffset*/
|
0, /*tp_weaklistoffset*/
|
||||||
0, /*outputHook_tp_iter*/
|
0, /*tp_iter*/
|
||||||
0, /*outputHook_tp_iternext*/
|
0, /*tp_iternext*/
|
||||||
CmpObj_methods, /* tp_methods */
|
CmpObj_methods, /* tp_methods */
|
||||||
0, /*outputHook_tp_members*/
|
0, /*tp_members*/
|
||||||
CmpObj_getsetlist, /*tp_getset*/
|
CmpObj_getsetlist, /*tp_getset*/
|
||||||
0, /*outputHook_tp_base*/
|
0, /*tp_base*/
|
||||||
|
0, /*tp_dict*/
|
||||||
|
0, /*tp_descr_get*/
|
||||||
|
0, /*tp_descr_set*/
|
||||||
|
0, /*tp_dictoffset*/
|
||||||
|
CmpObj_tp_init, /* tp_init */
|
||||||
|
CmpObj_tp_alloc, /* tp_alloc */
|
||||||
|
CmpObj_tp_new, /* tp_new */
|
||||||
|
CmpObj_tp_free, /* tp_free */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* ------------------- End object type Component -------------------- */
|
/* ------------------- End object type Component -------------------- */
|
||||||
|
@ -930,12 +984,16 @@ void init_Cm(void)
|
||||||
return;
|
return;
|
||||||
ComponentInstance_Type.ob_type = &PyType_Type;
|
ComponentInstance_Type.ob_type = &PyType_Type;
|
||||||
Py_INCREF(&ComponentInstance_Type);
|
Py_INCREF(&ComponentInstance_Type);
|
||||||
if (PyDict_SetItemString(d, "ComponentInstanceType", (PyObject *)&ComponentInstance_Type) != 0)
|
PyModule_AddObject(m, "ComponentInstance", (PyObject *)&ComponentInstance_Type);
|
||||||
Py_FatalError("can't initialize ComponentInstanceType");
|
/* Backward-compatible name */
|
||||||
|
Py_INCREF(&ComponentInstance_Type);
|
||||||
|
PyModule_AddObject(m, "ComponentInstanceType", (PyObject *)&ComponentInstance_Type);
|
||||||
Component_Type.ob_type = &PyType_Type;
|
Component_Type.ob_type = &PyType_Type;
|
||||||
Py_INCREF(&Component_Type);
|
Py_INCREF(&Component_Type);
|
||||||
if (PyDict_SetItemString(d, "ComponentType", (PyObject *)&Component_Type) != 0)
|
PyModule_AddObject(m, "Component", (PyObject *)&Component_Type);
|
||||||
Py_FatalError("can't initialize ComponentType");
|
/* Backward-compatible name */
|
||||||
|
Py_INCREF(&Component_Type);
|
||||||
|
PyModule_AddObject(m, "ComponentType", (PyObject *)&Component_Type);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ========================= End module _Cm ========================= */
|
/* ========================= End module _Cm ========================= */
|
||||||
|
|
|
@ -79,14 +79,14 @@ ComponentResult = Type("ComponentResult", "l")
|
||||||
|
|
||||||
ComponentResourceHandle = OpaqueByValueType("ComponentResourceHandle", "ResObj")
|
ComponentResourceHandle = OpaqueByValueType("ComponentResourceHandle", "ResObj")
|
||||||
|
|
||||||
class MyCIObjectDefinition(PEP252Mixin, GlobalObjectDefinition):
|
class MyCIObjectDefinition(PEP253Mixin, GlobalObjectDefinition):
|
||||||
def outputCheckNewArg(self):
|
def outputCheckNewArg(self):
|
||||||
Output("""if (itself == NULL) {
|
Output("""if (itself == NULL) {
|
||||||
PyErr_SetString(Cm_Error,"NULL ComponentInstance");
|
PyErr_SetString(Cm_Error,"NULL ComponentInstance");
|
||||||
return NULL;
|
return NULL;
|
||||||
}""")
|
}""")
|
||||||
|
|
||||||
class MyCObjectDefinition(PEP252Mixin, GlobalObjectDefinition):
|
class MyCObjectDefinition(PEP253Mixin, GlobalObjectDefinition):
|
||||||
def outputCheckNewArg(self):
|
def outputCheckNewArg(self):
|
||||||
Output("""if (itself == NULL) {
|
Output("""if (itself == NULL) {
|
||||||
/* XXXX Or should we return None? */
|
/* XXXX Or should we return None? */
|
||||||
|
|
|
@ -4545,6 +4545,7 @@ static PyMethodDef CtlObj_methods[] = {
|
||||||
|
|
||||||
#define CtlObj_getsetlist NULL
|
#define CtlObj_getsetlist NULL
|
||||||
|
|
||||||
|
|
||||||
static int CtlObj_compare(ControlObject *self, ControlObject *other)
|
static int CtlObj_compare(ControlObject *self, ControlObject *other)
|
||||||
{
|
{
|
||||||
unsigned long v, w;
|
unsigned long v, w;
|
||||||
|
@ -4570,6 +4571,24 @@ static long CtlObj_hash(ControlObject *self)
|
||||||
{
|
{
|
||||||
return (long)self->ob_itself;
|
return (long)self->ob_itself;
|
||||||
}
|
}
|
||||||
|
#define CtlObj_tp_init 0
|
||||||
|
|
||||||
|
#define CtlObj_tp_alloc PyType_GenericAlloc
|
||||||
|
|
||||||
|
static PyObject *CtlObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||||
|
{
|
||||||
|
PyObject *self;
|
||||||
|
ControlHandle itself;
|
||||||
|
char *kw[] = {"itself", 0};
|
||||||
|
|
||||||
|
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, CtlObj_Convert, &itself)) return NULL;
|
||||||
|
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
|
||||||
|
((ControlObject *)self)->ob_itself = itself;
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define CtlObj_tp_free PyObject_Del
|
||||||
|
|
||||||
|
|
||||||
PyTypeObject Control_Type = {
|
PyTypeObject Control_Type = {
|
||||||
PyObject_HEAD_INIT(NULL)
|
PyObject_HEAD_INIT(NULL)
|
||||||
|
@ -4592,19 +4611,27 @@ PyTypeObject Control_Type = {
|
||||||
0, /*tp_str*/
|
0, /*tp_str*/
|
||||||
PyObject_GenericGetAttr, /*tp_getattro*/
|
PyObject_GenericGetAttr, /*tp_getattro*/
|
||||||
PyObject_GenericSetAttr, /*tp_setattro */
|
PyObject_GenericSetAttr, /*tp_setattro */
|
||||||
0, /*outputHook_tp_as_buffer*/
|
0, /*tp_as_buffer*/
|
||||||
0, /*outputHook_tp_flags*/
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||||
0, /*outputHook_tp_doc*/
|
0, /*tp_doc*/
|
||||||
0, /*outputHook_tp_traverse*/
|
0, /*tp_traverse*/
|
||||||
0, /*outputHook_tp_clear*/
|
0, /*tp_clear*/
|
||||||
0, /*outputHook_tp_richcompare*/
|
0, /*tp_richcompare*/
|
||||||
0, /*outputHook_tp_weaklistoffset*/
|
0, /*tp_weaklistoffset*/
|
||||||
0, /*outputHook_tp_iter*/
|
0, /*tp_iter*/
|
||||||
0, /*outputHook_tp_iternext*/
|
0, /*tp_iternext*/
|
||||||
CtlObj_methods, /* tp_methods */
|
CtlObj_methods, /* tp_methods */
|
||||||
0, /*outputHook_tp_members*/
|
0, /*tp_members*/
|
||||||
CtlObj_getsetlist, /*tp_getset*/
|
CtlObj_getsetlist, /*tp_getset*/
|
||||||
0, /*outputHook_tp_base*/
|
0, /*tp_base*/
|
||||||
|
0, /*tp_dict*/
|
||||||
|
0, /*tp_descr_get*/
|
||||||
|
0, /*tp_descr_set*/
|
||||||
|
0, /*tp_dictoffset*/
|
||||||
|
CtlObj_tp_init, /* tp_init */
|
||||||
|
CtlObj_tp_alloc, /* tp_alloc */
|
||||||
|
CtlObj_tp_new, /* tp_new */
|
||||||
|
CtlObj_tp_free, /* tp_free */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* -------------------- End object type Control --------------------- */
|
/* -------------------- End object type Control --------------------- */
|
||||||
|
@ -6714,8 +6741,10 @@ void init_Ctl(void)
|
||||||
return;
|
return;
|
||||||
Control_Type.ob_type = &PyType_Type;
|
Control_Type.ob_type = &PyType_Type;
|
||||||
Py_INCREF(&Control_Type);
|
Py_INCREF(&Control_Type);
|
||||||
if (PyDict_SetItemString(d, "ControlType", (PyObject *)&Control_Type) != 0)
|
PyModule_AddObject(m, "Control", (PyObject *)&Control_Type);
|
||||||
Py_FatalError("can't initialize ControlType");
|
/* Backward-compatible name */
|
||||||
|
Py_INCREF(&Control_Type);
|
||||||
|
PyModule_AddObject(m, "ControlType", (PyObject *)&Control_Type);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ======================== End module _Ctl ========================= */
|
/* ======================== End module _Ctl ========================= */
|
||||||
|
|
|
@ -490,7 +490,7 @@ PyMac_INIT_TOOLBOX_OBJECT_NEW(ControlHandle, CtlObj_New);
|
||||||
PyMac_INIT_TOOLBOX_OBJECT_CONVERT(ControlHandle, CtlObj_Convert);
|
PyMac_INIT_TOOLBOX_OBJECT_CONVERT(ControlHandle, CtlObj_Convert);
|
||||||
"""
|
"""
|
||||||
|
|
||||||
class MyObjectDefinition(PEP252Mixin, ObjectIdentityMixin, GlobalObjectDefinition):
|
class MyObjectDefinition(PEP253Mixin, ObjectIdentityMixin, GlobalObjectDefinition):
|
||||||
def outputStructMembers(self):
|
def outputStructMembers(self):
|
||||||
GlobalObjectDefinition.outputStructMembers(self)
|
GlobalObjectDefinition.outputStructMembers(self)
|
||||||
Output("PyObject *ob_callbackdict;")
|
Output("PyObject *ob_callbackdict;")
|
||||||
|
|
|
@ -966,6 +966,7 @@ static PyMethodDef DlgObj_methods[] = {
|
||||||
|
|
||||||
#define DlgObj_getsetlist NULL
|
#define DlgObj_getsetlist NULL
|
||||||
|
|
||||||
|
|
||||||
static int DlgObj_compare(DialogObject *self, DialogObject *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;
|
||||||
|
@ -979,6 +980,24 @@ static int DlgObj_hash(DialogObject *self)
|
||||||
{
|
{
|
||||||
return (int)self->ob_itself;
|
return (int)self->ob_itself;
|
||||||
}
|
}
|
||||||
|
#define DlgObj_tp_init 0
|
||||||
|
|
||||||
|
#define DlgObj_tp_alloc PyType_GenericAlloc
|
||||||
|
|
||||||
|
static PyObject *DlgObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||||
|
{
|
||||||
|
PyObject *self;
|
||||||
|
DialogPtr itself;
|
||||||
|
char *kw[] = {"itself", 0};
|
||||||
|
|
||||||
|
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, DlgObj_Convert, &itself)) return NULL;
|
||||||
|
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
|
||||||
|
((DialogObject *)self)->ob_itself = itself;
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define DlgObj_tp_free PyObject_Del
|
||||||
|
|
||||||
|
|
||||||
PyTypeObject Dialog_Type = {
|
PyTypeObject Dialog_Type = {
|
||||||
PyObject_HEAD_INIT(NULL)
|
PyObject_HEAD_INIT(NULL)
|
||||||
|
@ -1001,19 +1020,27 @@ PyTypeObject Dialog_Type = {
|
||||||
0, /*tp_str*/
|
0, /*tp_str*/
|
||||||
PyObject_GenericGetAttr, /*tp_getattro*/
|
PyObject_GenericGetAttr, /*tp_getattro*/
|
||||||
PyObject_GenericSetAttr, /*tp_setattro */
|
PyObject_GenericSetAttr, /*tp_setattro */
|
||||||
0, /*outputHook_tp_as_buffer*/
|
0, /*tp_as_buffer*/
|
||||||
0, /*outputHook_tp_flags*/
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||||
0, /*outputHook_tp_doc*/
|
0, /*tp_doc*/
|
||||||
0, /*outputHook_tp_traverse*/
|
0, /*tp_traverse*/
|
||||||
0, /*outputHook_tp_clear*/
|
0, /*tp_clear*/
|
||||||
0, /*outputHook_tp_richcompare*/
|
0, /*tp_richcompare*/
|
||||||
0, /*outputHook_tp_weaklistoffset*/
|
0, /*tp_weaklistoffset*/
|
||||||
0, /*outputHook_tp_iter*/
|
0, /*tp_iter*/
|
||||||
0, /*outputHook_tp_iternext*/
|
0, /*tp_iternext*/
|
||||||
DlgObj_methods, /* tp_methods */
|
DlgObj_methods, /* tp_methods */
|
||||||
0, /*outputHook_tp_members*/
|
0, /*tp_members*/
|
||||||
DlgObj_getsetlist, /*tp_getset*/
|
DlgObj_getsetlist, /*tp_getset*/
|
||||||
0, /*outputHook_tp_base*/
|
0, /*tp_base*/
|
||||||
|
0, /*tp_dict*/
|
||||||
|
0, /*tp_descr_get*/
|
||||||
|
0, /*tp_descr_set*/
|
||||||
|
0, /*tp_dictoffset*/
|
||||||
|
DlgObj_tp_init, /* tp_init */
|
||||||
|
DlgObj_tp_alloc, /* tp_alloc */
|
||||||
|
DlgObj_tp_new, /* tp_new */
|
||||||
|
DlgObj_tp_free, /* tp_free */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* --------------------- End object type Dialog --------------------- */
|
/* --------------------- End object type Dialog --------------------- */
|
||||||
|
@ -1589,8 +1616,10 @@ void init_Dlg(void)
|
||||||
return;
|
return;
|
||||||
Dialog_Type.ob_type = &PyType_Type;
|
Dialog_Type.ob_type = &PyType_Type;
|
||||||
Py_INCREF(&Dialog_Type);
|
Py_INCREF(&Dialog_Type);
|
||||||
if (PyDict_SetItemString(d, "DialogType", (PyObject *)&Dialog_Type) != 0)
|
PyModule_AddObject(m, "Dialog", (PyObject *)&Dialog_Type);
|
||||||
Py_FatalError("can't initialize DialogType");
|
/* Backward-compatible name */
|
||||||
|
Py_INCREF(&Dialog_Type);
|
||||||
|
PyModule_AddObject(m, "DialogType", (PyObject *)&Dialog_Type);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ======================== End module _Dlg ========================= */
|
/* ======================== End module _Dlg ========================= */
|
||||||
|
|
|
@ -201,7 +201,7 @@ initstuff = initstuff + """
|
||||||
|
|
||||||
|
|
||||||
# Define a class which specializes our object definition
|
# Define a class which specializes our object definition
|
||||||
class MyObjectDefinition(PEP252Mixin, GlobalObjectDefinition):
|
class MyObjectDefinition(PEP253Mixin, GlobalObjectDefinition):
|
||||||
def __init__(self, name, prefix = None, itselftype = None):
|
def __init__(self, name, prefix = None, itselftype = None):
|
||||||
GlobalObjectDefinition.__init__(self, name, prefix, itselftype)
|
GlobalObjectDefinition.__init__(self, name, prefix, itselftype)
|
||||||
## This won't work in Carbon, so we disable it for all MacPythons:-(
|
## This won't work in Carbon, so we disable it for all MacPythons:-(
|
||||||
|
|
|
@ -742,11 +742,30 @@ static PyMethodDef DragObj_methods[] = {
|
||||||
|
|
||||||
#define DragObj_getsetlist NULL
|
#define DragObj_getsetlist NULL
|
||||||
|
|
||||||
|
|
||||||
#define DragObj_compare NULL
|
#define DragObj_compare NULL
|
||||||
|
|
||||||
#define DragObj_repr NULL
|
#define DragObj_repr NULL
|
||||||
|
|
||||||
#define DragObj_hash NULL
|
#define DragObj_hash NULL
|
||||||
|
#define DragObj_tp_init 0
|
||||||
|
|
||||||
|
#define DragObj_tp_alloc PyType_GenericAlloc
|
||||||
|
|
||||||
|
static PyObject *DragObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||||
|
{
|
||||||
|
PyObject *self;
|
||||||
|
DragRef itself;
|
||||||
|
char *kw[] = {"itself", 0};
|
||||||
|
|
||||||
|
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, DragObj_Convert, &itself)) return NULL;
|
||||||
|
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
|
||||||
|
((DragObjObject *)self)->ob_itself = itself;
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define DragObj_tp_free PyObject_Del
|
||||||
|
|
||||||
|
|
||||||
PyTypeObject DragObj_Type = {
|
PyTypeObject DragObj_Type = {
|
||||||
PyObject_HEAD_INIT(NULL)
|
PyObject_HEAD_INIT(NULL)
|
||||||
|
@ -769,19 +788,27 @@ PyTypeObject DragObj_Type = {
|
||||||
0, /*tp_str*/
|
0, /*tp_str*/
|
||||||
PyObject_GenericGetAttr, /*tp_getattro*/
|
PyObject_GenericGetAttr, /*tp_getattro*/
|
||||||
PyObject_GenericSetAttr, /*tp_setattro */
|
PyObject_GenericSetAttr, /*tp_setattro */
|
||||||
0, /*outputHook_tp_as_buffer*/
|
0, /*tp_as_buffer*/
|
||||||
0, /*outputHook_tp_flags*/
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||||
0, /*outputHook_tp_doc*/
|
0, /*tp_doc*/
|
||||||
0, /*outputHook_tp_traverse*/
|
0, /*tp_traverse*/
|
||||||
0, /*outputHook_tp_clear*/
|
0, /*tp_clear*/
|
||||||
0, /*outputHook_tp_richcompare*/
|
0, /*tp_richcompare*/
|
||||||
0, /*outputHook_tp_weaklistoffset*/
|
0, /*tp_weaklistoffset*/
|
||||||
0, /*outputHook_tp_iter*/
|
0, /*tp_iter*/
|
||||||
0, /*outputHook_tp_iternext*/
|
0, /*tp_iternext*/
|
||||||
DragObj_methods, /* tp_methods */
|
DragObj_methods, /* tp_methods */
|
||||||
0, /*outputHook_tp_members*/
|
0, /*tp_members*/
|
||||||
DragObj_getsetlist, /*tp_getset*/
|
DragObj_getsetlist, /*tp_getset*/
|
||||||
0, /*outputHook_tp_base*/
|
0, /*tp_base*/
|
||||||
|
0, /*tp_dict*/
|
||||||
|
0, /*tp_descr_get*/
|
||||||
|
0, /*tp_descr_set*/
|
||||||
|
0, /*tp_dictoffset*/
|
||||||
|
DragObj_tp_init, /* tp_init */
|
||||||
|
DragObj_tp_alloc, /* tp_alloc */
|
||||||
|
DragObj_tp_new, /* tp_new */
|
||||||
|
DragObj_tp_free, /* tp_free */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* -------------------- End object type DragObj --------------------- */
|
/* -------------------- End object type DragObj --------------------- */
|
||||||
|
@ -1109,8 +1136,10 @@ void init_Drag(void)
|
||||||
return;
|
return;
|
||||||
DragObj_Type.ob_type = &PyType_Type;
|
DragObj_Type.ob_type = &PyType_Type;
|
||||||
Py_INCREF(&DragObj_Type);
|
Py_INCREF(&DragObj_Type);
|
||||||
if (PyDict_SetItemString(d, "DragObjType", (PyObject *)&DragObj_Type) != 0)
|
PyModule_AddObject(m, "DragObj", (PyObject *)&DragObj_Type);
|
||||||
Py_FatalError("can't initialize DragObjType");
|
/* Backward-compatible name */
|
||||||
|
Py_INCREF(&DragObj_Type);
|
||||||
|
PyModule_AddObject(m, "DragObjType", (PyObject *)&DragObj_Type);
|
||||||
|
|
||||||
dragglue_TrackingHandlerUPP = NewDragTrackingHandlerUPP(dragglue_TrackingHandler);
|
dragglue_TrackingHandlerUPP = NewDragTrackingHandlerUPP(dragglue_TrackingHandler);
|
||||||
dragglue_ReceiveHandlerUPP = NewDragReceiveHandlerUPP(dragglue_ReceiveHandler);
|
dragglue_ReceiveHandlerUPP = NewDragReceiveHandlerUPP(dragglue_ReceiveHandler);
|
||||||
|
|
|
@ -183,7 +183,7 @@ dragglue_DrawingUPP = NewDragDrawingUPP(dragglue_Drawing);
|
||||||
#endif
|
#endif
|
||||||
"""
|
"""
|
||||||
|
|
||||||
class MyObjectDefinition(PEP252Mixin, GlobalObjectDefinition):
|
class MyObjectDefinition(PEP253Mixin, GlobalObjectDefinition):
|
||||||
def outputCheckNewArg(self):
|
def outputCheckNewArg(self):
|
||||||
Output("""if (itself == NULL) {
|
Output("""if (itself == NULL) {
|
||||||
PyErr_SetString(Drag_Error,"Cannot create null Drag");
|
PyErr_SetString(Drag_Error,"Cannot create null Drag");
|
||||||
|
|
|
@ -46,7 +46,7 @@ includestuff = includestuff + """
|
||||||
#endif
|
#endif
|
||||||
"""
|
"""
|
||||||
|
|
||||||
class MyObjectDefinition(PEP252Mixin, GlobalObjectDefinition):
|
class MyObjectDefinition(PEP253Mixin, GlobalObjectDefinition):
|
||||||
def outputCheckNewArg(self):
|
def outputCheckNewArg(self):
|
||||||
Output("if (itself == NULL) return PyMac_Error(resNotFound);")
|
Output("if (itself == NULL) return PyMac_Error(resNotFound);")
|
||||||
def outputCheckConvertArg(self):
|
def outputCheckConvertArg(self):
|
||||||
|
|
|
@ -31,11 +31,11 @@ initstuff = """
|
||||||
|
|
||||||
module = MacModule('_IBCarbon', 'IBCarbon', includestuff, finalstuff, initstuff)
|
module = MacModule('_IBCarbon', 'IBCarbon', includestuff, finalstuff, initstuff)
|
||||||
|
|
||||||
class CFReleaserObject(PEP252Mixin, GlobalObjectDefinition):
|
class CFReleaserObject(PEP253Mixin, GlobalObjectDefinition):
|
||||||
def outputFreeIt(self, name):
|
def outputFreeIt(self, name):
|
||||||
Output("CFRelease(%s);" % name)
|
Output("CFRelease(%s);" % name)
|
||||||
|
|
||||||
class CFNibDesc(PEP252Mixin, GlobalObjectDefinition):
|
class CFNibDesc(PEP253Mixin, GlobalObjectDefinition):
|
||||||
def outputFreeIt(self, name):
|
def outputFreeIt(self, name):
|
||||||
Output("DisposeNibReference(%s);" % name)
|
Output("DisposeNibReference(%s);" % name)
|
||||||
|
|
||||||
|
|
|
@ -142,11 +142,30 @@ static PyMethodDef IBNibRefObj_methods[] = {
|
||||||
|
|
||||||
#define IBNibRefObj_getsetlist NULL
|
#define IBNibRefObj_getsetlist NULL
|
||||||
|
|
||||||
|
|
||||||
#define IBNibRefObj_compare NULL
|
#define IBNibRefObj_compare NULL
|
||||||
|
|
||||||
#define IBNibRefObj_repr NULL
|
#define IBNibRefObj_repr NULL
|
||||||
|
|
||||||
#define IBNibRefObj_hash NULL
|
#define IBNibRefObj_hash NULL
|
||||||
|
#define IBNibRefObj_tp_init 0
|
||||||
|
|
||||||
|
#define IBNibRefObj_tp_alloc PyType_GenericAlloc
|
||||||
|
|
||||||
|
static PyObject *IBNibRefObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||||
|
{
|
||||||
|
PyObject *self;
|
||||||
|
IBNibRef itself;
|
||||||
|
char *kw[] = {"itself", 0};
|
||||||
|
|
||||||
|
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, IBNibRefObj_Convert, &itself)) return NULL;
|
||||||
|
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
|
||||||
|
((IBNibRefObject *)self)->ob_itself = itself;
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define IBNibRefObj_tp_free PyObject_Del
|
||||||
|
|
||||||
|
|
||||||
PyTypeObject IBNibRef_Type = {
|
PyTypeObject IBNibRef_Type = {
|
||||||
PyObject_HEAD_INIT(NULL)
|
PyObject_HEAD_INIT(NULL)
|
||||||
|
@ -169,19 +188,27 @@ PyTypeObject IBNibRef_Type = {
|
||||||
0, /*tp_str*/
|
0, /*tp_str*/
|
||||||
PyObject_GenericGetAttr, /*tp_getattro*/
|
PyObject_GenericGetAttr, /*tp_getattro*/
|
||||||
PyObject_GenericSetAttr, /*tp_setattro */
|
PyObject_GenericSetAttr, /*tp_setattro */
|
||||||
0, /*outputHook_tp_as_buffer*/
|
0, /*tp_as_buffer*/
|
||||||
0, /*outputHook_tp_flags*/
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||||
0, /*outputHook_tp_doc*/
|
0, /*tp_doc*/
|
||||||
0, /*outputHook_tp_traverse*/
|
0, /*tp_traverse*/
|
||||||
0, /*outputHook_tp_clear*/
|
0, /*tp_clear*/
|
||||||
0, /*outputHook_tp_richcompare*/
|
0, /*tp_richcompare*/
|
||||||
0, /*outputHook_tp_weaklistoffset*/
|
0, /*tp_weaklistoffset*/
|
||||||
0, /*outputHook_tp_iter*/
|
0, /*tp_iter*/
|
||||||
0, /*outputHook_tp_iternext*/
|
0, /*tp_iternext*/
|
||||||
IBNibRefObj_methods, /* tp_methods */
|
IBNibRefObj_methods, /* tp_methods */
|
||||||
0, /*outputHook_tp_members*/
|
0, /*tp_members*/
|
||||||
IBNibRefObj_getsetlist, /*tp_getset*/
|
IBNibRefObj_getsetlist, /*tp_getset*/
|
||||||
0, /*outputHook_tp_base*/
|
0, /*tp_base*/
|
||||||
|
0, /*tp_dict*/
|
||||||
|
0, /*tp_descr_get*/
|
||||||
|
0, /*tp_descr_set*/
|
||||||
|
0, /*tp_dictoffset*/
|
||||||
|
IBNibRefObj_tp_init, /* tp_init */
|
||||||
|
IBNibRefObj_tp_alloc, /* tp_alloc */
|
||||||
|
IBNibRefObj_tp_new, /* tp_new */
|
||||||
|
IBNibRefObj_tp_free, /* tp_free */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* -------------------- End object type IBNibRef -------------------- */
|
/* -------------------- End object type IBNibRef -------------------- */
|
||||||
|
@ -230,8 +257,10 @@ void init_IBCarbon(void)
|
||||||
return;
|
return;
|
||||||
IBNibRef_Type.ob_type = &PyType_Type;
|
IBNibRef_Type.ob_type = &PyType_Type;
|
||||||
Py_INCREF(&IBNibRef_Type);
|
Py_INCREF(&IBNibRef_Type);
|
||||||
if (PyDict_SetItemString(d, "IBNibRefType", (PyObject *)&IBNibRef_Type) != 0)
|
PyModule_AddObject(m, "IBNibRef", (PyObject *)&IBNibRef_Type);
|
||||||
Py_FatalError("can't initialize IBNibRefType");
|
/* Backward-compatible name */
|
||||||
|
Py_INCREF(&IBNibRef_Type);
|
||||||
|
PyModule_AddObject(m, "IBNibRefType", (PyObject *)&IBNibRef_Type);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ====================== End module _IBCarbon ====================== */
|
/* ====================== End module _IBCarbon ====================== */
|
||||||
|
|
|
@ -54,7 +54,7 @@ includestuff = includestuff + """
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
class MyObjectDefinition(PEP252Mixin, GlobalObjectDefinition):
|
class MyObjectDefinition(PEP253Mixin, GlobalObjectDefinition):
|
||||||
def outputCheckNewArg(self):
|
def outputCheckNewArg(self):
|
||||||
Output("if (itself == NULL) return PyMac_Error(resNotFound);")
|
Output("if (itself == NULL) return PyMac_Error(resNotFound);")
|
||||||
def outputCheckConvertArg(self):
|
def outputCheckConvertArg(self):
|
||||||
|
|
|
@ -806,6 +806,24 @@ static PyGetSetDef ListObj_getsetlist[] = {
|
||||||
#define ListObj_repr NULL
|
#define ListObj_repr NULL
|
||||||
|
|
||||||
#define ListObj_hash NULL
|
#define ListObj_hash NULL
|
||||||
|
#define ListObj_tp_init 0
|
||||||
|
|
||||||
|
#define ListObj_tp_alloc PyType_GenericAlloc
|
||||||
|
|
||||||
|
static PyObject *ListObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||||
|
{
|
||||||
|
PyObject *self;
|
||||||
|
ListHandle itself;
|
||||||
|
char *kw[] = {"itself", 0};
|
||||||
|
|
||||||
|
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, ListObj_Convert, &itself)) return NULL;
|
||||||
|
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
|
||||||
|
((ListObject *)self)->ob_itself = itself;
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define ListObj_tp_free PyObject_Del
|
||||||
|
|
||||||
|
|
||||||
PyTypeObject List_Type = {
|
PyTypeObject List_Type = {
|
||||||
PyObject_HEAD_INIT(NULL)
|
PyObject_HEAD_INIT(NULL)
|
||||||
|
@ -828,19 +846,27 @@ PyTypeObject List_Type = {
|
||||||
0, /*tp_str*/
|
0, /*tp_str*/
|
||||||
PyObject_GenericGetAttr, /*tp_getattro*/
|
PyObject_GenericGetAttr, /*tp_getattro*/
|
||||||
PyObject_GenericSetAttr, /*tp_setattro */
|
PyObject_GenericSetAttr, /*tp_setattro */
|
||||||
0, /*outputHook_tp_as_buffer*/
|
0, /*tp_as_buffer*/
|
||||||
0, /*outputHook_tp_flags*/
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||||
0, /*outputHook_tp_doc*/
|
0, /*tp_doc*/
|
||||||
0, /*outputHook_tp_traverse*/
|
0, /*tp_traverse*/
|
||||||
0, /*outputHook_tp_clear*/
|
0, /*tp_clear*/
|
||||||
0, /*outputHook_tp_richcompare*/
|
0, /*tp_richcompare*/
|
||||||
0, /*outputHook_tp_weaklistoffset*/
|
0, /*tp_weaklistoffset*/
|
||||||
0, /*outputHook_tp_iter*/
|
0, /*tp_iter*/
|
||||||
0, /*outputHook_tp_iternext*/
|
0, /*tp_iternext*/
|
||||||
ListObj_methods, /* tp_methods */
|
ListObj_methods, /* tp_methods */
|
||||||
0, /*outputHook_tp_members*/
|
0, /*tp_members*/
|
||||||
ListObj_getsetlist, /*tp_getset*/
|
ListObj_getsetlist, /*tp_getset*/
|
||||||
0, /*outputHook_tp_base*/
|
0, /*tp_base*/
|
||||||
|
0, /*tp_dict*/
|
||||||
|
0, /*tp_descr_get*/
|
||||||
|
0, /*tp_descr_set*/
|
||||||
|
0, /*tp_dictoffset*/
|
||||||
|
ListObj_tp_init, /* tp_init */
|
||||||
|
ListObj_tp_alloc, /* tp_alloc */
|
||||||
|
ListObj_tp_new, /* tp_new */
|
||||||
|
ListObj_tp_free, /* tp_free */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* ---------------------- End object type List ---------------------- */
|
/* ---------------------- End object type List ---------------------- */
|
||||||
|
@ -1186,8 +1212,10 @@ void init_List(void)
|
||||||
return;
|
return;
|
||||||
List_Type.ob_type = &PyType_Type;
|
List_Type.ob_type = &PyType_Type;
|
||||||
Py_INCREF(&List_Type);
|
Py_INCREF(&List_Type);
|
||||||
if (PyDict_SetItemString(d, "ListType", (PyObject *)&List_Type) != 0)
|
PyModule_AddObject(m, "List", (PyObject *)&List_Type);
|
||||||
Py_FatalError("can't initialize ListType");
|
/* Backward-compatible name */
|
||||||
|
Py_INCREF(&List_Type);
|
||||||
|
PyModule_AddObject(m, "ListType", (PyObject *)&List_Type);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ======================== End module _List ======================== */
|
/* ======================== End module _List ======================== */
|
||||||
|
|
|
@ -137,7 +137,8 @@ class ListMethodGenerator(MethodGenerator):
|
||||||
FunctionGenerator.parseArgumentList(self, args)
|
FunctionGenerator.parseArgumentList(self, args)
|
||||||
self.argumentList.append(self.itself)
|
self.argumentList.append(self.itself)
|
||||||
|
|
||||||
class MyObjectDefinition(PEP252Mixin, GlobalObjectDefinition):
|
class MyObjectDefinition(PEP253Mixin, GlobalObjectDefinition):
|
||||||
|
# XXXX Should inherit from Resource
|
||||||
getsetlist = [(
|
getsetlist = [(
|
||||||
'listFlags',
|
'listFlags',
|
||||||
'return Py_BuildValue("l", (long)GetListFlags(self->ob_itself) & 0xff);',
|
'return Py_BuildValue("l", (long)GetListFlags(self->ob_itself) & 0xff);',
|
||||||
|
|
|
@ -3002,11 +3002,30 @@ static PyMethodDef MenuObj_methods[] = {
|
||||||
|
|
||||||
#define MenuObj_getsetlist NULL
|
#define MenuObj_getsetlist NULL
|
||||||
|
|
||||||
|
|
||||||
#define MenuObj_compare NULL
|
#define MenuObj_compare NULL
|
||||||
|
|
||||||
#define MenuObj_repr NULL
|
#define MenuObj_repr NULL
|
||||||
|
|
||||||
#define MenuObj_hash NULL
|
#define MenuObj_hash NULL
|
||||||
|
#define MenuObj_tp_init 0
|
||||||
|
|
||||||
|
#define MenuObj_tp_alloc PyType_GenericAlloc
|
||||||
|
|
||||||
|
static PyObject *MenuObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||||
|
{
|
||||||
|
PyObject *self;
|
||||||
|
MenuHandle itself;
|
||||||
|
char *kw[] = {"itself", 0};
|
||||||
|
|
||||||
|
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, MenuObj_Convert, &itself)) return NULL;
|
||||||
|
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
|
||||||
|
((MenuObject *)self)->ob_itself = itself;
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define MenuObj_tp_free PyObject_Del
|
||||||
|
|
||||||
|
|
||||||
PyTypeObject Menu_Type = {
|
PyTypeObject Menu_Type = {
|
||||||
PyObject_HEAD_INIT(NULL)
|
PyObject_HEAD_INIT(NULL)
|
||||||
|
@ -3029,19 +3048,27 @@ PyTypeObject Menu_Type = {
|
||||||
0, /*tp_str*/
|
0, /*tp_str*/
|
||||||
PyObject_GenericGetAttr, /*tp_getattro*/
|
PyObject_GenericGetAttr, /*tp_getattro*/
|
||||||
PyObject_GenericSetAttr, /*tp_setattro */
|
PyObject_GenericSetAttr, /*tp_setattro */
|
||||||
0, /*outputHook_tp_as_buffer*/
|
0, /*tp_as_buffer*/
|
||||||
0, /*outputHook_tp_flags*/
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||||
0, /*outputHook_tp_doc*/
|
0, /*tp_doc*/
|
||||||
0, /*outputHook_tp_traverse*/
|
0, /*tp_traverse*/
|
||||||
0, /*outputHook_tp_clear*/
|
0, /*tp_clear*/
|
||||||
0, /*outputHook_tp_richcompare*/
|
0, /*tp_richcompare*/
|
||||||
0, /*outputHook_tp_weaklistoffset*/
|
0, /*tp_weaklistoffset*/
|
||||||
0, /*outputHook_tp_iter*/
|
0, /*tp_iter*/
|
||||||
0, /*outputHook_tp_iternext*/
|
0, /*tp_iternext*/
|
||||||
MenuObj_methods, /* tp_methods */
|
MenuObj_methods, /* tp_methods */
|
||||||
0, /*outputHook_tp_members*/
|
0, /*tp_members*/
|
||||||
MenuObj_getsetlist, /*tp_getset*/
|
MenuObj_getsetlist, /*tp_getset*/
|
||||||
0, /*outputHook_tp_base*/
|
0, /*tp_base*/
|
||||||
|
0, /*tp_dict*/
|
||||||
|
0, /*tp_descr_get*/
|
||||||
|
0, /*tp_descr_set*/
|
||||||
|
0, /*tp_dictoffset*/
|
||||||
|
MenuObj_tp_init, /* tp_init */
|
||||||
|
MenuObj_tp_alloc, /* tp_alloc */
|
||||||
|
MenuObj_tp_new, /* tp_new */
|
||||||
|
MenuObj_tp_free, /* tp_free */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* ---------------------- End object type Menu ---------------------- */
|
/* ---------------------- End object type Menu ---------------------- */
|
||||||
|
@ -4127,8 +4154,10 @@ void init_Menu(void)
|
||||||
return;
|
return;
|
||||||
Menu_Type.ob_type = &PyType_Type;
|
Menu_Type.ob_type = &PyType_Type;
|
||||||
Py_INCREF(&Menu_Type);
|
Py_INCREF(&Menu_Type);
|
||||||
if (PyDict_SetItemString(d, "MenuType", (PyObject *)&Menu_Type) != 0)
|
PyModule_AddObject(m, "Menu", (PyObject *)&Menu_Type);
|
||||||
Py_FatalError("can't initialize MenuType");
|
/* Backward-compatible name */
|
||||||
|
Py_INCREF(&Menu_Type);
|
||||||
|
PyModule_AddObject(m, "MenuType", (PyObject *)&Menu_Type);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ======================== End module _Menu ======================== */
|
/* ======================== End module _Menu ======================== */
|
||||||
|
|
|
@ -98,7 +98,7 @@ initstuff = initstuff + """
|
||||||
PyMac_INIT_TOOLBOX_OBJECT_CONVERT(MenuHandle, MenuObj_Convert);
|
PyMac_INIT_TOOLBOX_OBJECT_CONVERT(MenuHandle, MenuObj_Convert);
|
||||||
"""
|
"""
|
||||||
|
|
||||||
class MyObjectDefinition(PEP252Mixin, GlobalObjectDefinition):
|
class MyObjectDefinition(PEP253Mixin, GlobalObjectDefinition):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
# Create the generator groups and link them
|
# Create the generator groups and link them
|
||||||
|
|
|
@ -1297,11 +1297,30 @@ static PyMethodDef TXNObj_methods[] = {
|
||||||
|
|
||||||
#define TXNObj_getsetlist NULL
|
#define TXNObj_getsetlist NULL
|
||||||
|
|
||||||
|
|
||||||
#define TXNObj_compare NULL
|
#define TXNObj_compare NULL
|
||||||
|
|
||||||
#define TXNObj_repr NULL
|
#define TXNObj_repr NULL
|
||||||
|
|
||||||
#define TXNObj_hash NULL
|
#define TXNObj_hash NULL
|
||||||
|
#define TXNObj_tp_init 0
|
||||||
|
|
||||||
|
#define TXNObj_tp_alloc PyType_GenericAlloc
|
||||||
|
|
||||||
|
static PyObject *TXNObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||||
|
{
|
||||||
|
PyObject *self;
|
||||||
|
TXNObject itself;
|
||||||
|
char *kw[] = {"itself", 0};
|
||||||
|
|
||||||
|
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, TXNObj_Convert, &itself)) return NULL;
|
||||||
|
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
|
||||||
|
((TXNObjectObject *)self)->ob_itself = itself;
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define TXNObj_tp_free PyObject_Del
|
||||||
|
|
||||||
|
|
||||||
PyTypeObject TXNObject_Type = {
|
PyTypeObject TXNObject_Type = {
|
||||||
PyObject_HEAD_INIT(NULL)
|
PyObject_HEAD_INIT(NULL)
|
||||||
|
@ -1324,19 +1343,27 @@ PyTypeObject TXNObject_Type = {
|
||||||
0, /*tp_str*/
|
0, /*tp_str*/
|
||||||
PyObject_GenericGetAttr, /*tp_getattro*/
|
PyObject_GenericGetAttr, /*tp_getattro*/
|
||||||
PyObject_GenericSetAttr, /*tp_setattro */
|
PyObject_GenericSetAttr, /*tp_setattro */
|
||||||
0, /*outputHook_tp_as_buffer*/
|
0, /*tp_as_buffer*/
|
||||||
0, /*outputHook_tp_flags*/
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||||
0, /*outputHook_tp_doc*/
|
0, /*tp_doc*/
|
||||||
0, /*outputHook_tp_traverse*/
|
0, /*tp_traverse*/
|
||||||
0, /*outputHook_tp_clear*/
|
0, /*tp_clear*/
|
||||||
0, /*outputHook_tp_richcompare*/
|
0, /*tp_richcompare*/
|
||||||
0, /*outputHook_tp_weaklistoffset*/
|
0, /*tp_weaklistoffset*/
|
||||||
0, /*outputHook_tp_iter*/
|
0, /*tp_iter*/
|
||||||
0, /*outputHook_tp_iternext*/
|
0, /*tp_iternext*/
|
||||||
TXNObj_methods, /* tp_methods */
|
TXNObj_methods, /* tp_methods */
|
||||||
0, /*outputHook_tp_members*/
|
0, /*tp_members*/
|
||||||
TXNObj_getsetlist, /*tp_getset*/
|
TXNObj_getsetlist, /*tp_getset*/
|
||||||
0, /*outputHook_tp_base*/
|
0, /*tp_base*/
|
||||||
|
0, /*tp_dict*/
|
||||||
|
0, /*tp_descr_get*/
|
||||||
|
0, /*tp_descr_set*/
|
||||||
|
0, /*tp_dictoffset*/
|
||||||
|
TXNObj_tp_init, /* tp_init */
|
||||||
|
TXNObj_tp_alloc, /* tp_alloc */
|
||||||
|
TXNObj_tp_new, /* tp_new */
|
||||||
|
TXNObj_tp_free, /* tp_free */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* ------------------- End object type TXNObject -------------------- */
|
/* ------------------- End object type TXNObject -------------------- */
|
||||||
|
@ -1423,11 +1450,30 @@ static PyMethodDef TXNFontMenuObj_methods[] = {
|
||||||
|
|
||||||
#define TXNFontMenuObj_getsetlist NULL
|
#define TXNFontMenuObj_getsetlist NULL
|
||||||
|
|
||||||
|
|
||||||
#define TXNFontMenuObj_compare NULL
|
#define TXNFontMenuObj_compare NULL
|
||||||
|
|
||||||
#define TXNFontMenuObj_repr NULL
|
#define TXNFontMenuObj_repr NULL
|
||||||
|
|
||||||
#define TXNFontMenuObj_hash NULL
|
#define TXNFontMenuObj_hash NULL
|
||||||
|
#define TXNFontMenuObj_tp_init 0
|
||||||
|
|
||||||
|
#define TXNFontMenuObj_tp_alloc PyType_GenericAlloc
|
||||||
|
|
||||||
|
static PyObject *TXNFontMenuObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||||
|
{
|
||||||
|
PyObject *self;
|
||||||
|
TXNFontMenuObject itself;
|
||||||
|
char *kw[] = {"itself", 0};
|
||||||
|
|
||||||
|
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, TXNFontMenuObj_Convert, &itself)) return NULL;
|
||||||
|
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
|
||||||
|
((TXNFontMenuObjectObject *)self)->ob_itself = itself;
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define TXNFontMenuObj_tp_free PyObject_Del
|
||||||
|
|
||||||
|
|
||||||
PyTypeObject TXNFontMenuObject_Type = {
|
PyTypeObject TXNFontMenuObject_Type = {
|
||||||
PyObject_HEAD_INIT(NULL)
|
PyObject_HEAD_INIT(NULL)
|
||||||
|
@ -1450,19 +1496,27 @@ PyTypeObject TXNFontMenuObject_Type = {
|
||||||
0, /*tp_str*/
|
0, /*tp_str*/
|
||||||
PyObject_GenericGetAttr, /*tp_getattro*/
|
PyObject_GenericGetAttr, /*tp_getattro*/
|
||||||
PyObject_GenericSetAttr, /*tp_setattro */
|
PyObject_GenericSetAttr, /*tp_setattro */
|
||||||
0, /*outputHook_tp_as_buffer*/
|
0, /*tp_as_buffer*/
|
||||||
0, /*outputHook_tp_flags*/
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||||
0, /*outputHook_tp_doc*/
|
0, /*tp_doc*/
|
||||||
0, /*outputHook_tp_traverse*/
|
0, /*tp_traverse*/
|
||||||
0, /*outputHook_tp_clear*/
|
0, /*tp_clear*/
|
||||||
0, /*outputHook_tp_richcompare*/
|
0, /*tp_richcompare*/
|
||||||
0, /*outputHook_tp_weaklistoffset*/
|
0, /*tp_weaklistoffset*/
|
||||||
0, /*outputHook_tp_iter*/
|
0, /*tp_iter*/
|
||||||
0, /*outputHook_tp_iternext*/
|
0, /*tp_iternext*/
|
||||||
TXNFontMenuObj_methods, /* tp_methods */
|
TXNFontMenuObj_methods, /* tp_methods */
|
||||||
0, /*outputHook_tp_members*/
|
0, /*tp_members*/
|
||||||
TXNFontMenuObj_getsetlist, /*tp_getset*/
|
TXNFontMenuObj_getsetlist, /*tp_getset*/
|
||||||
0, /*outputHook_tp_base*/
|
0, /*tp_base*/
|
||||||
|
0, /*tp_dict*/
|
||||||
|
0, /*tp_descr_get*/
|
||||||
|
0, /*tp_descr_set*/
|
||||||
|
0, /*tp_dictoffset*/
|
||||||
|
TXNFontMenuObj_tp_init, /* tp_init */
|
||||||
|
TXNFontMenuObj_tp_alloc, /* tp_alloc */
|
||||||
|
TXNFontMenuObj_tp_new, /* tp_new */
|
||||||
|
TXNFontMenuObj_tp_free, /* tp_free */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* --------------- End object type TXNFontMenuObject ---------------- */
|
/* --------------- End object type TXNFontMenuObject ---------------- */
|
||||||
|
@ -1676,12 +1730,16 @@ void init_Mlte(void)
|
||||||
return;
|
return;
|
||||||
TXNObject_Type.ob_type = &PyType_Type;
|
TXNObject_Type.ob_type = &PyType_Type;
|
||||||
Py_INCREF(&TXNObject_Type);
|
Py_INCREF(&TXNObject_Type);
|
||||||
if (PyDict_SetItemString(d, "TXNObjectType", (PyObject *)&TXNObject_Type) != 0)
|
PyModule_AddObject(m, "TXNObject", (PyObject *)&TXNObject_Type);
|
||||||
Py_FatalError("can't initialize TXNObjectType");
|
/* Backward-compatible name */
|
||||||
|
Py_INCREF(&TXNObject_Type);
|
||||||
|
PyModule_AddObject(m, "TXNObjectType", (PyObject *)&TXNObject_Type);
|
||||||
TXNFontMenuObject_Type.ob_type = &PyType_Type;
|
TXNFontMenuObject_Type.ob_type = &PyType_Type;
|
||||||
Py_INCREF(&TXNFontMenuObject_Type);
|
Py_INCREF(&TXNFontMenuObject_Type);
|
||||||
if (PyDict_SetItemString(d, "TXNFontMenuObjectType", (PyObject *)&TXNFontMenuObject_Type) != 0)
|
PyModule_AddObject(m, "TXNFontMenuObject", (PyObject *)&TXNFontMenuObject_Type);
|
||||||
Py_FatalError("can't initialize TXNFontMenuObjectType");
|
/* Backward-compatible name */
|
||||||
|
Py_INCREF(&TXNFontMenuObject_Type);
|
||||||
|
PyModule_AddObject(m, "TXNFontMenuObjectType", (PyObject *)&TXNFontMenuObject_Type);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ======================== End module _Mlte ======================== */
|
/* ======================== End module _Mlte ======================== */
|
||||||
|
|
|
@ -136,11 +136,11 @@ execfile("mltetypetest.py")
|
||||||
|
|
||||||
# Our (opaque) objects
|
# Our (opaque) objects
|
||||||
|
|
||||||
class TXNObjDefinition(PEP252Mixin, GlobalObjectDefinition):
|
class TXNObjDefinition(PEP253Mixin, GlobalObjectDefinition):
|
||||||
def outputCheckNewArg(self):
|
def outputCheckNewArg(self):
|
||||||
Output("if (itself == NULL) return PyMac_Error(resNotFound);")
|
Output("if (itself == NULL) return PyMac_Error(resNotFound);")
|
||||||
|
|
||||||
class TXNFontMenuObjDefinition(PEP252Mixin, GlobalObjectDefinition):
|
class TXNFontMenuObjDefinition(PEP253Mixin, GlobalObjectDefinition):
|
||||||
def outputCheckNewArg(self):
|
def outputCheckNewArg(self):
|
||||||
Output("if (itself == NULL) return PyMac_Error(resNotFound);")
|
Output("if (itself == NULL) return PyMac_Error(resNotFound);")
|
||||||
|
|
||||||
|
|
|
@ -1115,6 +1115,24 @@ static PyGetSetDef GrafObj_getsetlist[] = {
|
||||||
#define GrafObj_repr NULL
|
#define GrafObj_repr NULL
|
||||||
|
|
||||||
#define GrafObj_hash NULL
|
#define GrafObj_hash NULL
|
||||||
|
#define GrafObj_tp_init 0
|
||||||
|
|
||||||
|
#define GrafObj_tp_alloc PyType_GenericAlloc
|
||||||
|
|
||||||
|
static PyObject *GrafObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||||
|
{
|
||||||
|
PyObject *self;
|
||||||
|
GrafPtr itself;
|
||||||
|
char *kw[] = {"itself", 0};
|
||||||
|
|
||||||
|
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, GrafObj_Convert, &itself)) return NULL;
|
||||||
|
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
|
||||||
|
((GrafPortObject *)self)->ob_itself = itself;
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define GrafObj_tp_free PyObject_Del
|
||||||
|
|
||||||
|
|
||||||
PyTypeObject GrafPort_Type = {
|
PyTypeObject GrafPort_Type = {
|
||||||
PyObject_HEAD_INIT(NULL)
|
PyObject_HEAD_INIT(NULL)
|
||||||
|
@ -1137,19 +1155,27 @@ PyTypeObject GrafPort_Type = {
|
||||||
0, /*tp_str*/
|
0, /*tp_str*/
|
||||||
PyObject_GenericGetAttr, /*tp_getattro*/
|
PyObject_GenericGetAttr, /*tp_getattro*/
|
||||||
PyObject_GenericSetAttr, /*tp_setattro */
|
PyObject_GenericSetAttr, /*tp_setattro */
|
||||||
0, /*outputHook_tp_as_buffer*/
|
0, /*tp_as_buffer*/
|
||||||
0, /*outputHook_tp_flags*/
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||||
0, /*outputHook_tp_doc*/
|
0, /*tp_doc*/
|
||||||
0, /*outputHook_tp_traverse*/
|
0, /*tp_traverse*/
|
||||||
0, /*outputHook_tp_clear*/
|
0, /*tp_clear*/
|
||||||
0, /*outputHook_tp_richcompare*/
|
0, /*tp_richcompare*/
|
||||||
0, /*outputHook_tp_weaklistoffset*/
|
0, /*tp_weaklistoffset*/
|
||||||
0, /*outputHook_tp_iter*/
|
0, /*tp_iter*/
|
||||||
0, /*outputHook_tp_iternext*/
|
0, /*tp_iternext*/
|
||||||
GrafObj_methods, /* tp_methods */
|
GrafObj_methods, /* tp_methods */
|
||||||
0, /*outputHook_tp_members*/
|
0, /*tp_members*/
|
||||||
GrafObj_getsetlist, /*tp_getset*/
|
GrafObj_getsetlist, /*tp_getset*/
|
||||||
0, /*outputHook_tp_base*/
|
0, /*tp_base*/
|
||||||
|
0, /*tp_dict*/
|
||||||
|
0, /*tp_descr_get*/
|
||||||
|
0, /*tp_descr_set*/
|
||||||
|
0, /*tp_dictoffset*/
|
||||||
|
GrafObj_tp_init, /* tp_init */
|
||||||
|
GrafObj_tp_alloc, /* tp_alloc */
|
||||||
|
GrafObj_tp_new, /* tp_new */
|
||||||
|
GrafObj_tp_free, /* tp_free */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* -------------------- End object type GrafPort -------------------- */
|
/* -------------------- End object type GrafPort -------------------- */
|
||||||
|
@ -1287,6 +1313,24 @@ static PyGetSetDef BMObj_getsetlist[] = {
|
||||||
#define BMObj_repr NULL
|
#define BMObj_repr NULL
|
||||||
|
|
||||||
#define BMObj_hash NULL
|
#define BMObj_hash NULL
|
||||||
|
#define BMObj_tp_init 0
|
||||||
|
|
||||||
|
#define BMObj_tp_alloc PyType_GenericAlloc
|
||||||
|
|
||||||
|
static PyObject *BMObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||||
|
{
|
||||||
|
PyObject *self;
|
||||||
|
BitMapPtr itself;
|
||||||
|
char *kw[] = {"itself", 0};
|
||||||
|
|
||||||
|
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, BMObj_Convert, &itself)) return NULL;
|
||||||
|
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
|
||||||
|
((BitMapObject *)self)->ob_itself = itself;
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define BMObj_tp_free PyObject_Del
|
||||||
|
|
||||||
|
|
||||||
PyTypeObject BitMap_Type = {
|
PyTypeObject BitMap_Type = {
|
||||||
PyObject_HEAD_INIT(NULL)
|
PyObject_HEAD_INIT(NULL)
|
||||||
|
@ -1309,19 +1353,27 @@ PyTypeObject BitMap_Type = {
|
||||||
0, /*tp_str*/
|
0, /*tp_str*/
|
||||||
PyObject_GenericGetAttr, /*tp_getattro*/
|
PyObject_GenericGetAttr, /*tp_getattro*/
|
||||||
PyObject_GenericSetAttr, /*tp_setattro */
|
PyObject_GenericSetAttr, /*tp_setattro */
|
||||||
0, /*outputHook_tp_as_buffer*/
|
0, /*tp_as_buffer*/
|
||||||
0, /*outputHook_tp_flags*/
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||||
0, /*outputHook_tp_doc*/
|
0, /*tp_doc*/
|
||||||
0, /*outputHook_tp_traverse*/
|
0, /*tp_traverse*/
|
||||||
0, /*outputHook_tp_clear*/
|
0, /*tp_clear*/
|
||||||
0, /*outputHook_tp_richcompare*/
|
0, /*tp_richcompare*/
|
||||||
0, /*outputHook_tp_weaklistoffset*/
|
0, /*tp_weaklistoffset*/
|
||||||
0, /*outputHook_tp_iter*/
|
0, /*tp_iter*/
|
||||||
0, /*outputHook_tp_iternext*/
|
0, /*tp_iternext*/
|
||||||
BMObj_methods, /* tp_methods */
|
BMObj_methods, /* tp_methods */
|
||||||
0, /*outputHook_tp_members*/
|
0, /*tp_members*/
|
||||||
BMObj_getsetlist, /*tp_getset*/
|
BMObj_getsetlist, /*tp_getset*/
|
||||||
0, /*outputHook_tp_base*/
|
0, /*tp_base*/
|
||||||
|
0, /*tp_dict*/
|
||||||
|
0, /*tp_descr_get*/
|
||||||
|
0, /*tp_descr_set*/
|
||||||
|
0, /*tp_dictoffset*/
|
||||||
|
BMObj_tp_init, /* tp_init */
|
||||||
|
BMObj_tp_alloc, /* tp_alloc */
|
||||||
|
BMObj_tp_new, /* tp_new */
|
||||||
|
BMObj_tp_free, /* tp_free */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* --------------------- End object type BitMap --------------------- */
|
/* --------------------- End object type BitMap --------------------- */
|
||||||
|
@ -6872,12 +6924,16 @@ void init_Qd(void)
|
||||||
return;
|
return;
|
||||||
GrafPort_Type.ob_type = &PyType_Type;
|
GrafPort_Type.ob_type = &PyType_Type;
|
||||||
Py_INCREF(&GrafPort_Type);
|
Py_INCREF(&GrafPort_Type);
|
||||||
if (PyDict_SetItemString(d, "GrafPortType", (PyObject *)&GrafPort_Type) != 0)
|
PyModule_AddObject(m, "GrafPort", (PyObject *)&GrafPort_Type);
|
||||||
Py_FatalError("can't initialize GrafPortType");
|
/* Backward-compatible name */
|
||||||
|
Py_INCREF(&GrafPort_Type);
|
||||||
|
PyModule_AddObject(m, "GrafPortType", (PyObject *)&GrafPort_Type);
|
||||||
BitMap_Type.ob_type = &PyType_Type;
|
BitMap_Type.ob_type = &PyType_Type;
|
||||||
Py_INCREF(&BitMap_Type);
|
Py_INCREF(&BitMap_Type);
|
||||||
if (PyDict_SetItemString(d, "BitMapType", (PyObject *)&BitMap_Type) != 0)
|
PyModule_AddObject(m, "BitMap", (PyObject *)&BitMap_Type);
|
||||||
Py_FatalError("can't initialize BitMapType");
|
/* Backward-compatible name */
|
||||||
|
Py_INCREF(&BitMap_Type);
|
||||||
|
PyModule_AddObject(m, "BitMapType", (PyObject *)&BitMap_Type);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ========================= End module _Qd ========================= */
|
/* ========================= End module _Qd ========================= */
|
||||||
|
|
|
@ -236,7 +236,7 @@ initstuff = initstuff + """
|
||||||
## def outputFreeIt(self, itselfname):
|
## def outputFreeIt(self, itselfname):
|
||||||
## Output("KillPoly(%s);", itselfname)
|
## Output("KillPoly(%s);", itselfname)
|
||||||
|
|
||||||
class MyGRObjectDefinition(PEP252Mixin, GlobalObjectDefinition):
|
class MyGRObjectDefinition(PEP253Mixin, GlobalObjectDefinition):
|
||||||
getsetlist = [
|
getsetlist = [
|
||||||
('visRgn',
|
('visRgn',
|
||||||
"""RgnHandle h=NewRgn(); /* XXXX wrong dispose routine */
|
"""RgnHandle h=NewRgn(); /* XXXX wrong dispose routine */
|
||||||
|
@ -277,7 +277,7 @@ class MyGRObjectDefinition(PEP252Mixin, GlobalObjectDefinition):
|
||||||
OutRbrace()
|
OutRbrace()
|
||||||
Output("#endif")
|
Output("#endif")
|
||||||
|
|
||||||
class MyBMObjectDefinition(PEP252Mixin, GlobalObjectDefinition):
|
class MyBMObjectDefinition(PEP253Mixin, GlobalObjectDefinition):
|
||||||
getsetlist = [
|
getsetlist = [
|
||||||
(
|
(
|
||||||
'baseAddr',
|
'baseAddr',
|
||||||
|
|
|
@ -133,11 +133,30 @@ static PyMethodDef GWorldObj_methods[] = {
|
||||||
|
|
||||||
#define GWorldObj_getsetlist NULL
|
#define GWorldObj_getsetlist NULL
|
||||||
|
|
||||||
|
|
||||||
#define GWorldObj_compare NULL
|
#define GWorldObj_compare NULL
|
||||||
|
|
||||||
#define GWorldObj_repr NULL
|
#define GWorldObj_repr NULL
|
||||||
|
|
||||||
#define GWorldObj_hash NULL
|
#define GWorldObj_hash NULL
|
||||||
|
#define GWorldObj_tp_init 0
|
||||||
|
|
||||||
|
#define GWorldObj_tp_alloc PyType_GenericAlloc
|
||||||
|
|
||||||
|
static PyObject *GWorldObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||||
|
{
|
||||||
|
PyObject *self;
|
||||||
|
GWorldPtr itself;
|
||||||
|
char *kw[] = {"itself", 0};
|
||||||
|
|
||||||
|
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, GWorldObj_Convert, &itself)) return NULL;
|
||||||
|
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
|
||||||
|
((GWorldObject *)self)->ob_itself = itself;
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define GWorldObj_tp_free PyObject_Del
|
||||||
|
|
||||||
|
|
||||||
PyTypeObject GWorld_Type = {
|
PyTypeObject GWorld_Type = {
|
||||||
PyObject_HEAD_INIT(NULL)
|
PyObject_HEAD_INIT(NULL)
|
||||||
|
@ -160,19 +179,27 @@ PyTypeObject GWorld_Type = {
|
||||||
0, /*tp_str*/
|
0, /*tp_str*/
|
||||||
PyObject_GenericGetAttr, /*tp_getattro*/
|
PyObject_GenericGetAttr, /*tp_getattro*/
|
||||||
PyObject_GenericSetAttr, /*tp_setattro */
|
PyObject_GenericSetAttr, /*tp_setattro */
|
||||||
0, /*outputHook_tp_as_buffer*/
|
0, /*tp_as_buffer*/
|
||||||
0, /*outputHook_tp_flags*/
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||||
0, /*outputHook_tp_doc*/
|
0, /*tp_doc*/
|
||||||
0, /*outputHook_tp_traverse*/
|
0, /*tp_traverse*/
|
||||||
0, /*outputHook_tp_clear*/
|
0, /*tp_clear*/
|
||||||
0, /*outputHook_tp_richcompare*/
|
0, /*tp_richcompare*/
|
||||||
0, /*outputHook_tp_weaklistoffset*/
|
0, /*tp_weaklistoffset*/
|
||||||
0, /*outputHook_tp_iter*/
|
0, /*tp_iter*/
|
||||||
0, /*outputHook_tp_iternext*/
|
0, /*tp_iternext*/
|
||||||
GWorldObj_methods, /* tp_methods */
|
GWorldObj_methods, /* tp_methods */
|
||||||
0, /*outputHook_tp_members*/
|
0, /*tp_members*/
|
||||||
GWorldObj_getsetlist, /*tp_getset*/
|
GWorldObj_getsetlist, /*tp_getset*/
|
||||||
0, /*outputHook_tp_base*/
|
0, /*tp_base*/
|
||||||
|
0, /*tp_dict*/
|
||||||
|
0, /*tp_descr_get*/
|
||||||
|
0, /*tp_descr_set*/
|
||||||
|
0, /*tp_dictoffset*/
|
||||||
|
GWorldObj_tp_init, /* tp_init */
|
||||||
|
GWorldObj_tp_alloc, /* tp_alloc */
|
||||||
|
GWorldObj_tp_new, /* tp_new */
|
||||||
|
GWorldObj_tp_free, /* tp_free */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* --------------------- End object type GWorld --------------------- */
|
/* --------------------- End object type GWorld --------------------- */
|
||||||
|
@ -684,8 +711,10 @@ void init_Qdoffs(void)
|
||||||
return;
|
return;
|
||||||
GWorld_Type.ob_type = &PyType_Type;
|
GWorld_Type.ob_type = &PyType_Type;
|
||||||
Py_INCREF(&GWorld_Type);
|
Py_INCREF(&GWorld_Type);
|
||||||
if (PyDict_SetItemString(d, "GWorldType", (PyObject *)&GWorld_Type) != 0)
|
PyModule_AddObject(m, "GWorld", (PyObject *)&GWorld_Type);
|
||||||
Py_FatalError("can't initialize GWorldType");
|
/* Backward-compatible name */
|
||||||
|
Py_INCREF(&GWorld_Type);
|
||||||
|
PyModule_AddObject(m, "GWorldType", (PyObject *)&GWorld_Type);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ======================= End module _Qdoffs ======================= */
|
/* ======================= End module _Qdoffs ======================= */
|
||||||
|
|
|
@ -57,7 +57,8 @@ initstuff = initstuff + """
|
||||||
PyMac_INIT_TOOLBOX_OBJECT_CONVERT(GWorldPtr, GWorldObj_Convert);
|
PyMac_INIT_TOOLBOX_OBJECT_CONVERT(GWorldPtr, GWorldObj_Convert);
|
||||||
"""
|
"""
|
||||||
|
|
||||||
class MyObjectDefinition(PEP252Mixin, GlobalObjectDefinition):
|
class MyObjectDefinition(PEP253Mixin, GlobalObjectDefinition):
|
||||||
|
# XXXX Should inherit from GrafPtr?
|
||||||
def outputCheckNewArg(self):
|
def outputCheckNewArg(self):
|
||||||
Output("if (itself == NULL) return PyMac_Error(resNotFound);")
|
Output("if (itself == NULL) return PyMac_Error(resNotFound);")
|
||||||
## def outputInitStructMembers(self):
|
## def outputInitStructMembers(self):
|
||||||
|
|
|
@ -1092,11 +1092,30 @@ static PyMethodDef MovieCtlObj_methods[] = {
|
||||||
|
|
||||||
#define MovieCtlObj_getsetlist NULL
|
#define MovieCtlObj_getsetlist NULL
|
||||||
|
|
||||||
|
|
||||||
#define MovieCtlObj_compare NULL
|
#define MovieCtlObj_compare NULL
|
||||||
|
|
||||||
#define MovieCtlObj_repr NULL
|
#define MovieCtlObj_repr NULL
|
||||||
|
|
||||||
#define MovieCtlObj_hash NULL
|
#define MovieCtlObj_hash NULL
|
||||||
|
#define MovieCtlObj_tp_init 0
|
||||||
|
|
||||||
|
#define MovieCtlObj_tp_alloc PyType_GenericAlloc
|
||||||
|
|
||||||
|
static PyObject *MovieCtlObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||||
|
{
|
||||||
|
PyObject *self;
|
||||||
|
MovieController itself;
|
||||||
|
char *kw[] = {"itself", 0};
|
||||||
|
|
||||||
|
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, MovieCtlObj_Convert, &itself)) return NULL;
|
||||||
|
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
|
||||||
|
((MovieControllerObject *)self)->ob_itself = itself;
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define MovieCtlObj_tp_free PyObject_Del
|
||||||
|
|
||||||
|
|
||||||
PyTypeObject MovieController_Type = {
|
PyTypeObject MovieController_Type = {
|
||||||
PyObject_HEAD_INIT(NULL)
|
PyObject_HEAD_INIT(NULL)
|
||||||
|
@ -1119,19 +1138,27 @@ PyTypeObject MovieController_Type = {
|
||||||
0, /*tp_str*/
|
0, /*tp_str*/
|
||||||
PyObject_GenericGetAttr, /*tp_getattro*/
|
PyObject_GenericGetAttr, /*tp_getattro*/
|
||||||
PyObject_GenericSetAttr, /*tp_setattro */
|
PyObject_GenericSetAttr, /*tp_setattro */
|
||||||
0, /*outputHook_tp_as_buffer*/
|
0, /*tp_as_buffer*/
|
||||||
0, /*outputHook_tp_flags*/
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||||
0, /*outputHook_tp_doc*/
|
0, /*tp_doc*/
|
||||||
0, /*outputHook_tp_traverse*/
|
0, /*tp_traverse*/
|
||||||
0, /*outputHook_tp_clear*/
|
0, /*tp_clear*/
|
||||||
0, /*outputHook_tp_richcompare*/
|
0, /*tp_richcompare*/
|
||||||
0, /*outputHook_tp_weaklistoffset*/
|
0, /*tp_weaklistoffset*/
|
||||||
0, /*outputHook_tp_iter*/
|
0, /*tp_iter*/
|
||||||
0, /*outputHook_tp_iternext*/
|
0, /*tp_iternext*/
|
||||||
MovieCtlObj_methods, /* tp_methods */
|
MovieCtlObj_methods, /* tp_methods */
|
||||||
0, /*outputHook_tp_members*/
|
0, /*tp_members*/
|
||||||
MovieCtlObj_getsetlist, /*tp_getset*/
|
MovieCtlObj_getsetlist, /*tp_getset*/
|
||||||
0, /*outputHook_tp_base*/
|
0, /*tp_base*/
|
||||||
|
0, /*tp_dict*/
|
||||||
|
0, /*tp_descr_get*/
|
||||||
|
0, /*tp_descr_set*/
|
||||||
|
0, /*tp_dictoffset*/
|
||||||
|
MovieCtlObj_tp_init, /* tp_init */
|
||||||
|
MovieCtlObj_tp_alloc, /* tp_alloc */
|
||||||
|
MovieCtlObj_tp_new, /* tp_new */
|
||||||
|
MovieCtlObj_tp_free, /* tp_free */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* ---------------- End object type MovieController ----------------- */
|
/* ---------------- End object type MovieController ----------------- */
|
||||||
|
@ -1553,11 +1580,30 @@ static PyMethodDef TimeBaseObj_methods[] = {
|
||||||
|
|
||||||
#define TimeBaseObj_getsetlist NULL
|
#define TimeBaseObj_getsetlist NULL
|
||||||
|
|
||||||
|
|
||||||
#define TimeBaseObj_compare NULL
|
#define TimeBaseObj_compare NULL
|
||||||
|
|
||||||
#define TimeBaseObj_repr NULL
|
#define TimeBaseObj_repr NULL
|
||||||
|
|
||||||
#define TimeBaseObj_hash NULL
|
#define TimeBaseObj_hash NULL
|
||||||
|
#define TimeBaseObj_tp_init 0
|
||||||
|
|
||||||
|
#define TimeBaseObj_tp_alloc PyType_GenericAlloc
|
||||||
|
|
||||||
|
static PyObject *TimeBaseObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||||
|
{
|
||||||
|
PyObject *self;
|
||||||
|
TimeBase itself;
|
||||||
|
char *kw[] = {"itself", 0};
|
||||||
|
|
||||||
|
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, TimeBaseObj_Convert, &itself)) return NULL;
|
||||||
|
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
|
||||||
|
((TimeBaseObject *)self)->ob_itself = itself;
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define TimeBaseObj_tp_free PyObject_Del
|
||||||
|
|
||||||
|
|
||||||
PyTypeObject TimeBase_Type = {
|
PyTypeObject TimeBase_Type = {
|
||||||
PyObject_HEAD_INIT(NULL)
|
PyObject_HEAD_INIT(NULL)
|
||||||
|
@ -1580,19 +1626,27 @@ PyTypeObject TimeBase_Type = {
|
||||||
0, /*tp_str*/
|
0, /*tp_str*/
|
||||||
PyObject_GenericGetAttr, /*tp_getattro*/
|
PyObject_GenericGetAttr, /*tp_getattro*/
|
||||||
PyObject_GenericSetAttr, /*tp_setattro */
|
PyObject_GenericSetAttr, /*tp_setattro */
|
||||||
0, /*outputHook_tp_as_buffer*/
|
0, /*tp_as_buffer*/
|
||||||
0, /*outputHook_tp_flags*/
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||||
0, /*outputHook_tp_doc*/
|
0, /*tp_doc*/
|
||||||
0, /*outputHook_tp_traverse*/
|
0, /*tp_traverse*/
|
||||||
0, /*outputHook_tp_clear*/
|
0, /*tp_clear*/
|
||||||
0, /*outputHook_tp_richcompare*/
|
0, /*tp_richcompare*/
|
||||||
0, /*outputHook_tp_weaklistoffset*/
|
0, /*tp_weaklistoffset*/
|
||||||
0, /*outputHook_tp_iter*/
|
0, /*tp_iter*/
|
||||||
0, /*outputHook_tp_iternext*/
|
0, /*tp_iternext*/
|
||||||
TimeBaseObj_methods, /* tp_methods */
|
TimeBaseObj_methods, /* tp_methods */
|
||||||
0, /*outputHook_tp_members*/
|
0, /*tp_members*/
|
||||||
TimeBaseObj_getsetlist, /*tp_getset*/
|
TimeBaseObj_getsetlist, /*tp_getset*/
|
||||||
0, /*outputHook_tp_base*/
|
0, /*tp_base*/
|
||||||
|
0, /*tp_dict*/
|
||||||
|
0, /*tp_descr_get*/
|
||||||
|
0, /*tp_descr_set*/
|
||||||
|
0, /*tp_dictoffset*/
|
||||||
|
TimeBaseObj_tp_init, /* tp_init */
|
||||||
|
TimeBaseObj_tp_alloc, /* tp_alloc */
|
||||||
|
TimeBaseObj_tp_new, /* tp_new */
|
||||||
|
TimeBaseObj_tp_free, /* tp_free */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* -------------------- End object type TimeBase -------------------- */
|
/* -------------------- End object type TimeBase -------------------- */
|
||||||
|
@ -1867,11 +1921,30 @@ static PyMethodDef UserDataObj_methods[] = {
|
||||||
|
|
||||||
#define UserDataObj_getsetlist NULL
|
#define UserDataObj_getsetlist NULL
|
||||||
|
|
||||||
|
|
||||||
#define UserDataObj_compare NULL
|
#define UserDataObj_compare NULL
|
||||||
|
|
||||||
#define UserDataObj_repr NULL
|
#define UserDataObj_repr NULL
|
||||||
|
|
||||||
#define UserDataObj_hash NULL
|
#define UserDataObj_hash NULL
|
||||||
|
#define UserDataObj_tp_init 0
|
||||||
|
|
||||||
|
#define UserDataObj_tp_alloc PyType_GenericAlloc
|
||||||
|
|
||||||
|
static PyObject *UserDataObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||||
|
{
|
||||||
|
PyObject *self;
|
||||||
|
UserData itself;
|
||||||
|
char *kw[] = {"itself", 0};
|
||||||
|
|
||||||
|
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, UserDataObj_Convert, &itself)) return NULL;
|
||||||
|
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
|
||||||
|
((UserDataObject *)self)->ob_itself = itself;
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define UserDataObj_tp_free PyObject_Del
|
||||||
|
|
||||||
|
|
||||||
PyTypeObject UserData_Type = {
|
PyTypeObject UserData_Type = {
|
||||||
PyObject_HEAD_INIT(NULL)
|
PyObject_HEAD_INIT(NULL)
|
||||||
|
@ -1894,19 +1967,27 @@ PyTypeObject UserData_Type = {
|
||||||
0, /*tp_str*/
|
0, /*tp_str*/
|
||||||
PyObject_GenericGetAttr, /*tp_getattro*/
|
PyObject_GenericGetAttr, /*tp_getattro*/
|
||||||
PyObject_GenericSetAttr, /*tp_setattro */
|
PyObject_GenericSetAttr, /*tp_setattro */
|
||||||
0, /*outputHook_tp_as_buffer*/
|
0, /*tp_as_buffer*/
|
||||||
0, /*outputHook_tp_flags*/
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||||
0, /*outputHook_tp_doc*/
|
0, /*tp_doc*/
|
||||||
0, /*outputHook_tp_traverse*/
|
0, /*tp_traverse*/
|
||||||
0, /*outputHook_tp_clear*/
|
0, /*tp_clear*/
|
||||||
0, /*outputHook_tp_richcompare*/
|
0, /*tp_richcompare*/
|
||||||
0, /*outputHook_tp_weaklistoffset*/
|
0, /*tp_weaklistoffset*/
|
||||||
0, /*outputHook_tp_iter*/
|
0, /*tp_iter*/
|
||||||
0, /*outputHook_tp_iternext*/
|
0, /*tp_iternext*/
|
||||||
UserDataObj_methods, /* tp_methods */
|
UserDataObj_methods, /* tp_methods */
|
||||||
0, /*outputHook_tp_members*/
|
0, /*tp_members*/
|
||||||
UserDataObj_getsetlist, /*tp_getset*/
|
UserDataObj_getsetlist, /*tp_getset*/
|
||||||
0, /*outputHook_tp_base*/
|
0, /*tp_base*/
|
||||||
|
0, /*tp_dict*/
|
||||||
|
0, /*tp_descr_get*/
|
||||||
|
0, /*tp_descr_set*/
|
||||||
|
0, /*tp_dictoffset*/
|
||||||
|
UserDataObj_tp_init, /* tp_init */
|
||||||
|
UserDataObj_tp_alloc, /* tp_alloc */
|
||||||
|
UserDataObj_tp_new, /* tp_new */
|
||||||
|
UserDataObj_tp_free, /* tp_free */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* -------------------- End object type UserData -------------------- */
|
/* -------------------- End object type UserData -------------------- */
|
||||||
|
@ -3052,11 +3133,30 @@ static PyMethodDef MediaObj_methods[] = {
|
||||||
|
|
||||||
#define MediaObj_getsetlist NULL
|
#define MediaObj_getsetlist NULL
|
||||||
|
|
||||||
|
|
||||||
#define MediaObj_compare NULL
|
#define MediaObj_compare NULL
|
||||||
|
|
||||||
#define MediaObj_repr NULL
|
#define MediaObj_repr NULL
|
||||||
|
|
||||||
#define MediaObj_hash NULL
|
#define MediaObj_hash NULL
|
||||||
|
#define MediaObj_tp_init 0
|
||||||
|
|
||||||
|
#define MediaObj_tp_alloc PyType_GenericAlloc
|
||||||
|
|
||||||
|
static PyObject *MediaObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||||
|
{
|
||||||
|
PyObject *self;
|
||||||
|
Media itself;
|
||||||
|
char *kw[] = {"itself", 0};
|
||||||
|
|
||||||
|
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, MediaObj_Convert, &itself)) return NULL;
|
||||||
|
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
|
||||||
|
((MediaObject *)self)->ob_itself = itself;
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define MediaObj_tp_free PyObject_Del
|
||||||
|
|
||||||
|
|
||||||
PyTypeObject Media_Type = {
|
PyTypeObject Media_Type = {
|
||||||
PyObject_HEAD_INIT(NULL)
|
PyObject_HEAD_INIT(NULL)
|
||||||
|
@ -3079,19 +3179,27 @@ PyTypeObject Media_Type = {
|
||||||
0, /*tp_str*/
|
0, /*tp_str*/
|
||||||
PyObject_GenericGetAttr, /*tp_getattro*/
|
PyObject_GenericGetAttr, /*tp_getattro*/
|
||||||
PyObject_GenericSetAttr, /*tp_setattro */
|
PyObject_GenericSetAttr, /*tp_setattro */
|
||||||
0, /*outputHook_tp_as_buffer*/
|
0, /*tp_as_buffer*/
|
||||||
0, /*outputHook_tp_flags*/
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||||
0, /*outputHook_tp_doc*/
|
0, /*tp_doc*/
|
||||||
0, /*outputHook_tp_traverse*/
|
0, /*tp_traverse*/
|
||||||
0, /*outputHook_tp_clear*/
|
0, /*tp_clear*/
|
||||||
0, /*outputHook_tp_richcompare*/
|
0, /*tp_richcompare*/
|
||||||
0, /*outputHook_tp_weaklistoffset*/
|
0, /*tp_weaklistoffset*/
|
||||||
0, /*outputHook_tp_iter*/
|
0, /*tp_iter*/
|
||||||
0, /*outputHook_tp_iternext*/
|
0, /*tp_iternext*/
|
||||||
MediaObj_methods, /* tp_methods */
|
MediaObj_methods, /* tp_methods */
|
||||||
0, /*outputHook_tp_members*/
|
0, /*tp_members*/
|
||||||
MediaObj_getsetlist, /*tp_getset*/
|
MediaObj_getsetlist, /*tp_getset*/
|
||||||
0, /*outputHook_tp_base*/
|
0, /*tp_base*/
|
||||||
|
0, /*tp_dict*/
|
||||||
|
0, /*tp_descr_get*/
|
||||||
|
0, /*tp_descr_set*/
|
||||||
|
0, /*tp_dictoffset*/
|
||||||
|
MediaObj_tp_init, /* tp_init */
|
||||||
|
MediaObj_tp_alloc, /* tp_alloc */
|
||||||
|
MediaObj_tp_new, /* tp_new */
|
||||||
|
MediaObj_tp_free, /* tp_free */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* --------------------- End object type Media ---------------------- */
|
/* --------------------- End object type Media ---------------------- */
|
||||||
|
@ -4343,11 +4451,30 @@ static PyMethodDef TrackObj_methods[] = {
|
||||||
|
|
||||||
#define TrackObj_getsetlist NULL
|
#define TrackObj_getsetlist NULL
|
||||||
|
|
||||||
|
|
||||||
#define TrackObj_compare NULL
|
#define TrackObj_compare NULL
|
||||||
|
|
||||||
#define TrackObj_repr NULL
|
#define TrackObj_repr NULL
|
||||||
|
|
||||||
#define TrackObj_hash NULL
|
#define TrackObj_hash NULL
|
||||||
|
#define TrackObj_tp_init 0
|
||||||
|
|
||||||
|
#define TrackObj_tp_alloc PyType_GenericAlloc
|
||||||
|
|
||||||
|
static PyObject *TrackObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||||
|
{
|
||||||
|
PyObject *self;
|
||||||
|
Track itself;
|
||||||
|
char *kw[] = {"itself", 0};
|
||||||
|
|
||||||
|
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, TrackObj_Convert, &itself)) return NULL;
|
||||||
|
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
|
||||||
|
((TrackObject *)self)->ob_itself = itself;
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define TrackObj_tp_free PyObject_Del
|
||||||
|
|
||||||
|
|
||||||
PyTypeObject Track_Type = {
|
PyTypeObject Track_Type = {
|
||||||
PyObject_HEAD_INIT(NULL)
|
PyObject_HEAD_INIT(NULL)
|
||||||
|
@ -4370,19 +4497,27 @@ PyTypeObject Track_Type = {
|
||||||
0, /*tp_str*/
|
0, /*tp_str*/
|
||||||
PyObject_GenericGetAttr, /*tp_getattro*/
|
PyObject_GenericGetAttr, /*tp_getattro*/
|
||||||
PyObject_GenericSetAttr, /*tp_setattro */
|
PyObject_GenericSetAttr, /*tp_setattro */
|
||||||
0, /*outputHook_tp_as_buffer*/
|
0, /*tp_as_buffer*/
|
||||||
0, /*outputHook_tp_flags*/
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||||
0, /*outputHook_tp_doc*/
|
0, /*tp_doc*/
|
||||||
0, /*outputHook_tp_traverse*/
|
0, /*tp_traverse*/
|
||||||
0, /*outputHook_tp_clear*/
|
0, /*tp_clear*/
|
||||||
0, /*outputHook_tp_richcompare*/
|
0, /*tp_richcompare*/
|
||||||
0, /*outputHook_tp_weaklistoffset*/
|
0, /*tp_weaklistoffset*/
|
||||||
0, /*outputHook_tp_iter*/
|
0, /*tp_iter*/
|
||||||
0, /*outputHook_tp_iternext*/
|
0, /*tp_iternext*/
|
||||||
TrackObj_methods, /* tp_methods */
|
TrackObj_methods, /* tp_methods */
|
||||||
0, /*outputHook_tp_members*/
|
0, /*tp_members*/
|
||||||
TrackObj_getsetlist, /*tp_getset*/
|
TrackObj_getsetlist, /*tp_getset*/
|
||||||
0, /*outputHook_tp_base*/
|
0, /*tp_base*/
|
||||||
|
0, /*tp_dict*/
|
||||||
|
0, /*tp_descr_get*/
|
||||||
|
0, /*tp_descr_set*/
|
||||||
|
0, /*tp_dictoffset*/
|
||||||
|
TrackObj_tp_init, /* tp_init */
|
||||||
|
TrackObj_tp_alloc, /* tp_alloc */
|
||||||
|
TrackObj_tp_new, /* tp_new */
|
||||||
|
TrackObj_tp_free, /* tp_free */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* --------------------- End object type Track ---------------------- */
|
/* --------------------- End object type Track ---------------------- */
|
||||||
|
@ -6774,11 +6909,30 @@ static PyMethodDef MovieObj_methods[] = {
|
||||||
|
|
||||||
#define MovieObj_getsetlist NULL
|
#define MovieObj_getsetlist NULL
|
||||||
|
|
||||||
|
|
||||||
#define MovieObj_compare NULL
|
#define MovieObj_compare NULL
|
||||||
|
|
||||||
#define MovieObj_repr NULL
|
#define MovieObj_repr NULL
|
||||||
|
|
||||||
#define MovieObj_hash NULL
|
#define MovieObj_hash NULL
|
||||||
|
#define MovieObj_tp_init 0
|
||||||
|
|
||||||
|
#define MovieObj_tp_alloc PyType_GenericAlloc
|
||||||
|
|
||||||
|
static PyObject *MovieObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||||
|
{
|
||||||
|
PyObject *self;
|
||||||
|
Movie itself;
|
||||||
|
char *kw[] = {"itself", 0};
|
||||||
|
|
||||||
|
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, MovieObj_Convert, &itself)) return NULL;
|
||||||
|
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
|
||||||
|
((MovieObject *)self)->ob_itself = itself;
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define MovieObj_tp_free PyObject_Del
|
||||||
|
|
||||||
|
|
||||||
PyTypeObject Movie_Type = {
|
PyTypeObject Movie_Type = {
|
||||||
PyObject_HEAD_INIT(NULL)
|
PyObject_HEAD_INIT(NULL)
|
||||||
|
@ -6801,19 +6955,27 @@ PyTypeObject Movie_Type = {
|
||||||
0, /*tp_str*/
|
0, /*tp_str*/
|
||||||
PyObject_GenericGetAttr, /*tp_getattro*/
|
PyObject_GenericGetAttr, /*tp_getattro*/
|
||||||
PyObject_GenericSetAttr, /*tp_setattro */
|
PyObject_GenericSetAttr, /*tp_setattro */
|
||||||
0, /*outputHook_tp_as_buffer*/
|
0, /*tp_as_buffer*/
|
||||||
0, /*outputHook_tp_flags*/
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||||
0, /*outputHook_tp_doc*/
|
0, /*tp_doc*/
|
||||||
0, /*outputHook_tp_traverse*/
|
0, /*tp_traverse*/
|
||||||
0, /*outputHook_tp_clear*/
|
0, /*tp_clear*/
|
||||||
0, /*outputHook_tp_richcompare*/
|
0, /*tp_richcompare*/
|
||||||
0, /*outputHook_tp_weaklistoffset*/
|
0, /*tp_weaklistoffset*/
|
||||||
0, /*outputHook_tp_iter*/
|
0, /*tp_iter*/
|
||||||
0, /*outputHook_tp_iternext*/
|
0, /*tp_iternext*/
|
||||||
MovieObj_methods, /* tp_methods */
|
MovieObj_methods, /* tp_methods */
|
||||||
0, /*outputHook_tp_members*/
|
0, /*tp_members*/
|
||||||
MovieObj_getsetlist, /*tp_getset*/
|
MovieObj_getsetlist, /*tp_getset*/
|
||||||
0, /*outputHook_tp_base*/
|
0, /*tp_base*/
|
||||||
|
0, /*tp_dict*/
|
||||||
|
0, /*tp_descr_get*/
|
||||||
|
0, /*tp_descr_set*/
|
||||||
|
0, /*tp_dictoffset*/
|
||||||
|
MovieObj_tp_init, /* tp_init */
|
||||||
|
MovieObj_tp_alloc, /* tp_alloc */
|
||||||
|
MovieObj_tp_new, /* tp_new */
|
||||||
|
MovieObj_tp_free, /* tp_free */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* --------------------- End object type Movie ---------------------- */
|
/* --------------------- End object type Movie ---------------------- */
|
||||||
|
@ -9966,28 +10128,40 @@ void init_Qt(void)
|
||||||
return;
|
return;
|
||||||
MovieController_Type.ob_type = &PyType_Type;
|
MovieController_Type.ob_type = &PyType_Type;
|
||||||
Py_INCREF(&MovieController_Type);
|
Py_INCREF(&MovieController_Type);
|
||||||
if (PyDict_SetItemString(d, "MovieControllerType", (PyObject *)&MovieController_Type) != 0)
|
PyModule_AddObject(m, "MovieController", (PyObject *)&MovieController_Type);
|
||||||
Py_FatalError("can't initialize MovieControllerType");
|
/* Backward-compatible name */
|
||||||
|
Py_INCREF(&MovieController_Type);
|
||||||
|
PyModule_AddObject(m, "MovieControllerType", (PyObject *)&MovieController_Type);
|
||||||
TimeBase_Type.ob_type = &PyType_Type;
|
TimeBase_Type.ob_type = &PyType_Type;
|
||||||
Py_INCREF(&TimeBase_Type);
|
Py_INCREF(&TimeBase_Type);
|
||||||
if (PyDict_SetItemString(d, "TimeBaseType", (PyObject *)&TimeBase_Type) != 0)
|
PyModule_AddObject(m, "TimeBase", (PyObject *)&TimeBase_Type);
|
||||||
Py_FatalError("can't initialize TimeBaseType");
|
/* Backward-compatible name */
|
||||||
|
Py_INCREF(&TimeBase_Type);
|
||||||
|
PyModule_AddObject(m, "TimeBaseType", (PyObject *)&TimeBase_Type);
|
||||||
UserData_Type.ob_type = &PyType_Type;
|
UserData_Type.ob_type = &PyType_Type;
|
||||||
Py_INCREF(&UserData_Type);
|
Py_INCREF(&UserData_Type);
|
||||||
if (PyDict_SetItemString(d, "UserDataType", (PyObject *)&UserData_Type) != 0)
|
PyModule_AddObject(m, "UserData", (PyObject *)&UserData_Type);
|
||||||
Py_FatalError("can't initialize UserDataType");
|
/* Backward-compatible name */
|
||||||
|
Py_INCREF(&UserData_Type);
|
||||||
|
PyModule_AddObject(m, "UserDataType", (PyObject *)&UserData_Type);
|
||||||
Media_Type.ob_type = &PyType_Type;
|
Media_Type.ob_type = &PyType_Type;
|
||||||
Py_INCREF(&Media_Type);
|
Py_INCREF(&Media_Type);
|
||||||
if (PyDict_SetItemString(d, "MediaType", (PyObject *)&Media_Type) != 0)
|
PyModule_AddObject(m, "Media", (PyObject *)&Media_Type);
|
||||||
Py_FatalError("can't initialize MediaType");
|
/* Backward-compatible name */
|
||||||
|
Py_INCREF(&Media_Type);
|
||||||
|
PyModule_AddObject(m, "MediaType", (PyObject *)&Media_Type);
|
||||||
Track_Type.ob_type = &PyType_Type;
|
Track_Type.ob_type = &PyType_Type;
|
||||||
Py_INCREF(&Track_Type);
|
Py_INCREF(&Track_Type);
|
||||||
if (PyDict_SetItemString(d, "TrackType", (PyObject *)&Track_Type) != 0)
|
PyModule_AddObject(m, "Track", (PyObject *)&Track_Type);
|
||||||
Py_FatalError("can't initialize TrackType");
|
/* Backward-compatible name */
|
||||||
|
Py_INCREF(&Track_Type);
|
||||||
|
PyModule_AddObject(m, "TrackType", (PyObject *)&Track_Type);
|
||||||
Movie_Type.ob_type = &PyType_Type;
|
Movie_Type.ob_type = &PyType_Type;
|
||||||
Py_INCREF(&Movie_Type);
|
Py_INCREF(&Movie_Type);
|
||||||
if (PyDict_SetItemString(d, "MovieType", (PyObject *)&Movie_Type) != 0)
|
PyModule_AddObject(m, "Movie", (PyObject *)&Movie_Type);
|
||||||
Py_FatalError("can't initialize MovieType");
|
/* Backward-compatible name */
|
||||||
|
Py_INCREF(&Movie_Type);
|
||||||
|
PyModule_AddObject(m, "MovieType", (PyObject *)&Movie_Type);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ========================= End module _Qt ========================= */
|
/* ========================= End module _Qt ========================= */
|
||||||
|
|
|
@ -181,7 +181,7 @@ QTFloatSingle = Type("QTFloatSingle", "f")
|
||||||
dummyshortptr = FakeType('(short *)0')
|
dummyshortptr = FakeType('(short *)0')
|
||||||
dummyStringPtr = FakeType('(StringPtr)0')
|
dummyStringPtr = FakeType('(StringPtr)0')
|
||||||
|
|
||||||
class MovieObjectDefinition(PEP252Mixin, GlobalObjectDefinition):
|
class MovieObjectDefinition(PEP253Mixin, GlobalObjectDefinition):
|
||||||
def outputCheckNewArg(self):
|
def outputCheckNewArg(self):
|
||||||
Output("""if (itself == NULL) {
|
Output("""if (itself == NULL) {
|
||||||
PyErr_SetString(Qt_Error,"Cannot create null Movie");
|
PyErr_SetString(Qt_Error,"Cannot create null Movie");
|
||||||
|
@ -190,7 +190,7 @@ class MovieObjectDefinition(PEP252Mixin, GlobalObjectDefinition):
|
||||||
def outputFreeIt(self, itselfname):
|
def outputFreeIt(self, itselfname):
|
||||||
Output("DisposeMovie(%s);", itselfname)
|
Output("DisposeMovie(%s);", itselfname)
|
||||||
|
|
||||||
class TrackObjectDefinition(PEP252Mixin, GlobalObjectDefinition):
|
class TrackObjectDefinition(PEP253Mixin, GlobalObjectDefinition):
|
||||||
def outputCheckNewArg(self):
|
def outputCheckNewArg(self):
|
||||||
Output("""if (itself == NULL) {
|
Output("""if (itself == NULL) {
|
||||||
PyErr_SetString(Qt_Error,"Cannot create null Track");
|
PyErr_SetString(Qt_Error,"Cannot create null Track");
|
||||||
|
@ -199,7 +199,7 @@ class TrackObjectDefinition(PEP252Mixin, GlobalObjectDefinition):
|
||||||
def outputFreeIt(self, itselfname):
|
def outputFreeIt(self, itselfname):
|
||||||
Output("DisposeMovieTrack(%s);", itselfname)
|
Output("DisposeMovieTrack(%s);", itselfname)
|
||||||
|
|
||||||
class MediaObjectDefinition(PEP252Mixin, GlobalObjectDefinition):
|
class MediaObjectDefinition(PEP253Mixin, GlobalObjectDefinition):
|
||||||
def outputCheckNewArg(self):
|
def outputCheckNewArg(self):
|
||||||
Output("""if (itself == NULL) {
|
Output("""if (itself == NULL) {
|
||||||
PyErr_SetString(Qt_Error,"Cannot create null Media");
|
PyErr_SetString(Qt_Error,"Cannot create null Media");
|
||||||
|
@ -208,7 +208,7 @@ class MediaObjectDefinition(PEP252Mixin, GlobalObjectDefinition):
|
||||||
def outputFreeIt(self, itselfname):
|
def outputFreeIt(self, itselfname):
|
||||||
Output("DisposeTrackMedia(%s);", itselfname)
|
Output("DisposeTrackMedia(%s);", itselfname)
|
||||||
|
|
||||||
class UserDataObjectDefinition(PEP252Mixin, GlobalObjectDefinition):
|
class UserDataObjectDefinition(PEP253Mixin, GlobalObjectDefinition):
|
||||||
def outputCheckNewArg(self):
|
def outputCheckNewArg(self):
|
||||||
Output("""if (itself == NULL) {
|
Output("""if (itself == NULL) {
|
||||||
PyErr_SetString(Qt_Error,"Cannot create null UserData");
|
PyErr_SetString(Qt_Error,"Cannot create null UserData");
|
||||||
|
@ -217,7 +217,7 @@ class UserDataObjectDefinition(PEP252Mixin, GlobalObjectDefinition):
|
||||||
def outputFreeIt(self, itselfname):
|
def outputFreeIt(self, itselfname):
|
||||||
Output("DisposeUserData(%s);", itselfname)
|
Output("DisposeUserData(%s);", itselfname)
|
||||||
|
|
||||||
class TimeBaseObjectDefinition(PEP252Mixin, GlobalObjectDefinition):
|
class TimeBaseObjectDefinition(PEP253Mixin, GlobalObjectDefinition):
|
||||||
def outputCheckNewArg(self):
|
def outputCheckNewArg(self):
|
||||||
Output("""if (itself == NULL) {
|
Output("""if (itself == NULL) {
|
||||||
PyErr_SetString(Qt_Error,"Cannot create null TimeBase");
|
PyErr_SetString(Qt_Error,"Cannot create null TimeBase");
|
||||||
|
@ -226,7 +226,7 @@ class TimeBaseObjectDefinition(PEP252Mixin, GlobalObjectDefinition):
|
||||||
## def outputFreeIt(self, itselfname):
|
## def outputFreeIt(self, itselfname):
|
||||||
## Output("DisposeTimeBase(%s);", itselfname)
|
## Output("DisposeTimeBase(%s);", itselfname)
|
||||||
|
|
||||||
class MovieCtlObjectDefinition(PEP252Mixin, GlobalObjectDefinition):
|
class MovieCtlObjectDefinition(PEP253Mixin, GlobalObjectDefinition):
|
||||||
def outputCheckNewArg(self):
|
def outputCheckNewArg(self):
|
||||||
Output("""if (itself == NULL) {
|
Output("""if (itself == NULL) {
|
||||||
PyErr_SetString(Qt_Error,"Cannot create null MovieController");
|
PyErr_SetString(Qt_Error,"Cannot create null MovieController");
|
||||||
|
|
|
@ -55,7 +55,7 @@ ScrapFlavorFlags = Type('ScrapFlavorFlags', 'l')
|
||||||
#ScrapFlavorInfo = OpaqueType('ScrapFlavorInfo', 'ScrapFlavorInfo')
|
#ScrapFlavorInfo = OpaqueType('ScrapFlavorInfo', 'ScrapFlavorInfo')
|
||||||
putscrapbuffer = FixedInputBufferType('void *')
|
putscrapbuffer = FixedInputBufferType('void *')
|
||||||
|
|
||||||
class MyObjectDefinition(PEP252Mixin, GlobalObjectDefinition):
|
class MyObjectDefinition(PEP253Mixin, GlobalObjectDefinition):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
# Create the generator groups and link them
|
# Create the generator groups and link them
|
||||||
|
|
|
@ -330,19 +330,27 @@ static PyTypeObject SndChannel_Type = {
|
||||||
0, /*tp_str*/
|
0, /*tp_str*/
|
||||||
PyObject_GenericGetAttr, /*tp_getattro*/
|
PyObject_GenericGetAttr, /*tp_getattro*/
|
||||||
PyObject_GenericSetAttr, /*tp_setattro */
|
PyObject_GenericSetAttr, /*tp_setattro */
|
||||||
0, /*outputHook_tp_as_buffer*/
|
0, /*tp_as_buffer*/
|
||||||
0, /*outputHook_tp_flags*/
|
Py_TPFLAGS_DEFAULT, /* tp_flags */
|
||||||
0, /*outputHook_tp_doc*/
|
0, /*tp_doc*/
|
||||||
0, /*outputHook_tp_traverse*/
|
0, /*tp_traverse*/
|
||||||
0, /*outputHook_tp_clear*/
|
0, /*tp_clear*/
|
||||||
0, /*outputHook_tp_richcompare*/
|
0, /*tp_richcompare*/
|
||||||
0, /*outputHook_tp_weaklistoffset*/
|
0, /*tp_weaklistoffset*/
|
||||||
0, /*outputHook_tp_iter*/
|
0, /*tp_iter*/
|
||||||
0, /*outputHook_tp_iternext*/
|
0, /*tp_iternext*/
|
||||||
SndCh_methods, /* tp_methods */
|
SndCh_methods, /* tp_methods */
|
||||||
0, /*outputHook_tp_members*/
|
0, /*tp_members*/
|
||||||
SndCh_getsetlist, /*tp_getset*/
|
SndCh_getsetlist, /*tp_getset*/
|
||||||
0, /*outputHook_tp_base*/
|
0, /*tp_base*/
|
||||||
|
0, /*tp_dict*/
|
||||||
|
0, /*tp_descr_get*/
|
||||||
|
0, /*tp_descr_set*/
|
||||||
|
0, /*tp_dictoffset*/
|
||||||
|
0, /*tp_init*/
|
||||||
|
0, /*tp_alloc*/
|
||||||
|
0, /*tp_new*/
|
||||||
|
0, /*tp_free*/
|
||||||
};
|
};
|
||||||
|
|
||||||
/* ------------------- End object type SndChannel ------------------- */
|
/* ------------------- End object type SndChannel ------------------- */
|
||||||
|
@ -459,6 +467,7 @@ static PyGetSetDef SPBObj_getsetlist[] = {
|
||||||
{"milliseconds", (getter)SPBObj_get_milliseconds, (setter)SPBObj_set_milliseconds, NULL},
|
{"milliseconds", (getter)SPBObj_get_milliseconds, (setter)SPBObj_set_milliseconds, NULL},
|
||||||
{"error", (getter)SPBObj_get_error, (setter)SPBObj_set_error, NULL},
|
{"error", (getter)SPBObj_get_error, (setter)SPBObj_set_error, NULL},
|
||||||
{"completionRoutine", (getter)SPBObj_get_completionRoutine, (setter)SPBObj_set_completionRoutine, NULL},
|
{"completionRoutine", (getter)SPBObj_get_completionRoutine, (setter)SPBObj_set_completionRoutine, NULL},
|
||||||
|
{NULL, NULL, NULL, NULL},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -489,19 +498,27 @@ static PyTypeObject SPB_Type = {
|
||||||
0, /*tp_str*/
|
0, /*tp_str*/
|
||||||
PyObject_GenericGetAttr, /*tp_getattro*/
|
PyObject_GenericGetAttr, /*tp_getattro*/
|
||||||
PyObject_GenericSetAttr, /*tp_setattro */
|
PyObject_GenericSetAttr, /*tp_setattro */
|
||||||
0, /*outputHook_tp_as_buffer*/
|
0, /*tp_as_buffer*/
|
||||||
0, /*outputHook_tp_flags*/
|
Py_TPFLAGS_DEFAULT, /* tp_flags */
|
||||||
0, /*outputHook_tp_doc*/
|
0, /*tp_doc*/
|
||||||
0, /*outputHook_tp_traverse*/
|
0, /*tp_traverse*/
|
||||||
0, /*outputHook_tp_clear*/
|
0, /*tp_clear*/
|
||||||
0, /*outputHook_tp_richcompare*/
|
0, /*tp_richcompare*/
|
||||||
0, /*outputHook_tp_weaklistoffset*/
|
0, /*tp_weaklistoffset*/
|
||||||
0, /*outputHook_tp_iter*/
|
0, /*tp_iter*/
|
||||||
0, /*outputHook_tp_iternext*/
|
0, /*tp_iternext*/
|
||||||
SPBObj_methods, /* tp_methods */
|
SPBObj_methods, /* tp_methods */
|
||||||
0, /*outputHook_tp_members*/
|
0, /*tp_members*/
|
||||||
SPBObj_getsetlist, /*tp_getset*/
|
SPBObj_getsetlist, /*tp_getset*/
|
||||||
0, /*outputHook_tp_base*/
|
0, /*tp_base*/
|
||||||
|
0, /*tp_dict*/
|
||||||
|
0, /*tp_descr_get*/
|
||||||
|
0, /*tp_descr_set*/
|
||||||
|
0, /*tp_dictoffset*/
|
||||||
|
0, /*tp_init*/
|
||||||
|
0, /*tp_alloc*/
|
||||||
|
0, /*tp_new*/
|
||||||
|
0, /*tp_free*/
|
||||||
};
|
};
|
||||||
|
|
||||||
/* ---------------------- End object type SPB ----------------------- */
|
/* ---------------------- End object type SPB ----------------------- */
|
||||||
|
@ -1537,12 +1554,16 @@ void init_Snd(void)
|
||||||
return;
|
return;
|
||||||
SndChannel_Type.ob_type = &PyType_Type;
|
SndChannel_Type.ob_type = &PyType_Type;
|
||||||
Py_INCREF(&SndChannel_Type);
|
Py_INCREF(&SndChannel_Type);
|
||||||
if (PyDict_SetItemString(d, "SndChannelType", (PyObject *)&SndChannel_Type) != 0)
|
PyModule_AddObject(m, "SndChannel", (PyObject *)&SndChannel_Type);
|
||||||
Py_FatalError("can't initialize SndChannelType");
|
/* Backward-compatible name */
|
||||||
|
Py_INCREF(&SndChannel_Type);
|
||||||
|
PyModule_AddObject(m, "SndChannelType", (PyObject *)&SndChannel_Type);
|
||||||
SPB_Type.ob_type = &PyType_Type;
|
SPB_Type.ob_type = &PyType_Type;
|
||||||
Py_INCREF(&SPB_Type);
|
Py_INCREF(&SPB_Type);
|
||||||
if (PyDict_SetItemString(d, "SPBType", (PyObject *)&SPB_Type) != 0)
|
PyModule_AddObject(m, "SPB", (PyObject *)&SPB_Type);
|
||||||
Py_FatalError("can't initialize SPBType");
|
/* Backward-compatible name */
|
||||||
|
Py_INCREF(&SPB_Type);
|
||||||
|
PyModule_AddObject(m, "SPBType", (PyObject *)&SPB_Type);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ======================== End module _Snd ========================= */
|
/* ======================== End module _Snd ========================= */
|
||||||
|
|
|
@ -979,6 +979,7 @@ static PyGetSetDef TEObj_getsetlist[] = {
|
||||||
{"txMode", (getter)TEObj_get_txMode, (setter)TEObj_set_txMode, "Current text-drawing mode"},
|
{"txMode", (getter)TEObj_get_txMode, (setter)TEObj_set_txMode, "Current text-drawing mode"},
|
||||||
{"txSize", (getter)TEObj_get_txSize, (setter)TEObj_set_txSize, "Current font size"},
|
{"txSize", (getter)TEObj_get_txSize, (setter)TEObj_set_txSize, "Current font size"},
|
||||||
{"nLines", (getter)TEObj_get_nLines, (setter)TEObj_set_nLines, "TBD"},
|
{"nLines", (getter)TEObj_get_nLines, (setter)TEObj_set_nLines, "TBD"},
|
||||||
|
{NULL, NULL, NULL, NULL},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -987,6 +988,24 @@ static PyGetSetDef TEObj_getsetlist[] = {
|
||||||
#define TEObj_repr NULL
|
#define TEObj_repr NULL
|
||||||
|
|
||||||
#define TEObj_hash NULL
|
#define TEObj_hash NULL
|
||||||
|
#define TEObj_tp_init 0
|
||||||
|
|
||||||
|
#define TEObj_tp_alloc PyType_GenericAlloc
|
||||||
|
|
||||||
|
static PyObject *TEObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||||
|
{
|
||||||
|
PyObject *self;
|
||||||
|
TEHandle itself;
|
||||||
|
char *kw[] = {"itself", 0};
|
||||||
|
|
||||||
|
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, TEObj_Convert, &itself)) return NULL;
|
||||||
|
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
|
||||||
|
((TEObject *)self)->ob_itself = itself;
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define TEObj_tp_free PyObject_Del
|
||||||
|
|
||||||
|
|
||||||
PyTypeObject TE_Type = {
|
PyTypeObject TE_Type = {
|
||||||
PyObject_HEAD_INIT(NULL)
|
PyObject_HEAD_INIT(NULL)
|
||||||
|
@ -1009,19 +1028,27 @@ PyTypeObject TE_Type = {
|
||||||
0, /*tp_str*/
|
0, /*tp_str*/
|
||||||
PyObject_GenericGetAttr, /*tp_getattro*/
|
PyObject_GenericGetAttr, /*tp_getattro*/
|
||||||
PyObject_GenericSetAttr, /*tp_setattro */
|
PyObject_GenericSetAttr, /*tp_setattro */
|
||||||
0, /*outputHook_tp_as_buffer*/
|
0, /*tp_as_buffer*/
|
||||||
0, /*outputHook_tp_flags*/
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||||
0, /*outputHook_tp_doc*/
|
0, /*tp_doc*/
|
||||||
0, /*outputHook_tp_traverse*/
|
0, /*tp_traverse*/
|
||||||
0, /*outputHook_tp_clear*/
|
0, /*tp_clear*/
|
||||||
0, /*outputHook_tp_richcompare*/
|
0, /*tp_richcompare*/
|
||||||
0, /*outputHook_tp_weaklistoffset*/
|
0, /*tp_weaklistoffset*/
|
||||||
0, /*outputHook_tp_iter*/
|
0, /*tp_iter*/
|
||||||
0, /*outputHook_tp_iternext*/
|
0, /*tp_iternext*/
|
||||||
TEObj_methods, /* tp_methods */
|
TEObj_methods, /* tp_methods */
|
||||||
0, /*outputHook_tp_members*/
|
0, /*tp_members*/
|
||||||
TEObj_getsetlist, /*tp_getset*/
|
TEObj_getsetlist, /*tp_getset*/
|
||||||
0, /*outputHook_tp_base*/
|
0, /*tp_base*/
|
||||||
|
0, /*tp_dict*/
|
||||||
|
0, /*tp_descr_get*/
|
||||||
|
0, /*tp_descr_set*/
|
||||||
|
0, /*tp_dictoffset*/
|
||||||
|
TEObj_tp_init, /* tp_init */
|
||||||
|
TEObj_tp_alloc, /* tp_alloc */
|
||||||
|
TEObj_tp_new, /* tp_new */
|
||||||
|
TEObj_tp_free, /* tp_free */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* ----------------------- End object type TE ----------------------- */
|
/* ----------------------- End object type TE ----------------------- */
|
||||||
|
@ -1313,8 +1340,10 @@ void init_TE(void)
|
||||||
return;
|
return;
|
||||||
TE_Type.ob_type = &PyType_Type;
|
TE_Type.ob_type = &PyType_Type;
|
||||||
Py_INCREF(&TE_Type);
|
Py_INCREF(&TE_Type);
|
||||||
if (PyDict_SetItemString(d, "TEType", (PyObject *)&TE_Type) != 0)
|
PyModule_AddObject(m, "TE", (PyObject *)&TE_Type);
|
||||||
Py_FatalError("can't initialize TEType");
|
/* Backward-compatible name */
|
||||||
|
Py_INCREF(&TE_Type);
|
||||||
|
PyModule_AddObject(m, "TEType", (PyObject *)&TE_Type);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ========================= End module _TE ========================= */
|
/* ========================= End module _TE ========================= */
|
||||||
|
|
|
@ -93,7 +93,8 @@ class TEMethodGenerator(OSErrWeakLinkMethodGenerator):
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class MyObjectDefinition(PEP252Mixin, GlobalObjectDefinition):
|
class MyObjectDefinition(PEP253Mixin, GlobalObjectDefinition):
|
||||||
|
# XXXX Could be subtype of Resource
|
||||||
# Attributes that can be set.
|
# Attributes that can be set.
|
||||||
getsetlist = [
|
getsetlist = [
|
||||||
(
|
(
|
||||||
|
|
|
@ -386,11 +386,30 @@ static PyMethodDef WEOObj_methods[] = {
|
||||||
|
|
||||||
#define WEOObj_getsetlist NULL
|
#define WEOObj_getsetlist NULL
|
||||||
|
|
||||||
|
|
||||||
#define WEOObj_compare NULL
|
#define WEOObj_compare NULL
|
||||||
|
|
||||||
#define WEOObj_repr NULL
|
#define WEOObj_repr NULL
|
||||||
|
|
||||||
#define WEOObj_hash NULL
|
#define WEOObj_hash NULL
|
||||||
|
#define WEOObj_tp_init 0
|
||||||
|
|
||||||
|
#define WEOObj_tp_alloc PyType_GenericAlloc
|
||||||
|
|
||||||
|
static PyObject *WEOObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||||
|
{
|
||||||
|
PyObject *self;
|
||||||
|
WEObjectReference itself;
|
||||||
|
char *kw[] = {"itself", 0};
|
||||||
|
|
||||||
|
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, WEOObj_Convert, &itself)) return NULL;
|
||||||
|
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
|
||||||
|
((WEOObject *)self)->ob_itself = itself;
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define WEOObj_tp_free PyObject_Del
|
||||||
|
|
||||||
|
|
||||||
PyTypeObject WEO_Type = {
|
PyTypeObject WEO_Type = {
|
||||||
PyObject_HEAD_INIT(NULL)
|
PyObject_HEAD_INIT(NULL)
|
||||||
|
@ -413,19 +432,27 @@ PyTypeObject WEO_Type = {
|
||||||
0, /*tp_str*/
|
0, /*tp_str*/
|
||||||
PyObject_GenericGetAttr, /*tp_getattro*/
|
PyObject_GenericGetAttr, /*tp_getattro*/
|
||||||
PyObject_GenericSetAttr, /*tp_setattro */
|
PyObject_GenericSetAttr, /*tp_setattro */
|
||||||
0, /*outputHook_tp_as_buffer*/
|
0, /*tp_as_buffer*/
|
||||||
0, /*outputHook_tp_flags*/
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||||
0, /*outputHook_tp_doc*/
|
0, /*tp_doc*/
|
||||||
0, /*outputHook_tp_traverse*/
|
0, /*tp_traverse*/
|
||||||
0, /*outputHook_tp_clear*/
|
0, /*tp_clear*/
|
||||||
0, /*outputHook_tp_richcompare*/
|
0, /*tp_richcompare*/
|
||||||
0, /*outputHook_tp_weaklistoffset*/
|
0, /*tp_weaklistoffset*/
|
||||||
0, /*outputHook_tp_iter*/
|
0, /*tp_iter*/
|
||||||
0, /*outputHook_tp_iternext*/
|
0, /*tp_iternext*/
|
||||||
WEOObj_methods, /* tp_methods */
|
WEOObj_methods, /* tp_methods */
|
||||||
0, /*outputHook_tp_members*/
|
0, /*tp_members*/
|
||||||
WEOObj_getsetlist, /*tp_getset*/
|
WEOObj_getsetlist, /*tp_getset*/
|
||||||
0, /*outputHook_tp_base*/
|
0, /*tp_base*/
|
||||||
|
0, /*tp_dict*/
|
||||||
|
0, /*tp_descr_get*/
|
||||||
|
0, /*tp_descr_set*/
|
||||||
|
0, /*tp_dictoffset*/
|
||||||
|
WEOObj_tp_init, /* tp_init */
|
||||||
|
WEOObj_tp_alloc, /* tp_alloc */
|
||||||
|
WEOObj_tp_new, /* tp_new */
|
||||||
|
WEOObj_tp_free, /* tp_free */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* ---------------------- End object type WEO ----------------------- */
|
/* ---------------------- End object type WEO ----------------------- */
|
||||||
|
@ -2108,11 +2135,30 @@ static PyMethodDef wasteObj_methods[] = {
|
||||||
|
|
||||||
#define wasteObj_getsetlist NULL
|
#define wasteObj_getsetlist NULL
|
||||||
|
|
||||||
|
|
||||||
#define wasteObj_compare NULL
|
#define wasteObj_compare NULL
|
||||||
|
|
||||||
#define wasteObj_repr NULL
|
#define wasteObj_repr NULL
|
||||||
|
|
||||||
#define wasteObj_hash NULL
|
#define wasteObj_hash NULL
|
||||||
|
#define wasteObj_tp_init 0
|
||||||
|
|
||||||
|
#define wasteObj_tp_alloc PyType_GenericAlloc
|
||||||
|
|
||||||
|
static PyObject *wasteObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||||
|
{
|
||||||
|
PyObject *self;
|
||||||
|
WEReference itself;
|
||||||
|
char *kw[] = {"itself", 0};
|
||||||
|
|
||||||
|
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, wasteObj_Convert, &itself)) return NULL;
|
||||||
|
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
|
||||||
|
((wasteObject *)self)->ob_itself = itself;
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define wasteObj_tp_free PyObject_Del
|
||||||
|
|
||||||
|
|
||||||
PyTypeObject waste_Type = {
|
PyTypeObject waste_Type = {
|
||||||
PyObject_HEAD_INIT(NULL)
|
PyObject_HEAD_INIT(NULL)
|
||||||
|
@ -2135,19 +2181,27 @@ PyTypeObject waste_Type = {
|
||||||
0, /*tp_str*/
|
0, /*tp_str*/
|
||||||
PyObject_GenericGetAttr, /*tp_getattro*/
|
PyObject_GenericGetAttr, /*tp_getattro*/
|
||||||
PyObject_GenericSetAttr, /*tp_setattro */
|
PyObject_GenericSetAttr, /*tp_setattro */
|
||||||
0, /*outputHook_tp_as_buffer*/
|
0, /*tp_as_buffer*/
|
||||||
0, /*outputHook_tp_flags*/
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||||
0, /*outputHook_tp_doc*/
|
0, /*tp_doc*/
|
||||||
0, /*outputHook_tp_traverse*/
|
0, /*tp_traverse*/
|
||||||
0, /*outputHook_tp_clear*/
|
0, /*tp_clear*/
|
||||||
0, /*outputHook_tp_richcompare*/
|
0, /*tp_richcompare*/
|
||||||
0, /*outputHook_tp_weaklistoffset*/
|
0, /*tp_weaklistoffset*/
|
||||||
0, /*outputHook_tp_iter*/
|
0, /*tp_iter*/
|
||||||
0, /*outputHook_tp_iternext*/
|
0, /*tp_iternext*/
|
||||||
wasteObj_methods, /* tp_methods */
|
wasteObj_methods, /* tp_methods */
|
||||||
0, /*outputHook_tp_members*/
|
0, /*tp_members*/
|
||||||
wasteObj_getsetlist, /*tp_getset*/
|
wasteObj_getsetlist, /*tp_getset*/
|
||||||
0, /*outputHook_tp_base*/
|
0, /*tp_base*/
|
||||||
|
0, /*tp_dict*/
|
||||||
|
0, /*tp_descr_get*/
|
||||||
|
0, /*tp_descr_set*/
|
||||||
|
0, /*tp_dictoffset*/
|
||||||
|
wasteObj_tp_init, /* tp_init */
|
||||||
|
wasteObj_tp_alloc, /* tp_alloc */
|
||||||
|
wasteObj_tp_new, /* tp_new */
|
||||||
|
wasteObj_tp_free, /* tp_free */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* --------------------- End object type waste ---------------------- */
|
/* --------------------- End object type waste ---------------------- */
|
||||||
|
@ -2506,12 +2560,16 @@ void initwaste(void)
|
||||||
return;
|
return;
|
||||||
WEO_Type.ob_type = &PyType_Type;
|
WEO_Type.ob_type = &PyType_Type;
|
||||||
Py_INCREF(&WEO_Type);
|
Py_INCREF(&WEO_Type);
|
||||||
if (PyDict_SetItemString(d, "WEOType", (PyObject *)&WEO_Type) != 0)
|
PyModule_AddObject(m, "WEO", (PyObject *)&WEO_Type);
|
||||||
Py_FatalError("can't initialize WEOType");
|
/* Backward-compatible name */
|
||||||
|
Py_INCREF(&WEO_Type);
|
||||||
|
PyModule_AddObject(m, "WEOType", (PyObject *)&WEO_Type);
|
||||||
waste_Type.ob_type = &PyType_Type;
|
waste_Type.ob_type = &PyType_Type;
|
||||||
Py_INCREF(&waste_Type);
|
Py_INCREF(&waste_Type);
|
||||||
if (PyDict_SetItemString(d, "wasteType", (PyObject *)&waste_Type) != 0)
|
PyModule_AddObject(m, "waste", (PyObject *)&waste_Type);
|
||||||
Py_FatalError("can't initialize wasteType");
|
/* Backward-compatible name */
|
||||||
|
Py_INCREF(&waste_Type);
|
||||||
|
PyModule_AddObject(m, "wasteType", (PyObject *)&waste_Type);
|
||||||
|
|
||||||
callbackdict = PyDict_New();
|
callbackdict = PyDict_New();
|
||||||
if (callbackdict == NULL || PyDict_SetItemString(d, "callbacks", callbackdict) != 0)
|
if (callbackdict == NULL || PyDict_SetItemString(d, "callbacks", callbackdict) != 0)
|
||||||
|
|
|
@ -277,7 +277,7 @@ class WEMethodGenerator(OSErrMethodGenerator):
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class WEObjectDefinition(PEP252Mixin, GlobalObjectDefinition):
|
class WEObjectDefinition(PEP253Mixin, GlobalObjectDefinition):
|
||||||
def outputCheckNewArg(self):
|
def outputCheckNewArg(self):
|
||||||
Output("""if (itself == NULL) {
|
Output("""if (itself == NULL) {
|
||||||
PyErr_SetString(waste_Error,"Cannot create null WE");
|
PyErr_SetString(waste_Error,"Cannot create null WE");
|
||||||
|
@ -289,7 +289,7 @@ class WEObjectDefinition(PEP252Mixin, GlobalObjectDefinition):
|
||||||
def outputFreeIt(self, itselfname):
|
def outputFreeIt(self, itselfname):
|
||||||
Output("WEDispose(%s);", itselfname)
|
Output("WEDispose(%s);", itselfname)
|
||||||
|
|
||||||
class WEOObjectDefinition(PEP252Mixin, GlobalObjectDefinition):
|
class WEOObjectDefinition(PEP253Mixin, GlobalObjectDefinition):
|
||||||
def outputCheckNewArg(self):
|
def outputCheckNewArg(self):
|
||||||
Output("""if (itself == NULL) {
|
Output("""if (itself == NULL) {
|
||||||
Py_INCREF(Py_None);
|
Py_INCREF(Py_None);
|
||||||
|
|
|
@ -77,6 +77,7 @@ PyObject *WinObj_New(WindowPtr itself)
|
||||||
{
|
{
|
||||||
WindowObject *it;
|
WindowObject *it;
|
||||||
if (itself == NULL) return PyMac_Error(resNotFound);
|
if (itself == NULL) return PyMac_Error(resNotFound);
|
||||||
|
/* XXXX Or should we use WhichWindow code here? */
|
||||||
it = PyObject_NEW(WindowObject, &Window_Type);
|
it = PyObject_NEW(WindowObject, &Window_Type);
|
||||||
if (it == NULL) return NULL;
|
if (it == NULL) return NULL;
|
||||||
it->ob_itself = itself;
|
it->ob_itself = itself;
|
||||||
|
@ -2928,6 +2929,7 @@ static PyMethodDef WinObj_methods[] = {
|
||||||
|
|
||||||
#define WinObj_getsetlist NULL
|
#define WinObj_getsetlist NULL
|
||||||
|
|
||||||
|
|
||||||
static int WinObj_compare(WindowObject *self, WindowObject *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;
|
||||||
|
@ -2946,6 +2948,24 @@ static int WinObj_hash(WindowObject *self)
|
||||||
{
|
{
|
||||||
return (int)self->ob_itself;
|
return (int)self->ob_itself;
|
||||||
}
|
}
|
||||||
|
#define WinObj_tp_init 0
|
||||||
|
|
||||||
|
#define WinObj_tp_alloc PyType_GenericAlloc
|
||||||
|
|
||||||
|
static PyObject *WinObj_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||||
|
{
|
||||||
|
PyObject *self;
|
||||||
|
WindowPtr itself;
|
||||||
|
char *kw[] = {"itself", 0};
|
||||||
|
|
||||||
|
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O&", kw, WinObj_Convert, &itself)) return NULL;
|
||||||
|
if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
|
||||||
|
((WindowObject *)self)->ob_itself = itself;
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
#define WinObj_tp_free PyObject_Del
|
||||||
|
|
||||||
|
|
||||||
PyTypeObject Window_Type = {
|
PyTypeObject Window_Type = {
|
||||||
PyObject_HEAD_INIT(NULL)
|
PyObject_HEAD_INIT(NULL)
|
||||||
|
@ -2968,19 +2988,27 @@ PyTypeObject Window_Type = {
|
||||||
0, /*tp_str*/
|
0, /*tp_str*/
|
||||||
PyObject_GenericGetAttr, /*tp_getattro*/
|
PyObject_GenericGetAttr, /*tp_getattro*/
|
||||||
PyObject_GenericSetAttr, /*tp_setattro */
|
PyObject_GenericSetAttr, /*tp_setattro */
|
||||||
0, /*outputHook_tp_as_buffer*/
|
0, /*tp_as_buffer*/
|
||||||
0, /*outputHook_tp_flags*/
|
Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
|
||||||
0, /*outputHook_tp_doc*/
|
0, /*tp_doc*/
|
||||||
0, /*outputHook_tp_traverse*/
|
0, /*tp_traverse*/
|
||||||
0, /*outputHook_tp_clear*/
|
0, /*tp_clear*/
|
||||||
0, /*outputHook_tp_richcompare*/
|
0, /*tp_richcompare*/
|
||||||
0, /*outputHook_tp_weaklistoffset*/
|
0, /*tp_weaklistoffset*/
|
||||||
0, /*outputHook_tp_iter*/
|
0, /*tp_iter*/
|
||||||
0, /*outputHook_tp_iternext*/
|
0, /*tp_iternext*/
|
||||||
WinObj_methods, /* tp_methods */
|
WinObj_methods, /* tp_methods */
|
||||||
0, /*outputHook_tp_members*/
|
0, /*tp_members*/
|
||||||
WinObj_getsetlist, /*tp_getset*/
|
WinObj_getsetlist, /*tp_getset*/
|
||||||
0, /*outputHook_tp_base*/
|
0, /*tp_base*/
|
||||||
|
0, /*tp_dict*/
|
||||||
|
0, /*tp_descr_get*/
|
||||||
|
0, /*tp_descr_set*/
|
||||||
|
0, /*tp_dictoffset*/
|
||||||
|
WinObj_tp_init, /* tp_init */
|
||||||
|
WinObj_tp_alloc, /* tp_alloc */
|
||||||
|
WinObj_tp_new, /* tp_new */
|
||||||
|
WinObj_tp_free, /* tp_free */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* --------------------- End object type Window --------------------- */
|
/* --------------------- End object type Window --------------------- */
|
||||||
|
@ -3828,8 +3856,10 @@ void init_Win(void)
|
||||||
return;
|
return;
|
||||||
Window_Type.ob_type = &PyType_Type;
|
Window_Type.ob_type = &PyType_Type;
|
||||||
Py_INCREF(&Window_Type);
|
Py_INCREF(&Window_Type);
|
||||||
if (PyDict_SetItemString(d, "WindowType", (PyObject *)&Window_Type) != 0)
|
PyModule_AddObject(m, "Window", (PyObject *)&Window_Type);
|
||||||
Py_FatalError("can't initialize WindowType");
|
/* Backward-compatible name */
|
||||||
|
Py_INCREF(&Window_Type);
|
||||||
|
PyModule_AddObject(m, "WindowType", (PyObject *)&Window_Type);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ======================== End module _Win ========================= */
|
/* ======================== End module _Win ========================= */
|
||||||
|
|
|
@ -128,9 +128,10 @@ initstuff = initstuff + """
|
||||||
PyMac_INIT_TOOLBOX_OBJECT_CONVERT(WindowPtr, WinObj_Convert);
|
PyMac_INIT_TOOLBOX_OBJECT_CONVERT(WindowPtr, WinObj_Convert);
|
||||||
"""
|
"""
|
||||||
|
|
||||||
class MyObjectDefinition(PEP252Mixin, GlobalObjectDefinition):
|
class MyObjectDefinition(PEP253Mixin, GlobalObjectDefinition):
|
||||||
def outputCheckNewArg(self):
|
def outputCheckNewArg(self):
|
||||||
Output("if (itself == NULL) return PyMac_Error(resNotFound);")
|
Output("if (itself == NULL) return PyMac_Error(resNotFound);")
|
||||||
|
Output("/* XXXX Or should we use WhichWindow code here? */")
|
||||||
def outputStructMembers(self):
|
def outputStructMembers(self):
|
||||||
GlobalObjectDefinition.outputStructMembers(self)
|
GlobalObjectDefinition.outputStructMembers(self)
|
||||||
Output("void (*ob_freeit)(%s ptr);", self.itselftype)
|
Output("void (*ob_freeit)(%s ptr);", self.itselftype)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue