summaryrefslogtreecommitdiffstats
path: root/Mac
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2010-05-09 14:46:46 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2010-05-09 14:46:46 (GMT)
commitc83ea137d7e717f764e2f31fc2544f522de7d857 (patch)
treeccfdacfdcdc4ed68e56324a07b6f25ab5327bdcd /Mac
parent368ede83d9c96004dc5c489511936a588537f410 (diff)
downloadcpython-c83ea137d7e717f764e2f31fc2544f522de7d857.zip
cpython-c83ea137d7e717f764e2f31fc2544f522de7d857.tar.gz
cpython-c83ea137d7e717f764e2f31fc2544f522de7d857.tar.bz2
Untabify C files. Will watch buildbots.
Diffstat (limited to 'Mac')
-rw-r--r--Mac/Modules/ColorPickermodule.c76
-rw-r--r--Mac/Modules/MacOS.c994
-rw-r--r--Mac/Modules/Nav.c1288
-rw-r--r--Mac/Modules/OSATerminology.c122
-rw-r--r--Mac/Modules/_scproxy.c374
-rw-r--r--Mac/Modules/ae/_AEmodule.c2092
-rw-r--r--Mac/Modules/ah/_AHmodule.c178
-rw-r--r--Mac/Modules/app/_Appmodule.c2718
-rw-r--r--Mac/Modules/autoGIL.c196
-rwxr-xr-xMac/Modules/carbonevt/_CarbonEvtmodule.c2936
-rw-r--r--Mac/Modules/cf/_CFmodule.c6772
-rw-r--r--Mac/Modules/cf/pycfbridge.c466
-rwxr-xr-xMac/Modules/cg/CFMLateImport.c2376
-rwxr-xr-xMac/Modules/cg/CFMLateImport.h462
-rwxr-xr-xMac/Modules/cg/_CGmodule.c1882
-rw-r--r--Mac/Modules/cm/_Cmmodule.c1220
-rw-r--r--Mac/Modules/ctl/_Ctlmodule.c8516
-rw-r--r--Mac/Modules/dlg/_Dlgmodule.c2188
-rw-r--r--Mac/Modules/drag/_Dragmodule.c1578
-rw-r--r--Mac/Modules/evt/_Evtmodule.c706
-rw-r--r--Mac/Modules/file/_Filemodule.c4752
-rw-r--r--Mac/Modules/fm/_Fmmodule.c432
-rw-r--r--Mac/Modules/folder/_Foldermodule.c510
-rw-r--r--Mac/Modules/gestaltmodule.c30
-rw-r--r--Mac/Modules/help/_Helpmodule.c242
-rw-r--r--Mac/Modules/ibcarbon/_IBCarbon.c318
-rw-r--r--Mac/Modules/icgluemodule.c498
-rw-r--r--Mac/Modules/icn/_Icnmodule.c2384
-rw-r--r--Mac/Modules/launch/_Launchmodule.c702
-rw-r--r--Mac/Modules/list/_Listmodule.c1618
-rw-r--r--Mac/Modules/menu/_Menumodule.c4914
-rw-r--r--Mac/Modules/mlte/_Mltemodule.c2272
-rw-r--r--Mac/Modules/osa/_OSAmodule.c1268
-rw-r--r--Mac/Modules/qd/_Qdmodule.c9856
-rw-r--r--Mac/Modules/qdoffs/_Qdoffsmodule.c922
-rw-r--r--Mac/Modules/qt/_Qtmodule.c41936
-rw-r--r--Mac/Modules/res/_Resmodule.c2504
-rw-r--r--Mac/Modules/scrap/_Scrapmodule.c474
-rw-r--r--Mac/Modules/snd/_Sndihooks.c578
-rw-r--r--Mac/Modules/snd/_Sndmodule.c1640
-rw-r--r--Mac/Modules/te/_TEmodule.c1646
-rw-r--r--Mac/Modules/win/_Winmodule.c4564
-rw-r--r--Mac/Tools/pythonw.c170
43 files changed, 60685 insertions, 60685 deletions
diff --git a/Mac/Modules/ColorPickermodule.c b/Mac/Modules/ColorPickermodule.c
index 51d7c37..688c468 100644
--- a/Mac/Modules/ColorPickermodule.c
+++ b/Mac/Modules/ColorPickermodule.c
@@ -7,15 +7,15 @@ Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
-supporting documentation, and that the name of Just van Rossum not be
-used in advertising or publicity pertaining to distribution of the
+supporting documentation, and that the name of Just van Rossum not be
+used in advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
-JUST VAN ROSSUM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
-EVENT SHALL JUST VAN ROSSUM BE LIABLE FOR ANY SPECIAL, INDIRECT OR
-CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
-USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+JUST VAN ROSSUM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+EVENT SHALL JUST VAN ROSSUM BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
+USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
@@ -37,17 +37,17 @@ static char cp_GetColor__doc__[] =
static PyObject *
cp_GetColor(PyObject *self, PyObject *args)
{
- RGBColor inColor, outColor;
- Boolean ok;
- Point where = {0, 0};
- Str255 prompt;
-
- if (!PyArg_ParseTuple(args, "O&O&", PyMac_GetStr255, prompt, QdRGB_Convert, &inColor))
- return NULL;
-
- ok = GetColor(where, prompt, &inColor, &outColor);
-
- return Py_BuildValue("O&h", QdRGB_New, &outColor, ok);
+ RGBColor inColor, outColor;
+ Boolean ok;
+ Point where = {0, 0};
+ Str255 prompt;
+
+ if (!PyArg_ParseTuple(args, "O&O&", PyMac_GetStr255, prompt, QdRGB_Convert, &inColor))
+ return NULL;
+
+ ok = GetColor(where, prompt, &inColor, &outColor);
+
+ return Py_BuildValue("O&h", QdRGB_New, &outColor, ok);
}
#endif /* __LP64__ */
@@ -55,36 +55,36 @@ cp_GetColor(PyObject *self, PyObject *args)
static struct PyMethodDef cp_methods[] = {
#ifndef __LP64__
- {"GetColor", (PyCFunction)cp_GetColor, METH_VARARGS, cp_GetColor__doc__},
+ {"GetColor", (PyCFunction)cp_GetColor, METH_VARARGS, cp_GetColor__doc__},
#endif /* __LP64__ */
- {NULL, (PyCFunction)NULL, 0, NULL} /* sentinel */
+ {NULL, (PyCFunction)NULL, 0, NULL} /* sentinel */
};
/* Initialization function for the module (*must* be called initColorPicker) */
-static char cp_module_documentation[] =
+static char cp_module_documentation[] =
""
;
void initColorPicker(void)
{
- PyObject *m;
-
- if (PyErr_WarnPy3k("In 3.x, the ColorPicker module is removed.", 1) < 0)
- return;
-
- /* Create the module and add the functions */
- m = Py_InitModule4("ColorPicker", cp_methods,
- cp_module_documentation,
- (PyObject*)NULL,PYTHON_API_VERSION);
-
- /* Add symbolic constants to the module here */
-
- /* XXXX Add constants here */
-
- /* Check for errors */
- if (PyErr_Occurred())
- Py_FatalError("can't initialize module ColorPicker");
+ PyObject *m;
+
+ if (PyErr_WarnPy3k("In 3.x, the ColorPicker module is removed.", 1) < 0)
+ return;
+
+ /* Create the module and add the functions */
+ m = Py_InitModule4("ColorPicker", cp_methods,
+ cp_module_documentation,
+ (PyObject*)NULL,PYTHON_API_VERSION);
+
+ /* Add symbolic constants to the module here */
+
+ /* XXXX Add constants here */
+
+ /* Check for errors */
+ if (PyErr_Occurred())
+ Py_FatalError("can't initialize module ColorPicker");
}
diff --git a/Mac/Modules/MacOS.c b/Mac/Modules/MacOS.c
index 19deb44..28de4f5 100644
--- a/Mac/Modules/MacOS.c
+++ b/Mac/Modules/MacOS.c
@@ -4,10 +4,10 @@ The Netherlands.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the names of Stichting Mathematisch
Centrum or CWI not be used in advertising or publicity pertaining to
distribution of the software without specific, written prior permission.
@@ -34,7 +34,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef HAVE_OSX105_SDK
-typedef SInt16 FSIORefNum;
+typedef SInt16 FSIORefNum;
#endif
static PyObject *MacOS_Error; /* Exception MacOS.Error */
@@ -46,9 +46,9 @@ static PyObject *MacOS_Error; /* Exception MacOS.Error */
/* Declarations for objects of type Resource fork */
typedef struct {
- PyObject_HEAD
- FSIORefNum fRefNum;
- int isclosed;
+ PyObject_HEAD
+ FSIORefNum fRefNum;
+ int isclosed;
} rfobject;
static PyTypeObject Rftype;
@@ -60,166 +60,166 @@ static PyTypeObject Rftype;
static void
do_close(rfobject *self)
{
- if (self->isclosed ) return;
- (void)FSCloseFork(self->fRefNum);
- self->isclosed = 1;
+ if (self->isclosed ) return;
+ (void)FSCloseFork(self->fRefNum);
+ self->isclosed = 1;
}
-static char rf_read__doc__[] =
+static char rf_read__doc__[] =
"Read data from resource fork"
;
static PyObject *
rf_read(rfobject *self, PyObject *args)
{
- long n;
- PyObject *v;
- OSErr err;
- ByteCount n2;
-
- if (self->isclosed) {
- PyErr_SetString(PyExc_ValueError, "Operation on closed file");
- return NULL;
- }
-
- if (!PyArg_ParseTuple(args, "l", &n))
- return NULL;
-
- v = PyBytes_FromStringAndSize((char *)NULL, n);
- if (v == NULL)
- return NULL;
-
- err = FSReadFork(self->fRefNum, fsAtMark, 0, n, PyString_AsString(v), &n2);
- if (err && err != eofErr) {
- PyMac_Error(err);
- Py_DECREF(v);
- return NULL;
- }
- _PyString_Resize(&v, n2);
- return v;
+ long n;
+ PyObject *v;
+ OSErr err;
+ ByteCount n2;
+
+ if (self->isclosed) {
+ PyErr_SetString(PyExc_ValueError, "Operation on closed file");
+ return NULL;
+ }
+
+ if (!PyArg_ParseTuple(args, "l", &n))
+ return NULL;
+
+ v = PyBytes_FromStringAndSize((char *)NULL, n);
+ if (v == NULL)
+ return NULL;
+
+ err = FSReadFork(self->fRefNum, fsAtMark, 0, n, PyString_AsString(v), &n2);
+ if (err && err != eofErr) {
+ PyMac_Error(err);
+ Py_DECREF(v);
+ return NULL;
+ }
+ _PyString_Resize(&v, n2);
+ return v;
}
-static char rf_write__doc__[] =
+static char rf_write__doc__[] =
"Write to resource fork"
;
static PyObject *
rf_write(rfobject *self, PyObject *args)
{
- char *buffer;
- long size;
- OSErr err;
-
- if (self->isclosed) {
- PyErr_SetString(PyExc_ValueError, "Operation on closed file");
- return NULL;
- }
- if (!PyArg_ParseTuple(args, "s#", &buffer, &size))
- return NULL;
- err = FSWriteFork(self->fRefNum, fsAtMark, 0, size, buffer, NULL);
- if (err) {
- PyMac_Error(err);
- return NULL;
- }
- Py_INCREF(Py_None);
- return Py_None;
+ char *buffer;
+ long size;
+ OSErr err;
+
+ if (self->isclosed) {
+ PyErr_SetString(PyExc_ValueError, "Operation on closed file");
+ return NULL;
+ }
+ if (!PyArg_ParseTuple(args, "s#", &buffer, &size))
+ return NULL;
+ err = FSWriteFork(self->fRefNum, fsAtMark, 0, size, buffer, NULL);
+ if (err) {
+ PyMac_Error(err);
+ return NULL;
+ }
+ Py_INCREF(Py_None);
+ return Py_None;
}
-static char rf_seek__doc__[] =
+static char rf_seek__doc__[] =
"Set file position"
;
static PyObject *
rf_seek(rfobject *self, PyObject *args)
{
- long amount;
- int whence = SEEK_SET;
- int mode;
- OSErr err;
-
- if (self->isclosed) {
- PyErr_SetString(PyExc_ValueError, "Operation on closed file");
- return NULL;
- }
- if (!PyArg_ParseTuple(args, "l|i", &amount, &whence)) {
- return NULL;
- }
-
- switch (whence) {
- case SEEK_CUR:
- mode = fsFromMark;
- break;
- case SEEK_END:
- mode = fsFromLEOF;
- break;
- case SEEK_SET:
- mode = fsFromStart;
- break;
- default:
- PyErr_BadArgument();
- return NULL;
- }
-
- err = FSSetForkPosition(self->fRefNum, mode, amount);
- if (err != noErr) {
- PyMac_Error(err);
- return NULL;
- }
- Py_INCREF(Py_None);
- return Py_None;
+ long amount;
+ int whence = SEEK_SET;
+ int mode;
+ OSErr err;
+
+ if (self->isclosed) {
+ PyErr_SetString(PyExc_ValueError, "Operation on closed file");
+ return NULL;
+ }
+ if (!PyArg_ParseTuple(args, "l|i", &amount, &whence)) {
+ return NULL;
+ }
+
+ switch (whence) {
+ case SEEK_CUR:
+ mode = fsFromMark;
+ break;
+ case SEEK_END:
+ mode = fsFromLEOF;
+ break;
+ case SEEK_SET:
+ mode = fsFromStart;
+ break;
+ default:
+ PyErr_BadArgument();
+ return NULL;
+ }
+
+ err = FSSetForkPosition(self->fRefNum, mode, amount);
+ if (err != noErr) {
+ PyMac_Error(err);
+ return NULL;
+ }
+ Py_INCREF(Py_None);
+ return Py_None;
}
-static char rf_tell__doc__[] =
+static char rf_tell__doc__[] =
"Get file position"
;
static PyObject *
rf_tell(rfobject *self, PyObject *args)
{
- long long where;
- OSErr err;
-
- if (self->isclosed) {
- PyErr_SetString(PyExc_ValueError, "Operation on closed file");
- return NULL;
- }
- if (!PyArg_ParseTuple(args, ""))
- return NULL;
-
- err = FSGetForkPosition(self->fRefNum, &where);
- if (err != noErr) {
- PyMac_Error(err);
- return NULL;
- }
- return PyLong_FromLongLong(where);
+ long long where;
+ OSErr err;
+
+ if (self->isclosed) {
+ PyErr_SetString(PyExc_ValueError, "Operation on closed file");
+ return NULL;
+ }
+ if (!PyArg_ParseTuple(args, ""))
+ return NULL;
+
+ err = FSGetForkPosition(self->fRefNum, &where);
+ if (err != noErr) {
+ PyMac_Error(err);
+ return NULL;
+ }
+ return PyLong_FromLongLong(where);
}
-static char rf_close__doc__[] =
+static char rf_close__doc__[] =
"Close resource fork"
;
static PyObject *
rf_close(rfobject *self, PyObject *args)
{
- if (!PyArg_ParseTuple(args, ""))
- return NULL;
- do_close(self);
- Py_INCREF(Py_None);
- return Py_None;
+ if (!PyArg_ParseTuple(args, ""))
+ return NULL;
+ do_close(self);
+ Py_INCREF(Py_None);
+ return Py_None;
}
static struct PyMethodDef rf_methods[] = {
- {"read", (PyCFunction)rf_read, 1, rf_read__doc__},
- {"write", (PyCFunction)rf_write, 1, rf_write__doc__},
- {"seek", (PyCFunction)rf_seek, 1, rf_seek__doc__},
- {"tell", (PyCFunction)rf_tell, 1, rf_tell__doc__},
- {"close", (PyCFunction)rf_close, 1, rf_close__doc__},
-
- {NULL, NULL} /* sentinel */
+ {"read", (PyCFunction)rf_read, 1, rf_read__doc__},
+ {"write", (PyCFunction)rf_write, 1, rf_write__doc__},
+ {"seek", (PyCFunction)rf_seek, 1, rf_seek__doc__},
+ {"tell", (PyCFunction)rf_tell, 1, rf_tell__doc__},
+ {"close", (PyCFunction)rf_close, 1, rf_close__doc__},
+
+ {NULL, NULL} /* sentinel */
};
/* ---------- */
@@ -228,56 +228,56 @@ static struct PyMethodDef rf_methods[] = {
static rfobject *
newrfobject(void)
{
- rfobject *self;
-
- self = PyObject_NEW(rfobject, &Rftype);
- if (self == NULL)
- return NULL;
- self->isclosed = 1;
- return self;
+ rfobject *self;
+
+ self = PyObject_NEW(rfobject, &Rftype);
+ if (self == NULL)
+ return NULL;
+ self->isclosed = 1;
+ return self;
}
static void
rf_dealloc(rfobject *self)
{
- do_close(self);
- PyObject_DEL(self);
+ do_close(self);
+ PyObject_DEL(self);
}
static PyObject *
rf_getattr(rfobject *self, char *name)
{
- return Py_FindMethod(rf_methods, (PyObject *)self, name);
+ return Py_FindMethod(rf_methods, (PyObject *)self, name);
}
-static char Rftype__doc__[] =
+static char Rftype__doc__[] =
"Resource fork file object"
;
static PyTypeObject Rftype = {
- PyObject_HEAD_INIT(&PyType_Type)
- 0, /*ob_size*/
- "MacOS.ResourceFork", /*tp_name*/
- sizeof(rfobject), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- /* methods */
- (destructor)rf_dealloc, /*tp_dealloc*/
- (printfunc)0, /*tp_print*/
- (getattrfunc)rf_getattr, /*tp_getattr*/
- (setattrfunc)0, /*tp_setattr*/
- (cmpfunc)0, /*tp_compare*/
- (reprfunc)0, /*tp_repr*/
- 0, /*tp_as_number*/
- 0, /*tp_as_sequence*/
- 0, /*tp_as_mapping*/
- (hashfunc)0, /*tp_hash*/
- (ternaryfunc)0, /*tp_call*/
- (reprfunc)0, /*tp_str*/
-
- /* Space for future expansion */
- 0L,0L,0L,0L,
- Rftype__doc__ /* Documentation string */
+ PyObject_HEAD_INIT(&PyType_Type)
+ 0, /*ob_size*/
+ "MacOS.ResourceFork", /*tp_name*/
+ sizeof(rfobject), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ /* methods */
+ (destructor)rf_dealloc, /*tp_dealloc*/
+ (printfunc)0, /*tp_print*/
+ (getattrfunc)rf_getattr, /*tp_getattr*/
+ (setattrfunc)0, /*tp_setattr*/
+ (cmpfunc)0, /*tp_compare*/
+ (reprfunc)0, /*tp_repr*/
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ (hashfunc)0, /*tp_hash*/
+ (ternaryfunc)0, /*tp_call*/
+ (reprfunc)0, /*tp_str*/
+
+ /* Space for future expansion */
+ 0L,0L,0L,0L,
+ Rftype__doc__ /* Documentation string */
};
@@ -292,71 +292,71 @@ static char getcrtp_doc[] = "Get MacOS 4-char creator and type for a file";
static PyObject *
MacOS_GetCreatorAndType(PyObject *self, PyObject *args)
{
- PyObject *creator, *type, *res;
- OSErr err;
- FSRef ref;
- FSCatalogInfo cataloginfo;
- FileInfo* finfo;
+ PyObject *creator, *type, *res;
+ OSErr err;
+ FSRef ref;
+ FSCatalogInfo cataloginfo;
+ FileInfo* finfo;
- if (!PyArg_ParseTuple(args, "O&", PyMac_GetFSRef, &ref)) {
+ if (!PyArg_ParseTuple(args, "O&", PyMac_GetFSRef, &ref)) {
#ifndef __LP64__
- /* This function is documented to take an FSSpec as well,
- * which only works in 32-bit mode.
- */
- PyErr_Clear();
- FSSpec fss;
- FInfo info;
-
- if (!PyArg_ParseTuple(args, "O&", PyMac_GetFSSpec, &fss))
- return NULL;
-
- if ((err = FSpGetFInfo(&fss, &info)) != noErr) {
- return PyErr_Mac(MacOS_Error, err);
- }
-
- info.fdCreator = ntohl(info.fdCreator);
- info.fdType = ntohl(info.fdType);
-
- creator = PyString_FromStringAndSize(
- (char *)&info.fdCreator, 4);
- type = PyString_FromStringAndSize((char *)&info.fdType, 4);
- res = Py_BuildValue("OO", creator, type);
- Py_DECREF(creator);
- Py_DECREF(type);
- return res;
-#else /* __LP64__ */
- return NULL;
-#endif /* __LP64__ */
- }
-
- err = FSGetCatalogInfo(&ref,
- kFSCatInfoFinderInfo|kFSCatInfoNodeFlags, &cataloginfo,
- NULL, NULL, NULL);
- if (err != noErr) {
- PyErr_Mac(MacOS_Error, err);
- return NULL;
- }
-
- if ((cataloginfo.nodeFlags & kFSNodeIsDirectoryMask) != 0) {
- /* Directory: doesn't have type/creator info.
- *
- * The specific error code is for backward compatibility with
- * earlier versions.
- */
- PyErr_Mac(MacOS_Error, fnfErr);
- return NULL;
-
- }
- finfo = (FileInfo*)&(cataloginfo.finderInfo);
- finfo->fileCreator = ntohl(finfo->fileCreator);
- finfo->fileType = ntohl(finfo->fileType);
- creator = PyString_FromStringAndSize((char*)&(finfo->fileCreator), 4);
- type = PyString_FromStringAndSize((char*)&(finfo->fileType), 4);
-
- res = Py_BuildValue("OO", creator, type);
- Py_DECREF(creator);
- Py_DECREF(type);
- return res;
+ /* This function is documented to take an FSSpec as well,
+ * which only works in 32-bit mode.
+ */
+ PyErr_Clear();
+ FSSpec fss;
+ FInfo info;
+
+ if (!PyArg_ParseTuple(args, "O&", PyMac_GetFSSpec, &fss))
+ return NULL;
+
+ if ((err = FSpGetFInfo(&fss, &info)) != noErr) {
+ return PyErr_Mac(MacOS_Error, err);
+ }
+
+ info.fdCreator = ntohl(info.fdCreator);
+ info.fdType = ntohl(info.fdType);
+
+ creator = PyString_FromStringAndSize(
+ (char *)&info.fdCreator, 4);
+ type = PyString_FromStringAndSize((char *)&info.fdType, 4);
+ res = Py_BuildValue("OO", creator, type);
+ Py_DECREF(creator);
+ Py_DECREF(type);
+ return res;
+#else /* __LP64__ */
+ return NULL;
+#endif /* __LP64__ */
+ }
+
+ err = FSGetCatalogInfo(&ref,
+ kFSCatInfoFinderInfo|kFSCatInfoNodeFlags, &cataloginfo,
+ NULL, NULL, NULL);
+ if (err != noErr) {
+ PyErr_Mac(MacOS_Error, err);
+ return NULL;
+ }
+
+ if ((cataloginfo.nodeFlags & kFSNodeIsDirectoryMask) != 0) {
+ /* Directory: doesn't have type/creator info.
+ *
+ * The specific error code is for backward compatibility with
+ * earlier versions.
+ */
+ PyErr_Mac(MacOS_Error, fnfErr);
+ return NULL;
+
+ }
+ finfo = (FileInfo*)&(cataloginfo.finderInfo);
+ finfo->fileCreator = ntohl(finfo->fileCreator);
+ finfo->fileType = ntohl(finfo->fileType);
+ creator = PyString_FromStringAndSize((char*)&(finfo->fileCreator), 4);
+ type = PyString_FromStringAndSize((char*)&(finfo->fileType), 4);
+
+ res = Py_BuildValue("OO", creator, type);
+ Py_DECREF(creator);
+ Py_DECREF(type);
+ return res;
}
static char setcrtp_doc[] = "Set MacOS 4-char creator and type for a file";
@@ -364,68 +364,68 @@ static char setcrtp_doc[] = "Set MacOS 4-char creator and type for a file";
static PyObject *
MacOS_SetCreatorAndType(PyObject *self, PyObject *args)
{
- ResType creator, type;
- FSRef ref;
- FileInfo* finfo;
- OSErr err;
- FSCatalogInfo cataloginfo;
-
- if (!PyArg_ParseTuple(args, "O&O&O&",
- PyMac_GetFSRef, &ref, PyMac_GetOSType, &creator, PyMac_GetOSType, &type)) {
+ ResType creator, type;
+ FSRef ref;
+ FileInfo* finfo;
+ OSErr err;
+ FSCatalogInfo cataloginfo;
+
+ if (!PyArg_ParseTuple(args, "O&O&O&",
+ PyMac_GetFSRef, &ref, PyMac_GetOSType, &creator, PyMac_GetOSType, &type)) {
#ifndef __LP64__
- /* Try to handle FSSpec arguments, for backward compatibility */
- FSSpec fss;
- FInfo info;
+ /* Try to handle FSSpec arguments, for backward compatibility */
+ FSSpec fss;
+ FInfo info;
- if (!PyArg_ParseTuple(args, "O&O&O&",
- PyMac_GetFSSpec, &fss, PyMac_GetOSType, &creator, PyMac_GetOSType, &type))
- return NULL;
+ if (!PyArg_ParseTuple(args, "O&O&O&",
+ PyMac_GetFSSpec, &fss, PyMac_GetOSType, &creator, PyMac_GetOSType, &type))
+ return NULL;
- if ((err = FSpGetFInfo(&fss, &info)) != noErr)
- return PyErr_Mac(MacOS_Error, err);
+ if ((err = FSpGetFInfo(&fss, &info)) != noErr)
+ return PyErr_Mac(MacOS_Error, err);
- info.fdCreator = creator;
- info.fdType = type;
+ info.fdCreator = creator;
+ info.fdType = type;
- if ((err = FSpSetFInfo(&fss, &info)) != noErr)
- return PyErr_Mac(MacOS_Error, err);
- Py_INCREF(Py_None);
- return Py_None;
+ if ((err = FSpSetFInfo(&fss, &info)) != noErr)
+ return PyErr_Mac(MacOS_Error, err);
+ Py_INCREF(Py_None);
+ return Py_None;
#else /* __LP64__ */
- return NULL;
+ return NULL;
#endif /* __LP64__ */
- }
-
- err = FSGetCatalogInfo(&ref,
- kFSCatInfoFinderInfo|kFSCatInfoNodeFlags, &cataloginfo,
- NULL, NULL, NULL);
- if (err != noErr) {
- PyErr_Mac(MacOS_Error, err);
- return NULL;
- }
-
- if ((cataloginfo.nodeFlags & kFSNodeIsDirectoryMask) != 0) {
- /* Directory: doesn't have type/creator info.
- *
- * The specific error code is for backward compatibility with
- * earlier versions.
- */
- PyErr_Mac(MacOS_Error, fnfErr);
- return NULL;
-
- }
- finfo = (FileInfo*)&(cataloginfo.finderInfo);
- finfo->fileCreator = creator;
- finfo->fileType = type;
-
- err = FSSetCatalogInfo(&ref, kFSCatInfoFinderInfo, &cataloginfo);
- if (err != noErr) {
- PyErr_Mac(MacOS_Error, fnfErr);
- return NULL;
- }
-
- Py_INCREF(Py_None);
- return Py_None;
+ }
+
+ err = FSGetCatalogInfo(&ref,
+ kFSCatInfoFinderInfo|kFSCatInfoNodeFlags, &cataloginfo,
+ NULL, NULL, NULL);
+ if (err != noErr) {
+ PyErr_Mac(MacOS_Error, err);
+ return NULL;
+ }
+
+ if ((cataloginfo.nodeFlags & kFSNodeIsDirectoryMask) != 0) {
+ /* Directory: doesn't have type/creator info.
+ *
+ * The specific error code is for backward compatibility with
+ * earlier versions.
+ */
+ PyErr_Mac(MacOS_Error, fnfErr);
+ return NULL;
+
+ }
+ finfo = (FileInfo*)&(cataloginfo.finderInfo);
+ finfo->fileCreator = creator;
+ finfo->fileType = type;
+
+ err = FSSetCatalogInfo(&ref, kFSCatInfoFinderInfo, &cataloginfo);
+ if (err != noErr) {
+ PyErr_Mac(MacOS_Error, fnfErr);
+ return NULL;
+ }
+
+ Py_INCREF(Py_None);
+ return Py_None;
}
@@ -434,65 +434,65 @@ static char geterr_doc[] = "Convert OSErr number to string";
static PyObject *
MacOS_GetErrorString(PyObject *self, PyObject *args)
{
- int err;
- char buf[256];
- Handle h;
- char *str;
- static int errors_loaded;
-
- if (!PyArg_ParseTuple(args, "i", &err))
- return NULL;
-
- h = GetResource('Estr', err);
- if (!h && !errors_loaded) {
- /*
- ** Attempt to open the resource file containing the
- ** Estr resources. We ignore all errors. We also try
- ** this only once.
- */
- PyObject *m, *rv;
- errors_loaded = 1;
-
- m = PyImport_ImportModuleNoBlock("macresource");
- if (!m) {
- if (Py_VerboseFlag)
- PyErr_Print();
- PyErr_Clear();
- }
- else {
- rv = PyObject_CallMethod(m, "open_error_resource", "");
- if (!rv) {
- if (Py_VerboseFlag)
- PyErr_Print();
- PyErr_Clear();
- }
- else {
- Py_DECREF(rv);
- /* And try again... */
- h = GetResource('Estr', err);
- }
- Py_DECREF(m);
- }
- }
- /*
- ** Whether the code above succeeded or not, we won't try
- ** again.
- */
- errors_loaded = 1;
-
- if (h) {
- HLock(h);
- str = (char *)*h;
- memcpy(buf, str+1, (unsigned char)str[0]);
- buf[(unsigned char)str[0]] = '\0';
- HUnlock(h);
- ReleaseResource(h);
- }
- else {
- PyOS_snprintf(buf, sizeof(buf), "Mac OS error code %d", err);
- }
-
- return Py_BuildValue("s", buf);
+ int err;
+ char buf[256];
+ Handle h;
+ char *str;
+ static int errors_loaded;
+
+ if (!PyArg_ParseTuple(args, "i", &err))
+ return NULL;
+
+ h = GetResource('Estr', err);
+ if (!h && !errors_loaded) {
+ /*
+ ** Attempt to open the resource file containing the
+ ** Estr resources. We ignore all errors. We also try
+ ** this only once.
+ */
+ PyObject *m, *rv;
+ errors_loaded = 1;
+
+ m = PyImport_ImportModuleNoBlock("macresource");
+ if (!m) {
+ if (Py_VerboseFlag)
+ PyErr_Print();
+ PyErr_Clear();
+ }
+ else {
+ rv = PyObject_CallMethod(m, "open_error_resource", "");
+ if (!rv) {
+ if (Py_VerboseFlag)
+ PyErr_Print();
+ PyErr_Clear();
+ }
+ else {
+ Py_DECREF(rv);
+ /* And try again... */
+ h = GetResource('Estr', err);
+ }
+ Py_DECREF(m);
+ }
+ }
+ /*
+ ** Whether the code above succeeded or not, we won't try
+ ** again.
+ */
+ errors_loaded = 1;
+
+ if (h) {
+ HLock(h);
+ str = (char *)*h;
+ memcpy(buf, str+1, (unsigned char)str[0]);
+ buf[(unsigned char)str[0]] = '\0';
+ HUnlock(h);
+ ReleaseResource(h);
+ }
+ else {
+ PyOS_snprintf(buf, sizeof(buf), "Mac OS error code %d", err);
+ }
+
+ return Py_BuildValue("s", buf);
}
@@ -503,42 +503,42 @@ static char splash_doc[] = "Open a splash-screen dialog by resource-id (0=close)
static PyObject *
MacOS_splash(PyObject *self, PyObject *args)
{
- int resid = -1;
- static DialogPtr curdialog = NULL;
- DialogPtr olddialog;
- WindowRef theWindow;
- CGrafPtr thePort;
+ int resid = -1;
+ static DialogPtr curdialog = NULL;
+ DialogPtr olddialog;
+ WindowRef theWindow;
+ CGrafPtr thePort;
#if 0
- short xpos, ypos, width, height, swidth, sheight;
+ short xpos, ypos, width, height, swidth, sheight;
#endif
-
- if (!PyArg_ParseTuple(args, "|i", &resid))
- return NULL;
- olddialog = curdialog;
- curdialog = NULL;
-
- if ( resid != -1 ) {
- curdialog = GetNewDialog(resid, NULL, (WindowPtr)-1);
- if ( curdialog ) {
- theWindow = GetDialogWindow(curdialog);
- thePort = GetWindowPort(theWindow);
+
+ if (!PyArg_ParseTuple(args, "|i", &resid))
+ return NULL;
+ olddialog = curdialog;
+ curdialog = NULL;
+
+ if ( resid != -1 ) {
+ curdialog = GetNewDialog(resid, NULL, (WindowPtr)-1);
+ if ( curdialog ) {
+ theWindow = GetDialogWindow(curdialog);
+ thePort = GetWindowPort(theWindow);
#if 0
- width = thePort->portRect.right - thePort->portRect.left;
- height = thePort->portRect.bottom - thePort->portRect.top;
- swidth = qd.screenBits.bounds.right - qd.screenBits.bounds.left;
- sheight = qd.screenBits.bounds.bottom - qd.screenBits.bounds.top - LMGetMBarHeight();
- xpos = (swidth-width)/2;
- ypos = (sheight-height)/5 + LMGetMBarHeight();
- MoveWindow(theWindow, xpos, ypos, 0);
- ShowWindow(theWindow);
+ width = thePort->portRect.right - thePort->portRect.left;
+ height = thePort->portRect.bottom - thePort->portRect.top;
+ swidth = qd.screenBits.bounds.right - qd.screenBits.bounds.left;
+ sheight = qd.screenBits.bounds.bottom - qd.screenBits.bounds.top - LMGetMBarHeight();
+ xpos = (swidth-width)/2;
+ ypos = (sheight-height)/5 + LMGetMBarHeight();
+ MoveWindow(theWindow, xpos, ypos, 0);
+ ShowWindow(theWindow);
#endif
- DrawDialog(curdialog);
- }
- }
- if (olddialog)
- DisposeDialog(olddialog);
- Py_INCREF(Py_None);
- return Py_None;
+ DrawDialog(curdialog);
+ }
+ }
+ if (olddialog)
+ DisposeDialog(olddialog);
+ Py_INCREF(Py_None);
+ return Py_None;
}
static char DebugStr_doc[] = "Switch to low-level debugger with a message";
@@ -546,15 +546,15 @@ static char DebugStr_doc[] = "Switch to low-level debugger with a message";
static PyObject *
MacOS_DebugStr(PyObject *self, PyObject *args)
{
- Str255 message;
- PyObject *object = 0;
-
- if (!PyArg_ParseTuple(args, "O&|O", PyMac_GetStr255, message, &object))
- return NULL;
-
- DebugStr(message);
- Py_INCREF(Py_None);
- return Py_None;
+ Str255 message;
+ PyObject *object = 0;
+
+ if (!PyArg_ParseTuple(args, "O&|O", PyMac_GetStr255, message, &object))
+ return NULL;
+
+ DebugStr(message);
+ Py_INCREF(Py_None);
+ return Py_None;
}
@@ -563,59 +563,59 @@ static char SysBeep_doc[] = "BEEEEEP!!!";
static PyObject *
MacOS_SysBeep(PyObject *self, PyObject *args)
{
- int duration = 6;
-
- if (!PyArg_ParseTuple(args, "|i", &duration))
- return NULL;
- SysBeep(duration);
- Py_INCREF(Py_None);
- return Py_None;
+ int duration = 6;
+
+ if (!PyArg_ParseTuple(args, "|i", &duration))
+ return NULL;
+ SysBeep(duration);
+ Py_INCREF(Py_None);
+ return Py_None;
}
#endif /* __LP64__ */
-static char WMAvailable_doc[] =
- "True if this process can interact with the display."
- "Will foreground the application on the first call as a side-effect."
- ;
+static char WMAvailable_doc[] =
+ "True if this process can interact with the display."
+ "Will foreground the application on the first call as a side-effect."
+ ;
static PyObject *
MacOS_WMAvailable(PyObject *self, PyObject *args)
{
- static PyObject *rv = NULL;
-
- if (!PyArg_ParseTuple(args, ""))
- return NULL;
- if (!rv) {
- ProcessSerialNumber psn;
-
- /*
- ** This is a fairly innocuous call to make if we don't have a window
- ** manager, or if we have no permission to talk to it. It will print
- ** a message on stderr, but at least it won't abort the process.
- ** It appears the function caches the result itself, and it's cheap, so
- ** no need for us to cache.
- */
+ static PyObject *rv = NULL;
+
+ if (!PyArg_ParseTuple(args, ""))
+ return NULL;
+ if (!rv) {
+ ProcessSerialNumber psn;
+
+ /*
+ ** This is a fairly innocuous call to make if we don't have a window
+ ** manager, or if we have no permission to talk to it. It will print
+ ** a message on stderr, but at least it won't abort the process.
+ ** It appears the function caches the result itself, and it's cheap, so
+ ** no need for us to cache.
+ */
#ifdef kCGNullDirectDisplay
- /* On 10.1 CGMainDisplayID() isn't available, and
- ** kCGNullDirectDisplay isn't defined.
- */
- if (CGMainDisplayID() == 0) {
- rv = Py_False;
- } else {
+ /* On 10.1 CGMainDisplayID() isn't available, and
+ ** kCGNullDirectDisplay isn't defined.
+ */
+ if (CGMainDisplayID() == 0) {
+ rv = Py_False;
+ } else {
#else
- {
+ {
#endif
- if (GetCurrentProcess(&psn) < 0 ||
- SetFrontProcess(&psn) < 0) {
- rv = Py_False;
- } else {
- rv = Py_True;
- }
- }
- }
- Py_INCREF(rv);
- return rv;
+ if (GetCurrentProcess(&psn) < 0 ||
+ SetFrontProcess(&psn) < 0) {
+ rv = Py_False;
+ } else {
+ rv = Py_True;
+ }
+ }
+ }
+ Py_INCREF(rv);
+ return rv;
}
static char GetTicks_doc[] = "Return number of ticks since bootup";
@@ -623,7 +623,7 @@ static char GetTicks_doc[] = "Return number of ticks since bootup";
static PyObject *
MacOS_GetTicks(PyObject *self, PyObject *args)
{
- return Py_BuildValue("i", (int)TickCount());
+ return Py_BuildValue("i", (int)TickCount());
}
static char openrf_doc[] = "Open resource fork of a file";
@@ -631,100 +631,100 @@ static char openrf_doc[] = "Open resource fork of a file";
static PyObject *
MacOS_openrf(PyObject *self, PyObject *args)
{
- OSErr err;
- char *mode = "r";
- FSRef ref;
- SInt8 permission = fsRdPerm;
- rfobject *fp;
- HFSUniStr255 name;
-
- if (!PyArg_ParseTuple(args, "O&|s", PyMac_GetFSRef, &ref, &mode))
- return NULL;
- while (*mode) {
- switch (*mode++) {
- case '*': break;
- case 'r': permission = fsRdPerm; break;
- case 'w': permission = fsWrPerm; break;
- case 'b': break;
- default:
- PyErr_BadArgument();
- return NULL;
- }
- }
-
- err = FSGetResourceForkName(&name);
- if (err != noErr) {
- PyMac_Error(err);
- return NULL;
- }
-
- if ( (fp = newrfobject()) == NULL )
- return NULL;
-
-
- err = FSOpenFork(&ref, name.length, name.unicode, permission, &fp->fRefNum);
- if (err != noErr) {
- Py_DECREF(fp);
- PyMac_Error(err);
- return NULL;
- }
- fp->isclosed = 0;
- return (PyObject *)fp;
+ OSErr err;
+ char *mode = "r";
+ FSRef ref;
+ SInt8 permission = fsRdPerm;
+ rfobject *fp;
+ HFSUniStr255 name;
+
+ if (!PyArg_ParseTuple(args, "O&|s", PyMac_GetFSRef, &ref, &mode))
+ return NULL;
+ while (*mode) {
+ switch (*mode++) {
+ case '*': break;
+ case 'r': permission = fsRdPerm; break;
+ case 'w': permission = fsWrPerm; break;
+ case 'b': break;
+ default:
+ PyErr_BadArgument();
+ return NULL;
+ }
+ }
+
+ err = FSGetResourceForkName(&name);
+ if (err != noErr) {
+ PyMac_Error(err);
+ return NULL;
+ }
+
+ if ( (fp = newrfobject()) == NULL )
+ return NULL;
+
+
+ err = FSOpenFork(&ref, name.length, name.unicode, permission, &fp->fRefNum);
+ if (err != noErr) {
+ Py_DECREF(fp);
+ PyMac_Error(err);
+ return NULL;
+ }
+ fp->isclosed = 0;
+ return (PyObject *)fp;
}
static PyMethodDef MacOS_Methods[] = {
- {"GetCreatorAndType", MacOS_GetCreatorAndType, 1, getcrtp_doc},
- {"SetCreatorAndType", MacOS_SetCreatorAndType, 1, setcrtp_doc},
- {"GetErrorString", MacOS_GetErrorString, 1, geterr_doc},
- {"openrf", MacOS_openrf, 1, openrf_doc},
+ {"GetCreatorAndType", MacOS_GetCreatorAndType, 1, getcrtp_doc},
+ {"SetCreatorAndType", MacOS_SetCreatorAndType, 1, setcrtp_doc},
+ {"GetErrorString", MacOS_GetErrorString, 1, geterr_doc},
+ {"openrf", MacOS_openrf, 1, openrf_doc},
#ifndef __LP64__
- {"splash", MacOS_splash, 1, splash_doc},
- {"DebugStr", MacOS_DebugStr, 1, DebugStr_doc},
- {"SysBeep", MacOS_SysBeep, 1, SysBeep_doc},
+ {"splash", MacOS_splash, 1, splash_doc},
+ {"DebugStr", MacOS_DebugStr, 1, DebugStr_doc},
+ {"SysBeep", MacOS_SysBeep, 1, SysBeep_doc},
#endif /* __LP64__ */
- {"GetTicks", MacOS_GetTicks, 1, GetTicks_doc},
- {"WMAvailable", MacOS_WMAvailable, 1, WMAvailable_doc},
- {NULL, NULL} /* Sentinel */
+ {"GetTicks", MacOS_GetTicks, 1, GetTicks_doc},
+ {"WMAvailable", MacOS_WMAvailable, 1, WMAvailable_doc},
+ {NULL, NULL} /* Sentinel */
};
void
initMacOS(void)
{
- PyObject *m, *d;
-
- if (PyErr_WarnPy3k("In 3.x, the MacOS module is removed.", 1))
- return;
-
- m = Py_InitModule("MacOS", MacOS_Methods);
- d = PyModule_GetDict(m);
-
- /* Initialize MacOS.Error exception */
- MacOS_Error = PyMac_GetOSErrException();
- if (MacOS_Error == NULL || PyDict_SetItemString(d, "Error", MacOS_Error) != 0)
- return;
- Rftype.ob_type = &PyType_Type;
- Py_INCREF(&Rftype);
- if (PyDict_SetItemString(d, "ResourceForkType", (PyObject *)&Rftype) != 0)
- return;
- /*
- ** This is a hack: the following constant added to the id() of a string
- ** object gives you the address of the data. Unfortunately, it is needed for
- ** some of the image and sound processing interfaces on the mac:-(
- */
- {
- PyStringObject *p = 0;
- long off = (long)&(p->ob_sval[0]);
-
- if( PyDict_SetItemString(d, "string_id_to_buffer", Py_BuildValue("i", off)) != 0)
- return;
- }
+ PyObject *m, *d;
+
+ if (PyErr_WarnPy3k("In 3.x, the MacOS module is removed.", 1))
+ return;
+
+ m = Py_InitModule("MacOS", MacOS_Methods);
+ d = PyModule_GetDict(m);
+
+ /* Initialize MacOS.Error exception */
+ MacOS_Error = PyMac_GetOSErrException();
+ if (MacOS_Error == NULL || PyDict_SetItemString(d, "Error", MacOS_Error) != 0)
+ return;
+ Rftype.ob_type = &PyType_Type;
+ Py_INCREF(&Rftype);
+ if (PyDict_SetItemString(d, "ResourceForkType", (PyObject *)&Rftype) != 0)
+ return;
+ /*
+ ** This is a hack: the following constant added to the id() of a string
+ ** object gives you the address of the data. Unfortunately, it is needed for
+ ** some of the image and sound processing interfaces on the mac:-(
+ */
+ {
+ PyStringObject *p = 0;
+ long off = (long)&(p->ob_sval[0]);
+
+ if( PyDict_SetItemString(d, "string_id_to_buffer", Py_BuildValue("i", off)) != 0)
+ return;
+ }
#define PY_RUNTIMEMODEL "macho"
- if (PyDict_SetItemString(d, "runtimemodel",
- Py_BuildValue("s", PY_RUNTIMEMODEL)) != 0)
- return;
+ if (PyDict_SetItemString(d, "runtimemodel",
+ Py_BuildValue("s", PY_RUNTIMEMODEL)) != 0)
+ return;
#if defined(WITH_NEXT_FRAMEWORK)
#define PY_LINKMODEL "framework"
#elif defined(Py_ENABLE_SHARED)
@@ -732,8 +732,8 @@ initMacOS(void)
#else
#define PY_LINKMODEL "static"
#endif
- if (PyDict_SetItemString(d, "linkmodel",
- Py_BuildValue("s", PY_LINKMODEL)) != 0)
- return;
+ if (PyDict_SetItemString(d, "linkmodel",
+ Py_BuildValue("s", PY_LINKMODEL)) != 0)
+ return;
}
diff --git a/Mac/Modules/Nav.c b/Mac/Modules/Nav.c
index f7b19b9..7118d43 100644
--- a/Mac/Modules/Nav.c
+++ b/Mac/Modules/Nav.c
@@ -44,172 +44,172 @@ static NavObjectFilterUPP my_filterProcUPP;
/* Callback functions */
static pascal void
my_eventProc(NavEventCallbackMessage callBackSelector,
- NavCBRecPtr callBackParms,
- NavCallBackUserData callbackUD)
+ NavCBRecPtr callBackParms,
+ NavCallBackUserData callbackUD)
{
- PyObject *dict = (PyObject *)callbackUD;
- PyObject *pyfunc;
- PyObject *rv;
-
- if (!dict) return;
- if ( (pyfunc = PyDict_GetItemString(dict, "eventProc")) == NULL ) {
- PyErr_Print();
- return;
- }
- if ( pyfunc == Py_None ) {
- return;
- }
- rv = PyObject_CallFunction(pyfunc, "ls#", (long)callBackSelector,
- (void *)callBackParms, sizeof(NavCBRec));
- if ( rv )
- Py_DECREF(rv);
- else {
- PySys_WriteStderr("Nav: exception in eventProc callback\n");
- PyErr_Print();
- }
+ PyObject *dict = (PyObject *)callbackUD;
+ PyObject *pyfunc;
+ PyObject *rv;
+
+ if (!dict) return;
+ if ( (pyfunc = PyDict_GetItemString(dict, "eventProc")) == NULL ) {
+ PyErr_Print();
+ return;
+ }
+ if ( pyfunc == Py_None ) {
+ return;
+ }
+ rv = PyObject_CallFunction(pyfunc, "ls#", (long)callBackSelector,
+ (void *)callBackParms, sizeof(NavCBRec));
+ if ( rv )
+ Py_DECREF(rv);
+ else {
+ PySys_WriteStderr("Nav: exception in eventProc callback\n");
+ PyErr_Print();
+ }
}
static pascal Boolean
my_previewProc(NavCBRecPtr callBackParms,
- NavCallBackUserData callbackUD)
+ NavCallBackUserData callbackUD)
{
- PyObject *dict = (PyObject *)callbackUD;
- PyObject *pyfunc;
- PyObject *rv;
- Boolean c_rv = false;
-
- if (!dict) return false;
- if ( (pyfunc = PyDict_GetItemString(dict, "previewProc")) == NULL ) {
- PyErr_Print();
- return false;
- }
- rv = PyObject_CallFunction(pyfunc, "s#", (void *)callBackParms, sizeof(NavCBRec));
- if ( rv ) {
- c_rv = PyObject_IsTrue(rv);
- Py_DECREF(rv);
- } else {
- PySys_WriteStderr("Nav: exception in previewProc callback\n");
- PyErr_Print();
- }
- return c_rv;
+ PyObject *dict = (PyObject *)callbackUD;
+ PyObject *pyfunc;
+ PyObject *rv;
+ Boolean c_rv = false;
+
+ if (!dict) return false;
+ if ( (pyfunc = PyDict_GetItemString(dict, "previewProc")) == NULL ) {
+ PyErr_Print();
+ return false;
+ }
+ rv = PyObject_CallFunction(pyfunc, "s#", (void *)callBackParms, sizeof(NavCBRec));
+ if ( rv ) {
+ c_rv = PyObject_IsTrue(rv);
+ Py_DECREF(rv);
+ } else {
+ PySys_WriteStderr("Nav: exception in previewProc callback\n");
+ PyErr_Print();
+ }
+ return c_rv;
}
static pascal Boolean
my_filterProc(AEDesc *theItem, void *info,
- NavCallBackUserData callbackUD,
- NavFilterModes filterMode)
+ NavCallBackUserData callbackUD,
+ NavFilterModes filterMode)
{
- PyObject *dict = (PyObject *)callbackUD;
- PyObject *pyfunc;
- PyObject *rv;
- Boolean c_rv = false;
-
- if (!dict) return false;
- if ( (pyfunc = PyDict_GetItemString(dict, "filterProc")) == NULL ) {
- PyErr_Print();
- return false;
- }
- rv = PyObject_CallFunction(pyfunc, "O&s#h",
- AEDesc_NewBorrowed, theItem, info, sizeof(NavFileOrFolderInfo), (short)filterMode);
- if ( rv ) {
- c_rv = PyObject_IsTrue(rv);
- Py_DECREF(rv);
- } else {
- PySys_WriteStderr("Nav: exception in filterProc callback\n");
- PyErr_Print();
- }
- return c_rv;
+ PyObject *dict = (PyObject *)callbackUD;
+ PyObject *pyfunc;
+ PyObject *rv;
+ Boolean c_rv = false;
+
+ if (!dict) return false;
+ if ( (pyfunc = PyDict_GetItemString(dict, "filterProc")) == NULL ) {
+ PyErr_Print();
+ return false;
+ }
+ rv = PyObject_CallFunction(pyfunc, "O&s#h",
+ AEDesc_NewBorrowed, theItem, info, sizeof(NavFileOrFolderInfo), (short)filterMode);
+ if ( rv ) {
+ c_rv = PyObject_IsTrue(rv);
+ Py_DECREF(rv);
+ } else {
+ PySys_WriteStderr("Nav: exception in filterProc callback\n");
+ PyErr_Print();
+ }
+ return c_rv;
}
/* ----------------------------------------------------- */
static int
filldialogoptions(PyObject *d,
- AEDesc **defaultLocationP,
- NavDialogOptions *opt,
- NavEventUPP *eventProcP,
- NavPreviewUPP *previewProcP,
- NavObjectFilterUPP *filterProcP,
- NavTypeListHandle *typeListP,
- OSType *fileTypeP,
- OSType *fileCreatorP)
+ AEDesc **defaultLocationP,
+ NavDialogOptions *opt,
+ NavEventUPP *eventProcP,
+ NavPreviewUPP *previewProcP,
+ NavObjectFilterUPP *filterProcP,
+ NavTypeListHandle *typeListP,
+ OSType *fileTypeP,
+ OSType *fileCreatorP)
{
- Py_ssize_t pos = 0;
- PyObject *key, *value;
- char *keystr;
- AEDesc *defaultLocation_storage;
-
- NavGetDefaultDialogOptions(opt);
-
- while ( PyDict_Next(d, &pos, &key, &value) ) {
- if ( !key || !value || !PyString_Check(key) ) {
- PyErr_SetString(ErrorObject, "DialogOption has non-string key");
- return 0;
- }
- keystr = PyString_AsString(key);
- if( strcmp(keystr, "defaultLocation") == 0 ) {
- if ( (defaultLocation_storage = PyMem_NEW(AEDesc, 1)) == NULL ) {
- PyErr_NoMemory();
- return 0;
- }
- if ( !PyArg_Parse(value, "O&", AEDesc_Convert, defaultLocation_storage) ) {
- PyMem_DEL(defaultLocation_storage);
- return 0;
- }
- *defaultLocationP = defaultLocation_storage;
- } else if( strcmp(keystr, "version") == 0 ) {
- if ( !PyArg_Parse(value, "H", &opt->version) )
- return 0;
- } else if( strcmp(keystr, "dialogOptionFlags") == 0 ) {
- if ( !PyArg_Parse(value, "k", &opt->dialogOptionFlags) )
- return 0;
- } else if( strcmp(keystr, "location") == 0 ) {
- if ( !PyArg_Parse(value, "O&", PyMac_GetPoint, &opt->location) )
- return 0;
- } else if( strcmp(keystr, "clientName") == 0 ) {
- if ( !PyArg_Parse(value, "O&", PyMac_GetStr255, &opt->clientName) )
- return 0;
- } else if( strcmp(keystr, "windowTitle") == 0 ) {
- if ( !PyArg_Parse(value, "O&", PyMac_GetStr255, &opt->windowTitle) )
- return 0;
- } else if( strcmp(keystr, "actionButtonLabel") == 0 ) {
- if ( !PyArg_Parse(value, "O&", PyMac_GetStr255, &opt->actionButtonLabel) )
- return 0;
- } else if( strcmp(keystr, "cancelButtonLabel") == 0 ) {
- if ( !PyArg_Parse(value, "O&", PyMac_GetStr255, &opt->cancelButtonLabel) )
- return 0;
- } else if( strcmp(keystr, "savedFileName") == 0 ) {
- if ( !PyArg_Parse(value, "O&", PyMac_GetStr255, &opt->savedFileName) )
- return 0;
- } else if( strcmp(keystr, "message") == 0 ) {
- if ( !PyArg_Parse(value, "O&", PyMac_GetStr255, &opt->message) )
- return 0;
- } else if( strcmp(keystr, "preferenceKey") == 0 ) {
- if ( !PyArg_Parse(value, "O&", PyMac_GetOSType, &opt->preferenceKey) )
- return 0;
- } else if( strcmp(keystr, "popupExtension") == 0 ) {
- if ( !PyArg_Parse(value, "O&", ResObj_Convert, &opt->popupExtension) )
- return 0;
- } else if( eventProcP && strcmp(keystr, "eventProc") == 0 ) {
- *eventProcP = my_eventProcUPP;
- } else if( previewProcP && strcmp(keystr, "previewProc") == 0 ) {
- *previewProcP = my_previewProcUPP;
- } else if( filterProcP && strcmp(keystr, "filterProc") == 0 ) {
- *filterProcP = my_filterProcUPP;
- } else if( typeListP && strcmp(keystr, "typeList") == 0 ) {
- if ( !PyArg_Parse(value, "O&", ResObj_Convert, typeListP) )
- return 0;
- } else if( fileTypeP && strcmp(keystr, "fileType") == 0 ) {
- if ( !PyArg_Parse(value, "O&", PyMac_GetOSType, fileTypeP) )
- return 0;
- } else if( fileCreatorP && strcmp(keystr, "fileCreator") == 0 ) {
- if ( !PyArg_Parse(value, "O&", PyMac_GetOSType, fileCreatorP) )
- return 0;
- } else {
- PyErr_Format(ErrorObject, "Unknown DialogOption key: %s", keystr);
- return 0;
- }
- }
- return 1;
+ Py_ssize_t pos = 0;
+ PyObject *key, *value;
+ char *keystr;
+ AEDesc *defaultLocation_storage;
+
+ NavGetDefaultDialogOptions(opt);
+
+ while ( PyDict_Next(d, &pos, &key, &value) ) {
+ if ( !key || !value || !PyString_Check(key) ) {
+ PyErr_SetString(ErrorObject, "DialogOption has non-string key");
+ return 0;
+ }
+ keystr = PyString_AsString(key);
+ if( strcmp(keystr, "defaultLocation") == 0 ) {
+ if ( (defaultLocation_storage = PyMem_NEW(AEDesc, 1)) == NULL ) {
+ PyErr_NoMemory();
+ return 0;
+ }
+ if ( !PyArg_Parse(value, "O&", AEDesc_Convert, defaultLocation_storage) ) {
+ PyMem_DEL(defaultLocation_storage);
+ return 0;
+ }
+ *defaultLocationP = defaultLocation_storage;
+ } else if( strcmp(keystr, "version") == 0 ) {
+ if ( !PyArg_Parse(value, "H", &opt->version) )
+ return 0;
+ } else if( strcmp(keystr, "dialogOptionFlags") == 0 ) {
+ if ( !PyArg_Parse(value, "k", &opt->dialogOptionFlags) )
+ return 0;
+ } else if( strcmp(keystr, "location") == 0 ) {
+ if ( !PyArg_Parse(value, "O&", PyMac_GetPoint, &opt->location) )
+ return 0;
+ } else if( strcmp(keystr, "clientName") == 0 ) {
+ if ( !PyArg_Parse(value, "O&", PyMac_GetStr255, &opt->clientName) )
+ return 0;
+ } else if( strcmp(keystr, "windowTitle") == 0 ) {
+ if ( !PyArg_Parse(value, "O&", PyMac_GetStr255, &opt->windowTitle) )
+ return 0;
+ } else if( strcmp(keystr, "actionButtonLabel") == 0 ) {
+ if ( !PyArg_Parse(value, "O&", PyMac_GetStr255, &opt->actionButtonLabel) )
+ return 0;
+ } else if( strcmp(keystr, "cancelButtonLabel") == 0 ) {
+ if ( !PyArg_Parse(value, "O&", PyMac_GetStr255, &opt->cancelButtonLabel) )
+ return 0;
+ } else if( strcmp(keystr, "savedFileName") == 0 ) {
+ if ( !PyArg_Parse(value, "O&", PyMac_GetStr255, &opt->savedFileName) )
+ return 0;
+ } else if( strcmp(keystr, "message") == 0 ) {
+ if ( !PyArg_Parse(value, "O&", PyMac_GetStr255, &opt->message) )
+ return 0;
+ } else if( strcmp(keystr, "preferenceKey") == 0 ) {
+ if ( !PyArg_Parse(value, "O&", PyMac_GetOSType, &opt->preferenceKey) )
+ return 0;
+ } else if( strcmp(keystr, "popupExtension") == 0 ) {
+ if ( !PyArg_Parse(value, "O&", ResObj_Convert, &opt->popupExtension) )
+ return 0;
+ } else if( eventProcP && strcmp(keystr, "eventProc") == 0 ) {
+ *eventProcP = my_eventProcUPP;
+ } else if( previewProcP && strcmp(keystr, "previewProc") == 0 ) {
+ *previewProcP = my_previewProcUPP;
+ } else if( filterProcP && strcmp(keystr, "filterProc") == 0 ) {
+ *filterProcP = my_filterProcUPP;
+ } else if( typeListP && strcmp(keystr, "typeList") == 0 ) {
+ if ( !PyArg_Parse(value, "O&", ResObj_Convert, typeListP) )
+ return 0;
+ } else if( fileTypeP && strcmp(keystr, "fileType") == 0 ) {
+ if ( !PyArg_Parse(value, "O&", PyMac_GetOSType, fileTypeP) )
+ return 0;
+ } else if( fileCreatorP && strcmp(keystr, "fileCreator") == 0 ) {
+ if ( !PyArg_Parse(value, "O&", PyMac_GetOSType, fileCreatorP) )
+ return 0;
+ } else {
+ PyErr_Format(ErrorObject, "Unknown DialogOption key: %s", keystr);
+ return 0;
+ }
+ }
+ return 1;
}
/* ----------------------------------------------------- */
@@ -217,8 +217,8 @@ filldialogoptions(PyObject *d,
/* Declarations for objects of type NavReplyRecord */
typedef struct {
- PyObject_HEAD
- NavReplyRecord itself;
+ PyObject_HEAD
+ NavReplyRecord itself;
} navrrobject;
static PyTypeObject Navrrtype;
@@ -234,18 +234,18 @@ static char nav_NavTranslateFile__doc__[] =
static PyObject *
nav_NavTranslateFile(navrrobject *self, PyObject *args)
{
- NavTranslationOptions howToTranslate;
- OSErr err;
-
- if (!PyArg_ParseTuple(args, "k", &howToTranslate))
- return NULL;
- err = NavTranslateFile(&self->itself, howToTranslate);
- if ( err ) {
- PyErr_Mac(ErrorObject, err);
- return NULL;
- }
- Py_INCREF(Py_None);
- return Py_None;
+ NavTranslationOptions howToTranslate;
+ OSErr err;
+
+ if (!PyArg_ParseTuple(args, "k", &howToTranslate))
+ return NULL;
+ err = NavTranslateFile(&self->itself, howToTranslate);
+ if ( err ) {
+ PyErr_Mac(ErrorObject, err);
+ return NULL;
+ }
+ Py_INCREF(Py_None);
+ return Py_None;
}
static char nav_NavCompleteSave__doc__[] =
@@ -255,26 +255,26 @@ static char nav_NavCompleteSave__doc__[] =
static PyObject *
nav_NavCompleteSave(navrrobject *self, PyObject *args)
{
- NavTranslationOptions howToTranslate;
- OSErr err;
-
- if (!PyArg_ParseTuple(args, "k", &howToTranslate))
- return NULL;
- err = NavCompleteSave(&self->itself, howToTranslate);
- if ( err ) {
- PyErr_Mac(ErrorObject, err);
- return NULL;
- }
- Py_INCREF(Py_None);
- return Py_None;
+ NavTranslationOptions howToTranslate;
+ OSErr err;
+
+ if (!PyArg_ParseTuple(args, "k", &howToTranslate))
+ return NULL;
+ err = NavCompleteSave(&self->itself, howToTranslate);
+ if ( err ) {
+ PyErr_Mac(ErrorObject, err);
+ return NULL;
+ }
+ Py_INCREF(Py_None);
+ return Py_None;
}
static struct PyMethodDef navrr_methods[] = {
- {"NavTranslateFile", (PyCFunction)nav_NavTranslateFile, METH_VARARGS, nav_NavTranslateFile__doc__},
- {"NavCompleteSave", (PyCFunction)nav_NavCompleteSave, METH_VARARGS, nav_NavCompleteSave__doc__},
-
- {NULL, NULL} /* sentinel */
+ {"NavTranslateFile", (PyCFunction)nav_NavTranslateFile, METH_VARARGS, nav_NavTranslateFile__doc__},
+ {"NavCompleteSave", (PyCFunction)nav_NavCompleteSave, METH_VARARGS, nav_NavCompleteSave__doc__},
+
+ {NULL, NULL} /* sentinel */
};
/* ---------- */
@@ -283,161 +283,161 @@ static struct PyMethodDef navrr_methods[] = {
static navrrobject *
newnavrrobject(NavReplyRecord *itself)
{
- navrrobject *self;
-
- self = PyObject_NEW(navrrobject, &Navrrtype);
- if (self == NULL)
- return NULL;
- self->itself = *itself;
- return self;
+ navrrobject *self;
+
+ self = PyObject_NEW(navrrobject, &Navrrtype);
+ if (self == NULL)
+ return NULL;
+ self->itself = *itself;
+ return self;
}
static void
navrr_dealloc(navrrobject *self)
{
- NavDisposeReply(&self->itself);
- PyObject_DEL(self);
+ NavDisposeReply(&self->itself);
+ PyObject_DEL(self);
}
static PyObject *
navrr_getattr(navrrobject *self, char *name)
{
- FSRef fsr;
- FSSpec fss;
-
- if( strcmp(name, "__members__") == 0 )
- return Py_BuildValue(
- "ssssssssss",
- "version", "validRecord", "replacing",
- "isStationery", "translationNeeded",
- "selection",
- "selection_fsr",
- "fileTranslation", "keyScript", "saveFileName");
-
- if( strcmp(name, "version") == 0 )
- return Py_BuildValue("h", self->itself.version);
- if( strcmp(name, "validRecord") == 0 )
- return Py_BuildValue("l", (long)self->itself.validRecord);
- if( strcmp(name, "replacing") == 0 )
- return Py_BuildValue("l", (long)self->itself.replacing);
- if( strcmp(name, "isStationery") == 0 )
- return Py_BuildValue("l", (long)self->itself.isStationery);
- if( strcmp(name, "translationNeeded") == 0 )
- return Py_BuildValue("l", (long)self->itself.translationNeeded);
- if( strcmp(name, "selection") == 0 ) {
- SInt32 i;
- long count;
- OSErr err;
- PyObject *rv, *rvitem;
- AEDesc desc;
-
- if ((err=AECountItems(&self->itself.selection, &count))) {
- PyErr_Mac(ErrorObject, err);
- return NULL;
- }
- if ( (rv=PyList_New(count)) == NULL )
- return NULL;
- for(i=0; i<count; i++) {
- desc.dataHandle = NULL;
- if ((err=AEGetNthDesc(&self->itself.selection, i+1, typeFSS, NULL, &desc))) {
- Py_DECREF(rv);
- PyErr_Mac(ErrorObject, err);
- return NULL;
- }
- if ((err=AEGetDescData(&desc, &fss, sizeof(FSSpec)))) {
- Py_DECREF(rv);
- PyErr_Mac(ErrorObject, err);
- return NULL;
- }
- rvitem = PyMac_BuildFSSpec(&fss);
- PyList_SetItem(rv, i, rvitem);
- AEDisposeDesc(&desc);
- }
- return rv;
- }
- if( strcmp(name, "selection_fsr") == 0 ) {
- SInt32 i;
- long count;
- OSErr err;
- PyObject *rv, *rvitem;
- AEDesc desc;
-
- if ((err=AECountItems(&self->itself.selection, &count))) {
- PyErr_Mac(ErrorObject, err);
- return NULL;
- }
- if ( (rv=PyList_New(count)) == NULL )
- return NULL;
- for(i=0; i<count; i++) {
- desc.dataHandle = NULL;
- if ((err=AEGetNthDesc(&self->itself.selection, i+1, typeFSRef, NULL, &desc))) {
- Py_DECREF(rv);
- PyErr_Mac(ErrorObject, err);
- return NULL;
- }
- if ((err=AEGetDescData(&desc, &fsr, sizeof(FSRef)))) {
- Py_DECREF(rv);
- PyErr_Mac(ErrorObject, err);
- return NULL;
- }
- rvitem = PyMac_BuildFSRef(&fsr);
- PyList_SetItem(rv, i, rvitem);
- AEDisposeDesc(&desc);
- }
- return rv;
- }
- if( strcmp(name, "fileTranslation") == 0 )
- return ResObj_New((Handle)self->itself.fileTranslation);
- if( strcmp(name, "keyScript") == 0 )
- return Py_BuildValue("h", (short)self->itself.keyScript);
- if( strcmp(name, "saveFileName") == 0 )
- return Py_BuildValue("O&", CFStringRefObj_New, self->itself.saveFileName);
-
-
- return Py_FindMethod(navrr_methods, (PyObject *)self, name);
+ FSRef fsr;
+ FSSpec fss;
+
+ if( strcmp(name, "__members__") == 0 )
+ return Py_BuildValue(
+ "ssssssssss",
+ "version", "validRecord", "replacing",
+ "isStationery", "translationNeeded",
+ "selection",
+ "selection_fsr",
+ "fileTranslation", "keyScript", "saveFileName");
+
+ if( strcmp(name, "version") == 0 )
+ return Py_BuildValue("h", self->itself.version);
+ if( strcmp(name, "validRecord") == 0 )
+ return Py_BuildValue("l", (long)self->itself.validRecord);
+ if( strcmp(name, "replacing") == 0 )
+ return Py_BuildValue("l", (long)self->itself.replacing);
+ if( strcmp(name, "isStationery") == 0 )
+ return Py_BuildValue("l", (long)self->itself.isStationery);
+ if( strcmp(name, "translationNeeded") == 0 )
+ return Py_BuildValue("l", (long)self->itself.translationNeeded);
+ if( strcmp(name, "selection") == 0 ) {
+ SInt32 i;
+ long count;
+ OSErr err;
+ PyObject *rv, *rvitem;
+ AEDesc desc;
+
+ if ((err=AECountItems(&self->itself.selection, &count))) {
+ PyErr_Mac(ErrorObject, err);
+ return NULL;
+ }
+ if ( (rv=PyList_New(count)) == NULL )
+ return NULL;
+ for(i=0; i<count; i++) {
+ desc.dataHandle = NULL;
+ if ((err=AEGetNthDesc(&self->itself.selection, i+1, typeFSS, NULL, &desc))) {
+ Py_DECREF(rv);
+ PyErr_Mac(ErrorObject, err);
+ return NULL;
+ }
+ if ((err=AEGetDescData(&desc, &fss, sizeof(FSSpec)))) {
+ Py_DECREF(rv);
+ PyErr_Mac(ErrorObject, err);
+ return NULL;
+ }
+ rvitem = PyMac_BuildFSSpec(&fss);
+ PyList_SetItem(rv, i, rvitem);
+ AEDisposeDesc(&desc);
+ }
+ return rv;
+ }
+ if( strcmp(name, "selection_fsr") == 0 ) {
+ SInt32 i;
+ long count;
+ OSErr err;
+ PyObject *rv, *rvitem;
+ AEDesc desc;
+
+ if ((err=AECountItems(&self->itself.selection, &count))) {
+ PyErr_Mac(ErrorObject, err);
+ return NULL;
+ }
+ if ( (rv=PyList_New(count)) == NULL )
+ return NULL;
+ for(i=0; i<count; i++) {
+ desc.dataHandle = NULL;
+ if ((err=AEGetNthDesc(&self->itself.selection, i+1, typeFSRef, NULL, &desc))) {
+ Py_DECREF(rv);
+ PyErr_Mac(ErrorObject, err);
+ return NULL;
+ }
+ if ((err=AEGetDescData(&desc, &fsr, sizeof(FSRef)))) {
+ Py_DECREF(rv);
+ PyErr_Mac(ErrorObject, err);
+ return NULL;
+ }
+ rvitem = PyMac_BuildFSRef(&fsr);
+ PyList_SetItem(rv, i, rvitem);
+ AEDisposeDesc(&desc);
+ }
+ return rv;
+ }
+ if( strcmp(name, "fileTranslation") == 0 )
+ return ResObj_New((Handle)self->itself.fileTranslation);
+ if( strcmp(name, "keyScript") == 0 )
+ return Py_BuildValue("h", (short)self->itself.keyScript);
+ if( strcmp(name, "saveFileName") == 0 )
+ return Py_BuildValue("O&", CFStringRefObj_New, self->itself.saveFileName);
+
+
+ return Py_FindMethod(navrr_methods, (PyObject *)self, name);
}
static int
navrr_setattr(navrrobject *self, char *name, PyObject *v)
{
- /* Set attribute 'name' to value 'v'. v==NULL means delete */
-
- /* XXXX Add your own setattr code here */
- return -1;
+ /* Set attribute 'name' to value 'v'. v==NULL means delete */
+
+ /* XXXX Add your own setattr code here */
+ return -1;
}
-static char Navrrtype__doc__[] =
+static char Navrrtype__doc__[] =
"Record containing result of a Nav file selection call. Use dir() for member names."
;
static PyTypeObject Navrrtype = {
- PyObject_HEAD_INIT(&PyType_Type)
- 0, /*ob_size*/
- "Nav.NavReplyRecord", /*tp_name*/
- sizeof(navrrobject), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- /* methods */
- (destructor)navrr_dealloc, /*tp_dealloc*/
- (printfunc)0, /*tp_print*/
- (getattrfunc)navrr_getattr, /*tp_getattr*/
- (setattrfunc)navrr_setattr, /*tp_setattr*/
- (cmpfunc)0, /*tp_compare*/
- (reprfunc)0, /*tp_repr*/
- 0, /*tp_as_number*/
- 0, /*tp_as_sequence*/
- 0, /*tp_as_mapping*/
- (hashfunc)0, /*tp_hash*/
- (ternaryfunc)0, /*tp_call*/
- (reprfunc)0, /*tp_str*/
-
- /* Space for future expansion */
- 0L,0L,0L,0L,
- Navrrtype__doc__ /* Documentation string */
+ PyObject_HEAD_INIT(&PyType_Type)
+ 0, /*ob_size*/
+ "Nav.NavReplyRecord", /*tp_name*/
+ sizeof(navrrobject), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ /* methods */
+ (destructor)navrr_dealloc, /*tp_dealloc*/
+ (printfunc)0, /*tp_print*/
+ (getattrfunc)navrr_getattr, /*tp_getattr*/
+ (setattrfunc)navrr_setattr, /*tp_setattr*/
+ (cmpfunc)0, /*tp_compare*/
+ (reprfunc)0, /*tp_repr*/
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ (hashfunc)0, /*tp_hash*/
+ (ternaryfunc)0, /*tp_call*/
+ (reprfunc)0, /*tp_str*/
+
+ /* Space for future expansion */
+ 0L,0L,0L,0L,
+ Navrrtype__doc__ /* Documentation string */
};
/* End of code for NavReplyRecord objects */
-
+
/* ----------------------------------------------------- */
static char nav_NavGetFile__doc__[] =
@@ -447,32 +447,32 @@ static char nav_NavGetFile__doc__[] =
static PyObject *
nav_NavGetFile(PyObject *self, PyObject *args, PyObject *kw)
{
- PyObject *dict;
- AEDesc *defaultLocation = NULL;
- NavReplyRecord reply;
- NavDialogOptions dialogOptions;
- NavEventUPP eventProc = NULL;
- NavPreviewUPP previewProc = NULL;
- NavObjectFilterUPP filterProc = NULL;
- NavTypeListHandle typeList = NULL;
- OSErr err;
-
- if ( kw && PyObject_IsTrue(kw) ) {
- if (!PyArg_ParseTuple(args, ";either keyword arguments or dictionary expected"))
- return NULL;
- dict = kw;
- } else if (!PyArg_ParseTuple(args, "O!", &PyDict_Type, &dict))
- return NULL;
- if (!filldialogoptions(dict, &defaultLocation, &dialogOptions, &eventProc, &previewProc, &filterProc, &typeList, NULL, NULL))
- return NULL;
- err = NavGetFile(defaultLocation, &reply, &dialogOptions,
- eventProc, previewProc, filterProc, typeList, (void *)dict);
- PyMem_DEL(defaultLocation);
- if ( err ) {
- PyErr_Mac(ErrorObject, err);
- return NULL;
- }
- return (PyObject *)newnavrrobject(&reply);
+ PyObject *dict;
+ AEDesc *defaultLocation = NULL;
+ NavReplyRecord reply;
+ NavDialogOptions dialogOptions;
+ NavEventUPP eventProc = NULL;
+ NavPreviewUPP previewProc = NULL;
+ NavObjectFilterUPP filterProc = NULL;
+ NavTypeListHandle typeList = NULL;
+ OSErr err;
+
+ if ( kw && PyObject_IsTrue(kw) ) {
+ if (!PyArg_ParseTuple(args, ";either keyword arguments or dictionary expected"))
+ return NULL;
+ dict = kw;
+ } else if (!PyArg_ParseTuple(args, "O!", &PyDict_Type, &dict))
+ return NULL;
+ if (!filldialogoptions(dict, &defaultLocation, &dialogOptions, &eventProc, &previewProc, &filterProc, &typeList, NULL, NULL))
+ return NULL;
+ err = NavGetFile(defaultLocation, &reply, &dialogOptions,
+ eventProc, previewProc, filterProc, typeList, (void *)dict);
+ PyMem_DEL(defaultLocation);
+ if ( err ) {
+ PyErr_Mac(ErrorObject, err);
+ return NULL;
+ }
+ return (PyObject *)newnavrrobject(&reply);
}
static char nav_NavPutFile__doc__[] =
@@ -482,31 +482,31 @@ static char nav_NavPutFile__doc__[] =
static PyObject *
nav_NavPutFile(PyObject *self, PyObject *args, PyObject *kw)
{
- PyObject *dict;
- AEDesc *defaultLocation = NULL;
- NavReplyRecord reply;
- NavDialogOptions dialogOptions;
- NavEventUPP eventProc = NULL;
- OSType fileType;
- OSType fileCreator;
- OSErr err;
-
- if ( kw && PyObject_IsTrue(kw) ) {
- if (!PyArg_ParseTuple(args, ";either keyword arguments or dictionary expected"))
- return NULL;
- dict = kw;
- } else if (!PyArg_ParseTuple(args, "O!", &PyDict_Type, &dict))
- return NULL;
- if (!filldialogoptions(dict, &defaultLocation, &dialogOptions, &eventProc, NULL, NULL, NULL, &fileType, &fileCreator))
- return NULL;
- err = NavPutFile(defaultLocation, &reply, &dialogOptions,
- eventProc, fileType, fileCreator, (void *)dict);
- PyMem_DEL(defaultLocation);
- if ( err ) {
- PyErr_Mac(ErrorObject, err);
- return NULL;
- }
- return (PyObject *)newnavrrobject(&reply);
+ PyObject *dict;
+ AEDesc *defaultLocation = NULL;
+ NavReplyRecord reply;
+ NavDialogOptions dialogOptions;
+ NavEventUPP eventProc = NULL;
+ OSType fileType;
+ OSType fileCreator;
+ OSErr err;
+
+ if ( kw && PyObject_IsTrue(kw) ) {
+ if (!PyArg_ParseTuple(args, ";either keyword arguments or dictionary expected"))
+ return NULL;
+ dict = kw;
+ } else if (!PyArg_ParseTuple(args, "O!", &PyDict_Type, &dict))
+ return NULL;
+ if (!filldialogoptions(dict, &defaultLocation, &dialogOptions, &eventProc, NULL, NULL, NULL, &fileType, &fileCreator))
+ return NULL;
+ err = NavPutFile(defaultLocation, &reply, &dialogOptions,
+ eventProc, fileType, fileCreator, (void *)dict);
+ PyMem_DEL(defaultLocation);
+ if ( err ) {
+ PyErr_Mac(ErrorObject, err);
+ return NULL;
+ }
+ return (PyObject *)newnavrrobject(&reply);
}
static char nav_NavAskSaveChanges__doc__[] =
@@ -517,27 +517,27 @@ static char nav_NavAskSaveChanges__doc__[] =
static PyObject *
nav_NavAskSaveChanges(PyObject *self, PyObject *args, PyObject *kw)
{
- PyObject *dict;
- NavDialogOptions dialogOptions;
- NavAskSaveChangesAction action;
- NavAskSaveChangesResult reply;
- NavEventUPP eventProc = NULL;
- OSErr err;
-
- if ( kw && PyObject_IsTrue(kw) ) {
- if (!PyArg_ParseTuple(args, "k", &action))
- return NULL;
- dict = kw;
- } else if (!PyArg_ParseTuple(args, "lO!", &action, &PyDict_Type, &dict))
- return NULL;
- if (!filldialogoptions(dict, NULL, &dialogOptions, &eventProc, NULL, NULL, NULL, NULL, NULL))
- return NULL;
- err = NavAskSaveChanges(&dialogOptions, action, &reply, eventProc, (void *)dict);
- if ( err ) {
- PyErr_Mac(ErrorObject, err);
- return NULL;
- }
- return Py_BuildValue("l", (long)reply);
+ PyObject *dict;
+ NavDialogOptions dialogOptions;
+ NavAskSaveChangesAction action;
+ NavAskSaveChangesResult reply;
+ NavEventUPP eventProc = NULL;
+ OSErr err;
+
+ if ( kw && PyObject_IsTrue(kw) ) {
+ if (!PyArg_ParseTuple(args, "k", &action))
+ return NULL;
+ dict = kw;
+ } else if (!PyArg_ParseTuple(args, "lO!", &action, &PyDict_Type, &dict))
+ return NULL;
+ if (!filldialogoptions(dict, NULL, &dialogOptions, &eventProc, NULL, NULL, NULL, NULL, NULL))
+ return NULL;
+ err = NavAskSaveChanges(&dialogOptions, action, &reply, eventProc, (void *)dict);
+ if ( err ) {
+ PyErr_Mac(ErrorObject, err);
+ return NULL;
+ }
+ return Py_BuildValue("l", (long)reply);
}
static char nav_NavCustomAskSaveChanges__doc__[] =
@@ -547,26 +547,26 @@ static char nav_NavCustomAskSaveChanges__doc__[] =
static PyObject *
nav_NavCustomAskSaveChanges(PyObject *self, PyObject *args, PyObject *kw)
{
- PyObject *dict;
- NavDialogOptions dialogOptions;
- NavAskSaveChangesResult reply;
- NavEventUPP eventProc = NULL;
- OSErr err;
-
- if ( kw && PyObject_IsTrue(kw) ) {
- if (!PyArg_ParseTuple(args, ";either keyword arguments or dictionary expected"))
- return NULL;
- dict = kw;
- } else if (!PyArg_ParseTuple(args, "O!", &PyDict_Type, &dict))
- return NULL;
- if (!filldialogoptions(dict, NULL, &dialogOptions, &eventProc, NULL, NULL, NULL, NULL, NULL))
- return NULL;
- err = NavCustomAskSaveChanges(&dialogOptions, &reply, eventProc, (void *)dict);
- if ( err ) {
- PyErr_Mac(ErrorObject, err);
- return NULL;
- }
- return Py_BuildValue("l", (long)reply);
+ PyObject *dict;
+ NavDialogOptions dialogOptions;
+ NavAskSaveChangesResult reply;
+ NavEventUPP eventProc = NULL;
+ OSErr err;
+
+ if ( kw && PyObject_IsTrue(kw) ) {
+ if (!PyArg_ParseTuple(args, ";either keyword arguments or dictionary expected"))
+ return NULL;
+ dict = kw;
+ } else if (!PyArg_ParseTuple(args, "O!", &PyDict_Type, &dict))
+ return NULL;
+ if (!filldialogoptions(dict, NULL, &dialogOptions, &eventProc, NULL, NULL, NULL, NULL, NULL))
+ return NULL;
+ err = NavCustomAskSaveChanges(&dialogOptions, &reply, eventProc, (void *)dict);
+ if ( err ) {
+ PyErr_Mac(ErrorObject, err);
+ return NULL;
+ }
+ return Py_BuildValue("l", (long)reply);
}
static char nav_NavAskDiscardChanges__doc__[] =
@@ -576,26 +576,26 @@ static char nav_NavAskDiscardChanges__doc__[] =
static PyObject *
nav_NavAskDiscardChanges(PyObject *self, PyObject *args, PyObject *kw)
{
- PyObject *dict;
- NavDialogOptions dialogOptions;
- NavAskSaveChangesResult reply;
- NavEventUPP eventProc = NULL;
- OSErr err;
-
- if ( kw && PyObject_IsTrue(kw) ) {
- if (!PyArg_ParseTuple(args, ";either keyword arguments or dictionary expected"))
- return NULL;
- dict = kw;
- } else if (!PyArg_ParseTuple(args, "O!", &PyDict_Type, &dict))
- return NULL;
- if (!filldialogoptions(dict, NULL, &dialogOptions, &eventProc, NULL, NULL, NULL, NULL, NULL))
- return NULL;
- err = NavAskDiscardChanges(&dialogOptions, &reply, eventProc, (void *)dict);
- if ( err ) {
- PyErr_Mac(ErrorObject, err);
- return NULL;
- }
- return Py_BuildValue("l", (long)reply);
+ PyObject *dict;
+ NavDialogOptions dialogOptions;
+ NavAskSaveChangesResult reply;
+ NavEventUPP eventProc = NULL;
+ OSErr err;
+
+ if ( kw && PyObject_IsTrue(kw) ) {
+ if (!PyArg_ParseTuple(args, ";either keyword arguments or dictionary expected"))
+ return NULL;
+ dict = kw;
+ } else if (!PyArg_ParseTuple(args, "O!", &PyDict_Type, &dict))
+ return NULL;
+ if (!filldialogoptions(dict, NULL, &dialogOptions, &eventProc, NULL, NULL, NULL, NULL, NULL))
+ return NULL;
+ err = NavAskDiscardChanges(&dialogOptions, &reply, eventProc, (void *)dict);
+ if ( err ) {
+ PyErr_Mac(ErrorObject, err);
+ return NULL;
+ }
+ return Py_BuildValue("l", (long)reply);
}
static char nav_NavChooseFile__doc__[] =
@@ -605,32 +605,32 @@ static char nav_NavChooseFile__doc__[] =
static PyObject *
nav_NavChooseFile(PyObject *self, PyObject *args, PyObject *kw)
{
- PyObject *dict;
- AEDesc *defaultLocation = NULL;
- NavReplyRecord reply;
- NavDialogOptions dialogOptions;
- NavEventUPP eventProc = NULL;
- NavPreviewUPP previewProc = NULL;
- NavObjectFilterUPP filterProc = NULL;
- NavTypeListHandle typeList = NULL;
- OSErr err;
-
- if ( kw && PyObject_IsTrue(kw) ) {
- if (!PyArg_ParseTuple(args, ";either keyword arguments or dictionary expected"))
- return NULL;
- dict = kw;
- } else if (!PyArg_ParseTuple(args, "O!", &PyDict_Type, &dict))
- return NULL;
- if (!filldialogoptions(dict, &defaultLocation, &dialogOptions, &eventProc, &previewProc, &filterProc, &typeList, NULL, NULL))
- return NULL;
- err = NavChooseFile(defaultLocation, &reply, &dialogOptions,
- eventProc, previewProc, filterProc, typeList, (void *)dict);
- PyMem_DEL(defaultLocation);
- if ( err ) {
- PyErr_Mac(ErrorObject, err);
- return NULL;
- }
- return (PyObject *)newnavrrobject(&reply);
+ PyObject *dict;
+ AEDesc *defaultLocation = NULL;
+ NavReplyRecord reply;
+ NavDialogOptions dialogOptions;
+ NavEventUPP eventProc = NULL;
+ NavPreviewUPP previewProc = NULL;
+ NavObjectFilterUPP filterProc = NULL;
+ NavTypeListHandle typeList = NULL;
+ OSErr err;
+
+ if ( kw && PyObject_IsTrue(kw) ) {
+ if (!PyArg_ParseTuple(args, ";either keyword arguments or dictionary expected"))
+ return NULL;
+ dict = kw;
+ } else if (!PyArg_ParseTuple(args, "O!", &PyDict_Type, &dict))
+ return NULL;
+ if (!filldialogoptions(dict, &defaultLocation, &dialogOptions, &eventProc, &previewProc, &filterProc, &typeList, NULL, NULL))
+ return NULL;
+ err = NavChooseFile(defaultLocation, &reply, &dialogOptions,
+ eventProc, previewProc, filterProc, typeList, (void *)dict);
+ PyMem_DEL(defaultLocation);
+ if ( err ) {
+ PyErr_Mac(ErrorObject, err);
+ return NULL;
+ }
+ return (PyObject *)newnavrrobject(&reply);
}
static char nav_NavChooseFolder__doc__[] =
@@ -640,30 +640,30 @@ static char nav_NavChooseFolder__doc__[] =
static PyObject *
nav_NavChooseFolder(PyObject *self, PyObject *args, PyObject *kw)
{
- PyObject *dict;
- AEDesc *defaultLocation = NULL;
- NavReplyRecord reply;
- NavDialogOptions dialogOptions;
- NavEventUPP eventProc = NULL;
- NavObjectFilterUPP filterProc = NULL;
- OSErr err;
-
- if ( kw && PyObject_IsTrue(kw) ) {
- if (!PyArg_ParseTuple(args, ";either keyword arguments or dictionary expected"))
- return NULL;
- dict = kw;
- } else if (!PyArg_ParseTuple(args, "O!", &PyDict_Type, &dict))
- return NULL;
- if (!filldialogoptions(dict, &defaultLocation, &dialogOptions, &eventProc, NULL, &filterProc, NULL, NULL, NULL))
- return NULL;
- err = NavChooseFolder(defaultLocation, &reply, &dialogOptions,
- eventProc, filterProc, (void *)dict);
- PyMem_DEL(defaultLocation);
- if ( err ) {
- PyErr_Mac(ErrorObject, err);
- return NULL;
- }
- return (PyObject *)newnavrrobject(&reply);
+ PyObject *dict;
+ AEDesc *defaultLocation = NULL;
+ NavReplyRecord reply;
+ NavDialogOptions dialogOptions;
+ NavEventUPP eventProc = NULL;
+ NavObjectFilterUPP filterProc = NULL;
+ OSErr err;
+
+ if ( kw && PyObject_IsTrue(kw) ) {
+ if (!PyArg_ParseTuple(args, ";either keyword arguments or dictionary expected"))
+ return NULL;
+ dict = kw;
+ } else if (!PyArg_ParseTuple(args, "O!", &PyDict_Type, &dict))
+ return NULL;
+ if (!filldialogoptions(dict, &defaultLocation, &dialogOptions, &eventProc, NULL, &filterProc, NULL, NULL, NULL))
+ return NULL;
+ err = NavChooseFolder(defaultLocation, &reply, &dialogOptions,
+ eventProc, filterProc, (void *)dict);
+ PyMem_DEL(defaultLocation);
+ if ( err ) {
+ PyErr_Mac(ErrorObject, err);
+ return NULL;
+ }
+ return (PyObject *)newnavrrobject(&reply);
}
static char nav_NavChooseVolume__doc__[] =
@@ -673,30 +673,30 @@ static char nav_NavChooseVolume__doc__[] =
static PyObject *
nav_NavChooseVolume(PyObject *self, PyObject *args, PyObject *kw)
{
- PyObject *dict;
- AEDesc *defaultLocation = NULL;
- NavReplyRecord reply;
- NavDialogOptions dialogOptions;
- NavEventUPP eventProc = NULL;
- NavObjectFilterUPP filterProc = NULL;
- OSErr err;
-
- if ( kw && PyObject_IsTrue(kw) ) {
- if (!PyArg_ParseTuple(args, ";either keyword arguments or dictionary expected"))
- return NULL;
- dict = kw;
- } else if (!PyArg_ParseTuple(args, "O!", &PyDict_Type, &dict))
- return NULL;
- if (!filldialogoptions(dict, &defaultLocation, &dialogOptions, &eventProc, NULL, &filterProc, NULL, NULL, NULL))
- return NULL;
- err = NavChooseVolume(defaultLocation, &reply, &dialogOptions,
- eventProc, filterProc, (void *)dict);
- PyMem_DEL(defaultLocation);
- if ( err ) {
- PyErr_Mac(ErrorObject, err);
- return NULL;
- }
- return (PyObject *)newnavrrobject(&reply);
+ PyObject *dict;
+ AEDesc *defaultLocation = NULL;
+ NavReplyRecord reply;
+ NavDialogOptions dialogOptions;
+ NavEventUPP eventProc = NULL;
+ NavObjectFilterUPP filterProc = NULL;
+ OSErr err;
+
+ if ( kw && PyObject_IsTrue(kw) ) {
+ if (!PyArg_ParseTuple(args, ";either keyword arguments or dictionary expected"))
+ return NULL;
+ dict = kw;
+ } else if (!PyArg_ParseTuple(args, "O!", &PyDict_Type, &dict))
+ return NULL;
+ if (!filldialogoptions(dict, &defaultLocation, &dialogOptions, &eventProc, NULL, &filterProc, NULL, NULL, NULL))
+ return NULL;
+ err = NavChooseVolume(defaultLocation, &reply, &dialogOptions,
+ eventProc, filterProc, (void *)dict);
+ PyMem_DEL(defaultLocation);
+ if ( err ) {
+ PyErr_Mac(ErrorObject, err);
+ return NULL;
+ }
+ return (PyObject *)newnavrrobject(&reply);
}
static char nav_NavChooseObject__doc__[] =
@@ -706,30 +706,30 @@ static char nav_NavChooseObject__doc__[] =
static PyObject *
nav_NavChooseObject(PyObject *self, PyObject *args, PyObject *kw)
{
- PyObject *dict;
- AEDesc *defaultLocation = NULL;
- NavReplyRecord reply;
- NavDialogOptions dialogOptions;
- NavEventUPP eventProc = NULL;
- NavObjectFilterUPP filterProc = NULL;
- OSErr err;
-
- if ( kw && PyObject_IsTrue(kw) ) {
- if (!PyArg_ParseTuple(args, ";either keyword arguments or dictionary expected"))
- return NULL;
- dict = kw;
- } else if (!PyArg_ParseTuple(args, "O!", &PyDict_Type, &dict))
- return NULL;
- if (!filldialogoptions(dict, &defaultLocation, &dialogOptions, &eventProc, NULL, &filterProc, NULL, NULL, NULL))
- return NULL;
- err = NavChooseObject(defaultLocation, &reply, &dialogOptions,
- eventProc, filterProc, (void *)dict);
- PyMem_DEL(defaultLocation);
- if ( err ) {
- PyErr_Mac(ErrorObject, err);
- return NULL;
- }
- return (PyObject *)newnavrrobject(&reply);
+ PyObject *dict;
+ AEDesc *defaultLocation = NULL;
+ NavReplyRecord reply;
+ NavDialogOptions dialogOptions;
+ NavEventUPP eventProc = NULL;
+ NavObjectFilterUPP filterProc = NULL;
+ OSErr err;
+
+ if ( kw && PyObject_IsTrue(kw) ) {
+ if (!PyArg_ParseTuple(args, ";either keyword arguments or dictionary expected"))
+ return NULL;
+ dict = kw;
+ } else if (!PyArg_ParseTuple(args, "O!", &PyDict_Type, &dict))
+ return NULL;
+ if (!filldialogoptions(dict, &defaultLocation, &dialogOptions, &eventProc, NULL, &filterProc, NULL, NULL, NULL))
+ return NULL;
+ err = NavChooseObject(defaultLocation, &reply, &dialogOptions,
+ eventProc, filterProc, (void *)dict);
+ PyMem_DEL(defaultLocation);
+ if ( err ) {
+ PyErr_Mac(ErrorObject, err);
+ return NULL;
+ }
+ return (PyObject *)newnavrrobject(&reply);
}
static char nav_NavNewFolder__doc__[] =
@@ -739,28 +739,28 @@ static char nav_NavNewFolder__doc__[] =
static PyObject *
nav_NavNewFolder(PyObject *self, PyObject *args, PyObject *kw)
{
- PyObject *dict;
- AEDesc *defaultLocation = NULL;
- NavReplyRecord reply;
- NavDialogOptions dialogOptions;
- NavEventUPP eventProc = NULL;
- OSErr err;
-
- if ( kw && PyObject_IsTrue(kw) ) {
- if (!PyArg_ParseTuple(args, ";either keyword arguments or dictionary expected"))
- return NULL;
- dict = kw;
- } else if (!PyArg_ParseTuple(args, "O!", &PyDict_Type, &dict))
- return NULL;
- if (!filldialogoptions(dict, &defaultLocation, &dialogOptions, &eventProc, NULL, NULL, NULL, NULL, NULL))
- return NULL;
- err = NavNewFolder(defaultLocation, &reply, &dialogOptions, eventProc, (void *)dict);
- PyMem_DEL(defaultLocation);
- if ( err ) {
- PyErr_Mac(ErrorObject, err);
- return NULL;
- }
- return (PyObject *)newnavrrobject(&reply);
+ PyObject *dict;
+ AEDesc *defaultLocation = NULL;
+ NavReplyRecord reply;
+ NavDialogOptions dialogOptions;
+ NavEventUPP eventProc = NULL;
+ OSErr err;
+
+ if ( kw && PyObject_IsTrue(kw) ) {
+ if (!PyArg_ParseTuple(args, ";either keyword arguments or dictionary expected"))
+ return NULL;
+ dict = kw;
+ } else if (!PyArg_ParseTuple(args, "O!", &PyDict_Type, &dict))
+ return NULL;
+ if (!filldialogoptions(dict, &defaultLocation, &dialogOptions, &eventProc, NULL, NULL, NULL, NULL, NULL))
+ return NULL;
+ err = NavNewFolder(defaultLocation, &reply, &dialogOptions, eventProc, (void *)dict);
+ PyMem_DEL(defaultLocation);
+ if ( err ) {
+ PyErr_Mac(ErrorObject, err);
+ return NULL;
+ }
+ return (PyObject *)newnavrrobject(&reply);
}
#if 0
@@ -774,10 +774,10 @@ static PyObject *
nav_NavCustomControl(PyObject *self, PyObject *args)
{
- if (!PyArg_ParseTuple(args, ""))
- return NULL;
- Py_INCREF(Py_None);
- return Py_None;
+ if (!PyArg_ParseTuple(args, ""))
+ return NULL;
+ Py_INCREF(Py_None);
+ return Py_None;
}
#endif
@@ -788,11 +788,11 @@ static char nav_NavServicesCanRun__doc__[] =
static PyObject *
nav_NavServicesCanRun(PyObject *self, PyObject *args)
{
- Boolean rv;
- if (!PyArg_ParseTuple(args, ""))
- return NULL;
- rv = NavServicesCanRun();
- return Py_BuildValue("l", (long)rv);
+ Boolean rv;
+ if (!PyArg_ParseTuple(args, ""))
+ return NULL;
+ rv = NavServicesCanRun();
+ return Py_BuildValue("l", (long)rv);
}
static char nav_NavServicesAvailable__doc__[] =
@@ -802,12 +802,12 @@ static char nav_NavServicesAvailable__doc__[] =
static PyObject *
nav_NavServicesAvailable(PyObject *self, PyObject *args)
{
- Boolean rv;
-
- if (!PyArg_ParseTuple(args, ""))
- return NULL;
- rv = NavServicesAvailable();
- return Py_BuildValue("l", (long)rv);
+ Boolean rv;
+
+ if (!PyArg_ParseTuple(args, ""))
+ return NULL;
+ rv = NavServicesAvailable();
+ return Py_BuildValue("l", (long)rv);
}
/* XX */
static char nav_NavLoad__doc__[] =
@@ -818,11 +818,11 @@ static PyObject *
nav_NavLoad(PyObject *self, PyObject *args)
{
- if (!PyArg_ParseTuple(args, ""))
- return NULL;
- NavLoad();
- Py_INCREF(Py_None);
- return Py_None;
+ if (!PyArg_ParseTuple(args, ""))
+ return NULL;
+ NavLoad();
+ Py_INCREF(Py_None);
+ return Py_None;
}
static char nav_NavUnload__doc__[] =
@@ -833,11 +833,11 @@ static PyObject *
nav_NavUnload(PyObject *self, PyObject *args)
{
- if (!PyArg_ParseTuple(args, ""))
- return NULL;
- NavUnload();
- Py_INCREF(Py_None);
- return Py_None;
+ if (!PyArg_ParseTuple(args, ""))
+ return NULL;
+ NavUnload();
+ Py_INCREF(Py_None);
+ return Py_None;
}
static char nav_NavLibraryVersion__doc__[] =
@@ -847,12 +847,12 @@ static char nav_NavLibraryVersion__doc__[] =
static PyObject *
nav_NavLibraryVersion(PyObject *self, PyObject *args)
{
- UInt32 rv;
-
- if (!PyArg_ParseTuple(args, ""))
- return NULL;
- rv = NavLibraryVersion();
- return Py_BuildValue("l", (long)rv);
+ UInt32 rv;
+
+ if (!PyArg_ParseTuple(args, ""))
+ return NULL;
+ rv = NavLibraryVersion();
+ return Py_BuildValue("l", (long)rv);
}
static char nav_NavGetDefaultDialogOptions__doc__[] =
@@ -862,59 +862,59 @@ static char nav_NavGetDefaultDialogOptions__doc__[] =
static PyObject *
nav_NavGetDefaultDialogOptions(PyObject *self, PyObject *args)
{
- NavDialogOptions dialogOptions;
- OSErr err;
-
- err = NavGetDefaultDialogOptions(&dialogOptions);
- if ( err ) {
- PyErr_Mac(ErrorObject, err);
- return NULL;
- }
- return Py_BuildValue(
- "{s:h,s:l,s:O&,s:O&,s:O&,s:O&,s:O&,s:O&,s:O&,s:O&,s:O&}",
- "version", dialogOptions.version,
- "dialogOptionFlags", dialogOptions.dialogOptionFlags,
- "location", PyMac_BuildPoint, dialogOptions.location,
- "clientName", PyMac_BuildStr255, &dialogOptions.clientName,
- "windowTitle", PyMac_BuildStr255, &dialogOptions.windowTitle,
- "actionButtonLabel", PyMac_BuildStr255, &dialogOptions.actionButtonLabel,
- "cancelButtonLabel", PyMac_BuildStr255, &dialogOptions.cancelButtonLabel,
- "savedFileName", PyMac_BuildStr255, &dialogOptions.savedFileName,
- "message", PyMac_BuildStr255, &dialogOptions.message,
- "preferenceKey", PyMac_BuildOSType, dialogOptions.preferenceKey
- ,"popupExtension", OptResObj_New, dialogOptions.popupExtension
- );
+ NavDialogOptions dialogOptions;
+ OSErr err;
+
+ err = NavGetDefaultDialogOptions(&dialogOptions);
+ if ( err ) {
+ PyErr_Mac(ErrorObject, err);
+ return NULL;
+ }
+ return Py_BuildValue(
+ "{s:h,s:l,s:O&,s:O&,s:O&,s:O&,s:O&,s:O&,s:O&,s:O&,s:O&}",
+ "version", dialogOptions.version,
+ "dialogOptionFlags", dialogOptions.dialogOptionFlags,
+ "location", PyMac_BuildPoint, dialogOptions.location,
+ "clientName", PyMac_BuildStr255, &dialogOptions.clientName,
+ "windowTitle", PyMac_BuildStr255, &dialogOptions.windowTitle,
+ "actionButtonLabel", PyMac_BuildStr255, &dialogOptions.actionButtonLabel,
+ "cancelButtonLabel", PyMac_BuildStr255, &dialogOptions.cancelButtonLabel,
+ "savedFileName", PyMac_BuildStr255, &dialogOptions.savedFileName,
+ "message", PyMac_BuildStr255, &dialogOptions.message,
+ "preferenceKey", PyMac_BuildOSType, dialogOptions.preferenceKey
+ ,"popupExtension", OptResObj_New, dialogOptions.popupExtension
+ );
}
/* List of methods defined in the module */
static struct PyMethodDef nav_methods[] = {
- {"NavGetFile", (PyCFunction)nav_NavGetFile, METH_VARARGS|METH_KEYWORDS, nav_NavGetFile__doc__},
- {"NavPutFile", (PyCFunction)nav_NavPutFile, METH_VARARGS|METH_KEYWORDS, nav_NavPutFile__doc__},
- {"NavAskSaveChanges", (PyCFunction)nav_NavAskSaveChanges, METH_VARARGS|METH_KEYWORDS, nav_NavAskSaveChanges__doc__},
- {"NavCustomAskSaveChanges", (PyCFunction)nav_NavCustomAskSaveChanges, METH_VARARGS|METH_KEYWORDS, nav_NavCustomAskSaveChanges__doc__},
- {"NavAskDiscardChanges", (PyCFunction)nav_NavAskDiscardChanges, METH_VARARGS|METH_KEYWORDS, nav_NavAskDiscardChanges__doc__},
- {"NavChooseFile", (PyCFunction)nav_NavChooseFile, METH_VARARGS|METH_KEYWORDS, nav_NavChooseFile__doc__},
- {"NavChooseFolder", (PyCFunction)nav_NavChooseFolder, METH_VARARGS|METH_KEYWORDS, nav_NavChooseFolder__doc__},
- {"NavChooseVolume", (PyCFunction)nav_NavChooseVolume, METH_VARARGS|METH_KEYWORDS, nav_NavChooseVolume__doc__},
- {"NavChooseObject", (PyCFunction)nav_NavChooseObject, METH_VARARGS|METH_KEYWORDS, nav_NavChooseObject__doc__},
- {"NavNewFolder", (PyCFunction)nav_NavNewFolder, METH_VARARGS|METH_KEYWORDS, nav_NavNewFolder__doc__},
+ {"NavGetFile", (PyCFunction)nav_NavGetFile, METH_VARARGS|METH_KEYWORDS, nav_NavGetFile__doc__},
+ {"NavPutFile", (PyCFunction)nav_NavPutFile, METH_VARARGS|METH_KEYWORDS, nav_NavPutFile__doc__},
+ {"NavAskSaveChanges", (PyCFunction)nav_NavAskSaveChanges, METH_VARARGS|METH_KEYWORDS, nav_NavAskSaveChanges__doc__},
+ {"NavCustomAskSaveChanges", (PyCFunction)nav_NavCustomAskSaveChanges, METH_VARARGS|METH_KEYWORDS, nav_NavCustomAskSaveChanges__doc__},
+ {"NavAskDiscardChanges", (PyCFunction)nav_NavAskDiscardChanges, METH_VARARGS|METH_KEYWORDS, nav_NavAskDiscardChanges__doc__},
+ {"NavChooseFile", (PyCFunction)nav_NavChooseFile, METH_VARARGS|METH_KEYWORDS, nav_NavChooseFile__doc__},
+ {"NavChooseFolder", (PyCFunction)nav_NavChooseFolder, METH_VARARGS|METH_KEYWORDS, nav_NavChooseFolder__doc__},
+ {"NavChooseVolume", (PyCFunction)nav_NavChooseVolume, METH_VARARGS|METH_KEYWORDS, nav_NavChooseVolume__doc__},
+ {"NavChooseObject", (PyCFunction)nav_NavChooseObject, METH_VARARGS|METH_KEYWORDS, nav_NavChooseObject__doc__},
+ {"NavNewFolder", (PyCFunction)nav_NavNewFolder, METH_VARARGS|METH_KEYWORDS, nav_NavNewFolder__doc__},
#if 0
- {"NavCustomControl", (PyCFunction)nav_NavCustomControl, METH_VARARGS, nav_NavCustomControl__doc__},
+ {"NavCustomControl", (PyCFunction)nav_NavCustomControl, METH_VARARGS, nav_NavCustomControl__doc__},
#endif
- {"NavServicesCanRun", (PyCFunction)nav_NavServicesCanRun, METH_VARARGS, nav_NavServicesCanRun__doc__},
- {"NavServicesAvailable", (PyCFunction)nav_NavServicesAvailable, METH_VARARGS, nav_NavServicesAvailable__doc__},
- {"NavLoad", (PyCFunction)nav_NavLoad, METH_VARARGS, nav_NavLoad__doc__},
- {"NavUnload", (PyCFunction)nav_NavUnload, METH_VARARGS, nav_NavUnload__doc__},
- {"NavLibraryVersion", (PyCFunction)nav_NavLibraryVersion, METH_VARARGS, nav_NavLibraryVersion__doc__},
- {"NavGetDefaultDialogOptions", (PyCFunction)nav_NavGetDefaultDialogOptions, METH_VARARGS, nav_NavGetDefaultDialogOptions__doc__},
- {NULL, (PyCFunction)NULL, 0, NULL} /* sentinel */
+ {"NavServicesCanRun", (PyCFunction)nav_NavServicesCanRun, METH_VARARGS, nav_NavServicesCanRun__doc__},
+ {"NavServicesAvailable", (PyCFunction)nav_NavServicesAvailable, METH_VARARGS, nav_NavServicesAvailable__doc__},
+ {"NavLoad", (PyCFunction)nav_NavLoad, METH_VARARGS, nav_NavLoad__doc__},
+ {"NavUnload", (PyCFunction)nav_NavUnload, METH_VARARGS, nav_NavUnload__doc__},
+ {"NavLibraryVersion", (PyCFunction)nav_NavLibraryVersion, METH_VARARGS, nav_NavLibraryVersion__doc__},
+ {"NavGetDefaultDialogOptions", (PyCFunction)nav_NavGetDefaultDialogOptions, METH_VARARGS, nav_NavGetDefaultDialogOptions__doc__},
+ {NULL, (PyCFunction)NULL, 0, NULL} /* sentinel */
};
/* Initialization function for the module (*must* be called initNav) */
-static char Nav_module_documentation[] =
+static char Nav_module_documentation[] =
"Interface to Navigation Services\n"
"Most calls accept a NavDialogOptions dictionary or keywords with the same names, pass {}\n"
"if you want the default options.\n"
@@ -930,39 +930,39 @@ static char Nav_module_documentation[] =
void
initNav(void)
{
- PyObject *m, *d;
-
- if (PyErr_WarnPy3k("In 3.x, the Nav module is removed.", 1))
- return;
+ PyObject *m, *d;
+
+ if (PyErr_WarnPy3k("In 3.x, the Nav module is removed.", 1))
+ return;
#ifdef __LP64__
- PyErr_SetString(PyExc_ImportError, "Navigation Services not available in 64-bit mode");
- return;
-
-#else /* !__LP64__ */
-
- /* Test that we have NavServices */
- if ( !NavServicesAvailable() ) {
- PyErr_SetString(PyExc_ImportError, "Navigation Services not available");
- return;
- }
- /* Create the module and add the functions */
- m = Py_InitModule4("Nav", nav_methods,
- Nav_module_documentation,
- (PyObject*)NULL,PYTHON_API_VERSION);
-
- /* Add some symbolic constants to the module */
- d = PyModule_GetDict(m);
- ErrorObject = PyString_FromString("Nav.error");
- PyDict_SetItemString(d, "error", ErrorObject);
-
- /* XXXX Add constants here */
-
- /* Set UPPs */
- my_eventProcUPP = NewNavEventUPP(my_eventProc);
- my_previewProcUPP = NewNavPreviewUPP(my_previewProc);
- my_filterProcUPP = NewNavObjectFilterUPP(my_filterProc);
+ PyErr_SetString(PyExc_ImportError, "Navigation Services not available in 64-bit mode");
+ return;
+
+#else /* !__LP64__ */
+
+ /* Test that we have NavServices */
+ if ( !NavServicesAvailable() ) {
+ PyErr_SetString(PyExc_ImportError, "Navigation Services not available");
+ return;
+ }
+ /* Create the module and add the functions */
+ m = Py_InitModule4("Nav", nav_methods,
+ Nav_module_documentation,
+ (PyObject*)NULL,PYTHON_API_VERSION);
+
+ /* Add some symbolic constants to the module */
+ d = PyModule_GetDict(m);
+ ErrorObject = PyString_FromString("Nav.error");
+ PyDict_SetItemString(d, "error", ErrorObject);
+
+ /* XXXX Add constants here */
+
+ /* Set UPPs */
+ my_eventProcUPP = NewNavEventUPP(my_eventProc);
+ my_previewProcUPP = NewNavPreviewUPP(my_previewProc);
+ my_filterProcUPP = NewNavObjectFilterUPP(my_filterProc);
#endif /* !__LP64__ */
-
+
}
diff --git a/Mac/Modules/OSATerminology.c b/Mac/Modules/OSATerminology.c
index a7becf7..2114d07 100644
--- a/Mac/Modules/OSATerminology.c
+++ b/Mac/Modules/OSATerminology.c
@@ -18,85 +18,85 @@
static PyObject *
PyOSA_GetAppTerminology(PyObject* self, PyObject* args)
{
- AEDesc theDesc = {0,0};
- FSSpec fss;
- ComponentInstance defaultComponent = NULL;
- SInt16 defaultTerminology = 0;
- Boolean didLaunch = 0;
- OSAError err;
- long modeFlags = 0;
-
- if (!PyArg_ParseTuple(args, "O&|i", PyMac_GetFSSpec, &fss, &modeFlags))
- return NULL;
-
- /*
- ** Note that we have to use the AppleScript component here. Who knows why
- ** OSAGetAppTerminology should require a scripting component in the
- ** first place, but it does. Note: doesn't work with the generic scripting
- ** component, which is unfortunate as the AS component is currently very
- ** slow (~1 sec?) to load, but we just have to live with this.
- */
- defaultComponent = OpenDefaultComponent (kOSAComponentType, 'ascr');
- err = GetComponentInstanceError (defaultComponent);
- if (err) return PyMac_Error(err);
- err = OSAGetAppTerminology (
- defaultComponent,
- kOSAModeNull,
- &fss,
- defaultTerminology,
- &didLaunch,
- &theDesc
- );
- if (err) return PyMac_Error(err);
- return Py_BuildValue("O&i", AEDesc_New, &theDesc, didLaunch);
+ AEDesc theDesc = {0,0};
+ FSSpec fss;
+ ComponentInstance defaultComponent = NULL;
+ SInt16 defaultTerminology = 0;
+ Boolean didLaunch = 0;
+ OSAError err;
+ long modeFlags = 0;
+
+ if (!PyArg_ParseTuple(args, "O&|i", PyMac_GetFSSpec, &fss, &modeFlags))
+ return NULL;
+
+ /*
+ ** Note that we have to use the AppleScript component here. Who knows why
+ ** OSAGetAppTerminology should require a scripting component in the
+ ** first place, but it does. Note: doesn't work with the generic scripting
+ ** component, which is unfortunate as the AS component is currently very
+ ** slow (~1 sec?) to load, but we just have to live with this.
+ */
+ defaultComponent = OpenDefaultComponent (kOSAComponentType, 'ascr');
+ err = GetComponentInstanceError (defaultComponent);
+ if (err) return PyMac_Error(err);
+ err = OSAGetAppTerminology (
+ defaultComponent,
+ kOSAModeNull,
+ &fss,
+ defaultTerminology,
+ &didLaunch,
+ &theDesc
+ );
+ if (err) return PyMac_Error(err);
+ return Py_BuildValue("O&i", AEDesc_New, &theDesc, didLaunch);
}
static PyObject *
PyOSA_GetSysTerminology(PyObject* self, PyObject* args)
{
- AEDesc theDesc = {0,0};
- ComponentInstance defaultComponent = NULL;
- SInt16 defaultTerminology = 0;
- OSAError err;
-
- /* Accept any args for sake of backwards compatibility, then ignore them. */
+ AEDesc theDesc = {0,0};
+ ComponentInstance defaultComponent = NULL;
+ SInt16 defaultTerminology = 0;
+ OSAError err;
- defaultComponent = OpenDefaultComponent (kOSAComponentType, 'ascr');
- err = GetComponentInstanceError (defaultComponent);
- if (err) return PyMac_Error(err);
- err = OSAGetSysTerminology (
- defaultComponent,
- kOSAModeNull,
- defaultTerminology,
- &theDesc
- );
- if (err) return PyMac_Error(err);
- return Py_BuildValue("O&", AEDesc_New, &theDesc);
+ /* Accept any args for sake of backwards compatibility, then ignore them. */
+
+ defaultComponent = OpenDefaultComponent (kOSAComponentType, 'ascr');
+ err = GetComponentInstanceError (defaultComponent);
+ if (err) return PyMac_Error(err);
+ err = OSAGetSysTerminology (
+ defaultComponent,
+ kOSAModeNull,
+ defaultTerminology,
+ &theDesc
+ );
+ if (err) return PyMac_Error(err);
+ return Py_BuildValue("O&", AEDesc_New, &theDesc);
}
#endif /* !__LP64__ */
-/*
+/*
* List of methods defined in the module
*/
static struct PyMethodDef OSATerminology_methods[] =
{
#ifndef __LP64__
- {"GetAppTerminology",
- (PyCFunction) PyOSA_GetAppTerminology,
- METH_VARARGS,
- "Get an application's terminology. GetAppTerminology(path) --> AEDesc"},
- {"GetSysTerminology",
- (PyCFunction) PyOSA_GetSysTerminology,
- METH_VARARGS,
- "Get the AppleScript language's terminology. GetSysTerminology() --> AEDesc"},
+ {"GetAppTerminology",
+ (PyCFunction) PyOSA_GetAppTerminology,
+ METH_VARARGS,
+ "Get an application's terminology. GetAppTerminology(path) --> AEDesc"},
+ {"GetSysTerminology",
+ (PyCFunction) PyOSA_GetSysTerminology,
+ METH_VARARGS,
+ "Get the AppleScript language's terminology. GetSysTerminology() --> AEDesc"},
#endif /* !__LP64__ */
- {NULL, (PyCFunction) NULL, 0, NULL}
+ {NULL, (PyCFunction) NULL, 0, NULL}
};
void
initOSATerminology(void)
{
- if (PyErr_WarnPy3k("In 3.x, the OSATerminology module is removed.", 1) < 0)
- return;
- Py_InitModule("OSATerminology", OSATerminology_methods);
+ if (PyErr_WarnPy3k("In 3.x, the OSATerminology module is removed.", 1) < 0)
+ return;
+ Py_InitModule("OSATerminology", OSATerminology_methods);
}
diff --git a/Mac/Modules/_scproxy.c b/Mac/Modules/_scproxy.c
index 9f4c1a4..dd5a293 100644
--- a/Mac/Modules/_scproxy.c
+++ b/Mac/Modules/_scproxy.c
@@ -5,162 +5,162 @@
#include <Python.h>
#include <SystemConfiguration/SystemConfiguration.h>
-static int32_t
+static int32_t
cfnum_to_int32(CFNumberRef num)
{
- int32_t result;
+ int32_t result;
- CFNumberGetValue(num, kCFNumberSInt32Type, &result);
- return result;
+ CFNumberGetValue(num, kCFNumberSInt32Type, &result);
+ return result;
}
static PyObject*
cfstring_to_pystring(CFStringRef ref)
{
- const char* s;
-
- s = CFStringGetCStringPtr(ref, kCFStringEncodingUTF8);
- if (s) {
- return PyString_FromString(s);
-
- } else {
- CFIndex len = CFStringGetLength(ref);
- Boolean ok;
- PyObject* result;
- result = PyString_FromStringAndSize(NULL, len*4);
-
- ok = CFStringGetCString(ref,
- PyString_AS_STRING(result),
- PyString_GET_SIZE(result),
- kCFStringEncodingUTF8);
- if (!ok) {
- Py_DECREF(result);
- return NULL;
- } else {
- _PyString_Resize(&result,
- strlen(PyString_AS_STRING(result)));
- }
- return result;
- }
+ const char* s;
+
+ s = CFStringGetCStringPtr(ref, kCFStringEncodingUTF8);
+ if (s) {
+ return PyString_FromString(s);
+
+ } else {
+ CFIndex len = CFStringGetLength(ref);
+ Boolean ok;
+ PyObject* result;
+ result = PyString_FromStringAndSize(NULL, len*4);
+
+ ok = CFStringGetCString(ref,
+ PyString_AS_STRING(result),
+ PyString_GET_SIZE(result),
+ kCFStringEncodingUTF8);
+ if (!ok) {
+ Py_DECREF(result);
+ return NULL;
+ } else {
+ _PyString_Resize(&result,
+ strlen(PyString_AS_STRING(result)));
+ }
+ return result;
+ }
}
static PyObject*
get_proxy_settings(PyObject* mod __attribute__((__unused__)))
{
- CFDictionaryRef proxyDict = NULL;
- CFNumberRef aNum = NULL;
- CFArrayRef anArray = NULL;
- PyObject* result = NULL;
- PyObject* v;
- int r;
-
- proxyDict = SCDynamicStoreCopyProxies(NULL);
- if (!proxyDict) {
- Py_INCREF(Py_None);
- return Py_None;
- }
-
- result = PyDict_New();
- if (result == NULL) goto error;
-
- if (&kSCPropNetProxiesExcludeSimpleHostnames != NULL) {
- aNum = CFDictionaryGetValue(proxyDict,
- kSCPropNetProxiesExcludeSimpleHostnames);
- if (aNum == NULL) {
- v = PyBool_FromLong(1);
- } else {
- v = PyBool_FromLong(cfnum_to_int32(aNum));
- }
- } else {
- v = PyBool_FromLong(1);
- }
-
- if (v == NULL) goto error;
-
- r = PyDict_SetItemString(result, "exclude_simple", v);
- Py_DECREF(v); v = NULL;
- if (r == -1) goto error;
-
- anArray = CFDictionaryGetValue(proxyDict,
- kSCPropNetProxiesExceptionsList);
- if (anArray != NULL) {
- CFIndex len = CFArrayGetCount(anArray);
- CFIndex i;
- v = PyTuple_New(len);
- if (v == NULL) goto error;
-
- r = PyDict_SetItemString(result, "exceptions", v);
- Py_DECREF(v);
- if (r == -1) goto error;
-
- for (i = 0; i < len; i++) {
- CFStringRef aString = NULL;
-
- aString = CFArrayGetValueAtIndex(anArray, i);
- if (aString == NULL) {
- PyTuple_SetItem(v, i, Py_None);
- Py_INCREF(Py_None);
- } else {
- PyObject* t = cfstring_to_pystring(aString);
- if (!t) {
- PyTuple_SetItem(v, i, Py_None);
- Py_INCREF(Py_None);
- } else {
- PyTuple_SetItem(v, i, t);
- }
- }
- }
- }
-
- CFRelease(proxyDict);
- return result;
+ CFDictionaryRef proxyDict = NULL;
+ CFNumberRef aNum = NULL;
+ CFArrayRef anArray = NULL;
+ PyObject* result = NULL;
+ PyObject* v;
+ int r;
+
+ proxyDict = SCDynamicStoreCopyProxies(NULL);
+ if (!proxyDict) {
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
+
+ result = PyDict_New();
+ if (result == NULL) goto error;
+
+ if (&kSCPropNetProxiesExcludeSimpleHostnames != NULL) {
+ aNum = CFDictionaryGetValue(proxyDict,
+ kSCPropNetProxiesExcludeSimpleHostnames);
+ if (aNum == NULL) {
+ v = PyBool_FromLong(1);
+ } else {
+ v = PyBool_FromLong(cfnum_to_int32(aNum));
+ }
+ } else {
+ v = PyBool_FromLong(1);
+ }
+
+ if (v == NULL) goto error;
+
+ r = PyDict_SetItemString(result, "exclude_simple", v);
+ Py_DECREF(v); v = NULL;
+ if (r == -1) goto error;
+
+ anArray = CFDictionaryGetValue(proxyDict,
+ kSCPropNetProxiesExceptionsList);
+ if (anArray != NULL) {
+ CFIndex len = CFArrayGetCount(anArray);
+ CFIndex i;
+ v = PyTuple_New(len);
+ if (v == NULL) goto error;
+
+ r = PyDict_SetItemString(result, "exceptions", v);
+ Py_DECREF(v);
+ if (r == -1) goto error;
+
+ for (i = 0; i < len; i++) {
+ CFStringRef aString = NULL;
+
+ aString = CFArrayGetValueAtIndex(anArray, i);
+ if (aString == NULL) {
+ PyTuple_SetItem(v, i, Py_None);
+ Py_INCREF(Py_None);
+ } else {
+ PyObject* t = cfstring_to_pystring(aString);
+ if (!t) {
+ PyTuple_SetItem(v, i, Py_None);
+ Py_INCREF(Py_None);
+ } else {
+ PyTuple_SetItem(v, i, t);
+ }
+ }
+ }
+ }
+
+ CFRelease(proxyDict);
+ return result;
error:
- if (proxyDict) CFRelease(proxyDict);
- Py_XDECREF(result);
- return NULL;
+ if (proxyDict) CFRelease(proxyDict);
+ Py_XDECREF(result);
+ return NULL;
}
static int
set_proxy(PyObject* proxies, char* proto, CFDictionaryRef proxyDict,
- CFStringRef enabledKey,
- CFStringRef hostKey, CFStringRef portKey)
+ CFStringRef enabledKey,
+ CFStringRef hostKey, CFStringRef portKey)
{
- CFNumberRef aNum;
-
- aNum = CFDictionaryGetValue(proxyDict, enabledKey);
- if (aNum && cfnum_to_int32(aNum)) {
- CFStringRef hostString;
-
- hostString = CFDictionaryGetValue(proxyDict, hostKey);
- aNum = CFDictionaryGetValue(proxyDict, portKey);
-
- if (hostString) {
- int r;
- PyObject* h = cfstring_to_pystring(hostString);
- PyObject* v;
- if (h) {
- if (aNum) {
- int32_t port = cfnum_to_int32(aNum);
- v = PyString_FromFormat("http://%s:%ld",
- PyString_AS_STRING(h),
- (long)port);
- } else {
- v = PyString_FromFormat("http://%s",
- PyString_AS_STRING(h));
- }
- Py_DECREF(h);
- if (!v) return -1;
- r = PyDict_SetItemString(proxies, proto,
- v);
- Py_DECREF(v);
- return r;
- }
- }
-
- }
- return 0;
+ CFNumberRef aNum;
+
+ aNum = CFDictionaryGetValue(proxyDict, enabledKey);
+ if (aNum && cfnum_to_int32(aNum)) {
+ CFStringRef hostString;
+
+ hostString = CFDictionaryGetValue(proxyDict, hostKey);
+ aNum = CFDictionaryGetValue(proxyDict, portKey);
+
+ if (hostString) {
+ int r;
+ PyObject* h = cfstring_to_pystring(hostString);
+ PyObject* v;
+ if (h) {
+ if (aNum) {
+ int32_t port = cfnum_to_int32(aNum);
+ v = PyString_FromFormat("http://%s:%ld",
+ PyString_AS_STRING(h),
+ (long)port);
+ } else {
+ v = PyString_FromFormat("http://%s",
+ PyString_AS_STRING(h));
+ }
+ Py_DECREF(h);
+ if (!v) return -1;
+ r = PyDict_SetItemString(proxies, proto,
+ v);
+ Py_DECREF(v);
+ return r;
+ }
+ }
+
+ }
+ return 0;
}
@@ -168,64 +168,64 @@ set_proxy(PyObject* proxies, char* proto, CFDictionaryRef proxyDict,
static PyObject*
get_proxies(PyObject* mod __attribute__((__unused__)))
{
- PyObject* result = NULL;
- int r;
- CFDictionaryRef proxyDict = NULL;
-
- proxyDict = SCDynamicStoreCopyProxies(NULL);
- if (proxyDict == NULL) {
- return PyDict_New();
- }
-
- result = PyDict_New();
- if (result == NULL) goto error;
-
- r = set_proxy(result, "http", proxyDict,
- kSCPropNetProxiesHTTPEnable,
- kSCPropNetProxiesHTTPProxy,
- kSCPropNetProxiesHTTPPort);
- if (r == -1) goto error;
- r = set_proxy(result, "https", proxyDict,
- kSCPropNetProxiesHTTPSEnable,
- kSCPropNetProxiesHTTPSProxy,
- kSCPropNetProxiesHTTPSPort);
- if (r == -1) goto error;
- r = set_proxy(result, "ftp", proxyDict,
- kSCPropNetProxiesFTPEnable,
- kSCPropNetProxiesFTPProxy,
- kSCPropNetProxiesFTPPort);
- if (r == -1) goto error;
- r = set_proxy(result, "gopher", proxyDict,
- kSCPropNetProxiesGopherEnable,
- kSCPropNetProxiesGopherProxy,
- kSCPropNetProxiesGopherPort);
- if (r == -1) goto error;
-
- CFRelease(proxyDict);
- return result;
+ PyObject* result = NULL;
+ int r;
+ CFDictionaryRef proxyDict = NULL;
+
+ proxyDict = SCDynamicStoreCopyProxies(NULL);
+ if (proxyDict == NULL) {
+ return PyDict_New();
+ }
+
+ result = PyDict_New();
+ if (result == NULL) goto error;
+
+ r = set_proxy(result, "http", proxyDict,
+ kSCPropNetProxiesHTTPEnable,
+ kSCPropNetProxiesHTTPProxy,
+ kSCPropNetProxiesHTTPPort);
+ if (r == -1) goto error;
+ r = set_proxy(result, "https", proxyDict,
+ kSCPropNetProxiesHTTPSEnable,
+ kSCPropNetProxiesHTTPSProxy,
+ kSCPropNetProxiesHTTPSPort);
+ if (r == -1) goto error;
+ r = set_proxy(result, "ftp", proxyDict,
+ kSCPropNetProxiesFTPEnable,
+ kSCPropNetProxiesFTPProxy,
+ kSCPropNetProxiesFTPPort);
+ if (r == -1) goto error;
+ r = set_proxy(result, "gopher", proxyDict,
+ kSCPropNetProxiesGopherEnable,
+ kSCPropNetProxiesGopherProxy,
+ kSCPropNetProxiesGopherPort);
+ if (r == -1) goto error;
+
+ CFRelease(proxyDict);
+ return result;
error:
- if (proxyDict) CFRelease(proxyDict);
- Py_XDECREF(result);
- return NULL;
+ if (proxyDict) CFRelease(proxyDict);
+ Py_XDECREF(result);
+ return NULL;
}
static PyMethodDef mod_methods[] = {
- {
- "_get_proxy_settings",
- (PyCFunction)get_proxy_settings,
- METH_NOARGS,
- NULL,
- },
- {
- "_get_proxies",
- (PyCFunction)get_proxies,
- METH_NOARGS,
- NULL,
- },
- { 0, 0, 0, 0 }
+ {
+ "_get_proxy_settings",
+ (PyCFunction)get_proxy_settings,
+ METH_NOARGS,
+ NULL,
+ },
+ {
+ "_get_proxies",
+ (PyCFunction)get_proxies,
+ METH_NOARGS,
+ NULL,
+ },
+ { 0, 0, 0, 0 }
};
void init_scproxy(void)
{
- (void)Py_InitModule4("_scproxy", mod_methods, NULL, NULL, PYTHON_API_VERSION);
+ (void)Py_InitModule4("_scproxy", mod_methods, NULL, NULL, PYTHON_API_VERSION);
}
diff --git a/Mac/Modules/ae/_AEmodule.c b/Mac/Modules/ae/_AEmodule.c
index 09105a5..21a2d40 100644
--- a/Mac/Modules/ae/_AEmodule.c
+++ b/Mac/Modules/ae/_AEmodule.c
@@ -13,9 +13,9 @@ typedef SInt32 SRefCon;
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
- PyErr_SetString(PyExc_NotImplementedError, \
- "Not available in this shared library/OS version"); \
- return NULL; \
+ PyErr_SetString(PyExc_NotImplementedError, \
+ "Not available in this shared library/OS version"); \
+ return NULL; \
}} while(0)
@@ -38,9 +38,9 @@ AEEventHandlerUPP upp_GenericEventHandler;
static pascal Boolean AEIdleProc(EventRecord *theEvent, long *sleepTime, RgnHandle *mouseRgn)
{
- if ( PyOS_InterruptOccurred() )
- return 1;
- return 0;
+ if ( PyOS_InterruptOccurred() )
+ return 1;
+ return 0;
}
AEIdleUPP upp_AEIdleProc;
@@ -54,807 +54,807 @@ PyTypeObject AEDesc_Type;
#define AEDesc_Check(x) ((x)->ob_type == &AEDesc_Type || PyObject_TypeCheck((x), &AEDesc_Type))
typedef struct AEDescObject {
- PyObject_HEAD
- AEDesc ob_itself;
- int ob_owned;
+ PyObject_HEAD
+ AEDesc ob_itself;
+ int ob_owned;
} AEDescObject;
PyObject *AEDesc_New(AEDesc *itself)
{
- AEDescObject *it;
- it = PyObject_NEW(AEDescObject, &AEDesc_Type);
- if (it == NULL) return NULL;
- it->ob_itself = *itself;
- it->ob_owned = 1;
- return (PyObject *)it;
+ AEDescObject *it;
+ it = PyObject_NEW(AEDescObject, &AEDesc_Type);
+ if (it == NULL) return NULL;
+ it->ob_itself = *itself;
+ it->ob_owned = 1;
+ return (PyObject *)it;
}
int AEDesc_Convert(PyObject *v, AEDesc *p_itself)
{
- if (!AEDesc_Check(v))
- {
- PyErr_SetString(PyExc_TypeError, "AEDesc required");
- return 0;
- }
- *p_itself = ((AEDescObject *)v)->ob_itself;
- return 1;
+ if (!AEDesc_Check(v))
+ {
+ PyErr_SetString(PyExc_TypeError, "AEDesc required");
+ return 0;
+ }
+ *p_itself = ((AEDescObject *)v)->ob_itself;
+ return 1;
}
static void AEDesc_dealloc(AEDescObject *self)
{
- if (self->ob_owned) AEDisposeDesc(&self->ob_itself);
- self->ob_type->tp_free((PyObject *)self);
+ if (self->ob_owned) AEDisposeDesc(&self->ob_itself);
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *AEDesc_AECoerceDesc(AEDescObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- DescType toType;
- AEDesc result;
+ PyObject *_res = NULL;
+ OSErr _err;
+ DescType toType;
+ AEDesc result;
#ifndef AECoerceDesc
- PyMac_PRECHECK(AECoerceDesc);
+ PyMac_PRECHECK(AECoerceDesc);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetOSType, &toType))
- return NULL;
- _err = AECoerceDesc(&_self->ob_itself,
- toType,
- &result);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- AEDesc_New, &result);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetOSType, &toType))
+ return NULL;
+ _err = AECoerceDesc(&_self->ob_itself,
+ toType,
+ &result);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ AEDesc_New, &result);
+ return _res;
}
static PyObject *AEDesc_AEDuplicateDesc(AEDescObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- AEDesc result;
+ PyObject *_res = NULL;
+ OSErr _err;
+ AEDesc result;
#ifndef AEDuplicateDesc
- PyMac_PRECHECK(AEDuplicateDesc);
+ PyMac_PRECHECK(AEDuplicateDesc);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = AEDuplicateDesc(&_self->ob_itself,
- &result);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- AEDesc_New, &result);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = AEDuplicateDesc(&_self->ob_itself,
+ &result);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ AEDesc_New, &result);
+ return _res;
}
static PyObject *AEDesc_AECountItems(AEDescObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- long theCount;
+ PyObject *_res = NULL;
+ OSErr _err;
+ long theCount;
#ifndef AECountItems
- PyMac_PRECHECK(AECountItems);
+ PyMac_PRECHECK(AECountItems);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = AECountItems(&_self->ob_itself,
- &theCount);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- theCount);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = AECountItems(&_self->ob_itself,
+ &theCount);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ theCount);
+ return _res;
}
static PyObject *AEDesc_AEPutPtr(AEDescObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- long index;
- DescType typeCode;
- char *dataPtr__in__;
- long dataPtr__len__;
- int dataPtr__in_len__;
+ PyObject *_res = NULL;
+ OSErr _err;
+ long index;
+ DescType typeCode;
+ char *dataPtr__in__;
+ long dataPtr__len__;
+ int dataPtr__in_len__;
#ifndef AEPutPtr
- PyMac_PRECHECK(AEPutPtr);
+ PyMac_PRECHECK(AEPutPtr);
#endif
- if (!PyArg_ParseTuple(_args, "lO&s#",
- &index,
- PyMac_GetOSType, &typeCode,
- &dataPtr__in__, &dataPtr__in_len__))
- return NULL;
- dataPtr__len__ = dataPtr__in_len__;
- _err = AEPutPtr(&_self->ob_itself,
- index,
- typeCode,
- dataPtr__in__, dataPtr__len__);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "lO&s#",
+ &index,
+ PyMac_GetOSType, &typeCode,
+ &dataPtr__in__, &dataPtr__in_len__))
+ return NULL;
+ dataPtr__len__ = dataPtr__in_len__;
+ _err = AEPutPtr(&_self->ob_itself,
+ index,
+ typeCode,
+ dataPtr__in__, dataPtr__len__);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *AEDesc_AEPutDesc(AEDescObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- long index;
- AEDesc theAEDesc;
+ PyObject *_res = NULL;
+ OSErr _err;
+ long index;
+ AEDesc theAEDesc;
#ifndef AEPutDesc
- PyMac_PRECHECK(AEPutDesc);
+ PyMac_PRECHECK(AEPutDesc);
#endif
- if (!PyArg_ParseTuple(_args, "lO&",
- &index,
- AEDesc_Convert, &theAEDesc))
- return NULL;
- _err = AEPutDesc(&_self->ob_itself,
- index,
- &theAEDesc);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "lO&",
+ &index,
+ AEDesc_Convert, &theAEDesc))
+ return NULL;
+ _err = AEPutDesc(&_self->ob_itself,
+ index,
+ &theAEDesc);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *AEDesc_AEGetNthPtr(AEDescObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- long index;
- DescType desiredType;
- AEKeyword theAEKeyword;
- DescType typeCode;
- char *dataPtr__out__;
- long dataPtr__len__;
- int dataPtr__in_len__;
+ PyObject *_res = NULL;
+ OSErr _err;
+ long index;
+ DescType desiredType;
+ AEKeyword theAEKeyword;
+ DescType typeCode;
+ char *dataPtr__out__;
+ long dataPtr__len__;
+ int dataPtr__in_len__;
#ifndef AEGetNthPtr
- PyMac_PRECHECK(AEGetNthPtr);
+ PyMac_PRECHECK(AEGetNthPtr);
#endif
- if (!PyArg_ParseTuple(_args, "lO&i",
- &index,
- PyMac_GetOSType, &desiredType,
- &dataPtr__in_len__))
- return NULL;
- if ((dataPtr__out__ = malloc(dataPtr__in_len__)) == NULL)
- {
- PyErr_NoMemory();
- goto dataPtr__error__;
- }
- dataPtr__len__ = dataPtr__in_len__;
- _err = AEGetNthPtr(&_self->ob_itself,
- index,
- desiredType,
- &theAEKeyword,
- &typeCode,
- dataPtr__out__, dataPtr__len__, &dataPtr__len__);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&O&s#",
- PyMac_BuildOSType, theAEKeyword,
- PyMac_BuildOSType, typeCode,
- dataPtr__out__, (int)dataPtr__len__);
- free(dataPtr__out__);
+ if (!PyArg_ParseTuple(_args, "lO&i",
+ &index,
+ PyMac_GetOSType, &desiredType,
+ &dataPtr__in_len__))
+ return NULL;
+ if ((dataPtr__out__ = malloc(dataPtr__in_len__)) == NULL)
+ {
+ PyErr_NoMemory();
+ goto dataPtr__error__;
+ }
+ dataPtr__len__ = dataPtr__in_len__;
+ _err = AEGetNthPtr(&_self->ob_itself,
+ index,
+ desiredType,
+ &theAEKeyword,
+ &typeCode,
+ dataPtr__out__, dataPtr__len__, &dataPtr__len__);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&O&s#",
+ PyMac_BuildOSType, theAEKeyword,
+ PyMac_BuildOSType, typeCode,
+ dataPtr__out__, (int)dataPtr__len__);
+ free(dataPtr__out__);
dataPtr__error__: ;
- return _res;
+ return _res;
}
static PyObject *AEDesc_AEGetNthDesc(AEDescObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- long index;
- DescType desiredType;
- AEKeyword theAEKeyword;
- AEDesc result;
+ PyObject *_res = NULL;
+ OSErr _err;
+ long index;
+ DescType desiredType;
+ AEKeyword theAEKeyword;
+ AEDesc result;
#ifndef AEGetNthDesc
- PyMac_PRECHECK(AEGetNthDesc);
+ PyMac_PRECHECK(AEGetNthDesc);
#endif
- if (!PyArg_ParseTuple(_args, "lO&",
- &index,
- PyMac_GetOSType, &desiredType))
- return NULL;
- _err = AEGetNthDesc(&_self->ob_itself,
- index,
- desiredType,
- &theAEKeyword,
- &result);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&O&",
- PyMac_BuildOSType, theAEKeyword,
- AEDesc_New, &result);
- return _res;
+ if (!PyArg_ParseTuple(_args, "lO&",
+ &index,
+ PyMac_GetOSType, &desiredType))
+ return NULL;
+ _err = AEGetNthDesc(&_self->ob_itself,
+ index,
+ desiredType,
+ &theAEKeyword,
+ &result);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&O&",
+ PyMac_BuildOSType, theAEKeyword,
+ AEDesc_New, &result);
+ return _res;
}
static PyObject *AEDesc_AESizeOfNthItem(AEDescObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- long index;
- DescType typeCode;
- Size dataSize;
+ PyObject *_res = NULL;
+ OSErr _err;
+ long index;
+ DescType typeCode;
+ Size dataSize;
#ifndef AESizeOfNthItem
- PyMac_PRECHECK(AESizeOfNthItem);
+ PyMac_PRECHECK(AESizeOfNthItem);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &index))
- return NULL;
- _err = AESizeOfNthItem(&_self->ob_itself,
- index,
- &typeCode,
- &dataSize);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&l",
- PyMac_BuildOSType, typeCode,
- dataSize);
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &index))
+ return NULL;
+ _err = AESizeOfNthItem(&_self->ob_itself,
+ index,
+ &typeCode,
+ &dataSize);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&l",
+ PyMac_BuildOSType, typeCode,
+ dataSize);
+ return _res;
}
static PyObject *AEDesc_AEDeleteItem(AEDescObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- long index;
+ PyObject *_res = NULL;
+ OSErr _err;
+ long index;
#ifndef AEDeleteItem
- PyMac_PRECHECK(AEDeleteItem);
+ PyMac_PRECHECK(AEDeleteItem);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &index))
- return NULL;
- _err = AEDeleteItem(&_self->ob_itself,
- index);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &index))
+ return NULL;
+ _err = AEDeleteItem(&_self->ob_itself,
+ index);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *AEDesc_AEPutParamPtr(AEDescObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- AEKeyword theAEKeyword;
- DescType typeCode;
- char *dataPtr__in__;
- long dataPtr__len__;
- int dataPtr__in_len__;
+ PyObject *_res = NULL;
+ OSErr _err;
+ AEKeyword theAEKeyword;
+ DescType typeCode;
+ char *dataPtr__in__;
+ long dataPtr__len__;
+ int dataPtr__in_len__;
#ifndef AEPutParamPtr
- PyMac_PRECHECK(AEPutParamPtr);
+ PyMac_PRECHECK(AEPutParamPtr);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&s#",
- PyMac_GetOSType, &theAEKeyword,
- PyMac_GetOSType, &typeCode,
- &dataPtr__in__, &dataPtr__in_len__))
- return NULL;
- dataPtr__len__ = dataPtr__in_len__;
- _err = AEPutParamPtr(&_self->ob_itself,
- theAEKeyword,
- typeCode,
- dataPtr__in__, dataPtr__len__);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&s#",
+ PyMac_GetOSType, &theAEKeyword,
+ PyMac_GetOSType, &typeCode,
+ &dataPtr__in__, &dataPtr__in_len__))
+ return NULL;
+ dataPtr__len__ = dataPtr__in_len__;
+ _err = AEPutParamPtr(&_self->ob_itself,
+ theAEKeyword,
+ typeCode,
+ dataPtr__in__, dataPtr__len__);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *AEDesc_AEPutParamDesc(AEDescObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- AEKeyword theAEKeyword;
- AEDesc theAEDesc;
+ PyObject *_res = NULL;
+ OSErr _err;
+ AEKeyword theAEKeyword;
+ AEDesc theAEDesc;
#ifndef AEPutParamDesc
- PyMac_PRECHECK(AEPutParamDesc);
+ PyMac_PRECHECK(AEPutParamDesc);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- PyMac_GetOSType, &theAEKeyword,
- AEDesc_Convert, &theAEDesc))
- return NULL;
- _err = AEPutParamDesc(&_self->ob_itself,
- theAEKeyword,
- &theAEDesc);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ PyMac_GetOSType, &theAEKeyword,
+ AEDesc_Convert, &theAEDesc))
+ return NULL;
+ _err = AEPutParamDesc(&_self->ob_itself,
+ theAEKeyword,
+ &theAEDesc);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *AEDesc_AEGetParamPtr(AEDescObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- AEKeyword theAEKeyword;
- DescType desiredType;
- DescType typeCode;
- char *dataPtr__out__;
- long dataPtr__len__;
- int dataPtr__in_len__;
+ PyObject *_res = NULL;
+ OSErr _err;
+ AEKeyword theAEKeyword;
+ DescType desiredType;
+ DescType typeCode;
+ char *dataPtr__out__;
+ long dataPtr__len__;
+ int dataPtr__in_len__;
#ifndef AEGetParamPtr
- PyMac_PRECHECK(AEGetParamPtr);
+ PyMac_PRECHECK(AEGetParamPtr);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&i",
- PyMac_GetOSType, &theAEKeyword,
- PyMac_GetOSType, &desiredType,
- &dataPtr__in_len__))
- return NULL;
- if ((dataPtr__out__ = malloc(dataPtr__in_len__)) == NULL)
- {
- PyErr_NoMemory();
- goto dataPtr__error__;
- }
- dataPtr__len__ = dataPtr__in_len__;
- _err = AEGetParamPtr(&_self->ob_itself,
- theAEKeyword,
- desiredType,
- &typeCode,
- dataPtr__out__, dataPtr__len__, &dataPtr__len__);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&s#",
- PyMac_BuildOSType, typeCode,
- dataPtr__out__, (int)dataPtr__len__);
- free(dataPtr__out__);
+ if (!PyArg_ParseTuple(_args, "O&O&i",
+ PyMac_GetOSType, &theAEKeyword,
+ PyMac_GetOSType, &desiredType,
+ &dataPtr__in_len__))
+ return NULL;
+ if ((dataPtr__out__ = malloc(dataPtr__in_len__)) == NULL)
+ {
+ PyErr_NoMemory();
+ goto dataPtr__error__;
+ }
+ dataPtr__len__ = dataPtr__in_len__;
+ _err = AEGetParamPtr(&_self->ob_itself,
+ theAEKeyword,
+ desiredType,
+ &typeCode,
+ dataPtr__out__, dataPtr__len__, &dataPtr__len__);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&s#",
+ PyMac_BuildOSType, typeCode,
+ dataPtr__out__, (int)dataPtr__len__);
+ free(dataPtr__out__);
dataPtr__error__: ;
- return _res;
+ return _res;
}
static PyObject *AEDesc_AEGetParamDesc(AEDescObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- AEKeyword theAEKeyword;
- DescType desiredType;
- AEDesc result;
+ PyObject *_res = NULL;
+ OSErr _err;
+ AEKeyword theAEKeyword;
+ DescType desiredType;
+ AEDesc result;
#ifndef AEGetParamDesc
- PyMac_PRECHECK(AEGetParamDesc);
+ PyMac_PRECHECK(AEGetParamDesc);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- PyMac_GetOSType, &theAEKeyword,
- PyMac_GetOSType, &desiredType))
- return NULL;
- _err = AEGetParamDesc(&_self->ob_itself,
- theAEKeyword,
- desiredType,
- &result);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- AEDesc_New, &result);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ PyMac_GetOSType, &theAEKeyword,
+ PyMac_GetOSType, &desiredType))
+ return NULL;
+ _err = AEGetParamDesc(&_self->ob_itself,
+ theAEKeyword,
+ desiredType,
+ &result);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ AEDesc_New, &result);
+ return _res;
}
static PyObject *AEDesc_AESizeOfParam(AEDescObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- AEKeyword theAEKeyword;
- DescType typeCode;
- Size dataSize;
+ PyObject *_res = NULL;
+ OSErr _err;
+ AEKeyword theAEKeyword;
+ DescType typeCode;
+ Size dataSize;
#ifndef AESizeOfParam
- PyMac_PRECHECK(AESizeOfParam);
+ PyMac_PRECHECK(AESizeOfParam);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetOSType, &theAEKeyword))
- return NULL;
- _err = AESizeOfParam(&_self->ob_itself,
- theAEKeyword,
- &typeCode,
- &dataSize);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&l",
- PyMac_BuildOSType, typeCode,
- dataSize);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetOSType, &theAEKeyword))
+ return NULL;
+ _err = AESizeOfParam(&_self->ob_itself,
+ theAEKeyword,
+ &typeCode,
+ &dataSize);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&l",
+ PyMac_BuildOSType, typeCode,
+ dataSize);
+ return _res;
}
static PyObject *AEDesc_AEDeleteParam(AEDescObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- AEKeyword theAEKeyword;
+ PyObject *_res = NULL;
+ OSErr _err;
+ AEKeyword theAEKeyword;
#ifndef AEDeleteParam
- PyMac_PRECHECK(AEDeleteParam);
+ PyMac_PRECHECK(AEDeleteParam);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetOSType, &theAEKeyword))
- return NULL;
- _err = AEDeleteParam(&_self->ob_itself,
- theAEKeyword);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetOSType, &theAEKeyword))
+ return NULL;
+ _err = AEDeleteParam(&_self->ob_itself,
+ theAEKeyword);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *AEDesc_AEGetAttributePtr(AEDescObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- AEKeyword theAEKeyword;
- DescType desiredType;
- DescType typeCode;
- char *dataPtr__out__;
- long dataPtr__len__;
- int dataPtr__in_len__;
+ PyObject *_res = NULL;
+ OSErr _err;
+ AEKeyword theAEKeyword;
+ DescType desiredType;
+ DescType typeCode;
+ char *dataPtr__out__;
+ long dataPtr__len__;
+ int dataPtr__in_len__;
#ifndef AEGetAttributePtr
- PyMac_PRECHECK(AEGetAttributePtr);
+ PyMac_PRECHECK(AEGetAttributePtr);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&i",
- PyMac_GetOSType, &theAEKeyword,
- PyMac_GetOSType, &desiredType,
- &dataPtr__in_len__))
- return NULL;
- if ((dataPtr__out__ = malloc(dataPtr__in_len__)) == NULL)
- {
- PyErr_NoMemory();
- goto dataPtr__error__;
- }
- dataPtr__len__ = dataPtr__in_len__;
- _err = AEGetAttributePtr(&_self->ob_itself,
- theAEKeyword,
- desiredType,
- &typeCode,
- dataPtr__out__, dataPtr__len__, &dataPtr__len__);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&s#",
- PyMac_BuildOSType, typeCode,
- dataPtr__out__, (int)dataPtr__len__);
- free(dataPtr__out__);
+ if (!PyArg_ParseTuple(_args, "O&O&i",
+ PyMac_GetOSType, &theAEKeyword,
+ PyMac_GetOSType, &desiredType,
+ &dataPtr__in_len__))
+ return NULL;
+ if ((dataPtr__out__ = malloc(dataPtr__in_len__)) == NULL)
+ {
+ PyErr_NoMemory();
+ goto dataPtr__error__;
+ }
+ dataPtr__len__ = dataPtr__in_len__;
+ _err = AEGetAttributePtr(&_self->ob_itself,
+ theAEKeyword,
+ desiredType,
+ &typeCode,
+ dataPtr__out__, dataPtr__len__, &dataPtr__len__);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&s#",
+ PyMac_BuildOSType, typeCode,
+ dataPtr__out__, (int)dataPtr__len__);
+ free(dataPtr__out__);
dataPtr__error__: ;
- return _res;
+ return _res;
}
static PyObject *AEDesc_AEGetAttributeDesc(AEDescObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- AEKeyword theAEKeyword;
- DescType desiredType;
- AEDesc result;
+ PyObject *_res = NULL;
+ OSErr _err;
+ AEKeyword theAEKeyword;
+ DescType desiredType;
+ AEDesc result;
#ifndef AEGetAttributeDesc
- PyMac_PRECHECK(AEGetAttributeDesc);
+ PyMac_PRECHECK(AEGetAttributeDesc);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- PyMac_GetOSType, &theAEKeyword,
- PyMac_GetOSType, &desiredType))
- return NULL;
- _err = AEGetAttributeDesc(&_self->ob_itself,
- theAEKeyword,
- desiredType,
- &result);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- AEDesc_New, &result);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ PyMac_GetOSType, &theAEKeyword,
+ PyMac_GetOSType, &desiredType))
+ return NULL;
+ _err = AEGetAttributeDesc(&_self->ob_itself,
+ theAEKeyword,
+ desiredType,
+ &result);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ AEDesc_New, &result);
+ return _res;
}
static PyObject *AEDesc_AESizeOfAttribute(AEDescObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- AEKeyword theAEKeyword;
- DescType typeCode;
- Size dataSize;
+ PyObject *_res = NULL;
+ OSErr _err;
+ AEKeyword theAEKeyword;
+ DescType typeCode;
+ Size dataSize;
#ifndef AESizeOfAttribute
- PyMac_PRECHECK(AESizeOfAttribute);
+ PyMac_PRECHECK(AESizeOfAttribute);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetOSType, &theAEKeyword))
- return NULL;
- _err = AESizeOfAttribute(&_self->ob_itself,
- theAEKeyword,
- &typeCode,
- &dataSize);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&l",
- PyMac_BuildOSType, typeCode,
- dataSize);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetOSType, &theAEKeyword))
+ return NULL;
+ _err = AESizeOfAttribute(&_self->ob_itself,
+ theAEKeyword,
+ &typeCode,
+ &dataSize);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&l",
+ PyMac_BuildOSType, typeCode,
+ dataSize);
+ return _res;
}
static PyObject *AEDesc_AEPutAttributePtr(AEDescObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- AEKeyword theAEKeyword;
- DescType typeCode;
- char *dataPtr__in__;
- long dataPtr__len__;
- int dataPtr__in_len__;
+ PyObject *_res = NULL;
+ OSErr _err;
+ AEKeyword theAEKeyword;
+ DescType typeCode;
+ char *dataPtr__in__;
+ long dataPtr__len__;
+ int dataPtr__in_len__;
#ifndef AEPutAttributePtr
- PyMac_PRECHECK(AEPutAttributePtr);
+ PyMac_PRECHECK(AEPutAttributePtr);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&s#",
- PyMac_GetOSType, &theAEKeyword,
- PyMac_GetOSType, &typeCode,
- &dataPtr__in__, &dataPtr__in_len__))
- return NULL;
- dataPtr__len__ = dataPtr__in_len__;
- _err = AEPutAttributePtr(&_self->ob_itself,
- theAEKeyword,
- typeCode,
- dataPtr__in__, dataPtr__len__);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&s#",
+ PyMac_GetOSType, &theAEKeyword,
+ PyMac_GetOSType, &typeCode,
+ &dataPtr__in__, &dataPtr__in_len__))
+ return NULL;
+ dataPtr__len__ = dataPtr__in_len__;
+ _err = AEPutAttributePtr(&_self->ob_itself,
+ theAEKeyword,
+ typeCode,
+ dataPtr__in__, dataPtr__len__);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *AEDesc_AEPutAttributeDesc(AEDescObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- AEKeyword theAEKeyword;
- AEDesc theAEDesc;
+ PyObject *_res = NULL;
+ OSErr _err;
+ AEKeyword theAEKeyword;
+ AEDesc theAEDesc;
#ifndef AEPutAttributeDesc
- PyMac_PRECHECK(AEPutAttributeDesc);
+ PyMac_PRECHECK(AEPutAttributeDesc);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- PyMac_GetOSType, &theAEKeyword,
- AEDesc_Convert, &theAEDesc))
- return NULL;
- _err = AEPutAttributeDesc(&_self->ob_itself,
- theAEKeyword,
- &theAEDesc);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ PyMac_GetOSType, &theAEKeyword,
+ AEDesc_Convert, &theAEDesc))
+ return NULL;
+ _err = AEPutAttributeDesc(&_self->ob_itself,
+ theAEKeyword,
+ &theAEDesc);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *AEDesc_AEGetDescDataSize(AEDescObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Size _rv;
+ PyObject *_res = NULL;
+ Size _rv;
#ifndef AEGetDescDataSize
- PyMac_PRECHECK(AEGetDescDataSize);
+ PyMac_PRECHECK(AEGetDescDataSize);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = AEGetDescDataSize(&_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = AEGetDescDataSize(&_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *AEDesc_AESend(AEDescObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- AppleEvent reply;
- AESendMode sendMode;
- AESendPriority sendPriority;
- long timeOutInTicks;
+ PyObject *_res = NULL;
+ OSErr _err;
+ AppleEvent reply;
+ AESendMode sendMode;
+ AESendPriority sendPriority;
+ long timeOutInTicks;
#ifndef AESend
- PyMac_PRECHECK(AESend);
+ PyMac_PRECHECK(AESend);
#endif
- if (!PyArg_ParseTuple(_args, "lhl",
- &sendMode,
- &sendPriority,
- &timeOutInTicks))
- return NULL;
- _err = AESend(&_self->ob_itself,
- &reply,
- sendMode,
- sendPriority,
- timeOutInTicks,
- upp_AEIdleProc,
- (AEFilterUPP)0);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- AEDesc_New, &reply);
- return _res;
+ if (!PyArg_ParseTuple(_args, "lhl",
+ &sendMode,
+ &sendPriority,
+ &timeOutInTicks))
+ return NULL;
+ _err = AESend(&_self->ob_itself,
+ &reply,
+ sendMode,
+ sendPriority,
+ timeOutInTicks,
+ upp_AEIdleProc,
+ (AEFilterUPP)0);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ AEDesc_New, &reply);
+ return _res;
}
static PyObject *AEDesc_AEResetTimer(AEDescObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
+ PyObject *_res = NULL;
+ OSErr _err;
#ifndef AEResetTimer
- PyMac_PRECHECK(AEResetTimer);
+ PyMac_PRECHECK(AEResetTimer);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = AEResetTimer(&_self->ob_itself);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = AEResetTimer(&_self->ob_itself);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *AEDesc_AESuspendTheCurrentEvent(AEDescObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
+ PyObject *_res = NULL;
+ OSErr _err;
#ifndef AESuspendTheCurrentEvent
- PyMac_PRECHECK(AESuspendTheCurrentEvent);
+ PyMac_PRECHECK(AESuspendTheCurrentEvent);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = AESuspendTheCurrentEvent(&_self->ob_itself);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = AESuspendTheCurrentEvent(&_self->ob_itself);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *AEDesc_AEResumeTheCurrentEvent(AEDescObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- AppleEvent reply;
- AEEventHandlerUPP dispatcher__proc__ = upp_GenericEventHandler;
- PyObject *dispatcher;
+ PyObject *_res = NULL;
+ OSErr _err;
+ AppleEvent reply;
+ AEEventHandlerUPP dispatcher__proc__ = upp_GenericEventHandler;
+ PyObject *dispatcher;
#ifndef AEResumeTheCurrentEvent
- PyMac_PRECHECK(AEResumeTheCurrentEvent);
+ PyMac_PRECHECK(AEResumeTheCurrentEvent);
#endif
- if (!PyArg_ParseTuple(_args, "O&O",
- AEDesc_Convert, &reply,
- &dispatcher))
- return NULL;
- _err = AEResumeTheCurrentEvent(&_self->ob_itself,
- &reply,
- dispatcher__proc__,
- (SRefCon)dispatcher);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- Py_INCREF(dispatcher); /* XXX leak, but needed */
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O",
+ AEDesc_Convert, &reply,
+ &dispatcher))
+ return NULL;
+ _err = AEResumeTheCurrentEvent(&_self->ob_itself,
+ &reply,
+ dispatcher__proc__,
+ (SRefCon)dispatcher);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ Py_INCREF(dispatcher); /* XXX leak, but needed */
+ return _res;
}
static PyObject *AEDesc_AEGetTheCurrentEvent(AEDescObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
+ PyObject *_res = NULL;
+ OSErr _err;
#ifndef AEGetTheCurrentEvent
- PyMac_PRECHECK(AEGetTheCurrentEvent);
+ PyMac_PRECHECK(AEGetTheCurrentEvent);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = AEGetTheCurrentEvent(&_self->ob_itself);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = AEGetTheCurrentEvent(&_self->ob_itself);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *AEDesc_AESetTheCurrentEvent(AEDescObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
+ PyObject *_res = NULL;
+ OSErr _err;
#ifndef AESetTheCurrentEvent
- PyMac_PRECHECK(AESetTheCurrentEvent);
+ PyMac_PRECHECK(AESetTheCurrentEvent);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = AESetTheCurrentEvent(&_self->ob_itself);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = AESetTheCurrentEvent(&_self->ob_itself);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *AEDesc_AEResolve(AEDescObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- short callbackFlags;
- AEDesc theToken;
+ PyObject *_res = NULL;
+ OSErr _err;
+ short callbackFlags;
+ AEDesc theToken;
#ifndef AEResolve
- PyMac_PRECHECK(AEResolve);
+ PyMac_PRECHECK(AEResolve);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &callbackFlags))
- return NULL;
- _err = AEResolve(&_self->ob_itself,
- callbackFlags,
- &theToken);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- AEDesc_New, &theToken);
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &callbackFlags))
+ return NULL;
+ _err = AEResolve(&_self->ob_itself,
+ callbackFlags,
+ &theToken);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ AEDesc_New, &theToken);
+ return _res;
}
static PyObject *AEDesc_AutoDispose(AEDescObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
- int onoff, old;
- if (!PyArg_ParseTuple(_args, "i", &onoff))
- return NULL;
- old = _self->ob_owned;
- _self->ob_owned = onoff;
- _res = Py_BuildValue("i", old);
- return _res;
+ int onoff, old;
+ if (!PyArg_ParseTuple(_args, "i", &onoff))
+ return NULL;
+ old = _self->ob_owned;
+ _self->ob_owned = onoff;
+ _res = Py_BuildValue("i", old);
+ return _res;
}
static PyMethodDef AEDesc_methods[] = {
- {"AECoerceDesc", (PyCFunction)AEDesc_AECoerceDesc, 1,
- PyDoc_STR("(DescType toType) -> (AEDesc result)")},
- {"AEDuplicateDesc", (PyCFunction)AEDesc_AEDuplicateDesc, 1,
- PyDoc_STR("() -> (AEDesc result)")},
- {"AECountItems", (PyCFunction)AEDesc_AECountItems, 1,
- PyDoc_STR("() -> (long theCount)")},
- {"AEPutPtr", (PyCFunction)AEDesc_AEPutPtr, 1,
- PyDoc_STR("(long index, DescType typeCode, Buffer dataPtr) -> None")},
- {"AEPutDesc", (PyCFunction)AEDesc_AEPutDesc, 1,
- PyDoc_STR("(long index, AEDesc theAEDesc) -> None")},
- {"AEGetNthPtr", (PyCFunction)AEDesc_AEGetNthPtr, 1,
- PyDoc_STR("(long index, DescType desiredType, Buffer dataPtr) -> (AEKeyword theAEKeyword, DescType typeCode, Buffer dataPtr)")},
- {"AEGetNthDesc", (PyCFunction)AEDesc_AEGetNthDesc, 1,
- PyDoc_STR("(long index, DescType desiredType) -> (AEKeyword theAEKeyword, AEDesc result)")},
- {"AESizeOfNthItem", (PyCFunction)AEDesc_AESizeOfNthItem, 1,
- PyDoc_STR("(long index) -> (DescType typeCode, Size dataSize)")},
- {"AEDeleteItem", (PyCFunction)AEDesc_AEDeleteItem, 1,
- PyDoc_STR("(long index) -> None")},
- {"AEPutParamPtr", (PyCFunction)AEDesc_AEPutParamPtr, 1,
- PyDoc_STR("(AEKeyword theAEKeyword, DescType typeCode, Buffer dataPtr) -> None")},
- {"AEPutParamDesc", (PyCFunction)AEDesc_AEPutParamDesc, 1,
- PyDoc_STR("(AEKeyword theAEKeyword, AEDesc theAEDesc) -> None")},
- {"AEGetParamPtr", (PyCFunction)AEDesc_AEGetParamPtr, 1,
- PyDoc_STR("(AEKeyword theAEKeyword, DescType desiredType, Buffer dataPtr) -> (DescType typeCode, Buffer dataPtr)")},
- {"AEGetParamDesc", (PyCFunction)AEDesc_AEGetParamDesc, 1,
- PyDoc_STR("(AEKeyword theAEKeyword, DescType desiredType) -> (AEDesc result)")},
- {"AESizeOfParam", (PyCFunction)AEDesc_AESizeOfParam, 1,
- PyDoc_STR("(AEKeyword theAEKeyword) -> (DescType typeCode, Size dataSize)")},
- {"AEDeleteParam", (PyCFunction)AEDesc_AEDeleteParam, 1,
- PyDoc_STR("(AEKeyword theAEKeyword) -> None")},
- {"AEGetAttributePtr", (PyCFunction)AEDesc_AEGetAttributePtr, 1,
- PyDoc_STR("(AEKeyword theAEKeyword, DescType desiredType, Buffer dataPtr) -> (DescType typeCode, Buffer dataPtr)")},
- {"AEGetAttributeDesc", (PyCFunction)AEDesc_AEGetAttributeDesc, 1,
- PyDoc_STR("(AEKeyword theAEKeyword, DescType desiredType) -> (AEDesc result)")},
- {"AESizeOfAttribute", (PyCFunction)AEDesc_AESizeOfAttribute, 1,
- PyDoc_STR("(AEKeyword theAEKeyword) -> (DescType typeCode, Size dataSize)")},
- {"AEPutAttributePtr", (PyCFunction)AEDesc_AEPutAttributePtr, 1,
- PyDoc_STR("(AEKeyword theAEKeyword, DescType typeCode, Buffer dataPtr) -> None")},
- {"AEPutAttributeDesc", (PyCFunction)AEDesc_AEPutAttributeDesc, 1,
- PyDoc_STR("(AEKeyword theAEKeyword, AEDesc theAEDesc) -> None")},
- {"AEGetDescDataSize", (PyCFunction)AEDesc_AEGetDescDataSize, 1,
- PyDoc_STR("() -> (Size _rv)")},
- {"AESend", (PyCFunction)AEDesc_AESend, 1,
- PyDoc_STR("(AESendMode sendMode, AESendPriority sendPriority, long timeOutInTicks) -> (AppleEvent reply)")},
- {"AEResetTimer", (PyCFunction)AEDesc_AEResetTimer, 1,
- PyDoc_STR("() -> None")},
- {"AESuspendTheCurrentEvent", (PyCFunction)AEDesc_AESuspendTheCurrentEvent, 1,
- PyDoc_STR("() -> None")},
- {"AEResumeTheCurrentEvent", (PyCFunction)AEDesc_AEResumeTheCurrentEvent, 1,
- PyDoc_STR("(AppleEvent reply, EventHandler dispatcher) -> None")},
- {"AEGetTheCurrentEvent", (PyCFunction)AEDesc_AEGetTheCurrentEvent, 1,
- PyDoc_STR("() -> None")},
- {"AESetTheCurrentEvent", (PyCFunction)AEDesc_AESetTheCurrentEvent, 1,
- PyDoc_STR("() -> None")},
- {"AEResolve", (PyCFunction)AEDesc_AEResolve, 1,
- PyDoc_STR("(short callbackFlags) -> (AEDesc theToken)")},
- {"AutoDispose", (PyCFunction)AEDesc_AutoDispose, 1,
- PyDoc_STR("(int)->int. Automatically AEDisposeDesc the object on Python object cleanup")},
- {NULL, NULL, 0}
+ {"AECoerceDesc", (PyCFunction)AEDesc_AECoerceDesc, 1,
+ PyDoc_STR("(DescType toType) -> (AEDesc result)")},
+ {"AEDuplicateDesc", (PyCFunction)AEDesc_AEDuplicateDesc, 1,
+ PyDoc_STR("() -> (AEDesc result)")},
+ {"AECountItems", (PyCFunction)AEDesc_AECountItems, 1,
+ PyDoc_STR("() -> (long theCount)")},
+ {"AEPutPtr", (PyCFunction)AEDesc_AEPutPtr, 1,
+ PyDoc_STR("(long index, DescType typeCode, Buffer dataPtr) -> None")},
+ {"AEPutDesc", (PyCFunction)AEDesc_AEPutDesc, 1,
+ PyDoc_STR("(long index, AEDesc theAEDesc) -> None")},
+ {"AEGetNthPtr", (PyCFunction)AEDesc_AEGetNthPtr, 1,
+ PyDoc_STR("(long index, DescType desiredType, Buffer dataPtr) -> (AEKeyword theAEKeyword, DescType typeCode, Buffer dataPtr)")},
+ {"AEGetNthDesc", (PyCFunction)AEDesc_AEGetNthDesc, 1,
+ PyDoc_STR("(long index, DescType desiredType) -> (AEKeyword theAEKeyword, AEDesc result)")},
+ {"AESizeOfNthItem", (PyCFunction)AEDesc_AESizeOfNthItem, 1,
+ PyDoc_STR("(long index) -> (DescType typeCode, Size dataSize)")},
+ {"AEDeleteItem", (PyCFunction)AEDesc_AEDeleteItem, 1,
+ PyDoc_STR("(long index) -> None")},
+ {"AEPutParamPtr", (PyCFunction)AEDesc_AEPutParamPtr, 1,
+ PyDoc_STR("(AEKeyword theAEKeyword, DescType typeCode, Buffer dataPtr) -> None")},
+ {"AEPutParamDesc", (PyCFunction)AEDesc_AEPutParamDesc, 1,
+ PyDoc_STR("(AEKeyword theAEKeyword, AEDesc theAEDesc) -> None")},
+ {"AEGetParamPtr", (PyCFunction)AEDesc_AEGetParamPtr, 1,
+ PyDoc_STR("(AEKeyword theAEKeyword, DescType desiredType, Buffer dataPtr) -> (DescType typeCode, Buffer dataPtr)")},
+ {"AEGetParamDesc", (PyCFunction)AEDesc_AEGetParamDesc, 1,
+ PyDoc_STR("(AEKeyword theAEKeyword, DescType desiredType) -> (AEDesc result)")},
+ {"AESizeOfParam", (PyCFunction)AEDesc_AESizeOfParam, 1,
+ PyDoc_STR("(AEKeyword theAEKeyword) -> (DescType typeCode, Size dataSize)")},
+ {"AEDeleteParam", (PyCFunction)AEDesc_AEDeleteParam, 1,
+ PyDoc_STR("(AEKeyword theAEKeyword) -> None")},
+ {"AEGetAttributePtr", (PyCFunction)AEDesc_AEGetAttributePtr, 1,
+ PyDoc_STR("(AEKeyword theAEKeyword, DescType desiredType, Buffer dataPtr) -> (DescType typeCode, Buffer dataPtr)")},
+ {"AEGetAttributeDesc", (PyCFunction)AEDesc_AEGetAttributeDesc, 1,
+ PyDoc_STR("(AEKeyword theAEKeyword, DescType desiredType) -> (AEDesc result)")},
+ {"AESizeOfAttribute", (PyCFunction)AEDesc_AESizeOfAttribute, 1,
+ PyDoc_STR("(AEKeyword theAEKeyword) -> (DescType typeCode, Size dataSize)")},
+ {"AEPutAttributePtr", (PyCFunction)AEDesc_AEPutAttributePtr, 1,
+ PyDoc_STR("(AEKeyword theAEKeyword, DescType typeCode, Buffer dataPtr) -> None")},
+ {"AEPutAttributeDesc", (PyCFunction)AEDesc_AEPutAttributeDesc, 1,
+ PyDoc_STR("(AEKeyword theAEKeyword, AEDesc theAEDesc) -> None")},
+ {"AEGetDescDataSize", (PyCFunction)AEDesc_AEGetDescDataSize, 1,
+ PyDoc_STR("() -> (Size _rv)")},
+ {"AESend", (PyCFunction)AEDesc_AESend, 1,
+ PyDoc_STR("(AESendMode sendMode, AESendPriority sendPriority, long timeOutInTicks) -> (AppleEvent reply)")},
+ {"AEResetTimer", (PyCFunction)AEDesc_AEResetTimer, 1,
+ PyDoc_STR("() -> None")},
+ {"AESuspendTheCurrentEvent", (PyCFunction)AEDesc_AESuspendTheCurrentEvent, 1,
+ PyDoc_STR("() -> None")},
+ {"AEResumeTheCurrentEvent", (PyCFunction)AEDesc_AEResumeTheCurrentEvent, 1,
+ PyDoc_STR("(AppleEvent reply, EventHandler dispatcher) -> None")},
+ {"AEGetTheCurrentEvent", (PyCFunction)AEDesc_AEGetTheCurrentEvent, 1,
+ PyDoc_STR("() -> None")},
+ {"AESetTheCurrentEvent", (PyCFunction)AEDesc_AESetTheCurrentEvent, 1,
+ PyDoc_STR("() -> None")},
+ {"AEResolve", (PyCFunction)AEDesc_AEResolve, 1,
+ PyDoc_STR("(short callbackFlags) -> (AEDesc theToken)")},
+ {"AutoDispose", (PyCFunction)AEDesc_AutoDispose, 1,
+ PyDoc_STR("(int)->int. Automatically AEDisposeDesc the object on Python object cleanup")},
+ {NULL, NULL, 0}
};
static PyObject *AEDesc_get_type(AEDescObject *self, void *closure)
{
- return PyMac_BuildOSType(self->ob_itself.descriptorType);
+ return PyMac_BuildOSType(self->ob_itself.descriptorType);
}
#define AEDesc_set_type NULL
static PyObject *AEDesc_get_data(AEDescObject *self, void *closure)
{
- PyObject *res;
- Size size;
- char *ptr;
- OSErr err;
-
- size = AEGetDescDataSize(&self->ob_itself);
- if ( (res = PyString_FromStringAndSize(NULL, size)) == NULL )
- return NULL;
- if ( (ptr = PyString_AsString(res)) == NULL )
- return NULL;
- if ( (err=AEGetDescData(&self->ob_itself, ptr, size)) < 0 )
- return PyMac_Error(err);
- return res;
+ PyObject *res;
+ Size size;
+ char *ptr;
+ OSErr err;
+
+ size = AEGetDescDataSize(&self->ob_itself);
+ if ( (res = PyString_FromStringAndSize(NULL, size)) == NULL )
+ return NULL;
+ if ( (ptr = PyString_AsString(res)) == NULL )
+ return NULL;
+ if ( (err=AEGetDescData(&self->ob_itself, ptr, size)) < 0 )
+ return PyMac_Error(err);
+ return res;
}
#define AEDesc_set_data NULL
static PyGetSetDef AEDesc_getsetlist[] = {
- {"type", (getter)AEDesc_get_type, (setter)AEDesc_set_type, "Type of this AEDesc"},
- {"data", (getter)AEDesc_get_data, (setter)AEDesc_set_data, "The raw data in this AEDesc"},
- {NULL, NULL, NULL, NULL},
+ {"type", (getter)AEDesc_get_type, (setter)AEDesc_set_type, "Type of this AEDesc"},
+ {"data", (getter)AEDesc_get_data, (setter)AEDesc_set_data, "The raw data in this AEDesc"},
+ {NULL, NULL, NULL, NULL},
};
@@ -869,61 +869,61 @@ static PyGetSetDef AEDesc_getsetlist[] = {
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;
+ 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 = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
- "_AE.AEDesc", /*tp_name*/
- sizeof(AEDescObject), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- /* methods */
- (destructor) AEDesc_dealloc, /*tp_dealloc*/
- 0, /*tp_print*/
- (getattrfunc)0, /*tp_getattr*/
- (setattrfunc)0, /*tp_setattr*/
- (cmpfunc) AEDesc_compare, /*tp_compare*/
- (reprfunc) AEDesc_repr, /*tp_repr*/
- (PyNumberMethods *)0, /* tp_as_number */
- (PySequenceMethods *)0, /* tp_as_sequence */
- (PyMappingMethods *)0, /* tp_as_mapping */
- (hashfunc) AEDesc_hash, /*tp_hash*/
- 0, /*tp_call*/
- 0, /*tp_str*/
- PyObject_GenericGetAttr, /*tp_getattro*/
- PyObject_GenericSetAttr, /*tp_setattro */
- 0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
- 0, /*tp_doc*/
- 0, /*tp_traverse*/
- 0, /*tp_clear*/
- 0, /*tp_richcompare*/
- 0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
- 0, /*tp_iternext*/
- AEDesc_methods, /* tp_methods */
- 0, /*tp_members*/
- AEDesc_getsetlist, /*tp_getset*/
- 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 */
+ PyObject_HEAD_INIT(NULL)
+ 0, /*ob_size*/
+ "_AE.AEDesc", /*tp_name*/
+ sizeof(AEDescObject), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ /* methods */
+ (destructor) AEDesc_dealloc, /*tp_dealloc*/
+ 0, /*tp_print*/
+ (getattrfunc)0, /*tp_getattr*/
+ (setattrfunc)0, /*tp_setattr*/
+ (cmpfunc) AEDesc_compare, /*tp_compare*/
+ (reprfunc) AEDesc_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) AEDesc_hash, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ PyObject_GenericGetAttr, /*tp_getattro*/
+ PyObject_GenericSetAttr, /*tp_setattro */
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
+ 0, /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ AEDesc_methods, /* tp_methods */
+ 0, /*tp_members*/
+ AEDesc_getsetlist, /*tp_getset*/
+ 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 --------------------- */
@@ -931,455 +931,455 @@ PyTypeObject AEDesc_Type = {
static PyObject *AE_AECoercePtr(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- DescType typeCode;
- char *dataPtr__in__;
- long dataPtr__len__;
- int dataPtr__in_len__;
- DescType toType;
- AEDesc result;
+ PyObject *_res = NULL;
+ OSErr _err;
+ DescType typeCode;
+ char *dataPtr__in__;
+ long dataPtr__len__;
+ int dataPtr__in_len__;
+ DescType toType;
+ AEDesc result;
#ifndef AECoercePtr
- PyMac_PRECHECK(AECoercePtr);
+ PyMac_PRECHECK(AECoercePtr);
#endif
- if (!PyArg_ParseTuple(_args, "O&s#O&",
- PyMac_GetOSType, &typeCode,
- &dataPtr__in__, &dataPtr__in_len__,
- PyMac_GetOSType, &toType))
- return NULL;
- dataPtr__len__ = dataPtr__in_len__;
- _err = AECoercePtr(typeCode,
- dataPtr__in__, dataPtr__len__,
- toType,
- &result);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- AEDesc_New, &result);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&s#O&",
+ PyMac_GetOSType, &typeCode,
+ &dataPtr__in__, &dataPtr__in_len__,
+ PyMac_GetOSType, &toType))
+ return NULL;
+ dataPtr__len__ = dataPtr__in_len__;
+ _err = AECoercePtr(typeCode,
+ dataPtr__in__, dataPtr__len__,
+ toType,
+ &result);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ AEDesc_New, &result);
+ return _res;
}
static PyObject *AE_AECreateDesc(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- DescType typeCode;
- char *dataPtr__in__;
- long dataPtr__len__;
- int dataPtr__in_len__;
- AEDesc result;
+ PyObject *_res = NULL;
+ OSErr _err;
+ DescType typeCode;
+ char *dataPtr__in__;
+ long dataPtr__len__;
+ int dataPtr__in_len__;
+ AEDesc result;
#ifndef AECreateDesc
- PyMac_PRECHECK(AECreateDesc);
+ PyMac_PRECHECK(AECreateDesc);
#endif
- if (!PyArg_ParseTuple(_args, "O&s#",
- PyMac_GetOSType, &typeCode,
- &dataPtr__in__, &dataPtr__in_len__))
- return NULL;
- dataPtr__len__ = dataPtr__in_len__;
- _err = AECreateDesc(typeCode,
- dataPtr__in__, dataPtr__len__,
- &result);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- AEDesc_New, &result);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&s#",
+ PyMac_GetOSType, &typeCode,
+ &dataPtr__in__, &dataPtr__in_len__))
+ return NULL;
+ dataPtr__len__ = dataPtr__in_len__;
+ _err = AECreateDesc(typeCode,
+ dataPtr__in__, dataPtr__len__,
+ &result);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ AEDesc_New, &result);
+ return _res;
}
static PyObject *AE_AECreateList(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- char *factoringPtr__in__;
- long factoringPtr__len__;
- int factoringPtr__in_len__;
- Boolean isRecord;
- AEDescList resultList;
+ PyObject *_res = NULL;
+ OSErr _err;
+ char *factoringPtr__in__;
+ long factoringPtr__len__;
+ int factoringPtr__in_len__;
+ Boolean isRecord;
+ AEDescList resultList;
#ifndef AECreateList
- PyMac_PRECHECK(AECreateList);
+ PyMac_PRECHECK(AECreateList);
#endif
- if (!PyArg_ParseTuple(_args, "s#b",
- &factoringPtr__in__, &factoringPtr__in_len__,
- &isRecord))
- return NULL;
- factoringPtr__len__ = factoringPtr__in_len__;
- _err = AECreateList(factoringPtr__in__, factoringPtr__len__,
- isRecord,
- &resultList);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- AEDesc_New, &resultList);
- return _res;
+ if (!PyArg_ParseTuple(_args, "s#b",
+ &factoringPtr__in__, &factoringPtr__in_len__,
+ &isRecord))
+ return NULL;
+ factoringPtr__len__ = factoringPtr__in_len__;
+ _err = AECreateList(factoringPtr__in__, factoringPtr__len__,
+ isRecord,
+ &resultList);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ AEDesc_New, &resultList);
+ return _res;
}
static PyObject *AE_AECreateAppleEvent(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- AEEventClass theAEEventClass;
- AEEventID theAEEventID;
- AEAddressDesc target;
- AEReturnID returnID;
- AETransactionID transactionID;
- AppleEvent result;
+ PyObject *_res = NULL;
+ OSErr _err;
+ AEEventClass theAEEventClass;
+ AEEventID theAEEventID;
+ AEAddressDesc target;
+ AEReturnID returnID;
+ AETransactionID transactionID;
+ AppleEvent result;
#ifndef AECreateAppleEvent
- PyMac_PRECHECK(AECreateAppleEvent);
+ PyMac_PRECHECK(AECreateAppleEvent);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&hl",
- PyMac_GetOSType, &theAEEventClass,
- PyMac_GetOSType, &theAEEventID,
- AEDesc_Convert, &target,
- &returnID,
- &transactionID))
- return NULL;
- _err = AECreateAppleEvent(theAEEventClass,
- theAEEventID,
- &target,
- returnID,
- transactionID,
- &result);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- AEDesc_New, &result);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&O&hl",
+ PyMac_GetOSType, &theAEEventClass,
+ PyMac_GetOSType, &theAEEventID,
+ AEDesc_Convert, &target,
+ &returnID,
+ &transactionID))
+ return NULL;
+ _err = AECreateAppleEvent(theAEEventClass,
+ theAEEventID,
+ &target,
+ returnID,
+ transactionID,
+ &result);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ AEDesc_New, &result);
+ return _res;
}
static PyObject *AE_AEReplaceDescData(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- DescType typeCode;
- char *dataPtr__in__;
- long dataPtr__len__;
- int dataPtr__in_len__;
- AEDesc theAEDesc;
+ PyObject *_res = NULL;
+ OSErr _err;
+ DescType typeCode;
+ char *dataPtr__in__;
+ long dataPtr__len__;
+ int dataPtr__in_len__;
+ AEDesc theAEDesc;
#ifndef AEReplaceDescData
- PyMac_PRECHECK(AEReplaceDescData);
+ PyMac_PRECHECK(AEReplaceDescData);
#endif
- if (!PyArg_ParseTuple(_args, "O&s#",
- PyMac_GetOSType, &typeCode,
- &dataPtr__in__, &dataPtr__in_len__))
- return NULL;
- dataPtr__len__ = dataPtr__in_len__;
- _err = AEReplaceDescData(typeCode,
- dataPtr__in__, dataPtr__len__,
- &theAEDesc);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- AEDesc_New, &theAEDesc);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&s#",
+ PyMac_GetOSType, &typeCode,
+ &dataPtr__in__, &dataPtr__in_len__))
+ return NULL;
+ dataPtr__len__ = dataPtr__in_len__;
+ _err = AEReplaceDescData(typeCode,
+ dataPtr__in__, dataPtr__len__,
+ &theAEDesc);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ AEDesc_New, &theAEDesc);
+ return _res;
}
static PyObject *AE_AEProcessAppleEvent(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- EventRecord theEventRecord;
+ PyObject *_res = NULL;
+ OSErr _err;
+ EventRecord theEventRecord;
#ifndef AEProcessAppleEvent
- PyMac_PRECHECK(AEProcessAppleEvent);
+ PyMac_PRECHECK(AEProcessAppleEvent);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetEventRecord, &theEventRecord))
- return NULL;
- _err = AEProcessAppleEvent(&theEventRecord);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetEventRecord, &theEventRecord))
+ return NULL;
+ _err = AEProcessAppleEvent(&theEventRecord);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *AE_AEGetInteractionAllowed(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- AEInteractAllowed level;
+ PyObject *_res = NULL;
+ OSErr _err;
+ AEInteractAllowed level;
#ifndef AEGetInteractionAllowed
- PyMac_PRECHECK(AEGetInteractionAllowed);
+ PyMac_PRECHECK(AEGetInteractionAllowed);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = AEGetInteractionAllowed(&level);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("b",
- level);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = AEGetInteractionAllowed(&level);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("b",
+ level);
+ return _res;
}
static PyObject *AE_AESetInteractionAllowed(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- AEInteractAllowed level;
+ PyObject *_res = NULL;
+ OSErr _err;
+ AEInteractAllowed level;
#ifndef AESetInteractionAllowed
- PyMac_PRECHECK(AESetInteractionAllowed);
+ PyMac_PRECHECK(AESetInteractionAllowed);
#endif
- if (!PyArg_ParseTuple(_args, "b",
- &level))
- return NULL;
- _err = AESetInteractionAllowed(level);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "b",
+ &level))
+ return NULL;
+ _err = AESetInteractionAllowed(level);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *AE_AEInteractWithUser(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- long timeOutInTicks;
+ PyObject *_res = NULL;
+ OSErr _err;
+ long timeOutInTicks;
#ifndef AEInteractWithUser
- PyMac_PRECHECK(AEInteractWithUser);
+ PyMac_PRECHECK(AEInteractWithUser);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &timeOutInTicks))
- return NULL;
- _err = AEInteractWithUser(timeOutInTicks,
- (NMRecPtr)0,
- upp_AEIdleProc);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &timeOutInTicks))
+ return NULL;
+ _err = AEInteractWithUser(timeOutInTicks,
+ (NMRecPtr)0,
+ upp_AEIdleProc);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *AE_AEInstallEventHandler(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- AEEventClass theAEEventClass;
- AEEventID theAEEventID;
- AEEventHandlerUPP handler__proc__ = upp_GenericEventHandler;
- PyObject *handler;
+ PyObject *_res = NULL;
+ OSErr _err;
+ AEEventClass theAEEventClass;
+ AEEventID theAEEventID;
+ AEEventHandlerUPP handler__proc__ = upp_GenericEventHandler;
+ PyObject *handler;
#ifndef AEInstallEventHandler
- PyMac_PRECHECK(AEInstallEventHandler);
+ PyMac_PRECHECK(AEInstallEventHandler);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&O",
- PyMac_GetOSType, &theAEEventClass,
- PyMac_GetOSType, &theAEEventID,
- &handler))
- return NULL;
- _err = AEInstallEventHandler(theAEEventClass,
- theAEEventID,
- handler__proc__, (SRefCon)handler,
- 0);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- Py_INCREF(handler); /* XXX leak, but needed */
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&O",
+ PyMac_GetOSType, &theAEEventClass,
+ PyMac_GetOSType, &theAEEventID,
+ &handler))
+ return NULL;
+ _err = AEInstallEventHandler(theAEEventClass,
+ theAEEventID,
+ handler__proc__, (SRefCon)handler,
+ 0);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ Py_INCREF(handler); /* XXX leak, but needed */
+ return _res;
}
static PyObject *AE_AERemoveEventHandler(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- AEEventClass theAEEventClass;
- AEEventID theAEEventID;
+ PyObject *_res = NULL;
+ OSErr _err;
+ AEEventClass theAEEventClass;
+ AEEventID theAEEventID;
#ifndef AERemoveEventHandler
- PyMac_PRECHECK(AERemoveEventHandler);
+ PyMac_PRECHECK(AERemoveEventHandler);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- PyMac_GetOSType, &theAEEventClass,
- PyMac_GetOSType, &theAEEventID))
- return NULL;
- _err = AERemoveEventHandler(theAEEventClass,
- theAEEventID,
- upp_GenericEventHandler,
- 0);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ PyMac_GetOSType, &theAEEventClass,
+ PyMac_GetOSType, &theAEEventID))
+ return NULL;
+ _err = AERemoveEventHandler(theAEEventClass,
+ theAEEventID,
+ upp_GenericEventHandler,
+ 0);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *AE_AEGetEventHandler(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- AEEventClass theAEEventClass;
- AEEventID theAEEventID;
- AEEventHandlerUPP handler__proc__ = upp_GenericEventHandler;
- PyObject *handler;
+ PyObject *_res = NULL;
+ OSErr _err;
+ AEEventClass theAEEventClass;
+ AEEventID theAEEventID;
+ AEEventHandlerUPP handler__proc__ = upp_GenericEventHandler;
+ PyObject *handler;
#ifndef AEGetEventHandler
- PyMac_PRECHECK(AEGetEventHandler);
+ PyMac_PRECHECK(AEGetEventHandler);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- PyMac_GetOSType, &theAEEventClass,
- PyMac_GetOSType, &theAEEventID))
- return NULL;
- _err = AEGetEventHandler(theAEEventClass,
- theAEEventID,
- &handler__proc__, (SRefCon *)&handler,
- 0);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O",
- handler);
- Py_INCREF(handler); /* XXX leak, but needed */
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ PyMac_GetOSType, &theAEEventClass,
+ PyMac_GetOSType, &theAEEventID))
+ return NULL;
+ _err = AEGetEventHandler(theAEEventClass,
+ theAEEventID,
+ &handler__proc__, (SRefCon *)&handler,
+ 0);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O",
+ handler);
+ Py_INCREF(handler); /* XXX leak, but needed */
+ return _res;
}
static PyObject *AE_AEInstallSpecialHandler(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- AEKeyword functionClass;
+ PyObject *_res = NULL;
+ OSErr _err;
+ AEKeyword functionClass;
#ifndef AEInstallSpecialHandler
- PyMac_PRECHECK(AEInstallSpecialHandler);
+ PyMac_PRECHECK(AEInstallSpecialHandler);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetOSType, &functionClass))
- return NULL;
- _err = AEInstallSpecialHandler(functionClass,
- upp_GenericEventHandler,
- 0);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetOSType, &functionClass))
+ return NULL;
+ _err = AEInstallSpecialHandler(functionClass,
+ upp_GenericEventHandler,
+ 0);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *AE_AERemoveSpecialHandler(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- AEKeyword functionClass;
+ PyObject *_res = NULL;
+ OSErr _err;
+ AEKeyword functionClass;
#ifndef AERemoveSpecialHandler
- PyMac_PRECHECK(AERemoveSpecialHandler);
+ PyMac_PRECHECK(AERemoveSpecialHandler);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetOSType, &functionClass))
- return NULL;
- _err = AERemoveSpecialHandler(functionClass,
- upp_GenericEventHandler,
- 0);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetOSType, &functionClass))
+ return NULL;
+ _err = AERemoveSpecialHandler(functionClass,
+ upp_GenericEventHandler,
+ 0);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *AE_AEManagerInfo(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- AEKeyword keyWord;
- long result;
+ PyObject *_res = NULL;
+ OSErr _err;
+ AEKeyword keyWord;
+ long result;
#ifndef AEManagerInfo
- PyMac_PRECHECK(AEManagerInfo);
+ PyMac_PRECHECK(AEManagerInfo);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetOSType, &keyWord))
- return NULL;
- _err = AEManagerInfo(keyWord,
- &result);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- result);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetOSType, &keyWord))
+ return NULL;
+ _err = AEManagerInfo(keyWord,
+ &result);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ result);
+ return _res;
}
static PyObject *AE_AEObjectInit(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
+ PyObject *_res = NULL;
+ OSErr _err;
#ifndef AEObjectInit
- PyMac_PRECHECK(AEObjectInit);
+ PyMac_PRECHECK(AEObjectInit);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = AEObjectInit();
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = AEObjectInit();
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *AE_AEDisposeToken(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- AEDesc theToken;
+ PyObject *_res = NULL;
+ OSErr _err;
+ AEDesc theToken;
#ifndef AEDisposeToken
- PyMac_PRECHECK(AEDisposeToken);
+ PyMac_PRECHECK(AEDisposeToken);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = AEDisposeToken(&theToken);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- AEDesc_New, &theToken);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = AEDisposeToken(&theToken);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ AEDesc_New, &theToken);
+ return _res;
}
static PyObject *AE_AECallObjectAccessor(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- DescType desiredClass;
- AEDesc containerToken;
- DescType containerClass;
- DescType keyForm;
- AEDesc keyData;
- AEDesc token;
+ PyObject *_res = NULL;
+ OSErr _err;
+ DescType desiredClass;
+ AEDesc containerToken;
+ DescType containerClass;
+ DescType keyForm;
+ AEDesc keyData;
+ AEDesc token;
#ifndef AECallObjectAccessor
- PyMac_PRECHECK(AECallObjectAccessor);
+ PyMac_PRECHECK(AECallObjectAccessor);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&O&O&",
- PyMac_GetOSType, &desiredClass,
- AEDesc_Convert, &containerToken,
- PyMac_GetOSType, &containerClass,
- PyMac_GetOSType, &keyForm,
- AEDesc_Convert, &keyData))
- return NULL;
- _err = AECallObjectAccessor(desiredClass,
- &containerToken,
- containerClass,
- keyForm,
- &keyData,
- &token);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- AEDesc_New, &token);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&O&O&O&",
+ PyMac_GetOSType, &desiredClass,
+ AEDesc_Convert, &containerToken,
+ PyMac_GetOSType, &containerClass,
+ PyMac_GetOSType, &keyForm,
+ AEDesc_Convert, &keyData))
+ return NULL;
+ _err = AECallObjectAccessor(desiredClass,
+ &containerToken,
+ containerClass,
+ keyForm,
+ &keyData,
+ &token);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ AEDesc_New, &token);
+ return _res;
}
static PyMethodDef AE_methods[] = {
- {"AECoercePtr", (PyCFunction)AE_AECoercePtr, 1,
- PyDoc_STR("(DescType typeCode, Buffer dataPtr, DescType toType) -> (AEDesc result)")},
- {"AECreateDesc", (PyCFunction)AE_AECreateDesc, 1,
- PyDoc_STR("(DescType typeCode, Buffer dataPtr) -> (AEDesc result)")},
- {"AECreateList", (PyCFunction)AE_AECreateList, 1,
- PyDoc_STR("(Buffer factoringPtr, Boolean isRecord) -> (AEDescList resultList)")},
- {"AECreateAppleEvent", (PyCFunction)AE_AECreateAppleEvent, 1,
- PyDoc_STR("(AEEventClass theAEEventClass, AEEventID theAEEventID, AEAddressDesc target, AEReturnID returnID, AETransactionID transactionID) -> (AppleEvent result)")},
- {"AEReplaceDescData", (PyCFunction)AE_AEReplaceDescData, 1,
- PyDoc_STR("(DescType typeCode, Buffer dataPtr) -> (AEDesc theAEDesc)")},
- {"AEProcessAppleEvent", (PyCFunction)AE_AEProcessAppleEvent, 1,
- PyDoc_STR("(EventRecord theEventRecord) -> None")},
- {"AEGetInteractionAllowed", (PyCFunction)AE_AEGetInteractionAllowed, 1,
- PyDoc_STR("() -> (AEInteractAllowed level)")},
- {"AESetInteractionAllowed", (PyCFunction)AE_AESetInteractionAllowed, 1,
- PyDoc_STR("(AEInteractAllowed level) -> None")},
- {"AEInteractWithUser", (PyCFunction)AE_AEInteractWithUser, 1,
- PyDoc_STR("(long timeOutInTicks) -> None")},
- {"AEInstallEventHandler", (PyCFunction)AE_AEInstallEventHandler, 1,
- PyDoc_STR("(AEEventClass theAEEventClass, AEEventID theAEEventID, EventHandler handler) -> None")},
- {"AERemoveEventHandler", (PyCFunction)AE_AERemoveEventHandler, 1,
- PyDoc_STR("(AEEventClass theAEEventClass, AEEventID theAEEventID) -> None")},
- {"AEGetEventHandler", (PyCFunction)AE_AEGetEventHandler, 1,
- PyDoc_STR("(AEEventClass theAEEventClass, AEEventID theAEEventID) -> (EventHandler handler)")},
- {"AEInstallSpecialHandler", (PyCFunction)AE_AEInstallSpecialHandler, 1,
- PyDoc_STR("(AEKeyword functionClass) -> None")},
- {"AERemoveSpecialHandler", (PyCFunction)AE_AERemoveSpecialHandler, 1,
- PyDoc_STR("(AEKeyword functionClass) -> None")},
- {"AEManagerInfo", (PyCFunction)AE_AEManagerInfo, 1,
- PyDoc_STR("(AEKeyword keyWord) -> (long result)")},
- {"AEObjectInit", (PyCFunction)AE_AEObjectInit, 1,
- PyDoc_STR("() -> None")},
- {"AEDisposeToken", (PyCFunction)AE_AEDisposeToken, 1,
- PyDoc_STR("() -> (AEDesc theToken)")},
- {"AECallObjectAccessor", (PyCFunction)AE_AECallObjectAccessor, 1,
- PyDoc_STR("(DescType desiredClass, AEDesc containerToken, DescType containerClass, DescType keyForm, AEDesc keyData) -> (AEDesc token)")},
- {NULL, NULL, 0}
+ {"AECoercePtr", (PyCFunction)AE_AECoercePtr, 1,
+ PyDoc_STR("(DescType typeCode, Buffer dataPtr, DescType toType) -> (AEDesc result)")},
+ {"AECreateDesc", (PyCFunction)AE_AECreateDesc, 1,
+ PyDoc_STR("(DescType typeCode, Buffer dataPtr) -> (AEDesc result)")},
+ {"AECreateList", (PyCFunction)AE_AECreateList, 1,
+ PyDoc_STR("(Buffer factoringPtr, Boolean isRecord) -> (AEDescList resultList)")},
+ {"AECreateAppleEvent", (PyCFunction)AE_AECreateAppleEvent, 1,
+ PyDoc_STR("(AEEventClass theAEEventClass, AEEventID theAEEventID, AEAddressDesc target, AEReturnID returnID, AETransactionID transactionID) -> (AppleEvent result)")},
+ {"AEReplaceDescData", (PyCFunction)AE_AEReplaceDescData, 1,
+ PyDoc_STR("(DescType typeCode, Buffer dataPtr) -> (AEDesc theAEDesc)")},
+ {"AEProcessAppleEvent", (PyCFunction)AE_AEProcessAppleEvent, 1,
+ PyDoc_STR("(EventRecord theEventRecord) -> None")},
+ {"AEGetInteractionAllowed", (PyCFunction)AE_AEGetInteractionAllowed, 1,
+ PyDoc_STR("() -> (AEInteractAllowed level)")},
+ {"AESetInteractionAllowed", (PyCFunction)AE_AESetInteractionAllowed, 1,
+ PyDoc_STR("(AEInteractAllowed level) -> None")},
+ {"AEInteractWithUser", (PyCFunction)AE_AEInteractWithUser, 1,
+ PyDoc_STR("(long timeOutInTicks) -> None")},
+ {"AEInstallEventHandler", (PyCFunction)AE_AEInstallEventHandler, 1,
+ PyDoc_STR("(AEEventClass theAEEventClass, AEEventID theAEEventID, EventHandler handler) -> None")},
+ {"AERemoveEventHandler", (PyCFunction)AE_AERemoveEventHandler, 1,
+ PyDoc_STR("(AEEventClass theAEEventClass, AEEventID theAEEventID) -> None")},
+ {"AEGetEventHandler", (PyCFunction)AE_AEGetEventHandler, 1,
+ PyDoc_STR("(AEEventClass theAEEventClass, AEEventID theAEEventID) -> (EventHandler handler)")},
+ {"AEInstallSpecialHandler", (PyCFunction)AE_AEInstallSpecialHandler, 1,
+ PyDoc_STR("(AEKeyword functionClass) -> None")},
+ {"AERemoveSpecialHandler", (PyCFunction)AE_AERemoveSpecialHandler, 1,
+ PyDoc_STR("(AEKeyword functionClass) -> None")},
+ {"AEManagerInfo", (PyCFunction)AE_AEManagerInfo, 1,
+ PyDoc_STR("(AEKeyword keyWord) -> (long result)")},
+ {"AEObjectInit", (PyCFunction)AE_AEObjectInit, 1,
+ PyDoc_STR("() -> None")},
+ {"AEDisposeToken", (PyCFunction)AE_AEDisposeToken, 1,
+ PyDoc_STR("() -> (AEDesc theToken)")},
+ {"AECallObjectAccessor", (PyCFunction)AE_AECallObjectAccessor, 1,
+ PyDoc_STR("(DescType desiredClass, AEDesc containerToken, DescType containerClass, DescType keyForm, AEDesc keyData) -> (AEDesc token)")},
+ {NULL, NULL, 0}
};
@@ -1387,72 +1387,72 @@ static PyMethodDef AE_methods[] = {
static pascal OSErr
GenericEventHandler(const AppleEvent *request, AppleEvent *reply, refcontype refcon)
{
- PyObject *handler = (PyObject *)refcon;
- AEDescObject *requestObject, *replyObject;
- PyObject *args, *res;
- if ((requestObject = (AEDescObject *)AEDesc_New((AppleEvent *)request)) == NULL) {
- return -1;
- }
- if ((replyObject = (AEDescObject *)AEDesc_New(reply)) == NULL) {
- Py_DECREF(requestObject);
- return -1;
- }
- if ((args = Py_BuildValue("OO", requestObject, replyObject)) == NULL) {
- Py_DECREF(requestObject);
- Py_DECREF(replyObject);
- return -1;
- }
- res = PyEval_CallObject(handler, args);
- requestObject->ob_itself.descriptorType = 'null';
- requestObject->ob_itself.dataHandle = NULL;
- replyObject->ob_itself.descriptorType = 'null';
- replyObject->ob_itself.dataHandle = NULL;
- Py_DECREF(args);
- if (res == NULL) {
- PySys_WriteStderr("Exception in AE event handler function\n");
- PyErr_Print();
- return -1;
- }
- Py_DECREF(res);
- return noErr;
+ PyObject *handler = (PyObject *)refcon;
+ AEDescObject *requestObject, *replyObject;
+ PyObject *args, *res;
+ if ((requestObject = (AEDescObject *)AEDesc_New((AppleEvent *)request)) == NULL) {
+ return -1;
+ }
+ if ((replyObject = (AEDescObject *)AEDesc_New(reply)) == NULL) {
+ Py_DECREF(requestObject);
+ return -1;
+ }
+ if ((args = Py_BuildValue("OO", requestObject, replyObject)) == NULL) {
+ Py_DECREF(requestObject);
+ Py_DECREF(replyObject);
+ return -1;
+ }
+ res = PyEval_CallObject(handler, args);
+ requestObject->ob_itself.descriptorType = 'null';
+ requestObject->ob_itself.dataHandle = NULL;
+ replyObject->ob_itself.descriptorType = 'null';
+ replyObject->ob_itself.dataHandle = NULL;
+ Py_DECREF(args);
+ if (res == NULL) {
+ PySys_WriteStderr("Exception in AE event handler function\n");
+ PyErr_Print();
+ return -1;
+ }
+ Py_DECREF(res);
+ return noErr;
}
PyObject *AEDesc_NewBorrowed(AEDesc *itself)
{
- PyObject *it;
+ PyObject *it;
- it = AEDesc_New(itself);
- if (it)
- ((AEDescObject *)it)->ob_owned = 0;
- return (PyObject *)it;
+ it = AEDesc_New(itself);
+ if (it)
+ ((AEDescObject *)it)->ob_owned = 0;
+ return (PyObject *)it;
}
void init_AE(void)
{
- PyObject *m;
- PyObject *d;
-
- upp_AEIdleProc = NewAEIdleUPP(AEIdleProc);
- upp_GenericEventHandler = NewAEEventHandlerUPP(GenericEventHandler);
- PyMac_INIT_TOOLBOX_OBJECT_NEW(AEDesc *, AEDesc_New);
- PyMac_INIT_TOOLBOX_OBJECT_NEW(AEDesc *, AEDesc_NewBorrowed);
- PyMac_INIT_TOOLBOX_OBJECT_CONVERT(AEDesc, AEDesc_Convert);
-
- m = Py_InitModule("_AE", AE_methods);
- d = PyModule_GetDict(m);
- AE_Error = PyMac_GetOSErrException();
- if (AE_Error == NULL ||
- PyDict_SetItemString(d, "Error", AE_Error) != 0)
- return;
- AEDesc_Type.ob_type = &PyType_Type;
- if (PyType_Ready(&AEDesc_Type) < 0) return;
- Py_INCREF(&AEDesc_Type);
- PyModule_AddObject(m, "AEDesc", (PyObject *)&AEDesc_Type);
- /* Backward-compatible name */
- Py_INCREF(&AEDesc_Type);
- PyModule_AddObject(m, "AEDescType", (PyObject *)&AEDesc_Type);
+ PyObject *m;
+ PyObject *d;
+
+ upp_AEIdleProc = NewAEIdleUPP(AEIdleProc);
+ upp_GenericEventHandler = NewAEEventHandlerUPP(GenericEventHandler);
+ PyMac_INIT_TOOLBOX_OBJECT_NEW(AEDesc *, AEDesc_New);
+ PyMac_INIT_TOOLBOX_OBJECT_NEW(AEDesc *, AEDesc_NewBorrowed);
+ PyMac_INIT_TOOLBOX_OBJECT_CONVERT(AEDesc, AEDesc_Convert);
+
+ m = Py_InitModule("_AE", AE_methods);
+ d = PyModule_GetDict(m);
+ AE_Error = PyMac_GetOSErrException();
+ if (AE_Error == NULL ||
+ PyDict_SetItemString(d, "Error", AE_Error) != 0)
+ return;
+ AEDesc_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&AEDesc_Type) < 0) return;
+ Py_INCREF(&AEDesc_Type);
+ PyModule_AddObject(m, "AEDesc", (PyObject *)&AEDesc_Type);
+ /* Backward-compatible name */
+ Py_INCREF(&AEDesc_Type);
+ PyModule_AddObject(m, "AEDescType", (PyObject *)&AEDesc_Type);
}
/* ========================= End module _AE ========================= */
diff --git a/Mac/Modules/ah/_AHmodule.c b/Mac/Modules/ah/_AHmodule.c
index 160a845..73ab437 100644
--- a/Mac/Modules/ah/_AHmodule.c
+++ b/Mac/Modules/ah/_AHmodule.c
@@ -9,9 +9,9 @@
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
- PyErr_SetString(PyExc_NotImplementedError, \
- "Not available in this shared library/OS version"); \
- return NULL; \
+ PyErr_SetString(PyExc_NotImplementedError, \
+ "Not available in this shared library/OS version"); \
+ return NULL; \
}} while(0)
@@ -22,103 +22,103 @@ static PyObject *Ah_Error;
static PyObject *Ah_AHSearch(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- CFStringRef bookname;
- CFStringRef query;
- if (!PyArg_ParseTuple(_args, "O&O&",
- CFStringRefObj_Convert, &bookname,
- CFStringRefObj_Convert, &query))
- return NULL;
- _err = AHSearch(bookname,
- query);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ CFStringRef bookname;
+ CFStringRef query;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CFStringRefObj_Convert, &bookname,
+ CFStringRefObj_Convert, &query))
+ return NULL;
+ _err = AHSearch(bookname,
+ query);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Ah_AHGotoMainTOC(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- AHTOCType toctype;
- if (!PyArg_ParseTuple(_args, "h",
- &toctype))
- return NULL;
- _err = AHGotoMainTOC(toctype);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ AHTOCType toctype;
+ if (!PyArg_ParseTuple(_args, "h",
+ &toctype))
+ return NULL;
+ _err = AHGotoMainTOC(toctype);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Ah_AHGotoPage(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- CFStringRef bookname;
- CFStringRef path;
- CFStringRef anchor;
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- CFStringRefObj_Convert, &bookname,
- CFStringRefObj_Convert, &path,
- CFStringRefObj_Convert, &anchor))
- return NULL;
- _err = AHGotoPage(bookname,
- path,
- anchor);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ CFStringRef bookname;
+ CFStringRef path;
+ CFStringRef anchor;
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ CFStringRefObj_Convert, &bookname,
+ CFStringRefObj_Convert, &path,
+ CFStringRefObj_Convert, &anchor))
+ return NULL;
+ _err = AHGotoPage(bookname,
+ path,
+ anchor);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Ah_AHLookupAnchor(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- CFStringRef bookname;
- CFStringRef anchor;
- if (!PyArg_ParseTuple(_args, "O&O&",
- CFStringRefObj_Convert, &bookname,
- CFStringRefObj_Convert, &anchor))
- return NULL;
- _err = AHLookupAnchor(bookname,
- anchor);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ CFStringRef bookname;
+ CFStringRef anchor;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CFStringRefObj_Convert, &bookname,
+ CFStringRefObj_Convert, &anchor))
+ return NULL;
+ _err = AHLookupAnchor(bookname,
+ anchor);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Ah_AHRegisterHelpBook(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- FSRef appBundleRef;
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetFSRef, &appBundleRef))
- return NULL;
- _err = AHRegisterHelpBook(&appBundleRef);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ FSRef appBundleRef;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetFSRef, &appBundleRef))
+ return NULL;
+ _err = AHRegisterHelpBook(&appBundleRef);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyMethodDef Ah_methods[] = {
- {"AHSearch", (PyCFunction)Ah_AHSearch, 1,
- PyDoc_STR("(CFStringRef bookname, CFStringRef query) -> None")},
- {"AHGotoMainTOC", (PyCFunction)Ah_AHGotoMainTOC, 1,
- PyDoc_STR("(AHTOCType toctype) -> None")},
- {"AHGotoPage", (PyCFunction)Ah_AHGotoPage, 1,
- PyDoc_STR("(CFStringRef bookname, CFStringRef path, CFStringRef anchor) -> None")},
- {"AHLookupAnchor", (PyCFunction)Ah_AHLookupAnchor, 1,
- PyDoc_STR("(CFStringRef bookname, CFStringRef anchor) -> None")},
- {"AHRegisterHelpBook", (PyCFunction)Ah_AHRegisterHelpBook, 1,
- PyDoc_STR("(FSRef appBundleRef) -> None")},
- {NULL, NULL, 0}
+ {"AHSearch", (PyCFunction)Ah_AHSearch, 1,
+ PyDoc_STR("(CFStringRef bookname, CFStringRef query) -> None")},
+ {"AHGotoMainTOC", (PyCFunction)Ah_AHGotoMainTOC, 1,
+ PyDoc_STR("(AHTOCType toctype) -> None")},
+ {"AHGotoPage", (PyCFunction)Ah_AHGotoPage, 1,
+ PyDoc_STR("(CFStringRef bookname, CFStringRef path, CFStringRef anchor) -> None")},
+ {"AHLookupAnchor", (PyCFunction)Ah_AHLookupAnchor, 1,
+ PyDoc_STR("(CFStringRef bookname, CFStringRef anchor) -> None")},
+ {"AHRegisterHelpBook", (PyCFunction)Ah_AHRegisterHelpBook, 1,
+ PyDoc_STR("(FSRef appBundleRef) -> None")},
+ {NULL, NULL, 0}
};
@@ -126,18 +126,18 @@ static PyMethodDef Ah_methods[] = {
void init_AH(void)
{
- PyObject *m;
- PyObject *d;
+ PyObject *m;
+ PyObject *d;
- m = Py_InitModule("_AH", Ah_methods);
- d = PyModule_GetDict(m);
- Ah_Error = PyMac_GetOSErrException();
- if (Ah_Error == NULL ||
- PyDict_SetItemString(d, "Error", Ah_Error) != 0)
- return;
+ m = Py_InitModule("_AH", Ah_methods);
+ d = PyModule_GetDict(m);
+ Ah_Error = PyMac_GetOSErrException();
+ if (Ah_Error == NULL ||
+ PyDict_SetItemString(d, "Error", Ah_Error) != 0)
+ return;
}
/* ========================= End module _AH ========================= */
diff --git a/Mac/Modules/app/_Appmodule.c b/Mac/Modules/app/_Appmodule.c
index 52d17f5..c791807 100644
--- a/Mac/Modules/app/_Appmodule.c
+++ b/Mac/Modules/app/_Appmodule.c
@@ -4,16 +4,16 @@
#include "Python.h"
#ifndef __LP64__
- /* Carbon GUI stuff, not available in 64-bit mode */
+ /* Carbon GUI stuff, not available in 64-bit mode */
#include "pymactoolbox.h"
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
- PyErr_SetString(PyExc_NotImplementedError, \
- "Not available in this shared library/OS version"); \
- return NULL; \
+ PyErr_SetString(PyExc_NotImplementedError, \
+ "Not available in this shared library/OS version"); \
+ return NULL; \
}} while(0)
@@ -22,7 +22,7 @@
static int ThemeButtonDrawInfo_Convert(PyObject *v, ThemeButtonDrawInfo *p_itself)
{
- return PyArg_Parse(v, "(iHH)", &p_itself->state, &p_itself->value, &p_itself->adornment);
+ return PyArg_Parse(v, "(iHH)", &p_itself->state, &p_itself->value, &p_itself->adornment);
}
@@ -35,75 +35,75 @@ PyTypeObject ThemeDrawingState_Type;
#define ThemeDrawingStateObj_Check(x) ((x)->ob_type == &ThemeDrawingState_Type || PyObject_TypeCheck((x), &ThemeDrawingState_Type))
typedef struct ThemeDrawingStateObject {
- PyObject_HEAD
- ThemeDrawingState ob_itself;
+ PyObject_HEAD
+ ThemeDrawingState ob_itself;
} ThemeDrawingStateObject;
PyObject *ThemeDrawingStateObj_New(ThemeDrawingState itself)
{
- ThemeDrawingStateObject *it;
- it = PyObject_NEW(ThemeDrawingStateObject, &ThemeDrawingState_Type);
- if (it == NULL) return NULL;
- it->ob_itself = itself;
- return (PyObject *)it;
+ ThemeDrawingStateObject *it;
+ it = PyObject_NEW(ThemeDrawingStateObject, &ThemeDrawingState_Type);
+ if (it == NULL) return NULL;
+ it->ob_itself = itself;
+ return (PyObject *)it;
}
int ThemeDrawingStateObj_Convert(PyObject *v, ThemeDrawingState *p_itself)
{
- if (!ThemeDrawingStateObj_Check(v))
- {
- PyErr_SetString(PyExc_TypeError, "ThemeDrawingState required");
- return 0;
- }
- *p_itself = ((ThemeDrawingStateObject *)v)->ob_itself;
- return 1;
+ if (!ThemeDrawingStateObj_Check(v))
+ {
+ PyErr_SetString(PyExc_TypeError, "ThemeDrawingState required");
+ return 0;
+ }
+ *p_itself = ((ThemeDrawingStateObject *)v)->ob_itself;
+ return 1;
}
static void ThemeDrawingStateObj_dealloc(ThemeDrawingStateObject *self)
{
- /* Cleanup of self->ob_itself goes here */
- self->ob_type->tp_free((PyObject *)self);
+ /* Cleanup of self->ob_itself goes here */
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *ThemeDrawingStateObj_SetThemeDrawingState(ThemeDrawingStateObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _rv;
- Boolean inDisposeNow;
+ PyObject *_res = NULL;
+ OSStatus _rv;
+ Boolean inDisposeNow;
#ifndef SetThemeDrawingState
- PyMac_PRECHECK(SetThemeDrawingState);
+ PyMac_PRECHECK(SetThemeDrawingState);
#endif
- if (!PyArg_ParseTuple(_args, "b",
- &inDisposeNow))
- return NULL;
- _rv = SetThemeDrawingState(_self->ob_itself,
- inDisposeNow);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "b",
+ &inDisposeNow))
+ return NULL;
+ _rv = SetThemeDrawingState(_self->ob_itself,
+ inDisposeNow);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *ThemeDrawingStateObj_DisposeThemeDrawingState(ThemeDrawingStateObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _rv;
+ PyObject *_res = NULL;
+ OSStatus _rv;
#ifndef DisposeThemeDrawingState
- PyMac_PRECHECK(DisposeThemeDrawingState);
+ PyMac_PRECHECK(DisposeThemeDrawingState);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = DisposeThemeDrawingState(_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = DisposeThemeDrawingState(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyMethodDef ThemeDrawingStateObj_methods[] = {
- {"SetThemeDrawingState", (PyCFunction)ThemeDrawingStateObj_SetThemeDrawingState, 1,
- PyDoc_STR("(Boolean inDisposeNow) -> (OSStatus _rv)")},
- {"DisposeThemeDrawingState", (PyCFunction)ThemeDrawingStateObj_DisposeThemeDrawingState, 1,
- PyDoc_STR("() -> (OSStatus _rv)")},
- {NULL, NULL, 0}
+ {"SetThemeDrawingState", (PyCFunction)ThemeDrawingStateObj_SetThemeDrawingState, 1,
+ PyDoc_STR("(Boolean inDisposeNow) -> (OSStatus _rv)")},
+ {"DisposeThemeDrawingState", (PyCFunction)ThemeDrawingStateObj_DisposeThemeDrawingState, 1,
+ PyDoc_STR("() -> (OSStatus _rv)")},
+ {NULL, NULL, 0}
};
#define ThemeDrawingStateObj_getsetlist NULL
@@ -120,61 +120,61 @@ static PyMethodDef ThemeDrawingStateObj_methods[] = {
static PyObject *ThemeDrawingStateObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
- PyObject *_self;
- ThemeDrawingState itself;
- char *kw[] = {"itself", 0};
+ 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;
+ 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 = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
- "_App.ThemeDrawingState", /*tp_name*/
- sizeof(ThemeDrawingStateObject), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- /* methods */
- (destructor) ThemeDrawingStateObj_dealloc, /*tp_dealloc*/
- 0, /*tp_print*/
- (getattrfunc)0, /*tp_getattr*/
- (setattrfunc)0, /*tp_setattr*/
- (cmpfunc) ThemeDrawingStateObj_compare, /*tp_compare*/
- (reprfunc) ThemeDrawingStateObj_repr, /*tp_repr*/
- (PyNumberMethods *)0, /* tp_as_number */
- (PySequenceMethods *)0, /* tp_as_sequence */
- (PyMappingMethods *)0, /* tp_as_mapping */
- (hashfunc) ThemeDrawingStateObj_hash, /*tp_hash*/
- 0, /*tp_call*/
- 0, /*tp_str*/
- PyObject_GenericGetAttr, /*tp_getattro*/
- PyObject_GenericSetAttr, /*tp_setattro */
- 0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
- 0, /*tp_doc*/
- 0, /*tp_traverse*/
- 0, /*tp_clear*/
- 0, /*tp_richcompare*/
- 0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
- 0, /*tp_iternext*/
- ThemeDrawingStateObj_methods, /* tp_methods */
- 0, /*tp_members*/
- ThemeDrawingStateObj_getsetlist, /*tp_getset*/
- 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 */
+ PyObject_HEAD_INIT(NULL)
+ 0, /*ob_size*/
+ "_App.ThemeDrawingState", /*tp_name*/
+ sizeof(ThemeDrawingStateObject), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ /* methods */
+ (destructor) ThemeDrawingStateObj_dealloc, /*tp_dealloc*/
+ 0, /*tp_print*/
+ (getattrfunc)0, /*tp_getattr*/
+ (setattrfunc)0, /*tp_setattr*/
+ (cmpfunc) ThemeDrawingStateObj_compare, /*tp_compare*/
+ (reprfunc) ThemeDrawingStateObj_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) ThemeDrawingStateObj_hash, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ PyObject_GenericGetAttr, /*tp_getattro*/
+ PyObject_GenericSetAttr, /*tp_setattro */
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
+ 0, /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ ThemeDrawingStateObj_methods, /* tp_methods */
+ 0, /*tp_members*/
+ ThemeDrawingStateObj_getsetlist, /*tp_getset*/
+ 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 ---------------- */
@@ -182,1622 +182,1622 @@ PyTypeObject ThemeDrawingState_Type = {
static PyObject *App_RegisterAppearanceClient(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
+ PyObject *_res = NULL;
+ OSStatus _err;
#ifndef RegisterAppearanceClient
- PyMac_PRECHECK(RegisterAppearanceClient);
+ PyMac_PRECHECK(RegisterAppearanceClient);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = RegisterAppearanceClient();
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = RegisterAppearanceClient();
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *App_UnregisterAppearanceClient(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
+ PyObject *_res = NULL;
+ OSStatus _err;
#ifndef UnregisterAppearanceClient
- PyMac_PRECHECK(UnregisterAppearanceClient);
+ PyMac_PRECHECK(UnregisterAppearanceClient);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = UnregisterAppearanceClient();
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = UnregisterAppearanceClient();
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *App_SetThemePen(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- ThemeBrush inBrush;
- SInt16 inDepth;
- Boolean inIsColorDevice;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ ThemeBrush inBrush;
+ SInt16 inDepth;
+ Boolean inIsColorDevice;
#ifndef SetThemePen
- PyMac_PRECHECK(SetThemePen);
-#endif
- if (!PyArg_ParseTuple(_args, "hhb",
- &inBrush,
- &inDepth,
- &inIsColorDevice))
- return NULL;
- _err = SetThemePen(inBrush,
- inDepth,
- inIsColorDevice);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(SetThemePen);
+#endif
+ if (!PyArg_ParseTuple(_args, "hhb",
+ &inBrush,
+ &inDepth,
+ &inIsColorDevice))
+ return NULL;
+ _err = SetThemePen(inBrush,
+ inDepth,
+ inIsColorDevice);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *App_SetThemeBackground(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- ThemeBrush inBrush;
- SInt16 inDepth;
- Boolean inIsColorDevice;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ ThemeBrush inBrush;
+ SInt16 inDepth;
+ Boolean inIsColorDevice;
#ifndef SetThemeBackground
- PyMac_PRECHECK(SetThemeBackground);
-#endif
- if (!PyArg_ParseTuple(_args, "hhb",
- &inBrush,
- &inDepth,
- &inIsColorDevice))
- return NULL;
- _err = SetThemeBackground(inBrush,
- inDepth,
- inIsColorDevice);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(SetThemeBackground);
+#endif
+ if (!PyArg_ParseTuple(_args, "hhb",
+ &inBrush,
+ &inDepth,
+ &inIsColorDevice))
+ return NULL;
+ _err = SetThemeBackground(inBrush,
+ inDepth,
+ inIsColorDevice);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *App_SetThemeTextColor(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- ThemeTextColor inColor;
- SInt16 inDepth;
- Boolean inIsColorDevice;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ ThemeTextColor inColor;
+ SInt16 inDepth;
+ Boolean inIsColorDevice;
#ifndef SetThemeTextColor
- PyMac_PRECHECK(SetThemeTextColor);
-#endif
- if (!PyArg_ParseTuple(_args, "hhb",
- &inColor,
- &inDepth,
- &inIsColorDevice))
- return NULL;
- _err = SetThemeTextColor(inColor,
- inDepth,
- inIsColorDevice);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(SetThemeTextColor);
+#endif
+ if (!PyArg_ParseTuple(_args, "hhb",
+ &inColor,
+ &inDepth,
+ &inIsColorDevice))
+ return NULL;
+ _err = SetThemeTextColor(inColor,
+ inDepth,
+ inIsColorDevice);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *App_SetThemeWindowBackground(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowPtr inWindow;
- ThemeBrush inBrush;
- Boolean inUpdate;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowPtr inWindow;
+ ThemeBrush inBrush;
+ Boolean inUpdate;
#ifndef SetThemeWindowBackground
- PyMac_PRECHECK(SetThemeWindowBackground);
-#endif
- if (!PyArg_ParseTuple(_args, "O&hb",
- WinObj_Convert, &inWindow,
- &inBrush,
- &inUpdate))
- return NULL;
- _err = SetThemeWindowBackground(inWindow,
- inBrush,
- inUpdate);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(SetThemeWindowBackground);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&hb",
+ WinObj_Convert, &inWindow,
+ &inBrush,
+ &inUpdate))
+ return NULL;
+ _err = SetThemeWindowBackground(inWindow,
+ inBrush,
+ inUpdate);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *App_DrawThemeWindowHeader(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- Rect inRect;
- ThemeDrawState inState;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Rect inRect;
+ ThemeDrawState inState;
#ifndef DrawThemeWindowHeader
- PyMac_PRECHECK(DrawThemeWindowHeader);
+ PyMac_PRECHECK(DrawThemeWindowHeader);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- PyMac_GetRect, &inRect,
- &inState))
- return NULL;
- _err = DrawThemeWindowHeader(&inRect,
- inState);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ PyMac_GetRect, &inRect,
+ &inState))
+ return NULL;
+ _err = DrawThemeWindowHeader(&inRect,
+ inState);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *App_DrawThemeWindowListViewHeader(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- Rect inRect;
- ThemeDrawState inState;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Rect inRect;
+ ThemeDrawState inState;
#ifndef DrawThemeWindowListViewHeader
- PyMac_PRECHECK(DrawThemeWindowListViewHeader);
+ PyMac_PRECHECK(DrawThemeWindowListViewHeader);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- PyMac_GetRect, &inRect,
- &inState))
- return NULL;
- _err = DrawThemeWindowListViewHeader(&inRect,
- inState);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ PyMac_GetRect, &inRect,
+ &inState))
+ return NULL;
+ _err = DrawThemeWindowListViewHeader(&inRect,
+ inState);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *App_DrawThemePlacard(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- Rect inRect;
- ThemeDrawState inState;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Rect inRect;
+ ThemeDrawState inState;
#ifndef DrawThemePlacard
- PyMac_PRECHECK(DrawThemePlacard);
+ PyMac_PRECHECK(DrawThemePlacard);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- PyMac_GetRect, &inRect,
- &inState))
- return NULL;
- _err = DrawThemePlacard(&inRect,
- inState);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ PyMac_GetRect, &inRect,
+ &inState))
+ return NULL;
+ _err = DrawThemePlacard(&inRect,
+ inState);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *App_DrawThemeEditTextFrame(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- Rect inRect;
- ThemeDrawState inState;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Rect inRect;
+ ThemeDrawState inState;
#ifndef DrawThemeEditTextFrame
- PyMac_PRECHECK(DrawThemeEditTextFrame);
+ PyMac_PRECHECK(DrawThemeEditTextFrame);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- PyMac_GetRect, &inRect,
- &inState))
- return NULL;
- _err = DrawThemeEditTextFrame(&inRect,
- inState);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ PyMac_GetRect, &inRect,
+ &inState))
+ return NULL;
+ _err = DrawThemeEditTextFrame(&inRect,
+ inState);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *App_DrawThemeListBoxFrame(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- Rect inRect;
- ThemeDrawState inState;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Rect inRect;
+ ThemeDrawState inState;
#ifndef DrawThemeListBoxFrame
- PyMac_PRECHECK(DrawThemeListBoxFrame);
+ PyMac_PRECHECK(DrawThemeListBoxFrame);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- PyMac_GetRect, &inRect,
- &inState))
- return NULL;
- _err = DrawThemeListBoxFrame(&inRect,
- inState);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ PyMac_GetRect, &inRect,
+ &inState))
+ return NULL;
+ _err = DrawThemeListBoxFrame(&inRect,
+ inState);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *App_DrawThemeFocusRect(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- Rect inRect;
- Boolean inHasFocus;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Rect inRect;
+ Boolean inHasFocus;
#ifndef DrawThemeFocusRect
- PyMac_PRECHECK(DrawThemeFocusRect);
+ PyMac_PRECHECK(DrawThemeFocusRect);
#endif
- if (!PyArg_ParseTuple(_args, "O&b",
- PyMac_GetRect, &inRect,
- &inHasFocus))
- return NULL;
- _err = DrawThemeFocusRect(&inRect,
- inHasFocus);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&b",
+ PyMac_GetRect, &inRect,
+ &inHasFocus))
+ return NULL;
+ _err = DrawThemeFocusRect(&inRect,
+ inHasFocus);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *App_DrawThemePrimaryGroup(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- Rect inRect;
- ThemeDrawState inState;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Rect inRect;
+ ThemeDrawState inState;
#ifndef DrawThemePrimaryGroup
- PyMac_PRECHECK(DrawThemePrimaryGroup);
+ PyMac_PRECHECK(DrawThemePrimaryGroup);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- PyMac_GetRect, &inRect,
- &inState))
- return NULL;
- _err = DrawThemePrimaryGroup(&inRect,
- inState);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ PyMac_GetRect, &inRect,
+ &inState))
+ return NULL;
+ _err = DrawThemePrimaryGroup(&inRect,
+ inState);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *App_DrawThemeSecondaryGroup(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- Rect inRect;
- ThemeDrawState inState;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Rect inRect;
+ ThemeDrawState inState;
#ifndef DrawThemeSecondaryGroup
- PyMac_PRECHECK(DrawThemeSecondaryGroup);
+ PyMac_PRECHECK(DrawThemeSecondaryGroup);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- PyMac_GetRect, &inRect,
- &inState))
- return NULL;
- _err = DrawThemeSecondaryGroup(&inRect,
- inState);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ PyMac_GetRect, &inRect,
+ &inState))
+ return NULL;
+ _err = DrawThemeSecondaryGroup(&inRect,
+ inState);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *App_DrawThemeSeparator(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- Rect inRect;
- ThemeDrawState inState;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Rect inRect;
+ ThemeDrawState inState;
#ifndef DrawThemeSeparator
- PyMac_PRECHECK(DrawThemeSeparator);
+ PyMac_PRECHECK(DrawThemeSeparator);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- PyMac_GetRect, &inRect,
- &inState))
- return NULL;
- _err = DrawThemeSeparator(&inRect,
- inState);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ PyMac_GetRect, &inRect,
+ &inState))
+ return NULL;
+ _err = DrawThemeSeparator(&inRect,
+ inState);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *App_DrawThemeModelessDialogFrame(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- Rect inRect;
- ThemeDrawState inState;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Rect inRect;
+ ThemeDrawState inState;
#ifndef DrawThemeModelessDialogFrame
- PyMac_PRECHECK(DrawThemeModelessDialogFrame);
+ PyMac_PRECHECK(DrawThemeModelessDialogFrame);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- PyMac_GetRect, &inRect,
- &inState))
- return NULL;
- _err = DrawThemeModelessDialogFrame(&inRect,
- inState);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ PyMac_GetRect, &inRect,
+ &inState))
+ return NULL;
+ _err = DrawThemeModelessDialogFrame(&inRect,
+ inState);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *App_DrawThemeGenericWell(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- Rect inRect;
- ThemeDrawState inState;
- Boolean inFillCenter;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Rect inRect;
+ ThemeDrawState inState;
+ Boolean inFillCenter;
#ifndef DrawThemeGenericWell
- PyMac_PRECHECK(DrawThemeGenericWell);
-#endif
- if (!PyArg_ParseTuple(_args, "O&lb",
- PyMac_GetRect, &inRect,
- &inState,
- &inFillCenter))
- return NULL;
- _err = DrawThemeGenericWell(&inRect,
- inState,
- inFillCenter);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(DrawThemeGenericWell);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&lb",
+ PyMac_GetRect, &inRect,
+ &inState,
+ &inFillCenter))
+ return NULL;
+ _err = DrawThemeGenericWell(&inRect,
+ inState,
+ inFillCenter);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *App_DrawThemeFocusRegion(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- Boolean inHasFocus;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Boolean inHasFocus;
#ifndef DrawThemeFocusRegion
- PyMac_PRECHECK(DrawThemeFocusRegion);
+ PyMac_PRECHECK(DrawThemeFocusRegion);
#endif
- if (!PyArg_ParseTuple(_args, "b",
- &inHasFocus))
- return NULL;
- _err = DrawThemeFocusRegion((RgnHandle)0,
- inHasFocus);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "b",
+ &inHasFocus))
+ return NULL;
+ _err = DrawThemeFocusRegion((RgnHandle)0,
+ inHasFocus);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *App_IsThemeInColor(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- SInt16 inDepth;
- Boolean inIsColorDevice;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ SInt16 inDepth;
+ Boolean inIsColorDevice;
#ifndef IsThemeInColor
- PyMac_PRECHECK(IsThemeInColor);
+ PyMac_PRECHECK(IsThemeInColor);
#endif
- if (!PyArg_ParseTuple(_args, "hb",
- &inDepth,
- &inIsColorDevice))
- return NULL;
- _rv = IsThemeInColor(inDepth,
- inIsColorDevice);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "hb",
+ &inDepth,
+ &inIsColorDevice))
+ return NULL;
+ _rv = IsThemeInColor(inDepth,
+ inIsColorDevice);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *App_GetThemeAccentColors(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- CTabHandle outColors;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ CTabHandle outColors;
#ifndef GetThemeAccentColors
- PyMac_PRECHECK(GetThemeAccentColors);
+ PyMac_PRECHECK(GetThemeAccentColors);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetThemeAccentColors(&outColors);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- ResObj_New, outColors);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetThemeAccentColors(&outColors);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ ResObj_New, outColors);
+ return _res;
}
static PyObject *App_DrawThemeMenuBarBackground(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- Rect inBounds;
- ThemeMenuBarState inState;
- UInt32 inAttributes;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Rect inBounds;
+ ThemeMenuBarState inState;
+ UInt32 inAttributes;
#ifndef DrawThemeMenuBarBackground
- PyMac_PRECHECK(DrawThemeMenuBarBackground);
-#endif
- if (!PyArg_ParseTuple(_args, "O&Hl",
- PyMac_GetRect, &inBounds,
- &inState,
- &inAttributes))
- return NULL;
- _err = DrawThemeMenuBarBackground(&inBounds,
- inState,
- inAttributes);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(DrawThemeMenuBarBackground);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&Hl",
+ PyMac_GetRect, &inBounds,
+ &inState,
+ &inAttributes))
+ return NULL;
+ _err = DrawThemeMenuBarBackground(&inBounds,
+ inState,
+ inAttributes);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *App_GetThemeMenuBarHeight(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- SInt16 outHeight;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ SInt16 outHeight;
#ifndef GetThemeMenuBarHeight
- PyMac_PRECHECK(GetThemeMenuBarHeight);
+ PyMac_PRECHECK(GetThemeMenuBarHeight);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetThemeMenuBarHeight(&outHeight);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("h",
- outHeight);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetThemeMenuBarHeight(&outHeight);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("h",
+ outHeight);
+ return _res;
}
static PyObject *App_DrawThemeMenuBackground(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- Rect inMenuRect;
- ThemeMenuType inMenuType;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Rect inMenuRect;
+ ThemeMenuType inMenuType;
#ifndef DrawThemeMenuBackground
- PyMac_PRECHECK(DrawThemeMenuBackground);
+ PyMac_PRECHECK(DrawThemeMenuBackground);
#endif
- if (!PyArg_ParseTuple(_args, "O&H",
- PyMac_GetRect, &inMenuRect,
- &inMenuType))
- return NULL;
- _err = DrawThemeMenuBackground(&inMenuRect,
- inMenuType);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&H",
+ PyMac_GetRect, &inMenuRect,
+ &inMenuType))
+ return NULL;
+ _err = DrawThemeMenuBackground(&inMenuRect,
+ inMenuType);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *App_GetThemeMenuBackgroundRegion(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- Rect inMenuRect;
- ThemeMenuType menuType;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Rect inMenuRect;
+ ThemeMenuType menuType;
#ifndef GetThemeMenuBackgroundRegion
- PyMac_PRECHECK(GetThemeMenuBackgroundRegion);
+ PyMac_PRECHECK(GetThemeMenuBackgroundRegion);
#endif
- if (!PyArg_ParseTuple(_args, "O&H",
- PyMac_GetRect, &inMenuRect,
- &menuType))
- return NULL;
- _err = GetThemeMenuBackgroundRegion(&inMenuRect,
- menuType,
- (RgnHandle)0);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&H",
+ PyMac_GetRect, &inMenuRect,
+ &menuType))
+ return NULL;
+ _err = GetThemeMenuBackgroundRegion(&inMenuRect,
+ menuType,
+ (RgnHandle)0);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *App_DrawThemeMenuSeparator(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- Rect inItemRect;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Rect inItemRect;
#ifndef DrawThemeMenuSeparator
- PyMac_PRECHECK(DrawThemeMenuSeparator);
+ PyMac_PRECHECK(DrawThemeMenuSeparator);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetRect, &inItemRect))
- return NULL;
- _err = DrawThemeMenuSeparator(&inItemRect);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetRect, &inItemRect))
+ return NULL;
+ _err = DrawThemeMenuSeparator(&inItemRect);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *App_GetThemeMenuSeparatorHeight(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- SInt16 outHeight;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ SInt16 outHeight;
#ifndef GetThemeMenuSeparatorHeight
- PyMac_PRECHECK(GetThemeMenuSeparatorHeight);
+ PyMac_PRECHECK(GetThemeMenuSeparatorHeight);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetThemeMenuSeparatorHeight(&outHeight);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("h",
- outHeight);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetThemeMenuSeparatorHeight(&outHeight);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("h",
+ outHeight);
+ return _res;
}
static PyObject *App_GetThemeMenuItemExtra(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- ThemeMenuItemType inItemType;
- SInt16 outHeight;
- SInt16 outWidth;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ ThemeMenuItemType inItemType;
+ SInt16 outHeight;
+ SInt16 outWidth;
#ifndef GetThemeMenuItemExtra
- PyMac_PRECHECK(GetThemeMenuItemExtra);
+ PyMac_PRECHECK(GetThemeMenuItemExtra);
#endif
- if (!PyArg_ParseTuple(_args, "H",
- &inItemType))
- return NULL;
- _err = GetThemeMenuItemExtra(inItemType,
- &outHeight,
- &outWidth);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("hh",
- outHeight,
- outWidth);
- return _res;
+ if (!PyArg_ParseTuple(_args, "H",
+ &inItemType))
+ return NULL;
+ _err = GetThemeMenuItemExtra(inItemType,
+ &outHeight,
+ &outWidth);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("hh",
+ outHeight,
+ outWidth);
+ return _res;
}
static PyObject *App_GetThemeMenuTitleExtra(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- SInt16 outWidth;
- Boolean inIsSquished;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ SInt16 outWidth;
+ Boolean inIsSquished;
#ifndef GetThemeMenuTitleExtra
- PyMac_PRECHECK(GetThemeMenuTitleExtra);
+ PyMac_PRECHECK(GetThemeMenuTitleExtra);
#endif
- if (!PyArg_ParseTuple(_args, "b",
- &inIsSquished))
- return NULL;
- _err = GetThemeMenuTitleExtra(&outWidth,
- inIsSquished);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("h",
- outWidth);
- return _res;
+ if (!PyArg_ParseTuple(_args, "b",
+ &inIsSquished))
+ return NULL;
+ _err = GetThemeMenuTitleExtra(&outWidth,
+ inIsSquished);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("h",
+ outWidth);
+ return _res;
}
static PyObject *App_DrawThemeTabPane(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- Rect inRect;
- ThemeDrawState inState;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Rect inRect;
+ ThemeDrawState inState;
#ifndef DrawThemeTabPane
- PyMac_PRECHECK(DrawThemeTabPane);
+ PyMac_PRECHECK(DrawThemeTabPane);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- PyMac_GetRect, &inRect,
- &inState))
- return NULL;
- _err = DrawThemeTabPane(&inRect,
- inState);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ PyMac_GetRect, &inRect,
+ &inState))
+ return NULL;
+ _err = DrawThemeTabPane(&inRect,
+ inState);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *App_GetThemeTabRegion(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- Rect inRect;
- ThemeTabStyle inStyle;
- ThemeTabDirection inDirection;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Rect inRect;
+ ThemeTabStyle inStyle;
+ ThemeTabDirection inDirection;
#ifndef GetThemeTabRegion
- PyMac_PRECHECK(GetThemeTabRegion);
-#endif
- if (!PyArg_ParseTuple(_args, "O&HH",
- PyMac_GetRect, &inRect,
- &inStyle,
- &inDirection))
- return NULL;
- _err = GetThemeTabRegion(&inRect,
- inStyle,
- inDirection,
- (RgnHandle)0);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(GetThemeTabRegion);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&HH",
+ PyMac_GetRect, &inRect,
+ &inStyle,
+ &inDirection))
+ return NULL;
+ _err = GetThemeTabRegion(&inRect,
+ inStyle,
+ inDirection,
+ (RgnHandle)0);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *App_SetThemeCursor(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- ThemeCursor inCursor;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ ThemeCursor inCursor;
#ifndef SetThemeCursor
- PyMac_PRECHECK(SetThemeCursor);
+ PyMac_PRECHECK(SetThemeCursor);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &inCursor))
- return NULL;
- _err = SetThemeCursor(inCursor);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &inCursor))
+ return NULL;
+ _err = SetThemeCursor(inCursor);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *App_SetAnimatedThemeCursor(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- ThemeCursor inCursor;
- UInt32 inAnimationStep;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ ThemeCursor inCursor;
+ UInt32 inAnimationStep;
#ifndef SetAnimatedThemeCursor
- PyMac_PRECHECK(SetAnimatedThemeCursor);
+ PyMac_PRECHECK(SetAnimatedThemeCursor);
#endif
- if (!PyArg_ParseTuple(_args, "ll",
- &inCursor,
- &inAnimationStep))
- return NULL;
- _err = SetAnimatedThemeCursor(inCursor,
- inAnimationStep);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "ll",
+ &inCursor,
+ &inAnimationStep))
+ return NULL;
+ _err = SetAnimatedThemeCursor(inCursor,
+ inAnimationStep);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *App_GetThemeScrollBarThumbStyle(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- ThemeScrollBarThumbStyle outStyle;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ ThemeScrollBarThumbStyle outStyle;
#ifndef GetThemeScrollBarThumbStyle
- PyMac_PRECHECK(GetThemeScrollBarThumbStyle);
+ PyMac_PRECHECK(GetThemeScrollBarThumbStyle);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetThemeScrollBarThumbStyle(&outStyle);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("H",
- outStyle);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetThemeScrollBarThumbStyle(&outStyle);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("H",
+ outStyle);
+ return _res;
}
static PyObject *App_GetThemeScrollBarArrowStyle(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- ThemeScrollBarArrowStyle outStyle;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ ThemeScrollBarArrowStyle outStyle;
#ifndef GetThemeScrollBarArrowStyle
- PyMac_PRECHECK(GetThemeScrollBarArrowStyle);
+ PyMac_PRECHECK(GetThemeScrollBarArrowStyle);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetThemeScrollBarArrowStyle(&outStyle);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("H",
- outStyle);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetThemeScrollBarArrowStyle(&outStyle);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("H",
+ outStyle);
+ return _res;
}
static PyObject *App_GetThemeCheckBoxStyle(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- ThemeCheckBoxStyle outStyle;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ ThemeCheckBoxStyle outStyle;
#ifndef GetThemeCheckBoxStyle
- PyMac_PRECHECK(GetThemeCheckBoxStyle);
+ PyMac_PRECHECK(GetThemeCheckBoxStyle);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetThemeCheckBoxStyle(&outStyle);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("H",
- outStyle);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetThemeCheckBoxStyle(&outStyle);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("H",
+ outStyle);
+ return _res;
}
static PyObject *App_UseThemeFont(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- ThemeFontID inFontID;
- ScriptCode inScript;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ ThemeFontID inFontID;
+ ScriptCode inScript;
#ifndef UseThemeFont
- PyMac_PRECHECK(UseThemeFont);
+ PyMac_PRECHECK(UseThemeFont);
#endif
- if (!PyArg_ParseTuple(_args, "Hh",
- &inFontID,
- &inScript))
- return NULL;
- _err = UseThemeFont(inFontID,
- inScript);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "Hh",
+ &inFontID,
+ &inScript))
+ return NULL;
+ _err = UseThemeFont(inFontID,
+ inScript);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *App_DrawThemeTextBox(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- CFStringRef inString;
- ThemeFontID inFontID;
- ThemeDrawState inState;
- Boolean inWrapToWidth;
- Rect inBoundingBox;
- SInt16 inJust;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ CFStringRef inString;
+ ThemeFontID inFontID;
+ ThemeDrawState inState;
+ Boolean inWrapToWidth;
+ Rect inBoundingBox;
+ SInt16 inJust;
#ifndef DrawThemeTextBox
- PyMac_PRECHECK(DrawThemeTextBox);
-#endif
- if (!PyArg_ParseTuple(_args, "O&HlbO&h",
- CFStringRefObj_Convert, &inString,
- &inFontID,
- &inState,
- &inWrapToWidth,
- PyMac_GetRect, &inBoundingBox,
- &inJust))
- return NULL;
- _err = DrawThemeTextBox(inString,
- inFontID,
- inState,
- inWrapToWidth,
- &inBoundingBox,
- inJust,
- NULL);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(DrawThemeTextBox);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&HlbO&h",
+ CFStringRefObj_Convert, &inString,
+ &inFontID,
+ &inState,
+ &inWrapToWidth,
+ PyMac_GetRect, &inBoundingBox,
+ &inJust))
+ return NULL;
+ _err = DrawThemeTextBox(inString,
+ inFontID,
+ inState,
+ inWrapToWidth,
+ &inBoundingBox,
+ inJust,
+ NULL);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *App_TruncateThemeText(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- CFMutableStringRef inString;
- ThemeFontID inFontID;
- ThemeDrawState inState;
- SInt16 inPixelWidthLimit;
- TruncCode inTruncWhere;
- Boolean outTruncated;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ CFMutableStringRef inString;
+ ThemeFontID inFontID;
+ ThemeDrawState inState;
+ SInt16 inPixelWidthLimit;
+ TruncCode inTruncWhere;
+ Boolean outTruncated;
#ifndef TruncateThemeText
- PyMac_PRECHECK(TruncateThemeText);
-#endif
- if (!PyArg_ParseTuple(_args, "O&Hlhh",
- CFMutableStringRefObj_Convert, &inString,
- &inFontID,
- &inState,
- &inPixelWidthLimit,
- &inTruncWhere))
- return NULL;
- _err = TruncateThemeText(inString,
- inFontID,
- inState,
- inPixelWidthLimit,
- inTruncWhere,
- &outTruncated);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("b",
- outTruncated);
- return _res;
+ PyMac_PRECHECK(TruncateThemeText);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&Hlhh",
+ CFMutableStringRefObj_Convert, &inString,
+ &inFontID,
+ &inState,
+ &inPixelWidthLimit,
+ &inTruncWhere))
+ return NULL;
+ _err = TruncateThemeText(inString,
+ inFontID,
+ inState,
+ inPixelWidthLimit,
+ inTruncWhere,
+ &outTruncated);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("b",
+ outTruncated);
+ return _res;
}
static PyObject *App_GetThemeTextDimensions(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- CFStringRef inString;
- ThemeFontID inFontID;
- ThemeDrawState inState;
- Boolean inWrapToWidth;
- Point ioBounds;
- SInt16 outBaseline;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ CFStringRef inString;
+ ThemeFontID inFontID;
+ ThemeDrawState inState;
+ Boolean inWrapToWidth;
+ Point ioBounds;
+ SInt16 outBaseline;
#ifndef GetThemeTextDimensions
- PyMac_PRECHECK(GetThemeTextDimensions);
-#endif
- if (!PyArg_ParseTuple(_args, "O&HlbO&",
- CFStringRefObj_Convert, &inString,
- &inFontID,
- &inState,
- &inWrapToWidth,
- PyMac_GetPoint, &ioBounds))
- return NULL;
- _err = GetThemeTextDimensions(inString,
- inFontID,
- inState,
- inWrapToWidth,
- &ioBounds,
- &outBaseline);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&h",
- PyMac_BuildPoint, ioBounds,
- outBaseline);
- return _res;
+ PyMac_PRECHECK(GetThemeTextDimensions);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&HlbO&",
+ CFStringRefObj_Convert, &inString,
+ &inFontID,
+ &inState,
+ &inWrapToWidth,
+ PyMac_GetPoint, &ioBounds))
+ return NULL;
+ _err = GetThemeTextDimensions(inString,
+ inFontID,
+ inState,
+ inWrapToWidth,
+ &ioBounds,
+ &outBaseline);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&h",
+ PyMac_BuildPoint, ioBounds,
+ outBaseline);
+ return _res;
}
static PyObject *App_GetThemeTextShadowOutset(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- ThemeFontID inFontID;
- ThemeDrawState inState;
- Rect outOutset;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ ThemeFontID inFontID;
+ ThemeDrawState inState;
+ Rect outOutset;
#ifndef GetThemeTextShadowOutset
- PyMac_PRECHECK(GetThemeTextShadowOutset);
+ PyMac_PRECHECK(GetThemeTextShadowOutset);
#endif
- if (!PyArg_ParseTuple(_args, "Hl",
- &inFontID,
- &inState))
- return NULL;
- _err = GetThemeTextShadowOutset(inFontID,
- inState,
- &outOutset);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- PyMac_BuildRect, &outOutset);
- return _res;
+ if (!PyArg_ParseTuple(_args, "Hl",
+ &inFontID,
+ &inState))
+ return NULL;
+ _err = GetThemeTextShadowOutset(inFontID,
+ inState,
+ &outOutset);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildRect, &outOutset);
+ return _res;
}
static PyObject *App_DrawThemeScrollBarArrows(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- Rect bounds;
- ThemeTrackEnableState enableState;
- ThemeTrackPressState pressState;
- Boolean isHoriz;
- Rect trackBounds;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Rect bounds;
+ ThemeTrackEnableState enableState;
+ ThemeTrackPressState pressState;
+ Boolean isHoriz;
+ Rect trackBounds;
#ifndef DrawThemeScrollBarArrows
- PyMac_PRECHECK(DrawThemeScrollBarArrows);
-#endif
- if (!PyArg_ParseTuple(_args, "O&bbb",
- PyMac_GetRect, &bounds,
- &enableState,
- &pressState,
- &isHoriz))
- return NULL;
- _err = DrawThemeScrollBarArrows(&bounds,
- enableState,
- pressState,
- isHoriz,
- &trackBounds);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- PyMac_BuildRect, &trackBounds);
- return _res;
+ PyMac_PRECHECK(DrawThemeScrollBarArrows);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&bbb",
+ PyMac_GetRect, &bounds,
+ &enableState,
+ &pressState,
+ &isHoriz))
+ return NULL;
+ _err = DrawThemeScrollBarArrows(&bounds,
+ enableState,
+ pressState,
+ isHoriz,
+ &trackBounds);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildRect, &trackBounds);
+ return _res;
}
static PyObject *App_GetThemeScrollBarTrackRect(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- Rect bounds;
- ThemeTrackEnableState enableState;
- ThemeTrackPressState pressState;
- Boolean isHoriz;
- Rect trackBounds;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Rect bounds;
+ ThemeTrackEnableState enableState;
+ ThemeTrackPressState pressState;
+ Boolean isHoriz;
+ Rect trackBounds;
#ifndef GetThemeScrollBarTrackRect
- PyMac_PRECHECK(GetThemeScrollBarTrackRect);
-#endif
- if (!PyArg_ParseTuple(_args, "O&bbb",
- PyMac_GetRect, &bounds,
- &enableState,
- &pressState,
- &isHoriz))
- return NULL;
- _err = GetThemeScrollBarTrackRect(&bounds,
- enableState,
- pressState,
- isHoriz,
- &trackBounds);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- PyMac_BuildRect, &trackBounds);
- return _res;
+ PyMac_PRECHECK(GetThemeScrollBarTrackRect);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&bbb",
+ PyMac_GetRect, &bounds,
+ &enableState,
+ &pressState,
+ &isHoriz))
+ return NULL;
+ _err = GetThemeScrollBarTrackRect(&bounds,
+ enableState,
+ pressState,
+ isHoriz,
+ &trackBounds);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildRect, &trackBounds);
+ return _res;
}
static PyObject *App_HitTestThemeScrollBarArrows(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- Rect scrollBarBounds;
- ThemeTrackEnableState enableState;
- ThemeTrackPressState pressState;
- Boolean isHoriz;
- Point ptHit;
- Rect trackBounds;
- ControlPartCode partcode;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ Rect scrollBarBounds;
+ ThemeTrackEnableState enableState;
+ ThemeTrackPressState pressState;
+ Boolean isHoriz;
+ Point ptHit;
+ Rect trackBounds;
+ ControlPartCode partcode;
#ifndef HitTestThemeScrollBarArrows
- PyMac_PRECHECK(HitTestThemeScrollBarArrows);
-#endif
- if (!PyArg_ParseTuple(_args, "O&bbbO&",
- PyMac_GetRect, &scrollBarBounds,
- &enableState,
- &pressState,
- &isHoriz,
- PyMac_GetPoint, &ptHit))
- return NULL;
- _rv = HitTestThemeScrollBarArrows(&scrollBarBounds,
- enableState,
- pressState,
- isHoriz,
- ptHit,
- &trackBounds,
- &partcode);
- _res = Py_BuildValue("bO&h",
- _rv,
- PyMac_BuildRect, &trackBounds,
- partcode);
- return _res;
+ PyMac_PRECHECK(HitTestThemeScrollBarArrows);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&bbbO&",
+ PyMac_GetRect, &scrollBarBounds,
+ &enableState,
+ &pressState,
+ &isHoriz,
+ PyMac_GetPoint, &ptHit))
+ return NULL;
+ _rv = HitTestThemeScrollBarArrows(&scrollBarBounds,
+ enableState,
+ pressState,
+ isHoriz,
+ ptHit,
+ &trackBounds,
+ &partcode);
+ _res = Py_BuildValue("bO&h",
+ _rv,
+ PyMac_BuildRect, &trackBounds,
+ partcode);
+ return _res;
}
static PyObject *App_DrawThemeScrollBarDelimiters(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- ThemeWindowType flavor;
- Rect inContRect;
- ThemeDrawState state;
- ThemeWindowAttributes attributes;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ ThemeWindowType flavor;
+ Rect inContRect;
+ ThemeDrawState state;
+ ThemeWindowAttributes attributes;
#ifndef DrawThemeScrollBarDelimiters
- PyMac_PRECHECK(DrawThemeScrollBarDelimiters);
-#endif
- if (!PyArg_ParseTuple(_args, "HO&ll",
- &flavor,
- PyMac_GetRect, &inContRect,
- &state,
- &attributes))
- return NULL;
- _err = DrawThemeScrollBarDelimiters(flavor,
- &inContRect,
- state,
- attributes);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(DrawThemeScrollBarDelimiters);
+#endif
+ if (!PyArg_ParseTuple(_args, "HO&ll",
+ &flavor,
+ PyMac_GetRect, &inContRect,
+ &state,
+ &attributes))
+ return NULL;
+ _err = DrawThemeScrollBarDelimiters(flavor,
+ &inContRect,
+ state,
+ attributes);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *App_DrawThemeButton(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- Rect inBounds;
- UInt16 inKind;
- ThemeButtonDrawInfo inNewInfo;
- ThemeButtonDrawInfo inPrevInfo;
- UInt32 inUserData;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Rect inBounds;
+ UInt16 inKind;
+ ThemeButtonDrawInfo inNewInfo;
+ ThemeButtonDrawInfo inPrevInfo;
+ UInt32 inUserData;
#ifndef DrawThemeButton
- PyMac_PRECHECK(DrawThemeButton);
-#endif
- if (!PyArg_ParseTuple(_args, "O&HO&O&l",
- PyMac_GetRect, &inBounds,
- &inKind,
- ThemeButtonDrawInfo_Convert, &inNewInfo,
- ThemeButtonDrawInfo_Convert, &inPrevInfo,
- &inUserData))
- return NULL;
- _err = DrawThemeButton(&inBounds,
- inKind,
- &inNewInfo,
- &inPrevInfo,
- NULL,
- NULL,
- inUserData);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(DrawThemeButton);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&HO&O&l",
+ PyMac_GetRect, &inBounds,
+ &inKind,
+ ThemeButtonDrawInfo_Convert, &inNewInfo,
+ ThemeButtonDrawInfo_Convert, &inPrevInfo,
+ &inUserData))
+ return NULL;
+ _err = DrawThemeButton(&inBounds,
+ inKind,
+ &inNewInfo,
+ &inPrevInfo,
+ NULL,
+ NULL,
+ inUserData);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *App_GetThemeButtonRegion(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- Rect inBounds;
- UInt16 inKind;
- ThemeButtonDrawInfo inNewInfo;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Rect inBounds;
+ UInt16 inKind;
+ ThemeButtonDrawInfo inNewInfo;
#ifndef GetThemeButtonRegion
- PyMac_PRECHECK(GetThemeButtonRegion);
-#endif
- if (!PyArg_ParseTuple(_args, "O&HO&",
- PyMac_GetRect, &inBounds,
- &inKind,
- ThemeButtonDrawInfo_Convert, &inNewInfo))
- return NULL;
- _err = GetThemeButtonRegion(&inBounds,
- inKind,
- &inNewInfo,
- (RgnHandle)0);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(GetThemeButtonRegion);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&HO&",
+ PyMac_GetRect, &inBounds,
+ &inKind,
+ ThemeButtonDrawInfo_Convert, &inNewInfo))
+ return NULL;
+ _err = GetThemeButtonRegion(&inBounds,
+ inKind,
+ &inNewInfo,
+ (RgnHandle)0);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *App_GetThemeButtonContentBounds(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- Rect inBounds;
- UInt16 inKind;
- ThemeButtonDrawInfo inDrawInfo;
- Rect outBounds;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Rect inBounds;
+ UInt16 inKind;
+ ThemeButtonDrawInfo inDrawInfo;
+ Rect outBounds;
#ifndef GetThemeButtonContentBounds
- PyMac_PRECHECK(GetThemeButtonContentBounds);
-#endif
- if (!PyArg_ParseTuple(_args, "O&HO&",
- PyMac_GetRect, &inBounds,
- &inKind,
- ThemeButtonDrawInfo_Convert, &inDrawInfo))
- return NULL;
- _err = GetThemeButtonContentBounds(&inBounds,
- inKind,
- &inDrawInfo,
- &outBounds);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- PyMac_BuildRect, &outBounds);
- return _res;
+ PyMac_PRECHECK(GetThemeButtonContentBounds);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&HO&",
+ PyMac_GetRect, &inBounds,
+ &inKind,
+ ThemeButtonDrawInfo_Convert, &inDrawInfo))
+ return NULL;
+ _err = GetThemeButtonContentBounds(&inBounds,
+ inKind,
+ &inDrawInfo,
+ &outBounds);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildRect, &outBounds);
+ return _res;
}
static PyObject *App_GetThemeButtonBackgroundBounds(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- Rect inBounds;
- UInt16 inKind;
- ThemeButtonDrawInfo inDrawInfo;
- Rect outBounds;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Rect inBounds;
+ UInt16 inKind;
+ ThemeButtonDrawInfo inDrawInfo;
+ Rect outBounds;
#ifndef GetThemeButtonBackgroundBounds
- PyMac_PRECHECK(GetThemeButtonBackgroundBounds);
-#endif
- if (!PyArg_ParseTuple(_args, "O&HO&",
- PyMac_GetRect, &inBounds,
- &inKind,
- ThemeButtonDrawInfo_Convert, &inDrawInfo))
- return NULL;
- _err = GetThemeButtonBackgroundBounds(&inBounds,
- inKind,
- &inDrawInfo,
- &outBounds);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- PyMac_BuildRect, &outBounds);
- return _res;
+ PyMac_PRECHECK(GetThemeButtonBackgroundBounds);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&HO&",
+ PyMac_GetRect, &inBounds,
+ &inKind,
+ ThemeButtonDrawInfo_Convert, &inDrawInfo))
+ return NULL;
+ _err = GetThemeButtonBackgroundBounds(&inBounds,
+ inKind,
+ &inDrawInfo,
+ &outBounds);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildRect, &outBounds);
+ return _res;
}
static PyObject *App_PlayThemeSound(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- ThemeSoundKind kind;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ ThemeSoundKind kind;
#ifndef PlayThemeSound
- PyMac_PRECHECK(PlayThemeSound);
+ PyMac_PRECHECK(PlayThemeSound);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetOSType, &kind))
- return NULL;
- _err = PlayThemeSound(kind);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetOSType, &kind))
+ return NULL;
+ _err = PlayThemeSound(kind);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *App_BeginThemeDragSound(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- ThemeDragSoundKind kind;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ ThemeDragSoundKind kind;
#ifndef BeginThemeDragSound
- PyMac_PRECHECK(BeginThemeDragSound);
+ PyMac_PRECHECK(BeginThemeDragSound);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetOSType, &kind))
- return NULL;
- _err = BeginThemeDragSound(kind);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetOSType, &kind))
+ return NULL;
+ _err = BeginThemeDragSound(kind);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *App_EndThemeDragSound(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
+ PyObject *_res = NULL;
+ OSStatus _err;
#ifndef EndThemeDragSound
- PyMac_PRECHECK(EndThemeDragSound);
+ PyMac_PRECHECK(EndThemeDragSound);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = EndThemeDragSound();
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = EndThemeDragSound();
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *App_DrawThemeTickMark(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- Rect bounds;
- ThemeDrawState state;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Rect bounds;
+ ThemeDrawState state;
#ifndef DrawThemeTickMark
- PyMac_PRECHECK(DrawThemeTickMark);
+ PyMac_PRECHECK(DrawThemeTickMark);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- PyMac_GetRect, &bounds,
- &state))
- return NULL;
- _err = DrawThemeTickMark(&bounds,
- state);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ PyMac_GetRect, &bounds,
+ &state))
+ return NULL;
+ _err = DrawThemeTickMark(&bounds,
+ state);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *App_DrawThemeChasingArrows(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- Rect bounds;
- UInt32 index;
- ThemeDrawState state;
- UInt32 eraseData;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Rect bounds;
+ UInt32 index;
+ ThemeDrawState state;
+ UInt32 eraseData;
#ifndef DrawThemeChasingArrows
- PyMac_PRECHECK(DrawThemeChasingArrows);
-#endif
- if (!PyArg_ParseTuple(_args, "O&lll",
- PyMac_GetRect, &bounds,
- &index,
- &state,
- &eraseData))
- return NULL;
- _err = DrawThemeChasingArrows(&bounds,
- index,
- state,
- NULL,
- eraseData);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(DrawThemeChasingArrows);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&lll",
+ PyMac_GetRect, &bounds,
+ &index,
+ &state,
+ &eraseData))
+ return NULL;
+ _err = DrawThemeChasingArrows(&bounds,
+ index,
+ state,
+ NULL,
+ eraseData);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *App_DrawThemePopupArrow(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- Rect bounds;
- ThemeArrowOrientation orientation;
- ThemePopupArrowSize size;
- ThemeDrawState state;
- UInt32 eraseData;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Rect bounds;
+ ThemeArrowOrientation orientation;
+ ThemePopupArrowSize size;
+ ThemeDrawState state;
+ UInt32 eraseData;
#ifndef DrawThemePopupArrow
- PyMac_PRECHECK(DrawThemePopupArrow);
-#endif
- if (!PyArg_ParseTuple(_args, "O&HHll",
- PyMac_GetRect, &bounds,
- &orientation,
- &size,
- &state,
- &eraseData))
- return NULL;
- _err = DrawThemePopupArrow(&bounds,
- orientation,
- size,
- state,
- NULL,
- eraseData);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(DrawThemePopupArrow);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&HHll",
+ PyMac_GetRect, &bounds,
+ &orientation,
+ &size,
+ &state,
+ &eraseData))
+ return NULL;
+ _err = DrawThemePopupArrow(&bounds,
+ orientation,
+ size,
+ state,
+ NULL,
+ eraseData);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *App_DrawThemeStandaloneGrowBox(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- Point origin;
- ThemeGrowDirection growDirection;
- Boolean isSmall;
- ThemeDrawState state;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Point origin;
+ ThemeGrowDirection growDirection;
+ Boolean isSmall;
+ ThemeDrawState state;
#ifndef DrawThemeStandaloneGrowBox
- PyMac_PRECHECK(DrawThemeStandaloneGrowBox);
-#endif
- if (!PyArg_ParseTuple(_args, "O&Hbl",
- PyMac_GetPoint, &origin,
- &growDirection,
- &isSmall,
- &state))
- return NULL;
- _err = DrawThemeStandaloneGrowBox(origin,
- growDirection,
- isSmall,
- state);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(DrawThemeStandaloneGrowBox);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&Hbl",
+ PyMac_GetPoint, &origin,
+ &growDirection,
+ &isSmall,
+ &state))
+ return NULL;
+ _err = DrawThemeStandaloneGrowBox(origin,
+ growDirection,
+ isSmall,
+ state);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *App_DrawThemeStandaloneNoGrowBox(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- Point origin;
- ThemeGrowDirection growDirection;
- Boolean isSmall;
- ThemeDrawState state;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Point origin;
+ ThemeGrowDirection growDirection;
+ Boolean isSmall;
+ ThemeDrawState state;
#ifndef DrawThemeStandaloneNoGrowBox
- PyMac_PRECHECK(DrawThemeStandaloneNoGrowBox);
-#endif
- if (!PyArg_ParseTuple(_args, "O&Hbl",
- PyMac_GetPoint, &origin,
- &growDirection,
- &isSmall,
- &state))
- return NULL;
- _err = DrawThemeStandaloneNoGrowBox(origin,
- growDirection,
- isSmall,
- state);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(DrawThemeStandaloneNoGrowBox);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&Hbl",
+ PyMac_GetPoint, &origin,
+ &growDirection,
+ &isSmall,
+ &state))
+ return NULL;
+ _err = DrawThemeStandaloneNoGrowBox(origin,
+ growDirection,
+ isSmall,
+ state);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *App_GetThemeStandaloneGrowBoxBounds(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- Point origin;
- ThemeGrowDirection growDirection;
- Boolean isSmall;
- Rect bounds;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Point origin;
+ ThemeGrowDirection growDirection;
+ Boolean isSmall;
+ Rect bounds;
#ifndef GetThemeStandaloneGrowBoxBounds
- PyMac_PRECHECK(GetThemeStandaloneGrowBoxBounds);
-#endif
- if (!PyArg_ParseTuple(_args, "O&Hb",
- PyMac_GetPoint, &origin,
- &growDirection,
- &isSmall))
- return NULL;
- _err = GetThemeStandaloneGrowBoxBounds(origin,
- growDirection,
- isSmall,
- &bounds);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- PyMac_BuildRect, &bounds);
- return _res;
+ PyMac_PRECHECK(GetThemeStandaloneGrowBoxBounds);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&Hb",
+ PyMac_GetPoint, &origin,
+ &growDirection,
+ &isSmall))
+ return NULL;
+ _err = GetThemeStandaloneGrowBoxBounds(origin,
+ growDirection,
+ isSmall,
+ &bounds);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildRect, &bounds);
+ return _res;
}
static PyObject *App_NormalizeThemeDrawingState(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
+ PyObject *_res = NULL;
+ OSStatus _err;
#ifndef NormalizeThemeDrawingState
- PyMac_PRECHECK(NormalizeThemeDrawingState);
+ PyMac_PRECHECK(NormalizeThemeDrawingState);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = NormalizeThemeDrawingState();
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = NormalizeThemeDrawingState();
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *App_GetThemeDrawingState(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- ThemeDrawingState outState;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ ThemeDrawingState outState;
#ifndef GetThemeDrawingState
- PyMac_PRECHECK(GetThemeDrawingState);
+ PyMac_PRECHECK(GetThemeDrawingState);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetThemeDrawingState(&outState);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- ThemeDrawingStateObj_New, outState);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetThemeDrawingState(&outState);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ ThemeDrawingStateObj_New, outState);
+ return _res;
}
static PyObject *App_ApplyThemeBackground(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- ThemeBackgroundKind inKind;
- Rect bounds;
- ThemeDrawState inState;
- SInt16 inDepth;
- Boolean inColorDev;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ ThemeBackgroundKind inKind;
+ Rect bounds;
+ ThemeDrawState inState;
+ SInt16 inDepth;
+ Boolean inColorDev;
#ifndef ApplyThemeBackground
- PyMac_PRECHECK(ApplyThemeBackground);
-#endif
- if (!PyArg_ParseTuple(_args, "lO&lhb",
- &inKind,
- PyMac_GetRect, &bounds,
- &inState,
- &inDepth,
- &inColorDev))
- return NULL;
- _err = ApplyThemeBackground(inKind,
- &bounds,
- inState,
- inDepth,
- inColorDev);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(ApplyThemeBackground);
+#endif
+ if (!PyArg_ParseTuple(_args, "lO&lhb",
+ &inKind,
+ PyMac_GetRect, &bounds,
+ &inState,
+ &inDepth,
+ &inColorDev))
+ return NULL;
+ _err = ApplyThemeBackground(inKind,
+ &bounds,
+ inState,
+ inDepth,
+ inColorDev);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *App_SetThemeTextColorForWindow(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowPtr window;
- Boolean isActive;
- SInt16 depth;
- Boolean isColorDev;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowPtr window;
+ Boolean isActive;
+ SInt16 depth;
+ Boolean isColorDev;
#ifndef SetThemeTextColorForWindow
- PyMac_PRECHECK(SetThemeTextColorForWindow);
-#endif
- if (!PyArg_ParseTuple(_args, "O&bhb",
- WinObj_Convert, &window,
- &isActive,
- &depth,
- &isColorDev))
- return NULL;
- _err = SetThemeTextColorForWindow(window,
- isActive,
- depth,
- isColorDev);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(SetThemeTextColorForWindow);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&bhb",
+ WinObj_Convert, &window,
+ &isActive,
+ &depth,
+ &isColorDev))
+ return NULL;
+ _err = SetThemeTextColorForWindow(window,
+ isActive,
+ depth,
+ isColorDev);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *App_IsValidAppearanceFileType(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- OSType fileType;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ OSType fileType;
#ifndef IsValidAppearanceFileType
- PyMac_PRECHECK(IsValidAppearanceFileType);
+ PyMac_PRECHECK(IsValidAppearanceFileType);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetOSType, &fileType))
- return NULL;
- _rv = IsValidAppearanceFileType(fileType);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetOSType, &fileType))
+ return NULL;
+ _rv = IsValidAppearanceFileType(fileType);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *App_GetThemeBrushAsColor(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- ThemeBrush inBrush;
- SInt16 inDepth;
- Boolean inColorDev;
- RGBColor outColor;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ ThemeBrush inBrush;
+ SInt16 inDepth;
+ Boolean inColorDev;
+ RGBColor outColor;
#ifndef GetThemeBrushAsColor
- PyMac_PRECHECK(GetThemeBrushAsColor);
-#endif
- if (!PyArg_ParseTuple(_args, "hhb",
- &inBrush,
- &inDepth,
- &inColorDev))
- return NULL;
- _err = GetThemeBrushAsColor(inBrush,
- inDepth,
- inColorDev,
- &outColor);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- QdRGB_New, &outColor);
- return _res;
+ PyMac_PRECHECK(GetThemeBrushAsColor);
+#endif
+ if (!PyArg_ParseTuple(_args, "hhb",
+ &inBrush,
+ &inDepth,
+ &inColorDev))
+ return NULL;
+ _err = GetThemeBrushAsColor(inBrush,
+ inDepth,
+ inColorDev,
+ &outColor);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ QdRGB_New, &outColor);
+ return _res;
}
static PyObject *App_GetThemeTextColor(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- ThemeTextColor inColor;
- SInt16 inDepth;
- Boolean inColorDev;
- RGBColor outColor;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ ThemeTextColor inColor;
+ SInt16 inDepth;
+ Boolean inColorDev;
+ RGBColor outColor;
#ifndef GetThemeTextColor
- PyMac_PRECHECK(GetThemeTextColor);
-#endif
- if (!PyArg_ParseTuple(_args, "hhb",
- &inColor,
- &inDepth,
- &inColorDev))
- return NULL;
- _err = GetThemeTextColor(inColor,
- inDepth,
- inColorDev,
- &outColor);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- QdRGB_New, &outColor);
- return _res;
+ PyMac_PRECHECK(GetThemeTextColor);
+#endif
+ if (!PyArg_ParseTuple(_args, "hhb",
+ &inColor,
+ &inDepth,
+ &inColorDev))
+ return NULL;
+ _err = GetThemeTextColor(inColor,
+ inDepth,
+ inColorDev,
+ &outColor);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ QdRGB_New, &outColor);
+ return _res;
}
static PyObject *App_GetThemeMetric(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- ThemeMetric inMetric;
- SInt32 outMetric;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ ThemeMetric inMetric;
+ SInt32 outMetric;
#ifndef GetThemeMetric
- PyMac_PRECHECK(GetThemeMetric);
+ PyMac_PRECHECK(GetThemeMetric);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &inMetric))
- return NULL;
- _err = GetThemeMetric(inMetric,
- &outMetric);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- outMetric);
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &inMetric))
+ return NULL;
+ _err = GetThemeMetric(inMetric,
+ &outMetric);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ outMetric);
+ return _res;
}
static PyMethodDef App_methods[] = {
- {"RegisterAppearanceClient", (PyCFunction)App_RegisterAppearanceClient, 1,
- PyDoc_STR("() -> None")},
- {"UnregisterAppearanceClient", (PyCFunction)App_UnregisterAppearanceClient, 1,
- PyDoc_STR("() -> None")},
- {"SetThemePen", (PyCFunction)App_SetThemePen, 1,
- PyDoc_STR("(ThemeBrush inBrush, SInt16 inDepth, Boolean inIsColorDevice) -> None")},
- {"SetThemeBackground", (PyCFunction)App_SetThemeBackground, 1,
- PyDoc_STR("(ThemeBrush inBrush, SInt16 inDepth, Boolean inIsColorDevice) -> None")},
- {"SetThemeTextColor", (PyCFunction)App_SetThemeTextColor, 1,
- PyDoc_STR("(ThemeTextColor inColor, SInt16 inDepth, Boolean inIsColorDevice) -> None")},
- {"SetThemeWindowBackground", (PyCFunction)App_SetThemeWindowBackground, 1,
- PyDoc_STR("(WindowPtr inWindow, ThemeBrush inBrush, Boolean inUpdate) -> None")},
- {"DrawThemeWindowHeader", (PyCFunction)App_DrawThemeWindowHeader, 1,
- PyDoc_STR("(Rect inRect, ThemeDrawState inState) -> None")},
- {"DrawThemeWindowListViewHeader", (PyCFunction)App_DrawThemeWindowListViewHeader, 1,
- PyDoc_STR("(Rect inRect, ThemeDrawState inState) -> None")},
- {"DrawThemePlacard", (PyCFunction)App_DrawThemePlacard, 1,
- PyDoc_STR("(Rect inRect, ThemeDrawState inState) -> None")},
- {"DrawThemeEditTextFrame", (PyCFunction)App_DrawThemeEditTextFrame, 1,
- PyDoc_STR("(Rect inRect, ThemeDrawState inState) -> None")},
- {"DrawThemeListBoxFrame", (PyCFunction)App_DrawThemeListBoxFrame, 1,
- PyDoc_STR("(Rect inRect, ThemeDrawState inState) -> None")},
- {"DrawThemeFocusRect", (PyCFunction)App_DrawThemeFocusRect, 1,
- PyDoc_STR("(Rect inRect, Boolean inHasFocus) -> None")},
- {"DrawThemePrimaryGroup", (PyCFunction)App_DrawThemePrimaryGroup, 1,
- PyDoc_STR("(Rect inRect, ThemeDrawState inState) -> None")},
- {"DrawThemeSecondaryGroup", (PyCFunction)App_DrawThemeSecondaryGroup, 1,
- PyDoc_STR("(Rect inRect, ThemeDrawState inState) -> None")},
- {"DrawThemeSeparator", (PyCFunction)App_DrawThemeSeparator, 1,
- PyDoc_STR("(Rect inRect, ThemeDrawState inState) -> None")},
- {"DrawThemeModelessDialogFrame", (PyCFunction)App_DrawThemeModelessDialogFrame, 1,
- PyDoc_STR("(Rect inRect, ThemeDrawState inState) -> None")},
- {"DrawThemeGenericWell", (PyCFunction)App_DrawThemeGenericWell, 1,
- PyDoc_STR("(Rect inRect, ThemeDrawState inState, Boolean inFillCenter) -> None")},
- {"DrawThemeFocusRegion", (PyCFunction)App_DrawThemeFocusRegion, 1,
- PyDoc_STR("(Boolean inHasFocus) -> None")},
- {"IsThemeInColor", (PyCFunction)App_IsThemeInColor, 1,
- PyDoc_STR("(SInt16 inDepth, Boolean inIsColorDevice) -> (Boolean _rv)")},
- {"GetThemeAccentColors", (PyCFunction)App_GetThemeAccentColors, 1,
- PyDoc_STR("() -> (CTabHandle outColors)")},
- {"DrawThemeMenuBarBackground", (PyCFunction)App_DrawThemeMenuBarBackground, 1,
- PyDoc_STR("(Rect inBounds, ThemeMenuBarState inState, UInt32 inAttributes) -> None")},
- {"GetThemeMenuBarHeight", (PyCFunction)App_GetThemeMenuBarHeight, 1,
- PyDoc_STR("() -> (SInt16 outHeight)")},
- {"DrawThemeMenuBackground", (PyCFunction)App_DrawThemeMenuBackground, 1,
- PyDoc_STR("(Rect inMenuRect, ThemeMenuType inMenuType) -> None")},
- {"GetThemeMenuBackgroundRegion", (PyCFunction)App_GetThemeMenuBackgroundRegion, 1,
- PyDoc_STR("(Rect inMenuRect, ThemeMenuType menuType) -> None")},
- {"DrawThemeMenuSeparator", (PyCFunction)App_DrawThemeMenuSeparator, 1,
- PyDoc_STR("(Rect inItemRect) -> None")},
- {"GetThemeMenuSeparatorHeight", (PyCFunction)App_GetThemeMenuSeparatorHeight, 1,
- PyDoc_STR("() -> (SInt16 outHeight)")},
- {"GetThemeMenuItemExtra", (PyCFunction)App_GetThemeMenuItemExtra, 1,
- PyDoc_STR("(ThemeMenuItemType inItemType) -> (SInt16 outHeight, SInt16 outWidth)")},
- {"GetThemeMenuTitleExtra", (PyCFunction)App_GetThemeMenuTitleExtra, 1,
- PyDoc_STR("(Boolean inIsSquished) -> (SInt16 outWidth)")},
- {"DrawThemeTabPane", (PyCFunction)App_DrawThemeTabPane, 1,
- PyDoc_STR("(Rect inRect, ThemeDrawState inState) -> None")},
- {"GetThemeTabRegion", (PyCFunction)App_GetThemeTabRegion, 1,
- PyDoc_STR("(Rect inRect, ThemeTabStyle inStyle, ThemeTabDirection inDirection) -> None")},
- {"SetThemeCursor", (PyCFunction)App_SetThemeCursor, 1,
- PyDoc_STR("(ThemeCursor inCursor) -> None")},
- {"SetAnimatedThemeCursor", (PyCFunction)App_SetAnimatedThemeCursor, 1,
- PyDoc_STR("(ThemeCursor inCursor, UInt32 inAnimationStep) -> None")},
- {"GetThemeScrollBarThumbStyle", (PyCFunction)App_GetThemeScrollBarThumbStyle, 1,
- PyDoc_STR("() -> (ThemeScrollBarThumbStyle outStyle)")},
- {"GetThemeScrollBarArrowStyle", (PyCFunction)App_GetThemeScrollBarArrowStyle, 1,
- PyDoc_STR("() -> (ThemeScrollBarArrowStyle outStyle)")},
- {"GetThemeCheckBoxStyle", (PyCFunction)App_GetThemeCheckBoxStyle, 1,
- PyDoc_STR("() -> (ThemeCheckBoxStyle outStyle)")},
- {"UseThemeFont", (PyCFunction)App_UseThemeFont, 1,
- PyDoc_STR("(ThemeFontID inFontID, ScriptCode inScript) -> None")},
- {"DrawThemeTextBox", (PyCFunction)App_DrawThemeTextBox, 1,
- PyDoc_STR("(CFStringRef inString, ThemeFontID inFontID, ThemeDrawState inState, Boolean inWrapToWidth, Rect inBoundingBox, SInt16 inJust) -> None")},
- {"TruncateThemeText", (PyCFunction)App_TruncateThemeText, 1,
- PyDoc_STR("(CFMutableStringRef inString, ThemeFontID inFontID, ThemeDrawState inState, SInt16 inPixelWidthLimit, TruncCode inTruncWhere) -> (Boolean outTruncated)")},
- {"GetThemeTextDimensions", (PyCFunction)App_GetThemeTextDimensions, 1,
- PyDoc_STR("(CFStringRef inString, ThemeFontID inFontID, ThemeDrawState inState, Boolean inWrapToWidth, Point ioBounds) -> (Point ioBounds, SInt16 outBaseline)")},
- {"GetThemeTextShadowOutset", (PyCFunction)App_GetThemeTextShadowOutset, 1,
- PyDoc_STR("(ThemeFontID inFontID, ThemeDrawState inState) -> (Rect outOutset)")},
- {"DrawThemeScrollBarArrows", (PyCFunction)App_DrawThemeScrollBarArrows, 1,
- PyDoc_STR("(Rect bounds, ThemeTrackEnableState enableState, ThemeTrackPressState pressState, Boolean isHoriz) -> (Rect trackBounds)")},
- {"GetThemeScrollBarTrackRect", (PyCFunction)App_GetThemeScrollBarTrackRect, 1,
- PyDoc_STR("(Rect bounds, ThemeTrackEnableState enableState, ThemeTrackPressState pressState, Boolean isHoriz) -> (Rect trackBounds)")},
- {"HitTestThemeScrollBarArrows", (PyCFunction)App_HitTestThemeScrollBarArrows, 1,
- PyDoc_STR("(Rect scrollBarBounds, ThemeTrackEnableState enableState, ThemeTrackPressState pressState, Boolean isHoriz, Point ptHit) -> (Boolean _rv, Rect trackBounds, ControlPartCode partcode)")},
- {"DrawThemeScrollBarDelimiters", (PyCFunction)App_DrawThemeScrollBarDelimiters, 1,
- PyDoc_STR("(ThemeWindowType flavor, Rect inContRect, ThemeDrawState state, ThemeWindowAttributes attributes) -> None")},
- {"DrawThemeButton", (PyCFunction)App_DrawThemeButton, 1,
- PyDoc_STR("(Rect inBounds, UInt16 inKind, ThemeButtonDrawInfo inNewInfo, ThemeButtonDrawInfo inPrevInfo, UInt32 inUserData) -> None")},
- {"GetThemeButtonRegion", (PyCFunction)App_GetThemeButtonRegion, 1,
- PyDoc_STR("(Rect inBounds, UInt16 inKind, ThemeButtonDrawInfo inNewInfo) -> None")},
- {"GetThemeButtonContentBounds", (PyCFunction)App_GetThemeButtonContentBounds, 1,
- PyDoc_STR("(Rect inBounds, UInt16 inKind, ThemeButtonDrawInfo inDrawInfo) -> (Rect outBounds)")},
- {"GetThemeButtonBackgroundBounds", (PyCFunction)App_GetThemeButtonBackgroundBounds, 1,
- PyDoc_STR("(Rect inBounds, UInt16 inKind, ThemeButtonDrawInfo inDrawInfo) -> (Rect outBounds)")},
- {"PlayThemeSound", (PyCFunction)App_PlayThemeSound, 1,
- PyDoc_STR("(ThemeSoundKind kind) -> None")},
- {"BeginThemeDragSound", (PyCFunction)App_BeginThemeDragSound, 1,
- PyDoc_STR("(ThemeDragSoundKind kind) -> None")},
- {"EndThemeDragSound", (PyCFunction)App_EndThemeDragSound, 1,
- PyDoc_STR("() -> None")},
- {"DrawThemeTickMark", (PyCFunction)App_DrawThemeTickMark, 1,
- PyDoc_STR("(Rect bounds, ThemeDrawState state) -> None")},
- {"DrawThemeChasingArrows", (PyCFunction)App_DrawThemeChasingArrows, 1,
- PyDoc_STR("(Rect bounds, UInt32 index, ThemeDrawState state, UInt32 eraseData) -> None")},
- {"DrawThemePopupArrow", (PyCFunction)App_DrawThemePopupArrow, 1,
- PyDoc_STR("(Rect bounds, ThemeArrowOrientation orientation, ThemePopupArrowSize size, ThemeDrawState state, UInt32 eraseData) -> None")},
- {"DrawThemeStandaloneGrowBox", (PyCFunction)App_DrawThemeStandaloneGrowBox, 1,
- PyDoc_STR("(Point origin, ThemeGrowDirection growDirection, Boolean isSmall, ThemeDrawState state) -> None")},
- {"DrawThemeStandaloneNoGrowBox", (PyCFunction)App_DrawThemeStandaloneNoGrowBox, 1,
- PyDoc_STR("(Point origin, ThemeGrowDirection growDirection, Boolean isSmall, ThemeDrawState state) -> None")},
- {"GetThemeStandaloneGrowBoxBounds", (PyCFunction)App_GetThemeStandaloneGrowBoxBounds, 1,
- PyDoc_STR("(Point origin, ThemeGrowDirection growDirection, Boolean isSmall) -> (Rect bounds)")},
- {"NormalizeThemeDrawingState", (PyCFunction)App_NormalizeThemeDrawingState, 1,
- PyDoc_STR("() -> None")},
- {"GetThemeDrawingState", (PyCFunction)App_GetThemeDrawingState, 1,
- PyDoc_STR("() -> (ThemeDrawingState outState)")},
- {"ApplyThemeBackground", (PyCFunction)App_ApplyThemeBackground, 1,
- PyDoc_STR("(ThemeBackgroundKind inKind, Rect bounds, ThemeDrawState inState, SInt16 inDepth, Boolean inColorDev) -> None")},
- {"SetThemeTextColorForWindow", (PyCFunction)App_SetThemeTextColorForWindow, 1,
- PyDoc_STR("(WindowPtr window, Boolean isActive, SInt16 depth, Boolean isColorDev) -> None")},
- {"IsValidAppearanceFileType", (PyCFunction)App_IsValidAppearanceFileType, 1,
- PyDoc_STR("(OSType fileType) -> (Boolean _rv)")},
- {"GetThemeBrushAsColor", (PyCFunction)App_GetThemeBrushAsColor, 1,
- PyDoc_STR("(ThemeBrush inBrush, SInt16 inDepth, Boolean inColorDev) -> (RGBColor outColor)")},
- {"GetThemeTextColor", (PyCFunction)App_GetThemeTextColor, 1,
- PyDoc_STR("(ThemeTextColor inColor, SInt16 inDepth, Boolean inColorDev) -> (RGBColor outColor)")},
- {"GetThemeMetric", (PyCFunction)App_GetThemeMetric, 1,
- PyDoc_STR("(ThemeMetric inMetric) -> (SInt32 outMetric)")},
- {NULL, NULL, 0}
+ {"RegisterAppearanceClient", (PyCFunction)App_RegisterAppearanceClient, 1,
+ PyDoc_STR("() -> None")},
+ {"UnregisterAppearanceClient", (PyCFunction)App_UnregisterAppearanceClient, 1,
+ PyDoc_STR("() -> None")},
+ {"SetThemePen", (PyCFunction)App_SetThemePen, 1,
+ PyDoc_STR("(ThemeBrush inBrush, SInt16 inDepth, Boolean inIsColorDevice) -> None")},
+ {"SetThemeBackground", (PyCFunction)App_SetThemeBackground, 1,
+ PyDoc_STR("(ThemeBrush inBrush, SInt16 inDepth, Boolean inIsColorDevice) -> None")},
+ {"SetThemeTextColor", (PyCFunction)App_SetThemeTextColor, 1,
+ PyDoc_STR("(ThemeTextColor inColor, SInt16 inDepth, Boolean inIsColorDevice) -> None")},
+ {"SetThemeWindowBackground", (PyCFunction)App_SetThemeWindowBackground, 1,
+ PyDoc_STR("(WindowPtr inWindow, ThemeBrush inBrush, Boolean inUpdate) -> None")},
+ {"DrawThemeWindowHeader", (PyCFunction)App_DrawThemeWindowHeader, 1,
+ PyDoc_STR("(Rect inRect, ThemeDrawState inState) -> None")},
+ {"DrawThemeWindowListViewHeader", (PyCFunction)App_DrawThemeWindowListViewHeader, 1,
+ PyDoc_STR("(Rect inRect, ThemeDrawState inState) -> None")},
+ {"DrawThemePlacard", (PyCFunction)App_DrawThemePlacard, 1,
+ PyDoc_STR("(Rect inRect, ThemeDrawState inState) -> None")},
+ {"DrawThemeEditTextFrame", (PyCFunction)App_DrawThemeEditTextFrame, 1,
+ PyDoc_STR("(Rect inRect, ThemeDrawState inState) -> None")},
+ {"DrawThemeListBoxFrame", (PyCFunction)App_DrawThemeListBoxFrame, 1,
+ PyDoc_STR("(Rect inRect, ThemeDrawState inState) -> None")},
+ {"DrawThemeFocusRect", (PyCFunction)App_DrawThemeFocusRect, 1,
+ PyDoc_STR("(Rect inRect, Boolean inHasFocus) -> None")},
+ {"DrawThemePrimaryGroup", (PyCFunction)App_DrawThemePrimaryGroup, 1,
+ PyDoc_STR("(Rect inRect, ThemeDrawState inState) -> None")},
+ {"DrawThemeSecondaryGroup", (PyCFunction)App_DrawThemeSecondaryGroup, 1,
+ PyDoc_STR("(Rect inRect, ThemeDrawState inState) -> None")},
+ {"DrawThemeSeparator", (PyCFunction)App_DrawThemeSeparator, 1,
+ PyDoc_STR("(Rect inRect, ThemeDrawState inState) -> None")},
+ {"DrawThemeModelessDialogFrame", (PyCFunction)App_DrawThemeModelessDialogFrame, 1,
+ PyDoc_STR("(Rect inRect, ThemeDrawState inState) -> None")},
+ {"DrawThemeGenericWell", (PyCFunction)App_DrawThemeGenericWell, 1,
+ PyDoc_STR("(Rect inRect, ThemeDrawState inState, Boolean inFillCenter) -> None")},
+ {"DrawThemeFocusRegion", (PyCFunction)App_DrawThemeFocusRegion, 1,
+ PyDoc_STR("(Boolean inHasFocus) -> None")},
+ {"IsThemeInColor", (PyCFunction)App_IsThemeInColor, 1,
+ PyDoc_STR("(SInt16 inDepth, Boolean inIsColorDevice) -> (Boolean _rv)")},
+ {"GetThemeAccentColors", (PyCFunction)App_GetThemeAccentColors, 1,
+ PyDoc_STR("() -> (CTabHandle outColors)")},
+ {"DrawThemeMenuBarBackground", (PyCFunction)App_DrawThemeMenuBarBackground, 1,
+ PyDoc_STR("(Rect inBounds, ThemeMenuBarState inState, UInt32 inAttributes) -> None")},
+ {"GetThemeMenuBarHeight", (PyCFunction)App_GetThemeMenuBarHeight, 1,
+ PyDoc_STR("() -> (SInt16 outHeight)")},
+ {"DrawThemeMenuBackground", (PyCFunction)App_DrawThemeMenuBackground, 1,
+ PyDoc_STR("(Rect inMenuRect, ThemeMenuType inMenuType) -> None")},
+ {"GetThemeMenuBackgroundRegion", (PyCFunction)App_GetThemeMenuBackgroundRegion, 1,
+ PyDoc_STR("(Rect inMenuRect, ThemeMenuType menuType) -> None")},
+ {"DrawThemeMenuSeparator", (PyCFunction)App_DrawThemeMenuSeparator, 1,
+ PyDoc_STR("(Rect inItemRect) -> None")},
+ {"GetThemeMenuSeparatorHeight", (PyCFunction)App_GetThemeMenuSeparatorHeight, 1,
+ PyDoc_STR("() -> (SInt16 outHeight)")},
+ {"GetThemeMenuItemExtra", (PyCFunction)App_GetThemeMenuItemExtra, 1,
+ PyDoc_STR("(ThemeMenuItemType inItemType) -> (SInt16 outHeight, SInt16 outWidth)")},
+ {"GetThemeMenuTitleExtra", (PyCFunction)App_GetThemeMenuTitleExtra, 1,
+ PyDoc_STR("(Boolean inIsSquished) -> (SInt16 outWidth)")},
+ {"DrawThemeTabPane", (PyCFunction)App_DrawThemeTabPane, 1,
+ PyDoc_STR("(Rect inRect, ThemeDrawState inState) -> None")},
+ {"GetThemeTabRegion", (PyCFunction)App_GetThemeTabRegion, 1,
+ PyDoc_STR("(Rect inRect, ThemeTabStyle inStyle, ThemeTabDirection inDirection) -> None")},
+ {"SetThemeCursor", (PyCFunction)App_SetThemeCursor, 1,
+ PyDoc_STR("(ThemeCursor inCursor) -> None")},
+ {"SetAnimatedThemeCursor", (PyCFunction)App_SetAnimatedThemeCursor, 1,
+ PyDoc_STR("(ThemeCursor inCursor, UInt32 inAnimationStep) -> None")},
+ {"GetThemeScrollBarThumbStyle", (PyCFunction)App_GetThemeScrollBarThumbStyle, 1,
+ PyDoc_STR("() -> (ThemeScrollBarThumbStyle outStyle)")},
+ {"GetThemeScrollBarArrowStyle", (PyCFunction)App_GetThemeScrollBarArrowStyle, 1,
+ PyDoc_STR("() -> (ThemeScrollBarArrowStyle outStyle)")},
+ {"GetThemeCheckBoxStyle", (PyCFunction)App_GetThemeCheckBoxStyle, 1,
+ PyDoc_STR("() -> (ThemeCheckBoxStyle outStyle)")},
+ {"UseThemeFont", (PyCFunction)App_UseThemeFont, 1,
+ PyDoc_STR("(ThemeFontID inFontID, ScriptCode inScript) -> None")},
+ {"DrawThemeTextBox", (PyCFunction)App_DrawThemeTextBox, 1,
+ PyDoc_STR("(CFStringRef inString, ThemeFontID inFontID, ThemeDrawState inState, Boolean inWrapToWidth, Rect inBoundingBox, SInt16 inJust) -> None")},
+ {"TruncateThemeText", (PyCFunction)App_TruncateThemeText, 1,
+ PyDoc_STR("(CFMutableStringRef inString, ThemeFontID inFontID, ThemeDrawState inState, SInt16 inPixelWidthLimit, TruncCode inTruncWhere) -> (Boolean outTruncated)")},
+ {"GetThemeTextDimensions", (PyCFunction)App_GetThemeTextDimensions, 1,
+ PyDoc_STR("(CFStringRef inString, ThemeFontID inFontID, ThemeDrawState inState, Boolean inWrapToWidth, Point ioBounds) -> (Point ioBounds, SInt16 outBaseline)")},
+ {"GetThemeTextShadowOutset", (PyCFunction)App_GetThemeTextShadowOutset, 1,
+ PyDoc_STR("(ThemeFontID inFontID, ThemeDrawState inState) -> (Rect outOutset)")},
+ {"DrawThemeScrollBarArrows", (PyCFunction)App_DrawThemeScrollBarArrows, 1,
+ PyDoc_STR("(Rect bounds, ThemeTrackEnableState enableState, ThemeTrackPressState pressState, Boolean isHoriz) -> (Rect trackBounds)")},
+ {"GetThemeScrollBarTrackRect", (PyCFunction)App_GetThemeScrollBarTrackRect, 1,
+ PyDoc_STR("(Rect bounds, ThemeTrackEnableState enableState, ThemeTrackPressState pressState, Boolean isHoriz) -> (Rect trackBounds)")},
+ {"HitTestThemeScrollBarArrows", (PyCFunction)App_HitTestThemeScrollBarArrows, 1,
+ PyDoc_STR("(Rect scrollBarBounds, ThemeTrackEnableState enableState, ThemeTrackPressState pressState, Boolean isHoriz, Point ptHit) -> (Boolean _rv, Rect trackBounds, ControlPartCode partcode)")},
+ {"DrawThemeScrollBarDelimiters", (PyCFunction)App_DrawThemeScrollBarDelimiters, 1,
+ PyDoc_STR("(ThemeWindowType flavor, Rect inContRect, ThemeDrawState state, ThemeWindowAttributes attributes) -> None")},
+ {"DrawThemeButton", (PyCFunction)App_DrawThemeButton, 1,
+ PyDoc_STR("(Rect inBounds, UInt16 inKind, ThemeButtonDrawInfo inNewInfo, ThemeButtonDrawInfo inPrevInfo, UInt32 inUserData) -> None")},
+ {"GetThemeButtonRegion", (PyCFunction)App_GetThemeButtonRegion, 1,
+ PyDoc_STR("(Rect inBounds, UInt16 inKind, ThemeButtonDrawInfo inNewInfo) -> None")},
+ {"GetThemeButtonContentBounds", (PyCFunction)App_GetThemeButtonContentBounds, 1,
+ PyDoc_STR("(Rect inBounds, UInt16 inKind, ThemeButtonDrawInfo inDrawInfo) -> (Rect outBounds)")},
+ {"GetThemeButtonBackgroundBounds", (PyCFunction)App_GetThemeButtonBackgroundBounds, 1,
+ PyDoc_STR("(Rect inBounds, UInt16 inKind, ThemeButtonDrawInfo inDrawInfo) -> (Rect outBounds)")},
+ {"PlayThemeSound", (PyCFunction)App_PlayThemeSound, 1,
+ PyDoc_STR("(ThemeSoundKind kind) -> None")},
+ {"BeginThemeDragSound", (PyCFunction)App_BeginThemeDragSound, 1,
+ PyDoc_STR("(ThemeDragSoundKind kind) -> None")},
+ {"EndThemeDragSound", (PyCFunction)App_EndThemeDragSound, 1,
+ PyDoc_STR("() -> None")},
+ {"DrawThemeTickMark", (PyCFunction)App_DrawThemeTickMark, 1,
+ PyDoc_STR("(Rect bounds, ThemeDrawState state) -> None")},
+ {"DrawThemeChasingArrows", (PyCFunction)App_DrawThemeChasingArrows, 1,
+ PyDoc_STR("(Rect bounds, UInt32 index, ThemeDrawState state, UInt32 eraseData) -> None")},
+ {"DrawThemePopupArrow", (PyCFunction)App_DrawThemePopupArrow, 1,
+ PyDoc_STR("(Rect bounds, ThemeArrowOrientation orientation, ThemePopupArrowSize size, ThemeDrawState state, UInt32 eraseData) -> None")},
+ {"DrawThemeStandaloneGrowBox", (PyCFunction)App_DrawThemeStandaloneGrowBox, 1,
+ PyDoc_STR("(Point origin, ThemeGrowDirection growDirection, Boolean isSmall, ThemeDrawState state) -> None")},
+ {"DrawThemeStandaloneNoGrowBox", (PyCFunction)App_DrawThemeStandaloneNoGrowBox, 1,
+ PyDoc_STR("(Point origin, ThemeGrowDirection growDirection, Boolean isSmall, ThemeDrawState state) -> None")},
+ {"GetThemeStandaloneGrowBoxBounds", (PyCFunction)App_GetThemeStandaloneGrowBoxBounds, 1,
+ PyDoc_STR("(Point origin, ThemeGrowDirection growDirection, Boolean isSmall) -> (Rect bounds)")},
+ {"NormalizeThemeDrawingState", (PyCFunction)App_NormalizeThemeDrawingState, 1,
+ PyDoc_STR("() -> None")},
+ {"GetThemeDrawingState", (PyCFunction)App_GetThemeDrawingState, 1,
+ PyDoc_STR("() -> (ThemeDrawingState outState)")},
+ {"ApplyThemeBackground", (PyCFunction)App_ApplyThemeBackground, 1,
+ PyDoc_STR("(ThemeBackgroundKind inKind, Rect bounds, ThemeDrawState inState, SInt16 inDepth, Boolean inColorDev) -> None")},
+ {"SetThemeTextColorForWindow", (PyCFunction)App_SetThemeTextColorForWindow, 1,
+ PyDoc_STR("(WindowPtr window, Boolean isActive, SInt16 depth, Boolean isColorDev) -> None")},
+ {"IsValidAppearanceFileType", (PyCFunction)App_IsValidAppearanceFileType, 1,
+ PyDoc_STR("(OSType fileType) -> (Boolean _rv)")},
+ {"GetThemeBrushAsColor", (PyCFunction)App_GetThemeBrushAsColor, 1,
+ PyDoc_STR("(ThemeBrush inBrush, SInt16 inDepth, Boolean inColorDev) -> (RGBColor outColor)")},
+ {"GetThemeTextColor", (PyCFunction)App_GetThemeTextColor, 1,
+ PyDoc_STR("(ThemeTextColor inColor, SInt16 inDepth, Boolean inColorDev) -> (RGBColor outColor)")},
+ {"GetThemeMetric", (PyCFunction)App_GetThemeMetric, 1,
+ PyDoc_STR("(ThemeMetric inMetric) -> (SInt32 outMetric)")},
+ {NULL, NULL, 0}
};
-#else /* __LP64__ */
+#else /* __LP64__ */
static PyMethodDef App_methods[] = {
- {NULL, NULL, 0}
+ {NULL, NULL, 0}
};
#endif /* __LP64__ */
@@ -1805,26 +1805,26 @@ static PyMethodDef App_methods[] = {
void init_App(void)
{
- PyObject *m;
+ PyObject *m;
#ifndef __LP64__
- PyObject *d;
+ PyObject *d;
#endif /* !__LP64__ */
- m = Py_InitModule("_App", App_methods);
+ m = Py_InitModule("_App", App_methods);
#ifndef __LP64__
- d = PyModule_GetDict(m);
- App_Error = PyMac_GetOSErrException();
- if (App_Error == NULL ||
- PyDict_SetItemString(d, "Error", App_Error) != 0)
- return;
- ThemeDrawingState_Type.ob_type = &PyType_Type;
- if (PyType_Ready(&ThemeDrawingState_Type) < 0) return;
- Py_INCREF(&ThemeDrawingState_Type);
- PyModule_AddObject(m, "ThemeDrawingState", (PyObject *)&ThemeDrawingState_Type);
- /* Backward-compatible name */
- Py_INCREF(&ThemeDrawingState_Type);
- PyModule_AddObject(m, "ThemeDrawingStateType", (PyObject *)&ThemeDrawingState_Type);
+ d = PyModule_GetDict(m);
+ App_Error = PyMac_GetOSErrException();
+ if (App_Error == NULL ||
+ PyDict_SetItemString(d, "Error", App_Error) != 0)
+ return;
+ ThemeDrawingState_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&ThemeDrawingState_Type) < 0) return;
+ Py_INCREF(&ThemeDrawingState_Type);
+ PyModule_AddObject(m, "ThemeDrawingState", (PyObject *)&ThemeDrawingState_Type);
+ /* Backward-compatible name */
+ Py_INCREF(&ThemeDrawingState_Type);
+ PyModule_AddObject(m, "ThemeDrawingStateType", (PyObject *)&ThemeDrawingState_Type);
#endif /* __LP64__ */
}
diff --git a/Mac/Modules/autoGIL.c b/Mac/Modules/autoGIL.c
index af2e699..3bc1593 100644
--- a/Mac/Modules/autoGIL.c
+++ b/Mac/Modules/autoGIL.c
@@ -16,93 +16,93 @@ static PyObject *AutoGILError;
static void autoGILCallback(CFRunLoopObserverRef observer,
- CFRunLoopActivity activity,
- void *info) {
- PyThreadState **p_tstate = (PyThreadState **)info;
+ CFRunLoopActivity activity,
+ void *info) {
+ PyThreadState **p_tstate = (PyThreadState **)info;
- switch (activity) {
- case kCFRunLoopBeforeWaiting:
- /* going to sleep, release GIL */
+ switch (activity) {
+ case kCFRunLoopBeforeWaiting:
+ /* going to sleep, release GIL */
#ifdef AUTOGIL_DEBUG
- fprintf(stderr, "going to sleep, release GIL\n");
+ fprintf(stderr, "going to sleep, release GIL\n");
#endif
- *p_tstate = PyEval_SaveThread();
- break;
- case kCFRunLoopAfterWaiting:
- /* waking up, acquire GIL */
+ *p_tstate = PyEval_SaveThread();
+ break;
+ case kCFRunLoopAfterWaiting:
+ /* waking up, acquire GIL */
#ifdef AUTOGIL_DEBUG
- fprintf(stderr, "waking up, acquire GIL\n");
+ fprintf(stderr, "waking up, acquire GIL\n");
#endif
- PyEval_RestoreThread(*p_tstate);
- *p_tstate = NULL;
- break;
- default:
- break;
- }
+ PyEval_RestoreThread(*p_tstate);
+ *p_tstate = NULL;
+ break;
+ default:
+ break;
+ }
}
static void infoRelease(const void *info) {
- /* XXX This should get called when the run loop is deallocated,
- but this doesn't seem to happen. So for now: leak. */
- PyMem_Free((void *)info);
+ /* XXX This should get called when the run loop is deallocated,
+ but this doesn't seem to happen. So for now: leak. */
+ PyMem_Free((void *)info);
}
static PyObject *
autoGIL_installAutoGIL(PyObject *self)
{
- PyObject *tstate_dict = PyThreadState_GetDict();
- PyObject *v;
- CFRunLoopRef rl;
- PyThreadState **p_tstate; /* for use in the info field */
- CFRunLoopObserverContext context = {0, NULL, NULL, NULL, NULL};
- CFRunLoopObserverRef observer;
-
- if (tstate_dict == NULL)
- return NULL;
- v = PyDict_GetItemString(tstate_dict, "autoGIL.InstalledAutoGIL");
- if (v != NULL) {
- /* we've already installed a callback for this thread */
- Py_INCREF(Py_None);
- return Py_None;
- }
-
- rl = CFRunLoopGetCurrent();
- if (rl == NULL) {
- PyErr_SetString(AutoGILError,
- "can't get run loop for current thread");
- return NULL;
- }
-
- p_tstate = PyMem_Malloc(sizeof(PyThreadState *));
- if (p_tstate == NULL) {
- PyErr_SetString(PyExc_MemoryError,
- "not enough memory to allocate "
- "tstate pointer");
- return NULL;
- }
- *p_tstate = NULL;
- context.info = (void *)p_tstate;
- context.release = infoRelease;
-
- observer = CFRunLoopObserverCreate(
- NULL,
- kCFRunLoopBeforeWaiting | kCFRunLoopAfterWaiting,
- 1, 0, autoGILCallback, &context);
- if (observer == NULL) {
- PyErr_SetString(AutoGILError,
- "can't create event loop observer");
- return NULL;
- }
- CFRunLoopAddObserver(rl, observer, kCFRunLoopDefaultMode);
- /* XXX how to check for errors? */
-
- /* register that we have installed a callback for this thread */
- if (PyDict_SetItemString(tstate_dict, "autoGIL.InstalledAutoGIL",
- Py_None) < 0)
- return NULL;
-
- Py_INCREF(Py_None);
- return Py_None;
+ PyObject *tstate_dict = PyThreadState_GetDict();
+ PyObject *v;
+ CFRunLoopRef rl;
+ PyThreadState **p_tstate; /* for use in the info field */
+ CFRunLoopObserverContext context = {0, NULL, NULL, NULL, NULL};
+ CFRunLoopObserverRef observer;
+
+ if (tstate_dict == NULL)
+ return NULL;
+ v = PyDict_GetItemString(tstate_dict, "autoGIL.InstalledAutoGIL");
+ if (v != NULL) {
+ /* we've already installed a callback for this thread */
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
+
+ rl = CFRunLoopGetCurrent();
+ if (rl == NULL) {
+ PyErr_SetString(AutoGILError,
+ "can't get run loop for current thread");
+ return NULL;
+ }
+
+ p_tstate = PyMem_Malloc(sizeof(PyThreadState *));
+ if (p_tstate == NULL) {
+ PyErr_SetString(PyExc_MemoryError,
+ "not enough memory to allocate "
+ "tstate pointer");
+ return NULL;
+ }
+ *p_tstate = NULL;
+ context.info = (void *)p_tstate;
+ context.release = infoRelease;
+
+ observer = CFRunLoopObserverCreate(
+ NULL,
+ kCFRunLoopBeforeWaiting | kCFRunLoopAfterWaiting,
+ 1, 0, autoGILCallback, &context);
+ if (observer == NULL) {
+ PyErr_SetString(AutoGILError,
+ "can't create event loop observer");
+ return NULL;
+ }
+ CFRunLoopAddObserver(rl, observer, kCFRunLoopDefaultMode);
+ /* XXX how to check for errors? */
+
+ /* register that we have installed a callback for this thread */
+ if (PyDict_SetItemString(tstate_dict, "autoGIL.InstalledAutoGIL",
+ Py_None) < 0)
+ return NULL;
+
+ Py_INCREF(Py_None);
+ return Py_None;
}
PyDoc_STRVAR(autoGIL_installAutoGIL_doc,
@@ -114,13 +114,13 @@ the event loop is idle."
);
static PyMethodDef autoGIL_methods[] = {
- {
- "installAutoGIL",
- (PyCFunction)autoGIL_installAutoGIL,
- METH_NOARGS,
- autoGIL_installAutoGIL_doc
- },
- { 0, 0, 0, 0 } /* sentinel */
+ {
+ "installAutoGIL",
+ (PyCFunction)autoGIL_installAutoGIL,
+ METH_NOARGS,
+ autoGIL_installAutoGIL_doc
+ },
+ { 0, 0, 0, 0 } /* sentinel */
};
PyDoc_STRVAR(autoGIL_docs,
@@ -132,21 +132,21 @@ when running an event loop."
PyMODINIT_FUNC
initautoGIL(void)
{
- PyObject *mod;
-
- if (PyErr_WarnPy3k("In 3.x, the autoGIL module is removed.", 1) < 0)
- return;
-
- mod = Py_InitModule4("autoGIL", autoGIL_methods, autoGIL_docs,
- NULL, PYTHON_API_VERSION);
- if (mod == NULL)
- return;
- AutoGILError = PyErr_NewException("autoGIL.AutoGILError",
- PyExc_Exception, NULL);
- if (AutoGILError == NULL)
- return;
- Py_INCREF(AutoGILError);
- if (PyModule_AddObject(mod, "AutoGILError",
- AutoGILError) < 0)
- return;
+ PyObject *mod;
+
+ if (PyErr_WarnPy3k("In 3.x, the autoGIL module is removed.", 1) < 0)
+ return;
+
+ mod = Py_InitModule4("autoGIL", autoGIL_methods, autoGIL_docs,
+ NULL, PYTHON_API_VERSION);
+ if (mod == NULL)
+ return;
+ AutoGILError = PyErr_NewException("autoGIL.AutoGILError",
+ PyExc_Exception, NULL);
+ if (AutoGILError == NULL)
+ return;
+ Py_INCREF(AutoGILError);
+ if (PyModule_AddObject(mod, "AutoGILError",
+ AutoGILError) < 0)
+ return;
}
diff --git a/Mac/Modules/carbonevt/_CarbonEvtmodule.c b/Mac/Modules/carbonevt/_CarbonEvtmodule.c
index 893beec..623a3e5 100755
--- a/Mac/Modules/carbonevt/_CarbonEvtmodule.c
+++ b/Mac/Modules/carbonevt/_CarbonEvtmodule.c
@@ -9,9 +9,9 @@
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
- PyErr_SetString(PyExc_NotImplementedError, \
- "Not available in this shared library/OS version"); \
- return NULL; \
+ PyErr_SetString(PyExc_NotImplementedError, \
+ "Not available in this shared library/OS version"); \
+ return NULL; \
}} while(0)
@@ -30,11 +30,11 @@ PyObject *EventRef_New(EventRef itself);
static int
EventTypeSpec_Convert(PyObject *v, EventTypeSpec *out)
{
- if (PyArg_Parse(v, "(O&l)",
- PyMac_GetOSType, &(out->eventClass),
- &(out->eventKind)))
- return 1;
- return 0;
+ if (PyArg_Parse(v, "(O&l)",
+ PyMac_GetOSType, &(out->eventClass),
+ &(out->eventKind)))
+ return 1;
+ return 0;
}
/********** end EventTypeSpec *******/
@@ -45,15 +45,15 @@ EventTypeSpec_Convert(PyObject *v, EventTypeSpec *out)
static PyObject*
HIPoint_New(HIPoint *in)
{
- return Py_BuildValue("ff", in->x, in->y);
+ return Py_BuildValue("ff", in->x, in->y);
}
static int
HIPoint_Convert(PyObject *v, HIPoint *out)
{
- if (PyArg_ParseTuple(v, "ff", &(out->x), &(out->y)))
- return 1;
- return NULL;
+ if (PyArg_ParseTuple(v, "ff", &(out->x), &(out->y)))
+ return 1;
+ return NULL;
}
#endif
@@ -64,9 +64,9 @@ HIPoint_Convert(PyObject *v, HIPoint *out)
static int
EventHotKeyID_Convert(PyObject *v, EventHotKeyID *out)
{
- if (PyArg_ParseTuple(v, "ll", &out->signature, &out->id))
- return 1;
- return 0;
+ if (PyArg_ParseTuple(v, "ll", &out->signature, &out->id))
+ return 1;
+ return 0;
}
/********** end EventHotKeyID *******/
@@ -77,27 +77,27 @@ static EventHandlerUPP myEventHandlerUPP;
static pascal OSStatus
myEventHandler(EventHandlerCallRef handlerRef, EventRef event, void *outPyObject) {
- PyObject *retValue;
- int status;
-
- retValue = PyObject_CallFunction((PyObject *)outPyObject, "O&O&",
- EventHandlerCallRef_New, handlerRef,
- EventRef_New, event);
- if (retValue == NULL) {
- PySys_WriteStderr("Error in event handler callback:\n");
- PyErr_Print(); /* this also clears the error */
- status = noErr; /* complain? how? */
- } else {
- if (retValue == Py_None)
- status = noErr;
- else if (PyInt_Check(retValue)) {
- status = PyInt_AsLong(retValue);
- } else
- status = noErr; /* wrong object type, complain? */
- Py_DECREF(retValue);
- }
-
- return status;
+ PyObject *retValue;
+ int status;
+
+ retValue = PyObject_CallFunction((PyObject *)outPyObject, "O&O&",
+ EventHandlerCallRef_New, handlerRef,
+ EventRef_New, event);
+ if (retValue == NULL) {
+ PySys_WriteStderr("Error in event handler callback:\n");
+ PyErr_Print(); /* this also clears the error */
+ status = noErr; /* complain? how? */
+ } else {
+ if (retValue == Py_None)
+ status = noErr;
+ else if (PyInt_Check(retValue)) {
+ status = PyInt_AsLong(retValue);
+ } else
+ status = noErr; /* wrong object type, complain? */
+ Py_DECREF(retValue);
+ }
+
+ return status;
}
/******** end myEventHandler ***********/
@@ -112,268 +112,268 @@ PyTypeObject EventRef_Type;
#define EventRef_Check(x) ((x)->ob_type == &EventRef_Type || PyObject_TypeCheck((x), &EventRef_Type))
typedef struct EventRefObject {
- PyObject_HEAD
- EventRef ob_itself;
+ PyObject_HEAD
+ EventRef ob_itself;
} EventRefObject;
PyObject *EventRef_New(EventRef itself)
{
- EventRefObject *it;
- it = PyObject_NEW(EventRefObject, &EventRef_Type);
- if (it == NULL) return NULL;
- it->ob_itself = itself;
- return (PyObject *)it;
+ EventRefObject *it;
+ it = PyObject_NEW(EventRefObject, &EventRef_Type);
+ if (it == NULL) return NULL;
+ it->ob_itself = itself;
+ return (PyObject *)it;
}
int EventRef_Convert(PyObject *v, EventRef *p_itself)
{
- if (!EventRef_Check(v))
- {
- PyErr_SetString(PyExc_TypeError, "EventRef required");
- return 0;
- }
- *p_itself = ((EventRefObject *)v)->ob_itself;
- return 1;
+ if (!EventRef_Check(v))
+ {
+ PyErr_SetString(PyExc_TypeError, "EventRef required");
+ return 0;
+ }
+ *p_itself = ((EventRefObject *)v)->ob_itself;
+ return 1;
}
static void EventRef_dealloc(EventRefObject *self)
{
- /* Cleanup of self->ob_itself goes here */
- self->ob_type->tp_free((PyObject *)self);
+ /* Cleanup of self->ob_itself goes here */
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *EventRef_RetainEvent(EventRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- EventRef _rv;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = RetainEvent(_self->ob_itself);
- _res = Py_BuildValue("O&",
- EventRef_New, _rv);
- return _res;
+ PyObject *_res = NULL;
+ EventRef _rv;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = RetainEvent(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ EventRef_New, _rv);
+ return _res;
}
static PyObject *EventRef_GetEventRetainCount(EventRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- UInt32 _rv;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetEventRetainCount(_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyObject *_res = NULL;
+ UInt32 _rv;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetEventRetainCount(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *EventRef_ReleaseEvent(EventRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- ReleaseEvent(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ ReleaseEvent(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *EventRef_SetEventParameter(EventRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- OSType inName;
- OSType inType;
- char *inDataPtr__in__;
- long inDataPtr__len__;
- int inDataPtr__in_len__;
- if (!PyArg_ParseTuple(_args, "O&O&s#",
- PyMac_GetOSType, &inName,
- PyMac_GetOSType, &inType,
- &inDataPtr__in__, &inDataPtr__in_len__))
- return NULL;
- inDataPtr__len__ = inDataPtr__in_len__;
- _err = SetEventParameter(_self->ob_itself,
- inName,
- inType,
- inDataPtr__len__, inDataPtr__in__);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ OSType inName;
+ OSType inType;
+ char *inDataPtr__in__;
+ long inDataPtr__len__;
+ int inDataPtr__in_len__;
+ if (!PyArg_ParseTuple(_args, "O&O&s#",
+ PyMac_GetOSType, &inName,
+ PyMac_GetOSType, &inType,
+ &inDataPtr__in__, &inDataPtr__in_len__))
+ return NULL;
+ inDataPtr__len__ = inDataPtr__in_len__;
+ _err = SetEventParameter(_self->ob_itself,
+ inName,
+ inType,
+ inDataPtr__len__, inDataPtr__in__);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *EventRef_GetEventClass(EventRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- UInt32 _rv;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetEventClass(_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyObject *_res = NULL;
+ UInt32 _rv;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetEventClass(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *EventRef_GetEventKind(EventRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- UInt32 _rv;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetEventKind(_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyObject *_res = NULL;
+ UInt32 _rv;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetEventKind(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *EventRef_GetEventTime(EventRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- double _rv;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetEventTime(_self->ob_itself);
- _res = Py_BuildValue("d",
- _rv);
- return _res;
+ PyObject *_res = NULL;
+ double _rv;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetEventTime(_self->ob_itself);
+ _res = Py_BuildValue("d",
+ _rv);
+ return _res;
}
static PyObject *EventRef_SetEventTime(EventRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- double inTime;
- if (!PyArg_ParseTuple(_args, "d",
- &inTime))
- return NULL;
- _err = SetEventTime(_self->ob_itself,
- inTime);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ double inTime;
+ if (!PyArg_ParseTuple(_args, "d",
+ &inTime))
+ return NULL;
+ _err = SetEventTime(_self->ob_itself,
+ inTime);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *EventRef_IsUserCancelEventRef(EventRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = IsUserCancelEventRef(_self->ob_itself);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = IsUserCancelEventRef(_self->ob_itself);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *EventRef_ConvertEventRefToEventRecord(EventRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- EventRecord outEvent;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = ConvertEventRefToEventRecord(_self->ob_itself,
- &outEvent);
- _res = Py_BuildValue("bO&",
- _rv,
- PyMac_BuildEventRecord, &outEvent);
- return _res;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ EventRecord outEvent;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = ConvertEventRefToEventRecord(_self->ob_itself,
+ &outEvent);
+ _res = Py_BuildValue("bO&",
+ _rv,
+ PyMac_BuildEventRecord, &outEvent);
+ return _res;
}
static PyObject *EventRef_IsEventInMask(EventRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- UInt16 inMask;
- if (!PyArg_ParseTuple(_args, "H",
- &inMask))
- return NULL;
- _rv = IsEventInMask(_self->ob_itself,
- inMask);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ UInt16 inMask;
+ if (!PyArg_ParseTuple(_args, "H",
+ &inMask))
+ return NULL;
+ _rv = IsEventInMask(_self->ob_itself,
+ inMask);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *EventRef_SendEventToEventTarget(EventRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- EventTargetRef inTarget;
- if (!PyArg_ParseTuple(_args, "O&",
- EventTargetRef_Convert, &inTarget))
- return NULL;
- _err = SendEventToEventTarget(_self->ob_itself,
- inTarget);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ EventTargetRef inTarget;
+ if (!PyArg_ParseTuple(_args, "O&",
+ EventTargetRef_Convert, &inTarget))
+ return NULL;
+ _err = SendEventToEventTarget(_self->ob_itself,
+ inTarget);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *EventRef_GetEventParameter(EventRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
- UInt32 bufferSize;
- EventParamName inName;
- EventParamType inType;
- OSErr _err;
- void * buffer;
+ UInt32 bufferSize;
+ EventParamName inName;
+ EventParamType inType;
+ OSErr _err;
+ void * buffer;
- if (!PyArg_ParseTuple(_args, "O&O&", PyMac_GetOSType, &inName, PyMac_GetOSType, &inType))
- return NULL;
+ if (!PyArg_ParseTuple(_args, "O&O&", PyMac_GetOSType, &inName, PyMac_GetOSType, &inType))
+ return NULL;
- /* Figure out the size by passing a null buffer to GetEventParameter */
- _err = GetEventParameter(_self->ob_itself, inName, inType, NULL, 0, &bufferSize, NULL);
+ /* Figure out the size by passing a null buffer to GetEventParameter */
+ _err = GetEventParameter(_self->ob_itself, inName, inType, NULL, 0, &bufferSize, NULL);
- if (_err != noErr)
- return PyMac_Error(_err);
- buffer = PyMem_NEW(char, bufferSize);
- if (buffer == NULL)
- return PyErr_NoMemory();
+ if (_err != noErr)
+ return PyMac_Error(_err);
+ buffer = PyMem_NEW(char, bufferSize);
+ if (buffer == NULL)
+ return PyErr_NoMemory();
- _err = GetEventParameter(_self->ob_itself, inName, inType, NULL, bufferSize, NULL, buffer);
+ _err = GetEventParameter(_self->ob_itself, inName, inType, NULL, bufferSize, NULL, buffer);
- if (_err != noErr) {
- PyMem_DEL(buffer);
- return PyMac_Error(_err);
- }
- _res = Py_BuildValue("s#", buffer, bufferSize);
- PyMem_DEL(buffer);
- return _res;
+ if (_err != noErr) {
+ PyMem_DEL(buffer);
+ return PyMac_Error(_err);
+ }
+ _res = Py_BuildValue("s#", buffer, bufferSize);
+ PyMem_DEL(buffer);
+ return _res;
}
static PyMethodDef EventRef_methods[] = {
- {"RetainEvent", (PyCFunction)EventRef_RetainEvent, 1,
- PyDoc_STR("() -> (EventRef _rv)")},
- {"GetEventRetainCount", (PyCFunction)EventRef_GetEventRetainCount, 1,
- PyDoc_STR("() -> (UInt32 _rv)")},
- {"ReleaseEvent", (PyCFunction)EventRef_ReleaseEvent, 1,
- PyDoc_STR("() -> None")},
- {"SetEventParameter", (PyCFunction)EventRef_SetEventParameter, 1,
- PyDoc_STR("(OSType inName, OSType inType, Buffer inDataPtr) -> None")},
- {"GetEventClass", (PyCFunction)EventRef_GetEventClass, 1,
- PyDoc_STR("() -> (UInt32 _rv)")},
- {"GetEventKind", (PyCFunction)EventRef_GetEventKind, 1,
- PyDoc_STR("() -> (UInt32 _rv)")},
- {"GetEventTime", (PyCFunction)EventRef_GetEventTime, 1,
- PyDoc_STR("() -> (double _rv)")},
- {"SetEventTime", (PyCFunction)EventRef_SetEventTime, 1,
- PyDoc_STR("(double inTime) -> None")},
- {"IsUserCancelEventRef", (PyCFunction)EventRef_IsUserCancelEventRef, 1,
- PyDoc_STR("() -> (Boolean _rv)")},
- {"ConvertEventRefToEventRecord", (PyCFunction)EventRef_ConvertEventRefToEventRecord, 1,
- PyDoc_STR("() -> (Boolean _rv, EventRecord outEvent)")},
- {"IsEventInMask", (PyCFunction)EventRef_IsEventInMask, 1,
- PyDoc_STR("(UInt16 inMask) -> (Boolean _rv)")},
- {"SendEventToEventTarget", (PyCFunction)EventRef_SendEventToEventTarget, 1,
- PyDoc_STR("(EventTargetRef inTarget) -> None")},
- {"GetEventParameter", (PyCFunction)EventRef_GetEventParameter, 1,
- PyDoc_STR("(EventParamName eventName, EventParamType eventType) -> (String eventParamData)")},
- {NULL, NULL, 0}
+ {"RetainEvent", (PyCFunction)EventRef_RetainEvent, 1,
+ PyDoc_STR("() -> (EventRef _rv)")},
+ {"GetEventRetainCount", (PyCFunction)EventRef_GetEventRetainCount, 1,
+ PyDoc_STR("() -> (UInt32 _rv)")},
+ {"ReleaseEvent", (PyCFunction)EventRef_ReleaseEvent, 1,
+ PyDoc_STR("() -> None")},
+ {"SetEventParameter", (PyCFunction)EventRef_SetEventParameter, 1,
+ PyDoc_STR("(OSType inName, OSType inType, Buffer inDataPtr) -> None")},
+ {"GetEventClass", (PyCFunction)EventRef_GetEventClass, 1,
+ PyDoc_STR("() -> (UInt32 _rv)")},
+ {"GetEventKind", (PyCFunction)EventRef_GetEventKind, 1,
+ PyDoc_STR("() -> (UInt32 _rv)")},
+ {"GetEventTime", (PyCFunction)EventRef_GetEventTime, 1,
+ PyDoc_STR("() -> (double _rv)")},
+ {"SetEventTime", (PyCFunction)EventRef_SetEventTime, 1,
+ PyDoc_STR("(double inTime) -> None")},
+ {"IsUserCancelEventRef", (PyCFunction)EventRef_IsUserCancelEventRef, 1,
+ PyDoc_STR("() -> (Boolean _rv)")},
+ {"ConvertEventRefToEventRecord", (PyCFunction)EventRef_ConvertEventRefToEventRecord, 1,
+ PyDoc_STR("() -> (Boolean _rv, EventRecord outEvent)")},
+ {"IsEventInMask", (PyCFunction)EventRef_IsEventInMask, 1,
+ PyDoc_STR("(UInt16 inMask) -> (Boolean _rv)")},
+ {"SendEventToEventTarget", (PyCFunction)EventRef_SendEventToEventTarget, 1,
+ PyDoc_STR("(EventTargetRef inTarget) -> None")},
+ {"GetEventParameter", (PyCFunction)EventRef_GetEventParameter, 1,
+ PyDoc_STR("(EventParamName eventName, EventParamType eventType) -> (String eventParamData)")},
+ {NULL, NULL, 0}
};
#define EventRef_getsetlist NULL
@@ -390,61 +390,61 @@ static PyMethodDef EventRef_methods[] = {
static PyObject *EventRef_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
- PyObject *_self;
- EventRef itself;
- char *kw[] = {"itself", 0};
+ 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;
+ 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 = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
- "_CarbonEvt.EventRef", /*tp_name*/
- sizeof(EventRefObject), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- /* methods */
- (destructor) EventRef_dealloc, /*tp_dealloc*/
- 0, /*tp_print*/
- (getattrfunc)0, /*tp_getattr*/
- (setattrfunc)0, /*tp_setattr*/
- (cmpfunc) EventRef_compare, /*tp_compare*/
- (reprfunc) EventRef_repr, /*tp_repr*/
- (PyNumberMethods *)0, /* tp_as_number */
- (PySequenceMethods *)0, /* tp_as_sequence */
- (PyMappingMethods *)0, /* tp_as_mapping */
- (hashfunc) EventRef_hash, /*tp_hash*/
- 0, /*tp_call*/
- 0, /*tp_str*/
- PyObject_GenericGetAttr, /*tp_getattro*/
- PyObject_GenericSetAttr, /*tp_setattro */
- 0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
- 0, /*tp_doc*/
- 0, /*tp_traverse*/
- 0, /*tp_clear*/
- 0, /*tp_richcompare*/
- 0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
- 0, /*tp_iternext*/
- EventRef_methods, /* tp_methods */
- 0, /*tp_members*/
- EventRef_getsetlist, /*tp_getset*/
- 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 */
+ PyObject_HEAD_INIT(NULL)
+ 0, /*ob_size*/
+ "_CarbonEvt.EventRef", /*tp_name*/
+ sizeof(EventRefObject), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ /* methods */
+ (destructor) EventRef_dealloc, /*tp_dealloc*/
+ 0, /*tp_print*/
+ (getattrfunc)0, /*tp_getattr*/
+ (setattrfunc)0, /*tp_setattr*/
+ (cmpfunc) EventRef_compare, /*tp_compare*/
+ (reprfunc) EventRef_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) EventRef_hash, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ PyObject_GenericGetAttr, /*tp_getattro*/
+ PyObject_GenericSetAttr, /*tp_setattro */
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
+ 0, /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ EventRef_methods, /* tp_methods */
+ 0, /*tp_members*/
+ EventRef_getsetlist, /*tp_getset*/
+ 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 -------------------- */
@@ -457,144 +457,144 @@ PyTypeObject EventQueueRef_Type;
#define EventQueueRef_Check(x) ((x)->ob_type == &EventQueueRef_Type || PyObject_TypeCheck((x), &EventQueueRef_Type))
typedef struct EventQueueRefObject {
- PyObject_HEAD
- EventQueueRef ob_itself;
+ PyObject_HEAD
+ EventQueueRef ob_itself;
} EventQueueRefObject;
PyObject *EventQueueRef_New(EventQueueRef itself)
{
- EventQueueRefObject *it;
- it = PyObject_NEW(EventQueueRefObject, &EventQueueRef_Type);
- if (it == NULL) return NULL;
- it->ob_itself = itself;
- return (PyObject *)it;
+ EventQueueRefObject *it;
+ it = PyObject_NEW(EventQueueRefObject, &EventQueueRef_Type);
+ if (it == NULL) return NULL;
+ it->ob_itself = itself;
+ return (PyObject *)it;
}
int EventQueueRef_Convert(PyObject *v, EventQueueRef *p_itself)
{
- if (!EventQueueRef_Check(v))
- {
- PyErr_SetString(PyExc_TypeError, "EventQueueRef required");
- return 0;
- }
- *p_itself = ((EventQueueRefObject *)v)->ob_itself;
- return 1;
+ if (!EventQueueRef_Check(v))
+ {
+ PyErr_SetString(PyExc_TypeError, "EventQueueRef required");
+ return 0;
+ }
+ *p_itself = ((EventQueueRefObject *)v)->ob_itself;
+ return 1;
}
static void EventQueueRef_dealloc(EventQueueRefObject *self)
{
- /* Cleanup of self->ob_itself goes here */
- self->ob_type->tp_free((PyObject *)self);
+ /* Cleanup of self->ob_itself goes here */
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *EventQueueRef_PostEventToQueue(EventQueueRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- EventRef inEvent;
- SInt16 inPriority;
- if (!PyArg_ParseTuple(_args, "O&h",
- EventRef_Convert, &inEvent,
- &inPriority))
- return NULL;
- _err = PostEventToQueue(_self->ob_itself,
- inEvent,
- inPriority);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ EventRef inEvent;
+ SInt16 inPriority;
+ if (!PyArg_ParseTuple(_args, "O&h",
+ EventRef_Convert, &inEvent,
+ &inPriority))
+ return NULL;
+ _err = PostEventToQueue(_self->ob_itself,
+ inEvent,
+ inPriority);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *EventQueueRef_FlushEventsMatchingListFromQueue(EventQueueRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- UInt32 inNumTypes;
- EventTypeSpec inList;
- if (!PyArg_ParseTuple(_args, "lO&",
- &inNumTypes,
- EventTypeSpec_Convert, &inList))
- return NULL;
- _err = FlushEventsMatchingListFromQueue(_self->ob_itself,
- inNumTypes,
- &inList);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ UInt32 inNumTypes;
+ EventTypeSpec inList;
+ if (!PyArg_ParseTuple(_args, "lO&",
+ &inNumTypes,
+ EventTypeSpec_Convert, &inList))
+ return NULL;
+ _err = FlushEventsMatchingListFromQueue(_self->ob_itself,
+ inNumTypes,
+ &inList);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *EventQueueRef_FlushEventQueue(EventQueueRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = FlushEventQueue(_self->ob_itself);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = FlushEventQueue(_self->ob_itself);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *EventQueueRef_GetNumEventsInQueue(EventQueueRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- UInt32 _rv;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetNumEventsInQueue(_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyObject *_res = NULL;
+ UInt32 _rv;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetNumEventsInQueue(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *EventQueueRef_RemoveEventFromQueue(EventQueueRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- EventRef inEvent;
- if (!PyArg_ParseTuple(_args, "O&",
- EventRef_Convert, &inEvent))
- return NULL;
- _err = RemoveEventFromQueue(_self->ob_itself,
- inEvent);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ EventRef inEvent;
+ if (!PyArg_ParseTuple(_args, "O&",
+ EventRef_Convert, &inEvent))
+ return NULL;
+ _err = RemoveEventFromQueue(_self->ob_itself,
+ inEvent);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *EventQueueRef_IsEventInQueue(EventQueueRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- EventRef inEvent;
- if (!PyArg_ParseTuple(_args, "O&",
- EventRef_Convert, &inEvent))
- return NULL;
- _rv = IsEventInQueue(_self->ob_itself,
- inEvent);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ EventRef inEvent;
+ if (!PyArg_ParseTuple(_args, "O&",
+ EventRef_Convert, &inEvent))
+ return NULL;
+ _rv = IsEventInQueue(_self->ob_itself,
+ inEvent);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyMethodDef EventQueueRef_methods[] = {
- {"PostEventToQueue", (PyCFunction)EventQueueRef_PostEventToQueue, 1,
- PyDoc_STR("(EventRef inEvent, SInt16 inPriority) -> None")},
- {"FlushEventsMatchingListFromQueue", (PyCFunction)EventQueueRef_FlushEventsMatchingListFromQueue, 1,
- PyDoc_STR("(UInt32 inNumTypes, EventTypeSpec inList) -> None")},
- {"FlushEventQueue", (PyCFunction)EventQueueRef_FlushEventQueue, 1,
- PyDoc_STR("() -> None")},
- {"GetNumEventsInQueue", (PyCFunction)EventQueueRef_GetNumEventsInQueue, 1,
- PyDoc_STR("() -> (UInt32 _rv)")},
- {"RemoveEventFromQueue", (PyCFunction)EventQueueRef_RemoveEventFromQueue, 1,
- PyDoc_STR("(EventRef inEvent) -> None")},
- {"IsEventInQueue", (PyCFunction)EventQueueRef_IsEventInQueue, 1,
- PyDoc_STR("(EventRef inEvent) -> (Boolean _rv)")},
- {NULL, NULL, 0}
+ {"PostEventToQueue", (PyCFunction)EventQueueRef_PostEventToQueue, 1,
+ PyDoc_STR("(EventRef inEvent, SInt16 inPriority) -> None")},
+ {"FlushEventsMatchingListFromQueue", (PyCFunction)EventQueueRef_FlushEventsMatchingListFromQueue, 1,
+ PyDoc_STR("(UInt32 inNumTypes, EventTypeSpec inList) -> None")},
+ {"FlushEventQueue", (PyCFunction)EventQueueRef_FlushEventQueue, 1,
+ PyDoc_STR("() -> None")},
+ {"GetNumEventsInQueue", (PyCFunction)EventQueueRef_GetNumEventsInQueue, 1,
+ PyDoc_STR("() -> (UInt32 _rv)")},
+ {"RemoveEventFromQueue", (PyCFunction)EventQueueRef_RemoveEventFromQueue, 1,
+ PyDoc_STR("(EventRef inEvent) -> None")},
+ {"IsEventInQueue", (PyCFunction)EventQueueRef_IsEventInQueue, 1,
+ PyDoc_STR("(EventRef inEvent) -> (Boolean _rv)")},
+ {NULL, NULL, 0}
};
#define EventQueueRef_getsetlist NULL
@@ -611,61 +611,61 @@ static PyMethodDef EventQueueRef_methods[] = {
static PyObject *EventQueueRef_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
- PyObject *_self;
- EventQueueRef itself;
- char *kw[] = {"itself", 0};
+ 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;
+ 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 = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
- "_CarbonEvt.EventQueueRef", /*tp_name*/
- sizeof(EventQueueRefObject), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- /* methods */
- (destructor) EventQueueRef_dealloc, /*tp_dealloc*/
- 0, /*tp_print*/
- (getattrfunc)0, /*tp_getattr*/
- (setattrfunc)0, /*tp_setattr*/
- (cmpfunc) EventQueueRef_compare, /*tp_compare*/
- (reprfunc) EventQueueRef_repr, /*tp_repr*/
- (PyNumberMethods *)0, /* tp_as_number */
- (PySequenceMethods *)0, /* tp_as_sequence */
- (PyMappingMethods *)0, /* tp_as_mapping */
- (hashfunc) EventQueueRef_hash, /*tp_hash*/
- 0, /*tp_call*/
- 0, /*tp_str*/
- PyObject_GenericGetAttr, /*tp_getattro*/
- PyObject_GenericSetAttr, /*tp_setattro */
- 0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
- 0, /*tp_doc*/
- 0, /*tp_traverse*/
- 0, /*tp_clear*/
- 0, /*tp_richcompare*/
- 0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
- 0, /*tp_iternext*/
- EventQueueRef_methods, /* tp_methods */
- 0, /*tp_members*/
- EventQueueRef_getsetlist, /*tp_getset*/
- 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 */
+ PyObject_HEAD_INIT(NULL)
+ 0, /*ob_size*/
+ "_CarbonEvt.EventQueueRef", /*tp_name*/
+ sizeof(EventQueueRefObject), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ /* methods */
+ (destructor) EventQueueRef_dealloc, /*tp_dealloc*/
+ 0, /*tp_print*/
+ (getattrfunc)0, /*tp_getattr*/
+ (setattrfunc)0, /*tp_setattr*/
+ (cmpfunc) EventQueueRef_compare, /*tp_compare*/
+ (reprfunc) EventQueueRef_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) EventQueueRef_hash, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ PyObject_GenericGetAttr, /*tp_getattro*/
+ PyObject_GenericSetAttr, /*tp_setattro */
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
+ 0, /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ EventQueueRef_methods, /* tp_methods */
+ 0, /*tp_members*/
+ EventQueueRef_getsetlist, /*tp_getset*/
+ 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 ------------------ */
@@ -678,53 +678,53 @@ PyTypeObject EventLoopRef_Type;
#define EventLoopRef_Check(x) ((x)->ob_type == &EventLoopRef_Type || PyObject_TypeCheck((x), &EventLoopRef_Type))
typedef struct EventLoopRefObject {
- PyObject_HEAD
- EventLoopRef ob_itself;
+ PyObject_HEAD
+ EventLoopRef ob_itself;
} EventLoopRefObject;
PyObject *EventLoopRef_New(EventLoopRef itself)
{
- EventLoopRefObject *it;
- it = PyObject_NEW(EventLoopRefObject, &EventLoopRef_Type);
- if (it == NULL) return NULL;
- it->ob_itself = itself;
- return (PyObject *)it;
+ EventLoopRefObject *it;
+ it = PyObject_NEW(EventLoopRefObject, &EventLoopRef_Type);
+ if (it == NULL) return NULL;
+ it->ob_itself = itself;
+ return (PyObject *)it;
}
int EventLoopRef_Convert(PyObject *v, EventLoopRef *p_itself)
{
- if (!EventLoopRef_Check(v))
- {
- PyErr_SetString(PyExc_TypeError, "EventLoopRef required");
- return 0;
- }
- *p_itself = ((EventLoopRefObject *)v)->ob_itself;
- return 1;
+ if (!EventLoopRef_Check(v))
+ {
+ PyErr_SetString(PyExc_TypeError, "EventLoopRef required");
+ return 0;
+ }
+ *p_itself = ((EventLoopRefObject *)v)->ob_itself;
+ return 1;
}
static void EventLoopRef_dealloc(EventLoopRefObject *self)
{
- /* Cleanup of self->ob_itself goes here */
- self->ob_type->tp_free((PyObject *)self);
+ /* Cleanup of self->ob_itself goes here */
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *EventLoopRef_QuitEventLoop(EventLoopRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = QuitEventLoop(_self->ob_itself);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = QuitEventLoop(_self->ob_itself);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyMethodDef EventLoopRef_methods[] = {
- {"QuitEventLoop", (PyCFunction)EventLoopRef_QuitEventLoop, 1,
- PyDoc_STR("() -> None")},
- {NULL, NULL, 0}
+ {"QuitEventLoop", (PyCFunction)EventLoopRef_QuitEventLoop, 1,
+ PyDoc_STR("() -> None")},
+ {NULL, NULL, 0}
};
#define EventLoopRef_getsetlist NULL
@@ -741,61 +741,61 @@ static PyMethodDef EventLoopRef_methods[] = {
static PyObject *EventLoopRef_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
- PyObject *_self;
- EventLoopRef itself;
- char *kw[] = {"itself", 0};
+ 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;
+ 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 = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
- "_CarbonEvt.EventLoopRef", /*tp_name*/
- sizeof(EventLoopRefObject), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- /* methods */
- (destructor) EventLoopRef_dealloc, /*tp_dealloc*/
- 0, /*tp_print*/
- (getattrfunc)0, /*tp_getattr*/
- (setattrfunc)0, /*tp_setattr*/
- (cmpfunc) EventLoopRef_compare, /*tp_compare*/
- (reprfunc) EventLoopRef_repr, /*tp_repr*/
- (PyNumberMethods *)0, /* tp_as_number */
- (PySequenceMethods *)0, /* tp_as_sequence */
- (PyMappingMethods *)0, /* tp_as_mapping */
- (hashfunc) EventLoopRef_hash, /*tp_hash*/
- 0, /*tp_call*/
- 0, /*tp_str*/
- PyObject_GenericGetAttr, /*tp_getattro*/
- PyObject_GenericSetAttr, /*tp_setattro */
- 0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
- 0, /*tp_doc*/
- 0, /*tp_traverse*/
- 0, /*tp_clear*/
- 0, /*tp_richcompare*/
- 0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
- 0, /*tp_iternext*/
- EventLoopRef_methods, /* tp_methods */
- 0, /*tp_members*/
- EventLoopRef_getsetlist, /*tp_getset*/
- 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 */
+ PyObject_HEAD_INIT(NULL)
+ 0, /*ob_size*/
+ "_CarbonEvt.EventLoopRef", /*tp_name*/
+ sizeof(EventLoopRefObject), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ /* methods */
+ (destructor) EventLoopRef_dealloc, /*tp_dealloc*/
+ 0, /*tp_print*/
+ (getattrfunc)0, /*tp_getattr*/
+ (setattrfunc)0, /*tp_setattr*/
+ (cmpfunc) EventLoopRef_compare, /*tp_compare*/
+ (reprfunc) EventLoopRef_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) EventLoopRef_hash, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ PyObject_GenericGetAttr, /*tp_getattro*/
+ PyObject_GenericSetAttr, /*tp_setattro */
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
+ 0, /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ EventLoopRef_methods, /* tp_methods */
+ 0, /*tp_members*/
+ EventLoopRef_getsetlist, /*tp_getset*/
+ 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 ------------------ */
@@ -808,71 +808,71 @@ PyTypeObject EventLoopTimerRef_Type;
#define EventLoopTimerRef_Check(x) ((x)->ob_type == &EventLoopTimerRef_Type || PyObject_TypeCheck((x), &EventLoopTimerRef_Type))
typedef struct EventLoopTimerRefObject {
- PyObject_HEAD
- EventLoopTimerRef ob_itself;
+ PyObject_HEAD
+ EventLoopTimerRef ob_itself;
} EventLoopTimerRefObject;
PyObject *EventLoopTimerRef_New(EventLoopTimerRef itself)
{
- EventLoopTimerRefObject *it;
- it = PyObject_NEW(EventLoopTimerRefObject, &EventLoopTimerRef_Type);
- if (it == NULL) return NULL;
- it->ob_itself = itself;
- return (PyObject *)it;
+ EventLoopTimerRefObject *it;
+ it = PyObject_NEW(EventLoopTimerRefObject, &EventLoopTimerRef_Type);
+ if (it == NULL) return NULL;
+ it->ob_itself = itself;
+ return (PyObject *)it;
}
int EventLoopTimerRef_Convert(PyObject *v, EventLoopTimerRef *p_itself)
{
- if (!EventLoopTimerRef_Check(v))
- {
- PyErr_SetString(PyExc_TypeError, "EventLoopTimerRef required");
- return 0;
- }
- *p_itself = ((EventLoopTimerRefObject *)v)->ob_itself;
- return 1;
+ if (!EventLoopTimerRef_Check(v))
+ {
+ PyErr_SetString(PyExc_TypeError, "EventLoopTimerRef required");
+ return 0;
+ }
+ *p_itself = ((EventLoopTimerRefObject *)v)->ob_itself;
+ return 1;
}
static void EventLoopTimerRef_dealloc(EventLoopTimerRefObject *self)
{
- /* Cleanup of self->ob_itself goes here */
- self->ob_type->tp_free((PyObject *)self);
+ /* Cleanup of self->ob_itself goes here */
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *EventLoopTimerRef_RemoveEventLoopTimer(EventLoopTimerRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = RemoveEventLoopTimer(_self->ob_itself);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = RemoveEventLoopTimer(_self->ob_itself);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *EventLoopTimerRef_SetEventLoopTimerNextFireTime(EventLoopTimerRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- double inNextFire;
- if (!PyArg_ParseTuple(_args, "d",
- &inNextFire))
- return NULL;
- _err = SetEventLoopTimerNextFireTime(_self->ob_itself,
- inNextFire);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ double inNextFire;
+ if (!PyArg_ParseTuple(_args, "d",
+ &inNextFire))
+ return NULL;
+ _err = SetEventLoopTimerNextFireTime(_self->ob_itself,
+ inNextFire);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyMethodDef EventLoopTimerRef_methods[] = {
- {"RemoveEventLoopTimer", (PyCFunction)EventLoopTimerRef_RemoveEventLoopTimer, 1,
- PyDoc_STR("() -> None")},
- {"SetEventLoopTimerNextFireTime", (PyCFunction)EventLoopTimerRef_SetEventLoopTimerNextFireTime, 1,
- PyDoc_STR("(double inNextFire) -> None")},
- {NULL, NULL, 0}
+ {"RemoveEventLoopTimer", (PyCFunction)EventLoopTimerRef_RemoveEventLoopTimer, 1,
+ PyDoc_STR("() -> None")},
+ {"SetEventLoopTimerNextFireTime", (PyCFunction)EventLoopTimerRef_SetEventLoopTimerNextFireTime, 1,
+ PyDoc_STR("(double inNextFire) -> None")},
+ {NULL, NULL, 0}
};
#define EventLoopTimerRef_getsetlist NULL
@@ -889,61 +889,61 @@ static PyMethodDef EventLoopTimerRef_methods[] = {
static PyObject *EventLoopTimerRef_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
- PyObject *_self;
- EventLoopTimerRef itself;
- char *kw[] = {"itself", 0};
+ 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;
+ 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 = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
- "_CarbonEvt.EventLoopTimerRef", /*tp_name*/
- sizeof(EventLoopTimerRefObject), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- /* methods */
- (destructor) EventLoopTimerRef_dealloc, /*tp_dealloc*/
- 0, /*tp_print*/
- (getattrfunc)0, /*tp_getattr*/
- (setattrfunc)0, /*tp_setattr*/
- (cmpfunc) EventLoopTimerRef_compare, /*tp_compare*/
- (reprfunc) EventLoopTimerRef_repr, /*tp_repr*/
- (PyNumberMethods *)0, /* tp_as_number */
- (PySequenceMethods *)0, /* tp_as_sequence */
- (PyMappingMethods *)0, /* tp_as_mapping */
- (hashfunc) EventLoopTimerRef_hash, /*tp_hash*/
- 0, /*tp_call*/
- 0, /*tp_str*/
- PyObject_GenericGetAttr, /*tp_getattro*/
- PyObject_GenericSetAttr, /*tp_setattro */
- 0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
- 0, /*tp_doc*/
- 0, /*tp_traverse*/
- 0, /*tp_clear*/
- 0, /*tp_richcompare*/
- 0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
- 0, /*tp_iternext*/
- EventLoopTimerRef_methods, /* tp_methods */
- 0, /*tp_members*/
- EventLoopTimerRef_getsetlist, /*tp_getset*/
- 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 */
+ PyObject_HEAD_INIT(NULL)
+ 0, /*ob_size*/
+ "_CarbonEvt.EventLoopTimerRef", /*tp_name*/
+ sizeof(EventLoopTimerRefObject), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ /* methods */
+ (destructor) EventLoopTimerRef_dealloc, /*tp_dealloc*/
+ 0, /*tp_print*/
+ (getattrfunc)0, /*tp_getattr*/
+ (setattrfunc)0, /*tp_setattr*/
+ (cmpfunc) EventLoopTimerRef_compare, /*tp_compare*/
+ (reprfunc) EventLoopTimerRef_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) EventLoopTimerRef_hash, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ PyObject_GenericGetAttr, /*tp_getattro*/
+ PyObject_GenericSetAttr, /*tp_setattro */
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
+ 0, /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ EventLoopTimerRef_methods, /* tp_methods */
+ 0, /*tp_members*/
+ EventLoopTimerRef_getsetlist, /*tp_getset*/
+ 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 ---------------- */
@@ -956,116 +956,116 @@ PyTypeObject EventHandlerRef_Type;
#define EventHandlerRef_Check(x) ((x)->ob_type == &EventHandlerRef_Type || PyObject_TypeCheck((x), &EventHandlerRef_Type))
typedef struct EventHandlerRefObject {
- PyObject_HEAD
- EventHandlerRef ob_itself;
- PyObject *ob_callback;
+ PyObject_HEAD
+ EventHandlerRef ob_itself;
+ PyObject *ob_callback;
} EventHandlerRefObject;
PyObject *EventHandlerRef_New(EventHandlerRef itself)
{
- EventHandlerRefObject *it;
- it = PyObject_NEW(EventHandlerRefObject, &EventHandlerRef_Type);
- if (it == NULL) return NULL;
- it->ob_itself = itself;
- it->ob_callback = NULL;
- return (PyObject *)it;
+ EventHandlerRefObject *it;
+ it = PyObject_NEW(EventHandlerRefObject, &EventHandlerRef_Type);
+ if (it == NULL) return NULL;
+ it->ob_itself = itself;
+ it->ob_callback = NULL;
+ return (PyObject *)it;
}
int EventHandlerRef_Convert(PyObject *v, EventHandlerRef *p_itself)
{
- if (!EventHandlerRef_Check(v))
- {
- PyErr_SetString(PyExc_TypeError, "EventHandlerRef required");
- return 0;
- }
- *p_itself = ((EventHandlerRefObject *)v)->ob_itself;
- return 1;
+ if (!EventHandlerRef_Check(v))
+ {
+ PyErr_SetString(PyExc_TypeError, "EventHandlerRef required");
+ return 0;
+ }
+ *p_itself = ((EventHandlerRefObject *)v)->ob_itself;
+ return 1;
}
static void EventHandlerRef_dealloc(EventHandlerRefObject *self)
{
- if (self->ob_itself != NULL) {
- RemoveEventHandler(self->ob_itself);
- Py_DECREF(self->ob_callback);
- }
- self->ob_type->tp_free((PyObject *)self);
+ if (self->ob_itself != NULL) {
+ RemoveEventHandler(self->ob_itself);
+ Py_DECREF(self->ob_callback);
+ }
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *EventHandlerRef_AddEventTypesToHandler(EventHandlerRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- UInt32 inNumTypes;
- EventTypeSpec inList;
- if (_self->ob_itself == NULL) {
- PyErr_SetString(CarbonEvents_Error, "Handler has been removed");
- return NULL;
- }
- if (!PyArg_ParseTuple(_args, "lO&",
- &inNumTypes,
- EventTypeSpec_Convert, &inList))
- return NULL;
- _err = AddEventTypesToHandler(_self->ob_itself,
- inNumTypes,
- &inList);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ UInt32 inNumTypes;
+ EventTypeSpec inList;
+ if (_self->ob_itself == NULL) {
+ PyErr_SetString(CarbonEvents_Error, "Handler has been removed");
+ return NULL;
+ }
+ if (!PyArg_ParseTuple(_args, "lO&",
+ &inNumTypes,
+ EventTypeSpec_Convert, &inList))
+ return NULL;
+ _err = AddEventTypesToHandler(_self->ob_itself,
+ inNumTypes,
+ &inList);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *EventHandlerRef_RemoveEventTypesFromHandler(EventHandlerRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- UInt32 inNumTypes;
- EventTypeSpec inList;
- if (_self->ob_itself == NULL) {
- PyErr_SetString(CarbonEvents_Error, "Handler has been removed");
- return NULL;
- }
- if (!PyArg_ParseTuple(_args, "lO&",
- &inNumTypes,
- EventTypeSpec_Convert, &inList))
- return NULL;
- _err = RemoveEventTypesFromHandler(_self->ob_itself,
- inNumTypes,
- &inList);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ UInt32 inNumTypes;
+ EventTypeSpec inList;
+ if (_self->ob_itself == NULL) {
+ PyErr_SetString(CarbonEvents_Error, "Handler has been removed");
+ return NULL;
+ }
+ if (!PyArg_ParseTuple(_args, "lO&",
+ &inNumTypes,
+ EventTypeSpec_Convert, &inList))
+ return NULL;
+ _err = RemoveEventTypesFromHandler(_self->ob_itself,
+ inNumTypes,
+ &inList);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *EventHandlerRef_RemoveEventHandler(EventHandlerRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
-
- OSStatus _err;
- if (_self->ob_itself == NULL) {
- PyErr_SetString(CarbonEvents_Error, "Handler has been removed");
- return NULL;
- }
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = RemoveEventHandler(_self->ob_itself);
- if (_err != noErr) return PyMac_Error(_err);
- _self->ob_itself = NULL;
- Py_DECREF(_self->ob_callback);
- _self->ob_callback = NULL;
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+
+ OSStatus _err;
+ if (_self->ob_itself == NULL) {
+ PyErr_SetString(CarbonEvents_Error, "Handler has been removed");
+ return NULL;
+ }
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = RemoveEventHandler(_self->ob_itself);
+ if (_err != noErr) return PyMac_Error(_err);
+ _self->ob_itself = NULL;
+ Py_DECREF(_self->ob_callback);
+ _self->ob_callback = NULL;
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyMethodDef EventHandlerRef_methods[] = {
- {"AddEventTypesToHandler", (PyCFunction)EventHandlerRef_AddEventTypesToHandler, 1,
- PyDoc_STR("(UInt32 inNumTypes, EventTypeSpec inList) -> None")},
- {"RemoveEventTypesFromHandler", (PyCFunction)EventHandlerRef_RemoveEventTypesFromHandler, 1,
- PyDoc_STR("(UInt32 inNumTypes, EventTypeSpec inList) -> None")},
- {"RemoveEventHandler", (PyCFunction)EventHandlerRef_RemoveEventHandler, 1,
- PyDoc_STR("() -> None")},
- {NULL, NULL, 0}
+ {"AddEventTypesToHandler", (PyCFunction)EventHandlerRef_AddEventTypesToHandler, 1,
+ PyDoc_STR("(UInt32 inNumTypes, EventTypeSpec inList) -> None")},
+ {"RemoveEventTypesFromHandler", (PyCFunction)EventHandlerRef_RemoveEventTypesFromHandler, 1,
+ PyDoc_STR("(UInt32 inNumTypes, EventTypeSpec inList) -> None")},
+ {"RemoveEventHandler", (PyCFunction)EventHandlerRef_RemoveEventHandler, 1,
+ PyDoc_STR("() -> None")},
+ {NULL, NULL, 0}
};
#define EventHandlerRef_getsetlist NULL
@@ -1082,61 +1082,61 @@ static PyMethodDef EventHandlerRef_methods[] = {
static PyObject *EventHandlerRef_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
- PyObject *_self;
- EventHandlerRef itself;
- char *kw[] = {"itself", 0};
+ 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;
+ 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 = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
- "_CarbonEvt.EventHandlerRef", /*tp_name*/
- sizeof(EventHandlerRefObject), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- /* methods */
- (destructor) EventHandlerRef_dealloc, /*tp_dealloc*/
- 0, /*tp_print*/
- (getattrfunc)0, /*tp_getattr*/
- (setattrfunc)0, /*tp_setattr*/
- (cmpfunc) EventHandlerRef_compare, /*tp_compare*/
- (reprfunc) EventHandlerRef_repr, /*tp_repr*/
- (PyNumberMethods *)0, /* tp_as_number */
- (PySequenceMethods *)0, /* tp_as_sequence */
- (PyMappingMethods *)0, /* tp_as_mapping */
- (hashfunc) EventHandlerRef_hash, /*tp_hash*/
- 0, /*tp_call*/
- 0, /*tp_str*/
- PyObject_GenericGetAttr, /*tp_getattro*/
- PyObject_GenericSetAttr, /*tp_setattro */
- 0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
- 0, /*tp_doc*/
- 0, /*tp_traverse*/
- 0, /*tp_clear*/
- 0, /*tp_richcompare*/
- 0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
- 0, /*tp_iternext*/
- EventHandlerRef_methods, /* tp_methods */
- 0, /*tp_members*/
- EventHandlerRef_getsetlist, /*tp_getset*/
- 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 */
+ PyObject_HEAD_INIT(NULL)
+ 0, /*ob_size*/
+ "_CarbonEvt.EventHandlerRef", /*tp_name*/
+ sizeof(EventHandlerRefObject), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ /* methods */
+ (destructor) EventHandlerRef_dealloc, /*tp_dealloc*/
+ 0, /*tp_print*/
+ (getattrfunc)0, /*tp_getattr*/
+ (setattrfunc)0, /*tp_setattr*/
+ (cmpfunc) EventHandlerRef_compare, /*tp_compare*/
+ (reprfunc) EventHandlerRef_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) EventHandlerRef_hash, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ PyObject_GenericGetAttr, /*tp_getattro*/
+ PyObject_GenericSetAttr, /*tp_setattro */
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
+ 0, /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ EventHandlerRef_methods, /* tp_methods */
+ 0, /*tp_members*/
+ EventHandlerRef_getsetlist, /*tp_getset*/
+ 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 ----------------- */
@@ -1149,56 +1149,56 @@ PyTypeObject EventHandlerCallRef_Type;
#define EventHandlerCallRef_Check(x) ((x)->ob_type == &EventHandlerCallRef_Type || PyObject_TypeCheck((x), &EventHandlerCallRef_Type))
typedef struct EventHandlerCallRefObject {
- PyObject_HEAD
- EventHandlerCallRef ob_itself;
+ PyObject_HEAD
+ EventHandlerCallRef ob_itself;
} EventHandlerCallRefObject;
PyObject *EventHandlerCallRef_New(EventHandlerCallRef itself)
{
- EventHandlerCallRefObject *it;
- it = PyObject_NEW(EventHandlerCallRefObject, &EventHandlerCallRef_Type);
- if (it == NULL) return NULL;
- it->ob_itself = itself;
- return (PyObject *)it;
+ EventHandlerCallRefObject *it;
+ it = PyObject_NEW(EventHandlerCallRefObject, &EventHandlerCallRef_Type);
+ if (it == NULL) return NULL;
+ it->ob_itself = itself;
+ return (PyObject *)it;
}
int EventHandlerCallRef_Convert(PyObject *v, EventHandlerCallRef *p_itself)
{
- if (!EventHandlerCallRef_Check(v))
- {
- PyErr_SetString(PyExc_TypeError, "EventHandlerCallRef required");
- return 0;
- }
- *p_itself = ((EventHandlerCallRefObject *)v)->ob_itself;
- return 1;
+ if (!EventHandlerCallRef_Check(v))
+ {
+ PyErr_SetString(PyExc_TypeError, "EventHandlerCallRef required");
+ return 0;
+ }
+ *p_itself = ((EventHandlerCallRefObject *)v)->ob_itself;
+ return 1;
}
static void EventHandlerCallRef_dealloc(EventHandlerCallRefObject *self)
{
- /* Cleanup of self->ob_itself goes here */
- self->ob_type->tp_free((PyObject *)self);
+ /* Cleanup of self->ob_itself goes here */
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *EventHandlerCallRef_CallNextEventHandler(EventHandlerCallRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- EventRef inEvent;
- if (!PyArg_ParseTuple(_args, "O&",
- EventRef_Convert, &inEvent))
- return NULL;
- _err = CallNextEventHandler(_self->ob_itself,
- inEvent);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ EventRef inEvent;
+ if (!PyArg_ParseTuple(_args, "O&",
+ EventRef_Convert, &inEvent))
+ return NULL;
+ _err = CallNextEventHandler(_self->ob_itself,
+ inEvent);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyMethodDef EventHandlerCallRef_methods[] = {
- {"CallNextEventHandler", (PyCFunction)EventHandlerCallRef_CallNextEventHandler, 1,
- PyDoc_STR("(EventRef inEvent) -> None")},
- {NULL, NULL, 0}
+ {"CallNextEventHandler", (PyCFunction)EventHandlerCallRef_CallNextEventHandler, 1,
+ PyDoc_STR("(EventRef inEvent) -> None")},
+ {NULL, NULL, 0}
};
#define EventHandlerCallRef_getsetlist NULL
@@ -1215,61 +1215,61 @@ static PyMethodDef EventHandlerCallRef_methods[] = {
static PyObject *EventHandlerCallRef_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
- PyObject *_self;
- EventHandlerCallRef itself;
- char *kw[] = {"itself", 0};
+ 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;
+ 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 = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
- "_CarbonEvt.EventHandlerCallRef", /*tp_name*/
- sizeof(EventHandlerCallRefObject), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- /* methods */
- (destructor) EventHandlerCallRef_dealloc, /*tp_dealloc*/
- 0, /*tp_print*/
- (getattrfunc)0, /*tp_getattr*/
- (setattrfunc)0, /*tp_setattr*/
- (cmpfunc) EventHandlerCallRef_compare, /*tp_compare*/
- (reprfunc) EventHandlerCallRef_repr, /*tp_repr*/
- (PyNumberMethods *)0, /* tp_as_number */
- (PySequenceMethods *)0, /* tp_as_sequence */
- (PyMappingMethods *)0, /* tp_as_mapping */
- (hashfunc) EventHandlerCallRef_hash, /*tp_hash*/
- 0, /*tp_call*/
- 0, /*tp_str*/
- PyObject_GenericGetAttr, /*tp_getattro*/
- PyObject_GenericSetAttr, /*tp_setattro */
- 0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
- 0, /*tp_doc*/
- 0, /*tp_traverse*/
- 0, /*tp_clear*/
- 0, /*tp_richcompare*/
- 0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
- 0, /*tp_iternext*/
- EventHandlerCallRef_methods, /* tp_methods */
- 0, /*tp_members*/
- EventHandlerCallRef_getsetlist, /*tp_getset*/
- 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 */
+ PyObject_HEAD_INIT(NULL)
+ 0, /*ob_size*/
+ "_CarbonEvt.EventHandlerCallRef", /*tp_name*/
+ sizeof(EventHandlerCallRefObject), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ /* methods */
+ (destructor) EventHandlerCallRef_dealloc, /*tp_dealloc*/
+ 0, /*tp_print*/
+ (getattrfunc)0, /*tp_getattr*/
+ (setattrfunc)0, /*tp_setattr*/
+ (cmpfunc) EventHandlerCallRef_compare, /*tp_compare*/
+ (reprfunc) EventHandlerCallRef_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) EventHandlerCallRef_hash, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ PyObject_GenericGetAttr, /*tp_getattro*/
+ PyObject_GenericSetAttr, /*tp_setattro */
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
+ 0, /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ EventHandlerCallRef_methods, /* tp_methods */
+ 0, /*tp_members*/
+ EventHandlerCallRef_getsetlist, /*tp_getset*/
+ 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 --------------- */
@@ -1282,78 +1282,78 @@ PyTypeObject EventTargetRef_Type;
#define EventTargetRef_Check(x) ((x)->ob_type == &EventTargetRef_Type || PyObject_TypeCheck((x), &EventTargetRef_Type))
typedef struct EventTargetRefObject {
- PyObject_HEAD
- EventTargetRef ob_itself;
+ PyObject_HEAD
+ EventTargetRef ob_itself;
} EventTargetRefObject;
PyObject *EventTargetRef_New(EventTargetRef itself)
{
- EventTargetRefObject *it;
- it = PyObject_NEW(EventTargetRefObject, &EventTargetRef_Type);
- if (it == NULL) return NULL;
- it->ob_itself = itself;
- return (PyObject *)it;
+ EventTargetRefObject *it;
+ it = PyObject_NEW(EventTargetRefObject, &EventTargetRef_Type);
+ if (it == NULL) return NULL;
+ it->ob_itself = itself;
+ return (PyObject *)it;
}
int EventTargetRef_Convert(PyObject *v, EventTargetRef *p_itself)
{
- if (!EventTargetRef_Check(v))
- {
- PyErr_SetString(PyExc_TypeError, "EventTargetRef required");
- return 0;
- }
- *p_itself = ((EventTargetRefObject *)v)->ob_itself;
- return 1;
+ if (!EventTargetRef_Check(v))
+ {
+ PyErr_SetString(PyExc_TypeError, "EventTargetRef required");
+ return 0;
+ }
+ *p_itself = ((EventTargetRefObject *)v)->ob_itself;
+ return 1;
}
static void EventTargetRef_dealloc(EventTargetRefObject *self)
{
- /* Cleanup of self->ob_itself goes here */
- self->ob_type->tp_free((PyObject *)self);
+ /* Cleanup of self->ob_itself goes here */
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *EventTargetRef_InstallStandardEventHandler(EventTargetRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = InstallStandardEventHandler(_self->ob_itself);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = InstallStandardEventHandler(_self->ob_itself);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *EventTargetRef_InstallEventHandler(EventTargetRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
- EventTypeSpec inSpec;
- PyObject *callback;
- EventHandlerRef outRef;
- OSStatus _err;
+ EventTypeSpec inSpec;
+ PyObject *callback;
+ EventHandlerRef outRef;
+ OSStatus _err;
- if (!PyArg_ParseTuple(_args, "O&O", EventTypeSpec_Convert, &inSpec, &callback))
- return NULL;
+ if (!PyArg_ParseTuple(_args, "O&O", EventTypeSpec_Convert, &inSpec, &callback))
+ return NULL;
- _err = InstallEventHandler(_self->ob_itself, myEventHandlerUPP, 1, &inSpec, (void *)callback, &outRef);
- if (_err != noErr) return PyMac_Error(_err);
+ _err = InstallEventHandler(_self->ob_itself, myEventHandlerUPP, 1, &inSpec, (void *)callback, &outRef);
+ if (_err != noErr) return PyMac_Error(_err);
- _res = EventHandlerRef_New(outRef);
- if (_res != NULL) {
- ((EventHandlerRefObject*)_res)->ob_callback = callback;
- Py_INCREF(callback);
- }
- return _res;
+ _res = EventHandlerRef_New(outRef);
+ if (_res != NULL) {
+ ((EventHandlerRefObject*)_res)->ob_callback = callback;
+ Py_INCREF(callback);
+ }
+ return _res;
}
static PyMethodDef EventTargetRef_methods[] = {
- {"InstallStandardEventHandler", (PyCFunction)EventTargetRef_InstallStandardEventHandler, 1,
- PyDoc_STR("() -> None")},
- {"InstallEventHandler", (PyCFunction)EventTargetRef_InstallEventHandler, 1,
- PyDoc_STR("(EventTypeSpec inSpec, Method callback) -> (EventHandlerRef outRef)")},
- {NULL, NULL, 0}
+ {"InstallStandardEventHandler", (PyCFunction)EventTargetRef_InstallStandardEventHandler, 1,
+ PyDoc_STR("() -> None")},
+ {"InstallEventHandler", (PyCFunction)EventTargetRef_InstallEventHandler, 1,
+ PyDoc_STR("(EventTypeSpec inSpec, Method callback) -> (EventHandlerRef outRef)")},
+ {NULL, NULL, 0}
};
#define EventTargetRef_getsetlist NULL
@@ -1370,61 +1370,61 @@ static PyMethodDef EventTargetRef_methods[] = {
static PyObject *EventTargetRef_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
- PyObject *_self;
- EventTargetRef itself;
- char *kw[] = {"itself", 0};
+ 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;
+ 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 = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
- "_CarbonEvt.EventTargetRef", /*tp_name*/
- sizeof(EventTargetRefObject), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- /* methods */
- (destructor) EventTargetRef_dealloc, /*tp_dealloc*/
- 0, /*tp_print*/
- (getattrfunc)0, /*tp_getattr*/
- (setattrfunc)0, /*tp_setattr*/
- (cmpfunc) EventTargetRef_compare, /*tp_compare*/
- (reprfunc) EventTargetRef_repr, /*tp_repr*/
- (PyNumberMethods *)0, /* tp_as_number */
- (PySequenceMethods *)0, /* tp_as_sequence */
- (PyMappingMethods *)0, /* tp_as_mapping */
- (hashfunc) EventTargetRef_hash, /*tp_hash*/
- 0, /*tp_call*/
- 0, /*tp_str*/
- PyObject_GenericGetAttr, /*tp_getattro*/
- PyObject_GenericSetAttr, /*tp_setattro */
- 0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
- 0, /*tp_doc*/
- 0, /*tp_traverse*/
- 0, /*tp_clear*/
- 0, /*tp_richcompare*/
- 0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
- 0, /*tp_iternext*/
- EventTargetRef_methods, /* tp_methods */
- 0, /*tp_members*/
- EventTargetRef_getsetlist, /*tp_getset*/
- 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 */
+ PyObject_HEAD_INIT(NULL)
+ 0, /*ob_size*/
+ "_CarbonEvt.EventTargetRef", /*tp_name*/
+ sizeof(EventTargetRefObject), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ /* methods */
+ (destructor) EventTargetRef_dealloc, /*tp_dealloc*/
+ 0, /*tp_print*/
+ (getattrfunc)0, /*tp_getattr*/
+ (setattrfunc)0, /*tp_setattr*/
+ (cmpfunc) EventTargetRef_compare, /*tp_compare*/
+ (reprfunc) EventTargetRef_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) EventTargetRef_hash, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ PyObject_GenericGetAttr, /*tp_getattro*/
+ PyObject_GenericSetAttr, /*tp_setattro */
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
+ 0, /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ EventTargetRef_methods, /* tp_methods */
+ 0, /*tp_members*/
+ EventTargetRef_getsetlist, /*tp_getset*/
+ 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 ----------------- */
@@ -1437,53 +1437,53 @@ PyTypeObject EventHotKeyRef_Type;
#define EventHotKeyRef_Check(x) ((x)->ob_type == &EventHotKeyRef_Type || PyObject_TypeCheck((x), &EventHotKeyRef_Type))
typedef struct EventHotKeyRefObject {
- PyObject_HEAD
- EventHotKeyRef ob_itself;
+ PyObject_HEAD
+ EventHotKeyRef ob_itself;
} EventHotKeyRefObject;
PyObject *EventHotKeyRef_New(EventHotKeyRef itself)
{
- EventHotKeyRefObject *it;
- it = PyObject_NEW(EventHotKeyRefObject, &EventHotKeyRef_Type);
- if (it == NULL) return NULL;
- it->ob_itself = itself;
- return (PyObject *)it;
+ EventHotKeyRefObject *it;
+ it = PyObject_NEW(EventHotKeyRefObject, &EventHotKeyRef_Type);
+ if (it == NULL) return NULL;
+ it->ob_itself = itself;
+ return (PyObject *)it;
}
int EventHotKeyRef_Convert(PyObject *v, EventHotKeyRef *p_itself)
{
- if (!EventHotKeyRef_Check(v))
- {
- PyErr_SetString(PyExc_TypeError, "EventHotKeyRef required");
- return 0;
- }
- *p_itself = ((EventHotKeyRefObject *)v)->ob_itself;
- return 1;
+ if (!EventHotKeyRef_Check(v))
+ {
+ PyErr_SetString(PyExc_TypeError, "EventHotKeyRef required");
+ return 0;
+ }
+ *p_itself = ((EventHotKeyRefObject *)v)->ob_itself;
+ return 1;
}
static void EventHotKeyRef_dealloc(EventHotKeyRefObject *self)
{
- /* Cleanup of self->ob_itself goes here */
- self->ob_type->tp_free((PyObject *)self);
+ /* Cleanup of self->ob_itself goes here */
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *EventHotKeyRef_UnregisterEventHotKey(EventHotKeyRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = UnregisterEventHotKey(_self->ob_itself);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = UnregisterEventHotKey(_self->ob_itself);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyMethodDef EventHotKeyRef_methods[] = {
- {"UnregisterEventHotKey", (PyCFunction)EventHotKeyRef_UnregisterEventHotKey, 1,
- PyDoc_STR("() -> None")},
- {NULL, NULL, 0}
+ {"UnregisterEventHotKey", (PyCFunction)EventHotKeyRef_UnregisterEventHotKey, 1,
+ PyDoc_STR("() -> None")},
+ {NULL, NULL, 0}
};
#define EventHotKeyRef_getsetlist NULL
@@ -1500,61 +1500,61 @@ static PyMethodDef EventHotKeyRef_methods[] = {
static PyObject *EventHotKeyRef_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
- PyObject *_self;
- EventHotKeyRef itself;
- char *kw[] = {"itself", 0};
+ 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;
+ 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 = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
- "_CarbonEvt.EventHotKeyRef", /*tp_name*/
- sizeof(EventHotKeyRefObject), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- /* methods */
- (destructor) EventHotKeyRef_dealloc, /*tp_dealloc*/
- 0, /*tp_print*/
- (getattrfunc)0, /*tp_getattr*/
- (setattrfunc)0, /*tp_setattr*/
- (cmpfunc) EventHotKeyRef_compare, /*tp_compare*/
- (reprfunc) EventHotKeyRef_repr, /*tp_repr*/
- (PyNumberMethods *)0, /* tp_as_number */
- (PySequenceMethods *)0, /* tp_as_sequence */
- (PyMappingMethods *)0, /* tp_as_mapping */
- (hashfunc) EventHotKeyRef_hash, /*tp_hash*/
- 0, /*tp_call*/
- 0, /*tp_str*/
- PyObject_GenericGetAttr, /*tp_getattro*/
- PyObject_GenericSetAttr, /*tp_setattro */
- 0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
- 0, /*tp_doc*/
- 0, /*tp_traverse*/
- 0, /*tp_clear*/
- 0, /*tp_richcompare*/
- 0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
- 0, /*tp_iternext*/
- EventHotKeyRef_methods, /* tp_methods */
- 0, /*tp_members*/
- EventHotKeyRef_getsetlist, /*tp_getset*/
- 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 */
+ PyObject_HEAD_INIT(NULL)
+ 0, /*ob_size*/
+ "_CarbonEvt.EventHotKeyRef", /*tp_name*/
+ sizeof(EventHotKeyRefObject), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ /* methods */
+ (destructor) EventHotKeyRef_dealloc, /*tp_dealloc*/
+ 0, /*tp_print*/
+ (getattrfunc)0, /*tp_getattr*/
+ (setattrfunc)0, /*tp_setattr*/
+ (cmpfunc) EventHotKeyRef_compare, /*tp_compare*/
+ (reprfunc) EventHotKeyRef_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) EventHotKeyRef_hash, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ PyObject_GenericGetAttr, /*tp_getattro*/
+ PyObject_GenericSetAttr, /*tp_setattro */
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
+ 0, /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ EventHotKeyRef_methods, /* tp_methods */
+ 0, /*tp_members*/
+ EventHotKeyRef_getsetlist, /*tp_getset*/
+ 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 ----------------- */
@@ -1562,577 +1562,577 @@ PyTypeObject EventHotKeyRef_Type = {
static PyObject *CarbonEvents_GetCurrentEventLoop(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- EventLoopRef _rv;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetCurrentEventLoop();
- _res = Py_BuildValue("O&",
- EventLoopRef_New, _rv);
- return _res;
+ PyObject *_res = NULL;
+ EventLoopRef _rv;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetCurrentEventLoop();
+ _res = Py_BuildValue("O&",
+ EventLoopRef_New, _rv);
+ return _res;
}
static PyObject *CarbonEvents_GetMainEventLoop(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- EventLoopRef _rv;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetMainEventLoop();
- _res = Py_BuildValue("O&",
- EventLoopRef_New, _rv);
- return _res;
+ PyObject *_res = NULL;
+ EventLoopRef _rv;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetMainEventLoop();
+ _res = Py_BuildValue("O&",
+ EventLoopRef_New, _rv);
+ return _res;
}
static PyObject *CarbonEvents_RunCurrentEventLoop(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- double inTimeout;
- if (!PyArg_ParseTuple(_args, "d",
- &inTimeout))
- return NULL;
- _err = RunCurrentEventLoop(inTimeout);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ double inTimeout;
+ if (!PyArg_ParseTuple(_args, "d",
+ &inTimeout))
+ return NULL;
+ _err = RunCurrentEventLoop(inTimeout);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CarbonEvents_ReceiveNextEvent(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- UInt32 inNumTypes;
- EventTypeSpec inList;
- double inTimeout;
- Boolean inPullEvent;
- EventRef outEvent;
- if (!PyArg_ParseTuple(_args, "lO&db",
- &inNumTypes,
- EventTypeSpec_Convert, &inList,
- &inTimeout,
- &inPullEvent))
- return NULL;
- _err = ReceiveNextEvent(inNumTypes,
- &inList,
- inTimeout,
- inPullEvent,
- &outEvent);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- EventRef_New, outEvent);
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ UInt32 inNumTypes;
+ EventTypeSpec inList;
+ double inTimeout;
+ Boolean inPullEvent;
+ EventRef outEvent;
+ if (!PyArg_ParseTuple(_args, "lO&db",
+ &inNumTypes,
+ EventTypeSpec_Convert, &inList,
+ &inTimeout,
+ &inPullEvent))
+ return NULL;
+ _err = ReceiveNextEvent(inNumTypes,
+ &inList,
+ inTimeout,
+ inPullEvent,
+ &outEvent);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ EventRef_New, outEvent);
+ return _res;
}
static PyObject *CarbonEvents_GetCurrentEventQueue(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- EventQueueRef _rv;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetCurrentEventQueue();
- _res = Py_BuildValue("O&",
- EventQueueRef_New, _rv);
- return _res;
+ PyObject *_res = NULL;
+ EventQueueRef _rv;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetCurrentEventQueue();
+ _res = Py_BuildValue("O&",
+ EventQueueRef_New, _rv);
+ return _res;
}
static PyObject *CarbonEvents_GetMainEventQueue(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- EventQueueRef _rv;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetMainEventQueue();
- _res = Py_BuildValue("O&",
- EventQueueRef_New, _rv);
- return _res;
+ PyObject *_res = NULL;
+ EventQueueRef _rv;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetMainEventQueue();
+ _res = Py_BuildValue("O&",
+ EventQueueRef_New, _rv);
+ return _res;
}
static PyObject *CarbonEvents_GetCurrentEventTime(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- double _rv;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetCurrentEventTime();
- _res = Py_BuildValue("d",
- _rv);
- return _res;
+ PyObject *_res = NULL;
+ double _rv;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetCurrentEventTime();
+ _res = Py_BuildValue("d",
+ _rv);
+ return _res;
}
static PyObject *CarbonEvents_TrackMouseLocation(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- GrafPtr inPort;
- Point outPt;
- UInt16 outResult;
- if (!PyArg_ParseTuple(_args, "O&",
- GrafObj_Convert, &inPort))
- return NULL;
- _err = TrackMouseLocation(inPort,
- &outPt,
- &outResult);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&H",
- PyMac_BuildPoint, outPt,
- outResult);
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ GrafPtr inPort;
+ Point outPt;
+ UInt16 outResult;
+ if (!PyArg_ParseTuple(_args, "O&",
+ GrafObj_Convert, &inPort))
+ return NULL;
+ _err = TrackMouseLocation(inPort,
+ &outPt,
+ &outResult);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&H",
+ PyMac_BuildPoint, outPt,
+ outResult);
+ return _res;
}
static PyObject *CarbonEvents_TrackMouseLocationWithOptions(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- GrafPtr inPort;
- OptionBits inOptions;
- double inTimeout;
- Point outPt;
- UInt32 outModifiers;
- UInt16 outResult;
- if (!PyArg_ParseTuple(_args, "O&ld",
- GrafObj_Convert, &inPort,
- &inOptions,
- &inTimeout))
- return NULL;
- _err = TrackMouseLocationWithOptions(inPort,
- inOptions,
- inTimeout,
- &outPt,
- &outModifiers,
- &outResult);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&lH",
- PyMac_BuildPoint, outPt,
- outModifiers,
- outResult);
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ GrafPtr inPort;
+ OptionBits inOptions;
+ double inTimeout;
+ Point outPt;
+ UInt32 outModifiers;
+ UInt16 outResult;
+ if (!PyArg_ParseTuple(_args, "O&ld",
+ GrafObj_Convert, &inPort,
+ &inOptions,
+ &inTimeout))
+ return NULL;
+ _err = TrackMouseLocationWithOptions(inPort,
+ inOptions,
+ inTimeout,
+ &outPt,
+ &outModifiers,
+ &outResult);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&lH",
+ PyMac_BuildPoint, outPt,
+ outModifiers,
+ outResult);
+ return _res;
}
static PyObject *CarbonEvents_TrackMouseRegion(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- GrafPtr inPort;
- RgnHandle inRegion;
- Boolean ioWasInRgn;
- UInt16 outResult;
- if (!PyArg_ParseTuple(_args, "O&O&b",
- GrafObj_Convert, &inPort,
- ResObj_Convert, &inRegion,
- &ioWasInRgn))
- return NULL;
- _err = TrackMouseRegion(inPort,
- inRegion,
- &ioWasInRgn,
- &outResult);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("bH",
- ioWasInRgn,
- outResult);
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ GrafPtr inPort;
+ RgnHandle inRegion;
+ Boolean ioWasInRgn;
+ UInt16 outResult;
+ if (!PyArg_ParseTuple(_args, "O&O&b",
+ GrafObj_Convert, &inPort,
+ ResObj_Convert, &inRegion,
+ &ioWasInRgn))
+ return NULL;
+ _err = TrackMouseRegion(inPort,
+ inRegion,
+ &ioWasInRgn,
+ &outResult);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("bH",
+ ioWasInRgn,
+ outResult);
+ return _res;
}
static PyObject *CarbonEvents_GetLastUserEventTime(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- double _rv;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetLastUserEventTime();
- _res = Py_BuildValue("d",
- _rv);
- return _res;
+ PyObject *_res = NULL;
+ double _rv;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetLastUserEventTime();
+ _res = Py_BuildValue("d",
+ _rv);
+ return _res;
}
static PyObject *CarbonEvents_IsMouseCoalescingEnabled(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = IsMouseCoalescingEnabled();
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = IsMouseCoalescingEnabled();
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *CarbonEvents_SetMouseCoalescingEnabled(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- Boolean inNewState;
- Boolean outOldState;
- if (!PyArg_ParseTuple(_args, "b",
- &inNewState))
- return NULL;
- _err = SetMouseCoalescingEnabled(inNewState,
- &outOldState);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("b",
- outOldState);
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Boolean inNewState;
+ Boolean outOldState;
+ if (!PyArg_ParseTuple(_args, "b",
+ &inNewState))
+ return NULL;
+ _err = SetMouseCoalescingEnabled(inNewState,
+ &outOldState);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("b",
+ outOldState);
+ return _res;
}
static PyObject *CarbonEvents_GetWindowEventTarget(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- EventTargetRef _rv;
- WindowPtr inWindow;
- if (!PyArg_ParseTuple(_args, "O&",
- WinObj_Convert, &inWindow))
- return NULL;
- _rv = GetWindowEventTarget(inWindow);
- _res = Py_BuildValue("O&",
- EventTargetRef_New, _rv);
- return _res;
+ PyObject *_res = NULL;
+ EventTargetRef _rv;
+ WindowPtr inWindow;
+ if (!PyArg_ParseTuple(_args, "O&",
+ WinObj_Convert, &inWindow))
+ return NULL;
+ _rv = GetWindowEventTarget(inWindow);
+ _res = Py_BuildValue("O&",
+ EventTargetRef_New, _rv);
+ return _res;
}
static PyObject *CarbonEvents_GetControlEventTarget(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- EventTargetRef _rv;
- ControlHandle inControl;
- if (!PyArg_ParseTuple(_args, "O&",
- CtlObj_Convert, &inControl))
- return NULL;
- _rv = GetControlEventTarget(inControl);
- _res = Py_BuildValue("O&",
- EventTargetRef_New, _rv);
- return _res;
+ PyObject *_res = NULL;
+ EventTargetRef _rv;
+ ControlHandle inControl;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CtlObj_Convert, &inControl))
+ return NULL;
+ _rv = GetControlEventTarget(inControl);
+ _res = Py_BuildValue("O&",
+ EventTargetRef_New, _rv);
+ return _res;
}
static PyObject *CarbonEvents_GetMenuEventTarget(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- EventTargetRef _rv;
- MenuHandle inMenu;
- if (!PyArg_ParseTuple(_args, "O&",
- MenuObj_Convert, &inMenu))
- return NULL;
- _rv = GetMenuEventTarget(inMenu);
- _res = Py_BuildValue("O&",
- EventTargetRef_New, _rv);
- return _res;
+ PyObject *_res = NULL;
+ EventTargetRef _rv;
+ MenuHandle inMenu;
+ if (!PyArg_ParseTuple(_args, "O&",
+ MenuObj_Convert, &inMenu))
+ return NULL;
+ _rv = GetMenuEventTarget(inMenu);
+ _res = Py_BuildValue("O&",
+ EventTargetRef_New, _rv);
+ return _res;
}
static PyObject *CarbonEvents_GetApplicationEventTarget(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- EventTargetRef _rv;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetApplicationEventTarget();
- _res = Py_BuildValue("O&",
- EventTargetRef_New, _rv);
- return _res;
+ PyObject *_res = NULL;
+ EventTargetRef _rv;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetApplicationEventTarget();
+ _res = Py_BuildValue("O&",
+ EventTargetRef_New, _rv);
+ return _res;
}
static PyObject *CarbonEvents_GetUserFocusEventTarget(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- EventTargetRef _rv;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetUserFocusEventTarget();
- _res = Py_BuildValue("O&",
- EventTargetRef_New, _rv);
- return _res;
+ PyObject *_res = NULL;
+ EventTargetRef _rv;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetUserFocusEventTarget();
+ _res = Py_BuildValue("O&",
+ EventTargetRef_New, _rv);
+ return _res;
}
static PyObject *CarbonEvents_GetEventDispatcherTarget(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- EventTargetRef _rv;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetEventDispatcherTarget();
- _res = Py_BuildValue("O&",
- EventTargetRef_New, _rv);
- return _res;
+ PyObject *_res = NULL;
+ EventTargetRef _rv;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetEventDispatcherTarget();
+ _res = Py_BuildValue("O&",
+ EventTargetRef_New, _rv);
+ return _res;
}
static PyObject *CarbonEvents_RunApplicationEventLoop(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- RunApplicationEventLoop();
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ RunApplicationEventLoop();
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CarbonEvents_QuitApplicationEventLoop(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- QuitApplicationEventLoop();
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ QuitApplicationEventLoop();
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CarbonEvents_RunAppModalLoopForWindow(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowPtr inWindow;
- if (!PyArg_ParseTuple(_args, "O&",
- WinObj_Convert, &inWindow))
- return NULL;
- _err = RunAppModalLoopForWindow(inWindow);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowPtr inWindow;
+ if (!PyArg_ParseTuple(_args, "O&",
+ WinObj_Convert, &inWindow))
+ return NULL;
+ _err = RunAppModalLoopForWindow(inWindow);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CarbonEvents_QuitAppModalLoopForWindow(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowPtr inWindow;
- if (!PyArg_ParseTuple(_args, "O&",
- WinObj_Convert, &inWindow))
- return NULL;
- _err = QuitAppModalLoopForWindow(inWindow);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowPtr inWindow;
+ if (!PyArg_ParseTuple(_args, "O&",
+ WinObj_Convert, &inWindow))
+ return NULL;
+ _err = QuitAppModalLoopForWindow(inWindow);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CarbonEvents_BeginAppModalStateForWindow(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowPtr inWindow;
- if (!PyArg_ParseTuple(_args, "O&",
- WinObj_Convert, &inWindow))
- return NULL;
- _err = BeginAppModalStateForWindow(inWindow);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowPtr inWindow;
+ if (!PyArg_ParseTuple(_args, "O&",
+ WinObj_Convert, &inWindow))
+ return NULL;
+ _err = BeginAppModalStateForWindow(inWindow);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CarbonEvents_EndAppModalStateForWindow(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowPtr inWindow;
- if (!PyArg_ParseTuple(_args, "O&",
- WinObj_Convert, &inWindow))
- return NULL;
- _err = EndAppModalStateForWindow(inWindow);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowPtr inWindow;
+ if (!PyArg_ParseTuple(_args, "O&",
+ WinObj_Convert, &inWindow))
+ return NULL;
+ _err = EndAppModalStateForWindow(inWindow);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CarbonEvents_SetUserFocusWindow(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowPtr inWindow;
- if (!PyArg_ParseTuple(_args, "O&",
- WinObj_Convert, &inWindow))
- return NULL;
- _err = SetUserFocusWindow(inWindow);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowPtr inWindow;
+ if (!PyArg_ParseTuple(_args, "O&",
+ WinObj_Convert, &inWindow))
+ return NULL;
+ _err = SetUserFocusWindow(inWindow);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CarbonEvents_GetUserFocusWindow(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- WindowPtr _rv;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetUserFocusWindow();
- _res = Py_BuildValue("O&",
- WinObj_New, _rv);
- return _res;
+ PyObject *_res = NULL;
+ WindowPtr _rv;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetUserFocusWindow();
+ _res = Py_BuildValue("O&",
+ WinObj_New, _rv);
+ return _res;
}
static PyObject *CarbonEvents_SetWindowDefaultButton(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowPtr inWindow;
- ControlHandle inControl;
- if (!PyArg_ParseTuple(_args, "O&O&",
- WinObj_Convert, &inWindow,
- CtlObj_Convert, &inControl))
- return NULL;
- _err = SetWindowDefaultButton(inWindow,
- inControl);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowPtr inWindow;
+ ControlHandle inControl;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ WinObj_Convert, &inWindow,
+ CtlObj_Convert, &inControl))
+ return NULL;
+ _err = SetWindowDefaultButton(inWindow,
+ inControl);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CarbonEvents_SetWindowCancelButton(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowPtr inWindow;
- ControlHandle inControl;
- if (!PyArg_ParseTuple(_args, "O&O&",
- WinObj_Convert, &inWindow,
- CtlObj_Convert, &inControl))
- return NULL;
- _err = SetWindowCancelButton(inWindow,
- inControl);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowPtr inWindow;
+ ControlHandle inControl;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ WinObj_Convert, &inWindow,
+ CtlObj_Convert, &inControl))
+ return NULL;
+ _err = SetWindowCancelButton(inWindow,
+ inControl);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CarbonEvents_GetWindowDefaultButton(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowPtr inWindow;
- ControlHandle outControl;
- if (!PyArg_ParseTuple(_args, "O&",
- WinObj_Convert, &inWindow))
- return NULL;
- _err = GetWindowDefaultButton(inWindow,
- &outControl);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- CtlObj_New, outControl);
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowPtr inWindow;
+ ControlHandle outControl;
+ if (!PyArg_ParseTuple(_args, "O&",
+ WinObj_Convert, &inWindow))
+ return NULL;
+ _err = GetWindowDefaultButton(inWindow,
+ &outControl);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ CtlObj_New, outControl);
+ return _res;
}
static PyObject *CarbonEvents_GetWindowCancelButton(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowPtr inWindow;
- ControlHandle outControl;
- if (!PyArg_ParseTuple(_args, "O&",
- WinObj_Convert, &inWindow))
- return NULL;
- _err = GetWindowCancelButton(inWindow,
- &outControl);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- CtlObj_New, outControl);
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowPtr inWindow;
+ ControlHandle outControl;
+ if (!PyArg_ParseTuple(_args, "O&",
+ WinObj_Convert, &inWindow))
+ return NULL;
+ _err = GetWindowCancelButton(inWindow,
+ &outControl);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ CtlObj_New, outControl);
+ return _res;
}
static PyObject *CarbonEvents_RegisterEventHotKey(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- UInt32 inHotKeyCode;
- UInt32 inHotKeyModifiers;
- EventHotKeyID inHotKeyID;
- EventTargetRef inTarget;
- OptionBits inOptions;
- EventHotKeyRef outRef;
- if (!PyArg_ParseTuple(_args, "llO&O&l",
- &inHotKeyCode,
- &inHotKeyModifiers,
- EventHotKeyID_Convert, &inHotKeyID,
- EventTargetRef_Convert, &inTarget,
- &inOptions))
- return NULL;
- _err = RegisterEventHotKey(inHotKeyCode,
- inHotKeyModifiers,
- inHotKeyID,
- inTarget,
- inOptions,
- &outRef);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- EventHotKeyRef_New, outRef);
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ UInt32 inHotKeyCode;
+ UInt32 inHotKeyModifiers;
+ EventHotKeyID inHotKeyID;
+ EventTargetRef inTarget;
+ OptionBits inOptions;
+ EventHotKeyRef outRef;
+ if (!PyArg_ParseTuple(_args, "llO&O&l",
+ &inHotKeyCode,
+ &inHotKeyModifiers,
+ EventHotKeyID_Convert, &inHotKeyID,
+ EventTargetRef_Convert, &inTarget,
+ &inOptions))
+ return NULL;
+ _err = RegisterEventHotKey(inHotKeyCode,
+ inHotKeyModifiers,
+ inHotKeyID,
+ inTarget,
+ inOptions,
+ &outRef);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ EventHotKeyRef_New, outRef);
+ return _res;
}
static PyMethodDef CarbonEvents_methods[] = {
- {"GetCurrentEventLoop", (PyCFunction)CarbonEvents_GetCurrentEventLoop, 1,
- PyDoc_STR("() -> (EventLoopRef _rv)")},
- {"GetMainEventLoop", (PyCFunction)CarbonEvents_GetMainEventLoop, 1,
- PyDoc_STR("() -> (EventLoopRef _rv)")},
- {"RunCurrentEventLoop", (PyCFunction)CarbonEvents_RunCurrentEventLoop, 1,
- PyDoc_STR("(double inTimeout) -> None")},
- {"ReceiveNextEvent", (PyCFunction)CarbonEvents_ReceiveNextEvent, 1,
- PyDoc_STR("(UInt32 inNumTypes, EventTypeSpec inList, double inTimeout, Boolean inPullEvent) -> (EventRef outEvent)")},
- {"GetCurrentEventQueue", (PyCFunction)CarbonEvents_GetCurrentEventQueue, 1,
- PyDoc_STR("() -> (EventQueueRef _rv)")},
- {"GetMainEventQueue", (PyCFunction)CarbonEvents_GetMainEventQueue, 1,
- PyDoc_STR("() -> (EventQueueRef _rv)")},
- {"GetCurrentEventTime", (PyCFunction)CarbonEvents_GetCurrentEventTime, 1,
- PyDoc_STR("() -> (double _rv)")},
- {"TrackMouseLocation", (PyCFunction)CarbonEvents_TrackMouseLocation, 1,
- PyDoc_STR("(GrafPtr inPort) -> (Point outPt, UInt16 outResult)")},
- {"TrackMouseLocationWithOptions", (PyCFunction)CarbonEvents_TrackMouseLocationWithOptions, 1,
- PyDoc_STR("(GrafPtr inPort, OptionBits inOptions, double inTimeout) -> (Point outPt, UInt32 outModifiers, UInt16 outResult)")},
- {"TrackMouseRegion", (PyCFunction)CarbonEvents_TrackMouseRegion, 1,
- PyDoc_STR("(GrafPtr inPort, RgnHandle inRegion, Boolean ioWasInRgn) -> (Boolean ioWasInRgn, UInt16 outResult)")},
- {"GetLastUserEventTime", (PyCFunction)CarbonEvents_GetLastUserEventTime, 1,
- PyDoc_STR("() -> (double _rv)")},
- {"IsMouseCoalescingEnabled", (PyCFunction)CarbonEvents_IsMouseCoalescingEnabled, 1,
- PyDoc_STR("() -> (Boolean _rv)")},
- {"SetMouseCoalescingEnabled", (PyCFunction)CarbonEvents_SetMouseCoalescingEnabled, 1,
- PyDoc_STR("(Boolean inNewState) -> (Boolean outOldState)")},
- {"GetWindowEventTarget", (PyCFunction)CarbonEvents_GetWindowEventTarget, 1,
- PyDoc_STR("(WindowPtr inWindow) -> (EventTargetRef _rv)")},
- {"GetControlEventTarget", (PyCFunction)CarbonEvents_GetControlEventTarget, 1,
- PyDoc_STR("(ControlHandle inControl) -> (EventTargetRef _rv)")},
- {"GetMenuEventTarget", (PyCFunction)CarbonEvents_GetMenuEventTarget, 1,
- PyDoc_STR("(MenuHandle inMenu) -> (EventTargetRef _rv)")},
- {"GetApplicationEventTarget", (PyCFunction)CarbonEvents_GetApplicationEventTarget, 1,
- PyDoc_STR("() -> (EventTargetRef _rv)")},
- {"GetUserFocusEventTarget", (PyCFunction)CarbonEvents_GetUserFocusEventTarget, 1,
- PyDoc_STR("() -> (EventTargetRef _rv)")},
- {"GetEventDispatcherTarget", (PyCFunction)CarbonEvents_GetEventDispatcherTarget, 1,
- PyDoc_STR("() -> (EventTargetRef _rv)")},
- {"RunApplicationEventLoop", (PyCFunction)CarbonEvents_RunApplicationEventLoop, 1,
- PyDoc_STR("() -> None")},
- {"QuitApplicationEventLoop", (PyCFunction)CarbonEvents_QuitApplicationEventLoop, 1,
- PyDoc_STR("() -> None")},
- {"RunAppModalLoopForWindow", (PyCFunction)CarbonEvents_RunAppModalLoopForWindow, 1,
- PyDoc_STR("(WindowPtr inWindow) -> None")},
- {"QuitAppModalLoopForWindow", (PyCFunction)CarbonEvents_QuitAppModalLoopForWindow, 1,
- PyDoc_STR("(WindowPtr inWindow) -> None")},
- {"BeginAppModalStateForWindow", (PyCFunction)CarbonEvents_BeginAppModalStateForWindow, 1,
- PyDoc_STR("(WindowPtr inWindow) -> None")},
- {"EndAppModalStateForWindow", (PyCFunction)CarbonEvents_EndAppModalStateForWindow, 1,
- PyDoc_STR("(WindowPtr inWindow) -> None")},
- {"SetUserFocusWindow", (PyCFunction)CarbonEvents_SetUserFocusWindow, 1,
- PyDoc_STR("(WindowPtr inWindow) -> None")},
- {"GetUserFocusWindow", (PyCFunction)CarbonEvents_GetUserFocusWindow, 1,
- PyDoc_STR("() -> (WindowPtr _rv)")},
- {"SetWindowDefaultButton", (PyCFunction)CarbonEvents_SetWindowDefaultButton, 1,
- PyDoc_STR("(WindowPtr inWindow, ControlHandle inControl) -> None")},
- {"SetWindowCancelButton", (PyCFunction)CarbonEvents_SetWindowCancelButton, 1,
- PyDoc_STR("(WindowPtr inWindow, ControlHandle inControl) -> None")},
- {"GetWindowDefaultButton", (PyCFunction)CarbonEvents_GetWindowDefaultButton, 1,
- PyDoc_STR("(WindowPtr inWindow) -> (ControlHandle outControl)")},
- {"GetWindowCancelButton", (PyCFunction)CarbonEvents_GetWindowCancelButton, 1,
- PyDoc_STR("(WindowPtr inWindow) -> (ControlHandle outControl)")},
- {"RegisterEventHotKey", (PyCFunction)CarbonEvents_RegisterEventHotKey, 1,
- PyDoc_STR("(UInt32 inHotKeyCode, UInt32 inHotKeyModifiers, EventHotKeyID inHotKeyID, EventTargetRef inTarget, OptionBits inOptions) -> (EventHotKeyRef outRef)")},
- {NULL, NULL, 0}
+ {"GetCurrentEventLoop", (PyCFunction)CarbonEvents_GetCurrentEventLoop, 1,
+ PyDoc_STR("() -> (EventLoopRef _rv)")},
+ {"GetMainEventLoop", (PyCFunction)CarbonEvents_GetMainEventLoop, 1,
+ PyDoc_STR("() -> (EventLoopRef _rv)")},
+ {"RunCurrentEventLoop", (PyCFunction)CarbonEvents_RunCurrentEventLoop, 1,
+ PyDoc_STR("(double inTimeout) -> None")},
+ {"ReceiveNextEvent", (PyCFunction)CarbonEvents_ReceiveNextEvent, 1,
+ PyDoc_STR("(UInt32 inNumTypes, EventTypeSpec inList, double inTimeout, Boolean inPullEvent) -> (EventRef outEvent)")},
+ {"GetCurrentEventQueue", (PyCFunction)CarbonEvents_GetCurrentEventQueue, 1,
+ PyDoc_STR("() -> (EventQueueRef _rv)")},
+ {"GetMainEventQueue", (PyCFunction)CarbonEvents_GetMainEventQueue, 1,
+ PyDoc_STR("() -> (EventQueueRef _rv)")},
+ {"GetCurrentEventTime", (PyCFunction)CarbonEvents_GetCurrentEventTime, 1,
+ PyDoc_STR("() -> (double _rv)")},
+ {"TrackMouseLocation", (PyCFunction)CarbonEvents_TrackMouseLocation, 1,
+ PyDoc_STR("(GrafPtr inPort) -> (Point outPt, UInt16 outResult)")},
+ {"TrackMouseLocationWithOptions", (PyCFunction)CarbonEvents_TrackMouseLocationWithOptions, 1,
+ PyDoc_STR("(GrafPtr inPort, OptionBits inOptions, double inTimeout) -> (Point outPt, UInt32 outModifiers, UInt16 outResult)")},
+ {"TrackMouseRegion", (PyCFunction)CarbonEvents_TrackMouseRegion, 1,
+ PyDoc_STR("(GrafPtr inPort, RgnHandle inRegion, Boolean ioWasInRgn) -> (Boolean ioWasInRgn, UInt16 outResult)")},
+ {"GetLastUserEventTime", (PyCFunction)CarbonEvents_GetLastUserEventTime, 1,
+ PyDoc_STR("() -> (double _rv)")},
+ {"IsMouseCoalescingEnabled", (PyCFunction)CarbonEvents_IsMouseCoalescingEnabled, 1,
+ PyDoc_STR("() -> (Boolean _rv)")},
+ {"SetMouseCoalescingEnabled", (PyCFunction)CarbonEvents_SetMouseCoalescingEnabled, 1,
+ PyDoc_STR("(Boolean inNewState) -> (Boolean outOldState)")},
+ {"GetWindowEventTarget", (PyCFunction)CarbonEvents_GetWindowEventTarget, 1,
+ PyDoc_STR("(WindowPtr inWindow) -> (EventTargetRef _rv)")},
+ {"GetControlEventTarget", (PyCFunction)CarbonEvents_GetControlEventTarget, 1,
+ PyDoc_STR("(ControlHandle inControl) -> (EventTargetRef _rv)")},
+ {"GetMenuEventTarget", (PyCFunction)CarbonEvents_GetMenuEventTarget, 1,
+ PyDoc_STR("(MenuHandle inMenu) -> (EventTargetRef _rv)")},
+ {"GetApplicationEventTarget", (PyCFunction)CarbonEvents_GetApplicationEventTarget, 1,
+ PyDoc_STR("() -> (EventTargetRef _rv)")},
+ {"GetUserFocusEventTarget", (PyCFunction)CarbonEvents_GetUserFocusEventTarget, 1,
+ PyDoc_STR("() -> (EventTargetRef _rv)")},
+ {"GetEventDispatcherTarget", (PyCFunction)CarbonEvents_GetEventDispatcherTarget, 1,
+ PyDoc_STR("() -> (EventTargetRef _rv)")},
+ {"RunApplicationEventLoop", (PyCFunction)CarbonEvents_RunApplicationEventLoop, 1,
+ PyDoc_STR("() -> None")},
+ {"QuitApplicationEventLoop", (PyCFunction)CarbonEvents_QuitApplicationEventLoop, 1,
+ PyDoc_STR("() -> None")},
+ {"RunAppModalLoopForWindow", (PyCFunction)CarbonEvents_RunAppModalLoopForWindow, 1,
+ PyDoc_STR("(WindowPtr inWindow) -> None")},
+ {"QuitAppModalLoopForWindow", (PyCFunction)CarbonEvents_QuitAppModalLoopForWindow, 1,
+ PyDoc_STR("(WindowPtr inWindow) -> None")},
+ {"BeginAppModalStateForWindow", (PyCFunction)CarbonEvents_BeginAppModalStateForWindow, 1,
+ PyDoc_STR("(WindowPtr inWindow) -> None")},
+ {"EndAppModalStateForWindow", (PyCFunction)CarbonEvents_EndAppModalStateForWindow, 1,
+ PyDoc_STR("(WindowPtr inWindow) -> None")},
+ {"SetUserFocusWindow", (PyCFunction)CarbonEvents_SetUserFocusWindow, 1,
+ PyDoc_STR("(WindowPtr inWindow) -> None")},
+ {"GetUserFocusWindow", (PyCFunction)CarbonEvents_GetUserFocusWindow, 1,
+ PyDoc_STR("() -> (WindowPtr _rv)")},
+ {"SetWindowDefaultButton", (PyCFunction)CarbonEvents_SetWindowDefaultButton, 1,
+ PyDoc_STR("(WindowPtr inWindow, ControlHandle inControl) -> None")},
+ {"SetWindowCancelButton", (PyCFunction)CarbonEvents_SetWindowCancelButton, 1,
+ PyDoc_STR("(WindowPtr inWindow, ControlHandle inControl) -> None")},
+ {"GetWindowDefaultButton", (PyCFunction)CarbonEvents_GetWindowDefaultButton, 1,
+ PyDoc_STR("(WindowPtr inWindow) -> (ControlHandle outControl)")},
+ {"GetWindowCancelButton", (PyCFunction)CarbonEvents_GetWindowCancelButton, 1,
+ PyDoc_STR("(WindowPtr inWindow) -> (ControlHandle outControl)")},
+ {"RegisterEventHotKey", (PyCFunction)CarbonEvents_RegisterEventHotKey, 1,
+ PyDoc_STR("(UInt32 inHotKeyCode, UInt32 inHotKeyModifiers, EventHotKeyID inHotKeyID, EventTargetRef inTarget, OptionBits inOptions) -> (EventHotKeyRef outRef)")},
+ {NULL, NULL, 0}
};
#else /* __LP64__ */
static PyMethodDef CarbonEvents_methods[] = {
- {NULL, NULL, 0}
+ {NULL, NULL, 0}
};
#endif /* __LP64__ */
@@ -2141,77 +2141,77 @@ static PyMethodDef CarbonEvents_methods[] = {
void init_CarbonEvt(void)
{
- PyObject *m;
+ PyObject *m;
#ifndef __LP64__
- PyObject *d;
+ PyObject *d;
#endif /* !__LP64__ */
- m = Py_InitModule("_CarbonEvt", CarbonEvents_methods);
+ m = Py_InitModule("_CarbonEvt", CarbonEvents_methods);
#ifndef __LP64__
- myEventHandlerUPP = NewEventHandlerUPP(myEventHandler);
- d = PyModule_GetDict(m);
- CarbonEvents_Error = PyMac_GetOSErrException();
- if (CarbonEvents_Error == NULL ||
- PyDict_SetItemString(d, "Error", CarbonEvents_Error) != 0)
- return;
- EventRef_Type.ob_type = &PyType_Type;
- if (PyType_Ready(&EventRef_Type) < 0) return;
- Py_INCREF(&EventRef_Type);
- PyModule_AddObject(m, "EventRef", (PyObject *)&EventRef_Type);
- /* Backward-compatible name */
- Py_INCREF(&EventRef_Type);
- PyModule_AddObject(m, "EventRefType", (PyObject *)&EventRef_Type);
- EventQueueRef_Type.ob_type = &PyType_Type;
- if (PyType_Ready(&EventQueueRef_Type) < 0) return;
- Py_INCREF(&EventQueueRef_Type);
- PyModule_AddObject(m, "EventQueueRef", (PyObject *)&EventQueueRef_Type);
- /* Backward-compatible name */
- Py_INCREF(&EventQueueRef_Type);
- PyModule_AddObject(m, "EventQueueRefType", (PyObject *)&EventQueueRef_Type);
- EventLoopRef_Type.ob_type = &PyType_Type;
- if (PyType_Ready(&EventLoopRef_Type) < 0) return;
- Py_INCREF(&EventLoopRef_Type);
- PyModule_AddObject(m, "EventLoopRef", (PyObject *)&EventLoopRef_Type);
- /* Backward-compatible name */
- Py_INCREF(&EventLoopRef_Type);
- PyModule_AddObject(m, "EventLoopRefType", (PyObject *)&EventLoopRef_Type);
- EventLoopTimerRef_Type.ob_type = &PyType_Type;
- if (PyType_Ready(&EventLoopTimerRef_Type) < 0) return;
- Py_INCREF(&EventLoopTimerRef_Type);
- PyModule_AddObject(m, "EventLoopTimerRef", (PyObject *)&EventLoopTimerRef_Type);
- /* Backward-compatible name */
- Py_INCREF(&EventLoopTimerRef_Type);
- PyModule_AddObject(m, "EventLoopTimerRefType", (PyObject *)&EventLoopTimerRef_Type);
- EventHandlerRef_Type.ob_type = &PyType_Type;
- if (PyType_Ready(&EventHandlerRef_Type) < 0) return;
- Py_INCREF(&EventHandlerRef_Type);
- PyModule_AddObject(m, "EventHandlerRef", (PyObject *)&EventHandlerRef_Type);
- /* Backward-compatible name */
- Py_INCREF(&EventHandlerRef_Type);
- PyModule_AddObject(m, "EventHandlerRefType", (PyObject *)&EventHandlerRef_Type);
- EventHandlerCallRef_Type.ob_type = &PyType_Type;
- if (PyType_Ready(&EventHandlerCallRef_Type) < 0) return;
- Py_INCREF(&EventHandlerCallRef_Type);
- PyModule_AddObject(m, "EventHandlerCallRef", (PyObject *)&EventHandlerCallRef_Type);
- /* Backward-compatible name */
- Py_INCREF(&EventHandlerCallRef_Type);
- PyModule_AddObject(m, "EventHandlerCallRefType", (PyObject *)&EventHandlerCallRef_Type);
- EventTargetRef_Type.ob_type = &PyType_Type;
- if (PyType_Ready(&EventTargetRef_Type) < 0) return;
- Py_INCREF(&EventTargetRef_Type);
- PyModule_AddObject(m, "EventTargetRef", (PyObject *)&EventTargetRef_Type);
- /* Backward-compatible name */
- Py_INCREF(&EventTargetRef_Type);
- PyModule_AddObject(m, "EventTargetRefType", (PyObject *)&EventTargetRef_Type);
- EventHotKeyRef_Type.ob_type = &PyType_Type;
- if (PyType_Ready(&EventHotKeyRef_Type) < 0) return;
- Py_INCREF(&EventHotKeyRef_Type);
- PyModule_AddObject(m, "EventHotKeyRef", (PyObject *)&EventHotKeyRef_Type);
- /* Backward-compatible name */
- Py_INCREF(&EventHotKeyRef_Type);
- PyModule_AddObject(m, "EventHotKeyRefType", (PyObject *)&EventHotKeyRef_Type);
+ myEventHandlerUPP = NewEventHandlerUPP(myEventHandler);
+ d = PyModule_GetDict(m);
+ CarbonEvents_Error = PyMac_GetOSErrException();
+ if (CarbonEvents_Error == NULL ||
+ PyDict_SetItemString(d, "Error", CarbonEvents_Error) != 0)
+ return;
+ EventRef_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&EventRef_Type) < 0) return;
+ Py_INCREF(&EventRef_Type);
+ PyModule_AddObject(m, "EventRef", (PyObject *)&EventRef_Type);
+ /* Backward-compatible name */
+ Py_INCREF(&EventRef_Type);
+ PyModule_AddObject(m, "EventRefType", (PyObject *)&EventRef_Type);
+ EventQueueRef_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&EventQueueRef_Type) < 0) return;
+ Py_INCREF(&EventQueueRef_Type);
+ PyModule_AddObject(m, "EventQueueRef", (PyObject *)&EventQueueRef_Type);
+ /* Backward-compatible name */
+ Py_INCREF(&EventQueueRef_Type);
+ PyModule_AddObject(m, "EventQueueRefType", (PyObject *)&EventQueueRef_Type);
+ EventLoopRef_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&EventLoopRef_Type) < 0) return;
+ Py_INCREF(&EventLoopRef_Type);
+ PyModule_AddObject(m, "EventLoopRef", (PyObject *)&EventLoopRef_Type);
+ /* Backward-compatible name */
+ Py_INCREF(&EventLoopRef_Type);
+ PyModule_AddObject(m, "EventLoopRefType", (PyObject *)&EventLoopRef_Type);
+ EventLoopTimerRef_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&EventLoopTimerRef_Type) < 0) return;
+ Py_INCREF(&EventLoopTimerRef_Type);
+ PyModule_AddObject(m, "EventLoopTimerRef", (PyObject *)&EventLoopTimerRef_Type);
+ /* Backward-compatible name */
+ Py_INCREF(&EventLoopTimerRef_Type);
+ PyModule_AddObject(m, "EventLoopTimerRefType", (PyObject *)&EventLoopTimerRef_Type);
+ EventHandlerRef_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&EventHandlerRef_Type) < 0) return;
+ Py_INCREF(&EventHandlerRef_Type);
+ PyModule_AddObject(m, "EventHandlerRef", (PyObject *)&EventHandlerRef_Type);
+ /* Backward-compatible name */
+ Py_INCREF(&EventHandlerRef_Type);
+ PyModule_AddObject(m, "EventHandlerRefType", (PyObject *)&EventHandlerRef_Type);
+ EventHandlerCallRef_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&EventHandlerCallRef_Type) < 0) return;
+ Py_INCREF(&EventHandlerCallRef_Type);
+ PyModule_AddObject(m, "EventHandlerCallRef", (PyObject *)&EventHandlerCallRef_Type);
+ /* Backward-compatible name */
+ Py_INCREF(&EventHandlerCallRef_Type);
+ PyModule_AddObject(m, "EventHandlerCallRefType", (PyObject *)&EventHandlerCallRef_Type);
+ EventTargetRef_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&EventTargetRef_Type) < 0) return;
+ Py_INCREF(&EventTargetRef_Type);
+ PyModule_AddObject(m, "EventTargetRef", (PyObject *)&EventTargetRef_Type);
+ /* Backward-compatible name */
+ Py_INCREF(&EventTargetRef_Type);
+ PyModule_AddObject(m, "EventTargetRefType", (PyObject *)&EventTargetRef_Type);
+ EventHotKeyRef_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&EventHotKeyRef_Type) < 0) return;
+ Py_INCREF(&EventHotKeyRef_Type);
+ PyModule_AddObject(m, "EventHotKeyRef", (PyObject *)&EventHotKeyRef_Type);
+ /* Backward-compatible name */
+ Py_INCREF(&EventHotKeyRef_Type);
+ PyModule_AddObject(m, "EventHotKeyRefType", (PyObject *)&EventHotKeyRef_Type);
#endif /* !__LP64__ */
}
diff --git a/Mac/Modules/cf/_CFmodule.c b/Mac/Modules/cf/_CFmodule.c
index 0904ae1..ee67c70 100644
--- a/Mac/Modules/cf/_CFmodule.c
+++ b/Mac/Modules/cf/_CFmodule.c
@@ -9,9 +9,9 @@
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
- PyErr_SetString(PyExc_NotImplementedError, \
- "Not available in this shared library/OS version"); \
- return NULL; \
+ PyErr_SetString(PyExc_NotImplementedError, \
+ "Not available in this shared library/OS version"); \
+ return NULL; \
}} while(0)
@@ -84,19 +84,19 @@ extern int _OptionalCFURLRefObj_Convert(PyObject *, CFURLRef *);
PyObject *CFRange_New(CFRange *itself)
{
- return Py_BuildValue("ll", (long)itself->location, (long)itself->length);
+ return Py_BuildValue("ll", (long)itself->location, (long)itself->length);
}
int
CFRange_Convert(PyObject *v, CFRange *p_itself)
{
- long location, length;
+ long location, length;
- if( !PyArg_ParseTuple(v, "ll", &location, &length) )
- return 0;
- p_itself->location = (CFIndex)location;
- p_itself->length = (CFIndex)length;
- return 1;
+ if( !PyArg_ParseTuple(v, "ll", &location, &length) )
+ return 0;
+ p_itself->location = (CFIndex)location;
+ p_itself->length = (CFIndex)length;
+ return 1;
}
/* Optional CFURL argument or None (passed as NULL) */
@@ -104,8 +104,8 @@ int
OptionalCFURLRefObj_Convert(PyObject *v, CFURLRef *p_itself)
{
if ( v == Py_None ) {
- p_itself = NULL;
- return 1;
+ p_itself = NULL;
+ return 1;
}
return CFURLRefObj_Convert(v, p_itself);
}
@@ -119,262 +119,262 @@ PyTypeObject CFTypeRef_Type;
#define CFTypeRefObj_Check(x) ((x)->ob_type == &CFTypeRef_Type || PyObject_TypeCheck((x), &CFTypeRef_Type))
typedef struct CFTypeRefObject {
- PyObject_HEAD
- CFTypeRef ob_itself;
- void (*ob_freeit)(CFTypeRef ptr);
+ PyObject_HEAD
+ CFTypeRef ob_itself;
+ void (*ob_freeit)(CFTypeRef ptr);
} CFTypeRefObject;
PyObject *CFTypeRefObj_New(CFTypeRef itself)
{
- CFTypeRefObject *it;
- if (itself == NULL)
- {
- PyErr_SetString(PyExc_RuntimeError, "cannot wrap NULL");
- return NULL;
- }
- it = PyObject_NEW(CFTypeRefObject, &CFTypeRef_Type);
- if (it == NULL) return NULL;
- it->ob_itself = itself;
- it->ob_freeit = CFRelease;
- return (PyObject *)it;
+ CFTypeRefObject *it;
+ if (itself == NULL)
+ {
+ PyErr_SetString(PyExc_RuntimeError, "cannot wrap NULL");
+ return NULL;
+ }
+ it = PyObject_NEW(CFTypeRefObject, &CFTypeRef_Type);
+ if (it == NULL) return NULL;
+ it->ob_itself = itself;
+ it->ob_freeit = CFRelease;
+ return (PyObject *)it;
}
int CFTypeRefObj_Convert(PyObject *v, CFTypeRef *p_itself)
{
- if (v == Py_None) { *p_itself = NULL; return 1; }
- /* Check for other CF objects here */
+ if (v == Py_None) { *p_itself = NULL; return 1; }
+ /* Check for other CF objects here */
- if (!CFTypeRefObj_Check(v))
- {
- PyErr_SetString(PyExc_TypeError, "CFTypeRef required");
- return 0;
- }
- *p_itself = ((CFTypeRefObject *)v)->ob_itself;
- return 1;
+ if (!CFTypeRefObj_Check(v))
+ {
+ PyErr_SetString(PyExc_TypeError, "CFTypeRef required");
+ return 0;
+ }
+ *p_itself = ((CFTypeRefObject *)v)->ob_itself;
+ return 1;
}
static void CFTypeRefObj_dealloc(CFTypeRefObject *self)
{
- if (self->ob_freeit && self->ob_itself)
- {
- self->ob_freeit((CFTypeRef)self->ob_itself);
- self->ob_itself = NULL;
- }
- self->ob_type->tp_free((PyObject *)self);
+ if (self->ob_freeit && self->ob_itself)
+ {
+ self->ob_freeit((CFTypeRef)self->ob_itself);
+ self->ob_itself = NULL;
+ }
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *CFTypeRefObj_CFGetTypeID(CFTypeRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFTypeID _rv;
+ PyObject *_res = NULL;
+ CFTypeID _rv;
#ifndef CFGetTypeID
- PyMac_PRECHECK(CFGetTypeID);
+ PyMac_PRECHECK(CFGetTypeID);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = CFGetTypeID(_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = CFGetTypeID(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *CFTypeRefObj_CFRetain(CFTypeRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFTypeRef _rv;
+ PyObject *_res = NULL;
+ CFTypeRef _rv;
#ifndef CFRetain
- PyMac_PRECHECK(CFRetain);
+ PyMac_PRECHECK(CFRetain);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = CFRetain(_self->ob_itself);
- _res = Py_BuildValue("O&",
- CFTypeRefObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = CFRetain(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ CFTypeRefObj_New, _rv);
+ return _res;
}
static PyObject *CFTypeRefObj_CFRelease(CFTypeRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef CFRelease
- PyMac_PRECHECK(CFRelease);
+ PyMac_PRECHECK(CFRelease);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- CFRelease(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ CFRelease(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CFTypeRefObj_CFGetRetainCount(CFTypeRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFIndex _rv;
+ PyObject *_res = NULL;
+ CFIndex _rv;
#ifndef CFGetRetainCount
- PyMac_PRECHECK(CFGetRetainCount);
+ PyMac_PRECHECK(CFGetRetainCount);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = CFGetRetainCount(_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = CFGetRetainCount(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *CFTypeRefObj_CFEqual(CFTypeRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- CFTypeRef cf2;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ CFTypeRef cf2;
#ifndef CFEqual
- PyMac_PRECHECK(CFEqual);
+ PyMac_PRECHECK(CFEqual);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CFTypeRefObj_Convert, &cf2))
- return NULL;
- _rv = CFEqual(_self->ob_itself,
- cf2);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CFTypeRefObj_Convert, &cf2))
+ return NULL;
+ _rv = CFEqual(_self->ob_itself,
+ cf2);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *CFTypeRefObj_CFHash(CFTypeRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFHashCode _rv;
+ PyObject *_res = NULL;
+ CFHashCode _rv;
#ifndef CFHash
- PyMac_PRECHECK(CFHash);
+ PyMac_PRECHECK(CFHash);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = CFHash(_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = CFHash(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *CFTypeRefObj_CFCopyDescription(CFTypeRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFStringRef _rv;
+ PyObject *_res = NULL;
+ CFStringRef _rv;
#ifndef CFCopyDescription
- PyMac_PRECHECK(CFCopyDescription);
+ PyMac_PRECHECK(CFCopyDescription);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = CFCopyDescription(_self->ob_itself);
- _res = Py_BuildValue("O&",
- CFStringRefObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = CFCopyDescription(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ CFStringRefObj_New, _rv);
+ return _res;
}
static PyObject *CFTypeRefObj_CFPropertyListCreateXMLData(CFTypeRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFDataRef _rv;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = CFPropertyListCreateXMLData((CFAllocatorRef)NULL,
- _self->ob_itself);
- _res = Py_BuildValue("O&",
- CFDataRefObj_New, _rv);
- return _res;
+ PyObject *_res = NULL;
+ CFDataRef _rv;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = CFPropertyListCreateXMLData((CFAllocatorRef)NULL,
+ _self->ob_itself);
+ _res = Py_BuildValue("O&",
+ CFDataRefObj_New, _rv);
+ return _res;
}
static PyObject *CFTypeRefObj_CFPropertyListCreateDeepCopy(CFTypeRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFTypeRef _rv;
- CFOptionFlags mutabilityOption;
- if (!PyArg_ParseTuple(_args, "l",
- &mutabilityOption))
- return NULL;
- _rv = CFPropertyListCreateDeepCopy((CFAllocatorRef)NULL,
- _self->ob_itself,
- mutabilityOption);
- _res = Py_BuildValue("O&",
- CFTypeRefObj_New, _rv);
- return _res;
+ PyObject *_res = NULL;
+ CFTypeRef _rv;
+ CFOptionFlags mutabilityOption;
+ if (!PyArg_ParseTuple(_args, "l",
+ &mutabilityOption))
+ return NULL;
+ _rv = CFPropertyListCreateDeepCopy((CFAllocatorRef)NULL,
+ _self->ob_itself,
+ mutabilityOption);
+ _res = Py_BuildValue("O&",
+ CFTypeRefObj_New, _rv);
+ return _res;
}
static PyObject *CFTypeRefObj_CFShow(CFTypeRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef CFShow
- PyMac_PRECHECK(CFShow);
+ PyMac_PRECHECK(CFShow);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- CFShow(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ CFShow(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CFTypeRefObj_CFPropertyListCreateFromXMLData(CFTypeRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
-
- CFTypeRef _rv;
- CFOptionFlags mutabilityOption;
- CFStringRef errorString;
- if (!PyArg_ParseTuple(_args, "l",
- &mutabilityOption))
- return NULL;
- _rv = CFPropertyListCreateFromXMLData((CFAllocatorRef)NULL,
- _self->ob_itself,
- mutabilityOption,
- &errorString);
- if (errorString)
- CFRelease(errorString);
- if (_rv == NULL) {
- PyErr_SetString(PyExc_RuntimeError, "Parse error in XML data");
- return NULL;
- }
- _res = Py_BuildValue("O&",
- CFTypeRefObj_New, _rv);
- return _res;
+ PyObject *_res = NULL;
+
+ CFTypeRef _rv;
+ CFOptionFlags mutabilityOption;
+ CFStringRef errorString;
+ if (!PyArg_ParseTuple(_args, "l",
+ &mutabilityOption))
+ return NULL;
+ _rv = CFPropertyListCreateFromXMLData((CFAllocatorRef)NULL,
+ _self->ob_itself,
+ mutabilityOption,
+ &errorString);
+ if (errorString)
+ CFRelease(errorString);
+ if (_rv == NULL) {
+ PyErr_SetString(PyExc_RuntimeError, "Parse error in XML data");
+ return NULL;
+ }
+ _res = Py_BuildValue("O&",
+ CFTypeRefObj_New, _rv);
+ return _res;
}
static PyObject *CFTypeRefObj_toPython(CFTypeRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
- _res = PyCF_CF2Python(_self->ob_itself);
- return _res;
+ _res = PyCF_CF2Python(_self->ob_itself);
+ return _res;
}
static PyMethodDef CFTypeRefObj_methods[] = {
- {"CFGetTypeID", (PyCFunction)CFTypeRefObj_CFGetTypeID, 1,
- PyDoc_STR("() -> (CFTypeID _rv)")},
- {"CFRetain", (PyCFunction)CFTypeRefObj_CFRetain, 1,
- PyDoc_STR("() -> (CFTypeRef _rv)")},
- {"CFRelease", (PyCFunction)CFTypeRefObj_CFRelease, 1,
- PyDoc_STR("() -> None")},
- {"CFGetRetainCount", (PyCFunction)CFTypeRefObj_CFGetRetainCount, 1,
- PyDoc_STR("() -> (CFIndex _rv)")},
- {"CFEqual", (PyCFunction)CFTypeRefObj_CFEqual, 1,
- PyDoc_STR("(CFTypeRef cf2) -> (Boolean _rv)")},
- {"CFHash", (PyCFunction)CFTypeRefObj_CFHash, 1,
- PyDoc_STR("() -> (CFHashCode _rv)")},
- {"CFCopyDescription", (PyCFunction)CFTypeRefObj_CFCopyDescription, 1,
- PyDoc_STR("() -> (CFStringRef _rv)")},
- {"CFPropertyListCreateXMLData", (PyCFunction)CFTypeRefObj_CFPropertyListCreateXMLData, 1,
- PyDoc_STR("() -> (CFDataRef _rv)")},
- {"CFPropertyListCreateDeepCopy", (PyCFunction)CFTypeRefObj_CFPropertyListCreateDeepCopy, 1,
- PyDoc_STR("(CFOptionFlags mutabilityOption) -> (CFTypeRef _rv)")},
- {"CFShow", (PyCFunction)CFTypeRefObj_CFShow, 1,
- PyDoc_STR("() -> None")},
- {"CFPropertyListCreateFromXMLData", (PyCFunction)CFTypeRefObj_CFPropertyListCreateFromXMLData, 1,
- PyDoc_STR("(CFOptionFlags mutabilityOption) -> (CFTypeRefObj)")},
- {"toPython", (PyCFunction)CFTypeRefObj_toPython, 1,
- PyDoc_STR("() -> (python_object)")},
- {NULL, NULL, 0}
+ {"CFGetTypeID", (PyCFunction)CFTypeRefObj_CFGetTypeID, 1,
+ PyDoc_STR("() -> (CFTypeID _rv)")},
+ {"CFRetain", (PyCFunction)CFTypeRefObj_CFRetain, 1,
+ PyDoc_STR("() -> (CFTypeRef _rv)")},
+ {"CFRelease", (PyCFunction)CFTypeRefObj_CFRelease, 1,
+ PyDoc_STR("() -> None")},
+ {"CFGetRetainCount", (PyCFunction)CFTypeRefObj_CFGetRetainCount, 1,
+ PyDoc_STR("() -> (CFIndex _rv)")},
+ {"CFEqual", (PyCFunction)CFTypeRefObj_CFEqual, 1,
+ PyDoc_STR("(CFTypeRef cf2) -> (Boolean _rv)")},
+ {"CFHash", (PyCFunction)CFTypeRefObj_CFHash, 1,
+ PyDoc_STR("() -> (CFHashCode _rv)")},
+ {"CFCopyDescription", (PyCFunction)CFTypeRefObj_CFCopyDescription, 1,
+ PyDoc_STR("() -> (CFStringRef _rv)")},
+ {"CFPropertyListCreateXMLData", (PyCFunction)CFTypeRefObj_CFPropertyListCreateXMLData, 1,
+ PyDoc_STR("() -> (CFDataRef _rv)")},
+ {"CFPropertyListCreateDeepCopy", (PyCFunction)CFTypeRefObj_CFPropertyListCreateDeepCopy, 1,
+ PyDoc_STR("(CFOptionFlags mutabilityOption) -> (CFTypeRef _rv)")},
+ {"CFShow", (PyCFunction)CFTypeRefObj_CFShow, 1,
+ PyDoc_STR("() -> None")},
+ {"CFPropertyListCreateFromXMLData", (PyCFunction)CFTypeRefObj_CFPropertyListCreateFromXMLData, 1,
+ PyDoc_STR("(CFOptionFlags mutabilityOption) -> (CFTypeRefObj)")},
+ {"toPython", (PyCFunction)CFTypeRefObj_toPython, 1,
+ PyDoc_STR("() -> (python_object)")},
+ {NULL, NULL, 0}
};
#define CFTypeRefObj_getsetlist NULL
@@ -382,93 +382,93 @@ static PyMethodDef CFTypeRefObj_methods[] = {
static int CFTypeRefObj_compare(CFTypeRefObject *self, CFTypeRefObject *other)
{
- /* XXXX Or should we use CFEqual?? */
- if ( self->ob_itself > other->ob_itself ) return 1;
- if ( self->ob_itself < other->ob_itself ) return -1;
- return 0;
+ /* XXXX Or should we use CFEqual?? */
+ if ( self->ob_itself > other->ob_itself ) return 1;
+ if ( self->ob_itself < other->ob_itself ) return -1;
+ return 0;
}
static PyObject * CFTypeRefObj_repr(CFTypeRefObject *self)
{
- char buf[100];
- sprintf(buf, "<CFTypeRef type-%d object at 0x%8.8x for 0x%8.8x>", (int)CFGetTypeID(self->ob_itself), (unsigned)self, (unsigned)self->ob_itself);
- return PyString_FromString(buf);
+ char buf[100];
+ sprintf(buf, "<CFTypeRef type-%d object at 0x%8.8x for 0x%8.8x>", (int)CFGetTypeID(self->ob_itself), (unsigned)self, (unsigned)self->ob_itself);
+ return PyString_FromString(buf);
}
static int CFTypeRefObj_hash(CFTypeRefObject *self)
{
- /* XXXX Or should we use CFHash?? */
- return (int)self->ob_itself;
+ /* XXXX Or should we use CFHash?? */
+ return (int)self->ob_itself;
}
static int CFTypeRefObj_tp_init(PyObject *_self, PyObject *_args, PyObject *_kwds)
{
- CFTypeRef itself;
- char *kw[] = {"itself", 0};
+ CFTypeRef itself;
+ char *kw[] = {"itself", 0};
- if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFTypeRefObj_Convert, &itself))
- {
- ((CFTypeRefObject *)_self)->ob_itself = itself;
- return 0;
- }
- return -1;
+ if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFTypeRefObj_Convert, &itself))
+ {
+ ((CFTypeRefObject *)_self)->ob_itself = itself;
+ return 0;
+ }
+ return -1;
}
#define CFTypeRefObj_tp_alloc PyType_GenericAlloc
static PyObject *CFTypeRefObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
- PyObject *self;
- if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
- ((CFTypeRefObject *)self)->ob_itself = NULL;
- ((CFTypeRefObject *)self)->ob_freeit = CFRelease;
- return self;
+ PyObject *self;
+ if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
+ ((CFTypeRefObject *)self)->ob_itself = NULL;
+ ((CFTypeRefObject *)self)->ob_freeit = CFRelease;
+ return self;
}
#define CFTypeRefObj_tp_free PyObject_Del
PyTypeObject CFTypeRef_Type = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
- "_CF.CFTypeRef", /*tp_name*/
- sizeof(CFTypeRefObject), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- /* methods */
- (destructor) CFTypeRefObj_dealloc, /*tp_dealloc*/
- 0, /*tp_print*/
- (getattrfunc)0, /*tp_getattr*/
- (setattrfunc)0, /*tp_setattr*/
- (cmpfunc) CFTypeRefObj_compare, /*tp_compare*/
- (reprfunc) CFTypeRefObj_repr, /*tp_repr*/
- (PyNumberMethods *)0, /* tp_as_number */
- (PySequenceMethods *)0, /* tp_as_sequence */
- (PyMappingMethods *)0, /* tp_as_mapping */
- (hashfunc) CFTypeRefObj_hash, /*tp_hash*/
- 0, /*tp_call*/
- 0, /*tp_str*/
- PyObject_GenericGetAttr, /*tp_getattro*/
- PyObject_GenericSetAttr, /*tp_setattro */
- 0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
- 0, /*tp_doc*/
- 0, /*tp_traverse*/
- 0, /*tp_clear*/
- 0, /*tp_richcompare*/
- 0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
- 0, /*tp_iternext*/
- CFTypeRefObj_methods, /* tp_methods */
- 0, /*tp_members*/
- CFTypeRefObj_getsetlist, /*tp_getset*/
- 0, /*tp_base*/
- 0, /*tp_dict*/
- 0, /*tp_descr_get*/
- 0, /*tp_descr_set*/
- 0, /*tp_dictoffset*/
- CFTypeRefObj_tp_init, /* tp_init */
- CFTypeRefObj_tp_alloc, /* tp_alloc */
- CFTypeRefObj_tp_new, /* tp_new */
- CFTypeRefObj_tp_free, /* tp_free */
+ PyObject_HEAD_INIT(NULL)
+ 0, /*ob_size*/
+ "_CF.CFTypeRef", /*tp_name*/
+ sizeof(CFTypeRefObject), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ /* methods */
+ (destructor) CFTypeRefObj_dealloc, /*tp_dealloc*/
+ 0, /*tp_print*/
+ (getattrfunc)0, /*tp_getattr*/
+ (setattrfunc)0, /*tp_setattr*/
+ (cmpfunc) CFTypeRefObj_compare, /*tp_compare*/
+ (reprfunc) CFTypeRefObj_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) CFTypeRefObj_hash, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ PyObject_GenericGetAttr, /*tp_getattro*/
+ PyObject_GenericSetAttr, /*tp_setattro */
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
+ 0, /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ CFTypeRefObj_methods, /* tp_methods */
+ 0, /*tp_members*/
+ CFTypeRefObj_getsetlist, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ CFTypeRefObj_tp_init, /* tp_init */
+ CFTypeRefObj_tp_alloc, /* tp_alloc */
+ CFTypeRefObj_tp_new, /* tp_new */
+ CFTypeRefObj_tp_free, /* tp_free */
};
/* ------------------- End object type CFTypeRef -------------------- */
@@ -481,104 +481,104 @@ PyTypeObject CFArrayRef_Type;
#define CFArrayRefObj_Check(x) ((x)->ob_type == &CFArrayRef_Type || PyObject_TypeCheck((x), &CFArrayRef_Type))
typedef struct CFArrayRefObject {
- PyObject_HEAD
- CFArrayRef ob_itself;
- void (*ob_freeit)(CFTypeRef ptr);
+ PyObject_HEAD
+ CFArrayRef ob_itself;
+ void (*ob_freeit)(CFTypeRef ptr);
} CFArrayRefObject;
PyObject *CFArrayRefObj_New(CFArrayRef itself)
{
- CFArrayRefObject *it;
- if (itself == NULL)
- {
- PyErr_SetString(PyExc_RuntimeError, "cannot wrap NULL");
- return NULL;
- }
- it = PyObject_NEW(CFArrayRefObject, &CFArrayRef_Type);
- if (it == NULL) return NULL;
- /* XXXX Should we tp_init or tp_new our basetype? */
- it->ob_itself = itself;
- it->ob_freeit = CFRelease;
- return (PyObject *)it;
+ CFArrayRefObject *it;
+ if (itself == NULL)
+ {
+ PyErr_SetString(PyExc_RuntimeError, "cannot wrap NULL");
+ return NULL;
+ }
+ it = PyObject_NEW(CFArrayRefObject, &CFArrayRef_Type);
+ if (it == NULL) return NULL;
+ /* XXXX Should we tp_init or tp_new our basetype? */
+ it->ob_itself = itself;
+ it->ob_freeit = CFRelease;
+ return (PyObject *)it;
}
int CFArrayRefObj_Convert(PyObject *v, CFArrayRef *p_itself)
{
- if (v == Py_None) { *p_itself = NULL; return 1; }
- /* Check for other CF objects here */
+ if (v == Py_None) { *p_itself = NULL; return 1; }
+ /* Check for other CF objects here */
- if (!CFArrayRefObj_Check(v))
- {
- PyErr_SetString(PyExc_TypeError, "CFArrayRef required");
- return 0;
- }
- *p_itself = ((CFArrayRefObject *)v)->ob_itself;
- return 1;
+ if (!CFArrayRefObj_Check(v))
+ {
+ PyErr_SetString(PyExc_TypeError, "CFArrayRef required");
+ return 0;
+ }
+ *p_itself = ((CFArrayRefObject *)v)->ob_itself;
+ return 1;
}
static void CFArrayRefObj_dealloc(CFArrayRefObject *self)
{
- if (self->ob_freeit && self->ob_itself)
- {
- self->ob_freeit((CFTypeRef)self->ob_itself);
- self->ob_itself = NULL;
- }
- CFTypeRef_Type.tp_dealloc((PyObject *)self);
+ if (self->ob_freeit && self->ob_itself)
+ {
+ self->ob_freeit((CFTypeRef)self->ob_itself);
+ self->ob_itself = NULL;
+ }
+ CFTypeRef_Type.tp_dealloc((PyObject *)self);
}
static PyObject *CFArrayRefObj_CFArrayCreateCopy(CFArrayRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFArrayRef _rv;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = CFArrayCreateCopy((CFAllocatorRef)NULL,
- _self->ob_itself);
- _res = Py_BuildValue("O&",
- CFArrayRefObj_New, _rv);
- return _res;
+ PyObject *_res = NULL;
+ CFArrayRef _rv;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = CFArrayCreateCopy((CFAllocatorRef)NULL,
+ _self->ob_itself);
+ _res = Py_BuildValue("O&",
+ CFArrayRefObj_New, _rv);
+ return _res;
}
static PyObject *CFArrayRefObj_CFArrayGetCount(CFArrayRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFIndex _rv;
+ PyObject *_res = NULL;
+ CFIndex _rv;
#ifndef CFArrayGetCount
- PyMac_PRECHECK(CFArrayGetCount);
+ PyMac_PRECHECK(CFArrayGetCount);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = CFArrayGetCount(_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = CFArrayGetCount(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *CFArrayRefObj_CFStringCreateByCombiningStrings(CFArrayRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFStringRef _rv;
- CFStringRef separatorString;
- if (!PyArg_ParseTuple(_args, "O&",
- CFStringRefObj_Convert, &separatorString))
- return NULL;
- _rv = CFStringCreateByCombiningStrings((CFAllocatorRef)NULL,
- _self->ob_itself,
- separatorString);
- _res = Py_BuildValue("O&",
- CFStringRefObj_New, _rv);
- return _res;
+ PyObject *_res = NULL;
+ CFStringRef _rv;
+ CFStringRef separatorString;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CFStringRefObj_Convert, &separatorString))
+ return NULL;
+ _rv = CFStringCreateByCombiningStrings((CFAllocatorRef)NULL,
+ _self->ob_itself,
+ separatorString);
+ _res = Py_BuildValue("O&",
+ CFStringRefObj_New, _rv);
+ return _res;
}
static PyMethodDef CFArrayRefObj_methods[] = {
- {"CFArrayCreateCopy", (PyCFunction)CFArrayRefObj_CFArrayCreateCopy, 1,
- PyDoc_STR("() -> (CFArrayRef _rv)")},
- {"CFArrayGetCount", (PyCFunction)CFArrayRefObj_CFArrayGetCount, 1,
- PyDoc_STR("() -> (CFIndex _rv)")},
- {"CFStringCreateByCombiningStrings", (PyCFunction)CFArrayRefObj_CFStringCreateByCombiningStrings, 1,
- PyDoc_STR("(CFStringRef separatorString) -> (CFStringRef _rv)")},
- {NULL, NULL, 0}
+ {"CFArrayCreateCopy", (PyCFunction)CFArrayRefObj_CFArrayCreateCopy, 1,
+ PyDoc_STR("() -> (CFArrayRef _rv)")},
+ {"CFArrayGetCount", (PyCFunction)CFArrayRefObj_CFArrayGetCount, 1,
+ PyDoc_STR("() -> (CFIndex _rv)")},
+ {"CFStringCreateByCombiningStrings", (PyCFunction)CFArrayRefObj_CFStringCreateByCombiningStrings, 1,
+ PyDoc_STR("(CFStringRef separatorString) -> (CFStringRef _rv)")},
+ {NULL, NULL, 0}
};
#define CFArrayRefObj_getsetlist NULL
@@ -586,100 +586,100 @@ static PyMethodDef CFArrayRefObj_methods[] = {
static int CFArrayRefObj_compare(CFArrayRefObject *self, CFArrayRefObject *other)
{
- /* XXXX Or should we use CFEqual?? */
- if ( self->ob_itself > other->ob_itself ) return 1;
- if ( self->ob_itself < other->ob_itself ) return -1;
- return 0;
+ /* XXXX Or should we use CFEqual?? */
+ if ( self->ob_itself > other->ob_itself ) return 1;
+ if ( self->ob_itself < other->ob_itself ) return -1;
+ return 0;
}
static PyObject * CFArrayRefObj_repr(CFArrayRefObject *self)
{
- char buf[100];
- sprintf(buf, "<CFArrayRef object at 0x%8.8x for 0x%8.8x>", (unsigned)self, (unsigned)self->ob_itself);
- return PyString_FromString(buf);
+ char buf[100];
+ sprintf(buf, "<CFArrayRef object at 0x%8.8x for 0x%8.8x>", (unsigned)self, (unsigned)self->ob_itself);
+ return PyString_FromString(buf);
}
static int CFArrayRefObj_hash(CFArrayRefObject *self)
{
- /* XXXX Or should we use CFHash?? */
- return (int)self->ob_itself;
+ /* XXXX Or should we use CFHash?? */
+ return (int)self->ob_itself;
}
static int CFArrayRefObj_tp_init(PyObject *_self, PyObject *_args, PyObject *_kwds)
{
- CFArrayRef itself;
- char *kw[] = {"itself", 0};
+ CFArrayRef itself;
+ char *kw[] = {"itself", 0};
- if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFArrayRefObj_Convert, &itself))
- {
- ((CFArrayRefObject *)_self)->ob_itself = itself;
- return 0;
- }
+ if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFArrayRefObj_Convert, &itself))
+ {
+ ((CFArrayRefObject *)_self)->ob_itself = itself;
+ return 0;
+ }
- /* Any CFTypeRef descendent is allowed as initializer too */
- if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFTypeRefObj_Convert, &itself))
- {
- ((CFArrayRefObject *)_self)->ob_itself = itself;
- return 0;
- }
- return -1;
+ /* Any CFTypeRef descendent is allowed as initializer too */
+ if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFTypeRefObj_Convert, &itself))
+ {
+ ((CFArrayRefObject *)_self)->ob_itself = itself;
+ return 0;
+ }
+ return -1;
}
#define CFArrayRefObj_tp_alloc PyType_GenericAlloc
static PyObject *CFArrayRefObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
- PyObject *self;
- if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
- ((CFArrayRefObject *)self)->ob_itself = NULL;
- ((CFArrayRefObject *)self)->ob_freeit = CFRelease;
- return self;
+ PyObject *self;
+ if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
+ ((CFArrayRefObject *)self)->ob_itself = NULL;
+ ((CFArrayRefObject *)self)->ob_freeit = CFRelease;
+ return self;
}
#define CFArrayRefObj_tp_free PyObject_Del
PyTypeObject CFArrayRef_Type = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
- "_CF.CFArrayRef", /*tp_name*/
- sizeof(CFArrayRefObject), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- /* methods */
- (destructor) CFArrayRefObj_dealloc, /*tp_dealloc*/
- 0, /*tp_print*/
- (getattrfunc)0, /*tp_getattr*/
- (setattrfunc)0, /*tp_setattr*/
- (cmpfunc) CFArrayRefObj_compare, /*tp_compare*/
- (reprfunc) CFArrayRefObj_repr, /*tp_repr*/
- (PyNumberMethods *)0, /* tp_as_number */
- (PySequenceMethods *)0, /* tp_as_sequence */
- (PyMappingMethods *)0, /* tp_as_mapping */
- (hashfunc) CFArrayRefObj_hash, /*tp_hash*/
- 0, /*tp_call*/
- 0, /*tp_str*/
- PyObject_GenericGetAttr, /*tp_getattro*/
- PyObject_GenericSetAttr, /*tp_setattro */
- 0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
- 0, /*tp_doc*/
- 0, /*tp_traverse*/
- 0, /*tp_clear*/
- 0, /*tp_richcompare*/
- 0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
- 0, /*tp_iternext*/
- CFArrayRefObj_methods, /* tp_methods */
- 0, /*tp_members*/
- CFArrayRefObj_getsetlist, /*tp_getset*/
- 0, /*tp_base*/
- 0, /*tp_dict*/
- 0, /*tp_descr_get*/
- 0, /*tp_descr_set*/
- 0, /*tp_dictoffset*/
- CFArrayRefObj_tp_init, /* tp_init */
- CFArrayRefObj_tp_alloc, /* tp_alloc */
- CFArrayRefObj_tp_new, /* tp_new */
- CFArrayRefObj_tp_free, /* tp_free */
+ PyObject_HEAD_INIT(NULL)
+ 0, /*ob_size*/
+ "_CF.CFArrayRef", /*tp_name*/
+ sizeof(CFArrayRefObject), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ /* methods */
+ (destructor) CFArrayRefObj_dealloc, /*tp_dealloc*/
+ 0, /*tp_print*/
+ (getattrfunc)0, /*tp_getattr*/
+ (setattrfunc)0, /*tp_setattr*/
+ (cmpfunc) CFArrayRefObj_compare, /*tp_compare*/
+ (reprfunc) CFArrayRefObj_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) CFArrayRefObj_hash, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ PyObject_GenericGetAttr, /*tp_getattro*/
+ PyObject_GenericSetAttr, /*tp_setattro */
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
+ 0, /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ CFArrayRefObj_methods, /* tp_methods */
+ 0, /*tp_members*/
+ CFArrayRefObj_getsetlist, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ CFArrayRefObj_tp_init, /* tp_init */
+ CFArrayRefObj_tp_alloc, /* tp_alloc */
+ CFArrayRefObj_tp_new, /* tp_new */
+ CFArrayRefObj_tp_free, /* tp_free */
};
/* ------------------- End object type CFArrayRef ------------------- */
@@ -692,133 +692,133 @@ PyTypeObject CFMutableArrayRef_Type;
#define CFMutableArrayRefObj_Check(x) ((x)->ob_type == &CFMutableArrayRef_Type || PyObject_TypeCheck((x), &CFMutableArrayRef_Type))
typedef struct CFMutableArrayRefObject {
- PyObject_HEAD
- CFMutableArrayRef ob_itself;
- void (*ob_freeit)(CFTypeRef ptr);
+ PyObject_HEAD
+ CFMutableArrayRef ob_itself;
+ void (*ob_freeit)(CFTypeRef ptr);
} CFMutableArrayRefObject;
PyObject *CFMutableArrayRefObj_New(CFMutableArrayRef itself)
{
- CFMutableArrayRefObject *it;
- if (itself == NULL)
- {
- PyErr_SetString(PyExc_RuntimeError, "cannot wrap NULL");
- return NULL;
- }
- it = PyObject_NEW(CFMutableArrayRefObject, &CFMutableArrayRef_Type);
- if (it == NULL) return NULL;
- /* XXXX Should we tp_init or tp_new our basetype? */
- it->ob_itself = itself;
- it->ob_freeit = CFRelease;
- return (PyObject *)it;
+ CFMutableArrayRefObject *it;
+ if (itself == NULL)
+ {
+ PyErr_SetString(PyExc_RuntimeError, "cannot wrap NULL");
+ return NULL;
+ }
+ it = PyObject_NEW(CFMutableArrayRefObject, &CFMutableArrayRef_Type);
+ if (it == NULL) return NULL;
+ /* XXXX Should we tp_init or tp_new our basetype? */
+ it->ob_itself = itself;
+ it->ob_freeit = CFRelease;
+ return (PyObject *)it;
}
int CFMutableArrayRefObj_Convert(PyObject *v, CFMutableArrayRef *p_itself)
{
- if (v == Py_None) { *p_itself = NULL; return 1; }
- /* Check for other CF objects here */
+ if (v == Py_None) { *p_itself = NULL; return 1; }
+ /* Check for other CF objects here */
- if (!CFMutableArrayRefObj_Check(v))
- {
- PyErr_SetString(PyExc_TypeError, "CFMutableArrayRef required");
- return 0;
- }
- *p_itself = ((CFMutableArrayRefObject *)v)->ob_itself;
- return 1;
+ if (!CFMutableArrayRefObj_Check(v))
+ {
+ PyErr_SetString(PyExc_TypeError, "CFMutableArrayRef required");
+ return 0;
+ }
+ *p_itself = ((CFMutableArrayRefObject *)v)->ob_itself;
+ return 1;
}
static void CFMutableArrayRefObj_dealloc(CFMutableArrayRefObject *self)
{
- if (self->ob_freeit && self->ob_itself)
- {
- self->ob_freeit((CFTypeRef)self->ob_itself);
- self->ob_itself = NULL;
- }
- CFArrayRef_Type.tp_dealloc((PyObject *)self);
+ if (self->ob_freeit && self->ob_itself)
+ {
+ self->ob_freeit((CFTypeRef)self->ob_itself);
+ self->ob_itself = NULL;
+ }
+ CFArrayRef_Type.tp_dealloc((PyObject *)self);
}
static PyObject *CFMutableArrayRefObj_CFArrayRemoveValueAtIndex(CFMutableArrayRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFIndex idx;
+ PyObject *_res = NULL;
+ CFIndex idx;
#ifndef CFArrayRemoveValueAtIndex
- PyMac_PRECHECK(CFArrayRemoveValueAtIndex);
+ PyMac_PRECHECK(CFArrayRemoveValueAtIndex);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &idx))
- return NULL;
- CFArrayRemoveValueAtIndex(_self->ob_itself,
- idx);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &idx))
+ return NULL;
+ CFArrayRemoveValueAtIndex(_self->ob_itself,
+ idx);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CFMutableArrayRefObj_CFArrayRemoveAllValues(CFMutableArrayRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef CFArrayRemoveAllValues
- PyMac_PRECHECK(CFArrayRemoveAllValues);
+ PyMac_PRECHECK(CFArrayRemoveAllValues);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- CFArrayRemoveAllValues(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ CFArrayRemoveAllValues(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CFMutableArrayRefObj_CFArrayExchangeValuesAtIndices(CFMutableArrayRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFIndex idx1;
- CFIndex idx2;
+ PyObject *_res = NULL;
+ CFIndex idx1;
+ CFIndex idx2;
#ifndef CFArrayExchangeValuesAtIndices
- PyMac_PRECHECK(CFArrayExchangeValuesAtIndices);
+ PyMac_PRECHECK(CFArrayExchangeValuesAtIndices);
#endif
- if (!PyArg_ParseTuple(_args, "ll",
- &idx1,
- &idx2))
- return NULL;
- CFArrayExchangeValuesAtIndices(_self->ob_itself,
- idx1,
- idx2);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "ll",
+ &idx1,
+ &idx2))
+ return NULL;
+ CFArrayExchangeValuesAtIndices(_self->ob_itself,
+ idx1,
+ idx2);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CFMutableArrayRefObj_CFArrayAppendArray(CFMutableArrayRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFArrayRef otherArray;
- CFRange otherRange;
+ PyObject *_res = NULL;
+ CFArrayRef otherArray;
+ CFRange otherRange;
#ifndef CFArrayAppendArray
- PyMac_PRECHECK(CFArrayAppendArray);
+ PyMac_PRECHECK(CFArrayAppendArray);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CFArrayRefObj_Convert, &otherArray,
- CFRange_Convert, &otherRange))
- return NULL;
- CFArrayAppendArray(_self->ob_itself,
- otherArray,
- otherRange);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CFArrayRefObj_Convert, &otherArray,
+ CFRange_Convert, &otherRange))
+ return NULL;
+ CFArrayAppendArray(_self->ob_itself,
+ otherArray,
+ otherRange);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyMethodDef CFMutableArrayRefObj_methods[] = {
- {"CFArrayRemoveValueAtIndex", (PyCFunction)CFMutableArrayRefObj_CFArrayRemoveValueAtIndex, 1,
- PyDoc_STR("(CFIndex idx) -> None")},
- {"CFArrayRemoveAllValues", (PyCFunction)CFMutableArrayRefObj_CFArrayRemoveAllValues, 1,
- PyDoc_STR("() -> None")},
- {"CFArrayExchangeValuesAtIndices", (PyCFunction)CFMutableArrayRefObj_CFArrayExchangeValuesAtIndices, 1,
- PyDoc_STR("(CFIndex idx1, CFIndex idx2) -> None")},
- {"CFArrayAppendArray", (PyCFunction)CFMutableArrayRefObj_CFArrayAppendArray, 1,
- PyDoc_STR("(CFArrayRef otherArray, CFRange otherRange) -> None")},
- {NULL, NULL, 0}
+ {"CFArrayRemoveValueAtIndex", (PyCFunction)CFMutableArrayRefObj_CFArrayRemoveValueAtIndex, 1,
+ PyDoc_STR("(CFIndex idx) -> None")},
+ {"CFArrayRemoveAllValues", (PyCFunction)CFMutableArrayRefObj_CFArrayRemoveAllValues, 1,
+ PyDoc_STR("() -> None")},
+ {"CFArrayExchangeValuesAtIndices", (PyCFunction)CFMutableArrayRefObj_CFArrayExchangeValuesAtIndices, 1,
+ PyDoc_STR("(CFIndex idx1, CFIndex idx2) -> None")},
+ {"CFArrayAppendArray", (PyCFunction)CFMutableArrayRefObj_CFArrayAppendArray, 1,
+ PyDoc_STR("(CFArrayRef otherArray, CFRange otherRange) -> None")},
+ {NULL, NULL, 0}
};
#define CFMutableArrayRefObj_getsetlist NULL
@@ -826,100 +826,100 @@ static PyMethodDef CFMutableArrayRefObj_methods[] = {
static int CFMutableArrayRefObj_compare(CFMutableArrayRefObject *self, CFMutableArrayRefObject *other)
{
- /* XXXX Or should we use CFEqual?? */
- if ( self->ob_itself > other->ob_itself ) return 1;
- if ( self->ob_itself < other->ob_itself ) return -1;
- return 0;
+ /* XXXX Or should we use CFEqual?? */
+ if ( self->ob_itself > other->ob_itself ) return 1;
+ if ( self->ob_itself < other->ob_itself ) return -1;
+ return 0;
}
static PyObject * CFMutableArrayRefObj_repr(CFMutableArrayRefObject *self)
{
- char buf[100];
- sprintf(buf, "<CFMutableArrayRef object at 0x%8.8x for 0x%8.8x>", (unsigned)self, (unsigned)self->ob_itself);
- return PyString_FromString(buf);
+ char buf[100];
+ sprintf(buf, "<CFMutableArrayRef object at 0x%8.8x for 0x%8.8x>", (unsigned)self, (unsigned)self->ob_itself);
+ return PyString_FromString(buf);
}
static int CFMutableArrayRefObj_hash(CFMutableArrayRefObject *self)
{
- /* XXXX Or should we use CFHash?? */
- return (int)self->ob_itself;
+ /* XXXX Or should we use CFHash?? */
+ return (int)self->ob_itself;
}
static int CFMutableArrayRefObj_tp_init(PyObject *_self, PyObject *_args, PyObject *_kwds)
{
- CFMutableArrayRef itself;
- char *kw[] = {"itself", 0};
+ CFMutableArrayRef itself;
+ char *kw[] = {"itself", 0};
- if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFMutableArrayRefObj_Convert, &itself))
- {
- ((CFMutableArrayRefObject *)_self)->ob_itself = itself;
- return 0;
- }
+ if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFMutableArrayRefObj_Convert, &itself))
+ {
+ ((CFMutableArrayRefObject *)_self)->ob_itself = itself;
+ return 0;
+ }
- /* Any CFTypeRef descendent is allowed as initializer too */
- if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFTypeRefObj_Convert, &itself))
- {
- ((CFMutableArrayRefObject *)_self)->ob_itself = itself;
- return 0;
- }
- return -1;
+ /* Any CFTypeRef descendent is allowed as initializer too */
+ if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFTypeRefObj_Convert, &itself))
+ {
+ ((CFMutableArrayRefObject *)_self)->ob_itself = itself;
+ return 0;
+ }
+ return -1;
}
#define CFMutableArrayRefObj_tp_alloc PyType_GenericAlloc
static PyObject *CFMutableArrayRefObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
- PyObject *self;
- if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
- ((CFMutableArrayRefObject *)self)->ob_itself = NULL;
- ((CFMutableArrayRefObject *)self)->ob_freeit = CFRelease;
- return self;
+ PyObject *self;
+ if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
+ ((CFMutableArrayRefObject *)self)->ob_itself = NULL;
+ ((CFMutableArrayRefObject *)self)->ob_freeit = CFRelease;
+ return self;
}
#define CFMutableArrayRefObj_tp_free PyObject_Del
PyTypeObject CFMutableArrayRef_Type = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
- "_CF.CFMutableArrayRef", /*tp_name*/
- sizeof(CFMutableArrayRefObject), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- /* methods */
- (destructor) CFMutableArrayRefObj_dealloc, /*tp_dealloc*/
- 0, /*tp_print*/
- (getattrfunc)0, /*tp_getattr*/
- (setattrfunc)0, /*tp_setattr*/
- (cmpfunc) CFMutableArrayRefObj_compare, /*tp_compare*/
- (reprfunc) CFMutableArrayRefObj_repr, /*tp_repr*/
- (PyNumberMethods *)0, /* tp_as_number */
- (PySequenceMethods *)0, /* tp_as_sequence */
- (PyMappingMethods *)0, /* tp_as_mapping */
- (hashfunc) CFMutableArrayRefObj_hash, /*tp_hash*/
- 0, /*tp_call*/
- 0, /*tp_str*/
- PyObject_GenericGetAttr, /*tp_getattro*/
- PyObject_GenericSetAttr, /*tp_setattro */
- 0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
- 0, /*tp_doc*/
- 0, /*tp_traverse*/
- 0, /*tp_clear*/
- 0, /*tp_richcompare*/
- 0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
- 0, /*tp_iternext*/
- CFMutableArrayRefObj_methods, /* tp_methods */
- 0, /*tp_members*/
- CFMutableArrayRefObj_getsetlist, /*tp_getset*/
- 0, /*tp_base*/
- 0, /*tp_dict*/
- 0, /*tp_descr_get*/
- 0, /*tp_descr_set*/
- 0, /*tp_dictoffset*/
- CFMutableArrayRefObj_tp_init, /* tp_init */
- CFMutableArrayRefObj_tp_alloc, /* tp_alloc */
- CFMutableArrayRefObj_tp_new, /* tp_new */
- CFMutableArrayRefObj_tp_free, /* tp_free */
+ PyObject_HEAD_INIT(NULL)
+ 0, /*ob_size*/
+ "_CF.CFMutableArrayRef", /*tp_name*/
+ sizeof(CFMutableArrayRefObject), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ /* methods */
+ (destructor) CFMutableArrayRefObj_dealloc, /*tp_dealloc*/
+ 0, /*tp_print*/
+ (getattrfunc)0, /*tp_getattr*/
+ (setattrfunc)0, /*tp_setattr*/
+ (cmpfunc) CFMutableArrayRefObj_compare, /*tp_compare*/
+ (reprfunc) CFMutableArrayRefObj_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) CFMutableArrayRefObj_hash, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ PyObject_GenericGetAttr, /*tp_getattro*/
+ PyObject_GenericSetAttr, /*tp_setattro */
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
+ 0, /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ CFMutableArrayRefObj_methods, /* tp_methods */
+ 0, /*tp_members*/
+ CFMutableArrayRefObj_getsetlist, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ CFMutableArrayRefObj_tp_init, /* tp_init */
+ CFMutableArrayRefObj_tp_alloc, /* tp_alloc */
+ CFMutableArrayRefObj_tp_new, /* tp_new */
+ CFMutableArrayRefObj_tp_free, /* tp_free */
};
/* --------------- End object type CFMutableArrayRef ---------------- */
@@ -932,86 +932,86 @@ PyTypeObject CFDictionaryRef_Type;
#define CFDictionaryRefObj_Check(x) ((x)->ob_type == &CFDictionaryRef_Type || PyObject_TypeCheck((x), &CFDictionaryRef_Type))
typedef struct CFDictionaryRefObject {
- PyObject_HEAD
- CFDictionaryRef ob_itself;
- void (*ob_freeit)(CFTypeRef ptr);
+ PyObject_HEAD
+ CFDictionaryRef ob_itself;
+ void (*ob_freeit)(CFTypeRef ptr);
} CFDictionaryRefObject;
PyObject *CFDictionaryRefObj_New(CFDictionaryRef itself)
{
- CFDictionaryRefObject *it;
- if (itself == NULL)
- {
- PyErr_SetString(PyExc_RuntimeError, "cannot wrap NULL");
- return NULL;
- }
- it = PyObject_NEW(CFDictionaryRefObject, &CFDictionaryRef_Type);
- if (it == NULL) return NULL;
- /* XXXX Should we tp_init or tp_new our basetype? */
- it->ob_itself = itself;
- it->ob_freeit = CFRelease;
- return (PyObject *)it;
+ CFDictionaryRefObject *it;
+ if (itself == NULL)
+ {
+ PyErr_SetString(PyExc_RuntimeError, "cannot wrap NULL");
+ return NULL;
+ }
+ it = PyObject_NEW(CFDictionaryRefObject, &CFDictionaryRef_Type);
+ if (it == NULL) return NULL;
+ /* XXXX Should we tp_init or tp_new our basetype? */
+ it->ob_itself = itself;
+ it->ob_freeit = CFRelease;
+ return (PyObject *)it;
}
int CFDictionaryRefObj_Convert(PyObject *v, CFDictionaryRef *p_itself)
{
- if (v == Py_None) { *p_itself = NULL; return 1; }
- /* Check for other CF objects here */
+ if (v == Py_None) { *p_itself = NULL; return 1; }
+ /* Check for other CF objects here */
- if (!CFDictionaryRefObj_Check(v))
- {
- PyErr_SetString(PyExc_TypeError, "CFDictionaryRef required");
- return 0;
- }
- *p_itself = ((CFDictionaryRefObject *)v)->ob_itself;
- return 1;
+ if (!CFDictionaryRefObj_Check(v))
+ {
+ PyErr_SetString(PyExc_TypeError, "CFDictionaryRef required");
+ return 0;
+ }
+ *p_itself = ((CFDictionaryRefObject *)v)->ob_itself;
+ return 1;
}
static void CFDictionaryRefObj_dealloc(CFDictionaryRefObject *self)
{
- if (self->ob_freeit && self->ob_itself)
- {
- self->ob_freeit((CFTypeRef)self->ob_itself);
- self->ob_itself = NULL;
- }
- CFTypeRef_Type.tp_dealloc((PyObject *)self);
+ if (self->ob_freeit && self->ob_itself)
+ {
+ self->ob_freeit((CFTypeRef)self->ob_itself);
+ self->ob_itself = NULL;
+ }
+ CFTypeRef_Type.tp_dealloc((PyObject *)self);
}
static PyObject *CFDictionaryRefObj_CFDictionaryCreateCopy(CFDictionaryRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFDictionaryRef _rv;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = CFDictionaryCreateCopy((CFAllocatorRef)NULL,
- _self->ob_itself);
- _res = Py_BuildValue("O&",
- CFDictionaryRefObj_New, _rv);
- return _res;
+ PyObject *_res = NULL;
+ CFDictionaryRef _rv;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = CFDictionaryCreateCopy((CFAllocatorRef)NULL,
+ _self->ob_itself);
+ _res = Py_BuildValue("O&",
+ CFDictionaryRefObj_New, _rv);
+ return _res;
}
static PyObject *CFDictionaryRefObj_CFDictionaryGetCount(CFDictionaryRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFIndex _rv;
+ PyObject *_res = NULL;
+ CFIndex _rv;
#ifndef CFDictionaryGetCount
- PyMac_PRECHECK(CFDictionaryGetCount);
+ PyMac_PRECHECK(CFDictionaryGetCount);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = CFDictionaryGetCount(_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = CFDictionaryGetCount(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyMethodDef CFDictionaryRefObj_methods[] = {
- {"CFDictionaryCreateCopy", (PyCFunction)CFDictionaryRefObj_CFDictionaryCreateCopy, 1,
- PyDoc_STR("() -> (CFDictionaryRef _rv)")},
- {"CFDictionaryGetCount", (PyCFunction)CFDictionaryRefObj_CFDictionaryGetCount, 1,
- PyDoc_STR("() -> (CFIndex _rv)")},
- {NULL, NULL, 0}
+ {"CFDictionaryCreateCopy", (PyCFunction)CFDictionaryRefObj_CFDictionaryCreateCopy, 1,
+ PyDoc_STR("() -> (CFDictionaryRef _rv)")},
+ {"CFDictionaryGetCount", (PyCFunction)CFDictionaryRefObj_CFDictionaryGetCount, 1,
+ PyDoc_STR("() -> (CFIndex _rv)")},
+ {NULL, NULL, 0}
};
#define CFDictionaryRefObj_getsetlist NULL
@@ -1019,100 +1019,100 @@ static PyMethodDef CFDictionaryRefObj_methods[] = {
static int CFDictionaryRefObj_compare(CFDictionaryRefObject *self, CFDictionaryRefObject *other)
{
- /* XXXX Or should we use CFEqual?? */
- if ( self->ob_itself > other->ob_itself ) return 1;
- if ( self->ob_itself < other->ob_itself ) return -1;
- return 0;
+ /* XXXX Or should we use CFEqual?? */
+ if ( self->ob_itself > other->ob_itself ) return 1;
+ if ( self->ob_itself < other->ob_itself ) return -1;
+ return 0;
}
static PyObject * CFDictionaryRefObj_repr(CFDictionaryRefObject *self)
{
- char buf[100];
- sprintf(buf, "<CFDictionaryRef object at 0x%8.8x for 0x%8.8x>", (unsigned)self, (unsigned)self->ob_itself);
- return PyString_FromString(buf);
+ char buf[100];
+ sprintf(buf, "<CFDictionaryRef object at 0x%8.8x for 0x%8.8x>", (unsigned)self, (unsigned)self->ob_itself);
+ return PyString_FromString(buf);
}
static int CFDictionaryRefObj_hash(CFDictionaryRefObject *self)
{
- /* XXXX Or should we use CFHash?? */
- return (int)self->ob_itself;
+ /* XXXX Or should we use CFHash?? */
+ return (int)self->ob_itself;
}
static int CFDictionaryRefObj_tp_init(PyObject *_self, PyObject *_args, PyObject *_kwds)
{
- CFDictionaryRef itself;
- char *kw[] = {"itself", 0};
+ CFDictionaryRef itself;
+ char *kw[] = {"itself", 0};
- if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFDictionaryRefObj_Convert, &itself))
- {
- ((CFDictionaryRefObject *)_self)->ob_itself = itself;
- return 0;
- }
+ if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFDictionaryRefObj_Convert, &itself))
+ {
+ ((CFDictionaryRefObject *)_self)->ob_itself = itself;
+ return 0;
+ }
- /* Any CFTypeRef descendent is allowed as initializer too */
- if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFTypeRefObj_Convert, &itself))
- {
- ((CFDictionaryRefObject *)_self)->ob_itself = itself;
- return 0;
- }
- return -1;
+ /* Any CFTypeRef descendent is allowed as initializer too */
+ if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFTypeRefObj_Convert, &itself))
+ {
+ ((CFDictionaryRefObject *)_self)->ob_itself = itself;
+ return 0;
+ }
+ return -1;
}
#define CFDictionaryRefObj_tp_alloc PyType_GenericAlloc
static PyObject *CFDictionaryRefObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
- PyObject *self;
- if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
- ((CFDictionaryRefObject *)self)->ob_itself = NULL;
- ((CFDictionaryRefObject *)self)->ob_freeit = CFRelease;
- return self;
+ PyObject *self;
+ if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
+ ((CFDictionaryRefObject *)self)->ob_itself = NULL;
+ ((CFDictionaryRefObject *)self)->ob_freeit = CFRelease;
+ return self;
}
#define CFDictionaryRefObj_tp_free PyObject_Del
PyTypeObject CFDictionaryRef_Type = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
- "_CF.CFDictionaryRef", /*tp_name*/
- sizeof(CFDictionaryRefObject), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- /* methods */
- (destructor) CFDictionaryRefObj_dealloc, /*tp_dealloc*/
- 0, /*tp_print*/
- (getattrfunc)0, /*tp_getattr*/
- (setattrfunc)0, /*tp_setattr*/
- (cmpfunc) CFDictionaryRefObj_compare, /*tp_compare*/
- (reprfunc) CFDictionaryRefObj_repr, /*tp_repr*/
- (PyNumberMethods *)0, /* tp_as_number */
- (PySequenceMethods *)0, /* tp_as_sequence */
- (PyMappingMethods *)0, /* tp_as_mapping */
- (hashfunc) CFDictionaryRefObj_hash, /*tp_hash*/
- 0, /*tp_call*/
- 0, /*tp_str*/
- PyObject_GenericGetAttr, /*tp_getattro*/
- PyObject_GenericSetAttr, /*tp_setattro */
- 0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
- 0, /*tp_doc*/
- 0, /*tp_traverse*/
- 0, /*tp_clear*/
- 0, /*tp_richcompare*/
- 0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
- 0, /*tp_iternext*/
- CFDictionaryRefObj_methods, /* tp_methods */
- 0, /*tp_members*/
- CFDictionaryRefObj_getsetlist, /*tp_getset*/
- 0, /*tp_base*/
- 0, /*tp_dict*/
- 0, /*tp_descr_get*/
- 0, /*tp_descr_set*/
- 0, /*tp_dictoffset*/
- CFDictionaryRefObj_tp_init, /* tp_init */
- CFDictionaryRefObj_tp_alloc, /* tp_alloc */
- CFDictionaryRefObj_tp_new, /* tp_new */
- CFDictionaryRefObj_tp_free, /* tp_free */
+ PyObject_HEAD_INIT(NULL)
+ 0, /*ob_size*/
+ "_CF.CFDictionaryRef", /*tp_name*/
+ sizeof(CFDictionaryRefObject), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ /* methods */
+ (destructor) CFDictionaryRefObj_dealloc, /*tp_dealloc*/
+ 0, /*tp_print*/
+ (getattrfunc)0, /*tp_getattr*/
+ (setattrfunc)0, /*tp_setattr*/
+ (cmpfunc) CFDictionaryRefObj_compare, /*tp_compare*/
+ (reprfunc) CFDictionaryRefObj_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) CFDictionaryRefObj_hash, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ PyObject_GenericGetAttr, /*tp_getattro*/
+ PyObject_GenericSetAttr, /*tp_setattro */
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
+ 0, /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ CFDictionaryRefObj_methods, /* tp_methods */
+ 0, /*tp_members*/
+ CFDictionaryRefObj_getsetlist, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ CFDictionaryRefObj_tp_init, /* tp_init */
+ CFDictionaryRefObj_tp_alloc, /* tp_alloc */
+ CFDictionaryRefObj_tp_new, /* tp_new */
+ CFDictionaryRefObj_tp_free, /* tp_free */
};
/* ---------------- End object type CFDictionaryRef ----------------- */
@@ -1125,70 +1125,70 @@ PyTypeObject CFMutableDictionaryRef_Type;
#define CFMutableDictionaryRefObj_Check(x) ((x)->ob_type == &CFMutableDictionaryRef_Type || PyObject_TypeCheck((x), &CFMutableDictionaryRef_Type))
typedef struct CFMutableDictionaryRefObject {
- PyObject_HEAD
- CFMutableDictionaryRef ob_itself;
- void (*ob_freeit)(CFTypeRef ptr);
+ PyObject_HEAD
+ CFMutableDictionaryRef ob_itself;
+ void (*ob_freeit)(CFTypeRef ptr);
} CFMutableDictionaryRefObject;
PyObject *CFMutableDictionaryRefObj_New(CFMutableDictionaryRef itself)
{
- CFMutableDictionaryRefObject *it;
- if (itself == NULL)
- {
- PyErr_SetString(PyExc_RuntimeError, "cannot wrap NULL");
- return NULL;
- }
- it = PyObject_NEW(CFMutableDictionaryRefObject, &CFMutableDictionaryRef_Type);
- if (it == NULL) return NULL;
- /* XXXX Should we tp_init or tp_new our basetype? */
- it->ob_itself = itself;
- it->ob_freeit = CFRelease;
- return (PyObject *)it;
+ CFMutableDictionaryRefObject *it;
+ if (itself == NULL)
+ {
+ PyErr_SetString(PyExc_RuntimeError, "cannot wrap NULL");
+ return NULL;
+ }
+ it = PyObject_NEW(CFMutableDictionaryRefObject, &CFMutableDictionaryRef_Type);
+ if (it == NULL) return NULL;
+ /* XXXX Should we tp_init or tp_new our basetype? */
+ it->ob_itself = itself;
+ it->ob_freeit = CFRelease;
+ return (PyObject *)it;
}
int CFMutableDictionaryRefObj_Convert(PyObject *v, CFMutableDictionaryRef *p_itself)
{
- if (v == Py_None) { *p_itself = NULL; return 1; }
- /* Check for other CF objects here */
+ if (v == Py_None) { *p_itself = NULL; return 1; }
+ /* Check for other CF objects here */
- if (!CFMutableDictionaryRefObj_Check(v))
- {
- PyErr_SetString(PyExc_TypeError, "CFMutableDictionaryRef required");
- return 0;
- }
- *p_itself = ((CFMutableDictionaryRefObject *)v)->ob_itself;
- return 1;
+ if (!CFMutableDictionaryRefObj_Check(v))
+ {
+ PyErr_SetString(PyExc_TypeError, "CFMutableDictionaryRef required");
+ return 0;
+ }
+ *p_itself = ((CFMutableDictionaryRefObject *)v)->ob_itself;
+ return 1;
}
static void CFMutableDictionaryRefObj_dealloc(CFMutableDictionaryRefObject *self)
{
- if (self->ob_freeit && self->ob_itself)
- {
- self->ob_freeit((CFTypeRef)self->ob_itself);
- self->ob_itself = NULL;
- }
- CFDictionaryRef_Type.tp_dealloc((PyObject *)self);
+ if (self->ob_freeit && self->ob_itself)
+ {
+ self->ob_freeit((CFTypeRef)self->ob_itself);
+ self->ob_itself = NULL;
+ }
+ CFDictionaryRef_Type.tp_dealloc((PyObject *)self);
}
static PyObject *CFMutableDictionaryRefObj_CFDictionaryRemoveAllValues(CFMutableDictionaryRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef CFDictionaryRemoveAllValues
- PyMac_PRECHECK(CFDictionaryRemoveAllValues);
+ PyMac_PRECHECK(CFDictionaryRemoveAllValues);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- CFDictionaryRemoveAllValues(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ CFDictionaryRemoveAllValues(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyMethodDef CFMutableDictionaryRefObj_methods[] = {
- {"CFDictionaryRemoveAllValues", (PyCFunction)CFMutableDictionaryRefObj_CFDictionaryRemoveAllValues, 1,
- PyDoc_STR("() -> None")},
- {NULL, NULL, 0}
+ {"CFDictionaryRemoveAllValues", (PyCFunction)CFMutableDictionaryRefObj_CFDictionaryRemoveAllValues, 1,
+ PyDoc_STR("() -> None")},
+ {NULL, NULL, 0}
};
#define CFMutableDictionaryRefObj_getsetlist NULL
@@ -1196,100 +1196,100 @@ static PyMethodDef CFMutableDictionaryRefObj_methods[] = {
static int CFMutableDictionaryRefObj_compare(CFMutableDictionaryRefObject *self, CFMutableDictionaryRefObject *other)
{
- /* XXXX Or should we use CFEqual?? */
- if ( self->ob_itself > other->ob_itself ) return 1;
- if ( self->ob_itself < other->ob_itself ) return -1;
- return 0;
+ /* XXXX Or should we use CFEqual?? */
+ if ( self->ob_itself > other->ob_itself ) return 1;
+ if ( self->ob_itself < other->ob_itself ) return -1;
+ return 0;
}
static PyObject * CFMutableDictionaryRefObj_repr(CFMutableDictionaryRefObject *self)
{
- char buf[100];
- sprintf(buf, "<CFMutableDictionaryRef object at 0x%8.8x for 0x%8.8x>", (unsigned)self, (unsigned)self->ob_itself);
- return PyString_FromString(buf);
+ char buf[100];
+ sprintf(buf, "<CFMutableDictionaryRef object at 0x%8.8x for 0x%8.8x>", (unsigned)self, (unsigned)self->ob_itself);
+ return PyString_FromString(buf);
}
static int CFMutableDictionaryRefObj_hash(CFMutableDictionaryRefObject *self)
{
- /* XXXX Or should we use CFHash?? */
- return (int)self->ob_itself;
+ /* XXXX Or should we use CFHash?? */
+ return (int)self->ob_itself;
}
static int CFMutableDictionaryRefObj_tp_init(PyObject *_self, PyObject *_args, PyObject *_kwds)
{
- CFMutableDictionaryRef itself;
- char *kw[] = {"itself", 0};
+ CFMutableDictionaryRef itself;
+ char *kw[] = {"itself", 0};
- if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFMutableDictionaryRefObj_Convert, &itself))
- {
- ((CFMutableDictionaryRefObject *)_self)->ob_itself = itself;
- return 0;
- }
+ if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFMutableDictionaryRefObj_Convert, &itself))
+ {
+ ((CFMutableDictionaryRefObject *)_self)->ob_itself = itself;
+ return 0;
+ }
- /* Any CFTypeRef descendent is allowed as initializer too */
- if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFTypeRefObj_Convert, &itself))
- {
- ((CFMutableDictionaryRefObject *)_self)->ob_itself = itself;
- return 0;
- }
- return -1;
+ /* Any CFTypeRef descendent is allowed as initializer too */
+ if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFTypeRefObj_Convert, &itself))
+ {
+ ((CFMutableDictionaryRefObject *)_self)->ob_itself = itself;
+ return 0;
+ }
+ return -1;
}
#define CFMutableDictionaryRefObj_tp_alloc PyType_GenericAlloc
static PyObject *CFMutableDictionaryRefObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
- PyObject *self;
- if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
- ((CFMutableDictionaryRefObject *)self)->ob_itself = NULL;
- ((CFMutableDictionaryRefObject *)self)->ob_freeit = CFRelease;
- return self;
+ PyObject *self;
+ if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
+ ((CFMutableDictionaryRefObject *)self)->ob_itself = NULL;
+ ((CFMutableDictionaryRefObject *)self)->ob_freeit = CFRelease;
+ return self;
}
#define CFMutableDictionaryRefObj_tp_free PyObject_Del
PyTypeObject CFMutableDictionaryRef_Type = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
- "_CF.CFMutableDictionaryRef", /*tp_name*/
- sizeof(CFMutableDictionaryRefObject), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- /* methods */
- (destructor) CFMutableDictionaryRefObj_dealloc, /*tp_dealloc*/
- 0, /*tp_print*/
- (getattrfunc)0, /*tp_getattr*/
- (setattrfunc)0, /*tp_setattr*/
- (cmpfunc) CFMutableDictionaryRefObj_compare, /*tp_compare*/
- (reprfunc) CFMutableDictionaryRefObj_repr, /*tp_repr*/
- (PyNumberMethods *)0, /* tp_as_number */
- (PySequenceMethods *)0, /* tp_as_sequence */
- (PyMappingMethods *)0, /* tp_as_mapping */
- (hashfunc) CFMutableDictionaryRefObj_hash, /*tp_hash*/
- 0, /*tp_call*/
- 0, /*tp_str*/
- PyObject_GenericGetAttr, /*tp_getattro*/
- PyObject_GenericSetAttr, /*tp_setattro */
- 0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
- 0, /*tp_doc*/
- 0, /*tp_traverse*/
- 0, /*tp_clear*/
- 0, /*tp_richcompare*/
- 0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
- 0, /*tp_iternext*/
- CFMutableDictionaryRefObj_methods, /* tp_methods */
- 0, /*tp_members*/
- CFMutableDictionaryRefObj_getsetlist, /*tp_getset*/
- 0, /*tp_base*/
- 0, /*tp_dict*/
- 0, /*tp_descr_get*/
- 0, /*tp_descr_set*/
- 0, /*tp_dictoffset*/
- CFMutableDictionaryRefObj_tp_init, /* tp_init */
- CFMutableDictionaryRefObj_tp_alloc, /* tp_alloc */
- CFMutableDictionaryRefObj_tp_new, /* tp_new */
- CFMutableDictionaryRefObj_tp_free, /* tp_free */
+ PyObject_HEAD_INIT(NULL)
+ 0, /*ob_size*/
+ "_CF.CFMutableDictionaryRef", /*tp_name*/
+ sizeof(CFMutableDictionaryRefObject), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ /* methods */
+ (destructor) CFMutableDictionaryRefObj_dealloc, /*tp_dealloc*/
+ 0, /*tp_print*/
+ (getattrfunc)0, /*tp_getattr*/
+ (setattrfunc)0, /*tp_setattr*/
+ (cmpfunc) CFMutableDictionaryRefObj_compare, /*tp_compare*/
+ (reprfunc) CFMutableDictionaryRefObj_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) CFMutableDictionaryRefObj_hash, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ PyObject_GenericGetAttr, /*tp_getattro*/
+ PyObject_GenericSetAttr, /*tp_setattro */
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
+ 0, /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ CFMutableDictionaryRefObj_methods, /* tp_methods */
+ 0, /*tp_members*/
+ CFMutableDictionaryRefObj_getsetlist, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ CFMutableDictionaryRefObj_tp_init, /* tp_init */
+ CFMutableDictionaryRefObj_tp_alloc, /* tp_alloc */
+ CFMutableDictionaryRefObj_tp_new, /* tp_new */
+ CFMutableDictionaryRefObj_tp_free, /* tp_free */
};
/* ------------- End object type CFMutableDictionaryRef ------------- */
@@ -1302,124 +1302,124 @@ PyTypeObject CFDataRef_Type;
#define CFDataRefObj_Check(x) ((x)->ob_type == &CFDataRef_Type || PyObject_TypeCheck((x), &CFDataRef_Type))
typedef struct CFDataRefObject {
- PyObject_HEAD
- CFDataRef ob_itself;
- void (*ob_freeit)(CFTypeRef ptr);
+ PyObject_HEAD
+ CFDataRef ob_itself;
+ void (*ob_freeit)(CFTypeRef ptr);
} CFDataRefObject;
PyObject *CFDataRefObj_New(CFDataRef itself)
{
- CFDataRefObject *it;
- if (itself == NULL)
- {
- PyErr_SetString(PyExc_RuntimeError, "cannot wrap NULL");
- return NULL;
- }
- it = PyObject_NEW(CFDataRefObject, &CFDataRef_Type);
- if (it == NULL) return NULL;
- /* XXXX Should we tp_init or tp_new our basetype? */
- it->ob_itself = itself;
- it->ob_freeit = CFRelease;
- return (PyObject *)it;
+ CFDataRefObject *it;
+ if (itself == NULL)
+ {
+ PyErr_SetString(PyExc_RuntimeError, "cannot wrap NULL");
+ return NULL;
+ }
+ it = PyObject_NEW(CFDataRefObject, &CFDataRef_Type);
+ if (it == NULL) return NULL;
+ /* XXXX Should we tp_init or tp_new our basetype? */
+ it->ob_itself = itself;
+ it->ob_freeit = CFRelease;
+ return (PyObject *)it;
}
int CFDataRefObj_Convert(PyObject *v, CFDataRef *p_itself)
{
- if (v == Py_None) { *p_itself = NULL; return 1; }
- if (PyString_Check(v)) {
- char *cStr;
- Py_ssize_t cLen;
- if( PyString_AsStringAndSize(v, &cStr, &cLen) < 0 ) return 0;
- *p_itself = CFDataCreate((CFAllocatorRef)NULL, (unsigned char *)cStr, cLen);
- return 1;
- }
+ if (v == Py_None) { *p_itself = NULL; return 1; }
+ if (PyString_Check(v)) {
+ char *cStr;
+ Py_ssize_t cLen;
+ if( PyString_AsStringAndSize(v, &cStr, &cLen) < 0 ) return 0;
+ *p_itself = CFDataCreate((CFAllocatorRef)NULL, (unsigned char *)cStr, cLen);
+ return 1;
+ }
- if (!CFDataRefObj_Check(v))
- {
- PyErr_SetString(PyExc_TypeError, "CFDataRef required");
- return 0;
- }
- *p_itself = ((CFDataRefObject *)v)->ob_itself;
- return 1;
+ if (!CFDataRefObj_Check(v))
+ {
+ PyErr_SetString(PyExc_TypeError, "CFDataRef required");
+ return 0;
+ }
+ *p_itself = ((CFDataRefObject *)v)->ob_itself;
+ return 1;
}
static void CFDataRefObj_dealloc(CFDataRefObject *self)
{
- if (self->ob_freeit && self->ob_itself)
- {
- self->ob_freeit((CFTypeRef)self->ob_itself);
- self->ob_itself = NULL;
- }
- CFTypeRef_Type.tp_dealloc((PyObject *)self);
+ if (self->ob_freeit && self->ob_itself)
+ {
+ self->ob_freeit((CFTypeRef)self->ob_itself);
+ self->ob_itself = NULL;
+ }
+ CFTypeRef_Type.tp_dealloc((PyObject *)self);
}
static PyObject *CFDataRefObj_CFDataCreateCopy(CFDataRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFDataRef _rv;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = CFDataCreateCopy((CFAllocatorRef)NULL,
- _self->ob_itself);
- _res = Py_BuildValue("O&",
- CFDataRefObj_New, _rv);
- return _res;
+ PyObject *_res = NULL;
+ CFDataRef _rv;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = CFDataCreateCopy((CFAllocatorRef)NULL,
+ _self->ob_itself);
+ _res = Py_BuildValue("O&",
+ CFDataRefObj_New, _rv);
+ return _res;
}
static PyObject *CFDataRefObj_CFDataGetLength(CFDataRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFIndex _rv;
+ PyObject *_res = NULL;
+ CFIndex _rv;
#ifndef CFDataGetLength
- PyMac_PRECHECK(CFDataGetLength);
+ PyMac_PRECHECK(CFDataGetLength);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = CFDataGetLength(_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = CFDataGetLength(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *CFDataRefObj_CFStringCreateFromExternalRepresentation(CFDataRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFStringRef _rv;
- CFStringEncoding encoding;
- if (!PyArg_ParseTuple(_args, "l",
- &encoding))
- return NULL;
- _rv = CFStringCreateFromExternalRepresentation((CFAllocatorRef)NULL,
- _self->ob_itself,
- encoding);
- _res = Py_BuildValue("O&",
- CFStringRefObj_New, _rv);
- return _res;
+ PyObject *_res = NULL;
+ CFStringRef _rv;
+ CFStringEncoding encoding;
+ if (!PyArg_ParseTuple(_args, "l",
+ &encoding))
+ return NULL;
+ _rv = CFStringCreateFromExternalRepresentation((CFAllocatorRef)NULL,
+ _self->ob_itself,
+ encoding);
+ _res = Py_BuildValue("O&",
+ CFStringRefObj_New, _rv);
+ return _res;
}
static PyObject *CFDataRefObj_CFDataGetData(CFDataRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
- int size = CFDataGetLength(_self->ob_itself);
- char *data = (char *)CFDataGetBytePtr(_self->ob_itself);
+ int size = CFDataGetLength(_self->ob_itself);
+ char *data = (char *)CFDataGetBytePtr(_self->ob_itself);
- _res = (PyObject *)PyString_FromStringAndSize(data, size);
- return _res;
+ _res = (PyObject *)PyString_FromStringAndSize(data, size);
+ return _res;
}
static PyMethodDef CFDataRefObj_methods[] = {
- {"CFDataCreateCopy", (PyCFunction)CFDataRefObj_CFDataCreateCopy, 1,
- PyDoc_STR("() -> (CFDataRef _rv)")},
- {"CFDataGetLength", (PyCFunction)CFDataRefObj_CFDataGetLength, 1,
- PyDoc_STR("() -> (CFIndex _rv)")},
- {"CFStringCreateFromExternalRepresentation", (PyCFunction)CFDataRefObj_CFStringCreateFromExternalRepresentation, 1,
- PyDoc_STR("(CFStringEncoding encoding) -> (CFStringRef _rv)")},
- {"CFDataGetData", (PyCFunction)CFDataRefObj_CFDataGetData, 1,
- PyDoc_STR("() -> (string _rv)")},
- {NULL, NULL, 0}
+ {"CFDataCreateCopy", (PyCFunction)CFDataRefObj_CFDataCreateCopy, 1,
+ PyDoc_STR("() -> (CFDataRef _rv)")},
+ {"CFDataGetLength", (PyCFunction)CFDataRefObj_CFDataGetLength, 1,
+ PyDoc_STR("() -> (CFIndex _rv)")},
+ {"CFStringCreateFromExternalRepresentation", (PyCFunction)CFDataRefObj_CFStringCreateFromExternalRepresentation, 1,
+ PyDoc_STR("(CFStringEncoding encoding) -> (CFStringRef _rv)")},
+ {"CFDataGetData", (PyCFunction)CFDataRefObj_CFDataGetData, 1,
+ PyDoc_STR("() -> (string _rv)")},
+ {NULL, NULL, 0}
};
#define CFDataRefObj_getsetlist NULL
@@ -1427,100 +1427,100 @@ static PyMethodDef CFDataRefObj_methods[] = {
static int CFDataRefObj_compare(CFDataRefObject *self, CFDataRefObject *other)
{
- /* XXXX Or should we use CFEqual?? */
- if ( self->ob_itself > other->ob_itself ) return 1;
- if ( self->ob_itself < other->ob_itself ) return -1;
- return 0;
+ /* XXXX Or should we use CFEqual?? */
+ if ( self->ob_itself > other->ob_itself ) return 1;
+ if ( self->ob_itself < other->ob_itself ) return -1;
+ return 0;
}
static PyObject * CFDataRefObj_repr(CFDataRefObject *self)
{
- char buf[100];
- sprintf(buf, "<CFDataRef object at 0x%8.8x for 0x%8.8x>", (unsigned)self, (unsigned)self->ob_itself);
- return PyString_FromString(buf);
+ char buf[100];
+ sprintf(buf, "<CFDataRef object at 0x%8.8x for 0x%8.8x>", (unsigned)self, (unsigned)self->ob_itself);
+ return PyString_FromString(buf);
}
static int CFDataRefObj_hash(CFDataRefObject *self)
{
- /* XXXX Or should we use CFHash?? */
- return (int)self->ob_itself;
+ /* XXXX Or should we use CFHash?? */
+ return (int)self->ob_itself;
}
static int CFDataRefObj_tp_init(PyObject *_self, PyObject *_args, PyObject *_kwds)
{
- CFDataRef itself;
- char *kw[] = {"itself", 0};
+ CFDataRef itself;
+ char *kw[] = {"itself", 0};
- if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFDataRefObj_Convert, &itself))
- {
- ((CFDataRefObject *)_self)->ob_itself = itself;
- return 0;
- }
+ if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFDataRefObj_Convert, &itself))
+ {
+ ((CFDataRefObject *)_self)->ob_itself = itself;
+ return 0;
+ }
- /* Any CFTypeRef descendent is allowed as initializer too */
- if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFTypeRefObj_Convert, &itself))
- {
- ((CFDataRefObject *)_self)->ob_itself = itself;
- return 0;
- }
- return -1;
+ /* Any CFTypeRef descendent is allowed as initializer too */
+ if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFTypeRefObj_Convert, &itself))
+ {
+ ((CFDataRefObject *)_self)->ob_itself = itself;
+ return 0;
+ }
+ return -1;
}
#define CFDataRefObj_tp_alloc PyType_GenericAlloc
static PyObject *CFDataRefObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
- PyObject *self;
- if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
- ((CFDataRefObject *)self)->ob_itself = NULL;
- ((CFDataRefObject *)self)->ob_freeit = CFRelease;
- return self;
+ PyObject *self;
+ if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
+ ((CFDataRefObject *)self)->ob_itself = NULL;
+ ((CFDataRefObject *)self)->ob_freeit = CFRelease;
+ return self;
}
#define CFDataRefObj_tp_free PyObject_Del
PyTypeObject CFDataRef_Type = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
- "_CF.CFDataRef", /*tp_name*/
- sizeof(CFDataRefObject), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- /* methods */
- (destructor) CFDataRefObj_dealloc, /*tp_dealloc*/
- 0, /*tp_print*/
- (getattrfunc)0, /*tp_getattr*/
- (setattrfunc)0, /*tp_setattr*/
- (cmpfunc) CFDataRefObj_compare, /*tp_compare*/
- (reprfunc) CFDataRefObj_repr, /*tp_repr*/
- (PyNumberMethods *)0, /* tp_as_number */
- (PySequenceMethods *)0, /* tp_as_sequence */
- (PyMappingMethods *)0, /* tp_as_mapping */
- (hashfunc) CFDataRefObj_hash, /*tp_hash*/
- 0, /*tp_call*/
- 0, /*tp_str*/
- PyObject_GenericGetAttr, /*tp_getattro*/
- PyObject_GenericSetAttr, /*tp_setattro */
- 0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
- 0, /*tp_doc*/
- 0, /*tp_traverse*/
- 0, /*tp_clear*/
- 0, /*tp_richcompare*/
- 0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
- 0, /*tp_iternext*/
- CFDataRefObj_methods, /* tp_methods */
- 0, /*tp_members*/
- CFDataRefObj_getsetlist, /*tp_getset*/
- 0, /*tp_base*/
- 0, /*tp_dict*/
- 0, /*tp_descr_get*/
- 0, /*tp_descr_set*/
- 0, /*tp_dictoffset*/
- CFDataRefObj_tp_init, /* tp_init */
- CFDataRefObj_tp_alloc, /* tp_alloc */
- CFDataRefObj_tp_new, /* tp_new */
- CFDataRefObj_tp_free, /* tp_free */
+ PyObject_HEAD_INIT(NULL)
+ 0, /*ob_size*/
+ "_CF.CFDataRef", /*tp_name*/
+ sizeof(CFDataRefObject), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ /* methods */
+ (destructor) CFDataRefObj_dealloc, /*tp_dealloc*/
+ 0, /*tp_print*/
+ (getattrfunc)0, /*tp_getattr*/
+ (setattrfunc)0, /*tp_setattr*/
+ (cmpfunc) CFDataRefObj_compare, /*tp_compare*/
+ (reprfunc) CFDataRefObj_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) CFDataRefObj_hash, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ PyObject_GenericGetAttr, /*tp_getattro*/
+ PyObject_GenericSetAttr, /*tp_setattro */
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
+ 0, /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ CFDataRefObj_methods, /* tp_methods */
+ 0, /*tp_members*/
+ CFDataRefObj_getsetlist, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ CFDataRefObj_tp_init, /* tp_init */
+ CFDataRefObj_tp_alloc, /* tp_alloc */
+ CFDataRefObj_tp_new, /* tp_new */
+ CFDataRefObj_tp_free, /* tp_free */
};
/* ------------------- End object type CFDataRef -------------------- */
@@ -1533,158 +1533,158 @@ PyTypeObject CFMutableDataRef_Type;
#define CFMutableDataRefObj_Check(x) ((x)->ob_type == &CFMutableDataRef_Type || PyObject_TypeCheck((x), &CFMutableDataRef_Type))
typedef struct CFMutableDataRefObject {
- PyObject_HEAD
- CFMutableDataRef ob_itself;
- void (*ob_freeit)(CFTypeRef ptr);
+ PyObject_HEAD
+ CFMutableDataRef ob_itself;
+ void (*ob_freeit)(CFTypeRef ptr);
} CFMutableDataRefObject;
PyObject *CFMutableDataRefObj_New(CFMutableDataRef itself)
{
- CFMutableDataRefObject *it;
- if (itself == NULL)
- {
- PyErr_SetString(PyExc_RuntimeError, "cannot wrap NULL");
- return NULL;
- }
- it = PyObject_NEW(CFMutableDataRefObject, &CFMutableDataRef_Type);
- if (it == NULL) return NULL;
- /* XXXX Should we tp_init or tp_new our basetype? */
- it->ob_itself = itself;
- it->ob_freeit = CFRelease;
- return (PyObject *)it;
+ CFMutableDataRefObject *it;
+ if (itself == NULL)
+ {
+ PyErr_SetString(PyExc_RuntimeError, "cannot wrap NULL");
+ return NULL;
+ }
+ it = PyObject_NEW(CFMutableDataRefObject, &CFMutableDataRef_Type);
+ if (it == NULL) return NULL;
+ /* XXXX Should we tp_init or tp_new our basetype? */
+ it->ob_itself = itself;
+ it->ob_freeit = CFRelease;
+ return (PyObject *)it;
}
int CFMutableDataRefObj_Convert(PyObject *v, CFMutableDataRef *p_itself)
{
- if (v == Py_None) { *p_itself = NULL; return 1; }
- /* Check for other CF objects here */
+ if (v == Py_None) { *p_itself = NULL; return 1; }
+ /* Check for other CF objects here */
- if (!CFMutableDataRefObj_Check(v))
- {
- PyErr_SetString(PyExc_TypeError, "CFMutableDataRef required");
- return 0;
- }
- *p_itself = ((CFMutableDataRefObject *)v)->ob_itself;
- return 1;
+ if (!CFMutableDataRefObj_Check(v))
+ {
+ PyErr_SetString(PyExc_TypeError, "CFMutableDataRef required");
+ return 0;
+ }
+ *p_itself = ((CFMutableDataRefObject *)v)->ob_itself;
+ return 1;
}
static void CFMutableDataRefObj_dealloc(CFMutableDataRefObject *self)
{
- if (self->ob_freeit && self->ob_itself)
- {
- self->ob_freeit((CFTypeRef)self->ob_itself);
- self->ob_itself = NULL;
- }
- CFDataRef_Type.tp_dealloc((PyObject *)self);
+ if (self->ob_freeit && self->ob_itself)
+ {
+ self->ob_freeit((CFTypeRef)self->ob_itself);
+ self->ob_itself = NULL;
+ }
+ CFDataRef_Type.tp_dealloc((PyObject *)self);
}
static PyObject *CFMutableDataRefObj_CFDataSetLength(CFMutableDataRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFIndex length;
+ PyObject *_res = NULL;
+ CFIndex length;
#ifndef CFDataSetLength
- PyMac_PRECHECK(CFDataSetLength);
+ PyMac_PRECHECK(CFDataSetLength);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &length))
- return NULL;
- CFDataSetLength(_self->ob_itself,
- length);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &length))
+ return NULL;
+ CFDataSetLength(_self->ob_itself,
+ length);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CFMutableDataRefObj_CFDataIncreaseLength(CFMutableDataRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFIndex extraLength;
+ PyObject *_res = NULL;
+ CFIndex extraLength;
#ifndef CFDataIncreaseLength
- PyMac_PRECHECK(CFDataIncreaseLength);
+ PyMac_PRECHECK(CFDataIncreaseLength);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &extraLength))
- return NULL;
- CFDataIncreaseLength(_self->ob_itself,
- extraLength);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &extraLength))
+ return NULL;
+ CFDataIncreaseLength(_self->ob_itself,
+ extraLength);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CFMutableDataRefObj_CFDataAppendBytes(CFMutableDataRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- unsigned char *bytes__in__;
- long bytes__len__;
- int bytes__in_len__;
+ PyObject *_res = NULL;
+ unsigned char *bytes__in__;
+ long bytes__len__;
+ int bytes__in_len__;
#ifndef CFDataAppendBytes
- PyMac_PRECHECK(CFDataAppendBytes);
+ PyMac_PRECHECK(CFDataAppendBytes);
#endif
- if (!PyArg_ParseTuple(_args, "s#",
- &bytes__in__, &bytes__in_len__))
- return NULL;
- bytes__len__ = bytes__in_len__;
- CFDataAppendBytes(_self->ob_itself,
- bytes__in__, bytes__len__);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "s#",
+ &bytes__in__, &bytes__in_len__))
+ return NULL;
+ bytes__len__ = bytes__in_len__;
+ CFDataAppendBytes(_self->ob_itself,
+ bytes__in__, bytes__len__);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CFMutableDataRefObj_CFDataReplaceBytes(CFMutableDataRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFRange range;
- unsigned char *newBytes__in__;
- long newBytes__len__;
- int newBytes__in_len__;
+ PyObject *_res = NULL;
+ CFRange range;
+ unsigned char *newBytes__in__;
+ long newBytes__len__;
+ int newBytes__in_len__;
#ifndef CFDataReplaceBytes
- PyMac_PRECHECK(CFDataReplaceBytes);
+ PyMac_PRECHECK(CFDataReplaceBytes);
#endif
- if (!PyArg_ParseTuple(_args, "O&s#",
- CFRange_Convert, &range,
- &newBytes__in__, &newBytes__in_len__))
- return NULL;
- newBytes__len__ = newBytes__in_len__;
- CFDataReplaceBytes(_self->ob_itself,
- range,
- newBytes__in__, newBytes__len__);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&s#",
+ CFRange_Convert, &range,
+ &newBytes__in__, &newBytes__in_len__))
+ return NULL;
+ newBytes__len__ = newBytes__in_len__;
+ CFDataReplaceBytes(_self->ob_itself,
+ range,
+ newBytes__in__, newBytes__len__);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CFMutableDataRefObj_CFDataDeleteBytes(CFMutableDataRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFRange range;
+ PyObject *_res = NULL;
+ CFRange range;
#ifndef CFDataDeleteBytes
- PyMac_PRECHECK(CFDataDeleteBytes);
+ PyMac_PRECHECK(CFDataDeleteBytes);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CFRange_Convert, &range))
- return NULL;
- CFDataDeleteBytes(_self->ob_itself,
- range);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CFRange_Convert, &range))
+ return NULL;
+ CFDataDeleteBytes(_self->ob_itself,
+ range);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyMethodDef CFMutableDataRefObj_methods[] = {
- {"CFDataSetLength", (PyCFunction)CFMutableDataRefObj_CFDataSetLength, 1,
- PyDoc_STR("(CFIndex length) -> None")},
- {"CFDataIncreaseLength", (PyCFunction)CFMutableDataRefObj_CFDataIncreaseLength, 1,
- PyDoc_STR("(CFIndex extraLength) -> None")},
- {"CFDataAppendBytes", (PyCFunction)CFMutableDataRefObj_CFDataAppendBytes, 1,
- PyDoc_STR("(Buffer bytes) -> None")},
- {"CFDataReplaceBytes", (PyCFunction)CFMutableDataRefObj_CFDataReplaceBytes, 1,
- PyDoc_STR("(CFRange range, Buffer newBytes) -> None")},
- {"CFDataDeleteBytes", (PyCFunction)CFMutableDataRefObj_CFDataDeleteBytes, 1,
- PyDoc_STR("(CFRange range) -> None")},
- {NULL, NULL, 0}
+ {"CFDataSetLength", (PyCFunction)CFMutableDataRefObj_CFDataSetLength, 1,
+ PyDoc_STR("(CFIndex length) -> None")},
+ {"CFDataIncreaseLength", (PyCFunction)CFMutableDataRefObj_CFDataIncreaseLength, 1,
+ PyDoc_STR("(CFIndex extraLength) -> None")},
+ {"CFDataAppendBytes", (PyCFunction)CFMutableDataRefObj_CFDataAppendBytes, 1,
+ PyDoc_STR("(Buffer bytes) -> None")},
+ {"CFDataReplaceBytes", (PyCFunction)CFMutableDataRefObj_CFDataReplaceBytes, 1,
+ PyDoc_STR("(CFRange range, Buffer newBytes) -> None")},
+ {"CFDataDeleteBytes", (PyCFunction)CFMutableDataRefObj_CFDataDeleteBytes, 1,
+ PyDoc_STR("(CFRange range) -> None")},
+ {NULL, NULL, 0}
};
#define CFMutableDataRefObj_getsetlist NULL
@@ -1692,100 +1692,100 @@ static PyMethodDef CFMutableDataRefObj_methods[] = {
static int CFMutableDataRefObj_compare(CFMutableDataRefObject *self, CFMutableDataRefObject *other)
{
- /* XXXX Or should we use CFEqual?? */
- if ( self->ob_itself > other->ob_itself ) return 1;
- if ( self->ob_itself < other->ob_itself ) return -1;
- return 0;
+ /* XXXX Or should we use CFEqual?? */
+ if ( self->ob_itself > other->ob_itself ) return 1;
+ if ( self->ob_itself < other->ob_itself ) return -1;
+ return 0;
}
static PyObject * CFMutableDataRefObj_repr(CFMutableDataRefObject *self)
{
- char buf[100];
- sprintf(buf, "<CFMutableDataRef object at 0x%8.8x for 0x%8.8x>", (unsigned)self, (unsigned)self->ob_itself);
- return PyString_FromString(buf);
+ char buf[100];
+ sprintf(buf, "<CFMutableDataRef object at 0x%8.8x for 0x%8.8x>", (unsigned)self, (unsigned)self->ob_itself);
+ return PyString_FromString(buf);
}
static int CFMutableDataRefObj_hash(CFMutableDataRefObject *self)
{
- /* XXXX Or should we use CFHash?? */
- return (int)self->ob_itself;
+ /* XXXX Or should we use CFHash?? */
+ return (int)self->ob_itself;
}
static int CFMutableDataRefObj_tp_init(PyObject *_self, PyObject *_args, PyObject *_kwds)
{
- CFMutableDataRef itself;
- char *kw[] = {"itself", 0};
+ CFMutableDataRef itself;
+ char *kw[] = {"itself", 0};
- if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFMutableDataRefObj_Convert, &itself))
- {
- ((CFMutableDataRefObject *)_self)->ob_itself = itself;
- return 0;
- }
+ if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFMutableDataRefObj_Convert, &itself))
+ {
+ ((CFMutableDataRefObject *)_self)->ob_itself = itself;
+ return 0;
+ }
- /* Any CFTypeRef descendent is allowed as initializer too */
- if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFTypeRefObj_Convert, &itself))
- {
- ((CFMutableDataRefObject *)_self)->ob_itself = itself;
- return 0;
- }
- return -1;
+ /* Any CFTypeRef descendent is allowed as initializer too */
+ if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFTypeRefObj_Convert, &itself))
+ {
+ ((CFMutableDataRefObject *)_self)->ob_itself = itself;
+ return 0;
+ }
+ return -1;
}
#define CFMutableDataRefObj_tp_alloc PyType_GenericAlloc
static PyObject *CFMutableDataRefObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
- PyObject *self;
- if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
- ((CFMutableDataRefObject *)self)->ob_itself = NULL;
- ((CFMutableDataRefObject *)self)->ob_freeit = CFRelease;
- return self;
+ PyObject *self;
+ if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
+ ((CFMutableDataRefObject *)self)->ob_itself = NULL;
+ ((CFMutableDataRefObject *)self)->ob_freeit = CFRelease;
+ return self;
}
#define CFMutableDataRefObj_tp_free PyObject_Del
PyTypeObject CFMutableDataRef_Type = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
- "_CF.CFMutableDataRef", /*tp_name*/
- sizeof(CFMutableDataRefObject), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- /* methods */
- (destructor) CFMutableDataRefObj_dealloc, /*tp_dealloc*/
- 0, /*tp_print*/
- (getattrfunc)0, /*tp_getattr*/
- (setattrfunc)0, /*tp_setattr*/
- (cmpfunc) CFMutableDataRefObj_compare, /*tp_compare*/
- (reprfunc) CFMutableDataRefObj_repr, /*tp_repr*/
- (PyNumberMethods *)0, /* tp_as_number */
- (PySequenceMethods *)0, /* tp_as_sequence */
- (PyMappingMethods *)0, /* tp_as_mapping */
- (hashfunc) CFMutableDataRefObj_hash, /*tp_hash*/
- 0, /*tp_call*/
- 0, /*tp_str*/
- PyObject_GenericGetAttr, /*tp_getattro*/
- PyObject_GenericSetAttr, /*tp_setattro */
- 0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
- 0, /*tp_doc*/
- 0, /*tp_traverse*/
- 0, /*tp_clear*/
- 0, /*tp_richcompare*/
- 0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
- 0, /*tp_iternext*/
- CFMutableDataRefObj_methods, /* tp_methods */
- 0, /*tp_members*/
- CFMutableDataRefObj_getsetlist, /*tp_getset*/
- 0, /*tp_base*/
- 0, /*tp_dict*/
- 0, /*tp_descr_get*/
- 0, /*tp_descr_set*/
- 0, /*tp_dictoffset*/
- CFMutableDataRefObj_tp_init, /* tp_init */
- CFMutableDataRefObj_tp_alloc, /* tp_alloc */
- CFMutableDataRefObj_tp_new, /* tp_new */
- CFMutableDataRefObj_tp_free, /* tp_free */
+ PyObject_HEAD_INIT(NULL)
+ 0, /*ob_size*/
+ "_CF.CFMutableDataRef", /*tp_name*/
+ sizeof(CFMutableDataRefObject), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ /* methods */
+ (destructor) CFMutableDataRefObj_dealloc, /*tp_dealloc*/
+ 0, /*tp_print*/
+ (getattrfunc)0, /*tp_getattr*/
+ (setattrfunc)0, /*tp_setattr*/
+ (cmpfunc) CFMutableDataRefObj_compare, /*tp_compare*/
+ (reprfunc) CFMutableDataRefObj_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) CFMutableDataRefObj_hash, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ PyObject_GenericGetAttr, /*tp_getattro*/
+ PyObject_GenericSetAttr, /*tp_setattro */
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
+ 0, /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ CFMutableDataRefObj_methods, /* tp_methods */
+ 0, /*tp_members*/
+ CFMutableDataRefObj_getsetlist, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ CFMutableDataRefObj_tp_init, /* tp_init */
+ CFMutableDataRefObj_tp_alloc, /* tp_alloc */
+ CFMutableDataRefObj_tp_new, /* tp_new */
+ CFMutableDataRefObj_tp_free, /* tp_free */
};
/* ---------------- End object type CFMutableDataRef ---------------- */
@@ -1798,636 +1798,636 @@ PyTypeObject CFStringRef_Type;
#define CFStringRefObj_Check(x) ((x)->ob_type == &CFStringRef_Type || PyObject_TypeCheck((x), &CFStringRef_Type))
typedef struct CFStringRefObject {
- PyObject_HEAD
- CFStringRef ob_itself;
- void (*ob_freeit)(CFTypeRef ptr);
+ PyObject_HEAD
+ CFStringRef ob_itself;
+ void (*ob_freeit)(CFTypeRef ptr);
} CFStringRefObject;
PyObject *CFStringRefObj_New(CFStringRef itself)
{
- CFStringRefObject *it;
- if (itself == NULL)
- {
- PyErr_SetString(PyExc_RuntimeError, "cannot wrap NULL");
- return NULL;
- }
- it = PyObject_NEW(CFStringRefObject, &CFStringRef_Type);
- if (it == NULL) return NULL;
- /* XXXX Should we tp_init or tp_new our basetype? */
- it->ob_itself = itself;
- it->ob_freeit = CFRelease;
- return (PyObject *)it;
+ CFStringRefObject *it;
+ if (itself == NULL)
+ {
+ PyErr_SetString(PyExc_RuntimeError, "cannot wrap NULL");
+ return NULL;
+ }
+ it = PyObject_NEW(CFStringRefObject, &CFStringRef_Type);
+ if (it == NULL) return NULL;
+ /* XXXX Should we tp_init or tp_new our basetype? */
+ it->ob_itself = itself;
+ it->ob_freeit = CFRelease;
+ return (PyObject *)it;
}
int CFStringRefObj_Convert(PyObject *v, CFStringRef *p_itself)
{
- if (v == Py_None) { *p_itself = NULL; return 1; }
- if (PyString_Check(v)) {
- char *cStr;
- if (!PyArg_Parse(v, "es", "ascii", &cStr))
- return 0;
- *p_itself = CFStringCreateWithCString((CFAllocatorRef)NULL, cStr, kCFStringEncodingASCII);
- PyMem_Free(cStr);
- return 1;
- }
- if (PyUnicode_Check(v)) {
- /* We use the CF types here, if Python was configured differently that will give an error */
- CFIndex size = PyUnicode_GetSize(v);
- UniChar *unichars = PyUnicode_AsUnicode(v);
- if (!unichars) return 0;
- *p_itself = CFStringCreateWithCharacters((CFAllocatorRef)NULL, unichars, size);
- return 1;
- }
-
-
- if (!CFStringRefObj_Check(v))
- {
- PyErr_SetString(PyExc_TypeError, "CFStringRef required");
- return 0;
- }
- *p_itself = ((CFStringRefObject *)v)->ob_itself;
- return 1;
+ if (v == Py_None) { *p_itself = NULL; return 1; }
+ if (PyString_Check(v)) {
+ char *cStr;
+ if (!PyArg_Parse(v, "es", "ascii", &cStr))
+ return 0;
+ *p_itself = CFStringCreateWithCString((CFAllocatorRef)NULL, cStr, kCFStringEncodingASCII);
+ PyMem_Free(cStr);
+ return 1;
+ }
+ if (PyUnicode_Check(v)) {
+ /* We use the CF types here, if Python was configured differently that will give an error */
+ CFIndex size = PyUnicode_GetSize(v);
+ UniChar *unichars = PyUnicode_AsUnicode(v);
+ if (!unichars) return 0;
+ *p_itself = CFStringCreateWithCharacters((CFAllocatorRef)NULL, unichars, size);
+ return 1;
+ }
+
+
+ if (!CFStringRefObj_Check(v))
+ {
+ PyErr_SetString(PyExc_TypeError, "CFStringRef required");
+ return 0;
+ }
+ *p_itself = ((CFStringRefObject *)v)->ob_itself;
+ return 1;
}
static void CFStringRefObj_dealloc(CFStringRefObject *self)
{
- if (self->ob_freeit && self->ob_itself)
- {
- self->ob_freeit((CFTypeRef)self->ob_itself);
- self->ob_itself = NULL;
- }
- CFTypeRef_Type.tp_dealloc((PyObject *)self);
+ if (self->ob_freeit && self->ob_itself)
+ {
+ self->ob_freeit((CFTypeRef)self->ob_itself);
+ self->ob_itself = NULL;
+ }
+ CFTypeRef_Type.tp_dealloc((PyObject *)self);
}
static PyObject *CFStringRefObj_CFStringCreateWithSubstring(CFStringRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFStringRef _rv;
- CFRange range;
- if (!PyArg_ParseTuple(_args, "O&",
- CFRange_Convert, &range))
- return NULL;
- _rv = CFStringCreateWithSubstring((CFAllocatorRef)NULL,
- _self->ob_itself,
- range);
- _res = Py_BuildValue("O&",
- CFStringRefObj_New, _rv);
- return _res;
+ PyObject *_res = NULL;
+ CFStringRef _rv;
+ CFRange range;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CFRange_Convert, &range))
+ return NULL;
+ _rv = CFStringCreateWithSubstring((CFAllocatorRef)NULL,
+ _self->ob_itself,
+ range);
+ _res = Py_BuildValue("O&",
+ CFStringRefObj_New, _rv);
+ return _res;
}
static PyObject *CFStringRefObj_CFStringCreateCopy(CFStringRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFStringRef _rv;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = CFStringCreateCopy((CFAllocatorRef)NULL,
- _self->ob_itself);
- _res = Py_BuildValue("O&",
- CFStringRefObj_New, _rv);
- return _res;
+ PyObject *_res = NULL;
+ CFStringRef _rv;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = CFStringCreateCopy((CFAllocatorRef)NULL,
+ _self->ob_itself);
+ _res = Py_BuildValue("O&",
+ CFStringRefObj_New, _rv);
+ return _res;
}
static PyObject *CFStringRefObj_CFStringGetLength(CFStringRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFIndex _rv;
+ PyObject *_res = NULL;
+ CFIndex _rv;
#ifndef CFStringGetLength
- PyMac_PRECHECK(CFStringGetLength);
+ PyMac_PRECHECK(CFStringGetLength);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = CFStringGetLength(_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = CFStringGetLength(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *CFStringRefObj_CFStringGetBytes(CFStringRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFIndex _rv;
- CFRange range;
- CFStringEncoding encoding;
- UInt8 lossByte;
- Boolean isExternalRepresentation;
- UInt8 buffer;
- CFIndex maxBufLen;
- CFIndex usedBufLen;
+ PyObject *_res = NULL;
+ CFIndex _rv;
+ CFRange range;
+ CFStringEncoding encoding;
+ UInt8 lossByte;
+ Boolean isExternalRepresentation;
+ UInt8 buffer;
+ CFIndex maxBufLen;
+ CFIndex usedBufLen;
#ifndef CFStringGetBytes
- PyMac_PRECHECK(CFStringGetBytes);
+ PyMac_PRECHECK(CFStringGetBytes);
#endif
- if (!PyArg_ParseTuple(_args, "O&lbll",
- CFRange_Convert, &range,
- &encoding,
- &lossByte,
- &isExternalRepresentation,
- &maxBufLen))
- return NULL;
- _rv = CFStringGetBytes(_self->ob_itself,
- range,
- encoding,
- lossByte,
- isExternalRepresentation,
- &buffer,
- maxBufLen,
- &usedBufLen);
- _res = Py_BuildValue("lbl",
- _rv,
- buffer,
- usedBufLen);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&lbll",
+ CFRange_Convert, &range,
+ &encoding,
+ &lossByte,
+ &isExternalRepresentation,
+ &maxBufLen))
+ return NULL;
+ _rv = CFStringGetBytes(_self->ob_itself,
+ range,
+ encoding,
+ lossByte,
+ isExternalRepresentation,
+ &buffer,
+ maxBufLen,
+ &usedBufLen);
+ _res = Py_BuildValue("lbl",
+ _rv,
+ buffer,
+ usedBufLen);
+ return _res;
}
static PyObject *CFStringRefObj_CFStringCreateExternalRepresentation(CFStringRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFDataRef _rv;
- CFStringEncoding encoding;
- UInt8 lossByte;
- if (!PyArg_ParseTuple(_args, "lb",
- &encoding,
- &lossByte))
- return NULL;
- _rv = CFStringCreateExternalRepresentation((CFAllocatorRef)NULL,
- _self->ob_itself,
- encoding,
- lossByte);
- _res = Py_BuildValue("O&",
- CFDataRefObj_New, _rv);
- return _res;
+ PyObject *_res = NULL;
+ CFDataRef _rv;
+ CFStringEncoding encoding;
+ UInt8 lossByte;
+ if (!PyArg_ParseTuple(_args, "lb",
+ &encoding,
+ &lossByte))
+ return NULL;
+ _rv = CFStringCreateExternalRepresentation((CFAllocatorRef)NULL,
+ _self->ob_itself,
+ encoding,
+ lossByte);
+ _res = Py_BuildValue("O&",
+ CFDataRefObj_New, _rv);
+ return _res;
}
static PyObject *CFStringRefObj_CFStringGetSmallestEncoding(CFStringRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFStringEncoding _rv;
+ PyObject *_res = NULL;
+ CFStringEncoding _rv;
#ifndef CFStringGetSmallestEncoding
- PyMac_PRECHECK(CFStringGetSmallestEncoding);
+ PyMac_PRECHECK(CFStringGetSmallestEncoding);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = CFStringGetSmallestEncoding(_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = CFStringGetSmallestEncoding(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *CFStringRefObj_CFStringGetFastestEncoding(CFStringRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFStringEncoding _rv;
+ PyObject *_res = NULL;
+ CFStringEncoding _rv;
#ifndef CFStringGetFastestEncoding
- PyMac_PRECHECK(CFStringGetFastestEncoding);
+ PyMac_PRECHECK(CFStringGetFastestEncoding);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = CFStringGetFastestEncoding(_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = CFStringGetFastestEncoding(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *CFStringRefObj_CFStringCompareWithOptions(CFStringRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFComparisonResult _rv;
- CFStringRef theString2;
- CFRange rangeToCompare;
- CFOptionFlags compareOptions;
+ PyObject *_res = NULL;
+ CFComparisonResult _rv;
+ CFStringRef theString2;
+ CFRange rangeToCompare;
+ CFOptionFlags compareOptions;
#ifndef CFStringCompareWithOptions
- PyMac_PRECHECK(CFStringCompareWithOptions);
+ PyMac_PRECHECK(CFStringCompareWithOptions);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&l",
- CFStringRefObj_Convert, &theString2,
- CFRange_Convert, &rangeToCompare,
- &compareOptions))
- return NULL;
- _rv = CFStringCompareWithOptions(_self->ob_itself,
- theString2,
- rangeToCompare,
- compareOptions);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&l",
+ CFStringRefObj_Convert, &theString2,
+ CFRange_Convert, &rangeToCompare,
+ &compareOptions))
+ return NULL;
+ _rv = CFStringCompareWithOptions(_self->ob_itself,
+ theString2,
+ rangeToCompare,
+ compareOptions);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *CFStringRefObj_CFStringCompare(CFStringRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFComparisonResult _rv;
- CFStringRef theString2;
- CFOptionFlags compareOptions;
+ PyObject *_res = NULL;
+ CFComparisonResult _rv;
+ CFStringRef theString2;
+ CFOptionFlags compareOptions;
#ifndef CFStringCompare
- PyMac_PRECHECK(CFStringCompare);
+ PyMac_PRECHECK(CFStringCompare);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CFStringRefObj_Convert, &theString2,
- &compareOptions))
- return NULL;
- _rv = CFStringCompare(_self->ob_itself,
- theString2,
- compareOptions);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CFStringRefObj_Convert, &theString2,
+ &compareOptions))
+ return NULL;
+ _rv = CFStringCompare(_self->ob_itself,
+ theString2,
+ compareOptions);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *CFStringRefObj_CFStringFindWithOptions(CFStringRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- CFStringRef stringToFind;
- CFRange rangeToSearch;
- CFOptionFlags searchOptions;
- CFRange result;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ CFStringRef stringToFind;
+ CFRange rangeToSearch;
+ CFOptionFlags searchOptions;
+ CFRange result;
#ifndef CFStringFindWithOptions
- PyMac_PRECHECK(CFStringFindWithOptions);
+ PyMac_PRECHECK(CFStringFindWithOptions);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&l",
- CFStringRefObj_Convert, &stringToFind,
- CFRange_Convert, &rangeToSearch,
- &searchOptions))
- return NULL;
- _rv = CFStringFindWithOptions(_self->ob_itself,
- stringToFind,
- rangeToSearch,
- searchOptions,
- &result);
- _res = Py_BuildValue("lO&",
- _rv,
- CFRange_New, result);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&l",
+ CFStringRefObj_Convert, &stringToFind,
+ CFRange_Convert, &rangeToSearch,
+ &searchOptions))
+ return NULL;
+ _rv = CFStringFindWithOptions(_self->ob_itself,
+ stringToFind,
+ rangeToSearch,
+ searchOptions,
+ &result);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ CFRange_New, result);
+ return _res;
}
static PyObject *CFStringRefObj_CFStringCreateArrayWithFindResults(CFStringRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFArrayRef _rv;
- CFStringRef stringToFind;
- CFRange rangeToSearch;
- CFOptionFlags compareOptions;
- if (!PyArg_ParseTuple(_args, "O&O&l",
- CFStringRefObj_Convert, &stringToFind,
- CFRange_Convert, &rangeToSearch,
- &compareOptions))
- return NULL;
- _rv = CFStringCreateArrayWithFindResults((CFAllocatorRef)NULL,
- _self->ob_itself,
- stringToFind,
- rangeToSearch,
- compareOptions);
- _res = Py_BuildValue("O&",
- CFArrayRefObj_New, _rv);
- return _res;
+ PyObject *_res = NULL;
+ CFArrayRef _rv;
+ CFStringRef stringToFind;
+ CFRange rangeToSearch;
+ CFOptionFlags compareOptions;
+ if (!PyArg_ParseTuple(_args, "O&O&l",
+ CFStringRefObj_Convert, &stringToFind,
+ CFRange_Convert, &rangeToSearch,
+ &compareOptions))
+ return NULL;
+ _rv = CFStringCreateArrayWithFindResults((CFAllocatorRef)NULL,
+ _self->ob_itself,
+ stringToFind,
+ rangeToSearch,
+ compareOptions);
+ _res = Py_BuildValue("O&",
+ CFArrayRefObj_New, _rv);
+ return _res;
}
static PyObject *CFStringRefObj_CFStringFind(CFStringRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFRange _rv;
- CFStringRef stringToFind;
- CFOptionFlags compareOptions;
+ PyObject *_res = NULL;
+ CFRange _rv;
+ CFStringRef stringToFind;
+ CFOptionFlags compareOptions;
#ifndef CFStringFind
- PyMac_PRECHECK(CFStringFind);
+ PyMac_PRECHECK(CFStringFind);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CFStringRefObj_Convert, &stringToFind,
- &compareOptions))
- return NULL;
- _rv = CFStringFind(_self->ob_itself,
- stringToFind,
- compareOptions);
- _res = Py_BuildValue("O&",
- CFRange_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CFStringRefObj_Convert, &stringToFind,
+ &compareOptions))
+ return NULL;
+ _rv = CFStringFind(_self->ob_itself,
+ stringToFind,
+ compareOptions);
+ _res = Py_BuildValue("O&",
+ CFRange_New, _rv);
+ return _res;
}
static PyObject *CFStringRefObj_CFStringHasPrefix(CFStringRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- CFStringRef prefix;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ CFStringRef prefix;
#ifndef CFStringHasPrefix
- PyMac_PRECHECK(CFStringHasPrefix);
+ PyMac_PRECHECK(CFStringHasPrefix);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CFStringRefObj_Convert, &prefix))
- return NULL;
- _rv = CFStringHasPrefix(_self->ob_itself,
- prefix);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CFStringRefObj_Convert, &prefix))
+ return NULL;
+ _rv = CFStringHasPrefix(_self->ob_itself,
+ prefix);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *CFStringRefObj_CFStringHasSuffix(CFStringRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- CFStringRef suffix;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ CFStringRef suffix;
#ifndef CFStringHasSuffix
- PyMac_PRECHECK(CFStringHasSuffix);
+ PyMac_PRECHECK(CFStringHasSuffix);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CFStringRefObj_Convert, &suffix))
- return NULL;
- _rv = CFStringHasSuffix(_self->ob_itself,
- suffix);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CFStringRefObj_Convert, &suffix))
+ return NULL;
+ _rv = CFStringHasSuffix(_self->ob_itself,
+ suffix);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *CFStringRefObj_CFStringGetLineBounds(CFStringRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFRange range;
- CFIndex lineBeginIndex;
- CFIndex lineEndIndex;
- CFIndex contentsEndIndex;
+ PyObject *_res = NULL;
+ CFRange range;
+ CFIndex lineBeginIndex;
+ CFIndex lineEndIndex;
+ CFIndex contentsEndIndex;
#ifndef CFStringGetLineBounds
- PyMac_PRECHECK(CFStringGetLineBounds);
+ PyMac_PRECHECK(CFStringGetLineBounds);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CFRange_Convert, &range))
- return NULL;
- CFStringGetLineBounds(_self->ob_itself,
- range,
- &lineBeginIndex,
- &lineEndIndex,
- &contentsEndIndex);
- _res = Py_BuildValue("lll",
- lineBeginIndex,
- lineEndIndex,
- contentsEndIndex);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CFRange_Convert, &range))
+ return NULL;
+ CFStringGetLineBounds(_self->ob_itself,
+ range,
+ &lineBeginIndex,
+ &lineEndIndex,
+ &contentsEndIndex);
+ _res = Py_BuildValue("lll",
+ lineBeginIndex,
+ lineEndIndex,
+ contentsEndIndex);
+ return _res;
}
static PyObject *CFStringRefObj_CFStringCreateArrayBySeparatingStrings(CFStringRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFArrayRef _rv;
- CFStringRef separatorString;
- if (!PyArg_ParseTuple(_args, "O&",
- CFStringRefObj_Convert, &separatorString))
- return NULL;
- _rv = CFStringCreateArrayBySeparatingStrings((CFAllocatorRef)NULL,
- _self->ob_itself,
- separatorString);
- _res = Py_BuildValue("O&",
- CFArrayRefObj_New, _rv);
- return _res;
+ PyObject *_res = NULL;
+ CFArrayRef _rv;
+ CFStringRef separatorString;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CFStringRefObj_Convert, &separatorString))
+ return NULL;
+ _rv = CFStringCreateArrayBySeparatingStrings((CFAllocatorRef)NULL,
+ _self->ob_itself,
+ separatorString);
+ _res = Py_BuildValue("O&",
+ CFArrayRefObj_New, _rv);
+ return _res;
}
static PyObject *CFStringRefObj_CFStringGetIntValue(CFStringRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- SInt32 _rv;
+ PyObject *_res = NULL;
+ SInt32 _rv;
#ifndef CFStringGetIntValue
- PyMac_PRECHECK(CFStringGetIntValue);
+ PyMac_PRECHECK(CFStringGetIntValue);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = CFStringGetIntValue(_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = CFStringGetIntValue(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *CFStringRefObj_CFStringGetDoubleValue(CFStringRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- double _rv;
+ PyObject *_res = NULL;
+ double _rv;
#ifndef CFStringGetDoubleValue
- PyMac_PRECHECK(CFStringGetDoubleValue);
+ PyMac_PRECHECK(CFStringGetDoubleValue);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = CFStringGetDoubleValue(_self->ob_itself);
- _res = Py_BuildValue("d",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = CFStringGetDoubleValue(_self->ob_itself);
+ _res = Py_BuildValue("d",
+ _rv);
+ return _res;
}
static PyObject *CFStringRefObj_CFStringConvertIANACharSetNameToEncoding(CFStringRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFStringEncoding _rv;
+ PyObject *_res = NULL;
+ CFStringEncoding _rv;
#ifndef CFStringConvertIANACharSetNameToEncoding
- PyMac_PRECHECK(CFStringConvertIANACharSetNameToEncoding);
+ PyMac_PRECHECK(CFStringConvertIANACharSetNameToEncoding);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = CFStringConvertIANACharSetNameToEncoding(_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = CFStringConvertIANACharSetNameToEncoding(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *CFStringRefObj_CFShowStr(CFStringRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef CFShowStr
- PyMac_PRECHECK(CFShowStr);
+ PyMac_PRECHECK(CFShowStr);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- CFShowStr(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ CFShowStr(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CFStringRefObj_CFURLCreateWithString(CFStringRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFURLRef _rv;
- CFURLRef baseURL;
- if (!PyArg_ParseTuple(_args, "O&",
- OptionalCFURLRefObj_Convert, &baseURL))
- return NULL;
- _rv = CFURLCreateWithString((CFAllocatorRef)NULL,
- _self->ob_itself,
- baseURL);
- _res = Py_BuildValue("O&",
- CFURLRefObj_New, _rv);
- return _res;
+ PyObject *_res = NULL;
+ CFURLRef _rv;
+ CFURLRef baseURL;
+ if (!PyArg_ParseTuple(_args, "O&",
+ OptionalCFURLRefObj_Convert, &baseURL))
+ return NULL;
+ _rv = CFURLCreateWithString((CFAllocatorRef)NULL,
+ _self->ob_itself,
+ baseURL);
+ _res = Py_BuildValue("O&",
+ CFURLRefObj_New, _rv);
+ return _res;
}
static PyObject *CFStringRefObj_CFURLCreateWithFileSystemPath(CFStringRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFURLRef _rv;
- CFURLPathStyle pathStyle;
- Boolean isDirectory;
- if (!PyArg_ParseTuple(_args, "ll",
- &pathStyle,
- &isDirectory))
- return NULL;
- _rv = CFURLCreateWithFileSystemPath((CFAllocatorRef)NULL,
- _self->ob_itself,
- pathStyle,
- isDirectory);
- _res = Py_BuildValue("O&",
- CFURLRefObj_New, _rv);
- return _res;
+ PyObject *_res = NULL;
+ CFURLRef _rv;
+ CFURLPathStyle pathStyle;
+ Boolean isDirectory;
+ if (!PyArg_ParseTuple(_args, "ll",
+ &pathStyle,
+ &isDirectory))
+ return NULL;
+ _rv = CFURLCreateWithFileSystemPath((CFAllocatorRef)NULL,
+ _self->ob_itself,
+ pathStyle,
+ isDirectory);
+ _res = Py_BuildValue("O&",
+ CFURLRefObj_New, _rv);
+ return _res;
}
static PyObject *CFStringRefObj_CFURLCreateWithFileSystemPathRelativeToBase(CFStringRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFURLRef _rv;
- CFURLPathStyle pathStyle;
- Boolean isDirectory;
- CFURLRef baseURL;
- if (!PyArg_ParseTuple(_args, "llO&",
- &pathStyle,
- &isDirectory,
- OptionalCFURLRefObj_Convert, &baseURL))
- return NULL;
- _rv = CFURLCreateWithFileSystemPathRelativeToBase((CFAllocatorRef)NULL,
- _self->ob_itself,
- pathStyle,
- isDirectory,
- baseURL);
- _res = Py_BuildValue("O&",
- CFURLRefObj_New, _rv);
- return _res;
+ PyObject *_res = NULL;
+ CFURLRef _rv;
+ CFURLPathStyle pathStyle;
+ Boolean isDirectory;
+ CFURLRef baseURL;
+ if (!PyArg_ParseTuple(_args, "llO&",
+ &pathStyle,
+ &isDirectory,
+ OptionalCFURLRefObj_Convert, &baseURL))
+ return NULL;
+ _rv = CFURLCreateWithFileSystemPathRelativeToBase((CFAllocatorRef)NULL,
+ _self->ob_itself,
+ pathStyle,
+ isDirectory,
+ baseURL);
+ _res = Py_BuildValue("O&",
+ CFURLRefObj_New, _rv);
+ return _res;
}
static PyObject *CFStringRefObj_CFURLCreateStringByReplacingPercentEscapes(CFStringRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFStringRef _rv;
- CFStringRef charactersToLeaveEscaped;
- if (!PyArg_ParseTuple(_args, "O&",
- CFStringRefObj_Convert, &charactersToLeaveEscaped))
- return NULL;
- _rv = CFURLCreateStringByReplacingPercentEscapes((CFAllocatorRef)NULL,
- _self->ob_itself,
- charactersToLeaveEscaped);
- _res = Py_BuildValue("O&",
- CFStringRefObj_New, _rv);
- return _res;
+ PyObject *_res = NULL;
+ CFStringRef _rv;
+ CFStringRef charactersToLeaveEscaped;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CFStringRefObj_Convert, &charactersToLeaveEscaped))
+ return NULL;
+ _rv = CFURLCreateStringByReplacingPercentEscapes((CFAllocatorRef)NULL,
+ _self->ob_itself,
+ charactersToLeaveEscaped);
+ _res = Py_BuildValue("O&",
+ CFStringRefObj_New, _rv);
+ return _res;
}
static PyObject *CFStringRefObj_CFURLCreateStringByAddingPercentEscapes(CFStringRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFStringRef _rv;
- CFStringRef charactersToLeaveUnescaped;
- CFStringRef legalURLCharactersToBeEscaped;
- CFStringEncoding encoding;
- if (!PyArg_ParseTuple(_args, "O&O&l",
- CFStringRefObj_Convert, &charactersToLeaveUnescaped,
- CFStringRefObj_Convert, &legalURLCharactersToBeEscaped,
- &encoding))
- return NULL;
- _rv = CFURLCreateStringByAddingPercentEscapes((CFAllocatorRef)NULL,
- _self->ob_itself,
- charactersToLeaveUnescaped,
- legalURLCharactersToBeEscaped,
- encoding);
- _res = Py_BuildValue("O&",
- CFStringRefObj_New, _rv);
- return _res;
+ PyObject *_res = NULL;
+ CFStringRef _rv;
+ CFStringRef charactersToLeaveUnescaped;
+ CFStringRef legalURLCharactersToBeEscaped;
+ CFStringEncoding encoding;
+ if (!PyArg_ParseTuple(_args, "O&O&l",
+ CFStringRefObj_Convert, &charactersToLeaveUnescaped,
+ CFStringRefObj_Convert, &legalURLCharactersToBeEscaped,
+ &encoding))
+ return NULL;
+ _rv = CFURLCreateStringByAddingPercentEscapes((CFAllocatorRef)NULL,
+ _self->ob_itself,
+ charactersToLeaveUnescaped,
+ legalURLCharactersToBeEscaped,
+ encoding);
+ _res = Py_BuildValue("O&",
+ CFStringRefObj_New, _rv);
+ return _res;
}
static PyObject *CFStringRefObj_CFStringGetString(CFStringRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
- int size = CFStringGetLength(_self->ob_itself)+1;
- char *data = malloc(size);
+ int size = CFStringGetLength(_self->ob_itself)+1;
+ char *data = malloc(size);
- if( data == NULL ) return PyErr_NoMemory();
- if ( CFStringGetCString(_self->ob_itself, data, size, 0) ) {
- _res = (PyObject *)PyString_FromString(data);
- } else {
- PyErr_SetString(PyExc_RuntimeError, "CFStringGetCString could not fit the string");
- _res = NULL;
- }
- free(data);
- return _res;
+ if( data == NULL ) return PyErr_NoMemory();
+ if ( CFStringGetCString(_self->ob_itself, data, size, 0) ) {
+ _res = (PyObject *)PyString_FromString(data);
+ } else {
+ PyErr_SetString(PyExc_RuntimeError, "CFStringGetCString could not fit the string");
+ _res = NULL;
+ }
+ free(data);
+ return _res;
}
static PyObject *CFStringRefObj_CFStringGetUnicode(CFStringRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
- int size = CFStringGetLength(_self->ob_itself)+1;
- Py_UNICODE *data = malloc(size*sizeof(Py_UNICODE));
- CFRange range;
+ int size = CFStringGetLength(_self->ob_itself)+1;
+ Py_UNICODE *data = malloc(size*sizeof(Py_UNICODE));
+ CFRange range;
- range.location = 0;
- range.length = size;
- if( data == NULL ) return PyErr_NoMemory();
- CFStringGetCharacters(_self->ob_itself, range, data);
- _res = (PyObject *)PyUnicode_FromUnicode(data, size-1);
- free(data);
- return _res;
+ range.location = 0;
+ range.length = size;
+ if( data == NULL ) return PyErr_NoMemory();
+ CFStringGetCharacters(_self->ob_itself, range, data);
+ _res = (PyObject *)PyUnicode_FromUnicode(data, size-1);
+ free(data);
+ return _res;
}
static PyMethodDef CFStringRefObj_methods[] = {
- {"CFStringCreateWithSubstring", (PyCFunction)CFStringRefObj_CFStringCreateWithSubstring, 1,
- PyDoc_STR("(CFRange range) -> (CFStringRef _rv)")},
- {"CFStringCreateCopy", (PyCFunction)CFStringRefObj_CFStringCreateCopy, 1,
- PyDoc_STR("() -> (CFStringRef _rv)")},
- {"CFStringGetLength", (PyCFunction)CFStringRefObj_CFStringGetLength, 1,
- PyDoc_STR("() -> (CFIndex _rv)")},
- {"CFStringGetBytes", (PyCFunction)CFStringRefObj_CFStringGetBytes, 1,
- PyDoc_STR("(CFRange range, CFStringEncoding encoding, UInt8 lossByte, Boolean isExternalRepresentation, CFIndex maxBufLen) -> (CFIndex _rv, UInt8 buffer, CFIndex usedBufLen)")},
- {"CFStringCreateExternalRepresentation", (PyCFunction)CFStringRefObj_CFStringCreateExternalRepresentation, 1,
- PyDoc_STR("(CFStringEncoding encoding, UInt8 lossByte) -> (CFDataRef _rv)")},
- {"CFStringGetSmallestEncoding", (PyCFunction)CFStringRefObj_CFStringGetSmallestEncoding, 1,
- PyDoc_STR("() -> (CFStringEncoding _rv)")},
- {"CFStringGetFastestEncoding", (PyCFunction)CFStringRefObj_CFStringGetFastestEncoding, 1,
- PyDoc_STR("() -> (CFStringEncoding _rv)")},
- {"CFStringCompareWithOptions", (PyCFunction)CFStringRefObj_CFStringCompareWithOptions, 1,
- PyDoc_STR("(CFStringRef theString2, CFRange rangeToCompare, CFOptionFlags compareOptions) -> (CFComparisonResult _rv)")},
- {"CFStringCompare", (PyCFunction)CFStringRefObj_CFStringCompare, 1,
- PyDoc_STR("(CFStringRef theString2, CFOptionFlags compareOptions) -> (CFComparisonResult _rv)")},
- {"CFStringFindWithOptions", (PyCFunction)CFStringRefObj_CFStringFindWithOptions, 1,
- PyDoc_STR("(CFStringRef stringToFind, CFRange rangeToSearch, CFOptionFlags searchOptions) -> (Boolean _rv, CFRange result)")},
- {"CFStringCreateArrayWithFindResults", (PyCFunction)CFStringRefObj_CFStringCreateArrayWithFindResults, 1,
- PyDoc_STR("(CFStringRef stringToFind, CFRange rangeToSearch, CFOptionFlags compareOptions) -> (CFArrayRef _rv)")},
- {"CFStringFind", (PyCFunction)CFStringRefObj_CFStringFind, 1,
- PyDoc_STR("(CFStringRef stringToFind, CFOptionFlags compareOptions) -> (CFRange _rv)")},
- {"CFStringHasPrefix", (PyCFunction)CFStringRefObj_CFStringHasPrefix, 1,
- PyDoc_STR("(CFStringRef prefix) -> (Boolean _rv)")},
- {"CFStringHasSuffix", (PyCFunction)CFStringRefObj_CFStringHasSuffix, 1,
- PyDoc_STR("(CFStringRef suffix) -> (Boolean _rv)")},
- {"CFStringGetLineBounds", (PyCFunction)CFStringRefObj_CFStringGetLineBounds, 1,
- PyDoc_STR("(CFRange range) -> (CFIndex lineBeginIndex, CFIndex lineEndIndex, CFIndex contentsEndIndex)")},
- {"CFStringCreateArrayBySeparatingStrings", (PyCFunction)CFStringRefObj_CFStringCreateArrayBySeparatingStrings, 1,
- PyDoc_STR("(CFStringRef separatorString) -> (CFArrayRef _rv)")},
- {"CFStringGetIntValue", (PyCFunction)CFStringRefObj_CFStringGetIntValue, 1,
- PyDoc_STR("() -> (SInt32 _rv)")},
- {"CFStringGetDoubleValue", (PyCFunction)CFStringRefObj_CFStringGetDoubleValue, 1,
- PyDoc_STR("() -> (double _rv)")},
- {"CFStringConvertIANACharSetNameToEncoding", (PyCFunction)CFStringRefObj_CFStringConvertIANACharSetNameToEncoding, 1,
- PyDoc_STR("() -> (CFStringEncoding _rv)")},
- {"CFShowStr", (PyCFunction)CFStringRefObj_CFShowStr, 1,
- PyDoc_STR("() -> None")},
- {"CFURLCreateWithString", (PyCFunction)CFStringRefObj_CFURLCreateWithString, 1,
- PyDoc_STR("(CFURLRef baseURL) -> (CFURLRef _rv)")},
- {"CFURLCreateWithFileSystemPath", (PyCFunction)CFStringRefObj_CFURLCreateWithFileSystemPath, 1,
- PyDoc_STR("(CFURLPathStyle pathStyle, Boolean isDirectory) -> (CFURLRef _rv)")},
- {"CFURLCreateWithFileSystemPathRelativeToBase", (PyCFunction)CFStringRefObj_CFURLCreateWithFileSystemPathRelativeToBase, 1,
- PyDoc_STR("(CFURLPathStyle pathStyle, Boolean isDirectory, CFURLRef baseURL) -> (CFURLRef _rv)")},
- {"CFURLCreateStringByReplacingPercentEscapes", (PyCFunction)CFStringRefObj_CFURLCreateStringByReplacingPercentEscapes, 1,
- PyDoc_STR("(CFStringRef charactersToLeaveEscaped) -> (CFStringRef _rv)")},
- {"CFURLCreateStringByAddingPercentEscapes", (PyCFunction)CFStringRefObj_CFURLCreateStringByAddingPercentEscapes, 1,
- PyDoc_STR("(CFStringRef charactersToLeaveUnescaped, CFStringRef legalURLCharactersToBeEscaped, CFStringEncoding encoding) -> (CFStringRef _rv)")},
- {"CFStringGetString", (PyCFunction)CFStringRefObj_CFStringGetString, 1,
- PyDoc_STR("() -> (string _rv)")},
- {"CFStringGetUnicode", (PyCFunction)CFStringRefObj_CFStringGetUnicode, 1,
- PyDoc_STR("() -> (unicode _rv)")},
- {NULL, NULL, 0}
+ {"CFStringCreateWithSubstring", (PyCFunction)CFStringRefObj_CFStringCreateWithSubstring, 1,
+ PyDoc_STR("(CFRange range) -> (CFStringRef _rv)")},
+ {"CFStringCreateCopy", (PyCFunction)CFStringRefObj_CFStringCreateCopy, 1,
+ PyDoc_STR("() -> (CFStringRef _rv)")},
+ {"CFStringGetLength", (PyCFunction)CFStringRefObj_CFStringGetLength, 1,
+ PyDoc_STR("() -> (CFIndex _rv)")},
+ {"CFStringGetBytes", (PyCFunction)CFStringRefObj_CFStringGetBytes, 1,
+ PyDoc_STR("(CFRange range, CFStringEncoding encoding, UInt8 lossByte, Boolean isExternalRepresentation, CFIndex maxBufLen) -> (CFIndex _rv, UInt8 buffer, CFIndex usedBufLen)")},
+ {"CFStringCreateExternalRepresentation", (PyCFunction)CFStringRefObj_CFStringCreateExternalRepresentation, 1,
+ PyDoc_STR("(CFStringEncoding encoding, UInt8 lossByte) -> (CFDataRef _rv)")},
+ {"CFStringGetSmallestEncoding", (PyCFunction)CFStringRefObj_CFStringGetSmallestEncoding, 1,
+ PyDoc_STR("() -> (CFStringEncoding _rv)")},
+ {"CFStringGetFastestEncoding", (PyCFunction)CFStringRefObj_CFStringGetFastestEncoding, 1,
+ PyDoc_STR("() -> (CFStringEncoding _rv)")},
+ {"CFStringCompareWithOptions", (PyCFunction)CFStringRefObj_CFStringCompareWithOptions, 1,
+ PyDoc_STR("(CFStringRef theString2, CFRange rangeToCompare, CFOptionFlags compareOptions) -> (CFComparisonResult _rv)")},
+ {"CFStringCompare", (PyCFunction)CFStringRefObj_CFStringCompare, 1,
+ PyDoc_STR("(CFStringRef theString2, CFOptionFlags compareOptions) -> (CFComparisonResult _rv)")},
+ {"CFStringFindWithOptions", (PyCFunction)CFStringRefObj_CFStringFindWithOptions, 1,
+ PyDoc_STR("(CFStringRef stringToFind, CFRange rangeToSearch, CFOptionFlags searchOptions) -> (Boolean _rv, CFRange result)")},
+ {"CFStringCreateArrayWithFindResults", (PyCFunction)CFStringRefObj_CFStringCreateArrayWithFindResults, 1,
+ PyDoc_STR("(CFStringRef stringToFind, CFRange rangeToSearch, CFOptionFlags compareOptions) -> (CFArrayRef _rv)")},
+ {"CFStringFind", (PyCFunction)CFStringRefObj_CFStringFind, 1,
+ PyDoc_STR("(CFStringRef stringToFind, CFOptionFlags compareOptions) -> (CFRange _rv)")},
+ {"CFStringHasPrefix", (PyCFunction)CFStringRefObj_CFStringHasPrefix, 1,
+ PyDoc_STR("(CFStringRef prefix) -> (Boolean _rv)")},
+ {"CFStringHasSuffix", (PyCFunction)CFStringRefObj_CFStringHasSuffix, 1,
+ PyDoc_STR("(CFStringRef suffix) -> (Boolean _rv)")},
+ {"CFStringGetLineBounds", (PyCFunction)CFStringRefObj_CFStringGetLineBounds, 1,
+ PyDoc_STR("(CFRange range) -> (CFIndex lineBeginIndex, CFIndex lineEndIndex, CFIndex contentsEndIndex)")},
+ {"CFStringCreateArrayBySeparatingStrings", (PyCFunction)CFStringRefObj_CFStringCreateArrayBySeparatingStrings, 1,
+ PyDoc_STR("(CFStringRef separatorString) -> (CFArrayRef _rv)")},
+ {"CFStringGetIntValue", (PyCFunction)CFStringRefObj_CFStringGetIntValue, 1,
+ PyDoc_STR("() -> (SInt32 _rv)")},
+ {"CFStringGetDoubleValue", (PyCFunction)CFStringRefObj_CFStringGetDoubleValue, 1,
+ PyDoc_STR("() -> (double _rv)")},
+ {"CFStringConvertIANACharSetNameToEncoding", (PyCFunction)CFStringRefObj_CFStringConvertIANACharSetNameToEncoding, 1,
+ PyDoc_STR("() -> (CFStringEncoding _rv)")},
+ {"CFShowStr", (PyCFunction)CFStringRefObj_CFShowStr, 1,
+ PyDoc_STR("() -> None")},
+ {"CFURLCreateWithString", (PyCFunction)CFStringRefObj_CFURLCreateWithString, 1,
+ PyDoc_STR("(CFURLRef baseURL) -> (CFURLRef _rv)")},
+ {"CFURLCreateWithFileSystemPath", (PyCFunction)CFStringRefObj_CFURLCreateWithFileSystemPath, 1,
+ PyDoc_STR("(CFURLPathStyle pathStyle, Boolean isDirectory) -> (CFURLRef _rv)")},
+ {"CFURLCreateWithFileSystemPathRelativeToBase", (PyCFunction)CFStringRefObj_CFURLCreateWithFileSystemPathRelativeToBase, 1,
+ PyDoc_STR("(CFURLPathStyle pathStyle, Boolean isDirectory, CFURLRef baseURL) -> (CFURLRef _rv)")},
+ {"CFURLCreateStringByReplacingPercentEscapes", (PyCFunction)CFStringRefObj_CFURLCreateStringByReplacingPercentEscapes, 1,
+ PyDoc_STR("(CFStringRef charactersToLeaveEscaped) -> (CFStringRef _rv)")},
+ {"CFURLCreateStringByAddingPercentEscapes", (PyCFunction)CFStringRefObj_CFURLCreateStringByAddingPercentEscapes, 1,
+ PyDoc_STR("(CFStringRef charactersToLeaveUnescaped, CFStringRef legalURLCharactersToBeEscaped, CFStringEncoding encoding) -> (CFStringRef _rv)")},
+ {"CFStringGetString", (PyCFunction)CFStringRefObj_CFStringGetString, 1,
+ PyDoc_STR("() -> (string _rv)")},
+ {"CFStringGetUnicode", (PyCFunction)CFStringRefObj_CFStringGetUnicode, 1,
+ PyDoc_STR("() -> (unicode _rv)")},
+ {NULL, NULL, 0}
};
#define CFStringRefObj_getsetlist NULL
@@ -2435,100 +2435,100 @@ static PyMethodDef CFStringRefObj_methods[] = {
static int CFStringRefObj_compare(CFStringRefObject *self, CFStringRefObject *other)
{
- /* XXXX Or should we use CFEqual?? */
- if ( self->ob_itself > other->ob_itself ) return 1;
- if ( self->ob_itself < other->ob_itself ) return -1;
- return 0;
+ /* XXXX Or should we use CFEqual?? */
+ if ( self->ob_itself > other->ob_itself ) return 1;
+ if ( self->ob_itself < other->ob_itself ) return -1;
+ return 0;
}
static PyObject * CFStringRefObj_repr(CFStringRefObject *self)
{
- char buf[100];
- sprintf(buf, "<CFStringRef object at 0x%8.8x for 0x%8.8x>", (unsigned)self, (unsigned)self->ob_itself);
- return PyString_FromString(buf);
+ char buf[100];
+ sprintf(buf, "<CFStringRef object at 0x%8.8x for 0x%8.8x>", (unsigned)self, (unsigned)self->ob_itself);
+ return PyString_FromString(buf);
}
static int CFStringRefObj_hash(CFStringRefObject *self)
{
- /* XXXX Or should we use CFHash?? */
- return (int)self->ob_itself;
+ /* XXXX Or should we use CFHash?? */
+ return (int)self->ob_itself;
}
static int CFStringRefObj_tp_init(PyObject *_self, PyObject *_args, PyObject *_kwds)
{
- CFStringRef itself;
- char *kw[] = {"itself", 0};
+ CFStringRef itself;
+ char *kw[] = {"itself", 0};
- if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFStringRefObj_Convert, &itself))
- {
- ((CFStringRefObject *)_self)->ob_itself = itself;
- return 0;
- }
+ if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFStringRefObj_Convert, &itself))
+ {
+ ((CFStringRefObject *)_self)->ob_itself = itself;
+ return 0;
+ }
- /* Any CFTypeRef descendent is allowed as initializer too */
- if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFTypeRefObj_Convert, &itself))
- {
- ((CFStringRefObject *)_self)->ob_itself = itself;
- return 0;
- }
- return -1;
+ /* Any CFTypeRef descendent is allowed as initializer too */
+ if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFTypeRefObj_Convert, &itself))
+ {
+ ((CFStringRefObject *)_self)->ob_itself = itself;
+ return 0;
+ }
+ return -1;
}
#define CFStringRefObj_tp_alloc PyType_GenericAlloc
static PyObject *CFStringRefObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
- PyObject *self;
- if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
- ((CFStringRefObject *)self)->ob_itself = NULL;
- ((CFStringRefObject *)self)->ob_freeit = CFRelease;
- return self;
+ PyObject *self;
+ if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
+ ((CFStringRefObject *)self)->ob_itself = NULL;
+ ((CFStringRefObject *)self)->ob_freeit = CFRelease;
+ return self;
}
#define CFStringRefObj_tp_free PyObject_Del
PyTypeObject CFStringRef_Type = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
- "_CF.CFStringRef", /*tp_name*/
- sizeof(CFStringRefObject), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- /* methods */
- (destructor) CFStringRefObj_dealloc, /*tp_dealloc*/
- 0, /*tp_print*/
- (getattrfunc)0, /*tp_getattr*/
- (setattrfunc)0, /*tp_setattr*/
- (cmpfunc) CFStringRefObj_compare, /*tp_compare*/
- (reprfunc) CFStringRefObj_repr, /*tp_repr*/
- (PyNumberMethods *)0, /* tp_as_number */
- (PySequenceMethods *)0, /* tp_as_sequence */
- (PyMappingMethods *)0, /* tp_as_mapping */
- (hashfunc) CFStringRefObj_hash, /*tp_hash*/
- 0, /*tp_call*/
- 0, /*tp_str*/
- PyObject_GenericGetAttr, /*tp_getattro*/
- PyObject_GenericSetAttr, /*tp_setattro */
- 0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
- 0, /*tp_doc*/
- 0, /*tp_traverse*/
- 0, /*tp_clear*/
- 0, /*tp_richcompare*/
- 0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
- 0, /*tp_iternext*/
- CFStringRefObj_methods, /* tp_methods */
- 0, /*tp_members*/
- CFStringRefObj_getsetlist, /*tp_getset*/
- 0, /*tp_base*/
- 0, /*tp_dict*/
- 0, /*tp_descr_get*/
- 0, /*tp_descr_set*/
- 0, /*tp_dictoffset*/
- CFStringRefObj_tp_init, /* tp_init */
- CFStringRefObj_tp_alloc, /* tp_alloc */
- CFStringRefObj_tp_new, /* tp_new */
- CFStringRefObj_tp_free, /* tp_free */
+ PyObject_HEAD_INIT(NULL)
+ 0, /*ob_size*/
+ "_CF.CFStringRef", /*tp_name*/
+ sizeof(CFStringRefObject), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ /* methods */
+ (destructor) CFStringRefObj_dealloc, /*tp_dealloc*/
+ 0, /*tp_print*/
+ (getattrfunc)0, /*tp_getattr*/
+ (setattrfunc)0, /*tp_setattr*/
+ (cmpfunc) CFStringRefObj_compare, /*tp_compare*/
+ (reprfunc) CFStringRefObj_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) CFStringRefObj_hash, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ PyObject_GenericGetAttr, /*tp_getattro*/
+ PyObject_GenericSetAttr, /*tp_setattro */
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
+ 0, /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ CFStringRefObj_methods, /* tp_methods */
+ 0, /*tp_members*/
+ CFStringRefObj_getsetlist, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ CFStringRefObj_tp_init, /* tp_init */
+ CFStringRefObj_tp_alloc, /* tp_alloc */
+ CFStringRefObj_tp_new, /* tp_new */
+ CFStringRefObj_tp_free, /* tp_free */
};
/* ------------------ End object type CFStringRef ------------------- */
@@ -2541,281 +2541,281 @@ PyTypeObject CFMutableStringRef_Type;
#define CFMutableStringRefObj_Check(x) ((x)->ob_type == &CFMutableStringRef_Type || PyObject_TypeCheck((x), &CFMutableStringRef_Type))
typedef struct CFMutableStringRefObject {
- PyObject_HEAD
- CFMutableStringRef ob_itself;
- void (*ob_freeit)(CFTypeRef ptr);
+ PyObject_HEAD
+ CFMutableStringRef ob_itself;
+ void (*ob_freeit)(CFTypeRef ptr);
} CFMutableStringRefObject;
PyObject *CFMutableStringRefObj_New(CFMutableStringRef itself)
{
- CFMutableStringRefObject *it;
- if (itself == NULL)
- {
- PyErr_SetString(PyExc_RuntimeError, "cannot wrap NULL");
- return NULL;
- }
- it = PyObject_NEW(CFMutableStringRefObject, &CFMutableStringRef_Type);
- if (it == NULL) return NULL;
- /* XXXX Should we tp_init or tp_new our basetype? */
- it->ob_itself = itself;
- it->ob_freeit = CFRelease;
- return (PyObject *)it;
+ CFMutableStringRefObject *it;
+ if (itself == NULL)
+ {
+ PyErr_SetString(PyExc_RuntimeError, "cannot wrap NULL");
+ return NULL;
+ }
+ it = PyObject_NEW(CFMutableStringRefObject, &CFMutableStringRef_Type);
+ if (it == NULL) return NULL;
+ /* XXXX Should we tp_init or tp_new our basetype? */
+ it->ob_itself = itself;
+ it->ob_freeit = CFRelease;
+ return (PyObject *)it;
}
int CFMutableStringRefObj_Convert(PyObject *v, CFMutableStringRef *p_itself)
{
- if (v == Py_None) { *p_itself = NULL; return 1; }
- /* Check for other CF objects here */
+ if (v == Py_None) { *p_itself = NULL; return 1; }
+ /* Check for other CF objects here */
- if (!CFMutableStringRefObj_Check(v))
- {
- PyErr_SetString(PyExc_TypeError, "CFMutableStringRef required");
- return 0;
- }
- *p_itself = ((CFMutableStringRefObject *)v)->ob_itself;
- return 1;
+ if (!CFMutableStringRefObj_Check(v))
+ {
+ PyErr_SetString(PyExc_TypeError, "CFMutableStringRef required");
+ return 0;
+ }
+ *p_itself = ((CFMutableStringRefObject *)v)->ob_itself;
+ return 1;
}
static void CFMutableStringRefObj_dealloc(CFMutableStringRefObject *self)
{
- if (self->ob_freeit && self->ob_itself)
- {
- self->ob_freeit((CFTypeRef)self->ob_itself);
- self->ob_itself = NULL;
- }
- CFStringRef_Type.tp_dealloc((PyObject *)self);
+ if (self->ob_freeit && self->ob_itself)
+ {
+ self->ob_freeit((CFTypeRef)self->ob_itself);
+ self->ob_itself = NULL;
+ }
+ CFStringRef_Type.tp_dealloc((PyObject *)self);
}
static PyObject *CFMutableStringRefObj_CFStringAppend(CFMutableStringRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFStringRef appendedString;
+ PyObject *_res = NULL;
+ CFStringRef appendedString;
#ifndef CFStringAppend
- PyMac_PRECHECK(CFStringAppend);
+ PyMac_PRECHECK(CFStringAppend);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CFStringRefObj_Convert, &appendedString))
- return NULL;
- CFStringAppend(_self->ob_itself,
- appendedString);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CFStringRefObj_Convert, &appendedString))
+ return NULL;
+ CFStringAppend(_self->ob_itself,
+ appendedString);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CFMutableStringRefObj_CFStringAppendCharacters(CFMutableStringRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- UniChar *chars__in__;
- UniCharCount chars__len__;
- int chars__in_len__;
+ PyObject *_res = NULL;
+ UniChar *chars__in__;
+ UniCharCount chars__len__;
+ int chars__in_len__;
#ifndef CFStringAppendCharacters
- PyMac_PRECHECK(CFStringAppendCharacters);
+ PyMac_PRECHECK(CFStringAppendCharacters);
#endif
- if (!PyArg_ParseTuple(_args, "u#",
- &chars__in__, &chars__in_len__))
- return NULL;
- chars__len__ = chars__in_len__;
- CFStringAppendCharacters(_self->ob_itself,
- chars__in__, chars__len__);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "u#",
+ &chars__in__, &chars__in_len__))
+ return NULL;
+ chars__len__ = chars__in_len__;
+ CFStringAppendCharacters(_self->ob_itself,
+ chars__in__, chars__len__);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CFMutableStringRefObj_CFStringAppendPascalString(CFMutableStringRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Str255 pStr;
- CFStringEncoding encoding;
+ PyObject *_res = NULL;
+ Str255 pStr;
+ CFStringEncoding encoding;
#ifndef CFStringAppendPascalString
- PyMac_PRECHECK(CFStringAppendPascalString);
+ PyMac_PRECHECK(CFStringAppendPascalString);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- PyMac_GetStr255, pStr,
- &encoding))
- return NULL;
- CFStringAppendPascalString(_self->ob_itself,
- pStr,
- encoding);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ PyMac_GetStr255, pStr,
+ &encoding))
+ return NULL;
+ CFStringAppendPascalString(_self->ob_itself,
+ pStr,
+ encoding);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CFMutableStringRefObj_CFStringAppendCString(CFMutableStringRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- char* cStr;
- CFStringEncoding encoding;
+ PyObject *_res = NULL;
+ char* cStr;
+ CFStringEncoding encoding;
#ifndef CFStringAppendCString
- PyMac_PRECHECK(CFStringAppendCString);
+ PyMac_PRECHECK(CFStringAppendCString);
#endif
- if (!PyArg_ParseTuple(_args, "sl",
- &cStr,
- &encoding))
- return NULL;
- CFStringAppendCString(_self->ob_itself,
- cStr,
- encoding);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "sl",
+ &cStr,
+ &encoding))
+ return NULL;
+ CFStringAppendCString(_self->ob_itself,
+ cStr,
+ encoding);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CFMutableStringRefObj_CFStringInsert(CFMutableStringRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFIndex idx;
- CFStringRef insertedStr;
+ PyObject *_res = NULL;
+ CFIndex idx;
+ CFStringRef insertedStr;
#ifndef CFStringInsert
- PyMac_PRECHECK(CFStringInsert);
+ PyMac_PRECHECK(CFStringInsert);
#endif
- if (!PyArg_ParseTuple(_args, "lO&",
- &idx,
- CFStringRefObj_Convert, &insertedStr))
- return NULL;
- CFStringInsert(_self->ob_itself,
- idx,
- insertedStr);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "lO&",
+ &idx,
+ CFStringRefObj_Convert, &insertedStr))
+ return NULL;
+ CFStringInsert(_self->ob_itself,
+ idx,
+ insertedStr);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CFMutableStringRefObj_CFStringDelete(CFMutableStringRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFRange range;
+ PyObject *_res = NULL;
+ CFRange range;
#ifndef CFStringDelete
- PyMac_PRECHECK(CFStringDelete);
+ PyMac_PRECHECK(CFStringDelete);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CFRange_Convert, &range))
- return NULL;
- CFStringDelete(_self->ob_itself,
- range);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CFRange_Convert, &range))
+ return NULL;
+ CFStringDelete(_self->ob_itself,
+ range);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CFMutableStringRefObj_CFStringReplace(CFMutableStringRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFRange range;
- CFStringRef replacement;
+ PyObject *_res = NULL;
+ CFRange range;
+ CFStringRef replacement;
#ifndef CFStringReplace
- PyMac_PRECHECK(CFStringReplace);
+ PyMac_PRECHECK(CFStringReplace);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CFRange_Convert, &range,
- CFStringRefObj_Convert, &replacement))
- return NULL;
- CFStringReplace(_self->ob_itself,
- range,
- replacement);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CFRange_Convert, &range,
+ CFStringRefObj_Convert, &replacement))
+ return NULL;
+ CFStringReplace(_self->ob_itself,
+ range,
+ replacement);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CFMutableStringRefObj_CFStringReplaceAll(CFMutableStringRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFStringRef replacement;
+ PyObject *_res = NULL;
+ CFStringRef replacement;
#ifndef CFStringReplaceAll
- PyMac_PRECHECK(CFStringReplaceAll);
+ PyMac_PRECHECK(CFStringReplaceAll);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CFStringRefObj_Convert, &replacement))
- return NULL;
- CFStringReplaceAll(_self->ob_itself,
- replacement);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CFStringRefObj_Convert, &replacement))
+ return NULL;
+ CFStringReplaceAll(_self->ob_itself,
+ replacement);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CFMutableStringRefObj_CFStringPad(CFMutableStringRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFStringRef padString;
- CFIndex length;
- CFIndex indexIntoPad;
+ PyObject *_res = NULL;
+ CFStringRef padString;
+ CFIndex length;
+ CFIndex indexIntoPad;
#ifndef CFStringPad
- PyMac_PRECHECK(CFStringPad);
+ PyMac_PRECHECK(CFStringPad);
#endif
- if (!PyArg_ParseTuple(_args, "O&ll",
- CFStringRefObj_Convert, &padString,
- &length,
- &indexIntoPad))
- return NULL;
- CFStringPad(_self->ob_itself,
- padString,
- length,
- indexIntoPad);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&ll",
+ CFStringRefObj_Convert, &padString,
+ &length,
+ &indexIntoPad))
+ return NULL;
+ CFStringPad(_self->ob_itself,
+ padString,
+ length,
+ indexIntoPad);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CFMutableStringRefObj_CFStringTrim(CFMutableStringRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFStringRef trimString;
+ PyObject *_res = NULL;
+ CFStringRef trimString;
#ifndef CFStringTrim
- PyMac_PRECHECK(CFStringTrim);
+ PyMac_PRECHECK(CFStringTrim);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CFStringRefObj_Convert, &trimString))
- return NULL;
- CFStringTrim(_self->ob_itself,
- trimString);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CFStringRefObj_Convert, &trimString))
+ return NULL;
+ CFStringTrim(_self->ob_itself,
+ trimString);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CFMutableStringRefObj_CFStringTrimWhitespace(CFMutableStringRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef CFStringTrimWhitespace
- PyMac_PRECHECK(CFStringTrimWhitespace);
+ PyMac_PRECHECK(CFStringTrimWhitespace);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- CFStringTrimWhitespace(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ CFStringTrimWhitespace(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyMethodDef CFMutableStringRefObj_methods[] = {
- {"CFStringAppend", (PyCFunction)CFMutableStringRefObj_CFStringAppend, 1,
- PyDoc_STR("(CFStringRef appendedString) -> None")},
- {"CFStringAppendCharacters", (PyCFunction)CFMutableStringRefObj_CFStringAppendCharacters, 1,
- PyDoc_STR("(Buffer chars) -> None")},
- {"CFStringAppendPascalString", (PyCFunction)CFMutableStringRefObj_CFStringAppendPascalString, 1,
- PyDoc_STR("(Str255 pStr, CFStringEncoding encoding) -> None")},
- {"CFStringAppendCString", (PyCFunction)CFMutableStringRefObj_CFStringAppendCString, 1,
- PyDoc_STR("(char* cStr, CFStringEncoding encoding) -> None")},
- {"CFStringInsert", (PyCFunction)CFMutableStringRefObj_CFStringInsert, 1,
- PyDoc_STR("(CFIndex idx, CFStringRef insertedStr) -> None")},
- {"CFStringDelete", (PyCFunction)CFMutableStringRefObj_CFStringDelete, 1,
- PyDoc_STR("(CFRange range) -> None")},
- {"CFStringReplace", (PyCFunction)CFMutableStringRefObj_CFStringReplace, 1,
- PyDoc_STR("(CFRange range, CFStringRef replacement) -> None")},
- {"CFStringReplaceAll", (PyCFunction)CFMutableStringRefObj_CFStringReplaceAll, 1,
- PyDoc_STR("(CFStringRef replacement) -> None")},
- {"CFStringPad", (PyCFunction)CFMutableStringRefObj_CFStringPad, 1,
- PyDoc_STR("(CFStringRef padString, CFIndex length, CFIndex indexIntoPad) -> None")},
- {"CFStringTrim", (PyCFunction)CFMutableStringRefObj_CFStringTrim, 1,
- PyDoc_STR("(CFStringRef trimString) -> None")},
- {"CFStringTrimWhitespace", (PyCFunction)CFMutableStringRefObj_CFStringTrimWhitespace, 1,
- PyDoc_STR("() -> None")},
- {NULL, NULL, 0}
+ {"CFStringAppend", (PyCFunction)CFMutableStringRefObj_CFStringAppend, 1,
+ PyDoc_STR("(CFStringRef appendedString) -> None")},
+ {"CFStringAppendCharacters", (PyCFunction)CFMutableStringRefObj_CFStringAppendCharacters, 1,
+ PyDoc_STR("(Buffer chars) -> None")},
+ {"CFStringAppendPascalString", (PyCFunction)CFMutableStringRefObj_CFStringAppendPascalString, 1,
+ PyDoc_STR("(Str255 pStr, CFStringEncoding encoding) -> None")},
+ {"CFStringAppendCString", (PyCFunction)CFMutableStringRefObj_CFStringAppendCString, 1,
+ PyDoc_STR("(char* cStr, CFStringEncoding encoding) -> None")},
+ {"CFStringInsert", (PyCFunction)CFMutableStringRefObj_CFStringInsert, 1,
+ PyDoc_STR("(CFIndex idx, CFStringRef insertedStr) -> None")},
+ {"CFStringDelete", (PyCFunction)CFMutableStringRefObj_CFStringDelete, 1,
+ PyDoc_STR("(CFRange range) -> None")},
+ {"CFStringReplace", (PyCFunction)CFMutableStringRefObj_CFStringReplace, 1,
+ PyDoc_STR("(CFRange range, CFStringRef replacement) -> None")},
+ {"CFStringReplaceAll", (PyCFunction)CFMutableStringRefObj_CFStringReplaceAll, 1,
+ PyDoc_STR("(CFStringRef replacement) -> None")},
+ {"CFStringPad", (PyCFunction)CFMutableStringRefObj_CFStringPad, 1,
+ PyDoc_STR("(CFStringRef padString, CFIndex length, CFIndex indexIntoPad) -> None")},
+ {"CFStringTrim", (PyCFunction)CFMutableStringRefObj_CFStringTrim, 1,
+ PyDoc_STR("(CFStringRef trimString) -> None")},
+ {"CFStringTrimWhitespace", (PyCFunction)CFMutableStringRefObj_CFStringTrimWhitespace, 1,
+ PyDoc_STR("() -> None")},
+ {NULL, NULL, 0}
};
#define CFMutableStringRefObj_getsetlist NULL
@@ -2823,100 +2823,100 @@ static PyMethodDef CFMutableStringRefObj_methods[] = {
static int CFMutableStringRefObj_compare(CFMutableStringRefObject *self, CFMutableStringRefObject *other)
{
- /* XXXX Or should we use CFEqual?? */
- if ( self->ob_itself > other->ob_itself ) return 1;
- if ( self->ob_itself < other->ob_itself ) return -1;
- return 0;
+ /* XXXX Or should we use CFEqual?? */
+ if ( self->ob_itself > other->ob_itself ) return 1;
+ if ( self->ob_itself < other->ob_itself ) return -1;
+ return 0;
}
static PyObject * CFMutableStringRefObj_repr(CFMutableStringRefObject *self)
{
- char buf[100];
- sprintf(buf, "<CFMutableStringRef object at 0x%8.8x for 0x%8.8x>", (unsigned)self, (unsigned)self->ob_itself);
- return PyString_FromString(buf);
+ char buf[100];
+ sprintf(buf, "<CFMutableStringRef object at 0x%8.8x for 0x%8.8x>", (unsigned)self, (unsigned)self->ob_itself);
+ return PyString_FromString(buf);
}
static int CFMutableStringRefObj_hash(CFMutableStringRefObject *self)
{
- /* XXXX Or should we use CFHash?? */
- return (int)self->ob_itself;
+ /* XXXX Or should we use CFHash?? */
+ return (int)self->ob_itself;
}
static int CFMutableStringRefObj_tp_init(PyObject *_self, PyObject *_args, PyObject *_kwds)
{
- CFMutableStringRef itself;
- char *kw[] = {"itself", 0};
+ CFMutableStringRef itself;
+ char *kw[] = {"itself", 0};
- if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFMutableStringRefObj_Convert, &itself))
- {
- ((CFMutableStringRefObject *)_self)->ob_itself = itself;
- return 0;
- }
+ if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFMutableStringRefObj_Convert, &itself))
+ {
+ ((CFMutableStringRefObject *)_self)->ob_itself = itself;
+ return 0;
+ }
- /* Any CFTypeRef descendent is allowed as initializer too */
- if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFTypeRefObj_Convert, &itself))
- {
- ((CFMutableStringRefObject *)_self)->ob_itself = itself;
- return 0;
- }
- return -1;
+ /* Any CFTypeRef descendent is allowed as initializer too */
+ if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFTypeRefObj_Convert, &itself))
+ {
+ ((CFMutableStringRefObject *)_self)->ob_itself = itself;
+ return 0;
+ }
+ return -1;
}
#define CFMutableStringRefObj_tp_alloc PyType_GenericAlloc
static PyObject *CFMutableStringRefObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
- PyObject *self;
- if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
- ((CFMutableStringRefObject *)self)->ob_itself = NULL;
- ((CFMutableStringRefObject *)self)->ob_freeit = CFRelease;
- return self;
+ PyObject *self;
+ if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
+ ((CFMutableStringRefObject *)self)->ob_itself = NULL;
+ ((CFMutableStringRefObject *)self)->ob_freeit = CFRelease;
+ return self;
}
#define CFMutableStringRefObj_tp_free PyObject_Del
PyTypeObject CFMutableStringRef_Type = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
- "_CF.CFMutableStringRef", /*tp_name*/
- sizeof(CFMutableStringRefObject), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- /* methods */
- (destructor) CFMutableStringRefObj_dealloc, /*tp_dealloc*/
- 0, /*tp_print*/
- (getattrfunc)0, /*tp_getattr*/
- (setattrfunc)0, /*tp_setattr*/
- (cmpfunc) CFMutableStringRefObj_compare, /*tp_compare*/
- (reprfunc) CFMutableStringRefObj_repr, /*tp_repr*/
- (PyNumberMethods *)0, /* tp_as_number */
- (PySequenceMethods *)0, /* tp_as_sequence */
- (PyMappingMethods *)0, /* tp_as_mapping */
- (hashfunc) CFMutableStringRefObj_hash, /*tp_hash*/
- 0, /*tp_call*/
- 0, /*tp_str*/
- PyObject_GenericGetAttr, /*tp_getattro*/
- PyObject_GenericSetAttr, /*tp_setattro */
- 0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
- 0, /*tp_doc*/
- 0, /*tp_traverse*/
- 0, /*tp_clear*/
- 0, /*tp_richcompare*/
- 0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
- 0, /*tp_iternext*/
- CFMutableStringRefObj_methods, /* tp_methods */
- 0, /*tp_members*/
- CFMutableStringRefObj_getsetlist, /*tp_getset*/
- 0, /*tp_base*/
- 0, /*tp_dict*/
- 0, /*tp_descr_get*/
- 0, /*tp_descr_set*/
- 0, /*tp_dictoffset*/
- CFMutableStringRefObj_tp_init, /* tp_init */
- CFMutableStringRefObj_tp_alloc, /* tp_alloc */
- CFMutableStringRefObj_tp_new, /* tp_new */
- CFMutableStringRefObj_tp_free, /* tp_free */
+ PyObject_HEAD_INIT(NULL)
+ 0, /*ob_size*/
+ "_CF.CFMutableStringRef", /*tp_name*/
+ sizeof(CFMutableStringRefObject), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ /* methods */
+ (destructor) CFMutableStringRefObj_dealloc, /*tp_dealloc*/
+ 0, /*tp_print*/
+ (getattrfunc)0, /*tp_getattr*/
+ (setattrfunc)0, /*tp_setattr*/
+ (cmpfunc) CFMutableStringRefObj_compare, /*tp_compare*/
+ (reprfunc) CFMutableStringRefObj_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) CFMutableStringRefObj_hash, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ PyObject_GenericGetAttr, /*tp_getattro*/
+ PyObject_GenericSetAttr, /*tp_setattro */
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
+ 0, /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ CFMutableStringRefObj_methods, /* tp_methods */
+ 0, /*tp_members*/
+ CFMutableStringRefObj_getsetlist, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ CFMutableStringRefObj_tp_init, /* tp_init */
+ CFMutableStringRefObj_tp_alloc, /* tp_alloc */
+ CFMutableStringRefObj_tp_new, /* tp_new */
+ CFMutableStringRefObj_tp_free, /* tp_free */
};
/* --------------- End object type CFMutableStringRef --------------- */
@@ -2929,545 +2929,545 @@ PyTypeObject CFURLRef_Type;
#define CFURLRefObj_Check(x) ((x)->ob_type == &CFURLRef_Type || PyObject_TypeCheck((x), &CFURLRef_Type))
typedef struct CFURLRefObject {
- PyObject_HEAD
- CFURLRef ob_itself;
- void (*ob_freeit)(CFTypeRef ptr);
+ PyObject_HEAD
+ CFURLRef ob_itself;
+ void (*ob_freeit)(CFTypeRef ptr);
} CFURLRefObject;
PyObject *CFURLRefObj_New(CFURLRef itself)
{
- CFURLRefObject *it;
- if (itself == NULL)
- {
- PyErr_SetString(PyExc_RuntimeError, "cannot wrap NULL");
- return NULL;
- }
- it = PyObject_NEW(CFURLRefObject, &CFURLRef_Type);
- if (it == NULL) return NULL;
- /* XXXX Should we tp_init or tp_new our basetype? */
- it->ob_itself = itself;
- it->ob_freeit = CFRelease;
- return (PyObject *)it;
+ CFURLRefObject *it;
+ if (itself == NULL)
+ {
+ PyErr_SetString(PyExc_RuntimeError, "cannot wrap NULL");
+ return NULL;
+ }
+ it = PyObject_NEW(CFURLRefObject, &CFURLRef_Type);
+ if (it == NULL) return NULL;
+ /* XXXX Should we tp_init or tp_new our basetype? */
+ it->ob_itself = itself;
+ it->ob_freeit = CFRelease;
+ return (PyObject *)it;
}
int CFURLRefObj_Convert(PyObject *v, CFURLRef *p_itself)
{
- if (v == Py_None) { *p_itself = NULL; return 1; }
- /* Check for other CF objects here */
+ if (v == Py_None) { *p_itself = NULL; return 1; }
+ /* Check for other CF objects here */
- if (!CFURLRefObj_Check(v))
- {
- PyErr_SetString(PyExc_TypeError, "CFURLRef required");
- return 0;
- }
- *p_itself = ((CFURLRefObject *)v)->ob_itself;
- return 1;
+ if (!CFURLRefObj_Check(v))
+ {
+ PyErr_SetString(PyExc_TypeError, "CFURLRef required");
+ return 0;
+ }
+ *p_itself = ((CFURLRefObject *)v)->ob_itself;
+ return 1;
}
static void CFURLRefObj_dealloc(CFURLRefObject *self)
{
- if (self->ob_freeit && self->ob_itself)
- {
- self->ob_freeit((CFTypeRef)self->ob_itself);
- self->ob_itself = NULL;
- }
- CFTypeRef_Type.tp_dealloc((PyObject *)self);
+ if (self->ob_freeit && self->ob_itself)
+ {
+ self->ob_freeit((CFTypeRef)self->ob_itself);
+ self->ob_itself = NULL;
+ }
+ CFTypeRef_Type.tp_dealloc((PyObject *)self);
}
static PyObject *CFURLRefObj_CFURLCreateData(CFURLRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFDataRef _rv;
- CFStringEncoding encoding;
- Boolean escapeWhitespace;
- if (!PyArg_ParseTuple(_args, "ll",
- &encoding,
- &escapeWhitespace))
- return NULL;
- _rv = CFURLCreateData((CFAllocatorRef)NULL,
- _self->ob_itself,
- encoding,
- escapeWhitespace);
- _res = Py_BuildValue("O&",
- CFDataRefObj_New, _rv);
- return _res;
+ PyObject *_res = NULL;
+ CFDataRef _rv;
+ CFStringEncoding encoding;
+ Boolean escapeWhitespace;
+ if (!PyArg_ParseTuple(_args, "ll",
+ &encoding,
+ &escapeWhitespace))
+ return NULL;
+ _rv = CFURLCreateData((CFAllocatorRef)NULL,
+ _self->ob_itself,
+ encoding,
+ escapeWhitespace);
+ _res = Py_BuildValue("O&",
+ CFDataRefObj_New, _rv);
+ return _res;
}
static PyObject *CFURLRefObj_CFURLGetFileSystemRepresentation(CFURLRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- Boolean resolveAgainstBase;
- UInt8 buffer;
- CFIndex maxBufLen;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ Boolean resolveAgainstBase;
+ UInt8 buffer;
+ CFIndex maxBufLen;
#ifndef CFURLGetFileSystemRepresentation
- PyMac_PRECHECK(CFURLGetFileSystemRepresentation);
+ PyMac_PRECHECK(CFURLGetFileSystemRepresentation);
#endif
- if (!PyArg_ParseTuple(_args, "ll",
- &resolveAgainstBase,
- &maxBufLen))
- return NULL;
- _rv = CFURLGetFileSystemRepresentation(_self->ob_itself,
- resolveAgainstBase,
- &buffer,
- maxBufLen);
- _res = Py_BuildValue("lb",
- _rv,
- buffer);
- return _res;
+ if (!PyArg_ParseTuple(_args, "ll",
+ &resolveAgainstBase,
+ &maxBufLen))
+ return NULL;
+ _rv = CFURLGetFileSystemRepresentation(_self->ob_itself,
+ resolveAgainstBase,
+ &buffer,
+ maxBufLen);
+ _res = Py_BuildValue("lb",
+ _rv,
+ buffer);
+ return _res;
}
static PyObject *CFURLRefObj_CFURLCopyAbsoluteURL(CFURLRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFURLRef _rv;
+ PyObject *_res = NULL;
+ CFURLRef _rv;
#ifndef CFURLCopyAbsoluteURL
- PyMac_PRECHECK(CFURLCopyAbsoluteURL);
+ PyMac_PRECHECK(CFURLCopyAbsoluteURL);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = CFURLCopyAbsoluteURL(_self->ob_itself);
- _res = Py_BuildValue("O&",
- CFURLRefObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = CFURLCopyAbsoluteURL(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ CFURLRefObj_New, _rv);
+ return _res;
}
static PyObject *CFURLRefObj_CFURLGetString(CFURLRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFStringRef _rv;
+ PyObject *_res = NULL;
+ CFStringRef _rv;
#ifndef CFURLGetString
- PyMac_PRECHECK(CFURLGetString);
+ PyMac_PRECHECK(CFURLGetString);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = CFURLGetString(_self->ob_itself);
- _res = Py_BuildValue("O&",
- CFStringRefObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = CFURLGetString(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ CFStringRefObj_New, _rv);
+ return _res;
}
static PyObject *CFURLRefObj_CFURLGetBaseURL(CFURLRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFURLRef _rv;
+ PyObject *_res = NULL;
+ CFURLRef _rv;
#ifndef CFURLGetBaseURL
- PyMac_PRECHECK(CFURLGetBaseURL);
+ PyMac_PRECHECK(CFURLGetBaseURL);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = CFURLGetBaseURL(_self->ob_itself);
- _res = Py_BuildValue("O&",
- CFURLRefObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = CFURLGetBaseURL(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ CFURLRefObj_New, _rv);
+ return _res;
}
static PyObject *CFURLRefObj_CFURLCanBeDecomposed(CFURLRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
+ PyObject *_res = NULL;
+ Boolean _rv;
#ifndef CFURLCanBeDecomposed
- PyMac_PRECHECK(CFURLCanBeDecomposed);
+ PyMac_PRECHECK(CFURLCanBeDecomposed);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = CFURLCanBeDecomposed(_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = CFURLCanBeDecomposed(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *CFURLRefObj_CFURLCopyScheme(CFURLRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFStringRef _rv;
+ PyObject *_res = NULL;
+ CFStringRef _rv;
#ifndef CFURLCopyScheme
- PyMac_PRECHECK(CFURLCopyScheme);
+ PyMac_PRECHECK(CFURLCopyScheme);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = CFURLCopyScheme(_self->ob_itself);
- _res = Py_BuildValue("O&",
- CFStringRefObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = CFURLCopyScheme(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ CFStringRefObj_New, _rv);
+ return _res;
}
static PyObject *CFURLRefObj_CFURLCopyNetLocation(CFURLRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFStringRef _rv;
+ PyObject *_res = NULL;
+ CFStringRef _rv;
#ifndef CFURLCopyNetLocation
- PyMac_PRECHECK(CFURLCopyNetLocation);
+ PyMac_PRECHECK(CFURLCopyNetLocation);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = CFURLCopyNetLocation(_self->ob_itself);
- _res = Py_BuildValue("O&",
- CFStringRefObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = CFURLCopyNetLocation(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ CFStringRefObj_New, _rv);
+ return _res;
}
static PyObject *CFURLRefObj_CFURLCopyPath(CFURLRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFStringRef _rv;
+ PyObject *_res = NULL;
+ CFStringRef _rv;
#ifndef CFURLCopyPath
- PyMac_PRECHECK(CFURLCopyPath);
+ PyMac_PRECHECK(CFURLCopyPath);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = CFURLCopyPath(_self->ob_itself);
- _res = Py_BuildValue("O&",
- CFStringRefObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = CFURLCopyPath(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ CFStringRefObj_New, _rv);
+ return _res;
}
static PyObject *CFURLRefObj_CFURLCopyStrictPath(CFURLRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFStringRef _rv;
- Boolean isAbsolute;
+ PyObject *_res = NULL;
+ CFStringRef _rv;
+ Boolean isAbsolute;
#ifndef CFURLCopyStrictPath
- PyMac_PRECHECK(CFURLCopyStrictPath);
+ PyMac_PRECHECK(CFURLCopyStrictPath);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = CFURLCopyStrictPath(_self->ob_itself,
- &isAbsolute);
- _res = Py_BuildValue("O&l",
- CFStringRefObj_New, _rv,
- isAbsolute);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = CFURLCopyStrictPath(_self->ob_itself,
+ &isAbsolute);
+ _res = Py_BuildValue("O&l",
+ CFStringRefObj_New, _rv,
+ isAbsolute);
+ return _res;
}
static PyObject *CFURLRefObj_CFURLCopyFileSystemPath(CFURLRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFStringRef _rv;
- CFURLPathStyle pathStyle;
+ PyObject *_res = NULL;
+ CFStringRef _rv;
+ CFURLPathStyle pathStyle;
#ifndef CFURLCopyFileSystemPath
- PyMac_PRECHECK(CFURLCopyFileSystemPath);
+ PyMac_PRECHECK(CFURLCopyFileSystemPath);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &pathStyle))
- return NULL;
- _rv = CFURLCopyFileSystemPath(_self->ob_itself,
- pathStyle);
- _res = Py_BuildValue("O&",
- CFStringRefObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &pathStyle))
+ return NULL;
+ _rv = CFURLCopyFileSystemPath(_self->ob_itself,
+ pathStyle);
+ _res = Py_BuildValue("O&",
+ CFStringRefObj_New, _rv);
+ return _res;
}
static PyObject *CFURLRefObj_CFURLHasDirectoryPath(CFURLRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
+ PyObject *_res = NULL;
+ Boolean _rv;
#ifndef CFURLHasDirectoryPath
- PyMac_PRECHECK(CFURLHasDirectoryPath);
+ PyMac_PRECHECK(CFURLHasDirectoryPath);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = CFURLHasDirectoryPath(_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = CFURLHasDirectoryPath(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *CFURLRefObj_CFURLCopyResourceSpecifier(CFURLRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFStringRef _rv;
+ PyObject *_res = NULL;
+ CFStringRef _rv;
#ifndef CFURLCopyResourceSpecifier
- PyMac_PRECHECK(CFURLCopyResourceSpecifier);
+ PyMac_PRECHECK(CFURLCopyResourceSpecifier);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = CFURLCopyResourceSpecifier(_self->ob_itself);
- _res = Py_BuildValue("O&",
- CFStringRefObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = CFURLCopyResourceSpecifier(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ CFStringRefObj_New, _rv);
+ return _res;
}
static PyObject *CFURLRefObj_CFURLCopyHostName(CFURLRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFStringRef _rv;
+ PyObject *_res = NULL;
+ CFStringRef _rv;
#ifndef CFURLCopyHostName
- PyMac_PRECHECK(CFURLCopyHostName);
+ PyMac_PRECHECK(CFURLCopyHostName);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = CFURLCopyHostName(_self->ob_itself);
- _res = Py_BuildValue("O&",
- CFStringRefObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = CFURLCopyHostName(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ CFStringRefObj_New, _rv);
+ return _res;
}
static PyObject *CFURLRefObj_CFURLGetPortNumber(CFURLRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- SInt32 _rv;
+ PyObject *_res = NULL;
+ SInt32 _rv;
#ifndef CFURLGetPortNumber
- PyMac_PRECHECK(CFURLGetPortNumber);
+ PyMac_PRECHECK(CFURLGetPortNumber);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = CFURLGetPortNumber(_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = CFURLGetPortNumber(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *CFURLRefObj_CFURLCopyUserName(CFURLRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFStringRef _rv;
+ PyObject *_res = NULL;
+ CFStringRef _rv;
#ifndef CFURLCopyUserName
- PyMac_PRECHECK(CFURLCopyUserName);
+ PyMac_PRECHECK(CFURLCopyUserName);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = CFURLCopyUserName(_self->ob_itself);
- _res = Py_BuildValue("O&",
- CFStringRefObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = CFURLCopyUserName(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ CFStringRefObj_New, _rv);
+ return _res;
}
static PyObject *CFURLRefObj_CFURLCopyPassword(CFURLRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFStringRef _rv;
+ PyObject *_res = NULL;
+ CFStringRef _rv;
#ifndef CFURLCopyPassword
- PyMac_PRECHECK(CFURLCopyPassword);
+ PyMac_PRECHECK(CFURLCopyPassword);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = CFURLCopyPassword(_self->ob_itself);
- _res = Py_BuildValue("O&",
- CFStringRefObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = CFURLCopyPassword(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ CFStringRefObj_New, _rv);
+ return _res;
}
static PyObject *CFURLRefObj_CFURLCopyParameterString(CFURLRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFStringRef _rv;
- CFStringRef charactersToLeaveEscaped;
+ PyObject *_res = NULL;
+ CFStringRef _rv;
+ CFStringRef charactersToLeaveEscaped;
#ifndef CFURLCopyParameterString
- PyMac_PRECHECK(CFURLCopyParameterString);
+ PyMac_PRECHECK(CFURLCopyParameterString);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CFStringRefObj_Convert, &charactersToLeaveEscaped))
- return NULL;
- _rv = CFURLCopyParameterString(_self->ob_itself,
- charactersToLeaveEscaped);
- _res = Py_BuildValue("O&",
- CFStringRefObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CFStringRefObj_Convert, &charactersToLeaveEscaped))
+ return NULL;
+ _rv = CFURLCopyParameterString(_self->ob_itself,
+ charactersToLeaveEscaped);
+ _res = Py_BuildValue("O&",
+ CFStringRefObj_New, _rv);
+ return _res;
}
static PyObject *CFURLRefObj_CFURLCopyQueryString(CFURLRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFStringRef _rv;
- CFStringRef charactersToLeaveEscaped;
+ PyObject *_res = NULL;
+ CFStringRef _rv;
+ CFStringRef charactersToLeaveEscaped;
#ifndef CFURLCopyQueryString
- PyMac_PRECHECK(CFURLCopyQueryString);
+ PyMac_PRECHECK(CFURLCopyQueryString);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CFStringRefObj_Convert, &charactersToLeaveEscaped))
- return NULL;
- _rv = CFURLCopyQueryString(_self->ob_itself,
- charactersToLeaveEscaped);
- _res = Py_BuildValue("O&",
- CFStringRefObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CFStringRefObj_Convert, &charactersToLeaveEscaped))
+ return NULL;
+ _rv = CFURLCopyQueryString(_self->ob_itself,
+ charactersToLeaveEscaped);
+ _res = Py_BuildValue("O&",
+ CFStringRefObj_New, _rv);
+ return _res;
}
static PyObject *CFURLRefObj_CFURLCopyFragment(CFURLRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFStringRef _rv;
- CFStringRef charactersToLeaveEscaped;
+ PyObject *_res = NULL;
+ CFStringRef _rv;
+ CFStringRef charactersToLeaveEscaped;
#ifndef CFURLCopyFragment
- PyMac_PRECHECK(CFURLCopyFragment);
+ PyMac_PRECHECK(CFURLCopyFragment);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CFStringRefObj_Convert, &charactersToLeaveEscaped))
- return NULL;
- _rv = CFURLCopyFragment(_self->ob_itself,
- charactersToLeaveEscaped);
- _res = Py_BuildValue("O&",
- CFStringRefObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CFStringRefObj_Convert, &charactersToLeaveEscaped))
+ return NULL;
+ _rv = CFURLCopyFragment(_self->ob_itself,
+ charactersToLeaveEscaped);
+ _res = Py_BuildValue("O&",
+ CFStringRefObj_New, _rv);
+ return _res;
}
static PyObject *CFURLRefObj_CFURLCopyLastPathComponent(CFURLRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFStringRef _rv;
+ PyObject *_res = NULL;
+ CFStringRef _rv;
#ifndef CFURLCopyLastPathComponent
- PyMac_PRECHECK(CFURLCopyLastPathComponent);
+ PyMac_PRECHECK(CFURLCopyLastPathComponent);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = CFURLCopyLastPathComponent(_self->ob_itself);
- _res = Py_BuildValue("O&",
- CFStringRefObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = CFURLCopyLastPathComponent(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ CFStringRefObj_New, _rv);
+ return _res;
}
static PyObject *CFURLRefObj_CFURLCopyPathExtension(CFURLRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFStringRef _rv;
+ PyObject *_res = NULL;
+ CFStringRef _rv;
#ifndef CFURLCopyPathExtension
- PyMac_PRECHECK(CFURLCopyPathExtension);
+ PyMac_PRECHECK(CFURLCopyPathExtension);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = CFURLCopyPathExtension(_self->ob_itself);
- _res = Py_BuildValue("O&",
- CFStringRefObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = CFURLCopyPathExtension(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ CFStringRefObj_New, _rv);
+ return _res;
}
static PyObject *CFURLRefObj_CFURLCreateCopyAppendingPathComponent(CFURLRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFURLRef _rv;
- CFStringRef pathComponent;
- Boolean isDirectory;
- if (!PyArg_ParseTuple(_args, "O&l",
- CFStringRefObj_Convert, &pathComponent,
- &isDirectory))
- return NULL;
- _rv = CFURLCreateCopyAppendingPathComponent((CFAllocatorRef)NULL,
- _self->ob_itself,
- pathComponent,
- isDirectory);
- _res = Py_BuildValue("O&",
- CFURLRefObj_New, _rv);
- return _res;
+ PyObject *_res = NULL;
+ CFURLRef _rv;
+ CFStringRef pathComponent;
+ Boolean isDirectory;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CFStringRefObj_Convert, &pathComponent,
+ &isDirectory))
+ return NULL;
+ _rv = CFURLCreateCopyAppendingPathComponent((CFAllocatorRef)NULL,
+ _self->ob_itself,
+ pathComponent,
+ isDirectory);
+ _res = Py_BuildValue("O&",
+ CFURLRefObj_New, _rv);
+ return _res;
}
static PyObject *CFURLRefObj_CFURLCreateCopyDeletingLastPathComponent(CFURLRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFURLRef _rv;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = CFURLCreateCopyDeletingLastPathComponent((CFAllocatorRef)NULL,
- _self->ob_itself);
- _res = Py_BuildValue("O&",
- CFURLRefObj_New, _rv);
- return _res;
+ PyObject *_res = NULL;
+ CFURLRef _rv;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = CFURLCreateCopyDeletingLastPathComponent((CFAllocatorRef)NULL,
+ _self->ob_itself);
+ _res = Py_BuildValue("O&",
+ CFURLRefObj_New, _rv);
+ return _res;
}
static PyObject *CFURLRefObj_CFURLCreateCopyAppendingPathExtension(CFURLRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFURLRef _rv;
- CFStringRef extension;
- if (!PyArg_ParseTuple(_args, "O&",
- CFStringRefObj_Convert, &extension))
- return NULL;
- _rv = CFURLCreateCopyAppendingPathExtension((CFAllocatorRef)NULL,
- _self->ob_itself,
- extension);
- _res = Py_BuildValue("O&",
- CFURLRefObj_New, _rv);
- return _res;
+ PyObject *_res = NULL;
+ CFURLRef _rv;
+ CFStringRef extension;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CFStringRefObj_Convert, &extension))
+ return NULL;
+ _rv = CFURLCreateCopyAppendingPathExtension((CFAllocatorRef)NULL,
+ _self->ob_itself,
+ extension);
+ _res = Py_BuildValue("O&",
+ CFURLRefObj_New, _rv);
+ return _res;
}
static PyObject *CFURLRefObj_CFURLCreateCopyDeletingPathExtension(CFURLRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFURLRef _rv;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = CFURLCreateCopyDeletingPathExtension((CFAllocatorRef)NULL,
- _self->ob_itself);
- _res = Py_BuildValue("O&",
- CFURLRefObj_New, _rv);
- return _res;
+ PyObject *_res = NULL;
+ CFURLRef _rv;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = CFURLCreateCopyDeletingPathExtension((CFAllocatorRef)NULL,
+ _self->ob_itself);
+ _res = Py_BuildValue("O&",
+ CFURLRefObj_New, _rv);
+ return _res;
}
static PyObject *CFURLRefObj_CFURLGetFSRef(CFURLRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- FSRef fsRef;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ FSRef fsRef;
#ifndef CFURLGetFSRef
- PyMac_PRECHECK(CFURLGetFSRef);
+ PyMac_PRECHECK(CFURLGetFSRef);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = CFURLGetFSRef(_self->ob_itself,
- &fsRef);
- _res = Py_BuildValue("lO&",
- _rv,
- PyMac_BuildFSRef, &fsRef);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = CFURLGetFSRef(_self->ob_itself,
+ &fsRef);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ PyMac_BuildFSRef, &fsRef);
+ return _res;
}
static PyMethodDef CFURLRefObj_methods[] = {
- {"CFURLCreateData", (PyCFunction)CFURLRefObj_CFURLCreateData, 1,
- PyDoc_STR("(CFStringEncoding encoding, Boolean escapeWhitespace) -> (CFDataRef _rv)")},
- {"CFURLGetFileSystemRepresentation", (PyCFunction)CFURLRefObj_CFURLGetFileSystemRepresentation, 1,
- PyDoc_STR("(Boolean resolveAgainstBase, CFIndex maxBufLen) -> (Boolean _rv, UInt8 buffer)")},
- {"CFURLCopyAbsoluteURL", (PyCFunction)CFURLRefObj_CFURLCopyAbsoluteURL, 1,
- PyDoc_STR("() -> (CFURLRef _rv)")},
- {"CFURLGetString", (PyCFunction)CFURLRefObj_CFURLGetString, 1,
- PyDoc_STR("() -> (CFStringRef _rv)")},
- {"CFURLGetBaseURL", (PyCFunction)CFURLRefObj_CFURLGetBaseURL, 1,
- PyDoc_STR("() -> (CFURLRef _rv)")},
- {"CFURLCanBeDecomposed", (PyCFunction)CFURLRefObj_CFURLCanBeDecomposed, 1,
- PyDoc_STR("() -> (Boolean _rv)")},
- {"CFURLCopyScheme", (PyCFunction)CFURLRefObj_CFURLCopyScheme, 1,
- PyDoc_STR("() -> (CFStringRef _rv)")},
- {"CFURLCopyNetLocation", (PyCFunction)CFURLRefObj_CFURLCopyNetLocation, 1,
- PyDoc_STR("() -> (CFStringRef _rv)")},
- {"CFURLCopyPath", (PyCFunction)CFURLRefObj_CFURLCopyPath, 1,
- PyDoc_STR("() -> (CFStringRef _rv)")},
- {"CFURLCopyStrictPath", (PyCFunction)CFURLRefObj_CFURLCopyStrictPath, 1,
- PyDoc_STR("() -> (CFStringRef _rv, Boolean isAbsolute)")},
- {"CFURLCopyFileSystemPath", (PyCFunction)CFURLRefObj_CFURLCopyFileSystemPath, 1,
- PyDoc_STR("(CFURLPathStyle pathStyle) -> (CFStringRef _rv)")},
- {"CFURLHasDirectoryPath", (PyCFunction)CFURLRefObj_CFURLHasDirectoryPath, 1,
- PyDoc_STR("() -> (Boolean _rv)")},
- {"CFURLCopyResourceSpecifier", (PyCFunction)CFURLRefObj_CFURLCopyResourceSpecifier, 1,
- PyDoc_STR("() -> (CFStringRef _rv)")},
- {"CFURLCopyHostName", (PyCFunction)CFURLRefObj_CFURLCopyHostName, 1,
- PyDoc_STR("() -> (CFStringRef _rv)")},
- {"CFURLGetPortNumber", (PyCFunction)CFURLRefObj_CFURLGetPortNumber, 1,
- PyDoc_STR("() -> (SInt32 _rv)")},
- {"CFURLCopyUserName", (PyCFunction)CFURLRefObj_CFURLCopyUserName, 1,
- PyDoc_STR("() -> (CFStringRef _rv)")},
- {"CFURLCopyPassword", (PyCFunction)CFURLRefObj_CFURLCopyPassword, 1,
- PyDoc_STR("() -> (CFStringRef _rv)")},
- {"CFURLCopyParameterString", (PyCFunction)CFURLRefObj_CFURLCopyParameterString, 1,
- PyDoc_STR("(CFStringRef charactersToLeaveEscaped) -> (CFStringRef _rv)")},
- {"CFURLCopyQueryString", (PyCFunction)CFURLRefObj_CFURLCopyQueryString, 1,
- PyDoc_STR("(CFStringRef charactersToLeaveEscaped) -> (CFStringRef _rv)")},
- {"CFURLCopyFragment", (PyCFunction)CFURLRefObj_CFURLCopyFragment, 1,
- PyDoc_STR("(CFStringRef charactersToLeaveEscaped) -> (CFStringRef _rv)")},
- {"CFURLCopyLastPathComponent", (PyCFunction)CFURLRefObj_CFURLCopyLastPathComponent, 1,
- PyDoc_STR("() -> (CFStringRef _rv)")},
- {"CFURLCopyPathExtension", (PyCFunction)CFURLRefObj_CFURLCopyPathExtension, 1,
- PyDoc_STR("() -> (CFStringRef _rv)")},
- {"CFURLCreateCopyAppendingPathComponent", (PyCFunction)CFURLRefObj_CFURLCreateCopyAppendingPathComponent, 1,
- PyDoc_STR("(CFStringRef pathComponent, Boolean isDirectory) -> (CFURLRef _rv)")},
- {"CFURLCreateCopyDeletingLastPathComponent", (PyCFunction)CFURLRefObj_CFURLCreateCopyDeletingLastPathComponent, 1,
- PyDoc_STR("() -> (CFURLRef _rv)")},
- {"CFURLCreateCopyAppendingPathExtension", (PyCFunction)CFURLRefObj_CFURLCreateCopyAppendingPathExtension, 1,
- PyDoc_STR("(CFStringRef extension) -> (CFURLRef _rv)")},
- {"CFURLCreateCopyDeletingPathExtension", (PyCFunction)CFURLRefObj_CFURLCreateCopyDeletingPathExtension, 1,
- PyDoc_STR("() -> (CFURLRef _rv)")},
- {"CFURLGetFSRef", (PyCFunction)CFURLRefObj_CFURLGetFSRef, 1,
- PyDoc_STR("() -> (Boolean _rv, FSRef fsRef)")},
- {NULL, NULL, 0}
+ {"CFURLCreateData", (PyCFunction)CFURLRefObj_CFURLCreateData, 1,
+ PyDoc_STR("(CFStringEncoding encoding, Boolean escapeWhitespace) -> (CFDataRef _rv)")},
+ {"CFURLGetFileSystemRepresentation", (PyCFunction)CFURLRefObj_CFURLGetFileSystemRepresentation, 1,
+ PyDoc_STR("(Boolean resolveAgainstBase, CFIndex maxBufLen) -> (Boolean _rv, UInt8 buffer)")},
+ {"CFURLCopyAbsoluteURL", (PyCFunction)CFURLRefObj_CFURLCopyAbsoluteURL, 1,
+ PyDoc_STR("() -> (CFURLRef _rv)")},
+ {"CFURLGetString", (PyCFunction)CFURLRefObj_CFURLGetString, 1,
+ PyDoc_STR("() -> (CFStringRef _rv)")},
+ {"CFURLGetBaseURL", (PyCFunction)CFURLRefObj_CFURLGetBaseURL, 1,
+ PyDoc_STR("() -> (CFURLRef _rv)")},
+ {"CFURLCanBeDecomposed", (PyCFunction)CFURLRefObj_CFURLCanBeDecomposed, 1,
+ PyDoc_STR("() -> (Boolean _rv)")},
+ {"CFURLCopyScheme", (PyCFunction)CFURLRefObj_CFURLCopyScheme, 1,
+ PyDoc_STR("() -> (CFStringRef _rv)")},
+ {"CFURLCopyNetLocation", (PyCFunction)CFURLRefObj_CFURLCopyNetLocation, 1,
+ PyDoc_STR("() -> (CFStringRef _rv)")},
+ {"CFURLCopyPath", (PyCFunction)CFURLRefObj_CFURLCopyPath, 1,
+ PyDoc_STR("() -> (CFStringRef _rv)")},
+ {"CFURLCopyStrictPath", (PyCFunction)CFURLRefObj_CFURLCopyStrictPath, 1,
+ PyDoc_STR("() -> (CFStringRef _rv, Boolean isAbsolute)")},
+ {"CFURLCopyFileSystemPath", (PyCFunction)CFURLRefObj_CFURLCopyFileSystemPath, 1,
+ PyDoc_STR("(CFURLPathStyle pathStyle) -> (CFStringRef _rv)")},
+ {"CFURLHasDirectoryPath", (PyCFunction)CFURLRefObj_CFURLHasDirectoryPath, 1,
+ PyDoc_STR("() -> (Boolean _rv)")},
+ {"CFURLCopyResourceSpecifier", (PyCFunction)CFURLRefObj_CFURLCopyResourceSpecifier, 1,
+ PyDoc_STR("() -> (CFStringRef _rv)")},
+ {"CFURLCopyHostName", (PyCFunction)CFURLRefObj_CFURLCopyHostName, 1,
+ PyDoc_STR("() -> (CFStringRef _rv)")},
+ {"CFURLGetPortNumber", (PyCFunction)CFURLRefObj_CFURLGetPortNumber, 1,
+ PyDoc_STR("() -> (SInt32 _rv)")},
+ {"CFURLCopyUserName", (PyCFunction)CFURLRefObj_CFURLCopyUserName, 1,
+ PyDoc_STR("() -> (CFStringRef _rv)")},
+ {"CFURLCopyPassword", (PyCFunction)CFURLRefObj_CFURLCopyPassword, 1,
+ PyDoc_STR("() -> (CFStringRef _rv)")},
+ {"CFURLCopyParameterString", (PyCFunction)CFURLRefObj_CFURLCopyParameterString, 1,
+ PyDoc_STR("(CFStringRef charactersToLeaveEscaped) -> (CFStringRef _rv)")},
+ {"CFURLCopyQueryString", (PyCFunction)CFURLRefObj_CFURLCopyQueryString, 1,
+ PyDoc_STR("(CFStringRef charactersToLeaveEscaped) -> (CFStringRef _rv)")},
+ {"CFURLCopyFragment", (PyCFunction)CFURLRefObj_CFURLCopyFragment, 1,
+ PyDoc_STR("(CFStringRef charactersToLeaveEscaped) -> (CFStringRef _rv)")},
+ {"CFURLCopyLastPathComponent", (PyCFunction)CFURLRefObj_CFURLCopyLastPathComponent, 1,
+ PyDoc_STR("() -> (CFStringRef _rv)")},
+ {"CFURLCopyPathExtension", (PyCFunction)CFURLRefObj_CFURLCopyPathExtension, 1,
+ PyDoc_STR("() -> (CFStringRef _rv)")},
+ {"CFURLCreateCopyAppendingPathComponent", (PyCFunction)CFURLRefObj_CFURLCreateCopyAppendingPathComponent, 1,
+ PyDoc_STR("(CFStringRef pathComponent, Boolean isDirectory) -> (CFURLRef _rv)")},
+ {"CFURLCreateCopyDeletingLastPathComponent", (PyCFunction)CFURLRefObj_CFURLCreateCopyDeletingLastPathComponent, 1,
+ PyDoc_STR("() -> (CFURLRef _rv)")},
+ {"CFURLCreateCopyAppendingPathExtension", (PyCFunction)CFURLRefObj_CFURLCreateCopyAppendingPathExtension, 1,
+ PyDoc_STR("(CFStringRef extension) -> (CFURLRef _rv)")},
+ {"CFURLCreateCopyDeletingPathExtension", (PyCFunction)CFURLRefObj_CFURLCreateCopyDeletingPathExtension, 1,
+ PyDoc_STR("() -> (CFURLRef _rv)")},
+ {"CFURLGetFSRef", (PyCFunction)CFURLRefObj_CFURLGetFSRef, 1,
+ PyDoc_STR("() -> (Boolean _rv, FSRef fsRef)")},
+ {NULL, NULL, 0}
};
#define CFURLRefObj_getsetlist NULL
@@ -3475,100 +3475,100 @@ static PyMethodDef CFURLRefObj_methods[] = {
static int CFURLRefObj_compare(CFURLRefObject *self, CFURLRefObject *other)
{
- /* XXXX Or should we use CFEqual?? */
- if ( self->ob_itself > other->ob_itself ) return 1;
- if ( self->ob_itself < other->ob_itself ) return -1;
- return 0;
+ /* XXXX Or should we use CFEqual?? */
+ if ( self->ob_itself > other->ob_itself ) return 1;
+ if ( self->ob_itself < other->ob_itself ) return -1;
+ return 0;
}
static PyObject * CFURLRefObj_repr(CFURLRefObject *self)
{
- char buf[100];
- sprintf(buf, "<CFURL object at 0x%8.8x for 0x%8.8x>", (unsigned)self, (unsigned)self->ob_itself);
- return PyString_FromString(buf);
+ char buf[100];
+ sprintf(buf, "<CFURL object at 0x%8.8x for 0x%8.8x>", (unsigned)self, (unsigned)self->ob_itself);
+ return PyString_FromString(buf);
}
static int CFURLRefObj_hash(CFURLRefObject *self)
{
- /* XXXX Or should we use CFHash?? */
- return (int)self->ob_itself;
+ /* XXXX Or should we use CFHash?? */
+ return (int)self->ob_itself;
}
static int CFURLRefObj_tp_init(PyObject *_self, PyObject *_args, PyObject *_kwds)
{
- CFURLRef itself;
- char *kw[] = {"itself", 0};
+ CFURLRef itself;
+ char *kw[] = {"itself", 0};
- if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFURLRefObj_Convert, &itself))
- {
- ((CFURLRefObject *)_self)->ob_itself = itself;
- return 0;
- }
+ if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFURLRefObj_Convert, &itself))
+ {
+ ((CFURLRefObject *)_self)->ob_itself = itself;
+ return 0;
+ }
- /* Any CFTypeRef descendent is allowed as initializer too */
- if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFTypeRefObj_Convert, &itself))
- {
- ((CFURLRefObject *)_self)->ob_itself = itself;
- return 0;
- }
- return -1;
+ /* Any CFTypeRef descendent is allowed as initializer too */
+ if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, CFTypeRefObj_Convert, &itself))
+ {
+ ((CFURLRefObject *)_self)->ob_itself = itself;
+ return 0;
+ }
+ return -1;
}
#define CFURLRefObj_tp_alloc PyType_GenericAlloc
static PyObject *CFURLRefObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
- PyObject *self;
- if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
- ((CFURLRefObject *)self)->ob_itself = NULL;
- ((CFURLRefObject *)self)->ob_freeit = CFRelease;
- return self;
+ PyObject *self;
+ if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
+ ((CFURLRefObject *)self)->ob_itself = NULL;
+ ((CFURLRefObject *)self)->ob_freeit = CFRelease;
+ return self;
}
#define CFURLRefObj_tp_free PyObject_Del
PyTypeObject CFURLRef_Type = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
- "_CF.CFURLRef", /*tp_name*/
- sizeof(CFURLRefObject), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- /* methods */
- (destructor) CFURLRefObj_dealloc, /*tp_dealloc*/
- 0, /*tp_print*/
- (getattrfunc)0, /*tp_getattr*/
- (setattrfunc)0, /*tp_setattr*/
- (cmpfunc) CFURLRefObj_compare, /*tp_compare*/
- (reprfunc) CFURLRefObj_repr, /*tp_repr*/
- (PyNumberMethods *)0, /* tp_as_number */
- (PySequenceMethods *)0, /* tp_as_sequence */
- (PyMappingMethods *)0, /* tp_as_mapping */
- (hashfunc) CFURLRefObj_hash, /*tp_hash*/
- 0, /*tp_call*/
- 0, /*tp_str*/
- PyObject_GenericGetAttr, /*tp_getattro*/
- PyObject_GenericSetAttr, /*tp_setattro */
- 0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
- 0, /*tp_doc*/
- 0, /*tp_traverse*/
- 0, /*tp_clear*/
- 0, /*tp_richcompare*/
- 0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
- 0, /*tp_iternext*/
- CFURLRefObj_methods, /* tp_methods */
- 0, /*tp_members*/
- CFURLRefObj_getsetlist, /*tp_getset*/
- 0, /*tp_base*/
- 0, /*tp_dict*/
- 0, /*tp_descr_get*/
- 0, /*tp_descr_set*/
- 0, /*tp_dictoffset*/
- CFURLRefObj_tp_init, /* tp_init */
- CFURLRefObj_tp_alloc, /* tp_alloc */
- CFURLRefObj_tp_new, /* tp_new */
- CFURLRefObj_tp_free, /* tp_free */
+ PyObject_HEAD_INIT(NULL)
+ 0, /*ob_size*/
+ "_CF.CFURLRef", /*tp_name*/
+ sizeof(CFURLRefObject), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ /* methods */
+ (destructor) CFURLRefObj_dealloc, /*tp_dealloc*/
+ 0, /*tp_print*/
+ (getattrfunc)0, /*tp_getattr*/
+ (setattrfunc)0, /*tp_setattr*/
+ (cmpfunc) CFURLRefObj_compare, /*tp_compare*/
+ (reprfunc) CFURLRefObj_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) CFURLRefObj_hash, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ PyObject_GenericGetAttr, /*tp_getattro*/
+ PyObject_GenericSetAttr, /*tp_setattro */
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
+ 0, /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ CFURLRefObj_methods, /* tp_methods */
+ 0, /*tp_members*/
+ CFURLRefObj_getsetlist, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ CFURLRefObj_tp_init, /* tp_init */
+ CFURLRefObj_tp_alloc, /* tp_alloc */
+ CFURLRefObj_tp_new, /* tp_new */
+ CFURLRefObj_tp_free, /* tp_free */
};
/* -------------------- End object type CFURLRef -------------------- */
@@ -3576,1250 +3576,1250 @@ PyTypeObject CFURLRef_Type = {
static PyObject *CF___CFRangeMake(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFRange _rv;
- CFIndex loc;
- CFIndex len;
+ PyObject *_res = NULL;
+ CFRange _rv;
+ CFIndex loc;
+ CFIndex len;
#ifndef __CFRangeMake
- PyMac_PRECHECK(__CFRangeMake);
+ PyMac_PRECHECK(__CFRangeMake);
#endif
- if (!PyArg_ParseTuple(_args, "ll",
- &loc,
- &len))
- return NULL;
- _rv = __CFRangeMake(loc,
- len);
- _res = Py_BuildValue("O&",
- CFRange_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "ll",
+ &loc,
+ &len))
+ return NULL;
+ _rv = __CFRangeMake(loc,
+ len);
+ _res = Py_BuildValue("O&",
+ CFRange_New, _rv);
+ return _res;
}
static PyObject *CF_CFAllocatorGetTypeID(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFTypeID _rv;
+ PyObject *_res = NULL;
+ CFTypeID _rv;
#ifndef CFAllocatorGetTypeID
- PyMac_PRECHECK(CFAllocatorGetTypeID);
+ PyMac_PRECHECK(CFAllocatorGetTypeID);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = CFAllocatorGetTypeID();
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = CFAllocatorGetTypeID();
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *CF_CFAllocatorGetPreferredSizeForSize(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFIndex _rv;
- CFIndex size;
- CFOptionFlags hint;
+ PyObject *_res = NULL;
+ CFIndex _rv;
+ CFIndex size;
+ CFOptionFlags hint;
#ifndef CFAllocatorGetPreferredSizeForSize
- PyMac_PRECHECK(CFAllocatorGetPreferredSizeForSize);
+ PyMac_PRECHECK(CFAllocatorGetPreferredSizeForSize);
#endif
- if (!PyArg_ParseTuple(_args, "ll",
- &size,
- &hint))
- return NULL;
- _rv = CFAllocatorGetPreferredSizeForSize((CFAllocatorRef)NULL,
- size,
- hint);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "ll",
+ &size,
+ &hint))
+ return NULL;
+ _rv = CFAllocatorGetPreferredSizeForSize((CFAllocatorRef)NULL,
+ size,
+ hint);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *CF_CFCopyTypeIDDescription(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFStringRef _rv;
- CFTypeID type_id;
+ PyObject *_res = NULL;
+ CFStringRef _rv;
+ CFTypeID type_id;
#ifndef CFCopyTypeIDDescription
- PyMac_PRECHECK(CFCopyTypeIDDescription);
+ PyMac_PRECHECK(CFCopyTypeIDDescription);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &type_id))
- return NULL;
- _rv = CFCopyTypeIDDescription(type_id);
- _res = Py_BuildValue("O&",
- CFStringRefObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &type_id))
+ return NULL;
+ _rv = CFCopyTypeIDDescription(type_id);
+ _res = Py_BuildValue("O&",
+ CFStringRefObj_New, _rv);
+ return _res;
}
static PyObject *CF_CFArrayGetTypeID(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFTypeID _rv;
+ PyObject *_res = NULL;
+ CFTypeID _rv;
#ifndef CFArrayGetTypeID
- PyMac_PRECHECK(CFArrayGetTypeID);
+ PyMac_PRECHECK(CFArrayGetTypeID);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = CFArrayGetTypeID();
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = CFArrayGetTypeID();
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *CF_CFArrayCreateMutable(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFMutableArrayRef _rv;
- CFIndex capacity;
+ PyObject *_res = NULL;
+ CFMutableArrayRef _rv;
+ CFIndex capacity;
#ifndef CFArrayCreateMutable
- PyMac_PRECHECK(CFArrayCreateMutable);
+ PyMac_PRECHECK(CFArrayCreateMutable);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &capacity))
- return NULL;
- _rv = CFArrayCreateMutable((CFAllocatorRef)NULL,
- capacity,
- &kCFTypeArrayCallBacks);
- _res = Py_BuildValue("O&",
- CFMutableArrayRefObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &capacity))
+ return NULL;
+ _rv = CFArrayCreateMutable((CFAllocatorRef)NULL,
+ capacity,
+ &kCFTypeArrayCallBacks);
+ _res = Py_BuildValue("O&",
+ CFMutableArrayRefObj_New, _rv);
+ return _res;
}
static PyObject *CF_CFArrayCreateMutableCopy(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFMutableArrayRef _rv;
- CFIndex capacity;
- CFArrayRef theArray;
+ PyObject *_res = NULL;
+ CFMutableArrayRef _rv;
+ CFIndex capacity;
+ CFArrayRef theArray;
#ifndef CFArrayCreateMutableCopy
- PyMac_PRECHECK(CFArrayCreateMutableCopy);
+ PyMac_PRECHECK(CFArrayCreateMutableCopy);
#endif
- if (!PyArg_ParseTuple(_args, "lO&",
- &capacity,
- CFArrayRefObj_Convert, &theArray))
- return NULL;
- _rv = CFArrayCreateMutableCopy((CFAllocatorRef)NULL,
- capacity,
- theArray);
- _res = Py_BuildValue("O&",
- CFMutableArrayRefObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "lO&",
+ &capacity,
+ CFArrayRefObj_Convert, &theArray))
+ return NULL;
+ _rv = CFArrayCreateMutableCopy((CFAllocatorRef)NULL,
+ capacity,
+ theArray);
+ _res = Py_BuildValue("O&",
+ CFMutableArrayRefObj_New, _rv);
+ return _res;
}
static PyObject *CF_CFDataGetTypeID(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFTypeID _rv;
+ PyObject *_res = NULL;
+ CFTypeID _rv;
#ifndef CFDataGetTypeID
- PyMac_PRECHECK(CFDataGetTypeID);
+ PyMac_PRECHECK(CFDataGetTypeID);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = CFDataGetTypeID();
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = CFDataGetTypeID();
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *CF_CFDataCreate(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFDataRef _rv;
- unsigned char *bytes__in__;
- long bytes__len__;
- int bytes__in_len__;
+ PyObject *_res = NULL;
+ CFDataRef _rv;
+ unsigned char *bytes__in__;
+ long bytes__len__;
+ int bytes__in_len__;
#ifndef CFDataCreate
- PyMac_PRECHECK(CFDataCreate);
+ PyMac_PRECHECK(CFDataCreate);
#endif
- if (!PyArg_ParseTuple(_args, "s#",
- &bytes__in__, &bytes__in_len__))
- return NULL;
- bytes__len__ = bytes__in_len__;
- _rv = CFDataCreate((CFAllocatorRef)NULL,
- bytes__in__, bytes__len__);
- _res = Py_BuildValue("O&",
- CFDataRefObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "s#",
+ &bytes__in__, &bytes__in_len__))
+ return NULL;
+ bytes__len__ = bytes__in_len__;
+ _rv = CFDataCreate((CFAllocatorRef)NULL,
+ bytes__in__, bytes__len__);
+ _res = Py_BuildValue("O&",
+ CFDataRefObj_New, _rv);
+ return _res;
}
static PyObject *CF_CFDataCreateWithBytesNoCopy(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFDataRef _rv;
- unsigned char *bytes__in__;
- long bytes__len__;
- int bytes__in_len__;
+ PyObject *_res = NULL;
+ CFDataRef _rv;
+ unsigned char *bytes__in__;
+ long bytes__len__;
+ int bytes__in_len__;
#ifndef CFDataCreateWithBytesNoCopy
- PyMac_PRECHECK(CFDataCreateWithBytesNoCopy);
+ PyMac_PRECHECK(CFDataCreateWithBytesNoCopy);
#endif
- if (!PyArg_ParseTuple(_args, "s#",
- &bytes__in__, &bytes__in_len__))
- return NULL;
- bytes__len__ = bytes__in_len__;
- _rv = CFDataCreateWithBytesNoCopy((CFAllocatorRef)NULL,
- bytes__in__, bytes__len__,
- (CFAllocatorRef)NULL);
- _res = Py_BuildValue("O&",
- CFDataRefObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "s#",
+ &bytes__in__, &bytes__in_len__))
+ return NULL;
+ bytes__len__ = bytes__in_len__;
+ _rv = CFDataCreateWithBytesNoCopy((CFAllocatorRef)NULL,
+ bytes__in__, bytes__len__,
+ (CFAllocatorRef)NULL);
+ _res = Py_BuildValue("O&",
+ CFDataRefObj_New, _rv);
+ return _res;
}
static PyObject *CF_CFDataCreateMutable(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFMutableDataRef _rv;
- CFIndex capacity;
+ PyObject *_res = NULL;
+ CFMutableDataRef _rv;
+ CFIndex capacity;
#ifndef CFDataCreateMutable
- PyMac_PRECHECK(CFDataCreateMutable);
+ PyMac_PRECHECK(CFDataCreateMutable);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &capacity))
- return NULL;
- _rv = CFDataCreateMutable((CFAllocatorRef)NULL,
- capacity);
- _res = Py_BuildValue("O&",
- CFMutableDataRefObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &capacity))
+ return NULL;
+ _rv = CFDataCreateMutable((CFAllocatorRef)NULL,
+ capacity);
+ _res = Py_BuildValue("O&",
+ CFMutableDataRefObj_New, _rv);
+ return _res;
}
static PyObject *CF_CFDataCreateMutableCopy(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFMutableDataRef _rv;
- CFIndex capacity;
- CFDataRef theData;
+ PyObject *_res = NULL;
+ CFMutableDataRef _rv;
+ CFIndex capacity;
+ CFDataRef theData;
#ifndef CFDataCreateMutableCopy
- PyMac_PRECHECK(CFDataCreateMutableCopy);
+ PyMac_PRECHECK(CFDataCreateMutableCopy);
#endif
- if (!PyArg_ParseTuple(_args, "lO&",
- &capacity,
- CFDataRefObj_Convert, &theData))
- return NULL;
- _rv = CFDataCreateMutableCopy((CFAllocatorRef)NULL,
- capacity,
- theData);
- _res = Py_BuildValue("O&",
- CFMutableDataRefObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "lO&",
+ &capacity,
+ CFDataRefObj_Convert, &theData))
+ return NULL;
+ _rv = CFDataCreateMutableCopy((CFAllocatorRef)NULL,
+ capacity,
+ theData);
+ _res = Py_BuildValue("O&",
+ CFMutableDataRefObj_New, _rv);
+ return _res;
}
static PyObject *CF_CFDictionaryGetTypeID(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFTypeID _rv;
+ PyObject *_res = NULL;
+ CFTypeID _rv;
#ifndef CFDictionaryGetTypeID
- PyMac_PRECHECK(CFDictionaryGetTypeID);
+ PyMac_PRECHECK(CFDictionaryGetTypeID);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = CFDictionaryGetTypeID();
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = CFDictionaryGetTypeID();
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *CF_CFDictionaryCreateMutable(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFMutableDictionaryRef _rv;
- CFIndex capacity;
+ PyObject *_res = NULL;
+ CFMutableDictionaryRef _rv;
+ CFIndex capacity;
#ifndef CFDictionaryCreateMutable
- PyMac_PRECHECK(CFDictionaryCreateMutable);
+ PyMac_PRECHECK(CFDictionaryCreateMutable);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &capacity))
- return NULL;
- _rv = CFDictionaryCreateMutable((CFAllocatorRef)NULL,
- capacity,
- &kCFTypeDictionaryKeyCallBacks,
- &kCFTypeDictionaryValueCallBacks);
- _res = Py_BuildValue("O&",
- CFMutableDictionaryRefObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &capacity))
+ return NULL;
+ _rv = CFDictionaryCreateMutable((CFAllocatorRef)NULL,
+ capacity,
+ &kCFTypeDictionaryKeyCallBacks,
+ &kCFTypeDictionaryValueCallBacks);
+ _res = Py_BuildValue("O&",
+ CFMutableDictionaryRefObj_New, _rv);
+ return _res;
}
static PyObject *CF_CFDictionaryCreateMutableCopy(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFMutableDictionaryRef _rv;
- CFIndex capacity;
- CFDictionaryRef theDict;
+ PyObject *_res = NULL;
+ CFMutableDictionaryRef _rv;
+ CFIndex capacity;
+ CFDictionaryRef theDict;
#ifndef CFDictionaryCreateMutableCopy
- PyMac_PRECHECK(CFDictionaryCreateMutableCopy);
+ PyMac_PRECHECK(CFDictionaryCreateMutableCopy);
#endif
- if (!PyArg_ParseTuple(_args, "lO&",
- &capacity,
- CFDictionaryRefObj_Convert, &theDict))
- return NULL;
- _rv = CFDictionaryCreateMutableCopy((CFAllocatorRef)NULL,
- capacity,
- theDict);
- _res = Py_BuildValue("O&",
- CFMutableDictionaryRefObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "lO&",
+ &capacity,
+ CFDictionaryRefObj_Convert, &theDict))
+ return NULL;
+ _rv = CFDictionaryCreateMutableCopy((CFAllocatorRef)NULL,
+ capacity,
+ theDict);
+ _res = Py_BuildValue("O&",
+ CFMutableDictionaryRefObj_New, _rv);
+ return _res;
}
static PyObject *CF_CFPreferencesCopyAppValue(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFTypeRef _rv;
- CFStringRef key;
- CFStringRef applicationID;
+ PyObject *_res = NULL;
+ CFTypeRef _rv;
+ CFStringRef key;
+ CFStringRef applicationID;
#ifndef CFPreferencesCopyAppValue
- PyMac_PRECHECK(CFPreferencesCopyAppValue);
+ PyMac_PRECHECK(CFPreferencesCopyAppValue);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CFStringRefObj_Convert, &key,
- CFStringRefObj_Convert, &applicationID))
- return NULL;
- _rv = CFPreferencesCopyAppValue(key,
- applicationID);
- _res = Py_BuildValue("O&",
- CFTypeRefObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CFStringRefObj_Convert, &key,
+ CFStringRefObj_Convert, &applicationID))
+ return NULL;
+ _rv = CFPreferencesCopyAppValue(key,
+ applicationID);
+ _res = Py_BuildValue("O&",
+ CFTypeRefObj_New, _rv);
+ return _res;
}
static PyObject *CF_CFPreferencesGetAppBooleanValue(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- CFStringRef key;
- CFStringRef applicationID;
- Boolean keyExistsAndHasValidFormat;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ CFStringRef key;
+ CFStringRef applicationID;
+ Boolean keyExistsAndHasValidFormat;
#ifndef CFPreferencesGetAppBooleanValue
- PyMac_PRECHECK(CFPreferencesGetAppBooleanValue);
+ PyMac_PRECHECK(CFPreferencesGetAppBooleanValue);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CFStringRefObj_Convert, &key,
- CFStringRefObj_Convert, &applicationID))
- return NULL;
- _rv = CFPreferencesGetAppBooleanValue(key,
- applicationID,
- &keyExistsAndHasValidFormat);
- _res = Py_BuildValue("ll",
- _rv,
- keyExistsAndHasValidFormat);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CFStringRefObj_Convert, &key,
+ CFStringRefObj_Convert, &applicationID))
+ return NULL;
+ _rv = CFPreferencesGetAppBooleanValue(key,
+ applicationID,
+ &keyExistsAndHasValidFormat);
+ _res = Py_BuildValue("ll",
+ _rv,
+ keyExistsAndHasValidFormat);
+ return _res;
}
static PyObject *CF_CFPreferencesGetAppIntegerValue(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFIndex _rv;
- CFStringRef key;
- CFStringRef applicationID;
- Boolean keyExistsAndHasValidFormat;
+ PyObject *_res = NULL;
+ CFIndex _rv;
+ CFStringRef key;
+ CFStringRef applicationID;
+ Boolean keyExistsAndHasValidFormat;
#ifndef CFPreferencesGetAppIntegerValue
- PyMac_PRECHECK(CFPreferencesGetAppIntegerValue);
+ PyMac_PRECHECK(CFPreferencesGetAppIntegerValue);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CFStringRefObj_Convert, &key,
- CFStringRefObj_Convert, &applicationID))
- return NULL;
- _rv = CFPreferencesGetAppIntegerValue(key,
- applicationID,
- &keyExistsAndHasValidFormat);
- _res = Py_BuildValue("ll",
- _rv,
- keyExistsAndHasValidFormat);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CFStringRefObj_Convert, &key,
+ CFStringRefObj_Convert, &applicationID))
+ return NULL;
+ _rv = CFPreferencesGetAppIntegerValue(key,
+ applicationID,
+ &keyExistsAndHasValidFormat);
+ _res = Py_BuildValue("ll",
+ _rv,
+ keyExistsAndHasValidFormat);
+ return _res;
}
static PyObject *CF_CFPreferencesSetAppValue(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFStringRef key;
- CFTypeRef value;
- CFStringRef applicationID;
+ PyObject *_res = NULL;
+ CFStringRef key;
+ CFTypeRef value;
+ CFStringRef applicationID;
#ifndef CFPreferencesSetAppValue
- PyMac_PRECHECK(CFPreferencesSetAppValue);
+ PyMac_PRECHECK(CFPreferencesSetAppValue);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- CFStringRefObj_Convert, &key,
- CFTypeRefObj_Convert, &value,
- CFStringRefObj_Convert, &applicationID))
- return NULL;
- CFPreferencesSetAppValue(key,
- value,
- applicationID);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ CFStringRefObj_Convert, &key,
+ CFTypeRefObj_Convert, &value,
+ CFStringRefObj_Convert, &applicationID))
+ return NULL;
+ CFPreferencesSetAppValue(key,
+ value,
+ applicationID);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CF_CFPreferencesAddSuitePreferencesToApp(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFStringRef applicationID;
- CFStringRef suiteID;
+ PyObject *_res = NULL;
+ CFStringRef applicationID;
+ CFStringRef suiteID;
#ifndef CFPreferencesAddSuitePreferencesToApp
- PyMac_PRECHECK(CFPreferencesAddSuitePreferencesToApp);
+ PyMac_PRECHECK(CFPreferencesAddSuitePreferencesToApp);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CFStringRefObj_Convert, &applicationID,
- CFStringRefObj_Convert, &suiteID))
- return NULL;
- CFPreferencesAddSuitePreferencesToApp(applicationID,
- suiteID);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CFStringRefObj_Convert, &applicationID,
+ CFStringRefObj_Convert, &suiteID))
+ return NULL;
+ CFPreferencesAddSuitePreferencesToApp(applicationID,
+ suiteID);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CF_CFPreferencesRemoveSuitePreferencesFromApp(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFStringRef applicationID;
- CFStringRef suiteID;
+ PyObject *_res = NULL;
+ CFStringRef applicationID;
+ CFStringRef suiteID;
#ifndef CFPreferencesRemoveSuitePreferencesFromApp
- PyMac_PRECHECK(CFPreferencesRemoveSuitePreferencesFromApp);
+ PyMac_PRECHECK(CFPreferencesRemoveSuitePreferencesFromApp);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CFStringRefObj_Convert, &applicationID,
- CFStringRefObj_Convert, &suiteID))
- return NULL;
- CFPreferencesRemoveSuitePreferencesFromApp(applicationID,
- suiteID);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CFStringRefObj_Convert, &applicationID,
+ CFStringRefObj_Convert, &suiteID))
+ return NULL;
+ CFPreferencesRemoveSuitePreferencesFromApp(applicationID,
+ suiteID);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CF_CFPreferencesAppSynchronize(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- CFStringRef applicationID;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ CFStringRef applicationID;
#ifndef CFPreferencesAppSynchronize
- PyMac_PRECHECK(CFPreferencesAppSynchronize);
+ PyMac_PRECHECK(CFPreferencesAppSynchronize);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CFStringRefObj_Convert, &applicationID))
- return NULL;
- _rv = CFPreferencesAppSynchronize(applicationID);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CFStringRefObj_Convert, &applicationID))
+ return NULL;
+ _rv = CFPreferencesAppSynchronize(applicationID);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *CF_CFPreferencesCopyValue(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFTypeRef _rv;
- CFStringRef key;
- CFStringRef applicationID;
- CFStringRef userName;
- CFStringRef hostName;
+ PyObject *_res = NULL;
+ CFTypeRef _rv;
+ CFStringRef key;
+ CFStringRef applicationID;
+ CFStringRef userName;
+ CFStringRef hostName;
#ifndef CFPreferencesCopyValue
- PyMac_PRECHECK(CFPreferencesCopyValue);
+ PyMac_PRECHECK(CFPreferencesCopyValue);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&O&",
- CFStringRefObj_Convert, &key,
- CFStringRefObj_Convert, &applicationID,
- CFStringRefObj_Convert, &userName,
- CFStringRefObj_Convert, &hostName))
- return NULL;
- _rv = CFPreferencesCopyValue(key,
- applicationID,
- userName,
- hostName);
- _res = Py_BuildValue("O&",
- CFTypeRefObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&O&O&",
+ CFStringRefObj_Convert, &key,
+ CFStringRefObj_Convert, &applicationID,
+ CFStringRefObj_Convert, &userName,
+ CFStringRefObj_Convert, &hostName))
+ return NULL;
+ _rv = CFPreferencesCopyValue(key,
+ applicationID,
+ userName,
+ hostName);
+ _res = Py_BuildValue("O&",
+ CFTypeRefObj_New, _rv);
+ return _res;
}
static PyObject *CF_CFPreferencesCopyMultiple(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFDictionaryRef _rv;
- CFArrayRef keysToFetch;
- CFStringRef applicationID;
- CFStringRef userName;
- CFStringRef hostName;
+ PyObject *_res = NULL;
+ CFDictionaryRef _rv;
+ CFArrayRef keysToFetch;
+ CFStringRef applicationID;
+ CFStringRef userName;
+ CFStringRef hostName;
#ifndef CFPreferencesCopyMultiple
- PyMac_PRECHECK(CFPreferencesCopyMultiple);
+ PyMac_PRECHECK(CFPreferencesCopyMultiple);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&O&",
- CFArrayRefObj_Convert, &keysToFetch,
- CFStringRefObj_Convert, &applicationID,
- CFStringRefObj_Convert, &userName,
- CFStringRefObj_Convert, &hostName))
- return NULL;
- _rv = CFPreferencesCopyMultiple(keysToFetch,
- applicationID,
- userName,
- hostName);
- _res = Py_BuildValue("O&",
- CFDictionaryRefObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&O&O&",
+ CFArrayRefObj_Convert, &keysToFetch,
+ CFStringRefObj_Convert, &applicationID,
+ CFStringRefObj_Convert, &userName,
+ CFStringRefObj_Convert, &hostName))
+ return NULL;
+ _rv = CFPreferencesCopyMultiple(keysToFetch,
+ applicationID,
+ userName,
+ hostName);
+ _res = Py_BuildValue("O&",
+ CFDictionaryRefObj_New, _rv);
+ return _res;
}
static PyObject *CF_CFPreferencesSetValue(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFStringRef key;
- CFTypeRef value;
- CFStringRef applicationID;
- CFStringRef userName;
- CFStringRef hostName;
+ PyObject *_res = NULL;
+ CFStringRef key;
+ CFTypeRef value;
+ CFStringRef applicationID;
+ CFStringRef userName;
+ CFStringRef hostName;
#ifndef CFPreferencesSetValue
- PyMac_PRECHECK(CFPreferencesSetValue);
+ PyMac_PRECHECK(CFPreferencesSetValue);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&O&O&",
- CFStringRefObj_Convert, &key,
- CFTypeRefObj_Convert, &value,
- CFStringRefObj_Convert, &applicationID,
- CFStringRefObj_Convert, &userName,
- CFStringRefObj_Convert, &hostName))
- return NULL;
- CFPreferencesSetValue(key,
- value,
- applicationID,
- userName,
- hostName);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&O&O&O&",
+ CFStringRefObj_Convert, &key,
+ CFTypeRefObj_Convert, &value,
+ CFStringRefObj_Convert, &applicationID,
+ CFStringRefObj_Convert, &userName,
+ CFStringRefObj_Convert, &hostName))
+ return NULL;
+ CFPreferencesSetValue(key,
+ value,
+ applicationID,
+ userName,
+ hostName);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CF_CFPreferencesSetMultiple(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFDictionaryRef keysToSet;
- CFArrayRef keysToRemove;
- CFStringRef applicationID;
- CFStringRef userName;
- CFStringRef hostName;
+ PyObject *_res = NULL;
+ CFDictionaryRef keysToSet;
+ CFArrayRef keysToRemove;
+ CFStringRef applicationID;
+ CFStringRef userName;
+ CFStringRef hostName;
#ifndef CFPreferencesSetMultiple
- PyMac_PRECHECK(CFPreferencesSetMultiple);
+ PyMac_PRECHECK(CFPreferencesSetMultiple);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&O&O&",
- CFDictionaryRefObj_Convert, &keysToSet,
- CFArrayRefObj_Convert, &keysToRemove,
- CFStringRefObj_Convert, &applicationID,
- CFStringRefObj_Convert, &userName,
- CFStringRefObj_Convert, &hostName))
- return NULL;
- CFPreferencesSetMultiple(keysToSet,
- keysToRemove,
- applicationID,
- userName,
- hostName);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&O&O&O&",
+ CFDictionaryRefObj_Convert, &keysToSet,
+ CFArrayRefObj_Convert, &keysToRemove,
+ CFStringRefObj_Convert, &applicationID,
+ CFStringRefObj_Convert, &userName,
+ CFStringRefObj_Convert, &hostName))
+ return NULL;
+ CFPreferencesSetMultiple(keysToSet,
+ keysToRemove,
+ applicationID,
+ userName,
+ hostName);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CF_CFPreferencesSynchronize(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- CFStringRef applicationID;
- CFStringRef userName;
- CFStringRef hostName;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ CFStringRef applicationID;
+ CFStringRef userName;
+ CFStringRef hostName;
#ifndef CFPreferencesSynchronize
- PyMac_PRECHECK(CFPreferencesSynchronize);
+ PyMac_PRECHECK(CFPreferencesSynchronize);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- CFStringRefObj_Convert, &applicationID,
- CFStringRefObj_Convert, &userName,
- CFStringRefObj_Convert, &hostName))
- return NULL;
- _rv = CFPreferencesSynchronize(applicationID,
- userName,
- hostName);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ CFStringRefObj_Convert, &applicationID,
+ CFStringRefObj_Convert, &userName,
+ CFStringRefObj_Convert, &hostName))
+ return NULL;
+ _rv = CFPreferencesSynchronize(applicationID,
+ userName,
+ hostName);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *CF_CFPreferencesCopyApplicationList(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFArrayRef _rv;
- CFStringRef userName;
- CFStringRef hostName;
+ PyObject *_res = NULL;
+ CFArrayRef _rv;
+ CFStringRef userName;
+ CFStringRef hostName;
#ifndef CFPreferencesCopyApplicationList
- PyMac_PRECHECK(CFPreferencesCopyApplicationList);
+ PyMac_PRECHECK(CFPreferencesCopyApplicationList);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CFStringRefObj_Convert, &userName,
- CFStringRefObj_Convert, &hostName))
- return NULL;
- _rv = CFPreferencesCopyApplicationList(userName,
- hostName);
- _res = Py_BuildValue("O&",
- CFArrayRefObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CFStringRefObj_Convert, &userName,
+ CFStringRefObj_Convert, &hostName))
+ return NULL;
+ _rv = CFPreferencesCopyApplicationList(userName,
+ hostName);
+ _res = Py_BuildValue("O&",
+ CFArrayRefObj_New, _rv);
+ return _res;
}
static PyObject *CF_CFPreferencesCopyKeyList(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFArrayRef _rv;
- CFStringRef applicationID;
- CFStringRef userName;
- CFStringRef hostName;
+ PyObject *_res = NULL;
+ CFArrayRef _rv;
+ CFStringRef applicationID;
+ CFStringRef userName;
+ CFStringRef hostName;
#ifndef CFPreferencesCopyKeyList
- PyMac_PRECHECK(CFPreferencesCopyKeyList);
+ PyMac_PRECHECK(CFPreferencesCopyKeyList);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- CFStringRefObj_Convert, &applicationID,
- CFStringRefObj_Convert, &userName,
- CFStringRefObj_Convert, &hostName))
- return NULL;
- _rv = CFPreferencesCopyKeyList(applicationID,
- userName,
- hostName);
- _res = Py_BuildValue("O&",
- CFArrayRefObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ CFStringRefObj_Convert, &applicationID,
+ CFStringRefObj_Convert, &userName,
+ CFStringRefObj_Convert, &hostName))
+ return NULL;
+ _rv = CFPreferencesCopyKeyList(applicationID,
+ userName,
+ hostName);
+ _res = Py_BuildValue("O&",
+ CFArrayRefObj_New, _rv);
+ return _res;
}
static PyObject *CF_CFStringGetTypeID(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFTypeID _rv;
+ PyObject *_res = NULL;
+ CFTypeID _rv;
#ifndef CFStringGetTypeID
- PyMac_PRECHECK(CFStringGetTypeID);
+ PyMac_PRECHECK(CFStringGetTypeID);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = CFStringGetTypeID();
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = CFStringGetTypeID();
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *CF_CFStringCreateWithPascalString(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFStringRef _rv;
- Str255 pStr;
- CFStringEncoding encoding;
+ PyObject *_res = NULL;
+ CFStringRef _rv;
+ Str255 pStr;
+ CFStringEncoding encoding;
#ifndef CFStringCreateWithPascalString
- PyMac_PRECHECK(CFStringCreateWithPascalString);
+ PyMac_PRECHECK(CFStringCreateWithPascalString);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- PyMac_GetStr255, pStr,
- &encoding))
- return NULL;
- _rv = CFStringCreateWithPascalString((CFAllocatorRef)NULL,
- pStr,
- encoding);
- _res = Py_BuildValue("O&",
- CFStringRefObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ PyMac_GetStr255, pStr,
+ &encoding))
+ return NULL;
+ _rv = CFStringCreateWithPascalString((CFAllocatorRef)NULL,
+ pStr,
+ encoding);
+ _res = Py_BuildValue("O&",
+ CFStringRefObj_New, _rv);
+ return _res;
}
static PyObject *CF_CFStringCreateWithCString(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFStringRef _rv;
- char* cStr;
- CFStringEncoding encoding;
+ PyObject *_res = NULL;
+ CFStringRef _rv;
+ char* cStr;
+ CFStringEncoding encoding;
#ifndef CFStringCreateWithCString
- PyMac_PRECHECK(CFStringCreateWithCString);
+ PyMac_PRECHECK(CFStringCreateWithCString);
#endif
- if (!PyArg_ParseTuple(_args, "sl",
- &cStr,
- &encoding))
- return NULL;
- _rv = CFStringCreateWithCString((CFAllocatorRef)NULL,
- cStr,
- encoding);
- _res = Py_BuildValue("O&",
- CFStringRefObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "sl",
+ &cStr,
+ &encoding))
+ return NULL;
+ _rv = CFStringCreateWithCString((CFAllocatorRef)NULL,
+ cStr,
+ encoding);
+ _res = Py_BuildValue("O&",
+ CFStringRefObj_New, _rv);
+ return _res;
}
static PyObject *CF_CFStringCreateWithCharacters(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFStringRef _rv;
- UniChar *chars__in__;
- UniCharCount chars__len__;
- int chars__in_len__;
+ PyObject *_res = NULL;
+ CFStringRef _rv;
+ UniChar *chars__in__;
+ UniCharCount chars__len__;
+ int chars__in_len__;
#ifndef CFStringCreateWithCharacters
- PyMac_PRECHECK(CFStringCreateWithCharacters);
+ PyMac_PRECHECK(CFStringCreateWithCharacters);
#endif
- if (!PyArg_ParseTuple(_args, "u#",
- &chars__in__, &chars__in_len__))
- return NULL;
- chars__len__ = chars__in_len__;
- _rv = CFStringCreateWithCharacters((CFAllocatorRef)NULL,
- chars__in__, chars__len__);
- _res = Py_BuildValue("O&",
- CFStringRefObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "u#",
+ &chars__in__, &chars__in_len__))
+ return NULL;
+ chars__len__ = chars__in_len__;
+ _rv = CFStringCreateWithCharacters((CFAllocatorRef)NULL,
+ chars__in__, chars__len__);
+ _res = Py_BuildValue("O&",
+ CFStringRefObj_New, _rv);
+ return _res;
}
static PyObject *CF_CFStringCreateWithPascalStringNoCopy(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFStringRef _rv;
- Str255 pStr;
- CFStringEncoding encoding;
+ PyObject *_res = NULL;
+ CFStringRef _rv;
+ Str255 pStr;
+ CFStringEncoding encoding;
#ifndef CFStringCreateWithPascalStringNoCopy
- PyMac_PRECHECK(CFStringCreateWithPascalStringNoCopy);
+ PyMac_PRECHECK(CFStringCreateWithPascalStringNoCopy);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- PyMac_GetStr255, pStr,
- &encoding))
- return NULL;
- _rv = CFStringCreateWithPascalStringNoCopy((CFAllocatorRef)NULL,
- pStr,
- encoding,
- (CFAllocatorRef)NULL);
- _res = Py_BuildValue("O&",
- CFStringRefObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ PyMac_GetStr255, pStr,
+ &encoding))
+ return NULL;
+ _rv = CFStringCreateWithPascalStringNoCopy((CFAllocatorRef)NULL,
+ pStr,
+ encoding,
+ (CFAllocatorRef)NULL);
+ _res = Py_BuildValue("O&",
+ CFStringRefObj_New, _rv);
+ return _res;
}
static PyObject *CF_CFStringCreateWithCStringNoCopy(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFStringRef _rv;
- char* cStr;
- CFStringEncoding encoding;
+ PyObject *_res = NULL;
+ CFStringRef _rv;
+ char* cStr;
+ CFStringEncoding encoding;
#ifndef CFStringCreateWithCStringNoCopy
- PyMac_PRECHECK(CFStringCreateWithCStringNoCopy);
+ PyMac_PRECHECK(CFStringCreateWithCStringNoCopy);
#endif
- if (!PyArg_ParseTuple(_args, "sl",
- &cStr,
- &encoding))
- return NULL;
- _rv = CFStringCreateWithCStringNoCopy((CFAllocatorRef)NULL,
- cStr,
- encoding,
- (CFAllocatorRef)NULL);
- _res = Py_BuildValue("O&",
- CFStringRefObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "sl",
+ &cStr,
+ &encoding))
+ return NULL;
+ _rv = CFStringCreateWithCStringNoCopy((CFAllocatorRef)NULL,
+ cStr,
+ encoding,
+ (CFAllocatorRef)NULL);
+ _res = Py_BuildValue("O&",
+ CFStringRefObj_New, _rv);
+ return _res;
}
static PyObject *CF_CFStringCreateWithCharactersNoCopy(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFStringRef _rv;
- UniChar *chars__in__;
- UniCharCount chars__len__;
- int chars__in_len__;
+ PyObject *_res = NULL;
+ CFStringRef _rv;
+ UniChar *chars__in__;
+ UniCharCount chars__len__;
+ int chars__in_len__;
#ifndef CFStringCreateWithCharactersNoCopy
- PyMac_PRECHECK(CFStringCreateWithCharactersNoCopy);
+ PyMac_PRECHECK(CFStringCreateWithCharactersNoCopy);
#endif
- if (!PyArg_ParseTuple(_args, "u#",
- &chars__in__, &chars__in_len__))
- return NULL;
- chars__len__ = chars__in_len__;
- _rv = CFStringCreateWithCharactersNoCopy((CFAllocatorRef)NULL,
- chars__in__, chars__len__,
- (CFAllocatorRef)NULL);
- _res = Py_BuildValue("O&",
- CFStringRefObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "u#",
+ &chars__in__, &chars__in_len__))
+ return NULL;
+ chars__len__ = chars__in_len__;
+ _rv = CFStringCreateWithCharactersNoCopy((CFAllocatorRef)NULL,
+ chars__in__, chars__len__,
+ (CFAllocatorRef)NULL);
+ _res = Py_BuildValue("O&",
+ CFStringRefObj_New, _rv);
+ return _res;
}
static PyObject *CF_CFStringCreateMutable(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFMutableStringRef _rv;
- CFIndex maxLength;
+ PyObject *_res = NULL;
+ CFMutableStringRef _rv;
+ CFIndex maxLength;
#ifndef CFStringCreateMutable
- PyMac_PRECHECK(CFStringCreateMutable);
+ PyMac_PRECHECK(CFStringCreateMutable);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &maxLength))
- return NULL;
- _rv = CFStringCreateMutable((CFAllocatorRef)NULL,
- maxLength);
- _res = Py_BuildValue("O&",
- CFMutableStringRefObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &maxLength))
+ return NULL;
+ _rv = CFStringCreateMutable((CFAllocatorRef)NULL,
+ maxLength);
+ _res = Py_BuildValue("O&",
+ CFMutableStringRefObj_New, _rv);
+ return _res;
}
static PyObject *CF_CFStringCreateMutableCopy(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFMutableStringRef _rv;
- CFIndex maxLength;
- CFStringRef theString;
+ PyObject *_res = NULL;
+ CFMutableStringRef _rv;
+ CFIndex maxLength;
+ CFStringRef theString;
#ifndef CFStringCreateMutableCopy
- PyMac_PRECHECK(CFStringCreateMutableCopy);
+ PyMac_PRECHECK(CFStringCreateMutableCopy);
#endif
- if (!PyArg_ParseTuple(_args, "lO&",
- &maxLength,
- CFStringRefObj_Convert, &theString))
- return NULL;
- _rv = CFStringCreateMutableCopy((CFAllocatorRef)NULL,
- maxLength,
- theString);
- _res = Py_BuildValue("O&",
- CFMutableStringRefObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "lO&",
+ &maxLength,
+ CFStringRefObj_Convert, &theString))
+ return NULL;
+ _rv = CFStringCreateMutableCopy((CFAllocatorRef)NULL,
+ maxLength,
+ theString);
+ _res = Py_BuildValue("O&",
+ CFMutableStringRefObj_New, _rv);
+ return _res;
}
static PyObject *CF_CFStringCreateWithBytes(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFStringRef _rv;
- unsigned char *bytes__in__;
- long bytes__len__;
- int bytes__in_len__;
- CFStringEncoding encoding;
- Boolean isExternalRepresentation;
+ PyObject *_res = NULL;
+ CFStringRef _rv;
+ unsigned char *bytes__in__;
+ long bytes__len__;
+ int bytes__in_len__;
+ CFStringEncoding encoding;
+ Boolean isExternalRepresentation;
#ifndef CFStringCreateWithBytes
- PyMac_PRECHECK(CFStringCreateWithBytes);
+ PyMac_PRECHECK(CFStringCreateWithBytes);
#endif
- if (!PyArg_ParseTuple(_args, "s#ll",
- &bytes__in__, &bytes__in_len__,
- &encoding,
- &isExternalRepresentation))
- return NULL;
- bytes__len__ = bytes__in_len__;
- _rv = CFStringCreateWithBytes((CFAllocatorRef)NULL,
- bytes__in__, bytes__len__,
- encoding,
- isExternalRepresentation);
- _res = Py_BuildValue("O&",
- CFStringRefObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "s#ll",
+ &bytes__in__, &bytes__in_len__,
+ &encoding,
+ &isExternalRepresentation))
+ return NULL;
+ bytes__len__ = bytes__in_len__;
+ _rv = CFStringCreateWithBytes((CFAllocatorRef)NULL,
+ bytes__in__, bytes__len__,
+ encoding,
+ isExternalRepresentation);
+ _res = Py_BuildValue("O&",
+ CFStringRefObj_New, _rv);
+ return _res;
}
static PyObject *CF_CFStringGetSystemEncoding(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFStringEncoding _rv;
+ PyObject *_res = NULL;
+ CFStringEncoding _rv;
#ifndef CFStringGetSystemEncoding
- PyMac_PRECHECK(CFStringGetSystemEncoding);
+ PyMac_PRECHECK(CFStringGetSystemEncoding);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = CFStringGetSystemEncoding();
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = CFStringGetSystemEncoding();
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *CF_CFStringGetMaximumSizeForEncoding(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFIndex _rv;
- CFIndex length;
- CFStringEncoding encoding;
+ PyObject *_res = NULL;
+ CFIndex _rv;
+ CFIndex length;
+ CFStringEncoding encoding;
#ifndef CFStringGetMaximumSizeForEncoding
- PyMac_PRECHECK(CFStringGetMaximumSizeForEncoding);
+ PyMac_PRECHECK(CFStringGetMaximumSizeForEncoding);
#endif
- if (!PyArg_ParseTuple(_args, "ll",
- &length,
- &encoding))
- return NULL;
- _rv = CFStringGetMaximumSizeForEncoding(length,
- encoding);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "ll",
+ &length,
+ &encoding))
+ return NULL;
+ _rv = CFStringGetMaximumSizeForEncoding(length,
+ encoding);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *CF_CFStringIsEncodingAvailable(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- CFStringEncoding encoding;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ CFStringEncoding encoding;
#ifndef CFStringIsEncodingAvailable
- PyMac_PRECHECK(CFStringIsEncodingAvailable);
+ PyMac_PRECHECK(CFStringIsEncodingAvailable);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &encoding))
- return NULL;
- _rv = CFStringIsEncodingAvailable(encoding);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &encoding))
+ return NULL;
+ _rv = CFStringIsEncodingAvailable(encoding);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *CF_CFStringGetNameOfEncoding(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFStringRef _rv;
- CFStringEncoding encoding;
+ PyObject *_res = NULL;
+ CFStringRef _rv;
+ CFStringEncoding encoding;
#ifndef CFStringGetNameOfEncoding
- PyMac_PRECHECK(CFStringGetNameOfEncoding);
+ PyMac_PRECHECK(CFStringGetNameOfEncoding);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &encoding))
- return NULL;
- _rv = CFStringGetNameOfEncoding(encoding);
- _res = Py_BuildValue("O&",
- CFStringRefObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &encoding))
+ return NULL;
+ _rv = CFStringGetNameOfEncoding(encoding);
+ _res = Py_BuildValue("O&",
+ CFStringRefObj_New, _rv);
+ return _res;
}
static PyObject *CF_CFStringConvertEncodingToNSStringEncoding(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- UInt32 _rv;
- CFStringEncoding encoding;
+ PyObject *_res = NULL;
+ UInt32 _rv;
+ CFStringEncoding encoding;
#ifndef CFStringConvertEncodingToNSStringEncoding
- PyMac_PRECHECK(CFStringConvertEncodingToNSStringEncoding);
+ PyMac_PRECHECK(CFStringConvertEncodingToNSStringEncoding);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &encoding))
- return NULL;
- _rv = CFStringConvertEncodingToNSStringEncoding(encoding);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &encoding))
+ return NULL;
+ _rv = CFStringConvertEncodingToNSStringEncoding(encoding);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *CF_CFStringConvertNSStringEncodingToEncoding(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFStringEncoding _rv;
- UInt32 encoding;
+ PyObject *_res = NULL;
+ CFStringEncoding _rv;
+ UInt32 encoding;
#ifndef CFStringConvertNSStringEncodingToEncoding
- PyMac_PRECHECK(CFStringConvertNSStringEncodingToEncoding);
+ PyMac_PRECHECK(CFStringConvertNSStringEncodingToEncoding);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &encoding))
- return NULL;
- _rv = CFStringConvertNSStringEncodingToEncoding(encoding);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &encoding))
+ return NULL;
+ _rv = CFStringConvertNSStringEncodingToEncoding(encoding);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *CF_CFStringConvertEncodingToWindowsCodepage(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- UInt32 _rv;
- CFStringEncoding encoding;
+ PyObject *_res = NULL;
+ UInt32 _rv;
+ CFStringEncoding encoding;
#ifndef CFStringConvertEncodingToWindowsCodepage
- PyMac_PRECHECK(CFStringConvertEncodingToWindowsCodepage);
+ PyMac_PRECHECK(CFStringConvertEncodingToWindowsCodepage);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &encoding))
- return NULL;
- _rv = CFStringConvertEncodingToWindowsCodepage(encoding);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &encoding))
+ return NULL;
+ _rv = CFStringConvertEncodingToWindowsCodepage(encoding);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *CF_CFStringConvertWindowsCodepageToEncoding(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFStringEncoding _rv;
- UInt32 codepage;
+ PyObject *_res = NULL;
+ CFStringEncoding _rv;
+ UInt32 codepage;
#ifndef CFStringConvertWindowsCodepageToEncoding
- PyMac_PRECHECK(CFStringConvertWindowsCodepageToEncoding);
+ PyMac_PRECHECK(CFStringConvertWindowsCodepageToEncoding);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &codepage))
- return NULL;
- _rv = CFStringConvertWindowsCodepageToEncoding(codepage);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &codepage))
+ return NULL;
+ _rv = CFStringConvertWindowsCodepageToEncoding(codepage);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *CF_CFStringConvertEncodingToIANACharSetName(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFStringRef _rv;
- CFStringEncoding encoding;
+ PyObject *_res = NULL;
+ CFStringRef _rv;
+ CFStringEncoding encoding;
#ifndef CFStringConvertEncodingToIANACharSetName
- PyMac_PRECHECK(CFStringConvertEncodingToIANACharSetName);
+ PyMac_PRECHECK(CFStringConvertEncodingToIANACharSetName);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &encoding))
- return NULL;
- _rv = CFStringConvertEncodingToIANACharSetName(encoding);
- _res = Py_BuildValue("O&",
- CFStringRefObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &encoding))
+ return NULL;
+ _rv = CFStringConvertEncodingToIANACharSetName(encoding);
+ _res = Py_BuildValue("O&",
+ CFStringRefObj_New, _rv);
+ return _res;
}
static PyObject *CF_CFStringGetMostCompatibleMacStringEncoding(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFStringEncoding _rv;
- CFStringEncoding encoding;
+ PyObject *_res = NULL;
+ CFStringEncoding _rv;
+ CFStringEncoding encoding;
#ifndef CFStringGetMostCompatibleMacStringEncoding
- PyMac_PRECHECK(CFStringGetMostCompatibleMacStringEncoding);
+ PyMac_PRECHECK(CFStringGetMostCompatibleMacStringEncoding);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &encoding))
- return NULL;
- _rv = CFStringGetMostCompatibleMacStringEncoding(encoding);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &encoding))
+ return NULL;
+ _rv = CFStringGetMostCompatibleMacStringEncoding(encoding);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *CF___CFStringMakeConstantString(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFStringRef _rv;
- char* cStr;
+ PyObject *_res = NULL;
+ CFStringRef _rv;
+ char* cStr;
#ifndef __CFStringMakeConstantString
- PyMac_PRECHECK(__CFStringMakeConstantString);
+ PyMac_PRECHECK(__CFStringMakeConstantString);
#endif
- if (!PyArg_ParseTuple(_args, "s",
- &cStr))
- return NULL;
- _rv = __CFStringMakeConstantString(cStr);
- _res = Py_BuildValue("O&",
- CFStringRefObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "s",
+ &cStr))
+ return NULL;
+ _rv = __CFStringMakeConstantString(cStr);
+ _res = Py_BuildValue("O&",
+ CFStringRefObj_New, _rv);
+ return _res;
}
static PyObject *CF_CFURLGetTypeID(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFTypeID _rv;
+ PyObject *_res = NULL;
+ CFTypeID _rv;
#ifndef CFURLGetTypeID
- PyMac_PRECHECK(CFURLGetTypeID);
+ PyMac_PRECHECK(CFURLGetTypeID);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = CFURLGetTypeID();
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = CFURLGetTypeID();
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *CF_CFURLCreateWithBytes(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFURLRef _rv;
- unsigned char *URLBytes__in__;
- long URLBytes__len__;
- int URLBytes__in_len__;
- CFStringEncoding encoding;
- CFURLRef baseURL;
+ PyObject *_res = NULL;
+ CFURLRef _rv;
+ unsigned char *URLBytes__in__;
+ long URLBytes__len__;
+ int URLBytes__in_len__;
+ CFStringEncoding encoding;
+ CFURLRef baseURL;
#ifndef CFURLCreateWithBytes
- PyMac_PRECHECK(CFURLCreateWithBytes);
+ PyMac_PRECHECK(CFURLCreateWithBytes);
#endif
- if (!PyArg_ParseTuple(_args, "s#lO&",
- &URLBytes__in__, &URLBytes__in_len__,
- &encoding,
- OptionalCFURLRefObj_Convert, &baseURL))
- return NULL;
- URLBytes__len__ = URLBytes__in_len__;
- _rv = CFURLCreateWithBytes((CFAllocatorRef)NULL,
- URLBytes__in__, URLBytes__len__,
- encoding,
- baseURL);
- _res = Py_BuildValue("O&",
- CFURLRefObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "s#lO&",
+ &URLBytes__in__, &URLBytes__in_len__,
+ &encoding,
+ OptionalCFURLRefObj_Convert, &baseURL))
+ return NULL;
+ URLBytes__len__ = URLBytes__in_len__;
+ _rv = CFURLCreateWithBytes((CFAllocatorRef)NULL,
+ URLBytes__in__, URLBytes__len__,
+ encoding,
+ baseURL);
+ _res = Py_BuildValue("O&",
+ CFURLRefObj_New, _rv);
+ return _res;
}
static PyObject *CF_CFURLCreateFromFileSystemRepresentation(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFURLRef _rv;
- unsigned char *buffer__in__;
- long buffer__len__;
- int buffer__in_len__;
- Boolean isDirectory;
+ PyObject *_res = NULL;
+ CFURLRef _rv;
+ unsigned char *buffer__in__;
+ long buffer__len__;
+ int buffer__in_len__;
+ Boolean isDirectory;
#ifndef CFURLCreateFromFileSystemRepresentation
- PyMac_PRECHECK(CFURLCreateFromFileSystemRepresentation);
+ PyMac_PRECHECK(CFURLCreateFromFileSystemRepresentation);
#endif
- if (!PyArg_ParseTuple(_args, "s#l",
- &buffer__in__, &buffer__in_len__,
- &isDirectory))
- return NULL;
- buffer__len__ = buffer__in_len__;
- _rv = CFURLCreateFromFileSystemRepresentation((CFAllocatorRef)NULL,
- buffer__in__, buffer__len__,
- isDirectory);
- _res = Py_BuildValue("O&",
- CFURLRefObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "s#l",
+ &buffer__in__, &buffer__in_len__,
+ &isDirectory))
+ return NULL;
+ buffer__len__ = buffer__in_len__;
+ _rv = CFURLCreateFromFileSystemRepresentation((CFAllocatorRef)NULL,
+ buffer__in__, buffer__len__,
+ isDirectory);
+ _res = Py_BuildValue("O&",
+ CFURLRefObj_New, _rv);
+ return _res;
}
static PyObject *CF_CFURLCreateFromFileSystemRepresentationRelativeToBase(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFURLRef _rv;
- unsigned char *buffer__in__;
- long buffer__len__;
- int buffer__in_len__;
- Boolean isDirectory;
- CFURLRef baseURL;
+ PyObject *_res = NULL;
+ CFURLRef _rv;
+ unsigned char *buffer__in__;
+ long buffer__len__;
+ int buffer__in_len__;
+ Boolean isDirectory;
+ CFURLRef baseURL;
#ifndef CFURLCreateFromFileSystemRepresentationRelativeToBase
- PyMac_PRECHECK(CFURLCreateFromFileSystemRepresentationRelativeToBase);
+ PyMac_PRECHECK(CFURLCreateFromFileSystemRepresentationRelativeToBase);
#endif
- if (!PyArg_ParseTuple(_args, "s#lO&",
- &buffer__in__, &buffer__in_len__,
- &isDirectory,
- OptionalCFURLRefObj_Convert, &baseURL))
- return NULL;
- buffer__len__ = buffer__in_len__;
- _rv = CFURLCreateFromFileSystemRepresentationRelativeToBase((CFAllocatorRef)NULL,
- buffer__in__, buffer__len__,
- isDirectory,
- baseURL);
- _res = Py_BuildValue("O&",
- CFURLRefObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "s#lO&",
+ &buffer__in__, &buffer__in_len__,
+ &isDirectory,
+ OptionalCFURLRefObj_Convert, &baseURL))
+ return NULL;
+ buffer__len__ = buffer__in_len__;
+ _rv = CFURLCreateFromFileSystemRepresentationRelativeToBase((CFAllocatorRef)NULL,
+ buffer__in__, buffer__len__,
+ isDirectory,
+ baseURL);
+ _res = Py_BuildValue("O&",
+ CFURLRefObj_New, _rv);
+ return _res;
}
static PyObject *CF_CFURLCreateFromFSRef(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CFURLRef _rv;
- FSRef fsRef;
+ PyObject *_res = NULL;
+ CFURLRef _rv;
+ FSRef fsRef;
#ifndef CFURLCreateFromFSRef
- PyMac_PRECHECK(CFURLCreateFromFSRef);
+ PyMac_PRECHECK(CFURLCreateFromFSRef);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetFSRef, &fsRef))
- return NULL;
- _rv = CFURLCreateFromFSRef((CFAllocatorRef)NULL,
- &fsRef);
- _res = Py_BuildValue("O&",
- CFURLRefObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetFSRef, &fsRef))
+ return NULL;
+ _rv = CFURLCreateFromFSRef((CFAllocatorRef)NULL,
+ &fsRef);
+ _res = Py_BuildValue("O&",
+ CFURLRefObj_New, _rv);
+ return _res;
}
static PyObject *CF_toCF(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
- CFTypeRef rv;
- CFTypeID typeid;
+ CFTypeRef rv;
+ CFTypeID typeid;
- if (!PyArg_ParseTuple(_args, "O&", PyCF_Python2CF, &rv))
- return NULL;
- typeid = CFGetTypeID(rv);
+ if (!PyArg_ParseTuple(_args, "O&", PyCF_Python2CF, &rv))
+ return NULL;
+ typeid = CFGetTypeID(rv);
- if (typeid == CFStringGetTypeID())
- return Py_BuildValue("O&", CFStringRefObj_New, rv);
- if (typeid == CFArrayGetTypeID())
- return Py_BuildValue("O&", CFArrayRefObj_New, rv);
- if (typeid == CFDictionaryGetTypeID())
- return Py_BuildValue("O&", CFDictionaryRefObj_New, rv);
- if (typeid == CFURLGetTypeID())
- return Py_BuildValue("O&", CFURLRefObj_New, rv);
+ if (typeid == CFStringGetTypeID())
+ return Py_BuildValue("O&", CFStringRefObj_New, rv);
+ if (typeid == CFArrayGetTypeID())
+ return Py_BuildValue("O&", CFArrayRefObj_New, rv);
+ if (typeid == CFDictionaryGetTypeID())
+ return Py_BuildValue("O&", CFDictionaryRefObj_New, rv);
+ if (typeid == CFURLGetTypeID())
+ return Py_BuildValue("O&", CFURLRefObj_New, rv);
- _res = Py_BuildValue("O&", CFTypeRefObj_New, rv);
- return _res;
+ _res = Py_BuildValue("O&", CFTypeRefObj_New, rv);
+ return _res;
}
static PyMethodDef CF_methods[] = {
- {"__CFRangeMake", (PyCFunction)CF___CFRangeMake, 1,
- PyDoc_STR("(CFIndex loc, CFIndex len) -> (CFRange _rv)")},
- {"CFAllocatorGetTypeID", (PyCFunction)CF_CFAllocatorGetTypeID, 1,
- PyDoc_STR("() -> (CFTypeID _rv)")},
- {"CFAllocatorGetPreferredSizeForSize", (PyCFunction)CF_CFAllocatorGetPreferredSizeForSize, 1,
- PyDoc_STR("(CFIndex size, CFOptionFlags hint) -> (CFIndex _rv)")},
- {"CFCopyTypeIDDescription", (PyCFunction)CF_CFCopyTypeIDDescription, 1,
- PyDoc_STR("(CFTypeID type_id) -> (CFStringRef _rv)")},
- {"CFArrayGetTypeID", (PyCFunction)CF_CFArrayGetTypeID, 1,
- PyDoc_STR("() -> (CFTypeID _rv)")},
- {"CFArrayCreateMutable", (PyCFunction)CF_CFArrayCreateMutable, 1,
- PyDoc_STR("(CFIndex capacity) -> (CFMutableArrayRef _rv)")},
- {"CFArrayCreateMutableCopy", (PyCFunction)CF_CFArrayCreateMutableCopy, 1,
- PyDoc_STR("(CFIndex capacity, CFArrayRef theArray) -> (CFMutableArrayRef _rv)")},
- {"CFDataGetTypeID", (PyCFunction)CF_CFDataGetTypeID, 1,
- PyDoc_STR("() -> (CFTypeID _rv)")},
- {"CFDataCreate", (PyCFunction)CF_CFDataCreate, 1,
- PyDoc_STR("(Buffer bytes) -> (CFDataRef _rv)")},
- {"CFDataCreateWithBytesNoCopy", (PyCFunction)CF_CFDataCreateWithBytesNoCopy, 1,
- PyDoc_STR("(Buffer bytes) -> (CFDataRef _rv)")},
- {"CFDataCreateMutable", (PyCFunction)CF_CFDataCreateMutable, 1,
- PyDoc_STR("(CFIndex capacity) -> (CFMutableDataRef _rv)")},
- {"CFDataCreateMutableCopy", (PyCFunction)CF_CFDataCreateMutableCopy, 1,
- PyDoc_STR("(CFIndex capacity, CFDataRef theData) -> (CFMutableDataRef _rv)")},
- {"CFDictionaryGetTypeID", (PyCFunction)CF_CFDictionaryGetTypeID, 1,
- PyDoc_STR("() -> (CFTypeID _rv)")},
- {"CFDictionaryCreateMutable", (PyCFunction)CF_CFDictionaryCreateMutable, 1,
- PyDoc_STR("(CFIndex capacity) -> (CFMutableDictionaryRef _rv)")},
- {"CFDictionaryCreateMutableCopy", (PyCFunction)CF_CFDictionaryCreateMutableCopy, 1,
- PyDoc_STR("(CFIndex capacity, CFDictionaryRef theDict) -> (CFMutableDictionaryRef _rv)")},
- {"CFPreferencesCopyAppValue", (PyCFunction)CF_CFPreferencesCopyAppValue, 1,
- PyDoc_STR("(CFStringRef key, CFStringRef applicationID) -> (CFTypeRef _rv)")},
- {"CFPreferencesGetAppBooleanValue", (PyCFunction)CF_CFPreferencesGetAppBooleanValue, 1,
- PyDoc_STR("(CFStringRef key, CFStringRef applicationID) -> (Boolean _rv, Boolean keyExistsAndHasValidFormat)")},
- {"CFPreferencesGetAppIntegerValue", (PyCFunction)CF_CFPreferencesGetAppIntegerValue, 1,
- PyDoc_STR("(CFStringRef key, CFStringRef applicationID) -> (CFIndex _rv, Boolean keyExistsAndHasValidFormat)")},
- {"CFPreferencesSetAppValue", (PyCFunction)CF_CFPreferencesSetAppValue, 1,
- PyDoc_STR("(CFStringRef key, CFTypeRef value, CFStringRef applicationID) -> None")},
- {"CFPreferencesAddSuitePreferencesToApp", (PyCFunction)CF_CFPreferencesAddSuitePreferencesToApp, 1,
- PyDoc_STR("(CFStringRef applicationID, CFStringRef suiteID) -> None")},
- {"CFPreferencesRemoveSuitePreferencesFromApp", (PyCFunction)CF_CFPreferencesRemoveSuitePreferencesFromApp, 1,
- PyDoc_STR("(CFStringRef applicationID, CFStringRef suiteID) -> None")},
- {"CFPreferencesAppSynchronize", (PyCFunction)CF_CFPreferencesAppSynchronize, 1,
- PyDoc_STR("(CFStringRef applicationID) -> (Boolean _rv)")},
- {"CFPreferencesCopyValue", (PyCFunction)CF_CFPreferencesCopyValue, 1,
- PyDoc_STR("(CFStringRef key, CFStringRef applicationID, CFStringRef userName, CFStringRef hostName) -> (CFTypeRef _rv)")},
- {"CFPreferencesCopyMultiple", (PyCFunction)CF_CFPreferencesCopyMultiple, 1,
- PyDoc_STR("(CFArrayRef keysToFetch, CFStringRef applicationID, CFStringRef userName, CFStringRef hostName) -> (CFDictionaryRef _rv)")},
- {"CFPreferencesSetValue", (PyCFunction)CF_CFPreferencesSetValue, 1,
- PyDoc_STR("(CFStringRef key, CFTypeRef value, CFStringRef applicationID, CFStringRef userName, CFStringRef hostName) -> None")},
- {"CFPreferencesSetMultiple", (PyCFunction)CF_CFPreferencesSetMultiple, 1,
- PyDoc_STR("(CFDictionaryRef keysToSet, CFArrayRef keysToRemove, CFStringRef applicationID, CFStringRef userName, CFStringRef hostName) -> None")},
- {"CFPreferencesSynchronize", (PyCFunction)CF_CFPreferencesSynchronize, 1,
- PyDoc_STR("(CFStringRef applicationID, CFStringRef userName, CFStringRef hostName) -> (Boolean _rv)")},
- {"CFPreferencesCopyApplicationList", (PyCFunction)CF_CFPreferencesCopyApplicationList, 1,
- PyDoc_STR("(CFStringRef userName, CFStringRef hostName) -> (CFArrayRef _rv)")},
- {"CFPreferencesCopyKeyList", (PyCFunction)CF_CFPreferencesCopyKeyList, 1,
- PyDoc_STR("(CFStringRef applicationID, CFStringRef userName, CFStringRef hostName) -> (CFArrayRef _rv)")},
- {"CFStringGetTypeID", (PyCFunction)CF_CFStringGetTypeID, 1,
- PyDoc_STR("() -> (CFTypeID _rv)")},
- {"CFStringCreateWithPascalString", (PyCFunction)CF_CFStringCreateWithPascalString, 1,
- PyDoc_STR("(Str255 pStr, CFStringEncoding encoding) -> (CFStringRef _rv)")},
- {"CFStringCreateWithCString", (PyCFunction)CF_CFStringCreateWithCString, 1,
- PyDoc_STR("(char* cStr, CFStringEncoding encoding) -> (CFStringRef _rv)")},
- {"CFStringCreateWithCharacters", (PyCFunction)CF_CFStringCreateWithCharacters, 1,
- PyDoc_STR("(Buffer chars) -> (CFStringRef _rv)")},
- {"CFStringCreateWithPascalStringNoCopy", (PyCFunction)CF_CFStringCreateWithPascalStringNoCopy, 1,
- PyDoc_STR("(Str255 pStr, CFStringEncoding encoding) -> (CFStringRef _rv)")},
- {"CFStringCreateWithCStringNoCopy", (PyCFunction)CF_CFStringCreateWithCStringNoCopy, 1,
- PyDoc_STR("(char* cStr, CFStringEncoding encoding) -> (CFStringRef _rv)")},
- {"CFStringCreateWithCharactersNoCopy", (PyCFunction)CF_CFStringCreateWithCharactersNoCopy, 1,
- PyDoc_STR("(Buffer chars) -> (CFStringRef _rv)")},
- {"CFStringCreateMutable", (PyCFunction)CF_CFStringCreateMutable, 1,
- PyDoc_STR("(CFIndex maxLength) -> (CFMutableStringRef _rv)")},
- {"CFStringCreateMutableCopy", (PyCFunction)CF_CFStringCreateMutableCopy, 1,
- PyDoc_STR("(CFIndex maxLength, CFStringRef theString) -> (CFMutableStringRef _rv)")},
- {"CFStringCreateWithBytes", (PyCFunction)CF_CFStringCreateWithBytes, 1,
- PyDoc_STR("(Buffer bytes, CFStringEncoding encoding, Boolean isExternalRepresentation) -> (CFStringRef _rv)")},
- {"CFStringGetSystemEncoding", (PyCFunction)CF_CFStringGetSystemEncoding, 1,
- PyDoc_STR("() -> (CFStringEncoding _rv)")},
- {"CFStringGetMaximumSizeForEncoding", (PyCFunction)CF_CFStringGetMaximumSizeForEncoding, 1,
- PyDoc_STR("(CFIndex length, CFStringEncoding encoding) -> (CFIndex _rv)")},
- {"CFStringIsEncodingAvailable", (PyCFunction)CF_CFStringIsEncodingAvailable, 1,
- PyDoc_STR("(CFStringEncoding encoding) -> (Boolean _rv)")},
- {"CFStringGetNameOfEncoding", (PyCFunction)CF_CFStringGetNameOfEncoding, 1,
- PyDoc_STR("(CFStringEncoding encoding) -> (CFStringRef _rv)")},
- {"CFStringConvertEncodingToNSStringEncoding", (PyCFunction)CF_CFStringConvertEncodingToNSStringEncoding, 1,
- PyDoc_STR("(CFStringEncoding encoding) -> (UInt32 _rv)")},
- {"CFStringConvertNSStringEncodingToEncoding", (PyCFunction)CF_CFStringConvertNSStringEncodingToEncoding, 1,
- PyDoc_STR("(UInt32 encoding) -> (CFStringEncoding _rv)")},
- {"CFStringConvertEncodingToWindowsCodepage", (PyCFunction)CF_CFStringConvertEncodingToWindowsCodepage, 1,
- PyDoc_STR("(CFStringEncoding encoding) -> (UInt32 _rv)")},
- {"CFStringConvertWindowsCodepageToEncoding", (PyCFunction)CF_CFStringConvertWindowsCodepageToEncoding, 1,
- PyDoc_STR("(UInt32 codepage) -> (CFStringEncoding _rv)")},
- {"CFStringConvertEncodingToIANACharSetName", (PyCFunction)CF_CFStringConvertEncodingToIANACharSetName, 1,
- PyDoc_STR("(CFStringEncoding encoding) -> (CFStringRef _rv)")},
- {"CFStringGetMostCompatibleMacStringEncoding", (PyCFunction)CF_CFStringGetMostCompatibleMacStringEncoding, 1,
- PyDoc_STR("(CFStringEncoding encoding) -> (CFStringEncoding _rv)")},
- {"__CFStringMakeConstantString", (PyCFunction)CF___CFStringMakeConstantString, 1,
- PyDoc_STR("(char* cStr) -> (CFStringRef _rv)")},
- {"CFURLGetTypeID", (PyCFunction)CF_CFURLGetTypeID, 1,
- PyDoc_STR("() -> (CFTypeID _rv)")},
- {"CFURLCreateWithBytes", (PyCFunction)CF_CFURLCreateWithBytes, 1,
- PyDoc_STR("(Buffer URLBytes, CFStringEncoding encoding, CFURLRef baseURL) -> (CFURLRef _rv)")},
- {"CFURLCreateFromFileSystemRepresentation", (PyCFunction)CF_CFURLCreateFromFileSystemRepresentation, 1,
- PyDoc_STR("(Buffer buffer, Boolean isDirectory) -> (CFURLRef _rv)")},
- {"CFURLCreateFromFileSystemRepresentationRelativeToBase", (PyCFunction)CF_CFURLCreateFromFileSystemRepresentationRelativeToBase, 1,
- PyDoc_STR("(Buffer buffer, Boolean isDirectory, CFURLRef baseURL) -> (CFURLRef _rv)")},
- {"CFURLCreateFromFSRef", (PyCFunction)CF_CFURLCreateFromFSRef, 1,
- PyDoc_STR("(FSRef fsRef) -> (CFURLRef _rv)")},
- {"toCF", (PyCFunction)CF_toCF, 1,
- PyDoc_STR("(python_object) -> (CF_object)")},
- {NULL, NULL, 0}
+ {"__CFRangeMake", (PyCFunction)CF___CFRangeMake, 1,
+ PyDoc_STR("(CFIndex loc, CFIndex len) -> (CFRange _rv)")},
+ {"CFAllocatorGetTypeID", (PyCFunction)CF_CFAllocatorGetTypeID, 1,
+ PyDoc_STR("() -> (CFTypeID _rv)")},
+ {"CFAllocatorGetPreferredSizeForSize", (PyCFunction)CF_CFAllocatorGetPreferredSizeForSize, 1,
+ PyDoc_STR("(CFIndex size, CFOptionFlags hint) -> (CFIndex _rv)")},
+ {"CFCopyTypeIDDescription", (PyCFunction)CF_CFCopyTypeIDDescription, 1,
+ PyDoc_STR("(CFTypeID type_id) -> (CFStringRef _rv)")},
+ {"CFArrayGetTypeID", (PyCFunction)CF_CFArrayGetTypeID, 1,
+ PyDoc_STR("() -> (CFTypeID _rv)")},
+ {"CFArrayCreateMutable", (PyCFunction)CF_CFArrayCreateMutable, 1,
+ PyDoc_STR("(CFIndex capacity) -> (CFMutableArrayRef _rv)")},
+ {"CFArrayCreateMutableCopy", (PyCFunction)CF_CFArrayCreateMutableCopy, 1,
+ PyDoc_STR("(CFIndex capacity, CFArrayRef theArray) -> (CFMutableArrayRef _rv)")},
+ {"CFDataGetTypeID", (PyCFunction)CF_CFDataGetTypeID, 1,
+ PyDoc_STR("() -> (CFTypeID _rv)")},
+ {"CFDataCreate", (PyCFunction)CF_CFDataCreate, 1,
+ PyDoc_STR("(Buffer bytes) -> (CFDataRef _rv)")},
+ {"CFDataCreateWithBytesNoCopy", (PyCFunction)CF_CFDataCreateWithBytesNoCopy, 1,
+ PyDoc_STR("(Buffer bytes) -> (CFDataRef _rv)")},
+ {"CFDataCreateMutable", (PyCFunction)CF_CFDataCreateMutable, 1,
+ PyDoc_STR("(CFIndex capacity) -> (CFMutableDataRef _rv)")},
+ {"CFDataCreateMutableCopy", (PyCFunction)CF_CFDataCreateMutableCopy, 1,
+ PyDoc_STR("(CFIndex capacity, CFDataRef theData) -> (CFMutableDataRef _rv)")},
+ {"CFDictionaryGetTypeID", (PyCFunction)CF_CFDictionaryGetTypeID, 1,
+ PyDoc_STR("() -> (CFTypeID _rv)")},
+ {"CFDictionaryCreateMutable", (PyCFunction)CF_CFDictionaryCreateMutable, 1,
+ PyDoc_STR("(CFIndex capacity) -> (CFMutableDictionaryRef _rv)")},
+ {"CFDictionaryCreateMutableCopy", (PyCFunction)CF_CFDictionaryCreateMutableCopy, 1,
+ PyDoc_STR("(CFIndex capacity, CFDictionaryRef theDict) -> (CFMutableDictionaryRef _rv)")},
+ {"CFPreferencesCopyAppValue", (PyCFunction)CF_CFPreferencesCopyAppValue, 1,
+ PyDoc_STR("(CFStringRef key, CFStringRef applicationID) -> (CFTypeRef _rv)")},
+ {"CFPreferencesGetAppBooleanValue", (PyCFunction)CF_CFPreferencesGetAppBooleanValue, 1,
+ PyDoc_STR("(CFStringRef key, CFStringRef applicationID) -> (Boolean _rv, Boolean keyExistsAndHasValidFormat)")},
+ {"CFPreferencesGetAppIntegerValue", (PyCFunction)CF_CFPreferencesGetAppIntegerValue, 1,
+ PyDoc_STR("(CFStringRef key, CFStringRef applicationID) -> (CFIndex _rv, Boolean keyExistsAndHasValidFormat)")},
+ {"CFPreferencesSetAppValue", (PyCFunction)CF_CFPreferencesSetAppValue, 1,
+ PyDoc_STR("(CFStringRef key, CFTypeRef value, CFStringRef applicationID) -> None")},
+ {"CFPreferencesAddSuitePreferencesToApp", (PyCFunction)CF_CFPreferencesAddSuitePreferencesToApp, 1,
+ PyDoc_STR("(CFStringRef applicationID, CFStringRef suiteID) -> None")},
+ {"CFPreferencesRemoveSuitePreferencesFromApp", (PyCFunction)CF_CFPreferencesRemoveSuitePreferencesFromApp, 1,
+ PyDoc_STR("(CFStringRef applicationID, CFStringRef suiteID) -> None")},
+ {"CFPreferencesAppSynchronize", (PyCFunction)CF_CFPreferencesAppSynchronize, 1,
+ PyDoc_STR("(CFStringRef applicationID) -> (Boolean _rv)")},
+ {"CFPreferencesCopyValue", (PyCFunction)CF_CFPreferencesCopyValue, 1,
+ PyDoc_STR("(CFStringRef key, CFStringRef applicationID, CFStringRef userName, CFStringRef hostName) -> (CFTypeRef _rv)")},
+ {"CFPreferencesCopyMultiple", (PyCFunction)CF_CFPreferencesCopyMultiple, 1,
+ PyDoc_STR("(CFArrayRef keysToFetch, CFStringRef applicationID, CFStringRef userName, CFStringRef hostName) -> (CFDictionaryRef _rv)")},
+ {"CFPreferencesSetValue", (PyCFunction)CF_CFPreferencesSetValue, 1,
+ PyDoc_STR("(CFStringRef key, CFTypeRef value, CFStringRef applicationID, CFStringRef userName, CFStringRef hostName) -> None")},
+ {"CFPreferencesSetMultiple", (PyCFunction)CF_CFPreferencesSetMultiple, 1,
+ PyDoc_STR("(CFDictionaryRef keysToSet, CFArrayRef keysToRemove, CFStringRef applicationID, CFStringRef userName, CFStringRef hostName) -> None")},
+ {"CFPreferencesSynchronize", (PyCFunction)CF_CFPreferencesSynchronize, 1,
+ PyDoc_STR("(CFStringRef applicationID, CFStringRef userName, CFStringRef hostName) -> (Boolean _rv)")},
+ {"CFPreferencesCopyApplicationList", (PyCFunction)CF_CFPreferencesCopyApplicationList, 1,
+ PyDoc_STR("(CFStringRef userName, CFStringRef hostName) -> (CFArrayRef _rv)")},
+ {"CFPreferencesCopyKeyList", (PyCFunction)CF_CFPreferencesCopyKeyList, 1,
+ PyDoc_STR("(CFStringRef applicationID, CFStringRef userName, CFStringRef hostName) -> (CFArrayRef _rv)")},
+ {"CFStringGetTypeID", (PyCFunction)CF_CFStringGetTypeID, 1,
+ PyDoc_STR("() -> (CFTypeID _rv)")},
+ {"CFStringCreateWithPascalString", (PyCFunction)CF_CFStringCreateWithPascalString, 1,
+ PyDoc_STR("(Str255 pStr, CFStringEncoding encoding) -> (CFStringRef _rv)")},
+ {"CFStringCreateWithCString", (PyCFunction)CF_CFStringCreateWithCString, 1,
+ PyDoc_STR("(char* cStr, CFStringEncoding encoding) -> (CFStringRef _rv)")},
+ {"CFStringCreateWithCharacters", (PyCFunction)CF_CFStringCreateWithCharacters, 1,
+ PyDoc_STR("(Buffer chars) -> (CFStringRef _rv)")},
+ {"CFStringCreateWithPascalStringNoCopy", (PyCFunction)CF_CFStringCreateWithPascalStringNoCopy, 1,
+ PyDoc_STR("(Str255 pStr, CFStringEncoding encoding) -> (CFStringRef _rv)")},
+ {"CFStringCreateWithCStringNoCopy", (PyCFunction)CF_CFStringCreateWithCStringNoCopy, 1,
+ PyDoc_STR("(char* cStr, CFStringEncoding encoding) -> (CFStringRef _rv)")},
+ {"CFStringCreateWithCharactersNoCopy", (PyCFunction)CF_CFStringCreateWithCharactersNoCopy, 1,
+ PyDoc_STR("(Buffer chars) -> (CFStringRef _rv)")},
+ {"CFStringCreateMutable", (PyCFunction)CF_CFStringCreateMutable, 1,
+ PyDoc_STR("(CFIndex maxLength) -> (CFMutableStringRef _rv)")},
+ {"CFStringCreateMutableCopy", (PyCFunction)CF_CFStringCreateMutableCopy, 1,
+ PyDoc_STR("(CFIndex maxLength, CFStringRef theString) -> (CFMutableStringRef _rv)")},
+ {"CFStringCreateWithBytes", (PyCFunction)CF_CFStringCreateWithBytes, 1,
+ PyDoc_STR("(Buffer bytes, CFStringEncoding encoding, Boolean isExternalRepresentation) -> (CFStringRef _rv)")},
+ {"CFStringGetSystemEncoding", (PyCFunction)CF_CFStringGetSystemEncoding, 1,
+ PyDoc_STR("() -> (CFStringEncoding _rv)")},
+ {"CFStringGetMaximumSizeForEncoding", (PyCFunction)CF_CFStringGetMaximumSizeForEncoding, 1,
+ PyDoc_STR("(CFIndex length, CFStringEncoding encoding) -> (CFIndex _rv)")},
+ {"CFStringIsEncodingAvailable", (PyCFunction)CF_CFStringIsEncodingAvailable, 1,
+ PyDoc_STR("(CFStringEncoding encoding) -> (Boolean _rv)")},
+ {"CFStringGetNameOfEncoding", (PyCFunction)CF_CFStringGetNameOfEncoding, 1,
+ PyDoc_STR("(CFStringEncoding encoding) -> (CFStringRef _rv)")},
+ {"CFStringConvertEncodingToNSStringEncoding", (PyCFunction)CF_CFStringConvertEncodingToNSStringEncoding, 1,
+ PyDoc_STR("(CFStringEncoding encoding) -> (UInt32 _rv)")},
+ {"CFStringConvertNSStringEncodingToEncoding", (PyCFunction)CF_CFStringConvertNSStringEncodingToEncoding, 1,
+ PyDoc_STR("(UInt32 encoding) -> (CFStringEncoding _rv)")},
+ {"CFStringConvertEncodingToWindowsCodepage", (PyCFunction)CF_CFStringConvertEncodingToWindowsCodepage, 1,
+ PyDoc_STR("(CFStringEncoding encoding) -> (UInt32 _rv)")},
+ {"CFStringConvertWindowsCodepageToEncoding", (PyCFunction)CF_CFStringConvertWindowsCodepageToEncoding, 1,
+ PyDoc_STR("(UInt32 codepage) -> (CFStringEncoding _rv)")},
+ {"CFStringConvertEncodingToIANACharSetName", (PyCFunction)CF_CFStringConvertEncodingToIANACharSetName, 1,
+ PyDoc_STR("(CFStringEncoding encoding) -> (CFStringRef _rv)")},
+ {"CFStringGetMostCompatibleMacStringEncoding", (PyCFunction)CF_CFStringGetMostCompatibleMacStringEncoding, 1,
+ PyDoc_STR("(CFStringEncoding encoding) -> (CFStringEncoding _rv)")},
+ {"__CFStringMakeConstantString", (PyCFunction)CF___CFStringMakeConstantString, 1,
+ PyDoc_STR("(char* cStr) -> (CFStringRef _rv)")},
+ {"CFURLGetTypeID", (PyCFunction)CF_CFURLGetTypeID, 1,
+ PyDoc_STR("() -> (CFTypeID _rv)")},
+ {"CFURLCreateWithBytes", (PyCFunction)CF_CFURLCreateWithBytes, 1,
+ PyDoc_STR("(Buffer URLBytes, CFStringEncoding encoding, CFURLRef baseURL) -> (CFURLRef _rv)")},
+ {"CFURLCreateFromFileSystemRepresentation", (PyCFunction)CF_CFURLCreateFromFileSystemRepresentation, 1,
+ PyDoc_STR("(Buffer buffer, Boolean isDirectory) -> (CFURLRef _rv)")},
+ {"CFURLCreateFromFileSystemRepresentationRelativeToBase", (PyCFunction)CF_CFURLCreateFromFileSystemRepresentationRelativeToBase, 1,
+ PyDoc_STR("(Buffer buffer, Boolean isDirectory, CFURLRef baseURL) -> (CFURLRef _rv)")},
+ {"CFURLCreateFromFSRef", (PyCFunction)CF_CFURLCreateFromFSRef, 1,
+ PyDoc_STR("(FSRef fsRef) -> (CFURLRef _rv)")},
+ {"toCF", (PyCFunction)CF_toCF, 1,
+ PyDoc_STR("(python_object) -> (CF_object)")},
+ {NULL, NULL, 0}
};
@@ -4828,165 +4828,165 @@ static PyMethodDef CF_methods[] = {
/* Routines to convert any CF type to/from the corresponding CFxxxObj */
PyObject *CFObj_New(CFTypeRef itself)
{
- if (itself == NULL)
- {
- PyErr_SetString(PyExc_RuntimeError, "cannot wrap NULL");
- return NULL;
- }
- if (CFGetTypeID(itself) == CFArrayGetTypeID()) return CFArrayRefObj_New((CFArrayRef)itself);
- if (CFGetTypeID(itself) == CFDictionaryGetTypeID()) return CFDictionaryRefObj_New((CFDictionaryRef)itself);
- if (CFGetTypeID(itself) == CFDataGetTypeID()) return CFDataRefObj_New((CFDataRef)itself);
- if (CFGetTypeID(itself) == CFStringGetTypeID()) return CFStringRefObj_New((CFStringRef)itself);
- if (CFGetTypeID(itself) == CFURLGetTypeID()) return CFURLRefObj_New((CFURLRef)itself);
- /* XXXX Or should we use PyCF_CF2Python here?? */
- return CFTypeRefObj_New(itself);
+ if (itself == NULL)
+ {
+ PyErr_SetString(PyExc_RuntimeError, "cannot wrap NULL");
+ return NULL;
+ }
+ if (CFGetTypeID(itself) == CFArrayGetTypeID()) return CFArrayRefObj_New((CFArrayRef)itself);
+ if (CFGetTypeID(itself) == CFDictionaryGetTypeID()) return CFDictionaryRefObj_New((CFDictionaryRef)itself);
+ if (CFGetTypeID(itself) == CFDataGetTypeID()) return CFDataRefObj_New((CFDataRef)itself);
+ if (CFGetTypeID(itself) == CFStringGetTypeID()) return CFStringRefObj_New((CFStringRef)itself);
+ if (CFGetTypeID(itself) == CFURLGetTypeID()) return CFURLRefObj_New((CFURLRef)itself);
+ /* XXXX Or should we use PyCF_CF2Python here?? */
+ return CFTypeRefObj_New(itself);
}
int CFObj_Convert(PyObject *v, CFTypeRef *p_itself)
{
- if (v == Py_None) { *p_itself = NULL; return 1; }
- /* Check for other CF objects here */
-
- if (!CFTypeRefObj_Check(v) &&
- !CFArrayRefObj_Check(v) &&
- !CFMutableArrayRefObj_Check(v) &&
- !CFDictionaryRefObj_Check(v) &&
- !CFMutableDictionaryRefObj_Check(v) &&
- !CFDataRefObj_Check(v) &&
- !CFMutableDataRefObj_Check(v) &&
- !CFStringRefObj_Check(v) &&
- !CFMutableStringRefObj_Check(v) &&
- !CFURLRefObj_Check(v) )
- {
- /* XXXX Or should we use PyCF_Python2CF here?? */
- PyErr_SetString(PyExc_TypeError, "CF object required");
- return 0;
- }
- *p_itself = ((CFTypeRefObject *)v)->ob_itself;
- return 1;
+ if (v == Py_None) { *p_itself = NULL; return 1; }
+ /* Check for other CF objects here */
+
+ if (!CFTypeRefObj_Check(v) &&
+ !CFArrayRefObj_Check(v) &&
+ !CFMutableArrayRefObj_Check(v) &&
+ !CFDictionaryRefObj_Check(v) &&
+ !CFMutableDictionaryRefObj_Check(v) &&
+ !CFDataRefObj_Check(v) &&
+ !CFMutableDataRefObj_Check(v) &&
+ !CFStringRefObj_Check(v) &&
+ !CFMutableStringRefObj_Check(v) &&
+ !CFURLRefObj_Check(v) )
+ {
+ /* XXXX Or should we use PyCF_Python2CF here?? */
+ PyErr_SetString(PyExc_TypeError, "CF object required");
+ return 0;
+ }
+ *p_itself = ((CFTypeRefObject *)v)->ob_itself;
+ return 1;
}
void init_CF(void)
{
- PyObject *m;
- PyObject *d;
-
-
-
- PyMac_INIT_TOOLBOX_OBJECT_NEW(CFTypeRef, CFObj_New);
- PyMac_INIT_TOOLBOX_OBJECT_CONVERT(CFTypeRef, CFObj_Convert);
- PyMac_INIT_TOOLBOX_OBJECT_NEW(CFTypeRef, CFTypeRefObj_New);
- PyMac_INIT_TOOLBOX_OBJECT_CONVERT(CFTypeRef, CFTypeRefObj_Convert);
- PyMac_INIT_TOOLBOX_OBJECT_NEW(CFStringRef, CFStringRefObj_New);
- PyMac_INIT_TOOLBOX_OBJECT_CONVERT(CFStringRef, CFStringRefObj_Convert);
- PyMac_INIT_TOOLBOX_OBJECT_NEW(CFMutableStringRef, CFMutableStringRefObj_New);
- PyMac_INIT_TOOLBOX_OBJECT_CONVERT(CFMutableStringRef, CFMutableStringRefObj_Convert);
- PyMac_INIT_TOOLBOX_OBJECT_NEW(CFArrayRef, CFArrayRefObj_New);
- PyMac_INIT_TOOLBOX_OBJECT_CONVERT(CFArrayRef, CFArrayRefObj_Convert);
- PyMac_INIT_TOOLBOX_OBJECT_NEW(CFMutableArrayRef, CFMutableArrayRefObj_New);
- PyMac_INIT_TOOLBOX_OBJECT_CONVERT(CFMutableArrayRef, CFMutableArrayRefObj_Convert);
- PyMac_INIT_TOOLBOX_OBJECT_NEW(CFDictionaryRef, CFDictionaryRefObj_New);
- PyMac_INIT_TOOLBOX_OBJECT_CONVERT(CFDictionaryRef, CFDictionaryRefObj_Convert);
- PyMac_INIT_TOOLBOX_OBJECT_NEW(CFMutableDictionaryRef, CFMutableDictionaryRefObj_New);
- PyMac_INIT_TOOLBOX_OBJECT_CONVERT(CFMutableDictionaryRef, CFMutableDictionaryRefObj_Convert);
- PyMac_INIT_TOOLBOX_OBJECT_NEW(CFURLRef, CFURLRefObj_New);
- PyMac_INIT_TOOLBOX_OBJECT_CONVERT(CFURLRef, CFURLRefObj_Convert);
-
-
- m = Py_InitModule("_CF", CF_methods);
- d = PyModule_GetDict(m);
- CF_Error = PyMac_GetOSErrException();
- if (CF_Error == NULL ||
- PyDict_SetItemString(d, "Error", CF_Error) != 0)
- return;
- CFTypeRef_Type.ob_type = &PyType_Type;
- if (PyType_Ready(&CFTypeRef_Type) < 0) return;
- Py_INCREF(&CFTypeRef_Type);
- PyModule_AddObject(m, "CFTypeRef", (PyObject *)&CFTypeRef_Type);
- /* Backward-compatible name */
- Py_INCREF(&CFTypeRef_Type);
- PyModule_AddObject(m, "CFTypeRefType", (PyObject *)&CFTypeRef_Type);
- CFArrayRef_Type.ob_type = &PyType_Type;
- CFArrayRef_Type.tp_base = &CFTypeRef_Type;
- if (PyType_Ready(&CFArrayRef_Type) < 0) return;
- Py_INCREF(&CFArrayRef_Type);
- PyModule_AddObject(m, "CFArrayRef", (PyObject *)&CFArrayRef_Type);
- /* Backward-compatible name */
- Py_INCREF(&CFArrayRef_Type);
- PyModule_AddObject(m, "CFArrayRefType", (PyObject *)&CFArrayRef_Type);
- CFMutableArrayRef_Type.ob_type = &PyType_Type;
- CFMutableArrayRef_Type.tp_base = &CFArrayRef_Type;
- if (PyType_Ready(&CFMutableArrayRef_Type) < 0) return;
- Py_INCREF(&CFMutableArrayRef_Type);
- PyModule_AddObject(m, "CFMutableArrayRef", (PyObject *)&CFMutableArrayRef_Type);
- /* Backward-compatible name */
- Py_INCREF(&CFMutableArrayRef_Type);
- PyModule_AddObject(m, "CFMutableArrayRefType", (PyObject *)&CFMutableArrayRef_Type);
- CFDictionaryRef_Type.ob_type = &PyType_Type;
- CFDictionaryRef_Type.tp_base = &CFTypeRef_Type;
- if (PyType_Ready(&CFDictionaryRef_Type) < 0) return;
- Py_INCREF(&CFDictionaryRef_Type);
- PyModule_AddObject(m, "CFDictionaryRef", (PyObject *)&CFDictionaryRef_Type);
- /* Backward-compatible name */
- Py_INCREF(&CFDictionaryRef_Type);
- PyModule_AddObject(m, "CFDictionaryRefType", (PyObject *)&CFDictionaryRef_Type);
- CFMutableDictionaryRef_Type.ob_type = &PyType_Type;
- CFMutableDictionaryRef_Type.tp_base = &CFDictionaryRef_Type;
- if (PyType_Ready(&CFMutableDictionaryRef_Type) < 0) return;
- Py_INCREF(&CFMutableDictionaryRef_Type);
- PyModule_AddObject(m, "CFMutableDictionaryRef", (PyObject *)&CFMutableDictionaryRef_Type);
- /* Backward-compatible name */
- Py_INCREF(&CFMutableDictionaryRef_Type);
- PyModule_AddObject(m, "CFMutableDictionaryRefType", (PyObject *)&CFMutableDictionaryRef_Type);
- CFDataRef_Type.ob_type = &PyType_Type;
- CFDataRef_Type.tp_base = &CFTypeRef_Type;
- if (PyType_Ready(&CFDataRef_Type) < 0) return;
- Py_INCREF(&CFDataRef_Type);
- PyModule_AddObject(m, "CFDataRef", (PyObject *)&CFDataRef_Type);
- /* Backward-compatible name */
- Py_INCREF(&CFDataRef_Type);
- PyModule_AddObject(m, "CFDataRefType", (PyObject *)&CFDataRef_Type);
- CFMutableDataRef_Type.ob_type = &PyType_Type;
- CFMutableDataRef_Type.tp_base = &CFDataRef_Type;
- if (PyType_Ready(&CFMutableDataRef_Type) < 0) return;
- Py_INCREF(&CFMutableDataRef_Type);
- PyModule_AddObject(m, "CFMutableDataRef", (PyObject *)&CFMutableDataRef_Type);
- /* Backward-compatible name */
- Py_INCREF(&CFMutableDataRef_Type);
- PyModule_AddObject(m, "CFMutableDataRefType", (PyObject *)&CFMutableDataRef_Type);
- CFStringRef_Type.ob_type = &PyType_Type;
- CFStringRef_Type.tp_base = &CFTypeRef_Type;
- if (PyType_Ready(&CFStringRef_Type) < 0) return;
- Py_INCREF(&CFStringRef_Type);
- PyModule_AddObject(m, "CFStringRef", (PyObject *)&CFStringRef_Type);
- /* Backward-compatible name */
- Py_INCREF(&CFStringRef_Type);
- PyModule_AddObject(m, "CFStringRefType", (PyObject *)&CFStringRef_Type);
- CFMutableStringRef_Type.ob_type = &PyType_Type;
- CFMutableStringRef_Type.tp_base = &CFStringRef_Type;
- if (PyType_Ready(&CFMutableStringRef_Type) < 0) return;
- Py_INCREF(&CFMutableStringRef_Type);
- PyModule_AddObject(m, "CFMutableStringRef", (PyObject *)&CFMutableStringRef_Type);
- /* Backward-compatible name */
- Py_INCREF(&CFMutableStringRef_Type);
- PyModule_AddObject(m, "CFMutableStringRefType", (PyObject *)&CFMutableStringRef_Type);
- CFURLRef_Type.ob_type = &PyType_Type;
- CFURLRef_Type.tp_base = &CFTypeRef_Type;
- if (PyType_Ready(&CFURLRef_Type) < 0) return;
- Py_INCREF(&CFURLRef_Type);
- PyModule_AddObject(m, "CFURLRef", (PyObject *)&CFURLRef_Type);
- /* Backward-compatible name */
- Py_INCREF(&CFURLRef_Type);
- PyModule_AddObject(m, "CFURLRefType", (PyObject *)&CFURLRef_Type);
+ PyObject *m;
+ PyObject *d;
+
+
+
+ PyMac_INIT_TOOLBOX_OBJECT_NEW(CFTypeRef, CFObj_New);
+ PyMac_INIT_TOOLBOX_OBJECT_CONVERT(CFTypeRef, CFObj_Convert);
+ PyMac_INIT_TOOLBOX_OBJECT_NEW(CFTypeRef, CFTypeRefObj_New);
+ PyMac_INIT_TOOLBOX_OBJECT_CONVERT(CFTypeRef, CFTypeRefObj_Convert);
+ PyMac_INIT_TOOLBOX_OBJECT_NEW(CFStringRef, CFStringRefObj_New);
+ PyMac_INIT_TOOLBOX_OBJECT_CONVERT(CFStringRef, CFStringRefObj_Convert);
+ PyMac_INIT_TOOLBOX_OBJECT_NEW(CFMutableStringRef, CFMutableStringRefObj_New);
+ PyMac_INIT_TOOLBOX_OBJECT_CONVERT(CFMutableStringRef, CFMutableStringRefObj_Convert);
+ PyMac_INIT_TOOLBOX_OBJECT_NEW(CFArrayRef, CFArrayRefObj_New);
+ PyMac_INIT_TOOLBOX_OBJECT_CONVERT(CFArrayRef, CFArrayRefObj_Convert);
+ PyMac_INIT_TOOLBOX_OBJECT_NEW(CFMutableArrayRef, CFMutableArrayRefObj_New);
+ PyMac_INIT_TOOLBOX_OBJECT_CONVERT(CFMutableArrayRef, CFMutableArrayRefObj_Convert);
+ PyMac_INIT_TOOLBOX_OBJECT_NEW(CFDictionaryRef, CFDictionaryRefObj_New);
+ PyMac_INIT_TOOLBOX_OBJECT_CONVERT(CFDictionaryRef, CFDictionaryRefObj_Convert);
+ PyMac_INIT_TOOLBOX_OBJECT_NEW(CFMutableDictionaryRef, CFMutableDictionaryRefObj_New);
+ PyMac_INIT_TOOLBOX_OBJECT_CONVERT(CFMutableDictionaryRef, CFMutableDictionaryRefObj_Convert);
+ PyMac_INIT_TOOLBOX_OBJECT_NEW(CFURLRef, CFURLRefObj_New);
+ PyMac_INIT_TOOLBOX_OBJECT_CONVERT(CFURLRef, CFURLRefObj_Convert);
+
+
+ m = Py_InitModule("_CF", CF_methods);
+ d = PyModule_GetDict(m);
+ CF_Error = PyMac_GetOSErrException();
+ if (CF_Error == NULL ||
+ PyDict_SetItemString(d, "Error", CF_Error) != 0)
+ return;
+ CFTypeRef_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&CFTypeRef_Type) < 0) return;
+ Py_INCREF(&CFTypeRef_Type);
+ PyModule_AddObject(m, "CFTypeRef", (PyObject *)&CFTypeRef_Type);
+ /* Backward-compatible name */
+ Py_INCREF(&CFTypeRef_Type);
+ PyModule_AddObject(m, "CFTypeRefType", (PyObject *)&CFTypeRef_Type);
+ CFArrayRef_Type.ob_type = &PyType_Type;
+ CFArrayRef_Type.tp_base = &CFTypeRef_Type;
+ if (PyType_Ready(&CFArrayRef_Type) < 0) return;
+ Py_INCREF(&CFArrayRef_Type);
+ PyModule_AddObject(m, "CFArrayRef", (PyObject *)&CFArrayRef_Type);
+ /* Backward-compatible name */
+ Py_INCREF(&CFArrayRef_Type);
+ PyModule_AddObject(m, "CFArrayRefType", (PyObject *)&CFArrayRef_Type);
+ CFMutableArrayRef_Type.ob_type = &PyType_Type;
+ CFMutableArrayRef_Type.tp_base = &CFArrayRef_Type;
+ if (PyType_Ready(&CFMutableArrayRef_Type) < 0) return;
+ Py_INCREF(&CFMutableArrayRef_Type);
+ PyModule_AddObject(m, "CFMutableArrayRef", (PyObject *)&CFMutableArrayRef_Type);
+ /* Backward-compatible name */
+ Py_INCREF(&CFMutableArrayRef_Type);
+ PyModule_AddObject(m, "CFMutableArrayRefType", (PyObject *)&CFMutableArrayRef_Type);
+ CFDictionaryRef_Type.ob_type = &PyType_Type;
+ CFDictionaryRef_Type.tp_base = &CFTypeRef_Type;
+ if (PyType_Ready(&CFDictionaryRef_Type) < 0) return;
+ Py_INCREF(&CFDictionaryRef_Type);
+ PyModule_AddObject(m, "CFDictionaryRef", (PyObject *)&CFDictionaryRef_Type);
+ /* Backward-compatible name */
+ Py_INCREF(&CFDictionaryRef_Type);
+ PyModule_AddObject(m, "CFDictionaryRefType", (PyObject *)&CFDictionaryRef_Type);
+ CFMutableDictionaryRef_Type.ob_type = &PyType_Type;
+ CFMutableDictionaryRef_Type.tp_base = &CFDictionaryRef_Type;
+ if (PyType_Ready(&CFMutableDictionaryRef_Type) < 0) return;
+ Py_INCREF(&CFMutableDictionaryRef_Type);
+ PyModule_AddObject(m, "CFMutableDictionaryRef", (PyObject *)&CFMutableDictionaryRef_Type);
+ /* Backward-compatible name */
+ Py_INCREF(&CFMutableDictionaryRef_Type);
+ PyModule_AddObject(m, "CFMutableDictionaryRefType", (PyObject *)&CFMutableDictionaryRef_Type);
+ CFDataRef_Type.ob_type = &PyType_Type;
+ CFDataRef_Type.tp_base = &CFTypeRef_Type;
+ if (PyType_Ready(&CFDataRef_Type) < 0) return;
+ Py_INCREF(&CFDataRef_Type);
+ PyModule_AddObject(m, "CFDataRef", (PyObject *)&CFDataRef_Type);
+ /* Backward-compatible name */
+ Py_INCREF(&CFDataRef_Type);
+ PyModule_AddObject(m, "CFDataRefType", (PyObject *)&CFDataRef_Type);
+ CFMutableDataRef_Type.ob_type = &PyType_Type;
+ CFMutableDataRef_Type.tp_base = &CFDataRef_Type;
+ if (PyType_Ready(&CFMutableDataRef_Type) < 0) return;
+ Py_INCREF(&CFMutableDataRef_Type);
+ PyModule_AddObject(m, "CFMutableDataRef", (PyObject *)&CFMutableDataRef_Type);
+ /* Backward-compatible name */
+ Py_INCREF(&CFMutableDataRef_Type);
+ PyModule_AddObject(m, "CFMutableDataRefType", (PyObject *)&CFMutableDataRef_Type);
+ CFStringRef_Type.ob_type = &PyType_Type;
+ CFStringRef_Type.tp_base = &CFTypeRef_Type;
+ if (PyType_Ready(&CFStringRef_Type) < 0) return;
+ Py_INCREF(&CFStringRef_Type);
+ PyModule_AddObject(m, "CFStringRef", (PyObject *)&CFStringRef_Type);
+ /* Backward-compatible name */
+ Py_INCREF(&CFStringRef_Type);
+ PyModule_AddObject(m, "CFStringRefType", (PyObject *)&CFStringRef_Type);
+ CFMutableStringRef_Type.ob_type = &PyType_Type;
+ CFMutableStringRef_Type.tp_base = &CFStringRef_Type;
+ if (PyType_Ready(&CFMutableStringRef_Type) < 0) return;
+ Py_INCREF(&CFMutableStringRef_Type);
+ PyModule_AddObject(m, "CFMutableStringRef", (PyObject *)&CFMutableStringRef_Type);
+ /* Backward-compatible name */
+ Py_INCREF(&CFMutableStringRef_Type);
+ PyModule_AddObject(m, "CFMutableStringRefType", (PyObject *)&CFMutableStringRef_Type);
+ CFURLRef_Type.ob_type = &PyType_Type;
+ CFURLRef_Type.tp_base = &CFTypeRef_Type;
+ if (PyType_Ready(&CFURLRef_Type) < 0) return;
+ Py_INCREF(&CFURLRef_Type);
+ PyModule_AddObject(m, "CFURLRef", (PyObject *)&CFURLRef_Type);
+ /* Backward-compatible name */
+ Py_INCREF(&CFURLRef_Type);
+ PyModule_AddObject(m, "CFURLRefType", (PyObject *)&CFURLRef_Type);
#define _STRINGCONST(name) PyModule_AddObject(m, #name, CFStringRefObj_New(name))
- _STRINGCONST(kCFPreferencesAnyApplication);
- _STRINGCONST(kCFPreferencesCurrentApplication);
- _STRINGCONST(kCFPreferencesAnyHost);
- _STRINGCONST(kCFPreferencesCurrentHost);
- _STRINGCONST(kCFPreferencesAnyUser);
- _STRINGCONST(kCFPreferencesCurrentUser);
+ _STRINGCONST(kCFPreferencesAnyApplication);
+ _STRINGCONST(kCFPreferencesCurrentApplication);
+ _STRINGCONST(kCFPreferencesAnyHost);
+ _STRINGCONST(kCFPreferencesCurrentHost);
+ _STRINGCONST(kCFPreferencesAnyUser);
+ _STRINGCONST(kCFPreferencesCurrentUser);
diff --git a/Mac/Modules/cf/pycfbridge.c b/Mac/Modules/cf/pycfbridge.c
index 06700b3..708c1e6 100644
--- a/Mac/Modules/cf/pycfbridge.c
+++ b/Mac/Modules/cf/pycfbridge.c
@@ -15,128 +15,128 @@
PyObject *
PyCF_CF2Python(CFTypeRef src) {
- CFTypeID typeid;
-
- if( src == NULL ) {
- Py_INCREF(Py_None);
- return Py_None;
- }
- typeid = CFGetTypeID(src);
- if (typeid == CFArrayGetTypeID())
- return PyCF_CF2Python_sequence((CFArrayRef)src);
- if (typeid == CFDictionaryGetTypeID())
- return PyCF_CF2Python_mapping((CFDictionaryRef)src);
- return PyCF_CF2Python_simple(src);
+ CFTypeID typeid;
+
+ if( src == NULL ) {
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
+ typeid = CFGetTypeID(src);
+ if (typeid == CFArrayGetTypeID())
+ return PyCF_CF2Python_sequence((CFArrayRef)src);
+ if (typeid == CFDictionaryGetTypeID())
+ return PyCF_CF2Python_mapping((CFDictionaryRef)src);
+ return PyCF_CF2Python_simple(src);
}
PyObject *
PyCF_CF2Python_sequence(CFArrayRef src) {
- int size = CFArrayGetCount(src);
- PyObject *rv;
- CFTypeRef item_cf;
- PyObject *item_py = NULL;
- int i;
-
- if ( (rv=PyList_New(size)) == NULL )
- return NULL;
- for(i=0; i<size; i++) {
- item_cf = CFArrayGetValueAtIndex(src, i);
- if (item_cf == NULL ) goto err;
- item_py = PyCF_CF2Python(item_cf);
- if (item_py == NULL ) goto err;
- if (PyList_SetItem(rv, i, item_py) < 0) goto err;
- item_py = NULL;
- }
- return rv;
+ int size = CFArrayGetCount(src);
+ PyObject *rv;
+ CFTypeRef item_cf;
+ PyObject *item_py = NULL;
+ int i;
+
+ if ( (rv=PyList_New(size)) == NULL )
+ return NULL;
+ for(i=0; i<size; i++) {
+ item_cf = CFArrayGetValueAtIndex(src, i);
+ if (item_cf == NULL ) goto err;
+ item_py = PyCF_CF2Python(item_cf);
+ if (item_py == NULL ) goto err;
+ if (PyList_SetItem(rv, i, item_py) < 0) goto err;
+ item_py = NULL;
+ }
+ return rv;
err:
- Py_XDECREF(item_py);
- Py_DECREF(rv);
- return NULL;
+ Py_XDECREF(item_py);
+ Py_DECREF(rv);
+ return NULL;
}
PyObject *
PyCF_CF2Python_mapping(CFTypeRef src) {
- int size = CFDictionaryGetCount(src);
- PyObject *rv = NULL;
- CFTypeRef *allkeys = NULL, *allvalues = NULL;
- CFTypeRef key_cf, value_cf;
- PyObject *key_py = NULL, *value_py = NULL;
- int i;
-
- allkeys = malloc(size*sizeof(CFTypeRef *));
- if (allkeys == NULL) {
- PyErr_NoMemory();
- goto err;
- }
- allvalues = malloc(size*sizeof(CFTypeRef *));
- if (allvalues == NULL) {
- PyErr_NoMemory();
- goto err;
- }
- if ( (rv=PyDict_New()) == NULL ) goto err;
- CFDictionaryGetKeysAndValues(src, allkeys, allvalues);
- for(i=0; i<size; i++) {
- key_cf = allkeys[i];
- value_cf = allvalues[i];
- key_py = PyCF_CF2Python(key_cf);
- if (key_py == NULL ) goto err;
- value_py = PyCF_CF2Python(value_cf);
- if (value_py == NULL ) goto err;
- if (PyDict_SetItem(rv, key_py, value_py) < 0) goto err;
- key_py = NULL;
- value_py = NULL;
- }
- return rv;
+ int size = CFDictionaryGetCount(src);
+ PyObject *rv = NULL;
+ CFTypeRef *allkeys = NULL, *allvalues = NULL;
+ CFTypeRef key_cf, value_cf;
+ PyObject *key_py = NULL, *value_py = NULL;
+ int i;
+
+ allkeys = malloc(size*sizeof(CFTypeRef *));
+ if (allkeys == NULL) {
+ PyErr_NoMemory();
+ goto err;
+ }
+ allvalues = malloc(size*sizeof(CFTypeRef *));
+ if (allvalues == NULL) {
+ PyErr_NoMemory();
+ goto err;
+ }
+ if ( (rv=PyDict_New()) == NULL ) goto err;
+ CFDictionaryGetKeysAndValues(src, allkeys, allvalues);
+ for(i=0; i<size; i++) {
+ key_cf = allkeys[i];
+ value_cf = allvalues[i];
+ key_py = PyCF_CF2Python(key_cf);
+ if (key_py == NULL ) goto err;
+ value_py = PyCF_CF2Python(value_cf);
+ if (value_py == NULL ) goto err;
+ if (PyDict_SetItem(rv, key_py, value_py) < 0) goto err;
+ key_py = NULL;
+ value_py = NULL;
+ }
+ return rv;
err:
- Py_XDECREF(key_py);
- Py_XDECREF(value_py);
- Py_XDECREF(rv);
- free(allkeys);
- free(allvalues);
- return NULL;
+ Py_XDECREF(key_py);
+ Py_XDECREF(value_py);
+ Py_XDECREF(rv);
+ free(allkeys);
+ free(allvalues);
+ return NULL;
}
PyObject *
PyCF_CF2Python_simple(CFTypeRef src) {
- CFTypeID typeid;
-
- typeid = CFGetTypeID(src);
- if (typeid == CFStringGetTypeID())
- return PyCF_CF2Python_string((CFStringRef)src);
- if (typeid == CFBooleanGetTypeID())
- return PyBool_FromLong((long)CFBooleanGetValue(src));
- if (typeid == CFNumberGetTypeID()) {
- if (CFNumberIsFloatType(src)) {
- double d;
- CFNumberGetValue(src, kCFNumberDoubleType, &d);
- return PyFloat_FromDouble(d);
- } else {
- long l;
- if (!CFNumberGetValue(src, kCFNumberLongType, &l))
- /* XXXX Out of range! */;
- return PyInt_FromLong(l);
- }
- }
- /* XXXX Should return as CFTypeRef, really... */
- PyMac_Error(resNotFound);
- return NULL;
+ CFTypeID typeid;
+
+ typeid = CFGetTypeID(src);
+ if (typeid == CFStringGetTypeID())
+ return PyCF_CF2Python_string((CFStringRef)src);
+ if (typeid == CFBooleanGetTypeID())
+ return PyBool_FromLong((long)CFBooleanGetValue(src));
+ if (typeid == CFNumberGetTypeID()) {
+ if (CFNumberIsFloatType(src)) {
+ double d;
+ CFNumberGetValue(src, kCFNumberDoubleType, &d);
+ return PyFloat_FromDouble(d);
+ } else {
+ long l;
+ if (!CFNumberGetValue(src, kCFNumberLongType, &l))
+ /* XXXX Out of range! */;
+ return PyInt_FromLong(l);
+ }
+ }
+ /* XXXX Should return as CFTypeRef, really... */
+ PyMac_Error(resNotFound);
+ return NULL;
}
/* Unsure - Return unicode or 8 bit strings? */
PyObject *
PyCF_CF2Python_string(CFStringRef src) {
- int size = CFStringGetLength(src)+1;
- Py_UNICODE *data = malloc(size*sizeof(Py_UNICODE));
- CFRange range;
- PyObject *rv;
+ int size = CFStringGetLength(src)+1;
+ Py_UNICODE *data = malloc(size*sizeof(Py_UNICODE));
+ CFRange range;
+ PyObject *rv;
- range.location = 0;
- range.length = size;
- if( data == NULL ) return PyErr_NoMemory();
- CFStringGetCharacters(src, range, data);
- rv = (PyObject *)PyUnicode_FromUnicode(data, size-1);
- free(data);
- return rv;
+ range.location = 0;
+ range.length = size;
+ if( data == NULL ) return PyErr_NoMemory();
+ CFStringGetCharacters(src, range, data);
+ rv = (PyObject *)PyUnicode_FromUnicode(data, size-1);
+ free(data);
+ return rv;
}
/* ---------------------------------------- */
@@ -146,158 +146,158 @@ PyCF_CF2Python_string(CFStringRef src) {
int
PyCF_Python2CF(PyObject *src, CFTypeRef *dst) {
- if (PyString_Check(src) || PyUnicode_Check(src))
- return PyCF_Python2CF_simple(src, dst);
- if (PySequence_Check(src))
- return PyCF_Python2CF_sequence(src, (CFArrayRef *)dst);
- if (PyMapping_Check(src))
- return PyCF_Python2CF_mapping(src, (CFDictionaryRef *)dst);
- return PyCF_Python2CF_simple(src, dst);
+ if (PyString_Check(src) || PyUnicode_Check(src))
+ return PyCF_Python2CF_simple(src, dst);
+ if (PySequence_Check(src))
+ return PyCF_Python2CF_sequence(src, (CFArrayRef *)dst);
+ if (PyMapping_Check(src))
+ return PyCF_Python2CF_mapping(src, (CFDictionaryRef *)dst);
+ return PyCF_Python2CF_simple(src, dst);
}
int
PyCF_Python2CF_sequence(PyObject *src, CFArrayRef *dst) {
- CFMutableArrayRef rv = NULL;
- CFTypeRef item_cf = NULL;
- PyObject *item_py = NULL;
- int size, i;
-
- if( !PySequence_Check(src) ) {
- PyErr_Format(PyExc_TypeError,
- "Cannot convert %.500s objects to CFArray",
- src->ob_type->tp_name);
- return 0;
- }
- size = PySequence_Size(src);
- rv = CFArrayCreateMutable((CFAllocatorRef)NULL, size, &kCFTypeArrayCallBacks);
- if (rv == NULL) {
- PyMac_Error(resNotFound);
- goto err;
- }
+ CFMutableArrayRef rv = NULL;
+ CFTypeRef item_cf = NULL;
+ PyObject *item_py = NULL;
+ int size, i;
+
+ if( !PySequence_Check(src) ) {
+ PyErr_Format(PyExc_TypeError,
+ "Cannot convert %.500s objects to CFArray",
+ src->ob_type->tp_name);
+ return 0;
+ }
+ size = PySequence_Size(src);
+ rv = CFArrayCreateMutable((CFAllocatorRef)NULL, size, &kCFTypeArrayCallBacks);
+ if (rv == NULL) {
+ PyMac_Error(resNotFound);
+ goto err;
+ }
- for( i=0; i<size; i++) {
- item_py = PySequence_GetItem(src, i);
- if (item_py == NULL) goto err;
- if ( !PyCF_Python2CF(item_py, &item_cf)) goto err;
- Py_DECREF(item_py);
- CFArraySetValueAtIndex(rv, i, item_cf);
- CFRelease(item_cf);
- item_cf = NULL;
- }
- *dst = rv;
- return 1;
+ for( i=0; i<size; i++) {
+ item_py = PySequence_GetItem(src, i);
+ if (item_py == NULL) goto err;
+ if ( !PyCF_Python2CF(item_py, &item_cf)) goto err;
+ Py_DECREF(item_py);
+ CFArraySetValueAtIndex(rv, i, item_cf);
+ CFRelease(item_cf);
+ item_cf = NULL;
+ }
+ *dst = rv;
+ return 1;
err:
- Py_XDECREF(item_py);
- if (rv) CFRelease(rv);
- if (item_cf) CFRelease(item_cf);
- return 0;
+ Py_XDECREF(item_py);
+ if (rv) CFRelease(rv);
+ if (item_cf) CFRelease(item_cf);
+ return 0;
}
int
PyCF_Python2CF_mapping(PyObject *src, CFDictionaryRef *dst) {
- CFMutableDictionaryRef rv = NULL;
- PyObject *aslist = NULL;
- CFTypeRef key_cf = NULL, value_cf = NULL;
- PyObject *item_py = NULL, *key_py = NULL, *value_py = NULL;
- int size, i;
-
- if( !PyMapping_Check(src) ) {
- PyErr_Format(PyExc_TypeError,
- "Cannot convert %.500s objects to CFDictionary",
- src->ob_type->tp_name);
- return 0;
- }
- size = PyMapping_Size(src);
- rv = CFDictionaryCreateMutable((CFAllocatorRef)NULL, size,
- &kCFTypeDictionaryKeyCallBacks,
- &kCFTypeDictionaryValueCallBacks);
- if (rv == NULL) {
- PyMac_Error(resNotFound);
- goto err;
- }
- if ( (aslist = PyMapping_Items(src)) == NULL ) goto err;
+ CFMutableDictionaryRef rv = NULL;
+ PyObject *aslist = NULL;
+ CFTypeRef key_cf = NULL, value_cf = NULL;
+ PyObject *item_py = NULL, *key_py = NULL, *value_py = NULL;
+ int size, i;
- for( i=0; i<size; i++) {
- item_py = PySequence_GetItem(aslist, i);
- if (item_py == NULL) goto err;
- if (!PyArg_ParseTuple(item_py, "OO", &key_py, &value_py)) goto err;
- if ( !PyCF_Python2CF(key_py, &key_cf) ) goto err;
- if ( !PyCF_Python2CF(value_py, &value_cf) ) goto err;
- CFDictionaryAddValue(rv, key_cf, value_cf);
- CFRelease(key_cf);
- key_cf = NULL;
- CFRelease(value_cf);
- value_cf = NULL;
- }
- *dst = rv;
- return 1;
+ if( !PyMapping_Check(src) ) {
+ PyErr_Format(PyExc_TypeError,
+ "Cannot convert %.500s objects to CFDictionary",
+ src->ob_type->tp_name);
+ return 0;
+ }
+ size = PyMapping_Size(src);
+ rv = CFDictionaryCreateMutable((CFAllocatorRef)NULL, size,
+ &kCFTypeDictionaryKeyCallBacks,
+ &kCFTypeDictionaryValueCallBacks);
+ if (rv == NULL) {
+ PyMac_Error(resNotFound);
+ goto err;
+ }
+ if ( (aslist = PyMapping_Items(src)) == NULL ) goto err;
+
+ for( i=0; i<size; i++) {
+ item_py = PySequence_GetItem(aslist, i);
+ if (item_py == NULL) goto err;
+ if (!PyArg_ParseTuple(item_py, "OO", &key_py, &value_py)) goto err;
+ if ( !PyCF_Python2CF(key_py, &key_cf) ) goto err;
+ if ( !PyCF_Python2CF(value_py, &value_cf) ) goto err;
+ CFDictionaryAddValue(rv, key_cf, value_cf);
+ CFRelease(key_cf);
+ key_cf = NULL;
+ CFRelease(value_cf);
+ value_cf = NULL;
+ }
+ *dst = rv;
+ return 1;
err:
- Py_XDECREF(item_py);
- Py_XDECREF(aslist);
- if (rv) CFRelease(rv);
- if (key_cf) CFRelease(key_cf);
- if (value_cf) CFRelease(value_cf);
- return 0;
+ Py_XDECREF(item_py);
+ Py_XDECREF(aslist);
+ if (rv) CFRelease(rv);
+ if (key_cf) CFRelease(key_cf);
+ if (value_cf) CFRelease(value_cf);
+ return 0;
}
int
PyCF_Python2CF_simple(PyObject *src, CFTypeRef *dst) {
-
+
#if 0
- if (PyObject_HasAttrString(src, "CFType")) {
- *dst = PyObject_CallMethod(src, "CFType", "");
- return (*dst != NULL);
- }
+ if (PyObject_HasAttrString(src, "CFType")) {
+ *dst = PyObject_CallMethod(src, "CFType", "");
+ return (*dst != NULL);
+ }
#endif
- if (PyString_Check(src) || PyUnicode_Check(src))
- return PyCF_Python2CF_string(src, (CFStringRef *)dst);
- if (PyBool_Check(src)) {
- if (src == Py_True)
- *dst = kCFBooleanTrue;
- else
- *dst = kCFBooleanFalse;
- return 1;
- }
- if (PyInt_Check(src)) {
- long v = PyInt_AsLong(src);
- *dst = CFNumberCreate(NULL, kCFNumberLongType, &v);
- return 1;
- }
- if (PyFloat_Check(src)) {
- double d = PyFloat_AsDouble(src);
- *dst = CFNumberCreate(NULL, kCFNumberDoubleType, &d);
- return 1;
- }
-
- PyErr_Format(PyExc_TypeError,
- "Cannot convert %.500s objects to CFType",
- src->ob_type->tp_name);
- return 0;
+ if (PyString_Check(src) || PyUnicode_Check(src))
+ return PyCF_Python2CF_string(src, (CFStringRef *)dst);
+ if (PyBool_Check(src)) {
+ if (src == Py_True)
+ *dst = kCFBooleanTrue;
+ else
+ *dst = kCFBooleanFalse;
+ return 1;
+ }
+ if (PyInt_Check(src)) {
+ long v = PyInt_AsLong(src);
+ *dst = CFNumberCreate(NULL, kCFNumberLongType, &v);
+ return 1;
+ }
+ if (PyFloat_Check(src)) {
+ double d = PyFloat_AsDouble(src);
+ *dst = CFNumberCreate(NULL, kCFNumberDoubleType, &d);
+ return 1;
+ }
+
+ PyErr_Format(PyExc_TypeError,
+ "Cannot convert %.500s objects to CFType",
+ src->ob_type->tp_name);
+ return 0;
}
int
PyCF_Python2CF_string(PyObject *src, CFStringRef *dst) {
- char *chars;
- CFIndex size;
- UniChar *unichars;
-
- if (PyString_Check(src)) {
- if (!PyArg_Parse(src, "es", "ascii", &chars))
- return 0; /* This error is more descriptive than the general one below */
- *dst = CFStringCreateWithCString((CFAllocatorRef)NULL, chars, kCFStringEncodingASCII);
- PyMem_Free(chars);
- return 1;
- }
- if (PyUnicode_Check(src)) {
- /* We use the CF types here, if Python was configured differently that will give an error */
- size = PyUnicode_GetSize(src);
- if ((unichars = PyUnicode_AsUnicode(src)) == NULL ) goto err;
- *dst = CFStringCreateWithCharacters((CFAllocatorRef)NULL, unichars, size);
- return 1;
- }
+ char *chars;
+ CFIndex size;
+ UniChar *unichars;
+
+ if (PyString_Check(src)) {
+ if (!PyArg_Parse(src, "es", "ascii", &chars))
+ return 0; /* This error is more descriptive than the general one below */
+ *dst = CFStringCreateWithCString((CFAllocatorRef)NULL, chars, kCFStringEncodingASCII);
+ PyMem_Free(chars);
+ return 1;
+ }
+ if (PyUnicode_Check(src)) {
+ /* We use the CF types here, if Python was configured differently that will give an error */
+ size = PyUnicode_GetSize(src);
+ if ((unichars = PyUnicode_AsUnicode(src)) == NULL ) goto err;
+ *dst = CFStringCreateWithCharacters((CFAllocatorRef)NULL, unichars, size);
+ return 1;
+ }
err:
- PyErr_Format(PyExc_TypeError,
- "Cannot convert %.500s objects to CFString",
- src->ob_type->tp_name);
- return 0;
+ PyErr_Format(PyExc_TypeError,
+ "Cannot convert %.500s objects to CFString",
+ src->ob_type->tp_name);
+ return 0;
}
diff --git a/Mac/Modules/cg/CFMLateImport.c b/Mac/Modules/cg/CFMLateImport.c
index bc2976e..955acfb 100755
--- a/Mac/Modules/cg/CFMLateImport.c
+++ b/Mac/Modules/cg/CFMLateImport.c
@@ -1,45 +1,45 @@
/*
- File: CFMLateImport.c
-
- Contains: Implementation of CFM late import library.
-
- Written by: Quinn
-
- Copyright: Copyright © 1999 by Apple Computer, Inc., all rights reserved.
-
- You may incorporate this Apple sample source code into your program(s) without
- restriction. This Apple sample source code has been provided "AS IS" and the
- responsibility for its operation is yours. You are not permitted to redistribute
- this Apple sample source code as "Apple sample source code" after having made
- changes. If you're going to re-distribute the source, we require that you make
- it clear in the source that the code was descended from Apple sample source
- code, but that you've made changes.
-
- Change History (most recent first):
-
- <13> 24/9/01 Quinn Fixes to compile with C++ activated.
- <12> 21/9/01 Quinn [2710489] Fix typo in the comments for FragmentLookup.
- <11> 21/9/01 Quinn Changes for CWPro7 Mach-O build.
- <10> 19/9/01 Quinn Corrected implementation of kPEFRelocSmBySection. Added
- implementations of kPEFRelocSetPosition and kPEFRelocLgByImport
- (from code contributed by Eric Grant, Ned Holbrook, and Steve
- Kalkwarf), although I can't test them yet.
- <9> 19/9/01 Quinn We now handle unpacked data sections, courtesy of some code from
- Ned Holbrook.
- <8> 19/9/01 Quinn Minor fixes for the previous checkin. Updated some comments and
- killed some dead code.
- <7> 19/9/01 Quinn Simplified API and implementation after a suggestion by Eric
- Grant. You no longer have to CFM export a dummy function; you
- can just pass in the address of your fragment's init routine.
- <6> 15/2/01 Quinn Modify compile-time warnings to complain if you try to build
- this module into a Mach-O binary.
- <5> 5/2/01 Quinn Removed redundant assignment in CFMLateImportCore.
- <4> 30/11/00 Quinn Added comment about future of data symbols in CF.
- <3> 16/11/00 Quinn Allow symbol finding via a callback and use that to implement
- CFBundle support.
- <2> 18/10/99 Quinn Renamed CFMLateImport to CFMLateImportLibrary to allow for
- possible future API expansion.
- <1> 15/6/99 Quinn First checked in.
+ File: CFMLateImport.c
+
+ Contains: Implementation of CFM late import library.
+
+ Written by: Quinn
+
+ Copyright: Copyright © 1999 by Apple Computer, Inc., all rights reserved.
+
+ You may incorporate this Apple sample source code into your program(s) without
+ restriction. This Apple sample source code has been provided "AS IS" and the
+ responsibility for its operation is yours. You are not permitted to redistribute
+ this Apple sample source code as "Apple sample source code" after having made
+ changes. If you're going to re-distribute the source, we require that you make
+ it clear in the source that the code was descended from Apple sample source
+ code, but that you've made changes.
+
+ Change History (most recent first):
+
+ <13> 24/9/01 Quinn Fixes to compile with C++ activated.
+ <12> 21/9/01 Quinn [2710489] Fix typo in the comments for FragmentLookup.
+ <11> 21/9/01 Quinn Changes for CWPro7 Mach-O build.
+ <10> 19/9/01 Quinn Corrected implementation of kPEFRelocSmBySection. Added
+ implementations of kPEFRelocSetPosition and kPEFRelocLgByImport
+ (from code contributed by Eric Grant, Ned Holbrook, and Steve
+ Kalkwarf), although I can't test them yet.
+ <9> 19/9/01 Quinn We now handle unpacked data sections, courtesy of some code from
+ Ned Holbrook.
+ <8> 19/9/01 Quinn Minor fixes for the previous checkin. Updated some comments and
+ killed some dead code.
+ <7> 19/9/01 Quinn Simplified API and implementation after a suggestion by Eric
+ Grant. You no longer have to CFM export a dummy function; you
+ can just pass in the address of your fragment's init routine.
+ <6> 15/2/01 Quinn Modify compile-time warnings to complain if you try to build
+ this module into a Mach-O binary.
+ <5> 5/2/01 Quinn Removed redundant assignment in CFMLateImportCore.
+ <4> 30/11/00 Quinn Added comment about future of data symbols in CF.
+ <3> 16/11/00 Quinn Allow symbol finding via a callback and use that to implement
+ CFBundle support.
+ <2> 18/10/99 Quinn Renamed CFMLateImport to CFMLateImportLibrary to allow for
+ possible future API expansion.
+ <1> 15/6/99 Quinn First checked in.
*/
// To Do List:
@@ -66,8 +66,8 @@
// Mac OS Interfaces
#if ! MORE_FRAMEWORK_INCLUDES
- #include <CodeFragments.h>
- #include <PEFBinaryFormat.h>
+ #include <CodeFragments.h>
+ #include <PEFBinaryFormat.h>
#endif
// Standard C Interfaces
@@ -86,32 +86,32 @@
/////////////////////////////////////////////////////////////////
#if TARGET_RT_MAC_MACHO
- #error CFMLateImport is not suitable for use in a Mach-O project.
+ #error CFMLateImport is not suitable for use in a Mach-O project.
#elif !TARGET_RT_MAC_CFM || !TARGET_CPU_PPC
- #error CFMLateImport has not been qualified for 68K or CFM-68K use.
+ #error CFMLateImport has not been qualified for 68K or CFM-68K use.
#endif
/////////////////////////////////////////////////////////////////
#pragma mark ----- Utility Routines -----
static OSStatus FSReadAtOffset(SInt16 refNum, SInt32 offset, SInt32 count, void *buffer)
- // A convenient wrapper around PBRead which has two advantages
- // over FSRead. First, it takes count as a value parameter.
- // Second, it reads from an arbitrary offset into the file,
- // which avoids a bunch of SetFPos calls.
- //
- // I guess this should go into "MoreFiles.h", but I'm not sure
- // how we're going to integrate such a concept into MIB yet.
+ // A convenient wrapper around PBRead which has two advantages
+ // over FSRead. First, it takes count as a value parameter.
+ // Second, it reads from an arbitrary offset into the file,
+ // which avoids a bunch of SetFPos calls.
+ //
+ // I guess this should go into "MoreFiles.h", but I'm not sure
+ // how we're going to integrate such a concept into MIB yet.
{
- ParamBlockRec pb;
-
- pb.ioParam.ioRefNum = refNum;
- pb.ioParam.ioBuffer = (Ptr) buffer;
- pb.ioParam.ioReqCount = count;
- pb.ioParam.ioPosMode = fsFromStart;
- pb.ioParam.ioPosOffset = offset;
-
- return PBReadSync(&pb);
+ ParamBlockRec pb;
+
+ pb.ioParam.ioRefNum = refNum;
+ pb.ioParam.ioBuffer = (Ptr) buffer;
+ pb.ioParam.ioReqCount = count;
+ pb.ioParam.ioPosMode = fsFromStart;
+ pb.ioParam.ioPosOffset = offset;
+
+ return PBReadSync(&pb);
}
/////////////////////////////////////////////////////////////////
@@ -124,16 +124,16 @@ static OSStatus FSReadAtOffset(SInt16 refNum, SInt32 offset, SInt32 count, void
// we fill out more fields.
struct FragToFixInfo {
- CFragSystem7DiskFlatLocator locator; // How to find the fragment's container.
- CFragConnectionID connID; // CFM connection to the fragment.
- CFragInitFunction initRoutine; // The CFM init routine for the fragment.
- PEFContainerHeader containerHeader; // The CFM header, read in from the container.
- PEFSectionHeader *sectionHeaders; // The CFM section headers. A pointer block containing an array of containerHeader.sectionCount elements.
- PEFLoaderInfoHeader *loaderSection; // The entire CFM loader section in a pointer block.
- SInt16 fileRef; // A read-only path to the CFM container. We keep this here because one that one routine needs to read from the container.
- void *section0Base; // The base address of section 0, which we go through hoops to calculate.
- void *section1Base; // The base address of section 1, which we go through hoops to calculate.
- Boolean disposeSectionPointers; // See below.
+ CFragSystem7DiskFlatLocator locator; // How to find the fragment's container.
+ CFragConnectionID connID; // CFM connection to the fragment.
+ CFragInitFunction initRoutine; // The CFM init routine for the fragment.
+ PEFContainerHeader containerHeader; // The CFM header, read in from the container.
+ PEFSectionHeader *sectionHeaders; // The CFM section headers. A pointer block containing an array of containerHeader.sectionCount elements.
+ PEFLoaderInfoHeader *loaderSection; // The entire CFM loader section in a pointer block.
+ SInt16 fileRef; // A read-only path to the CFM container. We keep this here because one that one routine needs to read from the container.
+ void *section0Base; // The base address of section 0, which we go through hoops to calculate.
+ void *section1Base; // The base address of section 1, which we go through hoops to calculate.
+ Boolean disposeSectionPointers; // See below.
};
typedef struct FragToFixInfo FragToFixInfo;
@@ -151,614 +151,614 @@ typedef struct FragToFixInfo FragToFixInfo;
// disposeSectionPointers remains as vestigial support for the concept.
static OSStatus ReadContainerBasics(FragToFixInfo *fragToFix)
- // Reads some basic information from the container of the
- // fragment to fix and stores it in various fields of
- // fragToFix. This includes:
- //
- // o containerHeader -- The contain header itself.
- // o sectionHeaders -- The array of section headers (in a newly allocated pointer block).
- // o loaderSection -- The entire loader section (in a newly allocated pointer block).
- //
- // Also sets disposeSectionPointers to indicate whether
- // the last two pointers should be disposed of.
- //
- // Finally, it leaves the container file open for later
- // folks who want to read data from it.
+ // Reads some basic information from the container of the
+ // fragment to fix and stores it in various fields of
+ // fragToFix. This includes:
+ //
+ // o containerHeader -- The contain header itself.
+ // o sectionHeaders -- The array of section headers (in a newly allocated pointer block).
+ // o loaderSection -- The entire loader section (in a newly allocated pointer block).
+ //
+ // Also sets disposeSectionPointers to indicate whether
+ // the last two pointers should be disposed of.
+ //
+ // Finally, it leaves the container file open for later
+ // folks who want to read data from it.
{
- OSStatus err;
- UInt16 sectionIndex;
- Boolean found;
-
- MoreAssertQ(fragToFix != nil);
- MoreAssertQ(fragToFix->locator.fileSpec != nil);
- MoreAssertQ(fragToFix->connID != nil);
- MoreAssertQ(fragToFix->loaderSection == nil);
- MoreAssertQ(fragToFix->sectionHeaders == nil);
- MoreAssertQ(fragToFix->fileRef == 0);
-
- fragToFix->disposeSectionPointers = true;
-
- // Open up the file, read the container head, then read in
- // all the section headers, then go looking through the
- // section headers for the loader section (PEF defines
- // that there can be only one).
-
- err = FSpOpenDF(fragToFix->locator.fileSpec, fsRdPerm, &fragToFix->fileRef);
- if (err == noErr) {
- err = FSReadAtOffset(fragToFix->fileRef,
- fragToFix->locator.offset,
- sizeof(fragToFix->containerHeader),
- &fragToFix->containerHeader);
- if (err == noErr) {
- if ( fragToFix->containerHeader.tag1 != kPEFTag1
- || fragToFix->containerHeader.tag2 != kPEFTag2
- || fragToFix->containerHeader.architecture != kCompiledCFragArch
- || fragToFix->containerHeader.formatVersion != kPEFVersion) {
- err = cfragFragmentFormatErr;
- }
- }
- if (err == noErr) {
- fragToFix->sectionHeaders = (PEFSectionHeader *) NewPtr(fragToFix->containerHeader.sectionCount * sizeof(PEFSectionHeader));
- err = MemError();
- }
- if (err == noErr) {
- err = FSReadAtOffset(fragToFix->fileRef,
- fragToFix->locator.offset + sizeof(fragToFix->containerHeader),
- fragToFix->containerHeader.sectionCount * sizeof(PEFSectionHeader),
- fragToFix->sectionHeaders);
- }
- if (err == noErr) {
- sectionIndex = 0;
- found = false;
- while ( sectionIndex < fragToFix->containerHeader.sectionCount && ! found ) {
- found = (fragToFix->sectionHeaders[sectionIndex].sectionKind == kPEFLoaderSection);
- if ( ! found ) {
- sectionIndex += 1;
- }
- }
- }
- if (err == noErr && ! found) {
- err = cfragNoSectionErr;
- }
-
- // Now read allocate a pointer block and read the loader section into it.
-
- if (err == noErr) {
- fragToFix->loaderSection = (PEFLoaderInfoHeader *) NewPtr(fragToFix->sectionHeaders[sectionIndex].containerLength);
- err = MemError();
- }
- if (err == noErr) {
- err = FSReadAtOffset(fragToFix->fileRef,
- fragToFix->locator.offset + fragToFix->sectionHeaders[sectionIndex].containerOffset,
- fragToFix->sectionHeaders[sectionIndex].containerLength,
- fragToFix->loaderSection);
- }
- }
-
- // No clean up. The client must init fragToFix to zeros and then
- // clean up regardless of whether we return an error.
-
- return err;
+ OSStatus err;
+ UInt16 sectionIndex;
+ Boolean found;
+
+ MoreAssertQ(fragToFix != nil);
+ MoreAssertQ(fragToFix->locator.fileSpec != nil);
+ MoreAssertQ(fragToFix->connID != nil);
+ MoreAssertQ(fragToFix->loaderSection == nil);
+ MoreAssertQ(fragToFix->sectionHeaders == nil);
+ MoreAssertQ(fragToFix->fileRef == 0);
+
+ fragToFix->disposeSectionPointers = true;
+
+ // Open up the file, read the container head, then read in
+ // all the section headers, then go looking through the
+ // section headers for the loader section (PEF defines
+ // that there can be only one).
+
+ err = FSpOpenDF(fragToFix->locator.fileSpec, fsRdPerm, &fragToFix->fileRef);
+ if (err == noErr) {
+ err = FSReadAtOffset(fragToFix->fileRef,
+ fragToFix->locator.offset,
+ sizeof(fragToFix->containerHeader),
+ &fragToFix->containerHeader);
+ if (err == noErr) {
+ if ( fragToFix->containerHeader.tag1 != kPEFTag1
+ || fragToFix->containerHeader.tag2 != kPEFTag2
+ || fragToFix->containerHeader.architecture != kCompiledCFragArch
+ || fragToFix->containerHeader.formatVersion != kPEFVersion) {
+ err = cfragFragmentFormatErr;
+ }
+ }
+ if (err == noErr) {
+ fragToFix->sectionHeaders = (PEFSectionHeader *) NewPtr(fragToFix->containerHeader.sectionCount * sizeof(PEFSectionHeader));
+ err = MemError();
+ }
+ if (err == noErr) {
+ err = FSReadAtOffset(fragToFix->fileRef,
+ fragToFix->locator.offset + sizeof(fragToFix->containerHeader),
+ fragToFix->containerHeader.sectionCount * sizeof(PEFSectionHeader),
+ fragToFix->sectionHeaders);
+ }
+ if (err == noErr) {
+ sectionIndex = 0;
+ found = false;
+ while ( sectionIndex < fragToFix->containerHeader.sectionCount && ! found ) {
+ found = (fragToFix->sectionHeaders[sectionIndex].sectionKind == kPEFLoaderSection);
+ if ( ! found ) {
+ sectionIndex += 1;
+ }
+ }
+ }
+ if (err == noErr && ! found) {
+ err = cfragNoSectionErr;
+ }
+
+ // Now read allocate a pointer block and read the loader section into it.
+
+ if (err == noErr) {
+ fragToFix->loaderSection = (PEFLoaderInfoHeader *) NewPtr(fragToFix->sectionHeaders[sectionIndex].containerLength);
+ err = MemError();
+ }
+ if (err == noErr) {
+ err = FSReadAtOffset(fragToFix->fileRef,
+ fragToFix->locator.offset + fragToFix->sectionHeaders[sectionIndex].containerOffset,
+ fragToFix->sectionHeaders[sectionIndex].containerLength,
+ fragToFix->loaderSection);
+ }
+ }
+
+ // No clean up. The client must init fragToFix to zeros and then
+ // clean up regardless of whether we return an error.
+
+ return err;
}
static UInt32 DecodeVCountValue(const UInt8 *start, UInt32 *outCount)
- // Given a pointer to the start of a variable length PEF value,
- // work out the value (in *outCount). Returns the number of bytes
- // consumed by the value.
+ // Given a pointer to the start of a variable length PEF value,
+ // work out the value (in *outCount). Returns the number of bytes
+ // consumed by the value.
{
- UInt8 * bytePtr;
- UInt8 byte;
- UInt32 count;
-
- bytePtr = (UInt8 *)start;
-
- // Code taken from "PEFBinaryFormat.h".
- count = 0;
- do {
- byte = *bytePtr++;
- count = (count << kPEFPkDataVCountShift) | (byte & kPEFPkDataVCountMask);
- } while ((byte & kPEFPkDataVCountEndMask) != 0);
-
- *outCount = count;
- return bytePtr - start;
+ UInt8 * bytePtr;
+ UInt8 byte;
+ UInt32 count;
+
+ bytePtr = (UInt8 *)start;
+
+ // Code taken from "PEFBinaryFormat.h".
+ count = 0;
+ do {
+ byte = *bytePtr++;
+ count = (count << kPEFPkDataVCountShift) | (byte & kPEFPkDataVCountMask);
+ } while ((byte & kPEFPkDataVCountEndMask) != 0);
+
+ *outCount = count;
+ return bytePtr - start;
}
static UInt32 DecodeInstrCountValue(const UInt8 *inOpStart, UInt32 *outCount)
- // Given a pointer to the start of an opcode (inOpStart), work out the
- // count argument for that opcode (*outCount). Returns the number of
- // bytes consumed by the opcode and count combination.
+ // Given a pointer to the start of an opcode (inOpStart), work out the
+ // count argument for that opcode (*outCount). Returns the number of
+ // bytes consumed by the opcode and count combination.
{
- MoreAssertQ(inOpStart != nil);
- MoreAssertQ(outCount != nil);
-
- if (PEFPkDataCount5(*inOpStart) != 0)
- {
- // Simple case, count encoded in opcode.
- *outCount = PEFPkDataCount5(*inOpStart);
- return 1;
- }
- else
- {
- // Variable-length case.
- return 1 + DecodeVCountValue(inOpStart + 1, outCount);
- }
+ MoreAssertQ(inOpStart != nil);
+ MoreAssertQ(outCount != nil);
+
+ if (PEFPkDataCount5(*inOpStart) != 0)
+ {
+ // Simple case, count encoded in opcode.
+ *outCount = PEFPkDataCount5(*inOpStart);
+ return 1;
+ }
+ else
+ {
+ // Variable-length case.
+ return 1 + DecodeVCountValue(inOpStart + 1, outCount);
+ }
}
static OSStatus UnpackPEFDataSection(const UInt8 * const packedData, UInt32 packedSize,
- UInt8 * const unpackedData, UInt32 unpackedSize)
+ UInt8 * const unpackedData, UInt32 unpackedSize)
{
- OSErr err;
- UInt32 offset;
- UInt8 opCode;
- UInt8 * unpackCursor;
-
- MoreAssertQ(packedData != nil);
- MoreAssertQ(unpackedData != nil);
- MoreAssertQ(unpackedSize >= packedSize);
-
- // The following asserts assume that the client allocated the memory with NewPtr,
- // which may not always be true. However, the asserts' value in preventing accidental
- // memory block overruns outweighs the possible maintenance effort.
-
- MoreAssertQ( packedSize == GetPtrSize( (Ptr) packedData ) );
- MoreAssertQ( unpackedSize == GetPtrSize( (Ptr) unpackedData) );
-
- err = noErr;
- offset = 0;
- unpackCursor = unpackedData;
- while (offset < packedSize) {
- MoreAssertQ(unpackCursor < &unpackedData[unpackedSize]);
-
- opCode = packedData[offset];
-
- switch (PEFPkDataOpcode(opCode)) {
- case kPEFPkDataZero:
- {
- UInt32 count;
-
- offset += DecodeInstrCountValue(&packedData[offset], &count);
-
- MoreBlockZero(unpackCursor, count);
- unpackCursor += count;
- }
- break;
-
- case kPEFPkDataBlock:
- {
- UInt32 blockSize;
-
- offset += DecodeInstrCountValue(&packedData[offset], &blockSize);
-
- BlockMoveData(&packedData[offset], unpackCursor, blockSize);
- unpackCursor += blockSize;
- offset += blockSize;
- }
- break;
-
- case kPEFPkDataRepeat:
- {
- UInt32 blockSize;
- UInt32 repeatCount;
- UInt32 loopCounter;
-
- offset += DecodeInstrCountValue(&packedData[offset], &blockSize);
- offset += DecodeVCountValue(&packedData[offset], &repeatCount);
- repeatCount += 1; // stored value is (repeatCount - 1)
-
- for (loopCounter = 0; loopCounter < repeatCount; loopCounter++) {
- BlockMoveData(&packedData[offset], unpackCursor, blockSize);
- unpackCursor += blockSize;
- }
- offset += blockSize;
- }
- break;
-
- case kPEFPkDataRepeatBlock:
- {
- UInt32 commonSize;
- UInt32 customSize;
- UInt32 repeatCount;
- const UInt8 *commonData;
- const UInt8 *customData;
- UInt32 loopCounter;
-
- offset += DecodeInstrCountValue(&packedData[offset], &commonSize);
- offset += DecodeVCountValue(&packedData[offset], &customSize);
- offset += DecodeVCountValue(&packedData[offset], &repeatCount);
-
- commonData = &packedData[offset];
- customData = &packedData[offset + commonSize];
-
- for (loopCounter = 0; loopCounter < repeatCount; loopCounter++) {
- BlockMoveData(commonData, unpackCursor, commonSize);
- unpackCursor += commonSize;
- BlockMoveData(customData, unpackCursor, customSize);
- unpackCursor += customSize;
- customData += customSize;
- }
- BlockMoveData(commonData, unpackCursor, commonSize);
- unpackCursor += commonSize;
- offset += (repeatCount * (commonSize + customSize)) + commonSize;
- }
- break;
-
- case kPEFPkDataRepeatZero:
- {
- UInt32 commonSize;
- UInt32 customSize;
- UInt32 repeatCount;
- const UInt8 *customData;
- UInt32 loopCounter;
-
- offset += DecodeInstrCountValue(&packedData[offset], &commonSize);
- offset += DecodeVCountValue(&packedData[offset], &customSize);
- offset += DecodeVCountValue(&packedData[offset], &repeatCount);
-
- customData = &packedData[offset];
-
- for (loopCounter = 0; loopCounter < repeatCount; loopCounter++) {
- MoreBlockZero(unpackCursor, commonSize);
- unpackCursor += commonSize;
- BlockMoveData(customData, unpackCursor, customSize);
- unpackCursor += customSize;
- customData += customSize;
- }
- MoreBlockZero(unpackCursor, commonSize);
- unpackCursor += commonSize;
- offset += repeatCount * customSize;
- }
- break;
-
- default:
- #if MORE_DEBUG
- DebugStr("\pUnpackPEFDataSection: Unexpected data opcode");
- #endif
- err = cfragFragmentCorruptErr;
- goto leaveNow;
- break;
- }
- }
-
+ OSErr err;
+ UInt32 offset;
+ UInt8 opCode;
+ UInt8 * unpackCursor;
+
+ MoreAssertQ(packedData != nil);
+ MoreAssertQ(unpackedData != nil);
+ MoreAssertQ(unpackedSize >= packedSize);
+
+ // The following asserts assume that the client allocated the memory with NewPtr,
+ // which may not always be true. However, the asserts' value in preventing accidental
+ // memory block overruns outweighs the possible maintenance effort.
+
+ MoreAssertQ( packedSize == GetPtrSize( (Ptr) packedData ) );
+ MoreAssertQ( unpackedSize == GetPtrSize( (Ptr) unpackedData) );
+
+ err = noErr;
+ offset = 0;
+ unpackCursor = unpackedData;
+ while (offset < packedSize) {
+ MoreAssertQ(unpackCursor < &unpackedData[unpackedSize]);
+
+ opCode = packedData[offset];
+
+ switch (PEFPkDataOpcode(opCode)) {
+ case kPEFPkDataZero:
+ {
+ UInt32 count;
+
+ offset += DecodeInstrCountValue(&packedData[offset], &count);
+
+ MoreBlockZero(unpackCursor, count);
+ unpackCursor += count;
+ }
+ break;
+
+ case kPEFPkDataBlock:
+ {
+ UInt32 blockSize;
+
+ offset += DecodeInstrCountValue(&packedData[offset], &blockSize);
+
+ BlockMoveData(&packedData[offset], unpackCursor, blockSize);
+ unpackCursor += blockSize;
+ offset += blockSize;
+ }
+ break;
+
+ case kPEFPkDataRepeat:
+ {
+ UInt32 blockSize;
+ UInt32 repeatCount;
+ UInt32 loopCounter;
+
+ offset += DecodeInstrCountValue(&packedData[offset], &blockSize);
+ offset += DecodeVCountValue(&packedData[offset], &repeatCount);
+ repeatCount += 1; // stored value is (repeatCount - 1)
+
+ for (loopCounter = 0; loopCounter < repeatCount; loopCounter++) {
+ BlockMoveData(&packedData[offset], unpackCursor, blockSize);
+ unpackCursor += blockSize;
+ }
+ offset += blockSize;
+ }
+ break;
+
+ case kPEFPkDataRepeatBlock:
+ {
+ UInt32 commonSize;
+ UInt32 customSize;
+ UInt32 repeatCount;
+ const UInt8 *commonData;
+ const UInt8 *customData;
+ UInt32 loopCounter;
+
+ offset += DecodeInstrCountValue(&packedData[offset], &commonSize);
+ offset += DecodeVCountValue(&packedData[offset], &customSize);
+ offset += DecodeVCountValue(&packedData[offset], &repeatCount);
+
+ commonData = &packedData[offset];
+ customData = &packedData[offset + commonSize];
+
+ for (loopCounter = 0; loopCounter < repeatCount; loopCounter++) {
+ BlockMoveData(commonData, unpackCursor, commonSize);
+ unpackCursor += commonSize;
+ BlockMoveData(customData, unpackCursor, customSize);
+ unpackCursor += customSize;
+ customData += customSize;
+ }
+ BlockMoveData(commonData, unpackCursor, commonSize);
+ unpackCursor += commonSize;
+ offset += (repeatCount * (commonSize + customSize)) + commonSize;
+ }
+ break;
+
+ case kPEFPkDataRepeatZero:
+ {
+ UInt32 commonSize;
+ UInt32 customSize;
+ UInt32 repeatCount;
+ const UInt8 *customData;
+ UInt32 loopCounter;
+
+ offset += DecodeInstrCountValue(&packedData[offset], &commonSize);
+ offset += DecodeVCountValue(&packedData[offset], &customSize);
+ offset += DecodeVCountValue(&packedData[offset], &repeatCount);
+
+ customData = &packedData[offset];
+
+ for (loopCounter = 0; loopCounter < repeatCount; loopCounter++) {
+ MoreBlockZero(unpackCursor, commonSize);
+ unpackCursor += commonSize;
+ BlockMoveData(customData, unpackCursor, customSize);
+ unpackCursor += customSize;
+ customData += customSize;
+ }
+ MoreBlockZero(unpackCursor, commonSize);
+ unpackCursor += commonSize;
+ offset += repeatCount * customSize;
+ }
+ break;
+
+ default:
+ #if MORE_DEBUG
+ DebugStr("\pUnpackPEFDataSection: Unexpected data opcode");
+ #endif
+ err = cfragFragmentCorruptErr;
+ goto leaveNow;
+ break;
+ }
+ }
+
leaveNow:
- return err;
+ return err;
}
-/* SetupSectionBaseAddresses Rationale
- -----------------------------------
-
- OK, here's where things get weird. In order to run the relocation
- engine, I need to be able to find the base address of an instantiated
- section of the fragment we're fixing up given only its section number.
- This isn't hard for CFM to do because it's the one that instantiated the
- sections in the first place. It's surprisingly difficult to do if
- you're not CFM. [And you don't have access to the private CFM APis for
- doing it.]
-
- [Alan Lillich is going to kill me when he reads this! I should point out
- that TVector's don't have to contain two words, they can be longer,
- and that the second word isn't necessarily a TOC pointer, it's
- just that the calling conventions require that it be put in the
- TOC register when the code is called.
-
- Furthermore, the code section isn't always section 0, and the data
- section isn't always section 1, and there can be zero to many sections
- of each type.
-
- But these niceties are besides the point: I'm doing something tricky
- because I don't have a nice API for getting section base addresses.
- If I had a nice API for doing that, none of this code would exist.
- ]
-
- The technique is very sneaky (thanks to Eric Grant). The fragment to
- fix necessarily has a CFM init routine (because it needs that routine
- in order to capture the fragment location and connection ID). Thus the
- fragment to fix must have a TVector in its data section. TVectors are
- interesting because they're made up of two words. The first is a pointer
- to the code that implements the routine; the second is a pointer to the TOC
- for the fragment that's exporting the TVector. How TVectors are
- created is interesting too. On disk, a TVector consists of two words,
- the first being the offset from the start of the code section to the
- routine, the second being the offset from the start of the data section
- to the TOC base. When CFM prepares a TVector, it applies the following
- transform:
-
- tvector.codePtr = tvector.codeOffset + base of code section
- tvector.tocPtr = tvector.tocOffset + base of data section
-
- Now, you can reverse these questions to make them:
-
- base of code section = tvector.codePtr - tvector.codeOffset
- base of data section = tvector.dataPtr - tvector.dataOffset
-
- So if you can find the relocated contents of the TVector and
- find the original offsets that made up the TVector, you can then
- calculate the base address of both the code and data sections.
-
- Finding the relocated contents of the TVector is easy; I simply
- require the client to pass in a pointer to its init routine.
- A routine pointer is a TVector pointer, so you can just cast it
- and extract the pair of words.
-
- Finding the original offsets is a trickier. My technique is to
- look up the init routine in the fragment's loader info header. This
- yields the section number and offset where the init routine's unrelocated
- TVector exists. Once I have that, I can just read the unrelocated TVector
- out of the file and extract the offsets.
+/* SetupSectionBaseAddresses Rationale
+ -----------------------------------
+
+ OK, here's where things get weird. In order to run the relocation
+ engine, I need to be able to find the base address of an instantiated
+ section of the fragment we're fixing up given only its section number.
+ This isn't hard for CFM to do because it's the one that instantiated the
+ sections in the first place. It's surprisingly difficult to do if
+ you're not CFM. [And you don't have access to the private CFM APis for
+ doing it.]
+
+ [Alan Lillich is going to kill me when he reads this! I should point out
+ that TVector's don't have to contain two words, they can be longer,
+ and that the second word isn't necessarily a TOC pointer, it's
+ just that the calling conventions require that it be put in the
+ TOC register when the code is called.
+
+ Furthermore, the code section isn't always section 0, and the data
+ section isn't always section 1, and there can be zero to many sections
+ of each type.
+
+ But these niceties are besides the point: I'm doing something tricky
+ because I don't have a nice API for getting section base addresses.
+ If I had a nice API for doing that, none of this code would exist.
+ ]
+
+ The technique is very sneaky (thanks to Eric Grant). The fragment to
+ fix necessarily has a CFM init routine (because it needs that routine
+ in order to capture the fragment location and connection ID). Thus the
+ fragment to fix must have a TVector in its data section. TVectors are
+ interesting because they're made up of two words. The first is a pointer
+ to the code that implements the routine; the second is a pointer to the TOC
+ for the fragment that's exporting the TVector. How TVectors are
+ created is interesting too. On disk, a TVector consists of two words,
+ the first being the offset from the start of the code section to the
+ routine, the second being the offset from the start of the data section
+ to the TOC base. When CFM prepares a TVector, it applies the following
+ transform:
+
+ tvector.codePtr = tvector.codeOffset + base of code section
+ tvector.tocPtr = tvector.tocOffset + base of data section
+
+ Now, you can reverse these questions to make them:
+
+ base of code section = tvector.codePtr - tvector.codeOffset
+ base of data section = tvector.dataPtr - tvector.dataOffset
+
+ So if you can find the relocated contents of the TVector and
+ find the original offsets that made up the TVector, you can then
+ calculate the base address of both the code and data sections.
+
+ Finding the relocated contents of the TVector is easy; I simply
+ require the client to pass in a pointer to its init routine.
+ A routine pointer is a TVector pointer, so you can just cast it
+ and extract the pair of words.
+
+ Finding the original offsets is a trickier. My technique is to
+ look up the init routine in the fragment's loader info header. This
+ yields the section number and offset where the init routine's unrelocated
+ TVector exists. Once I have that, I can just read the unrelocated TVector
+ out of the file and extract the offsets.
*/
struct TVector {
- void *codePtr;
- void *tocPtr;
+ void *codePtr;
+ void *tocPtr;
};
typedef struct TVector TVector;
static OSStatus SetupSectionBaseAddresses(FragToFixInfo *fragToFix)
- // This routine initialises the section0Base and section1Base
- // base fields of fragToFix to the base addresses of the
- // instantiated fragment represented by the other fields
- // of fragToFix. The process works in three states:
- //
- // 1. Find the contents of the relocated TVector of the
- // fragment's initialisation routine, provided to us by
- // the caller.
- //
- // 2. Find the contents of the non-relocated TVector by
- // looking it up in the PEF loader info header and then
- // using that to read the TVector contents from disk.
- // This yields the offsets from the section bases for
- // the init routine.
- //
- // 3. Subtract 2 from 3.
+ // This routine initialises the section0Base and section1Base
+ // base fields of fragToFix to the base addresses of the
+ // instantiated fragment represented by the other fields
+ // of fragToFix. The process works in three states:
+ //
+ // 1. Find the contents of the relocated TVector of the
+ // fragment's initialisation routine, provided to us by
+ // the caller.
+ //
+ // 2. Find the contents of the non-relocated TVector by
+ // looking it up in the PEF loader info header and then
+ // using that to read the TVector contents from disk.
+ // This yields the offsets from the section bases for
+ // the init routine.
+ //
+ // 3. Subtract 2 from 3.
{
- OSStatus err;
- TVector * relocatedExport;
- SInt32 initSection;
- UInt32 initOffset;
- PEFSectionHeader * initSectionHeader;
- Ptr packedDataSection;
- Ptr unpackedDataSection;
- TVector originalOffsets;
-
- packedDataSection = nil;
- unpackedDataSection = nil;
-
- // Step 1.
-
- // First find the init routine's TVector, which gives us the relocated
- // offsets of the init routine into the data and code sections.
-
- relocatedExport = (TVector *) fragToFix->initRoutine;
-
- // Step 2.
-
- // Now find the init routine's TVector's offsets in the data section on
- // disk. This gives us the raw offsets from the data and code section
- // of the beginning of the init routine.
-
- err = noErr;
- initSection = fragToFix->loaderSection->initSection;
- initOffset = fragToFix->loaderSection->initOffset;
- if (initSection == -1) {
- err = cfragFragmentUsageErr;
- }
- if (err == noErr) {
- MoreAssertQ( initSection >= 0 ); // Negative indexes are pseudo-sections which are just not allowed!
- MoreAssertQ( initSection < fragToFix->containerHeader.sectionCount );
-
- initSectionHeader = &fragToFix->sectionHeaders[initSection];
-
- // If the data section is packed, unpack it to a temporary buffer and then get the
- // original offsets from that buffer. If the data section is unpacked, just read
- // the original offsets directly off the disk.
-
- if ( initSectionHeader->sectionKind == kPEFPackedDataSection ) {
-
- // Allocate space for packed and unpacked copies of the section.
-
- packedDataSection = NewPtr(initSectionHeader->containerLength);
- err = MemError();
-
- if (err == noErr) {
- unpackedDataSection = NewPtr(initSectionHeader->unpackedLength);
- err = MemError();
- }
-
- // Read the contents of the packed section.
-
- if (err == noErr) {
- err = FSReadAtOffset( fragToFix->fileRef,
- fragToFix->locator.offset
- + initSectionHeader->containerOffset,
- initSectionHeader->containerLength,
- packedDataSection);
- }
-
- // Unpack the data into the unpacked section.
-
- if (err == noErr) {
- err = UnpackPEFDataSection( (UInt8 *) packedDataSection, initSectionHeader->containerLength,
- (UInt8 *) unpackedDataSection, initSectionHeader->unpackedLength);
- }
-
- // Extract the init routine's TVector from the unpacked section.
-
- if (err == noErr) {
- BlockMoveData(unpackedDataSection + initOffset, &originalOffsets, sizeof(TVector));
- }
-
- } else {
- MoreAssertQ(fragToFix->sectionHeaders[initSection].sectionKind == kPEFUnpackedDataSection);
- err = FSReadAtOffset(fragToFix->fileRef,
- fragToFix->locator.offset
- + fragToFix->sectionHeaders[initSection].containerOffset
- + initOffset,
- sizeof(TVector),
- &originalOffsets);
- }
- }
-
- // Step 3.
-
- // Do the maths to subtract the unrelocated offsets from the current address
- // to get the base address.
-
- if (err == noErr) {
- fragToFix->section0Base = ((char *) relocatedExport->codePtr) - (UInt32) originalOffsets.codePtr;
- fragToFix->section1Base = ((char *) relocatedExport->tocPtr) - (UInt32) originalOffsets.tocPtr;
- }
-
- // Clean up.
-
- if (packedDataSection != nil) {
- DisposePtr(packedDataSection);
- MoreAssertQ( MemError() == noErr );
- }
- if (unpackedDataSection != nil) {
- DisposePtr(unpackedDataSection);
- MoreAssertQ( MemError() == noErr );
- }
- return err;
+ OSStatus err;
+ TVector * relocatedExport;
+ SInt32 initSection;
+ UInt32 initOffset;
+ PEFSectionHeader * initSectionHeader;
+ Ptr packedDataSection;
+ Ptr unpackedDataSection;
+ TVector originalOffsets;
+
+ packedDataSection = nil;
+ unpackedDataSection = nil;
+
+ // Step 1.
+
+ // First find the init routine's TVector, which gives us the relocated
+ // offsets of the init routine into the data and code sections.
+
+ relocatedExport = (TVector *) fragToFix->initRoutine;
+
+ // Step 2.
+
+ // Now find the init routine's TVector's offsets in the data section on
+ // disk. This gives us the raw offsets from the data and code section
+ // of the beginning of the init routine.
+
+ err = noErr;
+ initSection = fragToFix->loaderSection->initSection;
+ initOffset = fragToFix->loaderSection->initOffset;
+ if (initSection == -1) {
+ err = cfragFragmentUsageErr;
+ }
+ if (err == noErr) {
+ MoreAssertQ( initSection >= 0 ); // Negative indexes are pseudo-sections which are just not allowed!
+ MoreAssertQ( initSection < fragToFix->containerHeader.sectionCount );
+
+ initSectionHeader = &fragToFix->sectionHeaders[initSection];
+
+ // If the data section is packed, unpack it to a temporary buffer and then get the
+ // original offsets from that buffer. If the data section is unpacked, just read
+ // the original offsets directly off the disk.
+
+ if ( initSectionHeader->sectionKind == kPEFPackedDataSection ) {
+
+ // Allocate space for packed and unpacked copies of the section.
+
+ packedDataSection = NewPtr(initSectionHeader->containerLength);
+ err = MemError();
+
+ if (err == noErr) {
+ unpackedDataSection = NewPtr(initSectionHeader->unpackedLength);
+ err = MemError();
+ }
+
+ // Read the contents of the packed section.
+
+ if (err == noErr) {
+ err = FSReadAtOffset( fragToFix->fileRef,
+ fragToFix->locator.offset
+ + initSectionHeader->containerOffset,
+ initSectionHeader->containerLength,
+ packedDataSection);
+ }
+
+ // Unpack the data into the unpacked section.
+
+ if (err == noErr) {
+ err = UnpackPEFDataSection( (UInt8 *) packedDataSection, initSectionHeader->containerLength,
+ (UInt8 *) unpackedDataSection, initSectionHeader->unpackedLength);
+ }
+
+ // Extract the init routine's TVector from the unpacked section.
+
+ if (err == noErr) {
+ BlockMoveData(unpackedDataSection + initOffset, &originalOffsets, sizeof(TVector));
+ }
+
+ } else {
+ MoreAssertQ(fragToFix->sectionHeaders[initSection].sectionKind == kPEFUnpackedDataSection);
+ err = FSReadAtOffset(fragToFix->fileRef,
+ fragToFix->locator.offset
+ + fragToFix->sectionHeaders[initSection].containerOffset
+ + initOffset,
+ sizeof(TVector),
+ &originalOffsets);
+ }
+ }
+
+ // Step 3.
+
+ // Do the maths to subtract the unrelocated offsets from the current address
+ // to get the base address.
+
+ if (err == noErr) {
+ fragToFix->section0Base = ((char *) relocatedExport->codePtr) - (UInt32) originalOffsets.codePtr;
+ fragToFix->section1Base = ((char *) relocatedExport->tocPtr) - (UInt32) originalOffsets.tocPtr;
+ }
+
+ // Clean up.
+
+ if (packedDataSection != nil) {
+ DisposePtr(packedDataSection);
+ MoreAssertQ( MemError() == noErr );
+ }
+ if (unpackedDataSection != nil) {
+ DisposePtr(unpackedDataSection);
+ MoreAssertQ( MemError() == noErr );
+ }
+ return err;
}
static void *GetSectionBaseAddress(const FragToFixInfo *fragToFix, UInt16 sectionIndex)
- // This routine returns the base of the instantiated section
- // whose index is sectionIndex. This routine is the evil twin
- // of SetupSectionBaseAddresses. It simply returns the values
- // for section 0 and 1 that we derived in SetupSectionBaseAddresses.
- // In a real implementation, this routine would call CFM API
- // to get this information, and SetupSectionBaseAddresses would
- // not exist, but CFM does not export the necessary APIs to
- // third parties.
+ // This routine returns the base of the instantiated section
+ // whose index is sectionIndex. This routine is the evil twin
+ // of SetupSectionBaseAddresses. It simply returns the values
+ // for section 0 and 1 that we derived in SetupSectionBaseAddresses.
+ // In a real implementation, this routine would call CFM API
+ // to get this information, and SetupSectionBaseAddresses would
+ // not exist, but CFM does not export the necessary APIs to
+ // third parties.
{
- void *result;
-
- MoreAssertQ(fragToFix != nil);
- MoreAssertQ(fragToFix->containerHeader.tag1 == kPEFTag1);
-
- switch (sectionIndex) {
- case 0:
- result = fragToFix->section0Base;
- break;
- case 1:
- result = fragToFix->section1Base;
- break;
- default:
- result = nil;
- break;
- }
- return result;
+ void *result;
+
+ MoreAssertQ(fragToFix != nil);
+ MoreAssertQ(fragToFix->containerHeader.tag1 == kPEFTag1);
+
+ switch (sectionIndex) {
+ case 0:
+ result = fragToFix->section0Base;
+ break;
+ case 1:
+ result = fragToFix->section1Base;
+ break;
+ default:
+ result = nil;
+ break;
+ }
+ return result;
}
static OSStatus FindImportLibrary(PEFLoaderInfoHeader *loaderSection, const char *libraryName, PEFImportedLibrary **importLibrary)
- // This routine finds the import library description (PEFImportedLibrary)
- // for the import library libraryName in the PEF loader section.
- // It sets *importLibrary to the address of the description.
+ // This routine finds the import library description (PEFImportedLibrary)
+ // for the import library libraryName in the PEF loader section.
+ // It sets *importLibrary to the address of the description.
{
- OSStatus err;
- UInt32 librariesRemaining;
- PEFImportedLibrary *thisImportLibrary;
- Boolean found;
-
- MoreAssertQ(loaderSection != nil);
- MoreAssertQ(libraryName != nil);
- MoreAssertQ(importLibrary != nil);
-
- // Loop through each import library looking for a matching name.
-
- // Initialise thisImportLibrary to point to the byte after the
- // end of the loader section's header.
-
- thisImportLibrary = (PEFImportedLibrary *) (loaderSection + 1);
- librariesRemaining = loaderSection->importedLibraryCount;
- found = false;
- while ( librariesRemaining > 0 && ! found ) {
- // PEF defines that import library names will have
- // a null terminator, so we can just use strcmp.
- found = (strcmp( libraryName,
- ((char *)loaderSection)
- + loaderSection->loaderStringsOffset
- + thisImportLibrary->nameOffset) == 0);
- // *** Remove ANSI strcmp eventually.
- if ( ! found ) {
- thisImportLibrary += 1;
- librariesRemaining -= 1;
- }
- }
-
- if (found) {
- *importLibrary = thisImportLibrary;
- err = noErr;
- } else {
- *importLibrary = nil;
- err = cfragNoLibraryErr;
- }
- return err;
+ OSStatus err;
+ UInt32 librariesRemaining;
+ PEFImportedLibrary *thisImportLibrary;
+ Boolean found;
+
+ MoreAssertQ(loaderSection != nil);
+ MoreAssertQ(libraryName != nil);
+ MoreAssertQ(importLibrary != nil);
+
+ // Loop through each import library looking for a matching name.
+
+ // Initialise thisImportLibrary to point to the byte after the
+ // end of the loader section's header.
+
+ thisImportLibrary = (PEFImportedLibrary *) (loaderSection + 1);
+ librariesRemaining = loaderSection->importedLibraryCount;
+ found = false;
+ while ( librariesRemaining > 0 && ! found ) {
+ // PEF defines that import library names will have
+ // a null terminator, so we can just use strcmp.
+ found = (strcmp( libraryName,
+ ((char *)loaderSection)
+ + loaderSection->loaderStringsOffset
+ + thisImportLibrary->nameOffset) == 0);
+ // *** Remove ANSI strcmp eventually.
+ if ( ! found ) {
+ thisImportLibrary += 1;
+ librariesRemaining -= 1;
+ }
+ }
+
+ if (found) {
+ *importLibrary = thisImportLibrary;
+ err = noErr;
+ } else {
+ *importLibrary = nil;
+ err = cfragNoLibraryErr;
+ }
+ return err;
}
static OSStatus LookupSymbol(CFMLateImportLookupProc lookup, void *refCon,
- PEFLoaderInfoHeader *loaderSection,
- UInt32 symbolIndex,
- UInt32 *symbolValue)
- // This routine is used to look up a symbol during relocation.
- // "lookup" is a client callback and refCon is its argument.
- // Typically refCon is the CFM connection to the library that is
- // substituting for the weak linked library. loaderSection
- // is a pointer to the loader section of the fragment to fix up.
- // symbolIndex is the index of the imported symbol in the loader section.
- // The routine sets the word pointed to by symbolValue to the
- // value of the symbol.
- //
- // The routine works by using symbolIndex to index into the imported
- // symbol table to find the offset of the symbol's name in the string
- // table. It then looks up the symbol by calling the client's "lookup"
- // function and passes the resulting symbol address back in symbolValue.
+ PEFLoaderInfoHeader *loaderSection,
+ UInt32 symbolIndex,
+ UInt32 *symbolValue)
+ // This routine is used to look up a symbol during relocation.
+ // "lookup" is a client callback and refCon is its argument.
+ // Typically refCon is the CFM connection to the library that is
+ // substituting for the weak linked library. loaderSection
+ // is a pointer to the loader section of the fragment to fix up.
+ // symbolIndex is the index of the imported symbol in the loader section.
+ // The routine sets the word pointed to by symbolValue to the
+ // value of the symbol.
+ //
+ // The routine works by using symbolIndex to index into the imported
+ // symbol table to find the offset of the symbol's name in the string
+ // table. It then looks up the symbol by calling the client's "lookup"
+ // function and passes the resulting symbol address back in symbolValue.
{
- OSStatus err;
- UInt32 *importSymbolTable;
- UInt32 symbolStringOffset;
- Boolean symbolIsWeak;
- CFragSymbolClass symbolClass;
- char *symbolStringAddress;
- Str255 symbolString;
-
- MoreAssertQ(lookup != nil);
- MoreAssertQ(loaderSection != nil);
- MoreAssertQ(symbolIndex < loaderSection->totalImportedSymbolCount);
- MoreAssertQ(symbolValue != nil);
-
- // Find the base of the imported symbol table.
-
- importSymbolTable = (UInt32 *)(((char *)(loaderSection + 1)) + (loaderSection->importedLibraryCount * sizeof(PEFImportedLibrary)));
-
- // Grab the appropriate entry out of the table and
- // extract the information from that entry.
-
- symbolStringOffset = importSymbolTable[symbolIndex];
- symbolClass = PEFImportedSymbolClass(symbolStringOffset);
- symbolIsWeak = ((symbolClass & kPEFWeakImportSymMask) != 0);
- symbolClass = symbolClass & ~kPEFWeakImportSymMask;
- symbolStringOffset = PEFImportedSymbolNameOffset(symbolStringOffset);
-
- // Find the string for the symbol in the strings table and
- // extract it from the table into a Pascal string on the stack.
-
- symbolStringAddress = ((char *)loaderSection) + loaderSection->loaderStringsOffset + symbolStringOffset;
- symbolString[0] = strlen(symbolStringAddress); // *** remove ANSI strlen
- BlockMoveData(symbolStringAddress, &symbolString[1], symbolString[0]);
-
- // Look up the symbol in substitute library. If it fails, return
- // a 0 value and check whether the error is fatal (a strong linked
- // symbol) or benign (a weak linked symbol).
-
- err = lookup(symbolString, symbolClass, (void **) symbolValue, refCon);
- if (err != noErr) {
- *symbolValue = 0;
- if (symbolIsWeak) {
- err = noErr;
- }
- }
- return err;
+ OSStatus err;
+ UInt32 *importSymbolTable;
+ UInt32 symbolStringOffset;
+ Boolean symbolIsWeak;
+ CFragSymbolClass symbolClass;
+ char *symbolStringAddress;
+ Str255 symbolString;
+
+ MoreAssertQ(lookup != nil);
+ MoreAssertQ(loaderSection != nil);
+ MoreAssertQ(symbolIndex < loaderSection->totalImportedSymbolCount);
+ MoreAssertQ(symbolValue != nil);
+
+ // Find the base of the imported symbol table.
+
+ importSymbolTable = (UInt32 *)(((char *)(loaderSection + 1)) + (loaderSection->importedLibraryCount * sizeof(PEFImportedLibrary)));
+
+ // Grab the appropriate entry out of the table and
+ // extract the information from that entry.
+
+ symbolStringOffset = importSymbolTable[symbolIndex];
+ symbolClass = PEFImportedSymbolClass(symbolStringOffset);
+ symbolIsWeak = ((symbolClass & kPEFWeakImportSymMask) != 0);
+ symbolClass = symbolClass & ~kPEFWeakImportSymMask;
+ symbolStringOffset = PEFImportedSymbolNameOffset(symbolStringOffset);
+
+ // Find the string for the symbol in the strings table and
+ // extract it from the table into a Pascal string on the stack.
+
+ symbolStringAddress = ((char *)loaderSection) + loaderSection->loaderStringsOffset + symbolStringOffset;
+ symbolString[0] = strlen(symbolStringAddress); // *** remove ANSI strlen
+ BlockMoveData(symbolStringAddress, &symbolString[1], symbolString[0]);
+
+ // Look up the symbol in substitute library. If it fails, return
+ // a 0 value and check whether the error is fatal (a strong linked
+ // symbol) or benign (a weak linked symbol).
+
+ err = lookup(symbolString, symbolClass, (void **) symbolValue, refCon);
+ if (err != noErr) {
+ *symbolValue = 0;
+ if (symbolIsWeak) {
+ err = noErr;
+ }
+ }
+ return err;
}
// The EngineState structure encapsulates all of the persistent state
@@ -771,13 +771,13 @@ static OSStatus LookupSymbol(CFMLateImportLookupProc lookup, void *refCon,
// instructional design.
struct EngineState {
- UInt32 currentReloc; // Index of current relocation opcodes
- UInt32 terminatingReloc; // Index of relocation opcodes which terminates relocation
- UInt32 *sectionBase; // Start of the section
- UInt32 *relocAddress; // Address within the section where the relocations are to be performed
- UInt32 importIndex; // Symbol index, which is used to access an imported symbol's address
- void *sectionC; // Memory address of an instantiated section within the PEF container; this variable is used by relocation opcodes that relocate section addresses
- void *sectionD; // Memory address of an instantiated section within the PEF container; this variable is used by relocation opcodes that relocate section addresses
+ UInt32 currentReloc; // Index of current relocation opcodes
+ UInt32 terminatingReloc; // Index of relocation opcodes which terminates relocation
+ UInt32 *sectionBase; // Start of the section
+ UInt32 *relocAddress; // Address within the section where the relocations are to be performed
+ UInt32 importIndex; // Symbol index, which is used to access an imported symbol's address
+ void *sectionC; // Memory address of an instantiated section within the PEF container; this variable is used by relocation opcodes that relocate section addresses
+ void *sectionD; // Memory address of an instantiated section within the PEF container; this variable is used by relocation opcodes that relocate section addresses
};
typedef struct EngineState EngineState;
@@ -786,83 +786,83 @@ typedef struct EngineState EngineState;
// have to add a repeat counter to EngineState.
static OSStatus InitEngineState(const FragToFixInfo *fragToFix,
- UInt16 relocHeaderIndex,
- EngineState *state)
- // This routine initialises the engine state suitably for
- // running the relocation opcodes for the section whose
- // index is relocHeaderIndex. relocHeaderIndex is not a
- // a section number. See the comment where it's used below
- // for details. The routine basically fills out all the fields
- // in the EngineState structure as described by
- // "Mac OS Runtime Architectures".
+ UInt16 relocHeaderIndex,
+ EngineState *state)
+ // This routine initialises the engine state suitably for
+ // running the relocation opcodes for the section whose
+ // index is relocHeaderIndex. relocHeaderIndex is not a
+ // a section number. See the comment where it's used below
+ // for details. The routine basically fills out all the fields
+ // in the EngineState structure as described by
+ // "Mac OS Runtime Architectures".
{
- OSStatus err;
- PEFLoaderRelocationHeader *relocHeader;
-
- MoreAssertQ(fragToFix != nil);
- MoreAssertQ(state != nil);
-
- // This bit is tricky. relocHeaderIndex is an index into the relocation
- // header table, starting at relocSectionCount (which is in the loader
- // section header) for the first relocated section and decrementing
- // down to 1 for the last relocated section. I find the relocation
- // header by using relocHeaderIndex as a index backwards from the
- // start of the relocation opcodes (ie relocInstrOffset). If you
- // look at the diagram of the layout of the container in
- // "PEFBinaryFormat.h", you'll see that the relocation opcodes
- // immediately follow the relocation headers.
- //
- // I did this because the alternative (starting at the loader
- // header and stepping past the import library table and the
- // import symbol table) was a pain.
-
- relocHeader = (PEFLoaderRelocationHeader *) (((char *) fragToFix->loaderSection) + fragToFix->loaderSection->relocInstrOffset - relocHeaderIndex * sizeof(PEFLoaderRelocationHeader));
-
- MoreAssertQ(relocHeader->reservedA == 0); // PEF spec says it must be; we check to try to catch bugs in calculation of relocHeader
-
- state->currentReloc = relocHeader->firstRelocOffset;
- state->terminatingReloc = relocHeader->firstRelocOffset + relocHeader->relocCount;
- state->sectionBase = (UInt32 *) GetSectionBaseAddress(fragToFix, relocHeader->sectionIndex);
- state->relocAddress = state->sectionBase;
- state->importIndex = 0;
-
- // From "Mac OS Runtime Architectures":
- //
- // The sectionC and sectionD variables actually contain the
- // memory address of an instantiated section minus the
- // default address for that section. The default address for a
- // section is contained in the defaultAddress field of the
- // section header. However, in almost all cases the default
- // address should be 0, so the simplified definition suffices.
- //
- // In the debug version, we drop into MacsBug if this weird case
- // ever executes because it's more likely we made a mistake than
- // we encountered a section with a default address.
-
- state->sectionC = GetSectionBaseAddress(fragToFix, 0);
- if (state->sectionC != nil) {
- #if MORE_DEBUG
- if (fragToFix->sectionHeaders[0].defaultAddress != 0) {
- DebugStr("\pInitEngineState: Executing weird case.");
- }
- #endif
- (char *) state->sectionC -= fragToFix->sectionHeaders[0].defaultAddress;
- }
- state->sectionD = GetSectionBaseAddress(fragToFix, 1);
- if (state->sectionD != nil) {
- #if MORE_DEBUG
- if (fragToFix->sectionHeaders[1].defaultAddress != 0) {
- DebugStr("\pInitEngineState: Executing weird case.");
- }
- #endif
- (char *) state->sectionD -= fragToFix->sectionHeaders[1].defaultAddress;
- }
-
- err = noErr;
- if (state->relocAddress == nil) {
- err = cfragFragmentUsageErr;
- }
- return err;
+ OSStatus err;
+ PEFLoaderRelocationHeader *relocHeader;
+
+ MoreAssertQ(fragToFix != nil);
+ MoreAssertQ(state != nil);
+
+ // This bit is tricky. relocHeaderIndex is an index into the relocation
+ // header table, starting at relocSectionCount (which is in the loader
+ // section header) for the first relocated section and decrementing
+ // down to 1 for the last relocated section. I find the relocation
+ // header by using relocHeaderIndex as a index backwards from the
+ // start of the relocation opcodes (ie relocInstrOffset). If you
+ // look at the diagram of the layout of the container in
+ // "PEFBinaryFormat.h", you'll see that the relocation opcodes
+ // immediately follow the relocation headers.
+ //
+ // I did this because the alternative (starting at the loader
+ // header and stepping past the import library table and the
+ // import symbol table) was a pain.
+
+ relocHeader = (PEFLoaderRelocationHeader *) (((char *) fragToFix->loaderSection) + fragToFix->loaderSection->relocInstrOffset - relocHeaderIndex * sizeof(PEFLoaderRelocationHeader));
+
+ MoreAssertQ(relocHeader->reservedA == 0); // PEF spec says it must be; we check to try to catch bugs in calculation of relocHeader
+
+ state->currentReloc = relocHeader->firstRelocOffset;
+ state->terminatingReloc = relocHeader->firstRelocOffset + relocHeader->relocCount;
+ state->sectionBase = (UInt32 *) GetSectionBaseAddress(fragToFix, relocHeader->sectionIndex);
+ state->relocAddress = state->sectionBase;
+ state->importIndex = 0;
+
+ // From "Mac OS Runtime Architectures":
+ //
+ // The sectionC and sectionD variables actually contain the
+ // memory address of an instantiated section minus the
+ // default address for that section. The default address for a
+ // section is contained in the defaultAddress field of the
+ // section header. However, in almost all cases the default
+ // address should be 0, so the simplified definition suffices.
+ //
+ // In the debug version, we drop into MacsBug if this weird case
+ // ever executes because it's more likely we made a mistake than
+ // we encountered a section with a default address.
+
+ state->sectionC = GetSectionBaseAddress(fragToFix, 0);
+ if (state->sectionC != nil) {
+ #if MORE_DEBUG
+ if (fragToFix->sectionHeaders[0].defaultAddress != 0) {
+ DebugStr("\pInitEngineState: Executing weird case.");
+ }
+ #endif
+ (char *) state->sectionC -= fragToFix->sectionHeaders[0].defaultAddress;
+ }
+ state->sectionD = GetSectionBaseAddress(fragToFix, 1);
+ if (state->sectionD != nil) {
+ #if MORE_DEBUG
+ if (fragToFix->sectionHeaders[1].defaultAddress != 0) {
+ DebugStr("\pInitEngineState: Executing weird case.");
+ }
+ #endif
+ (char *) state->sectionD -= fragToFix->sectionHeaders[1].defaultAddress;
+ }
+
+ err = noErr;
+ if (state->relocAddress == nil) {
+ err = cfragFragmentUsageErr;
+ }
+ return err;
}
// kPEFRelocBasicOpcodes is a table that maps the top 7 bits of the opcode
@@ -871,490 +871,490 @@ static OSStatus InitEngineState(const FragToFixInfo *fragToFix,
static UInt8 kPEFRelocBasicOpcodes[kPEFRelocBasicOpcodeRange] = { PEFMaskedBasicOpcodes };
-static OSStatus RunRelocationEngine(const FragToFixInfo *fragToFix,
- PEFImportedLibrary *importLibrary,
- CFMLateImportLookupProc lookup, void *refCon)
- // This is where the rubber really hits the. Given a fully
- // populated fragToFix structure, the import library description
- // of the weak imported library we're resolving, and a connection
- // to the library we're going to substitute it, re-execute the
- // relocation instructions (CFM has already executed them once)
- // but only *do* instructions (ie store the change to the data section)
- // that CFM skipped because the weak symbols were missing.
+static OSStatus RunRelocationEngine(const FragToFixInfo *fragToFix,
+ PEFImportedLibrary *importLibrary,
+ CFMLateImportLookupProc lookup, void *refCon)
+ // This is where the rubber really hits the. Given a fully
+ // populated fragToFix structure, the import library description
+ // of the weak imported library we're resolving, and a connection
+ // to the library we're going to substitute it, re-execute the
+ // relocation instructions (CFM has already executed them once)
+ // but only *do* instructions (ie store the change to the data section)
+ // that CFM skipped because the weak symbols were missing.
{
- OSStatus err;
- EngineState state;
- UInt16 sectionsLeftToRelocate;
- UInt32 totalRelocs;
- UInt16 *relocInstrTable;
- UInt16 opCode;
-
- MoreAssertQ(fragToFix != nil);
- MoreAssertQ(fragToFix->containerHeader.tag1 == kPEFTag1);
- MoreAssertQ(fragToFix->sectionHeaders != nil);
- MoreAssertQ(fragToFix->loaderSection != nil);
- MoreAssertQ(fragToFix->section0Base != nil); // Technically, having a nil for these two is not a problem, ...
- MoreAssertQ(fragToFix->section1Base != nil); // but in practise it a wildly deviant case and we should know about it.
- MoreAssertQ(importLibrary != nil);
- MoreAssertQ(lookup != nil);
-
- // Before entering the loop, work out some information in advance.
-
- // totalRelocs is only used for debugging, to make sure our
- // relocation PC (state.currentReloc) doesn't run wild.
-
- totalRelocs = (fragToFix->loaderSection->loaderStringsOffset - fragToFix->loaderSection->relocInstrOffset) / sizeof(UInt16);
-
- // relocInstrTable is the base address of the table of relocation
- // instructions in the fragment to fix.
-
- relocInstrTable = (UInt16 *)((char *) fragToFix->loaderSection + fragToFix->loaderSection->relocInstrOffset);
-
- // sectionsLeftToRelocate is the loop counter for the outer loop.
-
- MoreAssertQ(fragToFix->loaderSection->relocSectionCount <= 0x0FFFF);
- sectionsLeftToRelocate = fragToFix->loaderSection->relocSectionCount;
-
- // Now let's run the relocation engine. We run it once per
- // section in the table. Each time around, we init the engine
- // and then loop again, this time executing individual opcodes.
- // The opcode loop terminates when the relocation PC
- // (state.currentReloc) hits the final opcode (state.terminatingReloc).
-
- // Note:
- // One design decision I made was to totally re-init the engine state
- // for each section. The CFM spec is unclear as to whether you're supposed
- // to totally re-init the engine state, or just re-init the section-specific
- // state (ie currentReloc, terminatingReloc, and relocAddress). I hope this
- // is correct, but it's hard to test without having a fragment with multiple
- // relocated sections, which is difficult to create.
-
- // How do I decide which opcodes should be effective (ie make changes to
- // the section being relocated) and which opcodes should just be executed
- // for their side effects (ie updated state.relocAddress or state.importIndex)?
- // The answer is both simple and subtle. Opcodes whose actions are dependent
- // on a symbol that was in the weak linked library are effective, those that
- // an independent of those symbols are not. The only opcodes that use
- // symbolic values are kPEFRelocImportRun and kPEFRelocSmByImport, and
- // these are only if the symbol is in the weak linked library.
- // All other cases are executed for their side effects only.
- //
- // How do I determine if a symbol is in the weak linked library?
- // Well I know the symbol's index and I know the lower bound and count
- // of the symbols in the weak linked library, so I just do a simple
- // bounds test, ie
- //
- // firstImportedSymbol <= importIndex < firstImportedSymbol + importedSymbolCount
-
- // From this code, it's relatively easy to see which relocation opcodes
- // aren't implemented. If you ever encounter one, you'll find yourself
- // in MacsBug with a message telling you which opcode was found. The
- // two big groups of opcodes I skipped were the large format opcodes
- // and the repeating opcodes. I skipped them because:
- //
- // a) I haven't got a way to generate them in a PEF container that I can
- // test against. Without that, there's no way I could be assured that
- // the code worked.
- //
- // b) I'm lazy.
-
- err = noErr;
- while ( sectionsLeftToRelocate > 0 ) {
- err = InitEngineState(fragToFix, sectionsLeftToRelocate, &state);
- if (err != noErr) {
- goto leaveNow;
- }
-
- while ( state.currentReloc != state.terminatingReloc ) {
-
- MoreAssertQ( state.currentReloc < totalRelocs );
-
- opCode = relocInstrTable[state.currentReloc];
- switch ( PEFRelocBasicOpcode(opCode) ) {
- case kPEFRelocBySectDWithSkip:
- {
- UInt16 skipCount;
- UInt16 relocCount;
-
- skipCount = ((opCode >> 6) & 0x00FF);
- relocCount = (opCode & 0x003F);
- state.relocAddress += skipCount;
- state.relocAddress += relocCount;
- }
- break;
- case kPEFRelocBySectC:
- case kPEFRelocBySectD:
- {
- UInt16 runLength;
-
- runLength = (opCode & 0x01FF) + 1;
- state.relocAddress += runLength;
- }
- break;
- case kPEFRelocTVector12:
- {
- UInt16 runLength;
-
- runLength = (opCode & 0x01FF) + 1;
- state.relocAddress += (runLength * 3);
- }
- break;
- case kPEFRelocTVector8:
- case kPEFRelocVTable8:
- {
- UInt16 runLength;
-
- runLength = (opCode & 0x01FF) + 1;
- state.relocAddress += (runLength * 2);
- }
- break;
- case kPEFRelocImportRun:
- {
- UInt32 symbolValue;
- UInt16 runLength;
-
- runLength = (opCode & 0x01FF) + 1;
- while (runLength > 0) {
- if ( state.importIndex >= importLibrary->firstImportedSymbol && state.importIndex < (importLibrary->firstImportedSymbol + importLibrary->importedSymbolCount) ) {
- err = LookupSymbol(lookup, refCon, fragToFix->loaderSection, state.importIndex, &symbolValue);
- if (err != noErr) {
- goto leaveNow;
- }
- *(state.relocAddress) += symbolValue;
- }
- state.importIndex += 1;
- state.relocAddress += 1;
- runLength -= 1;
- }
- }
- break;
- case kPEFRelocSmByImport:
- {
- UInt32 symbolValue;
- UInt32 index;
-
- index = (opCode & 0x01FF);
- if ( index >= importLibrary->firstImportedSymbol && index < (importLibrary->firstImportedSymbol + importLibrary->importedSymbolCount) ) {
- err = LookupSymbol(lookup, refCon, fragToFix->loaderSection, index, &symbolValue);
- if (err != noErr) {
- goto leaveNow;
- }
- *(state.relocAddress) += symbolValue;
- }
- state.importIndex = index + 1;
- state.relocAddress += 1;
- }
- break;
- case kPEFRelocSmSetSectC:
- {
- UInt32 index;
-
- index = (opCode & 0x01FF);
- state.sectionC = GetSectionBaseAddress(fragToFix, index);
- MoreAssertQ(state.sectionC != nil);
- }
- break;
- case kPEFRelocSmSetSectD:
- {
- UInt32 index;
-
- index = (opCode & 0x01FF);
- state.sectionD = GetSectionBaseAddress(fragToFix, index);
- MoreAssertQ(state.sectionD != nil);
- }
- break;
- case kPEFRelocSmBySection:
- state.relocAddress += 1;
- break;
- case kPEFRelocIncrPosition:
- {
- UInt16 offset;
-
- offset = (opCode & 0x0FFF) + 1;
- ((char *) state.relocAddress) += offset;
- }
- break;
- case kPEFRelocSmRepeat:
- #if MORE_DEBUG
- DebugStr("\pRunRelocationEngine: kPEFRelocSmRepeat not yet implemented");
- #endif
- err = unimpErr;
- goto leaveNow;
- break;
- case kPEFRelocSetPosition:
- {
- UInt32 offset;
-
- // Lot's of folks have tried various interpretations of the description of
- // this opCode in "Mac OS Runtime Architectures" (which states "This instruction
- // sets relocAddress to the address of the section offset offset." *smile*).
- // I eventually dug into the CFM source code to find my interpretation, which
- // I believe is correct. The key point is tht the offset is relative to
- // the start of the section for which these relocations are being performed.
-
- // Skip to next reloc word, which is the second chunk of the offset.
-
- state.currentReloc += 1;
-
- // Extract offset based on the most significant 10 bits in opCode and
- // the next significant 16 bits in the next reloc word.
-
- offset = PEFRelocSetPosFullOffset(opCode, relocInstrTable[state.currentReloc]);
-
- state.relocAddress = (UInt32 *) ( ((char *) state.sectionBase) + offset);
- }
- break;
- case kPEFRelocLgByImport:
- {
- UInt32 symbolValue;
- UInt32 index;
-
- // Get the 26 bit symbol index from the current and next reloc words.
-
- state.currentReloc += 1;
- index = PEFRelocLgByImportFullIndex(opCode, relocInstrTable[state.currentReloc]);
-
- if ( index >= importLibrary->firstImportedSymbol && index < (importLibrary->firstImportedSymbol + importLibrary->importedSymbolCount) ) {
- err = LookupSymbol(lookup, refCon, fragToFix->loaderSection, index, &symbolValue);
- if (err != noErr) {
- goto leaveNow;
- }
- *(state.relocAddress) += symbolValue;
- }
- state.importIndex = index + 1;
- state.relocAddress += 1;
- }
- break;
- case kPEFRelocLgRepeat:
- #if MORE_DEBUG
- DebugStr("\pRunRelocationEngine: kPEFRelocLgRepeat not yet implemented");
- #endif
- err = unimpErr;
- goto leaveNow;
- break;
- case kPEFRelocLgSetOrBySection:
- #if MORE_DEBUG
- DebugStr("\pRunRelocationEngine: kPEFRelocLgSetOrBySection not yet implemented");
- #endif
- err = unimpErr;
- goto leaveNow;
- break;
- case kPEFRelocUndefinedOpcode:
- err = cfragFragmentCorruptErr;
- goto leaveNow;
- break;
- default:
- MoreAssertQ(false);
- err = cfragFragmentCorruptErr;
- goto leaveNow;
- break;
- }
- state.currentReloc += 1;
- }
-
- sectionsLeftToRelocate -= 1;
- }
+ OSStatus err;
+ EngineState state;
+ UInt16 sectionsLeftToRelocate;
+ UInt32 totalRelocs;
+ UInt16 *relocInstrTable;
+ UInt16 opCode;
+
+ MoreAssertQ(fragToFix != nil);
+ MoreAssertQ(fragToFix->containerHeader.tag1 == kPEFTag1);
+ MoreAssertQ(fragToFix->sectionHeaders != nil);
+ MoreAssertQ(fragToFix->loaderSection != nil);
+ MoreAssertQ(fragToFix->section0Base != nil); // Technically, having a nil for these two is not a problem, ...
+ MoreAssertQ(fragToFix->section1Base != nil); // but in practise it a wildly deviant case and we should know about it.
+ MoreAssertQ(importLibrary != nil);
+ MoreAssertQ(lookup != nil);
+
+ // Before entering the loop, work out some information in advance.
+
+ // totalRelocs is only used for debugging, to make sure our
+ // relocation PC (state.currentReloc) doesn't run wild.
+
+ totalRelocs = (fragToFix->loaderSection->loaderStringsOffset - fragToFix->loaderSection->relocInstrOffset) / sizeof(UInt16);
+
+ // relocInstrTable is the base address of the table of relocation
+ // instructions in the fragment to fix.
+
+ relocInstrTable = (UInt16 *)((char *) fragToFix->loaderSection + fragToFix->loaderSection->relocInstrOffset);
+
+ // sectionsLeftToRelocate is the loop counter for the outer loop.
+
+ MoreAssertQ(fragToFix->loaderSection->relocSectionCount <= 0x0FFFF);
+ sectionsLeftToRelocate = fragToFix->loaderSection->relocSectionCount;
+
+ // Now let's run the relocation engine. We run it once per
+ // section in the table. Each time around, we init the engine
+ // and then loop again, this time executing individual opcodes.
+ // The opcode loop terminates when the relocation PC
+ // (state.currentReloc) hits the final opcode (state.terminatingReloc).
+
+ // Note:
+ // One design decision I made was to totally re-init the engine state
+ // for each section. The CFM spec is unclear as to whether you're supposed
+ // to totally re-init the engine state, or just re-init the section-specific
+ // state (ie currentReloc, terminatingReloc, and relocAddress). I hope this
+ // is correct, but it's hard to test without having a fragment with multiple
+ // relocated sections, which is difficult to create.
+
+ // How do I decide which opcodes should be effective (ie make changes to
+ // the section being relocated) and which opcodes should just be executed
+ // for their side effects (ie updated state.relocAddress or state.importIndex)?
+ // The answer is both simple and subtle. Opcodes whose actions are dependent
+ // on a symbol that was in the weak linked library are effective, those that
+ // an independent of those symbols are not. The only opcodes that use
+ // symbolic values are kPEFRelocImportRun and kPEFRelocSmByImport, and
+ // these are only if the symbol is in the weak linked library.
+ // All other cases are executed for their side effects only.
+ //
+ // How do I determine if a symbol is in the weak linked library?
+ // Well I know the symbol's index and I know the lower bound and count
+ // of the symbols in the weak linked library, so I just do a simple
+ // bounds test, ie
+ //
+ // firstImportedSymbol <= importIndex < firstImportedSymbol + importedSymbolCount
+
+ // From this code, it's relatively easy to see which relocation opcodes
+ // aren't implemented. If you ever encounter one, you'll find yourself
+ // in MacsBug with a message telling you which opcode was found. The
+ // two big groups of opcodes I skipped were the large format opcodes
+ // and the repeating opcodes. I skipped them because:
+ //
+ // a) I haven't got a way to generate them in a PEF container that I can
+ // test against. Without that, there's no way I could be assured that
+ // the code worked.
+ //
+ // b) I'm lazy.
+
+ err = noErr;
+ while ( sectionsLeftToRelocate > 0 ) {
+ err = InitEngineState(fragToFix, sectionsLeftToRelocate, &state);
+ if (err != noErr) {
+ goto leaveNow;
+ }
+
+ while ( state.currentReloc != state.terminatingReloc ) {
+
+ MoreAssertQ( state.currentReloc < totalRelocs );
+
+ opCode = relocInstrTable[state.currentReloc];
+ switch ( PEFRelocBasicOpcode(opCode) ) {
+ case kPEFRelocBySectDWithSkip:
+ {
+ UInt16 skipCount;
+ UInt16 relocCount;
+
+ skipCount = ((opCode >> 6) & 0x00FF);
+ relocCount = (opCode & 0x003F);
+ state.relocAddress += skipCount;
+ state.relocAddress += relocCount;
+ }
+ break;
+ case kPEFRelocBySectC:
+ case kPEFRelocBySectD:
+ {
+ UInt16 runLength;
+
+ runLength = (opCode & 0x01FF) + 1;
+ state.relocAddress += runLength;
+ }
+ break;
+ case kPEFRelocTVector12:
+ {
+ UInt16 runLength;
+
+ runLength = (opCode & 0x01FF) + 1;
+ state.relocAddress += (runLength * 3);
+ }
+ break;
+ case kPEFRelocTVector8:
+ case kPEFRelocVTable8:
+ {
+ UInt16 runLength;
+
+ runLength = (opCode & 0x01FF) + 1;
+ state.relocAddress += (runLength * 2);
+ }
+ break;
+ case kPEFRelocImportRun:
+ {
+ UInt32 symbolValue;
+ UInt16 runLength;
+
+ runLength = (opCode & 0x01FF) + 1;
+ while (runLength > 0) {
+ if ( state.importIndex >= importLibrary->firstImportedSymbol && state.importIndex < (importLibrary->firstImportedSymbol + importLibrary->importedSymbolCount) ) {
+ err = LookupSymbol(lookup, refCon, fragToFix->loaderSection, state.importIndex, &symbolValue);
+ if (err != noErr) {
+ goto leaveNow;
+ }
+ *(state.relocAddress) += symbolValue;
+ }
+ state.importIndex += 1;
+ state.relocAddress += 1;
+ runLength -= 1;
+ }
+ }
+ break;
+ case kPEFRelocSmByImport:
+ {
+ UInt32 symbolValue;
+ UInt32 index;
+
+ index = (opCode & 0x01FF);
+ if ( index >= importLibrary->firstImportedSymbol && index < (importLibrary->firstImportedSymbol + importLibrary->importedSymbolCount) ) {
+ err = LookupSymbol(lookup, refCon, fragToFix->loaderSection, index, &symbolValue);
+ if (err != noErr) {
+ goto leaveNow;
+ }
+ *(state.relocAddress) += symbolValue;
+ }
+ state.importIndex = index + 1;
+ state.relocAddress += 1;
+ }
+ break;
+ case kPEFRelocSmSetSectC:
+ {
+ UInt32 index;
+
+ index = (opCode & 0x01FF);
+ state.sectionC = GetSectionBaseAddress(fragToFix, index);
+ MoreAssertQ(state.sectionC != nil);
+ }
+ break;
+ case kPEFRelocSmSetSectD:
+ {
+ UInt32 index;
+
+ index = (opCode & 0x01FF);
+ state.sectionD = GetSectionBaseAddress(fragToFix, index);
+ MoreAssertQ(state.sectionD != nil);
+ }
+ break;
+ case kPEFRelocSmBySection:
+ state.relocAddress += 1;
+ break;
+ case kPEFRelocIncrPosition:
+ {
+ UInt16 offset;
+
+ offset = (opCode & 0x0FFF) + 1;
+ ((char *) state.relocAddress) += offset;
+ }
+ break;
+ case kPEFRelocSmRepeat:
+ #if MORE_DEBUG
+ DebugStr("\pRunRelocationEngine: kPEFRelocSmRepeat not yet implemented");
+ #endif
+ err = unimpErr;
+ goto leaveNow;
+ break;
+ case kPEFRelocSetPosition:
+ {
+ UInt32 offset;
+
+ // Lot's of folks have tried various interpretations of the description of
+ // this opCode in "Mac OS Runtime Architectures" (which states "This instruction
+ // sets relocAddress to the address of the section offset offset." *smile*).
+ // I eventually dug into the CFM source code to find my interpretation, which
+ // I believe is correct. The key point is tht the offset is relative to
+ // the start of the section for which these relocations are being performed.
+
+ // Skip to next reloc word, which is the second chunk of the offset.
+
+ state.currentReloc += 1;
+
+ // Extract offset based on the most significant 10 bits in opCode and
+ // the next significant 16 bits in the next reloc word.
+
+ offset = PEFRelocSetPosFullOffset(opCode, relocInstrTable[state.currentReloc]);
+
+ state.relocAddress = (UInt32 *) ( ((char *) state.sectionBase) + offset);
+ }
+ break;
+ case kPEFRelocLgByImport:
+ {
+ UInt32 symbolValue;
+ UInt32 index;
+
+ // Get the 26 bit symbol index from the current and next reloc words.
+
+ state.currentReloc += 1;
+ index = PEFRelocLgByImportFullIndex(opCode, relocInstrTable[state.currentReloc]);
+
+ if ( index >= importLibrary->firstImportedSymbol && index < (importLibrary->firstImportedSymbol + importLibrary->importedSymbolCount) ) {
+ err = LookupSymbol(lookup, refCon, fragToFix->loaderSection, index, &symbolValue);
+ if (err != noErr) {
+ goto leaveNow;
+ }
+ *(state.relocAddress) += symbolValue;
+ }
+ state.importIndex = index + 1;
+ state.relocAddress += 1;
+ }
+ break;
+ case kPEFRelocLgRepeat:
+ #if MORE_DEBUG
+ DebugStr("\pRunRelocationEngine: kPEFRelocLgRepeat not yet implemented");
+ #endif
+ err = unimpErr;
+ goto leaveNow;
+ break;
+ case kPEFRelocLgSetOrBySection:
+ #if MORE_DEBUG
+ DebugStr("\pRunRelocationEngine: kPEFRelocLgSetOrBySection not yet implemented");
+ #endif
+ err = unimpErr;
+ goto leaveNow;
+ break;
+ case kPEFRelocUndefinedOpcode:
+ err = cfragFragmentCorruptErr;
+ goto leaveNow;
+ break;
+ default:
+ MoreAssertQ(false);
+ err = cfragFragmentCorruptErr;
+ goto leaveNow;
+ break;
+ }
+ state.currentReloc += 1;
+ }
+
+ sectionsLeftToRelocate -= 1;
+ }
leaveNow:
- return err;
+ return err;
}
extern pascal OSStatus CFMLateImportCore(const CFragSystem7DiskFlatLocator *fragToFixLocator,
- CFragConnectionID fragToFixConnID,
- CFragInitFunction fragToFixInitRoutine,
- ConstStr255Param weakLinkedLibraryName,
- CFMLateImportLookupProc lookup,
- void *refCon)
- // See comments in interface part.
+ CFragConnectionID fragToFixConnID,
+ CFragInitFunction fragToFixInitRoutine,
+ ConstStr255Param weakLinkedLibraryName,
+ CFMLateImportLookupProc lookup,
+ void *refCon)
+ // See comments in interface part.
{
- OSStatus err;
- OSStatus junk;
- FragToFixInfo fragToFix;
- PEFImportedLibrary *importLibrary;
- char weakLinkedLibraryNameCString[256];
-
- MoreAssertQ(fragToFixLocator != nil);
- MoreAssertQ(fragToFixConnID != nil);
- MoreAssertQ(fragToFixInitRoutine != nil);
- MoreAssertQ(weakLinkedLibraryName != nil);
- MoreAssertQ(lookup != nil);
-
- // Fill out the bits of fragToFix which are passed in
- // by the client.
-
- MoreBlockZero(&fragToFix, sizeof(fragToFix));
- fragToFix.locator = *fragToFixLocator;
- fragToFix.connID = fragToFixConnID;
- fragToFix.initRoutine = fragToFixInitRoutine;
-
- // Make a C string from weakLinkedLibraryName.
-
- BlockMoveData(weakLinkedLibraryName + 1, weakLinkedLibraryNameCString, weakLinkedLibraryName[0]);
- weakLinkedLibraryNameCString[weakLinkedLibraryName[0]] = 0;
-
- // Get the basic information from the fragment.
- // Fills out the containerHeader, sectionHeaders, loaderSection and fileRef fields
- // of fragToFix.
-
- err = ReadContainerBasics(&fragToFix);
-
- // Set up the base address fields in fragToFix (ie section0Base and section1Base)
- // by looking up our init routine (fragToFix.initRoutine) and subtracting
- // away the section offsets (which we get from the disk copy of the section)
- // to derive the bases of the sections themselves.
-
- if (err == noErr) {
- err = SetupSectionBaseAddresses(&fragToFix);
- }
-
- // Look inside the loader section for the import library description
- // of weakLinkedLibraryName. We need this to know the range of symbol
- // indexes we're going to fix up.
-
- if (err == noErr) {
- err = FindImportLibrary(fragToFix.loaderSection, weakLinkedLibraryNameCString, &importLibrary);
- }
-
- // Do a quick check to ensure that the library was actually imported weak.
- // If it wasn't, it doesn't make much sense to resolve its weak imports
- // later on. Resolving them again is likely to be bad.
-
- if (err == noErr) {
- if ((importLibrary->options & kPEFWeakImportLibMask) == 0) {
- err = cfragFragmentUsageErr;
- }
- }
-
- // Now run the main relocation engine.
-
- if (err == noErr) {
- err = RunRelocationEngine(&fragToFix, importLibrary, lookup, refCon);
- }
-
- // Clean up.
-
- if (fragToFix.disposeSectionPointers) {
- if (fragToFix.fileRef != 0) {
- junk = FSClose(fragToFix.fileRef);
- MoreAssertQ(junk == noErr);
- }
- if (fragToFix.loaderSection != nil) {
- DisposePtr( (Ptr) fragToFix.loaderSection);
- MoreAssertQ(MemError() == noErr);
- }
- if (fragToFix.sectionHeaders != nil) {
- DisposePtr( (Ptr) fragToFix.sectionHeaders);
- MoreAssertQ(MemError() == noErr);
- }
- }
- return err;
+ OSStatus err;
+ OSStatus junk;
+ FragToFixInfo fragToFix;
+ PEFImportedLibrary *importLibrary;
+ char weakLinkedLibraryNameCString[256];
+
+ MoreAssertQ(fragToFixLocator != nil);
+ MoreAssertQ(fragToFixConnID != nil);
+ MoreAssertQ(fragToFixInitRoutine != nil);
+ MoreAssertQ(weakLinkedLibraryName != nil);
+ MoreAssertQ(lookup != nil);
+
+ // Fill out the bits of fragToFix which are passed in
+ // by the client.
+
+ MoreBlockZero(&fragToFix, sizeof(fragToFix));
+ fragToFix.locator = *fragToFixLocator;
+ fragToFix.connID = fragToFixConnID;
+ fragToFix.initRoutine = fragToFixInitRoutine;
+
+ // Make a C string from weakLinkedLibraryName.
+
+ BlockMoveData(weakLinkedLibraryName + 1, weakLinkedLibraryNameCString, weakLinkedLibraryName[0]);
+ weakLinkedLibraryNameCString[weakLinkedLibraryName[0]] = 0;
+
+ // Get the basic information from the fragment.
+ // Fills out the containerHeader, sectionHeaders, loaderSection and fileRef fields
+ // of fragToFix.
+
+ err = ReadContainerBasics(&fragToFix);
+
+ // Set up the base address fields in fragToFix (ie section0Base and section1Base)
+ // by looking up our init routine (fragToFix.initRoutine) and subtracting
+ // away the section offsets (which we get from the disk copy of the section)
+ // to derive the bases of the sections themselves.
+
+ if (err == noErr) {
+ err = SetupSectionBaseAddresses(&fragToFix);
+ }
+
+ // Look inside the loader section for the import library description
+ // of weakLinkedLibraryName. We need this to know the range of symbol
+ // indexes we're going to fix up.
+
+ if (err == noErr) {
+ err = FindImportLibrary(fragToFix.loaderSection, weakLinkedLibraryNameCString, &importLibrary);
+ }
+
+ // Do a quick check to ensure that the library was actually imported weak.
+ // If it wasn't, it doesn't make much sense to resolve its weak imports
+ // later on. Resolving them again is likely to be bad.
+
+ if (err == noErr) {
+ if ((importLibrary->options & kPEFWeakImportLibMask) == 0) {
+ err = cfragFragmentUsageErr;
+ }
+ }
+
+ // Now run the main relocation engine.
+
+ if (err == noErr) {
+ err = RunRelocationEngine(&fragToFix, importLibrary, lookup, refCon);
+ }
+
+ // Clean up.
+
+ if (fragToFix.disposeSectionPointers) {
+ if (fragToFix.fileRef != 0) {
+ junk = FSClose(fragToFix.fileRef);
+ MoreAssertQ(junk == noErr);
+ }
+ if (fragToFix.loaderSection != nil) {
+ DisposePtr( (Ptr) fragToFix.loaderSection);
+ MoreAssertQ(MemError() == noErr);
+ }
+ if (fragToFix.sectionHeaders != nil) {
+ DisposePtr( (Ptr) fragToFix.sectionHeaders);
+ MoreAssertQ(MemError() == noErr);
+ }
+ }
+ return err;
}
static pascal OSStatus FragmentLookup(ConstStr255Param symName, CFragSymbolClass symClass,
- void **symAddr, void *refCon)
- // This is the CFMLateImportLookupProc callback used when
- // late importing from a CFM shared library.
+ void **symAddr, void *refCon)
+ // This is the CFMLateImportLookupProc callback used when
+ // late importing from a CFM shared library.
{
- OSStatus err;
- CFragConnectionID connIDToImport;
- CFragSymbolClass foundSymClass;
-
- MoreAssertQ(symName != nil);
- MoreAssertQ(symAddr != nil);
- MoreAssertQ(refCon != nil);
-
- connIDToImport = (CFragConnectionID) refCon;
-
- // Shame there's no way to validate that connIDToImport is valid.
-
- err = FindSymbol(connIDToImport, symName, (Ptr *) symAddr, &foundSymClass);
- if (err == noErr) {
- // If the symbol isn't of the right class, we act like we didn't
- // find it, but also assert in the debug build because weird things
- // are afoot.
- if (foundSymClass != symClass) {
- MoreAssertQ(false);
- *symAddr = nil;
- err = cfragNoSymbolErr;
- }
- }
- return err;
+ OSStatus err;
+ CFragConnectionID connIDToImport;
+ CFragSymbolClass foundSymClass;
+
+ MoreAssertQ(symName != nil);
+ MoreAssertQ(symAddr != nil);
+ MoreAssertQ(refCon != nil);
+
+ connIDToImport = (CFragConnectionID) refCon;
+
+ // Shame there's no way to validate that connIDToImport is valid.
+
+ err = FindSymbol(connIDToImport, symName, (Ptr *) symAddr, &foundSymClass);
+ if (err == noErr) {
+ // If the symbol isn't of the right class, we act like we didn't
+ // find it, but also assert in the debug build because weird things
+ // are afoot.
+ if (foundSymClass != symClass) {
+ MoreAssertQ(false);
+ *symAddr = nil;
+ err = cfragNoSymbolErr;
+ }
+ }
+ return err;
}
extern pascal OSStatus CFMLateImportLibrary(const CFragSystem7DiskFlatLocator *fragToFixLocator,
- CFragConnectionID fragToFixConnID,
- CFragInitFunction fragToFixInitRoutine,
- ConstStr255Param weakLinkedLibraryName,
- CFragConnectionID connIDToImport)
- // See comments in interface part.
+ CFragConnectionID fragToFixConnID,
+ CFragInitFunction fragToFixInitRoutine,
+ ConstStr255Param weakLinkedLibraryName,
+ CFragConnectionID connIDToImport)
+ // See comments in interface part.
{
- MoreAssertQ(connIDToImport != nil);
- return CFMLateImportCore(fragToFixLocator, fragToFixConnID, fragToFixInitRoutine,
- weakLinkedLibraryName, FragmentLookup, connIDToImport);
+ MoreAssertQ(connIDToImport != nil);
+ return CFMLateImportCore(fragToFixLocator, fragToFixConnID, fragToFixInitRoutine,
+ weakLinkedLibraryName, FragmentLookup, connIDToImport);
}
static pascal OSStatus BundleLookup(ConstStr255Param symName, CFragSymbolClass symClass,
- void **symAddr, void *refCon)
- // This is the CFMLateImportLookupProc callback used when
- // late importing from a CFBundle.
+ void **symAddr, void *refCon)
+ // This is the CFMLateImportLookupProc callback used when
+ // late importing from a CFBundle.
{
- OSStatus err;
- CFBundleRef bundleToImport;
- CFStringRef symNameStr;
-
- MoreAssertQ(symName != nil);
- MoreAssertQ(symAddr != nil);
- MoreAssertQ(refCon != nil);
-
- symNameStr = nil;
-
- bundleToImport = (CFBundleRef) refCon;
-
- // Shame there's no way to validate that bundleToImport is really a bundle.
-
- // We can only find function pointers because CFBundleGetFunctionPointerForName
- // only works for function pointers. So if the client is asking for something
- // other than a function pointer (ie TVector symbol) then we don't even true.
- // Also assert in the debug build because this shows a certain lack of
- // understanding on the part of the client.
- //
- // CF is being revise to support accessing data symbols using a new API
- // (currently this is available to Apple internal developers as
- // CFBundleGetDataPointerForName). When the new API is available in a
- // public header file I should revise this code to lift this restriction.
-
- err = noErr;
- if (symClass != kTVectorCFragSymbol) {
- MoreAssertQ(false);
- err = cfragNoSymbolErr;
- }
- if (err == noErr) {
- symNameStr = CFStringCreateWithPascalString(kCFAllocatorSystemDefault,
- symName, kCFStringEncodingMacRoman);
- if (symNameStr == nil) {
- err = coreFoundationUnknownErr;
- }
- }
- if (err == noErr) {
- *symAddr = CFBundleGetFunctionPointerForName(bundleToImport, symNameStr);
- if (*symAddr == nil) {
- err = cfragNoSymbolErr;
- }
- }
- if (symNameStr != nil) {
- CFRelease(symNameStr);
- }
- return err;
+ OSStatus err;
+ CFBundleRef bundleToImport;
+ CFStringRef symNameStr;
+
+ MoreAssertQ(symName != nil);
+ MoreAssertQ(symAddr != nil);
+ MoreAssertQ(refCon != nil);
+
+ symNameStr = nil;
+
+ bundleToImport = (CFBundleRef) refCon;
+
+ // Shame there's no way to validate that bundleToImport is really a bundle.
+
+ // We can only find function pointers because CFBundleGetFunctionPointerForName
+ // only works for function pointers. So if the client is asking for something
+ // other than a function pointer (ie TVector symbol) then we don't even true.
+ // Also assert in the debug build because this shows a certain lack of
+ // understanding on the part of the client.
+ //
+ // CF is being revise to support accessing data symbols using a new API
+ // (currently this is available to Apple internal developers as
+ // CFBundleGetDataPointerForName). When the new API is available in a
+ // public header file I should revise this code to lift this restriction.
+
+ err = noErr;
+ if (symClass != kTVectorCFragSymbol) {
+ MoreAssertQ(false);
+ err = cfragNoSymbolErr;
+ }
+ if (err == noErr) {
+ symNameStr = CFStringCreateWithPascalString(kCFAllocatorSystemDefault,
+ symName, kCFStringEncodingMacRoman);
+ if (symNameStr == nil) {
+ err = coreFoundationUnknownErr;
+ }
+ }
+ if (err == noErr) {
+ *symAddr = CFBundleGetFunctionPointerForName(bundleToImport, symNameStr);
+ if (*symAddr == nil) {
+ err = cfragNoSymbolErr;
+ }
+ }
+ if (symNameStr != nil) {
+ CFRelease(symNameStr);
+ }
+ return err;
}
extern pascal OSStatus CFMLateImportBundle(const CFragSystem7DiskFlatLocator *fragToFixLocator,
- CFragConnectionID fragToFixConnID,
- CFragInitFunction fragToFixInitRoutine,
- ConstStr255Param weakLinkedLibraryName,
- CFBundleRef bundleToImport)
- // See comments in interface part.
+ CFragConnectionID fragToFixConnID,
+ CFragInitFunction fragToFixInitRoutine,
+ ConstStr255Param weakLinkedLibraryName,
+ CFBundleRef bundleToImport)
+ // See comments in interface part.
{
- MoreAssertQ(bundleToImport != nil);
- return CFMLateImportCore(fragToFixLocator, fragToFixConnID, fragToFixInitRoutine,
- weakLinkedLibraryName, BundleLookup, bundleToImport);
+ MoreAssertQ(bundleToImport != nil);
+ return CFMLateImportCore(fragToFixLocator, fragToFixConnID, fragToFixInitRoutine,
+ weakLinkedLibraryName, BundleLookup, bundleToImport);
}
diff --git a/Mac/Modules/cg/CFMLateImport.h b/Mac/Modules/cg/CFMLateImport.h
index f3a89bc..0878960 100755
--- a/Mac/Modules/cg/CFMLateImport.h
+++ b/Mac/Modules/cg/CFMLateImport.h
@@ -1,33 +1,33 @@
/*
- File: CFMLateImport.h
+ File: CFMLateImport.h
- Contains: Interface to CFM late import library.
+ Contains: Interface to CFM late import library.
- Written by: Quinn
+ Written by: Quinn
- Copyright: Copyright © 1999 by Apple Computer, Inc., all rights reserved.
+ Copyright: Copyright © 1999 by Apple Computer, Inc., all rights reserved.
- You may incorporate this Apple sample source code into your program(s) without
- restriction. This Apple sample source code has been provided "AS IS" and the
- responsibility for its operation is yours. You are not permitted to redistribute
- this Apple sample source code as "Apple sample source code" after having made
- changes. If you're going to re-distribute the source, we require that you make
- it clear in the source that the code was descended from Apple sample source
- code, but that you've made changes.
+ You may incorporate this Apple sample source code into your program(s) without
+ restriction. This Apple sample source code has been provided "AS IS" and the
+ responsibility for its operation is yours. You are not permitted to redistribute
+ this Apple sample source code as "Apple sample source code" after having made
+ changes. If you're going to re-distribute the source, we require that you make
+ it clear in the source that the code was descended from Apple sample source
+ code, but that you've made changes.
- Change History (most recent first):
+ Change History (most recent first):
- <6> 21/9/01 Quinn Changes for CWPro7 Mach-O build.
- <5> 19/9/01 Quinn Change comments to reflect the fact that an unpacked data
- section is no longer required.
- <4> 19/9/01 Quinn Simplified API and implementation after a suggestion by Eric
- Grant. You no longer have to CFM export a dummy function; you
- can just pass in the address of your fragment's init routine.
- <3> 16/11/00 Quinn Allow symbol finding via a callback and use that to implement
- CFBundle support.
- <2> 18/10/99 Quinn Renamed CFMLateImport to CFMLateImportLibrary to allow for
- possible future API expansion.
- <1> 15/6/99 Quinn First checked in.
+ <6> 21/9/01 Quinn Changes for CWPro7 Mach-O build.
+ <5> 19/9/01 Quinn Change comments to reflect the fact that an unpacked data
+ section is no longer required.
+ <4> 19/9/01 Quinn Simplified API and implementation after a suggestion by Eric
+ Grant. You no longer have to CFM export a dummy function; you
+ can just pass in the address of your fragment's init routine.
+ <3> 16/11/00 Quinn Allow symbol finding via a callback and use that to implement
+ CFBundle support.
+ <2> 18/10/99 Quinn Renamed CFMLateImport to CFMLateImportLibrary to allow for
+ possible future API expansion.
+ <1> 15/6/99 Quinn First checked in.
*/
#pragma once
@@ -41,10 +41,10 @@
// Mac OS Interfaces
#if ! MORE_FRAMEWORK_INCLUDES
- #include <MacTypes.h>
- #include <CodeFragments.h>
- #include <Devices.h>
- #include <CFBundle.h>
+ #include <MacTypes.h>
+ #include <CodeFragments.h>
+ #include <Devices.h>
+ #include <CFBundle.h>
#endif
/////////////////////////////////////////////////////////////////
@@ -53,219 +53,219 @@
extern "C" {
#endif
-/* FAQ
- ---
-
- Q: What does this library do?
- A: It allows you to resolve a weak linked library at runtime,
- by supply a CFM connection to the library that should substitute
- for the weak linked one.
-
- Q: Does the substituted library have to have the same name as the
- weak linked library.
- A: No.
-
- Q: What's this useful for?
- A: The most obvious example of where this is useful is when
- you rely on shared libraries that the user might delete
- or move. To can find the shared library (possibly even
- using CatSearch), call GetDiskFragment to open a connection
- to it, late import it using this library, and then the
- rest of your code can continue to use the shared library
- as if nothing had happened. No more defining thousands
- of stub routines which call through routine pointers.
-
- There are, however, numerous less obvious uses. You can
- use this code to make a 'self repairing' application. If
- the user removes your shared library from the Extensions
- folder, the startup code for your application can offer
- tor re-install it. If the user agrees, you can then
- re-install your shared library, late import it, and then
- continue running your application if nothing happened.
-
- You can even use this code to free yourself from the
- Extensions folder entirely. Say you have a suite of
- applications that currently installs a dozen shared
- libraries in the Extensions folder. You can move those
- libraries to another folder entirely and each application's
- startup code can track down the library (using an alias
- in the Preferences file) and late import it.
-
- An even cooler use is to provide easy abstraction layers.
- Say you have a network code for both the MacTCP
- API and the Open Transport API. Typically, you would be
- force to do this by having an abstraction layer where every
- routine contains a switch between MacTCP and OT. Your
- OpenSocket routine might look like:
+/* FAQ
+ ---
- static int OpenSocket(void)
- {
- if (gOTAvailable) {
- return OpenSocketOT();
- } else {
- return OpenSocketMacTCP();
- }
- }
-
- With this code, you can avoid that entirely. Simply
- weak link to a shared library that you know is never
- going to be implemented ("crea;MySocketsDummy") and then,
- at runtime, decide whether the system has MacTCP or OT
- and late import the relevant real implementation
- ("crea;MySocketsMacTCP" or "crea;MySocketsOT").
- One benefit of this approach is that only the MacTCP or
- the OT code is resident in memory on any given system.
+ Q: What does this library do?
+ A: It allows you to resolve a weak linked library at runtime,
+ by supply a CFM connection to the library that should substitute
+ for the weak linked one.
+
+ Q: Does the substituted library have to have the same name as the
+ weak linked library.
+ A: No.
+
+ Q: What's this useful for?
+ A: The most obvious example of where this is useful is when
+ you rely on shared libraries that the user might delete
+ or move. To can find the shared library (possibly even
+ using CatSearch), call GetDiskFragment to open a connection
+ to it, late import it using this library, and then the
+ rest of your code can continue to use the shared library
+ as if nothing had happened. No more defining thousands
+ of stub routines which call through routine pointers.
+
+ There are, however, numerous less obvious uses. You can
+ use this code to make a 'self repairing' application. If
+ the user removes your shared library from the Extensions
+ folder, the startup code for your application can offer
+ tor re-install it. If the user agrees, you can then
+ re-install your shared library, late import it, and then
+ continue running your application if nothing happened.
+
+ You can even use this code to free yourself from the
+ Extensions folder entirely. Say you have a suite of
+ applications that currently installs a dozen shared
+ libraries in the Extensions folder. You can move those
+ libraries to another folder entirely and each application's
+ startup code can track down the library (using an alias
+ in the Preferences file) and late import it.
+
+ An even cooler use is to provide easy abstraction layers.
+ Say you have a network code for both the MacTCP
+ API and the Open Transport API. Typically, you would be
+ force to do this by having an abstraction layer where every
+ routine contains a switch between MacTCP and OT. Your
+ OpenSocket routine might look like:
+
+ static int OpenSocket(void)
+ {
+ if (gOTAvailable) {
+ return OpenSocketOT();
+ } else {
+ return OpenSocketMacTCP();
+ }
+ }
+
+ With this code, you can avoid that entirely. Simply
+ weak link to a shared library that you know is never
+ going to be implemented ("crea;MySocketsDummy") and then,
+ at runtime, decide whether the system has MacTCP or OT
+ and late import the relevant real implementation
+ ("crea;MySocketsMacTCP" or "crea;MySocketsOT").
+ One benefit of this approach is that only the MacTCP or
+ the OT code is resident in memory on any given system.
*/
typedef pascal OSStatus (*CFMLateImportLookupProc)(ConstStr255Param symName, CFragSymbolClass symClass,
- void **symAddr, void *refCon);
- // CFMLateImportLookupProc defines a callback for CFMLateImportCore.
- // The routine is expected to look up the address of the symbol named
- // symName and return it in *symAddr. The symbol should be of class
- // symClass, although the callback decides whether a class mismatch is
- // an error. refCon is an application defined value that was originally
- // passed in to CFMLateImportCore.
- //
- // If this routine returns an error, a symbol address of 0 is assumed.
- // If the symbol is marked as a weak import, the CFMLateImportCore will
- // continue, otherwise the CFMLateImportCore routine will fail with the
- // error.
-
+ void **symAddr, void *refCon);
+ // CFMLateImportLookupProc defines a callback for CFMLateImportCore.
+ // The routine is expected to look up the address of the symbol named
+ // symName and return it in *symAddr. The symbol should be of class
+ // symClass, although the callback decides whether a class mismatch is
+ // an error. refCon is an application defined value that was originally
+ // passed in to CFMLateImportCore.
+ //
+ // If this routine returns an error, a symbol address of 0 is assumed.
+ // If the symbol is marked as a weak import, the CFMLateImportCore will
+ // continue, otherwise the CFMLateImportCore routine will fail with the
+ // error.
+
extern pascal OSStatus CFMLateImportCore(const CFragSystem7DiskFlatLocator *fragToFixLocator,
- CFragConnectionID fragToFixConnID,
- CFragInitFunction fragToFixInitRoutine,
- ConstStr255Param weakLinkedLibraryName,
- CFMLateImportLookupProc lookup,
- void *refCon);
- // This routine will link you, at runtime, to some library
- // that you were weak linked to and wasn't present when your
- // fragment was prepared. As well as the obvious functionality
- // of being able to resolve weak links after prepare time,
- // this functionality can be put to a number of less obvious uses,
- // some of which are discussed at the top of this header file.
- //
- // To call this routine, you need a number of pieces of information:
- //
- // 1. fragToFixLocator, fragToFixConnID: The location of your own
- // code fragment on disk and the CFM connection ID to your own
- // code fragment. Typically you get this information from your
- // fragment's CFM init routine. You must ensure that
- // fragToFixLocator->fileSpec points to an FSSpec of the
- // file which holds your code fragment.
- //
- // IMPORTANT:
- // The fact that you pass in a CFragSystem7DiskFlatLocator as the
- // fragToFixLocator implies that the fragment to be fixed up must
- // be in the data fork of a file. The code could be modified
- // to remove this requirement, but on disk code fragments are the most
- // common case.
- //
- // IMPORTANT:
- // The fragment to fix may have a packed data section. Packing the
- // data section will reduce the size of your fragment on disk, but it
- // will significantly increase the memory needed by this routine
- // (it increases memory usage by the sum of the sizes of the packed
- // and unpacked data section). See below for instructions on how to
- // create an unpacked data section.
- //
- // 2. fragToFixInitRoutine: A pointer to your own code fragment's
- // fragment initialiser routine. You necessarily have one of these
- // because you need it to get values for the fragToFixLocator and
- // fragToFixConnID parameters. Just pass its address in as a parameter
- // as well.
- //
- // 3. weakLinkedLibraryName: The name of the weak linked library which
- // failed to link. You must have weak linked to this library.
- // It is oxymoric for you to pass a strong linked library here,
- // because your code would not have prepared if a strong linked
- // library failed to prepare, and so you couldn't supply a valid
- /// fragToFix.
- //
- // 4. lookup, refCon: A pointer to a callback function that the
- // routine calls to look up the address of a symbol, and a refCon
- // for that callback routine.
- //
- // Note:
- // The fragToFixLocator and fragToFixInitRoutine parameters
- // are artifacts of the way in which this functionality is implemented.
- // In an ideal world, where CFM exported decent introspection APIs
- // to third party developers, these parameters would not be necessary.
- // If you're using this code inside Apple, you probably should investigate
- // using the CFM private APIs for getting at the information these
- // parameters are needed for. See the comments inside the implementation
- // for more details.
- //
- // Note:
- // The extra memory taken when you use a packed data section is also an
- // artifact of my workaround for the lack of CFM introspection APIs. In
- // my opinion it's better to use an unpacked data section and consume more
- // space on disk while saving memory. In CodeWarrior you can switch to an
- // unpacked data section by checking the "Expand Uninitialized Data"
- // checkbox in the "PPC PEF" settings panel. In MPW, specified the
- // "-packdata off" option to PPCLink.
- //
- // When the routine returns, any symbols that you imported from the
- // library named weakLinkedLibraryName will be resolved to the address
- // of the symbol provided by the "lookup" callback routine.
- //
- // It is possible for an unresolved import to remain unresolved after
- // this routine returns. If the symbol import is marked as weak (as
- // opposed to the library, which *must* be marked as weak) and the symbol
- // is not found by the "lookup" callback, the routine will simple skip
- // that symbol. If the symbol isn't marked as weak, the routine will fail
- // in that case.
- //
- // Most of the possible error results are co-opted CFM errors. These
- // include:
- //
- // cfragFragmentFormatErr -- The fragment to fix is is an unknown format.
- // cfragNoSectionErr -- Could not find the loader section in the fragment to fix.
- // cfragNoLibraryErr -- The fragment to fix is not weak linked to weakLinkedLibraryName.
- // cfragFragmentUsageErr -- The fragment to fix doesn't have a data section.
- // -- The fragment to fix is strong linked to weakLinkedLibraryName.
- // -- The fragment doesn't have an init routine.
- // cfragFragmentCorruptErr -- Encountered an undefined relocation opcode.
- // unimpErr -- Encountered an unimplement relocation opcode. The
- // relocation engine only implements a subset of the CFM
- // relocation opcodes, the subset most commonly used by
- // MPW and CodeWarrior PEF containers. If you encounter
- // this error, you'll probably have to add the weird
- // relocation opcode to the engine, which shouldn't be
- // be too hard.
- // memFullErr -- It's likely that this error is triggered by the memory
- // needed to unpack your data section. Either make your
- // data section smaller, or unpack it (see above).
- // errors returned by FindSymbol
- // errors returned by Memory Manager
- //
- // The routine needs enough memory to hold the loader section of the fragment
- // to fix in memory. It allocates that memory using NewPtr and dispsoses of
- // it before it returns. You may want to change the memory allocator, which
- // is very simple.
+ CFragConnectionID fragToFixConnID,
+ CFragInitFunction fragToFixInitRoutine,
+ ConstStr255Param weakLinkedLibraryName,
+ CFMLateImportLookupProc lookup,
+ void *refCon);
+ // This routine will link you, at runtime, to some library
+ // that you were weak linked to and wasn't present when your
+ // fragment was prepared. As well as the obvious functionality
+ // of being able to resolve weak links after prepare time,
+ // this functionality can be put to a number of less obvious uses,
+ // some of which are discussed at the top of this header file.
+ //
+ // To call this routine, you need a number of pieces of information:
+ //
+ // 1. fragToFixLocator, fragToFixConnID: The location of your own
+ // code fragment on disk and the CFM connection ID to your own
+ // code fragment. Typically you get this information from your
+ // fragment's CFM init routine. You must ensure that
+ // fragToFixLocator->fileSpec points to an FSSpec of the
+ // file which holds your code fragment.
+ //
+ // IMPORTANT:
+ // The fact that you pass in a CFragSystem7DiskFlatLocator as the
+ // fragToFixLocator implies that the fragment to be fixed up must
+ // be in the data fork of a file. The code could be modified
+ // to remove this requirement, but on disk code fragments are the most
+ // common case.
+ //
+ // IMPORTANT:
+ // The fragment to fix may have a packed data section. Packing the
+ // data section will reduce the size of your fragment on disk, but it
+ // will significantly increase the memory needed by this routine
+ // (it increases memory usage by the sum of the sizes of the packed
+ // and unpacked data section). See below for instructions on how to
+ // create an unpacked data section.
+ //
+ // 2. fragToFixInitRoutine: A pointer to your own code fragment's
+ // fragment initialiser routine. You necessarily have one of these
+ // because you need it to get values for the fragToFixLocator and
+ // fragToFixConnID parameters. Just pass its address in as a parameter
+ // as well.
+ //
+ // 3. weakLinkedLibraryName: The name of the weak linked library which
+ // failed to link. You must have weak linked to this library.
+ // It is oxymoric for you to pass a strong linked library here,
+ // because your code would not have prepared if a strong linked
+ // library failed to prepare, and so you couldn't supply a valid
+ /// fragToFix.
+ //
+ // 4. lookup, refCon: A pointer to a callback function that the
+ // routine calls to look up the address of a symbol, and a refCon
+ // for that callback routine.
+ //
+ // Note:
+ // The fragToFixLocator and fragToFixInitRoutine parameters
+ // are artifacts of the way in which this functionality is implemented.
+ // In an ideal world, where CFM exported decent introspection APIs
+ // to third party developers, these parameters would not be necessary.
+ // If you're using this code inside Apple, you probably should investigate
+ // using the CFM private APIs for getting at the information these
+ // parameters are needed for. See the comments inside the implementation
+ // for more details.
+ //
+ // Note:
+ // The extra memory taken when you use a packed data section is also an
+ // artifact of my workaround for the lack of CFM introspection APIs. In
+ // my opinion it's better to use an unpacked data section and consume more
+ // space on disk while saving memory. In CodeWarrior you can switch to an
+ // unpacked data section by checking the "Expand Uninitialized Data"
+ // checkbox in the "PPC PEF" settings panel. In MPW, specified the
+ // "-packdata off" option to PPCLink.
+ //
+ // When the routine returns, any symbols that you imported from the
+ // library named weakLinkedLibraryName will be resolved to the address
+ // of the symbol provided by the "lookup" callback routine.
+ //
+ // It is possible for an unresolved import to remain unresolved after
+ // this routine returns. If the symbol import is marked as weak (as
+ // opposed to the library, which *must* be marked as weak) and the symbol
+ // is not found by the "lookup" callback, the routine will simple skip
+ // that symbol. If the symbol isn't marked as weak, the routine will fail
+ // in that case.
+ //
+ // Most of the possible error results are co-opted CFM errors. These
+ // include:
+ //
+ // cfragFragmentFormatErr -- The fragment to fix is is an unknown format.
+ // cfragNoSectionErr -- Could not find the loader section in the fragment to fix.
+ // cfragNoLibraryErr -- The fragment to fix is not weak linked to weakLinkedLibraryName.
+ // cfragFragmentUsageErr -- The fragment to fix doesn't have a data section.
+ // -- The fragment to fix is strong linked to weakLinkedLibraryName.
+ // -- The fragment doesn't have an init routine.
+ // cfragFragmentCorruptErr -- Encountered an undefined relocation opcode.
+ // unimpErr -- Encountered an unimplement relocation opcode. The
+ // relocation engine only implements a subset of the CFM
+ // relocation opcodes, the subset most commonly used by
+ // MPW and CodeWarrior PEF containers. If you encounter
+ // this error, you'll probably have to add the weird
+ // relocation opcode to the engine, which shouldn't be
+ // be too hard.
+ // memFullErr -- It's likely that this error is triggered by the memory
+ // needed to unpack your data section. Either make your
+ // data section smaller, or unpack it (see above).
+ // errors returned by FindSymbol
+ // errors returned by Memory Manager
+ //
+ // The routine needs enough memory to hold the loader section of the fragment
+ // to fix in memory. It allocates that memory using NewPtr and dispsoses of
+ // it before it returns. You may want to change the memory allocator, which
+ // is very simple.
extern pascal OSStatus CFMLateImportLibrary(const CFragSystem7DiskFlatLocator *fragToFixLocator,
- CFragConnectionID fragToFixConnID,
- CFragInitFunction fragToFixInitRoutine,
- ConstStr255Param weakLinkedLibraryName,
- CFragConnectionID connIDToImport);
- // A wrapper around CFMLateImportCore that looks up symbols by calling
- // FindSymbol on a connection to a CFM library (connIDToImport).
- // You can get this connection ID through any standard CFM API, for example
- // GetSharedLibrary, GetDiskFragment, or GetMemFragment.
- //
- // IMPORTANT:
- // The fragment name for connIDToImport *does not* have to match
- // weakLinkedLibraryName. This is part of the power of this library.
+ CFragConnectionID fragToFixConnID,
+ CFragInitFunction fragToFixInitRoutine,
+ ConstStr255Param weakLinkedLibraryName,
+ CFragConnectionID connIDToImport);
+ // A wrapper around CFMLateImportCore that looks up symbols by calling
+ // FindSymbol on a connection to a CFM library (connIDToImport).
+ // You can get this connection ID through any standard CFM API, for example
+ // GetSharedLibrary, GetDiskFragment, or GetMemFragment.
+ //
+ // IMPORTANT:
+ // The fragment name for connIDToImport *does not* have to match
+ // weakLinkedLibraryName. This is part of the power of this library.
extern pascal OSStatus CFMLateImportBundle(const CFragSystem7DiskFlatLocator *fragToFixLocator,
- CFragConnectionID fragToFixConnID,
- CFragInitFunction fragToFixInitRoutine,
- ConstStr255Param weakLinkedLibraryName,
- CFBundleRef bundleToImport);
- // A wrapper around CFMLateImportCore that looks up symbols by calling
- // CFBundleGetFunctionPointerForName on a reference to a Core Foundation
- // bundle (bundleToImport). You can get this reference through any
- // Core Foundation bundle API, for example CFBundleCreate.
+ CFragConnectionID fragToFixConnID,
+ CFragInitFunction fragToFixInitRoutine,
+ ConstStr255Param weakLinkedLibraryName,
+ CFBundleRef bundleToImport);
+ // A wrapper around CFMLateImportCore that looks up symbols by calling
+ // CFBundleGetFunctionPointerForName on a reference to a Core Foundation
+ // bundle (bundleToImport). You can get this reference through any
+ // Core Foundation bundle API, for example CFBundleCreate.
#ifdef __cplusplus
}
diff --git a/Mac/Modules/cg/_CGmodule.c b/Mac/Modules/cg/_CGmodule.c
index e36fce9..7169101 100755
--- a/Mac/Modules/cg/_CGmodule.c
+++ b/Mac/Modules/cg/_CGmodule.c
@@ -9,9 +9,9 @@
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
- PyErr_SetString(PyExc_NotImplementedError, \
- "Not available in this shared library/OS version"); \
- return NULL; \
+ PyErr_SetString(PyExc_NotImplementedError, \
+ "Not available in this shared library/OS version"); \
+ return NULL; \
}} while(0)
@@ -26,67 +26,67 @@ extern int GrafObj_Convert(PyObject *, GrafPtr *);
PyObject *CGPoint_New(CGPoint *itself)
{
- return Py_BuildValue("(ff)",
- itself->x,
- itself->y);
+ return Py_BuildValue("(ff)",
+ itself->x,
+ itself->y);
}
int
CGPoint_Convert(PyObject *v, CGPoint *p_itself)
{
- if( !PyArg_Parse(v, "(ff)",
- &p_itself->x,
- &p_itself->y) )
- return 0;
- return 1;
+ if( !PyArg_Parse(v, "(ff)",
+ &p_itself->x,
+ &p_itself->y) )
+ return 0;
+ return 1;
}
PyObject *CGRect_New(CGRect *itself)
{
- return Py_BuildValue("(ffff)",
- itself->origin.x,
- itself->origin.y,
- itself->size.width,
- itself->size.height);
+ return Py_BuildValue("(ffff)",
+ itself->origin.x,
+ itself->origin.y,
+ itself->size.width,
+ itself->size.height);
}
int
CGRect_Convert(PyObject *v, CGRect *p_itself)
{
- if( !PyArg_Parse(v, "(ffff)",
- &p_itself->origin.x,
- &p_itself->origin.y,
- &p_itself->size.width,
- &p_itself->size.height) )
- return 0;
- return 1;
+ if( !PyArg_Parse(v, "(ffff)",
+ &p_itself->origin.x,
+ &p_itself->origin.y,
+ &p_itself->size.width,
+ &p_itself->size.height) )
+ return 0;
+ return 1;
}
PyObject *CGAffineTransform_New(CGAffineTransform *itself)
{
- return Py_BuildValue("(ffffff)",
- itself->a,
- itself->b,
- itself->c,
- itself->d,
- itself->tx,
- itself->ty);
+ return Py_BuildValue("(ffffff)",
+ itself->a,
+ itself->b,
+ itself->c,
+ itself->d,
+ itself->tx,
+ itself->ty);
}
int
CGAffineTransform_Convert(PyObject *v, CGAffineTransform *p_itself)
{
- if( !PyArg_Parse(v, "(ffffff)",
- &p_itself->a,
- &p_itself->b,
- &p_itself->c,
- &p_itself->d,
- &p_itself->tx,
- &p_itself->ty) )
- return 0;
- return 1;
+ if( !PyArg_Parse(v, "(ffffff)",
+ &p_itself->a,
+ &p_itself->b,
+ &p_itself->c,
+ &p_itself->d,
+ &p_itself->tx,
+ &p_itself->ty) )
+ return 0;
+ return 1;
}
static PyObject *CG_Error;
@@ -98,1090 +98,1090 @@ PyTypeObject CGContextRef_Type;
#define CGContextRefObj_Check(x) ((x)->ob_type == &CGContextRef_Type || PyObject_TypeCheck((x), &CGContextRef_Type))
typedef struct CGContextRefObject {
- PyObject_HEAD
- CGContextRef ob_itself;
+ PyObject_HEAD
+ CGContextRef ob_itself;
} CGContextRefObject;
PyObject *CGContextRefObj_New(CGContextRef itself)
{
- CGContextRefObject *it;
- it = PyObject_NEW(CGContextRefObject, &CGContextRef_Type);
- if (it == NULL) return NULL;
- it->ob_itself = itself;
- return (PyObject *)it;
+ CGContextRefObject *it;
+ it = PyObject_NEW(CGContextRefObject, &CGContextRef_Type);
+ if (it == NULL) return NULL;
+ it->ob_itself = itself;
+ return (PyObject *)it;
}
int CGContextRefObj_Convert(PyObject *v, CGContextRef *p_itself)
{
- if (!CGContextRefObj_Check(v))
- {
- PyErr_SetString(PyExc_TypeError, "CGContextRef required");
- return 0;
- }
- *p_itself = ((CGContextRefObject *)v)->ob_itself;
- return 1;
+ if (!CGContextRefObj_Check(v))
+ {
+ PyErr_SetString(PyExc_TypeError, "CGContextRef required");
+ return 0;
+ }
+ *p_itself = ((CGContextRefObject *)v)->ob_itself;
+ return 1;
}
static void CGContextRefObj_dealloc(CGContextRefObject *self)
{
- CGContextRelease(self->ob_itself);
- self->ob_type->tp_free((PyObject *)self);
+ CGContextRelease(self->ob_itself);
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *CGContextRefObj_CGContextSaveGState(CGContextRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- CGContextSaveGState(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ CGContextSaveGState(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CGContextRefObj_CGContextRestoreGState(CGContextRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- CGContextRestoreGState(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ CGContextRestoreGState(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CGContextRefObj_CGContextScaleCTM(CGContextRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- float sx;
- float sy;
- if (!PyArg_ParseTuple(_args, "ff",
- &sx,
- &sy))
- return NULL;
- CGContextScaleCTM(_self->ob_itself,
- sx,
- sy);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ float sx;
+ float sy;
+ if (!PyArg_ParseTuple(_args, "ff",
+ &sx,
+ &sy))
+ return NULL;
+ CGContextScaleCTM(_self->ob_itself,
+ sx,
+ sy);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CGContextRefObj_CGContextTranslateCTM(CGContextRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- float tx;
- float ty;
- if (!PyArg_ParseTuple(_args, "ff",
- &tx,
- &ty))
- return NULL;
- CGContextTranslateCTM(_self->ob_itself,
- tx,
- ty);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ float tx;
+ float ty;
+ if (!PyArg_ParseTuple(_args, "ff",
+ &tx,
+ &ty))
+ return NULL;
+ CGContextTranslateCTM(_self->ob_itself,
+ tx,
+ ty);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CGContextRefObj_CGContextRotateCTM(CGContextRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- float angle;
- if (!PyArg_ParseTuple(_args, "f",
- &angle))
- return NULL;
- CGContextRotateCTM(_self->ob_itself,
- angle);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ float angle;
+ if (!PyArg_ParseTuple(_args, "f",
+ &angle))
+ return NULL;
+ CGContextRotateCTM(_self->ob_itself,
+ angle);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CGContextRefObj_CGContextConcatCTM(CGContextRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CGAffineTransform transform;
- if (!PyArg_ParseTuple(_args, "O&",
- CGAffineTransform_Convert, &transform))
- return NULL;
- CGContextConcatCTM(_self->ob_itself,
- transform);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ CGAffineTransform transform;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CGAffineTransform_Convert, &transform))
+ return NULL;
+ CGContextConcatCTM(_self->ob_itself,
+ transform);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CGContextRefObj_CGContextGetCTM(CGContextRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CGAffineTransform _rv;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = CGContextGetCTM(_self->ob_itself);
- _res = Py_BuildValue("O&",
- CGAffineTransform_New, &_rv);
- return _res;
+ PyObject *_res = NULL;
+ CGAffineTransform _rv;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = CGContextGetCTM(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ CGAffineTransform_New, &_rv);
+ return _res;
}
static PyObject *CGContextRefObj_CGContextSetLineWidth(CGContextRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- float width;
- if (!PyArg_ParseTuple(_args, "f",
- &width))
- return NULL;
- CGContextSetLineWidth(_self->ob_itself,
- width);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ float width;
+ if (!PyArg_ParseTuple(_args, "f",
+ &width))
+ return NULL;
+ CGContextSetLineWidth(_self->ob_itself,
+ width);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CGContextRefObj_CGContextSetLineCap(CGContextRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- int cap;
- if (!PyArg_ParseTuple(_args, "i",
- &cap))
- return NULL;
- CGContextSetLineCap(_self->ob_itself,
- cap);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ int cap;
+ if (!PyArg_ParseTuple(_args, "i",
+ &cap))
+ return NULL;
+ CGContextSetLineCap(_self->ob_itself,
+ cap);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CGContextRefObj_CGContextSetLineJoin(CGContextRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- int join;
- if (!PyArg_ParseTuple(_args, "i",
- &join))
- return NULL;
- CGContextSetLineJoin(_self->ob_itself,
- join);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ int join;
+ if (!PyArg_ParseTuple(_args, "i",
+ &join))
+ return NULL;
+ CGContextSetLineJoin(_self->ob_itself,
+ join);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CGContextRefObj_CGContextSetMiterLimit(CGContextRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- float limit;
- if (!PyArg_ParseTuple(_args, "f",
- &limit))
- return NULL;
- CGContextSetMiterLimit(_self->ob_itself,
- limit);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ float limit;
+ if (!PyArg_ParseTuple(_args, "f",
+ &limit))
+ return NULL;
+ CGContextSetMiterLimit(_self->ob_itself,
+ limit);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CGContextRefObj_CGContextSetFlatness(CGContextRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- float flatness;
- if (!PyArg_ParseTuple(_args, "f",
- &flatness))
- return NULL;
- CGContextSetFlatness(_self->ob_itself,
- flatness);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ float flatness;
+ if (!PyArg_ParseTuple(_args, "f",
+ &flatness))
+ return NULL;
+ CGContextSetFlatness(_self->ob_itself,
+ flatness);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CGContextRefObj_CGContextSetAlpha(CGContextRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- float alpha;
- if (!PyArg_ParseTuple(_args, "f",
- &alpha))
- return NULL;
- CGContextSetAlpha(_self->ob_itself,
- alpha);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ float alpha;
+ if (!PyArg_ParseTuple(_args, "f",
+ &alpha))
+ return NULL;
+ CGContextSetAlpha(_self->ob_itself,
+ alpha);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CGContextRefObj_CGContextBeginPath(CGContextRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- CGContextBeginPath(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ CGContextBeginPath(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CGContextRefObj_CGContextMoveToPoint(CGContextRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- float x;
- float y;
- if (!PyArg_ParseTuple(_args, "ff",
- &x,
- &y))
- return NULL;
- CGContextMoveToPoint(_self->ob_itself,
- x,
- y);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ float x;
+ float y;
+ if (!PyArg_ParseTuple(_args, "ff",
+ &x,
+ &y))
+ return NULL;
+ CGContextMoveToPoint(_self->ob_itself,
+ x,
+ y);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CGContextRefObj_CGContextAddLineToPoint(CGContextRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- float x;
- float y;
- if (!PyArg_ParseTuple(_args, "ff",
- &x,
- &y))
- return NULL;
- CGContextAddLineToPoint(_self->ob_itself,
- x,
- y);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ float x;
+ float y;
+ if (!PyArg_ParseTuple(_args, "ff",
+ &x,
+ &y))
+ return NULL;
+ CGContextAddLineToPoint(_self->ob_itself,
+ x,
+ y);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CGContextRefObj_CGContextAddCurveToPoint(CGContextRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- float cp1x;
- float cp1y;
- float cp2x;
- float cp2y;
- float x;
- float y;
- if (!PyArg_ParseTuple(_args, "ffffff",
- &cp1x,
- &cp1y,
- &cp2x,
- &cp2y,
- &x,
- &y))
- return NULL;
- CGContextAddCurveToPoint(_self->ob_itself,
- cp1x,
- cp1y,
- cp2x,
- cp2y,
- x,
- y);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ float cp1x;
+ float cp1y;
+ float cp2x;
+ float cp2y;
+ float x;
+ float y;
+ if (!PyArg_ParseTuple(_args, "ffffff",
+ &cp1x,
+ &cp1y,
+ &cp2x,
+ &cp2y,
+ &x,
+ &y))
+ return NULL;
+ CGContextAddCurveToPoint(_self->ob_itself,
+ cp1x,
+ cp1y,
+ cp2x,
+ cp2y,
+ x,
+ y);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CGContextRefObj_CGContextAddQuadCurveToPoint(CGContextRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- float cpx;
- float cpy;
- float x;
- float y;
- if (!PyArg_ParseTuple(_args, "ffff",
- &cpx,
- &cpy,
- &x,
- &y))
- return NULL;
- CGContextAddQuadCurveToPoint(_self->ob_itself,
- cpx,
- cpy,
- x,
- y);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ float cpx;
+ float cpy;
+ float x;
+ float y;
+ if (!PyArg_ParseTuple(_args, "ffff",
+ &cpx,
+ &cpy,
+ &x,
+ &y))
+ return NULL;
+ CGContextAddQuadCurveToPoint(_self->ob_itself,
+ cpx,
+ cpy,
+ x,
+ y);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CGContextRefObj_CGContextClosePath(CGContextRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- CGContextClosePath(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ CGContextClosePath(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CGContextRefObj_CGContextAddRect(CGContextRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CGRect rect;
- if (!PyArg_ParseTuple(_args, "O&",
- CGRect_Convert, &rect))
- return NULL;
- CGContextAddRect(_self->ob_itself,
- rect);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ CGRect rect;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CGRect_Convert, &rect))
+ return NULL;
+ CGContextAddRect(_self->ob_itself,
+ rect);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CGContextRefObj_CGContextAddArc(CGContextRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- float x;
- float y;
- float radius;
- float startAngle;
- float endAngle;
- int clockwise;
- if (!PyArg_ParseTuple(_args, "fffffi",
- &x,
- &y,
- &radius,
- &startAngle,
- &endAngle,
- &clockwise))
- return NULL;
- CGContextAddArc(_self->ob_itself,
- x,
- y,
- radius,
- startAngle,
- endAngle,
- clockwise);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ float x;
+ float y;
+ float radius;
+ float startAngle;
+ float endAngle;
+ int clockwise;
+ if (!PyArg_ParseTuple(_args, "fffffi",
+ &x,
+ &y,
+ &radius,
+ &startAngle,
+ &endAngle,
+ &clockwise))
+ return NULL;
+ CGContextAddArc(_self->ob_itself,
+ x,
+ y,
+ radius,
+ startAngle,
+ endAngle,
+ clockwise);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CGContextRefObj_CGContextAddArcToPoint(CGContextRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- float x1;
- float y1;
- float x2;
- float y2;
- float radius;
- if (!PyArg_ParseTuple(_args, "fffff",
- &x1,
- &y1,
- &x2,
- &y2,
- &radius))
- return NULL;
- CGContextAddArcToPoint(_self->ob_itself,
- x1,
- y1,
- x2,
- y2,
- radius);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ float x1;
+ float y1;
+ float x2;
+ float y2;
+ float radius;
+ if (!PyArg_ParseTuple(_args, "fffff",
+ &x1,
+ &y1,
+ &x2,
+ &y2,
+ &radius))
+ return NULL;
+ CGContextAddArcToPoint(_self->ob_itself,
+ x1,
+ y1,
+ x2,
+ y2,
+ radius);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CGContextRefObj_CGContextIsPathEmpty(CGContextRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- int _rv;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = CGContextIsPathEmpty(_self->ob_itself);
- _res = Py_BuildValue("i",
- _rv);
- return _res;
+ PyObject *_res = NULL;
+ int _rv;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = CGContextIsPathEmpty(_self->ob_itself);
+ _res = Py_BuildValue("i",
+ _rv);
+ return _res;
}
static PyObject *CGContextRefObj_CGContextGetPathCurrentPoint(CGContextRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CGPoint _rv;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = CGContextGetPathCurrentPoint(_self->ob_itself);
- _res = Py_BuildValue("O&",
- CGPoint_New, &_rv);
- return _res;
+ PyObject *_res = NULL;
+ CGPoint _rv;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = CGContextGetPathCurrentPoint(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ CGPoint_New, &_rv);
+ return _res;
}
static PyObject *CGContextRefObj_CGContextGetPathBoundingBox(CGContextRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CGRect _rv;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = CGContextGetPathBoundingBox(_self->ob_itself);
- _res = Py_BuildValue("O&",
- CGRect_New, &_rv);
- return _res;
+ PyObject *_res = NULL;
+ CGRect _rv;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = CGContextGetPathBoundingBox(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ CGRect_New, &_rv);
+ return _res;
}
static PyObject *CGContextRefObj_CGContextDrawPath(CGContextRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- int mode;
- if (!PyArg_ParseTuple(_args, "i",
- &mode))
- return NULL;
- CGContextDrawPath(_self->ob_itself,
- mode);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ int mode;
+ if (!PyArg_ParseTuple(_args, "i",
+ &mode))
+ return NULL;
+ CGContextDrawPath(_self->ob_itself,
+ mode);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CGContextRefObj_CGContextFillPath(CGContextRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- CGContextFillPath(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ CGContextFillPath(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CGContextRefObj_CGContextEOFillPath(CGContextRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- CGContextEOFillPath(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ CGContextEOFillPath(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CGContextRefObj_CGContextStrokePath(CGContextRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- CGContextStrokePath(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ CGContextStrokePath(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CGContextRefObj_CGContextFillRect(CGContextRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CGRect rect;
- if (!PyArg_ParseTuple(_args, "O&",
- CGRect_Convert, &rect))
- return NULL;
- CGContextFillRect(_self->ob_itself,
- rect);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ CGRect rect;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CGRect_Convert, &rect))
+ return NULL;
+ CGContextFillRect(_self->ob_itself,
+ rect);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CGContextRefObj_CGContextStrokeRect(CGContextRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CGRect rect;
- if (!PyArg_ParseTuple(_args, "O&",
- CGRect_Convert, &rect))
- return NULL;
- CGContextStrokeRect(_self->ob_itself,
- rect);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ CGRect rect;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CGRect_Convert, &rect))
+ return NULL;
+ CGContextStrokeRect(_self->ob_itself,
+ rect);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CGContextRefObj_CGContextStrokeRectWithWidth(CGContextRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CGRect rect;
- float width;
- if (!PyArg_ParseTuple(_args, "O&f",
- CGRect_Convert, &rect,
- &width))
- return NULL;
- CGContextStrokeRectWithWidth(_self->ob_itself,
- rect,
- width);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ CGRect rect;
+ float width;
+ if (!PyArg_ParseTuple(_args, "O&f",
+ CGRect_Convert, &rect,
+ &width))
+ return NULL;
+ CGContextStrokeRectWithWidth(_self->ob_itself,
+ rect,
+ width);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CGContextRefObj_CGContextClearRect(CGContextRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CGRect rect;
- if (!PyArg_ParseTuple(_args, "O&",
- CGRect_Convert, &rect))
- return NULL;
- CGContextClearRect(_self->ob_itself,
- rect);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ CGRect rect;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CGRect_Convert, &rect))
+ return NULL;
+ CGContextClearRect(_self->ob_itself,
+ rect);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CGContextRefObj_CGContextClip(CGContextRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- CGContextClip(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ CGContextClip(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CGContextRefObj_CGContextEOClip(CGContextRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- CGContextEOClip(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ CGContextEOClip(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CGContextRefObj_CGContextClipToRect(CGContextRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CGRect rect;
- if (!PyArg_ParseTuple(_args, "O&",
- CGRect_Convert, &rect))
- return NULL;
- CGContextClipToRect(_self->ob_itself,
- rect);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ CGRect rect;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CGRect_Convert, &rect))
+ return NULL;
+ CGContextClipToRect(_self->ob_itself,
+ rect);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CGContextRefObj_CGContextSetGrayFillColor(CGContextRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- float gray;
- float alpha;
- if (!PyArg_ParseTuple(_args, "ff",
- &gray,
- &alpha))
- return NULL;
- CGContextSetGrayFillColor(_self->ob_itself,
- gray,
- alpha);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ float gray;
+ float alpha;
+ if (!PyArg_ParseTuple(_args, "ff",
+ &gray,
+ &alpha))
+ return NULL;
+ CGContextSetGrayFillColor(_self->ob_itself,
+ gray,
+ alpha);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CGContextRefObj_CGContextSetGrayStrokeColor(CGContextRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- float gray;
- float alpha;
- if (!PyArg_ParseTuple(_args, "ff",
- &gray,
- &alpha))
- return NULL;
- CGContextSetGrayStrokeColor(_self->ob_itself,
- gray,
- alpha);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ float gray;
+ float alpha;
+ if (!PyArg_ParseTuple(_args, "ff",
+ &gray,
+ &alpha))
+ return NULL;
+ CGContextSetGrayStrokeColor(_self->ob_itself,
+ gray,
+ alpha);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CGContextRefObj_CGContextSetRGBFillColor(CGContextRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- float red;
- float green;
- float blue;
- float alpha;
- if (!PyArg_ParseTuple(_args, "ffff",
- &red,
- &green,
- &blue,
- &alpha))
- return NULL;
- CGContextSetRGBFillColor(_self->ob_itself,
- red,
- green,
- blue,
- alpha);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ float red;
+ float green;
+ float blue;
+ float alpha;
+ if (!PyArg_ParseTuple(_args, "ffff",
+ &red,
+ &green,
+ &blue,
+ &alpha))
+ return NULL;
+ CGContextSetRGBFillColor(_self->ob_itself,
+ red,
+ green,
+ blue,
+ alpha);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CGContextRefObj_CGContextSetRGBStrokeColor(CGContextRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- float red;
- float green;
- float blue;
- float alpha;
- if (!PyArg_ParseTuple(_args, "ffff",
- &red,
- &green,
- &blue,
- &alpha))
- return NULL;
- CGContextSetRGBStrokeColor(_self->ob_itself,
- red,
- green,
- blue,
- alpha);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ float red;
+ float green;
+ float blue;
+ float alpha;
+ if (!PyArg_ParseTuple(_args, "ffff",
+ &red,
+ &green,
+ &blue,
+ &alpha))
+ return NULL;
+ CGContextSetRGBStrokeColor(_self->ob_itself,
+ red,
+ green,
+ blue,
+ alpha);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CGContextRefObj_CGContextSetCMYKFillColor(CGContextRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- float cyan;
- float magenta;
- float yellow;
- float black;
- float alpha;
- if (!PyArg_ParseTuple(_args, "fffff",
- &cyan,
- &magenta,
- &yellow,
- &black,
- &alpha))
- return NULL;
- CGContextSetCMYKFillColor(_self->ob_itself,
- cyan,
- magenta,
- yellow,
- black,
- alpha);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ float cyan;
+ float magenta;
+ float yellow;
+ float black;
+ float alpha;
+ if (!PyArg_ParseTuple(_args, "fffff",
+ &cyan,
+ &magenta,
+ &yellow,
+ &black,
+ &alpha))
+ return NULL;
+ CGContextSetCMYKFillColor(_self->ob_itself,
+ cyan,
+ magenta,
+ yellow,
+ black,
+ alpha);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CGContextRefObj_CGContextSetCMYKStrokeColor(CGContextRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- float cyan;
- float magenta;
- float yellow;
- float black;
- float alpha;
- if (!PyArg_ParseTuple(_args, "fffff",
- &cyan,
- &magenta,
- &yellow,
- &black,
- &alpha))
- return NULL;
- CGContextSetCMYKStrokeColor(_self->ob_itself,
- cyan,
- magenta,
- yellow,
- black,
- alpha);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ float cyan;
+ float magenta;
+ float yellow;
+ float black;
+ float alpha;
+ if (!PyArg_ParseTuple(_args, "fffff",
+ &cyan,
+ &magenta,
+ &yellow,
+ &black,
+ &alpha))
+ return NULL;
+ CGContextSetCMYKStrokeColor(_self->ob_itself,
+ cyan,
+ magenta,
+ yellow,
+ black,
+ alpha);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CGContextRefObj_CGContextGetInterpolationQuality(CGContextRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- int _rv;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = CGContextGetInterpolationQuality(_self->ob_itself);
- _res = Py_BuildValue("i",
- _rv);
- return _res;
+ PyObject *_res = NULL;
+ int _rv;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = CGContextGetInterpolationQuality(_self->ob_itself);
+ _res = Py_BuildValue("i",
+ _rv);
+ return _res;
}
static PyObject *CGContextRefObj_CGContextSetInterpolationQuality(CGContextRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- int quality;
- if (!PyArg_ParseTuple(_args, "i",
- &quality))
- return NULL;
- CGContextSetInterpolationQuality(_self->ob_itself,
- quality);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ int quality;
+ if (!PyArg_ParseTuple(_args, "i",
+ &quality))
+ return NULL;
+ CGContextSetInterpolationQuality(_self->ob_itself,
+ quality);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CGContextRefObj_CGContextSetCharacterSpacing(CGContextRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- float spacing;
- if (!PyArg_ParseTuple(_args, "f",
- &spacing))
- return NULL;
- CGContextSetCharacterSpacing(_self->ob_itself,
- spacing);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ float spacing;
+ if (!PyArg_ParseTuple(_args, "f",
+ &spacing))
+ return NULL;
+ CGContextSetCharacterSpacing(_self->ob_itself,
+ spacing);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CGContextRefObj_CGContextSetTextPosition(CGContextRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- float x;
- float y;
- if (!PyArg_ParseTuple(_args, "ff",
- &x,
- &y))
- return NULL;
- CGContextSetTextPosition(_self->ob_itself,
- x,
- y);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ float x;
+ float y;
+ if (!PyArg_ParseTuple(_args, "ff",
+ &x,
+ &y))
+ return NULL;
+ CGContextSetTextPosition(_self->ob_itself,
+ x,
+ y);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CGContextRefObj_CGContextGetTextPosition(CGContextRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CGPoint _rv;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = CGContextGetTextPosition(_self->ob_itself);
- _res = Py_BuildValue("O&",
- CGPoint_New, &_rv);
- return _res;
+ PyObject *_res = NULL;
+ CGPoint _rv;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = CGContextGetTextPosition(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ CGPoint_New, &_rv);
+ return _res;
}
static PyObject *CGContextRefObj_CGContextSetTextMatrix(CGContextRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CGAffineTransform transform;
- if (!PyArg_ParseTuple(_args, "O&",
- CGAffineTransform_Convert, &transform))
- return NULL;
- CGContextSetTextMatrix(_self->ob_itself,
- transform);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ CGAffineTransform transform;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CGAffineTransform_Convert, &transform))
+ return NULL;
+ CGContextSetTextMatrix(_self->ob_itself,
+ transform);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CGContextRefObj_CGContextGetTextMatrix(CGContextRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CGAffineTransform _rv;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = CGContextGetTextMatrix(_self->ob_itself);
- _res = Py_BuildValue("O&",
- CGAffineTransform_New, &_rv);
- return _res;
+ PyObject *_res = NULL;
+ CGAffineTransform _rv;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = CGContextGetTextMatrix(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ CGAffineTransform_New, &_rv);
+ return _res;
}
static PyObject *CGContextRefObj_CGContextSetTextDrawingMode(CGContextRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- int mode;
- if (!PyArg_ParseTuple(_args, "i",
- &mode))
- return NULL;
- CGContextSetTextDrawingMode(_self->ob_itself,
- mode);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ int mode;
+ if (!PyArg_ParseTuple(_args, "i",
+ &mode))
+ return NULL;
+ CGContextSetTextDrawingMode(_self->ob_itself,
+ mode);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CGContextRefObj_CGContextSetFontSize(CGContextRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- float size;
- if (!PyArg_ParseTuple(_args, "f",
- &size))
- return NULL;
- CGContextSetFontSize(_self->ob_itself,
- size);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ float size;
+ if (!PyArg_ParseTuple(_args, "f",
+ &size))
+ return NULL;
+ CGContextSetFontSize(_self->ob_itself,
+ size);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CGContextRefObj_CGContextSelectFont(CGContextRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- char * name;
- float size;
- int textEncoding;
- if (!PyArg_ParseTuple(_args, "sfi",
- &name,
- &size,
- &textEncoding))
- return NULL;
- CGContextSelectFont(_self->ob_itself,
- name,
- size,
- textEncoding);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ char * name;
+ float size;
+ int textEncoding;
+ if (!PyArg_ParseTuple(_args, "sfi",
+ &name,
+ &size,
+ &textEncoding))
+ return NULL;
+ CGContextSelectFont(_self->ob_itself,
+ name,
+ size,
+ textEncoding);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CGContextRefObj_CGContextShowText(CGContextRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- char *cstring__in__;
- long cstring__len__;
- int cstring__in_len__;
- if (!PyArg_ParseTuple(_args, "s#",
- &cstring__in__, &cstring__in_len__))
- return NULL;
- cstring__len__ = cstring__in_len__;
- CGContextShowText(_self->ob_itself,
- cstring__in__, cstring__len__);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ char *cstring__in__;
+ long cstring__len__;
+ int cstring__in_len__;
+ if (!PyArg_ParseTuple(_args, "s#",
+ &cstring__in__, &cstring__in_len__))
+ return NULL;
+ cstring__len__ = cstring__in_len__;
+ CGContextShowText(_self->ob_itself,
+ cstring__in__, cstring__len__);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CGContextRefObj_CGContextShowTextAtPoint(CGContextRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- float x;
- float y;
- char *cstring__in__;
- long cstring__len__;
- int cstring__in_len__;
- if (!PyArg_ParseTuple(_args, "ffs#",
- &x,
- &y,
- &cstring__in__, &cstring__in_len__))
- return NULL;
- cstring__len__ = cstring__in_len__;
- CGContextShowTextAtPoint(_self->ob_itself,
- x,
- y,
- cstring__in__, cstring__len__);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ float x;
+ float y;
+ char *cstring__in__;
+ long cstring__len__;
+ int cstring__in_len__;
+ if (!PyArg_ParseTuple(_args, "ffs#",
+ &x,
+ &y,
+ &cstring__in__, &cstring__in_len__))
+ return NULL;
+ cstring__len__ = cstring__in_len__;
+ CGContextShowTextAtPoint(_self->ob_itself,
+ x,
+ y,
+ cstring__in__, cstring__len__);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CGContextRefObj_CGContextEndPage(CGContextRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- CGContextEndPage(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ CGContextEndPage(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CGContextRefObj_CGContextFlush(CGContextRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- CGContextFlush(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ CGContextFlush(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CGContextRefObj_CGContextSynchronize(CGContextRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- CGContextSynchronize(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ CGContextSynchronize(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CGContextRefObj_CGContextSetShouldAntialias(CGContextRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- int shouldAntialias;
- if (!PyArg_ParseTuple(_args, "i",
- &shouldAntialias))
- return NULL;
- CGContextSetShouldAntialias(_self->ob_itself,
- shouldAntialias);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ int shouldAntialias;
+ if (!PyArg_ParseTuple(_args, "i",
+ &shouldAntialias))
+ return NULL;
+ CGContextSetShouldAntialias(_self->ob_itself,
+ shouldAntialias);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
#ifndef __LP64__
static PyObject *CGContextRefObj_SyncCGContextOriginWithPort(CGContextRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CGrafPtr port;
- if (!PyArg_ParseTuple(_args, "O&",
- GrafObj_Convert, &port))
- return NULL;
- SyncCGContextOriginWithPort(_self->ob_itself,
- port);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ CGrafPtr port;
+ if (!PyArg_ParseTuple(_args, "O&",
+ GrafObj_Convert, &port))
+ return NULL;
+ SyncCGContextOriginWithPort(_self->ob_itself,
+ port);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CGContextRefObj_ClipCGContextToRegion(CGContextRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Rect portRect;
- RgnHandle region;
- if (!PyArg_ParseTuple(_args, "O&O&",
- PyMac_GetRect, &portRect,
- ResObj_Convert, &region))
- return NULL;
- ClipCGContextToRegion(_self->ob_itself,
- &portRect,
- region);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ Rect portRect;
+ RgnHandle region;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ PyMac_GetRect, &portRect,
+ ResObj_Convert, &region))
+ return NULL;
+ ClipCGContextToRegion(_self->ob_itself,
+ &portRect,
+ region);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
#endif
static PyMethodDef CGContextRefObj_methods[] = {
- {"CGContextSaveGState", (PyCFunction)CGContextRefObj_CGContextSaveGState, 1,
- PyDoc_STR("() -> None")},
- {"CGContextRestoreGState", (PyCFunction)CGContextRefObj_CGContextRestoreGState, 1,
- PyDoc_STR("() -> None")},
- {"CGContextScaleCTM", (PyCFunction)CGContextRefObj_CGContextScaleCTM, 1,
- PyDoc_STR("(float sx, float sy) -> None")},
- {"CGContextTranslateCTM", (PyCFunction)CGContextRefObj_CGContextTranslateCTM, 1,
- PyDoc_STR("(float tx, float ty) -> None")},
- {"CGContextRotateCTM", (PyCFunction)CGContextRefObj_CGContextRotateCTM, 1,
- PyDoc_STR("(float angle) -> None")},
- {"CGContextConcatCTM", (PyCFunction)CGContextRefObj_CGContextConcatCTM, 1,
- PyDoc_STR("(CGAffineTransform transform) -> None")},
- {"CGContextGetCTM", (PyCFunction)CGContextRefObj_CGContextGetCTM, 1,
- PyDoc_STR("() -> (CGAffineTransform _rv)")},
- {"CGContextSetLineWidth", (PyCFunction)CGContextRefObj_CGContextSetLineWidth, 1,
- PyDoc_STR("(float width) -> None")},
- {"CGContextSetLineCap", (PyCFunction)CGContextRefObj_CGContextSetLineCap, 1,
- PyDoc_STR("(int cap) -> None")},
- {"CGContextSetLineJoin", (PyCFunction)CGContextRefObj_CGContextSetLineJoin, 1,
- PyDoc_STR("(int join) -> None")},
- {"CGContextSetMiterLimit", (PyCFunction)CGContextRefObj_CGContextSetMiterLimit, 1,
- PyDoc_STR("(float limit) -> None")},
- {"CGContextSetFlatness", (PyCFunction)CGContextRefObj_CGContextSetFlatness, 1,
- PyDoc_STR("(float flatness) -> None")},
- {"CGContextSetAlpha", (PyCFunction)CGContextRefObj_CGContextSetAlpha, 1,
- PyDoc_STR("(float alpha) -> None")},
- {"CGContextBeginPath", (PyCFunction)CGContextRefObj_CGContextBeginPath, 1,
- PyDoc_STR("() -> None")},
- {"CGContextMoveToPoint", (PyCFunction)CGContextRefObj_CGContextMoveToPoint, 1,
- PyDoc_STR("(float x, float y) -> None")},
- {"CGContextAddLineToPoint", (PyCFunction)CGContextRefObj_CGContextAddLineToPoint, 1,
- PyDoc_STR("(float x, float y) -> None")},
- {"CGContextAddCurveToPoint", (PyCFunction)CGContextRefObj_CGContextAddCurveToPoint, 1,
- PyDoc_STR("(float cp1x, float cp1y, float cp2x, float cp2y, float x, float y) -> None")},
- {"CGContextAddQuadCurveToPoint", (PyCFunction)CGContextRefObj_CGContextAddQuadCurveToPoint, 1,
- PyDoc_STR("(float cpx, float cpy, float x, float y) -> None")},
- {"CGContextClosePath", (PyCFunction)CGContextRefObj_CGContextClosePath, 1,
- PyDoc_STR("() -> None")},
- {"CGContextAddRect", (PyCFunction)CGContextRefObj_CGContextAddRect, 1,
- PyDoc_STR("(CGRect rect) -> None")},
- {"CGContextAddArc", (PyCFunction)CGContextRefObj_CGContextAddArc, 1,
- PyDoc_STR("(float x, float y, float radius, float startAngle, float endAngle, int clockwise) -> None")},
- {"CGContextAddArcToPoint", (PyCFunction)CGContextRefObj_CGContextAddArcToPoint, 1,
- PyDoc_STR("(float x1, float y1, float x2, float y2, float radius) -> None")},
- {"CGContextIsPathEmpty", (PyCFunction)CGContextRefObj_CGContextIsPathEmpty, 1,
- PyDoc_STR("() -> (int _rv)")},
- {"CGContextGetPathCurrentPoint", (PyCFunction)CGContextRefObj_CGContextGetPathCurrentPoint, 1,
- PyDoc_STR("() -> (CGPoint _rv)")},
- {"CGContextGetPathBoundingBox", (PyCFunction)CGContextRefObj_CGContextGetPathBoundingBox, 1,
- PyDoc_STR("() -> (CGRect _rv)")},
- {"CGContextDrawPath", (PyCFunction)CGContextRefObj_CGContextDrawPath, 1,
- PyDoc_STR("(int mode) -> None")},
- {"CGContextFillPath", (PyCFunction)CGContextRefObj_CGContextFillPath, 1,
- PyDoc_STR("() -> None")},
- {"CGContextEOFillPath", (PyCFunction)CGContextRefObj_CGContextEOFillPath, 1,
- PyDoc_STR("() -> None")},
- {"CGContextStrokePath", (PyCFunction)CGContextRefObj_CGContextStrokePath, 1,
- PyDoc_STR("() -> None")},
- {"CGContextFillRect", (PyCFunction)CGContextRefObj_CGContextFillRect, 1,
- PyDoc_STR("(CGRect rect) -> None")},
- {"CGContextStrokeRect", (PyCFunction)CGContextRefObj_CGContextStrokeRect, 1,
- PyDoc_STR("(CGRect rect) -> None")},
- {"CGContextStrokeRectWithWidth", (PyCFunction)CGContextRefObj_CGContextStrokeRectWithWidth, 1,
- PyDoc_STR("(CGRect rect, float width) -> None")},
- {"CGContextClearRect", (PyCFunction)CGContextRefObj_CGContextClearRect, 1,
- PyDoc_STR("(CGRect rect) -> None")},
- {"CGContextClip", (PyCFunction)CGContextRefObj_CGContextClip, 1,
- PyDoc_STR("() -> None")},
- {"CGContextEOClip", (PyCFunction)CGContextRefObj_CGContextEOClip, 1,
- PyDoc_STR("() -> None")},
- {"CGContextClipToRect", (PyCFunction)CGContextRefObj_CGContextClipToRect, 1,
- PyDoc_STR("(CGRect rect) -> None")},
- {"CGContextSetGrayFillColor", (PyCFunction)CGContextRefObj_CGContextSetGrayFillColor, 1,
- PyDoc_STR("(float gray, float alpha) -> None")},
- {"CGContextSetGrayStrokeColor", (PyCFunction)CGContextRefObj_CGContextSetGrayStrokeColor, 1,
- PyDoc_STR("(float gray, float alpha) -> None")},
- {"CGContextSetRGBFillColor", (PyCFunction)CGContextRefObj_CGContextSetRGBFillColor, 1,
- PyDoc_STR("(float red, float green, float blue, float alpha) -> None")},
- {"CGContextSetRGBStrokeColor", (PyCFunction)CGContextRefObj_CGContextSetRGBStrokeColor, 1,
- PyDoc_STR("(float red, float green, float blue, float alpha) -> None")},
- {"CGContextSetCMYKFillColor", (PyCFunction)CGContextRefObj_CGContextSetCMYKFillColor, 1,
- PyDoc_STR("(float cyan, float magenta, float yellow, float black, float alpha) -> None")},
- {"CGContextSetCMYKStrokeColor", (PyCFunction)CGContextRefObj_CGContextSetCMYKStrokeColor, 1,
- PyDoc_STR("(float cyan, float magenta, float yellow, float black, float alpha) -> None")},
- {"CGContextGetInterpolationQuality", (PyCFunction)CGContextRefObj_CGContextGetInterpolationQuality, 1,
- PyDoc_STR("() -> (int _rv)")},
- {"CGContextSetInterpolationQuality", (PyCFunction)CGContextRefObj_CGContextSetInterpolationQuality, 1,
- PyDoc_STR("(int quality) -> None")},
- {"CGContextSetCharacterSpacing", (PyCFunction)CGContextRefObj_CGContextSetCharacterSpacing, 1,
- PyDoc_STR("(float spacing) -> None")},
- {"CGContextSetTextPosition", (PyCFunction)CGContextRefObj_CGContextSetTextPosition, 1,
- PyDoc_STR("(float x, float y) -> None")},
- {"CGContextGetTextPosition", (PyCFunction)CGContextRefObj_CGContextGetTextPosition, 1,
- PyDoc_STR("() -> (CGPoint _rv)")},
- {"CGContextSetTextMatrix", (PyCFunction)CGContextRefObj_CGContextSetTextMatrix, 1,
- PyDoc_STR("(CGAffineTransform transform) -> None")},
- {"CGContextGetTextMatrix", (PyCFunction)CGContextRefObj_CGContextGetTextMatrix, 1,
- PyDoc_STR("() -> (CGAffineTransform _rv)")},
- {"CGContextSetTextDrawingMode", (PyCFunction)CGContextRefObj_CGContextSetTextDrawingMode, 1,
- PyDoc_STR("(int mode) -> None")},
- {"CGContextSetFontSize", (PyCFunction)CGContextRefObj_CGContextSetFontSize, 1,
- PyDoc_STR("(float size) -> None")},
- {"CGContextSelectFont", (PyCFunction)CGContextRefObj_CGContextSelectFont, 1,
- PyDoc_STR("(char * name, float size, int textEncoding) -> None")},
- {"CGContextShowText", (PyCFunction)CGContextRefObj_CGContextShowText, 1,
- PyDoc_STR("(Buffer cstring) -> None")},
- {"CGContextShowTextAtPoint", (PyCFunction)CGContextRefObj_CGContextShowTextAtPoint, 1,
- PyDoc_STR("(float x, float y, Buffer cstring) -> None")},
- {"CGContextEndPage", (PyCFunction)CGContextRefObj_CGContextEndPage, 1,
- PyDoc_STR("() -> None")},
- {"CGContextFlush", (PyCFunction)CGContextRefObj_CGContextFlush, 1,
- PyDoc_STR("() -> None")},
- {"CGContextSynchronize", (PyCFunction)CGContextRefObj_CGContextSynchronize, 1,
- PyDoc_STR("() -> None")},
- {"CGContextSetShouldAntialias", (PyCFunction)CGContextRefObj_CGContextSetShouldAntialias, 1,
- PyDoc_STR("(int shouldAntialias) -> None")},
+ {"CGContextSaveGState", (PyCFunction)CGContextRefObj_CGContextSaveGState, 1,
+ PyDoc_STR("() -> None")},
+ {"CGContextRestoreGState", (PyCFunction)CGContextRefObj_CGContextRestoreGState, 1,
+ PyDoc_STR("() -> None")},
+ {"CGContextScaleCTM", (PyCFunction)CGContextRefObj_CGContextScaleCTM, 1,
+ PyDoc_STR("(float sx, float sy) -> None")},
+ {"CGContextTranslateCTM", (PyCFunction)CGContextRefObj_CGContextTranslateCTM, 1,
+ PyDoc_STR("(float tx, float ty) -> None")},
+ {"CGContextRotateCTM", (PyCFunction)CGContextRefObj_CGContextRotateCTM, 1,
+ PyDoc_STR("(float angle) -> None")},
+ {"CGContextConcatCTM", (PyCFunction)CGContextRefObj_CGContextConcatCTM, 1,
+ PyDoc_STR("(CGAffineTransform transform) -> None")},
+ {"CGContextGetCTM", (PyCFunction)CGContextRefObj_CGContextGetCTM, 1,
+ PyDoc_STR("() -> (CGAffineTransform _rv)")},
+ {"CGContextSetLineWidth", (PyCFunction)CGContextRefObj_CGContextSetLineWidth, 1,
+ PyDoc_STR("(float width) -> None")},
+ {"CGContextSetLineCap", (PyCFunction)CGContextRefObj_CGContextSetLineCap, 1,
+ PyDoc_STR("(int cap) -> None")},
+ {"CGContextSetLineJoin", (PyCFunction)CGContextRefObj_CGContextSetLineJoin, 1,
+ PyDoc_STR("(int join) -> None")},
+ {"CGContextSetMiterLimit", (PyCFunction)CGContextRefObj_CGContextSetMiterLimit, 1,
+ PyDoc_STR("(float limit) -> None")},
+ {"CGContextSetFlatness", (PyCFunction)CGContextRefObj_CGContextSetFlatness, 1,
+ PyDoc_STR("(float flatness) -> None")},
+ {"CGContextSetAlpha", (PyCFunction)CGContextRefObj_CGContextSetAlpha, 1,
+ PyDoc_STR("(float alpha) -> None")},
+ {"CGContextBeginPath", (PyCFunction)CGContextRefObj_CGContextBeginPath, 1,
+ PyDoc_STR("() -> None")},
+ {"CGContextMoveToPoint", (PyCFunction)CGContextRefObj_CGContextMoveToPoint, 1,
+ PyDoc_STR("(float x, float y) -> None")},
+ {"CGContextAddLineToPoint", (PyCFunction)CGContextRefObj_CGContextAddLineToPoint, 1,
+ PyDoc_STR("(float x, float y) -> None")},
+ {"CGContextAddCurveToPoint", (PyCFunction)CGContextRefObj_CGContextAddCurveToPoint, 1,
+ PyDoc_STR("(float cp1x, float cp1y, float cp2x, float cp2y, float x, float y) -> None")},
+ {"CGContextAddQuadCurveToPoint", (PyCFunction)CGContextRefObj_CGContextAddQuadCurveToPoint, 1,
+ PyDoc_STR("(float cpx, float cpy, float x, float y) -> None")},
+ {"CGContextClosePath", (PyCFunction)CGContextRefObj_CGContextClosePath, 1,
+ PyDoc_STR("() -> None")},
+ {"CGContextAddRect", (PyCFunction)CGContextRefObj_CGContextAddRect, 1,
+ PyDoc_STR("(CGRect rect) -> None")},
+ {"CGContextAddArc", (PyCFunction)CGContextRefObj_CGContextAddArc, 1,
+ PyDoc_STR("(float x, float y, float radius, float startAngle, float endAngle, int clockwise) -> None")},
+ {"CGContextAddArcToPoint", (PyCFunction)CGContextRefObj_CGContextAddArcToPoint, 1,
+ PyDoc_STR("(float x1, float y1, float x2, float y2, float radius) -> None")},
+ {"CGContextIsPathEmpty", (PyCFunction)CGContextRefObj_CGContextIsPathEmpty, 1,
+ PyDoc_STR("() -> (int _rv)")},
+ {"CGContextGetPathCurrentPoint", (PyCFunction)CGContextRefObj_CGContextGetPathCurrentPoint, 1,
+ PyDoc_STR("() -> (CGPoint _rv)")},
+ {"CGContextGetPathBoundingBox", (PyCFunction)CGContextRefObj_CGContextGetPathBoundingBox, 1,
+ PyDoc_STR("() -> (CGRect _rv)")},
+ {"CGContextDrawPath", (PyCFunction)CGContextRefObj_CGContextDrawPath, 1,
+ PyDoc_STR("(int mode) -> None")},
+ {"CGContextFillPath", (PyCFunction)CGContextRefObj_CGContextFillPath, 1,
+ PyDoc_STR("() -> None")},
+ {"CGContextEOFillPath", (PyCFunction)CGContextRefObj_CGContextEOFillPath, 1,
+ PyDoc_STR("() -> None")},
+ {"CGContextStrokePath", (PyCFunction)CGContextRefObj_CGContextStrokePath, 1,
+ PyDoc_STR("() -> None")},
+ {"CGContextFillRect", (PyCFunction)CGContextRefObj_CGContextFillRect, 1,
+ PyDoc_STR("(CGRect rect) -> None")},
+ {"CGContextStrokeRect", (PyCFunction)CGContextRefObj_CGContextStrokeRect, 1,
+ PyDoc_STR("(CGRect rect) -> None")},
+ {"CGContextStrokeRectWithWidth", (PyCFunction)CGContextRefObj_CGContextStrokeRectWithWidth, 1,
+ PyDoc_STR("(CGRect rect, float width) -> None")},
+ {"CGContextClearRect", (PyCFunction)CGContextRefObj_CGContextClearRect, 1,
+ PyDoc_STR("(CGRect rect) -> None")},
+ {"CGContextClip", (PyCFunction)CGContextRefObj_CGContextClip, 1,
+ PyDoc_STR("() -> None")},
+ {"CGContextEOClip", (PyCFunction)CGContextRefObj_CGContextEOClip, 1,
+ PyDoc_STR("() -> None")},
+ {"CGContextClipToRect", (PyCFunction)CGContextRefObj_CGContextClipToRect, 1,
+ PyDoc_STR("(CGRect rect) -> None")},
+ {"CGContextSetGrayFillColor", (PyCFunction)CGContextRefObj_CGContextSetGrayFillColor, 1,
+ PyDoc_STR("(float gray, float alpha) -> None")},
+ {"CGContextSetGrayStrokeColor", (PyCFunction)CGContextRefObj_CGContextSetGrayStrokeColor, 1,
+ PyDoc_STR("(float gray, float alpha) -> None")},
+ {"CGContextSetRGBFillColor", (PyCFunction)CGContextRefObj_CGContextSetRGBFillColor, 1,
+ PyDoc_STR("(float red, float green, float blue, float alpha) -> None")},
+ {"CGContextSetRGBStrokeColor", (PyCFunction)CGContextRefObj_CGContextSetRGBStrokeColor, 1,
+ PyDoc_STR("(float red, float green, float blue, float alpha) -> None")},
+ {"CGContextSetCMYKFillColor", (PyCFunction)CGContextRefObj_CGContextSetCMYKFillColor, 1,
+ PyDoc_STR("(float cyan, float magenta, float yellow, float black, float alpha) -> None")},
+ {"CGContextSetCMYKStrokeColor", (PyCFunction)CGContextRefObj_CGContextSetCMYKStrokeColor, 1,
+ PyDoc_STR("(float cyan, float magenta, float yellow, float black, float alpha) -> None")},
+ {"CGContextGetInterpolationQuality", (PyCFunction)CGContextRefObj_CGContextGetInterpolationQuality, 1,
+ PyDoc_STR("() -> (int _rv)")},
+ {"CGContextSetInterpolationQuality", (PyCFunction)CGContextRefObj_CGContextSetInterpolationQuality, 1,
+ PyDoc_STR("(int quality) -> None")},
+ {"CGContextSetCharacterSpacing", (PyCFunction)CGContextRefObj_CGContextSetCharacterSpacing, 1,
+ PyDoc_STR("(float spacing) -> None")},
+ {"CGContextSetTextPosition", (PyCFunction)CGContextRefObj_CGContextSetTextPosition, 1,
+ PyDoc_STR("(float x, float y) -> None")},
+ {"CGContextGetTextPosition", (PyCFunction)CGContextRefObj_CGContextGetTextPosition, 1,
+ PyDoc_STR("() -> (CGPoint _rv)")},
+ {"CGContextSetTextMatrix", (PyCFunction)CGContextRefObj_CGContextSetTextMatrix, 1,
+ PyDoc_STR("(CGAffineTransform transform) -> None")},
+ {"CGContextGetTextMatrix", (PyCFunction)CGContextRefObj_CGContextGetTextMatrix, 1,
+ PyDoc_STR("() -> (CGAffineTransform _rv)")},
+ {"CGContextSetTextDrawingMode", (PyCFunction)CGContextRefObj_CGContextSetTextDrawingMode, 1,
+ PyDoc_STR("(int mode) -> None")},
+ {"CGContextSetFontSize", (PyCFunction)CGContextRefObj_CGContextSetFontSize, 1,
+ PyDoc_STR("(float size) -> None")},
+ {"CGContextSelectFont", (PyCFunction)CGContextRefObj_CGContextSelectFont, 1,
+ PyDoc_STR("(char * name, float size, int textEncoding) -> None")},
+ {"CGContextShowText", (PyCFunction)CGContextRefObj_CGContextShowText, 1,
+ PyDoc_STR("(Buffer cstring) -> None")},
+ {"CGContextShowTextAtPoint", (PyCFunction)CGContextRefObj_CGContextShowTextAtPoint, 1,
+ PyDoc_STR("(float x, float y, Buffer cstring) -> None")},
+ {"CGContextEndPage", (PyCFunction)CGContextRefObj_CGContextEndPage, 1,
+ PyDoc_STR("() -> None")},
+ {"CGContextFlush", (PyCFunction)CGContextRefObj_CGContextFlush, 1,
+ PyDoc_STR("() -> None")},
+ {"CGContextSynchronize", (PyCFunction)CGContextRefObj_CGContextSynchronize, 1,
+ PyDoc_STR("() -> None")},
+ {"CGContextSetShouldAntialias", (PyCFunction)CGContextRefObj_CGContextSetShouldAntialias, 1,
+ PyDoc_STR("(int shouldAntialias) -> None")},
#ifndef __LP64__
- {"SyncCGContextOriginWithPort", (PyCFunction)CGContextRefObj_SyncCGContextOriginWithPort, 1,
- PyDoc_STR("(CGrafPtr port) -> None")},
- {"ClipCGContextToRegion", (PyCFunction)CGContextRefObj_ClipCGContextToRegion, 1,
- PyDoc_STR("(Rect portRect, RgnHandle region) -> None")},
+ {"SyncCGContextOriginWithPort", (PyCFunction)CGContextRefObj_SyncCGContextOriginWithPort, 1,
+ PyDoc_STR("(CGrafPtr port) -> None")},
+ {"ClipCGContextToRegion", (PyCFunction)CGContextRefObj_ClipCGContextToRegion, 1,
+ PyDoc_STR("(Rect portRect, RgnHandle region) -> None")},
#endif
- {NULL, NULL, 0}
+ {NULL, NULL, 0}
};
#define CGContextRefObj_getsetlist NULL
@@ -1198,61 +1198,61 @@ static PyMethodDef CGContextRefObj_methods[] = {
static PyObject *CGContextRefObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
- PyObject *_self;
- CGContextRef itself;
- char *kw[] = {"itself", 0};
+ 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;
+ 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 = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
- "_CG.CGContextRef", /*tp_name*/
- sizeof(CGContextRefObject), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- /* methods */
- (destructor) CGContextRefObj_dealloc, /*tp_dealloc*/
- 0, /*tp_print*/
- (getattrfunc)0, /*tp_getattr*/
- (setattrfunc)0, /*tp_setattr*/
- (cmpfunc) CGContextRefObj_compare, /*tp_compare*/
- (reprfunc) CGContextRefObj_repr, /*tp_repr*/
- (PyNumberMethods *)0, /* tp_as_number */
- (PySequenceMethods *)0, /* tp_as_sequence */
- (PyMappingMethods *)0, /* tp_as_mapping */
- (hashfunc) CGContextRefObj_hash, /*tp_hash*/
- 0, /*tp_call*/
- 0, /*tp_str*/
- PyObject_GenericGetAttr, /*tp_getattro*/
- PyObject_GenericSetAttr, /*tp_setattro */
- 0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
- 0, /*tp_doc*/
- 0, /*tp_traverse*/
- 0, /*tp_clear*/
- 0, /*tp_richcompare*/
- 0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
- 0, /*tp_iternext*/
- CGContextRefObj_methods, /* tp_methods */
- 0, /*tp_members*/
- CGContextRefObj_getsetlist, /*tp_getset*/
- 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 */
+ PyObject_HEAD_INIT(NULL)
+ 0, /*ob_size*/
+ "_CG.CGContextRef", /*tp_name*/
+ sizeof(CGContextRefObject), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ /* methods */
+ (destructor) CGContextRefObj_dealloc, /*tp_dealloc*/
+ 0, /*tp_print*/
+ (getattrfunc)0, /*tp_getattr*/
+ (setattrfunc)0, /*tp_setattr*/
+ (cmpfunc) CGContextRefObj_compare, /*tp_compare*/
+ (reprfunc) CGContextRefObj_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) CGContextRefObj_hash, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ PyObject_GenericGetAttr, /*tp_getattro*/
+ PyObject_GenericSetAttr, /*tp_setattro */
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
+ 0, /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ CGContextRefObj_methods, /* tp_methods */
+ 0, /*tp_members*/
+ CGContextRefObj_getsetlist, /*tp_getset*/
+ 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 ------------------ */
@@ -1261,29 +1261,29 @@ PyTypeObject CGContextRef_Type = {
#ifndef __LP64__
static PyObject *CG_CreateCGContextForPort(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- GrafPtr port;
- CGContextRef ctx;
- OSStatus _err;
+ PyObject *_res = NULL;
+ GrafPtr port;
+ CGContextRef ctx;
+ OSStatus _err;
- if (!PyArg_ParseTuple(_args, "O&", GrafObj_Convert, &port))
- return NULL;
+ if (!PyArg_ParseTuple(_args, "O&", GrafObj_Convert, &port))
+ return NULL;
- _err = CreateCGContextForPort(port, &ctx);
- if (_err != noErr)
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&", CGContextRefObj_New, ctx);
- return _res;
+ _err = CreateCGContextForPort(port, &ctx);
+ if (_err != noErr)
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&", CGContextRefObj_New, ctx);
+ return _res;
}
#endif
static PyMethodDef CG_methods[] = {
#ifndef __LP64__
- {"CreateCGContextForPort", (PyCFunction)CG_CreateCGContextForPort, 1,
- PyDoc_STR("(CGrafPtr) -> CGContextRef")},
+ {"CreateCGContextForPort", (PyCFunction)CG_CreateCGContextForPort, 1,
+ PyDoc_STR("(CGrafPtr) -> CGContextRef")},
#endif
- {NULL, NULL, 0}
+ {NULL, NULL, 0}
};
@@ -1291,25 +1291,25 @@ static PyMethodDef CG_methods[] = {
void init_CG(void)
{
- PyObject *m;
- PyObject *d;
+ PyObject *m;
+ PyObject *d;
- m = Py_InitModule("_CG", CG_methods);
- d = PyModule_GetDict(m);
- CG_Error = PyMac_GetOSErrException();
- if (CG_Error == NULL ||
- PyDict_SetItemString(d, "Error", CG_Error) != 0)
- return;
- CGContextRef_Type.ob_type = &PyType_Type;
- if (PyType_Ready(&CGContextRef_Type) < 0) return;
- Py_INCREF(&CGContextRef_Type);
- PyModule_AddObject(m, "CGContextRef", (PyObject *)&CGContextRef_Type);
- /* Backward-compatible name */
- Py_INCREF(&CGContextRef_Type);
- PyModule_AddObject(m, "CGContextRefType", (PyObject *)&CGContextRef_Type);
+ m = Py_InitModule("_CG", CG_methods);
+ d = PyModule_GetDict(m);
+ CG_Error = PyMac_GetOSErrException();
+ if (CG_Error == NULL ||
+ PyDict_SetItemString(d, "Error", CG_Error) != 0)
+ return;
+ CGContextRef_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&CGContextRef_Type) < 0) return;
+ Py_INCREF(&CGContextRef_Type);
+ PyModule_AddObject(m, "CGContextRef", (PyObject *)&CGContextRef_Type);
+ /* Backward-compatible name */
+ Py_INCREF(&CGContextRef_Type);
+ PyModule_AddObject(m, "CGContextRefType", (PyObject *)&CGContextRef_Type);
}
/* ========================= End module _CG ========================= */
diff --git a/Mac/Modules/cm/_Cmmodule.c b/Mac/Modules/cm/_Cmmodule.c
index 03a25dd..f07f121 100644
--- a/Mac/Modules/cm/_Cmmodule.c
+++ b/Mac/Modules/cm/_Cmmodule.c
@@ -9,9 +9,9 @@
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
- PyErr_SetString(PyExc_NotImplementedError, \
- "Not available in this shared library/OS version"); \
- return NULL; \
+ PyErr_SetString(PyExc_NotImplementedError, \
+ "Not available in this shared library/OS version"); \
+ return NULL; \
}} while(0)
@@ -36,21 +36,21 @@ static PyObject *
CmpDesc_New(ComponentDescription *itself)
{
- return Py_BuildValue("O&O&O&ll",
- PyMac_BuildOSType, itself->componentType,
- PyMac_BuildOSType, itself->componentSubType,
- PyMac_BuildOSType, itself->componentManufacturer,
- itself->componentFlags, itself->componentFlagsMask);
+ return Py_BuildValue("O&O&O&ll",
+ PyMac_BuildOSType, itself->componentType,
+ PyMac_BuildOSType, itself->componentSubType,
+ PyMac_BuildOSType, itself->componentManufacturer,
+ itself->componentFlags, itself->componentFlagsMask);
}
static int
CmpDesc_Convert(PyObject *v, ComponentDescription *p_itself)
{
- return PyArg_ParseTuple(v, "O&O&O&ll",
- PyMac_GetOSType, &p_itself->componentType,
- PyMac_GetOSType, &p_itself->componentSubType,
- PyMac_GetOSType, &p_itself->componentManufacturer,
- &p_itself->componentFlags, &p_itself->componentFlagsMask);
+ return PyArg_ParseTuple(v, "O&O&O&ll",
+ PyMac_GetOSType, &p_itself->componentType,
+ PyMac_GetOSType, &p_itself->componentSubType,
+ PyMac_GetOSType, &p_itself->componentManufacturer,
+ &p_itself->componentFlags, &p_itself->componentFlagsMask);
}
@@ -63,194 +63,194 @@ PyTypeObject ComponentInstance_Type;
#define CmpInstObj_Check(x) ((x)->ob_type == &ComponentInstance_Type || PyObject_TypeCheck((x), &ComponentInstance_Type))
typedef struct ComponentInstanceObject {
- PyObject_HEAD
- ComponentInstance ob_itself;
+ PyObject_HEAD
+ ComponentInstance ob_itself;
} ComponentInstanceObject;
PyObject *CmpInstObj_New(ComponentInstance itself)
{
- ComponentInstanceObject *it;
- if (itself == NULL) {
- PyErr_SetString(Cm_Error,"NULL ComponentInstance");
- return NULL;
- }
- it = PyObject_NEW(ComponentInstanceObject, &ComponentInstance_Type);
- if (it == NULL) return NULL;
- it->ob_itself = itself;
- return (PyObject *)it;
+ ComponentInstanceObject *it;
+ if (itself == NULL) {
+ PyErr_SetString(Cm_Error,"NULL ComponentInstance");
+ return NULL;
+ }
+ it = PyObject_NEW(ComponentInstanceObject, &ComponentInstance_Type);
+ if (it == NULL) return NULL;
+ it->ob_itself = itself;
+ return (PyObject *)it;
}
int CmpInstObj_Convert(PyObject *v, ComponentInstance *p_itself)
{
- if (!CmpInstObj_Check(v))
- {
- PyErr_SetString(PyExc_TypeError, "ComponentInstance required");
- return 0;
- }
- *p_itself = ((ComponentInstanceObject *)v)->ob_itself;
- return 1;
+ if (!CmpInstObj_Check(v))
+ {
+ PyErr_SetString(PyExc_TypeError, "ComponentInstance required");
+ return 0;
+ }
+ *p_itself = ((ComponentInstanceObject *)v)->ob_itself;
+ return 1;
}
static void CmpInstObj_dealloc(ComponentInstanceObject *self)
{
- /* Cleanup of self->ob_itself goes here */
- self->ob_type->tp_free((PyObject *)self);
+ /* Cleanup of self->ob_itself goes here */
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *CmpInstObj_CloseComponent(ComponentInstanceObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
+ PyObject *_res = NULL;
+ OSErr _err;
#ifndef CloseComponent
- PyMac_PRECHECK(CloseComponent);
+ PyMac_PRECHECK(CloseComponent);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = CloseComponent(_self->ob_itself);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = CloseComponent(_self->ob_itself);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CmpInstObj_GetComponentInstanceError(ComponentInstanceObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
+ PyObject *_res = NULL;
+ OSErr _err;
#ifndef GetComponentInstanceError
- PyMac_PRECHECK(GetComponentInstanceError);
+ PyMac_PRECHECK(GetComponentInstanceError);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetComponentInstanceError(_self->ob_itself);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetComponentInstanceError(_self->ob_itself);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CmpInstObj_SetComponentInstanceError(ComponentInstanceObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr theError;
+ PyObject *_res = NULL;
+ OSErr theError;
#ifndef SetComponentInstanceError
- PyMac_PRECHECK(SetComponentInstanceError);
+ PyMac_PRECHECK(SetComponentInstanceError);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &theError))
- return NULL;
- SetComponentInstanceError(_self->ob_itself,
- theError);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &theError))
+ return NULL;
+ SetComponentInstanceError(_self->ob_itself,
+ theError);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CmpInstObj_GetComponentInstanceStorage(ComponentInstanceObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Handle _rv;
+ PyObject *_res = NULL;
+ Handle _rv;
#ifndef GetComponentInstanceStorage
- PyMac_PRECHECK(GetComponentInstanceStorage);
+ PyMac_PRECHECK(GetComponentInstanceStorage);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetComponentInstanceStorage(_self->ob_itself);
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetComponentInstanceStorage(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *CmpInstObj_SetComponentInstanceStorage(ComponentInstanceObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Handle theStorage;
+ PyObject *_res = NULL;
+ Handle theStorage;
#ifndef SetComponentInstanceStorage
- PyMac_PRECHECK(SetComponentInstanceStorage);
+ PyMac_PRECHECK(SetComponentInstanceStorage);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &theStorage))
- return NULL;
- SetComponentInstanceStorage(_self->ob_itself,
- theStorage);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &theStorage))
+ return NULL;
+ SetComponentInstanceStorage(_self->ob_itself,
+ theStorage);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
#ifndef __LP64__
static PyObject *CmpInstObj_ComponentFunctionImplemented(ComponentInstanceObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- long _rv;
- short ftnNumber;
+ PyObject *_res = NULL;
+ long _rv;
+ short ftnNumber;
#ifndef ComponentFunctionImplemented
- PyMac_PRECHECK(ComponentFunctionImplemented);
+ PyMac_PRECHECK(ComponentFunctionImplemented);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &ftnNumber))
- return NULL;
- _rv = ComponentFunctionImplemented(_self->ob_itself,
- ftnNumber);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &ftnNumber))
+ return NULL;
+ _rv = ComponentFunctionImplemented(_self->ob_itself,
+ ftnNumber);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *CmpInstObj_GetComponentVersion(ComponentInstanceObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- long _rv;
+ PyObject *_res = NULL;
+ long _rv;
#ifndef GetComponentVersion
- PyMac_PRECHECK(GetComponentVersion);
+ PyMac_PRECHECK(GetComponentVersion);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetComponentVersion(_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetComponentVersion(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *CmpInstObj_ComponentSetTarget(ComponentInstanceObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- long _rv;
- ComponentInstance target;
+ PyObject *_res = NULL;
+ long _rv;
+ ComponentInstance target;
#ifndef ComponentSetTarget
- PyMac_PRECHECK(ComponentSetTarget);
+ PyMac_PRECHECK(ComponentSetTarget);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &target))
- return NULL;
- _rv = ComponentSetTarget(_self->ob_itself,
- target);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &target))
+ return NULL;
+ _rv = ComponentSetTarget(_self->ob_itself,
+ target);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
#endif /* !__LP64__*/
static PyMethodDef CmpInstObj_methods[] = {
- {"CloseComponent", (PyCFunction)CmpInstObj_CloseComponent, 1,
- PyDoc_STR("() -> None")},
- {"GetComponentInstanceError", (PyCFunction)CmpInstObj_GetComponentInstanceError, 1,
- PyDoc_STR("() -> None")},
- {"SetComponentInstanceError", (PyCFunction)CmpInstObj_SetComponentInstanceError, 1,
- PyDoc_STR("(OSErr theError) -> None")},
- {"GetComponentInstanceStorage", (PyCFunction)CmpInstObj_GetComponentInstanceStorage, 1,
- PyDoc_STR("() -> (Handle _rv)")},
- {"SetComponentInstanceStorage", (PyCFunction)CmpInstObj_SetComponentInstanceStorage, 1,
- PyDoc_STR("(Handle theStorage) -> None")},
+ {"CloseComponent", (PyCFunction)CmpInstObj_CloseComponent, 1,
+ PyDoc_STR("() -> None")},
+ {"GetComponentInstanceError", (PyCFunction)CmpInstObj_GetComponentInstanceError, 1,
+ PyDoc_STR("() -> None")},
+ {"SetComponentInstanceError", (PyCFunction)CmpInstObj_SetComponentInstanceError, 1,
+ PyDoc_STR("(OSErr theError) -> None")},
+ {"GetComponentInstanceStorage", (PyCFunction)CmpInstObj_GetComponentInstanceStorage, 1,
+ PyDoc_STR("() -> (Handle _rv)")},
+ {"SetComponentInstanceStorage", (PyCFunction)CmpInstObj_SetComponentInstanceStorage, 1,
+ PyDoc_STR("(Handle theStorage) -> None")},
#ifndef __LP64__
- {"ComponentFunctionImplemented", (PyCFunction)CmpInstObj_ComponentFunctionImplemented, 1,
- PyDoc_STR("(short ftnNumber) -> (long _rv)")},
- {"GetComponentVersion", (PyCFunction)CmpInstObj_GetComponentVersion, 1,
- PyDoc_STR("() -> (long _rv)")},
- {"ComponentSetTarget", (PyCFunction)CmpInstObj_ComponentSetTarget, 1,
- PyDoc_STR("(ComponentInstance target) -> (long _rv)")},
+ {"ComponentFunctionImplemented", (PyCFunction)CmpInstObj_ComponentFunctionImplemented, 1,
+ PyDoc_STR("(short ftnNumber) -> (long _rv)")},
+ {"GetComponentVersion", (PyCFunction)CmpInstObj_GetComponentVersion, 1,
+ PyDoc_STR("() -> (long _rv)")},
+ {"ComponentSetTarget", (PyCFunction)CmpInstObj_ComponentSetTarget, 1,
+ PyDoc_STR("(ComponentInstance target) -> (long _rv)")},
#endif /* !__LP64__ */
- {NULL, NULL, 0}
+ {NULL, NULL, 0}
};
#define CmpInstObj_getsetlist NULL
@@ -267,61 +267,61 @@ static PyMethodDef CmpInstObj_methods[] = {
static PyObject *CmpInstObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
- PyObject *_self;
- ComponentInstance itself;
- char *kw[] = {"itself", 0};
+ 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;
+ 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 = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
- "_Cm.ComponentInstance", /*tp_name*/
- sizeof(ComponentInstanceObject), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- /* methods */
- (destructor) CmpInstObj_dealloc, /*tp_dealloc*/
- 0, /*tp_print*/
- (getattrfunc)0, /*tp_getattr*/
- (setattrfunc)0, /*tp_setattr*/
- (cmpfunc) CmpInstObj_compare, /*tp_compare*/
- (reprfunc) CmpInstObj_repr, /*tp_repr*/
- (PyNumberMethods *)0, /* tp_as_number */
- (PySequenceMethods *)0, /* tp_as_sequence */
- (PyMappingMethods *)0, /* tp_as_mapping */
- (hashfunc) CmpInstObj_hash, /*tp_hash*/
- 0, /*tp_call*/
- 0, /*tp_str*/
- PyObject_GenericGetAttr, /*tp_getattro*/
- PyObject_GenericSetAttr, /*tp_setattro */
- 0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
- 0, /*tp_doc*/
- 0, /*tp_traverse*/
- 0, /*tp_clear*/
- 0, /*tp_richcompare*/
- 0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
- 0, /*tp_iternext*/
- CmpInstObj_methods, /* tp_methods */
- 0, /*tp_members*/
- CmpInstObj_getsetlist, /*tp_getset*/
- 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 */
+ PyObject_HEAD_INIT(NULL)
+ 0, /*ob_size*/
+ "_Cm.ComponentInstance", /*tp_name*/
+ sizeof(ComponentInstanceObject), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ /* methods */
+ (destructor) CmpInstObj_dealloc, /*tp_dealloc*/
+ 0, /*tp_print*/
+ (getattrfunc)0, /*tp_getattr*/
+ (setattrfunc)0, /*tp_setattr*/
+ (cmpfunc) CmpInstObj_compare, /*tp_compare*/
+ (reprfunc) CmpInstObj_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) CmpInstObj_hash, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ PyObject_GenericGetAttr, /*tp_getattro*/
+ PyObject_GenericSetAttr, /*tp_setattro */
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
+ 0, /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ CmpInstObj_methods, /* tp_methods */
+ 0, /*tp_members*/
+ CmpInstObj_getsetlist, /*tp_getset*/
+ 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 ---------------- */
@@ -334,361 +334,361 @@ PyTypeObject Component_Type;
#define CmpObj_Check(x) ((x)->ob_type == &Component_Type || PyObject_TypeCheck((x), &Component_Type))
typedef struct ComponentObject {
- PyObject_HEAD
- Component ob_itself;
+ PyObject_HEAD
+ Component ob_itself;
} ComponentObject;
PyObject *CmpObj_New(Component itself)
{
- ComponentObject *it;
- if (itself == NULL) {
- /* XXXX Or should we return None? */
- PyErr_SetString(Cm_Error,"No such component");
- return NULL;
- }
- it = PyObject_NEW(ComponentObject, &Component_Type);
- if (it == NULL) return NULL;
- it->ob_itself = itself;
- return (PyObject *)it;
+ ComponentObject *it;
+ if (itself == NULL) {
+ /* XXXX Or should we return None? */
+ PyErr_SetString(Cm_Error,"No such component");
+ return NULL;
+ }
+ it = PyObject_NEW(ComponentObject, &Component_Type);
+ if (it == NULL) return NULL;
+ it->ob_itself = itself;
+ return (PyObject *)it;
}
int CmpObj_Convert(PyObject *v, Component *p_itself)
{
- if ( v == Py_None ) {
- *p_itself = 0;
- return 1;
- }
- if (!CmpObj_Check(v))
- {
- PyErr_SetString(PyExc_TypeError, "Component required");
- return 0;
- }
- *p_itself = ((ComponentObject *)v)->ob_itself;
- return 1;
+ if ( v == Py_None ) {
+ *p_itself = 0;
+ return 1;
+ }
+ if (!CmpObj_Check(v))
+ {
+ PyErr_SetString(PyExc_TypeError, "Component required");
+ return 0;
+ }
+ *p_itself = ((ComponentObject *)v)->ob_itself;
+ return 1;
}
static void CmpObj_dealloc(ComponentObject *self)
{
- /* Cleanup of self->ob_itself goes here */
- self->ob_type->tp_free((PyObject *)self);
+ /* Cleanup of self->ob_itself goes here */
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *CmpObj_UnregisterComponent(ComponentObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
+ PyObject *_res = NULL;
+ OSErr _err;
#ifndef UnregisterComponent
- PyMac_PRECHECK(UnregisterComponent);
+ PyMac_PRECHECK(UnregisterComponent);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = UnregisterComponent(_self->ob_itself);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = UnregisterComponent(_self->ob_itself);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CmpObj_GetComponentInfo(ComponentObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- ComponentDescription cd;
- Handle componentName;
- Handle componentInfo;
- Handle componentIcon;
+ PyObject *_res = NULL;
+ OSErr _err;
+ ComponentDescription cd;
+ Handle componentName;
+ Handle componentInfo;
+ Handle componentIcon;
#ifndef GetComponentInfo
- PyMac_PRECHECK(GetComponentInfo);
+ PyMac_PRECHECK(GetComponentInfo);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- ResObj_Convert, &componentName,
- ResObj_Convert, &componentInfo,
- ResObj_Convert, &componentIcon))
- return NULL;
- _err = GetComponentInfo(_self->ob_itself,
- &cd,
- componentName,
- componentInfo,
- componentIcon);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- CmpDesc_New, &cd);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ ResObj_Convert, &componentName,
+ ResObj_Convert, &componentInfo,
+ ResObj_Convert, &componentIcon))
+ return NULL;
+ _err = GetComponentInfo(_self->ob_itself,
+ &cd,
+ componentName,
+ componentInfo,
+ componentIcon);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ CmpDesc_New, &cd);
+ return _res;
}
static PyObject *CmpObj_OpenComponent(ComponentObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentInstance _rv;
+ PyObject *_res = NULL;
+ ComponentInstance _rv;
#ifndef OpenComponent
- PyMac_PRECHECK(OpenComponent);
+ PyMac_PRECHECK(OpenComponent);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = OpenComponent(_self->ob_itself);
- _res = Py_BuildValue("O&",
- CmpInstObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = OpenComponent(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ CmpInstObj_New, _rv);
+ return _res;
}
static PyObject *CmpObj_ResolveComponentAlias(ComponentObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Component _rv;
+ PyObject *_res = NULL;
+ Component _rv;
#ifndef ResolveComponentAlias
- PyMac_PRECHECK(ResolveComponentAlias);
+ PyMac_PRECHECK(ResolveComponentAlias);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = ResolveComponentAlias(_self->ob_itself);
- _res = Py_BuildValue("O&",
- CmpObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = ResolveComponentAlias(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ CmpObj_New, _rv);
+ return _res;
}
static PyObject *CmpObj_GetComponentPublicIndString(ComponentObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Str255 theString;
- short strListID;
- short index;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Str255 theString;
+ short strListID;
+ short index;
#ifndef GetComponentPublicIndString
- PyMac_PRECHECK(GetComponentPublicIndString);
+ PyMac_PRECHECK(GetComponentPublicIndString);
#endif
- if (!PyArg_ParseTuple(_args, "O&hh",
- PyMac_GetStr255, theString,
- &strListID,
- &index))
- return NULL;
- _err = GetComponentPublicIndString(_self->ob_itself,
- theString,
- strListID,
- index);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&hh",
+ PyMac_GetStr255, theString,
+ &strListID,
+ &index))
+ return NULL;
+ _err = GetComponentPublicIndString(_self->ob_itself,
+ theString,
+ strListID,
+ index);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CmpObj_GetComponentRefcon(ComponentObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- long _rv;
+ PyObject *_res = NULL;
+ long _rv;
#ifndef GetComponentRefcon
- PyMac_PRECHECK(GetComponentRefcon);
+ PyMac_PRECHECK(GetComponentRefcon);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetComponentRefcon(_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetComponentRefcon(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *CmpObj_SetComponentRefcon(ComponentObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- long theRefcon;
+ PyObject *_res = NULL;
+ long theRefcon;
#ifndef SetComponentRefcon
- PyMac_PRECHECK(SetComponentRefcon);
+ PyMac_PRECHECK(SetComponentRefcon);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &theRefcon))
- return NULL;
- SetComponentRefcon(_self->ob_itself,
- theRefcon);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &theRefcon))
+ return NULL;
+ SetComponentRefcon(_self->ob_itself,
+ theRefcon);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CmpObj_OpenComponentResFile(ComponentObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short _rv;
+ PyObject *_res = NULL;
+ short _rv;
#ifndef OpenComponentResFile
- PyMac_PRECHECK(OpenComponentResFile);
+ PyMac_PRECHECK(OpenComponentResFile);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = OpenComponentResFile(_self->ob_itself);
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = OpenComponentResFile(_self->ob_itself);
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *CmpObj_GetComponentResource(ComponentObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- OSType resType;
- short resID;
- Handle theResource;
+ PyObject *_res = NULL;
+ OSErr _err;
+ OSType resType;
+ short resID;
+ Handle theResource;
#ifndef GetComponentResource
- PyMac_PRECHECK(GetComponentResource);
+ PyMac_PRECHECK(GetComponentResource);
#endif
- if (!PyArg_ParseTuple(_args, "O&h",
- PyMac_GetOSType, &resType,
- &resID))
- return NULL;
- _err = GetComponentResource(_self->ob_itself,
- resType,
- resID,
- &theResource);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- ResObj_New, theResource);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&h",
+ PyMac_GetOSType, &resType,
+ &resID))
+ return NULL;
+ _err = GetComponentResource(_self->ob_itself,
+ resType,
+ resID,
+ &theResource);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ ResObj_New, theResource);
+ return _res;
}
static PyObject *CmpObj_GetComponentIndString(ComponentObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Str255 theString;
- short strListID;
- short index;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Str255 theString;
+ short strListID;
+ short index;
#ifndef GetComponentIndString
- PyMac_PRECHECK(GetComponentIndString);
+ PyMac_PRECHECK(GetComponentIndString);
#endif
- if (!PyArg_ParseTuple(_args, "O&hh",
- PyMac_GetStr255, theString,
- &strListID,
- &index))
- return NULL;
- _err = GetComponentIndString(_self->ob_itself,
- theString,
- strListID,
- index);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&hh",
+ PyMac_GetStr255, theString,
+ &strListID,
+ &index))
+ return NULL;
+ _err = GetComponentIndString(_self->ob_itself,
+ theString,
+ strListID,
+ index);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CmpObj_CountComponentInstances(ComponentObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- long _rv;
+ PyObject *_res = NULL;
+ long _rv;
#ifndef CountComponentInstances
- PyMac_PRECHECK(CountComponentInstances);
+ PyMac_PRECHECK(CountComponentInstances);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = CountComponentInstances(_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = CountComponentInstances(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *CmpObj_SetDefaultComponent(ComponentObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- short flags;
+ PyObject *_res = NULL;
+ OSErr _err;
+ short flags;
#ifndef SetDefaultComponent
- PyMac_PRECHECK(SetDefaultComponent);
+ PyMac_PRECHECK(SetDefaultComponent);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &flags))
- return NULL;
- _err = SetDefaultComponent(_self->ob_itself,
- flags);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &flags))
+ return NULL;
+ _err = SetDefaultComponent(_self->ob_itself,
+ flags);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CmpObj_CaptureComponent(ComponentObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Component _rv;
- Component capturingComponent;
+ PyObject *_res = NULL;
+ Component _rv;
+ Component capturingComponent;
#ifndef CaptureComponent
- PyMac_PRECHECK(CaptureComponent);
+ PyMac_PRECHECK(CaptureComponent);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpObj_Convert, &capturingComponent))
- return NULL;
- _rv = CaptureComponent(_self->ob_itself,
- capturingComponent);
- _res = Py_BuildValue("O&",
- CmpObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpObj_Convert, &capturingComponent))
+ return NULL;
+ _rv = CaptureComponent(_self->ob_itself,
+ capturingComponent);
+ _res = Py_BuildValue("O&",
+ CmpObj_New, _rv);
+ return _res;
}
static PyObject *CmpObj_UncaptureComponent(ComponentObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
+ PyObject *_res = NULL;
+ OSErr _err;
#ifndef UncaptureComponent
- PyMac_PRECHECK(UncaptureComponent);
+ PyMac_PRECHECK(UncaptureComponent);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = UncaptureComponent(_self->ob_itself);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = UncaptureComponent(_self->ob_itself);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
#ifndef __LP64__
static PyObject *CmpObj_GetComponentIconSuite(ComponentObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Handle iconSuite;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Handle iconSuite;
#ifndef GetComponentIconSuite
- PyMac_PRECHECK(GetComponentIconSuite);
+ PyMac_PRECHECK(GetComponentIconSuite);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetComponentIconSuite(_self->ob_itself,
- &iconSuite);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- ResObj_New, iconSuite);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetComponentIconSuite(_self->ob_itself,
+ &iconSuite);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ ResObj_New, iconSuite);
+ return _res;
}
#endif /* !__LP64__ */
static PyMethodDef CmpObj_methods[] = {
- {"UnregisterComponent", (PyCFunction)CmpObj_UnregisterComponent, 1,
- PyDoc_STR("() -> None")},
- {"GetComponentInfo", (PyCFunction)CmpObj_GetComponentInfo, 1,
- PyDoc_STR("(Handle componentName, Handle componentInfo, Handle componentIcon) -> (ComponentDescription cd)")},
- {"OpenComponent", (PyCFunction)CmpObj_OpenComponent, 1,
- PyDoc_STR("() -> (ComponentInstance _rv)")},
- {"ResolveComponentAlias", (PyCFunction)CmpObj_ResolveComponentAlias, 1,
- PyDoc_STR("() -> (Component _rv)")},
- {"GetComponentPublicIndString", (PyCFunction)CmpObj_GetComponentPublicIndString, 1,
- PyDoc_STR("(Str255 theString, short strListID, short index) -> None")},
- {"GetComponentRefcon", (PyCFunction)CmpObj_GetComponentRefcon, 1,
- PyDoc_STR("() -> (long _rv)")},
- {"SetComponentRefcon", (PyCFunction)CmpObj_SetComponentRefcon, 1,
- PyDoc_STR("(long theRefcon) -> None")},
- {"OpenComponentResFile", (PyCFunction)CmpObj_OpenComponentResFile, 1,
- PyDoc_STR("() -> (short _rv)")},
- {"GetComponentResource", (PyCFunction)CmpObj_GetComponentResource, 1,
- PyDoc_STR("(OSType resType, short resID) -> (Handle theResource)")},
- {"GetComponentIndString", (PyCFunction)CmpObj_GetComponentIndString, 1,
- PyDoc_STR("(Str255 theString, short strListID, short index) -> None")},
- {"CountComponentInstances", (PyCFunction)CmpObj_CountComponentInstances, 1,
- PyDoc_STR("() -> (long _rv)")},
- {"SetDefaultComponent", (PyCFunction)CmpObj_SetDefaultComponent, 1,
- PyDoc_STR("(short flags) -> None")},
- {"CaptureComponent", (PyCFunction)CmpObj_CaptureComponent, 1,
- PyDoc_STR("(Component capturingComponent) -> (Component _rv)")},
- {"UncaptureComponent", (PyCFunction)CmpObj_UncaptureComponent, 1,
- PyDoc_STR("() -> None")},
+ {"UnregisterComponent", (PyCFunction)CmpObj_UnregisterComponent, 1,
+ PyDoc_STR("() -> None")},
+ {"GetComponentInfo", (PyCFunction)CmpObj_GetComponentInfo, 1,
+ PyDoc_STR("(Handle componentName, Handle componentInfo, Handle componentIcon) -> (ComponentDescription cd)")},
+ {"OpenComponent", (PyCFunction)CmpObj_OpenComponent, 1,
+ PyDoc_STR("() -> (ComponentInstance _rv)")},
+ {"ResolveComponentAlias", (PyCFunction)CmpObj_ResolveComponentAlias, 1,
+ PyDoc_STR("() -> (Component _rv)")},
+ {"GetComponentPublicIndString", (PyCFunction)CmpObj_GetComponentPublicIndString, 1,
+ PyDoc_STR("(Str255 theString, short strListID, short index) -> None")},
+ {"GetComponentRefcon", (PyCFunction)CmpObj_GetComponentRefcon, 1,
+ PyDoc_STR("() -> (long _rv)")},
+ {"SetComponentRefcon", (PyCFunction)CmpObj_SetComponentRefcon, 1,
+ PyDoc_STR("(long theRefcon) -> None")},
+ {"OpenComponentResFile", (PyCFunction)CmpObj_OpenComponentResFile, 1,
+ PyDoc_STR("() -> (short _rv)")},
+ {"GetComponentResource", (PyCFunction)CmpObj_GetComponentResource, 1,
+ PyDoc_STR("(OSType resType, short resID) -> (Handle theResource)")},
+ {"GetComponentIndString", (PyCFunction)CmpObj_GetComponentIndString, 1,
+ PyDoc_STR("(Str255 theString, short strListID, short index) -> None")},
+ {"CountComponentInstances", (PyCFunction)CmpObj_CountComponentInstances, 1,
+ PyDoc_STR("() -> (long _rv)")},
+ {"SetDefaultComponent", (PyCFunction)CmpObj_SetDefaultComponent, 1,
+ PyDoc_STR("(short flags) -> None")},
+ {"CaptureComponent", (PyCFunction)CmpObj_CaptureComponent, 1,
+ PyDoc_STR("(Component capturingComponent) -> (Component _rv)")},
+ {"UncaptureComponent", (PyCFunction)CmpObj_UncaptureComponent, 1,
+ PyDoc_STR("() -> None")},
#ifndef __LP64__
- {"GetComponentIconSuite", (PyCFunction)CmpObj_GetComponentIconSuite, 1,
- PyDoc_STR("() -> (Handle iconSuite)")},
+ {"GetComponentIconSuite", (PyCFunction)CmpObj_GetComponentIconSuite, 1,
+ PyDoc_STR("() -> (Handle iconSuite)")},
#endif /* !__LP64__ */
- {NULL, NULL, 0}
+ {NULL, NULL, 0}
};
#define CmpObj_getsetlist NULL
@@ -705,61 +705,61 @@ static PyMethodDef CmpObj_methods[] = {
static PyObject *CmpObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
- PyObject *_self;
- Component itself;
- char *kw[] = {"itself", 0};
+ 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;
+ 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 = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
- "_Cm.Component", /*tp_name*/
- sizeof(ComponentObject), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- /* methods */
- (destructor) CmpObj_dealloc, /*tp_dealloc*/
- 0, /*tp_print*/
- (getattrfunc)0, /*tp_getattr*/
- (setattrfunc)0, /*tp_setattr*/
- (cmpfunc) CmpObj_compare, /*tp_compare*/
- (reprfunc) CmpObj_repr, /*tp_repr*/
- (PyNumberMethods *)0, /* tp_as_number */
- (PySequenceMethods *)0, /* tp_as_sequence */
- (PyMappingMethods *)0, /* tp_as_mapping */
- (hashfunc) CmpObj_hash, /*tp_hash*/
- 0, /*tp_call*/
- 0, /*tp_str*/
- PyObject_GenericGetAttr, /*tp_getattro*/
- PyObject_GenericSetAttr, /*tp_setattro */
- 0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
- 0, /*tp_doc*/
- 0, /*tp_traverse*/
- 0, /*tp_clear*/
- 0, /*tp_richcompare*/
- 0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
- 0, /*tp_iternext*/
- CmpObj_methods, /* tp_methods */
- 0, /*tp_members*/
- CmpObj_getsetlist, /*tp_getset*/
- 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 */
+ PyObject_HEAD_INIT(NULL)
+ 0, /*ob_size*/
+ "_Cm.Component", /*tp_name*/
+ sizeof(ComponentObject), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ /* methods */
+ (destructor) CmpObj_dealloc, /*tp_dealloc*/
+ 0, /*tp_print*/
+ (getattrfunc)0, /*tp_getattr*/
+ (setattrfunc)0, /*tp_setattr*/
+ (cmpfunc) CmpObj_compare, /*tp_compare*/
+ (reprfunc) CmpObj_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) CmpObj_hash, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ PyObject_GenericGetAttr, /*tp_getattro*/
+ PyObject_GenericSetAttr, /*tp_setattro */
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
+ 0, /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ CmpObj_methods, /* tp_methods */
+ 0, /*tp_members*/
+ CmpObj_getsetlist, /*tp_getset*/
+ 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 -------------------- */
@@ -767,150 +767,150 @@ PyTypeObject Component_Type = {
static PyObject *Cm_RegisterComponentResource(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Component _rv;
- ComponentResourceHandle cr;
- short global;
+ PyObject *_res = NULL;
+ Component _rv;
+ ComponentResourceHandle cr;
+ short global;
#ifndef RegisterComponentResource
- PyMac_PRECHECK(RegisterComponentResource);
+ PyMac_PRECHECK(RegisterComponentResource);
#endif
- if (!PyArg_ParseTuple(_args, "O&h",
- ResObj_Convert, &cr,
- &global))
- return NULL;
- _rv = RegisterComponentResource(cr,
- global);
- _res = Py_BuildValue("O&",
- CmpObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&h",
+ ResObj_Convert, &cr,
+ &global))
+ return NULL;
+ _rv = RegisterComponentResource(cr,
+ global);
+ _res = Py_BuildValue("O&",
+ CmpObj_New, _rv);
+ return _res;
}
static PyObject *Cm_FindNextComponent(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Component _rv;
- Component aComponent;
- ComponentDescription looking;
+ PyObject *_res = NULL;
+ Component _rv;
+ Component aComponent;
+ ComponentDescription looking;
#ifndef FindNextComponent
- PyMac_PRECHECK(FindNextComponent);
+ PyMac_PRECHECK(FindNextComponent);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpObj_Convert, &aComponent,
- CmpDesc_Convert, &looking))
- return NULL;
- _rv = FindNextComponent(aComponent,
- &looking);
- _res = Py_BuildValue("O&",
- CmpObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpObj_Convert, &aComponent,
+ CmpDesc_Convert, &looking))
+ return NULL;
+ _rv = FindNextComponent(aComponent,
+ &looking);
+ _res = Py_BuildValue("O&",
+ CmpObj_New, _rv);
+ return _res;
}
static PyObject *Cm_CountComponents(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- long _rv;
- ComponentDescription looking;
+ PyObject *_res = NULL;
+ long _rv;
+ ComponentDescription looking;
#ifndef CountComponents
- PyMac_PRECHECK(CountComponents);
+ PyMac_PRECHECK(CountComponents);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpDesc_Convert, &looking))
- return NULL;
- _rv = CountComponents(&looking);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpDesc_Convert, &looking))
+ return NULL;
+ _rv = CountComponents(&looking);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Cm_GetComponentListModSeed(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- long _rv;
+ PyObject *_res = NULL;
+ long _rv;
#ifndef GetComponentListModSeed
- PyMac_PRECHECK(GetComponentListModSeed);
+ PyMac_PRECHECK(GetComponentListModSeed);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetComponentListModSeed();
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetComponentListModSeed();
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Cm_CloseComponentResFile(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- short refnum;
+ PyObject *_res = NULL;
+ OSErr _err;
+ short refnum;
#ifndef CloseComponentResFile
- PyMac_PRECHECK(CloseComponentResFile);
+ PyMac_PRECHECK(CloseComponentResFile);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &refnum))
- return NULL;
- _err = CloseComponentResFile(refnum);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &refnum))
+ return NULL;
+ _err = CloseComponentResFile(refnum);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Cm_OpenDefaultComponent(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentInstance _rv;
- OSType componentType;
- OSType componentSubType;
+ PyObject *_res = NULL;
+ ComponentInstance _rv;
+ OSType componentType;
+ OSType componentSubType;
#ifndef OpenDefaultComponent
- PyMac_PRECHECK(OpenDefaultComponent);
+ PyMac_PRECHECK(OpenDefaultComponent);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- PyMac_GetOSType, &componentType,
- PyMac_GetOSType, &componentSubType))
- return NULL;
- _rv = OpenDefaultComponent(componentType,
- componentSubType);
- _res = Py_BuildValue("O&",
- CmpInstObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ PyMac_GetOSType, &componentType,
+ PyMac_GetOSType, &componentSubType))
+ return NULL;
+ _rv = OpenDefaultComponent(componentType,
+ componentSubType);
+ _res = Py_BuildValue("O&",
+ CmpInstObj_New, _rv);
+ return _res;
}
static PyObject *Cm_RegisterComponentResourceFile(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- long _rv;
- short resRefNum;
- short global;
+ PyObject *_res = NULL;
+ long _rv;
+ short resRefNum;
+ short global;
#ifndef RegisterComponentResourceFile
- PyMac_PRECHECK(RegisterComponentResourceFile);
+ PyMac_PRECHECK(RegisterComponentResourceFile);
#endif
- if (!PyArg_ParseTuple(_args, "hh",
- &resRefNum,
- &global))
- return NULL;
- _rv = RegisterComponentResourceFile(resRefNum,
- global);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "hh",
+ &resRefNum,
+ &global))
+ return NULL;
+ _rv = RegisterComponentResourceFile(resRefNum,
+ global);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyMethodDef Cm_methods[] = {
- {"RegisterComponentResource", (PyCFunction)Cm_RegisterComponentResource, 1,
- PyDoc_STR("(ComponentResourceHandle cr, short global) -> (Component _rv)")},
- {"FindNextComponent", (PyCFunction)Cm_FindNextComponent, 1,
- PyDoc_STR("(Component aComponent, ComponentDescription looking) -> (Component _rv)")},
- {"CountComponents", (PyCFunction)Cm_CountComponents, 1,
- PyDoc_STR("(ComponentDescription looking) -> (long _rv)")},
- {"GetComponentListModSeed", (PyCFunction)Cm_GetComponentListModSeed, 1,
- PyDoc_STR("() -> (long _rv)")},
- {"CloseComponentResFile", (PyCFunction)Cm_CloseComponentResFile, 1,
- PyDoc_STR("(short refnum) -> None")},
- {"OpenDefaultComponent", (PyCFunction)Cm_OpenDefaultComponent, 1,
- PyDoc_STR("(OSType componentType, OSType componentSubType) -> (ComponentInstance _rv)")},
- {"RegisterComponentResourceFile", (PyCFunction)Cm_RegisterComponentResourceFile, 1,
- PyDoc_STR("(short resRefNum, short global) -> (long _rv)")},
- {NULL, NULL, 0}
+ {"RegisterComponentResource", (PyCFunction)Cm_RegisterComponentResource, 1,
+ PyDoc_STR("(ComponentResourceHandle cr, short global) -> (Component _rv)")},
+ {"FindNextComponent", (PyCFunction)Cm_FindNextComponent, 1,
+ PyDoc_STR("(Component aComponent, ComponentDescription looking) -> (Component _rv)")},
+ {"CountComponents", (PyCFunction)Cm_CountComponents, 1,
+ PyDoc_STR("(ComponentDescription looking) -> (long _rv)")},
+ {"GetComponentListModSeed", (PyCFunction)Cm_GetComponentListModSeed, 1,
+ PyDoc_STR("() -> (long _rv)")},
+ {"CloseComponentResFile", (PyCFunction)Cm_CloseComponentResFile, 1,
+ PyDoc_STR("(short refnum) -> None")},
+ {"OpenDefaultComponent", (PyCFunction)Cm_OpenDefaultComponent, 1,
+ PyDoc_STR("(OSType componentType, OSType componentSubType) -> (ComponentInstance _rv)")},
+ {"RegisterComponentResourceFile", (PyCFunction)Cm_RegisterComponentResourceFile, 1,
+ PyDoc_STR("(short resRefNum, short global) -> (long _rv)")},
+ {NULL, NULL, 0}
};
@@ -918,37 +918,37 @@ static PyMethodDef Cm_methods[] = {
void init_Cm(void)
{
- PyObject *m;
- PyObject *d;
-
-
-
- PyMac_INIT_TOOLBOX_OBJECT_NEW(Component, CmpObj_New);
- PyMac_INIT_TOOLBOX_OBJECT_CONVERT(Component, CmpObj_Convert);
- PyMac_INIT_TOOLBOX_OBJECT_NEW(ComponentInstance, CmpInstObj_New);
- PyMac_INIT_TOOLBOX_OBJECT_CONVERT(ComponentInstance, CmpInstObj_Convert);
-
-
- m = Py_InitModule("_Cm", Cm_methods);
- d = PyModule_GetDict(m);
- Cm_Error = PyMac_GetOSErrException();
- if (Cm_Error == NULL ||
- PyDict_SetItemString(d, "Error", Cm_Error) != 0)
- return;
- ComponentInstance_Type.ob_type = &PyType_Type;
- if (PyType_Ready(&ComponentInstance_Type) < 0) return;
- Py_INCREF(&ComponentInstance_Type);
- PyModule_AddObject(m, "ComponentInstance", (PyObject *)&ComponentInstance_Type);
- /* Backward-compatible name */
- Py_INCREF(&ComponentInstance_Type);
- PyModule_AddObject(m, "ComponentInstanceType", (PyObject *)&ComponentInstance_Type);
- Component_Type.ob_type = &PyType_Type;
- if (PyType_Ready(&Component_Type) < 0) return;
- Py_INCREF(&Component_Type);
- PyModule_AddObject(m, "Component", (PyObject *)&Component_Type);
- /* Backward-compatible name */
- Py_INCREF(&Component_Type);
- PyModule_AddObject(m, "ComponentType", (PyObject *)&Component_Type);
+ PyObject *m;
+ PyObject *d;
+
+
+
+ PyMac_INIT_TOOLBOX_OBJECT_NEW(Component, CmpObj_New);
+ PyMac_INIT_TOOLBOX_OBJECT_CONVERT(Component, CmpObj_Convert);
+ PyMac_INIT_TOOLBOX_OBJECT_NEW(ComponentInstance, CmpInstObj_New);
+ PyMac_INIT_TOOLBOX_OBJECT_CONVERT(ComponentInstance, CmpInstObj_Convert);
+
+
+ m = Py_InitModule("_Cm", Cm_methods);
+ d = PyModule_GetDict(m);
+ Cm_Error = PyMac_GetOSErrException();
+ if (Cm_Error == NULL ||
+ PyDict_SetItemString(d, "Error", Cm_Error) != 0)
+ return;
+ ComponentInstance_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&ComponentInstance_Type) < 0) return;
+ Py_INCREF(&ComponentInstance_Type);
+ PyModule_AddObject(m, "ComponentInstance", (PyObject *)&ComponentInstance_Type);
+ /* Backward-compatible name */
+ Py_INCREF(&ComponentInstance_Type);
+ PyModule_AddObject(m, "ComponentInstanceType", (PyObject *)&ComponentInstance_Type);
+ Component_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&Component_Type) < 0) return;
+ Py_INCREF(&Component_Type);
+ PyModule_AddObject(m, "Component", (PyObject *)&Component_Type);
+ /* Backward-compatible name */
+ Py_INCREF(&Component_Type);
+ PyModule_AddObject(m, "ComponentType", (PyObject *)&Component_Type);
}
/* ========================= End module _Cm ========================= */
diff --git a/Mac/Modules/ctl/_Ctlmodule.c b/Mac/Modules/ctl/_Ctlmodule.c
index cdb8557..a959eb4 100644
--- a/Mac/Modules/ctl/_Ctlmodule.c
+++ b/Mac/Modules/ctl/_Ctlmodule.c
@@ -10,9 +10,9 @@
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
- PyErr_SetString(PyExc_NotImplementedError, \
- "Not available in this shared library/OS version"); \
- return NULL; \
+ PyErr_SetString(PyExc_NotImplementedError, \
+ "Not available in this shared library/OS version"); \
+ return NULL; \
}} while(0)
@@ -41,19 +41,19 @@ static PyObject *
ControlFontStyle_New(ControlFontStyleRec *itself)
{
- return Py_BuildValue("hhhhhhO&O&", itself->flags, itself->font,
- itself->size, itself->style, itself->mode, itself->just,
- QdRGB_New, &itself->foreColor, QdRGB_New, &itself->backColor);
+ return Py_BuildValue("hhhhhhO&O&", itself->flags, itself->font,
+ itself->size, itself->style, itself->mode, itself->just,
+ QdRGB_New, &itself->foreColor, QdRGB_New, &itself->backColor);
}
#endif
static int
ControlFontStyle_Convert(PyObject *v, ControlFontStyleRec *itself)
{
- return PyArg_Parse(v, "(hhhhhhO&O&)", &itself->flags,
- &itself->font, &itself->size, &itself->style, &itself->mode,
- &itself->just, QdRGB_Convert, &itself->foreColor,
- QdRGB_Convert, &itself->backColor);
+ return PyArg_Parse(v, "(hhhhhhO&O&)", &itself->flags,
+ &itself->font, &itself->size, &itself->style, &itself->mode,
+ &itself->just, QdRGB_Convert, &itself->foreColor,
+ QdRGB_Convert, &itself->backColor);
}
/*
@@ -63,13 +63,13 @@ static PyObject *
PyControlID_New(ControlID *itself)
{
- return Py_BuildValue("O&l", PyMac_BuildOSType, itself->signature, itself->id);
+ return Py_BuildValue("O&l", PyMac_BuildOSType, itself->signature, itself->id);
}
static int
PyControlID_Convert(PyObject *v, ControlID *itself)
{
- return PyArg_Parse(v, "(O&l)", PyMac_GetOSType, &itself->signature, &itself->id);
+ return PyArg_Parse(v, "(O&l)", PyMac_GetOSType, &itself->signature, &itself->id);
}
/*
@@ -78,40 +78,40 @@ PyControlID_Convert(PyObject *v, ControlID *itself)
static int
DataBrowserTableViewColumnDesc_Convert(PyObject *v, DataBrowserTableViewColumnDesc *itself)
{
- return PyArg_Parse(v, "(lO&l)",
- &itself->propertyID,
- PyMac_GetOSType, &itself->propertyType,
- &itself->propertyFlags);
+ return PyArg_Parse(v, "(lO&l)",
+ &itself->propertyID,
+ PyMac_GetOSType, &itself->propertyType,
+ &itself->propertyFlags);
}
static int
ControlButtonContentInfo_Convert(PyObject *v, ControlButtonContentInfo *itself)
{
- return PyArg_Parse(v, "(hO&)",
- &itself->contentType,
- OptResObj_Convert, &itself->u.iconSuite);
+ return PyArg_Parse(v, "(hO&)",
+ &itself->contentType,
+ OptResObj_Convert, &itself->u.iconSuite);
}
static int
DataBrowserListViewHeaderDesc_Convert(PyObject *v, DataBrowserListViewHeaderDesc *itself)
{
- itself->version = kDataBrowserListViewLatestHeaderDesc;
- return PyArg_Parse(v, "(HHhO&HO&O&)",
- &itself->minimumWidth,
- &itself->maximumWidth,
- &itself->titleOffset,
- CFStringRefObj_Convert, &itself->titleString,
- &itself->initialOrder,
- ControlFontStyle_Convert, &itself->btnFontStyle,
- ControlButtonContentInfo_Convert, &itself->btnContentInfo);
+ itself->version = kDataBrowserListViewLatestHeaderDesc;
+ return PyArg_Parse(v, "(HHhO&HO&O&)",
+ &itself->minimumWidth,
+ &itself->maximumWidth,
+ &itself->titleOffset,
+ CFStringRefObj_Convert, &itself->titleString,
+ &itself->initialOrder,
+ ControlFontStyle_Convert, &itself->btnFontStyle,
+ ControlButtonContentInfo_Convert, &itself->btnContentInfo);
}
static int
DataBrowserListViewColumnDesc_Convert(PyObject *v, DataBrowserListViewColumnDesc *itself)
{
- return PyArg_Parse(v, "(O&O&)",
- DataBrowserTableViewColumnDesc_Convert, &itself->propertyDesc,
- DataBrowserListViewHeaderDesc_Convert, &itself->headerBtnDesc);
+ return PyArg_Parse(v, "(O&O&)",
+ DataBrowserTableViewColumnDesc_Convert, &itself->propertyDesc,
+ DataBrowserListViewHeaderDesc_Convert, &itself->headerBtnDesc);
}
/* TrackControl and HandleControlClick callback support */
@@ -139,3683 +139,3683 @@ PyTypeObject Control_Type;
#define CtlObj_Check(x) ((x)->ob_type == &Control_Type || PyObject_TypeCheck((x), &Control_Type))
typedef struct ControlObject {
- PyObject_HEAD
- ControlHandle ob_itself;
- PyObject *ob_callbackdict;
+ PyObject_HEAD
+ ControlHandle ob_itself;
+ PyObject *ob_callbackdict;
} ControlObject;
PyObject *CtlObj_New(ControlHandle itself)
{
- ControlObject *it;
- if (itself == NULL) return PyMac_Error(resNotFound);
- it = PyObject_NEW(ControlObject, &Control_Type);
- if (it == NULL) return NULL;
- it->ob_itself = itself;
- SetControlReference(itself, (long)it);
- it->ob_callbackdict = NULL;
- return (PyObject *)it;
+ ControlObject *it;
+ if (itself == NULL) return PyMac_Error(resNotFound);
+ it = PyObject_NEW(ControlObject, &Control_Type);
+ if (it == NULL) return NULL;
+ it->ob_itself = itself;
+ SetControlReference(itself, (long)it);
+ it->ob_callbackdict = NULL;
+ return (PyObject *)it;
}
int CtlObj_Convert(PyObject *v, ControlHandle *p_itself)
{
- if (!CtlObj_Check(v))
- {
- PyErr_SetString(PyExc_TypeError, "Control required");
- return 0;
- }
- *p_itself = ((ControlObject *)v)->ob_itself;
- return 1;
+ if (!CtlObj_Check(v))
+ {
+ PyErr_SetString(PyExc_TypeError, "Control required");
+ return 0;
+ }
+ *p_itself = ((ControlObject *)v)->ob_itself;
+ return 1;
}
static void CtlObj_dealloc(ControlObject *self)
{
- Py_XDECREF(self->ob_callbackdict);
- if (self->ob_itself)SetControlReference(self->ob_itself, (long)0); /* Make it forget about us */
- self->ob_type->tp_free((PyObject *)self);
+ Py_XDECREF(self->ob_callbackdict);
+ if (self->ob_itself)SetControlReference(self->ob_itself, (long)0); /* Make it forget about us */
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *CtlObj_HiliteControl(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ControlPartCode hiliteState;
+ PyObject *_res = NULL;
+ ControlPartCode hiliteState;
#ifndef HiliteControl
- PyMac_PRECHECK(HiliteControl);
+ PyMac_PRECHECK(HiliteControl);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &hiliteState))
- return NULL;
- HiliteControl(_self->ob_itself,
- hiliteState);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &hiliteState))
+ return NULL;
+ HiliteControl(_self->ob_itself,
+ hiliteState);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_ShowControl(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef ShowControl
- PyMac_PRECHECK(ShowControl);
+ PyMac_PRECHECK(ShowControl);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- ShowControl(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ ShowControl(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_HideControl(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef HideControl
- PyMac_PRECHECK(HideControl);
+ PyMac_PRECHECK(HideControl);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- HideControl(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ HideControl(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_IsControlActive(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
+ PyObject *_res = NULL;
+ Boolean _rv;
#ifndef IsControlActive
- PyMac_PRECHECK(IsControlActive);
+ PyMac_PRECHECK(IsControlActive);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = IsControlActive(_self->ob_itself);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = IsControlActive(_self->ob_itself);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *CtlObj_IsControlVisible(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
+ PyObject *_res = NULL;
+ Boolean _rv;
#ifndef IsControlVisible
- PyMac_PRECHECK(IsControlVisible);
+ PyMac_PRECHECK(IsControlVisible);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = IsControlVisible(_self->ob_itself);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = IsControlVisible(_self->ob_itself);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *CtlObj_ActivateControl(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
+ PyObject *_res = NULL;
+ OSErr _err;
#ifndef ActivateControl
- PyMac_PRECHECK(ActivateControl);
+ PyMac_PRECHECK(ActivateControl);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = ActivateControl(_self->ob_itself);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = ActivateControl(_self->ob_itself);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_DeactivateControl(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
+ PyObject *_res = NULL;
+ OSErr _err;
#ifndef DeactivateControl
- PyMac_PRECHECK(DeactivateControl);
+ PyMac_PRECHECK(DeactivateControl);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = DeactivateControl(_self->ob_itself);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = DeactivateControl(_self->ob_itself);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_SetControlVisibility(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Boolean inIsVisible;
- Boolean inDoDraw;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Boolean inIsVisible;
+ Boolean inDoDraw;
#ifndef SetControlVisibility
- PyMac_PRECHECK(SetControlVisibility);
+ PyMac_PRECHECK(SetControlVisibility);
#endif
- if (!PyArg_ParseTuple(_args, "bb",
- &inIsVisible,
- &inDoDraw))
- return NULL;
- _err = SetControlVisibility(_self->ob_itself,
- inIsVisible,
- inDoDraw);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "bb",
+ &inIsVisible,
+ &inDoDraw))
+ return NULL;
+ _err = SetControlVisibility(_self->ob_itself,
+ inIsVisible,
+ inDoDraw);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_IsControlEnabled(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
+ PyObject *_res = NULL;
+ Boolean _rv;
#ifndef IsControlEnabled
- PyMac_PRECHECK(IsControlEnabled);
+ PyMac_PRECHECK(IsControlEnabled);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = IsControlEnabled(_self->ob_itself);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = IsControlEnabled(_self->ob_itself);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *CtlObj_EnableControl(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
+ PyObject *_res = NULL;
+ OSStatus _err;
#ifndef EnableControl
- PyMac_PRECHECK(EnableControl);
+ PyMac_PRECHECK(EnableControl);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = EnableControl(_self->ob_itself);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = EnableControl(_self->ob_itself);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_DisableControl(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
+ PyObject *_res = NULL;
+ OSStatus _err;
#ifndef DisableControl
- PyMac_PRECHECK(DisableControl);
+ PyMac_PRECHECK(DisableControl);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = DisableControl(_self->ob_itself);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = DisableControl(_self->ob_itself);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_Draw1Control(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef Draw1Control
- PyMac_PRECHECK(Draw1Control);
+ PyMac_PRECHECK(Draw1Control);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- Draw1Control(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ Draw1Control(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_GetBestControlRect(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Rect outRect;
- SInt16 outBaseLineOffset;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Rect outRect;
+ SInt16 outBaseLineOffset;
#ifndef GetBestControlRect
- PyMac_PRECHECK(GetBestControlRect);
+ PyMac_PRECHECK(GetBestControlRect);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetBestControlRect(_self->ob_itself,
- &outRect,
- &outBaseLineOffset);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&h",
- PyMac_BuildRect, &outRect,
- outBaseLineOffset);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetBestControlRect(_self->ob_itself,
+ &outRect,
+ &outBaseLineOffset);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&h",
+ PyMac_BuildRect, &outRect,
+ outBaseLineOffset);
+ return _res;
}
static PyObject *CtlObj_SetControlFontStyle(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- ControlFontStyleRec inStyle;
+ PyObject *_res = NULL;
+ OSErr _err;
+ ControlFontStyleRec inStyle;
#ifndef SetControlFontStyle
- PyMac_PRECHECK(SetControlFontStyle);
+ PyMac_PRECHECK(SetControlFontStyle);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ControlFontStyle_Convert, &inStyle))
- return NULL;
- _err = SetControlFontStyle(_self->ob_itself,
- &inStyle);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ControlFontStyle_Convert, &inStyle))
+ return NULL;
+ _err = SetControlFontStyle(_self->ob_itself,
+ &inStyle);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_DrawControlInCurrentPort(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef DrawControlInCurrentPort
- PyMac_PRECHECK(DrawControlInCurrentPort);
+ PyMac_PRECHECK(DrawControlInCurrentPort);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- DrawControlInCurrentPort(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ DrawControlInCurrentPort(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_SetUpControlBackground(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- SInt16 inDepth;
- Boolean inIsColorDevice;
+ PyObject *_res = NULL;
+ OSErr _err;
+ SInt16 inDepth;
+ Boolean inIsColorDevice;
#ifndef SetUpControlBackground
- PyMac_PRECHECK(SetUpControlBackground);
+ PyMac_PRECHECK(SetUpControlBackground);
#endif
- if (!PyArg_ParseTuple(_args, "hb",
- &inDepth,
- &inIsColorDevice))
- return NULL;
- _err = SetUpControlBackground(_self->ob_itself,
- inDepth,
- inIsColorDevice);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "hb",
+ &inDepth,
+ &inIsColorDevice))
+ return NULL;
+ _err = SetUpControlBackground(_self->ob_itself,
+ inDepth,
+ inIsColorDevice);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_SetUpControlTextColor(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- SInt16 inDepth;
- Boolean inIsColorDevice;
+ PyObject *_res = NULL;
+ OSErr _err;
+ SInt16 inDepth;
+ Boolean inIsColorDevice;
#ifndef SetUpControlTextColor
- PyMac_PRECHECK(SetUpControlTextColor);
+ PyMac_PRECHECK(SetUpControlTextColor);
#endif
- if (!PyArg_ParseTuple(_args, "hb",
- &inDepth,
- &inIsColorDevice))
- return NULL;
- _err = SetUpControlTextColor(_self->ob_itself,
- inDepth,
- inIsColorDevice);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "hb",
+ &inDepth,
+ &inIsColorDevice))
+ return NULL;
+ _err = SetUpControlTextColor(_self->ob_itself,
+ inDepth,
+ inIsColorDevice);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_DragControl(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Point startPoint;
- Rect limitRect;
- Rect slopRect;
- DragConstraint axis;
+ PyObject *_res = NULL;
+ Point startPoint;
+ Rect limitRect;
+ Rect slopRect;
+ DragConstraint axis;
#ifndef DragControl
- PyMac_PRECHECK(DragControl);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&H",
- PyMac_GetPoint, &startPoint,
- PyMac_GetRect, &limitRect,
- PyMac_GetRect, &slopRect,
- &axis))
- return NULL;
- DragControl(_self->ob_itself,
- startPoint,
- &limitRect,
- &slopRect,
- axis);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(DragControl);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&H",
+ PyMac_GetPoint, &startPoint,
+ PyMac_GetRect, &limitRect,
+ PyMac_GetRect, &slopRect,
+ &axis))
+ return NULL;
+ DragControl(_self->ob_itself,
+ startPoint,
+ &limitRect,
+ &slopRect,
+ axis);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_TestControl(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ControlPartCode _rv;
- Point testPoint;
+ PyObject *_res = NULL;
+ ControlPartCode _rv;
+ Point testPoint;
#ifndef TestControl
- PyMac_PRECHECK(TestControl);
+ PyMac_PRECHECK(TestControl);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetPoint, &testPoint))
- return NULL;
- _rv = TestControl(_self->ob_itself,
- testPoint);
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetPoint, &testPoint))
+ return NULL;
+ _rv = TestControl(_self->ob_itself,
+ testPoint);
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *CtlObj_HandleControlContextualMenuClick(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- Point inWhere;
- Boolean menuDisplayed;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Point inWhere;
+ Boolean menuDisplayed;
#ifndef HandleControlContextualMenuClick
- PyMac_PRECHECK(HandleControlContextualMenuClick);
+ PyMac_PRECHECK(HandleControlContextualMenuClick);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetPoint, &inWhere))
- return NULL;
- _err = HandleControlContextualMenuClick(_self->ob_itself,
- inWhere,
- &menuDisplayed);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("b",
- menuDisplayed);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetPoint, &inWhere))
+ return NULL;
+ _err = HandleControlContextualMenuClick(_self->ob_itself,
+ inWhere,
+ &menuDisplayed);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("b",
+ menuDisplayed);
+ return _res;
}
static PyObject *CtlObj_GetControlClickActivation(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- Point inWhere;
- EventModifiers inModifiers;
- ClickActivationResult outResult;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Point inWhere;
+ EventModifiers inModifiers;
+ ClickActivationResult outResult;
#ifndef GetControlClickActivation
- PyMac_PRECHECK(GetControlClickActivation);
-#endif
- if (!PyArg_ParseTuple(_args, "O&H",
- PyMac_GetPoint, &inWhere,
- &inModifiers))
- return NULL;
- _err = GetControlClickActivation(_self->ob_itself,
- inWhere,
- inModifiers,
- &outResult);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- outResult);
- return _res;
+ PyMac_PRECHECK(GetControlClickActivation);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&H",
+ PyMac_GetPoint, &inWhere,
+ &inModifiers))
+ return NULL;
+ _err = GetControlClickActivation(_self->ob_itself,
+ inWhere,
+ inModifiers,
+ &outResult);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ outResult);
+ return _res;
}
static PyObject *CtlObj_HandleControlKey(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ControlPartCode _rv;
- SInt16 inKeyCode;
- SInt16 inCharCode;
- EventModifiers inModifiers;
+ PyObject *_res = NULL;
+ ControlPartCode _rv;
+ SInt16 inKeyCode;
+ SInt16 inCharCode;
+ EventModifiers inModifiers;
#ifndef HandleControlKey
- PyMac_PRECHECK(HandleControlKey);
-#endif
- if (!PyArg_ParseTuple(_args, "hhH",
- &inKeyCode,
- &inCharCode,
- &inModifiers))
- return NULL;
- _rv = HandleControlKey(_self->ob_itself,
- inKeyCode,
- inCharCode,
- inModifiers);
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ PyMac_PRECHECK(HandleControlKey);
+#endif
+ if (!PyArg_ParseTuple(_args, "hhH",
+ &inKeyCode,
+ &inCharCode,
+ &inModifiers))
+ return NULL;
+ _rv = HandleControlKey(_self->ob_itself,
+ inKeyCode,
+ inCharCode,
+ inModifiers);
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *CtlObj_HandleControlSetCursor(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- Point localPoint;
- EventModifiers modifiers;
- Boolean cursorWasSet;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Point localPoint;
+ EventModifiers modifiers;
+ Boolean cursorWasSet;
#ifndef HandleControlSetCursor
- PyMac_PRECHECK(HandleControlSetCursor);
-#endif
- if (!PyArg_ParseTuple(_args, "O&H",
- PyMac_GetPoint, &localPoint,
- &modifiers))
- return NULL;
- _err = HandleControlSetCursor(_self->ob_itself,
- localPoint,
- modifiers,
- &cursorWasSet);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("b",
- cursorWasSet);
- return _res;
+ PyMac_PRECHECK(HandleControlSetCursor);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&H",
+ PyMac_GetPoint, &localPoint,
+ &modifiers))
+ return NULL;
+ _err = HandleControlSetCursor(_self->ob_itself,
+ localPoint,
+ modifiers,
+ &cursorWasSet);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("b",
+ cursorWasSet);
+ return _res;
}
static PyObject *CtlObj_MoveControl(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- SInt16 h;
- SInt16 v;
+ PyObject *_res = NULL;
+ SInt16 h;
+ SInt16 v;
#ifndef MoveControl
- PyMac_PRECHECK(MoveControl);
+ PyMac_PRECHECK(MoveControl);
#endif
- if (!PyArg_ParseTuple(_args, "hh",
- &h,
- &v))
- return NULL;
- MoveControl(_self->ob_itself,
- h,
- v);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "hh",
+ &h,
+ &v))
+ return NULL;
+ MoveControl(_self->ob_itself,
+ h,
+ v);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_SizeControl(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- SInt16 w;
- SInt16 h;
+ PyObject *_res = NULL;
+ SInt16 w;
+ SInt16 h;
#ifndef SizeControl
- PyMac_PRECHECK(SizeControl);
+ PyMac_PRECHECK(SizeControl);
#endif
- if (!PyArg_ParseTuple(_args, "hh",
- &w,
- &h))
- return NULL;
- SizeControl(_self->ob_itself,
- w,
- h);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "hh",
+ &w,
+ &h))
+ return NULL;
+ SizeControl(_self->ob_itself,
+ w,
+ h);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_SetControlTitle(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Str255 title;
+ PyObject *_res = NULL;
+ Str255 title;
#ifndef SetControlTitle
- PyMac_PRECHECK(SetControlTitle);
+ PyMac_PRECHECK(SetControlTitle);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetStr255, title))
- return NULL;
- SetControlTitle(_self->ob_itself,
- title);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetStr255, title))
+ return NULL;
+ SetControlTitle(_self->ob_itself,
+ title);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_GetControlTitle(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Str255 title;
+ PyObject *_res = NULL;
+ Str255 title;
#ifndef GetControlTitle
- PyMac_PRECHECK(GetControlTitle);
+ PyMac_PRECHECK(GetControlTitle);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- GetControlTitle(_self->ob_itself,
- title);
- _res = Py_BuildValue("O&",
- PyMac_BuildStr255, title);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ GetControlTitle(_self->ob_itself,
+ title);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildStr255, title);
+ return _res;
}
static PyObject *CtlObj_SetControlTitleWithCFString(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- CFStringRef inString;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ CFStringRef inString;
#ifndef SetControlTitleWithCFString
- PyMac_PRECHECK(SetControlTitleWithCFString);
+ PyMac_PRECHECK(SetControlTitleWithCFString);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CFStringRefObj_Convert, &inString))
- return NULL;
- _err = SetControlTitleWithCFString(_self->ob_itself,
- inString);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CFStringRefObj_Convert, &inString))
+ return NULL;
+ _err = SetControlTitleWithCFString(_self->ob_itself,
+ inString);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_CopyControlTitleAsCFString(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- CFStringRef outString;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ CFStringRef outString;
#ifndef CopyControlTitleAsCFString
- PyMac_PRECHECK(CopyControlTitleAsCFString);
+ PyMac_PRECHECK(CopyControlTitleAsCFString);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = CopyControlTitleAsCFString(_self->ob_itself,
- &outString);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- CFStringRefObj_New, outString);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = CopyControlTitleAsCFString(_self->ob_itself,
+ &outString);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ CFStringRefObj_New, outString);
+ return _res;
}
static PyObject *CtlObj_GetControlValue(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- SInt16 _rv;
+ PyObject *_res = NULL;
+ SInt16 _rv;
#ifndef GetControlValue
- PyMac_PRECHECK(GetControlValue);
+ PyMac_PRECHECK(GetControlValue);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetControlValue(_self->ob_itself);
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetControlValue(_self->ob_itself);
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *CtlObj_SetControlValue(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- SInt16 newValue;
+ PyObject *_res = NULL;
+ SInt16 newValue;
#ifndef SetControlValue
- PyMac_PRECHECK(SetControlValue);
+ PyMac_PRECHECK(SetControlValue);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &newValue))
- return NULL;
- SetControlValue(_self->ob_itself,
- newValue);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &newValue))
+ return NULL;
+ SetControlValue(_self->ob_itself,
+ newValue);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_GetControlMinimum(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- SInt16 _rv;
+ PyObject *_res = NULL;
+ SInt16 _rv;
#ifndef GetControlMinimum
- PyMac_PRECHECK(GetControlMinimum);
+ PyMac_PRECHECK(GetControlMinimum);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetControlMinimum(_self->ob_itself);
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetControlMinimum(_self->ob_itself);
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *CtlObj_SetControlMinimum(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- SInt16 newMinimum;
+ PyObject *_res = NULL;
+ SInt16 newMinimum;
#ifndef SetControlMinimum
- PyMac_PRECHECK(SetControlMinimum);
+ PyMac_PRECHECK(SetControlMinimum);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &newMinimum))
- return NULL;
- SetControlMinimum(_self->ob_itself,
- newMinimum);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &newMinimum))
+ return NULL;
+ SetControlMinimum(_self->ob_itself,
+ newMinimum);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_GetControlMaximum(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- SInt16 _rv;
+ PyObject *_res = NULL;
+ SInt16 _rv;
#ifndef GetControlMaximum
- PyMac_PRECHECK(GetControlMaximum);
+ PyMac_PRECHECK(GetControlMaximum);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetControlMaximum(_self->ob_itself);
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetControlMaximum(_self->ob_itself);
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *CtlObj_SetControlMaximum(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- SInt16 newMaximum;
+ PyObject *_res = NULL;
+ SInt16 newMaximum;
#ifndef SetControlMaximum
- PyMac_PRECHECK(SetControlMaximum);
+ PyMac_PRECHECK(SetControlMaximum);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &newMaximum))
- return NULL;
- SetControlMaximum(_self->ob_itself,
- newMaximum);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &newMaximum))
+ return NULL;
+ SetControlMaximum(_self->ob_itself,
+ newMaximum);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_GetControlViewSize(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- SInt32 _rv;
+ PyObject *_res = NULL;
+ SInt32 _rv;
#ifndef GetControlViewSize
- PyMac_PRECHECK(GetControlViewSize);
+ PyMac_PRECHECK(GetControlViewSize);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetControlViewSize(_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetControlViewSize(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *CtlObj_SetControlViewSize(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- SInt32 newViewSize;
+ PyObject *_res = NULL;
+ SInt32 newViewSize;
#ifndef SetControlViewSize
- PyMac_PRECHECK(SetControlViewSize);
+ PyMac_PRECHECK(SetControlViewSize);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &newViewSize))
- return NULL;
- SetControlViewSize(_self->ob_itself,
- newViewSize);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &newViewSize))
+ return NULL;
+ SetControlViewSize(_self->ob_itself,
+ newViewSize);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_GetControl32BitValue(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- SInt32 _rv;
+ PyObject *_res = NULL;
+ SInt32 _rv;
#ifndef GetControl32BitValue
- PyMac_PRECHECK(GetControl32BitValue);
+ PyMac_PRECHECK(GetControl32BitValue);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetControl32BitValue(_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetControl32BitValue(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *CtlObj_SetControl32BitValue(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- SInt32 newValue;
+ PyObject *_res = NULL;
+ SInt32 newValue;
#ifndef SetControl32BitValue
- PyMac_PRECHECK(SetControl32BitValue);
+ PyMac_PRECHECK(SetControl32BitValue);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &newValue))
- return NULL;
- SetControl32BitValue(_self->ob_itself,
- newValue);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &newValue))
+ return NULL;
+ SetControl32BitValue(_self->ob_itself,
+ newValue);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_GetControl32BitMaximum(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- SInt32 _rv;
+ PyObject *_res = NULL;
+ SInt32 _rv;
#ifndef GetControl32BitMaximum
- PyMac_PRECHECK(GetControl32BitMaximum);
+ PyMac_PRECHECK(GetControl32BitMaximum);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetControl32BitMaximum(_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetControl32BitMaximum(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *CtlObj_SetControl32BitMaximum(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- SInt32 newMaximum;
+ PyObject *_res = NULL;
+ SInt32 newMaximum;
#ifndef SetControl32BitMaximum
- PyMac_PRECHECK(SetControl32BitMaximum);
+ PyMac_PRECHECK(SetControl32BitMaximum);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &newMaximum))
- return NULL;
- SetControl32BitMaximum(_self->ob_itself,
- newMaximum);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &newMaximum))
+ return NULL;
+ SetControl32BitMaximum(_self->ob_itself,
+ newMaximum);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_GetControl32BitMinimum(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- SInt32 _rv;
+ PyObject *_res = NULL;
+ SInt32 _rv;
#ifndef GetControl32BitMinimum
- PyMac_PRECHECK(GetControl32BitMinimum);
+ PyMac_PRECHECK(GetControl32BitMinimum);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetControl32BitMinimum(_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetControl32BitMinimum(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *CtlObj_SetControl32BitMinimum(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- SInt32 newMinimum;
+ PyObject *_res = NULL;
+ SInt32 newMinimum;
#ifndef SetControl32BitMinimum
- PyMac_PRECHECK(SetControl32BitMinimum);
+ PyMac_PRECHECK(SetControl32BitMinimum);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &newMinimum))
- return NULL;
- SetControl32BitMinimum(_self->ob_itself,
- newMinimum);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &newMinimum))
+ return NULL;
+ SetControl32BitMinimum(_self->ob_itself,
+ newMinimum);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_IsValidControlHandle(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
+ PyObject *_res = NULL;
+ Boolean _rv;
#ifndef IsValidControlHandle
- PyMac_PRECHECK(IsValidControlHandle);
+ PyMac_PRECHECK(IsValidControlHandle);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = IsValidControlHandle(_self->ob_itself);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = IsValidControlHandle(_self->ob_itself);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *CtlObj_SetControlID(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- ControlID inID;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ ControlID inID;
#ifndef SetControlID
- PyMac_PRECHECK(SetControlID);
+ PyMac_PRECHECK(SetControlID);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyControlID_Convert, &inID))
- return NULL;
- _err = SetControlID(_self->ob_itself,
- &inID);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyControlID_Convert, &inID))
+ return NULL;
+ _err = SetControlID(_self->ob_itself,
+ &inID);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_GetControlID(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- ControlID outID;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ ControlID outID;
#ifndef GetControlID
- PyMac_PRECHECK(GetControlID);
+ PyMac_PRECHECK(GetControlID);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetControlID(_self->ob_itself,
- &outID);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- PyControlID_New, &outID);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetControlID(_self->ob_itself,
+ &outID);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ PyControlID_New, &outID);
+ return _res;
}
static PyObject *CtlObj_SetControlCommandID(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- UInt32 inCommandID;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ UInt32 inCommandID;
#ifndef SetControlCommandID
- PyMac_PRECHECK(SetControlCommandID);
+ PyMac_PRECHECK(SetControlCommandID);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &inCommandID))
- return NULL;
- _err = SetControlCommandID(_self->ob_itself,
- inCommandID);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &inCommandID))
+ return NULL;
+ _err = SetControlCommandID(_self->ob_itself,
+ inCommandID);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_GetControlCommandID(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- UInt32 outCommandID;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ UInt32 outCommandID;
#ifndef GetControlCommandID
- PyMac_PRECHECK(GetControlCommandID);
+ PyMac_PRECHECK(GetControlCommandID);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetControlCommandID(_self->ob_itself,
- &outCommandID);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- outCommandID);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetControlCommandID(_self->ob_itself,
+ &outCommandID);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ outCommandID);
+ return _res;
}
static PyObject *CtlObj_RemoveControlProperty(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- OSType propertyCreator;
- OSType propertyTag;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ OSType propertyCreator;
+ OSType propertyTag;
#ifndef RemoveControlProperty
- PyMac_PRECHECK(RemoveControlProperty);
+ PyMac_PRECHECK(RemoveControlProperty);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- PyMac_GetOSType, &propertyCreator,
- PyMac_GetOSType, &propertyTag))
- return NULL;
- _err = RemoveControlProperty(_self->ob_itself,
- propertyCreator,
- propertyTag);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ PyMac_GetOSType, &propertyCreator,
+ PyMac_GetOSType, &propertyTag))
+ return NULL;
+ _err = RemoveControlProperty(_self->ob_itself,
+ propertyCreator,
+ propertyTag);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_GetControlPropertyAttributes(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- OSType propertyCreator;
- OSType propertyTag;
- UInt32 attributes;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ OSType propertyCreator;
+ OSType propertyTag;
+ UInt32 attributes;
#ifndef GetControlPropertyAttributes
- PyMac_PRECHECK(GetControlPropertyAttributes);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- PyMac_GetOSType, &propertyCreator,
- PyMac_GetOSType, &propertyTag))
- return NULL;
- _err = GetControlPropertyAttributes(_self->ob_itself,
- propertyCreator,
- propertyTag,
- &attributes);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- attributes);
- return _res;
+ PyMac_PRECHECK(GetControlPropertyAttributes);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ PyMac_GetOSType, &propertyCreator,
+ PyMac_GetOSType, &propertyTag))
+ return NULL;
+ _err = GetControlPropertyAttributes(_self->ob_itself,
+ propertyCreator,
+ propertyTag,
+ &attributes);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ attributes);
+ return _res;
}
static PyObject *CtlObj_ChangeControlPropertyAttributes(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- OSType propertyCreator;
- OSType propertyTag;
- UInt32 attributesToSet;
- UInt32 attributesToClear;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ OSType propertyCreator;
+ OSType propertyTag;
+ UInt32 attributesToSet;
+ UInt32 attributesToClear;
#ifndef ChangeControlPropertyAttributes
- PyMac_PRECHECK(ChangeControlPropertyAttributes);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&ll",
- PyMac_GetOSType, &propertyCreator,
- PyMac_GetOSType, &propertyTag,
- &attributesToSet,
- &attributesToClear))
- return NULL;
- _err = ChangeControlPropertyAttributes(_self->ob_itself,
- propertyCreator,
- propertyTag,
- attributesToSet,
- attributesToClear);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(ChangeControlPropertyAttributes);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&ll",
+ PyMac_GetOSType, &propertyCreator,
+ PyMac_GetOSType, &propertyTag,
+ &attributesToSet,
+ &attributesToClear))
+ return NULL;
+ _err = ChangeControlPropertyAttributes(_self->ob_itself,
+ propertyCreator,
+ propertyTag,
+ attributesToSet,
+ attributesToClear);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_GetControlRegion(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- ControlPartCode inPart;
- RgnHandle outRegion;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ ControlPartCode inPart;
+ RgnHandle outRegion;
#ifndef GetControlRegion
- PyMac_PRECHECK(GetControlRegion);
+ PyMac_PRECHECK(GetControlRegion);
#endif
- if (!PyArg_ParseTuple(_args, "hO&",
- &inPart,
- ResObj_Convert, &outRegion))
- return NULL;
- _err = GetControlRegion(_self->ob_itself,
- inPart,
- outRegion);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "hO&",
+ &inPart,
+ ResObj_Convert, &outRegion))
+ return NULL;
+ _err = GetControlRegion(_self->ob_itself,
+ inPart,
+ outRegion);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_GetControlVariant(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ControlVariant _rv;
+ PyObject *_res = NULL;
+ ControlVariant _rv;
#ifndef GetControlVariant
- PyMac_PRECHECK(GetControlVariant);
+ PyMac_PRECHECK(GetControlVariant);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetControlVariant(_self->ob_itself);
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetControlVariant(_self->ob_itself);
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *CtlObj_SetControlAction(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- PyObject* actionProc;
- UniversalProcPtr c_callback;
+ PyObject *_res = NULL;
+ PyObject* actionProc;
+ UniversalProcPtr c_callback;
#ifndef SetControlAction
- PyMac_PRECHECK(SetControlAction);
+ PyMac_PRECHECK(SetControlAction);
#endif
- if (!PyArg_ParseTuple(_args, "O",
- &actionProc))
- return NULL;
- SetControlAction(_self->ob_itself,
- myactionproc_upp);
- Py_INCREF(Py_None);
- _res = Py_None;
- setcallback((PyObject*)_self, kMyControlActionProcTag, actionProc, &c_callback);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O",
+ &actionProc))
+ return NULL;
+ SetControlAction(_self->ob_itself,
+ myactionproc_upp);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ setcallback((PyObject*)_self, kMyControlActionProcTag, actionProc, &c_callback);
+ return _res;
}
static PyObject *CtlObj_SetControlReference(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- SInt32 data;
+ PyObject *_res = NULL;
+ SInt32 data;
#ifndef SetControlReference
- PyMac_PRECHECK(SetControlReference);
+ PyMac_PRECHECK(SetControlReference);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &data))
- return NULL;
- SetControlReference(_self->ob_itself,
- data);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &data))
+ return NULL;
+ SetControlReference(_self->ob_itself,
+ data);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_GetControlReference(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- SInt32 _rv;
+ PyObject *_res = NULL;
+ SInt32 _rv;
#ifndef GetControlReference
- PyMac_PRECHECK(GetControlReference);
+ PyMac_PRECHECK(GetControlReference);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetControlReference(_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetControlReference(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *CtlObj_EmbedControl(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- ControlHandle inContainer;
+ PyObject *_res = NULL;
+ OSErr _err;
+ ControlHandle inContainer;
#ifndef EmbedControl
- PyMac_PRECHECK(EmbedControl);
+ PyMac_PRECHECK(EmbedControl);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CtlObj_Convert, &inContainer))
- return NULL;
- _err = EmbedControl(_self->ob_itself,
- inContainer);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CtlObj_Convert, &inContainer))
+ return NULL;
+ _err = EmbedControl(_self->ob_itself,
+ inContainer);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_AutoEmbedControl(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- WindowPtr inWindow;
+ PyObject *_res = NULL;
+ OSErr _err;
+ WindowPtr inWindow;
#ifndef AutoEmbedControl
- PyMac_PRECHECK(AutoEmbedControl);
+ PyMac_PRECHECK(AutoEmbedControl);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- WinObj_Convert, &inWindow))
- return NULL;
- _err = AutoEmbedControl(_self->ob_itself,
- inWindow);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ WinObj_Convert, &inWindow))
+ return NULL;
+ _err = AutoEmbedControl(_self->ob_itself,
+ inWindow);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_GetSuperControl(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- ControlHandle outParent;
+ PyObject *_res = NULL;
+ OSErr _err;
+ ControlHandle outParent;
#ifndef GetSuperControl
- PyMac_PRECHECK(GetSuperControl);
+ PyMac_PRECHECK(GetSuperControl);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetSuperControl(_self->ob_itself,
- &outParent);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- CtlObj_WhichControl, outParent);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetSuperControl(_self->ob_itself,
+ &outParent);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ CtlObj_WhichControl, outParent);
+ return _res;
}
static PyObject *CtlObj_CountSubControls(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- UInt16 outNumChildren;
+ PyObject *_res = NULL;
+ OSErr _err;
+ UInt16 outNumChildren;
#ifndef CountSubControls
- PyMac_PRECHECK(CountSubControls);
+ PyMac_PRECHECK(CountSubControls);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = CountSubControls(_self->ob_itself,
- &outNumChildren);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("H",
- outNumChildren);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = CountSubControls(_self->ob_itself,
+ &outNumChildren);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("H",
+ outNumChildren);
+ return _res;
}
static PyObject *CtlObj_GetIndexedSubControl(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- UInt16 inIndex;
- ControlHandle outSubControl;
+ PyObject *_res = NULL;
+ OSErr _err;
+ UInt16 inIndex;
+ ControlHandle outSubControl;
#ifndef GetIndexedSubControl
- PyMac_PRECHECK(GetIndexedSubControl);
+ PyMac_PRECHECK(GetIndexedSubControl);
#endif
- if (!PyArg_ParseTuple(_args, "H",
- &inIndex))
- return NULL;
- _err = GetIndexedSubControl(_self->ob_itself,
- inIndex,
- &outSubControl);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- CtlObj_WhichControl, outSubControl);
- return _res;
+ if (!PyArg_ParseTuple(_args, "H",
+ &inIndex))
+ return NULL;
+ _err = GetIndexedSubControl(_self->ob_itself,
+ inIndex,
+ &outSubControl);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ CtlObj_WhichControl, outSubControl);
+ return _res;
}
static PyObject *CtlObj_SetControlSupervisor(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- ControlHandle inBoss;
+ PyObject *_res = NULL;
+ OSErr _err;
+ ControlHandle inBoss;
#ifndef SetControlSupervisor
- PyMac_PRECHECK(SetControlSupervisor);
+ PyMac_PRECHECK(SetControlSupervisor);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CtlObj_Convert, &inBoss))
- return NULL;
- _err = SetControlSupervisor(_self->ob_itself,
- inBoss);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CtlObj_Convert, &inBoss))
+ return NULL;
+ _err = SetControlSupervisor(_self->ob_itself,
+ inBoss);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_GetControlFeatures(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- UInt32 outFeatures;
+ PyObject *_res = NULL;
+ OSErr _err;
+ UInt32 outFeatures;
#ifndef GetControlFeatures
- PyMac_PRECHECK(GetControlFeatures);
+ PyMac_PRECHECK(GetControlFeatures);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetControlFeatures(_self->ob_itself,
- &outFeatures);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- outFeatures);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetControlFeatures(_self->ob_itself,
+ &outFeatures);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ outFeatures);
+ return _res;
}
static PyObject *CtlObj_GetControlDataSize(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- ControlPartCode inPart;
- ResType inTagName;
- Size outMaxSize;
+ PyObject *_res = NULL;
+ OSErr _err;
+ ControlPartCode inPart;
+ ResType inTagName;
+ Size outMaxSize;
#ifndef GetControlDataSize
- PyMac_PRECHECK(GetControlDataSize);
-#endif
- if (!PyArg_ParseTuple(_args, "hO&",
- &inPart,
- PyMac_GetOSType, &inTagName))
- return NULL;
- _err = GetControlDataSize(_self->ob_itself,
- inPart,
- inTagName,
- &outMaxSize);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- outMaxSize);
- return _res;
+ PyMac_PRECHECK(GetControlDataSize);
+#endif
+ if (!PyArg_ParseTuple(_args, "hO&",
+ &inPart,
+ PyMac_GetOSType, &inTagName))
+ return NULL;
+ _err = GetControlDataSize(_self->ob_itself,
+ inPart,
+ inTagName,
+ &outMaxSize);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ outMaxSize);
+ return _res;
}
static PyObject *CtlObj_HandleControlDragTracking(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- DragTrackingMessage inMessage;
- DragReference inDrag;
- Boolean outLikesDrag;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ DragTrackingMessage inMessage;
+ DragReference inDrag;
+ Boolean outLikesDrag;
#ifndef HandleControlDragTracking
- PyMac_PRECHECK(HandleControlDragTracking);
-#endif
- if (!PyArg_ParseTuple(_args, "hO&",
- &inMessage,
- DragObj_Convert, &inDrag))
- return NULL;
- _err = HandleControlDragTracking(_self->ob_itself,
- inMessage,
- inDrag,
- &outLikesDrag);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("b",
- outLikesDrag);
- return _res;
+ PyMac_PRECHECK(HandleControlDragTracking);
+#endif
+ if (!PyArg_ParseTuple(_args, "hO&",
+ &inMessage,
+ DragObj_Convert, &inDrag))
+ return NULL;
+ _err = HandleControlDragTracking(_self->ob_itself,
+ inMessage,
+ inDrag,
+ &outLikesDrag);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("b",
+ outLikesDrag);
+ return _res;
}
static PyObject *CtlObj_HandleControlDragReceive(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- DragReference inDrag;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ DragReference inDrag;
#ifndef HandleControlDragReceive
- PyMac_PRECHECK(HandleControlDragReceive);
+ PyMac_PRECHECK(HandleControlDragReceive);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- DragObj_Convert, &inDrag))
- return NULL;
- _err = HandleControlDragReceive(_self->ob_itself,
- inDrag);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ DragObj_Convert, &inDrag))
+ return NULL;
+ _err = HandleControlDragReceive(_self->ob_itself,
+ inDrag);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_SetControlDragTrackingEnabled(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- Boolean inTracks;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Boolean inTracks;
#ifndef SetControlDragTrackingEnabled
- PyMac_PRECHECK(SetControlDragTrackingEnabled);
+ PyMac_PRECHECK(SetControlDragTrackingEnabled);
#endif
- if (!PyArg_ParseTuple(_args, "b",
- &inTracks))
- return NULL;
- _err = SetControlDragTrackingEnabled(_self->ob_itself,
- inTracks);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "b",
+ &inTracks))
+ return NULL;
+ _err = SetControlDragTrackingEnabled(_self->ob_itself,
+ inTracks);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_IsControlDragTrackingEnabled(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- Boolean outTracks;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Boolean outTracks;
#ifndef IsControlDragTrackingEnabled
- PyMac_PRECHECK(IsControlDragTrackingEnabled);
+ PyMac_PRECHECK(IsControlDragTrackingEnabled);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = IsControlDragTrackingEnabled(_self->ob_itself,
- &outTracks);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("b",
- outTracks);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = IsControlDragTrackingEnabled(_self->ob_itself,
+ &outTracks);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("b",
+ outTracks);
+ return _res;
}
static PyObject *CtlObj_GetControlBounds(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Rect bounds;
+ PyObject *_res = NULL;
+ Rect bounds;
#ifndef GetControlBounds
- PyMac_PRECHECK(GetControlBounds);
+ PyMac_PRECHECK(GetControlBounds);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- GetControlBounds(_self->ob_itself,
- &bounds);
- _res = Py_BuildValue("O&",
- PyMac_BuildRect, &bounds);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ GetControlBounds(_self->ob_itself,
+ &bounds);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildRect, &bounds);
+ return _res;
}
static PyObject *CtlObj_IsControlHilited(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
+ PyObject *_res = NULL;
+ Boolean _rv;
#ifndef IsControlHilited
- PyMac_PRECHECK(IsControlHilited);
+ PyMac_PRECHECK(IsControlHilited);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = IsControlHilited(_self->ob_itself);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = IsControlHilited(_self->ob_itself);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *CtlObj_GetControlHilite(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- UInt16 _rv;
+ PyObject *_res = NULL;
+ UInt16 _rv;
#ifndef GetControlHilite
- PyMac_PRECHECK(GetControlHilite);
+ PyMac_PRECHECK(GetControlHilite);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetControlHilite(_self->ob_itself);
- _res = Py_BuildValue("H",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetControlHilite(_self->ob_itself);
+ _res = Py_BuildValue("H",
+ _rv);
+ return _res;
}
static PyObject *CtlObj_GetControlOwner(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- WindowPtr _rv;
+ PyObject *_res = NULL;
+ WindowPtr _rv;
#ifndef GetControlOwner
- PyMac_PRECHECK(GetControlOwner);
+ PyMac_PRECHECK(GetControlOwner);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetControlOwner(_self->ob_itself);
- _res = Py_BuildValue("O&",
- WinObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetControlOwner(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ WinObj_New, _rv);
+ return _res;
}
static PyObject *CtlObj_GetControlDataHandle(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Handle _rv;
+ PyObject *_res = NULL;
+ Handle _rv;
#ifndef GetControlDataHandle
- PyMac_PRECHECK(GetControlDataHandle);
+ PyMac_PRECHECK(GetControlDataHandle);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetControlDataHandle(_self->ob_itself);
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetControlDataHandle(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *CtlObj_GetControlPopupMenuHandle(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- MenuHandle _rv;
+ PyObject *_res = NULL;
+ MenuHandle _rv;
#ifndef GetControlPopupMenuHandle
- PyMac_PRECHECK(GetControlPopupMenuHandle);
+ PyMac_PRECHECK(GetControlPopupMenuHandle);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetControlPopupMenuHandle(_self->ob_itself);
- _res = Py_BuildValue("O&",
- MenuObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetControlPopupMenuHandle(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ MenuObj_New, _rv);
+ return _res;
}
static PyObject *CtlObj_GetControlPopupMenuID(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short _rv;
+ PyObject *_res = NULL;
+ short _rv;
#ifndef GetControlPopupMenuID
- PyMac_PRECHECK(GetControlPopupMenuID);
+ PyMac_PRECHECK(GetControlPopupMenuID);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetControlPopupMenuID(_self->ob_itself);
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetControlPopupMenuID(_self->ob_itself);
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *CtlObj_SetControlDataHandle(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Handle dataHandle;
+ PyObject *_res = NULL;
+ Handle dataHandle;
#ifndef SetControlDataHandle
- PyMac_PRECHECK(SetControlDataHandle);
+ PyMac_PRECHECK(SetControlDataHandle);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &dataHandle))
- return NULL;
- SetControlDataHandle(_self->ob_itself,
- dataHandle);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &dataHandle))
+ return NULL;
+ SetControlDataHandle(_self->ob_itself,
+ dataHandle);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_SetControlBounds(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Rect bounds;
+ PyObject *_res = NULL;
+ Rect bounds;
#ifndef SetControlBounds
- PyMac_PRECHECK(SetControlBounds);
+ PyMac_PRECHECK(SetControlBounds);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetRect, &bounds))
- return NULL;
- SetControlBounds(_self->ob_itself,
- &bounds);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetRect, &bounds))
+ return NULL;
+ SetControlBounds(_self->ob_itself,
+ &bounds);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_SetControlPopupMenuHandle(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- MenuHandle popupMenu;
+ PyObject *_res = NULL;
+ MenuHandle popupMenu;
#ifndef SetControlPopupMenuHandle
- PyMac_PRECHECK(SetControlPopupMenuHandle);
+ PyMac_PRECHECK(SetControlPopupMenuHandle);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- MenuObj_Convert, &popupMenu))
- return NULL;
- SetControlPopupMenuHandle(_self->ob_itself,
- popupMenu);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ MenuObj_Convert, &popupMenu))
+ return NULL;
+ SetControlPopupMenuHandle(_self->ob_itself,
+ popupMenu);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_SetControlPopupMenuID(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short menuID;
+ PyObject *_res = NULL;
+ short menuID;
#ifndef SetControlPopupMenuID
- PyMac_PRECHECK(SetControlPopupMenuID);
+ PyMac_PRECHECK(SetControlPopupMenuID);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &menuID))
- return NULL;
- SetControlPopupMenuID(_self->ob_itself,
- menuID);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &menuID))
+ return NULL;
+ SetControlPopupMenuID(_self->ob_itself,
+ menuID);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_GetBevelButtonMenuValue(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- UInt16 outValue;
+ PyObject *_res = NULL;
+ OSErr _err;
+ UInt16 outValue;
#ifndef GetBevelButtonMenuValue
- PyMac_PRECHECK(GetBevelButtonMenuValue);
+ PyMac_PRECHECK(GetBevelButtonMenuValue);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetBevelButtonMenuValue(_self->ob_itself,
- &outValue);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("h",
- outValue);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetBevelButtonMenuValue(_self->ob_itself,
+ &outValue);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("h",
+ outValue);
+ return _res;
}
static PyObject *CtlObj_SetBevelButtonMenuValue(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- SInt16 inValue;
+ PyObject *_res = NULL;
+ OSErr _err;
+ SInt16 inValue;
#ifndef SetBevelButtonMenuValue
- PyMac_PRECHECK(SetBevelButtonMenuValue);
+ PyMac_PRECHECK(SetBevelButtonMenuValue);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &inValue))
- return NULL;
- _err = SetBevelButtonMenuValue(_self->ob_itself,
- inValue);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &inValue))
+ return NULL;
+ _err = SetBevelButtonMenuValue(_self->ob_itself,
+ inValue);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_GetBevelButtonMenuHandle(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- MenuHandle outHandle;
+ PyObject *_res = NULL;
+ OSErr _err;
+ MenuHandle outHandle;
#ifndef GetBevelButtonMenuHandle
- PyMac_PRECHECK(GetBevelButtonMenuHandle);
+ PyMac_PRECHECK(GetBevelButtonMenuHandle);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetBevelButtonMenuHandle(_self->ob_itself,
- &outHandle);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- MenuObj_New, outHandle);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetBevelButtonMenuHandle(_self->ob_itself,
+ &outHandle);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ MenuObj_New, outHandle);
+ return _res;
}
static PyObject *CtlObj_SetBevelButtonContentInfo(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- ControlButtonContentInfo inContent;
+ PyObject *_res = NULL;
+ OSErr _err;
+ ControlButtonContentInfo inContent;
#ifndef SetBevelButtonContentInfo
- PyMac_PRECHECK(SetBevelButtonContentInfo);
+ PyMac_PRECHECK(SetBevelButtonContentInfo);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ControlButtonContentInfo_Convert, &inContent))
- return NULL;
- _err = SetBevelButtonContentInfo(_self->ob_itself,
- &inContent);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ControlButtonContentInfo_Convert, &inContent))
+ return NULL;
+ _err = SetBevelButtonContentInfo(_self->ob_itself,
+ &inContent);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_SetBevelButtonTransform(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- IconTransformType transform;
+ PyObject *_res = NULL;
+ OSErr _err;
+ IconTransformType transform;
#ifndef SetBevelButtonTransform
- PyMac_PRECHECK(SetBevelButtonTransform);
+ PyMac_PRECHECK(SetBevelButtonTransform);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &transform))
- return NULL;
- _err = SetBevelButtonTransform(_self->ob_itself,
- transform);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &transform))
+ return NULL;
+ _err = SetBevelButtonTransform(_self->ob_itself,
+ transform);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_SetDisclosureTriangleLastValue(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- SInt16 inValue;
+ PyObject *_res = NULL;
+ OSErr _err;
+ SInt16 inValue;
#ifndef SetDisclosureTriangleLastValue
- PyMac_PRECHECK(SetDisclosureTriangleLastValue);
+ PyMac_PRECHECK(SetDisclosureTriangleLastValue);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &inValue))
- return NULL;
- _err = SetDisclosureTriangleLastValue(_self->ob_itself,
- inValue);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &inValue))
+ return NULL;
+ _err = SetDisclosureTriangleLastValue(_self->ob_itself,
+ inValue);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_GetTabContentRect(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Rect outContentRect;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Rect outContentRect;
#ifndef GetTabContentRect
- PyMac_PRECHECK(GetTabContentRect);
+ PyMac_PRECHECK(GetTabContentRect);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetTabContentRect(_self->ob_itself,
- &outContentRect);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- PyMac_BuildRect, &outContentRect);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetTabContentRect(_self->ob_itself,
+ &outContentRect);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildRect, &outContentRect);
+ return _res;
}
static PyObject *CtlObj_SetTabEnabled(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- SInt16 inTabToHilite;
- Boolean inEnabled;
+ PyObject *_res = NULL;
+ OSErr _err;
+ SInt16 inTabToHilite;
+ Boolean inEnabled;
#ifndef SetTabEnabled
- PyMac_PRECHECK(SetTabEnabled);
+ PyMac_PRECHECK(SetTabEnabled);
#endif
- if (!PyArg_ParseTuple(_args, "hb",
- &inTabToHilite,
- &inEnabled))
- return NULL;
- _err = SetTabEnabled(_self->ob_itself,
- inTabToHilite,
- inEnabled);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "hb",
+ &inTabToHilite,
+ &inEnabled))
+ return NULL;
+ _err = SetTabEnabled(_self->ob_itself,
+ inTabToHilite,
+ inEnabled);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_SetImageWellContentInfo(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- ControlButtonContentInfo inContent;
+ PyObject *_res = NULL;
+ OSErr _err;
+ ControlButtonContentInfo inContent;
#ifndef SetImageWellContentInfo
- PyMac_PRECHECK(SetImageWellContentInfo);
+ PyMac_PRECHECK(SetImageWellContentInfo);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ControlButtonContentInfo_Convert, &inContent))
- return NULL;
- _err = SetImageWellContentInfo(_self->ob_itself,
- &inContent);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ControlButtonContentInfo_Convert, &inContent))
+ return NULL;
+ _err = SetImageWellContentInfo(_self->ob_itself,
+ &inContent);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_SetImageWellTransform(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- IconTransformType inTransform;
+ PyObject *_res = NULL;
+ OSErr _err;
+ IconTransformType inTransform;
#ifndef SetImageWellTransform
- PyMac_PRECHECK(SetImageWellTransform);
+ PyMac_PRECHECK(SetImageWellTransform);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &inTransform))
- return NULL;
- _err = SetImageWellTransform(_self->ob_itself,
- inTransform);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &inTransform))
+ return NULL;
+ _err = SetImageWellTransform(_self->ob_itself,
+ inTransform);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_GetDataBrowserViewStyle(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- OSType style;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ OSType style;
#ifndef GetDataBrowserViewStyle
- PyMac_PRECHECK(GetDataBrowserViewStyle);
+ PyMac_PRECHECK(GetDataBrowserViewStyle);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetDataBrowserViewStyle(_self->ob_itself,
- &style);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- PyMac_BuildOSType, style);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetDataBrowserViewStyle(_self->ob_itself,
+ &style);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildOSType, style);
+ return _res;
}
static PyObject *CtlObj_SetDataBrowserViewStyle(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- OSType style;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ OSType style;
#ifndef SetDataBrowserViewStyle
- PyMac_PRECHECK(SetDataBrowserViewStyle);
+ PyMac_PRECHECK(SetDataBrowserViewStyle);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetOSType, &style))
- return NULL;
- _err = SetDataBrowserViewStyle(_self->ob_itself,
- style);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetOSType, &style))
+ return NULL;
+ _err = SetDataBrowserViewStyle(_self->ob_itself,
+ style);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_EnableDataBrowserEditCommand(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- UInt32 command;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ UInt32 command;
#ifndef EnableDataBrowserEditCommand
- PyMac_PRECHECK(EnableDataBrowserEditCommand);
+ PyMac_PRECHECK(EnableDataBrowserEditCommand);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &command))
- return NULL;
- _rv = EnableDataBrowserEditCommand(_self->ob_itself,
- command);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &command))
+ return NULL;
+ _rv = EnableDataBrowserEditCommand(_self->ob_itself,
+ command);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *CtlObj_ExecuteDataBrowserEditCommand(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- UInt32 command;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ UInt32 command;
#ifndef ExecuteDataBrowserEditCommand
- PyMac_PRECHECK(ExecuteDataBrowserEditCommand);
+ PyMac_PRECHECK(ExecuteDataBrowserEditCommand);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &command))
- return NULL;
- _err = ExecuteDataBrowserEditCommand(_self->ob_itself,
- command);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &command))
+ return NULL;
+ _err = ExecuteDataBrowserEditCommand(_self->ob_itself,
+ command);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_GetDataBrowserSelectionAnchor(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- UInt32 first;
- UInt32 last;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ UInt32 first;
+ UInt32 last;
#ifndef GetDataBrowserSelectionAnchor
- PyMac_PRECHECK(GetDataBrowserSelectionAnchor);
+ PyMac_PRECHECK(GetDataBrowserSelectionAnchor);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetDataBrowserSelectionAnchor(_self->ob_itself,
- &first,
- &last);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("ll",
- first,
- last);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetDataBrowserSelectionAnchor(_self->ob_itself,
+ &first,
+ &last);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("ll",
+ first,
+ last);
+ return _res;
}
static PyObject *CtlObj_MoveDataBrowserSelectionAnchor(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- UInt32 direction;
- Boolean extendSelection;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ UInt32 direction;
+ Boolean extendSelection;
#ifndef MoveDataBrowserSelectionAnchor
- PyMac_PRECHECK(MoveDataBrowserSelectionAnchor);
+ PyMac_PRECHECK(MoveDataBrowserSelectionAnchor);
#endif
- if (!PyArg_ParseTuple(_args, "lb",
- &direction,
- &extendSelection))
- return NULL;
- _err = MoveDataBrowserSelectionAnchor(_self->ob_itself,
- direction,
- extendSelection);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "lb",
+ &direction,
+ &extendSelection))
+ return NULL;
+ _err = MoveDataBrowserSelectionAnchor(_self->ob_itself,
+ direction,
+ extendSelection);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_OpenDataBrowserContainer(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- UInt32 container;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ UInt32 container;
#ifndef OpenDataBrowserContainer
- PyMac_PRECHECK(OpenDataBrowserContainer);
+ PyMac_PRECHECK(OpenDataBrowserContainer);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &container))
- return NULL;
- _err = OpenDataBrowserContainer(_self->ob_itself,
- container);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &container))
+ return NULL;
+ _err = OpenDataBrowserContainer(_self->ob_itself,
+ container);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_CloseDataBrowserContainer(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- UInt32 container;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ UInt32 container;
#ifndef CloseDataBrowserContainer
- PyMac_PRECHECK(CloseDataBrowserContainer);
+ PyMac_PRECHECK(CloseDataBrowserContainer);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &container))
- return NULL;
- _err = CloseDataBrowserContainer(_self->ob_itself,
- container);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &container))
+ return NULL;
+ _err = CloseDataBrowserContainer(_self->ob_itself,
+ container);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_SortDataBrowserContainer(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- UInt32 container;
- Boolean sortChildren;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ UInt32 container;
+ Boolean sortChildren;
#ifndef SortDataBrowserContainer
- PyMac_PRECHECK(SortDataBrowserContainer);
+ PyMac_PRECHECK(SortDataBrowserContainer);
#endif
- if (!PyArg_ParseTuple(_args, "lb",
- &container,
- &sortChildren))
- return NULL;
- _err = SortDataBrowserContainer(_self->ob_itself,
- container,
- sortChildren);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "lb",
+ &container,
+ &sortChildren))
+ return NULL;
+ _err = SortDataBrowserContainer(_self->ob_itself,
+ container,
+ sortChildren);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_GetDataBrowserItems(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- UInt32 container;
- Boolean recurse;
- UInt32 state;
- Handle items;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ UInt32 container;
+ Boolean recurse;
+ UInt32 state;
+ Handle items;
#ifndef GetDataBrowserItems
- PyMac_PRECHECK(GetDataBrowserItems);
-#endif
- if (!PyArg_ParseTuple(_args, "lblO&",
- &container,
- &recurse,
- &state,
- ResObj_Convert, &items))
- return NULL;
- _err = GetDataBrowserItems(_self->ob_itself,
- container,
- recurse,
- state,
- items);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(GetDataBrowserItems);
+#endif
+ if (!PyArg_ParseTuple(_args, "lblO&",
+ &container,
+ &recurse,
+ &state,
+ ResObj_Convert, &items))
+ return NULL;
+ _err = GetDataBrowserItems(_self->ob_itself,
+ container,
+ recurse,
+ state,
+ items);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_GetDataBrowserItemCount(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- UInt32 container;
- Boolean recurse;
- UInt32 state;
- UInt32 numItems;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ UInt32 container;
+ Boolean recurse;
+ UInt32 state;
+ UInt32 numItems;
#ifndef GetDataBrowserItemCount
- PyMac_PRECHECK(GetDataBrowserItemCount);
-#endif
- if (!PyArg_ParseTuple(_args, "lbl",
- &container,
- &recurse,
- &state))
- return NULL;
- _err = GetDataBrowserItemCount(_self->ob_itself,
- container,
- recurse,
- state,
- &numItems);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- numItems);
- return _res;
+ PyMac_PRECHECK(GetDataBrowserItemCount);
+#endif
+ if (!PyArg_ParseTuple(_args, "lbl",
+ &container,
+ &recurse,
+ &state))
+ return NULL;
+ _err = GetDataBrowserItemCount(_self->ob_itself,
+ container,
+ recurse,
+ state,
+ &numItems);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ numItems);
+ return _res;
}
static PyObject *CtlObj_IsDataBrowserItemSelected(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- UInt32 item;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ UInt32 item;
#ifndef IsDataBrowserItemSelected
- PyMac_PRECHECK(IsDataBrowserItemSelected);
+ PyMac_PRECHECK(IsDataBrowserItemSelected);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &item))
- return NULL;
- _rv = IsDataBrowserItemSelected(_self->ob_itself,
- item);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &item))
+ return NULL;
+ _rv = IsDataBrowserItemSelected(_self->ob_itself,
+ item);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *CtlObj_GetDataBrowserItemState(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- UInt32 item;
- UInt32 state;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ UInt32 item;
+ UInt32 state;
#ifndef GetDataBrowserItemState
- PyMac_PRECHECK(GetDataBrowserItemState);
+ PyMac_PRECHECK(GetDataBrowserItemState);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &item))
- return NULL;
- _err = GetDataBrowserItemState(_self->ob_itself,
- item,
- &state);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- state);
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &item))
+ return NULL;
+ _err = GetDataBrowserItemState(_self->ob_itself,
+ item,
+ &state);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ state);
+ return _res;
}
static PyObject *CtlObj_RevealDataBrowserItem(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- UInt32 item;
- UInt32 propertyID;
- UInt8 options;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ UInt32 item;
+ UInt32 propertyID;
+ UInt8 options;
#ifndef RevealDataBrowserItem
- PyMac_PRECHECK(RevealDataBrowserItem);
-#endif
- if (!PyArg_ParseTuple(_args, "llb",
- &item,
- &propertyID,
- &options))
- return NULL;
- _err = RevealDataBrowserItem(_self->ob_itself,
- item,
- propertyID,
- options);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(RevealDataBrowserItem);
+#endif
+ if (!PyArg_ParseTuple(_args, "llb",
+ &item,
+ &propertyID,
+ &options))
+ return NULL;
+ _err = RevealDataBrowserItem(_self->ob_itself,
+ item,
+ propertyID,
+ options);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_SetDataBrowserActiveItems(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- Boolean active;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Boolean active;
#ifndef SetDataBrowserActiveItems
- PyMac_PRECHECK(SetDataBrowserActiveItems);
+ PyMac_PRECHECK(SetDataBrowserActiveItems);
#endif
- if (!PyArg_ParseTuple(_args, "b",
- &active))
- return NULL;
- _err = SetDataBrowserActiveItems(_self->ob_itself,
- active);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "b",
+ &active))
+ return NULL;
+ _err = SetDataBrowserActiveItems(_self->ob_itself,
+ active);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_GetDataBrowserActiveItems(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- Boolean active;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Boolean active;
#ifndef GetDataBrowserActiveItems
- PyMac_PRECHECK(GetDataBrowserActiveItems);
+ PyMac_PRECHECK(GetDataBrowserActiveItems);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetDataBrowserActiveItems(_self->ob_itself,
- &active);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("b",
- active);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetDataBrowserActiveItems(_self->ob_itself,
+ &active);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("b",
+ active);
+ return _res;
}
static PyObject *CtlObj_SetDataBrowserScrollBarInset(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- Rect insetRect;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Rect insetRect;
#ifndef SetDataBrowserScrollBarInset
- PyMac_PRECHECK(SetDataBrowserScrollBarInset);
+ PyMac_PRECHECK(SetDataBrowserScrollBarInset);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = SetDataBrowserScrollBarInset(_self->ob_itself,
- &insetRect);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- PyMac_BuildRect, &insetRect);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = SetDataBrowserScrollBarInset(_self->ob_itself,
+ &insetRect);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildRect, &insetRect);
+ return _res;
}
static PyObject *CtlObj_GetDataBrowserScrollBarInset(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- Rect insetRect;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Rect insetRect;
#ifndef GetDataBrowserScrollBarInset
- PyMac_PRECHECK(GetDataBrowserScrollBarInset);
+ PyMac_PRECHECK(GetDataBrowserScrollBarInset);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetDataBrowserScrollBarInset(_self->ob_itself,
- &insetRect);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- PyMac_BuildRect, &insetRect);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetDataBrowserScrollBarInset(_self->ob_itself,
+ &insetRect);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildRect, &insetRect);
+ return _res;
}
static PyObject *CtlObj_SetDataBrowserTarget(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- UInt32 target;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ UInt32 target;
#ifndef SetDataBrowserTarget
- PyMac_PRECHECK(SetDataBrowserTarget);
+ PyMac_PRECHECK(SetDataBrowserTarget);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &target))
- return NULL;
- _err = SetDataBrowserTarget(_self->ob_itself,
- target);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &target))
+ return NULL;
+ _err = SetDataBrowserTarget(_self->ob_itself,
+ target);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_GetDataBrowserTarget(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- UInt32 target;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ UInt32 target;
#ifndef GetDataBrowserTarget
- PyMac_PRECHECK(GetDataBrowserTarget);
+ PyMac_PRECHECK(GetDataBrowserTarget);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetDataBrowserTarget(_self->ob_itself,
- &target);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- target);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetDataBrowserTarget(_self->ob_itself,
+ &target);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ target);
+ return _res;
}
static PyObject *CtlObj_SetDataBrowserSortOrder(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- UInt16 order;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ UInt16 order;
#ifndef SetDataBrowserSortOrder
- PyMac_PRECHECK(SetDataBrowserSortOrder);
+ PyMac_PRECHECK(SetDataBrowserSortOrder);
#endif
- if (!PyArg_ParseTuple(_args, "H",
- &order))
- return NULL;
- _err = SetDataBrowserSortOrder(_self->ob_itself,
- order);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "H",
+ &order))
+ return NULL;
+ _err = SetDataBrowserSortOrder(_self->ob_itself,
+ order);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_GetDataBrowserSortOrder(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- UInt16 order;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ UInt16 order;
#ifndef GetDataBrowserSortOrder
- PyMac_PRECHECK(GetDataBrowserSortOrder);
+ PyMac_PRECHECK(GetDataBrowserSortOrder);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetDataBrowserSortOrder(_self->ob_itself,
- &order);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("H",
- order);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetDataBrowserSortOrder(_self->ob_itself,
+ &order);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("H",
+ order);
+ return _res;
}
static PyObject *CtlObj_SetDataBrowserScrollPosition(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- UInt32 top;
- UInt32 left;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ UInt32 top;
+ UInt32 left;
#ifndef SetDataBrowserScrollPosition
- PyMac_PRECHECK(SetDataBrowserScrollPosition);
+ PyMac_PRECHECK(SetDataBrowserScrollPosition);
#endif
- if (!PyArg_ParseTuple(_args, "ll",
- &top,
- &left))
- return NULL;
- _err = SetDataBrowserScrollPosition(_self->ob_itself,
- top,
- left);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "ll",
+ &top,
+ &left))
+ return NULL;
+ _err = SetDataBrowserScrollPosition(_self->ob_itself,
+ top,
+ left);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_GetDataBrowserScrollPosition(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- UInt32 top;
- UInt32 left;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ UInt32 top;
+ UInt32 left;
#ifndef GetDataBrowserScrollPosition
- PyMac_PRECHECK(GetDataBrowserScrollPosition);
+ PyMac_PRECHECK(GetDataBrowserScrollPosition);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetDataBrowserScrollPosition(_self->ob_itself,
- &top,
- &left);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("ll",
- top,
- left);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetDataBrowserScrollPosition(_self->ob_itself,
+ &top,
+ &left);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("ll",
+ top,
+ left);
+ return _res;
}
static PyObject *CtlObj_SetDataBrowserHasScrollBars(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- Boolean horiz;
- Boolean vert;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Boolean horiz;
+ Boolean vert;
#ifndef SetDataBrowserHasScrollBars
- PyMac_PRECHECK(SetDataBrowserHasScrollBars);
+ PyMac_PRECHECK(SetDataBrowserHasScrollBars);
#endif
- if (!PyArg_ParseTuple(_args, "bb",
- &horiz,
- &vert))
- return NULL;
- _err = SetDataBrowserHasScrollBars(_self->ob_itself,
- horiz,
- vert);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "bb",
+ &horiz,
+ &vert))
+ return NULL;
+ _err = SetDataBrowserHasScrollBars(_self->ob_itself,
+ horiz,
+ vert);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_GetDataBrowserHasScrollBars(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- Boolean horiz;
- Boolean vert;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Boolean horiz;
+ Boolean vert;
#ifndef GetDataBrowserHasScrollBars
- PyMac_PRECHECK(GetDataBrowserHasScrollBars);
+ PyMac_PRECHECK(GetDataBrowserHasScrollBars);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetDataBrowserHasScrollBars(_self->ob_itself,
- &horiz,
- &vert);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("bb",
- horiz,
- vert);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetDataBrowserHasScrollBars(_self->ob_itself,
+ &horiz,
+ &vert);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("bb",
+ horiz,
+ vert);
+ return _res;
}
static PyObject *CtlObj_SetDataBrowserSortProperty(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- UInt32 property;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ UInt32 property;
#ifndef SetDataBrowserSortProperty
- PyMac_PRECHECK(SetDataBrowserSortProperty);
+ PyMac_PRECHECK(SetDataBrowserSortProperty);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &property))
- return NULL;
- _err = SetDataBrowserSortProperty(_self->ob_itself,
- property);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &property))
+ return NULL;
+ _err = SetDataBrowserSortProperty(_self->ob_itself,
+ property);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_GetDataBrowserSortProperty(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- UInt32 property;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ UInt32 property;
#ifndef GetDataBrowserSortProperty
- PyMac_PRECHECK(GetDataBrowserSortProperty);
+ PyMac_PRECHECK(GetDataBrowserSortProperty);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetDataBrowserSortProperty(_self->ob_itself,
- &property);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- property);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetDataBrowserSortProperty(_self->ob_itself,
+ &property);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ property);
+ return _res;
}
static PyObject *CtlObj_SetDataBrowserSelectionFlags(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- UInt32 selectionFlags;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ UInt32 selectionFlags;
#ifndef SetDataBrowserSelectionFlags
- PyMac_PRECHECK(SetDataBrowserSelectionFlags);
+ PyMac_PRECHECK(SetDataBrowserSelectionFlags);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &selectionFlags))
- return NULL;
- _err = SetDataBrowserSelectionFlags(_self->ob_itself,
- selectionFlags);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &selectionFlags))
+ return NULL;
+ _err = SetDataBrowserSelectionFlags(_self->ob_itself,
+ selectionFlags);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_GetDataBrowserSelectionFlags(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- UInt32 selectionFlags;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ UInt32 selectionFlags;
#ifndef GetDataBrowserSelectionFlags
- PyMac_PRECHECK(GetDataBrowserSelectionFlags);
+ PyMac_PRECHECK(GetDataBrowserSelectionFlags);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetDataBrowserSelectionFlags(_self->ob_itself,
- &selectionFlags);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- selectionFlags);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetDataBrowserSelectionFlags(_self->ob_itself,
+ &selectionFlags);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ selectionFlags);
+ return _res;
}
static PyObject *CtlObj_SetDataBrowserPropertyFlags(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- UInt32 property;
- UInt32 flags;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ UInt32 property;
+ UInt32 flags;
#ifndef SetDataBrowserPropertyFlags
- PyMac_PRECHECK(SetDataBrowserPropertyFlags);
+ PyMac_PRECHECK(SetDataBrowserPropertyFlags);
#endif
- if (!PyArg_ParseTuple(_args, "ll",
- &property,
- &flags))
- return NULL;
- _err = SetDataBrowserPropertyFlags(_self->ob_itself,
- property,
- flags);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "ll",
+ &property,
+ &flags))
+ return NULL;
+ _err = SetDataBrowserPropertyFlags(_self->ob_itself,
+ property,
+ flags);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_GetDataBrowserPropertyFlags(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- UInt32 property;
- UInt32 flags;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ UInt32 property;
+ UInt32 flags;
#ifndef GetDataBrowserPropertyFlags
- PyMac_PRECHECK(GetDataBrowserPropertyFlags);
+ PyMac_PRECHECK(GetDataBrowserPropertyFlags);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &property))
- return NULL;
- _err = GetDataBrowserPropertyFlags(_self->ob_itself,
- property,
- &flags);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- flags);
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &property))
+ return NULL;
+ _err = GetDataBrowserPropertyFlags(_self->ob_itself,
+ property,
+ &flags);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ flags);
+ return _res;
}
static PyObject *CtlObj_SetDataBrowserEditText(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- CFStringRef text;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ CFStringRef text;
#ifndef SetDataBrowserEditText
- PyMac_PRECHECK(SetDataBrowserEditText);
+ PyMac_PRECHECK(SetDataBrowserEditText);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CFStringRefObj_Convert, &text))
- return NULL;
- _err = SetDataBrowserEditText(_self->ob_itself,
- text);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CFStringRefObj_Convert, &text))
+ return NULL;
+ _err = SetDataBrowserEditText(_self->ob_itself,
+ text);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_CopyDataBrowserEditText(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- CFStringRef text;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ CFStringRef text;
#ifndef CopyDataBrowserEditText
- PyMac_PRECHECK(CopyDataBrowserEditText);
+ PyMac_PRECHECK(CopyDataBrowserEditText);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = CopyDataBrowserEditText(_self->ob_itself,
- &text);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- CFStringRefObj_New, text);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = CopyDataBrowserEditText(_self->ob_itself,
+ &text);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ CFStringRefObj_New, text);
+ return _res;
}
static PyObject *CtlObj_GetDataBrowserEditText(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- CFMutableStringRef text;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ CFMutableStringRef text;
#ifndef GetDataBrowserEditText
- PyMac_PRECHECK(GetDataBrowserEditText);
+ PyMac_PRECHECK(GetDataBrowserEditText);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CFMutableStringRefObj_Convert, &text))
- return NULL;
- _err = GetDataBrowserEditText(_self->ob_itself,
- text);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CFMutableStringRefObj_Convert, &text))
+ return NULL;
+ _err = GetDataBrowserEditText(_self->ob_itself,
+ text);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_SetDataBrowserEditItem(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- UInt32 item;
- UInt32 property;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ UInt32 item;
+ UInt32 property;
#ifndef SetDataBrowserEditItem
- PyMac_PRECHECK(SetDataBrowserEditItem);
+ PyMac_PRECHECK(SetDataBrowserEditItem);
#endif
- if (!PyArg_ParseTuple(_args, "ll",
- &item,
- &property))
- return NULL;
- _err = SetDataBrowserEditItem(_self->ob_itself,
- item,
- property);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "ll",
+ &item,
+ &property))
+ return NULL;
+ _err = SetDataBrowserEditItem(_self->ob_itself,
+ item,
+ property);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_GetDataBrowserEditItem(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- UInt32 item;
- UInt32 property;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ UInt32 item;
+ UInt32 property;
#ifndef GetDataBrowserEditItem
- PyMac_PRECHECK(GetDataBrowserEditItem);
+ PyMac_PRECHECK(GetDataBrowserEditItem);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetDataBrowserEditItem(_self->ob_itself,
- &item,
- &property);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("ll",
- item,
- property);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetDataBrowserEditItem(_self->ob_itself,
+ &item,
+ &property);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("ll",
+ item,
+ property);
+ return _res;
}
static PyObject *CtlObj_GetDataBrowserItemPartBounds(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- UInt32 item;
- UInt32 property;
- OSType part;
- Rect bounds;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ UInt32 item;
+ UInt32 property;
+ OSType part;
+ Rect bounds;
#ifndef GetDataBrowserItemPartBounds
- PyMac_PRECHECK(GetDataBrowserItemPartBounds);
-#endif
- if (!PyArg_ParseTuple(_args, "llO&",
- &item,
- &property,
- PyMac_GetOSType, &part))
- return NULL;
- _err = GetDataBrowserItemPartBounds(_self->ob_itself,
- item,
- property,
- part,
- &bounds);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- PyMac_BuildRect, &bounds);
- return _res;
+ PyMac_PRECHECK(GetDataBrowserItemPartBounds);
+#endif
+ if (!PyArg_ParseTuple(_args, "llO&",
+ &item,
+ &property,
+ PyMac_GetOSType, &part))
+ return NULL;
+ _err = GetDataBrowserItemPartBounds(_self->ob_itself,
+ item,
+ property,
+ part,
+ &bounds);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildRect, &bounds);
+ return _res;
}
static PyObject *CtlObj_RemoveDataBrowserTableViewColumn(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- UInt32 column;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ UInt32 column;
#ifndef RemoveDataBrowserTableViewColumn
- PyMac_PRECHECK(RemoveDataBrowserTableViewColumn);
+ PyMac_PRECHECK(RemoveDataBrowserTableViewColumn);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &column))
- return NULL;
- _err = RemoveDataBrowserTableViewColumn(_self->ob_itself,
- column);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &column))
+ return NULL;
+ _err = RemoveDataBrowserTableViewColumn(_self->ob_itself,
+ column);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_GetDataBrowserTableViewColumnCount(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- UInt32 numColumns;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ UInt32 numColumns;
#ifndef GetDataBrowserTableViewColumnCount
- PyMac_PRECHECK(GetDataBrowserTableViewColumnCount);
+ PyMac_PRECHECK(GetDataBrowserTableViewColumnCount);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetDataBrowserTableViewColumnCount(_self->ob_itself,
- &numColumns);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- numColumns);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetDataBrowserTableViewColumnCount(_self->ob_itself,
+ &numColumns);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ numColumns);
+ return _res;
}
static PyObject *CtlObj_SetDataBrowserTableViewHiliteStyle(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- UInt32 hiliteStyle;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ UInt32 hiliteStyle;
#ifndef SetDataBrowserTableViewHiliteStyle
- PyMac_PRECHECK(SetDataBrowserTableViewHiliteStyle);
+ PyMac_PRECHECK(SetDataBrowserTableViewHiliteStyle);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &hiliteStyle))
- return NULL;
- _err = SetDataBrowserTableViewHiliteStyle(_self->ob_itself,
- hiliteStyle);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &hiliteStyle))
+ return NULL;
+ _err = SetDataBrowserTableViewHiliteStyle(_self->ob_itself,
+ hiliteStyle);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_GetDataBrowserTableViewHiliteStyle(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- UInt32 hiliteStyle;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ UInt32 hiliteStyle;
#ifndef GetDataBrowserTableViewHiliteStyle
- PyMac_PRECHECK(GetDataBrowserTableViewHiliteStyle);
+ PyMac_PRECHECK(GetDataBrowserTableViewHiliteStyle);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetDataBrowserTableViewHiliteStyle(_self->ob_itself,
- &hiliteStyle);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- hiliteStyle);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetDataBrowserTableViewHiliteStyle(_self->ob_itself,
+ &hiliteStyle);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ hiliteStyle);
+ return _res;
}
static PyObject *CtlObj_SetDataBrowserTableViewRowHeight(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- UInt16 height;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ UInt16 height;
#ifndef SetDataBrowserTableViewRowHeight
- PyMac_PRECHECK(SetDataBrowserTableViewRowHeight);
+ PyMac_PRECHECK(SetDataBrowserTableViewRowHeight);
#endif
- if (!PyArg_ParseTuple(_args, "H",
- &height))
- return NULL;
- _err = SetDataBrowserTableViewRowHeight(_self->ob_itself,
- height);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "H",
+ &height))
+ return NULL;
+ _err = SetDataBrowserTableViewRowHeight(_self->ob_itself,
+ height);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_GetDataBrowserTableViewRowHeight(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- UInt16 height;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ UInt16 height;
#ifndef GetDataBrowserTableViewRowHeight
- PyMac_PRECHECK(GetDataBrowserTableViewRowHeight);
+ PyMac_PRECHECK(GetDataBrowserTableViewRowHeight);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetDataBrowserTableViewRowHeight(_self->ob_itself,
- &height);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("H",
- height);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetDataBrowserTableViewRowHeight(_self->ob_itself,
+ &height);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("H",
+ height);
+ return _res;
}
static PyObject *CtlObj_SetDataBrowserTableViewColumnWidth(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- UInt16 width;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ UInt16 width;
#ifndef SetDataBrowserTableViewColumnWidth
- PyMac_PRECHECK(SetDataBrowserTableViewColumnWidth);
+ PyMac_PRECHECK(SetDataBrowserTableViewColumnWidth);
#endif
- if (!PyArg_ParseTuple(_args, "H",
- &width))
- return NULL;
- _err = SetDataBrowserTableViewColumnWidth(_self->ob_itself,
- width);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "H",
+ &width))
+ return NULL;
+ _err = SetDataBrowserTableViewColumnWidth(_self->ob_itself,
+ width);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_GetDataBrowserTableViewColumnWidth(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- UInt16 width;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ UInt16 width;
#ifndef GetDataBrowserTableViewColumnWidth
- PyMac_PRECHECK(GetDataBrowserTableViewColumnWidth);
+ PyMac_PRECHECK(GetDataBrowserTableViewColumnWidth);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetDataBrowserTableViewColumnWidth(_self->ob_itself,
- &width);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("H",
- width);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetDataBrowserTableViewColumnWidth(_self->ob_itself,
+ &width);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("H",
+ width);
+ return _res;
}
static PyObject *CtlObj_SetDataBrowserTableViewItemRowHeight(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- UInt32 item;
- UInt16 height;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ UInt32 item;
+ UInt16 height;
#ifndef SetDataBrowserTableViewItemRowHeight
- PyMac_PRECHECK(SetDataBrowserTableViewItemRowHeight);
+ PyMac_PRECHECK(SetDataBrowserTableViewItemRowHeight);
#endif
- if (!PyArg_ParseTuple(_args, "lH",
- &item,
- &height))
- return NULL;
- _err = SetDataBrowserTableViewItemRowHeight(_self->ob_itself,
- item,
- height);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "lH",
+ &item,
+ &height))
+ return NULL;
+ _err = SetDataBrowserTableViewItemRowHeight(_self->ob_itself,
+ item,
+ height);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_GetDataBrowserTableViewItemRowHeight(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- UInt32 item;
- UInt16 height;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ UInt32 item;
+ UInt16 height;
#ifndef GetDataBrowserTableViewItemRowHeight
- PyMac_PRECHECK(GetDataBrowserTableViewItemRowHeight);
+ PyMac_PRECHECK(GetDataBrowserTableViewItemRowHeight);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &item))
- return NULL;
- _err = GetDataBrowserTableViewItemRowHeight(_self->ob_itself,
- item,
- &height);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("H",
- height);
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &item))
+ return NULL;
+ _err = GetDataBrowserTableViewItemRowHeight(_self->ob_itself,
+ item,
+ &height);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("H",
+ height);
+ return _res;
}
static PyObject *CtlObj_SetDataBrowserTableViewNamedColumnWidth(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- UInt32 column;
- UInt16 width;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ UInt32 column;
+ UInt16 width;
#ifndef SetDataBrowserTableViewNamedColumnWidth
- PyMac_PRECHECK(SetDataBrowserTableViewNamedColumnWidth);
+ PyMac_PRECHECK(SetDataBrowserTableViewNamedColumnWidth);
#endif
- if (!PyArg_ParseTuple(_args, "lH",
- &column,
- &width))
- return NULL;
- _err = SetDataBrowserTableViewNamedColumnWidth(_self->ob_itself,
- column,
- width);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "lH",
+ &column,
+ &width))
+ return NULL;
+ _err = SetDataBrowserTableViewNamedColumnWidth(_self->ob_itself,
+ column,
+ width);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_GetDataBrowserTableViewNamedColumnWidth(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- UInt32 column;
- UInt16 width;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ UInt32 column;
+ UInt16 width;
#ifndef GetDataBrowserTableViewNamedColumnWidth
- PyMac_PRECHECK(GetDataBrowserTableViewNamedColumnWidth);
+ PyMac_PRECHECK(GetDataBrowserTableViewNamedColumnWidth);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &column))
- return NULL;
- _err = GetDataBrowserTableViewNamedColumnWidth(_self->ob_itself,
- column,
- &width);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("H",
- width);
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &column))
+ return NULL;
+ _err = GetDataBrowserTableViewNamedColumnWidth(_self->ob_itself,
+ column,
+ &width);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("H",
+ width);
+ return _res;
}
static PyObject *CtlObj_SetDataBrowserTableViewGeometry(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- Boolean variableWidthColumns;
- Boolean variableHeightRows;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Boolean variableWidthColumns;
+ Boolean variableHeightRows;
#ifndef SetDataBrowserTableViewGeometry
- PyMac_PRECHECK(SetDataBrowserTableViewGeometry);
+ PyMac_PRECHECK(SetDataBrowserTableViewGeometry);
#endif
- if (!PyArg_ParseTuple(_args, "bb",
- &variableWidthColumns,
- &variableHeightRows))
- return NULL;
- _err = SetDataBrowserTableViewGeometry(_self->ob_itself,
- variableWidthColumns,
- variableHeightRows);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "bb",
+ &variableWidthColumns,
+ &variableHeightRows))
+ return NULL;
+ _err = SetDataBrowserTableViewGeometry(_self->ob_itself,
+ variableWidthColumns,
+ variableHeightRows);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_GetDataBrowserTableViewGeometry(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- Boolean variableWidthColumns;
- Boolean variableHeightRows;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Boolean variableWidthColumns;
+ Boolean variableHeightRows;
#ifndef GetDataBrowserTableViewGeometry
- PyMac_PRECHECK(GetDataBrowserTableViewGeometry);
+ PyMac_PRECHECK(GetDataBrowserTableViewGeometry);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetDataBrowserTableViewGeometry(_self->ob_itself,
- &variableWidthColumns,
- &variableHeightRows);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("bb",
- variableWidthColumns,
- variableHeightRows);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetDataBrowserTableViewGeometry(_self->ob_itself,
+ &variableWidthColumns,
+ &variableHeightRows);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("bb",
+ variableWidthColumns,
+ variableHeightRows);
+ return _res;
}
static PyObject *CtlObj_GetDataBrowserTableViewItemID(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- UInt32 row;
- UInt32 item;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ UInt32 row;
+ UInt32 item;
#ifndef GetDataBrowserTableViewItemID
- PyMac_PRECHECK(GetDataBrowserTableViewItemID);
+ PyMac_PRECHECK(GetDataBrowserTableViewItemID);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &row))
- return NULL;
- _err = GetDataBrowserTableViewItemID(_self->ob_itself,
- row,
- &item);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- item);
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &row))
+ return NULL;
+ _err = GetDataBrowserTableViewItemID(_self->ob_itself,
+ row,
+ &item);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ item);
+ return _res;
}
static PyObject *CtlObj_SetDataBrowserTableViewItemRow(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- UInt32 item;
- UInt32 row;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ UInt32 item;
+ UInt32 row;
#ifndef SetDataBrowserTableViewItemRow
- PyMac_PRECHECK(SetDataBrowserTableViewItemRow);
+ PyMac_PRECHECK(SetDataBrowserTableViewItemRow);
#endif
- if (!PyArg_ParseTuple(_args, "ll",
- &item,
- &row))
- return NULL;
- _err = SetDataBrowserTableViewItemRow(_self->ob_itself,
- item,
- row);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "ll",
+ &item,
+ &row))
+ return NULL;
+ _err = SetDataBrowserTableViewItemRow(_self->ob_itself,
+ item,
+ row);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_GetDataBrowserTableViewItemRow(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- UInt32 item;
- UInt32 row;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ UInt32 item;
+ UInt32 row;
#ifndef GetDataBrowserTableViewItemRow
- PyMac_PRECHECK(GetDataBrowserTableViewItemRow);
+ PyMac_PRECHECK(GetDataBrowserTableViewItemRow);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &item))
- return NULL;
- _err = GetDataBrowserTableViewItemRow(_self->ob_itself,
- item,
- &row);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- row);
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &item))
+ return NULL;
+ _err = GetDataBrowserTableViewItemRow(_self->ob_itself,
+ item,
+ &row);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ row);
+ return _res;
}
static PyObject *CtlObj_SetDataBrowserTableViewColumnPosition(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- UInt32 column;
- UInt32 position;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ UInt32 column;
+ UInt32 position;
#ifndef SetDataBrowserTableViewColumnPosition
- PyMac_PRECHECK(SetDataBrowserTableViewColumnPosition);
+ PyMac_PRECHECK(SetDataBrowserTableViewColumnPosition);
#endif
- if (!PyArg_ParseTuple(_args, "ll",
- &column,
- &position))
- return NULL;
- _err = SetDataBrowserTableViewColumnPosition(_self->ob_itself,
- column,
- position);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "ll",
+ &column,
+ &position))
+ return NULL;
+ _err = SetDataBrowserTableViewColumnPosition(_self->ob_itself,
+ column,
+ position);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_GetDataBrowserTableViewColumnPosition(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- UInt32 column;
- UInt32 position;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ UInt32 column;
+ UInt32 position;
#ifndef GetDataBrowserTableViewColumnPosition
- PyMac_PRECHECK(GetDataBrowserTableViewColumnPosition);
+ PyMac_PRECHECK(GetDataBrowserTableViewColumnPosition);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &column))
- return NULL;
- _err = GetDataBrowserTableViewColumnPosition(_self->ob_itself,
- column,
- &position);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- position);
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &column))
+ return NULL;
+ _err = GetDataBrowserTableViewColumnPosition(_self->ob_itself,
+ column,
+ &position);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ position);
+ return _res;
}
static PyObject *CtlObj_GetDataBrowserTableViewColumnProperty(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- UInt32 column;
- UInt32 property;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ UInt32 column;
+ UInt32 property;
#ifndef GetDataBrowserTableViewColumnProperty
- PyMac_PRECHECK(GetDataBrowserTableViewColumnProperty);
+ PyMac_PRECHECK(GetDataBrowserTableViewColumnProperty);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &column))
- return NULL;
- _err = GetDataBrowserTableViewColumnProperty(_self->ob_itself,
- column,
- &property);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- property);
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &column))
+ return NULL;
+ _err = GetDataBrowserTableViewColumnProperty(_self->ob_itself,
+ column,
+ &property);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ property);
+ return _res;
}
static PyObject *CtlObj_AutoSizeDataBrowserListViewColumns(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
+ PyObject *_res = NULL;
+ OSStatus _err;
#ifndef AutoSizeDataBrowserListViewColumns
- PyMac_PRECHECK(AutoSizeDataBrowserListViewColumns);
+ PyMac_PRECHECK(AutoSizeDataBrowserListViewColumns);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = AutoSizeDataBrowserListViewColumns(_self->ob_itself);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = AutoSizeDataBrowserListViewColumns(_self->ob_itself);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_AddDataBrowserListViewColumn(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- DataBrowserListViewColumnDesc columnDesc;
- UInt32 position;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ DataBrowserListViewColumnDesc columnDesc;
+ UInt32 position;
#ifndef AddDataBrowserListViewColumn
- PyMac_PRECHECK(AddDataBrowserListViewColumn);
+ PyMac_PRECHECK(AddDataBrowserListViewColumn);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- DataBrowserListViewColumnDesc_Convert, &columnDesc,
- &position))
- return NULL;
- _err = AddDataBrowserListViewColumn(_self->ob_itself,
- &columnDesc,
- position);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ DataBrowserListViewColumnDesc_Convert, &columnDesc,
+ &position))
+ return NULL;
+ _err = AddDataBrowserListViewColumn(_self->ob_itself,
+ &columnDesc,
+ position);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_SetDataBrowserListViewHeaderBtnHeight(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- UInt16 height;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ UInt16 height;
#ifndef SetDataBrowserListViewHeaderBtnHeight
- PyMac_PRECHECK(SetDataBrowserListViewHeaderBtnHeight);
+ PyMac_PRECHECK(SetDataBrowserListViewHeaderBtnHeight);
#endif
- if (!PyArg_ParseTuple(_args, "H",
- &height))
- return NULL;
- _err = SetDataBrowserListViewHeaderBtnHeight(_self->ob_itself,
- height);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "H",
+ &height))
+ return NULL;
+ _err = SetDataBrowserListViewHeaderBtnHeight(_self->ob_itself,
+ height);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_GetDataBrowserListViewHeaderBtnHeight(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- UInt16 height;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ UInt16 height;
#ifndef GetDataBrowserListViewHeaderBtnHeight
- PyMac_PRECHECK(GetDataBrowserListViewHeaderBtnHeight);
+ PyMac_PRECHECK(GetDataBrowserListViewHeaderBtnHeight);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetDataBrowserListViewHeaderBtnHeight(_self->ob_itself,
- &height);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("H",
- height);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetDataBrowserListViewHeaderBtnHeight(_self->ob_itself,
+ &height);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("H",
+ height);
+ return _res;
}
static PyObject *CtlObj_SetDataBrowserListViewUsePlainBackground(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- Boolean usePlainBackground;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Boolean usePlainBackground;
#ifndef SetDataBrowserListViewUsePlainBackground
- PyMac_PRECHECK(SetDataBrowserListViewUsePlainBackground);
+ PyMac_PRECHECK(SetDataBrowserListViewUsePlainBackground);
#endif
- if (!PyArg_ParseTuple(_args, "b",
- &usePlainBackground))
- return NULL;
- _err = SetDataBrowserListViewUsePlainBackground(_self->ob_itself,
- usePlainBackground);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "b",
+ &usePlainBackground))
+ return NULL;
+ _err = SetDataBrowserListViewUsePlainBackground(_self->ob_itself,
+ usePlainBackground);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_GetDataBrowserListViewUsePlainBackground(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- Boolean usePlainBackground;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Boolean usePlainBackground;
#ifndef GetDataBrowserListViewUsePlainBackground
- PyMac_PRECHECK(GetDataBrowserListViewUsePlainBackground);
+ PyMac_PRECHECK(GetDataBrowserListViewUsePlainBackground);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetDataBrowserListViewUsePlainBackground(_self->ob_itself,
- &usePlainBackground);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("b",
- usePlainBackground);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetDataBrowserListViewUsePlainBackground(_self->ob_itself,
+ &usePlainBackground);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("b",
+ usePlainBackground);
+ return _res;
}
static PyObject *CtlObj_SetDataBrowserListViewDisclosureColumn(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- UInt32 column;
- Boolean expandableRows;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ UInt32 column;
+ Boolean expandableRows;
#ifndef SetDataBrowserListViewDisclosureColumn
- PyMac_PRECHECK(SetDataBrowserListViewDisclosureColumn);
+ PyMac_PRECHECK(SetDataBrowserListViewDisclosureColumn);
#endif
- if (!PyArg_ParseTuple(_args, "lb",
- &column,
- &expandableRows))
- return NULL;
- _err = SetDataBrowserListViewDisclosureColumn(_self->ob_itself,
- column,
- expandableRows);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "lb",
+ &column,
+ &expandableRows))
+ return NULL;
+ _err = SetDataBrowserListViewDisclosureColumn(_self->ob_itself,
+ column,
+ expandableRows);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_GetDataBrowserListViewDisclosureColumn(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- UInt32 column;
- Boolean expandableRows;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ UInt32 column;
+ Boolean expandableRows;
#ifndef GetDataBrowserListViewDisclosureColumn
- PyMac_PRECHECK(GetDataBrowserListViewDisclosureColumn);
+ PyMac_PRECHECK(GetDataBrowserListViewDisclosureColumn);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetDataBrowserListViewDisclosureColumn(_self->ob_itself,
- &column,
- &expandableRows);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("lb",
- column,
- expandableRows);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetDataBrowserListViewDisclosureColumn(_self->ob_itself,
+ &column,
+ &expandableRows);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("lb",
+ column,
+ expandableRows);
+ return _res;
}
static PyObject *CtlObj_GetDataBrowserColumnViewPath(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- Handle path;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Handle path;
#ifndef GetDataBrowserColumnViewPath
- PyMac_PRECHECK(GetDataBrowserColumnViewPath);
+ PyMac_PRECHECK(GetDataBrowserColumnViewPath);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &path))
- return NULL;
- _err = GetDataBrowserColumnViewPath(_self->ob_itself,
- path);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &path))
+ return NULL;
+ _err = GetDataBrowserColumnViewPath(_self->ob_itself,
+ path);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_GetDataBrowserColumnViewPathLength(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- UInt32 pathLength;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ UInt32 pathLength;
#ifndef GetDataBrowserColumnViewPathLength
- PyMac_PRECHECK(GetDataBrowserColumnViewPathLength);
+ PyMac_PRECHECK(GetDataBrowserColumnViewPathLength);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetDataBrowserColumnViewPathLength(_self->ob_itself,
- &pathLength);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- pathLength);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetDataBrowserColumnViewPathLength(_self->ob_itself,
+ &pathLength);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ pathLength);
+ return _res;
}
static PyObject *CtlObj_SetDataBrowserColumnViewDisplayType(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- OSType propertyType;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ OSType propertyType;
#ifndef SetDataBrowserColumnViewDisplayType
- PyMac_PRECHECK(SetDataBrowserColumnViewDisplayType);
+ PyMac_PRECHECK(SetDataBrowserColumnViewDisplayType);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetOSType, &propertyType))
- return NULL;
- _err = SetDataBrowserColumnViewDisplayType(_self->ob_itself,
- propertyType);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetOSType, &propertyType))
+ return NULL;
+ _err = SetDataBrowserColumnViewDisplayType(_self->ob_itself,
+ propertyType);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_GetDataBrowserColumnViewDisplayType(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- OSType propertyType;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ OSType propertyType;
#ifndef GetDataBrowserColumnViewDisplayType
- PyMac_PRECHECK(GetDataBrowserColumnViewDisplayType);
+ PyMac_PRECHECK(GetDataBrowserColumnViewDisplayType);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetDataBrowserColumnViewDisplayType(_self->ob_itself,
- &propertyType);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- PyMac_BuildOSType, propertyType);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetDataBrowserColumnViewDisplayType(_self->ob_itself,
+ &propertyType);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildOSType, propertyType);
+ return _res;
}
static PyObject *CtlObj_as_Resource(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Handle _rv;
+ PyObject *_res = NULL;
+ Handle _rv;
#ifndef as_Resource
- PyMac_PRECHECK(as_Resource);
+ PyMac_PRECHECK(as_Resource);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = as_Resource(_self->ob_itself);
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = as_Resource(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *CtlObj_GetControlRect(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Rect rect;
+ PyObject *_res = NULL;
+ Rect rect;
#ifndef GetControlRect
- PyMac_PRECHECK(GetControlRect);
+ PyMac_PRECHECK(GetControlRect);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- GetControlRect(_self->ob_itself,
- &rect);
- _res = Py_BuildValue("O&",
- PyMac_BuildRect, &rect);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ GetControlRect(_self->ob_itself,
+ &rect);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildRect, &rect);
+ return _res;
}
static PyObject *CtlObj_DisposeControl(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- if ( _self->ob_itself ) {
- SetControlReference(_self->ob_itself, (long)0); /* Make it forget about us */
- DisposeControl(_self->ob_itself);
- _self->ob_itself = NULL;
- }
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ if ( _self->ob_itself ) {
+ SetControlReference(_self->ob_itself, (long)0); /* Make it forget about us */
+ DisposeControl(_self->ob_itself);
+ _self->ob_itself = NULL;
+ }
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_TrackControl(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
-
- ControlPartCode _rv;
- Point startPoint;
- ControlActionUPP upp = 0;
- PyObject *callback = 0;
-
- if (!PyArg_ParseTuple(_args, "O&|O",
- PyMac_GetPoint, &startPoint, &callback))
- return NULL;
- if (callback && callback != Py_None) {
- if (PyInt_Check(callback) && PyInt_AS_LONG(callback) == -1)
- upp = (ControlActionUPP)-1;
- else {
- settrackfunc(callback);
- upp = mytracker_upp;
- }
- }
- _rv = TrackControl(_self->ob_itself,
- startPoint,
- upp);
- clrtrackfunc();
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ PyObject *_res = NULL;
+
+ ControlPartCode _rv;
+ Point startPoint;
+ ControlActionUPP upp = 0;
+ PyObject *callback = 0;
+
+ if (!PyArg_ParseTuple(_args, "O&|O",
+ PyMac_GetPoint, &startPoint, &callback))
+ return NULL;
+ if (callback && callback != Py_None) {
+ if (PyInt_Check(callback) && PyInt_AS_LONG(callback) == -1)
+ upp = (ControlActionUPP)-1;
+ else {
+ settrackfunc(callback);
+ upp = mytracker_upp;
+ }
+ }
+ _rv = TrackControl(_self->ob_itself,
+ startPoint,
+ upp);
+ clrtrackfunc();
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *CtlObj_HandleControlClick(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
-
- ControlPartCode _rv;
- Point startPoint;
- SInt16 modifiers;
- ControlActionUPP upp = 0;
- PyObject *callback = 0;
-
- if (!PyArg_ParseTuple(_args, "O&h|O",
- PyMac_GetPoint, &startPoint,
- &modifiers,
- &callback))
- return NULL;
- if (callback && callback != Py_None) {
- if (PyInt_Check(callback) && PyInt_AS_LONG(callback) == -1)
- upp = (ControlActionUPP)-1;
- else {
- settrackfunc(callback);
- upp = mytracker_upp;
- }
- }
- _rv = HandleControlClick(_self->ob_itself,
- startPoint,
- modifiers,
- upp);
- clrtrackfunc();
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ PyObject *_res = NULL;
+
+ ControlPartCode _rv;
+ Point startPoint;
+ SInt16 modifiers;
+ ControlActionUPP upp = 0;
+ PyObject *callback = 0;
+
+ if (!PyArg_ParseTuple(_args, "O&h|O",
+ PyMac_GetPoint, &startPoint,
+ &modifiers,
+ &callback))
+ return NULL;
+ if (callback && callback != Py_None) {
+ if (PyInt_Check(callback) && PyInt_AS_LONG(callback) == -1)
+ upp = (ControlActionUPP)-1;
+ else {
+ settrackfunc(callback);
+ upp = mytracker_upp;
+ }
+ }
+ _rv = HandleControlClick(_self->ob_itself,
+ startPoint,
+ modifiers,
+ upp);
+ clrtrackfunc();
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *CtlObj_SetControlData(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
- OSErr _err;
- ControlPartCode inPart;
- ResType inTagName;
- Size bufferSize;
- Ptr buffer;
+ OSErr _err;
+ ControlPartCode inPart;
+ ResType inTagName;
+ Size bufferSize;
+ Ptr buffer;
- if (!PyArg_ParseTuple(_args, "hO&s#",
- &inPart,
- PyMac_GetOSType, &inTagName,
- &buffer, &bufferSize))
- return NULL;
+ if (!PyArg_ParseTuple(_args, "hO&s#",
+ &inPart,
+ PyMac_GetOSType, &inTagName,
+ &buffer, &bufferSize))
+ return NULL;
- _err = SetControlData(_self->ob_itself,
- inPart,
- inTagName,
- bufferSize,
- buffer);
+ _err = SetControlData(_self->ob_itself,
+ inPart,
+ inTagName,
+ bufferSize,
+ buffer);
- if (_err != noErr)
- return PyMac_Error(_err);
- _res = Py_None;
- return _res;
+ if (_err != noErr)
+ return PyMac_Error(_err);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_GetControlData(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
-
- OSErr _err;
- ControlPartCode inPart;
- ResType inTagName;
- Size bufferSize;
- Ptr buffer;
- Size outSize;
-
- if (!PyArg_ParseTuple(_args, "hO&",
- &inPart,
- PyMac_GetOSType, &inTagName))
- return NULL;
-
- /* allocate a buffer for the data */
- _err = GetControlDataSize(_self->ob_itself,
- inPart,
- inTagName,
- &bufferSize);
- if (_err != noErr)
- return PyMac_Error(_err);
- buffer = PyMem_NEW(char, bufferSize);
- if (buffer == NULL)
- return PyErr_NoMemory();
-
- _err = GetControlData(_self->ob_itself,
- inPart,
- inTagName,
- bufferSize,
- buffer,
- &outSize);
-
- if (_err != noErr) {
- PyMem_DEL(buffer);
- return PyMac_Error(_err);
- }
- _res = Py_BuildValue("s#", buffer, outSize);
- PyMem_DEL(buffer);
- return _res;
+ PyObject *_res = NULL;
+
+ OSErr _err;
+ ControlPartCode inPart;
+ ResType inTagName;
+ Size bufferSize;
+ Ptr buffer;
+ Size outSize;
+
+ if (!PyArg_ParseTuple(_args, "hO&",
+ &inPart,
+ PyMac_GetOSType, &inTagName))
+ return NULL;
+
+ /* allocate a buffer for the data */
+ _err = GetControlDataSize(_self->ob_itself,
+ inPart,
+ inTagName,
+ &bufferSize);
+ if (_err != noErr)
+ return PyMac_Error(_err);
+ buffer = PyMem_NEW(char, bufferSize);
+ if (buffer == NULL)
+ return PyErr_NoMemory();
+
+ _err = GetControlData(_self->ob_itself,
+ inPart,
+ inTagName,
+ bufferSize,
+ buffer,
+ &outSize);
+
+ if (_err != noErr) {
+ PyMem_DEL(buffer);
+ return PyMac_Error(_err);
+ }
+ _res = Py_BuildValue("s#", buffer, outSize);
+ PyMem_DEL(buffer);
+ return _res;
}
static PyObject *CtlObj_SetControlData_Handle(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
- OSErr _err;
- ControlPartCode inPart;
- ResType inTagName;
- Handle buffer;
+ OSErr _err;
+ ControlPartCode inPart;
+ ResType inTagName;
+ Handle buffer;
- if (!PyArg_ParseTuple(_args, "hO&O&",
- &inPart,
- PyMac_GetOSType, &inTagName,
- OptResObj_Convert, &buffer))
- return NULL;
+ if (!PyArg_ParseTuple(_args, "hO&O&",
+ &inPart,
+ PyMac_GetOSType, &inTagName,
+ OptResObj_Convert, &buffer))
+ return NULL;
- _err = SetControlData(_self->ob_itself,
- inPart,
- inTagName,
- sizeof(buffer),
- (Ptr)&buffer);
+ _err = SetControlData(_self->ob_itself,
+ inPart,
+ inTagName,
+ sizeof(buffer),
+ (Ptr)&buffer);
- if (_err != noErr)
- return PyMac_Error(_err);
- _res = Py_None;
- return _res;
+ if (_err != noErr)
+ return PyMac_Error(_err);
+ _res = Py_None;
+ return _res;
}
static PyObject *CtlObj_GetControlData_Handle(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
-
- OSErr _err;
- ControlPartCode inPart;
- ResType inTagName;
- Size bufferSize;
- Handle hdl;
-
- if (!PyArg_ParseTuple(_args, "hO&",
- &inPart,
- PyMac_GetOSType, &inTagName))
- return NULL;
-
- /* Check it is handle-sized */
- _err = GetControlDataSize(_self->ob_itself,
- inPart,
- inTagName,
- &bufferSize);
- if (_err != noErr)
- return PyMac_Error(_err);
- if (bufferSize != sizeof(Handle)) {
- PyErr_SetString(Ctl_Error, "GetControlDataSize() != sizeof(Handle)");
- return NULL;
- }
-
- _err = GetControlData(_self->ob_itself,
- inPart,
- inTagName,
- sizeof(Handle),
- (Ptr)&hdl,
- &bufferSize);
-
- if (_err != noErr) {
- return PyMac_Error(_err);
- }
- _res = Py_BuildValue("O&", OptResObj_New, hdl);
- return _res;
+ PyObject *_res = NULL;
+
+ OSErr _err;
+ ControlPartCode inPart;
+ ResType inTagName;
+ Size bufferSize;
+ Handle hdl;
+
+ if (!PyArg_ParseTuple(_args, "hO&",
+ &inPart,
+ PyMac_GetOSType, &inTagName))
+ return NULL;
+
+ /* Check it is handle-sized */
+ _err = GetControlDataSize(_self->ob_itself,
+ inPart,
+ inTagName,
+ &bufferSize);
+ if (_err != noErr)
+ return PyMac_Error(_err);
+ if (bufferSize != sizeof(Handle)) {
+ PyErr_SetString(Ctl_Error, "GetControlDataSize() != sizeof(Handle)");
+ return NULL;
+ }
+
+ _err = GetControlData(_self->ob_itself,
+ inPart,
+ inTagName,
+ sizeof(Handle),
+ (Ptr)&hdl,
+ &bufferSize);
+
+ if (_err != noErr) {
+ return PyMac_Error(_err);
+ }
+ _res = Py_BuildValue("O&", OptResObj_New, hdl);
+ return _res;
}
static PyObject *CtlObj_SetControlData_Callback(ControlObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
- OSErr _err;
- ControlPartCode inPart;
- ResType inTagName;
- PyObject *callback;
- UniversalProcPtr c_callback;
+ OSErr _err;
+ ControlPartCode inPart;
+ ResType inTagName;
+ PyObject *callback;
+ UniversalProcPtr c_callback;
- if (!PyArg_ParseTuple(_args, "hO&O",
- &inPart,
- PyMac_GetOSType, &inTagName,
- &callback))
- return NULL;
+ if (!PyArg_ParseTuple(_args, "hO&O",
+ &inPart,
+ PyMac_GetOSType, &inTagName,
+ &callback))
+ return NULL;
- if ( setcallback((PyObject *)_self, inTagName, callback, &c_callback) < 0 )
- return NULL;
- _err = SetControlData(_self->ob_itself,
- inPart,
- inTagName,
- sizeof(c_callback),
- (Ptr)&c_callback);
+ if ( setcallback((PyObject *)_self, inTagName, callback, &c_callback) < 0 )
+ return NULL;
+ _err = SetControlData(_self->ob_itself,
+ inPart,
+ inTagName,
+ sizeof(c_callback),
+ (Ptr)&c_callback);
- if (_err != noErr)
- return PyMac_Error(_err);
- _res = Py_None;
- return _res;
+ if (_err != noErr)
+ return PyMac_Error(_err);
+ _res = Py_None;
+ return _res;
}
static PyMethodDef CtlObj_methods[] = {
- {"HiliteControl", (PyCFunction)CtlObj_HiliteControl, 1,
- PyDoc_STR("(ControlPartCode hiliteState) -> None")},
- {"ShowControl", (PyCFunction)CtlObj_ShowControl, 1,
- PyDoc_STR("() -> None")},
- {"HideControl", (PyCFunction)CtlObj_HideControl, 1,
- PyDoc_STR("() -> None")},
- {"IsControlActive", (PyCFunction)CtlObj_IsControlActive, 1,
- PyDoc_STR("() -> (Boolean _rv)")},
- {"IsControlVisible", (PyCFunction)CtlObj_IsControlVisible, 1,
- PyDoc_STR("() -> (Boolean _rv)")},
- {"ActivateControl", (PyCFunction)CtlObj_ActivateControl, 1,
- PyDoc_STR("() -> None")},
- {"DeactivateControl", (PyCFunction)CtlObj_DeactivateControl, 1,
- PyDoc_STR("() -> None")},
- {"SetControlVisibility", (PyCFunction)CtlObj_SetControlVisibility, 1,
- PyDoc_STR("(Boolean inIsVisible, Boolean inDoDraw) -> None")},
- {"IsControlEnabled", (PyCFunction)CtlObj_IsControlEnabled, 1,
- PyDoc_STR("() -> (Boolean _rv)")},
- {"EnableControl", (PyCFunction)CtlObj_EnableControl, 1,
- PyDoc_STR("() -> None")},
- {"DisableControl", (PyCFunction)CtlObj_DisableControl, 1,
- PyDoc_STR("() -> None")},
- {"Draw1Control", (PyCFunction)CtlObj_Draw1Control, 1,
- PyDoc_STR("() -> None")},
- {"GetBestControlRect", (PyCFunction)CtlObj_GetBestControlRect, 1,
- PyDoc_STR("() -> (Rect outRect, SInt16 outBaseLineOffset)")},
- {"SetControlFontStyle", (PyCFunction)CtlObj_SetControlFontStyle, 1,
- PyDoc_STR("(ControlFontStyleRec inStyle) -> None")},
- {"DrawControlInCurrentPort", (PyCFunction)CtlObj_DrawControlInCurrentPort, 1,
- PyDoc_STR("() -> None")},
- {"SetUpControlBackground", (PyCFunction)CtlObj_SetUpControlBackground, 1,
- PyDoc_STR("(SInt16 inDepth, Boolean inIsColorDevice) -> None")},
- {"SetUpControlTextColor", (PyCFunction)CtlObj_SetUpControlTextColor, 1,
- PyDoc_STR("(SInt16 inDepth, Boolean inIsColorDevice) -> None")},
- {"DragControl", (PyCFunction)CtlObj_DragControl, 1,
- PyDoc_STR("(Point startPoint, Rect limitRect, Rect slopRect, DragConstraint axis) -> None")},
- {"TestControl", (PyCFunction)CtlObj_TestControl, 1,
- PyDoc_STR("(Point testPoint) -> (ControlPartCode _rv)")},
- {"HandleControlContextualMenuClick", (PyCFunction)CtlObj_HandleControlContextualMenuClick, 1,
- PyDoc_STR("(Point inWhere) -> (Boolean menuDisplayed)")},
- {"GetControlClickActivation", (PyCFunction)CtlObj_GetControlClickActivation, 1,
- PyDoc_STR("(Point inWhere, EventModifiers inModifiers) -> (ClickActivationResult outResult)")},
- {"HandleControlKey", (PyCFunction)CtlObj_HandleControlKey, 1,
- PyDoc_STR("(SInt16 inKeyCode, SInt16 inCharCode, EventModifiers inModifiers) -> (ControlPartCode _rv)")},
- {"HandleControlSetCursor", (PyCFunction)CtlObj_HandleControlSetCursor, 1,
- PyDoc_STR("(Point localPoint, EventModifiers modifiers) -> (Boolean cursorWasSet)")},
- {"MoveControl", (PyCFunction)CtlObj_MoveControl, 1,
- PyDoc_STR("(SInt16 h, SInt16 v) -> None")},
- {"SizeControl", (PyCFunction)CtlObj_SizeControl, 1,
- PyDoc_STR("(SInt16 w, SInt16 h) -> None")},
- {"SetControlTitle", (PyCFunction)CtlObj_SetControlTitle, 1,
- PyDoc_STR("(Str255 title) -> None")},
- {"GetControlTitle", (PyCFunction)CtlObj_GetControlTitle, 1,
- PyDoc_STR("() -> (Str255 title)")},
- {"SetControlTitleWithCFString", (PyCFunction)CtlObj_SetControlTitleWithCFString, 1,
- PyDoc_STR("(CFStringRef inString) -> None")},
- {"CopyControlTitleAsCFString", (PyCFunction)CtlObj_CopyControlTitleAsCFString, 1,
- PyDoc_STR("() -> (CFStringRef outString)")},
- {"GetControlValue", (PyCFunction)CtlObj_GetControlValue, 1,
- PyDoc_STR("() -> (SInt16 _rv)")},
- {"SetControlValue", (PyCFunction)CtlObj_SetControlValue, 1,
- PyDoc_STR("(SInt16 newValue) -> None")},
- {"GetControlMinimum", (PyCFunction)CtlObj_GetControlMinimum, 1,
- PyDoc_STR("() -> (SInt16 _rv)")},
- {"SetControlMinimum", (PyCFunction)CtlObj_SetControlMinimum, 1,
- PyDoc_STR("(SInt16 newMinimum) -> None")},
- {"GetControlMaximum", (PyCFunction)CtlObj_GetControlMaximum, 1,
- PyDoc_STR("() -> (SInt16 _rv)")},
- {"SetControlMaximum", (PyCFunction)CtlObj_SetControlMaximum, 1,
- PyDoc_STR("(SInt16 newMaximum) -> None")},
- {"GetControlViewSize", (PyCFunction)CtlObj_GetControlViewSize, 1,
- PyDoc_STR("() -> (SInt32 _rv)")},
- {"SetControlViewSize", (PyCFunction)CtlObj_SetControlViewSize, 1,
- PyDoc_STR("(SInt32 newViewSize) -> None")},
- {"GetControl32BitValue", (PyCFunction)CtlObj_GetControl32BitValue, 1,
- PyDoc_STR("() -> (SInt32 _rv)")},
- {"SetControl32BitValue", (PyCFunction)CtlObj_SetControl32BitValue, 1,
- PyDoc_STR("(SInt32 newValue) -> None")},
- {"GetControl32BitMaximum", (PyCFunction)CtlObj_GetControl32BitMaximum, 1,
- PyDoc_STR("() -> (SInt32 _rv)")},
- {"SetControl32BitMaximum", (PyCFunction)CtlObj_SetControl32BitMaximum, 1,
- PyDoc_STR("(SInt32 newMaximum) -> None")},
- {"GetControl32BitMinimum", (PyCFunction)CtlObj_GetControl32BitMinimum, 1,
- PyDoc_STR("() -> (SInt32 _rv)")},
- {"SetControl32BitMinimum", (PyCFunction)CtlObj_SetControl32BitMinimum, 1,
- PyDoc_STR("(SInt32 newMinimum) -> None")},
- {"IsValidControlHandle", (PyCFunction)CtlObj_IsValidControlHandle, 1,
- PyDoc_STR("() -> (Boolean _rv)")},
- {"SetControlID", (PyCFunction)CtlObj_SetControlID, 1,
- PyDoc_STR("(ControlID inID) -> None")},
- {"GetControlID", (PyCFunction)CtlObj_GetControlID, 1,
- PyDoc_STR("() -> (ControlID outID)")},
- {"SetControlCommandID", (PyCFunction)CtlObj_SetControlCommandID, 1,
- PyDoc_STR("(UInt32 inCommandID) -> None")},
- {"GetControlCommandID", (PyCFunction)CtlObj_GetControlCommandID, 1,
- PyDoc_STR("() -> (UInt32 outCommandID)")},
- {"RemoveControlProperty", (PyCFunction)CtlObj_RemoveControlProperty, 1,
- PyDoc_STR("(OSType propertyCreator, OSType propertyTag) -> None")},
- {"GetControlPropertyAttributes", (PyCFunction)CtlObj_GetControlPropertyAttributes, 1,
- PyDoc_STR("(OSType propertyCreator, OSType propertyTag) -> (UInt32 attributes)")},
- {"ChangeControlPropertyAttributes", (PyCFunction)CtlObj_ChangeControlPropertyAttributes, 1,
- PyDoc_STR("(OSType propertyCreator, OSType propertyTag, UInt32 attributesToSet, UInt32 attributesToClear) -> None")},
- {"GetControlRegion", (PyCFunction)CtlObj_GetControlRegion, 1,
- PyDoc_STR("(ControlPartCode inPart, RgnHandle outRegion) -> None")},
- {"GetControlVariant", (PyCFunction)CtlObj_GetControlVariant, 1,
- PyDoc_STR("() -> (ControlVariant _rv)")},
- {"SetControlAction", (PyCFunction)CtlObj_SetControlAction, 1,
- PyDoc_STR("(PyObject* actionProc) -> None")},
- {"SetControlReference", (PyCFunction)CtlObj_SetControlReference, 1,
- PyDoc_STR("(SInt32 data) -> None")},
- {"GetControlReference", (PyCFunction)CtlObj_GetControlReference, 1,
- PyDoc_STR("() -> (SInt32 _rv)")},
- {"EmbedControl", (PyCFunction)CtlObj_EmbedControl, 1,
- PyDoc_STR("(ControlHandle inContainer) -> None")},
- {"AutoEmbedControl", (PyCFunction)CtlObj_AutoEmbedControl, 1,
- PyDoc_STR("(WindowPtr inWindow) -> None")},
- {"GetSuperControl", (PyCFunction)CtlObj_GetSuperControl, 1,
- PyDoc_STR("() -> (ControlHandle outParent)")},
- {"CountSubControls", (PyCFunction)CtlObj_CountSubControls, 1,
- PyDoc_STR("() -> (UInt16 outNumChildren)")},
- {"GetIndexedSubControl", (PyCFunction)CtlObj_GetIndexedSubControl, 1,
- PyDoc_STR("(UInt16 inIndex) -> (ControlHandle outSubControl)")},
- {"SetControlSupervisor", (PyCFunction)CtlObj_SetControlSupervisor, 1,
- PyDoc_STR("(ControlHandle inBoss) -> None")},
- {"GetControlFeatures", (PyCFunction)CtlObj_GetControlFeatures, 1,
- PyDoc_STR("() -> (UInt32 outFeatures)")},
- {"GetControlDataSize", (PyCFunction)CtlObj_GetControlDataSize, 1,
- PyDoc_STR("(ControlPartCode inPart, ResType inTagName) -> (Size outMaxSize)")},
- {"HandleControlDragTracking", (PyCFunction)CtlObj_HandleControlDragTracking, 1,
- PyDoc_STR("(DragTrackingMessage inMessage, DragReference inDrag) -> (Boolean outLikesDrag)")},
- {"HandleControlDragReceive", (PyCFunction)CtlObj_HandleControlDragReceive, 1,
- PyDoc_STR("(DragReference inDrag) -> None")},
- {"SetControlDragTrackingEnabled", (PyCFunction)CtlObj_SetControlDragTrackingEnabled, 1,
- PyDoc_STR("(Boolean inTracks) -> None")},
- {"IsControlDragTrackingEnabled", (PyCFunction)CtlObj_IsControlDragTrackingEnabled, 1,
- PyDoc_STR("() -> (Boolean outTracks)")},
- {"GetControlBounds", (PyCFunction)CtlObj_GetControlBounds, 1,
- PyDoc_STR("() -> (Rect bounds)")},
- {"IsControlHilited", (PyCFunction)CtlObj_IsControlHilited, 1,
- PyDoc_STR("() -> (Boolean _rv)")},
- {"GetControlHilite", (PyCFunction)CtlObj_GetControlHilite, 1,
- PyDoc_STR("() -> (UInt16 _rv)")},
- {"GetControlOwner", (PyCFunction)CtlObj_GetControlOwner, 1,
- PyDoc_STR("() -> (WindowPtr _rv)")},
- {"GetControlDataHandle", (PyCFunction)CtlObj_GetControlDataHandle, 1,
- PyDoc_STR("() -> (Handle _rv)")},
- {"GetControlPopupMenuHandle", (PyCFunction)CtlObj_GetControlPopupMenuHandle, 1,
- PyDoc_STR("() -> (MenuHandle _rv)")},
- {"GetControlPopupMenuID", (PyCFunction)CtlObj_GetControlPopupMenuID, 1,
- PyDoc_STR("() -> (short _rv)")},
- {"SetControlDataHandle", (PyCFunction)CtlObj_SetControlDataHandle, 1,
- PyDoc_STR("(Handle dataHandle) -> None")},
- {"SetControlBounds", (PyCFunction)CtlObj_SetControlBounds, 1,
- PyDoc_STR("(Rect bounds) -> None")},
- {"SetControlPopupMenuHandle", (PyCFunction)CtlObj_SetControlPopupMenuHandle, 1,
- PyDoc_STR("(MenuHandle popupMenu) -> None")},
- {"SetControlPopupMenuID", (PyCFunction)CtlObj_SetControlPopupMenuID, 1,
- PyDoc_STR("(short menuID) -> None")},
- {"GetBevelButtonMenuValue", (PyCFunction)CtlObj_GetBevelButtonMenuValue, 1,
- PyDoc_STR("() -> (SInt16 outValue)")},
- {"SetBevelButtonMenuValue", (PyCFunction)CtlObj_SetBevelButtonMenuValue, 1,
- PyDoc_STR("(SInt16 inValue) -> None")},
- {"GetBevelButtonMenuHandle", (PyCFunction)CtlObj_GetBevelButtonMenuHandle, 1,
- PyDoc_STR("() -> (MenuHandle outHandle)")},
- {"SetBevelButtonContentInfo", (PyCFunction)CtlObj_SetBevelButtonContentInfo, 1,
- PyDoc_STR("(ControlButtonContentInfo inContent) -> None")},
- {"SetBevelButtonTransform", (PyCFunction)CtlObj_SetBevelButtonTransform, 1,
- PyDoc_STR("(IconTransformType transform) -> None")},
- {"SetDisclosureTriangleLastValue", (PyCFunction)CtlObj_SetDisclosureTriangleLastValue, 1,
- PyDoc_STR("(SInt16 inValue) -> None")},
- {"GetTabContentRect", (PyCFunction)CtlObj_GetTabContentRect, 1,
- PyDoc_STR("() -> (Rect outContentRect)")},
- {"SetTabEnabled", (PyCFunction)CtlObj_SetTabEnabled, 1,
- PyDoc_STR("(SInt16 inTabToHilite, Boolean inEnabled) -> None")},
- {"SetImageWellContentInfo", (PyCFunction)CtlObj_SetImageWellContentInfo, 1,
- PyDoc_STR("(ControlButtonContentInfo inContent) -> None")},
- {"SetImageWellTransform", (PyCFunction)CtlObj_SetImageWellTransform, 1,
- PyDoc_STR("(IconTransformType inTransform) -> None")},
- {"GetDataBrowserViewStyle", (PyCFunction)CtlObj_GetDataBrowserViewStyle, 1,
- PyDoc_STR("() -> (OSType style)")},
- {"SetDataBrowserViewStyle", (PyCFunction)CtlObj_SetDataBrowserViewStyle, 1,
- PyDoc_STR("(OSType style) -> None")},
- {"EnableDataBrowserEditCommand", (PyCFunction)CtlObj_EnableDataBrowserEditCommand, 1,
- PyDoc_STR("(UInt32 command) -> (Boolean _rv)")},
- {"ExecuteDataBrowserEditCommand", (PyCFunction)CtlObj_ExecuteDataBrowserEditCommand, 1,
- PyDoc_STR("(UInt32 command) -> None")},
- {"GetDataBrowserSelectionAnchor", (PyCFunction)CtlObj_GetDataBrowserSelectionAnchor, 1,
- PyDoc_STR("() -> (UInt32 first, UInt32 last)")},
- {"MoveDataBrowserSelectionAnchor", (PyCFunction)CtlObj_MoveDataBrowserSelectionAnchor, 1,
- PyDoc_STR("(UInt32 direction, Boolean extendSelection) -> None")},
- {"OpenDataBrowserContainer", (PyCFunction)CtlObj_OpenDataBrowserContainer, 1,
- PyDoc_STR("(UInt32 container) -> None")},
- {"CloseDataBrowserContainer", (PyCFunction)CtlObj_CloseDataBrowserContainer, 1,
- PyDoc_STR("(UInt32 container) -> None")},
- {"SortDataBrowserContainer", (PyCFunction)CtlObj_SortDataBrowserContainer, 1,
- PyDoc_STR("(UInt32 container, Boolean sortChildren) -> None")},
- {"GetDataBrowserItems", (PyCFunction)CtlObj_GetDataBrowserItems, 1,
- PyDoc_STR("(UInt32 container, Boolean recurse, UInt32 state, Handle items) -> None")},
- {"GetDataBrowserItemCount", (PyCFunction)CtlObj_GetDataBrowserItemCount, 1,
- PyDoc_STR("(UInt32 container, Boolean recurse, UInt32 state) -> (UInt32 numItems)")},
- {"IsDataBrowserItemSelected", (PyCFunction)CtlObj_IsDataBrowserItemSelected, 1,
- PyDoc_STR("(UInt32 item) -> (Boolean _rv)")},
- {"GetDataBrowserItemState", (PyCFunction)CtlObj_GetDataBrowserItemState, 1,
- PyDoc_STR("(UInt32 item) -> (UInt32 state)")},
- {"RevealDataBrowserItem", (PyCFunction)CtlObj_RevealDataBrowserItem, 1,
- PyDoc_STR("(UInt32 item, UInt32 propertyID, UInt8 options) -> None")},
- {"SetDataBrowserActiveItems", (PyCFunction)CtlObj_SetDataBrowserActiveItems, 1,
- PyDoc_STR("(Boolean active) -> None")},
- {"GetDataBrowserActiveItems", (PyCFunction)CtlObj_GetDataBrowserActiveItems, 1,
- PyDoc_STR("() -> (Boolean active)")},
- {"SetDataBrowserScrollBarInset", (PyCFunction)CtlObj_SetDataBrowserScrollBarInset, 1,
- PyDoc_STR("() -> (Rect insetRect)")},
- {"GetDataBrowserScrollBarInset", (PyCFunction)CtlObj_GetDataBrowserScrollBarInset, 1,
- PyDoc_STR("() -> (Rect insetRect)")},
- {"SetDataBrowserTarget", (PyCFunction)CtlObj_SetDataBrowserTarget, 1,
- PyDoc_STR("(UInt32 target) -> None")},
- {"GetDataBrowserTarget", (PyCFunction)CtlObj_GetDataBrowserTarget, 1,
- PyDoc_STR("() -> (UInt32 target)")},
- {"SetDataBrowserSortOrder", (PyCFunction)CtlObj_SetDataBrowserSortOrder, 1,
- PyDoc_STR("(UInt16 order) -> None")},
- {"GetDataBrowserSortOrder", (PyCFunction)CtlObj_GetDataBrowserSortOrder, 1,
- PyDoc_STR("() -> (UInt16 order)")},
- {"SetDataBrowserScrollPosition", (PyCFunction)CtlObj_SetDataBrowserScrollPosition, 1,
- PyDoc_STR("(UInt32 top, UInt32 left) -> None")},
- {"GetDataBrowserScrollPosition", (PyCFunction)CtlObj_GetDataBrowserScrollPosition, 1,
- PyDoc_STR("() -> (UInt32 top, UInt32 left)")},
- {"SetDataBrowserHasScrollBars", (PyCFunction)CtlObj_SetDataBrowserHasScrollBars, 1,
- PyDoc_STR("(Boolean horiz, Boolean vert) -> None")},
- {"GetDataBrowserHasScrollBars", (PyCFunction)CtlObj_GetDataBrowserHasScrollBars, 1,
- PyDoc_STR("() -> (Boolean horiz, Boolean vert)")},
- {"SetDataBrowserSortProperty", (PyCFunction)CtlObj_SetDataBrowserSortProperty, 1,
- PyDoc_STR("(UInt32 property) -> None")},
- {"GetDataBrowserSortProperty", (PyCFunction)CtlObj_GetDataBrowserSortProperty, 1,
- PyDoc_STR("() -> (UInt32 property)")},
- {"SetDataBrowserSelectionFlags", (PyCFunction)CtlObj_SetDataBrowserSelectionFlags, 1,
- PyDoc_STR("(UInt32 selectionFlags) -> None")},
- {"GetDataBrowserSelectionFlags", (PyCFunction)CtlObj_GetDataBrowserSelectionFlags, 1,
- PyDoc_STR("() -> (UInt32 selectionFlags)")},
- {"SetDataBrowserPropertyFlags", (PyCFunction)CtlObj_SetDataBrowserPropertyFlags, 1,
- PyDoc_STR("(UInt32 property, UInt32 flags) -> None")},
- {"GetDataBrowserPropertyFlags", (PyCFunction)CtlObj_GetDataBrowserPropertyFlags, 1,
- PyDoc_STR("(UInt32 property) -> (UInt32 flags)")},
- {"SetDataBrowserEditText", (PyCFunction)CtlObj_SetDataBrowserEditText, 1,
- PyDoc_STR("(CFStringRef text) -> None")},
- {"CopyDataBrowserEditText", (PyCFunction)CtlObj_CopyDataBrowserEditText, 1,
- PyDoc_STR("() -> (CFStringRef text)")},
- {"GetDataBrowserEditText", (PyCFunction)CtlObj_GetDataBrowserEditText, 1,
- PyDoc_STR("(CFMutableStringRef text) -> None")},
- {"SetDataBrowserEditItem", (PyCFunction)CtlObj_SetDataBrowserEditItem, 1,
- PyDoc_STR("(UInt32 item, UInt32 property) -> None")},
- {"GetDataBrowserEditItem", (PyCFunction)CtlObj_GetDataBrowserEditItem, 1,
- PyDoc_STR("() -> (UInt32 item, UInt32 property)")},
- {"GetDataBrowserItemPartBounds", (PyCFunction)CtlObj_GetDataBrowserItemPartBounds, 1,
- PyDoc_STR("(UInt32 item, UInt32 property, OSType part) -> (Rect bounds)")},
- {"RemoveDataBrowserTableViewColumn", (PyCFunction)CtlObj_RemoveDataBrowserTableViewColumn, 1,
- PyDoc_STR("(UInt32 column) -> None")},
- {"GetDataBrowserTableViewColumnCount", (PyCFunction)CtlObj_GetDataBrowserTableViewColumnCount, 1,
- PyDoc_STR("() -> (UInt32 numColumns)")},
- {"SetDataBrowserTableViewHiliteStyle", (PyCFunction)CtlObj_SetDataBrowserTableViewHiliteStyle, 1,
- PyDoc_STR("(UInt32 hiliteStyle) -> None")},
- {"GetDataBrowserTableViewHiliteStyle", (PyCFunction)CtlObj_GetDataBrowserTableViewHiliteStyle, 1,
- PyDoc_STR("() -> (UInt32 hiliteStyle)")},
- {"SetDataBrowserTableViewRowHeight", (PyCFunction)CtlObj_SetDataBrowserTableViewRowHeight, 1,
- PyDoc_STR("(UInt16 height) -> None")},
- {"GetDataBrowserTableViewRowHeight", (PyCFunction)CtlObj_GetDataBrowserTableViewRowHeight, 1,
- PyDoc_STR("() -> (UInt16 height)")},
- {"SetDataBrowserTableViewColumnWidth", (PyCFunction)CtlObj_SetDataBrowserTableViewColumnWidth, 1,
- PyDoc_STR("(UInt16 width) -> None")},
- {"GetDataBrowserTableViewColumnWidth", (PyCFunction)CtlObj_GetDataBrowserTableViewColumnWidth, 1,
- PyDoc_STR("() -> (UInt16 width)")},
- {"SetDataBrowserTableViewItemRowHeight", (PyCFunction)CtlObj_SetDataBrowserTableViewItemRowHeight, 1,
- PyDoc_STR("(UInt32 item, UInt16 height) -> None")},
- {"GetDataBrowserTableViewItemRowHeight", (PyCFunction)CtlObj_GetDataBrowserTableViewItemRowHeight, 1,
- PyDoc_STR("(UInt32 item) -> (UInt16 height)")},
- {"SetDataBrowserTableViewNamedColumnWidth", (PyCFunction)CtlObj_SetDataBrowserTableViewNamedColumnWidth, 1,
- PyDoc_STR("(UInt32 column, UInt16 width) -> None")},
- {"GetDataBrowserTableViewNamedColumnWidth", (PyCFunction)CtlObj_GetDataBrowserTableViewNamedColumnWidth, 1,
- PyDoc_STR("(UInt32 column) -> (UInt16 width)")},
- {"SetDataBrowserTableViewGeometry", (PyCFunction)CtlObj_SetDataBrowserTableViewGeometry, 1,
- PyDoc_STR("(Boolean variableWidthColumns, Boolean variableHeightRows) -> None")},
- {"GetDataBrowserTableViewGeometry", (PyCFunction)CtlObj_GetDataBrowserTableViewGeometry, 1,
- PyDoc_STR("() -> (Boolean variableWidthColumns, Boolean variableHeightRows)")},
- {"GetDataBrowserTableViewItemID", (PyCFunction)CtlObj_GetDataBrowserTableViewItemID, 1,
- PyDoc_STR("(UInt32 row) -> (UInt32 item)")},
- {"SetDataBrowserTableViewItemRow", (PyCFunction)CtlObj_SetDataBrowserTableViewItemRow, 1,
- PyDoc_STR("(UInt32 item, UInt32 row) -> None")},
- {"GetDataBrowserTableViewItemRow", (PyCFunction)CtlObj_GetDataBrowserTableViewItemRow, 1,
- PyDoc_STR("(UInt32 item) -> (UInt32 row)")},
- {"SetDataBrowserTableViewColumnPosition", (PyCFunction)CtlObj_SetDataBrowserTableViewColumnPosition, 1,
- PyDoc_STR("(UInt32 column, UInt32 position) -> None")},
- {"GetDataBrowserTableViewColumnPosition", (PyCFunction)CtlObj_GetDataBrowserTableViewColumnPosition, 1,
- PyDoc_STR("(UInt32 column) -> (UInt32 position)")},
- {"GetDataBrowserTableViewColumnProperty", (PyCFunction)CtlObj_GetDataBrowserTableViewColumnProperty, 1,
- PyDoc_STR("(UInt32 column) -> (UInt32 property)")},
- {"AutoSizeDataBrowserListViewColumns", (PyCFunction)CtlObj_AutoSizeDataBrowserListViewColumns, 1,
- PyDoc_STR("() -> None")},
- {"AddDataBrowserListViewColumn", (PyCFunction)CtlObj_AddDataBrowserListViewColumn, 1,
- PyDoc_STR("(DataBrowserListViewColumnDesc columnDesc, UInt32 position) -> None")},
- {"SetDataBrowserListViewHeaderBtnHeight", (PyCFunction)CtlObj_SetDataBrowserListViewHeaderBtnHeight, 1,
- PyDoc_STR("(UInt16 height) -> None")},
- {"GetDataBrowserListViewHeaderBtnHeight", (PyCFunction)CtlObj_GetDataBrowserListViewHeaderBtnHeight, 1,
- PyDoc_STR("() -> (UInt16 height)")},
- {"SetDataBrowserListViewUsePlainBackground", (PyCFunction)CtlObj_SetDataBrowserListViewUsePlainBackground, 1,
- PyDoc_STR("(Boolean usePlainBackground) -> None")},
- {"GetDataBrowserListViewUsePlainBackground", (PyCFunction)CtlObj_GetDataBrowserListViewUsePlainBackground, 1,
- PyDoc_STR("() -> (Boolean usePlainBackground)")},
- {"SetDataBrowserListViewDisclosureColumn", (PyCFunction)CtlObj_SetDataBrowserListViewDisclosureColumn, 1,
- PyDoc_STR("(UInt32 column, Boolean expandableRows) -> None")},
- {"GetDataBrowserListViewDisclosureColumn", (PyCFunction)CtlObj_GetDataBrowserListViewDisclosureColumn, 1,
- PyDoc_STR("() -> (UInt32 column, Boolean expandableRows)")},
- {"GetDataBrowserColumnViewPath", (PyCFunction)CtlObj_GetDataBrowserColumnViewPath, 1,
- PyDoc_STR("(Handle path) -> None")},
- {"GetDataBrowserColumnViewPathLength", (PyCFunction)CtlObj_GetDataBrowserColumnViewPathLength, 1,
- PyDoc_STR("() -> (UInt32 pathLength)")},
- {"SetDataBrowserColumnViewDisplayType", (PyCFunction)CtlObj_SetDataBrowserColumnViewDisplayType, 1,
- PyDoc_STR("(OSType propertyType) -> None")},
- {"GetDataBrowserColumnViewDisplayType", (PyCFunction)CtlObj_GetDataBrowserColumnViewDisplayType, 1,
- PyDoc_STR("() -> (OSType propertyType)")},
- {"as_Resource", (PyCFunction)CtlObj_as_Resource, 1,
- PyDoc_STR("() -> (Handle _rv)")},
- {"GetControlRect", (PyCFunction)CtlObj_GetControlRect, 1,
- PyDoc_STR("() -> (Rect rect)")},
- {"DisposeControl", (PyCFunction)CtlObj_DisposeControl, 1,
- PyDoc_STR("() -> None")},
- {"TrackControl", (PyCFunction)CtlObj_TrackControl, 1,
- PyDoc_STR("(Point startPoint [,trackercallback]) -> (ControlPartCode _rv)")},
- {"HandleControlClick", (PyCFunction)CtlObj_HandleControlClick, 1,
- PyDoc_STR("(Point startPoint, Integer modifiers, [,trackercallback]) -> (ControlPartCode _rv)")},
- {"SetControlData", (PyCFunction)CtlObj_SetControlData, 1,
- PyDoc_STR("(stuff) -> None")},
- {"GetControlData", (PyCFunction)CtlObj_GetControlData, 1,
- PyDoc_STR("(part, type) -> String")},
- {"SetControlData_Handle", (PyCFunction)CtlObj_SetControlData_Handle, 1,
- PyDoc_STR("(ResObj) -> None")},
- {"GetControlData_Handle", (PyCFunction)CtlObj_GetControlData_Handle, 1,
- PyDoc_STR("(part, type) -> ResObj")},
- {"SetControlData_Callback", (PyCFunction)CtlObj_SetControlData_Callback, 1,
- PyDoc_STR("(callbackfunc) -> None")},
- {NULL, NULL, 0}
+ {"HiliteControl", (PyCFunction)CtlObj_HiliteControl, 1,
+ PyDoc_STR("(ControlPartCode hiliteState) -> None")},
+ {"ShowControl", (PyCFunction)CtlObj_ShowControl, 1,
+ PyDoc_STR("() -> None")},
+ {"HideControl", (PyCFunction)CtlObj_HideControl, 1,
+ PyDoc_STR("() -> None")},
+ {"IsControlActive", (PyCFunction)CtlObj_IsControlActive, 1,
+ PyDoc_STR("() -> (Boolean _rv)")},
+ {"IsControlVisible", (PyCFunction)CtlObj_IsControlVisible, 1,
+ PyDoc_STR("() -> (Boolean _rv)")},
+ {"ActivateControl", (PyCFunction)CtlObj_ActivateControl, 1,
+ PyDoc_STR("() -> None")},
+ {"DeactivateControl", (PyCFunction)CtlObj_DeactivateControl, 1,
+ PyDoc_STR("() -> None")},
+ {"SetControlVisibility", (PyCFunction)CtlObj_SetControlVisibility, 1,
+ PyDoc_STR("(Boolean inIsVisible, Boolean inDoDraw) -> None")},
+ {"IsControlEnabled", (PyCFunction)CtlObj_IsControlEnabled, 1,
+ PyDoc_STR("() -> (Boolean _rv)")},
+ {"EnableControl", (PyCFunction)CtlObj_EnableControl, 1,
+ PyDoc_STR("() -> None")},
+ {"DisableControl", (PyCFunction)CtlObj_DisableControl, 1,
+ PyDoc_STR("() -> None")},
+ {"Draw1Control", (PyCFunction)CtlObj_Draw1Control, 1,
+ PyDoc_STR("() -> None")},
+ {"GetBestControlRect", (PyCFunction)CtlObj_GetBestControlRect, 1,
+ PyDoc_STR("() -> (Rect outRect, SInt16 outBaseLineOffset)")},
+ {"SetControlFontStyle", (PyCFunction)CtlObj_SetControlFontStyle, 1,
+ PyDoc_STR("(ControlFontStyleRec inStyle) -> None")},
+ {"DrawControlInCurrentPort", (PyCFunction)CtlObj_DrawControlInCurrentPort, 1,
+ PyDoc_STR("() -> None")},
+ {"SetUpControlBackground", (PyCFunction)CtlObj_SetUpControlBackground, 1,
+ PyDoc_STR("(SInt16 inDepth, Boolean inIsColorDevice) -> None")},
+ {"SetUpControlTextColor", (PyCFunction)CtlObj_SetUpControlTextColor, 1,
+ PyDoc_STR("(SInt16 inDepth, Boolean inIsColorDevice) -> None")},
+ {"DragControl", (PyCFunction)CtlObj_DragControl, 1,
+ PyDoc_STR("(Point startPoint, Rect limitRect, Rect slopRect, DragConstraint axis) -> None")},
+ {"TestControl", (PyCFunction)CtlObj_TestControl, 1,
+ PyDoc_STR("(Point testPoint) -> (ControlPartCode _rv)")},
+ {"HandleControlContextualMenuClick", (PyCFunction)CtlObj_HandleControlContextualMenuClick, 1,
+ PyDoc_STR("(Point inWhere) -> (Boolean menuDisplayed)")},
+ {"GetControlClickActivation", (PyCFunction)CtlObj_GetControlClickActivation, 1,
+ PyDoc_STR("(Point inWhere, EventModifiers inModifiers) -> (ClickActivationResult outResult)")},
+ {"HandleControlKey", (PyCFunction)CtlObj_HandleControlKey, 1,
+ PyDoc_STR("(SInt16 inKeyCode, SInt16 inCharCode, EventModifiers inModifiers) -> (ControlPartCode _rv)")},
+ {"HandleControlSetCursor", (PyCFunction)CtlObj_HandleControlSetCursor, 1,
+ PyDoc_STR("(Point localPoint, EventModifiers modifiers) -> (Boolean cursorWasSet)")},
+ {"MoveControl", (PyCFunction)CtlObj_MoveControl, 1,
+ PyDoc_STR("(SInt16 h, SInt16 v) -> None")},
+ {"SizeControl", (PyCFunction)CtlObj_SizeControl, 1,
+ PyDoc_STR("(SInt16 w, SInt16 h) -> None")},
+ {"SetControlTitle", (PyCFunction)CtlObj_SetControlTitle, 1,
+ PyDoc_STR("(Str255 title) -> None")},
+ {"GetControlTitle", (PyCFunction)CtlObj_GetControlTitle, 1,
+ PyDoc_STR("() -> (Str255 title)")},
+ {"SetControlTitleWithCFString", (PyCFunction)CtlObj_SetControlTitleWithCFString, 1,
+ PyDoc_STR("(CFStringRef inString) -> None")},
+ {"CopyControlTitleAsCFString", (PyCFunction)CtlObj_CopyControlTitleAsCFString, 1,
+ PyDoc_STR("() -> (CFStringRef outString)")},
+ {"GetControlValue", (PyCFunction)CtlObj_GetControlValue, 1,
+ PyDoc_STR("() -> (SInt16 _rv)")},
+ {"SetControlValue", (PyCFunction)CtlObj_SetControlValue, 1,
+ PyDoc_STR("(SInt16 newValue) -> None")},
+ {"GetControlMinimum", (PyCFunction)CtlObj_GetControlMinimum, 1,
+ PyDoc_STR("() -> (SInt16 _rv)")},
+ {"SetControlMinimum", (PyCFunction)CtlObj_SetControlMinimum, 1,
+ PyDoc_STR("(SInt16 newMinimum) -> None")},
+ {"GetControlMaximum", (PyCFunction)CtlObj_GetControlMaximum, 1,
+ PyDoc_STR("() -> (SInt16 _rv)")},
+ {"SetControlMaximum", (PyCFunction)CtlObj_SetControlMaximum, 1,
+ PyDoc_STR("(SInt16 newMaximum) -> None")},
+ {"GetControlViewSize", (PyCFunction)CtlObj_GetControlViewSize, 1,
+ PyDoc_STR("() -> (SInt32 _rv)")},
+ {"SetControlViewSize", (PyCFunction)CtlObj_SetControlViewSize, 1,
+ PyDoc_STR("(SInt32 newViewSize) -> None")},
+ {"GetControl32BitValue", (PyCFunction)CtlObj_GetControl32BitValue, 1,
+ PyDoc_STR("() -> (SInt32 _rv)")},
+ {"SetControl32BitValue", (PyCFunction)CtlObj_SetControl32BitValue, 1,
+ PyDoc_STR("(SInt32 newValue) -> None")},
+ {"GetControl32BitMaximum", (PyCFunction)CtlObj_GetControl32BitMaximum, 1,
+ PyDoc_STR("() -> (SInt32 _rv)")},
+ {"SetControl32BitMaximum", (PyCFunction)CtlObj_SetControl32BitMaximum, 1,
+ PyDoc_STR("(SInt32 newMaximum) -> None")},
+ {"GetControl32BitMinimum", (PyCFunction)CtlObj_GetControl32BitMinimum, 1,
+ PyDoc_STR("() -> (SInt32 _rv)")},
+ {"SetControl32BitMinimum", (PyCFunction)CtlObj_SetControl32BitMinimum, 1,
+ PyDoc_STR("(SInt32 newMinimum) -> None")},
+ {"IsValidControlHandle", (PyCFunction)CtlObj_IsValidControlHandle, 1,
+ PyDoc_STR("() -> (Boolean _rv)")},
+ {"SetControlID", (PyCFunction)CtlObj_SetControlID, 1,
+ PyDoc_STR("(ControlID inID) -> None")},
+ {"GetControlID", (PyCFunction)CtlObj_GetControlID, 1,
+ PyDoc_STR("() -> (ControlID outID)")},
+ {"SetControlCommandID", (PyCFunction)CtlObj_SetControlCommandID, 1,
+ PyDoc_STR("(UInt32 inCommandID) -> None")},
+ {"GetControlCommandID", (PyCFunction)CtlObj_GetControlCommandID, 1,
+ PyDoc_STR("() -> (UInt32 outCommandID)")},
+ {"RemoveControlProperty", (PyCFunction)CtlObj_RemoveControlProperty, 1,
+ PyDoc_STR("(OSType propertyCreator, OSType propertyTag) -> None")},
+ {"GetControlPropertyAttributes", (PyCFunction)CtlObj_GetControlPropertyAttributes, 1,
+ PyDoc_STR("(OSType propertyCreator, OSType propertyTag) -> (UInt32 attributes)")},
+ {"ChangeControlPropertyAttributes", (PyCFunction)CtlObj_ChangeControlPropertyAttributes, 1,
+ PyDoc_STR("(OSType propertyCreator, OSType propertyTag, UInt32 attributesToSet, UInt32 attributesToClear) -> None")},
+ {"GetControlRegion", (PyCFunction)CtlObj_GetControlRegion, 1,
+ PyDoc_STR("(ControlPartCode inPart, RgnHandle outRegion) -> None")},
+ {"GetControlVariant", (PyCFunction)CtlObj_GetControlVariant, 1,
+ PyDoc_STR("() -> (ControlVariant _rv)")},
+ {"SetControlAction", (PyCFunction)CtlObj_SetControlAction, 1,
+ PyDoc_STR("(PyObject* actionProc) -> None")},
+ {"SetControlReference", (PyCFunction)CtlObj_SetControlReference, 1,
+ PyDoc_STR("(SInt32 data) -> None")},
+ {"GetControlReference", (PyCFunction)CtlObj_GetControlReference, 1,
+ PyDoc_STR("() -> (SInt32 _rv)")},
+ {"EmbedControl", (PyCFunction)CtlObj_EmbedControl, 1,
+ PyDoc_STR("(ControlHandle inContainer) -> None")},
+ {"AutoEmbedControl", (PyCFunction)CtlObj_AutoEmbedControl, 1,
+ PyDoc_STR("(WindowPtr inWindow) -> None")},
+ {"GetSuperControl", (PyCFunction)CtlObj_GetSuperControl, 1,
+ PyDoc_STR("() -> (ControlHandle outParent)")},
+ {"CountSubControls", (PyCFunction)CtlObj_CountSubControls, 1,
+ PyDoc_STR("() -> (UInt16 outNumChildren)")},
+ {"GetIndexedSubControl", (PyCFunction)CtlObj_GetIndexedSubControl, 1,
+ PyDoc_STR("(UInt16 inIndex) -> (ControlHandle outSubControl)")},
+ {"SetControlSupervisor", (PyCFunction)CtlObj_SetControlSupervisor, 1,
+ PyDoc_STR("(ControlHandle inBoss) -> None")},
+ {"GetControlFeatures", (PyCFunction)CtlObj_GetControlFeatures, 1,
+ PyDoc_STR("() -> (UInt32 outFeatures)")},
+ {"GetControlDataSize", (PyCFunction)CtlObj_GetControlDataSize, 1,
+ PyDoc_STR("(ControlPartCode inPart, ResType inTagName) -> (Size outMaxSize)")},
+ {"HandleControlDragTracking", (PyCFunction)CtlObj_HandleControlDragTracking, 1,
+ PyDoc_STR("(DragTrackingMessage inMessage, DragReference inDrag) -> (Boolean outLikesDrag)")},
+ {"HandleControlDragReceive", (PyCFunction)CtlObj_HandleControlDragReceive, 1,
+ PyDoc_STR("(DragReference inDrag) -> None")},
+ {"SetControlDragTrackingEnabled", (PyCFunction)CtlObj_SetControlDragTrackingEnabled, 1,
+ PyDoc_STR("(Boolean inTracks) -> None")},
+ {"IsControlDragTrackingEnabled", (PyCFunction)CtlObj_IsControlDragTrackingEnabled, 1,
+ PyDoc_STR("() -> (Boolean outTracks)")},
+ {"GetControlBounds", (PyCFunction)CtlObj_GetControlBounds, 1,
+ PyDoc_STR("() -> (Rect bounds)")},
+ {"IsControlHilited", (PyCFunction)CtlObj_IsControlHilited, 1,
+ PyDoc_STR("() -> (Boolean _rv)")},
+ {"GetControlHilite", (PyCFunction)CtlObj_GetControlHilite, 1,
+ PyDoc_STR("() -> (UInt16 _rv)")},
+ {"GetControlOwner", (PyCFunction)CtlObj_GetControlOwner, 1,
+ PyDoc_STR("() -> (WindowPtr _rv)")},
+ {"GetControlDataHandle", (PyCFunction)CtlObj_GetControlDataHandle, 1,
+ PyDoc_STR("() -> (Handle _rv)")},
+ {"GetControlPopupMenuHandle", (PyCFunction)CtlObj_GetControlPopupMenuHandle, 1,
+ PyDoc_STR("() -> (MenuHandle _rv)")},
+ {"GetControlPopupMenuID", (PyCFunction)CtlObj_GetControlPopupMenuID, 1,
+ PyDoc_STR("() -> (short _rv)")},
+ {"SetControlDataHandle", (PyCFunction)CtlObj_SetControlDataHandle, 1,
+ PyDoc_STR("(Handle dataHandle) -> None")},
+ {"SetControlBounds", (PyCFunction)CtlObj_SetControlBounds, 1,
+ PyDoc_STR("(Rect bounds) -> None")},
+ {"SetControlPopupMenuHandle", (PyCFunction)CtlObj_SetControlPopupMenuHandle, 1,
+ PyDoc_STR("(MenuHandle popupMenu) -> None")},
+ {"SetControlPopupMenuID", (PyCFunction)CtlObj_SetControlPopupMenuID, 1,
+ PyDoc_STR("(short menuID) -> None")},
+ {"GetBevelButtonMenuValue", (PyCFunction)CtlObj_GetBevelButtonMenuValue, 1,
+ PyDoc_STR("() -> (SInt16 outValue)")},
+ {"SetBevelButtonMenuValue", (PyCFunction)CtlObj_SetBevelButtonMenuValue, 1,
+ PyDoc_STR("(SInt16 inValue) -> None")},
+ {"GetBevelButtonMenuHandle", (PyCFunction)CtlObj_GetBevelButtonMenuHandle, 1,
+ PyDoc_STR("() -> (MenuHandle outHandle)")},
+ {"SetBevelButtonContentInfo", (PyCFunction)CtlObj_SetBevelButtonContentInfo, 1,
+ PyDoc_STR("(ControlButtonContentInfo inContent) -> None")},
+ {"SetBevelButtonTransform", (PyCFunction)CtlObj_SetBevelButtonTransform, 1,
+ PyDoc_STR("(IconTransformType transform) -> None")},
+ {"SetDisclosureTriangleLastValue", (PyCFunction)CtlObj_SetDisclosureTriangleLastValue, 1,
+ PyDoc_STR("(SInt16 inValue) -> None")},
+ {"GetTabContentRect", (PyCFunction)CtlObj_GetTabContentRect, 1,
+ PyDoc_STR("() -> (Rect outContentRect)")},
+ {"SetTabEnabled", (PyCFunction)CtlObj_SetTabEnabled, 1,
+ PyDoc_STR("(SInt16 inTabToHilite, Boolean inEnabled) -> None")},
+ {"SetImageWellContentInfo", (PyCFunction)CtlObj_SetImageWellContentInfo, 1,
+ PyDoc_STR("(ControlButtonContentInfo inContent) -> None")},
+ {"SetImageWellTransform", (PyCFunction)CtlObj_SetImageWellTransform, 1,
+ PyDoc_STR("(IconTransformType inTransform) -> None")},
+ {"GetDataBrowserViewStyle", (PyCFunction)CtlObj_GetDataBrowserViewStyle, 1,
+ PyDoc_STR("() -> (OSType style)")},
+ {"SetDataBrowserViewStyle", (PyCFunction)CtlObj_SetDataBrowserViewStyle, 1,
+ PyDoc_STR("(OSType style) -> None")},
+ {"EnableDataBrowserEditCommand", (PyCFunction)CtlObj_EnableDataBrowserEditCommand, 1,
+ PyDoc_STR("(UInt32 command) -> (Boolean _rv)")},
+ {"ExecuteDataBrowserEditCommand", (PyCFunction)CtlObj_ExecuteDataBrowserEditCommand, 1,
+ PyDoc_STR("(UInt32 command) -> None")},
+ {"GetDataBrowserSelectionAnchor", (PyCFunction)CtlObj_GetDataBrowserSelectionAnchor, 1,
+ PyDoc_STR("() -> (UInt32 first, UInt32 last)")},
+ {"MoveDataBrowserSelectionAnchor", (PyCFunction)CtlObj_MoveDataBrowserSelectionAnchor, 1,
+ PyDoc_STR("(UInt32 direction, Boolean extendSelection) -> None")},
+ {"OpenDataBrowserContainer", (PyCFunction)CtlObj_OpenDataBrowserContainer, 1,
+ PyDoc_STR("(UInt32 container) -> None")},
+ {"CloseDataBrowserContainer", (PyCFunction)CtlObj_CloseDataBrowserContainer, 1,
+ PyDoc_STR("(UInt32 container) -> None")},
+ {"SortDataBrowserContainer", (PyCFunction)CtlObj_SortDataBrowserContainer, 1,
+ PyDoc_STR("(UInt32 container, Boolean sortChildren) -> None")},
+ {"GetDataBrowserItems", (PyCFunction)CtlObj_GetDataBrowserItems, 1,
+ PyDoc_STR("(UInt32 container, Boolean recurse, UInt32 state, Handle items) -> None")},
+ {"GetDataBrowserItemCount", (PyCFunction)CtlObj_GetDataBrowserItemCount, 1,
+ PyDoc_STR("(UInt32 container, Boolean recurse, UInt32 state) -> (UInt32 numItems)")},
+ {"IsDataBrowserItemSelected", (PyCFunction)CtlObj_IsDataBrowserItemSelected, 1,
+ PyDoc_STR("(UInt32 item) -> (Boolean _rv)")},
+ {"GetDataBrowserItemState", (PyCFunction)CtlObj_GetDataBrowserItemState, 1,
+ PyDoc_STR("(UInt32 item) -> (UInt32 state)")},
+ {"RevealDataBrowserItem", (PyCFunction)CtlObj_RevealDataBrowserItem, 1,
+ PyDoc_STR("(UInt32 item, UInt32 propertyID, UInt8 options) -> None")},
+ {"SetDataBrowserActiveItems", (PyCFunction)CtlObj_SetDataBrowserActiveItems, 1,
+ PyDoc_STR("(Boolean active) -> None")},
+ {"GetDataBrowserActiveItems", (PyCFunction)CtlObj_GetDataBrowserActiveItems, 1,
+ PyDoc_STR("() -> (Boolean active)")},
+ {"SetDataBrowserScrollBarInset", (PyCFunction)CtlObj_SetDataBrowserScrollBarInset, 1,
+ PyDoc_STR("() -> (Rect insetRect)")},
+ {"GetDataBrowserScrollBarInset", (PyCFunction)CtlObj_GetDataBrowserScrollBarInset, 1,
+ PyDoc_STR("() -> (Rect insetRect)")},
+ {"SetDataBrowserTarget", (PyCFunction)CtlObj_SetDataBrowserTarget, 1,
+ PyDoc_STR("(UInt32 target) -> None")},
+ {"GetDataBrowserTarget", (PyCFunction)CtlObj_GetDataBrowserTarget, 1,
+ PyDoc_STR("() -> (UInt32 target)")},
+ {"SetDataBrowserSortOrder", (PyCFunction)CtlObj_SetDataBrowserSortOrder, 1,
+ PyDoc_STR("(UInt16 order) -> None")},
+ {"GetDataBrowserSortOrder", (PyCFunction)CtlObj_GetDataBrowserSortOrder, 1,
+ PyDoc_STR("() -> (UInt16 order)")},
+ {"SetDataBrowserScrollPosition", (PyCFunction)CtlObj_SetDataBrowserScrollPosition, 1,
+ PyDoc_STR("(UInt32 top, UInt32 left) -> None")},
+ {"GetDataBrowserScrollPosition", (PyCFunction)CtlObj_GetDataBrowserScrollPosition, 1,
+ PyDoc_STR("() -> (UInt32 top, UInt32 left)")},
+ {"SetDataBrowserHasScrollBars", (PyCFunction)CtlObj_SetDataBrowserHasScrollBars, 1,
+ PyDoc_STR("(Boolean horiz, Boolean vert) -> None")},
+ {"GetDataBrowserHasScrollBars", (PyCFunction)CtlObj_GetDataBrowserHasScrollBars, 1,
+ PyDoc_STR("() -> (Boolean horiz, Boolean vert)")},
+ {"SetDataBrowserSortProperty", (PyCFunction)CtlObj_SetDataBrowserSortProperty, 1,
+ PyDoc_STR("(UInt32 property) -> None")},
+ {"GetDataBrowserSortProperty", (PyCFunction)CtlObj_GetDataBrowserSortProperty, 1,
+ PyDoc_STR("() -> (UInt32 property)")},
+ {"SetDataBrowserSelectionFlags", (PyCFunction)CtlObj_SetDataBrowserSelectionFlags, 1,
+ PyDoc_STR("(UInt32 selectionFlags) -> None")},
+ {"GetDataBrowserSelectionFlags", (PyCFunction)CtlObj_GetDataBrowserSelectionFlags, 1,
+ PyDoc_STR("() -> (UInt32 selectionFlags)")},
+ {"SetDataBrowserPropertyFlags", (PyCFunction)CtlObj_SetDataBrowserPropertyFlags, 1,
+ PyDoc_STR("(UInt32 property, UInt32 flags) -> None")},
+ {"GetDataBrowserPropertyFlags", (PyCFunction)CtlObj_GetDataBrowserPropertyFlags, 1,
+ PyDoc_STR("(UInt32 property) -> (UInt32 flags)")},
+ {"SetDataBrowserEditText", (PyCFunction)CtlObj_SetDataBrowserEditText, 1,
+ PyDoc_STR("(CFStringRef text) -> None")},
+ {"CopyDataBrowserEditText", (PyCFunction)CtlObj_CopyDataBrowserEditText, 1,
+ PyDoc_STR("() -> (CFStringRef text)")},
+ {"GetDataBrowserEditText", (PyCFunction)CtlObj_GetDataBrowserEditText, 1,
+ PyDoc_STR("(CFMutableStringRef text) -> None")},
+ {"SetDataBrowserEditItem", (PyCFunction)CtlObj_SetDataBrowserEditItem, 1,
+ PyDoc_STR("(UInt32 item, UInt32 property) -> None")},
+ {"GetDataBrowserEditItem", (PyCFunction)CtlObj_GetDataBrowserEditItem, 1,
+ PyDoc_STR("() -> (UInt32 item, UInt32 property)")},
+ {"GetDataBrowserItemPartBounds", (PyCFunction)CtlObj_GetDataBrowserItemPartBounds, 1,
+ PyDoc_STR("(UInt32 item, UInt32 property, OSType part) -> (Rect bounds)")},
+ {"RemoveDataBrowserTableViewColumn", (PyCFunction)CtlObj_RemoveDataBrowserTableViewColumn, 1,
+ PyDoc_STR("(UInt32 column) -> None")},
+ {"GetDataBrowserTableViewColumnCount", (PyCFunction)CtlObj_GetDataBrowserTableViewColumnCount, 1,
+ PyDoc_STR("() -> (UInt32 numColumns)")},
+ {"SetDataBrowserTableViewHiliteStyle", (PyCFunction)CtlObj_SetDataBrowserTableViewHiliteStyle, 1,
+ PyDoc_STR("(UInt32 hiliteStyle) -> None")},
+ {"GetDataBrowserTableViewHiliteStyle", (PyCFunction)CtlObj_GetDataBrowserTableViewHiliteStyle, 1,
+ PyDoc_STR("() -> (UInt32 hiliteStyle)")},
+ {"SetDataBrowserTableViewRowHeight", (PyCFunction)CtlObj_SetDataBrowserTableViewRowHeight, 1,
+ PyDoc_STR("(UInt16 height) -> None")},
+ {"GetDataBrowserTableViewRowHeight", (PyCFunction)CtlObj_GetDataBrowserTableViewRowHeight, 1,
+ PyDoc_STR("() -> (UInt16 height)")},
+ {"SetDataBrowserTableViewColumnWidth", (PyCFunction)CtlObj_SetDataBrowserTableViewColumnWidth, 1,
+ PyDoc_STR("(UInt16 width) -> None")},
+ {"GetDataBrowserTableViewColumnWidth", (PyCFunction)CtlObj_GetDataBrowserTableViewColumnWidth, 1,
+ PyDoc_STR("() -> (UInt16 width)")},
+ {"SetDataBrowserTableViewItemRowHeight", (PyCFunction)CtlObj_SetDataBrowserTableViewItemRowHeight, 1,
+ PyDoc_STR("(UInt32 item, UInt16 height) -> None")},
+ {"GetDataBrowserTableViewItemRowHeight", (PyCFunction)CtlObj_GetDataBrowserTableViewItemRowHeight, 1,
+ PyDoc_STR("(UInt32 item) -> (UInt16 height)")},
+ {"SetDataBrowserTableViewNamedColumnWidth", (PyCFunction)CtlObj_SetDataBrowserTableViewNamedColumnWidth, 1,
+ PyDoc_STR("(UInt32 column, UInt16 width) -> None")},
+ {"GetDataBrowserTableViewNamedColumnWidth", (PyCFunction)CtlObj_GetDataBrowserTableViewNamedColumnWidth, 1,
+ PyDoc_STR("(UInt32 column) -> (UInt16 width)")},
+ {"SetDataBrowserTableViewGeometry", (PyCFunction)CtlObj_SetDataBrowserTableViewGeometry, 1,
+ PyDoc_STR("(Boolean variableWidthColumns, Boolean variableHeightRows) -> None")},
+ {"GetDataBrowserTableViewGeometry", (PyCFunction)CtlObj_GetDataBrowserTableViewGeometry, 1,
+ PyDoc_STR("() -> (Boolean variableWidthColumns, Boolean variableHeightRows)")},
+ {"GetDataBrowserTableViewItemID", (PyCFunction)CtlObj_GetDataBrowserTableViewItemID, 1,
+ PyDoc_STR("(UInt32 row) -> (UInt32 item)")},
+ {"SetDataBrowserTableViewItemRow", (PyCFunction)CtlObj_SetDataBrowserTableViewItemRow, 1,
+ PyDoc_STR("(UInt32 item, UInt32 row) -> None")},
+ {"GetDataBrowserTableViewItemRow", (PyCFunction)CtlObj_GetDataBrowserTableViewItemRow, 1,
+ PyDoc_STR("(UInt32 item) -> (UInt32 row)")},
+ {"SetDataBrowserTableViewColumnPosition", (PyCFunction)CtlObj_SetDataBrowserTableViewColumnPosition, 1,
+ PyDoc_STR("(UInt32 column, UInt32 position) -> None")},
+ {"GetDataBrowserTableViewColumnPosition", (PyCFunction)CtlObj_GetDataBrowserTableViewColumnPosition, 1,
+ PyDoc_STR("(UInt32 column) -> (UInt32 position)")},
+ {"GetDataBrowserTableViewColumnProperty", (PyCFunction)CtlObj_GetDataBrowserTableViewColumnProperty, 1,
+ PyDoc_STR("(UInt32 column) -> (UInt32 property)")},
+ {"AutoSizeDataBrowserListViewColumns", (PyCFunction)CtlObj_AutoSizeDataBrowserListViewColumns, 1,
+ PyDoc_STR("() -> None")},
+ {"AddDataBrowserListViewColumn", (PyCFunction)CtlObj_AddDataBrowserListViewColumn, 1,
+ PyDoc_STR("(DataBrowserListViewColumnDesc columnDesc, UInt32 position) -> None")},
+ {"SetDataBrowserListViewHeaderBtnHeight", (PyCFunction)CtlObj_SetDataBrowserListViewHeaderBtnHeight, 1,
+ PyDoc_STR("(UInt16 height) -> None")},
+ {"GetDataBrowserListViewHeaderBtnHeight", (PyCFunction)CtlObj_GetDataBrowserListViewHeaderBtnHeight, 1,
+ PyDoc_STR("() -> (UInt16 height)")},
+ {"SetDataBrowserListViewUsePlainBackground", (PyCFunction)CtlObj_SetDataBrowserListViewUsePlainBackground, 1,
+ PyDoc_STR("(Boolean usePlainBackground) -> None")},
+ {"GetDataBrowserListViewUsePlainBackground", (PyCFunction)CtlObj_GetDataBrowserListViewUsePlainBackground, 1,
+ PyDoc_STR("() -> (Boolean usePlainBackground)")},
+ {"SetDataBrowserListViewDisclosureColumn", (PyCFunction)CtlObj_SetDataBrowserListViewDisclosureColumn, 1,
+ PyDoc_STR("(UInt32 column, Boolean expandableRows) -> None")},
+ {"GetDataBrowserListViewDisclosureColumn", (PyCFunction)CtlObj_GetDataBrowserListViewDisclosureColumn, 1,
+ PyDoc_STR("() -> (UInt32 column, Boolean expandableRows)")},
+ {"GetDataBrowserColumnViewPath", (PyCFunction)CtlObj_GetDataBrowserColumnViewPath, 1,
+ PyDoc_STR("(Handle path) -> None")},
+ {"GetDataBrowserColumnViewPathLength", (PyCFunction)CtlObj_GetDataBrowserColumnViewPathLength, 1,
+ PyDoc_STR("() -> (UInt32 pathLength)")},
+ {"SetDataBrowserColumnViewDisplayType", (PyCFunction)CtlObj_SetDataBrowserColumnViewDisplayType, 1,
+ PyDoc_STR("(OSType propertyType) -> None")},
+ {"GetDataBrowserColumnViewDisplayType", (PyCFunction)CtlObj_GetDataBrowserColumnViewDisplayType, 1,
+ PyDoc_STR("() -> (OSType propertyType)")},
+ {"as_Resource", (PyCFunction)CtlObj_as_Resource, 1,
+ PyDoc_STR("() -> (Handle _rv)")},
+ {"GetControlRect", (PyCFunction)CtlObj_GetControlRect, 1,
+ PyDoc_STR("() -> (Rect rect)")},
+ {"DisposeControl", (PyCFunction)CtlObj_DisposeControl, 1,
+ PyDoc_STR("() -> None")},
+ {"TrackControl", (PyCFunction)CtlObj_TrackControl, 1,
+ PyDoc_STR("(Point startPoint [,trackercallback]) -> (ControlPartCode _rv)")},
+ {"HandleControlClick", (PyCFunction)CtlObj_HandleControlClick, 1,
+ PyDoc_STR("(Point startPoint, Integer modifiers, [,trackercallback]) -> (ControlPartCode _rv)")},
+ {"SetControlData", (PyCFunction)CtlObj_SetControlData, 1,
+ PyDoc_STR("(stuff) -> None")},
+ {"GetControlData", (PyCFunction)CtlObj_GetControlData, 1,
+ PyDoc_STR("(part, type) -> String")},
+ {"SetControlData_Handle", (PyCFunction)CtlObj_SetControlData_Handle, 1,
+ PyDoc_STR("(ResObj) -> None")},
+ {"GetControlData_Handle", (PyCFunction)CtlObj_GetControlData_Handle, 1,
+ PyDoc_STR("(part, type) -> ResObj")},
+ {"SetControlData_Callback", (PyCFunction)CtlObj_SetControlData_Callback, 1,
+ PyDoc_STR("(callbackfunc) -> None")},
+ {NULL, NULL, 0}
};
#define CtlObj_getsetlist NULL
@@ -3823,28 +3823,28 @@ static PyMethodDef CtlObj_methods[] = {
static int CtlObj_compare(ControlObject *self, ControlObject *other)
{
- unsigned long v, w;
+ unsigned long v, w;
- if (!CtlObj_Check((PyObject *)other))
- {
- v=(unsigned long)self;
- w=(unsigned long)other;
- }
- else
- {
- v=(unsigned long)self->ob_itself;
- w=(unsigned long)other->ob_itself;
- }
- if( v < w ) return -1;
- if( v > w ) return 1;
- return 0;
+ if (!CtlObj_Check((PyObject *)other))
+ {
+ v=(unsigned long)self;
+ w=(unsigned long)other;
+ }
+ else
+ {
+ v=(unsigned long)self->ob_itself;
+ w=(unsigned long)other->ob_itself;
+ }
+ if( v < w ) return -1;
+ if( v > w ) return 1;
+ return 0;
}
#define CtlObj_repr NULL
static long CtlObj_hash(ControlObject *self)
{
- return (long)self->ob_itself;
+ return (long)self->ob_itself;
}
#define CtlObj_tp_init 0
@@ -3852,61 +3852,61 @@ static long CtlObj_hash(ControlObject *self)
static PyObject *CtlObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
- PyObject *_self;
- ControlHandle itself;
- char *kw[] = {"itself", 0};
+ 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;
+ 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 = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
- "_Ctl.Control", /*tp_name*/
- sizeof(ControlObject), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- /* methods */
- (destructor) CtlObj_dealloc, /*tp_dealloc*/
- 0, /*tp_print*/
- (getattrfunc)0, /*tp_getattr*/
- (setattrfunc)0, /*tp_setattr*/
- (cmpfunc) CtlObj_compare, /*tp_compare*/
- (reprfunc) CtlObj_repr, /*tp_repr*/
- (PyNumberMethods *)0, /* tp_as_number */
- (PySequenceMethods *)0, /* tp_as_sequence */
- (PyMappingMethods *)0, /* tp_as_mapping */
- (hashfunc) CtlObj_hash, /*tp_hash*/
- 0, /*tp_call*/
- 0, /*tp_str*/
- PyObject_GenericGetAttr, /*tp_getattro*/
- PyObject_GenericSetAttr, /*tp_setattro */
- 0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
- 0, /*tp_doc*/
- 0, /*tp_traverse*/
- 0, /*tp_clear*/
- 0, /*tp_richcompare*/
- 0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
- 0, /*tp_iternext*/
- CtlObj_methods, /* tp_methods */
- 0, /*tp_members*/
- CtlObj_getsetlist, /*tp_getset*/
- 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 */
+ PyObject_HEAD_INIT(NULL)
+ 0, /*ob_size*/
+ "_Ctl.Control", /*tp_name*/
+ sizeof(ControlObject), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ /* methods */
+ (destructor) CtlObj_dealloc, /*tp_dealloc*/
+ 0, /*tp_print*/
+ (getattrfunc)0, /*tp_getattr*/
+ (setattrfunc)0, /*tp_setattr*/
+ (cmpfunc) CtlObj_compare, /*tp_compare*/
+ (reprfunc) CtlObj_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) CtlObj_hash, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ PyObject_GenericGetAttr, /*tp_getattro*/
+ PyObject_GenericSetAttr, /*tp_setattro */
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
+ 0, /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ CtlObj_methods, /* tp_methods */
+ 0, /*tp_members*/
+ CtlObj_getsetlist, /*tp_getset*/
+ 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 --------------------- */
@@ -3914,1616 +3914,1616 @@ PyTypeObject Control_Type = {
static PyObject *Ctl_NewControl(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ControlHandle _rv;
- WindowPtr owningWindow;
- Rect boundsRect;
- Str255 controlTitle;
- Boolean initiallyVisible;
- SInt16 initialValue;
- SInt16 minimumValue;
- SInt16 maximumValue;
- SInt16 procID;
- SInt32 controlReference;
+ PyObject *_res = NULL;
+ ControlHandle _rv;
+ WindowPtr owningWindow;
+ Rect boundsRect;
+ Str255 controlTitle;
+ Boolean initiallyVisible;
+ SInt16 initialValue;
+ SInt16 minimumValue;
+ SInt16 maximumValue;
+ SInt16 procID;
+ SInt32 controlReference;
#ifndef NewControl
- PyMac_PRECHECK(NewControl);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&bhhhhl",
- WinObj_Convert, &owningWindow,
- PyMac_GetRect, &boundsRect,
- PyMac_GetStr255, controlTitle,
- &initiallyVisible,
- &initialValue,
- &minimumValue,
- &maximumValue,
- &procID,
- &controlReference))
- return NULL;
- _rv = NewControl(owningWindow,
- &boundsRect,
- controlTitle,
- initiallyVisible,
- initialValue,
- minimumValue,
- maximumValue,
- procID,
- controlReference);
- _res = Py_BuildValue("O&",
- CtlObj_New, _rv);
- return _res;
+ PyMac_PRECHECK(NewControl);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&bhhhhl",
+ WinObj_Convert, &owningWindow,
+ PyMac_GetRect, &boundsRect,
+ PyMac_GetStr255, controlTitle,
+ &initiallyVisible,
+ &initialValue,
+ &minimumValue,
+ &maximumValue,
+ &procID,
+ &controlReference))
+ return NULL;
+ _rv = NewControl(owningWindow,
+ &boundsRect,
+ controlTitle,
+ initiallyVisible,
+ initialValue,
+ minimumValue,
+ maximumValue,
+ procID,
+ controlReference);
+ _res = Py_BuildValue("O&",
+ CtlObj_New, _rv);
+ return _res;
}
static PyObject *Ctl_GetNewControl(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ControlHandle _rv;
- SInt16 resourceID;
- WindowPtr owningWindow;
+ PyObject *_res = NULL;
+ ControlHandle _rv;
+ SInt16 resourceID;
+ WindowPtr owningWindow;
#ifndef GetNewControl
- PyMac_PRECHECK(GetNewControl);
+ PyMac_PRECHECK(GetNewControl);
#endif
- if (!PyArg_ParseTuple(_args, "hO&",
- &resourceID,
- WinObj_Convert, &owningWindow))
- return NULL;
- _rv = GetNewControl(resourceID,
- owningWindow);
- _res = Py_BuildValue("O&",
- CtlObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "hO&",
+ &resourceID,
+ WinObj_Convert, &owningWindow))
+ return NULL;
+ _rv = GetNewControl(resourceID,
+ owningWindow);
+ _res = Py_BuildValue("O&",
+ CtlObj_New, _rv);
+ return _res;
}
static PyObject *Ctl_DrawControls(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- WindowPtr theWindow;
+ PyObject *_res = NULL;
+ WindowPtr theWindow;
#ifndef DrawControls
- PyMac_PRECHECK(DrawControls);
+ PyMac_PRECHECK(DrawControls);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- WinObj_Convert, &theWindow))
- return NULL;
- DrawControls(theWindow);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ WinObj_Convert, &theWindow))
+ return NULL;
+ DrawControls(theWindow);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Ctl_UpdateControls(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- WindowPtr inWindow;
- RgnHandle inUpdateRegion;
+ PyObject *_res = NULL;
+ WindowPtr inWindow;
+ RgnHandle inUpdateRegion;
#ifndef UpdateControls
- PyMac_PRECHECK(UpdateControls);
+ PyMac_PRECHECK(UpdateControls);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- WinObj_Convert, &inWindow,
- ResObj_Convert, &inUpdateRegion))
- return NULL;
- UpdateControls(inWindow,
- inUpdateRegion);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ WinObj_Convert, &inWindow,
+ ResObj_Convert, &inUpdateRegion))
+ return NULL;
+ UpdateControls(inWindow,
+ inUpdateRegion);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Ctl_FindControl(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ControlPartCode _rv;
- Point testPoint;
- WindowPtr theWindow;
- ControlHandle theControl;
+ PyObject *_res = NULL;
+ ControlPartCode _rv;
+ Point testPoint;
+ WindowPtr theWindow;
+ ControlHandle theControl;
#ifndef FindControl
- PyMac_PRECHECK(FindControl);
+ PyMac_PRECHECK(FindControl);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- PyMac_GetPoint, &testPoint,
- WinObj_Convert, &theWindow))
- return NULL;
- _rv = FindControl(testPoint,
- theWindow,
- &theControl);
- _res = Py_BuildValue("hO&",
- _rv,
- CtlObj_WhichControl, theControl);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ PyMac_GetPoint, &testPoint,
+ WinObj_Convert, &theWindow))
+ return NULL;
+ _rv = FindControl(testPoint,
+ theWindow,
+ &theControl);
+ _res = Py_BuildValue("hO&",
+ _rv,
+ CtlObj_WhichControl, theControl);
+ return _res;
}
static PyObject *Ctl_IdleControls(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- WindowPtr inWindow;
+ PyObject *_res = NULL;
+ WindowPtr inWindow;
#ifndef IdleControls
- PyMac_PRECHECK(IdleControls);
+ PyMac_PRECHECK(IdleControls);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- WinObj_Convert, &inWindow))
- return NULL;
- IdleControls(inWindow);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ WinObj_Convert, &inWindow))
+ return NULL;
+ IdleControls(inWindow);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Ctl_GetControlByID(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowPtr inWindow;
- ControlID inID;
- ControlHandle outControl;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowPtr inWindow;
+ ControlID inID;
+ ControlHandle outControl;
#ifndef GetControlByID
- PyMac_PRECHECK(GetControlByID);
+ PyMac_PRECHECK(GetControlByID);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- WinObj_Convert, &inWindow,
- PyControlID_Convert, &inID))
- return NULL;
- _err = GetControlByID(inWindow,
- &inID,
- &outControl);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- CtlObj_WhichControl, outControl);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ WinObj_Convert, &inWindow,
+ PyControlID_Convert, &inID))
+ return NULL;
+ _err = GetControlByID(inWindow,
+ &inID,
+ &outControl);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ CtlObj_WhichControl, outControl);
+ return _res;
}
static PyObject *Ctl_DumpControlHierarchy(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- WindowPtr inWindow;
- FSSpec inDumpFile;
+ PyObject *_res = NULL;
+ OSErr _err;
+ WindowPtr inWindow;
+ FSSpec inDumpFile;
#ifndef DumpControlHierarchy
- PyMac_PRECHECK(DumpControlHierarchy);
+ PyMac_PRECHECK(DumpControlHierarchy);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- WinObj_Convert, &inWindow,
- PyMac_GetFSSpec, &inDumpFile))
- return NULL;
- _err = DumpControlHierarchy(inWindow,
- &inDumpFile);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ WinObj_Convert, &inWindow,
+ PyMac_GetFSSpec, &inDumpFile))
+ return NULL;
+ _err = DumpControlHierarchy(inWindow,
+ &inDumpFile);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Ctl_CreateRootControl(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- WindowPtr inWindow;
- ControlHandle outControl;
+ PyObject *_res = NULL;
+ OSErr _err;
+ WindowPtr inWindow;
+ ControlHandle outControl;
#ifndef CreateRootControl
- PyMac_PRECHECK(CreateRootControl);
+ PyMac_PRECHECK(CreateRootControl);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- WinObj_Convert, &inWindow))
- return NULL;
- _err = CreateRootControl(inWindow,
- &outControl);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- CtlObj_New, outControl);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ WinObj_Convert, &inWindow))
+ return NULL;
+ _err = CreateRootControl(inWindow,
+ &outControl);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ CtlObj_New, outControl);
+ return _res;
}
static PyObject *Ctl_GetRootControl(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- WindowPtr inWindow;
- ControlHandle outControl;
+ PyObject *_res = NULL;
+ OSErr _err;
+ WindowPtr inWindow;
+ ControlHandle outControl;
#ifndef GetRootControl
- PyMac_PRECHECK(GetRootControl);
+ PyMac_PRECHECK(GetRootControl);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- WinObj_Convert, &inWindow))
- return NULL;
- _err = GetRootControl(inWindow,
- &outControl);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- CtlObj_WhichControl, outControl);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ WinObj_Convert, &inWindow))
+ return NULL;
+ _err = GetRootControl(inWindow,
+ &outControl);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ CtlObj_WhichControl, outControl);
+ return _res;
}
static PyObject *Ctl_GetKeyboardFocus(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- WindowPtr inWindow;
- ControlHandle outControl;
+ PyObject *_res = NULL;
+ OSErr _err;
+ WindowPtr inWindow;
+ ControlHandle outControl;
#ifndef GetKeyboardFocus
- PyMac_PRECHECK(GetKeyboardFocus);
+ PyMac_PRECHECK(GetKeyboardFocus);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- WinObj_Convert, &inWindow))
- return NULL;
- _err = GetKeyboardFocus(inWindow,
- &outControl);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- CtlObj_WhichControl, outControl);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ WinObj_Convert, &inWindow))
+ return NULL;
+ _err = GetKeyboardFocus(inWindow,
+ &outControl);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ CtlObj_WhichControl, outControl);
+ return _res;
}
static PyObject *Ctl_SetKeyboardFocus(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- WindowPtr inWindow;
- ControlHandle inControl;
- ControlFocusPart inPart;
+ PyObject *_res = NULL;
+ OSErr _err;
+ WindowPtr inWindow;
+ ControlHandle inControl;
+ ControlFocusPart inPart;
#ifndef SetKeyboardFocus
- PyMac_PRECHECK(SetKeyboardFocus);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&h",
- WinObj_Convert, &inWindow,
- CtlObj_Convert, &inControl,
- &inPart))
- return NULL;
- _err = SetKeyboardFocus(inWindow,
- inControl,
- inPart);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(SetKeyboardFocus);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&h",
+ WinObj_Convert, &inWindow,
+ CtlObj_Convert, &inControl,
+ &inPart))
+ return NULL;
+ _err = SetKeyboardFocus(inWindow,
+ inControl,
+ inPart);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Ctl_AdvanceKeyboardFocus(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- WindowPtr inWindow;
+ PyObject *_res = NULL;
+ OSErr _err;
+ WindowPtr inWindow;
#ifndef AdvanceKeyboardFocus
- PyMac_PRECHECK(AdvanceKeyboardFocus);
+ PyMac_PRECHECK(AdvanceKeyboardFocus);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- WinObj_Convert, &inWindow))
- return NULL;
- _err = AdvanceKeyboardFocus(inWindow);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ WinObj_Convert, &inWindow))
+ return NULL;
+ _err = AdvanceKeyboardFocus(inWindow);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Ctl_ReverseKeyboardFocus(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- WindowPtr inWindow;
+ PyObject *_res = NULL;
+ OSErr _err;
+ WindowPtr inWindow;
#ifndef ReverseKeyboardFocus
- PyMac_PRECHECK(ReverseKeyboardFocus);
+ PyMac_PRECHECK(ReverseKeyboardFocus);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- WinObj_Convert, &inWindow))
- return NULL;
- _err = ReverseKeyboardFocus(inWindow);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ WinObj_Convert, &inWindow))
+ return NULL;
+ _err = ReverseKeyboardFocus(inWindow);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Ctl_ClearKeyboardFocus(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- WindowPtr inWindow;
+ PyObject *_res = NULL;
+ OSErr _err;
+ WindowPtr inWindow;
#ifndef ClearKeyboardFocus
- PyMac_PRECHECK(ClearKeyboardFocus);
+ PyMac_PRECHECK(ClearKeyboardFocus);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- WinObj_Convert, &inWindow))
- return NULL;
- _err = ClearKeyboardFocus(inWindow);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ WinObj_Convert, &inWindow))
+ return NULL;
+ _err = ClearKeyboardFocus(inWindow);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Ctl_SetAutomaticControlDragTrackingEnabledForWindow(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowPtr inWindow;
- Boolean inTracks;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowPtr inWindow;
+ Boolean inTracks;
#ifndef SetAutomaticControlDragTrackingEnabledForWindow
- PyMac_PRECHECK(SetAutomaticControlDragTrackingEnabledForWindow);
+ PyMac_PRECHECK(SetAutomaticControlDragTrackingEnabledForWindow);
#endif
- if (!PyArg_ParseTuple(_args, "O&b",
- WinObj_Convert, &inWindow,
- &inTracks))
- return NULL;
- _err = SetAutomaticControlDragTrackingEnabledForWindow(inWindow,
- inTracks);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&b",
+ WinObj_Convert, &inWindow,
+ &inTracks))
+ return NULL;
+ _err = SetAutomaticControlDragTrackingEnabledForWindow(inWindow,
+ inTracks);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Ctl_IsAutomaticControlDragTrackingEnabledForWindow(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowPtr inWindow;
- Boolean outTracks;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowPtr inWindow;
+ Boolean outTracks;
#ifndef IsAutomaticControlDragTrackingEnabledForWindow
- PyMac_PRECHECK(IsAutomaticControlDragTrackingEnabledForWindow);
+ PyMac_PRECHECK(IsAutomaticControlDragTrackingEnabledForWindow);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- WinObj_Convert, &inWindow))
- return NULL;
- _err = IsAutomaticControlDragTrackingEnabledForWindow(inWindow,
- &outTracks);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("b",
- outTracks);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ WinObj_Convert, &inWindow))
+ return NULL;
+ _err = IsAutomaticControlDragTrackingEnabledForWindow(inWindow,
+ &outTracks);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("b",
+ outTracks);
+ return _res;
}
static PyObject *Ctl_CreateBevelButtonControl(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowPtr window;
- Rect boundsRect;
- CFStringRef title;
- UInt16 thickness;
- UInt16 behavior;
- ControlButtonContentInfo info;
- SInt16 menuID;
- UInt16 menuBehavior;
- UInt16 menuPlacement;
- ControlHandle outControl;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowPtr window;
+ Rect boundsRect;
+ CFStringRef title;
+ UInt16 thickness;
+ UInt16 behavior;
+ ControlButtonContentInfo info;
+ SInt16 menuID;
+ UInt16 menuBehavior;
+ UInt16 menuPlacement;
+ ControlHandle outControl;
#ifndef CreateBevelButtonControl
- PyMac_PRECHECK(CreateBevelButtonControl);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&HHO&hHH",
- WinObj_Convert, &window,
- PyMac_GetRect, &boundsRect,
- CFStringRefObj_Convert, &title,
- &thickness,
- &behavior,
- ControlButtonContentInfo_Convert, &info,
- &menuID,
- &menuBehavior,
- &menuPlacement))
- return NULL;
- _err = CreateBevelButtonControl(window,
- &boundsRect,
- title,
- thickness,
- behavior,
- &info,
- menuID,
- menuBehavior,
- menuPlacement,
- &outControl);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- CtlObj_New, outControl);
- return _res;
+ PyMac_PRECHECK(CreateBevelButtonControl);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&HHO&hHH",
+ WinObj_Convert, &window,
+ PyMac_GetRect, &boundsRect,
+ CFStringRefObj_Convert, &title,
+ &thickness,
+ &behavior,
+ ControlButtonContentInfo_Convert, &info,
+ &menuID,
+ &menuBehavior,
+ &menuPlacement))
+ return NULL;
+ _err = CreateBevelButtonControl(window,
+ &boundsRect,
+ title,
+ thickness,
+ behavior,
+ &info,
+ menuID,
+ menuBehavior,
+ menuPlacement,
+ &outControl);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ CtlObj_New, outControl);
+ return _res;
}
static PyObject *Ctl_CreateSliderControl(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowPtr window;
- Rect boundsRect;
- SInt32 value;
- SInt32 minimum;
- SInt32 maximum;
- UInt16 orientation;
- UInt16 numTickMarks;
- Boolean liveTracking;
- PyObject* liveTrackingProc;
- UniversalProcPtr c_callback;
- ControlHandle outControl;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowPtr window;
+ Rect boundsRect;
+ SInt32 value;
+ SInt32 minimum;
+ SInt32 maximum;
+ UInt16 orientation;
+ UInt16 numTickMarks;
+ Boolean liveTracking;
+ PyObject* liveTrackingProc;
+ UniversalProcPtr c_callback;
+ ControlHandle outControl;
#ifndef CreateSliderControl
- PyMac_PRECHECK(CreateSliderControl);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&lllHHbO",
- WinObj_Convert, &window,
- PyMac_GetRect, &boundsRect,
- &value,
- &minimum,
- &maximum,
- &orientation,
- &numTickMarks,
- &liveTracking,
- &liveTrackingProc))
- return NULL;
- _err = CreateSliderControl(window,
- &boundsRect,
- value,
- minimum,
- maximum,
- orientation,
- numTickMarks,
- liveTracking,
- myactionproc_upp,
- &outControl);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- CtlObj_New, outControl);
- setcallback(_res, kMyControlActionProcTag, liveTrackingProc, &c_callback);
- return _res;
+ PyMac_PRECHECK(CreateSliderControl);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&lllHHbO",
+ WinObj_Convert, &window,
+ PyMac_GetRect, &boundsRect,
+ &value,
+ &minimum,
+ &maximum,
+ &orientation,
+ &numTickMarks,
+ &liveTracking,
+ &liveTrackingProc))
+ return NULL;
+ _err = CreateSliderControl(window,
+ &boundsRect,
+ value,
+ minimum,
+ maximum,
+ orientation,
+ numTickMarks,
+ liveTracking,
+ myactionproc_upp,
+ &outControl);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ CtlObj_New, outControl);
+ setcallback(_res, kMyControlActionProcTag, liveTrackingProc, &c_callback);
+ return _res;
}
static PyObject *Ctl_CreateDisclosureTriangleControl(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowPtr inWindow;
- Rect inBoundsRect;
- UInt16 inOrientation;
- CFStringRef inTitle;
- SInt32 inInitialValue;
- Boolean inDrawTitle;
- Boolean inAutoToggles;
- ControlHandle outControl;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowPtr inWindow;
+ Rect inBoundsRect;
+ UInt16 inOrientation;
+ CFStringRef inTitle;
+ SInt32 inInitialValue;
+ Boolean inDrawTitle;
+ Boolean inAutoToggles;
+ ControlHandle outControl;
#ifndef CreateDisclosureTriangleControl
- PyMac_PRECHECK(CreateDisclosureTriangleControl);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&HO&lbb",
- WinObj_Convert, &inWindow,
- PyMac_GetRect, &inBoundsRect,
- &inOrientation,
- CFStringRefObj_Convert, &inTitle,
- &inInitialValue,
- &inDrawTitle,
- &inAutoToggles))
- return NULL;
- _err = CreateDisclosureTriangleControl(inWindow,
- &inBoundsRect,
- inOrientation,
- inTitle,
- inInitialValue,
- inDrawTitle,
- inAutoToggles,
- &outControl);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- CtlObj_New, outControl);
- return _res;
+ PyMac_PRECHECK(CreateDisclosureTriangleControl);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&HO&lbb",
+ WinObj_Convert, &inWindow,
+ PyMac_GetRect, &inBoundsRect,
+ &inOrientation,
+ CFStringRefObj_Convert, &inTitle,
+ &inInitialValue,
+ &inDrawTitle,
+ &inAutoToggles))
+ return NULL;
+ _err = CreateDisclosureTriangleControl(inWindow,
+ &inBoundsRect,
+ inOrientation,
+ inTitle,
+ inInitialValue,
+ inDrawTitle,
+ inAutoToggles,
+ &outControl);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ CtlObj_New, outControl);
+ return _res;
}
static PyObject *Ctl_CreateProgressBarControl(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowPtr window;
- Rect boundsRect;
- SInt32 value;
- SInt32 minimum;
- SInt32 maximum;
- Boolean indeterminate;
- ControlHandle outControl;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowPtr window;
+ Rect boundsRect;
+ SInt32 value;
+ SInt32 minimum;
+ SInt32 maximum;
+ Boolean indeterminate;
+ ControlHandle outControl;
#ifndef CreateProgressBarControl
- PyMac_PRECHECK(CreateProgressBarControl);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&lllb",
- WinObj_Convert, &window,
- PyMac_GetRect, &boundsRect,
- &value,
- &minimum,
- &maximum,
- &indeterminate))
- return NULL;
- _err = CreateProgressBarControl(window,
- &boundsRect,
- value,
- minimum,
- maximum,
- indeterminate,
- &outControl);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- CtlObj_New, outControl);
- return _res;
+ PyMac_PRECHECK(CreateProgressBarControl);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&lllb",
+ WinObj_Convert, &window,
+ PyMac_GetRect, &boundsRect,
+ &value,
+ &minimum,
+ &maximum,
+ &indeterminate))
+ return NULL;
+ _err = CreateProgressBarControl(window,
+ &boundsRect,
+ value,
+ minimum,
+ maximum,
+ indeterminate,
+ &outControl);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ CtlObj_New, outControl);
+ return _res;
}
static PyObject *Ctl_CreateRelevanceBarControl(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowPtr window;
- Rect boundsRect;
- SInt32 value;
- SInt32 minimum;
- SInt32 maximum;
- ControlHandle outControl;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowPtr window;
+ Rect boundsRect;
+ SInt32 value;
+ SInt32 minimum;
+ SInt32 maximum;
+ ControlHandle outControl;
#ifndef CreateRelevanceBarControl
- PyMac_PRECHECK(CreateRelevanceBarControl);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&lll",
- WinObj_Convert, &window,
- PyMac_GetRect, &boundsRect,
- &value,
- &minimum,
- &maximum))
- return NULL;
- _err = CreateRelevanceBarControl(window,
- &boundsRect,
- value,
- minimum,
- maximum,
- &outControl);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- CtlObj_New, outControl);
- return _res;
+ PyMac_PRECHECK(CreateRelevanceBarControl);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&lll",
+ WinObj_Convert, &window,
+ PyMac_GetRect, &boundsRect,
+ &value,
+ &minimum,
+ &maximum))
+ return NULL;
+ _err = CreateRelevanceBarControl(window,
+ &boundsRect,
+ value,
+ minimum,
+ maximum,
+ &outControl);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ CtlObj_New, outControl);
+ return _res;
}
static PyObject *Ctl_CreateLittleArrowsControl(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowPtr window;
- Rect boundsRect;
- SInt32 value;
- SInt32 minimum;
- SInt32 maximum;
- SInt32 increment;
- ControlHandle outControl;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowPtr window;
+ Rect boundsRect;
+ SInt32 value;
+ SInt32 minimum;
+ SInt32 maximum;
+ SInt32 increment;
+ ControlHandle outControl;
#ifndef CreateLittleArrowsControl
- PyMac_PRECHECK(CreateLittleArrowsControl);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&llll",
- WinObj_Convert, &window,
- PyMac_GetRect, &boundsRect,
- &value,
- &minimum,
- &maximum,
- &increment))
- return NULL;
- _err = CreateLittleArrowsControl(window,
- &boundsRect,
- value,
- minimum,
- maximum,
- increment,
- &outControl);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- CtlObj_New, outControl);
- return _res;
+ PyMac_PRECHECK(CreateLittleArrowsControl);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&llll",
+ WinObj_Convert, &window,
+ PyMac_GetRect, &boundsRect,
+ &value,
+ &minimum,
+ &maximum,
+ &increment))
+ return NULL;
+ _err = CreateLittleArrowsControl(window,
+ &boundsRect,
+ value,
+ minimum,
+ maximum,
+ increment,
+ &outControl);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ CtlObj_New, outControl);
+ return _res;
}
static PyObject *Ctl_CreateChasingArrowsControl(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowPtr window;
- Rect boundsRect;
- ControlHandle outControl;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowPtr window;
+ Rect boundsRect;
+ ControlHandle outControl;
#ifndef CreateChasingArrowsControl
- PyMac_PRECHECK(CreateChasingArrowsControl);
+ PyMac_PRECHECK(CreateChasingArrowsControl);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- WinObj_Convert, &window,
- PyMac_GetRect, &boundsRect))
- return NULL;
- _err = CreateChasingArrowsControl(window,
- &boundsRect,
- &outControl);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- CtlObj_New, outControl);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ WinObj_Convert, &window,
+ PyMac_GetRect, &boundsRect))
+ return NULL;
+ _err = CreateChasingArrowsControl(window,
+ &boundsRect,
+ &outControl);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ CtlObj_New, outControl);
+ return _res;
}
static PyObject *Ctl_CreateSeparatorControl(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowPtr window;
- Rect boundsRect;
- ControlHandle outControl;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowPtr window;
+ Rect boundsRect;
+ ControlHandle outControl;
#ifndef CreateSeparatorControl
- PyMac_PRECHECK(CreateSeparatorControl);
+ PyMac_PRECHECK(CreateSeparatorControl);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- WinObj_Convert, &window,
- PyMac_GetRect, &boundsRect))
- return NULL;
- _err = CreateSeparatorControl(window,
- &boundsRect,
- &outControl);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- CtlObj_New, outControl);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ WinObj_Convert, &window,
+ PyMac_GetRect, &boundsRect))
+ return NULL;
+ _err = CreateSeparatorControl(window,
+ &boundsRect,
+ &outControl);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ CtlObj_New, outControl);
+ return _res;
}
static PyObject *Ctl_CreateGroupBoxControl(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowPtr window;
- Rect boundsRect;
- CFStringRef title;
- Boolean primary;
- ControlHandle outControl;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowPtr window;
+ Rect boundsRect;
+ CFStringRef title;
+ Boolean primary;
+ ControlHandle outControl;
#ifndef CreateGroupBoxControl
- PyMac_PRECHECK(CreateGroupBoxControl);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&b",
- WinObj_Convert, &window,
- PyMac_GetRect, &boundsRect,
- CFStringRefObj_Convert, &title,
- &primary))
- return NULL;
- _err = CreateGroupBoxControl(window,
- &boundsRect,
- title,
- primary,
- &outControl);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- CtlObj_New, outControl);
- return _res;
+ PyMac_PRECHECK(CreateGroupBoxControl);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&b",
+ WinObj_Convert, &window,
+ PyMac_GetRect, &boundsRect,
+ CFStringRefObj_Convert, &title,
+ &primary))
+ return NULL;
+ _err = CreateGroupBoxControl(window,
+ &boundsRect,
+ title,
+ primary,
+ &outControl);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ CtlObj_New, outControl);
+ return _res;
}
static PyObject *Ctl_CreateCheckGroupBoxControl(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowPtr window;
- Rect boundsRect;
- CFStringRef title;
- SInt32 initialValue;
- Boolean primary;
- Boolean autoToggle;
- ControlHandle outControl;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowPtr window;
+ Rect boundsRect;
+ CFStringRef title;
+ SInt32 initialValue;
+ Boolean primary;
+ Boolean autoToggle;
+ ControlHandle outControl;
#ifndef CreateCheckGroupBoxControl
- PyMac_PRECHECK(CreateCheckGroupBoxControl);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&lbb",
- WinObj_Convert, &window,
- PyMac_GetRect, &boundsRect,
- CFStringRefObj_Convert, &title,
- &initialValue,
- &primary,
- &autoToggle))
- return NULL;
- _err = CreateCheckGroupBoxControl(window,
- &boundsRect,
- title,
- initialValue,
- primary,
- autoToggle,
- &outControl);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- CtlObj_New, outControl);
- return _res;
+ PyMac_PRECHECK(CreateCheckGroupBoxControl);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&lbb",
+ WinObj_Convert, &window,
+ PyMac_GetRect, &boundsRect,
+ CFStringRefObj_Convert, &title,
+ &initialValue,
+ &primary,
+ &autoToggle))
+ return NULL;
+ _err = CreateCheckGroupBoxControl(window,
+ &boundsRect,
+ title,
+ initialValue,
+ primary,
+ autoToggle,
+ &outControl);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ CtlObj_New, outControl);
+ return _res;
}
static PyObject *Ctl_CreatePopupGroupBoxControl(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowPtr window;
- Rect boundsRect;
- CFStringRef title;
- Boolean primary;
- SInt16 menuID;
- Boolean variableWidth;
- SInt16 titleWidth;
- SInt16 titleJustification;
- Style titleStyle;
- ControlHandle outControl;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowPtr window;
+ Rect boundsRect;
+ CFStringRef title;
+ Boolean primary;
+ SInt16 menuID;
+ Boolean variableWidth;
+ SInt16 titleWidth;
+ SInt16 titleJustification;
+ Style titleStyle;
+ ControlHandle outControl;
#ifndef CreatePopupGroupBoxControl
- PyMac_PRECHECK(CreatePopupGroupBoxControl);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&bhbhhb",
- WinObj_Convert, &window,
- PyMac_GetRect, &boundsRect,
- CFStringRefObj_Convert, &title,
- &primary,
- &menuID,
- &variableWidth,
- &titleWidth,
- &titleJustification,
- &titleStyle))
- return NULL;
- _err = CreatePopupGroupBoxControl(window,
- &boundsRect,
- title,
- primary,
- menuID,
- variableWidth,
- titleWidth,
- titleJustification,
- titleStyle,
- &outControl);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- CtlObj_New, outControl);
- return _res;
+ PyMac_PRECHECK(CreatePopupGroupBoxControl);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&bhbhhb",
+ WinObj_Convert, &window,
+ PyMac_GetRect, &boundsRect,
+ CFStringRefObj_Convert, &title,
+ &primary,
+ &menuID,
+ &variableWidth,
+ &titleWidth,
+ &titleJustification,
+ &titleStyle))
+ return NULL;
+ _err = CreatePopupGroupBoxControl(window,
+ &boundsRect,
+ title,
+ primary,
+ menuID,
+ variableWidth,
+ titleWidth,
+ titleJustification,
+ titleStyle,
+ &outControl);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ CtlObj_New, outControl);
+ return _res;
}
static PyObject *Ctl_CreateImageWellControl(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowPtr window;
- Rect boundsRect;
- ControlButtonContentInfo info;
- ControlHandle outControl;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowPtr window;
+ Rect boundsRect;
+ ControlButtonContentInfo info;
+ ControlHandle outControl;
#ifndef CreateImageWellControl
- PyMac_PRECHECK(CreateImageWellControl);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- WinObj_Convert, &window,
- PyMac_GetRect, &boundsRect,
- ControlButtonContentInfo_Convert, &info))
- return NULL;
- _err = CreateImageWellControl(window,
- &boundsRect,
- &info,
- &outControl);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- CtlObj_New, outControl);
- return _res;
+ PyMac_PRECHECK(CreateImageWellControl);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ WinObj_Convert, &window,
+ PyMac_GetRect, &boundsRect,
+ ControlButtonContentInfo_Convert, &info))
+ return NULL;
+ _err = CreateImageWellControl(window,
+ &boundsRect,
+ &info,
+ &outControl);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ CtlObj_New, outControl);
+ return _res;
}
static PyObject *Ctl_CreatePopupArrowControl(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowPtr window;
- Rect boundsRect;
- UInt16 orientation;
- UInt16 size;
- ControlHandle outControl;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowPtr window;
+ Rect boundsRect;
+ UInt16 orientation;
+ UInt16 size;
+ ControlHandle outControl;
#ifndef CreatePopupArrowControl
- PyMac_PRECHECK(CreatePopupArrowControl);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&HH",
- WinObj_Convert, &window,
- PyMac_GetRect, &boundsRect,
- &orientation,
- &size))
- return NULL;
- _err = CreatePopupArrowControl(window,
- &boundsRect,
- orientation,
- size,
- &outControl);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- CtlObj_New, outControl);
- return _res;
+ PyMac_PRECHECK(CreatePopupArrowControl);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&HH",
+ WinObj_Convert, &window,
+ PyMac_GetRect, &boundsRect,
+ &orientation,
+ &size))
+ return NULL;
+ _err = CreatePopupArrowControl(window,
+ &boundsRect,
+ orientation,
+ size,
+ &outControl);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ CtlObj_New, outControl);
+ return _res;
}
static PyObject *Ctl_CreatePlacardControl(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowPtr window;
- Rect boundsRect;
- ControlHandle outControl;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowPtr window;
+ Rect boundsRect;
+ ControlHandle outControl;
#ifndef CreatePlacardControl
- PyMac_PRECHECK(CreatePlacardControl);
+ PyMac_PRECHECK(CreatePlacardControl);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- WinObj_Convert, &window,
- PyMac_GetRect, &boundsRect))
- return NULL;
- _err = CreatePlacardControl(window,
- &boundsRect,
- &outControl);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- CtlObj_New, outControl);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ WinObj_Convert, &window,
+ PyMac_GetRect, &boundsRect))
+ return NULL;
+ _err = CreatePlacardControl(window,
+ &boundsRect,
+ &outControl);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ CtlObj_New, outControl);
+ return _res;
}
static PyObject *Ctl_CreateClockControl(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowPtr window;
- Rect boundsRect;
- UInt16 clockType;
- UInt32 clockFlags;
- ControlHandle outControl;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowPtr window;
+ Rect boundsRect;
+ UInt16 clockType;
+ UInt32 clockFlags;
+ ControlHandle outControl;
#ifndef CreateClockControl
- PyMac_PRECHECK(CreateClockControl);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&Hl",
- WinObj_Convert, &window,
- PyMac_GetRect, &boundsRect,
- &clockType,
- &clockFlags))
- return NULL;
- _err = CreateClockControl(window,
- &boundsRect,
- clockType,
- clockFlags,
- &outControl);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- CtlObj_New, outControl);
- return _res;
+ PyMac_PRECHECK(CreateClockControl);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&Hl",
+ WinObj_Convert, &window,
+ PyMac_GetRect, &boundsRect,
+ &clockType,
+ &clockFlags))
+ return NULL;
+ _err = CreateClockControl(window,
+ &boundsRect,
+ clockType,
+ clockFlags,
+ &outControl);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ CtlObj_New, outControl);
+ return _res;
}
static PyObject *Ctl_CreateUserPaneControl(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowPtr window;
- Rect boundsRect;
- UInt32 features;
- ControlHandle outControl;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowPtr window;
+ Rect boundsRect;
+ UInt32 features;
+ ControlHandle outControl;
#ifndef CreateUserPaneControl
- PyMac_PRECHECK(CreateUserPaneControl);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&l",
- WinObj_Convert, &window,
- PyMac_GetRect, &boundsRect,
- &features))
- return NULL;
- _err = CreateUserPaneControl(window,
- &boundsRect,
- features,
- &outControl);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- CtlObj_New, outControl);
- return _res;
+ PyMac_PRECHECK(CreateUserPaneControl);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&l",
+ WinObj_Convert, &window,
+ PyMac_GetRect, &boundsRect,
+ &features))
+ return NULL;
+ _err = CreateUserPaneControl(window,
+ &boundsRect,
+ features,
+ &outControl);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ CtlObj_New, outControl);
+ return _res;
}
static PyObject *Ctl_CreateEditTextControl(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowPtr window;
- Rect boundsRect;
- CFStringRef text;
- Boolean isPassword;
- Boolean useInlineInput;
- ControlFontStyleRec style;
- ControlHandle outControl;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowPtr window;
+ Rect boundsRect;
+ CFStringRef text;
+ Boolean isPassword;
+ Boolean useInlineInput;
+ ControlFontStyleRec style;
+ ControlHandle outControl;
#ifndef CreateEditTextControl
- PyMac_PRECHECK(CreateEditTextControl);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&bbO&",
- WinObj_Convert, &window,
- PyMac_GetRect, &boundsRect,
- CFStringRefObj_Convert, &text,
- &isPassword,
- &useInlineInput,
- ControlFontStyle_Convert, &style))
- return NULL;
- _err = CreateEditTextControl(window,
- &boundsRect,
- text,
- isPassword,
- useInlineInput,
- &style,
- &outControl);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- CtlObj_New, outControl);
- return _res;
+ PyMac_PRECHECK(CreateEditTextControl);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&bbO&",
+ WinObj_Convert, &window,
+ PyMac_GetRect, &boundsRect,
+ CFStringRefObj_Convert, &text,
+ &isPassword,
+ &useInlineInput,
+ ControlFontStyle_Convert, &style))
+ return NULL;
+ _err = CreateEditTextControl(window,
+ &boundsRect,
+ text,
+ isPassword,
+ useInlineInput,
+ &style,
+ &outControl);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ CtlObj_New, outControl);
+ return _res;
}
static PyObject *Ctl_CreateStaticTextControl(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowPtr window;
- Rect boundsRect;
- CFStringRef text;
- ControlFontStyleRec style;
- ControlHandle outControl;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowPtr window;
+ Rect boundsRect;
+ CFStringRef text;
+ ControlFontStyleRec style;
+ ControlHandle outControl;
#ifndef CreateStaticTextControl
- PyMac_PRECHECK(CreateStaticTextControl);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&O&",
- WinObj_Convert, &window,
- PyMac_GetRect, &boundsRect,
- CFStringRefObj_Convert, &text,
- ControlFontStyle_Convert, &style))
- return NULL;
- _err = CreateStaticTextControl(window,
- &boundsRect,
- text,
- &style,
- &outControl);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- CtlObj_New, outControl);
- return _res;
+ PyMac_PRECHECK(CreateStaticTextControl);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&O&",
+ WinObj_Convert, &window,
+ PyMac_GetRect, &boundsRect,
+ CFStringRefObj_Convert, &text,
+ ControlFontStyle_Convert, &style))
+ return NULL;
+ _err = CreateStaticTextControl(window,
+ &boundsRect,
+ text,
+ &style,
+ &outControl);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ CtlObj_New, outControl);
+ return _res;
}
static PyObject *Ctl_CreatePictureControl(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowPtr window;
- Rect boundsRect;
- ControlButtonContentInfo content;
- Boolean dontTrack;
- ControlHandle outControl;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowPtr window;
+ Rect boundsRect;
+ ControlButtonContentInfo content;
+ Boolean dontTrack;
+ ControlHandle outControl;
#ifndef CreatePictureControl
- PyMac_PRECHECK(CreatePictureControl);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&b",
- WinObj_Convert, &window,
- PyMac_GetRect, &boundsRect,
- ControlButtonContentInfo_Convert, &content,
- &dontTrack))
- return NULL;
- _err = CreatePictureControl(window,
- &boundsRect,
- &content,
- dontTrack,
- &outControl);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- CtlObj_New, outControl);
- return _res;
+ PyMac_PRECHECK(CreatePictureControl);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&b",
+ WinObj_Convert, &window,
+ PyMac_GetRect, &boundsRect,
+ ControlButtonContentInfo_Convert, &content,
+ &dontTrack))
+ return NULL;
+ _err = CreatePictureControl(window,
+ &boundsRect,
+ &content,
+ dontTrack,
+ &outControl);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ CtlObj_New, outControl);
+ return _res;
}
static PyObject *Ctl_CreateIconControl(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowPtr inWindow;
- Rect inBoundsRect;
- ControlButtonContentInfo inIconContent;
- Boolean inDontTrack;
- ControlHandle outControl;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowPtr inWindow;
+ Rect inBoundsRect;
+ ControlButtonContentInfo inIconContent;
+ Boolean inDontTrack;
+ ControlHandle outControl;
#ifndef CreateIconControl
- PyMac_PRECHECK(CreateIconControl);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&b",
- WinObj_Convert, &inWindow,
- PyMac_GetRect, &inBoundsRect,
- ControlButtonContentInfo_Convert, &inIconContent,
- &inDontTrack))
- return NULL;
- _err = CreateIconControl(inWindow,
- &inBoundsRect,
- &inIconContent,
- inDontTrack,
- &outControl);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- CtlObj_New, outControl);
- return _res;
+ PyMac_PRECHECK(CreateIconControl);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&b",
+ WinObj_Convert, &inWindow,
+ PyMac_GetRect, &inBoundsRect,
+ ControlButtonContentInfo_Convert, &inIconContent,
+ &inDontTrack))
+ return NULL;
+ _err = CreateIconControl(inWindow,
+ &inBoundsRect,
+ &inIconContent,
+ inDontTrack,
+ &outControl);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ CtlObj_New, outControl);
+ return _res;
}
static PyObject *Ctl_CreateWindowHeaderControl(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowPtr window;
- Rect boundsRect;
- Boolean isListHeader;
- ControlHandle outControl;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowPtr window;
+ Rect boundsRect;
+ Boolean isListHeader;
+ ControlHandle outControl;
#ifndef CreateWindowHeaderControl
- PyMac_PRECHECK(CreateWindowHeaderControl);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&b",
- WinObj_Convert, &window,
- PyMac_GetRect, &boundsRect,
- &isListHeader))
- return NULL;
- _err = CreateWindowHeaderControl(window,
- &boundsRect,
- isListHeader,
- &outControl);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- CtlObj_New, outControl);
- return _res;
+ PyMac_PRECHECK(CreateWindowHeaderControl);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&b",
+ WinObj_Convert, &window,
+ PyMac_GetRect, &boundsRect,
+ &isListHeader))
+ return NULL;
+ _err = CreateWindowHeaderControl(window,
+ &boundsRect,
+ isListHeader,
+ &outControl);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ CtlObj_New, outControl);
+ return _res;
}
static PyObject *Ctl_CreatePushButtonControl(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowPtr window;
- Rect boundsRect;
- CFStringRef title;
- ControlHandle outControl;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowPtr window;
+ Rect boundsRect;
+ CFStringRef title;
+ ControlHandle outControl;
#ifndef CreatePushButtonControl
- PyMac_PRECHECK(CreatePushButtonControl);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- WinObj_Convert, &window,
- PyMac_GetRect, &boundsRect,
- CFStringRefObj_Convert, &title))
- return NULL;
- _err = CreatePushButtonControl(window,
- &boundsRect,
- title,
- &outControl);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- CtlObj_New, outControl);
- return _res;
+ PyMac_PRECHECK(CreatePushButtonControl);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ WinObj_Convert, &window,
+ PyMac_GetRect, &boundsRect,
+ CFStringRefObj_Convert, &title))
+ return NULL;
+ _err = CreatePushButtonControl(window,
+ &boundsRect,
+ title,
+ &outControl);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ CtlObj_New, outControl);
+ return _res;
}
static PyObject *Ctl_CreatePushButtonWithIconControl(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowPtr window;
- Rect boundsRect;
- CFStringRef title;
- ControlButtonContentInfo icon;
- UInt16 iconAlignment;
- ControlHandle outControl;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowPtr window;
+ Rect boundsRect;
+ CFStringRef title;
+ ControlButtonContentInfo icon;
+ UInt16 iconAlignment;
+ ControlHandle outControl;
#ifndef CreatePushButtonWithIconControl
- PyMac_PRECHECK(CreatePushButtonWithIconControl);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&O&H",
- WinObj_Convert, &window,
- PyMac_GetRect, &boundsRect,
- CFStringRefObj_Convert, &title,
- ControlButtonContentInfo_Convert, &icon,
- &iconAlignment))
- return NULL;
- _err = CreatePushButtonWithIconControl(window,
- &boundsRect,
- title,
- &icon,
- iconAlignment,
- &outControl);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- CtlObj_New, outControl);
- return _res;
+ PyMac_PRECHECK(CreatePushButtonWithIconControl);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&O&H",
+ WinObj_Convert, &window,
+ PyMac_GetRect, &boundsRect,
+ CFStringRefObj_Convert, &title,
+ ControlButtonContentInfo_Convert, &icon,
+ &iconAlignment))
+ return NULL;
+ _err = CreatePushButtonWithIconControl(window,
+ &boundsRect,
+ title,
+ &icon,
+ iconAlignment,
+ &outControl);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ CtlObj_New, outControl);
+ return _res;
}
static PyObject *Ctl_CreateRadioButtonControl(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowPtr window;
- Rect boundsRect;
- CFStringRef title;
- SInt32 initialValue;
- Boolean autoToggle;
- ControlHandle outControl;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowPtr window;
+ Rect boundsRect;
+ CFStringRef title;
+ SInt32 initialValue;
+ Boolean autoToggle;
+ ControlHandle outControl;
#ifndef CreateRadioButtonControl
- PyMac_PRECHECK(CreateRadioButtonControl);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&lb",
- WinObj_Convert, &window,
- PyMac_GetRect, &boundsRect,
- CFStringRefObj_Convert, &title,
- &initialValue,
- &autoToggle))
- return NULL;
- _err = CreateRadioButtonControl(window,
- &boundsRect,
- title,
- initialValue,
- autoToggle,
- &outControl);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- CtlObj_New, outControl);
- return _res;
+ PyMac_PRECHECK(CreateRadioButtonControl);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&lb",
+ WinObj_Convert, &window,
+ PyMac_GetRect, &boundsRect,
+ CFStringRefObj_Convert, &title,
+ &initialValue,
+ &autoToggle))
+ return NULL;
+ _err = CreateRadioButtonControl(window,
+ &boundsRect,
+ title,
+ initialValue,
+ autoToggle,
+ &outControl);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ CtlObj_New, outControl);
+ return _res;
}
static PyObject *Ctl_CreateCheckBoxControl(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowPtr window;
- Rect boundsRect;
- CFStringRef title;
- SInt32 initialValue;
- Boolean autoToggle;
- ControlHandle outControl;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowPtr window;
+ Rect boundsRect;
+ CFStringRef title;
+ SInt32 initialValue;
+ Boolean autoToggle;
+ ControlHandle outControl;
#ifndef CreateCheckBoxControl
- PyMac_PRECHECK(CreateCheckBoxControl);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&lb",
- WinObj_Convert, &window,
- PyMac_GetRect, &boundsRect,
- CFStringRefObj_Convert, &title,
- &initialValue,
- &autoToggle))
- return NULL;
- _err = CreateCheckBoxControl(window,
- &boundsRect,
- title,
- initialValue,
- autoToggle,
- &outControl);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- CtlObj_New, outControl);
- return _res;
+ PyMac_PRECHECK(CreateCheckBoxControl);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&lb",
+ WinObj_Convert, &window,
+ PyMac_GetRect, &boundsRect,
+ CFStringRefObj_Convert, &title,
+ &initialValue,
+ &autoToggle))
+ return NULL;
+ _err = CreateCheckBoxControl(window,
+ &boundsRect,
+ title,
+ initialValue,
+ autoToggle,
+ &outControl);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ CtlObj_New, outControl);
+ return _res;
}
static PyObject *Ctl_CreateScrollBarControl(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowPtr window;
- Rect boundsRect;
- SInt32 value;
- SInt32 minimum;
- SInt32 maximum;
- SInt32 viewSize;
- Boolean liveTracking;
- PyObject* liveTrackingProc;
- UniversalProcPtr c_callback;
- ControlHandle outControl;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowPtr window;
+ Rect boundsRect;
+ SInt32 value;
+ SInt32 minimum;
+ SInt32 maximum;
+ SInt32 viewSize;
+ Boolean liveTracking;
+ PyObject* liveTrackingProc;
+ UniversalProcPtr c_callback;
+ ControlHandle outControl;
#ifndef CreateScrollBarControl
- PyMac_PRECHECK(CreateScrollBarControl);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&llllbO",
- WinObj_Convert, &window,
- PyMac_GetRect, &boundsRect,
- &value,
- &minimum,
- &maximum,
- &viewSize,
- &liveTracking,
- &liveTrackingProc))
- return NULL;
- _err = CreateScrollBarControl(window,
- &boundsRect,
- value,
- minimum,
- maximum,
- viewSize,
- liveTracking,
- myactionproc_upp,
- &outControl);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- CtlObj_New, outControl);
- setcallback(_res, kMyControlActionProcTag, liveTrackingProc, &c_callback);
- return _res;
+ PyMac_PRECHECK(CreateScrollBarControl);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&llllbO",
+ WinObj_Convert, &window,
+ PyMac_GetRect, &boundsRect,
+ &value,
+ &minimum,
+ &maximum,
+ &viewSize,
+ &liveTracking,
+ &liveTrackingProc))
+ return NULL;
+ _err = CreateScrollBarControl(window,
+ &boundsRect,
+ value,
+ minimum,
+ maximum,
+ viewSize,
+ liveTracking,
+ myactionproc_upp,
+ &outControl);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ CtlObj_New, outControl);
+ setcallback(_res, kMyControlActionProcTag, liveTrackingProc, &c_callback);
+ return _res;
}
static PyObject *Ctl_CreatePopupButtonControl(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowPtr window;
- Rect boundsRect;
- CFStringRef title;
- SInt16 menuID;
- Boolean variableWidth;
- SInt16 titleWidth;
- SInt16 titleJustification;
- Style titleStyle;
- ControlHandle outControl;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowPtr window;
+ Rect boundsRect;
+ CFStringRef title;
+ SInt16 menuID;
+ Boolean variableWidth;
+ SInt16 titleWidth;
+ SInt16 titleJustification;
+ Style titleStyle;
+ ControlHandle outControl;
#ifndef CreatePopupButtonControl
- PyMac_PRECHECK(CreatePopupButtonControl);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&hbhhb",
- WinObj_Convert, &window,
- PyMac_GetRect, &boundsRect,
- CFStringRefObj_Convert, &title,
- &menuID,
- &variableWidth,
- &titleWidth,
- &titleJustification,
- &titleStyle))
- return NULL;
- _err = CreatePopupButtonControl(window,
- &boundsRect,
- title,
- menuID,
- variableWidth,
- titleWidth,
- titleJustification,
- titleStyle,
- &outControl);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- CtlObj_New, outControl);
- return _res;
+ PyMac_PRECHECK(CreatePopupButtonControl);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&hbhhb",
+ WinObj_Convert, &window,
+ PyMac_GetRect, &boundsRect,
+ CFStringRefObj_Convert, &title,
+ &menuID,
+ &variableWidth,
+ &titleWidth,
+ &titleJustification,
+ &titleStyle))
+ return NULL;
+ _err = CreatePopupButtonControl(window,
+ &boundsRect,
+ title,
+ menuID,
+ variableWidth,
+ titleWidth,
+ titleJustification,
+ titleStyle,
+ &outControl);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ CtlObj_New, outControl);
+ return _res;
}
static PyObject *Ctl_CreateRadioGroupControl(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowPtr window;
- Rect boundsRect;
- ControlHandle outControl;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowPtr window;
+ Rect boundsRect;
+ ControlHandle outControl;
#ifndef CreateRadioGroupControl
- PyMac_PRECHECK(CreateRadioGroupControl);
+ PyMac_PRECHECK(CreateRadioGroupControl);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- WinObj_Convert, &window,
- PyMac_GetRect, &boundsRect))
- return NULL;
- _err = CreateRadioGroupControl(window,
- &boundsRect,
- &outControl);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- CtlObj_New, outControl);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ WinObj_Convert, &window,
+ PyMac_GetRect, &boundsRect))
+ return NULL;
+ _err = CreateRadioGroupControl(window,
+ &boundsRect,
+ &outControl);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ CtlObj_New, outControl);
+ return _res;
}
static PyObject *Ctl_CreateScrollingTextBoxControl(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowPtr window;
- Rect boundsRect;
- SInt16 contentResID;
- Boolean autoScroll;
- UInt32 delayBeforeAutoScroll;
- UInt32 delayBetweenAutoScroll;
- UInt16 autoScrollAmount;
- ControlHandle outControl;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowPtr window;
+ Rect boundsRect;
+ SInt16 contentResID;
+ Boolean autoScroll;
+ UInt32 delayBeforeAutoScroll;
+ UInt32 delayBetweenAutoScroll;
+ UInt16 autoScrollAmount;
+ ControlHandle outControl;
#ifndef CreateScrollingTextBoxControl
- PyMac_PRECHECK(CreateScrollingTextBoxControl);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&hbllH",
- WinObj_Convert, &window,
- PyMac_GetRect, &boundsRect,
- &contentResID,
- &autoScroll,
- &delayBeforeAutoScroll,
- &delayBetweenAutoScroll,
- &autoScrollAmount))
- return NULL;
- _err = CreateScrollingTextBoxControl(window,
- &boundsRect,
- contentResID,
- autoScroll,
- delayBeforeAutoScroll,
- delayBetweenAutoScroll,
- autoScrollAmount,
- &outControl);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- CtlObj_New, outControl);
- return _res;
+ PyMac_PRECHECK(CreateScrollingTextBoxControl);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&hbllH",
+ WinObj_Convert, &window,
+ PyMac_GetRect, &boundsRect,
+ &contentResID,
+ &autoScroll,
+ &delayBeforeAutoScroll,
+ &delayBetweenAutoScroll,
+ &autoScrollAmount))
+ return NULL;
+ _err = CreateScrollingTextBoxControl(window,
+ &boundsRect,
+ contentResID,
+ autoScroll,
+ delayBeforeAutoScroll,
+ delayBetweenAutoScroll,
+ autoScrollAmount,
+ &outControl);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ CtlObj_New, outControl);
+ return _res;
}
static PyObject *Ctl_CreateDisclosureButtonControl(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowPtr inWindow;
- Rect inBoundsRect;
- SInt32 inValue;
- Boolean inAutoToggles;
- ControlHandle outControl;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowPtr inWindow;
+ Rect inBoundsRect;
+ SInt32 inValue;
+ Boolean inAutoToggles;
+ ControlHandle outControl;
#ifndef CreateDisclosureButtonControl
- PyMac_PRECHECK(CreateDisclosureButtonControl);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&lb",
- WinObj_Convert, &inWindow,
- PyMac_GetRect, &inBoundsRect,
- &inValue,
- &inAutoToggles))
- return NULL;
- _err = CreateDisclosureButtonControl(inWindow,
- &inBoundsRect,
- inValue,
- inAutoToggles,
- &outControl);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- CtlObj_New, outControl);
- return _res;
+ PyMac_PRECHECK(CreateDisclosureButtonControl);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&lb",
+ WinObj_Convert, &inWindow,
+ PyMac_GetRect, &inBoundsRect,
+ &inValue,
+ &inAutoToggles))
+ return NULL;
+ _err = CreateDisclosureButtonControl(inWindow,
+ &inBoundsRect,
+ inValue,
+ inAutoToggles,
+ &outControl);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ CtlObj_New, outControl);
+ return _res;
}
static PyObject *Ctl_CreateRoundButtonControl(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowPtr inWindow;
- Rect inBoundsRect;
- SInt16 inSize;
- ControlButtonContentInfo inContent;
- ControlHandle outControl;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowPtr inWindow;
+ Rect inBoundsRect;
+ SInt16 inSize;
+ ControlButtonContentInfo inContent;
+ ControlHandle outControl;
#ifndef CreateRoundButtonControl
- PyMac_PRECHECK(CreateRoundButtonControl);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&hO&",
- WinObj_Convert, &inWindow,
- PyMac_GetRect, &inBoundsRect,
- &inSize,
- ControlButtonContentInfo_Convert, &inContent))
- return NULL;
- _err = CreateRoundButtonControl(inWindow,
- &inBoundsRect,
- inSize,
- &inContent,
- &outControl);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- CtlObj_New, outControl);
- return _res;
+ PyMac_PRECHECK(CreateRoundButtonControl);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&hO&",
+ WinObj_Convert, &inWindow,
+ PyMac_GetRect, &inBoundsRect,
+ &inSize,
+ ControlButtonContentInfo_Convert, &inContent))
+ return NULL;
+ _err = CreateRoundButtonControl(inWindow,
+ &inBoundsRect,
+ inSize,
+ &inContent,
+ &outControl);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ CtlObj_New, outControl);
+ return _res;
}
static PyObject *Ctl_CreateDataBrowserControl(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowPtr window;
- Rect boundsRect;
- OSType style;
- ControlHandle outControl;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowPtr window;
+ Rect boundsRect;
+ OSType style;
+ ControlHandle outControl;
#ifndef CreateDataBrowserControl
- PyMac_PRECHECK(CreateDataBrowserControl);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- WinObj_Convert, &window,
- PyMac_GetRect, &boundsRect,
- PyMac_GetOSType, &style))
- return NULL;
- _err = CreateDataBrowserControl(window,
- &boundsRect,
- style,
- &outControl);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- CtlObj_New, outControl);
- return _res;
+ PyMac_PRECHECK(CreateDataBrowserControl);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ WinObj_Convert, &window,
+ PyMac_GetRect, &boundsRect,
+ PyMac_GetOSType, &style))
+ return NULL;
+ _err = CreateDataBrowserControl(window,
+ &boundsRect,
+ style,
+ &outControl);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ CtlObj_New, outControl);
+ return _res;
}
static PyObject *Ctl_CreateEditUnicodeTextControl(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowPtr window;
- Rect boundsRect;
- CFStringRef text;
- Boolean isPassword;
- ControlFontStyleRec style;
- ControlHandle outControl;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowPtr window;
+ Rect boundsRect;
+ CFStringRef text;
+ Boolean isPassword;
+ ControlFontStyleRec style;
+ ControlHandle outControl;
#ifndef CreateEditUnicodeTextControl
- PyMac_PRECHECK(CreateEditUnicodeTextControl);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&bO&",
- WinObj_Convert, &window,
- PyMac_GetRect, &boundsRect,
- CFStringRefObj_Convert, &text,
- &isPassword,
- ControlFontStyle_Convert, &style))
- return NULL;
- _err = CreateEditUnicodeTextControl(window,
- &boundsRect,
- text,
- isPassword,
- &style,
- &outControl);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- CtlObj_New, outControl);
- return _res;
+ PyMac_PRECHECK(CreateEditUnicodeTextControl);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&bO&",
+ WinObj_Convert, &window,
+ PyMac_GetRect, &boundsRect,
+ CFStringRefObj_Convert, &text,
+ &isPassword,
+ ControlFontStyle_Convert, &style))
+ return NULL;
+ _err = CreateEditUnicodeTextControl(window,
+ &boundsRect,
+ text,
+ isPassword,
+ &style,
+ &outControl);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ CtlObj_New, outControl);
+ return _res;
}
static PyObject *Ctl_FindControlUnderMouse(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ControlHandle _rv;
- Point inWhere;
- WindowPtr inWindow;
- SInt16 outPart;
+ PyObject *_res = NULL;
+ ControlHandle _rv;
+ Point inWhere;
+ WindowPtr inWindow;
+ SInt16 outPart;
#ifndef FindControlUnderMouse
- PyMac_PRECHECK(FindControlUnderMouse);
+ PyMac_PRECHECK(FindControlUnderMouse);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- PyMac_GetPoint, &inWhere,
- WinObj_Convert, &inWindow))
- return NULL;
- _rv = FindControlUnderMouse(inWhere,
- inWindow,
- &outPart);
- _res = Py_BuildValue("O&h",
- CtlObj_WhichControl, _rv,
- outPart);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ PyMac_GetPoint, &inWhere,
+ WinObj_Convert, &inWindow))
+ return NULL;
+ _rv = FindControlUnderMouse(inWhere,
+ inWindow,
+ &outPart);
+ _res = Py_BuildValue("O&h",
+ CtlObj_WhichControl, _rv,
+ outPart);
+ return _res;
}
static PyObject *Ctl_as_Control(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ControlHandle _rv;
- Handle h;
+ PyObject *_res = NULL;
+ ControlHandle _rv;
+ Handle h;
#ifndef as_Control
- PyMac_PRECHECK(as_Control);
+ PyMac_PRECHECK(as_Control);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &h))
- return NULL;
- _rv = as_Control(h);
- _res = Py_BuildValue("O&",
- CtlObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &h))
+ return NULL;
+ _rv = as_Control(h);
+ _res = Py_BuildValue("O&",
+ CtlObj_New, _rv);
+ return _res;
}
static PyObject *Ctl_CreateTabsControl(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowPtr window;
- Rect boundsRect;
- UInt16 size;
- UInt16 direction;
- int i;
- UInt16 numTabs;
- ControlTabEntry tabArray[MAXTABS];
- ControlHandle outControl;
- PyObject *tabArrayObj, *tabEntry;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowPtr window;
+ Rect boundsRect;
+ UInt16 size;
+ UInt16 direction;
+ int i;
+ UInt16 numTabs;
+ ControlTabEntry tabArray[MAXTABS];
+ ControlHandle outControl;
+ PyObject *tabArrayObj, *tabEntry;
#ifndef CreateTabsControl
- PyMac_PRECHECK(CreateTabsControl);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&HHO",
- WinObj_Convert, &window,
- PyMac_GetRect, &boundsRect,
- &size,
- &direction,
- &tabArrayObj))
- return NULL;
-
- i = PySequence_Length(tabArrayObj);
- if (i == -1)
- return NULL;
- if (i > MAXTABS) {
- PyErr_SetString(Ctl_Error, "Too many tabs");
- return NULL;
- }
- numTabs = i;
- for (i=0; i<numTabs; i++) {
- tabEntry = PySequence_GetItem(tabArrayObj, i);
- if (tabEntry == NULL)
- return NULL;
- if (!PyArg_Parse(tabEntry, "(O&O&B)",
- ControlButtonContentInfo_Convert, &tabArray[i].icon,
- CFStringRefObj_Convert, &tabArray[i].name,
- &tabArray[i].enabled
- ))
- return NULL;
- }
-
- _err = CreateTabsControl(window,
- &boundsRect,
- size,
- direction,
- numTabs,
- tabArray,
- &outControl);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- CtlObj_New, outControl);
- return _res;
+ PyMac_PRECHECK(CreateTabsControl);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&HHO",
+ WinObj_Convert, &window,
+ PyMac_GetRect, &boundsRect,
+ &size,
+ &direction,
+ &tabArrayObj))
+ return NULL;
+
+ i = PySequence_Length(tabArrayObj);
+ if (i == -1)
+ return NULL;
+ if (i > MAXTABS) {
+ PyErr_SetString(Ctl_Error, "Too many tabs");
+ return NULL;
+ }
+ numTabs = i;
+ for (i=0; i<numTabs; i++) {
+ tabEntry = PySequence_GetItem(tabArrayObj, i);
+ if (tabEntry == NULL)
+ return NULL;
+ if (!PyArg_Parse(tabEntry, "(O&O&B)",
+ ControlButtonContentInfo_Convert, &tabArray[i].icon,
+ CFStringRefObj_Convert, &tabArray[i].name,
+ &tabArray[i].enabled
+ ))
+ return NULL;
+ }
+
+ _err = CreateTabsControl(window,
+ &boundsRect,
+ size,
+ direction,
+ numTabs,
+ tabArray,
+ &outControl);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ CtlObj_New, outControl);
+ return _res;
}
static PyMethodDef Ctl_methods[] = {
- {"NewControl", (PyCFunction)Ctl_NewControl, 1,
- PyDoc_STR("(WindowPtr owningWindow, Rect boundsRect, Str255 controlTitle, Boolean initiallyVisible, SInt16 initialValue, SInt16 minimumValue, SInt16 maximumValue, SInt16 procID, SInt32 controlReference) -> (ControlHandle _rv)")},
- {"GetNewControl", (PyCFunction)Ctl_GetNewControl, 1,
- PyDoc_STR("(SInt16 resourceID, WindowPtr owningWindow) -> (ControlHandle _rv)")},
- {"DrawControls", (PyCFunction)Ctl_DrawControls, 1,
- PyDoc_STR("(WindowPtr theWindow) -> None")},
- {"UpdateControls", (PyCFunction)Ctl_UpdateControls, 1,
- PyDoc_STR("(WindowPtr inWindow, RgnHandle inUpdateRegion) -> None")},
- {"FindControl", (PyCFunction)Ctl_FindControl, 1,
- PyDoc_STR("(Point testPoint, WindowPtr theWindow) -> (ControlPartCode _rv, ControlHandle theControl)")},
- {"IdleControls", (PyCFunction)Ctl_IdleControls, 1,
- PyDoc_STR("(WindowPtr inWindow) -> None")},
- {"GetControlByID", (PyCFunction)Ctl_GetControlByID, 1,
- PyDoc_STR("(WindowPtr inWindow, ControlID inID) -> (ControlHandle outControl)")},
- {"DumpControlHierarchy", (PyCFunction)Ctl_DumpControlHierarchy, 1,
- PyDoc_STR("(WindowPtr inWindow, FSSpec inDumpFile) -> None")},
- {"CreateRootControl", (PyCFunction)Ctl_CreateRootControl, 1,
- PyDoc_STR("(WindowPtr inWindow) -> (ControlHandle outControl)")},
- {"GetRootControl", (PyCFunction)Ctl_GetRootControl, 1,
- PyDoc_STR("(WindowPtr inWindow) -> (ControlHandle outControl)")},
- {"GetKeyboardFocus", (PyCFunction)Ctl_GetKeyboardFocus, 1,
- PyDoc_STR("(WindowPtr inWindow) -> (ControlHandle outControl)")},
- {"SetKeyboardFocus", (PyCFunction)Ctl_SetKeyboardFocus, 1,
- PyDoc_STR("(WindowPtr inWindow, ControlHandle inControl, ControlFocusPart inPart) -> None")},
- {"AdvanceKeyboardFocus", (PyCFunction)Ctl_AdvanceKeyboardFocus, 1,
- PyDoc_STR("(WindowPtr inWindow) -> None")},
- {"ReverseKeyboardFocus", (PyCFunction)Ctl_ReverseKeyboardFocus, 1,
- PyDoc_STR("(WindowPtr inWindow) -> None")},
- {"ClearKeyboardFocus", (PyCFunction)Ctl_ClearKeyboardFocus, 1,
- PyDoc_STR("(WindowPtr inWindow) -> None")},
- {"SetAutomaticControlDragTrackingEnabledForWindow", (PyCFunction)Ctl_SetAutomaticControlDragTrackingEnabledForWindow, 1,
- PyDoc_STR("(WindowPtr inWindow, Boolean inTracks) -> None")},
- {"IsAutomaticControlDragTrackingEnabledForWindow", (PyCFunction)Ctl_IsAutomaticControlDragTrackingEnabledForWindow, 1,
- PyDoc_STR("(WindowPtr inWindow) -> (Boolean outTracks)")},
- {"CreateBevelButtonControl", (PyCFunction)Ctl_CreateBevelButtonControl, 1,
- PyDoc_STR("(WindowPtr window, Rect boundsRect, CFStringRef title, UInt16 thickness, UInt16 behavior, ControlButtonContentInfo info, SInt16 menuID, UInt16 menuBehavior, UInt16 menuPlacement) -> (ControlHandle outControl)")},
- {"CreateSliderControl", (PyCFunction)Ctl_CreateSliderControl, 1,
- PyDoc_STR("(WindowPtr window, Rect boundsRect, SInt32 value, SInt32 minimum, SInt32 maximum, UInt16 orientation, UInt16 numTickMarks, Boolean liveTracking, PyObject* liveTrackingProc) -> (ControlHandle outControl)")},
- {"CreateDisclosureTriangleControl", (PyCFunction)Ctl_CreateDisclosureTriangleControl, 1,
- PyDoc_STR("(WindowPtr inWindow, Rect inBoundsRect, UInt16 inOrientation, CFStringRef inTitle, SInt32 inInitialValue, Boolean inDrawTitle, Boolean inAutoToggles) -> (ControlHandle outControl)")},
- {"CreateProgressBarControl", (PyCFunction)Ctl_CreateProgressBarControl, 1,
- PyDoc_STR("(WindowPtr window, Rect boundsRect, SInt32 value, SInt32 minimum, SInt32 maximum, Boolean indeterminate) -> (ControlHandle outControl)")},
- {"CreateRelevanceBarControl", (PyCFunction)Ctl_CreateRelevanceBarControl, 1,
- PyDoc_STR("(WindowPtr window, Rect boundsRect, SInt32 value, SInt32 minimum, SInt32 maximum) -> (ControlHandle outControl)")},
- {"CreateLittleArrowsControl", (PyCFunction)Ctl_CreateLittleArrowsControl, 1,
- PyDoc_STR("(WindowPtr window, Rect boundsRect, SInt32 value, SInt32 minimum, SInt32 maximum, SInt32 increment) -> (ControlHandle outControl)")},
- {"CreateChasingArrowsControl", (PyCFunction)Ctl_CreateChasingArrowsControl, 1,
- PyDoc_STR("(WindowPtr window, Rect boundsRect) -> (ControlHandle outControl)")},
- {"CreateSeparatorControl", (PyCFunction)Ctl_CreateSeparatorControl, 1,
- PyDoc_STR("(WindowPtr window, Rect boundsRect) -> (ControlHandle outControl)")},
- {"CreateGroupBoxControl", (PyCFunction)Ctl_CreateGroupBoxControl, 1,
- PyDoc_STR("(WindowPtr window, Rect boundsRect, CFStringRef title, Boolean primary) -> (ControlHandle outControl)")},
- {"CreateCheckGroupBoxControl", (PyCFunction)Ctl_CreateCheckGroupBoxControl, 1,
- PyDoc_STR("(WindowPtr window, Rect boundsRect, CFStringRef title, SInt32 initialValue, Boolean primary, Boolean autoToggle) -> (ControlHandle outControl)")},
- {"CreatePopupGroupBoxControl", (PyCFunction)Ctl_CreatePopupGroupBoxControl, 1,
- PyDoc_STR("(WindowPtr window, Rect boundsRect, CFStringRef title, Boolean primary, SInt16 menuID, Boolean variableWidth, SInt16 titleWidth, SInt16 titleJustification, Style titleStyle) -> (ControlHandle outControl)")},
- {"CreateImageWellControl", (PyCFunction)Ctl_CreateImageWellControl, 1,
- PyDoc_STR("(WindowPtr window, Rect boundsRect, ControlButtonContentInfo info) -> (ControlHandle outControl)")},
- {"CreatePopupArrowControl", (PyCFunction)Ctl_CreatePopupArrowControl, 1,
- PyDoc_STR("(WindowPtr window, Rect boundsRect, UInt16 orientation, UInt16 size) -> (ControlHandle outControl)")},
- {"CreatePlacardControl", (PyCFunction)Ctl_CreatePlacardControl, 1,
- PyDoc_STR("(WindowPtr window, Rect boundsRect) -> (ControlHandle outControl)")},
- {"CreateClockControl", (PyCFunction)Ctl_CreateClockControl, 1,
- PyDoc_STR("(WindowPtr window, Rect boundsRect, UInt16 clockType, UInt32 clockFlags) -> (ControlHandle outControl)")},
- {"CreateUserPaneControl", (PyCFunction)Ctl_CreateUserPaneControl, 1,
- PyDoc_STR("(WindowPtr window, Rect boundsRect, UInt32 features) -> (ControlHandle outControl)")},
- {"CreateEditTextControl", (PyCFunction)Ctl_CreateEditTextControl, 1,
- PyDoc_STR("(WindowPtr window, Rect boundsRect, CFStringRef text, Boolean isPassword, Boolean useInlineInput, ControlFontStyleRec style) -> (ControlHandle outControl)")},
- {"CreateStaticTextControl", (PyCFunction)Ctl_CreateStaticTextControl, 1,
- PyDoc_STR("(WindowPtr window, Rect boundsRect, CFStringRef text, ControlFontStyleRec style) -> (ControlHandle outControl)")},
- {"CreatePictureControl", (PyCFunction)Ctl_CreatePictureControl, 1,
- PyDoc_STR("(WindowPtr window, Rect boundsRect, ControlButtonContentInfo content, Boolean dontTrack) -> (ControlHandle outControl)")},
- {"CreateIconControl", (PyCFunction)Ctl_CreateIconControl, 1,
- PyDoc_STR("(WindowPtr inWindow, Rect inBoundsRect, ControlButtonContentInfo inIconContent, Boolean inDontTrack) -> (ControlHandle outControl)")},
- {"CreateWindowHeaderControl", (PyCFunction)Ctl_CreateWindowHeaderControl, 1,
- PyDoc_STR("(WindowPtr window, Rect boundsRect, Boolean isListHeader) -> (ControlHandle outControl)")},
- {"CreatePushButtonControl", (PyCFunction)Ctl_CreatePushButtonControl, 1,
- PyDoc_STR("(WindowPtr window, Rect boundsRect, CFStringRef title) -> (ControlHandle outControl)")},
- {"CreatePushButtonWithIconControl", (PyCFunction)Ctl_CreatePushButtonWithIconControl, 1,
- PyDoc_STR("(WindowPtr window, Rect boundsRect, CFStringRef title, ControlButtonContentInfo icon, UInt16 iconAlignment) -> (ControlHandle outControl)")},
- {"CreateRadioButtonControl", (PyCFunction)Ctl_CreateRadioButtonControl, 1,
- PyDoc_STR("(WindowPtr window, Rect boundsRect, CFStringRef title, SInt32 initialValue, Boolean autoToggle) -> (ControlHandle outControl)")},
- {"CreateCheckBoxControl", (PyCFunction)Ctl_CreateCheckBoxControl, 1,
- PyDoc_STR("(WindowPtr window, Rect boundsRect, CFStringRef title, SInt32 initialValue, Boolean autoToggle) -> (ControlHandle outControl)")},
- {"CreateScrollBarControl", (PyCFunction)Ctl_CreateScrollBarControl, 1,
- PyDoc_STR("(WindowPtr window, Rect boundsRect, SInt32 value, SInt32 minimum, SInt32 maximum, SInt32 viewSize, Boolean liveTracking, PyObject* liveTrackingProc) -> (ControlHandle outControl)")},
- {"CreatePopupButtonControl", (PyCFunction)Ctl_CreatePopupButtonControl, 1,
- PyDoc_STR("(WindowPtr window, Rect boundsRect, CFStringRef title, SInt16 menuID, Boolean variableWidth, SInt16 titleWidth, SInt16 titleJustification, Style titleStyle) -> (ControlHandle outControl)")},
- {"CreateRadioGroupControl", (PyCFunction)Ctl_CreateRadioGroupControl, 1,
- PyDoc_STR("(WindowPtr window, Rect boundsRect) -> (ControlHandle outControl)")},
- {"CreateScrollingTextBoxControl", (PyCFunction)Ctl_CreateScrollingTextBoxControl, 1,
- PyDoc_STR("(WindowPtr window, Rect boundsRect, SInt16 contentResID, Boolean autoScroll, UInt32 delayBeforeAutoScroll, UInt32 delayBetweenAutoScroll, UInt16 autoScrollAmount) -> (ControlHandle outControl)")},
- {"CreateDisclosureButtonControl", (PyCFunction)Ctl_CreateDisclosureButtonControl, 1,
- PyDoc_STR("(WindowPtr inWindow, Rect inBoundsRect, SInt32 inValue, Boolean inAutoToggles) -> (ControlHandle outControl)")},
- {"CreateRoundButtonControl", (PyCFunction)Ctl_CreateRoundButtonControl, 1,
- PyDoc_STR("(WindowPtr inWindow, Rect inBoundsRect, SInt16 inSize, ControlButtonContentInfo inContent) -> (ControlHandle outControl)")},
- {"CreateDataBrowserControl", (PyCFunction)Ctl_CreateDataBrowserControl, 1,
- PyDoc_STR("(WindowPtr window, Rect boundsRect, OSType style) -> (ControlHandle outControl)")},
- {"CreateEditUnicodeTextControl", (PyCFunction)Ctl_CreateEditUnicodeTextControl, 1,
- PyDoc_STR("(WindowPtr window, Rect boundsRect, CFStringRef text, Boolean isPassword, ControlFontStyleRec style) -> (ControlHandle outControl)")},
- {"FindControlUnderMouse", (PyCFunction)Ctl_FindControlUnderMouse, 1,
- PyDoc_STR("(Point inWhere, WindowPtr inWindow) -> (ControlHandle _rv, SInt16 outPart)")},
- {"as_Control", (PyCFunction)Ctl_as_Control, 1,
- PyDoc_STR("(Handle h) -> (ControlHandle _rv)")},
- {"CreateTabsControl", (PyCFunction)Ctl_CreateTabsControl, 1,
- PyDoc_STR("(WindowPtr window, Rect boundsRect, UInt16 size, UInt16 direction, ControlTabEntry tabArray) -> (ControlHandle outControl)")},
- {NULL, NULL, 0}
+ {"NewControl", (PyCFunction)Ctl_NewControl, 1,
+ PyDoc_STR("(WindowPtr owningWindow, Rect boundsRect, Str255 controlTitle, Boolean initiallyVisible, SInt16 initialValue, SInt16 minimumValue, SInt16 maximumValue, SInt16 procID, SInt32 controlReference) -> (ControlHandle _rv)")},
+ {"GetNewControl", (PyCFunction)Ctl_GetNewControl, 1,
+ PyDoc_STR("(SInt16 resourceID, WindowPtr owningWindow) -> (ControlHandle _rv)")},
+ {"DrawControls", (PyCFunction)Ctl_DrawControls, 1,
+ PyDoc_STR("(WindowPtr theWindow) -> None")},
+ {"UpdateControls", (PyCFunction)Ctl_UpdateControls, 1,
+ PyDoc_STR("(WindowPtr inWindow, RgnHandle inUpdateRegion) -> None")},
+ {"FindControl", (PyCFunction)Ctl_FindControl, 1,
+ PyDoc_STR("(Point testPoint, WindowPtr theWindow) -> (ControlPartCode _rv, ControlHandle theControl)")},
+ {"IdleControls", (PyCFunction)Ctl_IdleControls, 1,
+ PyDoc_STR("(WindowPtr inWindow) -> None")},
+ {"GetControlByID", (PyCFunction)Ctl_GetControlByID, 1,
+ PyDoc_STR("(WindowPtr inWindow, ControlID inID) -> (ControlHandle outControl)")},
+ {"DumpControlHierarchy", (PyCFunction)Ctl_DumpControlHierarchy, 1,
+ PyDoc_STR("(WindowPtr inWindow, FSSpec inDumpFile) -> None")},
+ {"CreateRootControl", (PyCFunction)Ctl_CreateRootControl, 1,
+ PyDoc_STR("(WindowPtr inWindow) -> (ControlHandle outControl)")},
+ {"GetRootControl", (PyCFunction)Ctl_GetRootControl, 1,
+ PyDoc_STR("(WindowPtr inWindow) -> (ControlHandle outControl)")},
+ {"GetKeyboardFocus", (PyCFunction)Ctl_GetKeyboardFocus, 1,
+ PyDoc_STR("(WindowPtr inWindow) -> (ControlHandle outControl)")},
+ {"SetKeyboardFocus", (PyCFunction)Ctl_SetKeyboardFocus, 1,
+ PyDoc_STR("(WindowPtr inWindow, ControlHandle inControl, ControlFocusPart inPart) -> None")},
+ {"AdvanceKeyboardFocus", (PyCFunction)Ctl_AdvanceKeyboardFocus, 1,
+ PyDoc_STR("(WindowPtr inWindow) -> None")},
+ {"ReverseKeyboardFocus", (PyCFunction)Ctl_ReverseKeyboardFocus, 1,
+ PyDoc_STR("(WindowPtr inWindow) -> None")},
+ {"ClearKeyboardFocus", (PyCFunction)Ctl_ClearKeyboardFocus, 1,
+ PyDoc_STR("(WindowPtr inWindow) -> None")},
+ {"SetAutomaticControlDragTrackingEnabledForWindow", (PyCFunction)Ctl_SetAutomaticControlDragTrackingEnabledForWindow, 1,
+ PyDoc_STR("(WindowPtr inWindow, Boolean inTracks) -> None")},
+ {"IsAutomaticControlDragTrackingEnabledForWindow", (PyCFunction)Ctl_IsAutomaticControlDragTrackingEnabledForWindow, 1,
+ PyDoc_STR("(WindowPtr inWindow) -> (Boolean outTracks)")},
+ {"CreateBevelButtonControl", (PyCFunction)Ctl_CreateBevelButtonControl, 1,
+ PyDoc_STR("(WindowPtr window, Rect boundsRect, CFStringRef title, UInt16 thickness, UInt16 behavior, ControlButtonContentInfo info, SInt16 menuID, UInt16 menuBehavior, UInt16 menuPlacement) -> (ControlHandle outControl)")},
+ {"CreateSliderControl", (PyCFunction)Ctl_CreateSliderControl, 1,
+ PyDoc_STR("(WindowPtr window, Rect boundsRect, SInt32 value, SInt32 minimum, SInt32 maximum, UInt16 orientation, UInt16 numTickMarks, Boolean liveTracking, PyObject* liveTrackingProc) -> (ControlHandle outControl)")},
+ {"CreateDisclosureTriangleControl", (PyCFunction)Ctl_CreateDisclosureTriangleControl, 1,
+ PyDoc_STR("(WindowPtr inWindow, Rect inBoundsRect, UInt16 inOrientation, CFStringRef inTitle, SInt32 inInitialValue, Boolean inDrawTitle, Boolean inAutoToggles) -> (ControlHandle outControl)")},
+ {"CreateProgressBarControl", (PyCFunction)Ctl_CreateProgressBarControl, 1,
+ PyDoc_STR("(WindowPtr window, Rect boundsRect, SInt32 value, SInt32 minimum, SInt32 maximum, Boolean indeterminate) -> (ControlHandle outControl)")},
+ {"CreateRelevanceBarControl", (PyCFunction)Ctl_CreateRelevanceBarControl, 1,
+ PyDoc_STR("(WindowPtr window, Rect boundsRect, SInt32 value, SInt32 minimum, SInt32 maximum) -> (ControlHandle outControl)")},
+ {"CreateLittleArrowsControl", (PyCFunction)Ctl_CreateLittleArrowsControl, 1,
+ PyDoc_STR("(WindowPtr window, Rect boundsRect, SInt32 value, SInt32 minimum, SInt32 maximum, SInt32 increment) -> (ControlHandle outControl)")},
+ {"CreateChasingArrowsControl", (PyCFunction)Ctl_CreateChasingArrowsControl, 1,
+ PyDoc_STR("(WindowPtr window, Rect boundsRect) -> (ControlHandle outControl)")},
+ {"CreateSeparatorControl", (PyCFunction)Ctl_CreateSeparatorControl, 1,
+ PyDoc_STR("(WindowPtr window, Rect boundsRect) -> (ControlHandle outControl)")},
+ {"CreateGroupBoxControl", (PyCFunction)Ctl_CreateGroupBoxControl, 1,
+ PyDoc_STR("(WindowPtr window, Rect boundsRect, CFStringRef title, Boolean primary) -> (ControlHandle outControl)")},
+ {"CreateCheckGroupBoxControl", (PyCFunction)Ctl_CreateCheckGroupBoxControl, 1,
+ PyDoc_STR("(WindowPtr window, Rect boundsRect, CFStringRef title, SInt32 initialValue, Boolean primary, Boolean autoToggle) -> (ControlHandle outControl)")},
+ {"CreatePopupGroupBoxControl", (PyCFunction)Ctl_CreatePopupGroupBoxControl, 1,
+ PyDoc_STR("(WindowPtr window, Rect boundsRect, CFStringRef title, Boolean primary, SInt16 menuID, Boolean variableWidth, SInt16 titleWidth, SInt16 titleJustification, Style titleStyle) -> (ControlHandle outControl)")},
+ {"CreateImageWellControl", (PyCFunction)Ctl_CreateImageWellControl, 1,
+ PyDoc_STR("(WindowPtr window, Rect boundsRect, ControlButtonContentInfo info) -> (ControlHandle outControl)")},
+ {"CreatePopupArrowControl", (PyCFunction)Ctl_CreatePopupArrowControl, 1,
+ PyDoc_STR("(WindowPtr window, Rect boundsRect, UInt16 orientation, UInt16 size) -> (ControlHandle outControl)")},
+ {"CreatePlacardControl", (PyCFunction)Ctl_CreatePlacardControl, 1,
+ PyDoc_STR("(WindowPtr window, Rect boundsRect) -> (ControlHandle outControl)")},
+ {"CreateClockControl", (PyCFunction)Ctl_CreateClockControl, 1,
+ PyDoc_STR("(WindowPtr window, Rect boundsRect, UInt16 clockType, UInt32 clockFlags) -> (ControlHandle outControl)")},
+ {"CreateUserPaneControl", (PyCFunction)Ctl_CreateUserPaneControl, 1,
+ PyDoc_STR("(WindowPtr window, Rect boundsRect, UInt32 features) -> (ControlHandle outControl)")},
+ {"CreateEditTextControl", (PyCFunction)Ctl_CreateEditTextControl, 1,
+ PyDoc_STR("(WindowPtr window, Rect boundsRect, CFStringRef text, Boolean isPassword, Boolean useInlineInput, ControlFontStyleRec style) -> (ControlHandle outControl)")},
+ {"CreateStaticTextControl", (PyCFunction)Ctl_CreateStaticTextControl, 1,
+ PyDoc_STR("(WindowPtr window, Rect boundsRect, CFStringRef text, ControlFontStyleRec style) -> (ControlHandle outControl)")},
+ {"CreatePictureControl", (PyCFunction)Ctl_CreatePictureControl, 1,
+ PyDoc_STR("(WindowPtr window, Rect boundsRect, ControlButtonContentInfo content, Boolean dontTrack) -> (ControlHandle outControl)")},
+ {"CreateIconControl", (PyCFunction)Ctl_CreateIconControl, 1,
+ PyDoc_STR("(WindowPtr inWindow, Rect inBoundsRect, ControlButtonContentInfo inIconContent, Boolean inDontTrack) -> (ControlHandle outControl)")},
+ {"CreateWindowHeaderControl", (PyCFunction)Ctl_CreateWindowHeaderControl, 1,
+ PyDoc_STR("(WindowPtr window, Rect boundsRect, Boolean isListHeader) -> (ControlHandle outControl)")},
+ {"CreatePushButtonControl", (PyCFunction)Ctl_CreatePushButtonControl, 1,
+ PyDoc_STR("(WindowPtr window, Rect boundsRect, CFStringRef title) -> (ControlHandle outControl)")},
+ {"CreatePushButtonWithIconControl", (PyCFunction)Ctl_CreatePushButtonWithIconControl, 1,
+ PyDoc_STR("(WindowPtr window, Rect boundsRect, CFStringRef title, ControlButtonContentInfo icon, UInt16 iconAlignment) -> (ControlHandle outControl)")},
+ {"CreateRadioButtonControl", (PyCFunction)Ctl_CreateRadioButtonControl, 1,
+ PyDoc_STR("(WindowPtr window, Rect boundsRect, CFStringRef title, SInt32 initialValue, Boolean autoToggle) -> (ControlHandle outControl)")},
+ {"CreateCheckBoxControl", (PyCFunction)Ctl_CreateCheckBoxControl, 1,
+ PyDoc_STR("(WindowPtr window, Rect boundsRect, CFStringRef title, SInt32 initialValue, Boolean autoToggle) -> (ControlHandle outControl)")},
+ {"CreateScrollBarControl", (PyCFunction)Ctl_CreateScrollBarControl, 1,
+ PyDoc_STR("(WindowPtr window, Rect boundsRect, SInt32 value, SInt32 minimum, SInt32 maximum, SInt32 viewSize, Boolean liveTracking, PyObject* liveTrackingProc) -> (ControlHandle outControl)")},
+ {"CreatePopupButtonControl", (PyCFunction)Ctl_CreatePopupButtonControl, 1,
+ PyDoc_STR("(WindowPtr window, Rect boundsRect, CFStringRef title, SInt16 menuID, Boolean variableWidth, SInt16 titleWidth, SInt16 titleJustification, Style titleStyle) -> (ControlHandle outControl)")},
+ {"CreateRadioGroupControl", (PyCFunction)Ctl_CreateRadioGroupControl, 1,
+ PyDoc_STR("(WindowPtr window, Rect boundsRect) -> (ControlHandle outControl)")},
+ {"CreateScrollingTextBoxControl", (PyCFunction)Ctl_CreateScrollingTextBoxControl, 1,
+ PyDoc_STR("(WindowPtr window, Rect boundsRect, SInt16 contentResID, Boolean autoScroll, UInt32 delayBeforeAutoScroll, UInt32 delayBetweenAutoScroll, UInt16 autoScrollAmount) -> (ControlHandle outControl)")},
+ {"CreateDisclosureButtonControl", (PyCFunction)Ctl_CreateDisclosureButtonControl, 1,
+ PyDoc_STR("(WindowPtr inWindow, Rect inBoundsRect, SInt32 inValue, Boolean inAutoToggles) -> (ControlHandle outControl)")},
+ {"CreateRoundButtonControl", (PyCFunction)Ctl_CreateRoundButtonControl, 1,
+ PyDoc_STR("(WindowPtr inWindow, Rect inBoundsRect, SInt16 inSize, ControlButtonContentInfo inContent) -> (ControlHandle outControl)")},
+ {"CreateDataBrowserControl", (PyCFunction)Ctl_CreateDataBrowserControl, 1,
+ PyDoc_STR("(WindowPtr window, Rect boundsRect, OSType style) -> (ControlHandle outControl)")},
+ {"CreateEditUnicodeTextControl", (PyCFunction)Ctl_CreateEditUnicodeTextControl, 1,
+ PyDoc_STR("(WindowPtr window, Rect boundsRect, CFStringRef text, Boolean isPassword, ControlFontStyleRec style) -> (ControlHandle outControl)")},
+ {"FindControlUnderMouse", (PyCFunction)Ctl_FindControlUnderMouse, 1,
+ PyDoc_STR("(Point inWhere, WindowPtr inWindow) -> (ControlHandle _rv, SInt16 outPart)")},
+ {"as_Control", (PyCFunction)Ctl_as_Control, 1,
+ PyDoc_STR("(Handle h) -> (ControlHandle _rv)")},
+ {"CreateTabsControl", (PyCFunction)Ctl_CreateTabsControl, 1,
+ PyDoc_STR("(WindowPtr window, Rect boundsRect, UInt16 size, UInt16 direction, ControlTabEntry tabArray) -> (ControlHandle outControl)")},
+ {NULL, NULL, 0}
};
@@ -5531,283 +5531,283 @@ static PyMethodDef Ctl_methods[] = {
static PyObject *
CtlObj_NewUnmanaged(ControlHandle itself)
{
- ControlObject *it;
- if (itself == NULL) return PyMac_Error(resNotFound);
- it = PyObject_NEW(ControlObject, &Control_Type);
- if (it == NULL) return NULL;
- it->ob_itself = itself;
- it->ob_callbackdict = NULL;
- return (PyObject *)it;
+ ControlObject *it;
+ if (itself == NULL) return PyMac_Error(resNotFound);
+ it = PyObject_NEW(ControlObject, &Control_Type);
+ if (it == NULL) return NULL;
+ it->ob_itself = itself;
+ it->ob_callbackdict = NULL;
+ return (PyObject *)it;
}
static PyObject *
CtlObj_WhichControl(ControlHandle c)
{
- PyObject *it;
+ PyObject *it;
- if (c == NULL)
- it = Py_None;
- else {
- it = (PyObject *) GetControlReference(c);
- /*
- ** If the refcon is zero or doesn't point back to the Python object
- ** the control is not ours. Return a temporary object.
- */
- if (it == NULL || ((ControlObject *)it)->ob_itself != c)
- return CtlObj_NewUnmanaged(c);
- }
- Py_INCREF(it);
- return it;
+ if (c == NULL)
+ it = Py_None;
+ else {
+ it = (PyObject *) GetControlReference(c);
+ /*
+ ** If the refcon is zero or doesn't point back to the Python object
+ ** the control is not ours. Return a temporary object.
+ */
+ if (it == NULL || ((ControlObject *)it)->ob_itself != c)
+ return CtlObj_NewUnmanaged(c);
+ }
+ Py_INCREF(it);
+ return it;
}
static int
settrackfunc(PyObject *obj)
{
- if (tracker) {
- PyErr_SetString(Ctl_Error, "Tracker function in use");
- return 0;
- }
- tracker = obj;
- Py_INCREF(tracker);
- return 1;
+ if (tracker) {
+ PyErr_SetString(Ctl_Error, "Tracker function in use");
+ return 0;
+ }
+ tracker = obj;
+ Py_INCREF(tracker);
+ return 1;
}
static void
clrtrackfunc(void)
{
- Py_XDECREF(tracker);
- tracker = 0;
+ Py_XDECREF(tracker);
+ tracker = 0;
}
static pascal void
mytracker(ControlHandle ctl, short part)
{
- PyObject *args, *rv=0;
+ PyObject *args, *rv=0;
- args = Py_BuildValue("(O&i)", CtlObj_WhichControl, ctl, (int)part);
- if (args && tracker) {
- rv = PyEval_CallObject(tracker, args);
- Py_DECREF(args);
- }
- if (rv)
- Py_DECREF(rv);
- else {
- PySys_WriteStderr("TrackControl or HandleControlClick: exception in tracker function\n");
- PyErr_Print();
- }
+ args = Py_BuildValue("(O&i)", CtlObj_WhichControl, ctl, (int)part);
+ if (args && tracker) {
+ rv = PyEval_CallObject(tracker, args);
+ Py_DECREF(args);
+ }
+ if (rv)
+ Py_DECREF(rv);
+ else {
+ PySys_WriteStderr("TrackControl or HandleControlClick: exception in tracker function\n");
+ PyErr_Print();
+ }
}
static int
setcallback(PyObject *myself, OSType which, PyObject *callback, UniversalProcPtr *uppp)
{
- ControlObject *self = (ControlObject *)myself;
- char keybuf[9];
-
- if ( which == kMyControlActionProcTag )
- *uppp = (UniversalProcPtr)myactionproc_upp;
- else if ( which == kControlUserPaneKeyDownProcTag )
- *uppp = (UniversalProcPtr)mykeydownproc_upp;
- else if ( which == kControlUserPaneFocusProcTag )
- *uppp = (UniversalProcPtr)myfocusproc_upp;
- else if ( which == kControlUserPaneDrawProcTag )
- *uppp = (UniversalProcPtr)mydrawproc_upp;
- else if ( which == kControlUserPaneIdleProcTag )
- *uppp = (UniversalProcPtr)myidleproc_upp;
- else if ( which == kControlUserPaneHitTestProcTag )
- *uppp = (UniversalProcPtr)myhittestproc_upp;
- else if ( which == kControlUserPaneTrackingProcTag )
- *uppp = (UniversalProcPtr)mytrackingproc_upp;
- else
- return -1;
- /* Only now do we test for clearing of the callback: */
- if ( callback == Py_None )
- *uppp = NULL;
- /* Create the dict if it doesn't exist yet (so we don't get such a dict for every control) */
- if ( self->ob_callbackdict == NULL )
- if ( (self->ob_callbackdict = PyDict_New()) == NULL )
- return -1;
- /* And store the Python callback */
- sprintf(keybuf, "%x", (unsigned)which);
- if (PyDict_SetItemString(self->ob_callbackdict, keybuf, callback) < 0)
- return -1;
- return 0;
+ ControlObject *self = (ControlObject *)myself;
+ char keybuf[9];
+
+ if ( which == kMyControlActionProcTag )
+ *uppp = (UniversalProcPtr)myactionproc_upp;
+ else if ( which == kControlUserPaneKeyDownProcTag )
+ *uppp = (UniversalProcPtr)mykeydownproc_upp;
+ else if ( which == kControlUserPaneFocusProcTag )
+ *uppp = (UniversalProcPtr)myfocusproc_upp;
+ else if ( which == kControlUserPaneDrawProcTag )
+ *uppp = (UniversalProcPtr)mydrawproc_upp;
+ else if ( which == kControlUserPaneIdleProcTag )
+ *uppp = (UniversalProcPtr)myidleproc_upp;
+ else if ( which == kControlUserPaneHitTestProcTag )
+ *uppp = (UniversalProcPtr)myhittestproc_upp;
+ else if ( which == kControlUserPaneTrackingProcTag )
+ *uppp = (UniversalProcPtr)mytrackingproc_upp;
+ else
+ return -1;
+ /* Only now do we test for clearing of the callback: */
+ if ( callback == Py_None )
+ *uppp = NULL;
+ /* Create the dict if it doesn't exist yet (so we don't get such a dict for every control) */
+ if ( self->ob_callbackdict == NULL )
+ if ( (self->ob_callbackdict = PyDict_New()) == NULL )
+ return -1;
+ /* And store the Python callback */
+ sprintf(keybuf, "%x", (unsigned)which);
+ if (PyDict_SetItemString(self->ob_callbackdict, keybuf, callback) < 0)
+ return -1;
+ return 0;
}
static PyObject *
callcallback(ControlObject *self, OSType which, PyObject *arglist)
{
- char keybuf[9];
- PyObject *func, *rv;
+ char keybuf[9];
+ PyObject *func, *rv;
- sprintf(keybuf, "%x", (unsigned)which);
- if ( self->ob_callbackdict == NULL ||
- (func = PyDict_GetItemString(self->ob_callbackdict, keybuf)) == NULL ) {
- PySys_WriteStderr("Control callback %x without callback object\n", (unsigned)which);
- return NULL;
- }
- rv = PyEval_CallObject(func, arglist);
- if ( rv == NULL ) {
- PySys_WriteStderr("Exception in control callback %x handler\n", (unsigned)which);
- PyErr_Print();
- }
- return rv;
+ sprintf(keybuf, "%x", (unsigned)which);
+ if ( self->ob_callbackdict == NULL ||
+ (func = PyDict_GetItemString(self->ob_callbackdict, keybuf)) == NULL ) {
+ PySys_WriteStderr("Control callback %x without callback object\n", (unsigned)which);
+ return NULL;
+ }
+ rv = PyEval_CallObject(func, arglist);
+ if ( rv == NULL ) {
+ PySys_WriteStderr("Exception in control callback %x handler\n", (unsigned)which);
+ PyErr_Print();
+ }
+ return rv;
}
static pascal void
myactionproc(ControlHandle control, SInt16 part)
{
- ControlObject *ctl_obj;
- PyObject *arglist, *rv;
+ ControlObject *ctl_obj;
+ PyObject *arglist, *rv;
- ctl_obj = (ControlObject *)CtlObj_WhichControl(control);
- arglist = Py_BuildValue("Oh", ctl_obj, part);
- rv = callcallback(ctl_obj, kMyControlActionProcTag, arglist);
- Py_XDECREF(arglist);
- Py_XDECREF(rv);
+ ctl_obj = (ControlObject *)CtlObj_WhichControl(control);
+ arglist = Py_BuildValue("Oh", ctl_obj, part);
+ rv = callcallback(ctl_obj, kMyControlActionProcTag, arglist);
+ Py_XDECREF(arglist);
+ Py_XDECREF(rv);
}
static pascal ControlPartCode
mykeydownproc(ControlHandle control, SInt16 keyCode, SInt16 charCode, SInt16 modifiers)
{
- ControlObject *ctl_obj;
- PyObject *arglist, *rv;
- short c_rv = 0;
+ ControlObject *ctl_obj;
+ PyObject *arglist, *rv;
+ short c_rv = 0;
- ctl_obj = (ControlObject *)CtlObj_WhichControl(control);
- arglist = Py_BuildValue("Ohhh", ctl_obj, keyCode, charCode, modifiers);
- rv = callcallback(ctl_obj, kControlUserPaneKeyDownProcTag, arglist);
- Py_XDECREF(arglist);
- if ( rv )
- if (!PyArg_Parse(rv, "h", &c_rv))
- PyErr_Clear();
- Py_XDECREF(rv);
- return (ControlPartCode)c_rv;
+ ctl_obj = (ControlObject *)CtlObj_WhichControl(control);
+ arglist = Py_BuildValue("Ohhh", ctl_obj, keyCode, charCode, modifiers);
+ rv = callcallback(ctl_obj, kControlUserPaneKeyDownProcTag, arglist);
+ Py_XDECREF(arglist);
+ if ( rv )
+ if (!PyArg_Parse(rv, "h", &c_rv))
+ PyErr_Clear();
+ Py_XDECREF(rv);
+ return (ControlPartCode)c_rv;
}
static pascal ControlPartCode
myfocusproc(ControlHandle control, ControlPartCode part)
{
- ControlObject *ctl_obj;
- PyObject *arglist, *rv;
- short c_rv = kControlFocusNoPart;
+ ControlObject *ctl_obj;
+ PyObject *arglist, *rv;
+ short c_rv = kControlFocusNoPart;
- ctl_obj = (ControlObject *)CtlObj_WhichControl(control);
- arglist = Py_BuildValue("Oh", ctl_obj, part);
- rv = callcallback(ctl_obj, kControlUserPaneFocusProcTag, arglist);
- Py_XDECREF(arglist);
- if ( rv )
- if (!PyArg_Parse(rv, "h", &c_rv))
- PyErr_Clear();
- Py_XDECREF(rv);
- return (ControlPartCode)c_rv;
+ ctl_obj = (ControlObject *)CtlObj_WhichControl(control);
+ arglist = Py_BuildValue("Oh", ctl_obj, part);
+ rv = callcallback(ctl_obj, kControlUserPaneFocusProcTag, arglist);
+ Py_XDECREF(arglist);
+ if ( rv )
+ if (!PyArg_Parse(rv, "h", &c_rv))
+ PyErr_Clear();
+ Py_XDECREF(rv);
+ return (ControlPartCode)c_rv;
}
static pascal void
mydrawproc(ControlHandle control, SInt16 part)
{
- ControlObject *ctl_obj;
- PyObject *arglist, *rv;
+ ControlObject *ctl_obj;
+ PyObject *arglist, *rv;
- ctl_obj = (ControlObject *)CtlObj_WhichControl(control);
- arglist = Py_BuildValue("Oh", ctl_obj, part);
- rv = callcallback(ctl_obj, kControlUserPaneDrawProcTag, arglist);
- Py_XDECREF(arglist);
- Py_XDECREF(rv);
+ ctl_obj = (ControlObject *)CtlObj_WhichControl(control);
+ arglist = Py_BuildValue("Oh", ctl_obj, part);
+ rv = callcallback(ctl_obj, kControlUserPaneDrawProcTag, arglist);
+ Py_XDECREF(arglist);
+ Py_XDECREF(rv);
}
static pascal void
myidleproc(ControlHandle control)
{
- ControlObject *ctl_obj;
- PyObject *arglist, *rv;
+ ControlObject *ctl_obj;
+ PyObject *arglist, *rv;
- ctl_obj = (ControlObject *)CtlObj_WhichControl(control);
- arglist = Py_BuildValue("O", ctl_obj);
- rv = callcallback(ctl_obj, kControlUserPaneIdleProcTag, arglist);
- Py_XDECREF(arglist);
- Py_XDECREF(rv);
+ ctl_obj = (ControlObject *)CtlObj_WhichControl(control);
+ arglist = Py_BuildValue("O", ctl_obj);
+ rv = callcallback(ctl_obj, kControlUserPaneIdleProcTag, arglist);
+ Py_XDECREF(arglist);
+ Py_XDECREF(rv);
}
static pascal ControlPartCode
myhittestproc(ControlHandle control, Point where)
{
- ControlObject *ctl_obj;
- PyObject *arglist, *rv;
- short c_rv = -1;
+ ControlObject *ctl_obj;
+ PyObject *arglist, *rv;
+ short c_rv = -1;
- ctl_obj = (ControlObject *)CtlObj_WhichControl(control);
- arglist = Py_BuildValue("OO&", ctl_obj, PyMac_BuildPoint, where);
- rv = callcallback(ctl_obj, kControlUserPaneHitTestProcTag, arglist);
- Py_XDECREF(arglist);
- /* Ignore errors, nothing we can do about them */
- if ( rv )
- if (!PyArg_Parse(rv, "h", &c_rv))
- PyErr_Clear();
- Py_XDECREF(rv);
- return (ControlPartCode)c_rv;
+ ctl_obj = (ControlObject *)CtlObj_WhichControl(control);
+ arglist = Py_BuildValue("OO&", ctl_obj, PyMac_BuildPoint, where);
+ rv = callcallback(ctl_obj, kControlUserPaneHitTestProcTag, arglist);
+ Py_XDECREF(arglist);
+ /* Ignore errors, nothing we can do about them */
+ if ( rv )
+ if (!PyArg_Parse(rv, "h", &c_rv))
+ PyErr_Clear();
+ Py_XDECREF(rv);
+ return (ControlPartCode)c_rv;
}
static pascal ControlPartCode
mytrackingproc(ControlHandle control, Point startPt, ControlActionUPP actionProc)
{
- ControlObject *ctl_obj;
- PyObject *arglist, *rv;
- short c_rv = -1;
+ ControlObject *ctl_obj;
+ PyObject *arglist, *rv;
+ short c_rv = -1;
- ctl_obj = (ControlObject *)CtlObj_WhichControl(control);
- /* We cannot pass the actionProc without lots of work */
- arglist = Py_BuildValue("OO&", ctl_obj, PyMac_BuildPoint, startPt);
- rv = callcallback(ctl_obj, kControlUserPaneTrackingProcTag, arglist);
- Py_XDECREF(arglist);
- if ( rv )
- if (!PyArg_Parse(rv, "h", &c_rv))
- PyErr_Clear();
- Py_XDECREF(rv);
- return (ControlPartCode)c_rv;
+ ctl_obj = (ControlObject *)CtlObj_WhichControl(control);
+ /* We cannot pass the actionProc without lots of work */
+ arglist = Py_BuildValue("OO&", ctl_obj, PyMac_BuildPoint, startPt);
+ rv = callcallback(ctl_obj, kControlUserPaneTrackingProcTag, arglist);
+ Py_XDECREF(arglist);
+ if ( rv )
+ if (!PyArg_Parse(rv, "h", &c_rv))
+ PyErr_Clear();
+ Py_XDECREF(rv);
+ return (ControlPartCode)c_rv;
}
#else /* __LP64__ */
static PyMethodDef Ctl_methods[] = {
- {NULL, NULL, 0}
+ {NULL, NULL, 0}
};
#endif /* __LP64__ */
void init_Ctl(void)
{
- PyObject *m;
+ PyObject *m;
#ifndef __LP64__
- PyObject *d;
-
- mytracker_upp = NewControlActionUPP(mytracker);
- myactionproc_upp = NewControlActionUPP(myactionproc);
- mykeydownproc_upp = NewControlUserPaneKeyDownUPP(mykeydownproc);
- myfocusproc_upp = NewControlUserPaneFocusUPP(myfocusproc);
- mydrawproc_upp = NewControlUserPaneDrawUPP(mydrawproc);
- myidleproc_upp = NewControlUserPaneIdleUPP(myidleproc);
- myhittestproc_upp = NewControlUserPaneHitTestUPP(myhittestproc);
- mytrackingproc_upp = NewControlUserPaneTrackingUPP(mytrackingproc);
- PyMac_INIT_TOOLBOX_OBJECT_NEW(ControlHandle, CtlObj_New);
- PyMac_INIT_TOOLBOX_OBJECT_CONVERT(ControlHandle, CtlObj_Convert);
+ PyObject *d;
+
+ mytracker_upp = NewControlActionUPP(mytracker);
+ myactionproc_upp = NewControlActionUPP(myactionproc);
+ mykeydownproc_upp = NewControlUserPaneKeyDownUPP(mykeydownproc);
+ myfocusproc_upp = NewControlUserPaneFocusUPP(myfocusproc);
+ mydrawproc_upp = NewControlUserPaneDrawUPP(mydrawproc);
+ myidleproc_upp = NewControlUserPaneIdleUPP(myidleproc);
+ myhittestproc_upp = NewControlUserPaneHitTestUPP(myhittestproc);
+ mytrackingproc_upp = NewControlUserPaneTrackingUPP(mytrackingproc);
+ PyMac_INIT_TOOLBOX_OBJECT_NEW(ControlHandle, CtlObj_New);
+ PyMac_INIT_TOOLBOX_OBJECT_CONVERT(ControlHandle, CtlObj_Convert);
#endif /* !__LP64__ */
- m = Py_InitModule("_Ctl", Ctl_methods);
+ m = Py_InitModule("_Ctl", Ctl_methods);
#ifndef __LP64__
- d = PyModule_GetDict(m);
- Ctl_Error = PyMac_GetOSErrException();
- if (Ctl_Error == NULL ||
- PyDict_SetItemString(d, "Error", Ctl_Error) != 0)
- return;
- Control_Type.ob_type = &PyType_Type;
- if (PyType_Ready(&Control_Type) < 0) return;
- Py_INCREF(&Control_Type);
- PyModule_AddObject(m, "Control", (PyObject *)&Control_Type);
- /* Backward-compatible name */
- Py_INCREF(&Control_Type);
- PyModule_AddObject(m, "ControlType", (PyObject *)&Control_Type);
+ d = PyModule_GetDict(m);
+ Ctl_Error = PyMac_GetOSErrException();
+ if (Ctl_Error == NULL ||
+ PyDict_SetItemString(d, "Error", Ctl_Error) != 0)
+ return;
+ Control_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&Control_Type) < 0) return;
+ Py_INCREF(&Control_Type);
+ PyModule_AddObject(m, "Control", (PyObject *)&Control_Type);
+ /* Backward-compatible name */
+ Py_INCREF(&Control_Type);
+ PyModule_AddObject(m, "ControlType", (PyObject *)&Control_Type);
#endif /* !__LP64__ */
}
diff --git a/Mac/Modules/dlg/_Dlgmodule.c b/Mac/Modules/dlg/_Dlgmodule.c
index 9afa477..c4d66a9 100644
--- a/Mac/Modules/dlg/_Dlgmodule.c
+++ b/Mac/Modules/dlg/_Dlgmodule.c
@@ -10,9 +10,9 @@
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
- PyErr_SetString(PyExc_NotImplementedError, \
- "Not available in this shared library/OS version"); \
- return NULL; \
+ PyErr_SetString(PyExc_NotImplementedError, \
+ "Not available in this shared library/OS version"); \
+ return NULL; \
}} while(0)
@@ -35,55 +35,55 @@ static pascal Boolean Dlg_UnivFilterProc(DialogPtr dialog,
EventRecord *event,
short *itemHit)
{
- Boolean rv;
- PyObject *args, *res;
- PyObject *callback = Dlg_FilterProc_callback;
- if (callback == NULL)
- return 0; /* Default behavior */
- Dlg_FilterProc_callback = NULL; /* We'll restore it when call successful */
- args = Py_BuildValue("O&O&", DlgObj_WhichDialog, dialog, PyMac_BuildEventRecord, event);
- if (args == NULL)
- res = NULL;
- else {
- res = PyEval_CallObject(callback, args);
- Py_DECREF(args);
- }
- if (res == NULL) {
- PySys_WriteStderr("Exception in Dialog Filter\n");
- PyErr_Print();
- *itemHit = -1; /* Fake return item */
- return 1; /* We handled it */
- }
- else {
- Dlg_FilterProc_callback = callback;
- if (PyInt_Check(res)) {
- *itemHit = PyInt_AsLong(res);
- rv = 1;
- }
- else
- rv = PyObject_IsTrue(res);
+ Boolean rv;
+ PyObject *args, *res;
+ PyObject *callback = Dlg_FilterProc_callback;
+ if (callback == NULL)
+ return 0; /* Default behavior */
+ Dlg_FilterProc_callback = NULL; /* We'll restore it when call successful */
+ args = Py_BuildValue("O&O&", DlgObj_WhichDialog, dialog, PyMac_BuildEventRecord, event);
+ if (args == NULL)
+ res = NULL;
+ else {
+ res = PyEval_CallObject(callback, args);
+ Py_DECREF(args);
+ }
+ if (res == NULL) {
+ PySys_WriteStderr("Exception in Dialog Filter\n");
+ PyErr_Print();
+ *itemHit = -1; /* Fake return item */
+ return 1; /* We handled it */
+ }
+ else {
+ Dlg_FilterProc_callback = callback;
+ if (PyInt_Check(res)) {
+ *itemHit = PyInt_AsLong(res);
+ rv = 1;
}
- Py_DECREF(res);
- return rv;
+ else
+ rv = PyObject_IsTrue(res);
+ }
+ Py_DECREF(res);
+ return rv;
}
static ModalFilterUPP
Dlg_PassFilterProc(PyObject *callback)
{
- PyObject *tmp = Dlg_FilterProc_callback;
- static ModalFilterUPP UnivFilterUpp = NULL;
+ PyObject *tmp = Dlg_FilterProc_callback;
+ static ModalFilterUPP UnivFilterUpp = NULL;
- Dlg_FilterProc_callback = NULL;
- if (callback == Py_None) {
- Py_XDECREF(tmp);
- return NULL;
- }
- Py_INCREF(callback);
- Dlg_FilterProc_callback = callback;
+ Dlg_FilterProc_callback = NULL;
+ if (callback == Py_None) {
Py_XDECREF(tmp);
- if ( UnivFilterUpp == NULL )
- UnivFilterUpp = NewModalFilterUPP(&Dlg_UnivFilterProc);
- return UnivFilterUpp;
+ return NULL;
+ }
+ Py_INCREF(callback);
+ Dlg_FilterProc_callback = callback;
+ Py_XDECREF(tmp);
+ if ( UnivFilterUpp == NULL )
+ UnivFilterUpp = NewModalFilterUPP(&Dlg_UnivFilterProc);
+ return UnivFilterUpp;
}
static PyObject *Dlg_UserItemProc_callback = NULL;
@@ -91,24 +91,24 @@ static PyObject *Dlg_UserItemProc_callback = NULL;
static pascal void Dlg_UnivUserItemProc(DialogPtr dialog,
short item)
{
- PyObject *args, *res;
-
- if (Dlg_UserItemProc_callback == NULL)
- return; /* Default behavior */
- Dlg_FilterProc_callback = NULL; /* We'll restore it when call successful */
- args = Py_BuildValue("O&h", DlgObj_WhichDialog, dialog, item);
- if (args == NULL)
- res = NULL;
- else {
- res = PyEval_CallObject(Dlg_UserItemProc_callback, args);
- Py_DECREF(args);
- }
- if (res == NULL) {
- PySys_WriteStderr("Exception in Dialog UserItem proc\n");
- PyErr_Print();
- }
- Py_XDECREF(res);
- return;
+ PyObject *args, *res;
+
+ if (Dlg_UserItemProc_callback == NULL)
+ return; /* Default behavior */
+ Dlg_FilterProc_callback = NULL; /* We'll restore it when call successful */
+ args = Py_BuildValue("O&h", DlgObj_WhichDialog, dialog, item);
+ if (args == NULL)
+ res = NULL;
+ else {
+ res = PyEval_CallObject(Dlg_UserItemProc_callback, args);
+ Py_DECREF(args);
+ }
+ if (res == NULL) {
+ PySys_WriteStderr("Exception in Dialog UserItem proc\n");
+ PyErr_Print();
+ }
+ Py_XDECREF(res);
+ return;
}
#if 0
@@ -133,811 +133,811 @@ PyTypeObject Dialog_Type;
#define DlgObj_Check(x) ((x)->ob_type == &Dialog_Type || PyObject_TypeCheck((x), &Dialog_Type))
typedef struct DialogObject {
- PyObject_HEAD
- DialogPtr ob_itself;
+ PyObject_HEAD
+ DialogPtr ob_itself;
} DialogObject;
PyObject *DlgObj_New(DialogPtr itself)
{
- DialogObject *it;
- if (itself == NULL) { Py_INCREF(Py_None); return Py_None; }
- it = PyObject_NEW(DialogObject, &Dialog_Type);
- if (it == NULL) return NULL;
- it->ob_itself = itself;
- SetWRefCon(GetDialogWindow(itself), (long)it);
- return (PyObject *)it;
+ DialogObject *it;
+ if (itself == NULL) { Py_INCREF(Py_None); return Py_None; }
+ it = PyObject_NEW(DialogObject, &Dialog_Type);
+ if (it == NULL) return NULL;
+ it->ob_itself = itself;
+ SetWRefCon(GetDialogWindow(itself), (long)it);
+ return (PyObject *)it;
}
int DlgObj_Convert(PyObject *v, DialogPtr *p_itself)
{
- if (v == Py_None) { *p_itself = NULL; return 1; }
- if (PyInt_Check(v)) { *p_itself = (DialogPtr)PyInt_AsLong(v);
- return 1; }
- if (!DlgObj_Check(v))
- {
- PyErr_SetString(PyExc_TypeError, "Dialog required");
- return 0;
- }
- *p_itself = ((DialogObject *)v)->ob_itself;
- return 1;
+ if (v == Py_None) { *p_itself = NULL; return 1; }
+ if (PyInt_Check(v)) { *p_itself = (DialogPtr)PyInt_AsLong(v);
+ return 1; }
+ if (!DlgObj_Check(v))
+ {
+ PyErr_SetString(PyExc_TypeError, "Dialog required");
+ return 0;
+ }
+ *p_itself = ((DialogObject *)v)->ob_itself;
+ return 1;
}
static void DlgObj_dealloc(DialogObject *self)
{
- DisposeDialog(self->ob_itself);
- self->ob_type->tp_free((PyObject *)self);
+ DisposeDialog(self->ob_itself);
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *DlgObj_DrawDialog(DialogObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef DrawDialog
- PyMac_PRECHECK(DrawDialog);
+ PyMac_PRECHECK(DrawDialog);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- DrawDialog(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ DrawDialog(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *DlgObj_UpdateDialog(DialogObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RgnHandle updateRgn;
+ PyObject *_res = NULL;
+ RgnHandle updateRgn;
#ifndef UpdateDialog
- PyMac_PRECHECK(UpdateDialog);
+ PyMac_PRECHECK(UpdateDialog);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &updateRgn))
- return NULL;
- UpdateDialog(_self->ob_itself,
- updateRgn);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &updateRgn))
+ return NULL;
+ UpdateDialog(_self->ob_itself,
+ updateRgn);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *DlgObj_HideDialogItem(DialogObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- DialogItemIndex itemNo;
+ PyObject *_res = NULL;
+ DialogItemIndex itemNo;
#ifndef HideDialogItem
- PyMac_PRECHECK(HideDialogItem);
+ PyMac_PRECHECK(HideDialogItem);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &itemNo))
- return NULL;
- HideDialogItem(_self->ob_itself,
- itemNo);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &itemNo))
+ return NULL;
+ HideDialogItem(_self->ob_itself,
+ itemNo);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *DlgObj_ShowDialogItem(DialogObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- DialogItemIndex itemNo;
+ PyObject *_res = NULL;
+ DialogItemIndex itemNo;
#ifndef ShowDialogItem
- PyMac_PRECHECK(ShowDialogItem);
+ PyMac_PRECHECK(ShowDialogItem);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &itemNo))
- return NULL;
- ShowDialogItem(_self->ob_itself,
- itemNo);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &itemNo))
+ return NULL;
+ ShowDialogItem(_self->ob_itself,
+ itemNo);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *DlgObj_FindDialogItem(DialogObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- DialogItemIndexZeroBased _rv;
- Point thePt;
+ PyObject *_res = NULL;
+ DialogItemIndexZeroBased _rv;
+ Point thePt;
#ifndef FindDialogItem
- PyMac_PRECHECK(FindDialogItem);
+ PyMac_PRECHECK(FindDialogItem);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetPoint, &thePt))
- return NULL;
- _rv = FindDialogItem(_self->ob_itself,
- thePt);
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetPoint, &thePt))
+ return NULL;
+ _rv = FindDialogItem(_self->ob_itself,
+ thePt);
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *DlgObj_DialogCut(DialogObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef DialogCut
- PyMac_PRECHECK(DialogCut);
+ PyMac_PRECHECK(DialogCut);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- DialogCut(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ DialogCut(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *DlgObj_DialogPaste(DialogObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef DialogPaste
- PyMac_PRECHECK(DialogPaste);
+ PyMac_PRECHECK(DialogPaste);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- DialogPaste(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ DialogPaste(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *DlgObj_DialogCopy(DialogObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef DialogCopy
- PyMac_PRECHECK(DialogCopy);
+ PyMac_PRECHECK(DialogCopy);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- DialogCopy(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ DialogCopy(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *DlgObj_DialogDelete(DialogObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef DialogDelete
- PyMac_PRECHECK(DialogDelete);
+ PyMac_PRECHECK(DialogDelete);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- DialogDelete(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ DialogDelete(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *DlgObj_GetDialogItem(DialogObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- DialogItemIndex itemNo;
- DialogItemType itemType;
- Handle item;
- Rect box;
+ PyObject *_res = NULL;
+ DialogItemIndex itemNo;
+ DialogItemType itemType;
+ Handle item;
+ Rect box;
#ifndef GetDialogItem
- PyMac_PRECHECK(GetDialogItem);
+ PyMac_PRECHECK(GetDialogItem);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &itemNo))
- return NULL;
- GetDialogItem(_self->ob_itself,
- itemNo,
- &itemType,
- &item,
- &box);
- _res = Py_BuildValue("hO&O&",
- itemType,
- OptResObj_New, item,
- PyMac_BuildRect, &box);
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &itemNo))
+ return NULL;
+ GetDialogItem(_self->ob_itself,
+ itemNo,
+ &itemType,
+ &item,
+ &box);
+ _res = Py_BuildValue("hO&O&",
+ itemType,
+ OptResObj_New, item,
+ PyMac_BuildRect, &box);
+ return _res;
}
static PyObject *DlgObj_SetDialogItem(DialogObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- DialogItemIndex itemNo;
- DialogItemType itemType;
- Handle item;
- Rect box;
+ PyObject *_res = NULL;
+ DialogItemIndex itemNo;
+ DialogItemType itemType;
+ Handle item;
+ Rect box;
#ifndef SetDialogItem
- PyMac_PRECHECK(SetDialogItem);
+ PyMac_PRECHECK(SetDialogItem);
#endif
- if (!PyArg_ParseTuple(_args, "hhO&O&",
- &itemNo,
- &itemType,
- ResObj_Convert, &item,
- PyMac_GetRect, &box))
- return NULL;
- SetDialogItem(_self->ob_itself,
- itemNo,
- itemType,
- item,
- &box);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "hhO&O&",
+ &itemNo,
+ &itemType,
+ ResObj_Convert, &item,
+ PyMac_GetRect, &box))
+ return NULL;
+ SetDialogItem(_self->ob_itself,
+ itemNo,
+ itemType,
+ item,
+ &box);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *DlgObj_SelectDialogItemText(DialogObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- DialogItemIndex itemNo;
- SInt16 strtSel;
- SInt16 endSel;
+ PyObject *_res = NULL;
+ DialogItemIndex itemNo;
+ SInt16 strtSel;
+ SInt16 endSel;
#ifndef SelectDialogItemText
- PyMac_PRECHECK(SelectDialogItemText);
+ PyMac_PRECHECK(SelectDialogItemText);
#endif
- if (!PyArg_ParseTuple(_args, "hhh",
- &itemNo,
- &strtSel,
- &endSel))
- return NULL;
- SelectDialogItemText(_self->ob_itself,
- itemNo,
- strtSel,
- endSel);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "hhh",
+ &itemNo,
+ &strtSel,
+ &endSel))
+ return NULL;
+ SelectDialogItemText(_self->ob_itself,
+ itemNo,
+ strtSel,
+ endSel);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *DlgObj_AppendDITL(DialogObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Handle theHandle;
- DITLMethod method;
+ PyObject *_res = NULL;
+ Handle theHandle;
+ DITLMethod method;
#ifndef AppendDITL
- PyMac_PRECHECK(AppendDITL);
+ PyMac_PRECHECK(AppendDITL);
#endif
- if (!PyArg_ParseTuple(_args, "O&h",
- ResObj_Convert, &theHandle,
- &method))
- return NULL;
- AppendDITL(_self->ob_itself,
- theHandle,
- method);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&h",
+ ResObj_Convert, &theHandle,
+ &method))
+ return NULL;
+ AppendDITL(_self->ob_itself,
+ theHandle,
+ method);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *DlgObj_CountDITL(DialogObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- DialogItemIndex _rv;
+ PyObject *_res = NULL;
+ DialogItemIndex _rv;
#ifndef CountDITL
- PyMac_PRECHECK(CountDITL);
+ PyMac_PRECHECK(CountDITL);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = CountDITL(_self->ob_itself);
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = CountDITL(_self->ob_itself);
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *DlgObj_ShortenDITL(DialogObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- DialogItemIndex numberItems;
+ PyObject *_res = NULL;
+ DialogItemIndex numberItems;
#ifndef ShortenDITL
- PyMac_PRECHECK(ShortenDITL);
+ PyMac_PRECHECK(ShortenDITL);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &numberItems))
- return NULL;
- ShortenDITL(_self->ob_itself,
- numberItems);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &numberItems))
+ return NULL;
+ ShortenDITL(_self->ob_itself,
+ numberItems);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *DlgObj_InsertDialogItem(DialogObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- DialogItemIndex afterItem;
- DialogItemType itemType;
- Handle itemHandle;
- Rect box;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ DialogItemIndex afterItem;
+ DialogItemType itemType;
+ Handle itemHandle;
+ Rect box;
#ifndef InsertDialogItem
- PyMac_PRECHECK(InsertDialogItem);
+ PyMac_PRECHECK(InsertDialogItem);
#endif
- if (!PyArg_ParseTuple(_args, "hhO&O&",
- &afterItem,
- &itemType,
- ResObj_Convert, &itemHandle,
- PyMac_GetRect, &box))
- return NULL;
- _err = InsertDialogItem(_self->ob_itself,
- afterItem,
- itemType,
- itemHandle,
- &box);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "hhO&O&",
+ &afterItem,
+ &itemType,
+ ResObj_Convert, &itemHandle,
+ PyMac_GetRect, &box))
+ return NULL;
+ _err = InsertDialogItem(_self->ob_itself,
+ afterItem,
+ itemType,
+ itemHandle,
+ &box);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *DlgObj_RemoveDialogItems(DialogObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- DialogItemIndex itemNo;
- DialogItemIndex amountToRemove;
- Boolean disposeItemData;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ DialogItemIndex itemNo;
+ DialogItemIndex amountToRemove;
+ Boolean disposeItemData;
#ifndef RemoveDialogItems
- PyMac_PRECHECK(RemoveDialogItems);
+ PyMac_PRECHECK(RemoveDialogItems);
#endif
- if (!PyArg_ParseTuple(_args, "hhb",
- &itemNo,
- &amountToRemove,
- &disposeItemData))
- return NULL;
- _err = RemoveDialogItems(_self->ob_itself,
- itemNo,
- amountToRemove,
- disposeItemData);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "hhb",
+ &itemNo,
+ &amountToRemove,
+ &disposeItemData))
+ return NULL;
+ _err = RemoveDialogItems(_self->ob_itself,
+ itemNo,
+ amountToRemove,
+ disposeItemData);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *DlgObj_StdFilterProc(DialogObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- EventRecord event;
- DialogItemIndex itemHit;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ EventRecord event;
+ DialogItemIndex itemHit;
#ifndef StdFilterProc
- PyMac_PRECHECK(StdFilterProc);
+ PyMac_PRECHECK(StdFilterProc);
#endif
- if (!PyArg_ParseTuple(_args, "O&h",
- PyMac_GetEventRecord, &event,
- &itemHit))
- return NULL;
- _rv = StdFilterProc(_self->ob_itself,
- &event,
- &itemHit);
- _res = Py_BuildValue("bO&h",
- _rv,
- PyMac_BuildEventRecord, &event,
- itemHit);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&h",
+ PyMac_GetEventRecord, &event,
+ &itemHit))
+ return NULL;
+ _rv = StdFilterProc(_self->ob_itself,
+ &event,
+ &itemHit);
+ _res = Py_BuildValue("bO&h",
+ _rv,
+ PyMac_BuildEventRecord, &event,
+ itemHit);
+ return _res;
}
static PyObject *DlgObj_SetDialogDefaultItem(DialogObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- DialogItemIndex newItem;
+ PyObject *_res = NULL;
+ OSErr _err;
+ DialogItemIndex newItem;
#ifndef SetDialogDefaultItem
- PyMac_PRECHECK(SetDialogDefaultItem);
+ PyMac_PRECHECK(SetDialogDefaultItem);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &newItem))
- return NULL;
- _err = SetDialogDefaultItem(_self->ob_itself,
- newItem);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &newItem))
+ return NULL;
+ _err = SetDialogDefaultItem(_self->ob_itself,
+ newItem);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *DlgObj_SetDialogCancelItem(DialogObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- DialogItemIndex newItem;
+ PyObject *_res = NULL;
+ OSErr _err;
+ DialogItemIndex newItem;
#ifndef SetDialogCancelItem
- PyMac_PRECHECK(SetDialogCancelItem);
+ PyMac_PRECHECK(SetDialogCancelItem);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &newItem))
- return NULL;
- _err = SetDialogCancelItem(_self->ob_itself,
- newItem);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &newItem))
+ return NULL;
+ _err = SetDialogCancelItem(_self->ob_itself,
+ newItem);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *DlgObj_SetDialogTracksCursor(DialogObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Boolean tracks;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Boolean tracks;
#ifndef SetDialogTracksCursor
- PyMac_PRECHECK(SetDialogTracksCursor);
+ PyMac_PRECHECK(SetDialogTracksCursor);
#endif
- if (!PyArg_ParseTuple(_args, "b",
- &tracks))
- return NULL;
- _err = SetDialogTracksCursor(_self->ob_itself,
- tracks);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "b",
+ &tracks))
+ return NULL;
+ _err = SetDialogTracksCursor(_self->ob_itself,
+ tracks);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *DlgObj_AutoSizeDialog(DialogObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
+ PyObject *_res = NULL;
+ OSErr _err;
#ifndef AutoSizeDialog
- PyMac_PRECHECK(AutoSizeDialog);
+ PyMac_PRECHECK(AutoSizeDialog);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = AutoSizeDialog(_self->ob_itself);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = AutoSizeDialog(_self->ob_itself);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *DlgObj_GetDialogItemAsControl(DialogObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- SInt16 inItemNo;
- ControlHandle outControl;
+ PyObject *_res = NULL;
+ OSErr _err;
+ SInt16 inItemNo;
+ ControlHandle outControl;
#ifndef GetDialogItemAsControl
- PyMac_PRECHECK(GetDialogItemAsControl);
+ PyMac_PRECHECK(GetDialogItemAsControl);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &inItemNo))
- return NULL;
- _err = GetDialogItemAsControl(_self->ob_itself,
- inItemNo,
- &outControl);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- CtlObj_New, outControl);
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &inItemNo))
+ return NULL;
+ _err = GetDialogItemAsControl(_self->ob_itself,
+ inItemNo,
+ &outControl);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ CtlObj_New, outControl);
+ return _res;
}
static PyObject *DlgObj_MoveDialogItem(DialogObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- SInt16 inItemNo;
- SInt16 inHoriz;
- SInt16 inVert;
+ PyObject *_res = NULL;
+ OSErr _err;
+ SInt16 inItemNo;
+ SInt16 inHoriz;
+ SInt16 inVert;
#ifndef MoveDialogItem
- PyMac_PRECHECK(MoveDialogItem);
+ PyMac_PRECHECK(MoveDialogItem);
#endif
- if (!PyArg_ParseTuple(_args, "hhh",
- &inItemNo,
- &inHoriz,
- &inVert))
- return NULL;
- _err = MoveDialogItem(_self->ob_itself,
- inItemNo,
- inHoriz,
- inVert);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "hhh",
+ &inItemNo,
+ &inHoriz,
+ &inVert))
+ return NULL;
+ _err = MoveDialogItem(_self->ob_itself,
+ inItemNo,
+ inHoriz,
+ inVert);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *DlgObj_SizeDialogItem(DialogObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- SInt16 inItemNo;
- SInt16 inWidth;
- SInt16 inHeight;
+ PyObject *_res = NULL;
+ OSErr _err;
+ SInt16 inItemNo;
+ SInt16 inWidth;
+ SInt16 inHeight;
#ifndef SizeDialogItem
- PyMac_PRECHECK(SizeDialogItem);
+ PyMac_PRECHECK(SizeDialogItem);
#endif
- if (!PyArg_ParseTuple(_args, "hhh",
- &inItemNo,
- &inWidth,
- &inHeight))
- return NULL;
- _err = SizeDialogItem(_self->ob_itself,
- inItemNo,
- inWidth,
- inHeight);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "hhh",
+ &inItemNo,
+ &inWidth,
+ &inHeight))
+ return NULL;
+ _err = SizeDialogItem(_self->ob_itself,
+ inItemNo,
+ inWidth,
+ inHeight);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *DlgObj_AppendDialogItemList(DialogObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- SInt16 ditlID;
- DITLMethod method;
+ PyObject *_res = NULL;
+ OSErr _err;
+ SInt16 ditlID;
+ DITLMethod method;
#ifndef AppendDialogItemList
- PyMac_PRECHECK(AppendDialogItemList);
+ PyMac_PRECHECK(AppendDialogItemList);
#endif
- if (!PyArg_ParseTuple(_args, "hh",
- &ditlID,
- &method))
- return NULL;
- _err = AppendDialogItemList(_self->ob_itself,
- ditlID,
- method);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "hh",
+ &ditlID,
+ &method))
+ return NULL;
+ _err = AppendDialogItemList(_self->ob_itself,
+ ditlID,
+ method);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *DlgObj_SetDialogTimeout(DialogObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- SInt16 inButtonToPress;
- UInt32 inSecondsToWait;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ SInt16 inButtonToPress;
+ UInt32 inSecondsToWait;
#ifndef SetDialogTimeout
- PyMac_PRECHECK(SetDialogTimeout);
+ PyMac_PRECHECK(SetDialogTimeout);
#endif
- if (!PyArg_ParseTuple(_args, "hl",
- &inButtonToPress,
- &inSecondsToWait))
- return NULL;
- _err = SetDialogTimeout(_self->ob_itself,
- inButtonToPress,
- inSecondsToWait);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "hl",
+ &inButtonToPress,
+ &inSecondsToWait))
+ return NULL;
+ _err = SetDialogTimeout(_self->ob_itself,
+ inButtonToPress,
+ inSecondsToWait);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *DlgObj_GetDialogTimeout(DialogObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- SInt16 outButtonToPress;
- UInt32 outSecondsToWait;
- UInt32 outSecondsRemaining;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ SInt16 outButtonToPress;
+ UInt32 outSecondsToWait;
+ UInt32 outSecondsRemaining;
#ifndef GetDialogTimeout
- PyMac_PRECHECK(GetDialogTimeout);
+ PyMac_PRECHECK(GetDialogTimeout);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetDialogTimeout(_self->ob_itself,
- &outButtonToPress,
- &outSecondsToWait,
- &outSecondsRemaining);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("hll",
- outButtonToPress,
- outSecondsToWait,
- outSecondsRemaining);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetDialogTimeout(_self->ob_itself,
+ &outButtonToPress,
+ &outSecondsToWait,
+ &outSecondsRemaining);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("hll",
+ outButtonToPress,
+ outSecondsToWait,
+ outSecondsRemaining);
+ return _res;
}
static PyObject *DlgObj_SetModalDialogEventMask(DialogObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- EventMask inMask;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ EventMask inMask;
#ifndef SetModalDialogEventMask
- PyMac_PRECHECK(SetModalDialogEventMask);
+ PyMac_PRECHECK(SetModalDialogEventMask);
#endif
- if (!PyArg_ParseTuple(_args, "H",
- &inMask))
- return NULL;
- _err = SetModalDialogEventMask(_self->ob_itself,
- inMask);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "H",
+ &inMask))
+ return NULL;
+ _err = SetModalDialogEventMask(_self->ob_itself,
+ inMask);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *DlgObj_GetModalDialogEventMask(DialogObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- EventMask outMask;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ EventMask outMask;
#ifndef GetModalDialogEventMask
- PyMac_PRECHECK(GetModalDialogEventMask);
+ PyMac_PRECHECK(GetModalDialogEventMask);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetModalDialogEventMask(_self->ob_itself,
- &outMask);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("H",
- outMask);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetModalDialogEventMask(_self->ob_itself,
+ &outMask);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("H",
+ outMask);
+ return _res;
}
static PyObject *DlgObj_GetDialogWindow(DialogObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- WindowPtr _rv;
+ PyObject *_res = NULL;
+ WindowPtr _rv;
#ifndef GetDialogWindow
- PyMac_PRECHECK(GetDialogWindow);
+ PyMac_PRECHECK(GetDialogWindow);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetDialogWindow(_self->ob_itself);
- _res = Py_BuildValue("O&",
- WinObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetDialogWindow(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ WinObj_New, _rv);
+ return _res;
}
static PyObject *DlgObj_GetDialogTextEditHandle(DialogObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- TEHandle _rv;
+ PyObject *_res = NULL;
+ TEHandle _rv;
#ifndef GetDialogTextEditHandle
- PyMac_PRECHECK(GetDialogTextEditHandle);
+ PyMac_PRECHECK(GetDialogTextEditHandle);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetDialogTextEditHandle(_self->ob_itself);
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetDialogTextEditHandle(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *DlgObj_GetDialogDefaultItem(DialogObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- SInt16 _rv;
+ PyObject *_res = NULL;
+ SInt16 _rv;
#ifndef GetDialogDefaultItem
- PyMac_PRECHECK(GetDialogDefaultItem);
+ PyMac_PRECHECK(GetDialogDefaultItem);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetDialogDefaultItem(_self->ob_itself);
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetDialogDefaultItem(_self->ob_itself);
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *DlgObj_GetDialogCancelItem(DialogObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- SInt16 _rv;
+ PyObject *_res = NULL;
+ SInt16 _rv;
#ifndef GetDialogCancelItem
- PyMac_PRECHECK(GetDialogCancelItem);
+ PyMac_PRECHECK(GetDialogCancelItem);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetDialogCancelItem(_self->ob_itself);
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetDialogCancelItem(_self->ob_itself);
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *DlgObj_GetDialogKeyboardFocusItem(DialogObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- SInt16 _rv;
+ PyObject *_res = NULL;
+ SInt16 _rv;
#ifndef GetDialogKeyboardFocusItem
- PyMac_PRECHECK(GetDialogKeyboardFocusItem);
+ PyMac_PRECHECK(GetDialogKeyboardFocusItem);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetDialogKeyboardFocusItem(_self->ob_itself);
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetDialogKeyboardFocusItem(_self->ob_itself);
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *DlgObj_SetPortDialogPort(DialogObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef SetPortDialogPort
- PyMac_PRECHECK(SetPortDialogPort);
+ PyMac_PRECHECK(SetPortDialogPort);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- SetPortDialogPort(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ SetPortDialogPort(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *DlgObj_GetDialogPort(DialogObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CGrafPtr _rv;
+ PyObject *_res = NULL;
+ CGrafPtr _rv;
#ifndef GetDialogPort
- PyMac_PRECHECK(GetDialogPort);
+ PyMac_PRECHECK(GetDialogPort);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetDialogPort(_self->ob_itself);
- _res = Py_BuildValue("O&",
- GrafObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetDialogPort(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ GrafObj_New, _rv);
+ return _res;
}
static PyMethodDef DlgObj_methods[] = {
- {"DrawDialog", (PyCFunction)DlgObj_DrawDialog, 1,
- PyDoc_STR("() -> None")},
- {"UpdateDialog", (PyCFunction)DlgObj_UpdateDialog, 1,
- PyDoc_STR("(RgnHandle updateRgn) -> None")},
- {"HideDialogItem", (PyCFunction)DlgObj_HideDialogItem, 1,
- PyDoc_STR("(DialogItemIndex itemNo) -> None")},
- {"ShowDialogItem", (PyCFunction)DlgObj_ShowDialogItem, 1,
- PyDoc_STR("(DialogItemIndex itemNo) -> None")},
- {"FindDialogItem", (PyCFunction)DlgObj_FindDialogItem, 1,
- PyDoc_STR("(Point thePt) -> (DialogItemIndexZeroBased _rv)")},
- {"DialogCut", (PyCFunction)DlgObj_DialogCut, 1,
- PyDoc_STR("() -> None")},
- {"DialogPaste", (PyCFunction)DlgObj_DialogPaste, 1,
- PyDoc_STR("() -> None")},
- {"DialogCopy", (PyCFunction)DlgObj_DialogCopy, 1,
- PyDoc_STR("() -> None")},
- {"DialogDelete", (PyCFunction)DlgObj_DialogDelete, 1,
- PyDoc_STR("() -> None")},
- {"GetDialogItem", (PyCFunction)DlgObj_GetDialogItem, 1,
- PyDoc_STR("(DialogItemIndex itemNo) -> (DialogItemType itemType, Handle item, Rect box)")},
- {"SetDialogItem", (PyCFunction)DlgObj_SetDialogItem, 1,
- PyDoc_STR("(DialogItemIndex itemNo, DialogItemType itemType, Handle item, Rect box) -> None")},
- {"SelectDialogItemText", (PyCFunction)DlgObj_SelectDialogItemText, 1,
- PyDoc_STR("(DialogItemIndex itemNo, SInt16 strtSel, SInt16 endSel) -> None")},
- {"AppendDITL", (PyCFunction)DlgObj_AppendDITL, 1,
- PyDoc_STR("(Handle theHandle, DITLMethod method) -> None")},
- {"CountDITL", (PyCFunction)DlgObj_CountDITL, 1,
- PyDoc_STR("() -> (DialogItemIndex _rv)")},
- {"ShortenDITL", (PyCFunction)DlgObj_ShortenDITL, 1,
- PyDoc_STR("(DialogItemIndex numberItems) -> None")},
- {"InsertDialogItem", (PyCFunction)DlgObj_InsertDialogItem, 1,
- PyDoc_STR("(DialogItemIndex afterItem, DialogItemType itemType, Handle itemHandle, Rect box) -> None")},
- {"RemoveDialogItems", (PyCFunction)DlgObj_RemoveDialogItems, 1,
- PyDoc_STR("(DialogItemIndex itemNo, DialogItemIndex amountToRemove, Boolean disposeItemData) -> None")},
- {"StdFilterProc", (PyCFunction)DlgObj_StdFilterProc, 1,
- PyDoc_STR("(EventRecord event, DialogItemIndex itemHit) -> (Boolean _rv, EventRecord event, DialogItemIndex itemHit)")},
- {"SetDialogDefaultItem", (PyCFunction)DlgObj_SetDialogDefaultItem, 1,
- PyDoc_STR("(DialogItemIndex newItem) -> None")},
- {"SetDialogCancelItem", (PyCFunction)DlgObj_SetDialogCancelItem, 1,
- PyDoc_STR("(DialogItemIndex newItem) -> None")},
- {"SetDialogTracksCursor", (PyCFunction)DlgObj_SetDialogTracksCursor, 1,
- PyDoc_STR("(Boolean tracks) -> None")},
- {"AutoSizeDialog", (PyCFunction)DlgObj_AutoSizeDialog, 1,
- PyDoc_STR("() -> None")},
- {"GetDialogItemAsControl", (PyCFunction)DlgObj_GetDialogItemAsControl, 1,
- PyDoc_STR("(SInt16 inItemNo) -> (ControlHandle outControl)")},
- {"MoveDialogItem", (PyCFunction)DlgObj_MoveDialogItem, 1,
- PyDoc_STR("(SInt16 inItemNo, SInt16 inHoriz, SInt16 inVert) -> None")},
- {"SizeDialogItem", (PyCFunction)DlgObj_SizeDialogItem, 1,
- PyDoc_STR("(SInt16 inItemNo, SInt16 inWidth, SInt16 inHeight) -> None")},
- {"AppendDialogItemList", (PyCFunction)DlgObj_AppendDialogItemList, 1,
- PyDoc_STR("(SInt16 ditlID, DITLMethod method) -> None")},
- {"SetDialogTimeout", (PyCFunction)DlgObj_SetDialogTimeout, 1,
- PyDoc_STR("(SInt16 inButtonToPress, UInt32 inSecondsToWait) -> None")},
- {"GetDialogTimeout", (PyCFunction)DlgObj_GetDialogTimeout, 1,
- PyDoc_STR("() -> (SInt16 outButtonToPress, UInt32 outSecondsToWait, UInt32 outSecondsRemaining)")},
- {"SetModalDialogEventMask", (PyCFunction)DlgObj_SetModalDialogEventMask, 1,
- PyDoc_STR("(EventMask inMask) -> None")},
- {"GetModalDialogEventMask", (PyCFunction)DlgObj_GetModalDialogEventMask, 1,
- PyDoc_STR("() -> (EventMask outMask)")},
- {"GetDialogWindow", (PyCFunction)DlgObj_GetDialogWindow, 1,
- PyDoc_STR("() -> (WindowPtr _rv)")},
- {"GetDialogTextEditHandle", (PyCFunction)DlgObj_GetDialogTextEditHandle, 1,
- PyDoc_STR("() -> (TEHandle _rv)")},
- {"GetDialogDefaultItem", (PyCFunction)DlgObj_GetDialogDefaultItem, 1,
- PyDoc_STR("() -> (SInt16 _rv)")},
- {"GetDialogCancelItem", (PyCFunction)DlgObj_GetDialogCancelItem, 1,
- PyDoc_STR("() -> (SInt16 _rv)")},
- {"GetDialogKeyboardFocusItem", (PyCFunction)DlgObj_GetDialogKeyboardFocusItem, 1,
- PyDoc_STR("() -> (SInt16 _rv)")},
- {"SetPortDialogPort", (PyCFunction)DlgObj_SetPortDialogPort, 1,
- PyDoc_STR("() -> None")},
- {"GetDialogPort", (PyCFunction)DlgObj_GetDialogPort, 1,
- PyDoc_STR("() -> (CGrafPtr _rv)")},
- {NULL, NULL, 0}
+ {"DrawDialog", (PyCFunction)DlgObj_DrawDialog, 1,
+ PyDoc_STR("() -> None")},
+ {"UpdateDialog", (PyCFunction)DlgObj_UpdateDialog, 1,
+ PyDoc_STR("(RgnHandle updateRgn) -> None")},
+ {"HideDialogItem", (PyCFunction)DlgObj_HideDialogItem, 1,
+ PyDoc_STR("(DialogItemIndex itemNo) -> None")},
+ {"ShowDialogItem", (PyCFunction)DlgObj_ShowDialogItem, 1,
+ PyDoc_STR("(DialogItemIndex itemNo) -> None")},
+ {"FindDialogItem", (PyCFunction)DlgObj_FindDialogItem, 1,
+ PyDoc_STR("(Point thePt) -> (DialogItemIndexZeroBased _rv)")},
+ {"DialogCut", (PyCFunction)DlgObj_DialogCut, 1,
+ PyDoc_STR("() -> None")},
+ {"DialogPaste", (PyCFunction)DlgObj_DialogPaste, 1,
+ PyDoc_STR("() -> None")},
+ {"DialogCopy", (PyCFunction)DlgObj_DialogCopy, 1,
+ PyDoc_STR("() -> None")},
+ {"DialogDelete", (PyCFunction)DlgObj_DialogDelete, 1,
+ PyDoc_STR("() -> None")},
+ {"GetDialogItem", (PyCFunction)DlgObj_GetDialogItem, 1,
+ PyDoc_STR("(DialogItemIndex itemNo) -> (DialogItemType itemType, Handle item, Rect box)")},
+ {"SetDialogItem", (PyCFunction)DlgObj_SetDialogItem, 1,
+ PyDoc_STR("(DialogItemIndex itemNo, DialogItemType itemType, Handle item, Rect box) -> None")},
+ {"SelectDialogItemText", (PyCFunction)DlgObj_SelectDialogItemText, 1,
+ PyDoc_STR("(DialogItemIndex itemNo, SInt16 strtSel, SInt16 endSel) -> None")},
+ {"AppendDITL", (PyCFunction)DlgObj_AppendDITL, 1,
+ PyDoc_STR("(Handle theHandle, DITLMethod method) -> None")},
+ {"CountDITL", (PyCFunction)DlgObj_CountDITL, 1,
+ PyDoc_STR("() -> (DialogItemIndex _rv)")},
+ {"ShortenDITL", (PyCFunction)DlgObj_ShortenDITL, 1,
+ PyDoc_STR("(DialogItemIndex numberItems) -> None")},
+ {"InsertDialogItem", (PyCFunction)DlgObj_InsertDialogItem, 1,
+ PyDoc_STR("(DialogItemIndex afterItem, DialogItemType itemType, Handle itemHandle, Rect box) -> None")},
+ {"RemoveDialogItems", (PyCFunction)DlgObj_RemoveDialogItems, 1,
+ PyDoc_STR("(DialogItemIndex itemNo, DialogItemIndex amountToRemove, Boolean disposeItemData) -> None")},
+ {"StdFilterProc", (PyCFunction)DlgObj_StdFilterProc, 1,
+ PyDoc_STR("(EventRecord event, DialogItemIndex itemHit) -> (Boolean _rv, EventRecord event, DialogItemIndex itemHit)")},
+ {"SetDialogDefaultItem", (PyCFunction)DlgObj_SetDialogDefaultItem, 1,
+ PyDoc_STR("(DialogItemIndex newItem) -> None")},
+ {"SetDialogCancelItem", (PyCFunction)DlgObj_SetDialogCancelItem, 1,
+ PyDoc_STR("(DialogItemIndex newItem) -> None")},
+ {"SetDialogTracksCursor", (PyCFunction)DlgObj_SetDialogTracksCursor, 1,
+ PyDoc_STR("(Boolean tracks) -> None")},
+ {"AutoSizeDialog", (PyCFunction)DlgObj_AutoSizeDialog, 1,
+ PyDoc_STR("() -> None")},
+ {"GetDialogItemAsControl", (PyCFunction)DlgObj_GetDialogItemAsControl, 1,
+ PyDoc_STR("(SInt16 inItemNo) -> (ControlHandle outControl)")},
+ {"MoveDialogItem", (PyCFunction)DlgObj_MoveDialogItem, 1,
+ PyDoc_STR("(SInt16 inItemNo, SInt16 inHoriz, SInt16 inVert) -> None")},
+ {"SizeDialogItem", (PyCFunction)DlgObj_SizeDialogItem, 1,
+ PyDoc_STR("(SInt16 inItemNo, SInt16 inWidth, SInt16 inHeight) -> None")},
+ {"AppendDialogItemList", (PyCFunction)DlgObj_AppendDialogItemList, 1,
+ PyDoc_STR("(SInt16 ditlID, DITLMethod method) -> None")},
+ {"SetDialogTimeout", (PyCFunction)DlgObj_SetDialogTimeout, 1,
+ PyDoc_STR("(SInt16 inButtonToPress, UInt32 inSecondsToWait) -> None")},
+ {"GetDialogTimeout", (PyCFunction)DlgObj_GetDialogTimeout, 1,
+ PyDoc_STR("() -> (SInt16 outButtonToPress, UInt32 outSecondsToWait, UInt32 outSecondsRemaining)")},
+ {"SetModalDialogEventMask", (PyCFunction)DlgObj_SetModalDialogEventMask, 1,
+ PyDoc_STR("(EventMask inMask) -> None")},
+ {"GetModalDialogEventMask", (PyCFunction)DlgObj_GetModalDialogEventMask, 1,
+ PyDoc_STR("() -> (EventMask outMask)")},
+ {"GetDialogWindow", (PyCFunction)DlgObj_GetDialogWindow, 1,
+ PyDoc_STR("() -> (WindowPtr _rv)")},
+ {"GetDialogTextEditHandle", (PyCFunction)DlgObj_GetDialogTextEditHandle, 1,
+ PyDoc_STR("() -> (TEHandle _rv)")},
+ {"GetDialogDefaultItem", (PyCFunction)DlgObj_GetDialogDefaultItem, 1,
+ PyDoc_STR("() -> (SInt16 _rv)")},
+ {"GetDialogCancelItem", (PyCFunction)DlgObj_GetDialogCancelItem, 1,
+ PyDoc_STR("() -> (SInt16 _rv)")},
+ {"GetDialogKeyboardFocusItem", (PyCFunction)DlgObj_GetDialogKeyboardFocusItem, 1,
+ PyDoc_STR("() -> (SInt16 _rv)")},
+ {"SetPortDialogPort", (PyCFunction)DlgObj_SetPortDialogPort, 1,
+ PyDoc_STR("() -> None")},
+ {"GetDialogPort", (PyCFunction)DlgObj_GetDialogPort, 1,
+ PyDoc_STR("() -> (CGrafPtr _rv)")},
+ {NULL, NULL, 0}
};
#define DlgObj_getsetlist NULL
@@ -945,16 +945,16 @@ static PyMethodDef DlgObj_methods[] = {
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;
- return 0;
+ if ( self->ob_itself > other->ob_itself ) return 1;
+ if ( self->ob_itself < other->ob_itself ) return -1;
+ return 0;
}
#define DlgObj_repr NULL
static int DlgObj_hash(DialogObject *self)
{
- return (int)self->ob_itself;
+ return (int)self->ob_itself;
}
#define DlgObj_tp_init 0
@@ -962,61 +962,61 @@ static int DlgObj_hash(DialogObject *self)
static PyObject *DlgObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
- PyObject *_self;
- DialogPtr itself;
- char *kw[] = {"itself", 0};
+ 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;
+ 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 = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
- "_Dlg.Dialog", /*tp_name*/
- sizeof(DialogObject), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- /* methods */
- (destructor) DlgObj_dealloc, /*tp_dealloc*/
- 0, /*tp_print*/
- (getattrfunc)0, /*tp_getattr*/
- (setattrfunc)0, /*tp_setattr*/
- (cmpfunc) DlgObj_compare, /*tp_compare*/
- (reprfunc) DlgObj_repr, /*tp_repr*/
- (PyNumberMethods *)0, /* tp_as_number */
- (PySequenceMethods *)0, /* tp_as_sequence */
- (PyMappingMethods *)0, /* tp_as_mapping */
- (hashfunc) DlgObj_hash, /*tp_hash*/
- 0, /*tp_call*/
- 0, /*tp_str*/
- PyObject_GenericGetAttr, /*tp_getattro*/
- PyObject_GenericSetAttr, /*tp_setattro */
- 0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
- 0, /*tp_doc*/
- 0, /*tp_traverse*/
- 0, /*tp_clear*/
- 0, /*tp_richcompare*/
- 0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
- 0, /*tp_iternext*/
- DlgObj_methods, /* tp_methods */
- 0, /*tp_members*/
- DlgObj_getsetlist, /*tp_getset*/
- 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 */
+ PyObject_HEAD_INIT(NULL)
+ 0, /*ob_size*/
+ "_Dlg.Dialog", /*tp_name*/
+ sizeof(DialogObject), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ /* methods */
+ (destructor) DlgObj_dealloc, /*tp_dealloc*/
+ 0, /*tp_print*/
+ (getattrfunc)0, /*tp_getattr*/
+ (setattrfunc)0, /*tp_setattr*/
+ (cmpfunc) DlgObj_compare, /*tp_compare*/
+ (reprfunc) DlgObj_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) DlgObj_hash, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ PyObject_GenericGetAttr, /*tp_getattro*/
+ PyObject_GenericSetAttr, /*tp_setattro */
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
+ 0, /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ DlgObj_methods, /* tp_methods */
+ 0, /*tp_members*/
+ DlgObj_getsetlist, /*tp_getset*/
+ 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 --------------------- */
@@ -1024,503 +1024,503 @@ PyTypeObject Dialog_Type = {
static PyObject *Dlg_NewDialog(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- DialogPtr _rv;
- Rect boundsRect;
- Str255 title;
- Boolean visible;
- SInt16 procID;
- WindowPtr behind;
- Boolean goAwayFlag;
- SInt32 refCon;
- Handle items;
+ PyObject *_res = NULL;
+ DialogPtr _rv;
+ Rect boundsRect;
+ Str255 title;
+ Boolean visible;
+ SInt16 procID;
+ WindowPtr behind;
+ Boolean goAwayFlag;
+ SInt32 refCon;
+ Handle items;
#ifndef NewDialog
- PyMac_PRECHECK(NewDialog);
+ PyMac_PRECHECK(NewDialog);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&bhO&blO&",
- PyMac_GetRect, &boundsRect,
- PyMac_GetStr255, title,
- &visible,
- &procID,
- WinObj_Convert, &behind,
- &goAwayFlag,
- &refCon,
- ResObj_Convert, &items))
- return NULL;
- _rv = NewDialog((void *)0,
- &boundsRect,
- title,
- visible,
- procID,
- behind,
- goAwayFlag,
- refCon,
- items);
- _res = Py_BuildValue("O&",
- DlgObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&bhO&blO&",
+ PyMac_GetRect, &boundsRect,
+ PyMac_GetStr255, title,
+ &visible,
+ &procID,
+ WinObj_Convert, &behind,
+ &goAwayFlag,
+ &refCon,
+ ResObj_Convert, &items))
+ return NULL;
+ _rv = NewDialog((void *)0,
+ &boundsRect,
+ title,
+ visible,
+ procID,
+ behind,
+ goAwayFlag,
+ refCon,
+ items);
+ _res = Py_BuildValue("O&",
+ DlgObj_New, _rv);
+ return _res;
}
static PyObject *Dlg_GetNewDialog(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- DialogPtr _rv;
- SInt16 dialogID;
- WindowPtr behind;
+ PyObject *_res = NULL;
+ DialogPtr _rv;
+ SInt16 dialogID;
+ WindowPtr behind;
#ifndef GetNewDialog
- PyMac_PRECHECK(GetNewDialog);
+ PyMac_PRECHECK(GetNewDialog);
#endif
- if (!PyArg_ParseTuple(_args, "hO&",
- &dialogID,
- WinObj_Convert, &behind))
- return NULL;
- _rv = GetNewDialog(dialogID,
- (void *)0,
- behind);
- _res = Py_BuildValue("O&",
- DlgObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "hO&",
+ &dialogID,
+ WinObj_Convert, &behind))
+ return NULL;
+ _rv = GetNewDialog(dialogID,
+ (void *)0,
+ behind);
+ _res = Py_BuildValue("O&",
+ DlgObj_New, _rv);
+ return _res;
}
static PyObject *Dlg_NewColorDialog(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- DialogPtr _rv;
- Rect boundsRect;
- Str255 title;
- Boolean visible;
- SInt16 procID;
- WindowPtr behind;
- Boolean goAwayFlag;
- SInt32 refCon;
- Handle items;
+ PyObject *_res = NULL;
+ DialogPtr _rv;
+ Rect boundsRect;
+ Str255 title;
+ Boolean visible;
+ SInt16 procID;
+ WindowPtr behind;
+ Boolean goAwayFlag;
+ SInt32 refCon;
+ Handle items;
#ifndef NewColorDialog
- PyMac_PRECHECK(NewColorDialog);
+ PyMac_PRECHECK(NewColorDialog);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&bhO&blO&",
- PyMac_GetRect, &boundsRect,
- PyMac_GetStr255, title,
- &visible,
- &procID,
- WinObj_Convert, &behind,
- &goAwayFlag,
- &refCon,
- ResObj_Convert, &items))
- return NULL;
- _rv = NewColorDialog((void *)0,
- &boundsRect,
- title,
- visible,
- procID,
- behind,
- goAwayFlag,
- refCon,
- items);
- _res = Py_BuildValue("O&",
- DlgObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&bhO&blO&",
+ PyMac_GetRect, &boundsRect,
+ PyMac_GetStr255, title,
+ &visible,
+ &procID,
+ WinObj_Convert, &behind,
+ &goAwayFlag,
+ &refCon,
+ ResObj_Convert, &items))
+ return NULL;
+ _rv = NewColorDialog((void *)0,
+ &boundsRect,
+ title,
+ visible,
+ procID,
+ behind,
+ goAwayFlag,
+ refCon,
+ items);
+ _res = Py_BuildValue("O&",
+ DlgObj_New, _rv);
+ return _res;
}
static PyObject *Dlg_ModalDialog(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- PyObject* modalFilter;
- DialogItemIndex itemHit;
+ PyObject *_res = NULL;
+ PyObject* modalFilter;
+ DialogItemIndex itemHit;
#ifndef ModalDialog
- PyMac_PRECHECK(ModalDialog);
+ PyMac_PRECHECK(ModalDialog);
#endif
- if (!PyArg_ParseTuple(_args, "O",
- &modalFilter))
- return NULL;
- ModalDialog(Dlg_PassFilterProc(modalFilter),
- &itemHit);
- _res = Py_BuildValue("h",
- itemHit);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O",
+ &modalFilter))
+ return NULL;
+ ModalDialog(Dlg_PassFilterProc(modalFilter),
+ &itemHit);
+ _res = Py_BuildValue("h",
+ itemHit);
+ return _res;
}
static PyObject *Dlg_IsDialogEvent(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- EventRecord theEvent;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ EventRecord theEvent;
#ifndef IsDialogEvent
- PyMac_PRECHECK(IsDialogEvent);
+ PyMac_PRECHECK(IsDialogEvent);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetEventRecord, &theEvent))
- return NULL;
- _rv = IsDialogEvent(&theEvent);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetEventRecord, &theEvent))
+ return NULL;
+ _rv = IsDialogEvent(&theEvent);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *Dlg_DialogSelect(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- EventRecord theEvent;
- DialogPtr theDialog;
- DialogItemIndex itemHit;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ EventRecord theEvent;
+ DialogPtr theDialog;
+ DialogItemIndex itemHit;
#ifndef DialogSelect
- PyMac_PRECHECK(DialogSelect);
+ PyMac_PRECHECK(DialogSelect);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetEventRecord, &theEvent))
- return NULL;
- _rv = DialogSelect(&theEvent,
- &theDialog,
- &itemHit);
- _res = Py_BuildValue("bO&h",
- _rv,
- DlgObj_WhichDialog, theDialog,
- itemHit);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetEventRecord, &theEvent))
+ return NULL;
+ _rv = DialogSelect(&theEvent,
+ &theDialog,
+ &itemHit);
+ _res = Py_BuildValue("bO&h",
+ _rv,
+ DlgObj_WhichDialog, theDialog,
+ itemHit);
+ return _res;
}
static PyObject *Dlg_Alert(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- DialogItemIndex _rv;
- SInt16 alertID;
- PyObject* modalFilter;
+ PyObject *_res = NULL;
+ DialogItemIndex _rv;
+ SInt16 alertID;
+ PyObject* modalFilter;
#ifndef Alert
- PyMac_PRECHECK(Alert);
+ PyMac_PRECHECK(Alert);
#endif
- if (!PyArg_ParseTuple(_args, "hO",
- &alertID,
- &modalFilter))
- return NULL;
- _rv = Alert(alertID,
- Dlg_PassFilterProc(modalFilter));
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "hO",
+ &alertID,
+ &modalFilter))
+ return NULL;
+ _rv = Alert(alertID,
+ Dlg_PassFilterProc(modalFilter));
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *Dlg_StopAlert(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- DialogItemIndex _rv;
- SInt16 alertID;
- PyObject* modalFilter;
+ PyObject *_res = NULL;
+ DialogItemIndex _rv;
+ SInt16 alertID;
+ PyObject* modalFilter;
#ifndef StopAlert
- PyMac_PRECHECK(StopAlert);
+ PyMac_PRECHECK(StopAlert);
#endif
- if (!PyArg_ParseTuple(_args, "hO",
- &alertID,
- &modalFilter))
- return NULL;
- _rv = StopAlert(alertID,
- Dlg_PassFilterProc(modalFilter));
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "hO",
+ &alertID,
+ &modalFilter))
+ return NULL;
+ _rv = StopAlert(alertID,
+ Dlg_PassFilterProc(modalFilter));
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *Dlg_NoteAlert(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- DialogItemIndex _rv;
- SInt16 alertID;
- PyObject* modalFilter;
+ PyObject *_res = NULL;
+ DialogItemIndex _rv;
+ SInt16 alertID;
+ PyObject* modalFilter;
#ifndef NoteAlert
- PyMac_PRECHECK(NoteAlert);
+ PyMac_PRECHECK(NoteAlert);
#endif
- if (!PyArg_ParseTuple(_args, "hO",
- &alertID,
- &modalFilter))
- return NULL;
- _rv = NoteAlert(alertID,
- Dlg_PassFilterProc(modalFilter));
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "hO",
+ &alertID,
+ &modalFilter))
+ return NULL;
+ _rv = NoteAlert(alertID,
+ Dlg_PassFilterProc(modalFilter));
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *Dlg_CautionAlert(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- DialogItemIndex _rv;
- SInt16 alertID;
- PyObject* modalFilter;
+ PyObject *_res = NULL;
+ DialogItemIndex _rv;
+ SInt16 alertID;
+ PyObject* modalFilter;
#ifndef CautionAlert
- PyMac_PRECHECK(CautionAlert);
+ PyMac_PRECHECK(CautionAlert);
#endif
- if (!PyArg_ParseTuple(_args, "hO",
- &alertID,
- &modalFilter))
- return NULL;
- _rv = CautionAlert(alertID,
- Dlg_PassFilterProc(modalFilter));
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "hO",
+ &alertID,
+ &modalFilter))
+ return NULL;
+ _rv = CautionAlert(alertID,
+ Dlg_PassFilterProc(modalFilter));
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *Dlg_ParamText(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Str255 param0;
- Str255 param1;
- Str255 param2;
- Str255 param3;
+ PyObject *_res = NULL;
+ Str255 param0;
+ Str255 param1;
+ Str255 param2;
+ Str255 param3;
#ifndef ParamText
- PyMac_PRECHECK(ParamText);
+ PyMac_PRECHECK(ParamText);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&O&",
- PyMac_GetStr255, param0,
- PyMac_GetStr255, param1,
- PyMac_GetStr255, param2,
- PyMac_GetStr255, param3))
- return NULL;
- ParamText(param0,
- param1,
- param2,
- param3);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&O&O&",
+ PyMac_GetStr255, param0,
+ PyMac_GetStr255, param1,
+ PyMac_GetStr255, param2,
+ PyMac_GetStr255, param3))
+ return NULL;
+ ParamText(param0,
+ param1,
+ param2,
+ param3);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Dlg_GetDialogItemText(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Handle item;
- Str255 text;
+ PyObject *_res = NULL;
+ Handle item;
+ Str255 text;
#ifndef GetDialogItemText
- PyMac_PRECHECK(GetDialogItemText);
+ PyMac_PRECHECK(GetDialogItemText);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &item))
- return NULL;
- GetDialogItemText(item,
- text);
- _res = Py_BuildValue("O&",
- PyMac_BuildStr255, text);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &item))
+ return NULL;
+ GetDialogItemText(item,
+ text);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildStr255, text);
+ return _res;
}
static PyObject *Dlg_SetDialogItemText(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Handle item;
- Str255 text;
+ PyObject *_res = NULL;
+ Handle item;
+ Str255 text;
#ifndef SetDialogItemText
- PyMac_PRECHECK(SetDialogItemText);
+ PyMac_PRECHECK(SetDialogItemText);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- ResObj_Convert, &item,
- PyMac_GetStr255, text))
- return NULL;
- SetDialogItemText(item,
- text);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ ResObj_Convert, &item,
+ PyMac_GetStr255, text))
+ return NULL;
+ SetDialogItemText(item,
+ text);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Dlg_GetAlertStage(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- SInt16 _rv;
+ PyObject *_res = NULL;
+ SInt16 _rv;
#ifndef GetAlertStage
- PyMac_PRECHECK(GetAlertStage);
+ PyMac_PRECHECK(GetAlertStage);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetAlertStage();
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetAlertStage();
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *Dlg_SetDialogFont(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- SInt16 fontNum;
+ PyObject *_res = NULL;
+ SInt16 fontNum;
#ifndef SetDialogFont
- PyMac_PRECHECK(SetDialogFont);
+ PyMac_PRECHECK(SetDialogFont);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &fontNum))
- return NULL;
- SetDialogFont(fontNum);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &fontNum))
+ return NULL;
+ SetDialogFont(fontNum);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Dlg_ResetAlertStage(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef ResetAlertStage
- PyMac_PRECHECK(ResetAlertStage);
+ PyMac_PRECHECK(ResetAlertStage);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- ResetAlertStage();
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ ResetAlertStage();
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Dlg_GetParamText(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Str255 param0;
- Str255 param1;
- Str255 param2;
- Str255 param3;
+ PyObject *_res = NULL;
+ Str255 param0;
+ Str255 param1;
+ Str255 param2;
+ Str255 param3;
#ifndef GetParamText
- PyMac_PRECHECK(GetParamText);
+ PyMac_PRECHECK(GetParamText);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&O&",
- PyMac_GetStr255, param0,
- PyMac_GetStr255, param1,
- PyMac_GetStr255, param2,
- PyMac_GetStr255, param3))
- return NULL;
- GetParamText(param0,
- param1,
- param2,
- param3);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&O&O&",
+ PyMac_GetStr255, param0,
+ PyMac_GetStr255, param1,
+ PyMac_GetStr255, param2,
+ PyMac_GetStr255, param3))
+ return NULL;
+ GetParamText(param0,
+ param1,
+ param2,
+ param3);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Dlg_NewFeaturesDialog(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- DialogPtr _rv;
- Rect inBoundsRect;
- Str255 inTitle;
- Boolean inIsVisible;
- SInt16 inProcID;
- WindowPtr inBehind;
- Boolean inGoAwayFlag;
- SInt32 inRefCon;
- Handle inItemListHandle;
- UInt32 inFlags;
+ PyObject *_res = NULL;
+ DialogPtr _rv;
+ Rect inBoundsRect;
+ Str255 inTitle;
+ Boolean inIsVisible;
+ SInt16 inProcID;
+ WindowPtr inBehind;
+ Boolean inGoAwayFlag;
+ SInt32 inRefCon;
+ Handle inItemListHandle;
+ UInt32 inFlags;
#ifndef NewFeaturesDialog
- PyMac_PRECHECK(NewFeaturesDialog);
+ PyMac_PRECHECK(NewFeaturesDialog);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&bhO&blO&l",
- PyMac_GetRect, &inBoundsRect,
- PyMac_GetStr255, inTitle,
- &inIsVisible,
- &inProcID,
- WinObj_Convert, &inBehind,
- &inGoAwayFlag,
- &inRefCon,
- ResObj_Convert, &inItemListHandle,
- &inFlags))
- return NULL;
- _rv = NewFeaturesDialog((void *)0,
- &inBoundsRect,
- inTitle,
- inIsVisible,
- inProcID,
- inBehind,
- inGoAwayFlag,
- inRefCon,
- inItemListHandle,
- inFlags);
- _res = Py_BuildValue("O&",
- DlgObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&bhO&blO&l",
+ PyMac_GetRect, &inBoundsRect,
+ PyMac_GetStr255, inTitle,
+ &inIsVisible,
+ &inProcID,
+ WinObj_Convert, &inBehind,
+ &inGoAwayFlag,
+ &inRefCon,
+ ResObj_Convert, &inItemListHandle,
+ &inFlags))
+ return NULL;
+ _rv = NewFeaturesDialog((void *)0,
+ &inBoundsRect,
+ inTitle,
+ inIsVisible,
+ inProcID,
+ inBehind,
+ inGoAwayFlag,
+ inRefCon,
+ inItemListHandle,
+ inFlags);
+ _res = Py_BuildValue("O&",
+ DlgObj_New, _rv);
+ return _res;
}
static PyObject *Dlg_GetDialogFromWindow(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- DialogPtr _rv;
- WindowPtr window;
+ PyObject *_res = NULL;
+ DialogPtr _rv;
+ WindowPtr window;
#ifndef GetDialogFromWindow
- PyMac_PRECHECK(GetDialogFromWindow);
+ PyMac_PRECHECK(GetDialogFromWindow);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- WinObj_Convert, &window))
- return NULL;
- _rv = GetDialogFromWindow(window);
- _res = Py_BuildValue("O&",
- DlgObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ WinObj_Convert, &window))
+ return NULL;
+ _rv = GetDialogFromWindow(window);
+ _res = Py_BuildValue("O&",
+ DlgObj_New, _rv);
+ return _res;
}
static PyObject *Dlg_SetUserItemHandler(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
- PyObject *new = NULL;
+ PyObject *new = NULL;
- if (!PyArg_ParseTuple(_args, "|O", &new))
- return NULL;
+ if (!PyArg_ParseTuple(_args, "|O", &new))
+ return NULL;
- if (Dlg_UserItemProc_callback && new && new != Py_None) {
- PyErr_SetString(Dlg_Error, "Another UserItemProc is already installed");
- return NULL;
- }
+ if (Dlg_UserItemProc_callback && new && new != Py_None) {
+ PyErr_SetString(Dlg_Error, "Another UserItemProc is already installed");
+ return NULL;
+ }
- if (new == NULL || new == Py_None) {
- new = NULL;
- _res = Py_None;
- Py_INCREF(Py_None);
- } else {
- Py_INCREF(new);
- _res = Py_BuildValue("O&", ResObj_New, (Handle)NewUserItemUPP(Dlg_UnivUserItemProc));
- }
+ if (new == NULL || new == Py_None) {
+ new = NULL;
+ _res = Py_None;
+ Py_INCREF(Py_None);
+ } else {
+ Py_INCREF(new);
+ _res = Py_BuildValue("O&", ResObj_New, (Handle)NewUserItemUPP(Dlg_UnivUserItemProc));
+ }
- Dlg_UserItemProc_callback = new;
- return _res;
+ Dlg_UserItemProc_callback = new;
+ return _res;
}
static PyMethodDef Dlg_methods[] = {
- {"NewDialog", (PyCFunction)Dlg_NewDialog, 1,
- PyDoc_STR("(Rect boundsRect, Str255 title, Boolean visible, SInt16 procID, WindowPtr behind, Boolean goAwayFlag, SInt32 refCon, Handle items) -> (DialogPtr _rv)")},
- {"GetNewDialog", (PyCFunction)Dlg_GetNewDialog, 1,
- PyDoc_STR("(SInt16 dialogID, WindowPtr behind) -> (DialogPtr _rv)")},
- {"NewColorDialog", (PyCFunction)Dlg_NewColorDialog, 1,
- PyDoc_STR("(Rect boundsRect, Str255 title, Boolean visible, SInt16 procID, WindowPtr behind, Boolean goAwayFlag, SInt32 refCon, Handle items) -> (DialogPtr _rv)")},
- {"ModalDialog", (PyCFunction)Dlg_ModalDialog, 1,
- PyDoc_STR("(PyObject* modalFilter) -> (DialogItemIndex itemHit)")},
- {"IsDialogEvent", (PyCFunction)Dlg_IsDialogEvent, 1,
- PyDoc_STR("(EventRecord theEvent) -> (Boolean _rv)")},
- {"DialogSelect", (PyCFunction)Dlg_DialogSelect, 1,
- PyDoc_STR("(EventRecord theEvent) -> (Boolean _rv, DialogPtr theDialog, DialogItemIndex itemHit)")},
- {"Alert", (PyCFunction)Dlg_Alert, 1,
- PyDoc_STR("(SInt16 alertID, PyObject* modalFilter) -> (DialogItemIndex _rv)")},
- {"StopAlert", (PyCFunction)Dlg_StopAlert, 1,
- PyDoc_STR("(SInt16 alertID, PyObject* modalFilter) -> (DialogItemIndex _rv)")},
- {"NoteAlert", (PyCFunction)Dlg_NoteAlert, 1,
- PyDoc_STR("(SInt16 alertID, PyObject* modalFilter) -> (DialogItemIndex _rv)")},
- {"CautionAlert", (PyCFunction)Dlg_CautionAlert, 1,
- PyDoc_STR("(SInt16 alertID, PyObject* modalFilter) -> (DialogItemIndex _rv)")},
- {"ParamText", (PyCFunction)Dlg_ParamText, 1,
- PyDoc_STR("(Str255 param0, Str255 param1, Str255 param2, Str255 param3) -> None")},
- {"GetDialogItemText", (PyCFunction)Dlg_GetDialogItemText, 1,
- PyDoc_STR("(Handle item) -> (Str255 text)")},
- {"SetDialogItemText", (PyCFunction)Dlg_SetDialogItemText, 1,
- PyDoc_STR("(Handle item, Str255 text) -> None")},
- {"GetAlertStage", (PyCFunction)Dlg_GetAlertStage, 1,
- PyDoc_STR("() -> (SInt16 _rv)")},
- {"SetDialogFont", (PyCFunction)Dlg_SetDialogFont, 1,
- PyDoc_STR("(SInt16 fontNum) -> None")},
- {"ResetAlertStage", (PyCFunction)Dlg_ResetAlertStage, 1,
- PyDoc_STR("() -> None")},
- {"GetParamText", (PyCFunction)Dlg_GetParamText, 1,
- PyDoc_STR("(Str255 param0, Str255 param1, Str255 param2, Str255 param3) -> None")},
- {"NewFeaturesDialog", (PyCFunction)Dlg_NewFeaturesDialog, 1,
- PyDoc_STR("(Rect inBoundsRect, Str255 inTitle, Boolean inIsVisible, SInt16 inProcID, WindowPtr inBehind, Boolean inGoAwayFlag, SInt32 inRefCon, Handle inItemListHandle, UInt32 inFlags) -> (DialogPtr _rv)")},
- {"GetDialogFromWindow", (PyCFunction)Dlg_GetDialogFromWindow, 1,
- PyDoc_STR("(WindowPtr window) -> (DialogPtr _rv)")},
- {"SetUserItemHandler", (PyCFunction)Dlg_SetUserItemHandler, 1,
- PyDoc_STR(NULL)},
- {NULL, NULL, 0}
+ {"NewDialog", (PyCFunction)Dlg_NewDialog, 1,
+ PyDoc_STR("(Rect boundsRect, Str255 title, Boolean visible, SInt16 procID, WindowPtr behind, Boolean goAwayFlag, SInt32 refCon, Handle items) -> (DialogPtr _rv)")},
+ {"GetNewDialog", (PyCFunction)Dlg_GetNewDialog, 1,
+ PyDoc_STR("(SInt16 dialogID, WindowPtr behind) -> (DialogPtr _rv)")},
+ {"NewColorDialog", (PyCFunction)Dlg_NewColorDialog, 1,
+ PyDoc_STR("(Rect boundsRect, Str255 title, Boolean visible, SInt16 procID, WindowPtr behind, Boolean goAwayFlag, SInt32 refCon, Handle items) -> (DialogPtr _rv)")},
+ {"ModalDialog", (PyCFunction)Dlg_ModalDialog, 1,
+ PyDoc_STR("(PyObject* modalFilter) -> (DialogItemIndex itemHit)")},
+ {"IsDialogEvent", (PyCFunction)Dlg_IsDialogEvent, 1,
+ PyDoc_STR("(EventRecord theEvent) -> (Boolean _rv)")},
+ {"DialogSelect", (PyCFunction)Dlg_DialogSelect, 1,
+ PyDoc_STR("(EventRecord theEvent) -> (Boolean _rv, DialogPtr theDialog, DialogItemIndex itemHit)")},
+ {"Alert", (PyCFunction)Dlg_Alert, 1,
+ PyDoc_STR("(SInt16 alertID, PyObject* modalFilter) -> (DialogItemIndex _rv)")},
+ {"StopAlert", (PyCFunction)Dlg_StopAlert, 1,
+ PyDoc_STR("(SInt16 alertID, PyObject* modalFilter) -> (DialogItemIndex _rv)")},
+ {"NoteAlert", (PyCFunction)Dlg_NoteAlert, 1,
+ PyDoc_STR("(SInt16 alertID, PyObject* modalFilter) -> (DialogItemIndex _rv)")},
+ {"CautionAlert", (PyCFunction)Dlg_CautionAlert, 1,
+ PyDoc_STR("(SInt16 alertID, PyObject* modalFilter) -> (DialogItemIndex _rv)")},
+ {"ParamText", (PyCFunction)Dlg_ParamText, 1,
+ PyDoc_STR("(Str255 param0, Str255 param1, Str255 param2, Str255 param3) -> None")},
+ {"GetDialogItemText", (PyCFunction)Dlg_GetDialogItemText, 1,
+ PyDoc_STR("(Handle item) -> (Str255 text)")},
+ {"SetDialogItemText", (PyCFunction)Dlg_SetDialogItemText, 1,
+ PyDoc_STR("(Handle item, Str255 text) -> None")},
+ {"GetAlertStage", (PyCFunction)Dlg_GetAlertStage, 1,
+ PyDoc_STR("() -> (SInt16 _rv)")},
+ {"SetDialogFont", (PyCFunction)Dlg_SetDialogFont, 1,
+ PyDoc_STR("(SInt16 fontNum) -> None")},
+ {"ResetAlertStage", (PyCFunction)Dlg_ResetAlertStage, 1,
+ PyDoc_STR("() -> None")},
+ {"GetParamText", (PyCFunction)Dlg_GetParamText, 1,
+ PyDoc_STR("(Str255 param0, Str255 param1, Str255 param2, Str255 param3) -> None")},
+ {"NewFeaturesDialog", (PyCFunction)Dlg_NewFeaturesDialog, 1,
+ PyDoc_STR("(Rect inBoundsRect, Str255 inTitle, Boolean inIsVisible, SInt16 inProcID, WindowPtr inBehind, Boolean inGoAwayFlag, SInt32 inRefCon, Handle inItemListHandle, UInt32 inFlags) -> (DialogPtr _rv)")},
+ {"GetDialogFromWindow", (PyCFunction)Dlg_GetDialogFromWindow, 1,
+ PyDoc_STR("(WindowPtr window) -> (DialogPtr _rv)")},
+ {"SetUserItemHandler", (PyCFunction)Dlg_SetUserItemHandler, 1,
+ PyDoc_STR(NULL)},
+ {NULL, NULL, 0}
};
@@ -1530,9 +1530,9 @@ static PyMethodDef Dlg_methods[] = {
WindowPtr
DlgObj_ConvertToWindow(PyObject *self)
{
- if ( DlgObj_Check(self) )
- return GetDialogWindow(((DialogObject *)self)->ob_itself);
- return NULL;
+ if ( DlgObj_Check(self) )
+ return GetDialogWindow(((DialogObject *)self)->ob_itself);
+ return NULL;
}
#endif
/* Return the object corresponding to the dialog, or None */
@@ -1540,35 +1540,35 @@ DlgObj_ConvertToWindow(PyObject *self)
PyObject *
DlgObj_WhichDialog(DialogPtr d)
{
- PyObject *it;
+ PyObject *it;
- if (d == NULL) {
- it = Py_None;
- Py_INCREF(it);
- } else {
- WindowPtr w = GetDialogWindow(d);
+ if (d == NULL) {
+ it = Py_None;
+ Py_INCREF(it);
+ } else {
+ WindowPtr w = GetDialogWindow(d);
- it = (PyObject *) GetWRefCon(w);
- if (it == NULL || ((DialogObject *)it)->ob_itself != d || !DlgObj_Check(it)) {
+ it = (PyObject *) GetWRefCon(w);
+ if (it == NULL || ((DialogObject *)it)->ob_itself != d || !DlgObj_Check(it)) {
#if 0
- /* Should do this, but we don't have an ob_freeit for dialogs yet. */
- it = WinObj_New(w);
- ((WindowObject *)it)->ob_freeit = NULL;
+ /* Should do this, but we don't have an ob_freeit for dialogs yet. */
+ it = WinObj_New(w);
+ ((WindowObject *)it)->ob_freeit = NULL;
#else
- it = Py_None;
- Py_INCREF(it);
+ it = Py_None;
+ Py_INCREF(it);
#endif
- } else {
- Py_INCREF(it);
- }
+ } else {
+ Py_INCREF(it);
}
- return it;
+ }
+ return it;
}
#else /* __LP64__ */
static PyMethodDef Dlg_methods[] = {
- {NULL, NULL, 0}
+ {NULL, NULL, 0}
};
#endif /* __LP64__ */
@@ -1576,32 +1576,32 @@ static PyMethodDef Dlg_methods[] = {
void init_Dlg(void)
{
- PyObject *m;
+ PyObject *m;
#ifndef __LP64__
- PyObject *d;
+ PyObject *d;
- PyMac_INIT_TOOLBOX_OBJECT_NEW(DialogPtr, DlgObj_New);
- PyMac_INIT_TOOLBOX_OBJECT_NEW(DialogPtr, DlgObj_WhichDialog);
- PyMac_INIT_TOOLBOX_OBJECT_CONVERT(DialogPtr, DlgObj_Convert);
+ PyMac_INIT_TOOLBOX_OBJECT_NEW(DialogPtr, DlgObj_New);
+ PyMac_INIT_TOOLBOX_OBJECT_NEW(DialogPtr, DlgObj_WhichDialog);
+ PyMac_INIT_TOOLBOX_OBJECT_CONVERT(DialogPtr, DlgObj_Convert);
#endif /* !__LP64__ */
- m = Py_InitModule("_Dlg", Dlg_methods);
+ m = Py_InitModule("_Dlg", Dlg_methods);
#ifndef __LP64__
- d = PyModule_GetDict(m);
- Dlg_Error = PyMac_GetOSErrException();
- if (Dlg_Error == NULL ||
- PyDict_SetItemString(d, "Error", Dlg_Error) != 0)
- return;
- Dialog_Type.ob_type = &PyType_Type;
- if (PyType_Ready(&Dialog_Type) < 0) return;
- Py_INCREF(&Dialog_Type);
- PyModule_AddObject(m, "Dialog", (PyObject *)&Dialog_Type);
- /* Backward-compatible name */
- Py_INCREF(&Dialog_Type);
- PyModule_AddObject(m, "DialogType", (PyObject *)&Dialog_Type);
+ d = PyModule_GetDict(m);
+ Dlg_Error = PyMac_GetOSErrException();
+ if (Dlg_Error == NULL ||
+ PyDict_SetItemString(d, "Error", Dlg_Error) != 0)
+ return;
+ Dialog_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&Dialog_Type) < 0) return;
+ Py_INCREF(&Dialog_Type);
+ PyModule_AddObject(m, "Dialog", (PyObject *)&Dialog_Type);
+ /* Backward-compatible name */
+ Py_INCREF(&Dialog_Type);
+ PyModule_AddObject(m, "DialogType", (PyObject *)&Dialog_Type);
#endif /* !__LP64__ */
}
diff --git a/Mac/Modules/drag/_Dragmodule.c b/Mac/Modules/drag/_Dragmodule.c
index 797fb32..aa87690 100644
--- a/Mac/Modules/drag/_Dragmodule.c
+++ b/Mac/Modules/drag/_Dragmodule.c
@@ -10,9 +10,9 @@
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
- PyErr_SetString(PyExc_NotImplementedError, \
- "Not available in this shared library/OS version"); \
- return NULL; \
+ PyErr_SetString(PyExc_NotImplementedError, \
+ "Not available in this shared library/OS version"); \
+ return NULL; \
}} while(0)
@@ -44,693 +44,693 @@ PyTypeObject DragObj_Type;
#define DragObj_Check(x) ((x)->ob_type == &DragObj_Type || PyObject_TypeCheck((x), &DragObj_Type))
typedef struct DragObjObject {
- PyObject_HEAD
- DragRef ob_itself;
- PyObject *sendproc;
+ PyObject_HEAD
+ DragRef ob_itself;
+ PyObject *sendproc;
} DragObjObject;
PyObject *DragObj_New(DragRef itself)
{
- DragObjObject *it;
- if (itself == NULL) {
- PyErr_SetString(Drag_Error,"Cannot create null Drag");
- return NULL;
- }
- it = PyObject_NEW(DragObjObject, &DragObj_Type);
- if (it == NULL) return NULL;
- it->ob_itself = itself;
- it->sendproc = NULL;
- return (PyObject *)it;
+ DragObjObject *it;
+ if (itself == NULL) {
+ PyErr_SetString(Drag_Error,"Cannot create null Drag");
+ return NULL;
+ }
+ it = PyObject_NEW(DragObjObject, &DragObj_Type);
+ if (it == NULL) return NULL;
+ it->ob_itself = itself;
+ it->sendproc = NULL;
+ return (PyObject *)it;
}
int DragObj_Convert(PyObject *v, DragRef *p_itself)
{
- if (!DragObj_Check(v))
- {
- PyErr_SetString(PyExc_TypeError, "DragObj required");
- return 0;
- }
- *p_itself = ((DragObjObject *)v)->ob_itself;
- return 1;
+ if (!DragObj_Check(v))
+ {
+ PyErr_SetString(PyExc_TypeError, "DragObj required");
+ return 0;
+ }
+ *p_itself = ((DragObjObject *)v)->ob_itself;
+ return 1;
}
static void DragObj_dealloc(DragObjObject *self)
{
- Py_XDECREF(self->sendproc);
- self->ob_type->tp_free((PyObject *)self);
+ Py_XDECREF(self->sendproc);
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *DragObj_DisposeDrag(DragObjObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
+ PyObject *_res = NULL;
+ OSErr _err;
#ifndef DisposeDrag
- PyMac_PRECHECK(DisposeDrag);
+ PyMac_PRECHECK(DisposeDrag);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = DisposeDrag(_self->ob_itself);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = DisposeDrag(_self->ob_itself);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *DragObj_AddDragItemFlavor(DragObjObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- ItemReference theItemRef;
- FlavorType theType;
- char *dataPtr__in__;
- long dataPtr__len__;
- int dataPtr__in_len__;
- FlavorFlags theFlags;
+ PyObject *_res = NULL;
+ OSErr _err;
+ ItemReference theItemRef;
+ FlavorType theType;
+ char *dataPtr__in__;
+ long dataPtr__len__;
+ int dataPtr__in_len__;
+ FlavorFlags theFlags;
#ifndef AddDragItemFlavor
- PyMac_PRECHECK(AddDragItemFlavor);
+ PyMac_PRECHECK(AddDragItemFlavor);
#endif
- if (!PyArg_ParseTuple(_args, "lO&z#l",
- &theItemRef,
- PyMac_GetOSType, &theType,
- &dataPtr__in__, &dataPtr__in_len__,
- &theFlags))
- return NULL;
- dataPtr__len__ = dataPtr__in_len__;
- _err = AddDragItemFlavor(_self->ob_itself,
- theItemRef,
- theType,
- dataPtr__in__, dataPtr__len__,
- theFlags);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "lO&z#l",
+ &theItemRef,
+ PyMac_GetOSType, &theType,
+ &dataPtr__in__, &dataPtr__in_len__,
+ &theFlags))
+ return NULL;
+ dataPtr__len__ = dataPtr__in_len__;
+ _err = AddDragItemFlavor(_self->ob_itself,
+ theItemRef,
+ theType,
+ dataPtr__in__, dataPtr__len__,
+ theFlags);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *DragObj_SetDragItemFlavorData(DragObjObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- ItemReference theItemRef;
- FlavorType theType;
- char *dataPtr__in__;
- long dataPtr__len__;
- int dataPtr__in_len__;
- UInt32 dataOffset;
+ PyObject *_res = NULL;
+ OSErr _err;
+ ItemReference theItemRef;
+ FlavorType theType;
+ char *dataPtr__in__;
+ long dataPtr__len__;
+ int dataPtr__in_len__;
+ UInt32 dataOffset;
#ifndef SetDragItemFlavorData
- PyMac_PRECHECK(SetDragItemFlavorData);
+ PyMac_PRECHECK(SetDragItemFlavorData);
#endif
- if (!PyArg_ParseTuple(_args, "lO&z#l",
- &theItemRef,
- PyMac_GetOSType, &theType,
- &dataPtr__in__, &dataPtr__in_len__,
- &dataOffset))
- return NULL;
- dataPtr__len__ = dataPtr__in_len__;
- _err = SetDragItemFlavorData(_self->ob_itself,
- theItemRef,
- theType,
- dataPtr__in__, dataPtr__len__,
- dataOffset);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "lO&z#l",
+ &theItemRef,
+ PyMac_GetOSType, &theType,
+ &dataPtr__in__, &dataPtr__in_len__,
+ &dataOffset))
+ return NULL;
+ dataPtr__len__ = dataPtr__in_len__;
+ _err = SetDragItemFlavorData(_self->ob_itself,
+ theItemRef,
+ theType,
+ dataPtr__in__, dataPtr__len__,
+ dataOffset);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *DragObj_SetDragImage(DragObjObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- PixMapHandle imagePixMap;
- RgnHandle imageRgn;
- Point imageOffsetPt;
- DragImageFlags theImageFlags;
+ PyObject *_res = NULL;
+ OSErr _err;
+ PixMapHandle imagePixMap;
+ RgnHandle imageRgn;
+ Point imageOffsetPt;
+ DragImageFlags theImageFlags;
#ifndef SetDragImage
- PyMac_PRECHECK(SetDragImage);
+ PyMac_PRECHECK(SetDragImage);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&l",
- ResObj_Convert, &imagePixMap,
- ResObj_Convert, &imageRgn,
- PyMac_GetPoint, &imageOffsetPt,
- &theImageFlags))
- return NULL;
- _err = SetDragImage(_self->ob_itself,
- imagePixMap,
- imageRgn,
- imageOffsetPt,
- theImageFlags);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&O&l",
+ ResObj_Convert, &imagePixMap,
+ ResObj_Convert, &imageRgn,
+ PyMac_GetPoint, &imageOffsetPt,
+ &theImageFlags))
+ return NULL;
+ _err = SetDragImage(_self->ob_itself,
+ imagePixMap,
+ imageRgn,
+ imageOffsetPt,
+ theImageFlags);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *DragObj_ChangeDragBehaviors(DragObjObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- DragBehaviors inBehaviorsToSet;
- DragBehaviors inBehaviorsToClear;
+ PyObject *_res = NULL;
+ OSErr _err;
+ DragBehaviors inBehaviorsToSet;
+ DragBehaviors inBehaviorsToClear;
#ifndef ChangeDragBehaviors
- PyMac_PRECHECK(ChangeDragBehaviors);
+ PyMac_PRECHECK(ChangeDragBehaviors);
#endif
- if (!PyArg_ParseTuple(_args, "ll",
- &inBehaviorsToSet,
- &inBehaviorsToClear))
- return NULL;
- _err = ChangeDragBehaviors(_self->ob_itself,
- inBehaviorsToSet,
- inBehaviorsToClear);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "ll",
+ &inBehaviorsToSet,
+ &inBehaviorsToClear))
+ return NULL;
+ _err = ChangeDragBehaviors(_self->ob_itself,
+ inBehaviorsToSet,
+ inBehaviorsToClear);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *DragObj_TrackDrag(DragObjObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- EventRecord theEvent;
- RgnHandle theRegion;
+ PyObject *_res = NULL;
+ OSErr _err;
+ EventRecord theEvent;
+ RgnHandle theRegion;
#ifndef TrackDrag
- PyMac_PRECHECK(TrackDrag);
+ PyMac_PRECHECK(TrackDrag);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- PyMac_GetEventRecord, &theEvent,
- ResObj_Convert, &theRegion))
- return NULL;
- _err = TrackDrag(_self->ob_itself,
- &theEvent,
- theRegion);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ PyMac_GetEventRecord, &theEvent,
+ ResObj_Convert, &theRegion))
+ return NULL;
+ _err = TrackDrag(_self->ob_itself,
+ &theEvent,
+ theRegion);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *DragObj_CountDragItems(DragObjObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- UInt16 numItems;
+ PyObject *_res = NULL;
+ OSErr _err;
+ UInt16 numItems;
#ifndef CountDragItems
- PyMac_PRECHECK(CountDragItems);
+ PyMac_PRECHECK(CountDragItems);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = CountDragItems(_self->ob_itself,
- &numItems);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("H",
- numItems);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = CountDragItems(_self->ob_itself,
+ &numItems);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("H",
+ numItems);
+ return _res;
}
static PyObject *DragObj_GetDragItemReferenceNumber(DragObjObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- UInt16 index;
- ItemReference theItemRef;
+ PyObject *_res = NULL;
+ OSErr _err;
+ UInt16 index;
+ ItemReference theItemRef;
#ifndef GetDragItemReferenceNumber
- PyMac_PRECHECK(GetDragItemReferenceNumber);
+ PyMac_PRECHECK(GetDragItemReferenceNumber);
#endif
- if (!PyArg_ParseTuple(_args, "H",
- &index))
- return NULL;
- _err = GetDragItemReferenceNumber(_self->ob_itself,
- index,
- &theItemRef);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- theItemRef);
- return _res;
+ if (!PyArg_ParseTuple(_args, "H",
+ &index))
+ return NULL;
+ _err = GetDragItemReferenceNumber(_self->ob_itself,
+ index,
+ &theItemRef);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ theItemRef);
+ return _res;
}
static PyObject *DragObj_CountDragItemFlavors(DragObjObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- ItemReference theItemRef;
- UInt16 numFlavors;
+ PyObject *_res = NULL;
+ OSErr _err;
+ ItemReference theItemRef;
+ UInt16 numFlavors;
#ifndef CountDragItemFlavors
- PyMac_PRECHECK(CountDragItemFlavors);
+ PyMac_PRECHECK(CountDragItemFlavors);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &theItemRef))
- return NULL;
- _err = CountDragItemFlavors(_self->ob_itself,
- theItemRef,
- &numFlavors);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("H",
- numFlavors);
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &theItemRef))
+ return NULL;
+ _err = CountDragItemFlavors(_self->ob_itself,
+ theItemRef,
+ &numFlavors);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("H",
+ numFlavors);
+ return _res;
}
static PyObject *DragObj_GetFlavorType(DragObjObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- ItemReference theItemRef;
- UInt16 index;
- FlavorType theType;
+ PyObject *_res = NULL;
+ OSErr _err;
+ ItemReference theItemRef;
+ UInt16 index;
+ FlavorType theType;
#ifndef GetFlavorType
- PyMac_PRECHECK(GetFlavorType);
+ PyMac_PRECHECK(GetFlavorType);
#endif
- if (!PyArg_ParseTuple(_args, "lH",
- &theItemRef,
- &index))
- return NULL;
- _err = GetFlavorType(_self->ob_itself,
- theItemRef,
- index,
- &theType);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- PyMac_BuildOSType, theType);
- return _res;
+ if (!PyArg_ParseTuple(_args, "lH",
+ &theItemRef,
+ &index))
+ return NULL;
+ _err = GetFlavorType(_self->ob_itself,
+ theItemRef,
+ index,
+ &theType);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildOSType, theType);
+ return _res;
}
static PyObject *DragObj_GetFlavorFlags(DragObjObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- ItemReference theItemRef;
- FlavorType theType;
- FlavorFlags theFlags;
+ PyObject *_res = NULL;
+ OSErr _err;
+ ItemReference theItemRef;
+ FlavorType theType;
+ FlavorFlags theFlags;
#ifndef GetFlavorFlags
- PyMac_PRECHECK(GetFlavorFlags);
+ PyMac_PRECHECK(GetFlavorFlags);
#endif
- if (!PyArg_ParseTuple(_args, "lO&",
- &theItemRef,
- PyMac_GetOSType, &theType))
- return NULL;
- _err = GetFlavorFlags(_self->ob_itself,
- theItemRef,
- theType,
- &theFlags);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- theFlags);
- return _res;
+ if (!PyArg_ParseTuple(_args, "lO&",
+ &theItemRef,
+ PyMac_GetOSType, &theType))
+ return NULL;
+ _err = GetFlavorFlags(_self->ob_itself,
+ theItemRef,
+ theType,
+ &theFlags);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ theFlags);
+ return _res;
}
static PyObject *DragObj_GetFlavorDataSize(DragObjObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- ItemReference theItemRef;
- FlavorType theType;
- Size dataSize;
+ PyObject *_res = NULL;
+ OSErr _err;
+ ItemReference theItemRef;
+ FlavorType theType;
+ Size dataSize;
#ifndef GetFlavorDataSize
- PyMac_PRECHECK(GetFlavorDataSize);
+ PyMac_PRECHECK(GetFlavorDataSize);
#endif
- if (!PyArg_ParseTuple(_args, "lO&",
- &theItemRef,
- PyMac_GetOSType, &theType))
- return NULL;
- _err = GetFlavorDataSize(_self->ob_itself,
- theItemRef,
- theType,
- &dataSize);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- dataSize);
- return _res;
+ if (!PyArg_ParseTuple(_args, "lO&",
+ &theItemRef,
+ PyMac_GetOSType, &theType))
+ return NULL;
+ _err = GetFlavorDataSize(_self->ob_itself,
+ theItemRef,
+ theType,
+ &dataSize);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ dataSize);
+ return _res;
}
static PyObject *DragObj_GetFlavorData(DragObjObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- ItemReference theItemRef;
- FlavorType theType;
- char *dataPtr__out__;
- long dataPtr__len__;
- int dataPtr__in_len__;
- UInt32 dataOffset;
+ PyObject *_res = NULL;
+ OSErr _err;
+ ItemReference theItemRef;
+ FlavorType theType;
+ char *dataPtr__out__;
+ long dataPtr__len__;
+ int dataPtr__in_len__;
+ UInt32 dataOffset;
#ifndef GetFlavorData
- PyMac_PRECHECK(GetFlavorData);
+ PyMac_PRECHECK(GetFlavorData);
#endif
- if (!PyArg_ParseTuple(_args, "lO&il",
- &theItemRef,
- PyMac_GetOSType, &theType,
- &dataPtr__in_len__,
- &dataOffset))
- return NULL;
- if ((dataPtr__out__ = malloc(dataPtr__in_len__)) == NULL)
- {
- PyErr_NoMemory();
- goto dataPtr__error__;
- }
- dataPtr__len__ = dataPtr__in_len__;
- _err = GetFlavorData(_self->ob_itself,
- theItemRef,
- theType,
- dataPtr__out__, &dataPtr__len__,
- dataOffset);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("s#",
- dataPtr__out__, (int)dataPtr__len__);
- free(dataPtr__out__);
+ if (!PyArg_ParseTuple(_args, "lO&il",
+ &theItemRef,
+ PyMac_GetOSType, &theType,
+ &dataPtr__in_len__,
+ &dataOffset))
+ return NULL;
+ if ((dataPtr__out__ = malloc(dataPtr__in_len__)) == NULL)
+ {
+ PyErr_NoMemory();
+ goto dataPtr__error__;
+ }
+ dataPtr__len__ = dataPtr__in_len__;
+ _err = GetFlavorData(_self->ob_itself,
+ theItemRef,
+ theType,
+ dataPtr__out__, &dataPtr__len__,
+ dataOffset);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("s#",
+ dataPtr__out__, (int)dataPtr__len__);
+ free(dataPtr__out__);
dataPtr__error__: ;
- return _res;
+ return _res;
}
static PyObject *DragObj_GetDragItemBounds(DragObjObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- ItemReference theItemRef;
- Rect itemBounds;
+ PyObject *_res = NULL;
+ OSErr _err;
+ ItemReference theItemRef;
+ Rect itemBounds;
#ifndef GetDragItemBounds
- PyMac_PRECHECK(GetDragItemBounds);
+ PyMac_PRECHECK(GetDragItemBounds);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &theItemRef))
- return NULL;
- _err = GetDragItemBounds(_self->ob_itself,
- theItemRef,
- &itemBounds);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- PyMac_BuildRect, &itemBounds);
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &theItemRef))
+ return NULL;
+ _err = GetDragItemBounds(_self->ob_itself,
+ theItemRef,
+ &itemBounds);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildRect, &itemBounds);
+ return _res;
}
static PyObject *DragObj_SetDragItemBounds(DragObjObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- ItemReference theItemRef;
- Rect itemBounds;
+ PyObject *_res = NULL;
+ OSErr _err;
+ ItemReference theItemRef;
+ Rect itemBounds;
#ifndef SetDragItemBounds
- PyMac_PRECHECK(SetDragItemBounds);
+ PyMac_PRECHECK(SetDragItemBounds);
#endif
- if (!PyArg_ParseTuple(_args, "lO&",
- &theItemRef,
- PyMac_GetRect, &itemBounds))
- return NULL;
- _err = SetDragItemBounds(_self->ob_itself,
- theItemRef,
- &itemBounds);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "lO&",
+ &theItemRef,
+ PyMac_GetRect, &itemBounds))
+ return NULL;
+ _err = SetDragItemBounds(_self->ob_itself,
+ theItemRef,
+ &itemBounds);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *DragObj_GetDropLocation(DragObjObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- AEDesc dropLocation;
+ PyObject *_res = NULL;
+ OSErr _err;
+ AEDesc dropLocation;
#ifndef GetDropLocation
- PyMac_PRECHECK(GetDropLocation);
+ PyMac_PRECHECK(GetDropLocation);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetDropLocation(_self->ob_itself,
- &dropLocation);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- AEDesc_New, &dropLocation);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetDropLocation(_self->ob_itself,
+ &dropLocation);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ AEDesc_New, &dropLocation);
+ return _res;
}
static PyObject *DragObj_SetDropLocation(DragObjObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- AEDesc dropLocation;
+ PyObject *_res = NULL;
+ OSErr _err;
+ AEDesc dropLocation;
#ifndef SetDropLocation
- PyMac_PRECHECK(SetDropLocation);
+ PyMac_PRECHECK(SetDropLocation);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- AEDesc_Convert, &dropLocation))
- return NULL;
- _err = SetDropLocation(_self->ob_itself,
- &dropLocation);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ AEDesc_Convert, &dropLocation))
+ return NULL;
+ _err = SetDropLocation(_self->ob_itself,
+ &dropLocation);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *DragObj_GetDragAttributes(DragObjObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- DragAttributes flags;
+ PyObject *_res = NULL;
+ OSErr _err;
+ DragAttributes flags;
#ifndef GetDragAttributes
- PyMac_PRECHECK(GetDragAttributes);
+ PyMac_PRECHECK(GetDragAttributes);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetDragAttributes(_self->ob_itself,
- &flags);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- flags);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetDragAttributes(_self->ob_itself,
+ &flags);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ flags);
+ return _res;
}
static PyObject *DragObj_GetDragMouse(DragObjObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Point mouse;
- Point globalPinnedMouse;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Point mouse;
+ Point globalPinnedMouse;
#ifndef GetDragMouse
- PyMac_PRECHECK(GetDragMouse);
+ PyMac_PRECHECK(GetDragMouse);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetDragMouse(_self->ob_itself,
- &mouse,
- &globalPinnedMouse);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&O&",
- PyMac_BuildPoint, mouse,
- PyMac_BuildPoint, globalPinnedMouse);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetDragMouse(_self->ob_itself,
+ &mouse,
+ &globalPinnedMouse);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&O&",
+ PyMac_BuildPoint, mouse,
+ PyMac_BuildPoint, globalPinnedMouse);
+ return _res;
}
static PyObject *DragObj_SetDragMouse(DragObjObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Point globalPinnedMouse;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Point globalPinnedMouse;
#ifndef SetDragMouse
- PyMac_PRECHECK(SetDragMouse);
+ PyMac_PRECHECK(SetDragMouse);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetPoint, &globalPinnedMouse))
- return NULL;
- _err = SetDragMouse(_self->ob_itself,
- globalPinnedMouse);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetPoint, &globalPinnedMouse))
+ return NULL;
+ _err = SetDragMouse(_self->ob_itself,
+ globalPinnedMouse);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *DragObj_GetDragOrigin(DragObjObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Point globalInitialMouse;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Point globalInitialMouse;
#ifndef GetDragOrigin
- PyMac_PRECHECK(GetDragOrigin);
+ PyMac_PRECHECK(GetDragOrigin);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetDragOrigin(_self->ob_itself,
- &globalInitialMouse);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- PyMac_BuildPoint, globalInitialMouse);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetDragOrigin(_self->ob_itself,
+ &globalInitialMouse);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildPoint, globalInitialMouse);
+ return _res;
}
static PyObject *DragObj_GetDragModifiers(DragObjObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- SInt16 modifiers;
- SInt16 mouseDownModifiers;
- SInt16 mouseUpModifiers;
+ PyObject *_res = NULL;
+ OSErr _err;
+ SInt16 modifiers;
+ SInt16 mouseDownModifiers;
+ SInt16 mouseUpModifiers;
#ifndef GetDragModifiers
- PyMac_PRECHECK(GetDragModifiers);
+ PyMac_PRECHECK(GetDragModifiers);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetDragModifiers(_self->ob_itself,
- &modifiers,
- &mouseDownModifiers,
- &mouseUpModifiers);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("hhh",
- modifiers,
- mouseDownModifiers,
- mouseUpModifiers);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetDragModifiers(_self->ob_itself,
+ &modifiers,
+ &mouseDownModifiers,
+ &mouseUpModifiers);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("hhh",
+ modifiers,
+ mouseDownModifiers,
+ mouseUpModifiers);
+ return _res;
}
static PyObject *DragObj_ShowDragHilite(DragObjObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- RgnHandle hiliteFrame;
- Boolean inside;
+ PyObject *_res = NULL;
+ OSErr _err;
+ RgnHandle hiliteFrame;
+ Boolean inside;
#ifndef ShowDragHilite
- PyMac_PRECHECK(ShowDragHilite);
+ PyMac_PRECHECK(ShowDragHilite);
#endif
- if (!PyArg_ParseTuple(_args, "O&b",
- ResObj_Convert, &hiliteFrame,
- &inside))
- return NULL;
- _err = ShowDragHilite(_self->ob_itself,
- hiliteFrame,
- inside);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&b",
+ ResObj_Convert, &hiliteFrame,
+ &inside))
+ return NULL;
+ _err = ShowDragHilite(_self->ob_itself,
+ hiliteFrame,
+ inside);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *DragObj_HideDragHilite(DragObjObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
+ PyObject *_res = NULL;
+ OSErr _err;
#ifndef HideDragHilite
- PyMac_PRECHECK(HideDragHilite);
+ PyMac_PRECHECK(HideDragHilite);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = HideDragHilite(_self->ob_itself);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = HideDragHilite(_self->ob_itself);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *DragObj_DragPreScroll(DragObjObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- SInt16 dH;
- SInt16 dV;
+ PyObject *_res = NULL;
+ OSErr _err;
+ SInt16 dH;
+ SInt16 dV;
#ifndef DragPreScroll
- PyMac_PRECHECK(DragPreScroll);
+ PyMac_PRECHECK(DragPreScroll);
#endif
- if (!PyArg_ParseTuple(_args, "hh",
- &dH,
- &dV))
- return NULL;
- _err = DragPreScroll(_self->ob_itself,
- dH,
- dV);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "hh",
+ &dH,
+ &dV))
+ return NULL;
+ _err = DragPreScroll(_self->ob_itself,
+ dH,
+ dV);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *DragObj_DragPostScroll(DragObjObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
+ PyObject *_res = NULL;
+ OSErr _err;
#ifndef DragPostScroll
- PyMac_PRECHECK(DragPostScroll);
+ PyMac_PRECHECK(DragPostScroll);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = DragPostScroll(_self->ob_itself);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = DragPostScroll(_self->ob_itself);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *DragObj_UpdateDragHilite(DragObjObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- RgnHandle updateRgn;
+ PyObject *_res = NULL;
+ OSErr _err;
+ RgnHandle updateRgn;
#ifndef UpdateDragHilite
- PyMac_PRECHECK(UpdateDragHilite);
+ PyMac_PRECHECK(UpdateDragHilite);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &updateRgn))
- return NULL;
- _err = UpdateDragHilite(_self->ob_itself,
- updateRgn);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &updateRgn))
+ return NULL;
+ _err = UpdateDragHilite(_self->ob_itself,
+ updateRgn);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyMethodDef DragObj_methods[] = {
- {"DisposeDrag", (PyCFunction)DragObj_DisposeDrag, 1,
- PyDoc_STR("() -> None")},
- {"AddDragItemFlavor", (PyCFunction)DragObj_AddDragItemFlavor, 1,
- PyDoc_STR("(ItemReference theItemRef, FlavorType theType, Buffer dataPtr, FlavorFlags theFlags) -> None")},
- {"SetDragItemFlavorData", (PyCFunction)DragObj_SetDragItemFlavorData, 1,
- PyDoc_STR("(ItemReference theItemRef, FlavorType theType, Buffer dataPtr, UInt32 dataOffset) -> None")},
- {"SetDragImage", (PyCFunction)DragObj_SetDragImage, 1,
- PyDoc_STR("(PixMapHandle imagePixMap, RgnHandle imageRgn, Point imageOffsetPt, DragImageFlags theImageFlags) -> None")},
- {"ChangeDragBehaviors", (PyCFunction)DragObj_ChangeDragBehaviors, 1,
- PyDoc_STR("(DragBehaviors inBehaviorsToSet, DragBehaviors inBehaviorsToClear) -> None")},
- {"TrackDrag", (PyCFunction)DragObj_TrackDrag, 1,
- PyDoc_STR("(EventRecord theEvent, RgnHandle theRegion) -> None")},
- {"CountDragItems", (PyCFunction)DragObj_CountDragItems, 1,
- PyDoc_STR("() -> (UInt16 numItems)")},
- {"GetDragItemReferenceNumber", (PyCFunction)DragObj_GetDragItemReferenceNumber, 1,
- PyDoc_STR("(UInt16 index) -> (ItemReference theItemRef)")},
- {"CountDragItemFlavors", (PyCFunction)DragObj_CountDragItemFlavors, 1,
- PyDoc_STR("(ItemReference theItemRef) -> (UInt16 numFlavors)")},
- {"GetFlavorType", (PyCFunction)DragObj_GetFlavorType, 1,
- PyDoc_STR("(ItemReference theItemRef, UInt16 index) -> (FlavorType theType)")},
- {"GetFlavorFlags", (PyCFunction)DragObj_GetFlavorFlags, 1,
- PyDoc_STR("(ItemReference theItemRef, FlavorType theType) -> (FlavorFlags theFlags)")},
- {"GetFlavorDataSize", (PyCFunction)DragObj_GetFlavorDataSize, 1,
- PyDoc_STR("(ItemReference theItemRef, FlavorType theType) -> (Size dataSize)")},
- {"GetFlavorData", (PyCFunction)DragObj_GetFlavorData, 1,
- PyDoc_STR("(ItemReference theItemRef, FlavorType theType, Buffer dataPtr, UInt32 dataOffset) -> (Buffer dataPtr)")},
- {"GetDragItemBounds", (PyCFunction)DragObj_GetDragItemBounds, 1,
- PyDoc_STR("(ItemReference theItemRef) -> (Rect itemBounds)")},
- {"SetDragItemBounds", (PyCFunction)DragObj_SetDragItemBounds, 1,
- PyDoc_STR("(ItemReference theItemRef, Rect itemBounds) -> None")},
- {"GetDropLocation", (PyCFunction)DragObj_GetDropLocation, 1,
- PyDoc_STR("() -> (AEDesc dropLocation)")},
- {"SetDropLocation", (PyCFunction)DragObj_SetDropLocation, 1,
- PyDoc_STR("(AEDesc dropLocation) -> None")},
- {"GetDragAttributes", (PyCFunction)DragObj_GetDragAttributes, 1,
- PyDoc_STR("() -> (DragAttributes flags)")},
- {"GetDragMouse", (PyCFunction)DragObj_GetDragMouse, 1,
- PyDoc_STR("() -> (Point mouse, Point globalPinnedMouse)")},
- {"SetDragMouse", (PyCFunction)DragObj_SetDragMouse, 1,
- PyDoc_STR("(Point globalPinnedMouse) -> None")},
- {"GetDragOrigin", (PyCFunction)DragObj_GetDragOrigin, 1,
- PyDoc_STR("() -> (Point globalInitialMouse)")},
- {"GetDragModifiers", (PyCFunction)DragObj_GetDragModifiers, 1,
- PyDoc_STR("() -> (SInt16 modifiers, SInt16 mouseDownModifiers, SInt16 mouseUpModifiers)")},
- {"ShowDragHilite", (PyCFunction)DragObj_ShowDragHilite, 1,
- PyDoc_STR("(RgnHandle hiliteFrame, Boolean inside) -> None")},
- {"HideDragHilite", (PyCFunction)DragObj_HideDragHilite, 1,
- PyDoc_STR("() -> None")},
- {"DragPreScroll", (PyCFunction)DragObj_DragPreScroll, 1,
- PyDoc_STR("(SInt16 dH, SInt16 dV) -> None")},
- {"DragPostScroll", (PyCFunction)DragObj_DragPostScroll, 1,
- PyDoc_STR("() -> None")},
- {"UpdateDragHilite", (PyCFunction)DragObj_UpdateDragHilite, 1,
- PyDoc_STR("(RgnHandle updateRgn) -> None")},
- {NULL, NULL, 0}
+ {"DisposeDrag", (PyCFunction)DragObj_DisposeDrag, 1,
+ PyDoc_STR("() -> None")},
+ {"AddDragItemFlavor", (PyCFunction)DragObj_AddDragItemFlavor, 1,
+ PyDoc_STR("(ItemReference theItemRef, FlavorType theType, Buffer dataPtr, FlavorFlags theFlags) -> None")},
+ {"SetDragItemFlavorData", (PyCFunction)DragObj_SetDragItemFlavorData, 1,
+ PyDoc_STR("(ItemReference theItemRef, FlavorType theType, Buffer dataPtr, UInt32 dataOffset) -> None")},
+ {"SetDragImage", (PyCFunction)DragObj_SetDragImage, 1,
+ PyDoc_STR("(PixMapHandle imagePixMap, RgnHandle imageRgn, Point imageOffsetPt, DragImageFlags theImageFlags) -> None")},
+ {"ChangeDragBehaviors", (PyCFunction)DragObj_ChangeDragBehaviors, 1,
+ PyDoc_STR("(DragBehaviors inBehaviorsToSet, DragBehaviors inBehaviorsToClear) -> None")},
+ {"TrackDrag", (PyCFunction)DragObj_TrackDrag, 1,
+ PyDoc_STR("(EventRecord theEvent, RgnHandle theRegion) -> None")},
+ {"CountDragItems", (PyCFunction)DragObj_CountDragItems, 1,
+ PyDoc_STR("() -> (UInt16 numItems)")},
+ {"GetDragItemReferenceNumber", (PyCFunction)DragObj_GetDragItemReferenceNumber, 1,
+ PyDoc_STR("(UInt16 index) -> (ItemReference theItemRef)")},
+ {"CountDragItemFlavors", (PyCFunction)DragObj_CountDragItemFlavors, 1,
+ PyDoc_STR("(ItemReference theItemRef) -> (UInt16 numFlavors)")},
+ {"GetFlavorType", (PyCFunction)DragObj_GetFlavorType, 1,
+ PyDoc_STR("(ItemReference theItemRef, UInt16 index) -> (FlavorType theType)")},
+ {"GetFlavorFlags", (PyCFunction)DragObj_GetFlavorFlags, 1,
+ PyDoc_STR("(ItemReference theItemRef, FlavorType theType) -> (FlavorFlags theFlags)")},
+ {"GetFlavorDataSize", (PyCFunction)DragObj_GetFlavorDataSize, 1,
+ PyDoc_STR("(ItemReference theItemRef, FlavorType theType) -> (Size dataSize)")},
+ {"GetFlavorData", (PyCFunction)DragObj_GetFlavorData, 1,
+ PyDoc_STR("(ItemReference theItemRef, FlavorType theType, Buffer dataPtr, UInt32 dataOffset) -> (Buffer dataPtr)")},
+ {"GetDragItemBounds", (PyCFunction)DragObj_GetDragItemBounds, 1,
+ PyDoc_STR("(ItemReference theItemRef) -> (Rect itemBounds)")},
+ {"SetDragItemBounds", (PyCFunction)DragObj_SetDragItemBounds, 1,
+ PyDoc_STR("(ItemReference theItemRef, Rect itemBounds) -> None")},
+ {"GetDropLocation", (PyCFunction)DragObj_GetDropLocation, 1,
+ PyDoc_STR("() -> (AEDesc dropLocation)")},
+ {"SetDropLocation", (PyCFunction)DragObj_SetDropLocation, 1,
+ PyDoc_STR("(AEDesc dropLocation) -> None")},
+ {"GetDragAttributes", (PyCFunction)DragObj_GetDragAttributes, 1,
+ PyDoc_STR("() -> (DragAttributes flags)")},
+ {"GetDragMouse", (PyCFunction)DragObj_GetDragMouse, 1,
+ PyDoc_STR("() -> (Point mouse, Point globalPinnedMouse)")},
+ {"SetDragMouse", (PyCFunction)DragObj_SetDragMouse, 1,
+ PyDoc_STR("(Point globalPinnedMouse) -> None")},
+ {"GetDragOrigin", (PyCFunction)DragObj_GetDragOrigin, 1,
+ PyDoc_STR("() -> (Point globalInitialMouse)")},
+ {"GetDragModifiers", (PyCFunction)DragObj_GetDragModifiers, 1,
+ PyDoc_STR("() -> (SInt16 modifiers, SInt16 mouseDownModifiers, SInt16 mouseUpModifiers)")},
+ {"ShowDragHilite", (PyCFunction)DragObj_ShowDragHilite, 1,
+ PyDoc_STR("(RgnHandle hiliteFrame, Boolean inside) -> None")},
+ {"HideDragHilite", (PyCFunction)DragObj_HideDragHilite, 1,
+ PyDoc_STR("() -> None")},
+ {"DragPreScroll", (PyCFunction)DragObj_DragPreScroll, 1,
+ PyDoc_STR("(SInt16 dH, SInt16 dV) -> None")},
+ {"DragPostScroll", (PyCFunction)DragObj_DragPostScroll, 1,
+ PyDoc_STR("() -> None")},
+ {"UpdateDragHilite", (PyCFunction)DragObj_UpdateDragHilite, 1,
+ PyDoc_STR("(RgnHandle updateRgn) -> None")},
+ {NULL, NULL, 0}
};
#define DragObj_getsetlist NULL
@@ -747,61 +747,61 @@ static PyMethodDef DragObj_methods[] = {
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;
+ 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 = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
- "_Drag.DragObj", /*tp_name*/
- sizeof(DragObjObject), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- /* methods */
- (destructor) DragObj_dealloc, /*tp_dealloc*/
- 0, /*tp_print*/
- (getattrfunc)0, /*tp_getattr*/
- (setattrfunc)0, /*tp_setattr*/
- (cmpfunc) DragObj_compare, /*tp_compare*/
- (reprfunc) DragObj_repr, /*tp_repr*/
- (PyNumberMethods *)0, /* tp_as_number */
- (PySequenceMethods *)0, /* tp_as_sequence */
- (PyMappingMethods *)0, /* tp_as_mapping */
- (hashfunc) DragObj_hash, /*tp_hash*/
- 0, /*tp_call*/
- 0, /*tp_str*/
- PyObject_GenericGetAttr, /*tp_getattro*/
- PyObject_GenericSetAttr, /*tp_setattro */
- 0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
- 0, /*tp_doc*/
- 0, /*tp_traverse*/
- 0, /*tp_clear*/
- 0, /*tp_richcompare*/
- 0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
- 0, /*tp_iternext*/
- DragObj_methods, /* tp_methods */
- 0, /*tp_members*/
- DragObj_getsetlist, /*tp_getset*/
- 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 */
+ PyObject_HEAD_INIT(NULL)
+ 0, /*ob_size*/
+ "_Drag.DragObj", /*tp_name*/
+ sizeof(DragObjObject), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ /* methods */
+ (destructor) DragObj_dealloc, /*tp_dealloc*/
+ 0, /*tp_print*/
+ (getattrfunc)0, /*tp_getattr*/
+ (setattrfunc)0, /*tp_setattr*/
+ (cmpfunc) DragObj_compare, /*tp_compare*/
+ (reprfunc) DragObj_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) DragObj_hash, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ PyObject_GenericGetAttr, /*tp_getattro*/
+ PyObject_GenericSetAttr, /*tp_setattro */
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
+ 0, /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ DragObj_methods, /* tp_methods */
+ 0, /*tp_members*/
+ DragObj_getsetlist, /*tp_getset*/
+ 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 --------------------- */
@@ -809,204 +809,204 @@ PyTypeObject DragObj_Type = {
static PyObject *Drag_NewDrag(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- DragRef theDrag;
+ PyObject *_res = NULL;
+ OSErr _err;
+ DragRef theDrag;
#ifndef NewDrag
- PyMac_PRECHECK(NewDrag);
+ PyMac_PRECHECK(NewDrag);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = NewDrag(&theDrag);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- DragObj_New, theDrag);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = NewDrag(&theDrag);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ DragObj_New, theDrag);
+ return _res;
}
static PyObject *Drag_GetDragHiliteColor(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- WindowPtr window;
- RGBColor color;
+ PyObject *_res = NULL;
+ OSErr _err;
+ WindowPtr window;
+ RGBColor color;
#ifndef GetDragHiliteColor
- PyMac_PRECHECK(GetDragHiliteColor);
+ PyMac_PRECHECK(GetDragHiliteColor);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- WinObj_Convert, &window))
- return NULL;
- _err = GetDragHiliteColor(window,
- &color);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- QdRGB_New, &color);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ WinObj_Convert, &window))
+ return NULL;
+ _err = GetDragHiliteColor(window,
+ &color);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ QdRGB_New, &color);
+ return _res;
}
static PyObject *Drag_WaitMouseMoved(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- Point initialMouse;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ Point initialMouse;
#ifndef WaitMouseMoved
- PyMac_PRECHECK(WaitMouseMoved);
+ PyMac_PRECHECK(WaitMouseMoved);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetPoint, &initialMouse))
- return NULL;
- _rv = WaitMouseMoved(initialMouse);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetPoint, &initialMouse))
+ return NULL;
+ _rv = WaitMouseMoved(initialMouse);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *Drag_ZoomRects(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Rect fromRect;
- Rect toRect;
- SInt16 zoomSteps;
- ZoomAcceleration acceleration;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Rect fromRect;
+ Rect toRect;
+ SInt16 zoomSteps;
+ ZoomAcceleration acceleration;
#ifndef ZoomRects
- PyMac_PRECHECK(ZoomRects);
+ PyMac_PRECHECK(ZoomRects);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&hh",
- PyMac_GetRect, &fromRect,
- PyMac_GetRect, &toRect,
- &zoomSteps,
- &acceleration))
- return NULL;
- _err = ZoomRects(&fromRect,
- &toRect,
- zoomSteps,
- acceleration);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&hh",
+ PyMac_GetRect, &fromRect,
+ PyMac_GetRect, &toRect,
+ &zoomSteps,
+ &acceleration))
+ return NULL;
+ _err = ZoomRects(&fromRect,
+ &toRect,
+ zoomSteps,
+ acceleration);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Drag_ZoomRegion(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- RgnHandle region;
- Point zoomDistance;
- SInt16 zoomSteps;
- ZoomAcceleration acceleration;
+ PyObject *_res = NULL;
+ OSErr _err;
+ RgnHandle region;
+ Point zoomDistance;
+ SInt16 zoomSteps;
+ ZoomAcceleration acceleration;
#ifndef ZoomRegion
- PyMac_PRECHECK(ZoomRegion);
+ PyMac_PRECHECK(ZoomRegion);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&hh",
- ResObj_Convert, &region,
- PyMac_GetPoint, &zoomDistance,
- &zoomSteps,
- &acceleration))
- return NULL;
- _err = ZoomRegion(region,
- zoomDistance,
- zoomSteps,
- acceleration);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&hh",
+ ResObj_Convert, &region,
+ PyMac_GetPoint, &zoomDistance,
+ &zoomSteps,
+ &acceleration))
+ return NULL;
+ _err = ZoomRegion(region,
+ zoomDistance,
+ zoomSteps,
+ acceleration);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Drag_InstallTrackingHandler(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
- PyObject *callback;
- WindowPtr theWindow = NULL;
- OSErr _err;
+ PyObject *callback;
+ WindowPtr theWindow = NULL;
+ OSErr _err;
- if ( !PyArg_ParseTuple(_args, "O|O&", &callback, WinObj_Convert, &theWindow) )
- return NULL;
- Py_INCREF(callback); /* Cannot decref later, too bad */
- _err = InstallTrackingHandler(dragglue_TrackingHandlerUPP, theWindow, (void *)callback);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if ( !PyArg_ParseTuple(_args, "O|O&", &callback, WinObj_Convert, &theWindow) )
+ return NULL;
+ Py_INCREF(callback); /* Cannot decref later, too bad */
+ _err = InstallTrackingHandler(dragglue_TrackingHandlerUPP, theWindow, (void *)callback);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Drag_InstallReceiveHandler(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
- PyObject *callback;
- WindowPtr theWindow = NULL;
- OSErr _err;
+ PyObject *callback;
+ WindowPtr theWindow = NULL;
+ OSErr _err;
- if ( !PyArg_ParseTuple(_args, "O|O&", &callback, WinObj_Convert, &theWindow) )
- return NULL;
- Py_INCREF(callback); /* Cannot decref later, too bad */
- _err = InstallReceiveHandler(dragglue_ReceiveHandlerUPP, theWindow, (void *)callback);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if ( !PyArg_ParseTuple(_args, "O|O&", &callback, WinObj_Convert, &theWindow) )
+ return NULL;
+ Py_INCREF(callback); /* Cannot decref later, too bad */
+ _err = InstallReceiveHandler(dragglue_ReceiveHandlerUPP, theWindow, (void *)callback);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Drag_RemoveTrackingHandler(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
- WindowPtr theWindow = NULL;
- OSErr _err;
+ WindowPtr theWindow = NULL;
+ OSErr _err;
- if ( !PyArg_ParseTuple(_args, "|O&", WinObj_Convert, &theWindow) )
- return NULL;
- _err = RemoveTrackingHandler(dragglue_TrackingHandlerUPP, theWindow);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if ( !PyArg_ParseTuple(_args, "|O&", WinObj_Convert, &theWindow) )
+ return NULL;
+ _err = RemoveTrackingHandler(dragglue_TrackingHandlerUPP, theWindow);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Drag_RemoveReceiveHandler(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
- WindowPtr theWindow = NULL;
- OSErr _err;
+ WindowPtr theWindow = NULL;
+ OSErr _err;
- if ( !PyArg_ParseTuple(_args, "|O&", WinObj_Convert, &theWindow) )
- return NULL;
- _err = RemoveReceiveHandler(dragglue_ReceiveHandlerUPP, theWindow);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if ( !PyArg_ParseTuple(_args, "|O&", WinObj_Convert, &theWindow) )
+ return NULL;
+ _err = RemoveReceiveHandler(dragglue_ReceiveHandlerUPP, theWindow);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyMethodDef Drag_methods[] = {
- {"NewDrag", (PyCFunction)Drag_NewDrag, 1,
- PyDoc_STR("() -> (DragRef theDrag)")},
- {"GetDragHiliteColor", (PyCFunction)Drag_GetDragHiliteColor, 1,
- PyDoc_STR("(WindowPtr window) -> (RGBColor color)")},
- {"WaitMouseMoved", (PyCFunction)Drag_WaitMouseMoved, 1,
- PyDoc_STR("(Point initialMouse) -> (Boolean _rv)")},
- {"ZoomRects", (PyCFunction)Drag_ZoomRects, 1,
- PyDoc_STR("(Rect fromRect, Rect toRect, SInt16 zoomSteps, ZoomAcceleration acceleration) -> None")},
- {"ZoomRegion", (PyCFunction)Drag_ZoomRegion, 1,
- PyDoc_STR("(RgnHandle region, Point zoomDistance, SInt16 zoomSteps, ZoomAcceleration acceleration) -> None")},
- {"InstallTrackingHandler", (PyCFunction)Drag_InstallTrackingHandler, 1,
- PyDoc_STR(NULL)},
- {"InstallReceiveHandler", (PyCFunction)Drag_InstallReceiveHandler, 1,
- PyDoc_STR(NULL)},
- {"RemoveTrackingHandler", (PyCFunction)Drag_RemoveTrackingHandler, 1,
- PyDoc_STR(NULL)},
- {"RemoveReceiveHandler", (PyCFunction)Drag_RemoveReceiveHandler, 1,
- PyDoc_STR(NULL)},
- {NULL, NULL, 0}
+ {"NewDrag", (PyCFunction)Drag_NewDrag, 1,
+ PyDoc_STR("() -> (DragRef theDrag)")},
+ {"GetDragHiliteColor", (PyCFunction)Drag_GetDragHiliteColor, 1,
+ PyDoc_STR("(WindowPtr window) -> (RGBColor color)")},
+ {"WaitMouseMoved", (PyCFunction)Drag_WaitMouseMoved, 1,
+ PyDoc_STR("(Point initialMouse) -> (Boolean _rv)")},
+ {"ZoomRects", (PyCFunction)Drag_ZoomRects, 1,
+ PyDoc_STR("(Rect fromRect, Rect toRect, SInt16 zoomSteps, ZoomAcceleration acceleration) -> None")},
+ {"ZoomRegion", (PyCFunction)Drag_ZoomRegion, 1,
+ PyDoc_STR("(RgnHandle region, Point zoomDistance, SInt16 zoomSteps, ZoomAcceleration acceleration) -> None")},
+ {"InstallTrackingHandler", (PyCFunction)Drag_InstallTrackingHandler, 1,
+ PyDoc_STR(NULL)},
+ {"InstallReceiveHandler", (PyCFunction)Drag_InstallReceiveHandler, 1,
+ PyDoc_STR(NULL)},
+ {"RemoveTrackingHandler", (PyCFunction)Drag_RemoveTrackingHandler, 1,
+ PyDoc_STR(NULL)},
+ {"RemoveReceiveHandler", (PyCFunction)Drag_RemoveReceiveHandler, 1,
+ PyDoc_STR(NULL)},
+ {NULL, NULL, 0}
};
@@ -1015,81 +1015,81 @@ static pascal OSErr
dragglue_TrackingHandler(DragTrackingMessage theMessage, WindowPtr theWindow,
void *handlerRefCon, DragReference theDrag)
{
- PyObject *args, *rv;
- int i;
-
- args = Py_BuildValue("hO&O&", theMessage, DragObj_New, theDrag, WinObj_WhichWindow, theWindow);
- if ( args == NULL )
- return -1;
- rv = PyEval_CallObject((PyObject *)handlerRefCon, args);
- Py_DECREF(args);
- if ( rv == NULL ) {
- PySys_WriteStderr("Drag: Exception in TrackingHandler\n");
- PyErr_Print();
- return -1;
- }
- i = -1;
- if ( rv == Py_None )
- i = 0;
- else
- PyArg_Parse(rv, "l", &i);
- Py_DECREF(rv);
- return i;
+ PyObject *args, *rv;
+ int i;
+
+ args = Py_BuildValue("hO&O&", theMessage, DragObj_New, theDrag, WinObj_WhichWindow, theWindow);
+ if ( args == NULL )
+ return -1;
+ rv = PyEval_CallObject((PyObject *)handlerRefCon, args);
+ Py_DECREF(args);
+ if ( rv == NULL ) {
+ PySys_WriteStderr("Drag: Exception in TrackingHandler\n");
+ PyErr_Print();
+ return -1;
+ }
+ i = -1;
+ if ( rv == Py_None )
+ i = 0;
+ else
+ PyArg_Parse(rv, "l", &i);
+ Py_DECREF(rv);
+ return i;
}
static pascal OSErr
dragglue_ReceiveHandler(WindowPtr theWindow, void *handlerRefCon,
DragReference theDrag)
{
- PyObject *args, *rv;
- int i;
-
- args = Py_BuildValue("O&O&", DragObj_New, theDrag, WinObj_WhichWindow, theWindow);
- if ( args == NULL )
- return -1;
- rv = PyEval_CallObject((PyObject *)handlerRefCon, args);
- Py_DECREF(args);
- if ( rv == NULL ) {
- PySys_WriteStderr("Drag: Exception in ReceiveHandler\n");
- PyErr_Print();
- return -1;
- }
- i = -1;
- if ( rv == Py_None )
- i = 0;
- else
- PyArg_Parse(rv, "l", &i);
- Py_DECREF(rv);
- return i;
+ PyObject *args, *rv;
+ int i;
+
+ args = Py_BuildValue("O&O&", DragObj_New, theDrag, WinObj_WhichWindow, theWindow);
+ if ( args == NULL )
+ return -1;
+ rv = PyEval_CallObject((PyObject *)handlerRefCon, args);
+ Py_DECREF(args);
+ if ( rv == NULL ) {
+ PySys_WriteStderr("Drag: Exception in ReceiveHandler\n");
+ PyErr_Print();
+ return -1;
+ }
+ i = -1;
+ if ( rv == Py_None )
+ i = 0;
+ else
+ PyArg_Parse(rv, "l", &i);
+ Py_DECREF(rv);
+ return i;
}
static pascal OSErr
dragglue_SendData(FlavorType theType, void *dragSendRefCon,
ItemReference theItem, DragReference theDrag)
{
- DragObjObject *self = (DragObjObject *)dragSendRefCon;
- PyObject *args, *rv;
- int i;
-
- if ( self->sendproc == NULL )
- return -1;
- args = Py_BuildValue("O&l", PyMac_BuildOSType, theType, theItem);
- if ( args == NULL )
- return -1;
- rv = PyEval_CallObject(self->sendproc, args);
- Py_DECREF(args);
- if ( rv == NULL ) {
- PySys_WriteStderr("Drag: Exception in SendDataHandler\n");
- PyErr_Print();
- return -1;
- }
- i = -1;
- if ( rv == Py_None )
- i = 0;
- else
- PyArg_Parse(rv, "l", &i);
- Py_DECREF(rv);
- return i;
+ DragObjObject *self = (DragObjObject *)dragSendRefCon;
+ PyObject *args, *rv;
+ int i;
+
+ if ( self->sendproc == NULL )
+ return -1;
+ args = Py_BuildValue("O&l", PyMac_BuildOSType, theType, theItem);
+ if ( args == NULL )
+ return -1;
+ rv = PyEval_CallObject(self->sendproc, args);
+ Py_DECREF(args);
+ if ( rv == NULL ) {
+ PySys_WriteStderr("Drag: Exception in SendDataHandler\n");
+ PyErr_Print();
+ return -1;
+ }
+ i = -1;
+ if ( rv == Py_None )
+ i = 0;
+ else
+ PyArg_Parse(rv, "l", &i);
+ Py_DECREF(rv);
+ return i;
}
#if 0
@@ -1109,45 +1109,45 @@ dragglue_Drawing(xxxx
#endif
#else /* __LP64__ */
static PyMethodDef Drag_methods[] = {
- {NULL, NULL, 0}
+ {NULL, NULL, 0}
};
#endif /* __LP64__ */
void init_Drag(void)
{
- PyObject *m;
+ PyObject *m;
#ifndef __LP64__
- PyObject *d;
+ PyObject *d;
- PyMac_INIT_TOOLBOX_OBJECT_NEW(DragRef, DragObj_New);
- PyMac_INIT_TOOLBOX_OBJECT_CONVERT(DragRef, DragObj_Convert);
+ PyMac_INIT_TOOLBOX_OBJECT_NEW(DragRef, DragObj_New);
+ PyMac_INIT_TOOLBOX_OBJECT_CONVERT(DragRef, DragObj_Convert);
#endif /* !__LP64__ */
- m = Py_InitModule("_Drag", Drag_methods);
+ m = Py_InitModule("_Drag", Drag_methods);
#ifndef __LP64__
- d = PyModule_GetDict(m);
- Drag_Error = PyMac_GetOSErrException();
- if (Drag_Error == NULL ||
- PyDict_SetItemString(d, "Error", Drag_Error) != 0)
- return;
- DragObj_Type.ob_type = &PyType_Type;
- if (PyType_Ready(&DragObj_Type) < 0) return;
- Py_INCREF(&DragObj_Type);
- PyModule_AddObject(m, "DragObj", (PyObject *)&DragObj_Type);
- /* Backward-compatible name */
- Py_INCREF(&DragObj_Type);
- PyModule_AddObject(m, "DragObjType", (PyObject *)&DragObj_Type);
-
- dragglue_TrackingHandlerUPP = NewDragTrackingHandlerUPP(dragglue_TrackingHandler);
- dragglue_ReceiveHandlerUPP = NewDragReceiveHandlerUPP(dragglue_ReceiveHandler);
- dragglue_SendDataUPP = NewDragSendDataUPP(dragglue_SendData);
+ d = PyModule_GetDict(m);
+ Drag_Error = PyMac_GetOSErrException();
+ if (Drag_Error == NULL ||
+ PyDict_SetItemString(d, "Error", Drag_Error) != 0)
+ return;
+ DragObj_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&DragObj_Type) < 0) return;
+ Py_INCREF(&DragObj_Type);
+ PyModule_AddObject(m, "DragObj", (PyObject *)&DragObj_Type);
+ /* Backward-compatible name */
+ Py_INCREF(&DragObj_Type);
+ PyModule_AddObject(m, "DragObjType", (PyObject *)&DragObj_Type);
+
+ dragglue_TrackingHandlerUPP = NewDragTrackingHandlerUPP(dragglue_TrackingHandler);
+ dragglue_ReceiveHandlerUPP = NewDragReceiveHandlerUPP(dragglue_ReceiveHandler);
+ dragglue_SendDataUPP = NewDragSendDataUPP(dragglue_SendData);
#if 0
- dragglue_InputUPP = NewDragInputUPP(dragglue_Input);
- dragglue_DrawingUPP = NewDragDrawingUPP(dragglue_Drawing);
+ dragglue_InputUPP = NewDragInputUPP(dragglue_Input);
+ dragglue_DrawingUPP = NewDragDrawingUPP(dragglue_Drawing);
#endif
#endif /* !__LP64__ */
diff --git a/Mac/Modules/evt/_Evtmodule.c b/Mac/Modules/evt/_Evtmodule.c
index 04f3b23..bd61efa 100644
--- a/Mac/Modules/evt/_Evtmodule.c
+++ b/Mac/Modules/evt/_Evtmodule.c
@@ -10,9 +10,9 @@
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
- PyErr_SetString(PyExc_NotImplementedError, \
- "Not available in this shared library/OS version"); \
- return NULL; \
+ PyErr_SetString(PyExc_NotImplementedError, \
+ "Not available in this shared library/OS version"); \
+ return NULL; \
}} while(0)
@@ -23,535 +23,535 @@ static PyObject *Evt_Error;
static PyObject *Evt_GetMouse(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Point mouseLoc;
+ PyObject *_res = NULL;
+ Point mouseLoc;
#ifndef GetMouse
- PyMac_PRECHECK(GetMouse);
+ PyMac_PRECHECK(GetMouse);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- GetMouse(&mouseLoc);
- _res = Py_BuildValue("O&",
- PyMac_BuildPoint, mouseLoc);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ GetMouse(&mouseLoc);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildPoint, mouseLoc);
+ return _res;
}
static PyObject *Evt_Button(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
+ PyObject *_res = NULL;
+ Boolean _rv;
#ifndef Button
- PyMac_PRECHECK(Button);
+ PyMac_PRECHECK(Button);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = Button();
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = Button();
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *Evt_StillDown(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
+ PyObject *_res = NULL;
+ Boolean _rv;
#ifndef StillDown
- PyMac_PRECHECK(StillDown);
+ PyMac_PRECHECK(StillDown);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = StillDown();
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = StillDown();
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *Evt_WaitMouseUp(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
+ PyObject *_res = NULL;
+ Boolean _rv;
#ifndef WaitMouseUp
- PyMac_PRECHECK(WaitMouseUp);
+ PyMac_PRECHECK(WaitMouseUp);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = WaitMouseUp();
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = WaitMouseUp();
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *Evt_GetCaretTime(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- UInt32 _rv;
+ PyObject *_res = NULL;
+ UInt32 _rv;
#ifndef GetCaretTime
- PyMac_PRECHECK(GetCaretTime);
+ PyMac_PRECHECK(GetCaretTime);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetCaretTime();
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetCaretTime();
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Evt_GetKeys(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- KeyMap theKeys__out__;
+ PyObject *_res = NULL;
+ KeyMap theKeys__out__;
#ifndef GetKeys
- PyMac_PRECHECK(GetKeys);
+ PyMac_PRECHECK(GetKeys);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- GetKeys(theKeys__out__);
- _res = Py_BuildValue("s#",
- (char *)&theKeys__out__, (int)sizeof(KeyMap));
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ GetKeys(theKeys__out__);
+ _res = Py_BuildValue("s#",
+ (char *)&theKeys__out__, (int)sizeof(KeyMap));
+ return _res;
}
static PyObject *Evt_GetDblTime(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- UInt32 _rv;
+ PyObject *_res = NULL;
+ UInt32 _rv;
#ifndef GetDblTime
- PyMac_PRECHECK(GetDblTime);
+ PyMac_PRECHECK(GetDblTime);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetDblTime();
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetDblTime();
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Evt_SetEventMask(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- EventMask value;
+ PyObject *_res = NULL;
+ EventMask value;
#ifndef SetEventMask
- PyMac_PRECHECK(SetEventMask);
+ PyMac_PRECHECK(SetEventMask);
#endif
- if (!PyArg_ParseTuple(_args, "H",
- &value))
- return NULL;
- SetEventMask(value);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "H",
+ &value))
+ return NULL;
+ SetEventMask(value);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Evt_GetNextEvent(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- EventMask eventMask;
- EventRecord theEvent;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ EventMask eventMask;
+ EventRecord theEvent;
#ifndef GetNextEvent
- PyMac_PRECHECK(GetNextEvent);
+ PyMac_PRECHECK(GetNextEvent);
#endif
- if (!PyArg_ParseTuple(_args, "H",
- &eventMask))
- return NULL;
- _rv = GetNextEvent(eventMask,
- &theEvent);
- _res = Py_BuildValue("bO&",
- _rv,
- PyMac_BuildEventRecord, &theEvent);
- return _res;
+ if (!PyArg_ParseTuple(_args, "H",
+ &eventMask))
+ return NULL;
+ _rv = GetNextEvent(eventMask,
+ &theEvent);
+ _res = Py_BuildValue("bO&",
+ _rv,
+ PyMac_BuildEventRecord, &theEvent);
+ return _res;
}
static PyObject *Evt_EventAvail(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- EventMask eventMask;
- EventRecord theEvent;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ EventMask eventMask;
+ EventRecord theEvent;
#ifndef EventAvail
- PyMac_PRECHECK(EventAvail);
+ PyMac_PRECHECK(EventAvail);
#endif
- if (!PyArg_ParseTuple(_args, "H",
- &eventMask))
- return NULL;
- _rv = EventAvail(eventMask,
- &theEvent);
- _res = Py_BuildValue("bO&",
- _rv,
- PyMac_BuildEventRecord, &theEvent);
- return _res;
+ if (!PyArg_ParseTuple(_args, "H",
+ &eventMask))
+ return NULL;
+ _rv = EventAvail(eventMask,
+ &theEvent);
+ _res = Py_BuildValue("bO&",
+ _rv,
+ PyMac_BuildEventRecord, &theEvent);
+ return _res;
}
static PyObject *Evt_PostEvent(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- EventKind eventNum;
- UInt32 eventMsg;
+ PyObject *_res = NULL;
+ OSErr _err;
+ EventKind eventNum;
+ UInt32 eventMsg;
#ifndef PostEvent
- PyMac_PRECHECK(PostEvent);
+ PyMac_PRECHECK(PostEvent);
#endif
- if (!PyArg_ParseTuple(_args, "Hl",
- &eventNum,
- &eventMsg))
- return NULL;
- _err = PostEvent(eventNum,
- eventMsg);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "Hl",
+ &eventNum,
+ &eventMsg))
+ return NULL;
+ _err = PostEvent(eventNum,
+ eventMsg);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Evt_FlushEvents(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- EventMask whichMask;
- EventMask stopMask;
+ PyObject *_res = NULL;
+ EventMask whichMask;
+ EventMask stopMask;
#ifndef FlushEvents
- PyMac_PRECHECK(FlushEvents);
+ PyMac_PRECHECK(FlushEvents);
#endif
- if (!PyArg_ParseTuple(_args, "HH",
- &whichMask,
- &stopMask))
- return NULL;
- FlushEvents(whichMask,
- stopMask);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "HH",
+ &whichMask,
+ &stopMask))
+ return NULL;
+ FlushEvents(whichMask,
+ stopMask);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Evt_GetGlobalMouse(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Point globalMouse;
+ PyObject *_res = NULL;
+ Point globalMouse;
#ifndef GetGlobalMouse
- PyMac_PRECHECK(GetGlobalMouse);
+ PyMac_PRECHECK(GetGlobalMouse);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- GetGlobalMouse(&globalMouse);
- _res = Py_BuildValue("O&",
- PyMac_BuildPoint, globalMouse);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ GetGlobalMouse(&globalMouse);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildPoint, globalMouse);
+ return _res;
}
static PyObject *Evt_GetCurrentKeyModifiers(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- UInt32 _rv;
+ PyObject *_res = NULL;
+ UInt32 _rv;
#ifndef GetCurrentKeyModifiers
- PyMac_PRECHECK(GetCurrentKeyModifiers);
+ PyMac_PRECHECK(GetCurrentKeyModifiers);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetCurrentKeyModifiers();
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetCurrentKeyModifiers();
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Evt_CheckEventQueueForUserCancel(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
+ PyObject *_res = NULL;
+ Boolean _rv;
#ifndef CheckEventQueueForUserCancel
- PyMac_PRECHECK(CheckEventQueueForUserCancel);
+ PyMac_PRECHECK(CheckEventQueueForUserCancel);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = CheckEventQueueForUserCancel();
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = CheckEventQueueForUserCancel();
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *Evt_KeyScript(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short code;
+ PyObject *_res = NULL;
+ short code;
#ifndef KeyScript
- PyMac_PRECHECK(KeyScript);
+ PyMac_PRECHECK(KeyScript);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &code))
- return NULL;
- KeyScript(code);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &code))
+ return NULL;
+ KeyScript(code);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Evt_IsCmdChar(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- EventRecord event;
- short test;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ EventRecord event;
+ short test;
#ifndef IsCmdChar
- PyMac_PRECHECK(IsCmdChar);
+ PyMac_PRECHECK(IsCmdChar);
#endif
- if (!PyArg_ParseTuple(_args, "O&h",
- PyMac_GetEventRecord, &event,
- &test))
- return NULL;
- _rv = IsCmdChar(&event,
- test);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&h",
+ PyMac_GetEventRecord, &event,
+ &test))
+ return NULL;
+ _rv = IsCmdChar(&event,
+ test);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *Evt_LMGetKeyThresh(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- SInt16 _rv;
+ PyObject *_res = NULL;
+ SInt16 _rv;
#ifndef LMGetKeyThresh
- PyMac_PRECHECK(LMGetKeyThresh);
+ PyMac_PRECHECK(LMGetKeyThresh);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = LMGetKeyThresh();
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = LMGetKeyThresh();
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *Evt_LMSetKeyThresh(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- SInt16 value;
+ PyObject *_res = NULL;
+ SInt16 value;
#ifndef LMSetKeyThresh
- PyMac_PRECHECK(LMSetKeyThresh);
+ PyMac_PRECHECK(LMSetKeyThresh);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &value))
- return NULL;
- LMSetKeyThresh(value);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &value))
+ return NULL;
+ LMSetKeyThresh(value);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Evt_LMGetKeyRepThresh(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- SInt16 _rv;
+ PyObject *_res = NULL;
+ SInt16 _rv;
#ifndef LMGetKeyRepThresh
- PyMac_PRECHECK(LMGetKeyRepThresh);
+ PyMac_PRECHECK(LMGetKeyRepThresh);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = LMGetKeyRepThresh();
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = LMGetKeyRepThresh();
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *Evt_LMSetKeyRepThresh(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- SInt16 value;
+ PyObject *_res = NULL;
+ SInt16 value;
#ifndef LMSetKeyRepThresh
- PyMac_PRECHECK(LMSetKeyRepThresh);
+ PyMac_PRECHECK(LMSetKeyRepThresh);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &value))
- return NULL;
- LMSetKeyRepThresh(value);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &value))
+ return NULL;
+ LMSetKeyRepThresh(value);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Evt_LMGetKbdLast(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- UInt8 _rv;
+ PyObject *_res = NULL;
+ UInt8 _rv;
#ifndef LMGetKbdLast
- PyMac_PRECHECK(LMGetKbdLast);
+ PyMac_PRECHECK(LMGetKbdLast);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = LMGetKbdLast();
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = LMGetKbdLast();
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *Evt_LMSetKbdLast(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- UInt8 value;
+ PyObject *_res = NULL;
+ UInt8 value;
#ifndef LMSetKbdLast
- PyMac_PRECHECK(LMSetKbdLast);
+ PyMac_PRECHECK(LMSetKbdLast);
#endif
- if (!PyArg_ParseTuple(_args, "b",
- &value))
- return NULL;
- LMSetKbdLast(value);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "b",
+ &value))
+ return NULL;
+ LMSetKbdLast(value);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Evt_LMGetKbdType(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- UInt8 _rv;
+ PyObject *_res = NULL;
+ UInt8 _rv;
#ifndef LMGetKbdType
- PyMac_PRECHECK(LMGetKbdType);
+ PyMac_PRECHECK(LMGetKbdType);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = LMGetKbdType();
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = LMGetKbdType();
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *Evt_LMSetKbdType(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- UInt8 value;
+ PyObject *_res = NULL;
+ UInt8 value;
#ifndef LMSetKbdType
- PyMac_PRECHECK(LMSetKbdType);
+ PyMac_PRECHECK(LMSetKbdType);
#endif
- if (!PyArg_ParseTuple(_args, "b",
- &value))
- return NULL;
- LMSetKbdType(value);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "b",
+ &value))
+ return NULL;
+ LMSetKbdType(value);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Evt_TickCount(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- UInt32 _rv;
+ PyObject *_res = NULL;
+ UInt32 _rv;
#ifndef TickCount
- PyMac_PRECHECK(TickCount);
+ PyMac_PRECHECK(TickCount);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = TickCount();
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = TickCount();
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Evt_WaitNextEvent(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
-
- Boolean _rv;
- EventMask eventMask;
- EventRecord theEvent;
- UInt32 sleep;
- Handle mouseregion = (Handle)0;
-
- if (!PyArg_ParseTuple(_args, "Hl|O&",
- &eventMask,
- &sleep,
- OptResObj_Convert, &mouseregion))
- return NULL;
- _rv = WaitNextEvent(eventMask,
- &theEvent,
- sleep,
- (RgnHandle)mouseregion);
- _res = Py_BuildValue("bO&",
- _rv,
- PyMac_BuildEventRecord, &theEvent);
- return _res;
+ PyObject *_res = NULL;
+
+ Boolean _rv;
+ EventMask eventMask;
+ EventRecord theEvent;
+ UInt32 sleep;
+ Handle mouseregion = (Handle)0;
+
+ if (!PyArg_ParseTuple(_args, "Hl|O&",
+ &eventMask,
+ &sleep,
+ OptResObj_Convert, &mouseregion))
+ return NULL;
+ _rv = WaitNextEvent(eventMask,
+ &theEvent,
+ sleep,
+ (RgnHandle)mouseregion);
+ _res = Py_BuildValue("bO&",
+ _rv,
+ PyMac_BuildEventRecord, &theEvent);
+ return _res;
}
static PyMethodDef Evt_methods[] = {
- {"GetMouse", (PyCFunction)Evt_GetMouse, 1,
- PyDoc_STR("() -> (Point mouseLoc)")},
- {"Button", (PyCFunction)Evt_Button, 1,
- PyDoc_STR("() -> (Boolean _rv)")},
- {"StillDown", (PyCFunction)Evt_StillDown, 1,
- PyDoc_STR("() -> (Boolean _rv)")},
- {"WaitMouseUp", (PyCFunction)Evt_WaitMouseUp, 1,
- PyDoc_STR("() -> (Boolean _rv)")},
- {"GetCaretTime", (PyCFunction)Evt_GetCaretTime, 1,
- PyDoc_STR("() -> (UInt32 _rv)")},
- {"GetKeys", (PyCFunction)Evt_GetKeys, 1,
- PyDoc_STR("() -> (KeyMap theKeys)")},
- {"GetDblTime", (PyCFunction)Evt_GetDblTime, 1,
- PyDoc_STR("() -> (UInt32 _rv)")},
- {"SetEventMask", (PyCFunction)Evt_SetEventMask, 1,
- PyDoc_STR("(EventMask value) -> None")},
- {"GetNextEvent", (PyCFunction)Evt_GetNextEvent, 1,
- PyDoc_STR("(EventMask eventMask) -> (Boolean _rv, EventRecord theEvent)")},
- {"EventAvail", (PyCFunction)Evt_EventAvail, 1,
- PyDoc_STR("(EventMask eventMask) -> (Boolean _rv, EventRecord theEvent)")},
- {"PostEvent", (PyCFunction)Evt_PostEvent, 1,
- PyDoc_STR("(EventKind eventNum, UInt32 eventMsg) -> None")},
- {"FlushEvents", (PyCFunction)Evt_FlushEvents, 1,
- PyDoc_STR("(EventMask whichMask, EventMask stopMask) -> None")},
- {"GetGlobalMouse", (PyCFunction)Evt_GetGlobalMouse, 1,
- PyDoc_STR("() -> (Point globalMouse)")},
- {"GetCurrentKeyModifiers", (PyCFunction)Evt_GetCurrentKeyModifiers, 1,
- PyDoc_STR("() -> (UInt32 _rv)")},
- {"CheckEventQueueForUserCancel", (PyCFunction)Evt_CheckEventQueueForUserCancel, 1,
- PyDoc_STR("() -> (Boolean _rv)")},
- {"KeyScript", (PyCFunction)Evt_KeyScript, 1,
- PyDoc_STR("(short code) -> None")},
- {"IsCmdChar", (PyCFunction)Evt_IsCmdChar, 1,
- PyDoc_STR("(EventRecord event, short test) -> (Boolean _rv)")},
- {"LMGetKeyThresh", (PyCFunction)Evt_LMGetKeyThresh, 1,
- PyDoc_STR("() -> (SInt16 _rv)")},
- {"LMSetKeyThresh", (PyCFunction)Evt_LMSetKeyThresh, 1,
- PyDoc_STR("(SInt16 value) -> None")},
- {"LMGetKeyRepThresh", (PyCFunction)Evt_LMGetKeyRepThresh, 1,
- PyDoc_STR("() -> (SInt16 _rv)")},
- {"LMSetKeyRepThresh", (PyCFunction)Evt_LMSetKeyRepThresh, 1,
- PyDoc_STR("(SInt16 value) -> None")},
- {"LMGetKbdLast", (PyCFunction)Evt_LMGetKbdLast, 1,
- PyDoc_STR("() -> (UInt8 _rv)")},
- {"LMSetKbdLast", (PyCFunction)Evt_LMSetKbdLast, 1,
- PyDoc_STR("(UInt8 value) -> None")},
- {"LMGetKbdType", (PyCFunction)Evt_LMGetKbdType, 1,
- PyDoc_STR("() -> (UInt8 _rv)")},
- {"LMSetKbdType", (PyCFunction)Evt_LMSetKbdType, 1,
- PyDoc_STR("(UInt8 value) -> None")},
- {"TickCount", (PyCFunction)Evt_TickCount, 1,
- PyDoc_STR("() -> (UInt32 _rv)")},
- {"WaitNextEvent", (PyCFunction)Evt_WaitNextEvent, 1,
- PyDoc_STR("(EventMask eventMask, UInt32 sleep [,RegionHandle]) -> (Boolean _rv, EventRecord theEvent)")},
- {NULL, NULL, 0}
+ {"GetMouse", (PyCFunction)Evt_GetMouse, 1,
+ PyDoc_STR("() -> (Point mouseLoc)")},
+ {"Button", (PyCFunction)Evt_Button, 1,
+ PyDoc_STR("() -> (Boolean _rv)")},
+ {"StillDown", (PyCFunction)Evt_StillDown, 1,
+ PyDoc_STR("() -> (Boolean _rv)")},
+ {"WaitMouseUp", (PyCFunction)Evt_WaitMouseUp, 1,
+ PyDoc_STR("() -> (Boolean _rv)")},
+ {"GetCaretTime", (PyCFunction)Evt_GetCaretTime, 1,
+ PyDoc_STR("() -> (UInt32 _rv)")},
+ {"GetKeys", (PyCFunction)Evt_GetKeys, 1,
+ PyDoc_STR("() -> (KeyMap theKeys)")},
+ {"GetDblTime", (PyCFunction)Evt_GetDblTime, 1,
+ PyDoc_STR("() -> (UInt32 _rv)")},
+ {"SetEventMask", (PyCFunction)Evt_SetEventMask, 1,
+ PyDoc_STR("(EventMask value) -> None")},
+ {"GetNextEvent", (PyCFunction)Evt_GetNextEvent, 1,
+ PyDoc_STR("(EventMask eventMask) -> (Boolean _rv, EventRecord theEvent)")},
+ {"EventAvail", (PyCFunction)Evt_EventAvail, 1,
+ PyDoc_STR("(EventMask eventMask) -> (Boolean _rv, EventRecord theEvent)")},
+ {"PostEvent", (PyCFunction)Evt_PostEvent, 1,
+ PyDoc_STR("(EventKind eventNum, UInt32 eventMsg) -> None")},
+ {"FlushEvents", (PyCFunction)Evt_FlushEvents, 1,
+ PyDoc_STR("(EventMask whichMask, EventMask stopMask) -> None")},
+ {"GetGlobalMouse", (PyCFunction)Evt_GetGlobalMouse, 1,
+ PyDoc_STR("() -> (Point globalMouse)")},
+ {"GetCurrentKeyModifiers", (PyCFunction)Evt_GetCurrentKeyModifiers, 1,
+ PyDoc_STR("() -> (UInt32 _rv)")},
+ {"CheckEventQueueForUserCancel", (PyCFunction)Evt_CheckEventQueueForUserCancel, 1,
+ PyDoc_STR("() -> (Boolean _rv)")},
+ {"KeyScript", (PyCFunction)Evt_KeyScript, 1,
+ PyDoc_STR("(short code) -> None")},
+ {"IsCmdChar", (PyCFunction)Evt_IsCmdChar, 1,
+ PyDoc_STR("(EventRecord event, short test) -> (Boolean _rv)")},
+ {"LMGetKeyThresh", (PyCFunction)Evt_LMGetKeyThresh, 1,
+ PyDoc_STR("() -> (SInt16 _rv)")},
+ {"LMSetKeyThresh", (PyCFunction)Evt_LMSetKeyThresh, 1,
+ PyDoc_STR("(SInt16 value) -> None")},
+ {"LMGetKeyRepThresh", (PyCFunction)Evt_LMGetKeyRepThresh, 1,
+ PyDoc_STR("() -> (SInt16 _rv)")},
+ {"LMSetKeyRepThresh", (PyCFunction)Evt_LMSetKeyRepThresh, 1,
+ PyDoc_STR("(SInt16 value) -> None")},
+ {"LMGetKbdLast", (PyCFunction)Evt_LMGetKbdLast, 1,
+ PyDoc_STR("() -> (UInt8 _rv)")},
+ {"LMSetKbdLast", (PyCFunction)Evt_LMSetKbdLast, 1,
+ PyDoc_STR("(UInt8 value) -> None")},
+ {"LMGetKbdType", (PyCFunction)Evt_LMGetKbdType, 1,
+ PyDoc_STR("() -> (UInt8 _rv)")},
+ {"LMSetKbdType", (PyCFunction)Evt_LMSetKbdType, 1,
+ PyDoc_STR("(UInt8 value) -> None")},
+ {"TickCount", (PyCFunction)Evt_TickCount, 1,
+ PyDoc_STR("() -> (UInt32 _rv)")},
+ {"WaitNextEvent", (PyCFunction)Evt_WaitNextEvent, 1,
+ PyDoc_STR("(EventMask eventMask, UInt32 sleep [,RegionHandle]) -> (Boolean _rv, EventRecord theEvent)")},
+ {NULL, NULL, 0}
};
#else /* __LP64__ */
static PyMethodDef Evt_methods[] = {
- {NULL, NULL, 0}
+ {NULL, NULL, 0}
};
#endif /* __LP64__ */
void init_Evt(void)
{
- PyObject *m;
+ PyObject *m;
#ifndef __LP64__
- PyObject *d;
+ PyObject *d;
#endif /* __LP64__ */
- m = Py_InitModule("_Evt", Evt_methods);
+ m = Py_InitModule("_Evt", Evt_methods);
#ifndef __LP64__
- d = PyModule_GetDict(m);
- Evt_Error = PyMac_GetOSErrException();
- if (Evt_Error == NULL ||
- PyDict_SetItemString(d, "Error", Evt_Error) != 0)
- return;
+ d = PyModule_GetDict(m);
+ Evt_Error = PyMac_GetOSErrException();
+ if (Evt_Error == NULL ||
+ PyDict_SetItemString(d, "Error", Evt_Error) != 0)
+ return;
#endif /* __LP64__ */
}
diff --git a/Mac/Modules/file/_Filemodule.c b/Mac/Modules/file/_Filemodule.c
index 22e12ec..eb5b16d 100644
--- a/Mac/Modules/file/_Filemodule.c
+++ b/Mac/Modules/file/_Filemodule.c
@@ -8,14 +8,14 @@
#include "pymactoolbox.h"
#ifndef HAVE_OSX105_SDK
-typedef SInt16 FSIORefNum;
+typedef SInt16 FSIORefNum;
#endif
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
- PyErr_SetString(PyExc_NotImplementedError, \
- "Not available in this shared library/OS version"); \
- return NULL; \
+ PyErr_SetString(PyExc_NotImplementedError, \
+ "Not available in this shared library/OS version"); \
+ return NULL; \
}} while(0)
@@ -35,7 +35,7 @@ extern PyObject *_PyMac_BuildFSRef(FSRef *spec);
#define PyMac_GetFSSpec _PyMac_GetFSSpec
#define PyMac_GetFSRef _PyMac_GetFSRef
-#else /* !USE_TOOLBOX_OBJECT_GLUE */
+#else /* !USE_TOOLBOX_OBJECT_GLUE */
#ifndef __LP64__
extern int PyMac_GetFSSpec(PyObject *v, FSSpec *spec);
@@ -45,7 +45,7 @@ extern PyObject *PyMac_BuildFSSpec(FSSpec *spec);
extern int PyMac_GetFSRef(PyObject *v, FSRef *fsr);
extern PyObject *PyMac_BuildFSRef(FSRef *spec);
-#endif /* !USE_TOOLBOX_OBJECT_GLUE */
+#endif /* !USE_TOOLBOX_OBJECT_GLUE */
/* Forward declarations */
static PyObject *FSRef_New(FSRef *itself);
@@ -69,13 +69,13 @@ static int Alias_Convert(PyObject *v, AliasHandle *p_itself);
static int
UTCDateTime_Convert(PyObject *v, UTCDateTime *ptr)
{
- return PyArg_Parse(v, "(HlH)", &ptr->highSeconds, &ptr->lowSeconds, &ptr->fraction);
+ return PyArg_Parse(v, "(HlH)", &ptr->highSeconds, &ptr->lowSeconds, &ptr->fraction);
}
static PyObject *
UTCDateTime_New(UTCDateTime *ptr)
{
- return Py_BuildValue("(HlH)", ptr->highSeconds, ptr->lowSeconds, ptr->fraction);
+ return Py_BuildValue("(HlH)", ptr->highSeconds, ptr->lowSeconds, ptr->fraction);
}
/*
@@ -85,22 +85,22 @@ UTCDateTime_New(UTCDateTime *ptr)
static int
myPyMac_GetOptFSSpecPtr(PyObject *v, FSSpec **spec)
{
- if (v == Py_None) {
- *spec = NULL;
- return 1;
- }
- return PyMac_GetFSSpec(v, *spec);
+ if (v == Py_None) {
+ *spec = NULL;
+ return 1;
+ }
+ return PyMac_GetFSSpec(v, *spec);
}
#endif /* !__LP64__ */
static int
myPyMac_GetOptFSRefPtr(PyObject *v, FSRef **ref)
{
- if (v == Py_None) {
- *ref = NULL;
- return 1;
- }
- return PyMac_GetFSRef(v, *ref);
+ if (v == Py_None) {
+ *ref = NULL;
+ return 1;
+ }
+ return PyMac_GetFSRef(v, *ref);
}
/*
@@ -110,52 +110,52 @@ static PyObject *
PyMac_BuildHFSUniStr255(HFSUniStr255 *itself)
{
- return Py_BuildValue("u#", itself->unicode, itself->length);
+ return Py_BuildValue("u#", itself->unicode, itself->length);
}
#ifndef __LP64__
static OSErr
_PyMac_GetFullPathname(FSSpec *fss, char *path, int len)
{
- FSRef fsr;
- OSErr err;
-
- *path = '\0';
- err = FSpMakeFSRef(fss, &fsr);
- if (err == fnfErr) {
- /* FSSpecs can point to non-existing files, fsrefs can't. */
- FSSpec fss2;
- int tocopy;
-
- err = FSMakeFSSpec(fss->vRefNum, fss->parID,
- (unsigned char*)"", &fss2);
- if (err)
- return err;
- err = FSpMakeFSRef(&fss2, &fsr);
- if (err)
- return err;
- err = (OSErr)FSRefMakePath(&fsr, (unsigned char*)path, len-1);
- if (err)
- return err;
- /* This part is not 100% safe: we append the filename part, but
- ** I'm not sure that we don't run afoul of the various 8bit
- ** encodings here. Will have to look this up at some point...
- */
- strcat(path, "/");
- tocopy = fss->name[0];
- if ((strlen(path) + tocopy) >= len)
- tocopy = len - strlen(path) - 1;
- if (tocopy > 0)
- strncat(path, (char*)fss->name+1, tocopy);
- }
- else {
- if (err)
- return err;
- err = (OSErr)FSRefMakePath(&fsr, (unsigned char*)path, len);
- if (err)
- return err;
- }
- return 0;
+ FSRef fsr;
+ OSErr err;
+
+ *path = '\0';
+ err = FSpMakeFSRef(fss, &fsr);
+ if (err == fnfErr) {
+ /* FSSpecs can point to non-existing files, fsrefs can't. */
+ FSSpec fss2;
+ int tocopy;
+
+ err = FSMakeFSSpec(fss->vRefNum, fss->parID,
+ (unsigned char*)"", &fss2);
+ if (err)
+ return err;
+ err = FSpMakeFSRef(&fss2, &fsr);
+ if (err)
+ return err;
+ err = (OSErr)FSRefMakePath(&fsr, (unsigned char*)path, len-1);
+ if (err)
+ return err;
+ /* This part is not 100% safe: we append the filename part, but
+ ** I'm not sure that we don't run afoul of the various 8bit
+ ** encodings here. Will have to look this up at some point...
+ */
+ strcat(path, "/");
+ tocopy = fss->name[0];
+ if ((strlen(path) + tocopy) >= len)
+ tocopy = len - strlen(path) - 1;
+ if (tocopy > 0)
+ strncat(path, (char*)fss->name+1, tocopy);
+ }
+ else {
+ if (err)
+ return err;
+ err = (OSErr)FSRefMakePath(&fsr, (unsigned char*)path, len);
+ if (err)
+ return err;
+ }
+ return 0;
}
#endif /* !__LP64__ */
@@ -169,263 +169,263 @@ static PyTypeObject FSCatalogInfo_Type;
#define FSCatalogInfo_Check(x) ((x)->ob_type == &FSCatalogInfo_Type || PyObject_TypeCheck((x), &FSCatalogInfo_Type))
typedef struct FSCatalogInfoObject {
- PyObject_HEAD
- FSCatalogInfo ob_itself;
+ PyObject_HEAD
+ FSCatalogInfo ob_itself;
} FSCatalogInfoObject;
static PyObject *FSCatalogInfo_New(FSCatalogInfo *itself)
{
- FSCatalogInfoObject *it;
- if (itself == NULL) { Py_INCREF(Py_None); return Py_None; }
- it = PyObject_NEW(FSCatalogInfoObject, &FSCatalogInfo_Type);
- if (it == NULL) return NULL;
- it->ob_itself = *itself;
- return (PyObject *)it;
+ FSCatalogInfoObject *it;
+ if (itself == NULL) { Py_INCREF(Py_None); return Py_None; }
+ it = PyObject_NEW(FSCatalogInfoObject, &FSCatalogInfo_Type);
+ if (it == NULL) return NULL;
+ it->ob_itself = *itself;
+ return (PyObject *)it;
}
static int FSCatalogInfo_Convert(PyObject *v, FSCatalogInfo *p_itself)
{
- if (!FSCatalogInfo_Check(v))
- {
- PyErr_SetString(PyExc_TypeError, "FSCatalogInfo required");
- return 0;
- }
- *p_itself = ((FSCatalogInfoObject *)v)->ob_itself;
- return 1;
+ if (!FSCatalogInfo_Check(v))
+ {
+ PyErr_SetString(PyExc_TypeError, "FSCatalogInfo required");
+ return 0;
+ }
+ *p_itself = ((FSCatalogInfoObject *)v)->ob_itself;
+ return 1;
}
static void FSCatalogInfo_dealloc(FSCatalogInfoObject *self)
{
- /* Cleanup of self->ob_itself goes here */
- self->ob_type->tp_free((PyObject *)self);
+ /* Cleanup of self->ob_itself goes here */
+ self->ob_type->tp_free((PyObject *)self);
}
static PyMethodDef FSCatalogInfo_methods[] = {
- {NULL, NULL, 0}
+ {NULL, NULL, 0}
};
static PyObject *FSCatalogInfo_get_nodeFlags(FSCatalogInfoObject *self, void *closure)
{
- return Py_BuildValue("H", self->ob_itself.nodeFlags);
+ return Py_BuildValue("H", self->ob_itself.nodeFlags);
}
static int FSCatalogInfo_set_nodeFlags(FSCatalogInfoObject *self, PyObject *v, void *closure)
{
- return PyArg_Parse(v, "H", &self->ob_itself.nodeFlags)-1;
- return 0;
+ return PyArg_Parse(v, "H", &self->ob_itself.nodeFlags)-1;
+ return 0;
}
static PyObject *FSCatalogInfo_get_volume(FSCatalogInfoObject *self, void *closure)
{
- return Py_BuildValue("h", self->ob_itself.volume);
+ return Py_BuildValue("h", self->ob_itself.volume);
}
static int FSCatalogInfo_set_volume(FSCatalogInfoObject *self, PyObject *v, void *closure)
{
- return PyArg_Parse(v, "h", &self->ob_itself.volume)-1;
- return 0;
+ return PyArg_Parse(v, "h", &self->ob_itself.volume)-1;
+ return 0;
}
static PyObject *FSCatalogInfo_get_parentDirID(FSCatalogInfoObject *self, void *closure)
{
- return Py_BuildValue("l", self->ob_itself.parentDirID);
+ return Py_BuildValue("l", self->ob_itself.parentDirID);
}
static int FSCatalogInfo_set_parentDirID(FSCatalogInfoObject *self, PyObject *v, void *closure)
{
- return PyArg_Parse(v, "l", &self->ob_itself.parentDirID)-1;
- return 0;
+ return PyArg_Parse(v, "l", &self->ob_itself.parentDirID)-1;
+ return 0;
}
static PyObject *FSCatalogInfo_get_nodeID(FSCatalogInfoObject *self, void *closure)
{
- return Py_BuildValue("l", self->ob_itself.nodeID);
+ return Py_BuildValue("l", self->ob_itself.nodeID);
}
static int FSCatalogInfo_set_nodeID(FSCatalogInfoObject *self, PyObject *v, void *closure)
{
- return PyArg_Parse(v, "l", &self->ob_itself.nodeID)-1;
- return 0;
+ return PyArg_Parse(v, "l", &self->ob_itself.nodeID)-1;
+ return 0;
}
static PyObject *FSCatalogInfo_get_createDate(FSCatalogInfoObject *self, void *closure)
{
- return Py_BuildValue("O&", UTCDateTime_New, &self->ob_itself.createDate);
+ return Py_BuildValue("O&", UTCDateTime_New, &self->ob_itself.createDate);
}
static int FSCatalogInfo_set_createDate(FSCatalogInfoObject *self, PyObject *v, void *closure)
{
- return PyArg_Parse(v, "O&", UTCDateTime_Convert, &self->ob_itself.createDate)-1;
- return 0;
+ return PyArg_Parse(v, "O&", UTCDateTime_Convert, &self->ob_itself.createDate)-1;
+ return 0;
}
static PyObject *FSCatalogInfo_get_contentModDate(FSCatalogInfoObject *self, void *closure)
{
- return Py_BuildValue("O&", UTCDateTime_New, &self->ob_itself.contentModDate);
+ return Py_BuildValue("O&", UTCDateTime_New, &self->ob_itself.contentModDate);
}
static int FSCatalogInfo_set_contentModDate(FSCatalogInfoObject *self, PyObject *v, void *closure)
{
- return PyArg_Parse(v, "O&", UTCDateTime_Convert, &self->ob_itself.contentModDate)-1;
- return 0;
+ return PyArg_Parse(v, "O&", UTCDateTime_Convert, &self->ob_itself.contentModDate)-1;
+ return 0;
}
static PyObject *FSCatalogInfo_get_attributeModDate(FSCatalogInfoObject *self, void *closure)
{
- return Py_BuildValue("O&", UTCDateTime_New, &self->ob_itself.attributeModDate);
+ return Py_BuildValue("O&", UTCDateTime_New, &self->ob_itself.attributeModDate);
}
static int FSCatalogInfo_set_attributeModDate(FSCatalogInfoObject *self, PyObject *v, void *closure)
{
- return PyArg_Parse(v, "O&", UTCDateTime_Convert, &self->ob_itself.attributeModDate)-1;
- return 0;
+ return PyArg_Parse(v, "O&", UTCDateTime_Convert, &self->ob_itself.attributeModDate)-1;
+ return 0;
}
static PyObject *FSCatalogInfo_get_accessDate(FSCatalogInfoObject *self, void *closure)
{
- return Py_BuildValue("O&", UTCDateTime_New, &self->ob_itself.accessDate);
+ return Py_BuildValue("O&", UTCDateTime_New, &self->ob_itself.accessDate);
}
static int FSCatalogInfo_set_accessDate(FSCatalogInfoObject *self, PyObject *v, void *closure)
{
- return PyArg_Parse(v, "O&", UTCDateTime_Convert, &self->ob_itself.accessDate)-1;
- return 0;
+ return PyArg_Parse(v, "O&", UTCDateTime_Convert, &self->ob_itself.accessDate)-1;
+ return 0;
}
static PyObject *FSCatalogInfo_get_backupDate(FSCatalogInfoObject *self, void *closure)
{
- return Py_BuildValue("O&", UTCDateTime_New, &self->ob_itself.backupDate);
+ return Py_BuildValue("O&", UTCDateTime_New, &self->ob_itself.backupDate);
}
static int FSCatalogInfo_set_backupDate(FSCatalogInfoObject *self, PyObject *v, void *closure)
{
- return PyArg_Parse(v, "O&", UTCDateTime_Convert, &self->ob_itself.backupDate)-1;
- return 0;
+ return PyArg_Parse(v, "O&", UTCDateTime_Convert, &self->ob_itself.backupDate)-1;
+ return 0;
}
static PyObject *FSCatalogInfo_get_permissions(FSCatalogInfoObject *self, void *closure)
{
- FSPermissionInfo* info = (FSPermissionInfo*)&(self->ob_itself.permissions);
- return Py_BuildValue("(llll)", info->userID, info->groupID, info->userAccess, info->mode);
+ FSPermissionInfo* info = (FSPermissionInfo*)&(self->ob_itself.permissions);
+ return Py_BuildValue("(llll)", info->userID, info->groupID, info->userAccess, info->mode);
}
static int FSCatalogInfo_set_permissions(FSCatalogInfoObject *self, PyObject *v, void *closure)
{
- long userID;
- long groupID;
- long userAccess;
- long mode;
- int r;
+ long userID;
+ long groupID;
+ long userAccess;
+ long mode;
+ int r;
- FSPermissionInfo* info = (FSPermissionInfo*)&(self->ob_itself.permissions);
+ FSPermissionInfo* info = (FSPermissionInfo*)&(self->ob_itself.permissions);
- r = PyArg_Parse(v, "(llll)", &userID, &groupID, &userAccess, &mode);
- if (!r) {
- return -1;
- }
- info->userID = userID;
- info->groupID = groupID;
- info->userAccess = userAccess;
- info->mode = mode;
- return 0;
+ r = PyArg_Parse(v, "(llll)", &userID, &groupID, &userAccess, &mode);
+ if (!r) {
+ return -1;
+ }
+ info->userID = userID;
+ info->groupID = groupID;
+ info->userAccess = userAccess;
+ info->mode = mode;
+ return 0;
}
static PyObject *FSCatalogInfo_get_valence(FSCatalogInfoObject *self, void *closure)
{
- return Py_BuildValue("l", self->ob_itself.valence);
+ return Py_BuildValue("l", self->ob_itself.valence);
}
static int FSCatalogInfo_set_valence(FSCatalogInfoObject *self, PyObject *v, void *closure)
{
- return PyArg_Parse(v, "l", &self->ob_itself.valence)-1;
- return 0;
+ return PyArg_Parse(v, "l", &self->ob_itself.valence)-1;
+ return 0;
}
static PyObject *FSCatalogInfo_get_dataLogicalSize(FSCatalogInfoObject *self, void *closure)
{
- return Py_BuildValue("l", self->ob_itself.dataLogicalSize);
+ return Py_BuildValue("l", self->ob_itself.dataLogicalSize);
}
static int FSCatalogInfo_set_dataLogicalSize(FSCatalogInfoObject *self, PyObject *v, void *closure)
{
- return PyArg_Parse(v, "l", &self->ob_itself.dataLogicalSize)-1;
- return 0;
+ return PyArg_Parse(v, "l", &self->ob_itself.dataLogicalSize)-1;
+ return 0;
}
static PyObject *FSCatalogInfo_get_dataPhysicalSize(FSCatalogInfoObject *self, void *closure)
{
- return Py_BuildValue("l", self->ob_itself.dataPhysicalSize);
+ return Py_BuildValue("l", self->ob_itself.dataPhysicalSize);
}
static int FSCatalogInfo_set_dataPhysicalSize(FSCatalogInfoObject *self, PyObject *v, void *closure)
{
- return PyArg_Parse(v, "l", &self->ob_itself.dataPhysicalSize)-1;
- return 0;
+ return PyArg_Parse(v, "l", &self->ob_itself.dataPhysicalSize)-1;
+ return 0;
}
static PyObject *FSCatalogInfo_get_rsrcLogicalSize(FSCatalogInfoObject *self, void *closure)
{
- return Py_BuildValue("l", self->ob_itself.rsrcLogicalSize);
+ return Py_BuildValue("l", self->ob_itself.rsrcLogicalSize);
}
static int FSCatalogInfo_set_rsrcLogicalSize(FSCatalogInfoObject *self, PyObject *v, void *closure)
{
- return PyArg_Parse(v, "l", &self->ob_itself.rsrcLogicalSize)-1;
- return 0;
+ return PyArg_Parse(v, "l", &self->ob_itself.rsrcLogicalSize)-1;
+ return 0;
}
static PyObject *FSCatalogInfo_get_rsrcPhysicalSize(FSCatalogInfoObject *self, void *closure)
{
- return Py_BuildValue("l", self->ob_itself.rsrcPhysicalSize);
+ return Py_BuildValue("l", self->ob_itself.rsrcPhysicalSize);
}
static int FSCatalogInfo_set_rsrcPhysicalSize(FSCatalogInfoObject *self, PyObject *v, void *closure)
{
- return PyArg_Parse(v, "l", &self->ob_itself.rsrcPhysicalSize)-1;
- return 0;
+ return PyArg_Parse(v, "l", &self->ob_itself.rsrcPhysicalSize)-1;
+ return 0;
}
static PyObject *FSCatalogInfo_get_sharingFlags(FSCatalogInfoObject *self, void *closure)
{
- return Py_BuildValue("l", self->ob_itself.sharingFlags);
+ return Py_BuildValue("l", self->ob_itself.sharingFlags);
}
static int FSCatalogInfo_set_sharingFlags(FSCatalogInfoObject *self, PyObject *v, void *closure)
{
- return PyArg_Parse(v, "l", &self->ob_itself.sharingFlags)-1;
- return 0;
+ return PyArg_Parse(v, "l", &self->ob_itself.sharingFlags)-1;
+ return 0;
}
static PyObject *FSCatalogInfo_get_userPrivileges(FSCatalogInfoObject *self, void *closure)
{
- return Py_BuildValue("b", self->ob_itself.userPrivileges);
+ return Py_BuildValue("b", self->ob_itself.userPrivileges);
}
static int FSCatalogInfo_set_userPrivileges(FSCatalogInfoObject *self, PyObject *v, void *closure)
{
- return PyArg_Parse(v, "b", &self->ob_itself.userPrivileges)-1;
- return 0;
+ return PyArg_Parse(v, "b", &self->ob_itself.userPrivileges)-1;
+ return 0;
}
static PyGetSetDef FSCatalogInfo_getsetlist[] = {
- {"nodeFlags", (getter)FSCatalogInfo_get_nodeFlags, (setter)FSCatalogInfo_set_nodeFlags, NULL},
- {"volume", (getter)FSCatalogInfo_get_volume, (setter)FSCatalogInfo_set_volume, NULL},
- {"parentDirID", (getter)FSCatalogInfo_get_parentDirID, (setter)FSCatalogInfo_set_parentDirID, NULL},
- {"nodeID", (getter)FSCatalogInfo_get_nodeID, (setter)FSCatalogInfo_set_nodeID, NULL},
- {"createDate", (getter)FSCatalogInfo_get_createDate, (setter)FSCatalogInfo_set_createDate, NULL},
- {"contentModDate", (getter)FSCatalogInfo_get_contentModDate, (setter)FSCatalogInfo_set_contentModDate, NULL},
- {"attributeModDate", (getter)FSCatalogInfo_get_attributeModDate, (setter)FSCatalogInfo_set_attributeModDate, NULL},
- {"accessDate", (getter)FSCatalogInfo_get_accessDate, (setter)FSCatalogInfo_set_accessDate, NULL},
- {"backupDate", (getter)FSCatalogInfo_get_backupDate, (setter)FSCatalogInfo_set_backupDate, NULL},
- {"permissions", (getter)FSCatalogInfo_get_permissions, (setter)FSCatalogInfo_set_permissions, NULL},
- {"valence", (getter)FSCatalogInfo_get_valence, (setter)FSCatalogInfo_set_valence, NULL},
- {"dataLogicalSize", (getter)FSCatalogInfo_get_dataLogicalSize, (setter)FSCatalogInfo_set_dataLogicalSize, NULL},
- {"dataPhysicalSize", (getter)FSCatalogInfo_get_dataPhysicalSize, (setter)FSCatalogInfo_set_dataPhysicalSize, NULL},
- {"rsrcLogicalSize", (getter)FSCatalogInfo_get_rsrcLogicalSize, (setter)FSCatalogInfo_set_rsrcLogicalSize, NULL},
- {"rsrcPhysicalSize", (getter)FSCatalogInfo_get_rsrcPhysicalSize, (setter)FSCatalogInfo_set_rsrcPhysicalSize, NULL},
- {"sharingFlags", (getter)FSCatalogInfo_get_sharingFlags, (setter)FSCatalogInfo_set_sharingFlags, NULL},
- {"userPrivileges", (getter)FSCatalogInfo_get_userPrivileges, (setter)FSCatalogInfo_set_userPrivileges, NULL},
- {NULL, NULL, NULL, NULL},
+ {"nodeFlags", (getter)FSCatalogInfo_get_nodeFlags, (setter)FSCatalogInfo_set_nodeFlags, NULL},
+ {"volume", (getter)FSCatalogInfo_get_volume, (setter)FSCatalogInfo_set_volume, NULL},
+ {"parentDirID", (getter)FSCatalogInfo_get_parentDirID, (setter)FSCatalogInfo_set_parentDirID, NULL},
+ {"nodeID", (getter)FSCatalogInfo_get_nodeID, (setter)FSCatalogInfo_set_nodeID, NULL},
+ {"createDate", (getter)FSCatalogInfo_get_createDate, (setter)FSCatalogInfo_set_createDate, NULL},
+ {"contentModDate", (getter)FSCatalogInfo_get_contentModDate, (setter)FSCatalogInfo_set_contentModDate, NULL},
+ {"attributeModDate", (getter)FSCatalogInfo_get_attributeModDate, (setter)FSCatalogInfo_set_attributeModDate, NULL},
+ {"accessDate", (getter)FSCatalogInfo_get_accessDate, (setter)FSCatalogInfo_set_accessDate, NULL},
+ {"backupDate", (getter)FSCatalogInfo_get_backupDate, (setter)FSCatalogInfo_set_backupDate, NULL},
+ {"permissions", (getter)FSCatalogInfo_get_permissions, (setter)FSCatalogInfo_set_permissions, NULL},
+ {"valence", (getter)FSCatalogInfo_get_valence, (setter)FSCatalogInfo_set_valence, NULL},
+ {"dataLogicalSize", (getter)FSCatalogInfo_get_dataLogicalSize, (setter)FSCatalogInfo_set_dataLogicalSize, NULL},
+ {"dataPhysicalSize", (getter)FSCatalogInfo_get_dataPhysicalSize, (setter)FSCatalogInfo_set_dataPhysicalSize, NULL},
+ {"rsrcLogicalSize", (getter)FSCatalogInfo_get_rsrcLogicalSize, (setter)FSCatalogInfo_set_rsrcLogicalSize, NULL},
+ {"rsrcPhysicalSize", (getter)FSCatalogInfo_get_rsrcPhysicalSize, (setter)FSCatalogInfo_set_rsrcPhysicalSize, NULL},
+ {"sharingFlags", (getter)FSCatalogInfo_get_sharingFlags, (setter)FSCatalogInfo_set_sharingFlags, NULL},
+ {"userPrivileges", (getter)FSCatalogInfo_get_userPrivileges, (setter)FSCatalogInfo_set_userPrivileges, NULL},
+ {NULL, NULL, NULL, NULL},
};
@@ -436,103 +436,103 @@ static PyGetSetDef FSCatalogInfo_getsetlist[] = {
#define FSCatalogInfo_hash NULL
static int FSCatalogInfo_tp_init(PyObject *_self, PyObject *_args, PyObject *_kwds)
{
- static char *kw[] = {
- "nodeFlags",
- "volume",
- "parentDirID",
- "nodeID",
- "createDate",
- "contentModDate",
- "atributeModDate",
- "accessDate",
- "backupDate",
- "valence",
- "dataLogicalSize",
- "dataPhysicalSize",
- "rsrcLogicalSize",
- "rsrcPhysicalSize",
- "sharingFlags",
- "userPrivileges"
- , 0};
-
- if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "|HhllO&O&O&O&O&llllllb", kw, &((FSCatalogInfoObject *)_self)->ob_itself.nodeFlags,
- &((FSCatalogInfoObject *)_self)->ob_itself.volume,
- &((FSCatalogInfoObject *)_self)->ob_itself.parentDirID,
- &((FSCatalogInfoObject *)_self)->ob_itself.nodeID,
- UTCDateTime_Convert, &((FSCatalogInfoObject *)_self)->ob_itself.createDate,
- UTCDateTime_Convert, &((FSCatalogInfoObject *)_self)->ob_itself.contentModDate,
- UTCDateTime_Convert, &((FSCatalogInfoObject *)_self)->ob_itself.attributeModDate,
- UTCDateTime_Convert, &((FSCatalogInfoObject *)_self)->ob_itself.accessDate,
- UTCDateTime_Convert, &((FSCatalogInfoObject *)_self)->ob_itself.backupDate,
- &((FSCatalogInfoObject *)_self)->ob_itself.valence,
- &((FSCatalogInfoObject *)_self)->ob_itself.dataLogicalSize,
- &((FSCatalogInfoObject *)_self)->ob_itself.dataPhysicalSize,
- &((FSCatalogInfoObject *)_self)->ob_itself.rsrcLogicalSize,
- &((FSCatalogInfoObject *)_self)->ob_itself.rsrcPhysicalSize,
- &((FSCatalogInfoObject *)_self)->ob_itself.sharingFlags,
- &((FSCatalogInfoObject *)_self)->ob_itself.userPrivileges))
- {
- return -1;
- }
- return 0;
+ static char *kw[] = {
+ "nodeFlags",
+ "volume",
+ "parentDirID",
+ "nodeID",
+ "createDate",
+ "contentModDate",
+ "atributeModDate",
+ "accessDate",
+ "backupDate",
+ "valence",
+ "dataLogicalSize",
+ "dataPhysicalSize",
+ "rsrcLogicalSize",
+ "rsrcPhysicalSize",
+ "sharingFlags",
+ "userPrivileges"
+ , 0};
+
+ if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "|HhllO&O&O&O&O&llllllb", kw, &((FSCatalogInfoObject *)_self)->ob_itself.nodeFlags,
+ &((FSCatalogInfoObject *)_self)->ob_itself.volume,
+ &((FSCatalogInfoObject *)_self)->ob_itself.parentDirID,
+ &((FSCatalogInfoObject *)_self)->ob_itself.nodeID,
+ UTCDateTime_Convert, &((FSCatalogInfoObject *)_self)->ob_itself.createDate,
+ UTCDateTime_Convert, &((FSCatalogInfoObject *)_self)->ob_itself.contentModDate,
+ UTCDateTime_Convert, &((FSCatalogInfoObject *)_self)->ob_itself.attributeModDate,
+ UTCDateTime_Convert, &((FSCatalogInfoObject *)_self)->ob_itself.accessDate,
+ UTCDateTime_Convert, &((FSCatalogInfoObject *)_self)->ob_itself.backupDate,
+ &((FSCatalogInfoObject *)_self)->ob_itself.valence,
+ &((FSCatalogInfoObject *)_self)->ob_itself.dataLogicalSize,
+ &((FSCatalogInfoObject *)_self)->ob_itself.dataPhysicalSize,
+ &((FSCatalogInfoObject *)_self)->ob_itself.rsrcLogicalSize,
+ &((FSCatalogInfoObject *)_self)->ob_itself.rsrcPhysicalSize,
+ &((FSCatalogInfoObject *)_self)->ob_itself.sharingFlags,
+ &((FSCatalogInfoObject *)_self)->ob_itself.userPrivileges))
+ {
+ return -1;
+ }
+ return 0;
}
#define FSCatalogInfo_tp_alloc PyType_GenericAlloc
static PyObject *FSCatalogInfo_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
- PyObject *self;
+ PyObject *self;
- if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
- memset(&((FSCatalogInfoObject *)self)->ob_itself, 0, sizeof(FSCatalogInfo));
- return self;
+ if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
+ memset(&((FSCatalogInfoObject *)self)->ob_itself, 0, sizeof(FSCatalogInfo));
+ return self;
}
#define FSCatalogInfo_tp_free PyObject_Del
static PyTypeObject FSCatalogInfo_Type = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
- "Carbon.File.FSCatalogInfo", /*tp_name*/
- sizeof(FSCatalogInfoObject), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- /* methods */
- (destructor) FSCatalogInfo_dealloc, /*tp_dealloc*/
- 0, /*tp_print*/
- (getattrfunc)0, /*tp_getattr*/
- (setattrfunc)0, /*tp_setattr*/
- (cmpfunc) FSCatalogInfo_compare, /*tp_compare*/
- (reprfunc) FSCatalogInfo_repr, /*tp_repr*/
- (PyNumberMethods *)0, /* tp_as_number */
- (PySequenceMethods *)0, /* tp_as_sequence */
- (PyMappingMethods *)0, /* tp_as_mapping */
- (hashfunc) FSCatalogInfo_hash, /*tp_hash*/
- 0, /*tp_call*/
- 0, /*tp_str*/
- PyObject_GenericGetAttr, /*tp_getattro*/
- PyObject_GenericSetAttr, /*tp_setattro */
- 0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
- 0, /*tp_doc*/
- 0, /*tp_traverse*/
- 0, /*tp_clear*/
- 0, /*tp_richcompare*/
- 0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
- 0, /*tp_iternext*/
- FSCatalogInfo_methods, /* tp_methods */
- 0, /*tp_members*/
- FSCatalogInfo_getsetlist, /*tp_getset*/
- 0, /*tp_base*/
- 0, /*tp_dict*/
- 0, /*tp_descr_get*/
- 0, /*tp_descr_set*/
- 0, /*tp_dictoffset*/
- FSCatalogInfo_tp_init, /* tp_init */
- FSCatalogInfo_tp_alloc, /* tp_alloc */
- FSCatalogInfo_tp_new, /* tp_new */
- FSCatalogInfo_tp_free, /* tp_free */
+ PyObject_HEAD_INIT(NULL)
+ 0, /*ob_size*/
+ "Carbon.File.FSCatalogInfo", /*tp_name*/
+ sizeof(FSCatalogInfoObject), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ /* methods */
+ (destructor) FSCatalogInfo_dealloc, /*tp_dealloc*/
+ 0, /*tp_print*/
+ (getattrfunc)0, /*tp_getattr*/
+ (setattrfunc)0, /*tp_setattr*/
+ (cmpfunc) FSCatalogInfo_compare, /*tp_compare*/
+ (reprfunc) FSCatalogInfo_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) FSCatalogInfo_hash, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ PyObject_GenericGetAttr, /*tp_getattro*/
+ PyObject_GenericSetAttr, /*tp_setattro */
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
+ 0, /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ FSCatalogInfo_methods, /* tp_methods */
+ 0, /*tp_members*/
+ FSCatalogInfo_getsetlist, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ FSCatalogInfo_tp_init, /* tp_init */
+ FSCatalogInfo_tp_alloc, /* tp_alloc */
+ FSCatalogInfo_tp_new, /* tp_new */
+ FSCatalogInfo_tp_free, /* tp_free */
};
/* ----------------- End object type FSCatalogInfo ------------------ */
@@ -547,103 +547,103 @@ static PyTypeObject FInfo_Type;
#define FInfo_Check(x) ((x)->ob_type == &FInfo_Type || PyObject_TypeCheck((x), &FInfo_Type))
typedef struct FInfoObject {
- PyObject_HEAD
- FInfo ob_itself;
+ PyObject_HEAD
+ FInfo ob_itself;
} FInfoObject;
static PyObject *FInfo_New(FInfo *itself)
{
- FInfoObject *it;
- if (itself == NULL) return PyMac_Error(resNotFound);
- it = PyObject_NEW(FInfoObject, &FInfo_Type);
- if (it == NULL) return NULL;
- it->ob_itself = *itself;
- return (PyObject *)it;
+ FInfoObject *it;
+ if (itself == NULL) return PyMac_Error(resNotFound);
+ it = PyObject_NEW(FInfoObject, &FInfo_Type);
+ if (it == NULL) return NULL;
+ it->ob_itself = *itself;
+ return (PyObject *)it;
}
static int FInfo_Convert(PyObject *v, FInfo *p_itself)
{
- if (!FInfo_Check(v))
- {
- PyErr_SetString(PyExc_TypeError, "FInfo required");
- return 0;
- }
- *p_itself = ((FInfoObject *)v)->ob_itself;
- return 1;
+ if (!FInfo_Check(v))
+ {
+ PyErr_SetString(PyExc_TypeError, "FInfo required");
+ return 0;
+ }
+ *p_itself = ((FInfoObject *)v)->ob_itself;
+ return 1;
}
static void FInfo_dealloc(FInfoObject *self)
{
- /* Cleanup of self->ob_itself goes here */
- self->ob_type->tp_free((PyObject *)self);
+ /* Cleanup of self->ob_itself goes here */
+ self->ob_type->tp_free((PyObject *)self);
}
static PyMethodDef FInfo_methods[] = {
- {NULL, NULL, 0}
+ {NULL, NULL, 0}
};
static PyObject *FInfo_get_Type(FInfoObject *self, void *closure)
{
- return Py_BuildValue("O&", PyMac_BuildOSType, self->ob_itself.fdType);
+ return Py_BuildValue("O&", PyMac_BuildOSType, self->ob_itself.fdType);
}
static int FInfo_set_Type(FInfoObject *self, PyObject *v, void *closure)
{
- return PyArg_Parse(v, "O&", PyMac_GetOSType, &self->ob_itself.fdType)-1;
- return 0;
+ return PyArg_Parse(v, "O&", PyMac_GetOSType, &self->ob_itself.fdType)-1;
+ return 0;
}
static PyObject *FInfo_get_Creator(FInfoObject *self, void *closure)
{
- return Py_BuildValue("O&", PyMac_BuildOSType, self->ob_itself.fdCreator);
+ return Py_BuildValue("O&", PyMac_BuildOSType, self->ob_itself.fdCreator);
}
static int FInfo_set_Creator(FInfoObject *self, PyObject *v, void *closure)
{
- return PyArg_Parse(v, "O&", PyMac_GetOSType, &self->ob_itself.fdCreator)-1;
- return 0;
+ return PyArg_Parse(v, "O&", PyMac_GetOSType, &self->ob_itself.fdCreator)-1;
+ return 0;
}
static PyObject *FInfo_get_Flags(FInfoObject *self, void *closure)
{
- return Py_BuildValue("H", self->ob_itself.fdFlags);
+ return Py_BuildValue("H", self->ob_itself.fdFlags);
}
static int FInfo_set_Flags(FInfoObject *self, PyObject *v, void *closure)
{
- return PyArg_Parse(v, "H", &self->ob_itself.fdFlags)-1;
- return 0;
+ return PyArg_Parse(v, "H", &self->ob_itself.fdFlags)-1;
+ return 0;
}
static PyObject *FInfo_get_Location(FInfoObject *self, void *closure)
{
- return Py_BuildValue("O&", PyMac_BuildPoint, self->ob_itself.fdLocation);
+ return Py_BuildValue("O&", PyMac_BuildPoint, self->ob_itself.fdLocation);
}
static int FInfo_set_Location(FInfoObject *self, PyObject *v, void *closure)
{
- return PyArg_Parse(v, "O&", PyMac_GetPoint, &self->ob_itself.fdLocation)-1;
- return 0;
+ return PyArg_Parse(v, "O&", PyMac_GetPoint, &self->ob_itself.fdLocation)-1;
+ return 0;
}
static PyObject *FInfo_get_Fldr(FInfoObject *self, void *closure)
{
- return Py_BuildValue("h", self->ob_itself.fdFldr);
+ return Py_BuildValue("h", self->ob_itself.fdFldr);
}
static int FInfo_set_Fldr(FInfoObject *self, PyObject *v, void *closure)
{
- return PyArg_Parse(v, "h", &self->ob_itself.fdFldr)-1;
- return 0;
+ return PyArg_Parse(v, "h", &self->ob_itself.fdFldr)-1;
+ return 0;
}
static PyGetSetDef FInfo_getsetlist[] = {
- {"Type", (getter)FInfo_get_Type, (setter)FInfo_set_Type, "4-char file type"},
- {"Creator", (getter)FInfo_get_Creator, (setter)FInfo_set_Creator, "4-char file creator"},
- {"Flags", (getter)FInfo_get_Flags, (setter)FInfo_set_Flags, "Finder flag bits"},
- {"Location", (getter)FInfo_get_Location, (setter)FInfo_set_Location, "(x, y) location of the file's icon in its parent finder window"},
- {"Fldr", (getter)FInfo_get_Fldr, (setter)FInfo_set_Fldr, "Original folder, for 'put away'"},
- {NULL, NULL, NULL, NULL},
+ {"Type", (getter)FInfo_get_Type, (setter)FInfo_set_Type, "4-char file type"},
+ {"Creator", (getter)FInfo_get_Creator, (setter)FInfo_set_Creator, "4-char file creator"},
+ {"Flags", (getter)FInfo_get_Flags, (setter)FInfo_set_Flags, "Finder flag bits"},
+ {"Location", (getter)FInfo_get_Location, (setter)FInfo_set_Location, "(x, y) location of the file's icon in its parent finder window"},
+ {"Fldr", (getter)FInfo_get_Fldr, (setter)FInfo_set_Fldr, "Original folder, for 'put away'"},
+ {NULL, NULL, NULL, NULL},
};
@@ -654,73 +654,73 @@ static PyGetSetDef FInfo_getsetlist[] = {
#define FInfo_hash NULL
static int FInfo_tp_init(PyObject *_self, PyObject *_args, PyObject *_kwds)
{
- FInfo *itself = NULL;
- static char *kw[] = {"itself", 0};
+ FInfo *itself = NULL;
+ static char *kw[] = {"itself", 0};
- if (PyArg_ParseTupleAndKeywords(_args, _kwds, "|O&", kw, FInfo_Convert, &itself))
- {
- if (itself) memcpy(&((FInfoObject *)_self)->ob_itself, itself, sizeof(FInfo));
- return 0;
- }
- return -1;
+ if (PyArg_ParseTupleAndKeywords(_args, _kwds, "|O&", kw, FInfo_Convert, &itself))
+ {
+ if (itself) memcpy(&((FInfoObject *)_self)->ob_itself, itself, sizeof(FInfo));
+ return 0;
+ }
+ return -1;
}
#define FInfo_tp_alloc PyType_GenericAlloc
static PyObject *FInfo_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
- PyObject *self;
+ PyObject *self;
- if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
- memset(&((FInfoObject *)self)->ob_itself, 0, sizeof(FInfo));
- return self;
+ if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
+ memset(&((FInfoObject *)self)->ob_itself, 0, sizeof(FInfo));
+ return self;
}
#define FInfo_tp_free PyObject_Del
static PyTypeObject FInfo_Type = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
- "Carbon.File.FInfo", /*tp_name*/
- sizeof(FInfoObject), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- /* methods */
- (destructor) FInfo_dealloc, /*tp_dealloc*/
- 0, /*tp_print*/
- (getattrfunc)0, /*tp_getattr*/
- (setattrfunc)0, /*tp_setattr*/
- (cmpfunc) FInfo_compare, /*tp_compare*/
- (reprfunc) FInfo_repr, /*tp_repr*/
- (PyNumberMethods *)0, /* tp_as_number */
- (PySequenceMethods *)0, /* tp_as_sequence */
- (PyMappingMethods *)0, /* tp_as_mapping */
- (hashfunc) FInfo_hash, /*tp_hash*/
- 0, /*tp_call*/
- 0, /*tp_str*/
- PyObject_GenericGetAttr, /*tp_getattro*/
- PyObject_GenericSetAttr, /*tp_setattro */
- 0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
- 0, /*tp_doc*/
- 0, /*tp_traverse*/
- 0, /*tp_clear*/
- 0, /*tp_richcompare*/
- 0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
- 0, /*tp_iternext*/
- FInfo_methods, /* tp_methods */
- 0, /*tp_members*/
- FInfo_getsetlist, /*tp_getset*/
- 0, /*tp_base*/
- 0, /*tp_dict*/
- 0, /*tp_descr_get*/
- 0, /*tp_descr_set*/
- 0, /*tp_dictoffset*/
- FInfo_tp_init, /* tp_init */
- FInfo_tp_alloc, /* tp_alloc */
- FInfo_tp_new, /* tp_new */
- FInfo_tp_free, /* tp_free */
+ PyObject_HEAD_INIT(NULL)
+ 0, /*ob_size*/
+ "Carbon.File.FInfo", /*tp_name*/
+ sizeof(FInfoObject), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ /* methods */
+ (destructor) FInfo_dealloc, /*tp_dealloc*/
+ 0, /*tp_print*/
+ (getattrfunc)0, /*tp_getattr*/
+ (setattrfunc)0, /*tp_setattr*/
+ (cmpfunc) FInfo_compare, /*tp_compare*/
+ (reprfunc) FInfo_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) FInfo_hash, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ PyObject_GenericGetAttr, /*tp_getattro*/
+ PyObject_GenericSetAttr, /*tp_setattro */
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
+ 0, /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ FInfo_methods, /* tp_methods */
+ 0, /*tp_members*/
+ FInfo_getsetlist, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ FInfo_tp_init, /* tp_init */
+ FInfo_tp_alloc, /* tp_alloc */
+ FInfo_tp_new, /* tp_new */
+ FInfo_tp_free, /* tp_free */
};
#endif /* !__LP64__ */
@@ -734,244 +734,244 @@ static PyTypeObject Alias_Type;
#define Alias_Check(x) ((x)->ob_type == &Alias_Type || PyObject_TypeCheck((x), &Alias_Type))
typedef struct AliasObject {
- PyObject_HEAD
- AliasHandle ob_itself;
- void (*ob_freeit)(AliasHandle ptr);
+ PyObject_HEAD
+ AliasHandle ob_itself;
+ void (*ob_freeit)(AliasHandle ptr);
} AliasObject;
static PyObject *Alias_New(AliasHandle itself)
{
- AliasObject *it;
- if (itself == NULL) return PyMac_Error(resNotFound);
- it = PyObject_NEW(AliasObject, &Alias_Type);
- if (it == NULL) return NULL;
- it->ob_itself = itself;
- it->ob_freeit = NULL;
- return (PyObject *)it;
+ AliasObject *it;
+ if (itself == NULL) return PyMac_Error(resNotFound);
+ it = PyObject_NEW(AliasObject, &Alias_Type);
+ if (it == NULL) return NULL;
+ it->ob_itself = itself;
+ it->ob_freeit = NULL;
+ return (PyObject *)it;
}
static int Alias_Convert(PyObject *v, AliasHandle *p_itself)
{
- if (!Alias_Check(v))
- {
- PyErr_SetString(PyExc_TypeError, "Alias required");
- return 0;
- }
- *p_itself = ((AliasObject *)v)->ob_itself;
- return 1;
+ if (!Alias_Check(v))
+ {
+ PyErr_SetString(PyExc_TypeError, "Alias required");
+ return 0;
+ }
+ *p_itself = ((AliasObject *)v)->ob_itself;
+ return 1;
}
static void Alias_dealloc(AliasObject *self)
{
- if (self->ob_freeit && self->ob_itself)
- {
- self->ob_freeit(self->ob_itself);
- }
- self->ob_itself = NULL;
- self->ob_type->tp_free((PyObject *)self);
+ if (self->ob_freeit && self->ob_itself)
+ {
+ self->ob_freeit(self->ob_itself);
+ }
+ self->ob_itself = NULL;
+ self->ob_type->tp_free((PyObject *)self);
}
#ifndef __LP64__
static PyObject *Alias_ResolveAlias(AliasObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- FSSpec fromFile__buf__;
- FSSpec *fromFile = &fromFile__buf__;
- FSSpec target;
- Boolean wasChanged;
- if (!PyArg_ParseTuple(_args, "O&",
- myPyMac_GetOptFSSpecPtr, &fromFile))
- return NULL;
- _err = ResolveAlias(fromFile,
- _self->ob_itself,
- &target,
- &wasChanged);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&b",
- FSSpec_New, &target,
- wasChanged);
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ FSSpec fromFile__buf__;
+ FSSpec *fromFile = &fromFile__buf__;
+ FSSpec target;
+ Boolean wasChanged;
+ if (!PyArg_ParseTuple(_args, "O&",
+ myPyMac_GetOptFSSpecPtr, &fromFile))
+ return NULL;
+ _err = ResolveAlias(fromFile,
+ _self->ob_itself,
+ &target,
+ &wasChanged);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&b",
+ FSSpec_New, &target,
+ wasChanged);
+ return _res;
}
static PyObject *Alias_GetAliasInfo(AliasObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- AliasInfoType index;
- Str63 theString;
- if (!PyArg_ParseTuple(_args, "h",
- &index))
- return NULL;
- _err = GetAliasInfo(_self->ob_itself,
- index,
- theString);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- PyMac_BuildStr255, theString);
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ AliasInfoType index;
+ Str63 theString;
+ if (!PyArg_ParseTuple(_args, "h",
+ &index))
+ return NULL;
+ _err = GetAliasInfo(_self->ob_itself,
+ index,
+ theString);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildStr255, theString);
+ return _res;
}
static PyObject *Alias_ResolveAliasWithMountFlags(AliasObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- FSSpec fromFile__buf__;
- FSSpec *fromFile = &fromFile__buf__;
- FSSpec target;
- Boolean wasChanged;
- unsigned long mountFlags;
- if (!PyArg_ParseTuple(_args, "O&l",
- myPyMac_GetOptFSSpecPtr, &fromFile,
- &mountFlags))
- return NULL;
- _err = ResolveAliasWithMountFlags(fromFile,
- _self->ob_itself,
- &target,
- &wasChanged,
- mountFlags);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&b",
- FSSpec_New, &target,
- wasChanged);
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ FSSpec fromFile__buf__;
+ FSSpec *fromFile = &fromFile__buf__;
+ FSSpec target;
+ Boolean wasChanged;
+ unsigned long mountFlags;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ myPyMac_GetOptFSSpecPtr, &fromFile,
+ &mountFlags))
+ return NULL;
+ _err = ResolveAliasWithMountFlags(fromFile,
+ _self->ob_itself,
+ &target,
+ &wasChanged,
+ mountFlags);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&b",
+ FSSpec_New, &target,
+ wasChanged);
+ return _res;
}
static PyObject *Alias_FollowFinderAlias(AliasObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- FSSpec fromFile__buf__;
- FSSpec *fromFile = &fromFile__buf__;
- Boolean logon;
- FSSpec target;
- Boolean wasChanged;
- if (!PyArg_ParseTuple(_args, "O&b",
- myPyMac_GetOptFSSpecPtr, &fromFile,
- &logon))
- return NULL;
- _err = FollowFinderAlias(fromFile,
- _self->ob_itself,
- logon,
- &target,
- &wasChanged);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&b",
- FSSpec_New, &target,
- wasChanged);
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ FSSpec fromFile__buf__;
+ FSSpec *fromFile = &fromFile__buf__;
+ Boolean logon;
+ FSSpec target;
+ Boolean wasChanged;
+ if (!PyArg_ParseTuple(_args, "O&b",
+ myPyMac_GetOptFSSpecPtr, &fromFile,
+ &logon))
+ return NULL;
+ _err = FollowFinderAlias(fromFile,
+ _self->ob_itself,
+ logon,
+ &target,
+ &wasChanged);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&b",
+ FSSpec_New, &target,
+ wasChanged);
+ return _res;
}
#endif /* !__LP64__ */
static PyObject *Alias_FSResolveAliasWithMountFlags(AliasObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- FSRef fromFile__buf__;
- FSRef *fromFile = &fromFile__buf__;
- FSRef target;
- Boolean wasChanged;
- unsigned long mountFlags;
- if (!PyArg_ParseTuple(_args, "O&l",
- myPyMac_GetOptFSRefPtr, &fromFile,
- &mountFlags))
- return NULL;
- _err = FSResolveAliasWithMountFlags(fromFile,
- _self->ob_itself,
- &target,
- &wasChanged,
- mountFlags);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&b",
- FSRef_New, &target,
- wasChanged);
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ FSRef fromFile__buf__;
+ FSRef *fromFile = &fromFile__buf__;
+ FSRef target;
+ Boolean wasChanged;
+ unsigned long mountFlags;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ myPyMac_GetOptFSRefPtr, &fromFile,
+ &mountFlags))
+ return NULL;
+ _err = FSResolveAliasWithMountFlags(fromFile,
+ _self->ob_itself,
+ &target,
+ &wasChanged,
+ mountFlags);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&b",
+ FSRef_New, &target,
+ wasChanged);
+ return _res;
}
static PyObject *Alias_FSResolveAlias(AliasObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- FSRef fromFile__buf__;
- FSRef *fromFile = &fromFile__buf__;
- FSRef target;
- Boolean wasChanged;
- if (!PyArg_ParseTuple(_args, "O&",
- myPyMac_GetOptFSRefPtr, &fromFile))
- return NULL;
- _err = FSResolveAlias(fromFile,
- _self->ob_itself,
- &target,
- &wasChanged);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&b",
- FSRef_New, &target,
- wasChanged);
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ FSRef fromFile__buf__;
+ FSRef *fromFile = &fromFile__buf__;
+ FSRef target;
+ Boolean wasChanged;
+ if (!PyArg_ParseTuple(_args, "O&",
+ myPyMac_GetOptFSRefPtr, &fromFile))
+ return NULL;
+ _err = FSResolveAlias(fromFile,
+ _self->ob_itself,
+ &target,
+ &wasChanged);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&b",
+ FSRef_New, &target,
+ wasChanged);
+ return _res;
}
static PyObject *Alias_FSFollowFinderAlias(AliasObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- FSRef fromFile;
- Boolean logon;
- FSRef target;
- Boolean wasChanged;
- if (!PyArg_ParseTuple(_args, "b",
- &logon))
- return NULL;
- _err = FSFollowFinderAlias(&fromFile,
- _self->ob_itself,
- logon,
- &target,
- &wasChanged);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&O&b",
- FSRef_New, &fromFile,
- FSRef_New, &target,
- wasChanged);
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ FSRef fromFile;
+ Boolean logon;
+ FSRef target;
+ Boolean wasChanged;
+ if (!PyArg_ParseTuple(_args, "b",
+ &logon))
+ return NULL;
+ _err = FSFollowFinderAlias(&fromFile,
+ _self->ob_itself,
+ logon,
+ &target,
+ &wasChanged);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&O&b",
+ FSRef_New, &fromFile,
+ FSRef_New, &target,
+ wasChanged);
+ return _res;
}
static PyMethodDef Alias_methods[] = {
#ifndef __LP64__
- {"ResolveAlias", (PyCFunction)Alias_ResolveAlias, 1,
- PyDoc_STR("(FSSpec fromFile) -> (FSSpec target, Boolean wasChanged)")},
- {"GetAliasInfo", (PyCFunction)Alias_GetAliasInfo, 1,
- PyDoc_STR("(AliasInfoType index) -> (Str63 theString)")},
- {"ResolveAliasWithMountFlags", (PyCFunction)Alias_ResolveAliasWithMountFlags, 1,
- PyDoc_STR("(FSSpec fromFile, unsigned long mountFlags) -> (FSSpec target, Boolean wasChanged)")},
- {"FollowFinderAlias", (PyCFunction)Alias_FollowFinderAlias, 1,
- PyDoc_STR("(FSSpec fromFile, Boolean logon) -> (FSSpec target, Boolean wasChanged)")},
+ {"ResolveAlias", (PyCFunction)Alias_ResolveAlias, 1,
+ PyDoc_STR("(FSSpec fromFile) -> (FSSpec target, Boolean wasChanged)")},
+ {"GetAliasInfo", (PyCFunction)Alias_GetAliasInfo, 1,
+ PyDoc_STR("(AliasInfoType index) -> (Str63 theString)")},
+ {"ResolveAliasWithMountFlags", (PyCFunction)Alias_ResolveAliasWithMountFlags, 1,
+ PyDoc_STR("(FSSpec fromFile, unsigned long mountFlags) -> (FSSpec target, Boolean wasChanged)")},
+ {"FollowFinderAlias", (PyCFunction)Alias_FollowFinderAlias, 1,
+ PyDoc_STR("(FSSpec fromFile, Boolean logon) -> (FSSpec target, Boolean wasChanged)")},
#endif /* !__LP64__ */
- {"FSResolveAliasWithMountFlags", (PyCFunction)Alias_FSResolveAliasWithMountFlags, 1,
- PyDoc_STR("(FSRef fromFile, unsigned long mountFlags) -> (FSRef target, Boolean wasChanged)")},
- {"FSResolveAlias", (PyCFunction)Alias_FSResolveAlias, 1,
- PyDoc_STR("(FSRef fromFile) -> (FSRef target, Boolean wasChanged)")},
- {"FSFollowFinderAlias", (PyCFunction)Alias_FSFollowFinderAlias, 1,
- PyDoc_STR("(Boolean logon) -> (FSRef fromFile, FSRef target, Boolean wasChanged)")},
- {NULL, NULL, 0}
+ {"FSResolveAliasWithMountFlags", (PyCFunction)Alias_FSResolveAliasWithMountFlags, 1,
+ PyDoc_STR("(FSRef fromFile, unsigned long mountFlags) -> (FSRef target, Boolean wasChanged)")},
+ {"FSResolveAlias", (PyCFunction)Alias_FSResolveAlias, 1,
+ PyDoc_STR("(FSRef fromFile) -> (FSRef target, Boolean wasChanged)")},
+ {"FSFollowFinderAlias", (PyCFunction)Alias_FSFollowFinderAlias, 1,
+ PyDoc_STR("(Boolean logon) -> (FSRef fromFile, FSRef target, Boolean wasChanged)")},
+ {NULL, NULL, 0}
};
static PyObject *Alias_get_data(AliasObject *self, void *closure)
{
- int size;
- PyObject *rv;
+ int size;
+ PyObject *rv;
+
+ size = GetHandleSize((Handle)self->ob_itself);
+ HLock((Handle)self->ob_itself);
+ rv = PyString_FromStringAndSize(*(Handle)self->ob_itself, size);
+ HUnlock((Handle)self->ob_itself);
+ return rv;
- size = GetHandleSize((Handle)self->ob_itself);
- HLock((Handle)self->ob_itself);
- rv = PyString_FromStringAndSize(*(Handle)self->ob_itself, size);
- HUnlock((Handle)self->ob_itself);
- return rv;
-
}
#define Alias_set_data NULL
static PyGetSetDef Alias_getsetlist[] = {
- {"data", (getter)Alias_get_data, (setter)Alias_set_data, "Raw data of the alias object"},
- {NULL, NULL, NULL, NULL},
+ {"data", (getter)Alias_get_data, (setter)Alias_set_data, "Raw data of the alias object"},
+ {NULL, NULL, NULL, NULL},
};
@@ -982,97 +982,97 @@ static PyGetSetDef Alias_getsetlist[] = {
#define Alias_hash NULL
static int Alias_tp_init(PyObject *_self, PyObject *_args, PyObject *_kwds)
{
- AliasHandle itself = NULL;
- char *rawdata = NULL;
- int rawdatalen = 0;
- Handle h;
- static char *kw[] = {"itself", "rawdata", 0};
-
- if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "|O&s#", kw, Alias_Convert, &itself, &rawdata, &rawdatalen))
- return -1;
- if (itself && rawdata)
- {
- PyErr_SetString(PyExc_TypeError, "Only one of itself or rawdata may be specified");
- return -1;
- }
- if (!itself && !rawdata)
- {
- PyErr_SetString(PyExc_TypeError, "One of itself or rawdata must be specified");
- return -1;
- }
- if (rawdata)
- {
- if ((h = NewHandle(rawdatalen)) == NULL)
- {
- PyErr_NoMemory();
- return -1;
- }
- HLock(h);
- memcpy((char *)*h, rawdata, rawdatalen);
- HUnlock(h);
- ((AliasObject *)_self)->ob_itself = (AliasHandle)h;
- return 0;
- }
- ((AliasObject *)_self)->ob_itself = itself;
- return 0;
+ AliasHandle itself = NULL;
+ char *rawdata = NULL;
+ int rawdatalen = 0;
+ Handle h;
+ static char *kw[] = {"itself", "rawdata", 0};
+
+ if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "|O&s#", kw, Alias_Convert, &itself, &rawdata, &rawdatalen))
+ return -1;
+ if (itself && rawdata)
+ {
+ PyErr_SetString(PyExc_TypeError, "Only one of itself or rawdata may be specified");
+ return -1;
+ }
+ if (!itself && !rawdata)
+ {
+ PyErr_SetString(PyExc_TypeError, "One of itself or rawdata must be specified");
+ return -1;
+ }
+ if (rawdata)
+ {
+ if ((h = NewHandle(rawdatalen)) == NULL)
+ {
+ PyErr_NoMemory();
+ return -1;
+ }
+ HLock(h);
+ memcpy((char *)*h, rawdata, rawdatalen);
+ HUnlock(h);
+ ((AliasObject *)_self)->ob_itself = (AliasHandle)h;
+ return 0;
+ }
+ ((AliasObject *)_self)->ob_itself = itself;
+ return 0;
}
#define Alias_tp_alloc PyType_GenericAlloc
static PyObject *Alias_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
- PyObject *self;
+ PyObject *self;
- if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
- ((AliasObject *)self)->ob_itself = NULL;
- return self;
+ if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
+ ((AliasObject *)self)->ob_itself = NULL;
+ return self;
}
#define Alias_tp_free PyObject_Del
static PyTypeObject Alias_Type = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
- "Carbon.File.Alias", /*tp_name*/
- sizeof(AliasObject), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- /* methods */
- (destructor) Alias_dealloc, /*tp_dealloc*/
- 0, /*tp_print*/
- (getattrfunc)0, /*tp_getattr*/
- (setattrfunc)0, /*tp_setattr*/
- (cmpfunc) Alias_compare, /*tp_compare*/
- (reprfunc) Alias_repr, /*tp_repr*/
- (PyNumberMethods *)0, /* tp_as_number */
- (PySequenceMethods *)0, /* tp_as_sequence */
- (PyMappingMethods *)0, /* tp_as_mapping */
- (hashfunc) Alias_hash, /*tp_hash*/
- 0, /*tp_call*/
- 0, /*tp_str*/
- PyObject_GenericGetAttr, /*tp_getattro*/
- PyObject_GenericSetAttr, /*tp_setattro */
- 0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
- 0, /*tp_doc*/
- 0, /*tp_traverse*/
- 0, /*tp_clear*/
- 0, /*tp_richcompare*/
- 0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
- 0, /*tp_iternext*/
- Alias_methods, /* tp_methods */
- 0, /*tp_members*/
- Alias_getsetlist, /*tp_getset*/
- 0, /*tp_base*/
- 0, /*tp_dict*/
- 0, /*tp_descr_get*/
- 0, /*tp_descr_set*/
- 0, /*tp_dictoffset*/
- Alias_tp_init, /* tp_init */
- Alias_tp_alloc, /* tp_alloc */
- Alias_tp_new, /* tp_new */
- Alias_tp_free, /* tp_free */
+ PyObject_HEAD_INIT(NULL)
+ 0, /*ob_size*/
+ "Carbon.File.Alias", /*tp_name*/
+ sizeof(AliasObject), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ /* methods */
+ (destructor) Alias_dealloc, /*tp_dealloc*/
+ 0, /*tp_print*/
+ (getattrfunc)0, /*tp_getattr*/
+ (setattrfunc)0, /*tp_setattr*/
+ (cmpfunc) Alias_compare, /*tp_compare*/
+ (reprfunc) Alias_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) Alias_hash, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ PyObject_GenericGetAttr, /*tp_getattro*/
+ PyObject_GenericSetAttr, /*tp_setattro */
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
+ 0, /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ Alias_methods, /* tp_methods */
+ 0, /*tp_members*/
+ Alias_getsetlist, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ Alias_tp_init, /* tp_init */
+ Alias_tp_alloc, /* tp_alloc */
+ Alias_tp_new, /* tp_new */
+ Alias_tp_free, /* tp_free */
};
/* --------------------- End object type Alias ---------------------- */
@@ -1086,347 +1086,347 @@ static PyTypeObject FSSpec_Type;
#define FSSpec_Check(x) ((x)->ob_type == &FSSpec_Type || PyObject_TypeCheck((x), &FSSpec_Type))
typedef struct FSSpecObject {
- PyObject_HEAD
- FSSpec ob_itself;
+ PyObject_HEAD
+ FSSpec ob_itself;
} FSSpecObject;
static PyObject *FSSpec_New(FSSpec *itself)
{
- FSSpecObject *it;
- if (itself == NULL) return PyMac_Error(resNotFound);
- it = PyObject_NEW(FSSpecObject, &FSSpec_Type);
- if (it == NULL) return NULL;
- it->ob_itself = *itself;
- return (PyObject *)it;
+ FSSpecObject *it;
+ if (itself == NULL) return PyMac_Error(resNotFound);
+ it = PyObject_NEW(FSSpecObject, &FSSpec_Type);
+ if (it == NULL) return NULL;
+ it->ob_itself = *itself;
+ return (PyObject *)it;
}
static void FSSpec_dealloc(FSSpecObject *self)
{
- /* Cleanup of self->ob_itself goes here */
- self->ob_type->tp_free((PyObject *)self);
+ /* Cleanup of self->ob_itself goes here */
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *FSSpec_FSpOpenDF(FSSpecObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- SInt8 permission;
- short refNum;
- if (!PyArg_ParseTuple(_args, "b",
- &permission))
- return NULL;
- _err = FSpOpenDF(&_self->ob_itself,
- permission,
- &refNum);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("h",
- refNum);
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ SInt8 permission;
+ short refNum;
+ if (!PyArg_ParseTuple(_args, "b",
+ &permission))
+ return NULL;
+ _err = FSpOpenDF(&_self->ob_itself,
+ permission,
+ &refNum);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("h",
+ refNum);
+ return _res;
}
static PyObject *FSSpec_FSpOpenRF(FSSpecObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- SInt8 permission;
- short refNum;
- if (!PyArg_ParseTuple(_args, "b",
- &permission))
- return NULL;
- _err = FSpOpenRF(&_self->ob_itself,
- permission,
- &refNum);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("h",
- refNum);
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ SInt8 permission;
+ short refNum;
+ if (!PyArg_ParseTuple(_args, "b",
+ &permission))
+ return NULL;
+ _err = FSpOpenRF(&_self->ob_itself,
+ permission,
+ &refNum);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("h",
+ refNum);
+ return _res;
}
static PyObject *FSSpec_FSpCreate(FSSpecObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- OSType creator;
- OSType fileType;
- ScriptCode scriptTag;
- if (!PyArg_ParseTuple(_args, "O&O&h",
- PyMac_GetOSType, &creator,
- PyMac_GetOSType, &fileType,
- &scriptTag))
- return NULL;
- _err = FSpCreate(&_self->ob_itself,
- creator,
- fileType,
- scriptTag);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ OSType creator;
+ OSType fileType;
+ ScriptCode scriptTag;
+ if (!PyArg_ParseTuple(_args, "O&O&h",
+ PyMac_GetOSType, &creator,
+ PyMac_GetOSType, &fileType,
+ &scriptTag))
+ return NULL;
+ _err = FSpCreate(&_self->ob_itself,
+ creator,
+ fileType,
+ scriptTag);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *FSSpec_FSpDirCreate(FSSpecObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- ScriptCode scriptTag;
- long createdDirID;
- if (!PyArg_ParseTuple(_args, "h",
- &scriptTag))
- return NULL;
- _err = FSpDirCreate(&_self->ob_itself,
- scriptTag,
- &createdDirID);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- createdDirID);
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ ScriptCode scriptTag;
+ long createdDirID;
+ if (!PyArg_ParseTuple(_args, "h",
+ &scriptTag))
+ return NULL;
+ _err = FSpDirCreate(&_self->ob_itself,
+ scriptTag,
+ &createdDirID);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ createdDirID);
+ return _res;
}
static PyObject *FSSpec_FSpDelete(FSSpecObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = FSpDelete(&_self->ob_itself);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = FSpDelete(&_self->ob_itself);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *FSSpec_FSpGetFInfo(FSSpecObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- FInfo fndrInfo;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = FSpGetFInfo(&_self->ob_itself,
- &fndrInfo);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- FInfo_New, &fndrInfo);
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ FInfo fndrInfo;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = FSpGetFInfo(&_self->ob_itself,
+ &fndrInfo);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ FInfo_New, &fndrInfo);
+ return _res;
}
static PyObject *FSSpec_FSpSetFInfo(FSSpecObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- FInfo fndrInfo;
- if (!PyArg_ParseTuple(_args, "O&",
- FInfo_Convert, &fndrInfo))
- return NULL;
- _err = FSpSetFInfo(&_self->ob_itself,
- &fndrInfo);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ FInfo fndrInfo;
+ if (!PyArg_ParseTuple(_args, "O&",
+ FInfo_Convert, &fndrInfo))
+ return NULL;
+ _err = FSpSetFInfo(&_self->ob_itself,
+ &fndrInfo);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *FSSpec_FSpSetFLock(FSSpecObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = FSpSetFLock(&_self->ob_itself);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = FSpSetFLock(&_self->ob_itself);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *FSSpec_FSpRstFLock(FSSpecObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = FSpRstFLock(&_self->ob_itself);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = FSpRstFLock(&_self->ob_itself);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *FSSpec_FSpRename(FSSpecObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Str255 newName;
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetStr255, newName))
- return NULL;
- _err = FSpRename(&_self->ob_itself,
- newName);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Str255 newName;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetStr255, newName))
+ return NULL;
+ _err = FSpRename(&_self->ob_itself,
+ newName);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *FSSpec_FSpCatMove(FSSpecObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- FSSpec dest;
- if (!PyArg_ParseTuple(_args, "O&",
- FSSpec_Convert, &dest))
- return NULL;
- _err = FSpCatMove(&_self->ob_itself,
- &dest);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ FSSpec dest;
+ if (!PyArg_ParseTuple(_args, "O&",
+ FSSpec_Convert, &dest))
+ return NULL;
+ _err = FSpCatMove(&_self->ob_itself,
+ &dest);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *FSSpec_FSpExchangeFiles(FSSpecObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- FSSpec dest;
- if (!PyArg_ParseTuple(_args, "O&",
- FSSpec_Convert, &dest))
- return NULL;
- _err = FSpExchangeFiles(&_self->ob_itself,
- &dest);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ FSSpec dest;
+ if (!PyArg_ParseTuple(_args, "O&",
+ FSSpec_Convert, &dest))
+ return NULL;
+ _err = FSpExchangeFiles(&_self->ob_itself,
+ &dest);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *FSSpec_FSpMakeFSRef(FSSpecObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- FSRef newRef;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = FSpMakeFSRef(&_self->ob_itself,
- &newRef);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- FSRef_New, &newRef);
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ FSRef newRef;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = FSpMakeFSRef(&_self->ob_itself,
+ &newRef);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ FSRef_New, &newRef);
+ return _res;
}
static PyObject *FSSpec_NewAliasMinimal(FSSpecObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- AliasHandle alias;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = NewAliasMinimal(&_self->ob_itself,
- &alias);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- Alias_New, alias);
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ AliasHandle alias;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = NewAliasMinimal(&_self->ob_itself,
+ &alias);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ Alias_New, alias);
+ return _res;
}
static PyObject *FSSpec_IsAliasFile(FSSpecObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Boolean aliasFileFlag;
- Boolean folderFlag;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = IsAliasFile(&_self->ob_itself,
- &aliasFileFlag,
- &folderFlag);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("bb",
- aliasFileFlag,
- folderFlag);
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Boolean aliasFileFlag;
+ Boolean folderFlag;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = IsAliasFile(&_self->ob_itself,
+ &aliasFileFlag,
+ &folderFlag);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("bb",
+ aliasFileFlag,
+ folderFlag);
+ return _res;
}
static PyObject *FSSpec_as_pathname(FSSpecObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
- char strbuf[1024];
- OSErr err;
+ char strbuf[1024];
+ OSErr err;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- err = _PyMac_GetFullPathname(&_self->ob_itself, strbuf, sizeof(strbuf));
- if ( err ) {
- PyMac_Error(err);
- return NULL;
- }
- _res = PyString_FromString(strbuf);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ err = _PyMac_GetFullPathname(&_self->ob_itself, strbuf, sizeof(strbuf));
+ if ( err ) {
+ PyMac_Error(err);
+ return NULL;
+ }
+ _res = PyString_FromString(strbuf);
+ return _res;
}
static PyObject *FSSpec_as_tuple(FSSpecObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _res = Py_BuildValue("(iis#)", _self->ob_itself.vRefNum, _self->ob_itself.parID,
- &_self->ob_itself.name[1], _self->ob_itself.name[0]);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _res = Py_BuildValue("(iis#)", _self->ob_itself.vRefNum, _self->ob_itself.parID,
+ &_self->ob_itself.name[1], _self->ob_itself.name[0]);
+ return _res;
}
static PyMethodDef FSSpec_methods[] = {
- {"FSpOpenDF", (PyCFunction)FSSpec_FSpOpenDF, 1,
- PyDoc_STR("(SInt8 permission) -> (short refNum)")},
- {"FSpOpenRF", (PyCFunction)FSSpec_FSpOpenRF, 1,
- PyDoc_STR("(SInt8 permission) -> (short refNum)")},
- {"FSpCreate", (PyCFunction)FSSpec_FSpCreate, 1,
- PyDoc_STR("(OSType creator, OSType fileType, ScriptCode scriptTag) -> None")},
- {"FSpDirCreate", (PyCFunction)FSSpec_FSpDirCreate, 1,
- PyDoc_STR("(ScriptCode scriptTag) -> (long createdDirID)")},
- {"FSpDelete", (PyCFunction)FSSpec_FSpDelete, 1,
- PyDoc_STR("() -> None")},
- {"FSpGetFInfo", (PyCFunction)FSSpec_FSpGetFInfo, 1,
- PyDoc_STR("() -> (FInfo fndrInfo)")},
- {"FSpSetFInfo", (PyCFunction)FSSpec_FSpSetFInfo, 1,
- PyDoc_STR("(FInfo fndrInfo) -> None")},
- {"FSpSetFLock", (PyCFunction)FSSpec_FSpSetFLock, 1,
- PyDoc_STR("() -> None")},
- {"FSpRstFLock", (PyCFunction)FSSpec_FSpRstFLock, 1,
- PyDoc_STR("() -> None")},
- {"FSpRename", (PyCFunction)FSSpec_FSpRename, 1,
- PyDoc_STR("(Str255 newName) -> None")},
- {"FSpCatMove", (PyCFunction)FSSpec_FSpCatMove, 1,
- PyDoc_STR("(FSSpec dest) -> None")},
- {"FSpExchangeFiles", (PyCFunction)FSSpec_FSpExchangeFiles, 1,
- PyDoc_STR("(FSSpec dest) -> None")},
- {"FSpMakeFSRef", (PyCFunction)FSSpec_FSpMakeFSRef, 1,
- PyDoc_STR("() -> (FSRef newRef)")},
- {"NewAliasMinimal", (PyCFunction)FSSpec_NewAliasMinimal, 1,
- PyDoc_STR("() -> (AliasHandle alias)")},
- {"IsAliasFile", (PyCFunction)FSSpec_IsAliasFile, 1,
- PyDoc_STR("() -> (Boolean aliasFileFlag, Boolean folderFlag)")},
- {"as_pathname", (PyCFunction)FSSpec_as_pathname, 1,
- PyDoc_STR("() -> string")},
- {"as_tuple", (PyCFunction)FSSpec_as_tuple, 1,
- PyDoc_STR("() -> (vRefNum, dirID, name)")},
- {NULL, NULL, 0}
+ {"FSpOpenDF", (PyCFunction)FSSpec_FSpOpenDF, 1,
+ PyDoc_STR("(SInt8 permission) -> (short refNum)")},
+ {"FSpOpenRF", (PyCFunction)FSSpec_FSpOpenRF, 1,
+ PyDoc_STR("(SInt8 permission) -> (short refNum)")},
+ {"FSpCreate", (PyCFunction)FSSpec_FSpCreate, 1,
+ PyDoc_STR("(OSType creator, OSType fileType, ScriptCode scriptTag) -> None")},
+ {"FSpDirCreate", (PyCFunction)FSSpec_FSpDirCreate, 1,
+ PyDoc_STR("(ScriptCode scriptTag) -> (long createdDirID)")},
+ {"FSpDelete", (PyCFunction)FSSpec_FSpDelete, 1,
+ PyDoc_STR("() -> None")},
+ {"FSpGetFInfo", (PyCFunction)FSSpec_FSpGetFInfo, 1,
+ PyDoc_STR("() -> (FInfo fndrInfo)")},
+ {"FSpSetFInfo", (PyCFunction)FSSpec_FSpSetFInfo, 1,
+ PyDoc_STR("(FInfo fndrInfo) -> None")},
+ {"FSpSetFLock", (PyCFunction)FSSpec_FSpSetFLock, 1,
+ PyDoc_STR("() -> None")},
+ {"FSpRstFLock", (PyCFunction)FSSpec_FSpRstFLock, 1,
+ PyDoc_STR("() -> None")},
+ {"FSpRename", (PyCFunction)FSSpec_FSpRename, 1,
+ PyDoc_STR("(Str255 newName) -> None")},
+ {"FSpCatMove", (PyCFunction)FSSpec_FSpCatMove, 1,
+ PyDoc_STR("(FSSpec dest) -> None")},
+ {"FSpExchangeFiles", (PyCFunction)FSSpec_FSpExchangeFiles, 1,
+ PyDoc_STR("(FSSpec dest) -> None")},
+ {"FSpMakeFSRef", (PyCFunction)FSSpec_FSpMakeFSRef, 1,
+ PyDoc_STR("() -> (FSRef newRef)")},
+ {"NewAliasMinimal", (PyCFunction)FSSpec_NewAliasMinimal, 1,
+ PyDoc_STR("() -> (AliasHandle alias)")},
+ {"IsAliasFile", (PyCFunction)FSSpec_IsAliasFile, 1,
+ PyDoc_STR("() -> (Boolean aliasFileFlag, Boolean folderFlag)")},
+ {"as_pathname", (PyCFunction)FSSpec_as_pathname, 1,
+ PyDoc_STR("() -> string")},
+ {"as_tuple", (PyCFunction)FSSpec_as_tuple, 1,
+ PyDoc_STR("() -> (vRefNum, dirID, name)")},
+ {NULL, NULL, 0}
};
static PyObject *FSSpec_get_data(FSSpecObject *self, void *closure)
{
- return PyString_FromStringAndSize((char *)&self->ob_itself, sizeof(self->ob_itself));
+ return PyString_FromStringAndSize((char *)&self->ob_itself, sizeof(self->ob_itself));
}
#define FSSpec_set_data NULL
static PyGetSetDef FSSpec_getsetlist[] = {
- {"data", (getter)FSSpec_get_data, (setter)FSSpec_set_data, "Raw data of the FSSpec object"},
- {NULL, NULL, NULL, NULL},
+ {"data", (getter)FSSpec_get_data, (setter)FSSpec_set_data, "Raw data of the FSSpec object"},
+ {NULL, NULL, NULL, NULL},
};
@@ -1434,105 +1434,105 @@ static PyGetSetDef FSSpec_getsetlist[] = {
static PyObject * FSSpec_repr(FSSpecObject *self)
{
- char buf[512];
- PyOS_snprintf(buf, sizeof(buf), "%s((%d, %ld, '%.*s'))",
- self->ob_type->tp_name,
- self->ob_itself.vRefNum,
- self->ob_itself.parID,
- self->ob_itself.name[0], self->ob_itself.name+1);
- return PyString_FromString(buf);
+ char buf[512];
+ PyOS_snprintf(buf, sizeof(buf), "%s((%d, %ld, '%.*s'))",
+ self->ob_type->tp_name,
+ self->ob_itself.vRefNum,
+ self->ob_itself.parID,
+ self->ob_itself.name[0], self->ob_itself.name+1);
+ return PyString_FromString(buf);
}
#define FSSpec_hash NULL
static int FSSpec_tp_init(PyObject *_self, PyObject *_args, PyObject *_kwds)
{
- PyObject *v = NULL;
- char *rawdata = NULL;
- int rawdatalen = 0;
- static char *kw[] = {"itself", "rawdata", 0};
-
- if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "|Os#", kw, &v, &rawdata, &rawdatalen))
- return -1;
- if (v && rawdata)
- {
- PyErr_SetString(PyExc_TypeError, "Only one of itself or rawdata may be specified");
- return -1;
- }
- if (!v && !rawdata)
- {
- PyErr_SetString(PyExc_TypeError, "One of itself or rawdata must be specified");
- return -1;
- }
- if (rawdata)
- {
- if (rawdatalen != sizeof(FSSpec))
- {
- PyErr_SetString(PyExc_TypeError, "FSSpec rawdata incorrect size");
- return -1;
- }
- memcpy(&((FSSpecObject *)_self)->ob_itself, rawdata, rawdatalen);
- return 0;
- }
- if (PyMac_GetFSSpec(v, &((FSSpecObject *)_self)->ob_itself)) return 0;
- return -1;
+ PyObject *v = NULL;
+ char *rawdata = NULL;
+ int rawdatalen = 0;
+ static char *kw[] = {"itself", "rawdata", 0};
+
+ if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "|Os#", kw, &v, &rawdata, &rawdatalen))
+ return -1;
+ if (v && rawdata)
+ {
+ PyErr_SetString(PyExc_TypeError, "Only one of itself or rawdata may be specified");
+ return -1;
+ }
+ if (!v && !rawdata)
+ {
+ PyErr_SetString(PyExc_TypeError, "One of itself or rawdata must be specified");
+ return -1;
+ }
+ if (rawdata)
+ {
+ if (rawdatalen != sizeof(FSSpec))
+ {
+ PyErr_SetString(PyExc_TypeError, "FSSpec rawdata incorrect size");
+ return -1;
+ }
+ memcpy(&((FSSpecObject *)_self)->ob_itself, rawdata, rawdatalen);
+ return 0;
+ }
+ if (PyMac_GetFSSpec(v, &((FSSpecObject *)_self)->ob_itself)) return 0;
+ return -1;
}
#define FSSpec_tp_alloc PyType_GenericAlloc
static PyObject *FSSpec_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
- PyObject *self;
+ PyObject *self;
- if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
- memset(&((FSSpecObject *)self)->ob_itself, 0, sizeof(FSSpec));
- return self;
+ if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
+ memset(&((FSSpecObject *)self)->ob_itself, 0, sizeof(FSSpec));
+ return self;
}
#define FSSpec_tp_free PyObject_Del
static PyTypeObject FSSpec_Type = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
- "Carbon.File.FSSpec", /*tp_name*/
- sizeof(FSSpecObject), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- /* methods */
- (destructor) FSSpec_dealloc, /*tp_dealloc*/
- 0, /*tp_print*/
- (getattrfunc)0, /*tp_getattr*/
- (setattrfunc)0, /*tp_setattr*/
- (cmpfunc) FSSpec_compare, /*tp_compare*/
- (reprfunc) FSSpec_repr, /*tp_repr*/
- (PyNumberMethods *)0, /* tp_as_number */
- (PySequenceMethods *)0, /* tp_as_sequence */
- (PyMappingMethods *)0, /* tp_as_mapping */
- (hashfunc) FSSpec_hash, /*tp_hash*/
- 0, /*tp_call*/
- 0, /*tp_str*/
- PyObject_GenericGetAttr, /*tp_getattro*/
- PyObject_GenericSetAttr, /*tp_setattro */
- 0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
- 0, /*tp_doc*/
- 0, /*tp_traverse*/
- 0, /*tp_clear*/
- 0, /*tp_richcompare*/
- 0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
- 0, /*tp_iternext*/
- FSSpec_methods, /* tp_methods */
- 0, /*tp_members*/
- FSSpec_getsetlist, /*tp_getset*/
- 0, /*tp_base*/
- 0, /*tp_dict*/
- 0, /*tp_descr_get*/
- 0, /*tp_descr_set*/
- 0, /*tp_dictoffset*/
- FSSpec_tp_init, /* tp_init */
- FSSpec_tp_alloc, /* tp_alloc */
- FSSpec_tp_new, /* tp_new */
- FSSpec_tp_free, /* tp_free */
+ PyObject_HEAD_INIT(NULL)
+ 0, /*ob_size*/
+ "Carbon.File.FSSpec", /*tp_name*/
+ sizeof(FSSpecObject), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ /* methods */
+ (destructor) FSSpec_dealloc, /*tp_dealloc*/
+ 0, /*tp_print*/
+ (getattrfunc)0, /*tp_getattr*/
+ (setattrfunc)0, /*tp_setattr*/
+ (cmpfunc) FSSpec_compare, /*tp_compare*/
+ (reprfunc) FSSpec_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) FSSpec_hash, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ PyObject_GenericGetAttr, /*tp_getattro*/
+ PyObject_GenericSetAttr, /*tp_setattro */
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
+ 0, /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ FSSpec_methods, /* tp_methods */
+ 0, /*tp_members*/
+ FSSpec_getsetlist, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ FSSpec_tp_init, /* tp_init */
+ FSSpec_tp_alloc, /* tp_alloc */
+ FSSpec_tp_new, /* tp_new */
+ FSSpec_tp_free, /* tp_free */
};
#endif /* !__LP64__ */
@@ -1546,483 +1546,483 @@ static PyTypeObject FSRef_Type;
#define FSRef_Check(x) ((x)->ob_type == &FSRef_Type || PyObject_TypeCheck((x), &FSRef_Type))
typedef struct FSRefObject {
- PyObject_HEAD
- FSRef ob_itself;
+ PyObject_HEAD
+ FSRef ob_itself;
} FSRefObject;
static PyObject *FSRef_New(FSRef *itself)
{
- FSRefObject *it;
- if (itself == NULL) return PyMac_Error(resNotFound);
- it = PyObject_NEW(FSRefObject, &FSRef_Type);
- if (it == NULL) return NULL;
- it->ob_itself = *itself;
- return (PyObject *)it;
+ FSRefObject *it;
+ if (itself == NULL) return PyMac_Error(resNotFound);
+ it = PyObject_NEW(FSRefObject, &FSRef_Type);
+ if (it == NULL) return NULL;
+ it->ob_itself = *itself;
+ return (PyObject *)it;
}
static void FSRef_dealloc(FSRefObject *self)
{
- /* Cleanup of self->ob_itself goes here */
- self->ob_type->tp_free((PyObject *)self);
+ /* Cleanup of self->ob_itself goes here */
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *FSRef_FSMakeFSRefUnicode(FSRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- UniChar *nameLength__in__;
- UniCharCount nameLength__len__;
- int nameLength__in_len__;
- TextEncoding textEncodingHint;
- FSRef newRef;
- if (!PyArg_ParseTuple(_args, "u#l",
- &nameLength__in__, &nameLength__in_len__,
- &textEncodingHint))
- return NULL;
- nameLength__len__ = nameLength__in_len__;
- _err = FSMakeFSRefUnicode(&_self->ob_itself,
- nameLength__len__, nameLength__in__,
- textEncodingHint,
- &newRef);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- FSRef_New, &newRef);
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ UniChar *nameLength__in__;
+ UniCharCount nameLength__len__;
+ int nameLength__in_len__;
+ TextEncoding textEncodingHint;
+ FSRef newRef;
+ if (!PyArg_ParseTuple(_args, "u#l",
+ &nameLength__in__, &nameLength__in_len__,
+ &textEncodingHint))
+ return NULL;
+ nameLength__len__ = nameLength__in_len__;
+ _err = FSMakeFSRefUnicode(&_self->ob_itself,
+ nameLength__len__, nameLength__in__,
+ textEncodingHint,
+ &newRef);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ FSRef_New, &newRef);
+ return _res;
}
static PyObject *FSRef_FSCompareFSRefs(FSRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- FSRef ref2;
- if (!PyArg_ParseTuple(_args, "O&",
- FSRef_Convert, &ref2))
- return NULL;
- _err = FSCompareFSRefs(&_self->ob_itself,
- &ref2);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ FSRef ref2;
+ if (!PyArg_ParseTuple(_args, "O&",
+ FSRef_Convert, &ref2))
+ return NULL;
+ _err = FSCompareFSRefs(&_self->ob_itself,
+ &ref2);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *FSRef_FSCreateFileUnicode(FSRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- UniChar *nameLength__in__;
- UniCharCount nameLength__len__;
- int nameLength__in_len__;
- FSCatalogInfoBitmap whichInfo;
- FSCatalogInfo catalogInfo;
- FSRef newRef;
+ PyObject *_res = NULL;
+ OSErr _err;
+ UniChar *nameLength__in__;
+ UniCharCount nameLength__len__;
+ int nameLength__in_len__;
+ FSCatalogInfoBitmap whichInfo;
+ FSCatalogInfo catalogInfo;
+ FSRef newRef;
#ifndef __LP64__
- FSSpec newSpec;
+ FSSpec newSpec;
#endif
- if (!PyArg_ParseTuple(_args, "u#lO&",
- &nameLength__in__, &nameLength__in_len__,
- &whichInfo,
- FSCatalogInfo_Convert, &catalogInfo))
- return NULL;
- nameLength__len__ = nameLength__in_len__;
- _err = FSCreateFileUnicode(&_self->ob_itself,
- nameLength__len__, nameLength__in__,
- whichInfo,
- &catalogInfo,
- &newRef,
+ if (!PyArg_ParseTuple(_args, "u#lO&",
+ &nameLength__in__, &nameLength__in_len__,
+ &whichInfo,
+ FSCatalogInfo_Convert, &catalogInfo))
+ return NULL;
+ nameLength__len__ = nameLength__in_len__;
+ _err = FSCreateFileUnicode(&_self->ob_itself,
+ nameLength__len__, nameLength__in__,
+ whichInfo,
+ &catalogInfo,
+ &newRef,
#ifndef __LP64__
- &newSpec
-#else /* __LP64__ */
- NULL
+ &newSpec
+#else /* __LP64__ */
+ NULL
#endif /* __LP64__*/
- );
- if (_err != noErr) return PyMac_Error(_err);
+ );
+ if (_err != noErr) return PyMac_Error(_err);
#ifndef __LP64__
- _res = Py_BuildValue("O&O&",
- FSRef_New, &newRef,
- FSSpec_New, &newSpec);
+ _res = Py_BuildValue("O&O&",
+ FSRef_New, &newRef,
+ FSSpec_New, &newSpec);
#else /* __LP64__ */
- _res = Py_BuildValue("O&O", FSRef_New, &newRef, Py_None);
+ _res = Py_BuildValue("O&O", FSRef_New, &newRef, Py_None);
#endif /* __LP64__ */
- return _res;
+ return _res;
}
static PyObject *FSRef_FSCreateDirectoryUnicode(FSRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- UniChar *nameLength__in__;
- UniCharCount nameLength__len__;
- int nameLength__in_len__;
- FSCatalogInfoBitmap whichInfo;
- FSCatalogInfo catalogInfo;
- FSRef newRef;
+ PyObject *_res = NULL;
+ OSErr _err;
+ UniChar *nameLength__in__;
+ UniCharCount nameLength__len__;
+ int nameLength__in_len__;
+ FSCatalogInfoBitmap whichInfo;
+ FSCatalogInfo catalogInfo;
+ FSRef newRef;
#ifndef __LP64__
- FSSpec newSpec;
+ FSSpec newSpec;
#endif /* !__LP64__ */
- UInt32 newDirID;
- if (!PyArg_ParseTuple(_args, "u#lO&",
- &nameLength__in__, &nameLength__in_len__,
- &whichInfo,
- FSCatalogInfo_Convert, &catalogInfo))
- return NULL;
- nameLength__len__ = nameLength__in_len__;
- _err = FSCreateDirectoryUnicode(&_self->ob_itself,
- nameLength__len__, nameLength__in__,
- whichInfo,
- &catalogInfo,
- &newRef,
+ UInt32 newDirID;
+ if (!PyArg_ParseTuple(_args, "u#lO&",
+ &nameLength__in__, &nameLength__in_len__,
+ &whichInfo,
+ FSCatalogInfo_Convert, &catalogInfo))
+ return NULL;
+ nameLength__len__ = nameLength__in_len__;
+ _err = FSCreateDirectoryUnicode(&_self->ob_itself,
+ nameLength__len__, nameLength__in__,
+ whichInfo,
+ &catalogInfo,
+ &newRef,
#ifndef __LP64__
- &newSpec,
+ &newSpec,
#else /* !__LP64__ */
- NULL,
+ NULL,
#endif /* !__LP64__ */
- &newDirID);
- if (_err != noErr) return PyMac_Error(_err);
+ &newDirID);
+ if (_err != noErr) return PyMac_Error(_err);
#ifndef __LP64__
- _res = Py_BuildValue("O&O&l",
- FSRef_New, &newRef,
- FSSpec_New, &newSpec,
- newDirID);
-#else /* __LP64__ */
- _res = Py_BuildValue("O&Ol",
- FSRef_New, &newRef,
- Py_None,
- newDirID);
+ _res = Py_BuildValue("O&O&l",
+ FSRef_New, &newRef,
+ FSSpec_New, &newSpec,
+ newDirID);
+#else /* __LP64__ */
+ _res = Py_BuildValue("O&Ol",
+ FSRef_New, &newRef,
+ Py_None,
+ newDirID);
#endif /* __LP64__ */
- return _res;
+ return _res;
}
static PyObject *FSRef_FSDeleteObject(FSRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = FSDeleteObject(&_self->ob_itself);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = FSDeleteObject(&_self->ob_itself);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *FSRef_FSMoveObject(FSRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- FSRef destDirectory;
- FSRef newRef;
- if (!PyArg_ParseTuple(_args, "O&",
- FSRef_Convert, &destDirectory))
- return NULL;
- _err = FSMoveObject(&_self->ob_itself,
- &destDirectory,
- &newRef);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- FSRef_New, &newRef);
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ FSRef destDirectory;
+ FSRef newRef;
+ if (!PyArg_ParseTuple(_args, "O&",
+ FSRef_Convert, &destDirectory))
+ return NULL;
+ _err = FSMoveObject(&_self->ob_itself,
+ &destDirectory,
+ &newRef);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ FSRef_New, &newRef);
+ return _res;
}
static PyObject *FSRef_FSExchangeObjects(FSRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- FSRef destRef;
- if (!PyArg_ParseTuple(_args, "O&",
- FSRef_Convert, &destRef))
- return NULL;
- _err = FSExchangeObjects(&_self->ob_itself,
- &destRef);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ FSRef destRef;
+ if (!PyArg_ParseTuple(_args, "O&",
+ FSRef_Convert, &destRef))
+ return NULL;
+ _err = FSExchangeObjects(&_self->ob_itself,
+ &destRef);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *FSRef_FSRenameUnicode(FSRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- UniChar *nameLength__in__;
- UniCharCount nameLength__len__;
- int nameLength__in_len__;
- TextEncoding textEncodingHint;
- FSRef newRef;
- if (!PyArg_ParseTuple(_args, "u#l",
- &nameLength__in__, &nameLength__in_len__,
- &textEncodingHint))
- return NULL;
- nameLength__len__ = nameLength__in_len__;
- _err = FSRenameUnicode(&_self->ob_itself,
- nameLength__len__, nameLength__in__,
- textEncodingHint,
- &newRef);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- FSRef_New, &newRef);
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ UniChar *nameLength__in__;
+ UniCharCount nameLength__len__;
+ int nameLength__in_len__;
+ TextEncoding textEncodingHint;
+ FSRef newRef;
+ if (!PyArg_ParseTuple(_args, "u#l",
+ &nameLength__in__, &nameLength__in_len__,
+ &textEncodingHint))
+ return NULL;
+ nameLength__len__ = nameLength__in_len__;
+ _err = FSRenameUnicode(&_self->ob_itself,
+ nameLength__len__, nameLength__in__,
+ textEncodingHint,
+ &newRef);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ FSRef_New, &newRef);
+ return _res;
}
static PyObject *FSRef_FSGetCatalogInfo(FSRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- FSCatalogInfoBitmap whichInfo;
- FSCatalogInfo catalogInfo;
- HFSUniStr255 outName;
+ PyObject *_res = NULL;
+ OSErr _err;
+ FSCatalogInfoBitmap whichInfo;
+ FSCatalogInfo catalogInfo;
+ HFSUniStr255 outName;
#ifndef __LP64__
- FSSpec fsSpec;
+ FSSpec fsSpec;
#endif /* !__LP64__ */
- FSRef parentRef;
- if (!PyArg_ParseTuple(_args, "l",
- &whichInfo))
- return NULL;
- _err = FSGetCatalogInfo(&_self->ob_itself,
- whichInfo,
- &catalogInfo,
- &outName,
+ FSRef parentRef;
+ if (!PyArg_ParseTuple(_args, "l",
+ &whichInfo))
+ return NULL;
+ _err = FSGetCatalogInfo(&_self->ob_itself,
+ whichInfo,
+ &catalogInfo,
+ &outName,
#ifndef __LP64__
- &fsSpec,
-#else /* __LP64__ */
- NULL,
+ &fsSpec,
+#else /* __LP64__ */
+ NULL,
#endif /* __LP64__ */
- &parentRef);
- if (_err != noErr) return PyMac_Error(_err);
+ &parentRef);
+ if (_err != noErr) return PyMac_Error(_err);
#ifndef __LP64__
- _res = Py_BuildValue("O&O&O&O&",
- FSCatalogInfo_New, &catalogInfo,
- PyMac_BuildHFSUniStr255, &outName,
- FSSpec_New, &fsSpec,
- FSRef_New, &parentRef);
-#else /* __LP64__ */
- _res = Py_BuildValue("O&O&OO&",
- FSCatalogInfo_New, &catalogInfo,
- PyMac_BuildHFSUniStr255, &outName,
- Py_None,
- FSRef_New, &parentRef);
+ _res = Py_BuildValue("O&O&O&O&",
+ FSCatalogInfo_New, &catalogInfo,
+ PyMac_BuildHFSUniStr255, &outName,
+ FSSpec_New, &fsSpec,
+ FSRef_New, &parentRef);
+#else /* __LP64__ */
+ _res = Py_BuildValue("O&O&OO&",
+ FSCatalogInfo_New, &catalogInfo,
+ PyMac_BuildHFSUniStr255, &outName,
+ Py_None,
+ FSRef_New, &parentRef);
#endif /* __LP64__ */
- return _res;
+ return _res;
}
static PyObject *FSRef_FSSetCatalogInfo(FSRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- FSCatalogInfoBitmap whichInfo;
- FSCatalogInfo catalogInfo;
- if (!PyArg_ParseTuple(_args, "lO&",
- &whichInfo,
- FSCatalogInfo_Convert, &catalogInfo))
- return NULL;
- _err = FSSetCatalogInfo(&_self->ob_itself,
- whichInfo,
- &catalogInfo);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ FSCatalogInfoBitmap whichInfo;
+ FSCatalogInfo catalogInfo;
+ if (!PyArg_ParseTuple(_args, "lO&",
+ &whichInfo,
+ FSCatalogInfo_Convert, &catalogInfo))
+ return NULL;
+ _err = FSSetCatalogInfo(&_self->ob_itself,
+ whichInfo,
+ &catalogInfo);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *FSRef_FSCreateFork(FSRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- UniChar *forkNameLength__in__;
- UniCharCount forkNameLength__len__;
- int forkNameLength__in_len__;
- if (!PyArg_ParseTuple(_args, "u#",
- &forkNameLength__in__, &forkNameLength__in_len__))
- return NULL;
- forkNameLength__len__ = forkNameLength__in_len__;
- _err = FSCreateFork(&_self->ob_itself,
- forkNameLength__len__, forkNameLength__in__);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ UniChar *forkNameLength__in__;
+ UniCharCount forkNameLength__len__;
+ int forkNameLength__in_len__;
+ if (!PyArg_ParseTuple(_args, "u#",
+ &forkNameLength__in__, &forkNameLength__in_len__))
+ return NULL;
+ forkNameLength__len__ = forkNameLength__in_len__;
+ _err = FSCreateFork(&_self->ob_itself,
+ forkNameLength__len__, forkNameLength__in__);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *FSRef_FSDeleteFork(FSRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- UniChar *forkNameLength__in__;
- UniCharCount forkNameLength__len__;
- int forkNameLength__in_len__;
- if (!PyArg_ParseTuple(_args, "u#",
- &forkNameLength__in__, &forkNameLength__in_len__))
- return NULL;
- forkNameLength__len__ = forkNameLength__in_len__;
- _err = FSDeleteFork(&_self->ob_itself,
- forkNameLength__len__, forkNameLength__in__);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ UniChar *forkNameLength__in__;
+ UniCharCount forkNameLength__len__;
+ int forkNameLength__in_len__;
+ if (!PyArg_ParseTuple(_args, "u#",
+ &forkNameLength__in__, &forkNameLength__in_len__))
+ return NULL;
+ forkNameLength__len__ = forkNameLength__in_len__;
+ _err = FSDeleteFork(&_self->ob_itself,
+ forkNameLength__len__, forkNameLength__in__);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *FSRef_FSOpenFork(FSRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- UniChar *forkNameLength__in__;
- UniCharCount forkNameLength__len__;
- int forkNameLength__in_len__;
- SInt8 permissions;
- FSIORefNum forkRefNum;
- if (!PyArg_ParseTuple(_args, "u#b",
- &forkNameLength__in__, &forkNameLength__in_len__,
- &permissions))
- return NULL;
- forkNameLength__len__ = forkNameLength__in_len__;
- _err = FSOpenFork(&_self->ob_itself,
- forkNameLength__len__, forkNameLength__in__,
- permissions,
- &forkRefNum);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("h",
- forkRefNum);
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ UniChar *forkNameLength__in__;
+ UniCharCount forkNameLength__len__;
+ int forkNameLength__in_len__;
+ SInt8 permissions;
+ FSIORefNum forkRefNum;
+ if (!PyArg_ParseTuple(_args, "u#b",
+ &forkNameLength__in__, &forkNameLength__in_len__,
+ &permissions))
+ return NULL;
+ forkNameLength__len__ = forkNameLength__in_len__;
+ _err = FSOpenFork(&_self->ob_itself,
+ forkNameLength__len__, forkNameLength__in__,
+ permissions,
+ &forkRefNum);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("h",
+ forkRefNum);
+ return _res;
}
static PyObject *FSRef_FNNotify(FSRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- FNMessage message;
- OptionBits flags;
- if (!PyArg_ParseTuple(_args, "ll",
- &message,
- &flags))
- return NULL;
- _err = FNNotify(&_self->ob_itself,
- message,
- flags);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ FNMessage message;
+ OptionBits flags;
+ if (!PyArg_ParseTuple(_args, "ll",
+ &message,
+ &flags))
+ return NULL;
+ _err = FNNotify(&_self->ob_itself,
+ message,
+ flags);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *FSRef_FSNewAliasMinimal(FSRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- AliasHandle inAlias;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = FSNewAliasMinimal(&_self->ob_itself,
- &inAlias);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- Alias_New, inAlias);
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ AliasHandle inAlias;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = FSNewAliasMinimal(&_self->ob_itself,
+ &inAlias);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ Alias_New, inAlias);
+ return _res;
}
static PyObject *FSRef_FSIsAliasFile(FSRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Boolean aliasFileFlag;
- Boolean folderFlag;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = FSIsAliasFile(&_self->ob_itself,
- &aliasFileFlag,
- &folderFlag);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("bb",
- aliasFileFlag,
- folderFlag);
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Boolean aliasFileFlag;
+ Boolean folderFlag;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = FSIsAliasFile(&_self->ob_itself,
+ &aliasFileFlag,
+ &folderFlag);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("bb",
+ aliasFileFlag,
+ folderFlag);
+ return _res;
}
static PyObject *FSRef_FSRefMakePath(FSRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
- OSStatus _err;
+ OSStatus _err;
#define MAXPATHNAME 1024
- UInt8 path[MAXPATHNAME];
- UInt32 maxPathSize = MAXPATHNAME;
+ UInt8 path[MAXPATHNAME];
+ UInt32 maxPathSize = MAXPATHNAME;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = FSRefMakePath(&_self->ob_itself,
- path,
- maxPathSize);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("s", path);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = FSRefMakePath(&_self->ob_itself,
+ path,
+ maxPathSize);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("s", path);
+ return _res;
}
static PyObject *FSRef_as_pathname(FSRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _res = FSRef_FSRefMakePath(_self, _args);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _res = FSRef_FSRefMakePath(_self, _args);
+ return _res;
}
static PyMethodDef FSRef_methods[] = {
- {"FSMakeFSRefUnicode", (PyCFunction)FSRef_FSMakeFSRefUnicode, 1,
- PyDoc_STR("(Buffer nameLength, TextEncoding textEncodingHint) -> (FSRef newRef)")},
- {"FSCompareFSRefs", (PyCFunction)FSRef_FSCompareFSRefs, 1,
- PyDoc_STR("(FSRef ref2) -> None")},
- {"FSCreateFileUnicode", (PyCFunction)FSRef_FSCreateFileUnicode, 1,
- PyDoc_STR("(Buffer nameLength, FSCatalogInfoBitmap whichInfo, FSCatalogInfo catalogInfo) -> (FSRef newRef, FSSpec newSpec)")},
- {"FSCreateDirectoryUnicode", (PyCFunction)FSRef_FSCreateDirectoryUnicode, 1,
- PyDoc_STR("(Buffer nameLength, FSCatalogInfoBitmap whichInfo, FSCatalogInfo catalogInfo) -> (FSRef newRef, FSSpec newSpec, UInt32 newDirID)")},
- {"FSDeleteObject", (PyCFunction)FSRef_FSDeleteObject, 1,
- PyDoc_STR("() -> None")},
- {"FSMoveObject", (PyCFunction)FSRef_FSMoveObject, 1,
- PyDoc_STR("(FSRef destDirectory) -> (FSRef newRef)")},
- {"FSExchangeObjects", (PyCFunction)FSRef_FSExchangeObjects, 1,
- PyDoc_STR("(FSRef destRef) -> None")},
- {"FSRenameUnicode", (PyCFunction)FSRef_FSRenameUnicode, 1,
- PyDoc_STR("(Buffer nameLength, TextEncoding textEncodingHint) -> (FSRef newRef)")},
- {"FSGetCatalogInfo", (PyCFunction)FSRef_FSGetCatalogInfo, 1,
- PyDoc_STR("(FSCatalogInfoBitmap whichInfo) -> (FSCatalogInfo catalogInfo, HFSUniStr255 outName, FSSpec fsSpec, FSRef parentRef)")},
- {"FSSetCatalogInfo", (PyCFunction)FSRef_FSSetCatalogInfo, 1,
- PyDoc_STR("(FSCatalogInfoBitmap whichInfo, FSCatalogInfo catalogInfo) -> None")},
- {"FSCreateFork", (PyCFunction)FSRef_FSCreateFork, 1,
- PyDoc_STR("(Buffer forkNameLength) -> None")},
- {"FSDeleteFork", (PyCFunction)FSRef_FSDeleteFork, 1,
- PyDoc_STR("(Buffer forkNameLength) -> None")},
- {"FSOpenFork", (PyCFunction)FSRef_FSOpenFork, 1,
- PyDoc_STR("(Buffer forkNameLength, SInt8 permissions) -> (SInt16 forkRefNum)")},
- {"FNNotify", (PyCFunction)FSRef_FNNotify, 1,
- PyDoc_STR("(FNMessage message, OptionBits flags) -> None")},
- {"FSNewAliasMinimal", (PyCFunction)FSRef_FSNewAliasMinimal, 1,
- PyDoc_STR("() -> (AliasHandle inAlias)")},
- {"FSIsAliasFile", (PyCFunction)FSRef_FSIsAliasFile, 1,
- PyDoc_STR("() -> (Boolean aliasFileFlag, Boolean folderFlag)")},
- {"FSRefMakePath", (PyCFunction)FSRef_FSRefMakePath, 1,
- PyDoc_STR("() -> string")},
- {"as_pathname", (PyCFunction)FSRef_as_pathname, 1,
- PyDoc_STR("() -> string")},
- {NULL, NULL, 0}
+ {"FSMakeFSRefUnicode", (PyCFunction)FSRef_FSMakeFSRefUnicode, 1,
+ PyDoc_STR("(Buffer nameLength, TextEncoding textEncodingHint) -> (FSRef newRef)")},
+ {"FSCompareFSRefs", (PyCFunction)FSRef_FSCompareFSRefs, 1,
+ PyDoc_STR("(FSRef ref2) -> None")},
+ {"FSCreateFileUnicode", (PyCFunction)FSRef_FSCreateFileUnicode, 1,
+ PyDoc_STR("(Buffer nameLength, FSCatalogInfoBitmap whichInfo, FSCatalogInfo catalogInfo) -> (FSRef newRef, FSSpec newSpec)")},
+ {"FSCreateDirectoryUnicode", (PyCFunction)FSRef_FSCreateDirectoryUnicode, 1,
+ PyDoc_STR("(Buffer nameLength, FSCatalogInfoBitmap whichInfo, FSCatalogInfo catalogInfo) -> (FSRef newRef, FSSpec newSpec, UInt32 newDirID)")},
+ {"FSDeleteObject", (PyCFunction)FSRef_FSDeleteObject, 1,
+ PyDoc_STR("() -> None")},
+ {"FSMoveObject", (PyCFunction)FSRef_FSMoveObject, 1,
+ PyDoc_STR("(FSRef destDirectory) -> (FSRef newRef)")},
+ {"FSExchangeObjects", (PyCFunction)FSRef_FSExchangeObjects, 1,
+ PyDoc_STR("(FSRef destRef) -> None")},
+ {"FSRenameUnicode", (PyCFunction)FSRef_FSRenameUnicode, 1,
+ PyDoc_STR("(Buffer nameLength, TextEncoding textEncodingHint) -> (FSRef newRef)")},
+ {"FSGetCatalogInfo", (PyCFunction)FSRef_FSGetCatalogInfo, 1,
+ PyDoc_STR("(FSCatalogInfoBitmap whichInfo) -> (FSCatalogInfo catalogInfo, HFSUniStr255 outName, FSSpec fsSpec, FSRef parentRef)")},
+ {"FSSetCatalogInfo", (PyCFunction)FSRef_FSSetCatalogInfo, 1,
+ PyDoc_STR("(FSCatalogInfoBitmap whichInfo, FSCatalogInfo catalogInfo) -> None")},
+ {"FSCreateFork", (PyCFunction)FSRef_FSCreateFork, 1,
+ PyDoc_STR("(Buffer forkNameLength) -> None")},
+ {"FSDeleteFork", (PyCFunction)FSRef_FSDeleteFork, 1,
+ PyDoc_STR("(Buffer forkNameLength) -> None")},
+ {"FSOpenFork", (PyCFunction)FSRef_FSOpenFork, 1,
+ PyDoc_STR("(Buffer forkNameLength, SInt8 permissions) -> (SInt16 forkRefNum)")},
+ {"FNNotify", (PyCFunction)FSRef_FNNotify, 1,
+ PyDoc_STR("(FNMessage message, OptionBits flags) -> None")},
+ {"FSNewAliasMinimal", (PyCFunction)FSRef_FSNewAliasMinimal, 1,
+ PyDoc_STR("() -> (AliasHandle inAlias)")},
+ {"FSIsAliasFile", (PyCFunction)FSRef_FSIsAliasFile, 1,
+ PyDoc_STR("() -> (Boolean aliasFileFlag, Boolean folderFlag)")},
+ {"FSRefMakePath", (PyCFunction)FSRef_FSRefMakePath, 1,
+ PyDoc_STR("() -> string")},
+ {"as_pathname", (PyCFunction)FSRef_as_pathname, 1,
+ PyDoc_STR("() -> string")},
+ {NULL, NULL, 0}
};
static PyObject *FSRef_get_data(FSRefObject *self, void *closure)
{
- return PyString_FromStringAndSize((char *)&self->ob_itself, sizeof(self->ob_itself));
+ return PyString_FromStringAndSize((char *)&self->ob_itself, sizeof(self->ob_itself));
}
#define FSRef_set_data NULL
static PyGetSetDef FSRef_getsetlist[] = {
- {"data", (getter)FSRef_get_data, (setter)FSRef_set_data, "Raw data of the FSRef object"},
- {NULL, NULL, NULL, NULL},
+ {"data", (getter)FSRef_get_data, (setter)FSRef_set_data, "Raw data of the FSRef object"},
+ {NULL, NULL, NULL, NULL},
};
@@ -2033,93 +2033,93 @@ static PyGetSetDef FSRef_getsetlist[] = {
#define FSRef_hash NULL
static int FSRef_tp_init(PyObject *_self, PyObject *_args, PyObject *_kwds)
{
- PyObject *v = NULL;
- char *rawdata = NULL;
- int rawdatalen = 0;
- static char *kw[] = {"itself", "rawdata", 0};
-
- if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "|Os#", kw, &v, &rawdata, &rawdatalen))
- return -1;
- if (v && rawdata)
- {
- PyErr_SetString(PyExc_TypeError, "Only one of itself or rawdata may be specified");
- return -1;
- }
- if (!v && !rawdata)
- {
- PyErr_SetString(PyExc_TypeError, "One of itself or rawdata must be specified");
- return -1;
- }
- if (rawdata)
- {
- if (rawdatalen != sizeof(FSRef))
- {
- PyErr_SetString(PyExc_TypeError, "FSRef rawdata incorrect size");
- return -1;
- }
- memcpy(&((FSRefObject *)_self)->ob_itself, rawdata, rawdatalen);
- return 0;
- }
- if (PyMac_GetFSRef(v, &((FSRefObject *)_self)->ob_itself)) return 0;
- return -1;
+ PyObject *v = NULL;
+ char *rawdata = NULL;
+ int rawdatalen = 0;
+ static char *kw[] = {"itself", "rawdata", 0};
+
+ if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "|Os#", kw, &v, &rawdata, &rawdatalen))
+ return -1;
+ if (v && rawdata)
+ {
+ PyErr_SetString(PyExc_TypeError, "Only one of itself or rawdata may be specified");
+ return -1;
+ }
+ if (!v && !rawdata)
+ {
+ PyErr_SetString(PyExc_TypeError, "One of itself or rawdata must be specified");
+ return -1;
+ }
+ if (rawdata)
+ {
+ if (rawdatalen != sizeof(FSRef))
+ {
+ PyErr_SetString(PyExc_TypeError, "FSRef rawdata incorrect size");
+ return -1;
+ }
+ memcpy(&((FSRefObject *)_self)->ob_itself, rawdata, rawdatalen);
+ return 0;
+ }
+ if (PyMac_GetFSRef(v, &((FSRefObject *)_self)->ob_itself)) return 0;
+ return -1;
}
#define FSRef_tp_alloc PyType_GenericAlloc
static PyObject *FSRef_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
- PyObject *self;
+ PyObject *self;
- if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
- memset(&((FSRefObject *)self)->ob_itself, 0, sizeof(FSRef));
- return self;
+ if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
+ memset(&((FSRefObject *)self)->ob_itself, 0, sizeof(FSRef));
+ return self;
}
#define FSRef_tp_free PyObject_Del
static PyTypeObject FSRef_Type = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
- "Carbon.File.FSRef", /*tp_name*/
- sizeof(FSRefObject), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- /* methods */
- (destructor) FSRef_dealloc, /*tp_dealloc*/
- 0, /*tp_print*/
- (getattrfunc)0, /*tp_getattr*/
- (setattrfunc)0, /*tp_setattr*/
- (cmpfunc) FSRef_compare, /*tp_compare*/
- (reprfunc) FSRef_repr, /*tp_repr*/
- (PyNumberMethods *)0, /* tp_as_number */
- (PySequenceMethods *)0, /* tp_as_sequence */
- (PyMappingMethods *)0, /* tp_as_mapping */
- (hashfunc) FSRef_hash, /*tp_hash*/
- 0, /*tp_call*/
- 0, /*tp_str*/
- PyObject_GenericGetAttr, /*tp_getattro*/
- PyObject_GenericSetAttr, /*tp_setattro */
- 0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
- 0, /*tp_doc*/
- 0, /*tp_traverse*/
- 0, /*tp_clear*/
- 0, /*tp_richcompare*/
- 0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
- 0, /*tp_iternext*/
- FSRef_methods, /* tp_methods */
- 0, /*tp_members*/
- FSRef_getsetlist, /*tp_getset*/
- 0, /*tp_base*/
- 0, /*tp_dict*/
- 0, /*tp_descr_get*/
- 0, /*tp_descr_set*/
- 0, /*tp_dictoffset*/
- FSRef_tp_init, /* tp_init */
- FSRef_tp_alloc, /* tp_alloc */
- FSRef_tp_new, /* tp_new */
- FSRef_tp_free, /* tp_free */
+ PyObject_HEAD_INIT(NULL)
+ 0, /*ob_size*/
+ "Carbon.File.FSRef", /*tp_name*/
+ sizeof(FSRefObject), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ /* methods */
+ (destructor) FSRef_dealloc, /*tp_dealloc*/
+ 0, /*tp_print*/
+ (getattrfunc)0, /*tp_getattr*/
+ (setattrfunc)0, /*tp_setattr*/
+ (cmpfunc) FSRef_compare, /*tp_compare*/
+ (reprfunc) FSRef_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) FSRef_hash, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ PyObject_GenericGetAttr, /*tp_getattro*/
+ PyObject_GenericSetAttr, /*tp_setattro */
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
+ 0, /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ FSRef_methods, /* tp_methods */
+ 0, /*tp_members*/
+ FSRef_getsetlist, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ FSRef_tp_init, /* tp_init */
+ FSRef_tp_alloc, /* tp_alloc */
+ FSRef_tp_new, /* tp_new */
+ FSRef_tp_free, /* tp_free */
};
/* --------------------- End object type FSRef ---------------------- */
@@ -2127,1123 +2127,1123 @@ static PyTypeObject FSRef_Type = {
#ifndef __LP64__
static PyObject *File_UnmountVol(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Str63 volName;
- short vRefNum;
- if (!PyArg_ParseTuple(_args, "O&h",
- PyMac_GetStr255, volName,
- &vRefNum))
- return NULL;
- _err = UnmountVol(volName,
- vRefNum);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Str63 volName;
+ short vRefNum;
+ if (!PyArg_ParseTuple(_args, "O&h",
+ PyMac_GetStr255, volName,
+ &vRefNum))
+ return NULL;
+ _err = UnmountVol(volName,
+ vRefNum);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *File_FlushVol(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Str63 volName;
- short vRefNum;
- if (!PyArg_ParseTuple(_args, "O&h",
- PyMac_GetStr255, volName,
- &vRefNum))
- return NULL;
- _err = FlushVol(volName,
- vRefNum);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Str63 volName;
+ short vRefNum;
+ if (!PyArg_ParseTuple(_args, "O&h",
+ PyMac_GetStr255, volName,
+ &vRefNum))
+ return NULL;
+ _err = FlushVol(volName,
+ vRefNum);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *File_HSetVol(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Str63 volName;
- short vRefNum;
- long dirID;
- if (!PyArg_ParseTuple(_args, "O&hl",
- PyMac_GetStr255, volName,
- &vRefNum,
- &dirID))
- return NULL;
- _err = HSetVol(volName,
- vRefNum,
- dirID);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Str63 volName;
+ short vRefNum;
+ long dirID;
+ if (!PyArg_ParseTuple(_args, "O&hl",
+ PyMac_GetStr255, volName,
+ &vRefNum,
+ &dirID))
+ return NULL;
+ _err = HSetVol(volName,
+ vRefNum,
+ dirID);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *File_FSClose(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- short refNum;
- if (!PyArg_ParseTuple(_args, "h",
- &refNum))
- return NULL;
- _err = FSClose(refNum);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ short refNum;
+ if (!PyArg_ParseTuple(_args, "h",
+ &refNum))
+ return NULL;
+ _err = FSClose(refNum);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *File_Allocate(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- short refNum;
- long count;
- if (!PyArg_ParseTuple(_args, "h",
- &refNum))
- return NULL;
- _err = Allocate(refNum,
- &count);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- count);
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ short refNum;
+ long count;
+ if (!PyArg_ParseTuple(_args, "h",
+ &refNum))
+ return NULL;
+ _err = Allocate(refNum,
+ &count);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ count);
+ return _res;
}
static PyObject *File_GetEOF(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- short refNum;
- long logEOF;
- if (!PyArg_ParseTuple(_args, "h",
- &refNum))
- return NULL;
- _err = GetEOF(refNum,
- &logEOF);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- logEOF);
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ short refNum;
+ long logEOF;
+ if (!PyArg_ParseTuple(_args, "h",
+ &refNum))
+ return NULL;
+ _err = GetEOF(refNum,
+ &logEOF);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ logEOF);
+ return _res;
}
static PyObject *File_SetEOF(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- short refNum;
- long logEOF;
- if (!PyArg_ParseTuple(_args, "hl",
- &refNum,
- &logEOF))
- return NULL;
- _err = SetEOF(refNum,
- logEOF);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ short refNum;
+ long logEOF;
+ if (!PyArg_ParseTuple(_args, "hl",
+ &refNum,
+ &logEOF))
+ return NULL;
+ _err = SetEOF(refNum,
+ logEOF);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *File_GetFPos(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- short refNum;
- long filePos;
- if (!PyArg_ParseTuple(_args, "h",
- &refNum))
- return NULL;
- _err = GetFPos(refNum,
- &filePos);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- filePos);
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ short refNum;
+ long filePos;
+ if (!PyArg_ParseTuple(_args, "h",
+ &refNum))
+ return NULL;
+ _err = GetFPos(refNum,
+ &filePos);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ filePos);
+ return _res;
}
static PyObject *File_SetFPos(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- short refNum;
- short posMode;
- long posOff;
- if (!PyArg_ParseTuple(_args, "hhl",
- &refNum,
- &posMode,
- &posOff))
- return NULL;
- _err = SetFPos(refNum,
- posMode,
- posOff);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ short refNum;
+ short posMode;
+ long posOff;
+ if (!PyArg_ParseTuple(_args, "hhl",
+ &refNum,
+ &posMode,
+ &posOff))
+ return NULL;
+ _err = SetFPos(refNum,
+ posMode,
+ posOff);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *File_GetVRefNum(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- short fileRefNum;
- short vRefNum;
- if (!PyArg_ParseTuple(_args, "h",
- &fileRefNum))
- return NULL;
- _err = GetVRefNum(fileRefNum,
- &vRefNum);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("h",
- vRefNum);
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ short fileRefNum;
+ short vRefNum;
+ if (!PyArg_ParseTuple(_args, "h",
+ &fileRefNum))
+ return NULL;
+ _err = GetVRefNum(fileRefNum,
+ &vRefNum);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("h",
+ vRefNum);
+ return _res;
}
static PyObject *File_HGetVol(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- StringPtr volName;
- short vRefNum;
- long dirID;
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetStr255, &volName))
- return NULL;
- _err = HGetVol(volName,
- &vRefNum,
- &dirID);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("hl",
- vRefNum,
- dirID);
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ StringPtr volName;
+ short vRefNum;
+ long dirID;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetStr255, &volName))
+ return NULL;
+ _err = HGetVol(volName,
+ &vRefNum,
+ &dirID);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("hl",
+ vRefNum,
+ dirID);
+ return _res;
}
static PyObject *File_HOpen(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- short vRefNum;
- long dirID;
- Str255 fileName;
- SInt8 permission;
- short refNum;
- if (!PyArg_ParseTuple(_args, "hlO&b",
- &vRefNum,
- &dirID,
- PyMac_GetStr255, fileName,
- &permission))
- return NULL;
- _err = HOpen(vRefNum,
- dirID,
- fileName,
- permission,
- &refNum);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("h",
- refNum);
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ short vRefNum;
+ long dirID;
+ Str255 fileName;
+ SInt8 permission;
+ short refNum;
+ if (!PyArg_ParseTuple(_args, "hlO&b",
+ &vRefNum,
+ &dirID,
+ PyMac_GetStr255, fileName,
+ &permission))
+ return NULL;
+ _err = HOpen(vRefNum,
+ dirID,
+ fileName,
+ permission,
+ &refNum);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("h",
+ refNum);
+ return _res;
}
static PyObject *File_HOpenDF(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- short vRefNum;
- long dirID;
- Str255 fileName;
- SInt8 permission;
- short refNum;
- if (!PyArg_ParseTuple(_args, "hlO&b",
- &vRefNum,
- &dirID,
- PyMac_GetStr255, fileName,
- &permission))
- return NULL;
- _err = HOpenDF(vRefNum,
- dirID,
- fileName,
- permission,
- &refNum);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("h",
- refNum);
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ short vRefNum;
+ long dirID;
+ Str255 fileName;
+ SInt8 permission;
+ short refNum;
+ if (!PyArg_ParseTuple(_args, "hlO&b",
+ &vRefNum,
+ &dirID,
+ PyMac_GetStr255, fileName,
+ &permission))
+ return NULL;
+ _err = HOpenDF(vRefNum,
+ dirID,
+ fileName,
+ permission,
+ &refNum);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("h",
+ refNum);
+ return _res;
}
static PyObject *File_HOpenRF(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- short vRefNum;
- long dirID;
- Str255 fileName;
- SInt8 permission;
- short refNum;
- if (!PyArg_ParseTuple(_args, "hlO&b",
- &vRefNum,
- &dirID,
- PyMac_GetStr255, fileName,
- &permission))
- return NULL;
- _err = HOpenRF(vRefNum,
- dirID,
- fileName,
- permission,
- &refNum);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("h",
- refNum);
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ short vRefNum;
+ long dirID;
+ Str255 fileName;
+ SInt8 permission;
+ short refNum;
+ if (!PyArg_ParseTuple(_args, "hlO&b",
+ &vRefNum,
+ &dirID,
+ PyMac_GetStr255, fileName,
+ &permission))
+ return NULL;
+ _err = HOpenRF(vRefNum,
+ dirID,
+ fileName,
+ permission,
+ &refNum);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("h",
+ refNum);
+ return _res;
}
static PyObject *File_AllocContig(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- short refNum;
- long count;
- if (!PyArg_ParseTuple(_args, "h",
- &refNum))
- return NULL;
- _err = AllocContig(refNum,
- &count);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- count);
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ short refNum;
+ long count;
+ if (!PyArg_ParseTuple(_args, "h",
+ &refNum))
+ return NULL;
+ _err = AllocContig(refNum,
+ &count);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ count);
+ return _res;
}
static PyObject *File_HCreate(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- short vRefNum;
- long dirID;
- Str255 fileName;
- OSType creator;
- OSType fileType;
- if (!PyArg_ParseTuple(_args, "hlO&O&O&",
- &vRefNum,
- &dirID,
- PyMac_GetStr255, fileName,
- PyMac_GetOSType, &creator,
- PyMac_GetOSType, &fileType))
- return NULL;
- _err = HCreate(vRefNum,
- dirID,
- fileName,
- creator,
- fileType);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ short vRefNum;
+ long dirID;
+ Str255 fileName;
+ OSType creator;
+ OSType fileType;
+ if (!PyArg_ParseTuple(_args, "hlO&O&O&",
+ &vRefNum,
+ &dirID,
+ PyMac_GetStr255, fileName,
+ PyMac_GetOSType, &creator,
+ PyMac_GetOSType, &fileType))
+ return NULL;
+ _err = HCreate(vRefNum,
+ dirID,
+ fileName,
+ creator,
+ fileType);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *File_DirCreate(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- short vRefNum;
- long parentDirID;
- Str255 directoryName;
- long createdDirID;
- if (!PyArg_ParseTuple(_args, "hlO&",
- &vRefNum,
- &parentDirID,
- PyMac_GetStr255, directoryName))
- return NULL;
- _err = DirCreate(vRefNum,
- parentDirID,
- directoryName,
- &createdDirID);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- createdDirID);
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ short vRefNum;
+ long parentDirID;
+ Str255 directoryName;
+ long createdDirID;
+ if (!PyArg_ParseTuple(_args, "hlO&",
+ &vRefNum,
+ &parentDirID,
+ PyMac_GetStr255, directoryName))
+ return NULL;
+ _err = DirCreate(vRefNum,
+ parentDirID,
+ directoryName,
+ &createdDirID);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ createdDirID);
+ return _res;
}
static PyObject *File_HDelete(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- short vRefNum;
- long dirID;
- Str255 fileName;
- if (!PyArg_ParseTuple(_args, "hlO&",
- &vRefNum,
- &dirID,
- PyMac_GetStr255, fileName))
- return NULL;
- _err = HDelete(vRefNum,
- dirID,
- fileName);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ short vRefNum;
+ long dirID;
+ Str255 fileName;
+ if (!PyArg_ParseTuple(_args, "hlO&",
+ &vRefNum,
+ &dirID,
+ PyMac_GetStr255, fileName))
+ return NULL;
+ _err = HDelete(vRefNum,
+ dirID,
+ fileName);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *File_HGetFInfo(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- short vRefNum;
- long dirID;
- Str255 fileName;
- FInfo fndrInfo;
- if (!PyArg_ParseTuple(_args, "hlO&",
- &vRefNum,
- &dirID,
- PyMac_GetStr255, fileName))
- return NULL;
- _err = HGetFInfo(vRefNum,
- dirID,
- fileName,
- &fndrInfo);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- FInfo_New, &fndrInfo);
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ short vRefNum;
+ long dirID;
+ Str255 fileName;
+ FInfo fndrInfo;
+ if (!PyArg_ParseTuple(_args, "hlO&",
+ &vRefNum,
+ &dirID,
+ PyMac_GetStr255, fileName))
+ return NULL;
+ _err = HGetFInfo(vRefNum,
+ dirID,
+ fileName,
+ &fndrInfo);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ FInfo_New, &fndrInfo);
+ return _res;
}
static PyObject *File_HSetFInfo(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- short vRefNum;
- long dirID;
- Str255 fileName;
- FInfo fndrInfo;
- if (!PyArg_ParseTuple(_args, "hlO&O&",
- &vRefNum,
- &dirID,
- PyMac_GetStr255, fileName,
- FInfo_Convert, &fndrInfo))
- return NULL;
- _err = HSetFInfo(vRefNum,
- dirID,
- fileName,
- &fndrInfo);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ short vRefNum;
+ long dirID;
+ Str255 fileName;
+ FInfo fndrInfo;
+ if (!PyArg_ParseTuple(_args, "hlO&O&",
+ &vRefNum,
+ &dirID,
+ PyMac_GetStr255, fileName,
+ FInfo_Convert, &fndrInfo))
+ return NULL;
+ _err = HSetFInfo(vRefNum,
+ dirID,
+ fileName,
+ &fndrInfo);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *File_HSetFLock(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- short vRefNum;
- long dirID;
- Str255 fileName;
- if (!PyArg_ParseTuple(_args, "hlO&",
- &vRefNum,
- &dirID,
- PyMac_GetStr255, fileName))
- return NULL;
- _err = HSetFLock(vRefNum,
- dirID,
- fileName);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ short vRefNum;
+ long dirID;
+ Str255 fileName;
+ if (!PyArg_ParseTuple(_args, "hlO&",
+ &vRefNum,
+ &dirID,
+ PyMac_GetStr255, fileName))
+ return NULL;
+ _err = HSetFLock(vRefNum,
+ dirID,
+ fileName);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *File_HRstFLock(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- short vRefNum;
- long dirID;
- Str255 fileName;
- if (!PyArg_ParseTuple(_args, "hlO&",
- &vRefNum,
- &dirID,
- PyMac_GetStr255, fileName))
- return NULL;
- _err = HRstFLock(vRefNum,
- dirID,
- fileName);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ short vRefNum;
+ long dirID;
+ Str255 fileName;
+ if (!PyArg_ParseTuple(_args, "hlO&",
+ &vRefNum,
+ &dirID,
+ PyMac_GetStr255, fileName))
+ return NULL;
+ _err = HRstFLock(vRefNum,
+ dirID,
+ fileName);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *File_HRename(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- short vRefNum;
- long dirID;
- Str255 oldName;
- Str255 newName;
- if (!PyArg_ParseTuple(_args, "hlO&O&",
- &vRefNum,
- &dirID,
- PyMac_GetStr255, oldName,
- PyMac_GetStr255, newName))
- return NULL;
- _err = HRename(vRefNum,
- dirID,
- oldName,
- newName);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ short vRefNum;
+ long dirID;
+ Str255 oldName;
+ Str255 newName;
+ if (!PyArg_ParseTuple(_args, "hlO&O&",
+ &vRefNum,
+ &dirID,
+ PyMac_GetStr255, oldName,
+ PyMac_GetStr255, newName))
+ return NULL;
+ _err = HRename(vRefNum,
+ dirID,
+ oldName,
+ newName);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *File_CatMove(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- short vRefNum;
- long dirID;
- Str255 oldName;
- long newDirID;
- Str255 newName;
- if (!PyArg_ParseTuple(_args, "hlO&lO&",
- &vRefNum,
- &dirID,
- PyMac_GetStr255, oldName,
- &newDirID,
- PyMac_GetStr255, newName))
- return NULL;
- _err = CatMove(vRefNum,
- dirID,
- oldName,
- newDirID,
- newName);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ short vRefNum;
+ long dirID;
+ Str255 oldName;
+ long newDirID;
+ Str255 newName;
+ if (!PyArg_ParseTuple(_args, "hlO&lO&",
+ &vRefNum,
+ &dirID,
+ PyMac_GetStr255, oldName,
+ &newDirID,
+ PyMac_GetStr255, newName))
+ return NULL;
+ _err = CatMove(vRefNum,
+ dirID,
+ oldName,
+ newDirID,
+ newName);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *File_FSMakeFSSpec(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- short vRefNum;
- long dirID;
- Str255 fileName;
- FSSpec spec;
- if (!PyArg_ParseTuple(_args, "hlO&",
- &vRefNum,
- &dirID,
- PyMac_GetStr255, fileName))
- return NULL;
- _err = FSMakeFSSpec(vRefNum,
- dirID,
- fileName,
- &spec);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- FSSpec_New, &spec);
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ short vRefNum;
+ long dirID;
+ Str255 fileName;
+ FSSpec spec;
+ if (!PyArg_ParseTuple(_args, "hlO&",
+ &vRefNum,
+ &dirID,
+ PyMac_GetStr255, fileName))
+ return NULL;
+ _err = FSMakeFSSpec(vRefNum,
+ dirID,
+ fileName,
+ &spec);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ FSSpec_New, &spec);
+ return _res;
}
#endif /* !__LP64__ */
static PyObject *File_FSGetForkPosition(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- SInt16 forkRefNum;
- SInt64 position;
- if (!PyArg_ParseTuple(_args, "h",
- &forkRefNum))
- return NULL;
- _err = FSGetForkPosition(forkRefNum,
- &position);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("L",
- position);
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ SInt16 forkRefNum;
+ SInt64 position;
+ if (!PyArg_ParseTuple(_args, "h",
+ &forkRefNum))
+ return NULL;
+ _err = FSGetForkPosition(forkRefNum,
+ &position);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("L",
+ position);
+ return _res;
}
static PyObject *File_FSSetForkPosition(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- SInt16 forkRefNum;
- UInt16 positionMode;
- SInt64 positionOffset;
- if (!PyArg_ParseTuple(_args, "hHL",
- &forkRefNum,
- &positionMode,
- &positionOffset))
- return NULL;
- _err = FSSetForkPosition(forkRefNum,
- positionMode,
- positionOffset);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ SInt16 forkRefNum;
+ UInt16 positionMode;
+ SInt64 positionOffset;
+ if (!PyArg_ParseTuple(_args, "hHL",
+ &forkRefNum,
+ &positionMode,
+ &positionOffset))
+ return NULL;
+ _err = FSSetForkPosition(forkRefNum,
+ positionMode,
+ positionOffset);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *File_FSGetForkSize(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- SInt16 forkRefNum;
- SInt64 forkSize;
- if (!PyArg_ParseTuple(_args, "h",
- &forkRefNum))
- return NULL;
- _err = FSGetForkSize(forkRefNum,
- &forkSize);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("L",
- forkSize);
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ SInt16 forkRefNum;
+ SInt64 forkSize;
+ if (!PyArg_ParseTuple(_args, "h",
+ &forkRefNum))
+ return NULL;
+ _err = FSGetForkSize(forkRefNum,
+ &forkSize);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("L",
+ forkSize);
+ return _res;
}
static PyObject *File_FSSetForkSize(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- SInt16 forkRefNum;
- UInt16 positionMode;
- SInt64 positionOffset;
- if (!PyArg_ParseTuple(_args, "hHL",
- &forkRefNum,
- &positionMode,
- &positionOffset))
- return NULL;
- _err = FSSetForkSize(forkRefNum,
- positionMode,
- positionOffset);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ SInt16 forkRefNum;
+ UInt16 positionMode;
+ SInt64 positionOffset;
+ if (!PyArg_ParseTuple(_args, "hHL",
+ &forkRefNum,
+ &positionMode,
+ &positionOffset))
+ return NULL;
+ _err = FSSetForkSize(forkRefNum,
+ positionMode,
+ positionOffset);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *File_FSAllocateFork(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- SInt16 forkRefNum;
- FSAllocationFlags flags;
- UInt16 positionMode;
- SInt64 positionOffset;
- UInt64 requestCount;
- UInt64 actualCount;
- if (!PyArg_ParseTuple(_args, "hHHLL",
- &forkRefNum,
- &flags,
- &positionMode,
- &positionOffset,
- &requestCount))
- return NULL;
- _err = FSAllocateFork(forkRefNum,
- flags,
- positionMode,
- positionOffset,
- requestCount,
- &actualCount);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("L",
- actualCount);
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ SInt16 forkRefNum;
+ FSAllocationFlags flags;
+ UInt16 positionMode;
+ SInt64 positionOffset;
+ UInt64 requestCount;
+ UInt64 actualCount;
+ if (!PyArg_ParseTuple(_args, "hHHLL",
+ &forkRefNum,
+ &flags,
+ &positionMode,
+ &positionOffset,
+ &requestCount))
+ return NULL;
+ _err = FSAllocateFork(forkRefNum,
+ flags,
+ positionMode,
+ positionOffset,
+ requestCount,
+ &actualCount);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("L",
+ actualCount);
+ return _res;
}
static PyObject *File_FSFlushFork(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- SInt16 forkRefNum;
- if (!PyArg_ParseTuple(_args, "h",
- &forkRefNum))
- return NULL;
- _err = FSFlushFork(forkRefNum);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ SInt16 forkRefNum;
+ if (!PyArg_ParseTuple(_args, "h",
+ &forkRefNum))
+ return NULL;
+ _err = FSFlushFork(forkRefNum);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *File_FSCloseFork(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- SInt16 forkRefNum;
- if (!PyArg_ParseTuple(_args, "h",
- &forkRefNum))
- return NULL;
- _err = FSCloseFork(forkRefNum);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ SInt16 forkRefNum;
+ if (!PyArg_ParseTuple(_args, "h",
+ &forkRefNum))
+ return NULL;
+ _err = FSCloseFork(forkRefNum);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *File_FSGetDataForkName(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- HFSUniStr255 dataForkName;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = FSGetDataForkName(&dataForkName);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- PyMac_BuildHFSUniStr255, &dataForkName);
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ HFSUniStr255 dataForkName;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = FSGetDataForkName(&dataForkName);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildHFSUniStr255, &dataForkName);
+ return _res;
}
static PyObject *File_FSGetResourceForkName(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- HFSUniStr255 resourceForkName;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = FSGetResourceForkName(&resourceForkName);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- PyMac_BuildHFSUniStr255, &resourceForkName);
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ HFSUniStr255 resourceForkName;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = FSGetResourceForkName(&resourceForkName);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildHFSUniStr255, &resourceForkName);
+ return _res;
}
static PyObject *File_FSPathMakeRef(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- UInt8 * path;
- FSRef ref;
- Boolean isDirectory;
- if (!PyArg_ParseTuple(_args, "s",
- &path))
- return NULL;
- _err = FSPathMakeRef(path,
- &ref,
- &isDirectory);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&b",
- FSRef_New, &ref,
- isDirectory);
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ UInt8 * path;
+ FSRef ref;
+ Boolean isDirectory;
+ if (!PyArg_ParseTuple(_args, "s",
+ &path))
+ return NULL;
+ _err = FSPathMakeRef(path,
+ &ref,
+ &isDirectory);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&b",
+ FSRef_New, &ref,
+ isDirectory);
+ return _res;
}
static PyObject *File_FNNotifyByPath(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- UInt8 * path;
- FNMessage message;
- OptionBits flags;
- if (!PyArg_ParseTuple(_args, "sll",
- &path,
- &message,
- &flags))
- return NULL;
- _err = FNNotifyByPath(path,
- message,
- flags);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ UInt8 * path;
+ FNMessage message;
+ OptionBits flags;
+ if (!PyArg_ParseTuple(_args, "sll",
+ &path,
+ &message,
+ &flags))
+ return NULL;
+ _err = FNNotifyByPath(path,
+ message,
+ flags);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *File_FNNotifyAll(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- FNMessage message;
- OptionBits flags;
- if (!PyArg_ParseTuple(_args, "ll",
- &message,
- &flags))
- return NULL;
- _err = FNNotifyAll(message,
- flags);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ FNMessage message;
+ OptionBits flags;
+ if (!PyArg_ParseTuple(_args, "ll",
+ &message,
+ &flags))
+ return NULL;
+ _err = FNNotifyAll(message,
+ flags);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
#ifndef __LP64__
static PyObject *File_NewAlias(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- FSSpec fromFile__buf__;
- FSSpec *fromFile = &fromFile__buf__;
- FSSpec target;
- AliasHandle alias;
- if (!PyArg_ParseTuple(_args, "O&O&",
- myPyMac_GetOptFSSpecPtr, &fromFile,
- FSSpec_Convert, &target))
- return NULL;
- _err = NewAlias(fromFile,
- &target,
- &alias);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- Alias_New, alias);
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ FSSpec fromFile__buf__;
+ FSSpec *fromFile = &fromFile__buf__;
+ FSSpec target;
+ AliasHandle alias;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ myPyMac_GetOptFSSpecPtr, &fromFile,
+ FSSpec_Convert, &target))
+ return NULL;
+ _err = NewAlias(fromFile,
+ &target,
+ &alias);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ Alias_New, alias);
+ return _res;
}
static PyObject *File_NewAliasMinimalFromFullPath(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- char *fullPath__in__;
- int fullPath__len__;
- int fullPath__in_len__;
- Str32 zoneName;
- Str31 serverName;
- AliasHandle alias;
- if (!PyArg_ParseTuple(_args, "s#O&O&",
- &fullPath__in__, &fullPath__in_len__,
- PyMac_GetStr255, zoneName,
- PyMac_GetStr255, serverName))
- return NULL;
- fullPath__len__ = fullPath__in_len__;
- _err = NewAliasMinimalFromFullPath(fullPath__len__, fullPath__in__,
- zoneName,
- serverName,
- &alias);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- Alias_New, alias);
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ char *fullPath__in__;
+ int fullPath__len__;
+ int fullPath__in_len__;
+ Str32 zoneName;
+ Str31 serverName;
+ AliasHandle alias;
+ if (!PyArg_ParseTuple(_args, "s#O&O&",
+ &fullPath__in__, &fullPath__in_len__,
+ PyMac_GetStr255, zoneName,
+ PyMac_GetStr255, serverName))
+ return NULL;
+ fullPath__len__ = fullPath__in_len__;
+ _err = NewAliasMinimalFromFullPath(fullPath__len__, fullPath__in__,
+ zoneName,
+ serverName,
+ &alias);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ Alias_New, alias);
+ return _res;
}
static PyObject *File_ResolveAliasFile(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- FSSpec theSpec;
- Boolean resolveAliasChains;
- Boolean targetIsFolder;
- Boolean wasAliased;
- if (!PyArg_ParseTuple(_args, "O&b",
- FSSpec_Convert, &theSpec,
- &resolveAliasChains))
- return NULL;
- _err = ResolveAliasFile(&theSpec,
- resolveAliasChains,
- &targetIsFolder,
- &wasAliased);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&bb",
- FSSpec_New, &theSpec,
- targetIsFolder,
- wasAliased);
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ FSSpec theSpec;
+ Boolean resolveAliasChains;
+ Boolean targetIsFolder;
+ Boolean wasAliased;
+ if (!PyArg_ParseTuple(_args, "O&b",
+ FSSpec_Convert, &theSpec,
+ &resolveAliasChains))
+ return NULL;
+ _err = ResolveAliasFile(&theSpec,
+ resolveAliasChains,
+ &targetIsFolder,
+ &wasAliased);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&bb",
+ FSSpec_New, &theSpec,
+ targetIsFolder,
+ wasAliased);
+ return _res;
}
static PyObject *File_ResolveAliasFileWithMountFlags(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- FSSpec theSpec;
- Boolean resolveAliasChains;
- Boolean targetIsFolder;
- Boolean wasAliased;
- unsigned long mountFlags;
- if (!PyArg_ParseTuple(_args, "O&bl",
- FSSpec_Convert, &theSpec,
- &resolveAliasChains,
- &mountFlags))
- return NULL;
- _err = ResolveAliasFileWithMountFlags(&theSpec,
- resolveAliasChains,
- &targetIsFolder,
- &wasAliased,
- mountFlags);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&bb",
- FSSpec_New, &theSpec,
- targetIsFolder,
- wasAliased);
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ FSSpec theSpec;
+ Boolean resolveAliasChains;
+ Boolean targetIsFolder;
+ Boolean wasAliased;
+ unsigned long mountFlags;
+ if (!PyArg_ParseTuple(_args, "O&bl",
+ FSSpec_Convert, &theSpec,
+ &resolveAliasChains,
+ &mountFlags))
+ return NULL;
+ _err = ResolveAliasFileWithMountFlags(&theSpec,
+ resolveAliasChains,
+ &targetIsFolder,
+ &wasAliased,
+ mountFlags);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&bb",
+ FSSpec_New, &theSpec,
+ targetIsFolder,
+ wasAliased);
+ return _res;
}
static PyObject *File_UpdateAlias(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- FSSpec fromFile__buf__;
- FSSpec *fromFile = &fromFile__buf__;
- FSSpec target;
- AliasHandle alias;
- Boolean wasChanged;
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- myPyMac_GetOptFSSpecPtr, &fromFile,
- FSSpec_Convert, &target,
- Alias_Convert, &alias))
- return NULL;
- _err = UpdateAlias(fromFile,
- &target,
- alias,
- &wasChanged);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("b",
- wasChanged);
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ FSSpec fromFile__buf__;
+ FSSpec *fromFile = &fromFile__buf__;
+ FSSpec target;
+ AliasHandle alias;
+ Boolean wasChanged;
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ myPyMac_GetOptFSSpecPtr, &fromFile,
+ FSSpec_Convert, &target,
+ Alias_Convert, &alias))
+ return NULL;
+ _err = UpdateAlias(fromFile,
+ &target,
+ alias,
+ &wasChanged);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("b",
+ wasChanged);
+ return _res;
}
static PyObject *File_ResolveAliasFileWithMountFlagsNoUI(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- FSSpec theSpec;
- Boolean resolveAliasChains;
- Boolean targetIsFolder;
- Boolean wasAliased;
- unsigned long mountFlags;
- if (!PyArg_ParseTuple(_args, "O&bl",
- FSSpec_Convert, &theSpec,
- &resolveAliasChains,
- &mountFlags))
- return NULL;
- _err = ResolveAliasFileWithMountFlagsNoUI(&theSpec,
- resolveAliasChains,
- &targetIsFolder,
- &wasAliased,
- mountFlags);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&bb",
- FSSpec_New, &theSpec,
- targetIsFolder,
- wasAliased);
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ FSSpec theSpec;
+ Boolean resolveAliasChains;
+ Boolean targetIsFolder;
+ Boolean wasAliased;
+ unsigned long mountFlags;
+ if (!PyArg_ParseTuple(_args, "O&bl",
+ FSSpec_Convert, &theSpec,
+ &resolveAliasChains,
+ &mountFlags))
+ return NULL;
+ _err = ResolveAliasFileWithMountFlagsNoUI(&theSpec,
+ resolveAliasChains,
+ &targetIsFolder,
+ &wasAliased,
+ mountFlags);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&bb",
+ FSSpec_New, &theSpec,
+ targetIsFolder,
+ wasAliased);
+ return _res;
}
#endif /* !__LP64__ */
static PyObject *File_FSNewAlias(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- FSRef fromFile__buf__;
- FSRef *fromFile = &fromFile__buf__;
- FSRef target;
- AliasHandle inAlias;
- if (!PyArg_ParseTuple(_args, "O&O&",
- myPyMac_GetOptFSRefPtr, &fromFile,
- FSRef_Convert, &target))
- return NULL;
- _err = FSNewAlias(fromFile,
- &target,
- &inAlias);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- Alias_New, inAlias);
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ FSRef fromFile__buf__;
+ FSRef *fromFile = &fromFile__buf__;
+ FSRef target;
+ AliasHandle inAlias;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ myPyMac_GetOptFSRefPtr, &fromFile,
+ FSRef_Convert, &target))
+ return NULL;
+ _err = FSNewAlias(fromFile,
+ &target,
+ &inAlias);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ Alias_New, inAlias);
+ return _res;
}
static PyObject *File_FSResolveAliasFileWithMountFlags(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- FSRef theRef;
- Boolean resolveAliasChains;
- Boolean targetIsFolder;
- Boolean wasAliased;
- unsigned long mountFlags;
- if (!PyArg_ParseTuple(_args, "O&bl",
- FSRef_Convert, &theRef,
- &resolveAliasChains,
- &mountFlags))
- return NULL;
- _err = FSResolveAliasFileWithMountFlags(&theRef,
- resolveAliasChains,
- &targetIsFolder,
- &wasAliased,
- mountFlags);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&bb",
- FSRef_New, &theRef,
- targetIsFolder,
- wasAliased);
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ FSRef theRef;
+ Boolean resolveAliasChains;
+ Boolean targetIsFolder;
+ Boolean wasAliased;
+ unsigned long mountFlags;
+ if (!PyArg_ParseTuple(_args, "O&bl",
+ FSRef_Convert, &theRef,
+ &resolveAliasChains,
+ &mountFlags))
+ return NULL;
+ _err = FSResolveAliasFileWithMountFlags(&theRef,
+ resolveAliasChains,
+ &targetIsFolder,
+ &wasAliased,
+ mountFlags);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&bb",
+ FSRef_New, &theRef,
+ targetIsFolder,
+ wasAliased);
+ return _res;
}
static PyObject *File_FSResolveAliasFile(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- FSRef theRef;
- Boolean resolveAliasChains;
- Boolean targetIsFolder;
- Boolean wasAliased;
- if (!PyArg_ParseTuple(_args, "O&b",
- FSRef_Convert, &theRef,
- &resolveAliasChains))
- return NULL;
- _err = FSResolveAliasFile(&theRef,
- resolveAliasChains,
- &targetIsFolder,
- &wasAliased);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&bb",
- FSRef_New, &theRef,
- targetIsFolder,
- wasAliased);
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ FSRef theRef;
+ Boolean resolveAliasChains;
+ Boolean targetIsFolder;
+ Boolean wasAliased;
+ if (!PyArg_ParseTuple(_args, "O&b",
+ FSRef_Convert, &theRef,
+ &resolveAliasChains))
+ return NULL;
+ _err = FSResolveAliasFile(&theRef,
+ resolveAliasChains,
+ &targetIsFolder,
+ &wasAliased);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&bb",
+ FSRef_New, &theRef,
+ targetIsFolder,
+ wasAliased);
+ return _res;
}
static PyObject *File_FSUpdateAlias(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- FSRef fromFile__buf__;
- FSRef *fromFile = &fromFile__buf__;
- FSRef target;
- AliasHandle alias;
- Boolean wasChanged;
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- myPyMac_GetOptFSRefPtr, &fromFile,
- FSRef_Convert, &target,
- Alias_Convert, &alias))
- return NULL;
- _err = FSUpdateAlias(fromFile,
- &target,
- alias,
- &wasChanged);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("b",
- wasChanged);
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ FSRef fromFile__buf__;
+ FSRef *fromFile = &fromFile__buf__;
+ FSRef target;
+ AliasHandle alias;
+ Boolean wasChanged;
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ myPyMac_GetOptFSRefPtr, &fromFile,
+ FSRef_Convert, &target,
+ Alias_Convert, &alias))
+ return NULL;
+ _err = FSUpdateAlias(fromFile,
+ &target,
+ alias,
+ &wasChanged);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("b",
+ wasChanged);
+ return _res;
}
static PyObject *File_pathname(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
- PyObject *obj;
+ PyObject *obj;
- if (!PyArg_ParseTuple(_args, "O", &obj))
- return NULL;
- if (PyString_Check(obj)) {
- Py_INCREF(obj);
- return obj;
- }
- if (PyUnicode_Check(obj))
- return PyUnicode_AsEncodedString(obj, "utf8", "strict");
- _res = PyObject_CallMethod(obj, "as_pathname", NULL);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O", &obj))
+ return NULL;
+ if (PyString_Check(obj)) {
+ Py_INCREF(obj);
+ return obj;
+ }
+ if (PyUnicode_Check(obj))
+ return PyUnicode_AsEncodedString(obj, "utf8", "strict");
+ _res = PyObject_CallMethod(obj, "as_pathname", NULL);
+ return _res;
}
static PyMethodDef File_methods[] = {
#ifndef __LP64__
- {"UnmountVol", (PyCFunction)File_UnmountVol, 1,
- PyDoc_STR("(Str63 volName, short vRefNum) -> None")},
- {"FlushVol", (PyCFunction)File_FlushVol, 1,
- PyDoc_STR("(Str63 volName, short vRefNum) -> None")},
- {"HSetVol", (PyCFunction)File_HSetVol, 1,
- PyDoc_STR("(Str63 volName, short vRefNum, long dirID) -> None")},
- {"FSClose", (PyCFunction)File_FSClose, 1,
- PyDoc_STR("(short refNum) -> None")},
- {"Allocate", (PyCFunction)File_Allocate, 1,
- PyDoc_STR("(short refNum) -> (long count)")},
- {"GetEOF", (PyCFunction)File_GetEOF, 1,
- PyDoc_STR("(short refNum) -> (long logEOF)")},
- {"SetEOF", (PyCFunction)File_SetEOF, 1,
- PyDoc_STR("(short refNum, long logEOF) -> None")},
- {"GetFPos", (PyCFunction)File_GetFPos, 1,
- PyDoc_STR("(short refNum) -> (long filePos)")},
- {"SetFPos", (PyCFunction)File_SetFPos, 1,
- PyDoc_STR("(short refNum, short posMode, long posOff) -> None")},
- {"GetVRefNum", (PyCFunction)File_GetVRefNum, 1,
- PyDoc_STR("(short fileRefNum) -> (short vRefNum)")},
- {"HGetVol", (PyCFunction)File_HGetVol, 1,
- PyDoc_STR("(StringPtr volName) -> (short vRefNum, long dirID)")},
- {"HOpen", (PyCFunction)File_HOpen, 1,
- PyDoc_STR("(short vRefNum, long dirID, Str255 fileName, SInt8 permission) -> (short refNum)")},
- {"HOpenDF", (PyCFunction)File_HOpenDF, 1,
- PyDoc_STR("(short vRefNum, long dirID, Str255 fileName, SInt8 permission) -> (short refNum)")},
- {"HOpenRF", (PyCFunction)File_HOpenRF, 1,
- PyDoc_STR("(short vRefNum, long dirID, Str255 fileName, SInt8 permission) -> (short refNum)")},
- {"AllocContig", (PyCFunction)File_AllocContig, 1,
- PyDoc_STR("(short refNum) -> (long count)")},
- {"HCreate", (PyCFunction)File_HCreate, 1,
- PyDoc_STR("(short vRefNum, long dirID, Str255 fileName, OSType creator, OSType fileType) -> None")},
- {"DirCreate", (PyCFunction)File_DirCreate, 1,
- PyDoc_STR("(short vRefNum, long parentDirID, Str255 directoryName) -> (long createdDirID)")},
- {"HDelete", (PyCFunction)File_HDelete, 1,
- PyDoc_STR("(short vRefNum, long dirID, Str255 fileName) -> None")},
- {"HGetFInfo", (PyCFunction)File_HGetFInfo, 1,
- PyDoc_STR("(short vRefNum, long dirID, Str255 fileName) -> (FInfo fndrInfo)")},
- {"HSetFInfo", (PyCFunction)File_HSetFInfo, 1,
- PyDoc_STR("(short vRefNum, long dirID, Str255 fileName, FInfo fndrInfo) -> None")},
- {"HSetFLock", (PyCFunction)File_HSetFLock, 1,
- PyDoc_STR("(short vRefNum, long dirID, Str255 fileName) -> None")},
- {"HRstFLock", (PyCFunction)File_HRstFLock, 1,
- PyDoc_STR("(short vRefNum, long dirID, Str255 fileName) -> None")},
- {"HRename", (PyCFunction)File_HRename, 1,
- PyDoc_STR("(short vRefNum, long dirID, Str255 oldName, Str255 newName) -> None")},
- {"CatMove", (PyCFunction)File_CatMove, 1,
- PyDoc_STR("(short vRefNum, long dirID, Str255 oldName, long newDirID, Str255 newName) -> None")},
- {"FSMakeFSSpec", (PyCFunction)File_FSMakeFSSpec, 1,
- PyDoc_STR("(short vRefNum, long dirID, Str255 fileName) -> (FSSpec spec)")},
+ {"UnmountVol", (PyCFunction)File_UnmountVol, 1,
+ PyDoc_STR("(Str63 volName, short vRefNum) -> None")},
+ {"FlushVol", (PyCFunction)File_FlushVol, 1,
+ PyDoc_STR("(Str63 volName, short vRefNum) -> None")},
+ {"HSetVol", (PyCFunction)File_HSetVol, 1,
+ PyDoc_STR("(Str63 volName, short vRefNum, long dirID) -> None")},
+ {"FSClose", (PyCFunction)File_FSClose, 1,
+ PyDoc_STR("(short refNum) -> None")},
+ {"Allocate", (PyCFunction)File_Allocate, 1,
+ PyDoc_STR("(short refNum) -> (long count)")},
+ {"GetEOF", (PyCFunction)File_GetEOF, 1,
+ PyDoc_STR("(short refNum) -> (long logEOF)")},
+ {"SetEOF", (PyCFunction)File_SetEOF, 1,
+ PyDoc_STR("(short refNum, long logEOF) -> None")},
+ {"GetFPos", (PyCFunction)File_GetFPos, 1,
+ PyDoc_STR("(short refNum) -> (long filePos)")},
+ {"SetFPos", (PyCFunction)File_SetFPos, 1,
+ PyDoc_STR("(short refNum, short posMode, long posOff) -> None")},
+ {"GetVRefNum", (PyCFunction)File_GetVRefNum, 1,
+ PyDoc_STR("(short fileRefNum) -> (short vRefNum)")},
+ {"HGetVol", (PyCFunction)File_HGetVol, 1,
+ PyDoc_STR("(StringPtr volName) -> (short vRefNum, long dirID)")},
+ {"HOpen", (PyCFunction)File_HOpen, 1,
+ PyDoc_STR("(short vRefNum, long dirID, Str255 fileName, SInt8 permission) -> (short refNum)")},
+ {"HOpenDF", (PyCFunction)File_HOpenDF, 1,
+ PyDoc_STR("(short vRefNum, long dirID, Str255 fileName, SInt8 permission) -> (short refNum)")},
+ {"HOpenRF", (PyCFunction)File_HOpenRF, 1,
+ PyDoc_STR("(short vRefNum, long dirID, Str255 fileName, SInt8 permission) -> (short refNum)")},
+ {"AllocContig", (PyCFunction)File_AllocContig, 1,
+ PyDoc_STR("(short refNum) -> (long count)")},
+ {"HCreate", (PyCFunction)File_HCreate, 1,
+ PyDoc_STR("(short vRefNum, long dirID, Str255 fileName, OSType creator, OSType fileType) -> None")},
+ {"DirCreate", (PyCFunction)File_DirCreate, 1,
+ PyDoc_STR("(short vRefNum, long parentDirID, Str255 directoryName) -> (long createdDirID)")},
+ {"HDelete", (PyCFunction)File_HDelete, 1,
+ PyDoc_STR("(short vRefNum, long dirID, Str255 fileName) -> None")},
+ {"HGetFInfo", (PyCFunction)File_HGetFInfo, 1,
+ PyDoc_STR("(short vRefNum, long dirID, Str255 fileName) -> (FInfo fndrInfo)")},
+ {"HSetFInfo", (PyCFunction)File_HSetFInfo, 1,
+ PyDoc_STR("(short vRefNum, long dirID, Str255 fileName, FInfo fndrInfo) -> None")},
+ {"HSetFLock", (PyCFunction)File_HSetFLock, 1,
+ PyDoc_STR("(short vRefNum, long dirID, Str255 fileName) -> None")},
+ {"HRstFLock", (PyCFunction)File_HRstFLock, 1,
+ PyDoc_STR("(short vRefNum, long dirID, Str255 fileName) -> None")},
+ {"HRename", (PyCFunction)File_HRename, 1,
+ PyDoc_STR("(short vRefNum, long dirID, Str255 oldName, Str255 newName) -> None")},
+ {"CatMove", (PyCFunction)File_CatMove, 1,
+ PyDoc_STR("(short vRefNum, long dirID, Str255 oldName, long newDirID, Str255 newName) -> None")},
+ {"FSMakeFSSpec", (PyCFunction)File_FSMakeFSSpec, 1,
+ PyDoc_STR("(short vRefNum, long dirID, Str255 fileName) -> (FSSpec spec)")},
#endif /* !__LP64__*/
- {"FSGetForkPosition", (PyCFunction)File_FSGetForkPosition, 1,
- PyDoc_STR("(SInt16 forkRefNum) -> (SInt64 position)")},
- {"FSSetForkPosition", (PyCFunction)File_FSSetForkPosition, 1,
- PyDoc_STR("(SInt16 forkRefNum, UInt16 positionMode, SInt64 positionOffset) -> None")},
- {"FSGetForkSize", (PyCFunction)File_FSGetForkSize, 1,
- PyDoc_STR("(SInt16 forkRefNum) -> (SInt64 forkSize)")},
- {"FSSetForkSize", (PyCFunction)File_FSSetForkSize, 1,
- PyDoc_STR("(SInt16 forkRefNum, UInt16 positionMode, SInt64 positionOffset) -> None")},
- {"FSAllocateFork", (PyCFunction)File_FSAllocateFork, 1,
- PyDoc_STR("(SInt16 forkRefNum, FSAllocationFlags flags, UInt16 positionMode, SInt64 positionOffset, UInt64 requestCount) -> (UInt64 actualCount)")},
- {"FSFlushFork", (PyCFunction)File_FSFlushFork, 1,
- PyDoc_STR("(SInt16 forkRefNum) -> None")},
- {"FSCloseFork", (PyCFunction)File_FSCloseFork, 1,
- PyDoc_STR("(SInt16 forkRefNum) -> None")},
- {"FSGetDataForkName", (PyCFunction)File_FSGetDataForkName, 1,
- PyDoc_STR("() -> (HFSUniStr255 dataForkName)")},
- {"FSGetResourceForkName", (PyCFunction)File_FSGetResourceForkName, 1,
- PyDoc_STR("() -> (HFSUniStr255 resourceForkName)")},
- {"FSPathMakeRef", (PyCFunction)File_FSPathMakeRef, 1,
- PyDoc_STR("(UInt8 * path) -> (FSRef ref, Boolean isDirectory)")},
- {"FNNotifyByPath", (PyCFunction)File_FNNotifyByPath, 1,
- PyDoc_STR("(UInt8 * path, FNMessage message, OptionBits flags) -> None")},
- {"FNNotifyAll", (PyCFunction)File_FNNotifyAll, 1,
- PyDoc_STR("(FNMessage message, OptionBits flags) -> None")},
+ {"FSGetForkPosition", (PyCFunction)File_FSGetForkPosition, 1,
+ PyDoc_STR("(SInt16 forkRefNum) -> (SInt64 position)")},
+ {"FSSetForkPosition", (PyCFunction)File_FSSetForkPosition, 1,
+ PyDoc_STR("(SInt16 forkRefNum, UInt16 positionMode, SInt64 positionOffset) -> None")},
+ {"FSGetForkSize", (PyCFunction)File_FSGetForkSize, 1,
+ PyDoc_STR("(SInt16 forkRefNum) -> (SInt64 forkSize)")},
+ {"FSSetForkSize", (PyCFunction)File_FSSetForkSize, 1,
+ PyDoc_STR("(SInt16 forkRefNum, UInt16 positionMode, SInt64 positionOffset) -> None")},
+ {"FSAllocateFork", (PyCFunction)File_FSAllocateFork, 1,
+ PyDoc_STR("(SInt16 forkRefNum, FSAllocationFlags flags, UInt16 positionMode, SInt64 positionOffset, UInt64 requestCount) -> (UInt64 actualCount)")},
+ {"FSFlushFork", (PyCFunction)File_FSFlushFork, 1,
+ PyDoc_STR("(SInt16 forkRefNum) -> None")},
+ {"FSCloseFork", (PyCFunction)File_FSCloseFork, 1,
+ PyDoc_STR("(SInt16 forkRefNum) -> None")},
+ {"FSGetDataForkName", (PyCFunction)File_FSGetDataForkName, 1,
+ PyDoc_STR("() -> (HFSUniStr255 dataForkName)")},
+ {"FSGetResourceForkName", (PyCFunction)File_FSGetResourceForkName, 1,
+ PyDoc_STR("() -> (HFSUniStr255 resourceForkName)")},
+ {"FSPathMakeRef", (PyCFunction)File_FSPathMakeRef, 1,
+ PyDoc_STR("(UInt8 * path) -> (FSRef ref, Boolean isDirectory)")},
+ {"FNNotifyByPath", (PyCFunction)File_FNNotifyByPath, 1,
+ PyDoc_STR("(UInt8 * path, FNMessage message, OptionBits flags) -> None")},
+ {"FNNotifyAll", (PyCFunction)File_FNNotifyAll, 1,
+ PyDoc_STR("(FNMessage message, OptionBits flags) -> None")},
#ifndef __LP64__
- {"NewAlias", (PyCFunction)File_NewAlias, 1,
- PyDoc_STR("(FSSpec fromFile, FSSpec target) -> (AliasHandle alias)")},
- {"NewAliasMinimalFromFullPath", (PyCFunction)File_NewAliasMinimalFromFullPath, 1,
- PyDoc_STR("(Buffer fullPath, Str32 zoneName, Str31 serverName) -> (AliasHandle alias)")},
- {"ResolveAliasFile", (PyCFunction)File_ResolveAliasFile, 1,
- PyDoc_STR("(FSSpec theSpec, Boolean resolveAliasChains) -> (FSSpec theSpec, Boolean targetIsFolder, Boolean wasAliased)")},
- {"ResolveAliasFileWithMountFlags", (PyCFunction)File_ResolveAliasFileWithMountFlags, 1,
- PyDoc_STR("(FSSpec theSpec, Boolean resolveAliasChains, unsigned long mountFlags) -> (FSSpec theSpec, Boolean targetIsFolder, Boolean wasAliased)")},
- {"UpdateAlias", (PyCFunction)File_UpdateAlias, 1,
- PyDoc_STR("(FSSpec fromFile, FSSpec target, AliasHandle alias) -> (Boolean wasChanged)")},
- {"ResolveAliasFileWithMountFlagsNoUI", (PyCFunction)File_ResolveAliasFileWithMountFlagsNoUI, 1,
- PyDoc_STR("(FSSpec theSpec, Boolean resolveAliasChains, unsigned long mountFlags) -> (FSSpec theSpec, Boolean targetIsFolder, Boolean wasAliased)")},
+ {"NewAlias", (PyCFunction)File_NewAlias, 1,
+ PyDoc_STR("(FSSpec fromFile, FSSpec target) -> (AliasHandle alias)")},
+ {"NewAliasMinimalFromFullPath", (PyCFunction)File_NewAliasMinimalFromFullPath, 1,
+ PyDoc_STR("(Buffer fullPath, Str32 zoneName, Str31 serverName) -> (AliasHandle alias)")},
+ {"ResolveAliasFile", (PyCFunction)File_ResolveAliasFile, 1,
+ PyDoc_STR("(FSSpec theSpec, Boolean resolveAliasChains) -> (FSSpec theSpec, Boolean targetIsFolder, Boolean wasAliased)")},
+ {"ResolveAliasFileWithMountFlags", (PyCFunction)File_ResolveAliasFileWithMountFlags, 1,
+ PyDoc_STR("(FSSpec theSpec, Boolean resolveAliasChains, unsigned long mountFlags) -> (FSSpec theSpec, Boolean targetIsFolder, Boolean wasAliased)")},
+ {"UpdateAlias", (PyCFunction)File_UpdateAlias, 1,
+ PyDoc_STR("(FSSpec fromFile, FSSpec target, AliasHandle alias) -> (Boolean wasChanged)")},
+ {"ResolveAliasFileWithMountFlagsNoUI", (PyCFunction)File_ResolveAliasFileWithMountFlagsNoUI, 1,
+ PyDoc_STR("(FSSpec theSpec, Boolean resolveAliasChains, unsigned long mountFlags) -> (FSSpec theSpec, Boolean targetIsFolder, Boolean wasAliased)")},
#endif /* !__LP64__ */
- {"FSNewAlias", (PyCFunction)File_FSNewAlias, 1,
- PyDoc_STR("(FSRef fromFile, FSRef target) -> (AliasHandle inAlias)")},
- {"FSResolveAliasFileWithMountFlags", (PyCFunction)File_FSResolveAliasFileWithMountFlags, 1,
- PyDoc_STR("(FSRef theRef, Boolean resolveAliasChains, unsigned long mountFlags) -> (FSRef theRef, Boolean targetIsFolder, Boolean wasAliased)")},
- {"FSResolveAliasFile", (PyCFunction)File_FSResolveAliasFile, 1,
- PyDoc_STR("(FSRef theRef, Boolean resolveAliasChains) -> (FSRef theRef, Boolean targetIsFolder, Boolean wasAliased)")},
- {"FSUpdateAlias", (PyCFunction)File_FSUpdateAlias, 1,
- PyDoc_STR("(FSRef fromFile, FSRef target, AliasHandle alias) -> (Boolean wasChanged)")},
- {"pathname", (PyCFunction)File_pathname, 1,
- PyDoc_STR("(str|unicode|FSSpec|FSref) -> pathname")},
- {NULL, NULL, 0}
+ {"FSNewAlias", (PyCFunction)File_FSNewAlias, 1,
+ PyDoc_STR("(FSRef fromFile, FSRef target) -> (AliasHandle inAlias)")},
+ {"FSResolveAliasFileWithMountFlags", (PyCFunction)File_FSResolveAliasFileWithMountFlags, 1,
+ PyDoc_STR("(FSRef theRef, Boolean resolveAliasChains, unsigned long mountFlags) -> (FSRef theRef, Boolean targetIsFolder, Boolean wasAliased)")},
+ {"FSResolveAliasFile", (PyCFunction)File_FSResolveAliasFile, 1,
+ PyDoc_STR("(FSRef theRef, Boolean resolveAliasChains) -> (FSRef theRef, Boolean targetIsFolder, Boolean wasAliased)")},
+ {"FSUpdateAlias", (PyCFunction)File_FSUpdateAlias, 1,
+ PyDoc_STR("(FSRef fromFile, FSRef target, AliasHandle alias) -> (Boolean wasChanged)")},
+ {"pathname", (PyCFunction)File_pathname, 1,
+ PyDoc_STR("(str|unicode|FSSpec|FSref) -> pathname")},
+ {NULL, NULL, 0}
};
@@ -3251,159 +3251,159 @@ static PyMethodDef File_methods[] = {
int
PyMac_GetFSSpec(PyObject *v, FSSpec *spec)
{
- Str255 path;
- short refnum;
- long parid;
- OSErr err;
- FSRef fsr;
-
- if (FSSpec_Check(v)) {
- *spec = ((FSSpecObject *)v)->ob_itself;
- return 1;
- }
-
- if (PyArg_Parse(v, "(hlO&)",
- &refnum, &parid, PyMac_GetStr255, &path)) {
- err = FSMakeFSSpec(refnum, parid, path, spec);
- if ( err && err != fnfErr ) {
- PyMac_Error(err);
- return 0;
- }
- return 1;
+ Str255 path;
+ short refnum;
+ long parid;
+ OSErr err;
+ FSRef fsr;
+
+ if (FSSpec_Check(v)) {
+ *spec = ((FSSpecObject *)v)->ob_itself;
+ return 1;
+ }
+
+ if (PyArg_Parse(v, "(hlO&)",
+ &refnum, &parid, PyMac_GetStr255, &path)) {
+ err = FSMakeFSSpec(refnum, parid, path, spec);
+ if ( err && err != fnfErr ) {
+ PyMac_Error(err);
+ return 0;
}
- PyErr_Clear();
- /* Otherwise we try to go via an FSRef. On OSX we go all the way,
- ** on OS9 we accept only a real FSRef object
- */
- if ( PyMac_GetFSRef(v, &fsr) ) {
- err = FSGetCatalogInfo(&fsr, kFSCatInfoNone, NULL, NULL, spec, NULL);
- if (err != noErr) {
- PyMac_Error(err);
- return 0;
- }
- return 1;
+ return 1;
+ }
+ PyErr_Clear();
+ /* Otherwise we try to go via an FSRef. On OSX we go all the way,
+ ** on OS9 we accept only a real FSRef object
+ */
+ if ( PyMac_GetFSRef(v, &fsr) ) {
+ err = FSGetCatalogInfo(&fsr, kFSCatInfoNone, NULL, NULL, spec, NULL);
+ if (err != noErr) {
+ PyMac_Error(err);
+ return 0;
}
- return 0;
+ return 1;
+ }
+ return 0;
}
#endif /* !__LP64__ */
int
PyMac_GetFSRef(PyObject *v, FSRef *fsr)
{
- OSStatus err;
+ OSStatus err;
#ifndef __LP64__
- FSSpec fss;
+ FSSpec fss;
#endif /* !__LP64__ */
- if (FSRef_Check(v)) {
- *fsr = ((FSRefObject *)v)->ob_itself;
- return 1;
- }
-
- /* On OSX we now try a pathname */
- if ( PyString_Check(v) || PyUnicode_Check(v)) {
- char *path = NULL;
- if (!PyArg_Parse(v, "et", Py_FileSystemDefaultEncoding, &path))
- return 0;
- if ( (err=FSPathMakeRef((unsigned char*)path, fsr, NULL)) )
- PyMac_Error(err);
- PyMem_Free(path);
- return !err;
- }
- /* XXXX Should try unicode here too */
+ if (FSRef_Check(v)) {
+ *fsr = ((FSRefObject *)v)->ob_itself;
+ return 1;
+ }
+
+ /* On OSX we now try a pathname */
+ if ( PyString_Check(v) || PyUnicode_Check(v)) {
+ char *path = NULL;
+ if (!PyArg_Parse(v, "et", Py_FileSystemDefaultEncoding, &path))
+ return 0;
+ if ( (err=FSPathMakeRef((unsigned char*)path, fsr, NULL)) )
+ PyMac_Error(err);
+ PyMem_Free(path);
+ return !err;
+ }
+ /* XXXX Should try unicode here too */
#ifndef __LP64__
- /* Otherwise we try to go via an FSSpec */
- if (FSSpec_Check(v)) {
- fss = ((FSSpecObject *)v)->ob_itself;
- if ((err=FSpMakeFSRef(&fss, fsr)) == 0)
- return 1;
- PyMac_Error(err);
- return 0;
- }
+ /* Otherwise we try to go via an FSSpec */
+ if (FSSpec_Check(v)) {
+ fss = ((FSSpecObject *)v)->ob_itself;
+ if ((err=FSpMakeFSRef(&fss, fsr)) == 0)
+ return 1;
+ PyMac_Error(err);
+ return 0;
+ }
#endif /* !__LP64__ */
- PyErr_SetString(PyExc_TypeError, "FSRef, FSSpec or pathname required");
- return 0;
+ PyErr_SetString(PyExc_TypeError, "FSRef, FSSpec or pathname required");
+ return 0;
}
#ifndef __LP64__
extern PyObject *
PyMac_BuildFSSpec(FSSpec *spec)
{
- return FSSpec_New(spec);
+ return FSSpec_New(spec);
}
#endif /* !__LP64__ */
extern PyObject *
PyMac_BuildFSRef(FSRef *spec)
{
- return FSRef_New(spec);
+ return FSRef_New(spec);
}
void init_File(void)
{
- PyObject *m;
- PyObject *d;
+ PyObject *m;
+ PyObject *d;
#ifndef __LP64__
- PyMac_INIT_TOOLBOX_OBJECT_NEW(FSSpec *, PyMac_BuildFSSpec);
- PyMac_INIT_TOOLBOX_OBJECT_CONVERT(FSSpec, PyMac_GetFSSpec);
+ PyMac_INIT_TOOLBOX_OBJECT_NEW(FSSpec *, PyMac_BuildFSSpec);
+ PyMac_INIT_TOOLBOX_OBJECT_CONVERT(FSSpec, PyMac_GetFSSpec);
#endif /* !__LP64__ */
- PyMac_INIT_TOOLBOX_OBJECT_NEW(FSRef *, PyMac_BuildFSRef);
- PyMac_INIT_TOOLBOX_OBJECT_CONVERT(FSRef, PyMac_GetFSRef);
+ PyMac_INIT_TOOLBOX_OBJECT_NEW(FSRef *, PyMac_BuildFSRef);
+ PyMac_INIT_TOOLBOX_OBJECT_CONVERT(FSRef, PyMac_GetFSRef);
- m = Py_InitModule("_File", File_methods);
- d = PyModule_GetDict(m);
- File_Error = PyMac_GetOSErrException();
- if (File_Error == NULL ||
- PyDict_SetItemString(d, "Error", File_Error) != 0)
- return;
- FSCatalogInfo_Type.ob_type = &PyType_Type;
- if (PyType_Ready(&FSCatalogInfo_Type) < 0) return;
- Py_INCREF(&FSCatalogInfo_Type);
- PyModule_AddObject(m, "FSCatalogInfo", (PyObject *)&FSCatalogInfo_Type);
- /* Backward-compatible name */
- Py_INCREF(&FSCatalogInfo_Type);
- PyModule_AddObject(m, "FSCatalogInfoType", (PyObject *)&FSCatalogInfo_Type);
+ m = Py_InitModule("_File", File_methods);
+ d = PyModule_GetDict(m);
+ File_Error = PyMac_GetOSErrException();
+ if (File_Error == NULL ||
+ PyDict_SetItemString(d, "Error", File_Error) != 0)
+ return;
+ FSCatalogInfo_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&FSCatalogInfo_Type) < 0) return;
+ Py_INCREF(&FSCatalogInfo_Type);
+ PyModule_AddObject(m, "FSCatalogInfo", (PyObject *)&FSCatalogInfo_Type);
+ /* Backward-compatible name */
+ Py_INCREF(&FSCatalogInfo_Type);
+ PyModule_AddObject(m, "FSCatalogInfoType", (PyObject *)&FSCatalogInfo_Type);
#ifndef __LP64__
- FInfo_Type.ob_type = &PyType_Type;
- if (PyType_Ready(&FInfo_Type) < 0) return;
- Py_INCREF(&FInfo_Type);
- PyModule_AddObject(m, "FInfo", (PyObject *)&FInfo_Type);
- /* Backward-compatible name */
- Py_INCREF(&FInfo_Type);
- PyModule_AddObject(m, "FInfoType", (PyObject *)&FInfo_Type);
+ FInfo_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&FInfo_Type) < 0) return;
+ Py_INCREF(&FInfo_Type);
+ PyModule_AddObject(m, "FInfo", (PyObject *)&FInfo_Type);
+ /* Backward-compatible name */
+ Py_INCREF(&FInfo_Type);
+ PyModule_AddObject(m, "FInfoType", (PyObject *)&FInfo_Type);
#endif /* !__LP64__ */
- Alias_Type.ob_type = &PyType_Type;
- if (PyType_Ready(&Alias_Type) < 0) return;
- Py_INCREF(&Alias_Type);
- PyModule_AddObject(m, "Alias", (PyObject *)&Alias_Type);
- /* Backward-compatible name */
- Py_INCREF(&Alias_Type);
- PyModule_AddObject(m, "AliasType", (PyObject *)&Alias_Type);
+ Alias_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&Alias_Type) < 0) return;
+ Py_INCREF(&Alias_Type);
+ PyModule_AddObject(m, "Alias", (PyObject *)&Alias_Type);
+ /* Backward-compatible name */
+ Py_INCREF(&Alias_Type);
+ PyModule_AddObject(m, "AliasType", (PyObject *)&Alias_Type);
#ifndef __LP64__
- FSSpec_Type.ob_type = &PyType_Type;
- if (PyType_Ready(&FSSpec_Type) < 0) return;
- Py_INCREF(&FSSpec_Type);
- PyModule_AddObject(m, "FSSpec", (PyObject *)&FSSpec_Type);
- /* Backward-compatible name */
- Py_INCREF(&FSSpec_Type);
- PyModule_AddObject(m, "FSSpecType", (PyObject *)&FSSpec_Type);
+ FSSpec_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&FSSpec_Type) < 0) return;
+ Py_INCREF(&FSSpec_Type);
+ PyModule_AddObject(m, "FSSpec", (PyObject *)&FSSpec_Type);
+ /* Backward-compatible name */
+ Py_INCREF(&FSSpec_Type);
+ PyModule_AddObject(m, "FSSpecType", (PyObject *)&FSSpec_Type);
#endif /* !__LP64__ */
- FSRef_Type.ob_type = &PyType_Type;
- if (PyType_Ready(&FSRef_Type) < 0) return;
- Py_INCREF(&FSRef_Type);
- PyModule_AddObject(m, "FSRef", (PyObject *)&FSRef_Type);
- /* Backward-compatible name */
- Py_INCREF(&FSRef_Type);
- PyModule_AddObject(m, "FSRefType", (PyObject *)&FSRef_Type);
+ FSRef_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&FSRef_Type) < 0) return;
+ Py_INCREF(&FSRef_Type);
+ PyModule_AddObject(m, "FSRef", (PyObject *)&FSRef_Type);
+ /* Backward-compatible name */
+ Py_INCREF(&FSRef_Type);
+ PyModule_AddObject(m, "FSRefType", (PyObject *)&FSRef_Type);
}
/* ======================== End module _File ======================== */
diff --git a/Mac/Modules/fm/_Fmmodule.c b/Mac/Modules/fm/_Fmmodule.c
index b982cc3..adc47aa 100644
--- a/Mac/Modules/fm/_Fmmodule.c
+++ b/Mac/Modules/fm/_Fmmodule.c
@@ -10,9 +10,9 @@
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
- PyErr_SetString(PyExc_NotImplementedError, \
- "Not available in this shared library/OS version"); \
- return NULL; \
+ PyErr_SetString(PyExc_NotImplementedError, \
+ "Not available in this shared library/OS version"); \
+ return NULL; \
}} while(0)
@@ -26,12 +26,12 @@ static PyObject *
FMRec_New(FMetricRec *itself)
{
- return Py_BuildValue("O&O&O&O&O&",
- PyMac_BuildFixed, itself->ascent,
- PyMac_BuildFixed, itself->descent,
- PyMac_BuildFixed, itself->leading,
- PyMac_BuildFixed, itself->widMax,
- ResObj_New, itself->wTabHandle);
+ return Py_BuildValue("O&O&O&O&O&",
+ PyMac_BuildFixed, itself->ascent,
+ PyMac_BuildFixed, itself->descent,
+ PyMac_BuildFixed, itself->leading,
+ PyMac_BuildFixed, itself->widMax,
+ ResObj_New, itself->wTabHandle);
}
#if 0
@@ -39,12 +39,12 @@ FMRec_New(FMetricRec *itself)
static int
FMRec_Convert(PyObject *v, FMetricRec *p_itself)
{
- return PyArg_ParseTuple(v, "O&O&O&O&O&",
- PyMac_GetFixed, &itself->ascent,
- PyMac_GetFixed, &itself->descent,
- PyMac_GetFixed, &itself->leading,
- PyMac_GetFixed, &itself->widMax,
- ResObj_Convert, &itself->wTabHandle);
+ return PyArg_ParseTuple(v, "O&O&O&O&O&",
+ PyMac_GetFixed, &itself->ascent,
+ PyMac_GetFixed, &itself->descent,
+ PyMac_GetFixed, &itself->leading,
+ PyMac_GetFixed, &itself->widMax,
+ ResObj_Convert, &itself->wTabHandle);
}
#endif
@@ -53,314 +53,314 @@ static PyObject *Fm_Error;
static PyObject *Fm_GetFontName(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short familyID;
- Str255 name;
+ PyObject *_res = NULL;
+ short familyID;
+ Str255 name;
#ifndef GetFontName
- PyMac_PRECHECK(GetFontName);
+ PyMac_PRECHECK(GetFontName);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &familyID))
- return NULL;
- GetFontName(familyID,
- name);
- _res = Py_BuildValue("O&",
- PyMac_BuildStr255, name);
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &familyID))
+ return NULL;
+ GetFontName(familyID,
+ name);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildStr255, name);
+ return _res;
}
static PyObject *Fm_GetFNum(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Str255 name;
- short familyID;
+ PyObject *_res = NULL;
+ Str255 name;
+ short familyID;
#ifndef GetFNum
- PyMac_PRECHECK(GetFNum);
+ PyMac_PRECHECK(GetFNum);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetStr255, name))
- return NULL;
- GetFNum(name,
- &familyID);
- _res = Py_BuildValue("h",
- familyID);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetStr255, name))
+ return NULL;
+ GetFNum(name,
+ &familyID);
+ _res = Py_BuildValue("h",
+ familyID);
+ return _res;
}
static PyObject *Fm_RealFont(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- short fontNum;
- short size;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ short fontNum;
+ short size;
#ifndef RealFont
- PyMac_PRECHECK(RealFont);
+ PyMac_PRECHECK(RealFont);
#endif
- if (!PyArg_ParseTuple(_args, "hh",
- &fontNum,
- &size))
- return NULL;
- _rv = RealFont(fontNum,
- size);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "hh",
+ &fontNum,
+ &size))
+ return NULL;
+ _rv = RealFont(fontNum,
+ size);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *Fm_SetFScaleDisable(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean fscaleDisable;
+ PyObject *_res = NULL;
+ Boolean fscaleDisable;
#ifndef SetFScaleDisable
- PyMac_PRECHECK(SetFScaleDisable);
+ PyMac_PRECHECK(SetFScaleDisable);
#endif
- if (!PyArg_ParseTuple(_args, "b",
- &fscaleDisable))
- return NULL;
- SetFScaleDisable(fscaleDisable);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "b",
+ &fscaleDisable))
+ return NULL;
+ SetFScaleDisable(fscaleDisable);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Fm_FontMetrics(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- FMetricRec theMetrics;
+ PyObject *_res = NULL;
+ FMetricRec theMetrics;
#ifndef FontMetrics
- PyMac_PRECHECK(FontMetrics);
+ PyMac_PRECHECK(FontMetrics);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- FontMetrics(&theMetrics);
- _res = Py_BuildValue("O&",
- FMRec_New, &theMetrics);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ FontMetrics(&theMetrics);
+ _res = Py_BuildValue("O&",
+ FMRec_New, &theMetrics);
+ return _res;
}
static PyObject *Fm_SetFractEnable(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean fractEnable;
+ PyObject *_res = NULL;
+ Boolean fractEnable;
#ifndef SetFractEnable
- PyMac_PRECHECK(SetFractEnable);
+ PyMac_PRECHECK(SetFractEnable);
#endif
- if (!PyArg_ParseTuple(_args, "b",
- &fractEnable))
- return NULL;
- SetFractEnable(fractEnable);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "b",
+ &fractEnable))
+ return NULL;
+ SetFractEnable(fractEnable);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Fm_GetDefFontSize(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short _rv;
+ PyObject *_res = NULL;
+ short _rv;
#ifndef GetDefFontSize
- PyMac_PRECHECK(GetDefFontSize);
+ PyMac_PRECHECK(GetDefFontSize);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetDefFontSize();
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetDefFontSize();
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *Fm_IsOutline(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- Point numer;
- Point denom;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ Point numer;
+ Point denom;
#ifndef IsOutline
- PyMac_PRECHECK(IsOutline);
+ PyMac_PRECHECK(IsOutline);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- PyMac_GetPoint, &numer,
- PyMac_GetPoint, &denom))
- return NULL;
- _rv = IsOutline(numer,
- denom);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ PyMac_GetPoint, &numer,
+ PyMac_GetPoint, &denom))
+ return NULL;
+ _rv = IsOutline(numer,
+ denom);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *Fm_SetOutlinePreferred(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean outlinePreferred;
+ PyObject *_res = NULL;
+ Boolean outlinePreferred;
#ifndef SetOutlinePreferred
- PyMac_PRECHECK(SetOutlinePreferred);
+ PyMac_PRECHECK(SetOutlinePreferred);
#endif
- if (!PyArg_ParseTuple(_args, "b",
- &outlinePreferred))
- return NULL;
- SetOutlinePreferred(outlinePreferred);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "b",
+ &outlinePreferred))
+ return NULL;
+ SetOutlinePreferred(outlinePreferred);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Fm_GetOutlinePreferred(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
+ PyObject *_res = NULL;
+ Boolean _rv;
#ifndef GetOutlinePreferred
- PyMac_PRECHECK(GetOutlinePreferred);
+ PyMac_PRECHECK(GetOutlinePreferred);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetOutlinePreferred();
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetOutlinePreferred();
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *Fm_SetPreserveGlyph(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean preserveGlyph;
+ PyObject *_res = NULL;
+ Boolean preserveGlyph;
#ifndef SetPreserveGlyph
- PyMac_PRECHECK(SetPreserveGlyph);
+ PyMac_PRECHECK(SetPreserveGlyph);
#endif
- if (!PyArg_ParseTuple(_args, "b",
- &preserveGlyph))
- return NULL;
- SetPreserveGlyph(preserveGlyph);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "b",
+ &preserveGlyph))
+ return NULL;
+ SetPreserveGlyph(preserveGlyph);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Fm_GetPreserveGlyph(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
+ PyObject *_res = NULL;
+ Boolean _rv;
#ifndef GetPreserveGlyph
- PyMac_PRECHECK(GetPreserveGlyph);
+ PyMac_PRECHECK(GetPreserveGlyph);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetPreserveGlyph();
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetPreserveGlyph();
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *Fm_GetSysFont(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short _rv;
+ PyObject *_res = NULL;
+ short _rv;
#ifndef GetSysFont
- PyMac_PRECHECK(GetSysFont);
+ PyMac_PRECHECK(GetSysFont);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetSysFont();
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetSysFont();
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *Fm_GetAppFont(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short _rv;
+ PyObject *_res = NULL;
+ short _rv;
#ifndef GetAppFont
- PyMac_PRECHECK(GetAppFont);
+ PyMac_PRECHECK(GetAppFont);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetAppFont();
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetAppFont();
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *Fm_QDTextBounds(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- char *inText__in__;
- int inText__len__;
- int inText__in_len__;
- Rect bounds;
+ PyObject *_res = NULL;
+ char *inText__in__;
+ int inText__len__;
+ int inText__in_len__;
+ Rect bounds;
#ifndef QDTextBounds
- PyMac_PRECHECK(QDTextBounds);
+ PyMac_PRECHECK(QDTextBounds);
#endif
- if (!PyArg_ParseTuple(_args, "s#",
- &inText__in__, &inText__in_len__))
- return NULL;
- inText__len__ = inText__in_len__;
- QDTextBounds(inText__len__, inText__in__,
- &bounds);
- _res = Py_BuildValue("O&",
- PyMac_BuildRect, &bounds);
- return _res;
+ if (!PyArg_ParseTuple(_args, "s#",
+ &inText__in__, &inText__in_len__))
+ return NULL;
+ inText__len__ = inText__in_len__;
+ QDTextBounds(inText__len__, inText__in__,
+ &bounds);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildRect, &bounds);
+ return _res;
}
static PyMethodDef Fm_methods[] = {
- {"GetFontName", (PyCFunction)Fm_GetFontName, 1,
- PyDoc_STR("(short familyID) -> (Str255 name)")},
- {"GetFNum", (PyCFunction)Fm_GetFNum, 1,
- PyDoc_STR("(Str255 name) -> (short familyID)")},
- {"RealFont", (PyCFunction)Fm_RealFont, 1,
- PyDoc_STR("(short fontNum, short size) -> (Boolean _rv)")},
- {"SetFScaleDisable", (PyCFunction)Fm_SetFScaleDisable, 1,
- PyDoc_STR("(Boolean fscaleDisable) -> None")},
- {"FontMetrics", (PyCFunction)Fm_FontMetrics, 1,
- PyDoc_STR("() -> (FMetricRec theMetrics)")},
- {"SetFractEnable", (PyCFunction)Fm_SetFractEnable, 1,
- PyDoc_STR("(Boolean fractEnable) -> None")},
- {"GetDefFontSize", (PyCFunction)Fm_GetDefFontSize, 1,
- PyDoc_STR("() -> (short _rv)")},
- {"IsOutline", (PyCFunction)Fm_IsOutline, 1,
- PyDoc_STR("(Point numer, Point denom) -> (Boolean _rv)")},
- {"SetOutlinePreferred", (PyCFunction)Fm_SetOutlinePreferred, 1,
- PyDoc_STR("(Boolean outlinePreferred) -> None")},
- {"GetOutlinePreferred", (PyCFunction)Fm_GetOutlinePreferred, 1,
- PyDoc_STR("() -> (Boolean _rv)")},
- {"SetPreserveGlyph", (PyCFunction)Fm_SetPreserveGlyph, 1,
- PyDoc_STR("(Boolean preserveGlyph) -> None")},
- {"GetPreserveGlyph", (PyCFunction)Fm_GetPreserveGlyph, 1,
- PyDoc_STR("() -> (Boolean _rv)")},
- {"GetSysFont", (PyCFunction)Fm_GetSysFont, 1,
- PyDoc_STR("() -> (short _rv)")},
- {"GetAppFont", (PyCFunction)Fm_GetAppFont, 1,
- PyDoc_STR("() -> (short _rv)")},
- {"QDTextBounds", (PyCFunction)Fm_QDTextBounds, 1,
- PyDoc_STR("(Buffer inText) -> (Rect bounds)")},
- {NULL, NULL, 0}
+ {"GetFontName", (PyCFunction)Fm_GetFontName, 1,
+ PyDoc_STR("(short familyID) -> (Str255 name)")},
+ {"GetFNum", (PyCFunction)Fm_GetFNum, 1,
+ PyDoc_STR("(Str255 name) -> (short familyID)")},
+ {"RealFont", (PyCFunction)Fm_RealFont, 1,
+ PyDoc_STR("(short fontNum, short size) -> (Boolean _rv)")},
+ {"SetFScaleDisable", (PyCFunction)Fm_SetFScaleDisable, 1,
+ PyDoc_STR("(Boolean fscaleDisable) -> None")},
+ {"FontMetrics", (PyCFunction)Fm_FontMetrics, 1,
+ PyDoc_STR("() -> (FMetricRec theMetrics)")},
+ {"SetFractEnable", (PyCFunction)Fm_SetFractEnable, 1,
+ PyDoc_STR("(Boolean fractEnable) -> None")},
+ {"GetDefFontSize", (PyCFunction)Fm_GetDefFontSize, 1,
+ PyDoc_STR("() -> (short _rv)")},
+ {"IsOutline", (PyCFunction)Fm_IsOutline, 1,
+ PyDoc_STR("(Point numer, Point denom) -> (Boolean _rv)")},
+ {"SetOutlinePreferred", (PyCFunction)Fm_SetOutlinePreferred, 1,
+ PyDoc_STR("(Boolean outlinePreferred) -> None")},
+ {"GetOutlinePreferred", (PyCFunction)Fm_GetOutlinePreferred, 1,
+ PyDoc_STR("() -> (Boolean _rv)")},
+ {"SetPreserveGlyph", (PyCFunction)Fm_SetPreserveGlyph, 1,
+ PyDoc_STR("(Boolean preserveGlyph) -> None")},
+ {"GetPreserveGlyph", (PyCFunction)Fm_GetPreserveGlyph, 1,
+ PyDoc_STR("() -> (Boolean _rv)")},
+ {"GetSysFont", (PyCFunction)Fm_GetSysFont, 1,
+ PyDoc_STR("() -> (short _rv)")},
+ {"GetAppFont", (PyCFunction)Fm_GetAppFont, 1,
+ PyDoc_STR("() -> (short _rv)")},
+ {"QDTextBounds", (PyCFunction)Fm_QDTextBounds, 1,
+ PyDoc_STR("(Buffer inText) -> (Rect bounds)")},
+ {NULL, NULL, 0}
};
#else /* __LP64__ */
static PyMethodDef Fm_methods[] = {
- {NULL, NULL, 0}
+ {NULL, NULL, 0}
};
#endif /* __LP64__ */
void init_Fm(void)
{
- PyObject *m;
+ PyObject *m;
#ifndef __LP64__
- PyObject *d;
+ PyObject *d;
#endif /* __LP64__ */
- m = Py_InitModule("_Fm", Fm_methods);
+ m = Py_InitModule("_Fm", Fm_methods);
#ifndef __LP64__
- d = PyModule_GetDict(m);
- Fm_Error = PyMac_GetOSErrException();
- if (Fm_Error == NULL ||
- PyDict_SetItemString(d, "Error", Fm_Error) != 0)
- return;
+ d = PyModule_GetDict(m);
+ Fm_Error = PyMac_GetOSErrException();
+ if (Fm_Error == NULL ||
+ PyDict_SetItemString(d, "Error", Fm_Error) != 0)
+ return;
#endif /* __LP64__ */
}
diff --git a/Mac/Modules/folder/_Foldermodule.c b/Mac/Modules/folder/_Foldermodule.c
index 035dab8..10597f5 100644
--- a/Mac/Modules/folder/_Foldermodule.c
+++ b/Mac/Modules/folder/_Foldermodule.c
@@ -9,9 +9,9 @@
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
- PyErr_SetString(PyExc_NotImplementedError, \
- "Not available in this shared library/OS version"); \
- return NULL; \
+ PyErr_SetString(PyExc_NotImplementedError, \
+ "Not available in this shared library/OS version"); \
+ return NULL; \
}} while(0)
@@ -22,301 +22,301 @@ static PyObject *Folder_Error;
static PyObject *Folder_FindFolder(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- short vRefNum;
- OSType folderType;
- Boolean createFolder;
- FSVolumeRefNum foundVRefNum;
- SInt32 foundDirID;
- if (!PyArg_ParseTuple(_args, "hO&b",
- &vRefNum,
- PyMac_GetOSType, &folderType,
- &createFolder))
- return NULL;
- _err = FindFolder(vRefNum,
- folderType,
- createFolder,
- &foundVRefNum,
- &foundDirID);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("hl",
- foundVRefNum,
- foundDirID);
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ short vRefNum;
+ OSType folderType;
+ Boolean createFolder;
+ FSVolumeRefNum foundVRefNum;
+ SInt32 foundDirID;
+ if (!PyArg_ParseTuple(_args, "hO&b",
+ &vRefNum,
+ PyMac_GetOSType, &folderType,
+ &createFolder))
+ return NULL;
+ _err = FindFolder(vRefNum,
+ folderType,
+ createFolder,
+ &foundVRefNum,
+ &foundDirID);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("hl",
+ foundVRefNum,
+ foundDirID);
+ return _res;
}
static PyObject *Folder_ReleaseFolder(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- short vRefNum;
- OSType folderType;
- if (!PyArg_ParseTuple(_args, "hO&",
- &vRefNum,
- PyMac_GetOSType, &folderType))
- return NULL;
- _err = ReleaseFolder(vRefNum,
- folderType);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ short vRefNum;
+ OSType folderType;
+ if (!PyArg_ParseTuple(_args, "hO&",
+ &vRefNum,
+ PyMac_GetOSType, &folderType))
+ return NULL;
+ _err = ReleaseFolder(vRefNum,
+ folderType);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Folder_FSFindFolder(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- short vRefNum;
- OSType folderType;
- Boolean createFolder;
- FSRef foundRef;
- if (!PyArg_ParseTuple(_args, "hO&b",
- &vRefNum,
- PyMac_GetOSType, &folderType,
- &createFolder))
- return NULL;
- _err = FSFindFolder(vRefNum,
- folderType,
- createFolder,
- &foundRef);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- PyMac_BuildFSRef, &foundRef);
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ short vRefNum;
+ OSType folderType;
+ Boolean createFolder;
+ FSRef foundRef;
+ if (!PyArg_ParseTuple(_args, "hO&b",
+ &vRefNum,
+ PyMac_GetOSType, &folderType,
+ &createFolder))
+ return NULL;
+ _err = FSFindFolder(vRefNum,
+ folderType,
+ createFolder,
+ &foundRef);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildFSRef, &foundRef);
+ return _res;
}
static PyObject *Folder_AddFolderDescriptor(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- FolderType foldType;
- FolderDescFlags flags;
- FolderClass foldClass;
- FolderLocation foldLocation;
- OSType badgeSignature;
- OSType badgeType;
- Str255 name;
- Boolean replaceFlag;
- if (!PyArg_ParseTuple(_args, "O&lO&O&O&O&O&b",
- PyMac_GetOSType, &foldType,
- &flags,
- PyMac_GetOSType, &foldClass,
- PyMac_GetOSType, &foldLocation,
- PyMac_GetOSType, &badgeSignature,
- PyMac_GetOSType, &badgeType,
- PyMac_GetStr255, name,
- &replaceFlag))
- return NULL;
- _err = AddFolderDescriptor(foldType,
- flags,
- foldClass,
- foldLocation,
- badgeSignature,
- badgeType,
- name,
- replaceFlag);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ FolderType foldType;
+ FolderDescFlags flags;
+ FolderClass foldClass;
+ FolderLocation foldLocation;
+ OSType badgeSignature;
+ OSType badgeType;
+ Str255 name;
+ Boolean replaceFlag;
+ if (!PyArg_ParseTuple(_args, "O&lO&O&O&O&O&b",
+ PyMac_GetOSType, &foldType,
+ &flags,
+ PyMac_GetOSType, &foldClass,
+ PyMac_GetOSType, &foldLocation,
+ PyMac_GetOSType, &badgeSignature,
+ PyMac_GetOSType, &badgeType,
+ PyMac_GetStr255, name,
+ &replaceFlag))
+ return NULL;
+ _err = AddFolderDescriptor(foldType,
+ flags,
+ foldClass,
+ foldLocation,
+ badgeSignature,
+ badgeType,
+ name,
+ replaceFlag);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Folder_GetFolderTypes(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- UInt32 requestedTypeCount;
- UInt32 totalTypeCount;
- FolderType theTypes;
- if (!PyArg_ParseTuple(_args, "l",
- &requestedTypeCount))
- return NULL;
- _err = GetFolderTypes(requestedTypeCount,
- &totalTypeCount,
- &theTypes);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("lO&",
- totalTypeCount,
- PyMac_BuildOSType, theTypes);
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ UInt32 requestedTypeCount;
+ UInt32 totalTypeCount;
+ FolderType theTypes;
+ if (!PyArg_ParseTuple(_args, "l",
+ &requestedTypeCount))
+ return NULL;
+ _err = GetFolderTypes(requestedTypeCount,
+ &totalTypeCount,
+ &theTypes);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("lO&",
+ totalTypeCount,
+ PyMac_BuildOSType, theTypes);
+ return _res;
}
static PyObject *Folder_RemoveFolderDescriptor(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- FolderType foldType;
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetOSType, &foldType))
- return NULL;
- _err = RemoveFolderDescriptor(foldType);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ FolderType foldType;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetOSType, &foldType))
+ return NULL;
+ _err = RemoveFolderDescriptor(foldType);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
#ifndef __LP64__
static PyObject *Folder_GetFolderName(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- short vRefNum;
- OSType foldType;
- short foundVRefNum;
- Str255 name;
- if (!PyArg_ParseTuple(_args, "hO&O&",
- &vRefNum,
- PyMac_GetOSType, &foldType,
- PyMac_GetStr255, name))
- return NULL;
- _err = GetFolderName(vRefNum,
- foldType,
- &foundVRefNum,
- name);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("h",
- foundVRefNum);
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ short vRefNum;
+ OSType foldType;
+ short foundVRefNum;
+ Str255 name;
+ if (!PyArg_ParseTuple(_args, "hO&O&",
+ &vRefNum,
+ PyMac_GetOSType, &foldType,
+ PyMac_GetStr255, name))
+ return NULL;
+ _err = GetFolderName(vRefNum,
+ foldType,
+ &foundVRefNum,
+ name);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("h",
+ foundVRefNum);
+ return _res;
}
static PyObject *Folder_AddFolderRouting(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- OSType fileType;
- FolderType routeFromFolder;
- FolderType routeToFolder;
- RoutingFlags flags;
- Boolean replaceFlag;
- if (!PyArg_ParseTuple(_args, "O&O&O&lb",
- PyMac_GetOSType, &fileType,
- PyMac_GetOSType, &routeFromFolder,
- PyMac_GetOSType, &routeToFolder,
- &flags,
- &replaceFlag))
- return NULL;
- _err = AddFolderRouting(fileType,
- routeFromFolder,
- routeToFolder,
- flags,
- replaceFlag);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ OSType fileType;
+ FolderType routeFromFolder;
+ FolderType routeToFolder;
+ RoutingFlags flags;
+ Boolean replaceFlag;
+ if (!PyArg_ParseTuple(_args, "O&O&O&lb",
+ PyMac_GetOSType, &fileType,
+ PyMac_GetOSType, &routeFromFolder,
+ PyMac_GetOSType, &routeToFolder,
+ &flags,
+ &replaceFlag))
+ return NULL;
+ _err = AddFolderRouting(fileType,
+ routeFromFolder,
+ routeToFolder,
+ flags,
+ replaceFlag);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Folder_RemoveFolderRouting(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- OSType fileType;
- FolderType routeFromFolder;
- if (!PyArg_ParseTuple(_args, "O&O&",
- PyMac_GetOSType, &fileType,
- PyMac_GetOSType, &routeFromFolder))
- return NULL;
- _err = RemoveFolderRouting(fileType,
- routeFromFolder);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ OSType fileType;
+ FolderType routeFromFolder;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ PyMac_GetOSType, &fileType,
+ PyMac_GetOSType, &routeFromFolder))
+ return NULL;
+ _err = RemoveFolderRouting(fileType,
+ routeFromFolder);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Folder_FindFolderRouting(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- OSType fileType;
- FolderType routeFromFolder;
- FolderType routeToFolder;
- RoutingFlags flags;
- if (!PyArg_ParseTuple(_args, "O&O&",
- PyMac_GetOSType, &fileType,
- PyMac_GetOSType, &routeFromFolder))
- return NULL;
- _err = FindFolderRouting(fileType,
- routeFromFolder,
- &routeToFolder,
- &flags);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&l",
- PyMac_BuildOSType, routeToFolder,
- flags);
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ OSType fileType;
+ FolderType routeFromFolder;
+ FolderType routeToFolder;
+ RoutingFlags flags;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ PyMac_GetOSType, &fileType,
+ PyMac_GetOSType, &routeFromFolder))
+ return NULL;
+ _err = FindFolderRouting(fileType,
+ routeFromFolder,
+ &routeToFolder,
+ &flags);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&l",
+ PyMac_BuildOSType, routeToFolder,
+ flags);
+ return _res;
}
#endif /* !__LP64__ */
static PyObject *Folder_InvalidateFolderDescriptorCache(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- short vRefNum;
- long dirID;
- if (!PyArg_ParseTuple(_args, "hl",
- &vRefNum,
- &dirID))
- return NULL;
- _err = InvalidateFolderDescriptorCache(vRefNum,
- dirID);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ short vRefNum;
+ long dirID;
+ if (!PyArg_ParseTuple(_args, "hl",
+ &vRefNum,
+ &dirID))
+ return NULL;
+ _err = InvalidateFolderDescriptorCache(vRefNum,
+ dirID);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Folder_IdentifyFolder(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- short vRefNum;
- long dirID;
- FolderType foldType;
- if (!PyArg_ParseTuple(_args, "hl",
- &vRefNum,
- &dirID))
- return NULL;
- _err = IdentifyFolder(vRefNum,
- dirID,
- &foldType);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- PyMac_BuildOSType, foldType);
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ short vRefNum;
+ long dirID;
+ FolderType foldType;
+ if (!PyArg_ParseTuple(_args, "hl",
+ &vRefNum,
+ &dirID))
+ return NULL;
+ _err = IdentifyFolder(vRefNum,
+ dirID,
+ &foldType);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildOSType, foldType);
+ return _res;
}
static PyMethodDef Folder_methods[] = {
- {"FindFolder", (PyCFunction)Folder_FindFolder, 1,
- PyDoc_STR("(short vRefNum, OSType folderType, Boolean createFolder) -> (short foundVRefNum, long foundDirID)")},
- {"ReleaseFolder", (PyCFunction)Folder_ReleaseFolder, 1,
- PyDoc_STR("(short vRefNum, OSType folderType) -> None")},
- {"FSFindFolder", (PyCFunction)Folder_FSFindFolder, 1,
- PyDoc_STR("(short vRefNum, OSType folderType, Boolean createFolder) -> (FSRef foundRef)")},
- {"AddFolderDescriptor", (PyCFunction)Folder_AddFolderDescriptor, 1,
- PyDoc_STR("(FolderType foldType, FolderDescFlags flags, FolderClass foldClass, FolderLocation foldLocation, OSType badgeSignature, OSType badgeType, Str255 name, Boolean replaceFlag) -> None")},
- {"GetFolderTypes", (PyCFunction)Folder_GetFolderTypes, 1,
- PyDoc_STR("(UInt32 requestedTypeCount) -> (UInt32 totalTypeCount, FolderType theTypes)")},
- {"RemoveFolderDescriptor", (PyCFunction)Folder_RemoveFolderDescriptor, 1,
- PyDoc_STR("(FolderType foldType) -> None")},
+ {"FindFolder", (PyCFunction)Folder_FindFolder, 1,
+ PyDoc_STR("(short vRefNum, OSType folderType, Boolean createFolder) -> (short foundVRefNum, long foundDirID)")},
+ {"ReleaseFolder", (PyCFunction)Folder_ReleaseFolder, 1,
+ PyDoc_STR("(short vRefNum, OSType folderType) -> None")},
+ {"FSFindFolder", (PyCFunction)Folder_FSFindFolder, 1,
+ PyDoc_STR("(short vRefNum, OSType folderType, Boolean createFolder) -> (FSRef foundRef)")},
+ {"AddFolderDescriptor", (PyCFunction)Folder_AddFolderDescriptor, 1,
+ PyDoc_STR("(FolderType foldType, FolderDescFlags flags, FolderClass foldClass, FolderLocation foldLocation, OSType badgeSignature, OSType badgeType, Str255 name, Boolean replaceFlag) -> None")},
+ {"GetFolderTypes", (PyCFunction)Folder_GetFolderTypes, 1,
+ PyDoc_STR("(UInt32 requestedTypeCount) -> (UInt32 totalTypeCount, FolderType theTypes)")},
+ {"RemoveFolderDescriptor", (PyCFunction)Folder_RemoveFolderDescriptor, 1,
+ PyDoc_STR("(FolderType foldType) -> None")},
#ifndef __LP64__
- {"GetFolderName", (PyCFunction)Folder_GetFolderName, 1,
- PyDoc_STR("(short vRefNum, OSType foldType, Str255 name) -> (short foundVRefNum)")},
- {"AddFolderRouting", (PyCFunction)Folder_AddFolderRouting, 1,
- PyDoc_STR("(OSType fileType, FolderType routeFromFolder, FolderType routeToFolder, RoutingFlags flags, Boolean replaceFlag) -> None")},
- {"RemoveFolderRouting", (PyCFunction)Folder_RemoveFolderRouting, 1,
- PyDoc_STR("(OSType fileType, FolderType routeFromFolder) -> None")},
- {"FindFolderRouting", (PyCFunction)Folder_FindFolderRouting, 1,
- PyDoc_STR("(OSType fileType, FolderType routeFromFolder) -> (FolderType routeToFolder, RoutingFlags flags)")},
+ {"GetFolderName", (PyCFunction)Folder_GetFolderName, 1,
+ PyDoc_STR("(short vRefNum, OSType foldType, Str255 name) -> (short foundVRefNum)")},
+ {"AddFolderRouting", (PyCFunction)Folder_AddFolderRouting, 1,
+ PyDoc_STR("(OSType fileType, FolderType routeFromFolder, FolderType routeToFolder, RoutingFlags flags, Boolean replaceFlag) -> None")},
+ {"RemoveFolderRouting", (PyCFunction)Folder_RemoveFolderRouting, 1,
+ PyDoc_STR("(OSType fileType, FolderType routeFromFolder) -> None")},
+ {"FindFolderRouting", (PyCFunction)Folder_FindFolderRouting, 1,
+ PyDoc_STR("(OSType fileType, FolderType routeFromFolder) -> (FolderType routeToFolder, RoutingFlags flags)")},
#endif /* !__LP64__ */
- {"InvalidateFolderDescriptorCache", (PyCFunction)Folder_InvalidateFolderDescriptorCache, 1,
- PyDoc_STR("(short vRefNum, long dirID) -> None")},
- {"IdentifyFolder", (PyCFunction)Folder_IdentifyFolder, 1,
- PyDoc_STR("(short vRefNum, long dirID) -> (FolderType foldType)")},
- {NULL, NULL, 0}
+ {"InvalidateFolderDescriptorCache", (PyCFunction)Folder_InvalidateFolderDescriptorCache, 1,
+ PyDoc_STR("(short vRefNum, long dirID) -> None")},
+ {"IdentifyFolder", (PyCFunction)Folder_IdentifyFolder, 1,
+ PyDoc_STR("(short vRefNum, long dirID) -> (FolderType foldType)")},
+ {NULL, NULL, 0}
};
@@ -324,18 +324,18 @@ static PyMethodDef Folder_methods[] = {
void init_Folder(void)
{
- PyObject *m;
- PyObject *d;
+ PyObject *m;
+ PyObject *d;
- m = Py_InitModule("_Folder", Folder_methods);
- d = PyModule_GetDict(m);
- Folder_Error = PyMac_GetOSErrException();
- if (Folder_Error == NULL ||
- PyDict_SetItemString(d, "Error", Folder_Error) != 0)
- return;
+ m = Py_InitModule("_Folder", Folder_methods);
+ d = PyModule_GetDict(m);
+ Folder_Error = PyMac_GetOSErrException();
+ if (Folder_Error == NULL ||
+ PyDict_SetItemString(d, "Error", Folder_Error) != 0)
+ return;
}
/* ======================= End module _Folder ======================= */
diff --git a/Mac/Modules/gestaltmodule.c b/Mac/Modules/gestaltmodule.c
index fa1c93c..56757ab 100644
--- a/Mac/Modules/gestaltmodule.c
+++ b/Mac/Modules/gestaltmodule.c
@@ -4,10 +4,10 @@ The Netherlands.
All Rights Reserved
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
+both that copyright notice and this permission notice appear in
supporting documentation, and that the names of Stichting Mathematisch
Centrum or CWI not be used in advertising or publicity pertaining to
distribution of the software without specific, written prior permission.
@@ -32,24 +32,24 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
static PyObject *
gestalt_gestalt(PyObject *self, PyObject *args)
{
- OSErr iErr;
- OSType selector;
- SInt32 response;
- if (!PyArg_ParseTuple(args, "O&", PyMac_GetOSType, &selector))
- return NULL;
- iErr = Gestalt ( selector, &response );
- if (iErr != 0)
- return PyMac_Error(iErr);
- return PyInt_FromLong(response);
+ OSErr iErr;
+ OSType selector;
+ SInt32 response;
+ if (!PyArg_ParseTuple(args, "O&", PyMac_GetOSType, &selector))
+ return NULL;
+ iErr = Gestalt ( selector, &response );
+ if (iErr != 0)
+ return PyMac_Error(iErr);
+ return PyInt_FromLong(response);
}
static struct PyMethodDef gestalt_methods[] = {
- {"gestalt", gestalt_gestalt, METH_VARARGS},
- {NULL, NULL} /* Sentinel */
+ {"gestalt", gestalt_gestalt, METH_VARARGS},
+ {NULL, NULL} /* Sentinel */
};
void
initgestalt(void)
{
- Py_InitModule("gestalt", gestalt_methods);
+ Py_InitModule("gestalt", gestalt_methods);
}
diff --git a/Mac/Modules/help/_Helpmodule.c b/Mac/Modules/help/_Helpmodule.c
index a6eccf3..eaa2e8a 100644
--- a/Mac/Modules/help/_Helpmodule.c
+++ b/Mac/Modules/help/_Helpmodule.c
@@ -10,9 +10,9 @@
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
- PyErr_SetString(PyExc_NotImplementedError, \
- "Not available in this shared library/OS version"); \
- return NULL; \
+ PyErr_SetString(PyExc_NotImplementedError, \
+ "Not available in this shared library/OS version"); \
+ return NULL; \
}} while(0)
@@ -22,151 +22,151 @@ static PyObject *Help_Error;
static PyObject *Help_HMGetHelpMenu(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- MenuRef outHelpMenu;
- MenuItemIndex outFirstCustomItemIndex;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = HMGetHelpMenu(&outHelpMenu,
- &outFirstCustomItemIndex);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&H",
- MenuObj_New, outHelpMenu,
- outFirstCustomItemIndex);
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ MenuRef outHelpMenu;
+ MenuItemIndex outFirstCustomItemIndex;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = HMGetHelpMenu(&outHelpMenu,
+ &outFirstCustomItemIndex);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&H",
+ MenuObj_New, outHelpMenu,
+ outFirstCustomItemIndex);
+ return _res;
}
static PyObject *Help_HMAreHelpTagsDisplayed(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = HMAreHelpTagsDisplayed();
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = HMAreHelpTagsDisplayed();
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *Help_HMSetHelpTagsDisplayed(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- Boolean inDisplayTags;
- if (!PyArg_ParseTuple(_args, "b",
- &inDisplayTags))
- return NULL;
- _err = HMSetHelpTagsDisplayed(inDisplayTags);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Boolean inDisplayTags;
+ if (!PyArg_ParseTuple(_args, "b",
+ &inDisplayTags))
+ return NULL;
+ _err = HMSetHelpTagsDisplayed(inDisplayTags);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Help_HMSetTagDelay(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- Duration inDelay;
- if (!PyArg_ParseTuple(_args, "l",
- &inDelay))
- return NULL;
- _err = HMSetTagDelay(inDelay);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Duration inDelay;
+ if (!PyArg_ParseTuple(_args, "l",
+ &inDelay))
+ return NULL;
+ _err = HMSetTagDelay(inDelay);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Help_HMGetTagDelay(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- Duration outDelay;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = HMGetTagDelay(&outDelay);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- outDelay);
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Duration outDelay;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = HMGetTagDelay(&outDelay);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ outDelay);
+ return _res;
}
static PyObject *Help_HMSetMenuHelpFromBalloonRsrc(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- MenuRef inMenu;
- SInt16 inHmnuRsrcID;
- if (!PyArg_ParseTuple(_args, "O&h",
- MenuObj_Convert, &inMenu,
- &inHmnuRsrcID))
- return NULL;
- _err = HMSetMenuHelpFromBalloonRsrc(inMenu,
- inHmnuRsrcID);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ MenuRef inMenu;
+ SInt16 inHmnuRsrcID;
+ if (!PyArg_ParseTuple(_args, "O&h",
+ MenuObj_Convert, &inMenu,
+ &inHmnuRsrcID))
+ return NULL;
+ _err = HMSetMenuHelpFromBalloonRsrc(inMenu,
+ inHmnuRsrcID);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Help_HMSetDialogHelpFromBalloonRsrc(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- DialogPtr inDialog;
- SInt16 inHdlgRsrcID;
- SInt16 inItemStart;
- if (!PyArg_ParseTuple(_args, "O&hh",
- DlgObj_Convert, &inDialog,
- &inHdlgRsrcID,
- &inItemStart))
- return NULL;
- _err = HMSetDialogHelpFromBalloonRsrc(inDialog,
- inHdlgRsrcID,
- inItemStart);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ DialogPtr inDialog;
+ SInt16 inHdlgRsrcID;
+ SInt16 inItemStart;
+ if (!PyArg_ParseTuple(_args, "O&hh",
+ DlgObj_Convert, &inDialog,
+ &inHdlgRsrcID,
+ &inItemStart))
+ return NULL;
+ _err = HMSetDialogHelpFromBalloonRsrc(inDialog,
+ inHdlgRsrcID,
+ inItemStart);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Help_HMHideTag(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = HMHideTag();
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = HMHideTag();
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
#endif /* __LP64__ */
static PyMethodDef Help_methods[] = {
#ifndef __LP64__
- {"HMGetHelpMenu", (PyCFunction)Help_HMGetHelpMenu, 1,
- PyDoc_STR("() -> (MenuRef outHelpMenu, MenuItemIndex outFirstCustomItemIndex)")},
- {"HMAreHelpTagsDisplayed", (PyCFunction)Help_HMAreHelpTagsDisplayed, 1,
- PyDoc_STR("() -> (Boolean _rv)")},
- {"HMSetHelpTagsDisplayed", (PyCFunction)Help_HMSetHelpTagsDisplayed, 1,
- PyDoc_STR("(Boolean inDisplayTags) -> None")},
- {"HMSetTagDelay", (PyCFunction)Help_HMSetTagDelay, 1,
- PyDoc_STR("(Duration inDelay) -> None")},
- {"HMGetTagDelay", (PyCFunction)Help_HMGetTagDelay, 1,
- PyDoc_STR("() -> (Duration outDelay)")},
- {"HMSetMenuHelpFromBalloonRsrc", (PyCFunction)Help_HMSetMenuHelpFromBalloonRsrc, 1,
- PyDoc_STR("(MenuRef inMenu, SInt16 inHmnuRsrcID) -> None")},
- {"HMSetDialogHelpFromBalloonRsrc", (PyCFunction)Help_HMSetDialogHelpFromBalloonRsrc, 1,
- PyDoc_STR("(DialogPtr inDialog, SInt16 inHdlgRsrcID, SInt16 inItemStart) -> None")},
- {"HMHideTag", (PyCFunction)Help_HMHideTag, 1,
- PyDoc_STR("() -> None")},
+ {"HMGetHelpMenu", (PyCFunction)Help_HMGetHelpMenu, 1,
+ PyDoc_STR("() -> (MenuRef outHelpMenu, MenuItemIndex outFirstCustomItemIndex)")},
+ {"HMAreHelpTagsDisplayed", (PyCFunction)Help_HMAreHelpTagsDisplayed, 1,
+ PyDoc_STR("() -> (Boolean _rv)")},
+ {"HMSetHelpTagsDisplayed", (PyCFunction)Help_HMSetHelpTagsDisplayed, 1,
+ PyDoc_STR("(Boolean inDisplayTags) -> None")},
+ {"HMSetTagDelay", (PyCFunction)Help_HMSetTagDelay, 1,
+ PyDoc_STR("(Duration inDelay) -> None")},
+ {"HMGetTagDelay", (PyCFunction)Help_HMGetTagDelay, 1,
+ PyDoc_STR("() -> (Duration outDelay)")},
+ {"HMSetMenuHelpFromBalloonRsrc", (PyCFunction)Help_HMSetMenuHelpFromBalloonRsrc, 1,
+ PyDoc_STR("(MenuRef inMenu, SInt16 inHmnuRsrcID) -> None")},
+ {"HMSetDialogHelpFromBalloonRsrc", (PyCFunction)Help_HMSetDialogHelpFromBalloonRsrc, 1,
+ PyDoc_STR("(DialogPtr inDialog, SInt16 inHdlgRsrcID, SInt16 inItemStart) -> None")},
+ {"HMHideTag", (PyCFunction)Help_HMHideTag, 1,
+ PyDoc_STR("() -> None")},
#endif /* __LP64__ */
- {NULL, NULL, 0}
+ {NULL, NULL, 0}
};
@@ -174,21 +174,21 @@ static PyMethodDef Help_methods[] = {
void init_Help(void)
{
- PyObject *m;
+ PyObject *m;
#ifndef __LP64__
- PyObject *d;
+ PyObject *d;
#endif /* __LP64__ */
- m = Py_InitModule("_Help", Help_methods);
+ m = Py_InitModule("_Help", Help_methods);
#ifndef __LP64__
- d = PyModule_GetDict(m);
- Help_Error = PyMac_GetOSErrException();
- if (Help_Error == NULL ||
- PyDict_SetItemString(d, "Error", Help_Error) != 0)
- return;
+ d = PyModule_GetDict(m);
+ Help_Error = PyMac_GetOSErrException();
+ if (Help_Error == NULL ||
+ PyDict_SetItemString(d, "Error", Help_Error) != 0)
+ return;
#endif /* __LP64__ */
}
diff --git a/Mac/Modules/ibcarbon/_IBCarbon.c b/Mac/Modules/ibcarbon/_IBCarbon.c
index c7c819c..2a65f42 100644
--- a/Mac/Modules/ibcarbon/_IBCarbon.c
+++ b/Mac/Modules/ibcarbon/_IBCarbon.c
@@ -23,116 +23,116 @@ PyTypeObject IBNibRef_Type;
#define IBNibRefObj_Check(x) ((x)->ob_type == &IBNibRef_Type || PyObject_TypeCheck((x), &IBNibRef_Type))
typedef struct IBNibRefObject {
- PyObject_HEAD
- IBNibRef ob_itself;
+ PyObject_HEAD
+ IBNibRef ob_itself;
} IBNibRefObject;
PyObject *IBNibRefObj_New(IBNibRef itself)
{
- IBNibRefObject *it;
- it = PyObject_NEW(IBNibRefObject, &IBNibRef_Type);
- if (it == NULL) return NULL;
- it->ob_itself = itself;
- return (PyObject *)it;
+ IBNibRefObject *it;
+ it = PyObject_NEW(IBNibRefObject, &IBNibRef_Type);
+ if (it == NULL) return NULL;
+ it->ob_itself = itself;
+ return (PyObject *)it;
}
int IBNibRefObj_Convert(PyObject *v, IBNibRef *p_itself)
{
- if (!IBNibRefObj_Check(v))
- {
- PyErr_SetString(PyExc_TypeError, "IBNibRef required");
- return 0;
- }
- *p_itself = ((IBNibRefObject *)v)->ob_itself;
- return 1;
+ if (!IBNibRefObj_Check(v))
+ {
+ PyErr_SetString(PyExc_TypeError, "IBNibRef required");
+ return 0;
+ }
+ *p_itself = ((IBNibRefObject *)v)->ob_itself;
+ return 1;
}
static void IBNibRefObj_dealloc(IBNibRefObject *self)
{
- DisposeNibReference(self->ob_itself);
- self->ob_type->tp_free((PyObject *)self);
+ DisposeNibReference(self->ob_itself);
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *IBNibRefObj_CreateWindowFromNib(IBNibRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- CFStringRef inName;
- WindowPtr outWindow;
- if (!PyArg_ParseTuple(_args, "O&",
- CFStringRefObj_Convert, &inName))
- return NULL;
- _err = CreateWindowFromNib(_self->ob_itself,
- inName,
- &outWindow);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- WinObj_New, outWindow);
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ CFStringRef inName;
+ WindowPtr outWindow;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CFStringRefObj_Convert, &inName))
+ return NULL;
+ _err = CreateWindowFromNib(_self->ob_itself,
+ inName,
+ &outWindow);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ WinObj_New, outWindow);
+ return _res;
}
static PyObject *IBNibRefObj_CreateMenuFromNib(IBNibRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- CFStringRef inName;
- MenuHandle outMenuRef;
- if (!PyArg_ParseTuple(_args, "O&",
- CFStringRefObj_Convert, &inName))
- return NULL;
- _err = CreateMenuFromNib(_self->ob_itself,
- inName,
- &outMenuRef);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- MenuObj_New, outMenuRef);
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ CFStringRef inName;
+ MenuHandle outMenuRef;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CFStringRefObj_Convert, &inName))
+ return NULL;
+ _err = CreateMenuFromNib(_self->ob_itself,
+ inName,
+ &outMenuRef);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ MenuObj_New, outMenuRef);
+ return _res;
}
static PyObject *IBNibRefObj_CreateMenuBarFromNib(IBNibRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- CFStringRef inName;
- Handle outMenuBar;
- if (!PyArg_ParseTuple(_args, "O&",
- CFStringRefObj_Convert, &inName))
- return NULL;
- _err = CreateMenuBarFromNib(_self->ob_itself,
- inName,
- &outMenuBar);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- ResObj_New, outMenuBar);
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ CFStringRef inName;
+ Handle outMenuBar;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CFStringRefObj_Convert, &inName))
+ return NULL;
+ _err = CreateMenuBarFromNib(_self->ob_itself,
+ inName,
+ &outMenuBar);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ ResObj_New, outMenuBar);
+ return _res;
}
static PyObject *IBNibRefObj_SetMenuBarFromNib(IBNibRefObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- CFStringRef inName;
- if (!PyArg_ParseTuple(_args, "O&",
- CFStringRefObj_Convert, &inName))
- return NULL;
- _err = SetMenuBarFromNib(_self->ob_itself,
- inName);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ CFStringRef inName;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CFStringRefObj_Convert, &inName))
+ return NULL;
+ _err = SetMenuBarFromNib(_self->ob_itself,
+ inName);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyMethodDef IBNibRefObj_methods[] = {
- {"CreateWindowFromNib", (PyCFunction)IBNibRefObj_CreateWindowFromNib, 1,
- PyDoc_STR("(CFStringRef inName) -> (WindowPtr outWindow)")},
- {"CreateMenuFromNib", (PyCFunction)IBNibRefObj_CreateMenuFromNib, 1,
- PyDoc_STR("(CFStringRef inName) -> (MenuHandle outMenuRef)")},
- {"CreateMenuBarFromNib", (PyCFunction)IBNibRefObj_CreateMenuBarFromNib, 1,
- PyDoc_STR("(CFStringRef inName) -> (Handle outMenuBar)")},
- {"SetMenuBarFromNib", (PyCFunction)IBNibRefObj_SetMenuBarFromNib, 1,
- PyDoc_STR("(CFStringRef inName) -> None")},
- {NULL, NULL, 0}
+ {"CreateWindowFromNib", (PyCFunction)IBNibRefObj_CreateWindowFromNib, 1,
+ PyDoc_STR("(CFStringRef inName) -> (WindowPtr outWindow)")},
+ {"CreateMenuFromNib", (PyCFunction)IBNibRefObj_CreateMenuFromNib, 1,
+ PyDoc_STR("(CFStringRef inName) -> (MenuHandle outMenuRef)")},
+ {"CreateMenuBarFromNib", (PyCFunction)IBNibRefObj_CreateMenuBarFromNib, 1,
+ PyDoc_STR("(CFStringRef inName) -> (Handle outMenuBar)")},
+ {"SetMenuBarFromNib", (PyCFunction)IBNibRefObj_SetMenuBarFromNib, 1,
+ PyDoc_STR("(CFStringRef inName) -> None")},
+ {NULL, NULL, 0}
};
#define IBNibRefObj_getsetlist NULL
@@ -149,61 +149,61 @@ static PyMethodDef IBNibRefObj_methods[] = {
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;
+ 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 = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
- "_IBCarbon.IBNibRef", /*tp_name*/
- sizeof(IBNibRefObject), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- /* methods */
- (destructor) IBNibRefObj_dealloc, /*tp_dealloc*/
- 0, /*tp_print*/
- (getattrfunc)0, /*tp_getattr*/
- (setattrfunc)0, /*tp_setattr*/
- (cmpfunc) IBNibRefObj_compare, /*tp_compare*/
- (reprfunc) IBNibRefObj_repr, /*tp_repr*/
- (PyNumberMethods *)0, /* tp_as_number */
- (PySequenceMethods *)0, /* tp_as_sequence */
- (PyMappingMethods *)0, /* tp_as_mapping */
- (hashfunc) IBNibRefObj_hash, /*tp_hash*/
- 0, /*tp_call*/
- 0, /*tp_str*/
- PyObject_GenericGetAttr, /*tp_getattro*/
- PyObject_GenericSetAttr, /*tp_setattro */
- 0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
- 0, /*tp_doc*/
- 0, /*tp_traverse*/
- 0, /*tp_clear*/
- 0, /*tp_richcompare*/
- 0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
- 0, /*tp_iternext*/
- IBNibRefObj_methods, /* tp_methods */
- 0, /*tp_members*/
- IBNibRefObj_getsetlist, /*tp_getset*/
- 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 */
+ PyObject_HEAD_INIT(NULL)
+ 0, /*ob_size*/
+ "_IBCarbon.IBNibRef", /*tp_name*/
+ sizeof(IBNibRefObject), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ /* methods */
+ (destructor) IBNibRefObj_dealloc, /*tp_dealloc*/
+ 0, /*tp_print*/
+ (getattrfunc)0, /*tp_getattr*/
+ (setattrfunc)0, /*tp_setattr*/
+ (cmpfunc) IBNibRefObj_compare, /*tp_compare*/
+ (reprfunc) IBNibRefObj_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) IBNibRefObj_hash, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ PyObject_GenericGetAttr, /*tp_getattro*/
+ PyObject_GenericSetAttr, /*tp_setattro */
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
+ 0, /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ IBNibRefObj_methods, /* tp_methods */
+ 0, /*tp_members*/
+ IBNibRefObj_getsetlist, /*tp_getset*/
+ 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 -------------------- */
@@ -211,28 +211,28 @@ PyTypeObject IBNibRef_Type = {
static PyObject *IBCarbon_CreateNibReference(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- CFStringRef inNibName;
- IBNibRef outNibRef;
- if (!PyArg_ParseTuple(_args, "O&",
- CFStringRefObj_Convert, &inNibName))
- return NULL;
- _err = CreateNibReference(inNibName,
- &outNibRef);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- IBNibRefObj_New, outNibRef);
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ CFStringRef inNibName;
+ IBNibRef outNibRef;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CFStringRefObj_Convert, &inNibName))
+ return NULL;
+ _err = CreateNibReference(inNibName,
+ &outNibRef);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ IBNibRefObj_New, outNibRef);
+ return _res;
}
#endif /* __LP64__ */
static PyMethodDef IBCarbon_methods[] = {
#ifndef __LP64__
- {"CreateNibReference", (PyCFunction)IBCarbon_CreateNibReference, 1,
- PyDoc_STR("(CFStringRef inNibName) -> (IBNibRef outNibRef)")},
+ {"CreateNibReference", (PyCFunction)IBCarbon_CreateNibReference, 1,
+ PyDoc_STR("(CFStringRef inNibName) -> (IBNibRef outNibRef)")},
#endif /* __LP64__ */
- {NULL, NULL, 0}
+ {NULL, NULL, 0}
};
@@ -240,29 +240,29 @@ static PyMethodDef IBCarbon_methods[] = {
void init_IBCarbon(void)
{
- PyObject *m;
+ PyObject *m;
#ifndef __LP64__
- PyObject *d;
+ PyObject *d;
#endif /* __LP64__ */
- m = Py_InitModule("_IBCarbon", IBCarbon_methods);
+ m = Py_InitModule("_IBCarbon", IBCarbon_methods);
#ifndef __LP64__
- d = PyModule_GetDict(m);
- IBCarbon_Error = PyMac_GetOSErrException();
- if (IBCarbon_Error == NULL ||
- PyDict_SetItemString(d, "Error", IBCarbon_Error) != 0)
- return;
- IBNibRef_Type.ob_type = &PyType_Type;
- if (PyType_Ready(&IBNibRef_Type) < 0) return;
- Py_INCREF(&IBNibRef_Type);
- PyModule_AddObject(m, "IBNibRef", (PyObject *)&IBNibRef_Type);
- /* Backward-compatible name */
- Py_INCREF(&IBNibRef_Type);
- PyModule_AddObject(m, "IBNibRefType", (PyObject *)&IBNibRef_Type);
+ d = PyModule_GetDict(m);
+ IBCarbon_Error = PyMac_GetOSErrException();
+ if (IBCarbon_Error == NULL ||
+ PyDict_SetItemString(d, "Error", IBCarbon_Error) != 0)
+ return;
+ IBNibRef_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&IBNibRef_Type) < 0) return;
+ Py_INCREF(&IBNibRef_Type);
+ PyModule_AddObject(m, "IBNibRef", (PyObject *)&IBNibRef_Type);
+ /* Backward-compatible name */
+ Py_INCREF(&IBNibRef_Type);
+ PyModule_AddObject(m, "IBNibRefType", (PyObject *)&IBNibRef_Type);
#endif /* __LP64__ */
}
diff --git a/Mac/Modules/icgluemodule.c b/Mac/Modules/icgluemodule.c
index 70ca1e3..4d17bf7 100644
--- a/Mac/Modules/icgluemodule.c
+++ b/Mac/Modules/icgluemodule.c
@@ -43,8 +43,8 @@ static PyObject *ErrorObject;
/* Declarations for objects of type ic_instance */
typedef struct {
- PyObject_HEAD
- ICInstance inst;
+ PyObject_HEAD
+ ICInstance inst;
} iciobject;
static PyTypeObject Icitype;
@@ -54,303 +54,303 @@ static PyTypeObject Icitype;
/* ---------------------------------------------------------------- */
-static char ici_ICGetSeed__doc__[] =
+static char ici_ICGetSeed__doc__[] =
"()->int; Returns int that changes when configuration does"
;
static PyObject *
ici_ICGetSeed(iciobject *self, PyObject *args)
{
- OSStatus err;
- long seed;
-
- if (!PyArg_ParseTuple(args, ""))
- return NULL;
- if ((err=ICGetSeed(self->inst, &seed)) != 0 )
- return PyMac_Error(err);
- return Py_BuildValue("i", (int)seed);
+ OSStatus err;
+ long seed;
+
+ if (!PyArg_ParseTuple(args, ""))
+ return NULL;
+ if ((err=ICGetSeed(self->inst, &seed)) != 0 )
+ return PyMac_Error(err);
+ return Py_BuildValue("i", (int)seed);
}
-static char ici_ICBegin__doc__[] =
+static char ici_ICBegin__doc__[] =
"(perm)->None; Lock config file for read/write"
;
static PyObject *
ici_ICBegin(iciobject *self, PyObject *args)
{
- OSStatus err;
- int perm;
-
- if (!PyArg_ParseTuple(args, "i", &perm))
- return NULL;
- if ((err=ICBegin(self->inst, (ICPerm)perm)) != 0 )
- return PyMac_Error(err);
- Py_INCREF(Py_None);
- return Py_None;
+ OSStatus err;
+ int perm;
+
+ if (!PyArg_ParseTuple(args, "i", &perm))
+ return NULL;
+ if ((err=ICBegin(self->inst, (ICPerm)perm)) != 0 )
+ return PyMac_Error(err);
+ Py_INCREF(Py_None);
+ return Py_None;
}
-static char ici_ICFindPrefHandle__doc__[] =
+static char ici_ICFindPrefHandle__doc__[] =
"(key, handle)->attrs; Lookup key, store result in handle, return attributes"
;
static PyObject *
ici_ICFindPrefHandle(iciobject *self, PyObject *args)
{
- OSStatus err;
- Str255 key;
- ICAttr attr;
- Handle h;
-
- if (!PyArg_ParseTuple(args, "O&O&", PyMac_GetStr255, &key, ResObj_Convert, &h))
- return NULL;
- if ((err=ICFindPrefHandle(self->inst, key, &attr, h)) != 0 )
- return PyMac_Error(err);
- return Py_BuildValue("i", (int)attr);
+ OSStatus err;
+ Str255 key;
+ ICAttr attr;
+ Handle h;
+
+ if (!PyArg_ParseTuple(args, "O&O&", PyMac_GetStr255, &key, ResObj_Convert, &h))
+ return NULL;
+ if ((err=ICFindPrefHandle(self->inst, key, &attr, h)) != 0 )
+ return PyMac_Error(err);
+ return Py_BuildValue("i", (int)attr);
}
-static char ici_ICSetPref__doc__[] =
+static char ici_ICSetPref__doc__[] =
"(key, attr, data)->None; Set preference key to data with attributes"
;
static PyObject *
ici_ICSetPref(iciobject *self, PyObject *args)
{
- OSStatus err;
- Str255 key;
- int attr;
- char *data;
- int datalen;
-
- if (!PyArg_ParseTuple(args, "O&is#", PyMac_GetStr255, &key, &attr,
- &data, &datalen))
- return NULL;
- if ((err=ICSetPref(self->inst, key, (ICAttr)attr, (Ptr)data,
- (long)datalen)) != 0)
- return PyMac_Error(err);
- Py_INCREF(Py_None);
- return Py_None;
+ OSStatus err;
+ Str255 key;
+ int attr;
+ char *data;
+ int datalen;
+
+ if (!PyArg_ParseTuple(args, "O&is#", PyMac_GetStr255, &key, &attr,
+ &data, &datalen))
+ return NULL;
+ if ((err=ICSetPref(self->inst, key, (ICAttr)attr, (Ptr)data,
+ (long)datalen)) != 0)
+ return PyMac_Error(err);
+ Py_INCREF(Py_None);
+ return Py_None;
}
-static char ici_ICCountPref__doc__[] =
+static char ici_ICCountPref__doc__[] =
"()->int; Return number of preferences"
;
static PyObject *
ici_ICCountPref(iciobject *self, PyObject *args)
{
- OSStatus err;
- long count;
-
- if (!PyArg_ParseTuple(args, ""))
- return NULL;
- if ((err=ICCountPref(self->inst, &count)) != 0 )
- return PyMac_Error(err);
- return Py_BuildValue("i", (int)count);
+ OSStatus err;
+ long count;
+
+ if (!PyArg_ParseTuple(args, ""))
+ return NULL;
+ if ((err=ICCountPref(self->inst, &count)) != 0 )
+ return PyMac_Error(err);
+ return Py_BuildValue("i", (int)count);
}
-static char ici_ICGetIndPref__doc__[] =
+static char ici_ICGetIndPref__doc__[] =
"(num)->key; Return key of preference with given index"
;
static PyObject *
ici_ICGetIndPref(iciobject *self, PyObject *args)
{
- OSStatus err;
- long num;
- Str255 key;
-
- if (!PyArg_ParseTuple(args, "l", &num))
- return NULL;
- if ((err=ICGetIndPref(self->inst, num, key)) != 0 )
- return PyMac_Error(err);
- return Py_BuildValue("O&", PyMac_BuildStr255, key);
+ OSStatus err;
+ long num;
+ Str255 key;
+
+ if (!PyArg_ParseTuple(args, "l", &num))
+ return NULL;
+ if ((err=ICGetIndPref(self->inst, num, key)) != 0 )
+ return PyMac_Error(err);
+ return Py_BuildValue("O&", PyMac_BuildStr255, key);
}
-static char ici_ICDeletePref__doc__[] =
+static char ici_ICDeletePref__doc__[] =
"(key)->None; Delete preference"
;
static PyObject *
ici_ICDeletePref(iciobject *self, PyObject *args)
{
- OSStatus err;
- Str255 key;
-
- if (!PyArg_ParseTuple(args, "O&", PyMac_GetStr255, key))
- return NULL;
- if ((err=ICDeletePref(self->inst, key)) != 0 )
- return PyMac_Error(err);
- Py_INCREF(Py_None);
- return Py_None;
+ OSStatus err;
+ Str255 key;
+
+ if (!PyArg_ParseTuple(args, "O&", PyMac_GetStr255, key))
+ return NULL;
+ if ((err=ICDeletePref(self->inst, key)) != 0 )
+ return PyMac_Error(err);
+ Py_INCREF(Py_None);
+ return Py_None;
}
-static char ici_ICEnd__doc__[] =
+static char ici_ICEnd__doc__[] =
"()->None; Unlock file after ICBegin call"
;
static PyObject *
ici_ICEnd(iciobject *self, PyObject *args)
{
- OSStatus err;
-
- if (!PyArg_ParseTuple(args, ""))
- return NULL;
- if ((err=ICEnd(self->inst)) != 0 )
- return PyMac_Error(err);
- Py_INCREF(Py_None);
- return Py_None;
+ OSStatus err;
+
+ if (!PyArg_ParseTuple(args, ""))
+ return NULL;
+ if ((err=ICEnd(self->inst)) != 0 )
+ return PyMac_Error(err);
+ Py_INCREF(Py_None);
+ return Py_None;
}
-static char ici_ICEditPreferences__doc__[] =
+static char ici_ICEditPreferences__doc__[] =
"(key)->None; Ask user to edit preferences, staring with key"
;
static PyObject *
ici_ICEditPreferences(iciobject *self, PyObject *args)
{
- OSStatus err;
- Str255 key;
-
- if (!PyArg_ParseTuple(args, "O&", PyMac_GetStr255, key))
- return NULL;
- if ((err=ICEditPreferences(self->inst, key)) != 0 )
- return PyMac_Error(err);
- Py_INCREF(Py_None);
- return Py_None;
+ OSStatus err;
+ Str255 key;
+
+ if (!PyArg_ParseTuple(args, "O&", PyMac_GetStr255, key))
+ return NULL;
+ if ((err=ICEditPreferences(self->inst, key)) != 0 )
+ return PyMac_Error(err);
+ Py_INCREF(Py_None);
+ return Py_None;
}
-static char ici_ICParseURL__doc__[] =
+static char ici_ICParseURL__doc__[] =
"(hint, data, selStart, selEnd, handle)->selStart, selEnd; Find an URL, return in handle"
;
static PyObject *
ici_ICParseURL(iciobject *self, PyObject *args)
{
- OSStatus err;
- Str255 hint;
- char *data;
- int datalen;
- long selStart, selEnd;
- Handle h;
-
- if (!PyArg_ParseTuple(args, "O&s#llO&", PyMac_GetStr255, hint, &data, &datalen,
- &selStart, &selEnd, ResObj_Convert, &h))
- return NULL;
- if ((err=ICParseURL(self->inst, hint, (Ptr)data, (long)datalen,
- &selStart, &selEnd, h)) != 0 )
- return PyMac_Error(err);
- return Py_BuildValue("ii", (int)selStart, (int)selEnd);
+ OSStatus err;
+ Str255 hint;
+ char *data;
+ int datalen;
+ long selStart, selEnd;
+ Handle h;
+
+ if (!PyArg_ParseTuple(args, "O&s#llO&", PyMac_GetStr255, hint, &data, &datalen,
+ &selStart, &selEnd, ResObj_Convert, &h))
+ return NULL;
+ if ((err=ICParseURL(self->inst, hint, (Ptr)data, (long)datalen,
+ &selStart, &selEnd, h)) != 0 )
+ return PyMac_Error(err);
+ return Py_BuildValue("ii", (int)selStart, (int)selEnd);
}
-static char ici_ICLaunchURL__doc__[] =
+static char ici_ICLaunchURL__doc__[] =
"(hint, data, selStart, selEnd)->None; Find an URL and launch the correct app"
;
static PyObject *
ici_ICLaunchURL(iciobject *self, PyObject *args)
{
- OSStatus err;
- Str255 hint;
- char *data;
- int datalen;
- long selStart, selEnd;
-
- if (!PyArg_ParseTuple(args, "O&s#ll", PyMac_GetStr255, hint, &data, &datalen,
- &selStart, &selEnd))
- return NULL;
- if ((err=ICLaunchURL(self->inst, hint, (Ptr)data, (long)datalen,
- &selStart, &selEnd)) != 0 )
- return PyMac_Error(err);
- return Py_BuildValue("ii", (int)selStart, (int)selEnd);
+ OSStatus err;
+ Str255 hint;
+ char *data;
+ int datalen;
+ long selStart, selEnd;
+
+ if (!PyArg_ParseTuple(args, "O&s#ll", PyMac_GetStr255, hint, &data, &datalen,
+ &selStart, &selEnd))
+ return NULL;
+ if ((err=ICLaunchURL(self->inst, hint, (Ptr)data, (long)datalen,
+ &selStart, &selEnd)) != 0 )
+ return PyMac_Error(err);
+ return Py_BuildValue("ii", (int)selStart, (int)selEnd);
}
-static char ici_ICMapFilename__doc__[] =
+static char ici_ICMapFilename__doc__[] =
"(filename)->mapinfo; Get filemap info for given filename"
;
static PyObject *
ici_ICMapFilename(iciobject *self, PyObject *args)
{
- OSStatus err;
- Str255 filename;
- ICMapEntry entry;
-
- if (!PyArg_ParseTuple(args, "O&", PyMac_GetStr255, filename))
- return NULL;
- if ((err=ICMapFilename(self->inst, filename, &entry)) != 0 )
- return PyMac_Error(err);
- return Py_BuildValue("hO&O&O&lO&O&O&O&O&", entry.version,
- PyMac_BuildOSType, entry.fileType,
- PyMac_BuildOSType, entry.fileCreator,
- PyMac_BuildOSType, entry.postCreator,
- entry.flags,
- PyMac_BuildStr255, entry.extension,
- PyMac_BuildStr255, entry.creatorAppName,
- PyMac_BuildStr255, entry.postAppName,
- PyMac_BuildStr255, entry.MIMEType,
- PyMac_BuildStr255, entry.entryName);
+ OSStatus err;
+ Str255 filename;
+ ICMapEntry entry;
+
+ if (!PyArg_ParseTuple(args, "O&", PyMac_GetStr255, filename))
+ return NULL;
+ if ((err=ICMapFilename(self->inst, filename, &entry)) != 0 )
+ return PyMac_Error(err);
+ return Py_BuildValue("hO&O&O&lO&O&O&O&O&", entry.version,
+ PyMac_BuildOSType, entry.fileType,
+ PyMac_BuildOSType, entry.fileCreator,
+ PyMac_BuildOSType, entry.postCreator,
+ entry.flags,
+ PyMac_BuildStr255, entry.extension,
+ PyMac_BuildStr255, entry.creatorAppName,
+ PyMac_BuildStr255, entry.postAppName,
+ PyMac_BuildStr255, entry.MIMEType,
+ PyMac_BuildStr255, entry.entryName);
}
-static char ici_ICMapTypeCreator__doc__[] =
+static char ici_ICMapTypeCreator__doc__[] =
"(type, creator, filename)->mapinfo; Get filemap info for given tp/cr/filename"
;
static PyObject *
ici_ICMapTypeCreator(iciobject *self, PyObject *args)
{
- OSStatus err;
- OSType type, creator;
- Str255 filename;
- ICMapEntry entry;
-
- if (!PyArg_ParseTuple(args, "O&O&O&",
- PyMac_GetOSType, &type,
- PyMac_GetOSType, &creator,
- PyMac_GetStr255, filename))
- return NULL;
- if ((err=ICMapTypeCreator(self->inst, type, creator, filename, &entry)) != 0 )
- return PyMac_Error(err);
- return Py_BuildValue("hO&O&O&lO&O&O&O&O&", entry.version,
- PyMac_BuildOSType, entry.fileType,
- PyMac_BuildOSType, entry.fileCreator,
- PyMac_BuildOSType, entry.postCreator,
- entry.flags,
- PyMac_BuildStr255, entry.extension,
- PyMac_BuildStr255, entry.creatorAppName,
- PyMac_BuildStr255, entry.postAppName,
- PyMac_BuildStr255, entry.MIMEType,
- PyMac_BuildStr255, entry.entryName);
+ OSStatus err;
+ OSType type, creator;
+ Str255 filename;
+ ICMapEntry entry;
+
+ if (!PyArg_ParseTuple(args, "O&O&O&",
+ PyMac_GetOSType, &type,
+ PyMac_GetOSType, &creator,
+ PyMac_GetStr255, filename))
+ return NULL;
+ if ((err=ICMapTypeCreator(self->inst, type, creator, filename, &entry)) != 0 )
+ return PyMac_Error(err);
+ return Py_BuildValue("hO&O&O&lO&O&O&O&O&", entry.version,
+ PyMac_BuildOSType, entry.fileType,
+ PyMac_BuildOSType, entry.fileCreator,
+ PyMac_BuildOSType, entry.postCreator,
+ entry.flags,
+ PyMac_BuildStr255, entry.extension,
+ PyMac_BuildStr255, entry.creatorAppName,
+ PyMac_BuildStr255, entry.postAppName,
+ PyMac_BuildStr255, entry.MIMEType,
+ PyMac_BuildStr255, entry.entryName);
}
static struct PyMethodDef ici_methods[] = {
- {"ICGetSeed", (PyCFunction)ici_ICGetSeed, METH_VARARGS, ici_ICGetSeed__doc__},
- {"ICBegin", (PyCFunction)ici_ICBegin, METH_VARARGS, ici_ICBegin__doc__},
- {"ICFindPrefHandle", (PyCFunction)ici_ICFindPrefHandle, METH_VARARGS, ici_ICFindPrefHandle__doc__},
- {"ICSetPref", (PyCFunction)ici_ICSetPref, METH_VARARGS, ici_ICSetPref__doc__},
- {"ICCountPref", (PyCFunction)ici_ICCountPref, METH_VARARGS, ici_ICCountPref__doc__},
- {"ICGetIndPref", (PyCFunction)ici_ICGetIndPref, METH_VARARGS, ici_ICGetIndPref__doc__},
- {"ICDeletePref", (PyCFunction)ici_ICDeletePref, METH_VARARGS, ici_ICDeletePref__doc__},
- {"ICEnd", (PyCFunction)ici_ICEnd, METH_VARARGS, ici_ICEnd__doc__},
- {"ICEditPreferences", (PyCFunction)ici_ICEditPreferences, METH_VARARGS, ici_ICEditPreferences__doc__},
- {"ICParseURL", (PyCFunction)ici_ICParseURL, METH_VARARGS, ici_ICParseURL__doc__},
- {"ICLaunchURL", (PyCFunction)ici_ICLaunchURL, METH_VARARGS, ici_ICLaunchURL__doc__},
- {"ICMapFilename", (PyCFunction)ici_ICMapFilename, METH_VARARGS, ici_ICMapFilename__doc__},
- {"ICMapTypeCreator", (PyCFunction)ici_ICMapTypeCreator, METH_VARARGS, ici_ICMapTypeCreator__doc__},
-
- {NULL, NULL} /* sentinel */
+ {"ICGetSeed", (PyCFunction)ici_ICGetSeed, METH_VARARGS, ici_ICGetSeed__doc__},
+ {"ICBegin", (PyCFunction)ici_ICBegin, METH_VARARGS, ici_ICBegin__doc__},
+ {"ICFindPrefHandle", (PyCFunction)ici_ICFindPrefHandle, METH_VARARGS, ici_ICFindPrefHandle__doc__},
+ {"ICSetPref", (PyCFunction)ici_ICSetPref, METH_VARARGS, ici_ICSetPref__doc__},
+ {"ICCountPref", (PyCFunction)ici_ICCountPref, METH_VARARGS, ici_ICCountPref__doc__},
+ {"ICGetIndPref", (PyCFunction)ici_ICGetIndPref, METH_VARARGS, ici_ICGetIndPref__doc__},
+ {"ICDeletePref", (PyCFunction)ici_ICDeletePref, METH_VARARGS, ici_ICDeletePref__doc__},
+ {"ICEnd", (PyCFunction)ici_ICEnd, METH_VARARGS, ici_ICEnd__doc__},
+ {"ICEditPreferences", (PyCFunction)ici_ICEditPreferences, METH_VARARGS, ici_ICEditPreferences__doc__},
+ {"ICParseURL", (PyCFunction)ici_ICParseURL, METH_VARARGS, ici_ICParseURL__doc__},
+ {"ICLaunchURL", (PyCFunction)ici_ICLaunchURL, METH_VARARGS, ici_ICLaunchURL__doc__},
+ {"ICMapFilename", (PyCFunction)ici_ICMapFilename, METH_VARARGS, ici_ICMapFilename__doc__},
+ {"ICMapTypeCreator", (PyCFunction)ici_ICMapTypeCreator, METH_VARARGS, ici_ICMapTypeCreator__doc__},
+
+ {NULL, NULL} /* sentinel */
};
/* ---------- */
@@ -359,61 +359,61 @@ static struct PyMethodDef ici_methods[] = {
static iciobject *
newiciobject(OSType creator)
{
- iciobject *self;
- OSStatus err;
-
- self = PyObject_NEW(iciobject, &Icitype);
- if (self == NULL)
- return NULL;
- if ((err=ICStart(&self->inst, creator)) != 0 ) {
- (void)PyMac_Error(err);
- PyObject_DEL(self);
- return NULL;
- }
- return self;
+ iciobject *self;
+ OSStatus err;
+
+ self = PyObject_NEW(iciobject, &Icitype);
+ if (self == NULL)
+ return NULL;
+ if ((err=ICStart(&self->inst, creator)) != 0 ) {
+ (void)PyMac_Error(err);
+ PyObject_DEL(self);
+ return NULL;
+ }
+ return self;
}
static void
ici_dealloc(iciobject *self)
{
- (void)ICStop(self->inst);
- PyObject_DEL(self);
+ (void)ICStop(self->inst);
+ PyObject_DEL(self);
}
static PyObject *
ici_getattr(iciobject *self, char *name)
{
- return Py_FindMethod(ici_methods, (PyObject *)self, name);
+ return Py_FindMethod(ici_methods, (PyObject *)self, name);
}
-static char Icitype__doc__[] =
+static char Icitype__doc__[] =
"Internet Config instance"
;
static PyTypeObject Icitype = {
- PyObject_HEAD_INIT(&PyType_Type)
- 0, /*ob_size*/
- "icglue.ic_instance", /*tp_name*/
- sizeof(iciobject), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- /* methods */
- (destructor)ici_dealloc, /*tp_dealloc*/
- (printfunc)0, /*tp_print*/
- (getattrfunc)ici_getattr, /*tp_getattr*/
- (setattrfunc)0, /*tp_setattr*/
- (cmpfunc)0, /*tp_compare*/
- (reprfunc)0, /*tp_repr*/
- 0, /*tp_as_number*/
- 0, /*tp_as_sequence*/
- 0, /*tp_as_mapping*/
- (hashfunc)0, /*tp_hash*/
- (ternaryfunc)0, /*tp_call*/
- (reprfunc)0, /*tp_str*/
-
- /* Space for future expansion */
- 0L,0L,0L,0L,
- Icitype__doc__ /* Documentation string */
+ PyObject_HEAD_INIT(&PyType_Type)
+ 0, /*ob_size*/
+ "icglue.ic_instance", /*tp_name*/
+ sizeof(iciobject), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ /* methods */
+ (destructor)ici_dealloc, /*tp_dealloc*/
+ (printfunc)0, /*tp_print*/
+ (getattrfunc)ici_getattr, /*tp_getattr*/
+ (setattrfunc)0, /*tp_setattr*/
+ (cmpfunc)0, /*tp_compare*/
+ (reprfunc)0, /*tp_repr*/
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ (hashfunc)0, /*tp_hash*/
+ (ternaryfunc)0, /*tp_call*/
+ (reprfunc)0, /*tp_str*/
+
+ /* Space for future expansion */
+ 0L,0L,0L,0L,
+ Icitype__doc__ /* Documentation string */
};
/* End of code for ic_instance objects */
@@ -427,52 +427,52 @@ static char ic_ICStart__doc__[] =
static PyObject *
ic_ICStart(PyObject *self, PyObject *args)
{
- OSType creator;
+ OSType creator;
- if (!PyArg_ParseTuple(args, "O&", PyMac_GetOSType, &creator))
- return NULL;
- return (PyObject *)newiciobject(creator);
+ if (!PyArg_ParseTuple(args, "O&", PyMac_GetOSType, &creator))
+ return NULL;
+ return (PyObject *)newiciobject(creator);
}
/* List of methods defined in the module */
static struct PyMethodDef ic_methods[] = {
- {"ICStart", (PyCFunction)ic_ICStart, METH_VARARGS, ic_ICStart__doc__},
-
- {NULL, (PyCFunction)NULL, 0, NULL} /* sentinel */
+ {"ICStart", (PyCFunction)ic_ICStart, METH_VARARGS, ic_ICStart__doc__},
+
+ {NULL, (PyCFunction)NULL, 0, NULL} /* sentinel */
};
/* Initialization function for the module (*must* be called initicglue) */
-static char icglue_module_documentation[] =
+static char icglue_module_documentation[] =
"Implements low-level Internet Config interface"
;
void
initicglue(void)
{
- PyObject *m, *d;
-
- if (PyErr_WarnPy3k("In 3.x, the icglue module is removed.", 1))
- return;
-
- /* Create the module and add the functions */
- m = Py_InitModule4("icglue", ic_methods,
- icglue_module_documentation,
- (PyObject*)NULL,PYTHON_API_VERSION);
-
- /* Add some symbolic constants to the module */
- d = PyModule_GetDict(m);
- ErrorObject = PyMac_GetOSErrException();
- if (ErrorObject == NULL ||
- PyDict_SetItemString(d, "error", ErrorObject) != 0)
- return;
-
- /* XXXX Add constants here */
-
- /* Check for errors */
- if (PyErr_Occurred())
- Py_FatalError("can't initialize module icglue");
+ PyObject *m, *d;
+
+ if (PyErr_WarnPy3k("In 3.x, the icglue module is removed.", 1))
+ return;
+
+ /* Create the module and add the functions */
+ m = Py_InitModule4("icglue", ic_methods,
+ icglue_module_documentation,
+ (PyObject*)NULL,PYTHON_API_VERSION);
+
+ /* Add some symbolic constants to the module */
+ d = PyModule_GetDict(m);
+ ErrorObject = PyMac_GetOSErrException();
+ if (ErrorObject == NULL ||
+ PyDict_SetItemString(d, "error", ErrorObject) != 0)
+ return;
+
+ /* XXXX Add constants here */
+
+ /* Check for errors */
+ if (PyErr_Occurred())
+ Py_FatalError("can't initialize module icglue");
}
diff --git a/Mac/Modules/icn/_Icnmodule.c b/Mac/Modules/icn/_Icnmodule.c
index 80201a2..6967ae4 100644
--- a/Mac/Modules/icn/_Icnmodule.c
+++ b/Mac/Modules/icn/_Icnmodule.c
@@ -10,9 +10,9 @@
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
- PyErr_SetString(PyExc_NotImplementedError, \
- "Not available in this shared library/OS version"); \
- return NULL; \
+ PyErr_SetString(PyExc_NotImplementedError, \
+ "Not available in this shared library/OS version"); \
+ return NULL; \
}} while(0)
@@ -23,1561 +23,1561 @@ static PyObject *Icn_Error;
static PyObject *Icn_GetCIcon(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CIconHandle _rv;
- SInt16 iconID;
+ PyObject *_res = NULL;
+ CIconHandle _rv;
+ SInt16 iconID;
#ifndef GetCIcon
- PyMac_PRECHECK(GetCIcon);
+ PyMac_PRECHECK(GetCIcon);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &iconID))
- return NULL;
- _rv = GetCIcon(iconID);
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &iconID))
+ return NULL;
+ _rv = GetCIcon(iconID);
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *Icn_PlotCIcon(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Rect theRect;
- CIconHandle theIcon;
+ PyObject *_res = NULL;
+ Rect theRect;
+ CIconHandle theIcon;
#ifndef PlotCIcon
- PyMac_PRECHECK(PlotCIcon);
+ PyMac_PRECHECK(PlotCIcon);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- PyMac_GetRect, &theRect,
- ResObj_Convert, &theIcon))
- return NULL;
- PlotCIcon(&theRect,
- theIcon);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ PyMac_GetRect, &theRect,
+ ResObj_Convert, &theIcon))
+ return NULL;
+ PlotCIcon(&theRect,
+ theIcon);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Icn_DisposeCIcon(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CIconHandle theIcon;
+ PyObject *_res = NULL;
+ CIconHandle theIcon;
#ifndef DisposeCIcon
- PyMac_PRECHECK(DisposeCIcon);
+ PyMac_PRECHECK(DisposeCIcon);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &theIcon))
- return NULL;
- DisposeCIcon(theIcon);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &theIcon))
+ return NULL;
+ DisposeCIcon(theIcon);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Icn_GetIcon(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Handle _rv;
- SInt16 iconID;
+ PyObject *_res = NULL;
+ Handle _rv;
+ SInt16 iconID;
#ifndef GetIcon
- PyMac_PRECHECK(GetIcon);
+ PyMac_PRECHECK(GetIcon);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &iconID))
- return NULL;
- _rv = GetIcon(iconID);
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &iconID))
+ return NULL;
+ _rv = GetIcon(iconID);
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *Icn_PlotIcon(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Rect theRect;
- Handle theIcon;
+ PyObject *_res = NULL;
+ Rect theRect;
+ Handle theIcon;
#ifndef PlotIcon
- PyMac_PRECHECK(PlotIcon);
+ PyMac_PRECHECK(PlotIcon);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- PyMac_GetRect, &theRect,
- ResObj_Convert, &theIcon))
- return NULL;
- PlotIcon(&theRect,
- theIcon);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ PyMac_GetRect, &theRect,
+ ResObj_Convert, &theIcon))
+ return NULL;
+ PlotIcon(&theRect,
+ theIcon);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Icn_PlotIconID(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Rect theRect;
- IconAlignmentType align;
- IconTransformType transform;
- SInt16 theResID;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Rect theRect;
+ IconAlignmentType align;
+ IconTransformType transform;
+ SInt16 theResID;
#ifndef PlotIconID
- PyMac_PRECHECK(PlotIconID);
+ PyMac_PRECHECK(PlotIconID);
#endif
- if (!PyArg_ParseTuple(_args, "O&hhh",
- PyMac_GetRect, &theRect,
- &align,
- &transform,
- &theResID))
- return NULL;
- _err = PlotIconID(&theRect,
- align,
- transform,
- theResID);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&hhh",
+ PyMac_GetRect, &theRect,
+ &align,
+ &transform,
+ &theResID))
+ return NULL;
+ _err = PlotIconID(&theRect,
+ align,
+ transform,
+ theResID);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Icn_NewIconSuite(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- IconSuiteRef theIconSuite;
+ PyObject *_res = NULL;
+ OSErr _err;
+ IconSuiteRef theIconSuite;
#ifndef NewIconSuite
- PyMac_PRECHECK(NewIconSuite);
+ PyMac_PRECHECK(NewIconSuite);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = NewIconSuite(&theIconSuite);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- ResObj_New, theIconSuite);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = NewIconSuite(&theIconSuite);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ ResObj_New, theIconSuite);
+ return _res;
}
static PyObject *Icn_AddIconToSuite(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Handle theIconData;
- IconSuiteRef theSuite;
- ResType theType;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Handle theIconData;
+ IconSuiteRef theSuite;
+ ResType theType;
#ifndef AddIconToSuite
- PyMac_PRECHECK(AddIconToSuite);
+ PyMac_PRECHECK(AddIconToSuite);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- ResObj_Convert, &theIconData,
- ResObj_Convert, &theSuite,
- PyMac_GetOSType, &theType))
- return NULL;
- _err = AddIconToSuite(theIconData,
- theSuite,
- theType);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ ResObj_Convert, &theIconData,
+ ResObj_Convert, &theSuite,
+ PyMac_GetOSType, &theType))
+ return NULL;
+ _err = AddIconToSuite(theIconData,
+ theSuite,
+ theType);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Icn_GetIconFromSuite(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Handle theIconData;
- IconSuiteRef theSuite;
- ResType theType;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Handle theIconData;
+ IconSuiteRef theSuite;
+ ResType theType;
#ifndef GetIconFromSuite
- PyMac_PRECHECK(GetIconFromSuite);
+ PyMac_PRECHECK(GetIconFromSuite);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- ResObj_Convert, &theSuite,
- PyMac_GetOSType, &theType))
- return NULL;
- _err = GetIconFromSuite(&theIconData,
- theSuite,
- theType);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- ResObj_New, theIconData);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ ResObj_Convert, &theSuite,
+ PyMac_GetOSType, &theType))
+ return NULL;
+ _err = GetIconFromSuite(&theIconData,
+ theSuite,
+ theType);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ ResObj_New, theIconData);
+ return _res;
}
static PyObject *Icn_GetIconSuite(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- IconSuiteRef theIconSuite;
- SInt16 theResID;
- IconSelectorValue selector;
+ PyObject *_res = NULL;
+ OSErr _err;
+ IconSuiteRef theIconSuite;
+ SInt16 theResID;
+ IconSelectorValue selector;
#ifndef GetIconSuite
- PyMac_PRECHECK(GetIconSuite);
+ PyMac_PRECHECK(GetIconSuite);
#endif
- if (!PyArg_ParseTuple(_args, "hl",
- &theResID,
- &selector))
- return NULL;
- _err = GetIconSuite(&theIconSuite,
- theResID,
- selector);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- ResObj_New, theIconSuite);
- return _res;
+ if (!PyArg_ParseTuple(_args, "hl",
+ &theResID,
+ &selector))
+ return NULL;
+ _err = GetIconSuite(&theIconSuite,
+ theResID,
+ selector);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ ResObj_New, theIconSuite);
+ return _res;
}
static PyObject *Icn_DisposeIconSuite(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- IconSuiteRef theIconSuite;
- Boolean disposeData;
+ PyObject *_res = NULL;
+ OSErr _err;
+ IconSuiteRef theIconSuite;
+ Boolean disposeData;
#ifndef DisposeIconSuite
- PyMac_PRECHECK(DisposeIconSuite);
+ PyMac_PRECHECK(DisposeIconSuite);
#endif
- if (!PyArg_ParseTuple(_args, "O&b",
- ResObj_Convert, &theIconSuite,
- &disposeData))
- return NULL;
- _err = DisposeIconSuite(theIconSuite,
- disposeData);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&b",
+ ResObj_Convert, &theIconSuite,
+ &disposeData))
+ return NULL;
+ _err = DisposeIconSuite(theIconSuite,
+ disposeData);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Icn_PlotIconSuite(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Rect theRect;
- IconAlignmentType align;
- IconTransformType transform;
- IconSuiteRef theIconSuite;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Rect theRect;
+ IconAlignmentType align;
+ IconTransformType transform;
+ IconSuiteRef theIconSuite;
#ifndef PlotIconSuite
- PyMac_PRECHECK(PlotIconSuite);
+ PyMac_PRECHECK(PlotIconSuite);
#endif
- if (!PyArg_ParseTuple(_args, "O&hhO&",
- PyMac_GetRect, &theRect,
- &align,
- &transform,
- ResObj_Convert, &theIconSuite))
- return NULL;
- _err = PlotIconSuite(&theRect,
- align,
- transform,
- theIconSuite);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&hhO&",
+ PyMac_GetRect, &theRect,
+ &align,
+ &transform,
+ ResObj_Convert, &theIconSuite))
+ return NULL;
+ _err = PlotIconSuite(&theRect,
+ align,
+ transform,
+ theIconSuite);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Icn_LoadIconCache(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Rect theRect;
- IconAlignmentType align;
- IconTransformType transform;
- IconCacheRef theIconCache;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Rect theRect;
+ IconAlignmentType align;
+ IconTransformType transform;
+ IconCacheRef theIconCache;
#ifndef LoadIconCache
- PyMac_PRECHECK(LoadIconCache);
+ PyMac_PRECHECK(LoadIconCache);
#endif
- if (!PyArg_ParseTuple(_args, "O&hhO&",
- PyMac_GetRect, &theRect,
- &align,
- &transform,
- ResObj_Convert, &theIconCache))
- return NULL;
- _err = LoadIconCache(&theRect,
- align,
- transform,
- theIconCache);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&hhO&",
+ PyMac_GetRect, &theRect,
+ &align,
+ &transform,
+ ResObj_Convert, &theIconCache))
+ return NULL;
+ _err = LoadIconCache(&theRect,
+ align,
+ transform,
+ theIconCache);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Icn_GetLabel(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- SInt16 labelNumber;
- RGBColor labelColor;
- Str255 labelString;
+ PyObject *_res = NULL;
+ OSErr _err;
+ SInt16 labelNumber;
+ RGBColor labelColor;
+ Str255 labelString;
#ifndef GetLabel
- PyMac_PRECHECK(GetLabel);
+ PyMac_PRECHECK(GetLabel);
#endif
- if (!PyArg_ParseTuple(_args, "hO&",
- &labelNumber,
- PyMac_GetStr255, labelString))
- return NULL;
- _err = GetLabel(labelNumber,
- &labelColor,
- labelString);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- QdRGB_New, &labelColor);
- return _res;
+ if (!PyArg_ParseTuple(_args, "hO&",
+ &labelNumber,
+ PyMac_GetStr255, labelString))
+ return NULL;
+ _err = GetLabel(labelNumber,
+ &labelColor,
+ labelString);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ QdRGB_New, &labelColor);
+ return _res;
}
static PyObject *Icn_PtInIconID(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- Point testPt;
- Rect iconRect;
- IconAlignmentType align;
- SInt16 iconID;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ Point testPt;
+ Rect iconRect;
+ IconAlignmentType align;
+ SInt16 iconID;
#ifndef PtInIconID
- PyMac_PRECHECK(PtInIconID);
+ PyMac_PRECHECK(PtInIconID);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&hh",
- PyMac_GetPoint, &testPt,
- PyMac_GetRect, &iconRect,
- &align,
- &iconID))
- return NULL;
- _rv = PtInIconID(testPt,
- &iconRect,
- align,
- iconID);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&hh",
+ PyMac_GetPoint, &testPt,
+ PyMac_GetRect, &iconRect,
+ &align,
+ &iconID))
+ return NULL;
+ _rv = PtInIconID(testPt,
+ &iconRect,
+ align,
+ iconID);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *Icn_PtInIconSuite(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- Point testPt;
- Rect iconRect;
- IconAlignmentType align;
- IconSuiteRef theIconSuite;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ Point testPt;
+ Rect iconRect;
+ IconAlignmentType align;
+ IconSuiteRef theIconSuite;
#ifndef PtInIconSuite
- PyMac_PRECHECK(PtInIconSuite);
+ PyMac_PRECHECK(PtInIconSuite);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&hO&",
- PyMac_GetPoint, &testPt,
- PyMac_GetRect, &iconRect,
- &align,
- ResObj_Convert, &theIconSuite))
- return NULL;
- _rv = PtInIconSuite(testPt,
- &iconRect,
- align,
- theIconSuite);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&hO&",
+ PyMac_GetPoint, &testPt,
+ PyMac_GetRect, &iconRect,
+ &align,
+ ResObj_Convert, &theIconSuite))
+ return NULL;
+ _rv = PtInIconSuite(testPt,
+ &iconRect,
+ align,
+ theIconSuite);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *Icn_RectInIconID(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- Rect testRect;
- Rect iconRect;
- IconAlignmentType align;
- SInt16 iconID;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ Rect testRect;
+ Rect iconRect;
+ IconAlignmentType align;
+ SInt16 iconID;
#ifndef RectInIconID
- PyMac_PRECHECK(RectInIconID);
+ PyMac_PRECHECK(RectInIconID);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&hh",
- PyMac_GetRect, &testRect,
- PyMac_GetRect, &iconRect,
- &align,
- &iconID))
- return NULL;
- _rv = RectInIconID(&testRect,
- &iconRect,
- align,
- iconID);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&hh",
+ PyMac_GetRect, &testRect,
+ PyMac_GetRect, &iconRect,
+ &align,
+ &iconID))
+ return NULL;
+ _rv = RectInIconID(&testRect,
+ &iconRect,
+ align,
+ iconID);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *Icn_RectInIconSuite(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- Rect testRect;
- Rect iconRect;
- IconAlignmentType align;
- IconSuiteRef theIconSuite;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ Rect testRect;
+ Rect iconRect;
+ IconAlignmentType align;
+ IconSuiteRef theIconSuite;
#ifndef RectInIconSuite
- PyMac_PRECHECK(RectInIconSuite);
+ PyMac_PRECHECK(RectInIconSuite);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&hO&",
- PyMac_GetRect, &testRect,
- PyMac_GetRect, &iconRect,
- &align,
- ResObj_Convert, &theIconSuite))
- return NULL;
- _rv = RectInIconSuite(&testRect,
- &iconRect,
- align,
- theIconSuite);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&hO&",
+ PyMac_GetRect, &testRect,
+ PyMac_GetRect, &iconRect,
+ &align,
+ ResObj_Convert, &theIconSuite))
+ return NULL;
+ _rv = RectInIconSuite(&testRect,
+ &iconRect,
+ align,
+ theIconSuite);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *Icn_IconIDToRgn(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- RgnHandle theRgn;
- Rect iconRect;
- IconAlignmentType align;
- SInt16 iconID;
+ PyObject *_res = NULL;
+ OSErr _err;
+ RgnHandle theRgn;
+ Rect iconRect;
+ IconAlignmentType align;
+ SInt16 iconID;
#ifndef IconIDToRgn
- PyMac_PRECHECK(IconIDToRgn);
+ PyMac_PRECHECK(IconIDToRgn);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&hh",
- ResObj_Convert, &theRgn,
- PyMac_GetRect, &iconRect,
- &align,
- &iconID))
- return NULL;
- _err = IconIDToRgn(theRgn,
- &iconRect,
- align,
- iconID);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&hh",
+ ResObj_Convert, &theRgn,
+ PyMac_GetRect, &iconRect,
+ &align,
+ &iconID))
+ return NULL;
+ _err = IconIDToRgn(theRgn,
+ &iconRect,
+ align,
+ iconID);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Icn_IconSuiteToRgn(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- RgnHandle theRgn;
- Rect iconRect;
- IconAlignmentType align;
- IconSuiteRef theIconSuite;
+ PyObject *_res = NULL;
+ OSErr _err;
+ RgnHandle theRgn;
+ Rect iconRect;
+ IconAlignmentType align;
+ IconSuiteRef theIconSuite;
#ifndef IconSuiteToRgn
- PyMac_PRECHECK(IconSuiteToRgn);
+ PyMac_PRECHECK(IconSuiteToRgn);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&hO&",
- ResObj_Convert, &theRgn,
- PyMac_GetRect, &iconRect,
- &align,
- ResObj_Convert, &theIconSuite))
- return NULL;
- _err = IconSuiteToRgn(theRgn,
- &iconRect,
- align,
- theIconSuite);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&hO&",
+ ResObj_Convert, &theRgn,
+ PyMac_GetRect, &iconRect,
+ &align,
+ ResObj_Convert, &theIconSuite))
+ return NULL;
+ _err = IconSuiteToRgn(theRgn,
+ &iconRect,
+ align,
+ theIconSuite);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Icn_SetSuiteLabel(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- IconSuiteRef theSuite;
- SInt16 theLabel;
+ PyObject *_res = NULL;
+ OSErr _err;
+ IconSuiteRef theSuite;
+ SInt16 theLabel;
#ifndef SetSuiteLabel
- PyMac_PRECHECK(SetSuiteLabel);
+ PyMac_PRECHECK(SetSuiteLabel);
#endif
- if (!PyArg_ParseTuple(_args, "O&h",
- ResObj_Convert, &theSuite,
- &theLabel))
- return NULL;
- _err = SetSuiteLabel(theSuite,
- theLabel);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&h",
+ ResObj_Convert, &theSuite,
+ &theLabel))
+ return NULL;
+ _err = SetSuiteLabel(theSuite,
+ theLabel);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Icn_GetSuiteLabel(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- SInt16 _rv;
- IconSuiteRef theSuite;
+ PyObject *_res = NULL;
+ SInt16 _rv;
+ IconSuiteRef theSuite;
#ifndef GetSuiteLabel
- PyMac_PRECHECK(GetSuiteLabel);
+ PyMac_PRECHECK(GetSuiteLabel);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &theSuite))
- return NULL;
- _rv = GetSuiteLabel(theSuite);
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &theSuite))
+ return NULL;
+ _rv = GetSuiteLabel(theSuite);
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *Icn_PlotIconHandle(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Rect theRect;
- IconAlignmentType align;
- IconTransformType transform;
- Handle theIcon;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Rect theRect;
+ IconAlignmentType align;
+ IconTransformType transform;
+ Handle theIcon;
#ifndef PlotIconHandle
- PyMac_PRECHECK(PlotIconHandle);
+ PyMac_PRECHECK(PlotIconHandle);
#endif
- if (!PyArg_ParseTuple(_args, "O&hhO&",
- PyMac_GetRect, &theRect,
- &align,
- &transform,
- ResObj_Convert, &theIcon))
- return NULL;
- _err = PlotIconHandle(&theRect,
- align,
- transform,
- theIcon);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&hhO&",
+ PyMac_GetRect, &theRect,
+ &align,
+ &transform,
+ ResObj_Convert, &theIcon))
+ return NULL;
+ _err = PlotIconHandle(&theRect,
+ align,
+ transform,
+ theIcon);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Icn_PlotSICNHandle(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Rect theRect;
- IconAlignmentType align;
- IconTransformType transform;
- Handle theSICN;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Rect theRect;
+ IconAlignmentType align;
+ IconTransformType transform;
+ Handle theSICN;
#ifndef PlotSICNHandle
- PyMac_PRECHECK(PlotSICNHandle);
+ PyMac_PRECHECK(PlotSICNHandle);
#endif
- if (!PyArg_ParseTuple(_args, "O&hhO&",
- PyMac_GetRect, &theRect,
- &align,
- &transform,
- ResObj_Convert, &theSICN))
- return NULL;
- _err = PlotSICNHandle(&theRect,
- align,
- transform,
- theSICN);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&hhO&",
+ PyMac_GetRect, &theRect,
+ &align,
+ &transform,
+ ResObj_Convert, &theSICN))
+ return NULL;
+ _err = PlotSICNHandle(&theRect,
+ align,
+ transform,
+ theSICN);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Icn_PlotCIconHandle(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Rect theRect;
- IconAlignmentType align;
- IconTransformType transform;
- CIconHandle theCIcon;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Rect theRect;
+ IconAlignmentType align;
+ IconTransformType transform;
+ CIconHandle theCIcon;
#ifndef PlotCIconHandle
- PyMac_PRECHECK(PlotCIconHandle);
+ PyMac_PRECHECK(PlotCIconHandle);
#endif
- if (!PyArg_ParseTuple(_args, "O&hhO&",
- PyMac_GetRect, &theRect,
- &align,
- &transform,
- ResObj_Convert, &theCIcon))
- return NULL;
- _err = PlotCIconHandle(&theRect,
- align,
- transform,
- theCIcon);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&hhO&",
+ PyMac_GetRect, &theRect,
+ &align,
+ &transform,
+ ResObj_Convert, &theCIcon))
+ return NULL;
+ _err = PlotCIconHandle(&theRect,
+ align,
+ transform,
+ theCIcon);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Icn_IconRefToIconFamily(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- IconRef theIconRef;
- IconSelectorValue whichIcons;
- IconFamilyHandle iconFamily;
+ PyObject *_res = NULL;
+ OSErr _err;
+ IconRef theIconRef;
+ IconSelectorValue whichIcons;
+ IconFamilyHandle iconFamily;
#ifndef IconRefToIconFamily
- PyMac_PRECHECK(IconRefToIconFamily);
+ PyMac_PRECHECK(IconRefToIconFamily);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- ResObj_Convert, &theIconRef,
- &whichIcons))
- return NULL;
- _err = IconRefToIconFamily(theIconRef,
- whichIcons,
- &iconFamily);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- ResObj_New, iconFamily);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ ResObj_Convert, &theIconRef,
+ &whichIcons))
+ return NULL;
+ _err = IconRefToIconFamily(theIconRef,
+ whichIcons,
+ &iconFamily);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ ResObj_New, iconFamily);
+ return _res;
}
static PyObject *Icn_IconFamilyToIconSuite(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- IconFamilyHandle iconFamily;
- IconSelectorValue whichIcons;
- IconSuiteRef iconSuite;
+ PyObject *_res = NULL;
+ OSErr _err;
+ IconFamilyHandle iconFamily;
+ IconSelectorValue whichIcons;
+ IconSuiteRef iconSuite;
#ifndef IconFamilyToIconSuite
- PyMac_PRECHECK(IconFamilyToIconSuite);
+ PyMac_PRECHECK(IconFamilyToIconSuite);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- ResObj_Convert, &iconFamily,
- &whichIcons))
- return NULL;
- _err = IconFamilyToIconSuite(iconFamily,
- whichIcons,
- &iconSuite);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- ResObj_New, iconSuite);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ ResObj_Convert, &iconFamily,
+ &whichIcons))
+ return NULL;
+ _err = IconFamilyToIconSuite(iconFamily,
+ whichIcons,
+ &iconSuite);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ ResObj_New, iconSuite);
+ return _res;
}
static PyObject *Icn_IconSuiteToIconFamily(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- IconSuiteRef iconSuite;
- IconSelectorValue whichIcons;
- IconFamilyHandle iconFamily;
+ PyObject *_res = NULL;
+ OSErr _err;
+ IconSuiteRef iconSuite;
+ IconSelectorValue whichIcons;
+ IconFamilyHandle iconFamily;
#ifndef IconSuiteToIconFamily
- PyMac_PRECHECK(IconSuiteToIconFamily);
+ PyMac_PRECHECK(IconSuiteToIconFamily);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- ResObj_Convert, &iconSuite,
- &whichIcons))
- return NULL;
- _err = IconSuiteToIconFamily(iconSuite,
- whichIcons,
- &iconFamily);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- ResObj_New, iconFamily);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ ResObj_Convert, &iconSuite,
+ &whichIcons))
+ return NULL;
+ _err = IconSuiteToIconFamily(iconSuite,
+ whichIcons,
+ &iconFamily);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ ResObj_New, iconFamily);
+ return _res;
}
static PyObject *Icn_SetIconFamilyData(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- IconFamilyHandle iconFamily;
- OSType iconType;
- Handle h;
+ PyObject *_res = NULL;
+ OSErr _err;
+ IconFamilyHandle iconFamily;
+ OSType iconType;
+ Handle h;
#ifndef SetIconFamilyData
- PyMac_PRECHECK(SetIconFamilyData);
+ PyMac_PRECHECK(SetIconFamilyData);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- ResObj_Convert, &iconFamily,
- PyMac_GetOSType, &iconType,
- ResObj_Convert, &h))
- return NULL;
- _err = SetIconFamilyData(iconFamily,
- iconType,
- h);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ ResObj_Convert, &iconFamily,
+ PyMac_GetOSType, &iconType,
+ ResObj_Convert, &h))
+ return NULL;
+ _err = SetIconFamilyData(iconFamily,
+ iconType,
+ h);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Icn_GetIconFamilyData(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- IconFamilyHandle iconFamily;
- OSType iconType;
- Handle h;
+ PyObject *_res = NULL;
+ OSErr _err;
+ IconFamilyHandle iconFamily;
+ OSType iconType;
+ Handle h;
#ifndef GetIconFamilyData
- PyMac_PRECHECK(GetIconFamilyData);
+ PyMac_PRECHECK(GetIconFamilyData);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- ResObj_Convert, &iconFamily,
- PyMac_GetOSType, &iconType,
- ResObj_Convert, &h))
- return NULL;
- _err = GetIconFamilyData(iconFamily,
- iconType,
- h);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ ResObj_Convert, &iconFamily,
+ PyMac_GetOSType, &iconType,
+ ResObj_Convert, &h))
+ return NULL;
+ _err = GetIconFamilyData(iconFamily,
+ iconType,
+ h);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Icn_GetIconRefOwners(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- IconRef theIconRef;
- UInt16 owners;
+ PyObject *_res = NULL;
+ OSErr _err;
+ IconRef theIconRef;
+ UInt16 owners;
#ifndef GetIconRefOwners
- PyMac_PRECHECK(GetIconRefOwners);
+ PyMac_PRECHECK(GetIconRefOwners);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &theIconRef))
- return NULL;
- _err = GetIconRefOwners(theIconRef,
- &owners);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("H",
- owners);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &theIconRef))
+ return NULL;
+ _err = GetIconRefOwners(theIconRef,
+ &owners);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("H",
+ owners);
+ return _res;
}
static PyObject *Icn_AcquireIconRef(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- IconRef theIconRef;
+ PyObject *_res = NULL;
+ OSErr _err;
+ IconRef theIconRef;
#ifndef AcquireIconRef
- PyMac_PRECHECK(AcquireIconRef);
+ PyMac_PRECHECK(AcquireIconRef);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &theIconRef))
- return NULL;
- _err = AcquireIconRef(theIconRef);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &theIconRef))
+ return NULL;
+ _err = AcquireIconRef(theIconRef);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Icn_ReleaseIconRef(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- IconRef theIconRef;
+ PyObject *_res = NULL;
+ OSErr _err;
+ IconRef theIconRef;
#ifndef ReleaseIconRef
- PyMac_PRECHECK(ReleaseIconRef);
+ PyMac_PRECHECK(ReleaseIconRef);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &theIconRef))
- return NULL;
- _err = ReleaseIconRef(theIconRef);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &theIconRef))
+ return NULL;
+ _err = ReleaseIconRef(theIconRef);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Icn_GetIconRefFromFile(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- FSSpec theFile;
- IconRef theIconRef;
- SInt16 theLabel;
+ PyObject *_res = NULL;
+ OSErr _err;
+ FSSpec theFile;
+ IconRef theIconRef;
+ SInt16 theLabel;
#ifndef GetIconRefFromFile
- PyMac_PRECHECK(GetIconRefFromFile);
+ PyMac_PRECHECK(GetIconRefFromFile);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetFSSpec, &theFile))
- return NULL;
- _err = GetIconRefFromFile(&theFile,
- &theIconRef,
- &theLabel);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&h",
- ResObj_New, theIconRef,
- theLabel);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetFSSpec, &theFile))
+ return NULL;
+ _err = GetIconRefFromFile(&theFile,
+ &theIconRef,
+ &theLabel);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&h",
+ ResObj_New, theIconRef,
+ theLabel);
+ return _res;
}
static PyObject *Icn_GetIconRef(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- SInt16 vRefNum;
- OSType creator;
- OSType iconType;
- IconRef theIconRef;
+ PyObject *_res = NULL;
+ OSErr _err;
+ SInt16 vRefNum;
+ OSType creator;
+ OSType iconType;
+ IconRef theIconRef;
#ifndef GetIconRef
- PyMac_PRECHECK(GetIconRef);
+ PyMac_PRECHECK(GetIconRef);
#endif
- if (!PyArg_ParseTuple(_args, "hO&O&",
- &vRefNum,
- PyMac_GetOSType, &creator,
- PyMac_GetOSType, &iconType))
- return NULL;
- _err = GetIconRef(vRefNum,
- creator,
- iconType,
- &theIconRef);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- ResObj_New, theIconRef);
- return _res;
+ if (!PyArg_ParseTuple(_args, "hO&O&",
+ &vRefNum,
+ PyMac_GetOSType, &creator,
+ PyMac_GetOSType, &iconType))
+ return NULL;
+ _err = GetIconRef(vRefNum,
+ creator,
+ iconType,
+ &theIconRef);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ ResObj_New, theIconRef);
+ return _res;
}
static PyObject *Icn_GetIconRefFromFolder(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- SInt16 vRefNum;
- SInt32 parentFolderID;
- SInt32 folderID;
- SInt8 attributes;
- SInt8 accessPrivileges;
- IconRef theIconRef;
+ PyObject *_res = NULL;
+ OSErr _err;
+ SInt16 vRefNum;
+ SInt32 parentFolderID;
+ SInt32 folderID;
+ SInt8 attributes;
+ SInt8 accessPrivileges;
+ IconRef theIconRef;
#ifndef GetIconRefFromFolder
- PyMac_PRECHECK(GetIconRefFromFolder);
+ PyMac_PRECHECK(GetIconRefFromFolder);
#endif
- if (!PyArg_ParseTuple(_args, "hllbb",
- &vRefNum,
- &parentFolderID,
- &folderID,
- &attributes,
- &accessPrivileges))
- return NULL;
- _err = GetIconRefFromFolder(vRefNum,
- parentFolderID,
- folderID,
- attributes,
- accessPrivileges,
- &theIconRef);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- ResObj_New, theIconRef);
- return _res;
+ if (!PyArg_ParseTuple(_args, "hllbb",
+ &vRefNum,
+ &parentFolderID,
+ &folderID,
+ &attributes,
+ &accessPrivileges))
+ return NULL;
+ _err = GetIconRefFromFolder(vRefNum,
+ parentFolderID,
+ folderID,
+ attributes,
+ accessPrivileges,
+ &theIconRef);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ ResObj_New, theIconRef);
+ return _res;
}
static PyObject *Icn_RegisterIconRefFromIconFamily(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- OSType creator;
- OSType iconType;
- IconFamilyHandle iconFamily;
- IconRef theIconRef;
+ PyObject *_res = NULL;
+ OSErr _err;
+ OSType creator;
+ OSType iconType;
+ IconFamilyHandle iconFamily;
+ IconRef theIconRef;
#ifndef RegisterIconRefFromIconFamily
- PyMac_PRECHECK(RegisterIconRefFromIconFamily);
+ PyMac_PRECHECK(RegisterIconRefFromIconFamily);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- PyMac_GetOSType, &creator,
- PyMac_GetOSType, &iconType,
- ResObj_Convert, &iconFamily))
- return NULL;
- _err = RegisterIconRefFromIconFamily(creator,
- iconType,
- iconFamily,
- &theIconRef);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- ResObj_New, theIconRef);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ PyMac_GetOSType, &creator,
+ PyMac_GetOSType, &iconType,
+ ResObj_Convert, &iconFamily))
+ return NULL;
+ _err = RegisterIconRefFromIconFamily(creator,
+ iconType,
+ iconFamily,
+ &theIconRef);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ ResObj_New, theIconRef);
+ return _res;
}
static PyObject *Icn_RegisterIconRefFromResource(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- OSType creator;
- OSType iconType;
- FSSpec resourceFile;
- SInt16 resourceID;
- IconRef theIconRef;
+ PyObject *_res = NULL;
+ OSErr _err;
+ OSType creator;
+ OSType iconType;
+ FSSpec resourceFile;
+ SInt16 resourceID;
+ IconRef theIconRef;
#ifndef RegisterIconRefFromResource
- PyMac_PRECHECK(RegisterIconRefFromResource);
+ PyMac_PRECHECK(RegisterIconRefFromResource);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&h",
- PyMac_GetOSType, &creator,
- PyMac_GetOSType, &iconType,
- PyMac_GetFSSpec, &resourceFile,
- &resourceID))
- return NULL;
- _err = RegisterIconRefFromResource(creator,
- iconType,
- &resourceFile,
- resourceID,
- &theIconRef);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- ResObj_New, theIconRef);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&O&h",
+ PyMac_GetOSType, &creator,
+ PyMac_GetOSType, &iconType,
+ PyMac_GetFSSpec, &resourceFile,
+ &resourceID))
+ return NULL;
+ _err = RegisterIconRefFromResource(creator,
+ iconType,
+ &resourceFile,
+ resourceID,
+ &theIconRef);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ ResObj_New, theIconRef);
+ return _res;
}
static PyObject *Icn_RegisterIconRefFromFSRef(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- OSType creator;
- OSType iconType;
- FSRef iconFile;
- IconRef theIconRef;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ OSType creator;
+ OSType iconType;
+ FSRef iconFile;
+ IconRef theIconRef;
#ifndef RegisterIconRefFromFSRef
- PyMac_PRECHECK(RegisterIconRefFromFSRef);
+ PyMac_PRECHECK(RegisterIconRefFromFSRef);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- PyMac_GetOSType, &creator,
- PyMac_GetOSType, &iconType,
- PyMac_GetFSRef, &iconFile))
- return NULL;
- _err = RegisterIconRefFromFSRef(creator,
- iconType,
- &iconFile,
- &theIconRef);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- ResObj_New, theIconRef);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ PyMac_GetOSType, &creator,
+ PyMac_GetOSType, &iconType,
+ PyMac_GetFSRef, &iconFile))
+ return NULL;
+ _err = RegisterIconRefFromFSRef(creator,
+ iconType,
+ &iconFile,
+ &theIconRef);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ ResObj_New, theIconRef);
+ return _res;
}
static PyObject *Icn_UnregisterIconRef(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- OSType creator;
- OSType iconType;
+ PyObject *_res = NULL;
+ OSErr _err;
+ OSType creator;
+ OSType iconType;
#ifndef UnregisterIconRef
- PyMac_PRECHECK(UnregisterIconRef);
+ PyMac_PRECHECK(UnregisterIconRef);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- PyMac_GetOSType, &creator,
- PyMac_GetOSType, &iconType))
- return NULL;
- _err = UnregisterIconRef(creator,
- iconType);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ PyMac_GetOSType, &creator,
+ PyMac_GetOSType, &iconType))
+ return NULL;
+ _err = UnregisterIconRef(creator,
+ iconType);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Icn_UpdateIconRef(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- IconRef theIconRef;
+ PyObject *_res = NULL;
+ OSErr _err;
+ IconRef theIconRef;
#ifndef UpdateIconRef
- PyMac_PRECHECK(UpdateIconRef);
+ PyMac_PRECHECK(UpdateIconRef);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &theIconRef))
- return NULL;
- _err = UpdateIconRef(theIconRef);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &theIconRef))
+ return NULL;
+ _err = UpdateIconRef(theIconRef);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Icn_OverrideIconRefFromResource(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- IconRef theIconRef;
- FSSpec resourceFile;
- SInt16 resourceID;
+ PyObject *_res = NULL;
+ OSErr _err;
+ IconRef theIconRef;
+ FSSpec resourceFile;
+ SInt16 resourceID;
#ifndef OverrideIconRefFromResource
- PyMac_PRECHECK(OverrideIconRefFromResource);
+ PyMac_PRECHECK(OverrideIconRefFromResource);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&h",
- ResObj_Convert, &theIconRef,
- PyMac_GetFSSpec, &resourceFile,
- &resourceID))
- return NULL;
- _err = OverrideIconRefFromResource(theIconRef,
- &resourceFile,
- resourceID);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&h",
+ ResObj_Convert, &theIconRef,
+ PyMac_GetFSSpec, &resourceFile,
+ &resourceID))
+ return NULL;
+ _err = OverrideIconRefFromResource(theIconRef,
+ &resourceFile,
+ resourceID);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Icn_OverrideIconRef(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- IconRef oldIconRef;
- IconRef newIconRef;
+ PyObject *_res = NULL;
+ OSErr _err;
+ IconRef oldIconRef;
+ IconRef newIconRef;
#ifndef OverrideIconRef
- PyMac_PRECHECK(OverrideIconRef);
+ PyMac_PRECHECK(OverrideIconRef);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- ResObj_Convert, &oldIconRef,
- ResObj_Convert, &newIconRef))
- return NULL;
- _err = OverrideIconRef(oldIconRef,
- newIconRef);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ ResObj_Convert, &oldIconRef,
+ ResObj_Convert, &newIconRef))
+ return NULL;
+ _err = OverrideIconRef(oldIconRef,
+ newIconRef);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Icn_RemoveIconRefOverride(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- IconRef theIconRef;
+ PyObject *_res = NULL;
+ OSErr _err;
+ IconRef theIconRef;
#ifndef RemoveIconRefOverride
- PyMac_PRECHECK(RemoveIconRefOverride);
+ PyMac_PRECHECK(RemoveIconRefOverride);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &theIconRef))
- return NULL;
- _err = RemoveIconRefOverride(theIconRef);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &theIconRef))
+ return NULL;
+ _err = RemoveIconRefOverride(theIconRef);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Icn_CompositeIconRef(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- IconRef backgroundIconRef;
- IconRef foregroundIconRef;
- IconRef compositeIconRef;
+ PyObject *_res = NULL;
+ OSErr _err;
+ IconRef backgroundIconRef;
+ IconRef foregroundIconRef;
+ IconRef compositeIconRef;
#ifndef CompositeIconRef
- PyMac_PRECHECK(CompositeIconRef);
+ PyMac_PRECHECK(CompositeIconRef);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- ResObj_Convert, &backgroundIconRef,
- ResObj_Convert, &foregroundIconRef))
- return NULL;
- _err = CompositeIconRef(backgroundIconRef,
- foregroundIconRef,
- &compositeIconRef);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- ResObj_New, compositeIconRef);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ ResObj_Convert, &backgroundIconRef,
+ ResObj_Convert, &foregroundIconRef))
+ return NULL;
+ _err = CompositeIconRef(backgroundIconRef,
+ foregroundIconRef,
+ &compositeIconRef);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ ResObj_New, compositeIconRef);
+ return _res;
}
static PyObject *Icn_IsIconRefComposite(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- IconRef compositeIconRef;
- IconRef backgroundIconRef;
- IconRef foregroundIconRef;
+ PyObject *_res = NULL;
+ OSErr _err;
+ IconRef compositeIconRef;
+ IconRef backgroundIconRef;
+ IconRef foregroundIconRef;
#ifndef IsIconRefComposite
- PyMac_PRECHECK(IsIconRefComposite);
+ PyMac_PRECHECK(IsIconRefComposite);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &compositeIconRef))
- return NULL;
- _err = IsIconRefComposite(compositeIconRef,
- &backgroundIconRef,
- &foregroundIconRef);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&O&",
- ResObj_New, backgroundIconRef,
- ResObj_New, foregroundIconRef);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &compositeIconRef))
+ return NULL;
+ _err = IsIconRefComposite(compositeIconRef,
+ &backgroundIconRef,
+ &foregroundIconRef);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&O&",
+ ResObj_New, backgroundIconRef,
+ ResObj_New, foregroundIconRef);
+ return _res;
}
static PyObject *Icn_IsValidIconRef(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- IconRef theIconRef;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ IconRef theIconRef;
#ifndef IsValidIconRef
- PyMac_PRECHECK(IsValidIconRef);
+ PyMac_PRECHECK(IsValidIconRef);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &theIconRef))
- return NULL;
- _rv = IsValidIconRef(theIconRef);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &theIconRef))
+ return NULL;
+ _rv = IsValidIconRef(theIconRef);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *Icn_PlotIconRef(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Rect theRect;
- IconAlignmentType align;
- IconTransformType transform;
- IconServicesUsageFlags theIconServicesUsageFlags;
- IconRef theIconRef;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Rect theRect;
+ IconAlignmentType align;
+ IconTransformType transform;
+ IconServicesUsageFlags theIconServicesUsageFlags;
+ IconRef theIconRef;
#ifndef PlotIconRef
- PyMac_PRECHECK(PlotIconRef);
+ PyMac_PRECHECK(PlotIconRef);
#endif
- if (!PyArg_ParseTuple(_args, "O&hhlO&",
- PyMac_GetRect, &theRect,
- &align,
- &transform,
- &theIconServicesUsageFlags,
- ResObj_Convert, &theIconRef))
- return NULL;
- _err = PlotIconRef(&theRect,
- align,
- transform,
- theIconServicesUsageFlags,
- theIconRef);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&hhlO&",
+ PyMac_GetRect, &theRect,
+ &align,
+ &transform,
+ &theIconServicesUsageFlags,
+ ResObj_Convert, &theIconRef))
+ return NULL;
+ _err = PlotIconRef(&theRect,
+ align,
+ transform,
+ theIconServicesUsageFlags,
+ theIconRef);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Icn_PtInIconRef(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- Point testPt;
- Rect iconRect;
- IconAlignmentType align;
- IconServicesUsageFlags theIconServicesUsageFlags;
- IconRef theIconRef;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ Point testPt;
+ Rect iconRect;
+ IconAlignmentType align;
+ IconServicesUsageFlags theIconServicesUsageFlags;
+ IconRef theIconRef;
#ifndef PtInIconRef
- PyMac_PRECHECK(PtInIconRef);
+ PyMac_PRECHECK(PtInIconRef);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&hlO&",
- PyMac_GetPoint, &testPt,
- PyMac_GetRect, &iconRect,
- &align,
- &theIconServicesUsageFlags,
- ResObj_Convert, &theIconRef))
- return NULL;
- _rv = PtInIconRef(&testPt,
- &iconRect,
- align,
- theIconServicesUsageFlags,
- theIconRef);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&hlO&",
+ PyMac_GetPoint, &testPt,
+ PyMac_GetRect, &iconRect,
+ &align,
+ &theIconServicesUsageFlags,
+ ResObj_Convert, &theIconRef))
+ return NULL;
+ _rv = PtInIconRef(&testPt,
+ &iconRect,
+ align,
+ theIconServicesUsageFlags,
+ theIconRef);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *Icn_RectInIconRef(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- Rect testRect;
- Rect iconRect;
- IconAlignmentType align;
- IconServicesUsageFlags iconServicesUsageFlags;
- IconRef theIconRef;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ Rect testRect;
+ Rect iconRect;
+ IconAlignmentType align;
+ IconServicesUsageFlags iconServicesUsageFlags;
+ IconRef theIconRef;
#ifndef RectInIconRef
- PyMac_PRECHECK(RectInIconRef);
+ PyMac_PRECHECK(RectInIconRef);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&hlO&",
- PyMac_GetRect, &testRect,
- PyMac_GetRect, &iconRect,
- &align,
- &iconServicesUsageFlags,
- ResObj_Convert, &theIconRef))
- return NULL;
- _rv = RectInIconRef(&testRect,
- &iconRect,
- align,
- iconServicesUsageFlags,
- theIconRef);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&hlO&",
+ PyMac_GetRect, &testRect,
+ PyMac_GetRect, &iconRect,
+ &align,
+ &iconServicesUsageFlags,
+ ResObj_Convert, &theIconRef))
+ return NULL;
+ _rv = RectInIconRef(&testRect,
+ &iconRect,
+ align,
+ iconServicesUsageFlags,
+ theIconRef);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *Icn_IconRefToRgn(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- RgnHandle theRgn;
- Rect iconRect;
- IconAlignmentType align;
- IconServicesUsageFlags iconServicesUsageFlags;
- IconRef theIconRef;
+ PyObject *_res = NULL;
+ OSErr _err;
+ RgnHandle theRgn;
+ Rect iconRect;
+ IconAlignmentType align;
+ IconServicesUsageFlags iconServicesUsageFlags;
+ IconRef theIconRef;
#ifndef IconRefToRgn
- PyMac_PRECHECK(IconRefToRgn);
+ PyMac_PRECHECK(IconRefToRgn);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&hlO&",
- ResObj_Convert, &theRgn,
- PyMac_GetRect, &iconRect,
- &align,
- &iconServicesUsageFlags,
- ResObj_Convert, &theIconRef))
- return NULL;
- _err = IconRefToRgn(theRgn,
- &iconRect,
- align,
- iconServicesUsageFlags,
- theIconRef);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&hlO&",
+ ResObj_Convert, &theRgn,
+ PyMac_GetRect, &iconRect,
+ &align,
+ &iconServicesUsageFlags,
+ ResObj_Convert, &theIconRef))
+ return NULL;
+ _err = IconRefToRgn(theRgn,
+ &iconRect,
+ align,
+ iconServicesUsageFlags,
+ theIconRef);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Icn_GetIconSizesFromIconRef(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- IconSelectorValue iconSelectorInput;
- IconSelectorValue iconSelectorOutputPtr;
- IconServicesUsageFlags iconServicesUsageFlags;
- IconRef theIconRef;
+ PyObject *_res = NULL;
+ OSErr _err;
+ IconSelectorValue iconSelectorInput;
+ IconSelectorValue iconSelectorOutputPtr;
+ IconServicesUsageFlags iconServicesUsageFlags;
+ IconRef theIconRef;
#ifndef GetIconSizesFromIconRef
- PyMac_PRECHECK(GetIconSizesFromIconRef);
+ PyMac_PRECHECK(GetIconSizesFromIconRef);
#endif
- if (!PyArg_ParseTuple(_args, "llO&",
- &iconSelectorInput,
- &iconServicesUsageFlags,
- ResObj_Convert, &theIconRef))
- return NULL;
- _err = GetIconSizesFromIconRef(iconSelectorInput,
- &iconSelectorOutputPtr,
- iconServicesUsageFlags,
- theIconRef);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- iconSelectorOutputPtr);
- return _res;
+ if (!PyArg_ParseTuple(_args, "llO&",
+ &iconSelectorInput,
+ &iconServicesUsageFlags,
+ ResObj_Convert, &theIconRef))
+ return NULL;
+ _err = GetIconSizesFromIconRef(iconSelectorInput,
+ &iconSelectorOutputPtr,
+ iconServicesUsageFlags,
+ theIconRef);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ iconSelectorOutputPtr);
+ return _res;
}
static PyObject *Icn_FlushIconRefs(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- OSType creator;
- OSType iconType;
+ PyObject *_res = NULL;
+ OSErr _err;
+ OSType creator;
+ OSType iconType;
#ifndef FlushIconRefs
- PyMac_PRECHECK(FlushIconRefs);
+ PyMac_PRECHECK(FlushIconRefs);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- PyMac_GetOSType, &creator,
- PyMac_GetOSType, &iconType))
- return NULL;
- _err = FlushIconRefs(creator,
- iconType);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ PyMac_GetOSType, &creator,
+ PyMac_GetOSType, &iconType))
+ return NULL;
+ _err = FlushIconRefs(creator,
+ iconType);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Icn_FlushIconRefsByVolume(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- SInt16 vRefNum;
+ PyObject *_res = NULL;
+ OSErr _err;
+ SInt16 vRefNum;
#ifndef FlushIconRefsByVolume
- PyMac_PRECHECK(FlushIconRefsByVolume);
+ PyMac_PRECHECK(FlushIconRefsByVolume);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &vRefNum))
- return NULL;
- _err = FlushIconRefsByVolume(vRefNum);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &vRefNum))
+ return NULL;
+ _err = FlushIconRefsByVolume(vRefNum);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Icn_SetCustomIconsEnabled(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- SInt16 vRefNum;
- Boolean enableCustomIcons;
+ PyObject *_res = NULL;
+ OSErr _err;
+ SInt16 vRefNum;
+ Boolean enableCustomIcons;
#ifndef SetCustomIconsEnabled
- PyMac_PRECHECK(SetCustomIconsEnabled);
+ PyMac_PRECHECK(SetCustomIconsEnabled);
#endif
- if (!PyArg_ParseTuple(_args, "hb",
- &vRefNum,
- &enableCustomIcons))
- return NULL;
- _err = SetCustomIconsEnabled(vRefNum,
- enableCustomIcons);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "hb",
+ &vRefNum,
+ &enableCustomIcons))
+ return NULL;
+ _err = SetCustomIconsEnabled(vRefNum,
+ enableCustomIcons);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Icn_GetCustomIconsEnabled(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- SInt16 vRefNum;
- Boolean customIconsEnabled;
+ PyObject *_res = NULL;
+ OSErr _err;
+ SInt16 vRefNum;
+ Boolean customIconsEnabled;
#ifndef GetCustomIconsEnabled
- PyMac_PRECHECK(GetCustomIconsEnabled);
+ PyMac_PRECHECK(GetCustomIconsEnabled);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &vRefNum))
- return NULL;
- _err = GetCustomIconsEnabled(vRefNum,
- &customIconsEnabled);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("b",
- customIconsEnabled);
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &vRefNum))
+ return NULL;
+ _err = GetCustomIconsEnabled(vRefNum,
+ &customIconsEnabled);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("b",
+ customIconsEnabled);
+ return _res;
}
static PyObject *Icn_IsIconRefMaskEmpty(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- IconRef iconRef;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ IconRef iconRef;
#ifndef IsIconRefMaskEmpty
- PyMac_PRECHECK(IsIconRefMaskEmpty);
+ PyMac_PRECHECK(IsIconRefMaskEmpty);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &iconRef))
- return NULL;
- _rv = IsIconRefMaskEmpty(iconRef);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &iconRef))
+ return NULL;
+ _rv = IsIconRefMaskEmpty(iconRef);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *Icn_GetIconRefVariant(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- IconRef _rv;
- IconRef inIconRef;
- OSType inVariant;
- IconTransformType outTransform;
+ PyObject *_res = NULL;
+ IconRef _rv;
+ IconRef inIconRef;
+ OSType inVariant;
+ IconTransformType outTransform;
#ifndef GetIconRefVariant
- PyMac_PRECHECK(GetIconRefVariant);
+ PyMac_PRECHECK(GetIconRefVariant);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- ResObj_Convert, &inIconRef,
- PyMac_GetOSType, &inVariant))
- return NULL;
- _rv = GetIconRefVariant(inIconRef,
- inVariant,
- &outTransform);
- _res = Py_BuildValue("O&h",
- ResObj_New, _rv,
- outTransform);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ ResObj_Convert, &inIconRef,
+ PyMac_GetOSType, &inVariant))
+ return NULL;
+ _rv = GetIconRefVariant(inIconRef,
+ inVariant,
+ &outTransform);
+ _res = Py_BuildValue("O&h",
+ ResObj_New, _rv,
+ outTransform);
+ return _res;
}
static PyObject *Icn_RegisterIconRefFromIconFile(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- OSType creator;
- OSType iconType;
- FSSpec iconFile;
- IconRef theIconRef;
+ PyObject *_res = NULL;
+ OSErr _err;
+ OSType creator;
+ OSType iconType;
+ FSSpec iconFile;
+ IconRef theIconRef;
#ifndef RegisterIconRefFromIconFile
- PyMac_PRECHECK(RegisterIconRefFromIconFile);
+ PyMac_PRECHECK(RegisterIconRefFromIconFile);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- PyMac_GetOSType, &creator,
- PyMac_GetOSType, &iconType,
- PyMac_GetFSSpec, &iconFile))
- return NULL;
- _err = RegisterIconRefFromIconFile(creator,
- iconType,
- &iconFile,
- &theIconRef);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- ResObj_New, theIconRef);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ PyMac_GetOSType, &creator,
+ PyMac_GetOSType, &iconType,
+ PyMac_GetFSSpec, &iconFile))
+ return NULL;
+ _err = RegisterIconRefFromIconFile(creator,
+ iconType,
+ &iconFile,
+ &theIconRef);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ ResObj_New, theIconRef);
+ return _res;
}
static PyObject *Icn_ReadIconFile(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- FSSpec iconFile;
- IconFamilyHandle iconFamily;
+ PyObject *_res = NULL;
+ OSErr _err;
+ FSSpec iconFile;
+ IconFamilyHandle iconFamily;
#ifndef ReadIconFile
- PyMac_PRECHECK(ReadIconFile);
+ PyMac_PRECHECK(ReadIconFile);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetFSSpec, &iconFile))
- return NULL;
- _err = ReadIconFile(&iconFile,
- &iconFamily);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- ResObj_New, iconFamily);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetFSSpec, &iconFile))
+ return NULL;
+ _err = ReadIconFile(&iconFile,
+ &iconFamily);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ ResObj_New, iconFamily);
+ return _res;
}
static PyObject *Icn_ReadIconFromFSRef(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- FSRef ref;
- IconFamilyHandle iconFamily;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ FSRef ref;
+ IconFamilyHandle iconFamily;
#ifndef ReadIconFromFSRef
- PyMac_PRECHECK(ReadIconFromFSRef);
+ PyMac_PRECHECK(ReadIconFromFSRef);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetFSRef, &ref))
- return NULL;
- _err = ReadIconFromFSRef(&ref,
- &iconFamily);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- ResObj_New, iconFamily);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetFSRef, &ref))
+ return NULL;
+ _err = ReadIconFromFSRef(&ref,
+ &iconFamily);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ ResObj_New, iconFamily);
+ return _res;
}
static PyObject *Icn_WriteIconFile(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- IconFamilyHandle iconFamily;
- FSSpec iconFile;
+ PyObject *_res = NULL;
+ OSErr _err;
+ IconFamilyHandle iconFamily;
+ FSSpec iconFile;
#ifndef WriteIconFile
- PyMac_PRECHECK(WriteIconFile);
+ PyMac_PRECHECK(WriteIconFile);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- ResObj_Convert, &iconFamily,
- PyMac_GetFSSpec, &iconFile))
- return NULL;
- _err = WriteIconFile(iconFamily,
- &iconFile);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ ResObj_Convert, &iconFamily,
+ PyMac_GetFSSpec, &iconFile))
+ return NULL;
+ _err = WriteIconFile(iconFamily,
+ &iconFile);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
#endif /* __LP64__ */
static PyMethodDef Icn_methods[] = {
#ifndef __LP64__
- {"GetCIcon", (PyCFunction)Icn_GetCIcon, 1,
- PyDoc_STR("(SInt16 iconID) -> (CIconHandle _rv)")},
- {"PlotCIcon", (PyCFunction)Icn_PlotCIcon, 1,
- PyDoc_STR("(Rect theRect, CIconHandle theIcon) -> None")},
- {"DisposeCIcon", (PyCFunction)Icn_DisposeCIcon, 1,
- PyDoc_STR("(CIconHandle theIcon) -> None")},
- {"GetIcon", (PyCFunction)Icn_GetIcon, 1,
- PyDoc_STR("(SInt16 iconID) -> (Handle _rv)")},
- {"PlotIcon", (PyCFunction)Icn_PlotIcon, 1,
- PyDoc_STR("(Rect theRect, Handle theIcon) -> None")},
- {"PlotIconID", (PyCFunction)Icn_PlotIconID, 1,
- PyDoc_STR("(Rect theRect, IconAlignmentType align, IconTransformType transform, SInt16 theResID) -> None")},
- {"NewIconSuite", (PyCFunction)Icn_NewIconSuite, 1,
- PyDoc_STR("() -> (IconSuiteRef theIconSuite)")},
- {"AddIconToSuite", (PyCFunction)Icn_AddIconToSuite, 1,
- PyDoc_STR("(Handle theIconData, IconSuiteRef theSuite, ResType theType) -> None")},
- {"GetIconFromSuite", (PyCFunction)Icn_GetIconFromSuite, 1,
- PyDoc_STR("(IconSuiteRef theSuite, ResType theType) -> (Handle theIconData)")},
- {"GetIconSuite", (PyCFunction)Icn_GetIconSuite, 1,
- PyDoc_STR("(SInt16 theResID, IconSelectorValue selector) -> (IconSuiteRef theIconSuite)")},
- {"DisposeIconSuite", (PyCFunction)Icn_DisposeIconSuite, 1,
- PyDoc_STR("(IconSuiteRef theIconSuite, Boolean disposeData) -> None")},
- {"PlotIconSuite", (PyCFunction)Icn_PlotIconSuite, 1,
- PyDoc_STR("(Rect theRect, IconAlignmentType align, IconTransformType transform, IconSuiteRef theIconSuite) -> None")},
- {"LoadIconCache", (PyCFunction)Icn_LoadIconCache, 1,
- PyDoc_STR("(Rect theRect, IconAlignmentType align, IconTransformType transform, IconCacheRef theIconCache) -> None")},
- {"GetLabel", (PyCFunction)Icn_GetLabel, 1,
- PyDoc_STR("(SInt16 labelNumber, Str255 labelString) -> (RGBColor labelColor)")},
- {"PtInIconID", (PyCFunction)Icn_PtInIconID, 1,
- PyDoc_STR("(Point testPt, Rect iconRect, IconAlignmentType align, SInt16 iconID) -> (Boolean _rv)")},
- {"PtInIconSuite", (PyCFunction)Icn_PtInIconSuite, 1,
- PyDoc_STR("(Point testPt, Rect iconRect, IconAlignmentType align, IconSuiteRef theIconSuite) -> (Boolean _rv)")},
- {"RectInIconID", (PyCFunction)Icn_RectInIconID, 1,
- PyDoc_STR("(Rect testRect, Rect iconRect, IconAlignmentType align, SInt16 iconID) -> (Boolean _rv)")},
- {"RectInIconSuite", (PyCFunction)Icn_RectInIconSuite, 1,
- PyDoc_STR("(Rect testRect, Rect iconRect, IconAlignmentType align, IconSuiteRef theIconSuite) -> (Boolean _rv)")},
- {"IconIDToRgn", (PyCFunction)Icn_IconIDToRgn, 1,
- PyDoc_STR("(RgnHandle theRgn, Rect iconRect, IconAlignmentType align, SInt16 iconID) -> None")},
- {"IconSuiteToRgn", (PyCFunction)Icn_IconSuiteToRgn, 1,
- PyDoc_STR("(RgnHandle theRgn, Rect iconRect, IconAlignmentType align, IconSuiteRef theIconSuite) -> None")},
- {"SetSuiteLabel", (PyCFunction)Icn_SetSuiteLabel, 1,
- PyDoc_STR("(IconSuiteRef theSuite, SInt16 theLabel) -> None")},
- {"GetSuiteLabel", (PyCFunction)Icn_GetSuiteLabel, 1,
- PyDoc_STR("(IconSuiteRef theSuite) -> (SInt16 _rv)")},
- {"PlotIconHandle", (PyCFunction)Icn_PlotIconHandle, 1,
- PyDoc_STR("(Rect theRect, IconAlignmentType align, IconTransformType transform, Handle theIcon) -> None")},
- {"PlotSICNHandle", (PyCFunction)Icn_PlotSICNHandle, 1,
- PyDoc_STR("(Rect theRect, IconAlignmentType align, IconTransformType transform, Handle theSICN) -> None")},
- {"PlotCIconHandle", (PyCFunction)Icn_PlotCIconHandle, 1,
- PyDoc_STR("(Rect theRect, IconAlignmentType align, IconTransformType transform, CIconHandle theCIcon) -> None")},
- {"IconRefToIconFamily", (PyCFunction)Icn_IconRefToIconFamily, 1,
- PyDoc_STR("(IconRef theIconRef, IconSelectorValue whichIcons) -> (IconFamilyHandle iconFamily)")},
- {"IconFamilyToIconSuite", (PyCFunction)Icn_IconFamilyToIconSuite, 1,
- PyDoc_STR("(IconFamilyHandle iconFamily, IconSelectorValue whichIcons) -> (IconSuiteRef iconSuite)")},
- {"IconSuiteToIconFamily", (PyCFunction)Icn_IconSuiteToIconFamily, 1,
- PyDoc_STR("(IconSuiteRef iconSuite, IconSelectorValue whichIcons) -> (IconFamilyHandle iconFamily)")},
- {"SetIconFamilyData", (PyCFunction)Icn_SetIconFamilyData, 1,
- PyDoc_STR("(IconFamilyHandle iconFamily, OSType iconType, Handle h) -> None")},
- {"GetIconFamilyData", (PyCFunction)Icn_GetIconFamilyData, 1,
- PyDoc_STR("(IconFamilyHandle iconFamily, OSType iconType, Handle h) -> None")},
- {"GetIconRefOwners", (PyCFunction)Icn_GetIconRefOwners, 1,
- PyDoc_STR("(IconRef theIconRef) -> (UInt16 owners)")},
- {"AcquireIconRef", (PyCFunction)Icn_AcquireIconRef, 1,
- PyDoc_STR("(IconRef theIconRef) -> None")},
- {"ReleaseIconRef", (PyCFunction)Icn_ReleaseIconRef, 1,
- PyDoc_STR("(IconRef theIconRef) -> None")},
- {"GetIconRefFromFile", (PyCFunction)Icn_GetIconRefFromFile, 1,
- PyDoc_STR("(FSSpec theFile) -> (IconRef theIconRef, SInt16 theLabel)")},
- {"GetIconRef", (PyCFunction)Icn_GetIconRef, 1,
- PyDoc_STR("(SInt16 vRefNum, OSType creator, OSType iconType) -> (IconRef theIconRef)")},
- {"GetIconRefFromFolder", (PyCFunction)Icn_GetIconRefFromFolder, 1,
- PyDoc_STR("(SInt16 vRefNum, SInt32 parentFolderID, SInt32 folderID, SInt8 attributes, SInt8 accessPrivileges) -> (IconRef theIconRef)")},
- {"RegisterIconRefFromIconFamily", (PyCFunction)Icn_RegisterIconRefFromIconFamily, 1,
- PyDoc_STR("(OSType creator, OSType iconType, IconFamilyHandle iconFamily) -> (IconRef theIconRef)")},
- {"RegisterIconRefFromResource", (PyCFunction)Icn_RegisterIconRefFromResource, 1,
- PyDoc_STR("(OSType creator, OSType iconType, FSSpec resourceFile, SInt16 resourceID) -> (IconRef theIconRef)")},
- {"RegisterIconRefFromFSRef", (PyCFunction)Icn_RegisterIconRefFromFSRef, 1,
- PyDoc_STR("(OSType creator, OSType iconType, FSRef iconFile) -> (IconRef theIconRef)")},
- {"UnregisterIconRef", (PyCFunction)Icn_UnregisterIconRef, 1,
- PyDoc_STR("(OSType creator, OSType iconType) -> None")},
- {"UpdateIconRef", (PyCFunction)Icn_UpdateIconRef, 1,
- PyDoc_STR("(IconRef theIconRef) -> None")},
- {"OverrideIconRefFromResource", (PyCFunction)Icn_OverrideIconRefFromResource, 1,
- PyDoc_STR("(IconRef theIconRef, FSSpec resourceFile, SInt16 resourceID) -> None")},
- {"OverrideIconRef", (PyCFunction)Icn_OverrideIconRef, 1,
- PyDoc_STR("(IconRef oldIconRef, IconRef newIconRef) -> None")},
- {"RemoveIconRefOverride", (PyCFunction)Icn_RemoveIconRefOverride, 1,
- PyDoc_STR("(IconRef theIconRef) -> None")},
- {"CompositeIconRef", (PyCFunction)Icn_CompositeIconRef, 1,
- PyDoc_STR("(IconRef backgroundIconRef, IconRef foregroundIconRef) -> (IconRef compositeIconRef)")},
- {"IsIconRefComposite", (PyCFunction)Icn_IsIconRefComposite, 1,
- PyDoc_STR("(IconRef compositeIconRef) -> (IconRef backgroundIconRef, IconRef foregroundIconRef)")},
- {"IsValidIconRef", (PyCFunction)Icn_IsValidIconRef, 1,
- PyDoc_STR("(IconRef theIconRef) -> (Boolean _rv)")},
- {"PlotIconRef", (PyCFunction)Icn_PlotIconRef, 1,
- PyDoc_STR("(Rect theRect, IconAlignmentType align, IconTransformType transform, IconServicesUsageFlags theIconServicesUsageFlags, IconRef theIconRef) -> None")},
- {"PtInIconRef", (PyCFunction)Icn_PtInIconRef, 1,
- PyDoc_STR("(Point testPt, Rect iconRect, IconAlignmentType align, IconServicesUsageFlags theIconServicesUsageFlags, IconRef theIconRef) -> (Boolean _rv)")},
- {"RectInIconRef", (PyCFunction)Icn_RectInIconRef, 1,
- PyDoc_STR("(Rect testRect, Rect iconRect, IconAlignmentType align, IconServicesUsageFlags iconServicesUsageFlags, IconRef theIconRef) -> (Boolean _rv)")},
- {"IconRefToRgn", (PyCFunction)Icn_IconRefToRgn, 1,
- PyDoc_STR("(RgnHandle theRgn, Rect iconRect, IconAlignmentType align, IconServicesUsageFlags iconServicesUsageFlags, IconRef theIconRef) -> None")},
- {"GetIconSizesFromIconRef", (PyCFunction)Icn_GetIconSizesFromIconRef, 1,
- PyDoc_STR("(IconSelectorValue iconSelectorInput, IconServicesUsageFlags iconServicesUsageFlags, IconRef theIconRef) -> (IconSelectorValue iconSelectorOutputPtr)")},
- {"FlushIconRefs", (PyCFunction)Icn_FlushIconRefs, 1,
- PyDoc_STR("(OSType creator, OSType iconType) -> None")},
- {"FlushIconRefsByVolume", (PyCFunction)Icn_FlushIconRefsByVolume, 1,
- PyDoc_STR("(SInt16 vRefNum) -> None")},
- {"SetCustomIconsEnabled", (PyCFunction)Icn_SetCustomIconsEnabled, 1,
- PyDoc_STR("(SInt16 vRefNum, Boolean enableCustomIcons) -> None")},
- {"GetCustomIconsEnabled", (PyCFunction)Icn_GetCustomIconsEnabled, 1,
- PyDoc_STR("(SInt16 vRefNum) -> (Boolean customIconsEnabled)")},
- {"IsIconRefMaskEmpty", (PyCFunction)Icn_IsIconRefMaskEmpty, 1,
- PyDoc_STR("(IconRef iconRef) -> (Boolean _rv)")},
- {"GetIconRefVariant", (PyCFunction)Icn_GetIconRefVariant, 1,
- PyDoc_STR("(IconRef inIconRef, OSType inVariant) -> (IconRef _rv, IconTransformType outTransform)")},
- {"RegisterIconRefFromIconFile", (PyCFunction)Icn_RegisterIconRefFromIconFile, 1,
- PyDoc_STR("(OSType creator, OSType iconType, FSSpec iconFile) -> (IconRef theIconRef)")},
- {"ReadIconFile", (PyCFunction)Icn_ReadIconFile, 1,
- PyDoc_STR("(FSSpec iconFile) -> (IconFamilyHandle iconFamily)")},
- {"ReadIconFromFSRef", (PyCFunction)Icn_ReadIconFromFSRef, 1,
- PyDoc_STR("(FSRef ref) -> (IconFamilyHandle iconFamily)")},
- {"WriteIconFile", (PyCFunction)Icn_WriteIconFile, 1,
- PyDoc_STR("(IconFamilyHandle iconFamily, FSSpec iconFile) -> None")},
+ {"GetCIcon", (PyCFunction)Icn_GetCIcon, 1,
+ PyDoc_STR("(SInt16 iconID) -> (CIconHandle _rv)")},
+ {"PlotCIcon", (PyCFunction)Icn_PlotCIcon, 1,
+ PyDoc_STR("(Rect theRect, CIconHandle theIcon) -> None")},
+ {"DisposeCIcon", (PyCFunction)Icn_DisposeCIcon, 1,
+ PyDoc_STR("(CIconHandle theIcon) -> None")},
+ {"GetIcon", (PyCFunction)Icn_GetIcon, 1,
+ PyDoc_STR("(SInt16 iconID) -> (Handle _rv)")},
+ {"PlotIcon", (PyCFunction)Icn_PlotIcon, 1,
+ PyDoc_STR("(Rect theRect, Handle theIcon) -> None")},
+ {"PlotIconID", (PyCFunction)Icn_PlotIconID, 1,
+ PyDoc_STR("(Rect theRect, IconAlignmentType align, IconTransformType transform, SInt16 theResID) -> None")},
+ {"NewIconSuite", (PyCFunction)Icn_NewIconSuite, 1,
+ PyDoc_STR("() -> (IconSuiteRef theIconSuite)")},
+ {"AddIconToSuite", (PyCFunction)Icn_AddIconToSuite, 1,
+ PyDoc_STR("(Handle theIconData, IconSuiteRef theSuite, ResType theType) -> None")},
+ {"GetIconFromSuite", (PyCFunction)Icn_GetIconFromSuite, 1,
+ PyDoc_STR("(IconSuiteRef theSuite, ResType theType) -> (Handle theIconData)")},
+ {"GetIconSuite", (PyCFunction)Icn_GetIconSuite, 1,
+ PyDoc_STR("(SInt16 theResID, IconSelectorValue selector) -> (IconSuiteRef theIconSuite)")},
+ {"DisposeIconSuite", (PyCFunction)Icn_DisposeIconSuite, 1,
+ PyDoc_STR("(IconSuiteRef theIconSuite, Boolean disposeData) -> None")},
+ {"PlotIconSuite", (PyCFunction)Icn_PlotIconSuite, 1,
+ PyDoc_STR("(Rect theRect, IconAlignmentType align, IconTransformType transform, IconSuiteRef theIconSuite) -> None")},
+ {"LoadIconCache", (PyCFunction)Icn_LoadIconCache, 1,
+ PyDoc_STR("(Rect theRect, IconAlignmentType align, IconTransformType transform, IconCacheRef theIconCache) -> None")},
+ {"GetLabel", (PyCFunction)Icn_GetLabel, 1,
+ PyDoc_STR("(SInt16 labelNumber, Str255 labelString) -> (RGBColor labelColor)")},
+ {"PtInIconID", (PyCFunction)Icn_PtInIconID, 1,
+ PyDoc_STR("(Point testPt, Rect iconRect, IconAlignmentType align, SInt16 iconID) -> (Boolean _rv)")},
+ {"PtInIconSuite", (PyCFunction)Icn_PtInIconSuite, 1,
+ PyDoc_STR("(Point testPt, Rect iconRect, IconAlignmentType align, IconSuiteRef theIconSuite) -> (Boolean _rv)")},
+ {"RectInIconID", (PyCFunction)Icn_RectInIconID, 1,
+ PyDoc_STR("(Rect testRect, Rect iconRect, IconAlignmentType align, SInt16 iconID) -> (Boolean _rv)")},
+ {"RectInIconSuite", (PyCFunction)Icn_RectInIconSuite, 1,
+ PyDoc_STR("(Rect testRect, Rect iconRect, IconAlignmentType align, IconSuiteRef theIconSuite) -> (Boolean _rv)")},
+ {"IconIDToRgn", (PyCFunction)Icn_IconIDToRgn, 1,
+ PyDoc_STR("(RgnHandle theRgn, Rect iconRect, IconAlignmentType align, SInt16 iconID) -> None")},
+ {"IconSuiteToRgn", (PyCFunction)Icn_IconSuiteToRgn, 1,
+ PyDoc_STR("(RgnHandle theRgn, Rect iconRect, IconAlignmentType align, IconSuiteRef theIconSuite) -> None")},
+ {"SetSuiteLabel", (PyCFunction)Icn_SetSuiteLabel, 1,
+ PyDoc_STR("(IconSuiteRef theSuite, SInt16 theLabel) -> None")},
+ {"GetSuiteLabel", (PyCFunction)Icn_GetSuiteLabel, 1,
+ PyDoc_STR("(IconSuiteRef theSuite) -> (SInt16 _rv)")},
+ {"PlotIconHandle", (PyCFunction)Icn_PlotIconHandle, 1,
+ PyDoc_STR("(Rect theRect, IconAlignmentType align, IconTransformType transform, Handle theIcon) -> None")},
+ {"PlotSICNHandle", (PyCFunction)Icn_PlotSICNHandle, 1,
+ PyDoc_STR("(Rect theRect, IconAlignmentType align, IconTransformType transform, Handle theSICN) -> None")},
+ {"PlotCIconHandle", (PyCFunction)Icn_PlotCIconHandle, 1,
+ PyDoc_STR("(Rect theRect, IconAlignmentType align, IconTransformType transform, CIconHandle theCIcon) -> None")},
+ {"IconRefToIconFamily", (PyCFunction)Icn_IconRefToIconFamily, 1,
+ PyDoc_STR("(IconRef theIconRef, IconSelectorValue whichIcons) -> (IconFamilyHandle iconFamily)")},
+ {"IconFamilyToIconSuite", (PyCFunction)Icn_IconFamilyToIconSuite, 1,
+ PyDoc_STR("(IconFamilyHandle iconFamily, IconSelectorValue whichIcons) -> (IconSuiteRef iconSuite)")},
+ {"IconSuiteToIconFamily", (PyCFunction)Icn_IconSuiteToIconFamily, 1,
+ PyDoc_STR("(IconSuiteRef iconSuite, IconSelectorValue whichIcons) -> (IconFamilyHandle iconFamily)")},
+ {"SetIconFamilyData", (PyCFunction)Icn_SetIconFamilyData, 1,
+ PyDoc_STR("(IconFamilyHandle iconFamily, OSType iconType, Handle h) -> None")},
+ {"GetIconFamilyData", (PyCFunction)Icn_GetIconFamilyData, 1,
+ PyDoc_STR("(IconFamilyHandle iconFamily, OSType iconType, Handle h) -> None")},
+ {"GetIconRefOwners", (PyCFunction)Icn_GetIconRefOwners, 1,
+ PyDoc_STR("(IconRef theIconRef) -> (UInt16 owners)")},
+ {"AcquireIconRef", (PyCFunction)Icn_AcquireIconRef, 1,
+ PyDoc_STR("(IconRef theIconRef) -> None")},
+ {"ReleaseIconRef", (PyCFunction)Icn_ReleaseIconRef, 1,
+ PyDoc_STR("(IconRef theIconRef) -> None")},
+ {"GetIconRefFromFile", (PyCFunction)Icn_GetIconRefFromFile, 1,
+ PyDoc_STR("(FSSpec theFile) -> (IconRef theIconRef, SInt16 theLabel)")},
+ {"GetIconRef", (PyCFunction)Icn_GetIconRef, 1,
+ PyDoc_STR("(SInt16 vRefNum, OSType creator, OSType iconType) -> (IconRef theIconRef)")},
+ {"GetIconRefFromFolder", (PyCFunction)Icn_GetIconRefFromFolder, 1,
+ PyDoc_STR("(SInt16 vRefNum, SInt32 parentFolderID, SInt32 folderID, SInt8 attributes, SInt8 accessPrivileges) -> (IconRef theIconRef)")},
+ {"RegisterIconRefFromIconFamily", (PyCFunction)Icn_RegisterIconRefFromIconFamily, 1,
+ PyDoc_STR("(OSType creator, OSType iconType, IconFamilyHandle iconFamily) -> (IconRef theIconRef)")},
+ {"RegisterIconRefFromResource", (PyCFunction)Icn_RegisterIconRefFromResource, 1,
+ PyDoc_STR("(OSType creator, OSType iconType, FSSpec resourceFile, SInt16 resourceID) -> (IconRef theIconRef)")},
+ {"RegisterIconRefFromFSRef", (PyCFunction)Icn_RegisterIconRefFromFSRef, 1,
+ PyDoc_STR("(OSType creator, OSType iconType, FSRef iconFile) -> (IconRef theIconRef)")},
+ {"UnregisterIconRef", (PyCFunction)Icn_UnregisterIconRef, 1,
+ PyDoc_STR("(OSType creator, OSType iconType) -> None")},
+ {"UpdateIconRef", (PyCFunction)Icn_UpdateIconRef, 1,
+ PyDoc_STR("(IconRef theIconRef) -> None")},
+ {"OverrideIconRefFromResource", (PyCFunction)Icn_OverrideIconRefFromResource, 1,
+ PyDoc_STR("(IconRef theIconRef, FSSpec resourceFile, SInt16 resourceID) -> None")},
+ {"OverrideIconRef", (PyCFunction)Icn_OverrideIconRef, 1,
+ PyDoc_STR("(IconRef oldIconRef, IconRef newIconRef) -> None")},
+ {"RemoveIconRefOverride", (PyCFunction)Icn_RemoveIconRefOverride, 1,
+ PyDoc_STR("(IconRef theIconRef) -> None")},
+ {"CompositeIconRef", (PyCFunction)Icn_CompositeIconRef, 1,
+ PyDoc_STR("(IconRef backgroundIconRef, IconRef foregroundIconRef) -> (IconRef compositeIconRef)")},
+ {"IsIconRefComposite", (PyCFunction)Icn_IsIconRefComposite, 1,
+ PyDoc_STR("(IconRef compositeIconRef) -> (IconRef backgroundIconRef, IconRef foregroundIconRef)")},
+ {"IsValidIconRef", (PyCFunction)Icn_IsValidIconRef, 1,
+ PyDoc_STR("(IconRef theIconRef) -> (Boolean _rv)")},
+ {"PlotIconRef", (PyCFunction)Icn_PlotIconRef, 1,
+ PyDoc_STR("(Rect theRect, IconAlignmentType align, IconTransformType transform, IconServicesUsageFlags theIconServicesUsageFlags, IconRef theIconRef) -> None")},
+ {"PtInIconRef", (PyCFunction)Icn_PtInIconRef, 1,
+ PyDoc_STR("(Point testPt, Rect iconRect, IconAlignmentType align, IconServicesUsageFlags theIconServicesUsageFlags, IconRef theIconRef) -> (Boolean _rv)")},
+ {"RectInIconRef", (PyCFunction)Icn_RectInIconRef, 1,
+ PyDoc_STR("(Rect testRect, Rect iconRect, IconAlignmentType align, IconServicesUsageFlags iconServicesUsageFlags, IconRef theIconRef) -> (Boolean _rv)")},
+ {"IconRefToRgn", (PyCFunction)Icn_IconRefToRgn, 1,
+ PyDoc_STR("(RgnHandle theRgn, Rect iconRect, IconAlignmentType align, IconServicesUsageFlags iconServicesUsageFlags, IconRef theIconRef) -> None")},
+ {"GetIconSizesFromIconRef", (PyCFunction)Icn_GetIconSizesFromIconRef, 1,
+ PyDoc_STR("(IconSelectorValue iconSelectorInput, IconServicesUsageFlags iconServicesUsageFlags, IconRef theIconRef) -> (IconSelectorValue iconSelectorOutputPtr)")},
+ {"FlushIconRefs", (PyCFunction)Icn_FlushIconRefs, 1,
+ PyDoc_STR("(OSType creator, OSType iconType) -> None")},
+ {"FlushIconRefsByVolume", (PyCFunction)Icn_FlushIconRefsByVolume, 1,
+ PyDoc_STR("(SInt16 vRefNum) -> None")},
+ {"SetCustomIconsEnabled", (PyCFunction)Icn_SetCustomIconsEnabled, 1,
+ PyDoc_STR("(SInt16 vRefNum, Boolean enableCustomIcons) -> None")},
+ {"GetCustomIconsEnabled", (PyCFunction)Icn_GetCustomIconsEnabled, 1,
+ PyDoc_STR("(SInt16 vRefNum) -> (Boolean customIconsEnabled)")},
+ {"IsIconRefMaskEmpty", (PyCFunction)Icn_IsIconRefMaskEmpty, 1,
+ PyDoc_STR("(IconRef iconRef) -> (Boolean _rv)")},
+ {"GetIconRefVariant", (PyCFunction)Icn_GetIconRefVariant, 1,
+ PyDoc_STR("(IconRef inIconRef, OSType inVariant) -> (IconRef _rv, IconTransformType outTransform)")},
+ {"RegisterIconRefFromIconFile", (PyCFunction)Icn_RegisterIconRefFromIconFile, 1,
+ PyDoc_STR("(OSType creator, OSType iconType, FSSpec iconFile) -> (IconRef theIconRef)")},
+ {"ReadIconFile", (PyCFunction)Icn_ReadIconFile, 1,
+ PyDoc_STR("(FSSpec iconFile) -> (IconFamilyHandle iconFamily)")},
+ {"ReadIconFromFSRef", (PyCFunction)Icn_ReadIconFromFSRef, 1,
+ PyDoc_STR("(FSRef ref) -> (IconFamilyHandle iconFamily)")},
+ {"WriteIconFile", (PyCFunction)Icn_WriteIconFile, 1,
+ PyDoc_STR("(IconFamilyHandle iconFamily, FSSpec iconFile) -> None")},
#endif /* __LP64__ */
- {NULL, NULL, 0}
+ {NULL, NULL, 0}
};
@@ -1585,21 +1585,21 @@ static PyMethodDef Icn_methods[] = {
void init_Icn(void)
{
- PyObject *m;
+ PyObject *m;
#ifndef __LP64__
- PyObject *d;
+ PyObject *d;
#endif /* __LP64__ */
- m = Py_InitModule("_Icn", Icn_methods);
+ m = Py_InitModule("_Icn", Icn_methods);
#ifndef __LP64__
- d = PyModule_GetDict(m);
- Icn_Error = PyMac_GetOSErrException();
- if (Icn_Error == NULL ||
- PyDict_SetItemString(d, "Error", Icn_Error) != 0)
- return;
+ d = PyModule_GetDict(m);
+ Icn_Error = PyMac_GetOSErrException();
+ if (Icn_Error == NULL ||
+ PyDict_SetItemString(d, "Error", Icn_Error) != 0)
+ return;
#endif /* __LP64__ */
}
diff --git a/Mac/Modules/launch/_Launchmodule.c b/Mac/Modules/launch/_Launchmodule.c
index fa21ece..88912b2 100644
--- a/Mac/Modules/launch/_Launchmodule.c
+++ b/Mac/Modules/launch/_Launchmodule.c
@@ -9,9 +9,9 @@
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
- PyErr_SetString(PyExc_NotImplementedError, \
- "Not available in this shared library/OS version"); \
- return NULL; \
+ PyErr_SetString(PyExc_NotImplementedError, \
+ "Not available in this shared library/OS version"); \
+ return NULL; \
}} while(0)
@@ -27,21 +27,21 @@ PyObject *PyMac_GetOSErrException(void);
static int
OptCFStringRefObj_Convert(PyObject *v, CFStringRef *spec)
{
- if (v == Py_None) {
- *spec = NULL;
- return 1;
- }
- return CFStringRefObj_Convert(v, spec);
+ if (v == Py_None) {
+ *spec = NULL;
+ return 1;
+ }
+ return CFStringRefObj_Convert(v, spec);
}
PyObject *
OptCFStringRefObj_New(CFStringRef it)
{
- if (it == NULL) {
- Py_INCREF(Py_None);
- return Py_None;
- }
- return CFStringRefObj_New(it);
+ if (it == NULL) {
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
+ return CFStringRefObj_New(it);
}
/*
@@ -51,19 +51,19 @@ PyObject *
LSItemInfoRecord_New(LSItemInfoRecord *it)
{
#ifndef __LP64__
- return Py_BuildValue("{s:is:O&s:O&s:O&s:O&s:i}",
- "flags", it->flags,
- "filetype", PyMac_BuildOSType, it->filetype,
- "creator", PyMac_BuildOSType, it->creator,
- "extension", OptCFStringRefObj_New, it->extension,
- "iconFileName", OptCFStringRefObj_New, it->iconFileName,
- "kindID", it->kindID);
+ return Py_BuildValue("{s:is:O&s:O&s:O&s:O&s:i}",
+ "flags", it->flags,
+ "filetype", PyMac_BuildOSType, it->filetype,
+ "creator", PyMac_BuildOSType, it->creator,
+ "extension", OptCFStringRefObj_New, it->extension,
+ "iconFileName", OptCFStringRefObj_New, it->iconFileName,
+ "kindID", it->kindID);
#else
- return Py_BuildValue("{s:is:O&s:O&s:O&}",
- "flags", it->flags,
- "filetype", PyMac_BuildOSType, it->filetype,
- "creator", PyMac_BuildOSType, it->creator,
- "extension", OptCFStringRefObj_New, it->extension);
+ return Py_BuildValue("{s:is:O&s:O&s:O&}",
+ "flags", it->flags,
+ "filetype", PyMac_BuildOSType, it->filetype,
+ "creator", PyMac_BuildOSType, it->creator,
+ "extension", OptCFStringRefObj_New, it->extension);
#endif
}
@@ -71,391 +71,391 @@ static PyObject *Launch_Error;
static PyObject *Launch_LSCopyItemInfoForRef(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- FSRef inItemRef;
- LSRequestedInfo inWhichInfo;
- LSItemInfoRecord outItemInfo;
- if (!PyArg_ParseTuple(_args, "O&l",
- PyMac_GetFSRef, &inItemRef,
- &inWhichInfo))
- return NULL;
- _err = LSCopyItemInfoForRef(&inItemRef,
- inWhichInfo,
- &outItemInfo);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- LSItemInfoRecord_New, &outItemInfo);
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ FSRef inItemRef;
+ LSRequestedInfo inWhichInfo;
+ LSItemInfoRecord outItemInfo;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ PyMac_GetFSRef, &inItemRef,
+ &inWhichInfo))
+ return NULL;
+ _err = LSCopyItemInfoForRef(&inItemRef,
+ inWhichInfo,
+ &outItemInfo);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ LSItemInfoRecord_New, &outItemInfo);
+ return _res;
}
static PyObject *Launch_LSCopyItemInfoForURL(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- CFURLRef inURL;
- LSRequestedInfo inWhichInfo;
- LSItemInfoRecord outItemInfo;
- if (!PyArg_ParseTuple(_args, "O&l",
- CFURLRefObj_Convert, &inURL,
- &inWhichInfo))
- return NULL;
- _err = LSCopyItemInfoForURL(inURL,
- inWhichInfo,
- &outItemInfo);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- LSItemInfoRecord_New, &outItemInfo);
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ CFURLRef inURL;
+ LSRequestedInfo inWhichInfo;
+ LSItemInfoRecord outItemInfo;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CFURLRefObj_Convert, &inURL,
+ &inWhichInfo))
+ return NULL;
+ _err = LSCopyItemInfoForURL(inURL,
+ inWhichInfo,
+ &outItemInfo);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ LSItemInfoRecord_New, &outItemInfo);
+ return _res;
}
static PyObject *Launch_LSGetExtensionInfo(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- UniChar *inNameLen__in__;
- UniCharCount inNameLen__len__;
- int inNameLen__in_len__;
- UniCharCount outExtStartIndex;
- if (!PyArg_ParseTuple(_args, "u#",
- &inNameLen__in__, &inNameLen__in_len__))
- return NULL;
- inNameLen__len__ = inNameLen__in_len__;
- _err = LSGetExtensionInfo(inNameLen__len__, inNameLen__in__,
- &outExtStartIndex);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- outExtStartIndex);
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ UniChar *inNameLen__in__;
+ UniCharCount inNameLen__len__;
+ int inNameLen__in_len__;
+ UniCharCount outExtStartIndex;
+ if (!PyArg_ParseTuple(_args, "u#",
+ &inNameLen__in__, &inNameLen__in_len__))
+ return NULL;
+ inNameLen__len__ = inNameLen__in_len__;
+ _err = LSGetExtensionInfo(inNameLen__len__, inNameLen__in__,
+ &outExtStartIndex);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ outExtStartIndex);
+ return _res;
}
static PyObject *Launch_LSCopyDisplayNameForRef(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- FSRef inRef;
- CFStringRef outDisplayName;
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetFSRef, &inRef))
- return NULL;
- _err = LSCopyDisplayNameForRef(&inRef,
- &outDisplayName);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- CFStringRefObj_New, outDisplayName);
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ FSRef inRef;
+ CFStringRef outDisplayName;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetFSRef, &inRef))
+ return NULL;
+ _err = LSCopyDisplayNameForRef(&inRef,
+ &outDisplayName);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ CFStringRefObj_New, outDisplayName);
+ return _res;
}
static PyObject *Launch_LSCopyDisplayNameForURL(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- CFURLRef inURL;
- CFStringRef outDisplayName;
- if (!PyArg_ParseTuple(_args, "O&",
- CFURLRefObj_Convert, &inURL))
- return NULL;
- _err = LSCopyDisplayNameForURL(inURL,
- &outDisplayName);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- CFStringRefObj_New, outDisplayName);
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ CFURLRef inURL;
+ CFStringRef outDisplayName;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CFURLRefObj_Convert, &inURL))
+ return NULL;
+ _err = LSCopyDisplayNameForURL(inURL,
+ &outDisplayName);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ CFStringRefObj_New, outDisplayName);
+ return _res;
}
static PyObject *Launch_LSSetExtensionHiddenForRef(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- FSRef inRef;
- Boolean inHide;
- if (!PyArg_ParseTuple(_args, "O&b",
- PyMac_GetFSRef, &inRef,
- &inHide))
- return NULL;
- _err = LSSetExtensionHiddenForRef(&inRef,
- inHide);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ FSRef inRef;
+ Boolean inHide;
+ if (!PyArg_ParseTuple(_args, "O&b",
+ PyMac_GetFSRef, &inRef,
+ &inHide))
+ return NULL;
+ _err = LSSetExtensionHiddenForRef(&inRef,
+ inHide);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Launch_LSSetExtensionHiddenForURL(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- CFURLRef inURL;
- Boolean inHide;
- if (!PyArg_ParseTuple(_args, "O&b",
- CFURLRefObj_Convert, &inURL,
- &inHide))
- return NULL;
- _err = LSSetExtensionHiddenForURL(inURL,
- inHide);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ CFURLRef inURL;
+ Boolean inHide;
+ if (!PyArg_ParseTuple(_args, "O&b",
+ CFURLRefObj_Convert, &inURL,
+ &inHide))
+ return NULL;
+ _err = LSSetExtensionHiddenForURL(inURL,
+ inHide);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Launch_LSCopyKindStringForRef(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- FSRef inFSRef;
- CFStringRef outKindString;
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetFSRef, &inFSRef))
- return NULL;
- _err = LSCopyKindStringForRef(&inFSRef,
- &outKindString);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- CFStringRefObj_New, outKindString);
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ FSRef inFSRef;
+ CFStringRef outKindString;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetFSRef, &inFSRef))
+ return NULL;
+ _err = LSCopyKindStringForRef(&inFSRef,
+ &outKindString);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ CFStringRefObj_New, outKindString);
+ return _res;
}
static PyObject *Launch_LSCopyKindStringForURL(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- CFURLRef inURL;
- CFStringRef outKindString;
- if (!PyArg_ParseTuple(_args, "O&",
- CFURLRefObj_Convert, &inURL))
- return NULL;
- _err = LSCopyKindStringForURL(inURL,
- &outKindString);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- CFStringRefObj_New, outKindString);
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ CFURLRef inURL;
+ CFStringRef outKindString;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CFURLRefObj_Convert, &inURL))
+ return NULL;
+ _err = LSCopyKindStringForURL(inURL,
+ &outKindString);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ CFStringRefObj_New, outKindString);
+ return _res;
}
static PyObject *Launch_LSGetApplicationForItem(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- FSRef inItemRef;
- LSRolesMask inRoleMask;
- FSRef outAppRef;
- CFURLRef outAppURL;
- if (!PyArg_ParseTuple(_args, "O&l",
- PyMac_GetFSRef, &inItemRef,
- &inRoleMask))
- return NULL;
- _err = LSGetApplicationForItem(&inItemRef,
- inRoleMask,
- &outAppRef,
- &outAppURL);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&O&",
- PyMac_BuildFSRef, &outAppRef,
- CFURLRefObj_New, outAppURL);
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ FSRef inItemRef;
+ LSRolesMask inRoleMask;
+ FSRef outAppRef;
+ CFURLRef outAppURL;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ PyMac_GetFSRef, &inItemRef,
+ &inRoleMask))
+ return NULL;
+ _err = LSGetApplicationForItem(&inItemRef,
+ inRoleMask,
+ &outAppRef,
+ &outAppURL);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&O&",
+ PyMac_BuildFSRef, &outAppRef,
+ CFURLRefObj_New, outAppURL);
+ return _res;
}
static PyObject *Launch_LSGetApplicationForInfo(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- OSType inType;
- OSType inCreator;
- CFStringRef inExtension;
- LSRolesMask inRoleMask;
- FSRef outAppRef;
- CFURLRef outAppURL;
- if (!PyArg_ParseTuple(_args, "O&O&O&l",
- PyMac_GetOSType, &inType,
- PyMac_GetOSType, &inCreator,
- OptCFStringRefObj_Convert, &inExtension,
- &inRoleMask))
- return NULL;
- _err = LSGetApplicationForInfo(inType,
- inCreator,
- inExtension,
- inRoleMask,
- &outAppRef,
- &outAppURL);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&O&",
- PyMac_BuildFSRef, &outAppRef,
- CFURLRefObj_New, outAppURL);
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ OSType inType;
+ OSType inCreator;
+ CFStringRef inExtension;
+ LSRolesMask inRoleMask;
+ FSRef outAppRef;
+ CFURLRef outAppURL;
+ if (!PyArg_ParseTuple(_args, "O&O&O&l",
+ PyMac_GetOSType, &inType,
+ PyMac_GetOSType, &inCreator,
+ OptCFStringRefObj_Convert, &inExtension,
+ &inRoleMask))
+ return NULL;
+ _err = LSGetApplicationForInfo(inType,
+ inCreator,
+ inExtension,
+ inRoleMask,
+ &outAppRef,
+ &outAppURL);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&O&",
+ PyMac_BuildFSRef, &outAppRef,
+ CFURLRefObj_New, outAppURL);
+ return _res;
}
static PyObject *Launch_LSGetApplicationForURL(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- CFURLRef inURL;
- LSRolesMask inRoleMask;
- FSRef outAppRef;
- CFURLRef outAppURL;
- if (!PyArg_ParseTuple(_args, "O&l",
- CFURLRefObj_Convert, &inURL,
- &inRoleMask))
- return NULL;
- _err = LSGetApplicationForURL(inURL,
- inRoleMask,
- &outAppRef,
- &outAppURL);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&O&",
- PyMac_BuildFSRef, &outAppRef,
- CFURLRefObj_New, outAppURL);
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ CFURLRef inURL;
+ LSRolesMask inRoleMask;
+ FSRef outAppRef;
+ CFURLRef outAppURL;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CFURLRefObj_Convert, &inURL,
+ &inRoleMask))
+ return NULL;
+ _err = LSGetApplicationForURL(inURL,
+ inRoleMask,
+ &outAppRef,
+ &outAppURL);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&O&",
+ PyMac_BuildFSRef, &outAppRef,
+ CFURLRefObj_New, outAppURL);
+ return _res;
}
static PyObject *Launch_LSFindApplicationForInfo(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- OSType inCreator;
- CFStringRef inBundleID;
- CFStringRef inName;
- FSRef outAppRef;
- CFURLRef outAppURL;
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- PyMac_GetOSType, &inCreator,
- OptCFStringRefObj_Convert, &inBundleID,
- OptCFStringRefObj_Convert, &inName))
- return NULL;
- _err = LSFindApplicationForInfo(inCreator,
- inBundleID,
- inName,
- &outAppRef,
- &outAppURL);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&O&",
- PyMac_BuildFSRef, &outAppRef,
- CFURLRefObj_New, outAppURL);
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ OSType inCreator;
+ CFStringRef inBundleID;
+ CFStringRef inName;
+ FSRef outAppRef;
+ CFURLRef outAppURL;
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ PyMac_GetOSType, &inCreator,
+ OptCFStringRefObj_Convert, &inBundleID,
+ OptCFStringRefObj_Convert, &inName))
+ return NULL;
+ _err = LSFindApplicationForInfo(inCreator,
+ inBundleID,
+ inName,
+ &outAppRef,
+ &outAppURL);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&O&",
+ PyMac_BuildFSRef, &outAppRef,
+ CFURLRefObj_New, outAppURL);
+ return _res;
}
static PyObject *Launch_LSCanRefAcceptItem(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- FSRef inItemFSRef;
- FSRef inTargetRef;
- LSRolesMask inRoleMask;
- LSAcceptanceFlags inFlags;
- Boolean outAcceptsItem;
- if (!PyArg_ParseTuple(_args, "O&O&ll",
- PyMac_GetFSRef, &inItemFSRef,
- PyMac_GetFSRef, &inTargetRef,
- &inRoleMask,
- &inFlags))
- return NULL;
- _err = LSCanRefAcceptItem(&inItemFSRef,
- &inTargetRef,
- inRoleMask,
- inFlags,
- &outAcceptsItem);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("b",
- outAcceptsItem);
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ FSRef inItemFSRef;
+ FSRef inTargetRef;
+ LSRolesMask inRoleMask;
+ LSAcceptanceFlags inFlags;
+ Boolean outAcceptsItem;
+ if (!PyArg_ParseTuple(_args, "O&O&ll",
+ PyMac_GetFSRef, &inItemFSRef,
+ PyMac_GetFSRef, &inTargetRef,
+ &inRoleMask,
+ &inFlags))
+ return NULL;
+ _err = LSCanRefAcceptItem(&inItemFSRef,
+ &inTargetRef,
+ inRoleMask,
+ inFlags,
+ &outAcceptsItem);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("b",
+ outAcceptsItem);
+ return _res;
}
static PyObject *Launch_LSCanURLAcceptURL(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- CFURLRef inItemURL;
- CFURLRef inTargetURL;
- LSRolesMask inRoleMask;
- LSAcceptanceFlags inFlags;
- Boolean outAcceptsItem;
- if (!PyArg_ParseTuple(_args, "O&O&ll",
- CFURLRefObj_Convert, &inItemURL,
- CFURLRefObj_Convert, &inTargetURL,
- &inRoleMask,
- &inFlags))
- return NULL;
- _err = LSCanURLAcceptURL(inItemURL,
- inTargetURL,
- inRoleMask,
- inFlags,
- &outAcceptsItem);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("b",
- outAcceptsItem);
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ CFURLRef inItemURL;
+ CFURLRef inTargetURL;
+ LSRolesMask inRoleMask;
+ LSAcceptanceFlags inFlags;
+ Boolean outAcceptsItem;
+ if (!PyArg_ParseTuple(_args, "O&O&ll",
+ CFURLRefObj_Convert, &inItemURL,
+ CFURLRefObj_Convert, &inTargetURL,
+ &inRoleMask,
+ &inFlags))
+ return NULL;
+ _err = LSCanURLAcceptURL(inItemURL,
+ inTargetURL,
+ inRoleMask,
+ inFlags,
+ &outAcceptsItem);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("b",
+ outAcceptsItem);
+ return _res;
}
static PyObject *Launch_LSOpenFSRef(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- FSRef inRef;
- FSRef outLaunchedRef;
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetFSRef, &inRef))
- return NULL;
- _err = LSOpenFSRef(&inRef,
- &outLaunchedRef);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- PyMac_BuildFSRef, &outLaunchedRef);
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ FSRef inRef;
+ FSRef outLaunchedRef;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetFSRef, &inRef))
+ return NULL;
+ _err = LSOpenFSRef(&inRef,
+ &outLaunchedRef);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildFSRef, &outLaunchedRef);
+ return _res;
}
static PyObject *Launch_LSOpenCFURLRef(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- CFURLRef inURL;
- CFURLRef outLaunchedURL;
- if (!PyArg_ParseTuple(_args, "O&",
- CFURLRefObj_Convert, &inURL))
- return NULL;
- _err = LSOpenCFURLRef(inURL,
- &outLaunchedURL);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- CFURLRefObj_New, outLaunchedURL);
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ CFURLRef inURL;
+ CFURLRef outLaunchedURL;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CFURLRefObj_Convert, &inURL))
+ return NULL;
+ _err = LSOpenCFURLRef(inURL,
+ &outLaunchedURL);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ CFURLRefObj_New, outLaunchedURL);
+ return _res;
}
static PyMethodDef Launch_methods[] = {
- {"LSCopyItemInfoForRef", (PyCFunction)Launch_LSCopyItemInfoForRef, 1,
- PyDoc_STR("(FSRef inItemRef, LSRequestedInfo inWhichInfo) -> (LSItemInfoRecord outItemInfo)")},
- {"LSCopyItemInfoForURL", (PyCFunction)Launch_LSCopyItemInfoForURL, 1,
- PyDoc_STR("(CFURLRef inURL, LSRequestedInfo inWhichInfo) -> (LSItemInfoRecord outItemInfo)")},
- {"LSGetExtensionInfo", (PyCFunction)Launch_LSGetExtensionInfo, 1,
- PyDoc_STR("(Buffer inNameLen) -> (UniCharCount outExtStartIndex)")},
- {"LSCopyDisplayNameForRef", (PyCFunction)Launch_LSCopyDisplayNameForRef, 1,
- PyDoc_STR("(FSRef inRef) -> (CFStringRef outDisplayName)")},
- {"LSCopyDisplayNameForURL", (PyCFunction)Launch_LSCopyDisplayNameForURL, 1,
- PyDoc_STR("(CFURLRef inURL) -> (CFStringRef outDisplayName)")},
- {"LSSetExtensionHiddenForRef", (PyCFunction)Launch_LSSetExtensionHiddenForRef, 1,
- PyDoc_STR("(FSRef inRef, Boolean inHide) -> None")},
- {"LSSetExtensionHiddenForURL", (PyCFunction)Launch_LSSetExtensionHiddenForURL, 1,
- PyDoc_STR("(CFURLRef inURL, Boolean inHide) -> None")},
- {"LSCopyKindStringForRef", (PyCFunction)Launch_LSCopyKindStringForRef, 1,
- PyDoc_STR("(FSRef inFSRef) -> (CFStringRef outKindString)")},
- {"LSCopyKindStringForURL", (PyCFunction)Launch_LSCopyKindStringForURL, 1,
- PyDoc_STR("(CFURLRef inURL) -> (CFStringRef outKindString)")},
- {"LSGetApplicationForItem", (PyCFunction)Launch_LSGetApplicationForItem, 1,
- PyDoc_STR("(FSRef inItemRef, LSRolesMask inRoleMask) -> (FSRef outAppRef, CFURLRef outAppURL)")},
- {"LSGetApplicationForInfo", (PyCFunction)Launch_LSGetApplicationForInfo, 1,
- PyDoc_STR("(OSType inType, OSType inCreator, CFStringRef inExtension, LSRolesMask inRoleMask) -> (FSRef outAppRef, CFURLRef outAppURL)")},
- {"LSGetApplicationForURL", (PyCFunction)Launch_LSGetApplicationForURL, 1,
- PyDoc_STR("(CFURLRef inURL, LSRolesMask inRoleMask) -> (FSRef outAppRef, CFURLRef outAppURL)")},
- {"LSFindApplicationForInfo", (PyCFunction)Launch_LSFindApplicationForInfo, 1,
- PyDoc_STR("(OSType inCreator, CFStringRef inBundleID, CFStringRef inName) -> (FSRef outAppRef, CFURLRef outAppURL)")},
- {"LSCanRefAcceptItem", (PyCFunction)Launch_LSCanRefAcceptItem, 1,
- PyDoc_STR("(FSRef inItemFSRef, FSRef inTargetRef, LSRolesMask inRoleMask, LSAcceptanceFlags inFlags) -> (Boolean outAcceptsItem)")},
- {"LSCanURLAcceptURL", (PyCFunction)Launch_LSCanURLAcceptURL, 1,
- PyDoc_STR("(CFURLRef inItemURL, CFURLRef inTargetURL, LSRolesMask inRoleMask, LSAcceptanceFlags inFlags) -> (Boolean outAcceptsItem)")},
- {"LSOpenFSRef", (PyCFunction)Launch_LSOpenFSRef, 1,
- PyDoc_STR("(FSRef inRef) -> (FSRef outLaunchedRef)")},
- {"LSOpenCFURLRef", (PyCFunction)Launch_LSOpenCFURLRef, 1,
- PyDoc_STR("(CFURLRef inURL) -> (CFURLRef outLaunchedURL)")},
- {NULL, NULL, 0}
+ {"LSCopyItemInfoForRef", (PyCFunction)Launch_LSCopyItemInfoForRef, 1,
+ PyDoc_STR("(FSRef inItemRef, LSRequestedInfo inWhichInfo) -> (LSItemInfoRecord outItemInfo)")},
+ {"LSCopyItemInfoForURL", (PyCFunction)Launch_LSCopyItemInfoForURL, 1,
+ PyDoc_STR("(CFURLRef inURL, LSRequestedInfo inWhichInfo) -> (LSItemInfoRecord outItemInfo)")},
+ {"LSGetExtensionInfo", (PyCFunction)Launch_LSGetExtensionInfo, 1,
+ PyDoc_STR("(Buffer inNameLen) -> (UniCharCount outExtStartIndex)")},
+ {"LSCopyDisplayNameForRef", (PyCFunction)Launch_LSCopyDisplayNameForRef, 1,
+ PyDoc_STR("(FSRef inRef) -> (CFStringRef outDisplayName)")},
+ {"LSCopyDisplayNameForURL", (PyCFunction)Launch_LSCopyDisplayNameForURL, 1,
+ PyDoc_STR("(CFURLRef inURL) -> (CFStringRef outDisplayName)")},
+ {"LSSetExtensionHiddenForRef", (PyCFunction)Launch_LSSetExtensionHiddenForRef, 1,
+ PyDoc_STR("(FSRef inRef, Boolean inHide) -> None")},
+ {"LSSetExtensionHiddenForURL", (PyCFunction)Launch_LSSetExtensionHiddenForURL, 1,
+ PyDoc_STR("(CFURLRef inURL, Boolean inHide) -> None")},
+ {"LSCopyKindStringForRef", (PyCFunction)Launch_LSCopyKindStringForRef, 1,
+ PyDoc_STR("(FSRef inFSRef) -> (CFStringRef outKindString)")},
+ {"LSCopyKindStringForURL", (PyCFunction)Launch_LSCopyKindStringForURL, 1,
+ PyDoc_STR("(CFURLRef inURL) -> (CFStringRef outKindString)")},
+ {"LSGetApplicationForItem", (PyCFunction)Launch_LSGetApplicationForItem, 1,
+ PyDoc_STR("(FSRef inItemRef, LSRolesMask inRoleMask) -> (FSRef outAppRef, CFURLRef outAppURL)")},
+ {"LSGetApplicationForInfo", (PyCFunction)Launch_LSGetApplicationForInfo, 1,
+ PyDoc_STR("(OSType inType, OSType inCreator, CFStringRef inExtension, LSRolesMask inRoleMask) -> (FSRef outAppRef, CFURLRef outAppURL)")},
+ {"LSGetApplicationForURL", (PyCFunction)Launch_LSGetApplicationForURL, 1,
+ PyDoc_STR("(CFURLRef inURL, LSRolesMask inRoleMask) -> (FSRef outAppRef, CFURLRef outAppURL)")},
+ {"LSFindApplicationForInfo", (PyCFunction)Launch_LSFindApplicationForInfo, 1,
+ PyDoc_STR("(OSType inCreator, CFStringRef inBundleID, CFStringRef inName) -> (FSRef outAppRef, CFURLRef outAppURL)")},
+ {"LSCanRefAcceptItem", (PyCFunction)Launch_LSCanRefAcceptItem, 1,
+ PyDoc_STR("(FSRef inItemFSRef, FSRef inTargetRef, LSRolesMask inRoleMask, LSAcceptanceFlags inFlags) -> (Boolean outAcceptsItem)")},
+ {"LSCanURLAcceptURL", (PyCFunction)Launch_LSCanURLAcceptURL, 1,
+ PyDoc_STR("(CFURLRef inItemURL, CFURLRef inTargetURL, LSRolesMask inRoleMask, LSAcceptanceFlags inFlags) -> (Boolean outAcceptsItem)")},
+ {"LSOpenFSRef", (PyCFunction)Launch_LSOpenFSRef, 1,
+ PyDoc_STR("(FSRef inRef) -> (FSRef outLaunchedRef)")},
+ {"LSOpenCFURLRef", (PyCFunction)Launch_LSOpenCFURLRef, 1,
+ PyDoc_STR("(CFURLRef inURL) -> (CFURLRef outLaunchedURL)")},
+ {NULL, NULL, 0}
};
@@ -463,18 +463,18 @@ static PyMethodDef Launch_methods[] = {
void init_Launch(void)
{
- PyObject *m;
- PyObject *d;
+ PyObject *m;
+ PyObject *d;
- m = Py_InitModule("_Launch", Launch_methods);
- d = PyModule_GetDict(m);
- Launch_Error = PyMac_GetOSErrException();
- if (Launch_Error == NULL ||
- PyDict_SetItemString(d, "Error", Launch_Error) != 0)
- return;
+ m = Py_InitModule("_Launch", Launch_methods);
+ d = PyModule_GetDict(m);
+ Launch_Error = PyMac_GetOSErrException();
+ if (Launch_Error == NULL ||
+ PyDict_SetItemString(d, "Error", Launch_Error) != 0)
+ return;
}
/* ======================= End module _Launch ======================= */
diff --git a/Mac/Modules/list/_Listmodule.c b/Mac/Modules/list/_Listmodule.c
index 0797404..3f43b06 100644
--- a/Mac/Modules/list/_Listmodule.c
+++ b/Mac/Modules/list/_Listmodule.c
@@ -10,9 +10,9 @@
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
- PyErr_SetString(PyExc_NotImplementedError, \
- "Not available in this shared library/OS version"); \
- return NULL; \
+ PyErr_SetString(PyExc_NotImplementedError, \
+ "Not available in this shared library/OS version"); \
+ return NULL; \
}} while(0)
@@ -41,693 +41,693 @@ PyTypeObject List_Type;
#define ListObj_Check(x) ((x)->ob_type == &List_Type || PyObject_TypeCheck((x), &List_Type))
typedef struct ListObject {
- PyObject_HEAD
- ListHandle ob_itself;
- PyObject *ob_ldef_func;
- int ob_must_be_disposed;
+ PyObject_HEAD
+ ListHandle ob_itself;
+ PyObject *ob_ldef_func;
+ int ob_must_be_disposed;
} ListObject;
PyObject *ListObj_New(ListHandle itself)
{
- ListObject *it;
- if (itself == NULL) {
- PyErr_SetString(List_Error,"Cannot create null List");
- return NULL;
- }
- it = PyObject_NEW(ListObject, &List_Type);
- if (it == NULL) return NULL;
- it->ob_itself = itself;
- it->ob_ldef_func = NULL;
- it->ob_must_be_disposed = 1;
- SetListRefCon(itself, (long)it);
- return (PyObject *)it;
+ ListObject *it;
+ if (itself == NULL) {
+ PyErr_SetString(List_Error,"Cannot create null List");
+ return NULL;
+ }
+ it = PyObject_NEW(ListObject, &List_Type);
+ if (it == NULL) return NULL;
+ it->ob_itself = itself;
+ it->ob_ldef_func = NULL;
+ it->ob_must_be_disposed = 1;
+ SetListRefCon(itself, (long)it);
+ return (PyObject *)it;
}
int ListObj_Convert(PyObject *v, ListHandle *p_itself)
{
- if (!ListObj_Check(v))
- {
- PyErr_SetString(PyExc_TypeError, "List required");
- return 0;
- }
- *p_itself = ((ListObject *)v)->ob_itself;
- return 1;
+ if (!ListObj_Check(v))
+ {
+ PyErr_SetString(PyExc_TypeError, "List required");
+ return 0;
+ }
+ *p_itself = ((ListObject *)v)->ob_itself;
+ return 1;
}
static void ListObj_dealloc(ListObject *self)
{
- Py_XDECREF(self->ob_ldef_func);
- self->ob_ldef_func = NULL;
- SetListRefCon(self->ob_itself, (long)0);
- if (self->ob_must_be_disposed && self->ob_itself) LDispose(self->ob_itself);
- self->ob_type->tp_free((PyObject *)self);
+ Py_XDECREF(self->ob_ldef_func);
+ self->ob_ldef_func = NULL;
+ SetListRefCon(self->ob_itself, (long)0);
+ if (self->ob_must_be_disposed && self->ob_itself) LDispose(self->ob_itself);
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *ListObj_LAddColumn(ListObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short _rv;
- short count;
- short colNum;
- if (!PyArg_ParseTuple(_args, "hh",
- &count,
- &colNum))
- return NULL;
- _rv = LAddColumn(count,
- colNum,
- _self->ob_itself);
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ PyObject *_res = NULL;
+ short _rv;
+ short count;
+ short colNum;
+ if (!PyArg_ParseTuple(_args, "hh",
+ &count,
+ &colNum))
+ return NULL;
+ _rv = LAddColumn(count,
+ colNum,
+ _self->ob_itself);
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *ListObj_LAddRow(ListObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short _rv;
- short count;
- short rowNum;
- if (!PyArg_ParseTuple(_args, "hh",
- &count,
- &rowNum))
- return NULL;
- _rv = LAddRow(count,
- rowNum,
- _self->ob_itself);
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ PyObject *_res = NULL;
+ short _rv;
+ short count;
+ short rowNum;
+ if (!PyArg_ParseTuple(_args, "hh",
+ &count,
+ &rowNum))
+ return NULL;
+ _rv = LAddRow(count,
+ rowNum,
+ _self->ob_itself);
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *ListObj_LDelColumn(ListObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short count;
- short colNum;
- if (!PyArg_ParseTuple(_args, "hh",
- &count,
- &colNum))
- return NULL;
- LDelColumn(count,
- colNum,
- _self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ short count;
+ short colNum;
+ if (!PyArg_ParseTuple(_args, "hh",
+ &count,
+ &colNum))
+ return NULL;
+ LDelColumn(count,
+ colNum,
+ _self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *ListObj_LDelRow(ListObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short count;
- short rowNum;
- if (!PyArg_ParseTuple(_args, "hh",
- &count,
- &rowNum))
- return NULL;
- LDelRow(count,
- rowNum,
- _self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ short count;
+ short rowNum;
+ if (!PyArg_ParseTuple(_args, "hh",
+ &count,
+ &rowNum))
+ return NULL;
+ LDelRow(count,
+ rowNum,
+ _self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *ListObj_LGetSelect(ListObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- Boolean next;
- Point theCell;
- if (!PyArg_ParseTuple(_args, "bO&",
- &next,
- PyMac_GetPoint, &theCell))
- return NULL;
- _rv = LGetSelect(next,
- &theCell,
- _self->ob_itself);
- _res = Py_BuildValue("bO&",
- _rv,
- PyMac_BuildPoint, theCell);
- return _res;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ Boolean next;
+ Point theCell;
+ if (!PyArg_ParseTuple(_args, "bO&",
+ &next,
+ PyMac_GetPoint, &theCell))
+ return NULL;
+ _rv = LGetSelect(next,
+ &theCell,
+ _self->ob_itself);
+ _res = Py_BuildValue("bO&",
+ _rv,
+ PyMac_BuildPoint, theCell);
+ return _res;
}
static PyObject *ListObj_LLastClick(ListObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Point _rv;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = LLastClick(_self->ob_itself);
- _res = Py_BuildValue("O&",
- PyMac_BuildPoint, _rv);
- return _res;
+ PyObject *_res = NULL;
+ Point _rv;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = LLastClick(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildPoint, _rv);
+ return _res;
}
static PyObject *ListObj_LNextCell(ListObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- Boolean hNext;
- Boolean vNext;
- Point theCell;
- if (!PyArg_ParseTuple(_args, "bbO&",
- &hNext,
- &vNext,
- PyMac_GetPoint, &theCell))
- return NULL;
- _rv = LNextCell(hNext,
- vNext,
- &theCell,
- _self->ob_itself);
- _res = Py_BuildValue("bO&",
- _rv,
- PyMac_BuildPoint, theCell);
- return _res;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ Boolean hNext;
+ Boolean vNext;
+ Point theCell;
+ if (!PyArg_ParseTuple(_args, "bbO&",
+ &hNext,
+ &vNext,
+ PyMac_GetPoint, &theCell))
+ return NULL;
+ _rv = LNextCell(hNext,
+ vNext,
+ &theCell,
+ _self->ob_itself);
+ _res = Py_BuildValue("bO&",
+ _rv,
+ PyMac_BuildPoint, theCell);
+ return _res;
}
static PyObject *ListObj_LSize(ListObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short listWidth;
- short listHeight;
- if (!PyArg_ParseTuple(_args, "hh",
- &listWidth,
- &listHeight))
- return NULL;
- LSize(listWidth,
- listHeight,
- _self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ short listWidth;
+ short listHeight;
+ if (!PyArg_ParseTuple(_args, "hh",
+ &listWidth,
+ &listHeight))
+ return NULL;
+ LSize(listWidth,
+ listHeight,
+ _self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *ListObj_LSetDrawingMode(ListObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean drawIt;
- if (!PyArg_ParseTuple(_args, "b",
- &drawIt))
- return NULL;
- LSetDrawingMode(drawIt,
- _self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ Boolean drawIt;
+ if (!PyArg_ParseTuple(_args, "b",
+ &drawIt))
+ return NULL;
+ LSetDrawingMode(drawIt,
+ _self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *ListObj_LScroll(ListObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short dCols;
- short dRows;
- if (!PyArg_ParseTuple(_args, "hh",
- &dCols,
- &dRows))
- return NULL;
- LScroll(dCols,
- dRows,
- _self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ short dCols;
+ short dRows;
+ if (!PyArg_ParseTuple(_args, "hh",
+ &dCols,
+ &dRows))
+ return NULL;
+ LScroll(dCols,
+ dRows,
+ _self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *ListObj_LAutoScroll(ListObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- LAutoScroll(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ LAutoScroll(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *ListObj_LUpdate(ListObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RgnHandle theRgn;
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &theRgn))
- return NULL;
- LUpdate(theRgn,
- _self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ RgnHandle theRgn;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &theRgn))
+ return NULL;
+ LUpdate(theRgn,
+ _self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *ListObj_LActivate(ListObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean act;
- if (!PyArg_ParseTuple(_args, "b",
- &act))
- return NULL;
- LActivate(act,
- _self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ Boolean act;
+ if (!PyArg_ParseTuple(_args, "b",
+ &act))
+ return NULL;
+ LActivate(act,
+ _self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *ListObj_LCellSize(ListObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Point cSize;
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetPoint, &cSize))
- return NULL;
- LCellSize(cSize,
- _self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ Point cSize;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetPoint, &cSize))
+ return NULL;
+ LCellSize(cSize,
+ _self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *ListObj_LClick(ListObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- Point pt;
- EventModifiers modifiers;
- if (!PyArg_ParseTuple(_args, "O&H",
- PyMac_GetPoint, &pt,
- &modifiers))
- return NULL;
- _rv = LClick(pt,
- modifiers,
- _self->ob_itself);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ Point pt;
+ EventModifiers modifiers;
+ if (!PyArg_ParseTuple(_args, "O&H",
+ PyMac_GetPoint, &pt,
+ &modifiers))
+ return NULL;
+ _rv = LClick(pt,
+ modifiers,
+ _self->ob_itself);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *ListObj_LAddToCell(ListObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- char *dataPtr__in__;
- short dataPtr__len__;
- int dataPtr__in_len__;
- Point theCell;
- if (!PyArg_ParseTuple(_args, "s#O&",
- &dataPtr__in__, &dataPtr__in_len__,
- PyMac_GetPoint, &theCell))
- return NULL;
- dataPtr__len__ = dataPtr__in_len__;
- LAddToCell(dataPtr__in__, dataPtr__len__,
- theCell,
- _self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ char *dataPtr__in__;
+ short dataPtr__len__;
+ int dataPtr__in_len__;
+ Point theCell;
+ if (!PyArg_ParseTuple(_args, "s#O&",
+ &dataPtr__in__, &dataPtr__in_len__,
+ PyMac_GetPoint, &theCell))
+ return NULL;
+ dataPtr__len__ = dataPtr__in_len__;
+ LAddToCell(dataPtr__in__, dataPtr__len__,
+ theCell,
+ _self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *ListObj_LClrCell(ListObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Point theCell;
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetPoint, &theCell))
- return NULL;
- LClrCell(theCell,
- _self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ Point theCell;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetPoint, &theCell))
+ return NULL;
+ LClrCell(theCell,
+ _self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *ListObj_LGetCell(ListObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- char *dataPtr__out__;
- short dataPtr__len__;
- int dataPtr__in_len__;
- Point theCell;
- if (!PyArg_ParseTuple(_args, "iO&",
- &dataPtr__in_len__,
- PyMac_GetPoint, &theCell))
- return NULL;
- if ((dataPtr__out__ = malloc(dataPtr__in_len__)) == NULL)
- {
- PyErr_NoMemory();
- goto dataPtr__error__;
- }
- dataPtr__len__ = dataPtr__in_len__;
- LGetCell(dataPtr__out__, &dataPtr__len__,
- theCell,
- _self->ob_itself);
- _res = Py_BuildValue("s#",
- dataPtr__out__, (int)dataPtr__len__);
- free(dataPtr__out__);
+ PyObject *_res = NULL;
+ char *dataPtr__out__;
+ short dataPtr__len__;
+ int dataPtr__in_len__;
+ Point theCell;
+ if (!PyArg_ParseTuple(_args, "iO&",
+ &dataPtr__in_len__,
+ PyMac_GetPoint, &theCell))
+ return NULL;
+ if ((dataPtr__out__ = malloc(dataPtr__in_len__)) == NULL)
+ {
+ PyErr_NoMemory();
+ goto dataPtr__error__;
+ }
+ dataPtr__len__ = dataPtr__in_len__;
+ LGetCell(dataPtr__out__, &dataPtr__len__,
+ theCell,
+ _self->ob_itself);
+ _res = Py_BuildValue("s#",
+ dataPtr__out__, (int)dataPtr__len__);
+ free(dataPtr__out__);
dataPtr__error__: ;
- return _res;
+ return _res;
}
static PyObject *ListObj_LRect(ListObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Rect cellRect;
- Point theCell;
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetPoint, &theCell))
- return NULL;
- LRect(&cellRect,
- theCell,
- _self->ob_itself);
- _res = Py_BuildValue("O&",
- PyMac_BuildRect, &cellRect);
- return _res;
+ PyObject *_res = NULL;
+ Rect cellRect;
+ Point theCell;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetPoint, &theCell))
+ return NULL;
+ LRect(&cellRect,
+ theCell,
+ _self->ob_itself);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildRect, &cellRect);
+ return _res;
}
static PyObject *ListObj_LSetCell(ListObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- char *dataPtr__in__;
- short dataPtr__len__;
- int dataPtr__in_len__;
- Point theCell;
- if (!PyArg_ParseTuple(_args, "s#O&",
- &dataPtr__in__, &dataPtr__in_len__,
- PyMac_GetPoint, &theCell))
- return NULL;
- dataPtr__len__ = dataPtr__in_len__;
- LSetCell(dataPtr__in__, dataPtr__len__,
- theCell,
- _self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ char *dataPtr__in__;
+ short dataPtr__len__;
+ int dataPtr__in_len__;
+ Point theCell;
+ if (!PyArg_ParseTuple(_args, "s#O&",
+ &dataPtr__in__, &dataPtr__in_len__,
+ PyMac_GetPoint, &theCell))
+ return NULL;
+ dataPtr__len__ = dataPtr__in_len__;
+ LSetCell(dataPtr__in__, dataPtr__len__,
+ theCell,
+ _self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *ListObj_LSetSelect(ListObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean setIt;
- Point theCell;
- if (!PyArg_ParseTuple(_args, "bO&",
- &setIt,
- PyMac_GetPoint, &theCell))
- return NULL;
- LSetSelect(setIt,
- theCell,
- _self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ Boolean setIt;
+ Point theCell;
+ if (!PyArg_ParseTuple(_args, "bO&",
+ &setIt,
+ PyMac_GetPoint, &theCell))
+ return NULL;
+ LSetSelect(setIt,
+ theCell,
+ _self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *ListObj_LDraw(ListObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Point theCell;
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetPoint, &theCell))
- return NULL;
- LDraw(theCell,
- _self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ Point theCell;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetPoint, &theCell))
+ return NULL;
+ LDraw(theCell,
+ _self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *ListObj_LGetCellDataLocation(ListObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short offset;
- short len;
- Point theCell;
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetPoint, &theCell))
- return NULL;
- LGetCellDataLocation(&offset,
- &len,
- theCell,
- _self->ob_itself);
- _res = Py_BuildValue("hh",
- offset,
- len);
- return _res;
+ PyObject *_res = NULL;
+ short offset;
+ short len;
+ Point theCell;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetPoint, &theCell))
+ return NULL;
+ LGetCellDataLocation(&offset,
+ &len,
+ theCell,
+ _self->ob_itself);
+ _res = Py_BuildValue("hh",
+ offset,
+ len);
+ return _res;
}
static PyObject *ListObj_GetListPort(ListObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CGrafPtr _rv;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetListPort(_self->ob_itself);
- _res = Py_BuildValue("O&",
- GrafObj_New, _rv);
- return _res;
+ PyObject *_res = NULL;
+ CGrafPtr _rv;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetListPort(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ GrafObj_New, _rv);
+ return _res;
}
static PyObject *ListObj_GetListVerticalScrollBar(ListObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ControlHandle _rv;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetListVerticalScrollBar(_self->ob_itself);
- _res = Py_BuildValue("O&",
- CtlObj_New, _rv);
- return _res;
+ PyObject *_res = NULL;
+ ControlHandle _rv;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetListVerticalScrollBar(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ CtlObj_New, _rv);
+ return _res;
}
static PyObject *ListObj_GetListHorizontalScrollBar(ListObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ControlHandle _rv;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetListHorizontalScrollBar(_self->ob_itself);
- _res = Py_BuildValue("O&",
- CtlObj_New, _rv);
- return _res;
+ PyObject *_res = NULL;
+ ControlHandle _rv;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetListHorizontalScrollBar(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ CtlObj_New, _rv);
+ return _res;
}
static PyObject *ListObj_GetListActive(ListObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetListActive(_self->ob_itself);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetListActive(_self->ob_itself);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *ListObj_GetListClickTime(ListObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- SInt32 _rv;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetListClickTime(_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyObject *_res = NULL;
+ SInt32 _rv;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetListClickTime(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *ListObj_GetListRefCon(ListObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- SInt32 _rv;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetListRefCon(_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyObject *_res = NULL;
+ SInt32 _rv;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetListRefCon(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *ListObj_GetListDefinition(ListObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Handle _rv;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetListDefinition(_self->ob_itself);
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ PyObject *_res = NULL;
+ Handle _rv;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetListDefinition(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *ListObj_GetListUserHandle(ListObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Handle _rv;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetListUserHandle(_self->ob_itself);
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ PyObject *_res = NULL;
+ Handle _rv;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetListUserHandle(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *ListObj_GetListDataHandle(ListObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- DataHandle _rv;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetListDataHandle(_self->ob_itself);
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ PyObject *_res = NULL;
+ DataHandle _rv;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetListDataHandle(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *ListObj_GetListFlags(ListObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OptionBits _rv;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetListFlags(_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyObject *_res = NULL;
+ OptionBits _rv;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetListFlags(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *ListObj_GetListSelectionFlags(ListObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OptionBits _rv;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetListSelectionFlags(_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyObject *_res = NULL;
+ OptionBits _rv;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetListSelectionFlags(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *ListObj_as_Resource(ListObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Handle _rv;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = as_Resource(_self->ob_itself);
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ PyObject *_res = NULL;
+ Handle _rv;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = as_Resource(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyMethodDef ListObj_methods[] = {
- {"LAddColumn", (PyCFunction)ListObj_LAddColumn, 1,
- PyDoc_STR("(short count, short colNum) -> (short _rv)")},
- {"LAddRow", (PyCFunction)ListObj_LAddRow, 1,
- PyDoc_STR("(short count, short rowNum) -> (short _rv)")},
- {"LDelColumn", (PyCFunction)ListObj_LDelColumn, 1,
- PyDoc_STR("(short count, short colNum) -> None")},
- {"LDelRow", (PyCFunction)ListObj_LDelRow, 1,
- PyDoc_STR("(short count, short rowNum) -> None")},
- {"LGetSelect", (PyCFunction)ListObj_LGetSelect, 1,
- PyDoc_STR("(Boolean next, Point theCell) -> (Boolean _rv, Point theCell)")},
- {"LLastClick", (PyCFunction)ListObj_LLastClick, 1,
- PyDoc_STR("() -> (Point _rv)")},
- {"LNextCell", (PyCFunction)ListObj_LNextCell, 1,
- PyDoc_STR("(Boolean hNext, Boolean vNext, Point theCell) -> (Boolean _rv, Point theCell)")},
- {"LSize", (PyCFunction)ListObj_LSize, 1,
- PyDoc_STR("(short listWidth, short listHeight) -> None")},
- {"LSetDrawingMode", (PyCFunction)ListObj_LSetDrawingMode, 1,
- PyDoc_STR("(Boolean drawIt) -> None")},
- {"LScroll", (PyCFunction)ListObj_LScroll, 1,
- PyDoc_STR("(short dCols, short dRows) -> None")},
- {"LAutoScroll", (PyCFunction)ListObj_LAutoScroll, 1,
- PyDoc_STR("() -> None")},
- {"LUpdate", (PyCFunction)ListObj_LUpdate, 1,
- PyDoc_STR("(RgnHandle theRgn) -> None")},
- {"LActivate", (PyCFunction)ListObj_LActivate, 1,
- PyDoc_STR("(Boolean act) -> None")},
- {"LCellSize", (PyCFunction)ListObj_LCellSize, 1,
- PyDoc_STR("(Point cSize) -> None")},
- {"LClick", (PyCFunction)ListObj_LClick, 1,
- PyDoc_STR("(Point pt, EventModifiers modifiers) -> (Boolean _rv)")},
- {"LAddToCell", (PyCFunction)ListObj_LAddToCell, 1,
- PyDoc_STR("(Buffer dataPtr, Point theCell) -> None")},
- {"LClrCell", (PyCFunction)ListObj_LClrCell, 1,
- PyDoc_STR("(Point theCell) -> None")},
- {"LGetCell", (PyCFunction)ListObj_LGetCell, 1,
- PyDoc_STR("(Buffer dataPtr, Point theCell) -> (Buffer dataPtr)")},
- {"LRect", (PyCFunction)ListObj_LRect, 1,
- PyDoc_STR("(Point theCell) -> (Rect cellRect)")},
- {"LSetCell", (PyCFunction)ListObj_LSetCell, 1,
- PyDoc_STR("(Buffer dataPtr, Point theCell) -> None")},
- {"LSetSelect", (PyCFunction)ListObj_LSetSelect, 1,
- PyDoc_STR("(Boolean setIt, Point theCell) -> None")},
- {"LDraw", (PyCFunction)ListObj_LDraw, 1,
- PyDoc_STR("(Point theCell) -> None")},
- {"LGetCellDataLocation", (PyCFunction)ListObj_LGetCellDataLocation, 1,
- PyDoc_STR("(Point theCell) -> (short offset, short len)")},
- {"GetListPort", (PyCFunction)ListObj_GetListPort, 1,
- PyDoc_STR("() -> (CGrafPtr _rv)")},
- {"GetListVerticalScrollBar", (PyCFunction)ListObj_GetListVerticalScrollBar, 1,
- PyDoc_STR("() -> (ControlHandle _rv)")},
- {"GetListHorizontalScrollBar", (PyCFunction)ListObj_GetListHorizontalScrollBar, 1,
- PyDoc_STR("() -> (ControlHandle _rv)")},
- {"GetListActive", (PyCFunction)ListObj_GetListActive, 1,
- PyDoc_STR("() -> (Boolean _rv)")},
- {"GetListClickTime", (PyCFunction)ListObj_GetListClickTime, 1,
- PyDoc_STR("() -> (SInt32 _rv)")},
- {"GetListRefCon", (PyCFunction)ListObj_GetListRefCon, 1,
- PyDoc_STR("() -> (SInt32 _rv)")},
- {"GetListDefinition", (PyCFunction)ListObj_GetListDefinition, 1,
- PyDoc_STR("() -> (Handle _rv)")},
- {"GetListUserHandle", (PyCFunction)ListObj_GetListUserHandle, 1,
- PyDoc_STR("() -> (Handle _rv)")},
- {"GetListDataHandle", (PyCFunction)ListObj_GetListDataHandle, 1,
- PyDoc_STR("() -> (DataHandle _rv)")},
- {"GetListFlags", (PyCFunction)ListObj_GetListFlags, 1,
- PyDoc_STR("() -> (OptionBits _rv)")},
- {"GetListSelectionFlags", (PyCFunction)ListObj_GetListSelectionFlags, 1,
- PyDoc_STR("() -> (OptionBits _rv)")},
- {"as_Resource", (PyCFunction)ListObj_as_Resource, 1,
- PyDoc_STR("() -> (Handle _rv)")},
- {NULL, NULL, 0}
+ {"LAddColumn", (PyCFunction)ListObj_LAddColumn, 1,
+ PyDoc_STR("(short count, short colNum) -> (short _rv)")},
+ {"LAddRow", (PyCFunction)ListObj_LAddRow, 1,
+ PyDoc_STR("(short count, short rowNum) -> (short _rv)")},
+ {"LDelColumn", (PyCFunction)ListObj_LDelColumn, 1,
+ PyDoc_STR("(short count, short colNum) -> None")},
+ {"LDelRow", (PyCFunction)ListObj_LDelRow, 1,
+ PyDoc_STR("(short count, short rowNum) -> None")},
+ {"LGetSelect", (PyCFunction)ListObj_LGetSelect, 1,
+ PyDoc_STR("(Boolean next, Point theCell) -> (Boolean _rv, Point theCell)")},
+ {"LLastClick", (PyCFunction)ListObj_LLastClick, 1,
+ PyDoc_STR("() -> (Point _rv)")},
+ {"LNextCell", (PyCFunction)ListObj_LNextCell, 1,
+ PyDoc_STR("(Boolean hNext, Boolean vNext, Point theCell) -> (Boolean _rv, Point theCell)")},
+ {"LSize", (PyCFunction)ListObj_LSize, 1,
+ PyDoc_STR("(short listWidth, short listHeight) -> None")},
+ {"LSetDrawingMode", (PyCFunction)ListObj_LSetDrawingMode, 1,
+ PyDoc_STR("(Boolean drawIt) -> None")},
+ {"LScroll", (PyCFunction)ListObj_LScroll, 1,
+ PyDoc_STR("(short dCols, short dRows) -> None")},
+ {"LAutoScroll", (PyCFunction)ListObj_LAutoScroll, 1,
+ PyDoc_STR("() -> None")},
+ {"LUpdate", (PyCFunction)ListObj_LUpdate, 1,
+ PyDoc_STR("(RgnHandle theRgn) -> None")},
+ {"LActivate", (PyCFunction)ListObj_LActivate, 1,
+ PyDoc_STR("(Boolean act) -> None")},
+ {"LCellSize", (PyCFunction)ListObj_LCellSize, 1,
+ PyDoc_STR("(Point cSize) -> None")},
+ {"LClick", (PyCFunction)ListObj_LClick, 1,
+ PyDoc_STR("(Point pt, EventModifiers modifiers) -> (Boolean _rv)")},
+ {"LAddToCell", (PyCFunction)ListObj_LAddToCell, 1,
+ PyDoc_STR("(Buffer dataPtr, Point theCell) -> None")},
+ {"LClrCell", (PyCFunction)ListObj_LClrCell, 1,
+ PyDoc_STR("(Point theCell) -> None")},
+ {"LGetCell", (PyCFunction)ListObj_LGetCell, 1,
+ PyDoc_STR("(Buffer dataPtr, Point theCell) -> (Buffer dataPtr)")},
+ {"LRect", (PyCFunction)ListObj_LRect, 1,
+ PyDoc_STR("(Point theCell) -> (Rect cellRect)")},
+ {"LSetCell", (PyCFunction)ListObj_LSetCell, 1,
+ PyDoc_STR("(Buffer dataPtr, Point theCell) -> None")},
+ {"LSetSelect", (PyCFunction)ListObj_LSetSelect, 1,
+ PyDoc_STR("(Boolean setIt, Point theCell) -> None")},
+ {"LDraw", (PyCFunction)ListObj_LDraw, 1,
+ PyDoc_STR("(Point theCell) -> None")},
+ {"LGetCellDataLocation", (PyCFunction)ListObj_LGetCellDataLocation, 1,
+ PyDoc_STR("(Point theCell) -> (short offset, short len)")},
+ {"GetListPort", (PyCFunction)ListObj_GetListPort, 1,
+ PyDoc_STR("() -> (CGrafPtr _rv)")},
+ {"GetListVerticalScrollBar", (PyCFunction)ListObj_GetListVerticalScrollBar, 1,
+ PyDoc_STR("() -> (ControlHandle _rv)")},
+ {"GetListHorizontalScrollBar", (PyCFunction)ListObj_GetListHorizontalScrollBar, 1,
+ PyDoc_STR("() -> (ControlHandle _rv)")},
+ {"GetListActive", (PyCFunction)ListObj_GetListActive, 1,
+ PyDoc_STR("() -> (Boolean _rv)")},
+ {"GetListClickTime", (PyCFunction)ListObj_GetListClickTime, 1,
+ PyDoc_STR("() -> (SInt32 _rv)")},
+ {"GetListRefCon", (PyCFunction)ListObj_GetListRefCon, 1,
+ PyDoc_STR("() -> (SInt32 _rv)")},
+ {"GetListDefinition", (PyCFunction)ListObj_GetListDefinition, 1,
+ PyDoc_STR("() -> (Handle _rv)")},
+ {"GetListUserHandle", (PyCFunction)ListObj_GetListUserHandle, 1,
+ PyDoc_STR("() -> (Handle _rv)")},
+ {"GetListDataHandle", (PyCFunction)ListObj_GetListDataHandle, 1,
+ PyDoc_STR("() -> (DataHandle _rv)")},
+ {"GetListFlags", (PyCFunction)ListObj_GetListFlags, 1,
+ PyDoc_STR("() -> (OptionBits _rv)")},
+ {"GetListSelectionFlags", (PyCFunction)ListObj_GetListSelectionFlags, 1,
+ PyDoc_STR("() -> (OptionBits _rv)")},
+ {"as_Resource", (PyCFunction)ListObj_as_Resource, 1,
+ PyDoc_STR("() -> (Handle _rv)")},
+ {NULL, NULL, 0}
};
static PyObject *ListObj_get_listFlags(ListObject *self, void *closure)
{
- return Py_BuildValue("l", (long)GetListFlags(self->ob_itself) & 0xff);
+ return Py_BuildValue("l", (long)GetListFlags(self->ob_itself) & 0xff);
}
static int ListObj_set_listFlags(ListObject *self, PyObject *v, void *closure)
{
- if (!PyArg_Parse(v, "B", &(*self->ob_itself)->listFlags)) return -1;
- return 0;
+ if (!PyArg_Parse(v, "B", &(*self->ob_itself)->listFlags)) return -1;
+ return 0;
}
static PyObject *ListObj_get_selFlags(ListObject *self, void *closure)
{
- return Py_BuildValue("l", (long)GetListSelectionFlags(self->ob_itself) & 0xff);
+ return Py_BuildValue("l", (long)GetListSelectionFlags(self->ob_itself) & 0xff);
}
static int ListObj_set_selFlags(ListObject *self, PyObject *v, void *closure)
{
- if (!PyArg_Parse(v, "B", &(*self->ob_itself)->selFlags)) return -1;
- return 0;
+ if (!PyArg_Parse(v, "B", &(*self->ob_itself)->selFlags)) return -1;
+ return 0;
}
static PyObject *ListObj_get_cellSize(ListObject *self, void *closure)
{
- return Py_BuildValue("O&", PyMac_BuildPoint, (*self->ob_itself)->cellSize);
+ return Py_BuildValue("O&", PyMac_BuildPoint, (*self->ob_itself)->cellSize);
}
static int ListObj_set_cellSize(ListObject *self, PyObject *v, void *closure)
{
- if (!PyArg_Parse(v, "O&", PyMac_GetPoint, &(*self->ob_itself)->cellSize)) return -1;
- return 0;
+ if (!PyArg_Parse(v, "O&", PyMac_GetPoint, &(*self->ob_itself)->cellSize)) return -1;
+ return 0;
}
static PyGetSetDef ListObj_getsetlist[] = {
- {"listFlags", (getter)ListObj_get_listFlags, (setter)ListObj_set_listFlags, NULL},
- {"selFlags", (getter)ListObj_get_selFlags, (setter)ListObj_set_selFlags, NULL},
- {"cellSize", (getter)ListObj_get_cellSize, (setter)ListObj_set_cellSize, NULL},
- {NULL, NULL, NULL, NULL},
+ {"listFlags", (getter)ListObj_get_listFlags, (setter)ListObj_set_listFlags, NULL},
+ {"selFlags", (getter)ListObj_get_selFlags, (setter)ListObj_set_selFlags, NULL},
+ {"cellSize", (getter)ListObj_get_cellSize, (setter)ListObj_set_cellSize, NULL},
+ {NULL, NULL, NULL, NULL},
};
@@ -742,61 +742,61 @@ static PyGetSetDef ListObj_getsetlist[] = {
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;
+ 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 = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
- "_List.List", /*tp_name*/
- sizeof(ListObject), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- /* methods */
- (destructor) ListObj_dealloc, /*tp_dealloc*/
- 0, /*tp_print*/
- (getattrfunc)0, /*tp_getattr*/
- (setattrfunc)0, /*tp_setattr*/
- (cmpfunc) ListObj_compare, /*tp_compare*/
- (reprfunc) ListObj_repr, /*tp_repr*/
- (PyNumberMethods *)0, /* tp_as_number */
- (PySequenceMethods *)0, /* tp_as_sequence */
- (PyMappingMethods *)0, /* tp_as_mapping */
- (hashfunc) ListObj_hash, /*tp_hash*/
- 0, /*tp_call*/
- 0, /*tp_str*/
- PyObject_GenericGetAttr, /*tp_getattro*/
- PyObject_GenericSetAttr, /*tp_setattro */
- 0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
- 0, /*tp_doc*/
- 0, /*tp_traverse*/
- 0, /*tp_clear*/
- 0, /*tp_richcompare*/
- 0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
- 0, /*tp_iternext*/
- ListObj_methods, /* tp_methods */
- 0, /*tp_members*/
- ListObj_getsetlist, /*tp_getset*/
- 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 */
+ PyObject_HEAD_INIT(NULL)
+ 0, /*ob_size*/
+ "_List.List", /*tp_name*/
+ sizeof(ListObject), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ /* methods */
+ (destructor) ListObj_dealloc, /*tp_dealloc*/
+ 0, /*tp_print*/
+ (getattrfunc)0, /*tp_getattr*/
+ (setattrfunc)0, /*tp_setattr*/
+ (cmpfunc) ListObj_compare, /*tp_compare*/
+ (reprfunc) ListObj_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) ListObj_hash, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ PyObject_GenericGetAttr, /*tp_getattro*/
+ PyObject_GenericSetAttr, /*tp_setattro */
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
+ 0, /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ ListObj_methods, /* tp_methods */
+ 0, /*tp_members*/
+ ListObj_getsetlist, /*tp_getset*/
+ 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 ---------------------- */
@@ -804,263 +804,263 @@ PyTypeObject List_Type = {
static PyObject *List_CreateCustomList(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Rect rView;
- Rect dataBounds;
- Point cellSize;
-
- PyObject *listDefFunc;
- ListDefSpec theSpec;
- WindowPtr theWindow;
- Boolean drawIt;
- Boolean hasGrow;
- Boolean scrollHoriz;
- Boolean scrollVert;
- ListHandle outList;
-
- if (!PyArg_ParseTuple(_args, "O&O&O&(iO)O&bbbb",
- PyMac_GetRect, &rView,
- PyMac_GetRect, &dataBounds,
- PyMac_GetPoint, &cellSize,
- &theSpec.defType, &listDefFunc,
- WinObj_Convert, &theWindow,
- &drawIt,
- &hasGrow,
- &scrollHoriz,
- &scrollVert))
- return NULL;
-
-
- /* Carbon applications use the CreateCustomList API */
- theSpec.u.userProc = myListDefFunctionUPP;
- CreateCustomList(&rView,
- &dataBounds,
- cellSize,
- &theSpec,
- theWindow,
- drawIt,
- hasGrow,
- scrollHoriz,
- scrollVert,
- &outList);
-
-
- _res = ListObj_New(outList);
- if (_res == NULL)
- return NULL;
- Py_INCREF(listDefFunc);
- ((ListObject*)_res)->ob_ldef_func = listDefFunc;
- return _res;
+ PyObject *_res = NULL;
+ Rect rView;
+ Rect dataBounds;
+ Point cellSize;
+
+ PyObject *listDefFunc;
+ ListDefSpec theSpec;
+ WindowPtr theWindow;
+ Boolean drawIt;
+ Boolean hasGrow;
+ Boolean scrollHoriz;
+ Boolean scrollVert;
+ ListHandle outList;
+
+ if (!PyArg_ParseTuple(_args, "O&O&O&(iO)O&bbbb",
+ PyMac_GetRect, &rView,
+ PyMac_GetRect, &dataBounds,
+ PyMac_GetPoint, &cellSize,
+ &theSpec.defType, &listDefFunc,
+ WinObj_Convert, &theWindow,
+ &drawIt,
+ &hasGrow,
+ &scrollHoriz,
+ &scrollVert))
+ return NULL;
+
+
+ /* Carbon applications use the CreateCustomList API */
+ theSpec.u.userProc = myListDefFunctionUPP;
+ CreateCustomList(&rView,
+ &dataBounds,
+ cellSize,
+ &theSpec,
+ theWindow,
+ drawIt,
+ hasGrow,
+ scrollHoriz,
+ scrollVert,
+ &outList);
+
+
+ _res = ListObj_New(outList);
+ if (_res == NULL)
+ return NULL;
+ Py_INCREF(listDefFunc);
+ ((ListObject*)_res)->ob_ldef_func = listDefFunc;
+ return _res;
}
static PyObject *List_LNew(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ListHandle _rv;
- Rect rView;
- Rect dataBounds;
- Point cSize;
- short theProc;
- WindowPtr theWindow;
- Boolean drawIt;
- Boolean hasGrow;
- Boolean scrollHoriz;
- Boolean scrollVert;
- if (!PyArg_ParseTuple(_args, "O&O&O&hO&bbbb",
- PyMac_GetRect, &rView,
- PyMac_GetRect, &dataBounds,
- PyMac_GetPoint, &cSize,
- &theProc,
- WinObj_Convert, &theWindow,
- &drawIt,
- &hasGrow,
- &scrollHoriz,
- &scrollVert))
- return NULL;
- _rv = LNew(&rView,
- &dataBounds,
- cSize,
- theProc,
- theWindow,
- drawIt,
- hasGrow,
- scrollHoriz,
- scrollVert);
- _res = Py_BuildValue("O&",
- ListObj_New, _rv);
- return _res;
+ PyObject *_res = NULL;
+ ListHandle _rv;
+ Rect rView;
+ Rect dataBounds;
+ Point cSize;
+ short theProc;
+ WindowPtr theWindow;
+ Boolean drawIt;
+ Boolean hasGrow;
+ Boolean scrollHoriz;
+ Boolean scrollVert;
+ if (!PyArg_ParseTuple(_args, "O&O&O&hO&bbbb",
+ PyMac_GetRect, &rView,
+ PyMac_GetRect, &dataBounds,
+ PyMac_GetPoint, &cSize,
+ &theProc,
+ WinObj_Convert, &theWindow,
+ &drawIt,
+ &hasGrow,
+ &scrollHoriz,
+ &scrollVert))
+ return NULL;
+ _rv = LNew(&rView,
+ &dataBounds,
+ cSize,
+ theProc,
+ theWindow,
+ drawIt,
+ hasGrow,
+ scrollHoriz,
+ scrollVert);
+ _res = Py_BuildValue("O&",
+ ListObj_New, _rv);
+ return _res;
}
static PyObject *List_SetListViewBounds(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ListHandle list;
- Rect view;
- if (!PyArg_ParseTuple(_args, "O&O&",
- ListObj_Convert, &list,
- PyMac_GetRect, &view))
- return NULL;
- SetListViewBounds(list,
- &view);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ ListHandle list;
+ Rect view;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ ListObj_Convert, &list,
+ PyMac_GetRect, &view))
+ return NULL;
+ SetListViewBounds(list,
+ &view);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *List_SetListPort(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ListHandle list;
- CGrafPtr port;
- if (!PyArg_ParseTuple(_args, "O&O&",
- ListObj_Convert, &list,
- GrafObj_Convert, &port))
- return NULL;
- SetListPort(list,
- port);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ ListHandle list;
+ CGrafPtr port;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ ListObj_Convert, &list,
+ GrafObj_Convert, &port))
+ return NULL;
+ SetListPort(list,
+ port);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *List_SetListCellIndent(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ListHandle list;
- Point indent;
- if (!PyArg_ParseTuple(_args, "O&O&",
- ListObj_Convert, &list,
- PyMac_GetPoint, &indent))
- return NULL;
- SetListCellIndent(list,
- &indent);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ ListHandle list;
+ Point indent;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ ListObj_Convert, &list,
+ PyMac_GetPoint, &indent))
+ return NULL;
+ SetListCellIndent(list,
+ &indent);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *List_SetListClickTime(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ListHandle list;
- SInt32 time;
- if (!PyArg_ParseTuple(_args, "O&l",
- ListObj_Convert, &list,
- &time))
- return NULL;
- SetListClickTime(list,
- time);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ ListHandle list;
+ SInt32 time;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ ListObj_Convert, &list,
+ &time))
+ return NULL;
+ SetListClickTime(list,
+ time);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *List_SetListRefCon(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ListHandle list;
- SInt32 refCon;
- if (!PyArg_ParseTuple(_args, "O&l",
- ListObj_Convert, &list,
- &refCon))
- return NULL;
- SetListRefCon(list,
- refCon);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ ListHandle list;
+ SInt32 refCon;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ ListObj_Convert, &list,
+ &refCon))
+ return NULL;
+ SetListRefCon(list,
+ refCon);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *List_SetListUserHandle(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ListHandle list;
- Handle userHandle;
- if (!PyArg_ParseTuple(_args, "O&O&",
- ListObj_Convert, &list,
- ResObj_Convert, &userHandle))
- return NULL;
- SetListUserHandle(list,
- userHandle);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ ListHandle list;
+ Handle userHandle;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ ListObj_Convert, &list,
+ ResObj_Convert, &userHandle))
+ return NULL;
+ SetListUserHandle(list,
+ userHandle);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *List_SetListFlags(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ListHandle list;
- OptionBits listFlags;
- if (!PyArg_ParseTuple(_args, "O&l",
- ListObj_Convert, &list,
- &listFlags))
- return NULL;
- SetListFlags(list,
- listFlags);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ ListHandle list;
+ OptionBits listFlags;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ ListObj_Convert, &list,
+ &listFlags))
+ return NULL;
+ SetListFlags(list,
+ listFlags);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *List_SetListSelectionFlags(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ListHandle list;
- OptionBits selectionFlags;
- if (!PyArg_ParseTuple(_args, "O&l",
- ListObj_Convert, &list,
- &selectionFlags))
- return NULL;
- SetListSelectionFlags(list,
- selectionFlags);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ ListHandle list;
+ OptionBits selectionFlags;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ ListObj_Convert, &list,
+ &selectionFlags))
+ return NULL;
+ SetListSelectionFlags(list,
+ selectionFlags);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *List_as_List(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
- Handle h;
- ListObject *l;
- if (!PyArg_ParseTuple(_args, "O&", ResObj_Convert, &h))
- return NULL;
- l = (ListObject *)ListObj_New(as_List(h));
- l->ob_must_be_disposed = 0;
- _res = Py_BuildValue("O", l);
- return _res;
+ Handle h;
+ ListObject *l;
+ if (!PyArg_ParseTuple(_args, "O&", ResObj_Convert, &h))
+ return NULL;
+ l = (ListObject *)ListObj_New(as_List(h));
+ l->ob_must_be_disposed = 0;
+ _res = Py_BuildValue("O", l);
+ return _res;
}
#endif /* __LP64__ */
static PyMethodDef List_methods[] = {
#ifndef __LP64__
- {"CreateCustomList", (PyCFunction)List_CreateCustomList, 1,
- PyDoc_STR("(Rect rView, Rect dataBounds, Point cellSize, ListDefSpec theSpec, WindowPtr theWindow, Boolean drawIt, Boolean hasGrow, Boolean scrollHoriz, Boolean scrollVert) -> (ListHandle outList)")},
- {"LNew", (PyCFunction)List_LNew, 1,
- PyDoc_STR("(Rect rView, Rect dataBounds, Point cSize, short theProc, WindowPtr theWindow, Boolean drawIt, Boolean hasGrow, Boolean scrollHoriz, Boolean scrollVert) -> (ListHandle _rv)")},
- {"SetListViewBounds", (PyCFunction)List_SetListViewBounds, 1,
- PyDoc_STR("(ListHandle list, Rect view) -> None")},
- {"SetListPort", (PyCFunction)List_SetListPort, 1,
- PyDoc_STR("(ListHandle list, CGrafPtr port) -> None")},
- {"SetListCellIndent", (PyCFunction)List_SetListCellIndent, 1,
- PyDoc_STR("(ListHandle list, Point indent) -> None")},
- {"SetListClickTime", (PyCFunction)List_SetListClickTime, 1,
- PyDoc_STR("(ListHandle list, SInt32 time) -> None")},
- {"SetListRefCon", (PyCFunction)List_SetListRefCon, 1,
- PyDoc_STR("(ListHandle list, SInt32 refCon) -> None")},
- {"SetListUserHandle", (PyCFunction)List_SetListUserHandle, 1,
- PyDoc_STR("(ListHandle list, Handle userHandle) -> None")},
- {"SetListFlags", (PyCFunction)List_SetListFlags, 1,
- PyDoc_STR("(ListHandle list, OptionBits listFlags) -> None")},
- {"SetListSelectionFlags", (PyCFunction)List_SetListSelectionFlags, 1,
- PyDoc_STR("(ListHandle list, OptionBits selectionFlags) -> None")},
- {"as_List", (PyCFunction)List_as_List, 1,
- PyDoc_STR("(Resource)->List.\nReturns List object (which is not auto-freed!)")},
+ {"CreateCustomList", (PyCFunction)List_CreateCustomList, 1,
+ PyDoc_STR("(Rect rView, Rect dataBounds, Point cellSize, ListDefSpec theSpec, WindowPtr theWindow, Boolean drawIt, Boolean hasGrow, Boolean scrollHoriz, Boolean scrollVert) -> (ListHandle outList)")},
+ {"LNew", (PyCFunction)List_LNew, 1,
+ PyDoc_STR("(Rect rView, Rect dataBounds, Point cSize, short theProc, WindowPtr theWindow, Boolean drawIt, Boolean hasGrow, Boolean scrollHoriz, Boolean scrollVert) -> (ListHandle _rv)")},
+ {"SetListViewBounds", (PyCFunction)List_SetListViewBounds, 1,
+ PyDoc_STR("(ListHandle list, Rect view) -> None")},
+ {"SetListPort", (PyCFunction)List_SetListPort, 1,
+ PyDoc_STR("(ListHandle list, CGrafPtr port) -> None")},
+ {"SetListCellIndent", (PyCFunction)List_SetListCellIndent, 1,
+ PyDoc_STR("(ListHandle list, Point indent) -> None")},
+ {"SetListClickTime", (PyCFunction)List_SetListClickTime, 1,
+ PyDoc_STR("(ListHandle list, SInt32 time) -> None")},
+ {"SetListRefCon", (PyCFunction)List_SetListRefCon, 1,
+ PyDoc_STR("(ListHandle list, SInt32 refCon) -> None")},
+ {"SetListUserHandle", (PyCFunction)List_SetListUserHandle, 1,
+ PyDoc_STR("(ListHandle list, Handle userHandle) -> None")},
+ {"SetListFlags", (PyCFunction)List_SetListFlags, 1,
+ PyDoc_STR("(ListHandle list, OptionBits listFlags) -> None")},
+ {"SetListSelectionFlags", (PyCFunction)List_SetListSelectionFlags, 1,
+ PyDoc_STR("(ListHandle list, OptionBits selectionFlags) -> None")},
+ {"as_List", (PyCFunction)List_as_List, 1,
+ PyDoc_STR("(Resource)->List.\nReturns List object (which is not auto-freed!)")},
#endif /* __LP64__ */
- {NULL, NULL, 0}
+ {NULL, NULL, 0}
};
#ifndef __LP64__
@@ -1074,65 +1074,65 @@ static void myListDefFunction(SInt16 message,
SInt16 dataLen,
ListHandle theList)
{
- PyObject *listDefFunc, *args, *rv=NULL;
- ListObject *self;
-
- self = (ListObject*)GetListRefCon(theList);
- if (self == NULL || self->ob_itself != theList)
- return; /* nothing we can do */
- listDefFunc = self->ob_ldef_func;
- if (listDefFunc == NULL)
- return; /* nothing we can do */
- args = Py_BuildValue("hbO&O&hhO", message,
- selected,
- PyMac_BuildRect, cellRect,
- PyMac_BuildPoint, theCell,
- dataOffset,
- dataLen,
- self);
- if (args != NULL) {
- rv = PyEval_CallObject(listDefFunc, args);
- Py_DECREF(args);
- }
- if (rv == NULL) {
- PySys_WriteStderr("error in list definition callback:\n");
- PyErr_Print();
- } else {
- Py_DECREF(rv);
- }
+ PyObject *listDefFunc, *args, *rv=NULL;
+ ListObject *self;
+
+ self = (ListObject*)GetListRefCon(theList);
+ if (self == NULL || self->ob_itself != theList)
+ return; /* nothing we can do */
+ listDefFunc = self->ob_ldef_func;
+ if (listDefFunc == NULL)
+ return; /* nothing we can do */
+ args = Py_BuildValue("hbO&O&hhO", message,
+ selected,
+ PyMac_BuildRect, cellRect,
+ PyMac_BuildPoint, theCell,
+ dataOffset,
+ dataLen,
+ self);
+ if (args != NULL) {
+ rv = PyEval_CallObject(listDefFunc, args);
+ Py_DECREF(args);
+ }
+ if (rv == NULL) {
+ PySys_WriteStderr("error in list definition callback:\n");
+ PyErr_Print();
+ } else {
+ Py_DECREF(rv);
+ }
}
#endif /* __LP64__ */
void init_List(void)
{
- PyObject *m;
+ PyObject *m;
#ifndef __LP64__
- PyObject *d;
+ PyObject *d;
- myListDefFunctionUPP = NewListDefUPP((ListDefProcPtr)myListDefFunction);
+ myListDefFunctionUPP = NewListDefUPP((ListDefProcPtr)myListDefFunction);
- PyMac_INIT_TOOLBOX_OBJECT_NEW(ListHandle, ListObj_New);
- PyMac_INIT_TOOLBOX_OBJECT_CONVERT(ListHandle, ListObj_Convert);
+ PyMac_INIT_TOOLBOX_OBJECT_NEW(ListHandle, ListObj_New);
+ PyMac_INIT_TOOLBOX_OBJECT_CONVERT(ListHandle, ListObj_Convert);
#endif /* __LP64__ */
- m = Py_InitModule("_List", List_methods);
+ m = Py_InitModule("_List", List_methods);
#ifndef __LP64__
- d = PyModule_GetDict(m);
- List_Error = PyMac_GetOSErrException();
- if (List_Error == NULL ||
- PyDict_SetItemString(d, "Error", List_Error) != 0)
- return;
- List_Type.ob_type = &PyType_Type;
- if (PyType_Ready(&List_Type) < 0) return;
- Py_INCREF(&List_Type);
- PyModule_AddObject(m, "List", (PyObject *)&List_Type);
- /* Backward-compatible name */
- Py_INCREF(&List_Type);
- PyModule_AddObject(m, "ListType", (PyObject *)&List_Type);
+ d = PyModule_GetDict(m);
+ List_Error = PyMac_GetOSErrException();
+ if (List_Error == NULL ||
+ PyDict_SetItemString(d, "Error", List_Error) != 0)
+ return;
+ List_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&List_Type) < 0) return;
+ Py_INCREF(&List_Type);
+ PyModule_AddObject(m, "List", (PyObject *)&List_Type);
+ /* Backward-compatible name */
+ Py_INCREF(&List_Type);
+ PyModule_AddObject(m, "ListType", (PyObject *)&List_Type);
#endif /* __LP64__ */
}
diff --git a/Mac/Modules/menu/_Menumodule.c b/Mac/Modules/menu/_Menumodule.c
index 66ebf79..dbb075c 100644
--- a/Mac/Modules/menu/_Menumodule.c
+++ b/Mac/Modules/menu/_Menumodule.c
@@ -10,9 +10,9 @@
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
- PyErr_SetString(PyExc_NotImplementedError, \
- "Not available in this shared library/OS version"); \
- return NULL; \
+ PyErr_SetString(PyExc_NotImplementedError, \
+ "Not available in this shared library/OS version"); \
+ return NULL; \
}} while(0)
@@ -35,21 +35,21 @@ extern int _MenuObj_Convert(PyObject *, MenuHandle *);
/* Alternative version of MenuObj_New, which returns None for NULL argument */
PyObject *OptMenuObj_New(MenuRef itself)
{
- if (itself == NULL) {
- Py_INCREF(Py_None);
- return Py_None;
- }
- return MenuObj_New(itself);
+ if (itself == NULL) {
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
+ return MenuObj_New(itself);
}
/* Alternative version of MenuObj_Convert, which returns NULL for a None argument */
int OptMenuObj_Convert(PyObject *v, MenuRef *p_itself)
{
- if ( v == Py_None ) {
- *p_itself = NULL;
- return 1;
- }
- return MenuObj_Convert(v, p_itself);
+ if ( v == Py_None ) {
+ *p_itself = NULL;
+ return 1;
+ }
+ return MenuObj_Convert(v, p_itself);
}
static PyObject *Menu_Error;
@@ -61,2469 +61,2469 @@ PyTypeObject Menu_Type;
#define MenuObj_Check(x) ((x)->ob_type == &Menu_Type || PyObject_TypeCheck((x), &Menu_Type))
typedef struct MenuObject {
- PyObject_HEAD
- MenuHandle ob_itself;
+ PyObject_HEAD
+ MenuHandle ob_itself;
} MenuObject;
PyObject *MenuObj_New(MenuHandle itself)
{
- MenuObject *it;
- it = PyObject_NEW(MenuObject, &Menu_Type);
- if (it == NULL) return NULL;
- it->ob_itself = itself;
- return (PyObject *)it;
+ MenuObject *it;
+ it = PyObject_NEW(MenuObject, &Menu_Type);
+ if (it == NULL) return NULL;
+ it->ob_itself = itself;
+ return (PyObject *)it;
}
int MenuObj_Convert(PyObject *v, MenuHandle *p_itself)
{
- if (!MenuObj_Check(v))
- {
- PyErr_SetString(PyExc_TypeError, "Menu required");
- return 0;
- }
- *p_itself = ((MenuObject *)v)->ob_itself;
- return 1;
+ if (!MenuObj_Check(v))
+ {
+ PyErr_SetString(PyExc_TypeError, "Menu required");
+ return 0;
+ }
+ *p_itself = ((MenuObject *)v)->ob_itself;
+ return 1;
}
static void MenuObj_dealloc(MenuObject *self)
{
- /* Cleanup of self->ob_itself goes here */
- self->ob_type->tp_free((PyObject *)self);
+ /* Cleanup of self->ob_itself goes here */
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *MenuObj_DisposeMenu(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef DisposeMenu
- PyMac_PRECHECK(DisposeMenu);
+ PyMac_PRECHECK(DisposeMenu);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- DisposeMenu(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ DisposeMenu(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MenuObj_CalcMenuSize(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef CalcMenuSize
- PyMac_PRECHECK(CalcMenuSize);
+ PyMac_PRECHECK(CalcMenuSize);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- CalcMenuSize(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ CalcMenuSize(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MenuObj_CountMenuItems(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- UInt16 _rv;
+ PyObject *_res = NULL;
+ UInt16 _rv;
#ifndef CountMenuItems
- PyMac_PRECHECK(CountMenuItems);
+ PyMac_PRECHECK(CountMenuItems);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = CountMenuItems(_self->ob_itself);
- _res = Py_BuildValue("H",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = CountMenuItems(_self->ob_itself);
+ _res = Py_BuildValue("H",
+ _rv);
+ return _res;
}
static PyObject *MenuObj_GetMenuFont(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- SInt16 outFontID;
- UInt16 outFontSize;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ SInt16 outFontID;
+ UInt16 outFontSize;
#ifndef GetMenuFont
- PyMac_PRECHECK(GetMenuFont);
+ PyMac_PRECHECK(GetMenuFont);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetMenuFont(_self->ob_itself,
- &outFontID,
- &outFontSize);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("hH",
- outFontID,
- outFontSize);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetMenuFont(_self->ob_itself,
+ &outFontID,
+ &outFontSize);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("hH",
+ outFontID,
+ outFontSize);
+ return _res;
}
static PyObject *MenuObj_SetMenuFont(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- SInt16 inFontID;
- UInt16 inFontSize;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ SInt16 inFontID;
+ UInt16 inFontSize;
#ifndef SetMenuFont
- PyMac_PRECHECK(SetMenuFont);
+ PyMac_PRECHECK(SetMenuFont);
#endif
- if (!PyArg_ParseTuple(_args, "hH",
- &inFontID,
- &inFontSize))
- return NULL;
- _err = SetMenuFont(_self->ob_itself,
- inFontID,
- inFontSize);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "hH",
+ &inFontID,
+ &inFontSize))
+ return NULL;
+ _err = SetMenuFont(_self->ob_itself,
+ inFontID,
+ inFontSize);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MenuObj_GetMenuExcludesMarkColumn(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
+ PyObject *_res = NULL;
+ Boolean _rv;
#ifndef GetMenuExcludesMarkColumn
- PyMac_PRECHECK(GetMenuExcludesMarkColumn);
+ PyMac_PRECHECK(GetMenuExcludesMarkColumn);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetMenuExcludesMarkColumn(_self->ob_itself);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetMenuExcludesMarkColumn(_self->ob_itself);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *MenuObj_SetMenuExcludesMarkColumn(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- Boolean excludesMark;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Boolean excludesMark;
#ifndef SetMenuExcludesMarkColumn
- PyMac_PRECHECK(SetMenuExcludesMarkColumn);
+ PyMac_PRECHECK(SetMenuExcludesMarkColumn);
#endif
- if (!PyArg_ParseTuple(_args, "b",
- &excludesMark))
- return NULL;
- _err = SetMenuExcludesMarkColumn(_self->ob_itself,
- excludesMark);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "b",
+ &excludesMark))
+ return NULL;
+ _err = SetMenuExcludesMarkColumn(_self->ob_itself,
+ excludesMark);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MenuObj_IsValidMenu(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
+ PyObject *_res = NULL;
+ Boolean _rv;
#ifndef IsValidMenu
- PyMac_PRECHECK(IsValidMenu);
+ PyMac_PRECHECK(IsValidMenu);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = IsValidMenu(_self->ob_itself);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = IsValidMenu(_self->ob_itself);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *MenuObj_GetMenuRetainCount(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ItemCount _rv;
+ PyObject *_res = NULL;
+ ItemCount _rv;
#ifndef GetMenuRetainCount
- PyMac_PRECHECK(GetMenuRetainCount);
+ PyMac_PRECHECK(GetMenuRetainCount);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetMenuRetainCount(_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetMenuRetainCount(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *MenuObj_RetainMenu(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
+ PyObject *_res = NULL;
+ OSStatus _err;
#ifndef RetainMenu
- PyMac_PRECHECK(RetainMenu);
+ PyMac_PRECHECK(RetainMenu);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = RetainMenu(_self->ob_itself);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = RetainMenu(_self->ob_itself);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MenuObj_ReleaseMenu(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
+ PyObject *_res = NULL;
+ OSStatus _err;
#ifndef ReleaseMenu
- PyMac_PRECHECK(ReleaseMenu);
+ PyMac_PRECHECK(ReleaseMenu);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = ReleaseMenu(_self->ob_itself);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = ReleaseMenu(_self->ob_itself);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MenuObj_DuplicateMenu(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- MenuHandle outMenu;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ MenuHandle outMenu;
#ifndef DuplicateMenu
- PyMac_PRECHECK(DuplicateMenu);
+ PyMac_PRECHECK(DuplicateMenu);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = DuplicateMenu(_self->ob_itself,
- &outMenu);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- MenuObj_New, outMenu);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = DuplicateMenu(_self->ob_itself,
+ &outMenu);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ MenuObj_New, outMenu);
+ return _res;
}
static PyObject *MenuObj_CopyMenuTitleAsCFString(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- CFStringRef outString;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ CFStringRef outString;
#ifndef CopyMenuTitleAsCFString
- PyMac_PRECHECK(CopyMenuTitleAsCFString);
+ PyMac_PRECHECK(CopyMenuTitleAsCFString);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = CopyMenuTitleAsCFString(_self->ob_itself,
- &outString);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- CFStringRefObj_New, outString);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = CopyMenuTitleAsCFString(_self->ob_itself,
+ &outString);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ CFStringRefObj_New, outString);
+ return _res;
}
static PyObject *MenuObj_SetMenuTitleWithCFString(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- CFStringRef inString;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ CFStringRef inString;
#ifndef SetMenuTitleWithCFString
- PyMac_PRECHECK(SetMenuTitleWithCFString);
+ PyMac_PRECHECK(SetMenuTitleWithCFString);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CFStringRefObj_Convert, &inString))
- return NULL;
- _err = SetMenuTitleWithCFString(_self->ob_itself,
- inString);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CFStringRefObj_Convert, &inString))
+ return NULL;
+ _err = SetMenuTitleWithCFString(_self->ob_itself,
+ inString);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MenuObj_InvalidateMenuSize(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
+ PyObject *_res = NULL;
+ OSStatus _err;
#ifndef InvalidateMenuSize
- PyMac_PRECHECK(InvalidateMenuSize);
+ PyMac_PRECHECK(InvalidateMenuSize);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = InvalidateMenuSize(_self->ob_itself);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = InvalidateMenuSize(_self->ob_itself);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MenuObj_IsMenuSizeInvalid(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
+ PyObject *_res = NULL;
+ Boolean _rv;
#ifndef IsMenuSizeInvalid
- PyMac_PRECHECK(IsMenuSizeInvalid);
+ PyMac_PRECHECK(IsMenuSizeInvalid);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = IsMenuSizeInvalid(_self->ob_itself);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = IsMenuSizeInvalid(_self->ob_itself);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *MenuObj_MacAppendMenu(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Str255 data;
+ PyObject *_res = NULL;
+ Str255 data;
#ifndef MacAppendMenu
- PyMac_PRECHECK(MacAppendMenu);
+ PyMac_PRECHECK(MacAppendMenu);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetStr255, data))
- return NULL;
- MacAppendMenu(_self->ob_itself,
- data);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetStr255, data))
+ return NULL;
+ MacAppendMenu(_self->ob_itself,
+ data);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MenuObj_InsertResMenu(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ResType theType;
- short afterItem;
+ PyObject *_res = NULL;
+ ResType theType;
+ short afterItem;
#ifndef InsertResMenu
- PyMac_PRECHECK(InsertResMenu);
+ PyMac_PRECHECK(InsertResMenu);
#endif
- if (!PyArg_ParseTuple(_args, "O&h",
- PyMac_GetOSType, &theType,
- &afterItem))
- return NULL;
- InsertResMenu(_self->ob_itself,
- theType,
- afterItem);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&h",
+ PyMac_GetOSType, &theType,
+ &afterItem))
+ return NULL;
+ InsertResMenu(_self->ob_itself,
+ theType,
+ afterItem);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MenuObj_AppendResMenu(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ResType theType;
+ PyObject *_res = NULL;
+ ResType theType;
#ifndef AppendResMenu
- PyMac_PRECHECK(AppendResMenu);
+ PyMac_PRECHECK(AppendResMenu);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetOSType, &theType))
- return NULL;
- AppendResMenu(_self->ob_itself,
- theType);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetOSType, &theType))
+ return NULL;
+ AppendResMenu(_self->ob_itself,
+ theType);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MenuObj_MacInsertMenuItem(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Str255 itemString;
- short afterItem;
+ PyObject *_res = NULL;
+ Str255 itemString;
+ short afterItem;
#ifndef MacInsertMenuItem
- PyMac_PRECHECK(MacInsertMenuItem);
+ PyMac_PRECHECK(MacInsertMenuItem);
#endif
- if (!PyArg_ParseTuple(_args, "O&h",
- PyMac_GetStr255, itemString,
- &afterItem))
- return NULL;
- MacInsertMenuItem(_self->ob_itself,
- itemString,
- afterItem);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&h",
+ PyMac_GetStr255, itemString,
+ &afterItem))
+ return NULL;
+ MacInsertMenuItem(_self->ob_itself,
+ itemString,
+ afterItem);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MenuObj_DeleteMenuItem(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short item;
+ PyObject *_res = NULL;
+ short item;
#ifndef DeleteMenuItem
- PyMac_PRECHECK(DeleteMenuItem);
+ PyMac_PRECHECK(DeleteMenuItem);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &item))
- return NULL;
- DeleteMenuItem(_self->ob_itself,
- item);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &item))
+ return NULL;
+ DeleteMenuItem(_self->ob_itself,
+ item);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MenuObj_InsertFontResMenu(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short afterItem;
- short scriptFilter;
+ PyObject *_res = NULL;
+ short afterItem;
+ short scriptFilter;
#ifndef InsertFontResMenu
- PyMac_PRECHECK(InsertFontResMenu);
+ PyMac_PRECHECK(InsertFontResMenu);
#endif
- if (!PyArg_ParseTuple(_args, "hh",
- &afterItem,
- &scriptFilter))
- return NULL;
- InsertFontResMenu(_self->ob_itself,
- afterItem,
- scriptFilter);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "hh",
+ &afterItem,
+ &scriptFilter))
+ return NULL;
+ InsertFontResMenu(_self->ob_itself,
+ afterItem,
+ scriptFilter);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MenuObj_InsertIntlResMenu(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ResType theType;
- short afterItem;
- short scriptFilter;
+ PyObject *_res = NULL;
+ ResType theType;
+ short afterItem;
+ short scriptFilter;
#ifndef InsertIntlResMenu
- PyMac_PRECHECK(InsertIntlResMenu);
-#endif
- if (!PyArg_ParseTuple(_args, "O&hh",
- PyMac_GetOSType, &theType,
- &afterItem,
- &scriptFilter))
- return NULL;
- InsertIntlResMenu(_self->ob_itself,
- theType,
- afterItem,
- scriptFilter);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(InsertIntlResMenu);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&hh",
+ PyMac_GetOSType, &theType,
+ &afterItem,
+ &scriptFilter))
+ return NULL;
+ InsertIntlResMenu(_self->ob_itself,
+ theType,
+ afterItem,
+ scriptFilter);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MenuObj_AppendMenuItemText(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- Str255 inString;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Str255 inString;
#ifndef AppendMenuItemText
- PyMac_PRECHECK(AppendMenuItemText);
+ PyMac_PRECHECK(AppendMenuItemText);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetStr255, inString))
- return NULL;
- _err = AppendMenuItemText(_self->ob_itself,
- inString);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetStr255, inString))
+ return NULL;
+ _err = AppendMenuItemText(_self->ob_itself,
+ inString);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MenuObj_InsertMenuItemText(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- Str255 inString;
- MenuItemIndex afterItem;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Str255 inString;
+ MenuItemIndex afterItem;
#ifndef InsertMenuItemText
- PyMac_PRECHECK(InsertMenuItemText);
+ PyMac_PRECHECK(InsertMenuItemText);
#endif
- if (!PyArg_ParseTuple(_args, "O&h",
- PyMac_GetStr255, inString,
- &afterItem))
- return NULL;
- _err = InsertMenuItemText(_self->ob_itself,
- inString,
- afterItem);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&h",
+ PyMac_GetStr255, inString,
+ &afterItem))
+ return NULL;
+ _err = InsertMenuItemText(_self->ob_itself,
+ inString,
+ afterItem);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MenuObj_CopyMenuItems(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- MenuItemIndex inFirstItem;
- ItemCount inNumItems;
- MenuHandle inDestMenu;
- MenuItemIndex inInsertAfter;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ MenuItemIndex inFirstItem;
+ ItemCount inNumItems;
+ MenuHandle inDestMenu;
+ MenuItemIndex inInsertAfter;
#ifndef CopyMenuItems
- PyMac_PRECHECK(CopyMenuItems);
-#endif
- if (!PyArg_ParseTuple(_args, "hlO&h",
- &inFirstItem,
- &inNumItems,
- MenuObj_Convert, &inDestMenu,
- &inInsertAfter))
- return NULL;
- _err = CopyMenuItems(_self->ob_itself,
- inFirstItem,
- inNumItems,
- inDestMenu,
- inInsertAfter);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(CopyMenuItems);
+#endif
+ if (!PyArg_ParseTuple(_args, "hlO&h",
+ &inFirstItem,
+ &inNumItems,
+ MenuObj_Convert, &inDestMenu,
+ &inInsertAfter))
+ return NULL;
+ _err = CopyMenuItems(_self->ob_itself,
+ inFirstItem,
+ inNumItems,
+ inDestMenu,
+ inInsertAfter);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MenuObj_DeleteMenuItems(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- MenuItemIndex inFirstItem;
- ItemCount inNumItems;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ MenuItemIndex inFirstItem;
+ ItemCount inNumItems;
#ifndef DeleteMenuItems
- PyMac_PRECHECK(DeleteMenuItems);
+ PyMac_PRECHECK(DeleteMenuItems);
#endif
- if (!PyArg_ParseTuple(_args, "hl",
- &inFirstItem,
- &inNumItems))
- return NULL;
- _err = DeleteMenuItems(_self->ob_itself,
- inFirstItem,
- inNumItems);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "hl",
+ &inFirstItem,
+ &inNumItems))
+ return NULL;
+ _err = DeleteMenuItems(_self->ob_itself,
+ inFirstItem,
+ inNumItems);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MenuObj_AppendMenuItemTextWithCFString(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- CFStringRef inString;
- MenuItemAttributes inAttributes;
- MenuCommand inCommandID;
- MenuItemIndex outNewItem;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ CFStringRef inString;
+ MenuItemAttributes inAttributes;
+ MenuCommand inCommandID;
+ MenuItemIndex outNewItem;
#ifndef AppendMenuItemTextWithCFString
- PyMac_PRECHECK(AppendMenuItemTextWithCFString);
-#endif
- if (!PyArg_ParseTuple(_args, "O&ll",
- CFStringRefObj_Convert, &inString,
- &inAttributes,
- &inCommandID))
- return NULL;
- _err = AppendMenuItemTextWithCFString(_self->ob_itself,
- inString,
- inAttributes,
- inCommandID,
- &outNewItem);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("h",
- outNewItem);
- return _res;
+ PyMac_PRECHECK(AppendMenuItemTextWithCFString);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&ll",
+ CFStringRefObj_Convert, &inString,
+ &inAttributes,
+ &inCommandID))
+ return NULL;
+ _err = AppendMenuItemTextWithCFString(_self->ob_itself,
+ inString,
+ inAttributes,
+ inCommandID,
+ &outNewItem);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("h",
+ outNewItem);
+ return _res;
}
static PyObject *MenuObj_InsertMenuItemTextWithCFString(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- CFStringRef inString;
- MenuItemIndex inAfterItem;
- MenuItemAttributes inAttributes;
- MenuCommand inCommandID;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ CFStringRef inString;
+ MenuItemIndex inAfterItem;
+ MenuItemAttributes inAttributes;
+ MenuCommand inCommandID;
#ifndef InsertMenuItemTextWithCFString
- PyMac_PRECHECK(InsertMenuItemTextWithCFString);
-#endif
- if (!PyArg_ParseTuple(_args, "O&hll",
- CFStringRefObj_Convert, &inString,
- &inAfterItem,
- &inAttributes,
- &inCommandID))
- return NULL;
- _err = InsertMenuItemTextWithCFString(_self->ob_itself,
- inString,
- inAfterItem,
- inAttributes,
- inCommandID);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(InsertMenuItemTextWithCFString);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&hll",
+ CFStringRefObj_Convert, &inString,
+ &inAfterItem,
+ &inAttributes,
+ &inCommandID))
+ return NULL;
+ _err = InsertMenuItemTextWithCFString(_self->ob_itself,
+ inString,
+ inAfterItem,
+ inAttributes,
+ inCommandID);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MenuObj_PopUpMenuSelect(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- long _rv;
- short top;
- short left;
- short popUpItem;
+ PyObject *_res = NULL;
+ long _rv;
+ short top;
+ short left;
+ short popUpItem;
#ifndef PopUpMenuSelect
- PyMac_PRECHECK(PopUpMenuSelect);
-#endif
- if (!PyArg_ParseTuple(_args, "hhh",
- &top,
- &left,
- &popUpItem))
- return NULL;
- _rv = PopUpMenuSelect(_self->ob_itself,
- top,
- left,
- popUpItem);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyMac_PRECHECK(PopUpMenuSelect);
+#endif
+ if (!PyArg_ParseTuple(_args, "hhh",
+ &top,
+ &left,
+ &popUpItem))
+ return NULL;
+ _rv = PopUpMenuSelect(_self->ob_itself,
+ top,
+ left,
+ popUpItem);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *MenuObj_InvalidateMenuEnabling(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
+ PyObject *_res = NULL;
+ OSStatus _err;
#ifndef InvalidateMenuEnabling
- PyMac_PRECHECK(InvalidateMenuEnabling);
+ PyMac_PRECHECK(InvalidateMenuEnabling);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = InvalidateMenuEnabling(_self->ob_itself);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = InvalidateMenuEnabling(_self->ob_itself);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MenuObj_IsMenuBarInvalid(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
+ PyObject *_res = NULL;
+ Boolean _rv;
#ifndef IsMenuBarInvalid
- PyMac_PRECHECK(IsMenuBarInvalid);
+ PyMac_PRECHECK(IsMenuBarInvalid);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = IsMenuBarInvalid(_self->ob_itself);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = IsMenuBarInvalid(_self->ob_itself);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *MenuObj_MacInsertMenu(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- MenuID beforeID;
+ PyObject *_res = NULL;
+ MenuID beforeID;
#ifndef MacInsertMenu
- PyMac_PRECHECK(MacInsertMenu);
+ PyMac_PRECHECK(MacInsertMenu);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &beforeID))
- return NULL;
- MacInsertMenu(_self->ob_itself,
- beforeID);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &beforeID))
+ return NULL;
+ MacInsertMenu(_self->ob_itself,
+ beforeID);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MenuObj_SetRootMenu(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
+ PyObject *_res = NULL;
+ OSStatus _err;
#ifndef SetRootMenu
- PyMac_PRECHECK(SetRootMenu);
+ PyMac_PRECHECK(SetRootMenu);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = SetRootMenu(_self->ob_itself);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = SetRootMenu(_self->ob_itself);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MenuObj_MacCheckMenuItem(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short item;
- Boolean checked;
+ PyObject *_res = NULL;
+ short item;
+ Boolean checked;
#ifndef MacCheckMenuItem
- PyMac_PRECHECK(MacCheckMenuItem);
+ PyMac_PRECHECK(MacCheckMenuItem);
#endif
- if (!PyArg_ParseTuple(_args, "hb",
- &item,
- &checked))
- return NULL;
- MacCheckMenuItem(_self->ob_itself,
- item,
- checked);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "hb",
+ &item,
+ &checked))
+ return NULL;
+ MacCheckMenuItem(_self->ob_itself,
+ item,
+ checked);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MenuObj_SetMenuItemText(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short item;
- Str255 itemString;
+ PyObject *_res = NULL;
+ short item;
+ Str255 itemString;
#ifndef SetMenuItemText
- PyMac_PRECHECK(SetMenuItemText);
+ PyMac_PRECHECK(SetMenuItemText);
#endif
- if (!PyArg_ParseTuple(_args, "hO&",
- &item,
- PyMac_GetStr255, itemString))
- return NULL;
- SetMenuItemText(_self->ob_itself,
- item,
- itemString);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "hO&",
+ &item,
+ PyMac_GetStr255, itemString))
+ return NULL;
+ SetMenuItemText(_self->ob_itself,
+ item,
+ itemString);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MenuObj_GetMenuItemText(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short item;
- Str255 itemString;
+ PyObject *_res = NULL;
+ short item;
+ Str255 itemString;
#ifndef GetMenuItemText
- PyMac_PRECHECK(GetMenuItemText);
+ PyMac_PRECHECK(GetMenuItemText);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &item))
- return NULL;
- GetMenuItemText(_self->ob_itself,
- item,
- itemString);
- _res = Py_BuildValue("O&",
- PyMac_BuildStr255, itemString);
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &item))
+ return NULL;
+ GetMenuItemText(_self->ob_itself,
+ item,
+ itemString);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildStr255, itemString);
+ return _res;
}
static PyObject *MenuObj_SetItemMark(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short item;
- CharParameter markChar;
+ PyObject *_res = NULL;
+ short item;
+ CharParameter markChar;
#ifndef SetItemMark
- PyMac_PRECHECK(SetItemMark);
+ PyMac_PRECHECK(SetItemMark);
#endif
- if (!PyArg_ParseTuple(_args, "hh",
- &item,
- &markChar))
- return NULL;
- SetItemMark(_self->ob_itself,
- item,
- markChar);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "hh",
+ &item,
+ &markChar))
+ return NULL;
+ SetItemMark(_self->ob_itself,
+ item,
+ markChar);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MenuObj_GetItemMark(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short item;
- CharParameter markChar;
+ PyObject *_res = NULL;
+ short item;
+ CharParameter markChar;
#ifndef GetItemMark
- PyMac_PRECHECK(GetItemMark);
+ PyMac_PRECHECK(GetItemMark);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &item))
- return NULL;
- GetItemMark(_self->ob_itself,
- item,
- &markChar);
- _res = Py_BuildValue("h",
- markChar);
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &item))
+ return NULL;
+ GetItemMark(_self->ob_itself,
+ item,
+ &markChar);
+ _res = Py_BuildValue("h",
+ markChar);
+ return _res;
}
static PyObject *MenuObj_SetItemCmd(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short item;
- CharParameter cmdChar;
+ PyObject *_res = NULL;
+ short item;
+ CharParameter cmdChar;
#ifndef SetItemCmd
- PyMac_PRECHECK(SetItemCmd);
+ PyMac_PRECHECK(SetItemCmd);
#endif
- if (!PyArg_ParseTuple(_args, "hh",
- &item,
- &cmdChar))
- return NULL;
- SetItemCmd(_self->ob_itself,
- item,
- cmdChar);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "hh",
+ &item,
+ &cmdChar))
+ return NULL;
+ SetItemCmd(_self->ob_itself,
+ item,
+ cmdChar);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MenuObj_GetItemCmd(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short item;
- CharParameter cmdChar;
+ PyObject *_res = NULL;
+ short item;
+ CharParameter cmdChar;
#ifndef GetItemCmd
- PyMac_PRECHECK(GetItemCmd);
+ PyMac_PRECHECK(GetItemCmd);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &item))
- return NULL;
- GetItemCmd(_self->ob_itself,
- item,
- &cmdChar);
- _res = Py_BuildValue("h",
- cmdChar);
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &item))
+ return NULL;
+ GetItemCmd(_self->ob_itself,
+ item,
+ &cmdChar);
+ _res = Py_BuildValue("h",
+ cmdChar);
+ return _res;
}
static PyObject *MenuObj_SetItemIcon(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short item;
- short iconIndex;
+ PyObject *_res = NULL;
+ short item;
+ short iconIndex;
#ifndef SetItemIcon
- PyMac_PRECHECK(SetItemIcon);
+ PyMac_PRECHECK(SetItemIcon);
#endif
- if (!PyArg_ParseTuple(_args, "hh",
- &item,
- &iconIndex))
- return NULL;
- SetItemIcon(_self->ob_itself,
- item,
- iconIndex);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "hh",
+ &item,
+ &iconIndex))
+ return NULL;
+ SetItemIcon(_self->ob_itself,
+ item,
+ iconIndex);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MenuObj_GetItemIcon(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short item;
- short iconIndex;
+ PyObject *_res = NULL;
+ short item;
+ short iconIndex;
#ifndef GetItemIcon
- PyMac_PRECHECK(GetItemIcon);
+ PyMac_PRECHECK(GetItemIcon);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &item))
- return NULL;
- GetItemIcon(_self->ob_itself,
- item,
- &iconIndex);
- _res = Py_BuildValue("h",
- iconIndex);
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &item))
+ return NULL;
+ GetItemIcon(_self->ob_itself,
+ item,
+ &iconIndex);
+ _res = Py_BuildValue("h",
+ iconIndex);
+ return _res;
}
static PyObject *MenuObj_SetItemStyle(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short item;
- StyleParameter chStyle;
+ PyObject *_res = NULL;
+ short item;
+ StyleParameter chStyle;
#ifndef SetItemStyle
- PyMac_PRECHECK(SetItemStyle);
+ PyMac_PRECHECK(SetItemStyle);
#endif
- if (!PyArg_ParseTuple(_args, "hh",
- &item,
- &chStyle))
- return NULL;
- SetItemStyle(_self->ob_itself,
- item,
- chStyle);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "hh",
+ &item,
+ &chStyle))
+ return NULL;
+ SetItemStyle(_self->ob_itself,
+ item,
+ chStyle);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MenuObj_GetItemStyle(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short item;
- Style chStyle;
+ PyObject *_res = NULL;
+ short item;
+ Style chStyle;
#ifndef GetItemStyle
- PyMac_PRECHECK(GetItemStyle);
+ PyMac_PRECHECK(GetItemStyle);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &item))
- return NULL;
- GetItemStyle(_self->ob_itself,
- item,
- &chStyle);
- _res = Py_BuildValue("b",
- chStyle);
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &item))
+ return NULL;
+ GetItemStyle(_self->ob_itself,
+ item,
+ &chStyle);
+ _res = Py_BuildValue("b",
+ chStyle);
+ return _res;
}
static PyObject *MenuObj_SetMenuItemCommandID(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- SInt16 inItem;
- MenuCommand inCommandID;
+ PyObject *_res = NULL;
+ OSErr _err;
+ SInt16 inItem;
+ MenuCommand inCommandID;
#ifndef SetMenuItemCommandID
- PyMac_PRECHECK(SetMenuItemCommandID);
+ PyMac_PRECHECK(SetMenuItemCommandID);
#endif
- if (!PyArg_ParseTuple(_args, "hl",
- &inItem,
- &inCommandID))
- return NULL;
- _err = SetMenuItemCommandID(_self->ob_itself,
- inItem,
- inCommandID);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "hl",
+ &inItem,
+ &inCommandID))
+ return NULL;
+ _err = SetMenuItemCommandID(_self->ob_itself,
+ inItem,
+ inCommandID);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MenuObj_GetMenuItemCommandID(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- SInt16 inItem;
- MenuCommand outCommandID;
+ PyObject *_res = NULL;
+ OSErr _err;
+ SInt16 inItem;
+ MenuCommand outCommandID;
#ifndef GetMenuItemCommandID
- PyMac_PRECHECK(GetMenuItemCommandID);
+ PyMac_PRECHECK(GetMenuItemCommandID);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &inItem))
- return NULL;
- _err = GetMenuItemCommandID(_self->ob_itself,
- inItem,
- &outCommandID);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- outCommandID);
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &inItem))
+ return NULL;
+ _err = GetMenuItemCommandID(_self->ob_itself,
+ inItem,
+ &outCommandID);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ outCommandID);
+ return _res;
}
static PyObject *MenuObj_SetMenuItemModifiers(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- SInt16 inItem;
- UInt8 inModifiers;
+ PyObject *_res = NULL;
+ OSErr _err;
+ SInt16 inItem;
+ UInt8 inModifiers;
#ifndef SetMenuItemModifiers
- PyMac_PRECHECK(SetMenuItemModifiers);
+ PyMac_PRECHECK(SetMenuItemModifiers);
#endif
- if (!PyArg_ParseTuple(_args, "hb",
- &inItem,
- &inModifiers))
- return NULL;
- _err = SetMenuItemModifiers(_self->ob_itself,
- inItem,
- inModifiers);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "hb",
+ &inItem,
+ &inModifiers))
+ return NULL;
+ _err = SetMenuItemModifiers(_self->ob_itself,
+ inItem,
+ inModifiers);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MenuObj_GetMenuItemModifiers(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- SInt16 inItem;
- UInt8 outModifiers;
+ PyObject *_res = NULL;
+ OSErr _err;
+ SInt16 inItem;
+ UInt8 outModifiers;
#ifndef GetMenuItemModifiers
- PyMac_PRECHECK(GetMenuItemModifiers);
+ PyMac_PRECHECK(GetMenuItemModifiers);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &inItem))
- return NULL;
- _err = GetMenuItemModifiers(_self->ob_itself,
- inItem,
- &outModifiers);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("b",
- outModifiers);
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &inItem))
+ return NULL;
+ _err = GetMenuItemModifiers(_self->ob_itself,
+ inItem,
+ &outModifiers);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("b",
+ outModifiers);
+ return _res;
}
static PyObject *MenuObj_SetMenuItemIconHandle(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- SInt16 inItem;
- UInt8 inIconType;
- Handle inIconHandle;
+ PyObject *_res = NULL;
+ OSErr _err;
+ SInt16 inItem;
+ UInt8 inIconType;
+ Handle inIconHandle;
#ifndef SetMenuItemIconHandle
- PyMac_PRECHECK(SetMenuItemIconHandle);
-#endif
- if (!PyArg_ParseTuple(_args, "hbO&",
- &inItem,
- &inIconType,
- ResObj_Convert, &inIconHandle))
- return NULL;
- _err = SetMenuItemIconHandle(_self->ob_itself,
- inItem,
- inIconType,
- inIconHandle);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(SetMenuItemIconHandle);
+#endif
+ if (!PyArg_ParseTuple(_args, "hbO&",
+ &inItem,
+ &inIconType,
+ ResObj_Convert, &inIconHandle))
+ return NULL;
+ _err = SetMenuItemIconHandle(_self->ob_itself,
+ inItem,
+ inIconType,
+ inIconHandle);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MenuObj_GetMenuItemIconHandle(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- SInt16 inItem;
- UInt8 outIconType;
- Handle outIconHandle;
+ PyObject *_res = NULL;
+ OSErr _err;
+ SInt16 inItem;
+ UInt8 outIconType;
+ Handle outIconHandle;
#ifndef GetMenuItemIconHandle
- PyMac_PRECHECK(GetMenuItemIconHandle);
-#endif
- if (!PyArg_ParseTuple(_args, "h",
- &inItem))
- return NULL;
- _err = GetMenuItemIconHandle(_self->ob_itself,
- inItem,
- &outIconType,
- &outIconHandle);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("bO&",
- outIconType,
- ResObj_New, outIconHandle);
- return _res;
+ PyMac_PRECHECK(GetMenuItemIconHandle);
+#endif
+ if (!PyArg_ParseTuple(_args, "h",
+ &inItem))
+ return NULL;
+ _err = GetMenuItemIconHandle(_self->ob_itself,
+ inItem,
+ &outIconType,
+ &outIconHandle);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("bO&",
+ outIconType,
+ ResObj_New, outIconHandle);
+ return _res;
}
static PyObject *MenuObj_SetMenuItemTextEncoding(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- SInt16 inItem;
- TextEncoding inScriptID;
+ PyObject *_res = NULL;
+ OSErr _err;
+ SInt16 inItem;
+ TextEncoding inScriptID;
#ifndef SetMenuItemTextEncoding
- PyMac_PRECHECK(SetMenuItemTextEncoding);
+ PyMac_PRECHECK(SetMenuItemTextEncoding);
#endif
- if (!PyArg_ParseTuple(_args, "hl",
- &inItem,
- &inScriptID))
- return NULL;
- _err = SetMenuItemTextEncoding(_self->ob_itself,
- inItem,
- inScriptID);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "hl",
+ &inItem,
+ &inScriptID))
+ return NULL;
+ _err = SetMenuItemTextEncoding(_self->ob_itself,
+ inItem,
+ inScriptID);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MenuObj_GetMenuItemTextEncoding(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- SInt16 inItem;
- TextEncoding outScriptID;
+ PyObject *_res = NULL;
+ OSErr _err;
+ SInt16 inItem;
+ TextEncoding outScriptID;
#ifndef GetMenuItemTextEncoding
- PyMac_PRECHECK(GetMenuItemTextEncoding);
+ PyMac_PRECHECK(GetMenuItemTextEncoding);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &inItem))
- return NULL;
- _err = GetMenuItemTextEncoding(_self->ob_itself,
- inItem,
- &outScriptID);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- outScriptID);
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &inItem))
+ return NULL;
+ _err = GetMenuItemTextEncoding(_self->ob_itself,
+ inItem,
+ &outScriptID);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ outScriptID);
+ return _res;
}
static PyObject *MenuObj_SetMenuItemHierarchicalID(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- SInt16 inItem;
- MenuID inHierID;
+ PyObject *_res = NULL;
+ OSErr _err;
+ SInt16 inItem;
+ MenuID inHierID;
#ifndef SetMenuItemHierarchicalID
- PyMac_PRECHECK(SetMenuItemHierarchicalID);
+ PyMac_PRECHECK(SetMenuItemHierarchicalID);
#endif
- if (!PyArg_ParseTuple(_args, "hh",
- &inItem,
- &inHierID))
- return NULL;
- _err = SetMenuItemHierarchicalID(_self->ob_itself,
- inItem,
- inHierID);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "hh",
+ &inItem,
+ &inHierID))
+ return NULL;
+ _err = SetMenuItemHierarchicalID(_self->ob_itself,
+ inItem,
+ inHierID);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MenuObj_GetMenuItemHierarchicalID(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- SInt16 inItem;
- MenuID outHierID;
+ PyObject *_res = NULL;
+ OSErr _err;
+ SInt16 inItem;
+ MenuID outHierID;
#ifndef GetMenuItemHierarchicalID
- PyMac_PRECHECK(GetMenuItemHierarchicalID);
+ PyMac_PRECHECK(GetMenuItemHierarchicalID);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &inItem))
- return NULL;
- _err = GetMenuItemHierarchicalID(_self->ob_itself,
- inItem,
- &outHierID);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("h",
- outHierID);
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &inItem))
+ return NULL;
+ _err = GetMenuItemHierarchicalID(_self->ob_itself,
+ inItem,
+ &outHierID);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("h",
+ outHierID);
+ return _res;
}
static PyObject *MenuObj_SetMenuItemFontID(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- SInt16 inItem;
- SInt16 inFontID;
+ PyObject *_res = NULL;
+ OSErr _err;
+ SInt16 inItem;
+ SInt16 inFontID;
#ifndef SetMenuItemFontID
- PyMac_PRECHECK(SetMenuItemFontID);
+ PyMac_PRECHECK(SetMenuItemFontID);
#endif
- if (!PyArg_ParseTuple(_args, "hh",
- &inItem,
- &inFontID))
- return NULL;
- _err = SetMenuItemFontID(_self->ob_itself,
- inItem,
- inFontID);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "hh",
+ &inItem,
+ &inFontID))
+ return NULL;
+ _err = SetMenuItemFontID(_self->ob_itself,
+ inItem,
+ inFontID);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MenuObj_GetMenuItemFontID(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- SInt16 inItem;
- SInt16 outFontID;
+ PyObject *_res = NULL;
+ OSErr _err;
+ SInt16 inItem;
+ SInt16 outFontID;
#ifndef GetMenuItemFontID
- PyMac_PRECHECK(GetMenuItemFontID);
+ PyMac_PRECHECK(GetMenuItemFontID);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &inItem))
- return NULL;
- _err = GetMenuItemFontID(_self->ob_itself,
- inItem,
- &outFontID);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("h",
- outFontID);
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &inItem))
+ return NULL;
+ _err = GetMenuItemFontID(_self->ob_itself,
+ inItem,
+ &outFontID);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("h",
+ outFontID);
+ return _res;
}
static PyObject *MenuObj_SetMenuItemRefCon(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- SInt16 inItem;
- UInt32 inRefCon;
+ PyObject *_res = NULL;
+ OSErr _err;
+ SInt16 inItem;
+ UInt32 inRefCon;
#ifndef SetMenuItemRefCon
- PyMac_PRECHECK(SetMenuItemRefCon);
+ PyMac_PRECHECK(SetMenuItemRefCon);
#endif
- if (!PyArg_ParseTuple(_args, "hl",
- &inItem,
- &inRefCon))
- return NULL;
- _err = SetMenuItemRefCon(_self->ob_itself,
- inItem,
- inRefCon);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "hl",
+ &inItem,
+ &inRefCon))
+ return NULL;
+ _err = SetMenuItemRefCon(_self->ob_itself,
+ inItem,
+ inRefCon);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MenuObj_GetMenuItemRefCon(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- SInt16 inItem;
- UInt32 outRefCon;
+ PyObject *_res = NULL;
+ OSErr _err;
+ SInt16 inItem;
+ UInt32 outRefCon;
#ifndef GetMenuItemRefCon
- PyMac_PRECHECK(GetMenuItemRefCon);
+ PyMac_PRECHECK(GetMenuItemRefCon);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &inItem))
- return NULL;
- _err = GetMenuItemRefCon(_self->ob_itself,
- inItem,
- &outRefCon);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- outRefCon);
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &inItem))
+ return NULL;
+ _err = GetMenuItemRefCon(_self->ob_itself,
+ inItem,
+ &outRefCon);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ outRefCon);
+ return _res;
}
static PyObject *MenuObj_SetMenuItemKeyGlyph(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- SInt16 inItem;
- SInt16 inGlyph;
+ PyObject *_res = NULL;
+ OSErr _err;
+ SInt16 inItem;
+ SInt16 inGlyph;
#ifndef SetMenuItemKeyGlyph
- PyMac_PRECHECK(SetMenuItemKeyGlyph);
+ PyMac_PRECHECK(SetMenuItemKeyGlyph);
#endif
- if (!PyArg_ParseTuple(_args, "hh",
- &inItem,
- &inGlyph))
- return NULL;
- _err = SetMenuItemKeyGlyph(_self->ob_itself,
- inItem,
- inGlyph);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "hh",
+ &inItem,
+ &inGlyph))
+ return NULL;
+ _err = SetMenuItemKeyGlyph(_self->ob_itself,
+ inItem,
+ inGlyph);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MenuObj_GetMenuItemKeyGlyph(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- SInt16 inItem;
- SInt16 outGlyph;
+ PyObject *_res = NULL;
+ OSErr _err;
+ SInt16 inItem;
+ SInt16 outGlyph;
#ifndef GetMenuItemKeyGlyph
- PyMac_PRECHECK(GetMenuItemKeyGlyph);
+ PyMac_PRECHECK(GetMenuItemKeyGlyph);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &inItem))
- return NULL;
- _err = GetMenuItemKeyGlyph(_self->ob_itself,
- inItem,
- &outGlyph);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("h",
- outGlyph);
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &inItem))
+ return NULL;
+ _err = GetMenuItemKeyGlyph(_self->ob_itself,
+ inItem,
+ &outGlyph);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("h",
+ outGlyph);
+ return _res;
}
static PyObject *MenuObj_MacEnableMenuItem(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- MenuItemIndex item;
+ PyObject *_res = NULL;
+ MenuItemIndex item;
#ifndef MacEnableMenuItem
- PyMac_PRECHECK(MacEnableMenuItem);
+ PyMac_PRECHECK(MacEnableMenuItem);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &item))
- return NULL;
- MacEnableMenuItem(_self->ob_itself,
- item);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &item))
+ return NULL;
+ MacEnableMenuItem(_self->ob_itself,
+ item);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MenuObj_DisableMenuItem(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- MenuItemIndex item;
+ PyObject *_res = NULL;
+ MenuItemIndex item;
#ifndef DisableMenuItem
- PyMac_PRECHECK(DisableMenuItem);
+ PyMac_PRECHECK(DisableMenuItem);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &item))
- return NULL;
- DisableMenuItem(_self->ob_itself,
- item);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &item))
+ return NULL;
+ DisableMenuItem(_self->ob_itself,
+ item);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MenuObj_IsMenuItemEnabled(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- MenuItemIndex item;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ MenuItemIndex item;
#ifndef IsMenuItemEnabled
- PyMac_PRECHECK(IsMenuItemEnabled);
+ PyMac_PRECHECK(IsMenuItemEnabled);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &item))
- return NULL;
- _rv = IsMenuItemEnabled(_self->ob_itself,
- item);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &item))
+ return NULL;
+ _rv = IsMenuItemEnabled(_self->ob_itself,
+ item);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *MenuObj_EnableMenuItemIcon(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- MenuItemIndex item;
+ PyObject *_res = NULL;
+ MenuItemIndex item;
#ifndef EnableMenuItemIcon
- PyMac_PRECHECK(EnableMenuItemIcon);
+ PyMac_PRECHECK(EnableMenuItemIcon);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &item))
- return NULL;
- EnableMenuItemIcon(_self->ob_itself,
- item);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &item))
+ return NULL;
+ EnableMenuItemIcon(_self->ob_itself,
+ item);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MenuObj_DisableMenuItemIcon(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- MenuItemIndex item;
+ PyObject *_res = NULL;
+ MenuItemIndex item;
#ifndef DisableMenuItemIcon
- PyMac_PRECHECK(DisableMenuItemIcon);
+ PyMac_PRECHECK(DisableMenuItemIcon);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &item))
- return NULL;
- DisableMenuItemIcon(_self->ob_itself,
- item);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &item))
+ return NULL;
+ DisableMenuItemIcon(_self->ob_itself,
+ item);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MenuObj_IsMenuItemIconEnabled(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- MenuItemIndex item;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ MenuItemIndex item;
#ifndef IsMenuItemIconEnabled
- PyMac_PRECHECK(IsMenuItemIconEnabled);
+ PyMac_PRECHECK(IsMenuItemIconEnabled);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &item))
- return NULL;
- _rv = IsMenuItemIconEnabled(_self->ob_itself,
- item);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &item))
+ return NULL;
+ _rv = IsMenuItemIconEnabled(_self->ob_itself,
+ item);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *MenuObj_SetMenuItemHierarchicalMenu(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- MenuItemIndex inItem;
- MenuHandle inHierMenu;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ MenuItemIndex inItem;
+ MenuHandle inHierMenu;
#ifndef SetMenuItemHierarchicalMenu
- PyMac_PRECHECK(SetMenuItemHierarchicalMenu);
+ PyMac_PRECHECK(SetMenuItemHierarchicalMenu);
#endif
- if (!PyArg_ParseTuple(_args, "hO&",
- &inItem,
- MenuObj_Convert, &inHierMenu))
- return NULL;
- _err = SetMenuItemHierarchicalMenu(_self->ob_itself,
- inItem,
- inHierMenu);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "hO&",
+ &inItem,
+ MenuObj_Convert, &inHierMenu))
+ return NULL;
+ _err = SetMenuItemHierarchicalMenu(_self->ob_itself,
+ inItem,
+ inHierMenu);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MenuObj_GetMenuItemHierarchicalMenu(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- MenuItemIndex inItem;
- MenuHandle outHierMenu;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ MenuItemIndex inItem;
+ MenuHandle outHierMenu;
#ifndef GetMenuItemHierarchicalMenu
- PyMac_PRECHECK(GetMenuItemHierarchicalMenu);
+ PyMac_PRECHECK(GetMenuItemHierarchicalMenu);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &inItem))
- return NULL;
- _err = GetMenuItemHierarchicalMenu(_self->ob_itself,
- inItem,
- &outHierMenu);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- OptMenuObj_New, outHierMenu);
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &inItem))
+ return NULL;
+ _err = GetMenuItemHierarchicalMenu(_self->ob_itself,
+ inItem,
+ &outHierMenu);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ OptMenuObj_New, outHierMenu);
+ return _res;
}
static PyObject *MenuObj_CopyMenuItemTextAsCFString(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- MenuItemIndex inItem;
- CFStringRef outString;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ MenuItemIndex inItem;
+ CFStringRef outString;
#ifndef CopyMenuItemTextAsCFString
- PyMac_PRECHECK(CopyMenuItemTextAsCFString);
+ PyMac_PRECHECK(CopyMenuItemTextAsCFString);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &inItem))
- return NULL;
- _err = CopyMenuItemTextAsCFString(_self->ob_itself,
- inItem,
- &outString);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- CFStringRefObj_New, outString);
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &inItem))
+ return NULL;
+ _err = CopyMenuItemTextAsCFString(_self->ob_itself,
+ inItem,
+ &outString);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ CFStringRefObj_New, outString);
+ return _res;
}
static PyObject *MenuObj_SetMenuItemTextWithCFString(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- MenuItemIndex inItem;
- CFStringRef inString;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ MenuItemIndex inItem;
+ CFStringRef inString;
#ifndef SetMenuItemTextWithCFString
- PyMac_PRECHECK(SetMenuItemTextWithCFString);
+ PyMac_PRECHECK(SetMenuItemTextWithCFString);
#endif
- if (!PyArg_ParseTuple(_args, "hO&",
- &inItem,
- CFStringRefObj_Convert, &inString))
- return NULL;
- _err = SetMenuItemTextWithCFString(_self->ob_itself,
- inItem,
- inString);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "hO&",
+ &inItem,
+ CFStringRefObj_Convert, &inString))
+ return NULL;
+ _err = SetMenuItemTextWithCFString(_self->ob_itself,
+ inItem,
+ inString);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MenuObj_GetMenuItemIndent(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- MenuItemIndex inItem;
- UInt32 outIndent;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ MenuItemIndex inItem;
+ UInt32 outIndent;
#ifndef GetMenuItemIndent
- PyMac_PRECHECK(GetMenuItemIndent);
+ PyMac_PRECHECK(GetMenuItemIndent);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &inItem))
- return NULL;
- _err = GetMenuItemIndent(_self->ob_itself,
- inItem,
- &outIndent);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- outIndent);
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &inItem))
+ return NULL;
+ _err = GetMenuItemIndent(_self->ob_itself,
+ inItem,
+ &outIndent);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ outIndent);
+ return _res;
}
static PyObject *MenuObj_SetMenuItemIndent(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- MenuItemIndex inItem;
- UInt32 inIndent;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ MenuItemIndex inItem;
+ UInt32 inIndent;
#ifndef SetMenuItemIndent
- PyMac_PRECHECK(SetMenuItemIndent);
+ PyMac_PRECHECK(SetMenuItemIndent);
#endif
- if (!PyArg_ParseTuple(_args, "hl",
- &inItem,
- &inIndent))
- return NULL;
- _err = SetMenuItemIndent(_self->ob_itself,
- inItem,
- inIndent);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "hl",
+ &inItem,
+ &inIndent))
+ return NULL;
+ _err = SetMenuItemIndent(_self->ob_itself,
+ inItem,
+ inIndent);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MenuObj_GetMenuItemCommandKey(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- MenuItemIndex inItem;
- Boolean inGetVirtualKey;
- UInt16 outKey;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ MenuItemIndex inItem;
+ Boolean inGetVirtualKey;
+ UInt16 outKey;
#ifndef GetMenuItemCommandKey
- PyMac_PRECHECK(GetMenuItemCommandKey);
-#endif
- if (!PyArg_ParseTuple(_args, "hb",
- &inItem,
- &inGetVirtualKey))
- return NULL;
- _err = GetMenuItemCommandKey(_self->ob_itself,
- inItem,
- inGetVirtualKey,
- &outKey);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("H",
- outKey);
- return _res;
+ PyMac_PRECHECK(GetMenuItemCommandKey);
+#endif
+ if (!PyArg_ParseTuple(_args, "hb",
+ &inItem,
+ &inGetVirtualKey))
+ return NULL;
+ _err = GetMenuItemCommandKey(_self->ob_itself,
+ inItem,
+ inGetVirtualKey,
+ &outKey);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("H",
+ outKey);
+ return _res;
}
static PyObject *MenuObj_SetMenuItemCommandKey(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- MenuItemIndex inItem;
- Boolean inSetVirtualKey;
- UInt16 inKey;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ MenuItemIndex inItem;
+ Boolean inSetVirtualKey;
+ UInt16 inKey;
#ifndef SetMenuItemCommandKey
- PyMac_PRECHECK(SetMenuItemCommandKey);
-#endif
- if (!PyArg_ParseTuple(_args, "hbH",
- &inItem,
- &inSetVirtualKey,
- &inKey))
- return NULL;
- _err = SetMenuItemCommandKey(_self->ob_itself,
- inItem,
- inSetVirtualKey,
- inKey);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(SetMenuItemCommandKey);
+#endif
+ if (!PyArg_ParseTuple(_args, "hbH",
+ &inItem,
+ &inSetVirtualKey,
+ &inKey))
+ return NULL;
+ _err = SetMenuItemCommandKey(_self->ob_itself,
+ inItem,
+ inSetVirtualKey,
+ inKey);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MenuObj_GetMenuItemPropertyAttributes(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- MenuItemIndex item;
- OSType propertyCreator;
- OSType propertyTag;
- UInt32 attributes;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ MenuItemIndex item;
+ OSType propertyCreator;
+ OSType propertyTag;
+ UInt32 attributes;
#ifndef GetMenuItemPropertyAttributes
- PyMac_PRECHECK(GetMenuItemPropertyAttributes);
-#endif
- if (!PyArg_ParseTuple(_args, "hO&O&",
- &item,
- PyMac_GetOSType, &propertyCreator,
- PyMac_GetOSType, &propertyTag))
- return NULL;
- _err = GetMenuItemPropertyAttributes(_self->ob_itself,
- item,
- propertyCreator,
- propertyTag,
- &attributes);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- attributes);
- return _res;
+ PyMac_PRECHECK(GetMenuItemPropertyAttributes);
+#endif
+ if (!PyArg_ParseTuple(_args, "hO&O&",
+ &item,
+ PyMac_GetOSType, &propertyCreator,
+ PyMac_GetOSType, &propertyTag))
+ return NULL;
+ _err = GetMenuItemPropertyAttributes(_self->ob_itself,
+ item,
+ propertyCreator,
+ propertyTag,
+ &attributes);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ attributes);
+ return _res;
}
static PyObject *MenuObj_ChangeMenuItemPropertyAttributes(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- MenuItemIndex item;
- OSType propertyCreator;
- OSType propertyTag;
- UInt32 attributesToSet;
- UInt32 attributesToClear;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ MenuItemIndex item;
+ OSType propertyCreator;
+ OSType propertyTag;
+ UInt32 attributesToSet;
+ UInt32 attributesToClear;
#ifndef ChangeMenuItemPropertyAttributes
- PyMac_PRECHECK(ChangeMenuItemPropertyAttributes);
-#endif
- if (!PyArg_ParseTuple(_args, "hO&O&ll",
- &item,
- PyMac_GetOSType, &propertyCreator,
- PyMac_GetOSType, &propertyTag,
- &attributesToSet,
- &attributesToClear))
- return NULL;
- _err = ChangeMenuItemPropertyAttributes(_self->ob_itself,
- item,
- propertyCreator,
- propertyTag,
- attributesToSet,
- attributesToClear);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(ChangeMenuItemPropertyAttributes);
+#endif
+ if (!PyArg_ParseTuple(_args, "hO&O&ll",
+ &item,
+ PyMac_GetOSType, &propertyCreator,
+ PyMac_GetOSType, &propertyTag,
+ &attributesToSet,
+ &attributesToClear))
+ return NULL;
+ _err = ChangeMenuItemPropertyAttributes(_self->ob_itself,
+ item,
+ propertyCreator,
+ propertyTag,
+ attributesToSet,
+ attributesToClear);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MenuObj_GetMenuAttributes(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- MenuAttributes outAttributes;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ MenuAttributes outAttributes;
#ifndef GetMenuAttributes
- PyMac_PRECHECK(GetMenuAttributes);
+ PyMac_PRECHECK(GetMenuAttributes);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetMenuAttributes(_self->ob_itself,
- &outAttributes);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- outAttributes);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetMenuAttributes(_self->ob_itself,
+ &outAttributes);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ outAttributes);
+ return _res;
}
static PyObject *MenuObj_ChangeMenuAttributes(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- MenuAttributes setTheseAttributes;
- MenuAttributes clearTheseAttributes;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ MenuAttributes setTheseAttributes;
+ MenuAttributes clearTheseAttributes;
#ifndef ChangeMenuAttributes
- PyMac_PRECHECK(ChangeMenuAttributes);
+ PyMac_PRECHECK(ChangeMenuAttributes);
#endif
- if (!PyArg_ParseTuple(_args, "ll",
- &setTheseAttributes,
- &clearTheseAttributes))
- return NULL;
- _err = ChangeMenuAttributes(_self->ob_itself,
- setTheseAttributes,
- clearTheseAttributes);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "ll",
+ &setTheseAttributes,
+ &clearTheseAttributes))
+ return NULL;
+ _err = ChangeMenuAttributes(_self->ob_itself,
+ setTheseAttributes,
+ clearTheseAttributes);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MenuObj_GetMenuItemAttributes(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- MenuItemIndex item;
- MenuItemAttributes outAttributes;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ MenuItemIndex item;
+ MenuItemAttributes outAttributes;
#ifndef GetMenuItemAttributes
- PyMac_PRECHECK(GetMenuItemAttributes);
+ PyMac_PRECHECK(GetMenuItemAttributes);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &item))
- return NULL;
- _err = GetMenuItemAttributes(_self->ob_itself,
- item,
- &outAttributes);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- outAttributes);
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &item))
+ return NULL;
+ _err = GetMenuItemAttributes(_self->ob_itself,
+ item,
+ &outAttributes);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ outAttributes);
+ return _res;
}
static PyObject *MenuObj_ChangeMenuItemAttributes(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- MenuItemIndex item;
- MenuItemAttributes setTheseAttributes;
- MenuItemAttributes clearTheseAttributes;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ MenuItemIndex item;
+ MenuItemAttributes setTheseAttributes;
+ MenuItemAttributes clearTheseAttributes;
#ifndef ChangeMenuItemAttributes
- PyMac_PRECHECK(ChangeMenuItemAttributes);
-#endif
- if (!PyArg_ParseTuple(_args, "hll",
- &item,
- &setTheseAttributes,
- &clearTheseAttributes))
- return NULL;
- _err = ChangeMenuItemAttributes(_self->ob_itself,
- item,
- setTheseAttributes,
- clearTheseAttributes);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(ChangeMenuItemAttributes);
+#endif
+ if (!PyArg_ParseTuple(_args, "hll",
+ &item,
+ &setTheseAttributes,
+ &clearTheseAttributes))
+ return NULL;
+ _err = ChangeMenuItemAttributes(_self->ob_itself,
+ item,
+ setTheseAttributes,
+ clearTheseAttributes);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MenuObj_DisableAllMenuItems(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef DisableAllMenuItems
- PyMac_PRECHECK(DisableAllMenuItems);
+ PyMac_PRECHECK(DisableAllMenuItems);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- DisableAllMenuItems(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ DisableAllMenuItems(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MenuObj_EnableAllMenuItems(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef EnableAllMenuItems
- PyMac_PRECHECK(EnableAllMenuItems);
+ PyMac_PRECHECK(EnableAllMenuItems);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- EnableAllMenuItems(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ EnableAllMenuItems(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MenuObj_MenuHasEnabledItems(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
+ PyObject *_res = NULL;
+ Boolean _rv;
#ifndef MenuHasEnabledItems
- PyMac_PRECHECK(MenuHasEnabledItems);
+ PyMac_PRECHECK(MenuHasEnabledItems);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = MenuHasEnabledItems(_self->ob_itself);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = MenuHasEnabledItems(_self->ob_itself);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *MenuObj_GetMenuType(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- UInt16 outType;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ UInt16 outType;
#ifndef GetMenuType
- PyMac_PRECHECK(GetMenuType);
+ PyMac_PRECHECK(GetMenuType);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetMenuType(_self->ob_itself,
- &outType);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("H",
- outType);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetMenuType(_self->ob_itself,
+ &outType);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("H",
+ outType);
+ return _res;
}
static PyObject *MenuObj_CountMenuItemsWithCommandID(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ItemCount _rv;
- MenuCommand inCommandID;
+ PyObject *_res = NULL;
+ ItemCount _rv;
+ MenuCommand inCommandID;
#ifndef CountMenuItemsWithCommandID
- PyMac_PRECHECK(CountMenuItemsWithCommandID);
+ PyMac_PRECHECK(CountMenuItemsWithCommandID);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &inCommandID))
- return NULL;
- _rv = CountMenuItemsWithCommandID(_self->ob_itself,
- inCommandID);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &inCommandID))
+ return NULL;
+ _rv = CountMenuItemsWithCommandID(_self->ob_itself,
+ inCommandID);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *MenuObj_GetIndMenuItemWithCommandID(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- MenuCommand inCommandID;
- UInt32 inItemIndex;
- MenuHandle outMenu;
- MenuItemIndex outIndex;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ MenuCommand inCommandID;
+ UInt32 inItemIndex;
+ MenuHandle outMenu;
+ MenuItemIndex outIndex;
#ifndef GetIndMenuItemWithCommandID
- PyMac_PRECHECK(GetIndMenuItemWithCommandID);
-#endif
- if (!PyArg_ParseTuple(_args, "ll",
- &inCommandID,
- &inItemIndex))
- return NULL;
- _err = GetIndMenuItemWithCommandID(_self->ob_itself,
- inCommandID,
- inItemIndex,
- &outMenu,
- &outIndex);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&h",
- MenuObj_New, outMenu,
- outIndex);
- return _res;
+ PyMac_PRECHECK(GetIndMenuItemWithCommandID);
+#endif
+ if (!PyArg_ParseTuple(_args, "ll",
+ &inCommandID,
+ &inItemIndex))
+ return NULL;
+ _err = GetIndMenuItemWithCommandID(_self->ob_itself,
+ inCommandID,
+ inItemIndex,
+ &outMenu,
+ &outIndex);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&h",
+ MenuObj_New, outMenu,
+ outIndex);
+ return _res;
}
static PyObject *MenuObj_EnableMenuCommand(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- MenuCommand inCommandID;
+ PyObject *_res = NULL;
+ MenuCommand inCommandID;
#ifndef EnableMenuCommand
- PyMac_PRECHECK(EnableMenuCommand);
+ PyMac_PRECHECK(EnableMenuCommand);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &inCommandID))
- return NULL;
- EnableMenuCommand(_self->ob_itself,
- inCommandID);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &inCommandID))
+ return NULL;
+ EnableMenuCommand(_self->ob_itself,
+ inCommandID);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MenuObj_DisableMenuCommand(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- MenuCommand inCommandID;
+ PyObject *_res = NULL;
+ MenuCommand inCommandID;
#ifndef DisableMenuCommand
- PyMac_PRECHECK(DisableMenuCommand);
+ PyMac_PRECHECK(DisableMenuCommand);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &inCommandID))
- return NULL;
- DisableMenuCommand(_self->ob_itself,
- inCommandID);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &inCommandID))
+ return NULL;
+ DisableMenuCommand(_self->ob_itself,
+ inCommandID);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MenuObj_IsMenuCommandEnabled(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- MenuCommand inCommandID;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ MenuCommand inCommandID;
#ifndef IsMenuCommandEnabled
- PyMac_PRECHECK(IsMenuCommandEnabled);
+ PyMac_PRECHECK(IsMenuCommandEnabled);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &inCommandID))
- return NULL;
- _rv = IsMenuCommandEnabled(_self->ob_itself,
- inCommandID);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &inCommandID))
+ return NULL;
+ _rv = IsMenuCommandEnabled(_self->ob_itself,
+ inCommandID);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *MenuObj_SetMenuCommandMark(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- MenuCommand inCommandID;
- UniChar inMark;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ MenuCommand inCommandID;
+ UniChar inMark;
#ifndef SetMenuCommandMark
- PyMac_PRECHECK(SetMenuCommandMark);
+ PyMac_PRECHECK(SetMenuCommandMark);
#endif
- if (!PyArg_ParseTuple(_args, "lh",
- &inCommandID,
- &inMark))
- return NULL;
- _err = SetMenuCommandMark(_self->ob_itself,
- inCommandID,
- inMark);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "lh",
+ &inCommandID,
+ &inMark))
+ return NULL;
+ _err = SetMenuCommandMark(_self->ob_itself,
+ inCommandID,
+ inMark);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MenuObj_GetMenuCommandMark(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- MenuCommand inCommandID;
- UniChar outMark;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ MenuCommand inCommandID;
+ UniChar outMark;
#ifndef GetMenuCommandMark
- PyMac_PRECHECK(GetMenuCommandMark);
+ PyMac_PRECHECK(GetMenuCommandMark);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &inCommandID))
- return NULL;
- _err = GetMenuCommandMark(_self->ob_itself,
- inCommandID,
- &outMark);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("h",
- outMark);
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &inCommandID))
+ return NULL;
+ _err = GetMenuCommandMark(_self->ob_itself,
+ inCommandID,
+ &outMark);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("h",
+ outMark);
+ return _res;
}
static PyObject *MenuObj_GetMenuCommandPropertySize(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- MenuCommand inCommandID;
- OSType inPropertyCreator;
- OSType inPropertyTag;
- ByteCount outSize;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ MenuCommand inCommandID;
+ OSType inPropertyCreator;
+ OSType inPropertyTag;
+ ByteCount outSize;
#ifndef GetMenuCommandPropertySize
- PyMac_PRECHECK(GetMenuCommandPropertySize);
-#endif
- if (!PyArg_ParseTuple(_args, "lO&O&",
- &inCommandID,
- PyMac_GetOSType, &inPropertyCreator,
- PyMac_GetOSType, &inPropertyTag))
- return NULL;
- _err = GetMenuCommandPropertySize(_self->ob_itself,
- inCommandID,
- inPropertyCreator,
- inPropertyTag,
- &outSize);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- outSize);
- return _res;
+ PyMac_PRECHECK(GetMenuCommandPropertySize);
+#endif
+ if (!PyArg_ParseTuple(_args, "lO&O&",
+ &inCommandID,
+ PyMac_GetOSType, &inPropertyCreator,
+ PyMac_GetOSType, &inPropertyTag))
+ return NULL;
+ _err = GetMenuCommandPropertySize(_self->ob_itself,
+ inCommandID,
+ inPropertyCreator,
+ inPropertyTag,
+ &outSize);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ outSize);
+ return _res;
}
static PyObject *MenuObj_RemoveMenuCommandProperty(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- MenuCommand inCommandID;
- OSType inPropertyCreator;
- OSType inPropertyTag;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ MenuCommand inCommandID;
+ OSType inPropertyCreator;
+ OSType inPropertyTag;
#ifndef RemoveMenuCommandProperty
- PyMac_PRECHECK(RemoveMenuCommandProperty);
-#endif
- if (!PyArg_ParseTuple(_args, "lO&O&",
- &inCommandID,
- PyMac_GetOSType, &inPropertyCreator,
- PyMac_GetOSType, &inPropertyTag))
- return NULL;
- _err = RemoveMenuCommandProperty(_self->ob_itself,
- inCommandID,
- inPropertyCreator,
- inPropertyTag);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(RemoveMenuCommandProperty);
+#endif
+ if (!PyArg_ParseTuple(_args, "lO&O&",
+ &inCommandID,
+ PyMac_GetOSType, &inPropertyCreator,
+ PyMac_GetOSType, &inPropertyTag))
+ return NULL;
+ _err = RemoveMenuCommandProperty(_self->ob_itself,
+ inCommandID,
+ inPropertyCreator,
+ inPropertyTag);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MenuObj_IsMenuItemInvalid(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- MenuItemIndex inItem;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ MenuItemIndex inItem;
#ifndef IsMenuItemInvalid
- PyMac_PRECHECK(IsMenuItemInvalid);
+ PyMac_PRECHECK(IsMenuItemInvalid);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &inItem))
- return NULL;
- _rv = IsMenuItemInvalid(_self->ob_itself,
- inItem);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &inItem))
+ return NULL;
+ _rv = IsMenuItemInvalid(_self->ob_itself,
+ inItem);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *MenuObj_InvalidateMenuItems(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- MenuItemIndex inFirstItem;
- ItemCount inNumItems;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ MenuItemIndex inFirstItem;
+ ItemCount inNumItems;
#ifndef InvalidateMenuItems
- PyMac_PRECHECK(InvalidateMenuItems);
+ PyMac_PRECHECK(InvalidateMenuItems);
#endif
- if (!PyArg_ParseTuple(_args, "hl",
- &inFirstItem,
- &inNumItems))
- return NULL;
- _err = InvalidateMenuItems(_self->ob_itself,
- inFirstItem,
- inNumItems);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "hl",
+ &inFirstItem,
+ &inNumItems))
+ return NULL;
+ _err = InvalidateMenuItems(_self->ob_itself,
+ inFirstItem,
+ inNumItems);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MenuObj_UpdateInvalidMenuItems(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
+ PyObject *_res = NULL;
+ OSStatus _err;
#ifndef UpdateInvalidMenuItems
- PyMac_PRECHECK(UpdateInvalidMenuItems);
+ PyMac_PRECHECK(UpdateInvalidMenuItems);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = UpdateInvalidMenuItems(_self->ob_itself);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = UpdateInvalidMenuItems(_self->ob_itself);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MenuObj_CreateStandardFontMenu(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- MenuItemIndex afterItem;
- MenuID firstHierMenuID;
- OptionBits options;
- ItemCount outHierMenuCount;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ MenuItemIndex afterItem;
+ MenuID firstHierMenuID;
+ OptionBits options;
+ ItemCount outHierMenuCount;
#ifndef CreateStandardFontMenu
- PyMac_PRECHECK(CreateStandardFontMenu);
-#endif
- if (!PyArg_ParseTuple(_args, "hhl",
- &afterItem,
- &firstHierMenuID,
- &options))
- return NULL;
- _err = CreateStandardFontMenu(_self->ob_itself,
- afterItem,
- firstHierMenuID,
- options,
- &outHierMenuCount);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- outHierMenuCount);
- return _res;
+ PyMac_PRECHECK(CreateStandardFontMenu);
+#endif
+ if (!PyArg_ParseTuple(_args, "hhl",
+ &afterItem,
+ &firstHierMenuID,
+ &options))
+ return NULL;
+ _err = CreateStandardFontMenu(_self->ob_itself,
+ afterItem,
+ firstHierMenuID,
+ options,
+ &outHierMenuCount);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ outHierMenuCount);
+ return _res;
}
static PyObject *MenuObj_UpdateStandardFontMenu(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- ItemCount outHierMenuCount;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ ItemCount outHierMenuCount;
#ifndef UpdateStandardFontMenu
- PyMac_PRECHECK(UpdateStandardFontMenu);
+ PyMac_PRECHECK(UpdateStandardFontMenu);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = UpdateStandardFontMenu(_self->ob_itself,
- &outHierMenuCount);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- outHierMenuCount);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = UpdateStandardFontMenu(_self->ob_itself,
+ &outHierMenuCount);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ outHierMenuCount);
+ return _res;
}
static PyObject *MenuObj_GetFontFamilyFromMenuSelection(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- MenuItemIndex item;
- FMFontFamily outFontFamily;
- FMFontStyle outStyle;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ MenuItemIndex item;
+ FMFontFamily outFontFamily;
+ FMFontStyle outStyle;
#ifndef GetFontFamilyFromMenuSelection
- PyMac_PRECHECK(GetFontFamilyFromMenuSelection);
-#endif
- if (!PyArg_ParseTuple(_args, "h",
- &item))
- return NULL;
- _err = GetFontFamilyFromMenuSelection(_self->ob_itself,
- item,
- &outFontFamily,
- &outStyle);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("hh",
- outFontFamily,
- outStyle);
- return _res;
+ PyMac_PRECHECK(GetFontFamilyFromMenuSelection);
+#endif
+ if (!PyArg_ParseTuple(_args, "h",
+ &item))
+ return NULL;
+ _err = GetFontFamilyFromMenuSelection(_self->ob_itself,
+ item,
+ &outFontFamily,
+ &outStyle);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("hh",
+ outFontFamily,
+ outStyle);
+ return _res;
}
static PyObject *MenuObj_GetMenuID(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- MenuID _rv;
+ PyObject *_res = NULL;
+ MenuID _rv;
#ifndef GetMenuID
- PyMac_PRECHECK(GetMenuID);
+ PyMac_PRECHECK(GetMenuID);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetMenuID(_self->ob_itself);
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetMenuID(_self->ob_itself);
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *MenuObj_GetMenuWidth(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- SInt16 _rv;
+ PyObject *_res = NULL;
+ SInt16 _rv;
#ifndef GetMenuWidth
- PyMac_PRECHECK(GetMenuWidth);
+ PyMac_PRECHECK(GetMenuWidth);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetMenuWidth(_self->ob_itself);
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetMenuWidth(_self->ob_itself);
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *MenuObj_GetMenuHeight(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- SInt16 _rv;
+ PyObject *_res = NULL;
+ SInt16 _rv;
#ifndef GetMenuHeight
- PyMac_PRECHECK(GetMenuHeight);
+ PyMac_PRECHECK(GetMenuHeight);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetMenuHeight(_self->ob_itself);
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetMenuHeight(_self->ob_itself);
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *MenuObj_SetMenuID(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- MenuID menuID;
+ PyObject *_res = NULL;
+ MenuID menuID;
#ifndef SetMenuID
- PyMac_PRECHECK(SetMenuID);
+ PyMac_PRECHECK(SetMenuID);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &menuID))
- return NULL;
- SetMenuID(_self->ob_itself,
- menuID);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &menuID))
+ return NULL;
+ SetMenuID(_self->ob_itself,
+ menuID);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MenuObj_SetMenuWidth(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- SInt16 width;
+ PyObject *_res = NULL;
+ SInt16 width;
#ifndef SetMenuWidth
- PyMac_PRECHECK(SetMenuWidth);
+ PyMac_PRECHECK(SetMenuWidth);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &width))
- return NULL;
- SetMenuWidth(_self->ob_itself,
- width);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &width))
+ return NULL;
+ SetMenuWidth(_self->ob_itself,
+ width);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MenuObj_SetMenuHeight(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- SInt16 height;
+ PyObject *_res = NULL;
+ SInt16 height;
#ifndef SetMenuHeight
- PyMac_PRECHECK(SetMenuHeight);
+ PyMac_PRECHECK(SetMenuHeight);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &height))
- return NULL;
- SetMenuHeight(_self->ob_itself,
- height);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &height))
+ return NULL;
+ SetMenuHeight(_self->ob_itself,
+ height);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MenuObj_as_Resource(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Handle _rv;
+ PyObject *_res = NULL;
+ Handle _rv;
#ifndef as_Resource
- PyMac_PRECHECK(as_Resource);
+ PyMac_PRECHECK(as_Resource);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = as_Resource(_self->ob_itself);
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = as_Resource(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *MenuObj_AppendMenu(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Str255 data;
+ PyObject *_res = NULL;
+ Str255 data;
#ifndef AppendMenu
- PyMac_PRECHECK(AppendMenu);
+ PyMac_PRECHECK(AppendMenu);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetStr255, data))
- return NULL;
- AppendMenu(_self->ob_itself,
- data);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetStr255, data))
+ return NULL;
+ AppendMenu(_self->ob_itself,
+ data);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MenuObj_InsertMenu(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short beforeID;
+ PyObject *_res = NULL;
+ short beforeID;
#ifndef InsertMenu
- PyMac_PRECHECK(InsertMenu);
+ PyMac_PRECHECK(InsertMenu);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &beforeID))
- return NULL;
- InsertMenu(_self->ob_itself,
- beforeID);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &beforeID))
+ return NULL;
+ InsertMenu(_self->ob_itself,
+ beforeID);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MenuObj_InsertMenuItem(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Str255 itemString;
- short afterItem;
+ PyObject *_res = NULL;
+ Str255 itemString;
+ short afterItem;
#ifndef InsertMenuItem
- PyMac_PRECHECK(InsertMenuItem);
+ PyMac_PRECHECK(InsertMenuItem);
#endif
- if (!PyArg_ParseTuple(_args, "O&h",
- PyMac_GetStr255, itemString,
- &afterItem))
- return NULL;
- InsertMenuItem(_self->ob_itself,
- itemString,
- afterItem);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&h",
+ PyMac_GetStr255, itemString,
+ &afterItem))
+ return NULL;
+ InsertMenuItem(_self->ob_itself,
+ itemString,
+ afterItem);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MenuObj_EnableMenuItem(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- UInt16 item;
+ PyObject *_res = NULL;
+ UInt16 item;
#ifndef EnableMenuItem
- PyMac_PRECHECK(EnableMenuItem);
+ PyMac_PRECHECK(EnableMenuItem);
#endif
- if (!PyArg_ParseTuple(_args, "H",
- &item))
- return NULL;
- EnableMenuItem(_self->ob_itself,
- item);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "H",
+ &item))
+ return NULL;
+ EnableMenuItem(_self->ob_itself,
+ item);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MenuObj_CheckMenuItem(MenuObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short item;
- Boolean checked;
+ PyObject *_res = NULL;
+ short item;
+ Boolean checked;
#ifndef CheckMenuItem
- PyMac_PRECHECK(CheckMenuItem);
+ PyMac_PRECHECK(CheckMenuItem);
#endif
- if (!PyArg_ParseTuple(_args, "hb",
- &item,
- &checked))
- return NULL;
- CheckMenuItem(_self->ob_itself,
- item,
- checked);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "hb",
+ &item,
+ &checked))
+ return NULL;
+ CheckMenuItem(_self->ob_itself,
+ item,
+ checked);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyMethodDef MenuObj_methods[] = {
- {"DisposeMenu", (PyCFunction)MenuObj_DisposeMenu, 1,
- PyDoc_STR("() -> None")},
- {"CalcMenuSize", (PyCFunction)MenuObj_CalcMenuSize, 1,
- PyDoc_STR("() -> None")},
- {"CountMenuItems", (PyCFunction)MenuObj_CountMenuItems, 1,
- PyDoc_STR("() -> (UInt16 _rv)")},
- {"GetMenuFont", (PyCFunction)MenuObj_GetMenuFont, 1,
- PyDoc_STR("() -> (SInt16 outFontID, UInt16 outFontSize)")},
- {"SetMenuFont", (PyCFunction)MenuObj_SetMenuFont, 1,
- PyDoc_STR("(SInt16 inFontID, UInt16 inFontSize) -> None")},
- {"GetMenuExcludesMarkColumn", (PyCFunction)MenuObj_GetMenuExcludesMarkColumn, 1,
- PyDoc_STR("() -> (Boolean _rv)")},
- {"SetMenuExcludesMarkColumn", (PyCFunction)MenuObj_SetMenuExcludesMarkColumn, 1,
- PyDoc_STR("(Boolean excludesMark) -> None")},
- {"IsValidMenu", (PyCFunction)MenuObj_IsValidMenu, 1,
- PyDoc_STR("() -> (Boolean _rv)")},
- {"GetMenuRetainCount", (PyCFunction)MenuObj_GetMenuRetainCount, 1,
- PyDoc_STR("() -> (ItemCount _rv)")},
- {"RetainMenu", (PyCFunction)MenuObj_RetainMenu, 1,
- PyDoc_STR("() -> None")},
- {"ReleaseMenu", (PyCFunction)MenuObj_ReleaseMenu, 1,
- PyDoc_STR("() -> None")},
- {"DuplicateMenu", (PyCFunction)MenuObj_DuplicateMenu, 1,
- PyDoc_STR("() -> (MenuHandle outMenu)")},
- {"CopyMenuTitleAsCFString", (PyCFunction)MenuObj_CopyMenuTitleAsCFString, 1,
- PyDoc_STR("() -> (CFStringRef outString)")},
- {"SetMenuTitleWithCFString", (PyCFunction)MenuObj_SetMenuTitleWithCFString, 1,
- PyDoc_STR("(CFStringRef inString) -> None")},
- {"InvalidateMenuSize", (PyCFunction)MenuObj_InvalidateMenuSize, 1,
- PyDoc_STR("() -> None")},
- {"IsMenuSizeInvalid", (PyCFunction)MenuObj_IsMenuSizeInvalid, 1,
- PyDoc_STR("() -> (Boolean _rv)")},
- {"MacAppendMenu", (PyCFunction)MenuObj_MacAppendMenu, 1,
- PyDoc_STR("(Str255 data) -> None")},
- {"InsertResMenu", (PyCFunction)MenuObj_InsertResMenu, 1,
- PyDoc_STR("(ResType theType, short afterItem) -> None")},
- {"AppendResMenu", (PyCFunction)MenuObj_AppendResMenu, 1,
- PyDoc_STR("(ResType theType) -> None")},
- {"MacInsertMenuItem", (PyCFunction)MenuObj_MacInsertMenuItem, 1,
- PyDoc_STR("(Str255 itemString, short afterItem) -> None")},
- {"DeleteMenuItem", (PyCFunction)MenuObj_DeleteMenuItem, 1,
- PyDoc_STR("(short item) -> None")},
- {"InsertFontResMenu", (PyCFunction)MenuObj_InsertFontResMenu, 1,
- PyDoc_STR("(short afterItem, short scriptFilter) -> None")},
- {"InsertIntlResMenu", (PyCFunction)MenuObj_InsertIntlResMenu, 1,
- PyDoc_STR("(ResType theType, short afterItem, short scriptFilter) -> None")},
- {"AppendMenuItemText", (PyCFunction)MenuObj_AppendMenuItemText, 1,
- PyDoc_STR("(Str255 inString) -> None")},
- {"InsertMenuItemText", (PyCFunction)MenuObj_InsertMenuItemText, 1,
- PyDoc_STR("(Str255 inString, MenuItemIndex afterItem) -> None")},
- {"CopyMenuItems", (PyCFunction)MenuObj_CopyMenuItems, 1,
- PyDoc_STR("(MenuItemIndex inFirstItem, ItemCount inNumItems, MenuHandle inDestMenu, MenuItemIndex inInsertAfter) -> None")},
- {"DeleteMenuItems", (PyCFunction)MenuObj_DeleteMenuItems, 1,
- PyDoc_STR("(MenuItemIndex inFirstItem, ItemCount inNumItems) -> None")},
- {"AppendMenuItemTextWithCFString", (PyCFunction)MenuObj_AppendMenuItemTextWithCFString, 1,
- PyDoc_STR("(CFStringRef inString, MenuItemAttributes inAttributes, MenuCommand inCommandID) -> (MenuItemIndex outNewItem)")},
- {"InsertMenuItemTextWithCFString", (PyCFunction)MenuObj_InsertMenuItemTextWithCFString, 1,
- PyDoc_STR("(CFStringRef inString, MenuItemIndex inAfterItem, MenuItemAttributes inAttributes, MenuCommand inCommandID) -> None")},
- {"PopUpMenuSelect", (PyCFunction)MenuObj_PopUpMenuSelect, 1,
- PyDoc_STR("(short top, short left, short popUpItem) -> (long _rv)")},
- {"InvalidateMenuEnabling", (PyCFunction)MenuObj_InvalidateMenuEnabling, 1,
- PyDoc_STR("() -> None")},
- {"IsMenuBarInvalid", (PyCFunction)MenuObj_IsMenuBarInvalid, 1,
- PyDoc_STR("() -> (Boolean _rv)")},
- {"MacInsertMenu", (PyCFunction)MenuObj_MacInsertMenu, 1,
- PyDoc_STR("(MenuID beforeID) -> None")},
- {"SetRootMenu", (PyCFunction)MenuObj_SetRootMenu, 1,
- PyDoc_STR("() -> None")},
- {"MacCheckMenuItem", (PyCFunction)MenuObj_MacCheckMenuItem, 1,
- PyDoc_STR("(short item, Boolean checked) -> None")},
- {"SetMenuItemText", (PyCFunction)MenuObj_SetMenuItemText, 1,
- PyDoc_STR("(short item, Str255 itemString) -> None")},
- {"GetMenuItemText", (PyCFunction)MenuObj_GetMenuItemText, 1,
- PyDoc_STR("(short item) -> (Str255 itemString)")},
- {"SetItemMark", (PyCFunction)MenuObj_SetItemMark, 1,
- PyDoc_STR("(short item, CharParameter markChar) -> None")},
- {"GetItemMark", (PyCFunction)MenuObj_GetItemMark, 1,
- PyDoc_STR("(short item) -> (CharParameter markChar)")},
- {"SetItemCmd", (PyCFunction)MenuObj_SetItemCmd, 1,
- PyDoc_STR("(short item, CharParameter cmdChar) -> None")},
- {"GetItemCmd", (PyCFunction)MenuObj_GetItemCmd, 1,
- PyDoc_STR("(short item) -> (CharParameter cmdChar)")},
- {"SetItemIcon", (PyCFunction)MenuObj_SetItemIcon, 1,
- PyDoc_STR("(short item, short iconIndex) -> None")},
- {"GetItemIcon", (PyCFunction)MenuObj_GetItemIcon, 1,
- PyDoc_STR("(short item) -> (short iconIndex)")},
- {"SetItemStyle", (PyCFunction)MenuObj_SetItemStyle, 1,
- PyDoc_STR("(short item, StyleParameter chStyle) -> None")},
- {"GetItemStyle", (PyCFunction)MenuObj_GetItemStyle, 1,
- PyDoc_STR("(short item) -> (Style chStyle)")},
- {"SetMenuItemCommandID", (PyCFunction)MenuObj_SetMenuItemCommandID, 1,
- PyDoc_STR("(SInt16 inItem, MenuCommand inCommandID) -> None")},
- {"GetMenuItemCommandID", (PyCFunction)MenuObj_GetMenuItemCommandID, 1,
- PyDoc_STR("(SInt16 inItem) -> (MenuCommand outCommandID)")},
- {"SetMenuItemModifiers", (PyCFunction)MenuObj_SetMenuItemModifiers, 1,
- PyDoc_STR("(SInt16 inItem, UInt8 inModifiers) -> None")},
- {"GetMenuItemModifiers", (PyCFunction)MenuObj_GetMenuItemModifiers, 1,
- PyDoc_STR("(SInt16 inItem) -> (UInt8 outModifiers)")},
- {"SetMenuItemIconHandle", (PyCFunction)MenuObj_SetMenuItemIconHandle, 1,
- PyDoc_STR("(SInt16 inItem, UInt8 inIconType, Handle inIconHandle) -> None")},
- {"GetMenuItemIconHandle", (PyCFunction)MenuObj_GetMenuItemIconHandle, 1,
- PyDoc_STR("(SInt16 inItem) -> (UInt8 outIconType, Handle outIconHandle)")},
- {"SetMenuItemTextEncoding", (PyCFunction)MenuObj_SetMenuItemTextEncoding, 1,
- PyDoc_STR("(SInt16 inItem, TextEncoding inScriptID) -> None")},
- {"GetMenuItemTextEncoding", (PyCFunction)MenuObj_GetMenuItemTextEncoding, 1,
- PyDoc_STR("(SInt16 inItem) -> (TextEncoding outScriptID)")},
- {"SetMenuItemHierarchicalID", (PyCFunction)MenuObj_SetMenuItemHierarchicalID, 1,
- PyDoc_STR("(SInt16 inItem, MenuID inHierID) -> None")},
- {"GetMenuItemHierarchicalID", (PyCFunction)MenuObj_GetMenuItemHierarchicalID, 1,
- PyDoc_STR("(SInt16 inItem) -> (MenuID outHierID)")},
- {"SetMenuItemFontID", (PyCFunction)MenuObj_SetMenuItemFontID, 1,
- PyDoc_STR("(SInt16 inItem, SInt16 inFontID) -> None")},
- {"GetMenuItemFontID", (PyCFunction)MenuObj_GetMenuItemFontID, 1,
- PyDoc_STR("(SInt16 inItem) -> (SInt16 outFontID)")},
- {"SetMenuItemRefCon", (PyCFunction)MenuObj_SetMenuItemRefCon, 1,
- PyDoc_STR("(SInt16 inItem, UInt32 inRefCon) -> None")},
- {"GetMenuItemRefCon", (PyCFunction)MenuObj_GetMenuItemRefCon, 1,
- PyDoc_STR("(SInt16 inItem) -> (UInt32 outRefCon)")},
- {"SetMenuItemKeyGlyph", (PyCFunction)MenuObj_SetMenuItemKeyGlyph, 1,
- PyDoc_STR("(SInt16 inItem, SInt16 inGlyph) -> None")},
- {"GetMenuItemKeyGlyph", (PyCFunction)MenuObj_GetMenuItemKeyGlyph, 1,
- PyDoc_STR("(SInt16 inItem) -> (SInt16 outGlyph)")},
- {"MacEnableMenuItem", (PyCFunction)MenuObj_MacEnableMenuItem, 1,
- PyDoc_STR("(MenuItemIndex item) -> None")},
- {"DisableMenuItem", (PyCFunction)MenuObj_DisableMenuItem, 1,
- PyDoc_STR("(MenuItemIndex item) -> None")},
- {"IsMenuItemEnabled", (PyCFunction)MenuObj_IsMenuItemEnabled, 1,
- PyDoc_STR("(MenuItemIndex item) -> (Boolean _rv)")},
- {"EnableMenuItemIcon", (PyCFunction)MenuObj_EnableMenuItemIcon, 1,
- PyDoc_STR("(MenuItemIndex item) -> None")},
- {"DisableMenuItemIcon", (PyCFunction)MenuObj_DisableMenuItemIcon, 1,
- PyDoc_STR("(MenuItemIndex item) -> None")},
- {"IsMenuItemIconEnabled", (PyCFunction)MenuObj_IsMenuItemIconEnabled, 1,
- PyDoc_STR("(MenuItemIndex item) -> (Boolean _rv)")},
- {"SetMenuItemHierarchicalMenu", (PyCFunction)MenuObj_SetMenuItemHierarchicalMenu, 1,
- PyDoc_STR("(MenuItemIndex inItem, MenuHandle inHierMenu) -> None")},
- {"GetMenuItemHierarchicalMenu", (PyCFunction)MenuObj_GetMenuItemHierarchicalMenu, 1,
- PyDoc_STR("(MenuItemIndex inItem) -> (MenuHandle outHierMenu)")},
- {"CopyMenuItemTextAsCFString", (PyCFunction)MenuObj_CopyMenuItemTextAsCFString, 1,
- PyDoc_STR("(MenuItemIndex inItem) -> (CFStringRef outString)")},
- {"SetMenuItemTextWithCFString", (PyCFunction)MenuObj_SetMenuItemTextWithCFString, 1,
- PyDoc_STR("(MenuItemIndex inItem, CFStringRef inString) -> None")},
- {"GetMenuItemIndent", (PyCFunction)MenuObj_GetMenuItemIndent, 1,
- PyDoc_STR("(MenuItemIndex inItem) -> (UInt32 outIndent)")},
- {"SetMenuItemIndent", (PyCFunction)MenuObj_SetMenuItemIndent, 1,
- PyDoc_STR("(MenuItemIndex inItem, UInt32 inIndent) -> None")},
- {"GetMenuItemCommandKey", (PyCFunction)MenuObj_GetMenuItemCommandKey, 1,
- PyDoc_STR("(MenuItemIndex inItem, Boolean inGetVirtualKey) -> (UInt16 outKey)")},
- {"SetMenuItemCommandKey", (PyCFunction)MenuObj_SetMenuItemCommandKey, 1,
- PyDoc_STR("(MenuItemIndex inItem, Boolean inSetVirtualKey, UInt16 inKey) -> None")},
- {"GetMenuItemPropertyAttributes", (PyCFunction)MenuObj_GetMenuItemPropertyAttributes, 1,
- PyDoc_STR("(MenuItemIndex item, OSType propertyCreator, OSType propertyTag) -> (UInt32 attributes)")},
- {"ChangeMenuItemPropertyAttributes", (PyCFunction)MenuObj_ChangeMenuItemPropertyAttributes, 1,
- PyDoc_STR("(MenuItemIndex item, OSType propertyCreator, OSType propertyTag, UInt32 attributesToSet, UInt32 attributesToClear) -> None")},
- {"GetMenuAttributes", (PyCFunction)MenuObj_GetMenuAttributes, 1,
- PyDoc_STR("() -> (MenuAttributes outAttributes)")},
- {"ChangeMenuAttributes", (PyCFunction)MenuObj_ChangeMenuAttributes, 1,
- PyDoc_STR("(MenuAttributes setTheseAttributes, MenuAttributes clearTheseAttributes) -> None")},
- {"GetMenuItemAttributes", (PyCFunction)MenuObj_GetMenuItemAttributes, 1,
- PyDoc_STR("(MenuItemIndex item) -> (MenuItemAttributes outAttributes)")},
- {"ChangeMenuItemAttributes", (PyCFunction)MenuObj_ChangeMenuItemAttributes, 1,
- PyDoc_STR("(MenuItemIndex item, MenuItemAttributes setTheseAttributes, MenuItemAttributes clearTheseAttributes) -> None")},
- {"DisableAllMenuItems", (PyCFunction)MenuObj_DisableAllMenuItems, 1,
- PyDoc_STR("() -> None")},
- {"EnableAllMenuItems", (PyCFunction)MenuObj_EnableAllMenuItems, 1,
- PyDoc_STR("() -> None")},
- {"MenuHasEnabledItems", (PyCFunction)MenuObj_MenuHasEnabledItems, 1,
- PyDoc_STR("() -> (Boolean _rv)")},
- {"GetMenuType", (PyCFunction)MenuObj_GetMenuType, 1,
- PyDoc_STR("() -> (UInt16 outType)")},
- {"CountMenuItemsWithCommandID", (PyCFunction)MenuObj_CountMenuItemsWithCommandID, 1,
- PyDoc_STR("(MenuCommand inCommandID) -> (ItemCount _rv)")},
- {"GetIndMenuItemWithCommandID", (PyCFunction)MenuObj_GetIndMenuItemWithCommandID, 1,
- PyDoc_STR("(MenuCommand inCommandID, UInt32 inItemIndex) -> (MenuHandle outMenu, MenuItemIndex outIndex)")},
- {"EnableMenuCommand", (PyCFunction)MenuObj_EnableMenuCommand, 1,
- PyDoc_STR("(MenuCommand inCommandID) -> None")},
- {"DisableMenuCommand", (PyCFunction)MenuObj_DisableMenuCommand, 1,
- PyDoc_STR("(MenuCommand inCommandID) -> None")},
- {"IsMenuCommandEnabled", (PyCFunction)MenuObj_IsMenuCommandEnabled, 1,
- PyDoc_STR("(MenuCommand inCommandID) -> (Boolean _rv)")},
- {"SetMenuCommandMark", (PyCFunction)MenuObj_SetMenuCommandMark, 1,
- PyDoc_STR("(MenuCommand inCommandID, UniChar inMark) -> None")},
- {"GetMenuCommandMark", (PyCFunction)MenuObj_GetMenuCommandMark, 1,
- PyDoc_STR("(MenuCommand inCommandID) -> (UniChar outMark)")},
- {"GetMenuCommandPropertySize", (PyCFunction)MenuObj_GetMenuCommandPropertySize, 1,
- PyDoc_STR("(MenuCommand inCommandID, OSType inPropertyCreator, OSType inPropertyTag) -> (ByteCount outSize)")},
- {"RemoveMenuCommandProperty", (PyCFunction)MenuObj_RemoveMenuCommandProperty, 1,
- PyDoc_STR("(MenuCommand inCommandID, OSType inPropertyCreator, OSType inPropertyTag) -> None")},
- {"IsMenuItemInvalid", (PyCFunction)MenuObj_IsMenuItemInvalid, 1,
- PyDoc_STR("(MenuItemIndex inItem) -> (Boolean _rv)")},
- {"InvalidateMenuItems", (PyCFunction)MenuObj_InvalidateMenuItems, 1,
- PyDoc_STR("(MenuItemIndex inFirstItem, ItemCount inNumItems) -> None")},
- {"UpdateInvalidMenuItems", (PyCFunction)MenuObj_UpdateInvalidMenuItems, 1,
- PyDoc_STR("() -> None")},
- {"CreateStandardFontMenu", (PyCFunction)MenuObj_CreateStandardFontMenu, 1,
- PyDoc_STR("(MenuItemIndex afterItem, MenuID firstHierMenuID, OptionBits options) -> (ItemCount outHierMenuCount)")},
- {"UpdateStandardFontMenu", (PyCFunction)MenuObj_UpdateStandardFontMenu, 1,
- PyDoc_STR("() -> (ItemCount outHierMenuCount)")},
- {"GetFontFamilyFromMenuSelection", (PyCFunction)MenuObj_GetFontFamilyFromMenuSelection, 1,
- PyDoc_STR("(MenuItemIndex item) -> (FMFontFamily outFontFamily, FMFontStyle outStyle)")},
- {"GetMenuID", (PyCFunction)MenuObj_GetMenuID, 1,
- PyDoc_STR("() -> (MenuID _rv)")},
- {"GetMenuWidth", (PyCFunction)MenuObj_GetMenuWidth, 1,
- PyDoc_STR("() -> (SInt16 _rv)")},
- {"GetMenuHeight", (PyCFunction)MenuObj_GetMenuHeight, 1,
- PyDoc_STR("() -> (SInt16 _rv)")},
- {"SetMenuID", (PyCFunction)MenuObj_SetMenuID, 1,
- PyDoc_STR("(MenuID menuID) -> None")},
- {"SetMenuWidth", (PyCFunction)MenuObj_SetMenuWidth, 1,
- PyDoc_STR("(SInt16 width) -> None")},
- {"SetMenuHeight", (PyCFunction)MenuObj_SetMenuHeight, 1,
- PyDoc_STR("(SInt16 height) -> None")},
- {"as_Resource", (PyCFunction)MenuObj_as_Resource, 1,
- PyDoc_STR("() -> (Handle _rv)")},
- {"AppendMenu", (PyCFunction)MenuObj_AppendMenu, 1,
- PyDoc_STR("(Str255 data) -> None")},
- {"InsertMenu", (PyCFunction)MenuObj_InsertMenu, 1,
- PyDoc_STR("(short beforeID) -> None")},
- {"InsertMenuItem", (PyCFunction)MenuObj_InsertMenuItem, 1,
- PyDoc_STR("(Str255 itemString, short afterItem) -> None")},
- {"EnableMenuItem", (PyCFunction)MenuObj_EnableMenuItem, 1,
- PyDoc_STR("(UInt16 item) -> None")},
- {"CheckMenuItem", (PyCFunction)MenuObj_CheckMenuItem, 1,
- PyDoc_STR("(short item, Boolean checked) -> None")},
- {NULL, NULL, 0}
+ {"DisposeMenu", (PyCFunction)MenuObj_DisposeMenu, 1,
+ PyDoc_STR("() -> None")},
+ {"CalcMenuSize", (PyCFunction)MenuObj_CalcMenuSize, 1,
+ PyDoc_STR("() -> None")},
+ {"CountMenuItems", (PyCFunction)MenuObj_CountMenuItems, 1,
+ PyDoc_STR("() -> (UInt16 _rv)")},
+ {"GetMenuFont", (PyCFunction)MenuObj_GetMenuFont, 1,
+ PyDoc_STR("() -> (SInt16 outFontID, UInt16 outFontSize)")},
+ {"SetMenuFont", (PyCFunction)MenuObj_SetMenuFont, 1,
+ PyDoc_STR("(SInt16 inFontID, UInt16 inFontSize) -> None")},
+ {"GetMenuExcludesMarkColumn", (PyCFunction)MenuObj_GetMenuExcludesMarkColumn, 1,
+ PyDoc_STR("() -> (Boolean _rv)")},
+ {"SetMenuExcludesMarkColumn", (PyCFunction)MenuObj_SetMenuExcludesMarkColumn, 1,
+ PyDoc_STR("(Boolean excludesMark) -> None")},
+ {"IsValidMenu", (PyCFunction)MenuObj_IsValidMenu, 1,
+ PyDoc_STR("() -> (Boolean _rv)")},
+ {"GetMenuRetainCount", (PyCFunction)MenuObj_GetMenuRetainCount, 1,
+ PyDoc_STR("() -> (ItemCount _rv)")},
+ {"RetainMenu", (PyCFunction)MenuObj_RetainMenu, 1,
+ PyDoc_STR("() -> None")},
+ {"ReleaseMenu", (PyCFunction)MenuObj_ReleaseMenu, 1,
+ PyDoc_STR("() -> None")},
+ {"DuplicateMenu", (PyCFunction)MenuObj_DuplicateMenu, 1,
+ PyDoc_STR("() -> (MenuHandle outMenu)")},
+ {"CopyMenuTitleAsCFString", (PyCFunction)MenuObj_CopyMenuTitleAsCFString, 1,
+ PyDoc_STR("() -> (CFStringRef outString)")},
+ {"SetMenuTitleWithCFString", (PyCFunction)MenuObj_SetMenuTitleWithCFString, 1,
+ PyDoc_STR("(CFStringRef inString) -> None")},
+ {"InvalidateMenuSize", (PyCFunction)MenuObj_InvalidateMenuSize, 1,
+ PyDoc_STR("() -> None")},
+ {"IsMenuSizeInvalid", (PyCFunction)MenuObj_IsMenuSizeInvalid, 1,
+ PyDoc_STR("() -> (Boolean _rv)")},
+ {"MacAppendMenu", (PyCFunction)MenuObj_MacAppendMenu, 1,
+ PyDoc_STR("(Str255 data) -> None")},
+ {"InsertResMenu", (PyCFunction)MenuObj_InsertResMenu, 1,
+ PyDoc_STR("(ResType theType, short afterItem) -> None")},
+ {"AppendResMenu", (PyCFunction)MenuObj_AppendResMenu, 1,
+ PyDoc_STR("(ResType theType) -> None")},
+ {"MacInsertMenuItem", (PyCFunction)MenuObj_MacInsertMenuItem, 1,
+ PyDoc_STR("(Str255 itemString, short afterItem) -> None")},
+ {"DeleteMenuItem", (PyCFunction)MenuObj_DeleteMenuItem, 1,
+ PyDoc_STR("(short item) -> None")},
+ {"InsertFontResMenu", (PyCFunction)MenuObj_InsertFontResMenu, 1,
+ PyDoc_STR("(short afterItem, short scriptFilter) -> None")},
+ {"InsertIntlResMenu", (PyCFunction)MenuObj_InsertIntlResMenu, 1,
+ PyDoc_STR("(ResType theType, short afterItem, short scriptFilter) -> None")},
+ {"AppendMenuItemText", (PyCFunction)MenuObj_AppendMenuItemText, 1,
+ PyDoc_STR("(Str255 inString) -> None")},
+ {"InsertMenuItemText", (PyCFunction)MenuObj_InsertMenuItemText, 1,
+ PyDoc_STR("(Str255 inString, MenuItemIndex afterItem) -> None")},
+ {"CopyMenuItems", (PyCFunction)MenuObj_CopyMenuItems, 1,
+ PyDoc_STR("(MenuItemIndex inFirstItem, ItemCount inNumItems, MenuHandle inDestMenu, MenuItemIndex inInsertAfter) -> None")},
+ {"DeleteMenuItems", (PyCFunction)MenuObj_DeleteMenuItems, 1,
+ PyDoc_STR("(MenuItemIndex inFirstItem, ItemCount inNumItems) -> None")},
+ {"AppendMenuItemTextWithCFString", (PyCFunction)MenuObj_AppendMenuItemTextWithCFString, 1,
+ PyDoc_STR("(CFStringRef inString, MenuItemAttributes inAttributes, MenuCommand inCommandID) -> (MenuItemIndex outNewItem)")},
+ {"InsertMenuItemTextWithCFString", (PyCFunction)MenuObj_InsertMenuItemTextWithCFString, 1,
+ PyDoc_STR("(CFStringRef inString, MenuItemIndex inAfterItem, MenuItemAttributes inAttributes, MenuCommand inCommandID) -> None")},
+ {"PopUpMenuSelect", (PyCFunction)MenuObj_PopUpMenuSelect, 1,
+ PyDoc_STR("(short top, short left, short popUpItem) -> (long _rv)")},
+ {"InvalidateMenuEnabling", (PyCFunction)MenuObj_InvalidateMenuEnabling, 1,
+ PyDoc_STR("() -> None")},
+ {"IsMenuBarInvalid", (PyCFunction)MenuObj_IsMenuBarInvalid, 1,
+ PyDoc_STR("() -> (Boolean _rv)")},
+ {"MacInsertMenu", (PyCFunction)MenuObj_MacInsertMenu, 1,
+ PyDoc_STR("(MenuID beforeID) -> None")},
+ {"SetRootMenu", (PyCFunction)MenuObj_SetRootMenu, 1,
+ PyDoc_STR("() -> None")},
+ {"MacCheckMenuItem", (PyCFunction)MenuObj_MacCheckMenuItem, 1,
+ PyDoc_STR("(short item, Boolean checked) -> None")},
+ {"SetMenuItemText", (PyCFunction)MenuObj_SetMenuItemText, 1,
+ PyDoc_STR("(short item, Str255 itemString) -> None")},
+ {"GetMenuItemText", (PyCFunction)MenuObj_GetMenuItemText, 1,
+ PyDoc_STR("(short item) -> (Str255 itemString)")},
+ {"SetItemMark", (PyCFunction)MenuObj_SetItemMark, 1,
+ PyDoc_STR("(short item, CharParameter markChar) -> None")},
+ {"GetItemMark", (PyCFunction)MenuObj_GetItemMark, 1,
+ PyDoc_STR("(short item) -> (CharParameter markChar)")},
+ {"SetItemCmd", (PyCFunction)MenuObj_SetItemCmd, 1,
+ PyDoc_STR("(short item, CharParameter cmdChar) -> None")},
+ {"GetItemCmd", (PyCFunction)MenuObj_GetItemCmd, 1,
+ PyDoc_STR("(short item) -> (CharParameter cmdChar)")},
+ {"SetItemIcon", (PyCFunction)MenuObj_SetItemIcon, 1,
+ PyDoc_STR("(short item, short iconIndex) -> None")},
+ {"GetItemIcon", (PyCFunction)MenuObj_GetItemIcon, 1,
+ PyDoc_STR("(short item) -> (short iconIndex)")},
+ {"SetItemStyle", (PyCFunction)MenuObj_SetItemStyle, 1,
+ PyDoc_STR("(short item, StyleParameter chStyle) -> None")},
+ {"GetItemStyle", (PyCFunction)MenuObj_GetItemStyle, 1,
+ PyDoc_STR("(short item) -> (Style chStyle)")},
+ {"SetMenuItemCommandID", (PyCFunction)MenuObj_SetMenuItemCommandID, 1,
+ PyDoc_STR("(SInt16 inItem, MenuCommand inCommandID) -> None")},
+ {"GetMenuItemCommandID", (PyCFunction)MenuObj_GetMenuItemCommandID, 1,
+ PyDoc_STR("(SInt16 inItem) -> (MenuCommand outCommandID)")},
+ {"SetMenuItemModifiers", (PyCFunction)MenuObj_SetMenuItemModifiers, 1,
+ PyDoc_STR("(SInt16 inItem, UInt8 inModifiers) -> None")},
+ {"GetMenuItemModifiers", (PyCFunction)MenuObj_GetMenuItemModifiers, 1,
+ PyDoc_STR("(SInt16 inItem) -> (UInt8 outModifiers)")},
+ {"SetMenuItemIconHandle", (PyCFunction)MenuObj_SetMenuItemIconHandle, 1,
+ PyDoc_STR("(SInt16 inItem, UInt8 inIconType, Handle inIconHandle) -> None")},
+ {"GetMenuItemIconHandle", (PyCFunction)MenuObj_GetMenuItemIconHandle, 1,
+ PyDoc_STR("(SInt16 inItem) -> (UInt8 outIconType, Handle outIconHandle)")},
+ {"SetMenuItemTextEncoding", (PyCFunction)MenuObj_SetMenuItemTextEncoding, 1,
+ PyDoc_STR("(SInt16 inItem, TextEncoding inScriptID) -> None")},
+ {"GetMenuItemTextEncoding", (PyCFunction)MenuObj_GetMenuItemTextEncoding, 1,
+ PyDoc_STR("(SInt16 inItem) -> (TextEncoding outScriptID)")},
+ {"SetMenuItemHierarchicalID", (PyCFunction)MenuObj_SetMenuItemHierarchicalID, 1,
+ PyDoc_STR("(SInt16 inItem, MenuID inHierID) -> None")},
+ {"GetMenuItemHierarchicalID", (PyCFunction)MenuObj_GetMenuItemHierarchicalID, 1,
+ PyDoc_STR("(SInt16 inItem) -> (MenuID outHierID)")},
+ {"SetMenuItemFontID", (PyCFunction)MenuObj_SetMenuItemFontID, 1,
+ PyDoc_STR("(SInt16 inItem, SInt16 inFontID) -> None")},
+ {"GetMenuItemFontID", (PyCFunction)MenuObj_GetMenuItemFontID, 1,
+ PyDoc_STR("(SInt16 inItem) -> (SInt16 outFontID)")},
+ {"SetMenuItemRefCon", (PyCFunction)MenuObj_SetMenuItemRefCon, 1,
+ PyDoc_STR("(SInt16 inItem, UInt32 inRefCon) -> None")},
+ {"GetMenuItemRefCon", (PyCFunction)MenuObj_GetMenuItemRefCon, 1,
+ PyDoc_STR("(SInt16 inItem) -> (UInt32 outRefCon)")},
+ {"SetMenuItemKeyGlyph", (PyCFunction)MenuObj_SetMenuItemKeyGlyph, 1,
+ PyDoc_STR("(SInt16 inItem, SInt16 inGlyph) -> None")},
+ {"GetMenuItemKeyGlyph", (PyCFunction)MenuObj_GetMenuItemKeyGlyph, 1,
+ PyDoc_STR("(SInt16 inItem) -> (SInt16 outGlyph)")},
+ {"MacEnableMenuItem", (PyCFunction)MenuObj_MacEnableMenuItem, 1,
+ PyDoc_STR("(MenuItemIndex item) -> None")},
+ {"DisableMenuItem", (PyCFunction)MenuObj_DisableMenuItem, 1,
+ PyDoc_STR("(MenuItemIndex item) -> None")},
+ {"IsMenuItemEnabled", (PyCFunction)MenuObj_IsMenuItemEnabled, 1,
+ PyDoc_STR("(MenuItemIndex item) -> (Boolean _rv)")},
+ {"EnableMenuItemIcon", (PyCFunction)MenuObj_EnableMenuItemIcon, 1,
+ PyDoc_STR("(MenuItemIndex item) -> None")},
+ {"DisableMenuItemIcon", (PyCFunction)MenuObj_DisableMenuItemIcon, 1,
+ PyDoc_STR("(MenuItemIndex item) -> None")},
+ {"IsMenuItemIconEnabled", (PyCFunction)MenuObj_IsMenuItemIconEnabled, 1,
+ PyDoc_STR("(MenuItemIndex item) -> (Boolean _rv)")},
+ {"SetMenuItemHierarchicalMenu", (PyCFunction)MenuObj_SetMenuItemHierarchicalMenu, 1,
+ PyDoc_STR("(MenuItemIndex inItem, MenuHandle inHierMenu) -> None")},
+ {"GetMenuItemHierarchicalMenu", (PyCFunction)MenuObj_GetMenuItemHierarchicalMenu, 1,
+ PyDoc_STR("(MenuItemIndex inItem) -> (MenuHandle outHierMenu)")},
+ {"CopyMenuItemTextAsCFString", (PyCFunction)MenuObj_CopyMenuItemTextAsCFString, 1,
+ PyDoc_STR("(MenuItemIndex inItem) -> (CFStringRef outString)")},
+ {"SetMenuItemTextWithCFString", (PyCFunction)MenuObj_SetMenuItemTextWithCFString, 1,
+ PyDoc_STR("(MenuItemIndex inItem, CFStringRef inString) -> None")},
+ {"GetMenuItemIndent", (PyCFunction)MenuObj_GetMenuItemIndent, 1,
+ PyDoc_STR("(MenuItemIndex inItem) -> (UInt32 outIndent)")},
+ {"SetMenuItemIndent", (PyCFunction)MenuObj_SetMenuItemIndent, 1,
+ PyDoc_STR("(MenuItemIndex inItem, UInt32 inIndent) -> None")},
+ {"GetMenuItemCommandKey", (PyCFunction)MenuObj_GetMenuItemCommandKey, 1,
+ PyDoc_STR("(MenuItemIndex inItem, Boolean inGetVirtualKey) -> (UInt16 outKey)")},
+ {"SetMenuItemCommandKey", (PyCFunction)MenuObj_SetMenuItemCommandKey, 1,
+ PyDoc_STR("(MenuItemIndex inItem, Boolean inSetVirtualKey, UInt16 inKey) -> None")},
+ {"GetMenuItemPropertyAttributes", (PyCFunction)MenuObj_GetMenuItemPropertyAttributes, 1,
+ PyDoc_STR("(MenuItemIndex item, OSType propertyCreator, OSType propertyTag) -> (UInt32 attributes)")},
+ {"ChangeMenuItemPropertyAttributes", (PyCFunction)MenuObj_ChangeMenuItemPropertyAttributes, 1,
+ PyDoc_STR("(MenuItemIndex item, OSType propertyCreator, OSType propertyTag, UInt32 attributesToSet, UInt32 attributesToClear) -> None")},
+ {"GetMenuAttributes", (PyCFunction)MenuObj_GetMenuAttributes, 1,
+ PyDoc_STR("() -> (MenuAttributes outAttributes)")},
+ {"ChangeMenuAttributes", (PyCFunction)MenuObj_ChangeMenuAttributes, 1,
+ PyDoc_STR("(MenuAttributes setTheseAttributes, MenuAttributes clearTheseAttributes) -> None")},
+ {"GetMenuItemAttributes", (PyCFunction)MenuObj_GetMenuItemAttributes, 1,
+ PyDoc_STR("(MenuItemIndex item) -> (MenuItemAttributes outAttributes)")},
+ {"ChangeMenuItemAttributes", (PyCFunction)MenuObj_ChangeMenuItemAttributes, 1,
+ PyDoc_STR("(MenuItemIndex item, MenuItemAttributes setTheseAttributes, MenuItemAttributes clearTheseAttributes) -> None")},
+ {"DisableAllMenuItems", (PyCFunction)MenuObj_DisableAllMenuItems, 1,
+ PyDoc_STR("() -> None")},
+ {"EnableAllMenuItems", (PyCFunction)MenuObj_EnableAllMenuItems, 1,
+ PyDoc_STR("() -> None")},
+ {"MenuHasEnabledItems", (PyCFunction)MenuObj_MenuHasEnabledItems, 1,
+ PyDoc_STR("() -> (Boolean _rv)")},
+ {"GetMenuType", (PyCFunction)MenuObj_GetMenuType, 1,
+ PyDoc_STR("() -> (UInt16 outType)")},
+ {"CountMenuItemsWithCommandID", (PyCFunction)MenuObj_CountMenuItemsWithCommandID, 1,
+ PyDoc_STR("(MenuCommand inCommandID) -> (ItemCount _rv)")},
+ {"GetIndMenuItemWithCommandID", (PyCFunction)MenuObj_GetIndMenuItemWithCommandID, 1,
+ PyDoc_STR("(MenuCommand inCommandID, UInt32 inItemIndex) -> (MenuHandle outMenu, MenuItemIndex outIndex)")},
+ {"EnableMenuCommand", (PyCFunction)MenuObj_EnableMenuCommand, 1,
+ PyDoc_STR("(MenuCommand inCommandID) -> None")},
+ {"DisableMenuCommand", (PyCFunction)MenuObj_DisableMenuCommand, 1,
+ PyDoc_STR("(MenuCommand inCommandID) -> None")},
+ {"IsMenuCommandEnabled", (PyCFunction)MenuObj_IsMenuCommandEnabled, 1,
+ PyDoc_STR("(MenuCommand inCommandID) -> (Boolean _rv)")},
+ {"SetMenuCommandMark", (PyCFunction)MenuObj_SetMenuCommandMark, 1,
+ PyDoc_STR("(MenuCommand inCommandID, UniChar inMark) -> None")},
+ {"GetMenuCommandMark", (PyCFunction)MenuObj_GetMenuCommandMark, 1,
+ PyDoc_STR("(MenuCommand inCommandID) -> (UniChar outMark)")},
+ {"GetMenuCommandPropertySize", (PyCFunction)MenuObj_GetMenuCommandPropertySize, 1,
+ PyDoc_STR("(MenuCommand inCommandID, OSType inPropertyCreator, OSType inPropertyTag) -> (ByteCount outSize)")},
+ {"RemoveMenuCommandProperty", (PyCFunction)MenuObj_RemoveMenuCommandProperty, 1,
+ PyDoc_STR("(MenuCommand inCommandID, OSType inPropertyCreator, OSType inPropertyTag) -> None")},
+ {"IsMenuItemInvalid", (PyCFunction)MenuObj_IsMenuItemInvalid, 1,
+ PyDoc_STR("(MenuItemIndex inItem) -> (Boolean _rv)")},
+ {"InvalidateMenuItems", (PyCFunction)MenuObj_InvalidateMenuItems, 1,
+ PyDoc_STR("(MenuItemIndex inFirstItem, ItemCount inNumItems) -> None")},
+ {"UpdateInvalidMenuItems", (PyCFunction)MenuObj_UpdateInvalidMenuItems, 1,
+ PyDoc_STR("() -> None")},
+ {"CreateStandardFontMenu", (PyCFunction)MenuObj_CreateStandardFontMenu, 1,
+ PyDoc_STR("(MenuItemIndex afterItem, MenuID firstHierMenuID, OptionBits options) -> (ItemCount outHierMenuCount)")},
+ {"UpdateStandardFontMenu", (PyCFunction)MenuObj_UpdateStandardFontMenu, 1,
+ PyDoc_STR("() -> (ItemCount outHierMenuCount)")},
+ {"GetFontFamilyFromMenuSelection", (PyCFunction)MenuObj_GetFontFamilyFromMenuSelection, 1,
+ PyDoc_STR("(MenuItemIndex item) -> (FMFontFamily outFontFamily, FMFontStyle outStyle)")},
+ {"GetMenuID", (PyCFunction)MenuObj_GetMenuID, 1,
+ PyDoc_STR("() -> (MenuID _rv)")},
+ {"GetMenuWidth", (PyCFunction)MenuObj_GetMenuWidth, 1,
+ PyDoc_STR("() -> (SInt16 _rv)")},
+ {"GetMenuHeight", (PyCFunction)MenuObj_GetMenuHeight, 1,
+ PyDoc_STR("() -> (SInt16 _rv)")},
+ {"SetMenuID", (PyCFunction)MenuObj_SetMenuID, 1,
+ PyDoc_STR("(MenuID menuID) -> None")},
+ {"SetMenuWidth", (PyCFunction)MenuObj_SetMenuWidth, 1,
+ PyDoc_STR("(SInt16 width) -> None")},
+ {"SetMenuHeight", (PyCFunction)MenuObj_SetMenuHeight, 1,
+ PyDoc_STR("(SInt16 height) -> None")},
+ {"as_Resource", (PyCFunction)MenuObj_as_Resource, 1,
+ PyDoc_STR("() -> (Handle _rv)")},
+ {"AppendMenu", (PyCFunction)MenuObj_AppendMenu, 1,
+ PyDoc_STR("(Str255 data) -> None")},
+ {"InsertMenu", (PyCFunction)MenuObj_InsertMenu, 1,
+ PyDoc_STR("(short beforeID) -> None")},
+ {"InsertMenuItem", (PyCFunction)MenuObj_InsertMenuItem, 1,
+ PyDoc_STR("(Str255 itemString, short afterItem) -> None")},
+ {"EnableMenuItem", (PyCFunction)MenuObj_EnableMenuItem, 1,
+ PyDoc_STR("(UInt16 item) -> None")},
+ {"CheckMenuItem", (PyCFunction)MenuObj_CheckMenuItem, 1,
+ PyDoc_STR("(short item, Boolean checked) -> None")},
+ {NULL, NULL, 0}
};
#define MenuObj_getsetlist NULL
@@ -2540,61 +2540,61 @@ static PyMethodDef MenuObj_methods[] = {
static PyObject *MenuObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
- PyObject *_self;
- MenuHandle itself;
- char *kw[] = {"itself", 0};
+ 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;
+ 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 = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
- "_Menu.Menu", /*tp_name*/
- sizeof(MenuObject), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- /* methods */
- (destructor) MenuObj_dealloc, /*tp_dealloc*/
- 0, /*tp_print*/
- (getattrfunc)0, /*tp_getattr*/
- (setattrfunc)0, /*tp_setattr*/
- (cmpfunc) MenuObj_compare, /*tp_compare*/
- (reprfunc) MenuObj_repr, /*tp_repr*/
- (PyNumberMethods *)0, /* tp_as_number */
- (PySequenceMethods *)0, /* tp_as_sequence */
- (PyMappingMethods *)0, /* tp_as_mapping */
- (hashfunc) MenuObj_hash, /*tp_hash*/
- 0, /*tp_call*/
- 0, /*tp_str*/
- PyObject_GenericGetAttr, /*tp_getattro*/
- PyObject_GenericSetAttr, /*tp_setattro */
- 0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
- 0, /*tp_doc*/
- 0, /*tp_traverse*/
- 0, /*tp_clear*/
- 0, /*tp_richcompare*/
- 0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
- 0, /*tp_iternext*/
- MenuObj_methods, /* tp_methods */
- 0, /*tp_members*/
- MenuObj_getsetlist, /*tp_getset*/
- 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 */
+ PyObject_HEAD_INIT(NULL)
+ 0, /*ob_size*/
+ "_Menu.Menu", /*tp_name*/
+ sizeof(MenuObject), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ /* methods */
+ (destructor) MenuObj_dealloc, /*tp_dealloc*/
+ 0, /*tp_print*/
+ (getattrfunc)0, /*tp_getattr*/
+ (setattrfunc)0, /*tp_setattr*/
+ (cmpfunc) MenuObj_compare, /*tp_compare*/
+ (reprfunc) MenuObj_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) MenuObj_hash, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ PyObject_GenericGetAttr, /*tp_getattro*/
+ PyObject_GenericSetAttr, /*tp_setattro */
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
+ 0, /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ MenuObj_methods, /* tp_methods */
+ 0, /*tp_members*/
+ MenuObj_getsetlist, /*tp_getset*/
+ 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 ---------------------- */
@@ -2602,842 +2602,842 @@ PyTypeObject Menu_Type = {
static PyObject *Menu_NewMenu(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- MenuHandle _rv;
- MenuID menuID;
- Str255 menuTitle;
+ PyObject *_res = NULL;
+ MenuHandle _rv;
+ MenuID menuID;
+ Str255 menuTitle;
#ifndef NewMenu
- PyMac_PRECHECK(NewMenu);
+ PyMac_PRECHECK(NewMenu);
#endif
- if (!PyArg_ParseTuple(_args, "hO&",
- &menuID,
- PyMac_GetStr255, menuTitle))
- return NULL;
- _rv = NewMenu(menuID,
- menuTitle);
- _res = Py_BuildValue("O&",
- MenuObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "hO&",
+ &menuID,
+ PyMac_GetStr255, menuTitle))
+ return NULL;
+ _rv = NewMenu(menuID,
+ menuTitle);
+ _res = Py_BuildValue("O&",
+ MenuObj_New, _rv);
+ return _res;
}
static PyObject *Menu_MacGetMenu(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- MenuHandle _rv;
- short resourceID;
+ PyObject *_res = NULL;
+ MenuHandle _rv;
+ short resourceID;
#ifndef MacGetMenu
- PyMac_PRECHECK(MacGetMenu);
+ PyMac_PRECHECK(MacGetMenu);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &resourceID))
- return NULL;
- _rv = MacGetMenu(resourceID);
- _res = Py_BuildValue("O&",
- MenuObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &resourceID))
+ return NULL;
+ _rv = MacGetMenu(resourceID);
+ _res = Py_BuildValue("O&",
+ MenuObj_New, _rv);
+ return _res;
}
static PyObject *Menu_CreateNewMenu(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- MenuID inMenuID;
- MenuAttributes inMenuAttributes;
- MenuHandle outMenuRef;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ MenuID inMenuID;
+ MenuAttributes inMenuAttributes;
+ MenuHandle outMenuRef;
#ifndef CreateNewMenu
- PyMac_PRECHECK(CreateNewMenu);
+ PyMac_PRECHECK(CreateNewMenu);
#endif
- if (!PyArg_ParseTuple(_args, "hl",
- &inMenuID,
- &inMenuAttributes))
- return NULL;
- _err = CreateNewMenu(inMenuID,
- inMenuAttributes,
- &outMenuRef);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- MenuObj_New, outMenuRef);
- return _res;
+ if (!PyArg_ParseTuple(_args, "hl",
+ &inMenuID,
+ &inMenuAttributes))
+ return NULL;
+ _err = CreateNewMenu(inMenuID,
+ inMenuAttributes,
+ &outMenuRef);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ MenuObj_New, outMenuRef);
+ return _res;
}
static PyObject *Menu_MenuKey(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- long _rv;
- CharParameter ch;
+ PyObject *_res = NULL;
+ long _rv;
+ CharParameter ch;
#ifndef MenuKey
- PyMac_PRECHECK(MenuKey);
+ PyMac_PRECHECK(MenuKey);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &ch))
- return NULL;
- _rv = MenuKey(ch);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &ch))
+ return NULL;
+ _rv = MenuKey(ch);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Menu_MenuSelect(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- long _rv;
- Point startPt;
+ PyObject *_res = NULL;
+ long _rv;
+ Point startPt;
#ifndef MenuSelect
- PyMac_PRECHECK(MenuSelect);
+ PyMac_PRECHECK(MenuSelect);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetPoint, &startPt))
- return NULL;
- _rv = MenuSelect(startPt);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetPoint, &startPt))
+ return NULL;
+ _rv = MenuSelect(startPt);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Menu_MenuChoice(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- long _rv;
+ PyObject *_res = NULL;
+ long _rv;
#ifndef MenuChoice
- PyMac_PRECHECK(MenuChoice);
+ PyMac_PRECHECK(MenuChoice);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = MenuChoice();
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = MenuChoice();
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Menu_MenuEvent(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- UInt32 _rv;
- EventRecord inEvent;
+ PyObject *_res = NULL;
+ UInt32 _rv;
+ EventRecord inEvent;
#ifndef MenuEvent
- PyMac_PRECHECK(MenuEvent);
+ PyMac_PRECHECK(MenuEvent);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetEventRecord, &inEvent))
- return NULL;
- _rv = MenuEvent(&inEvent);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetEventRecord, &inEvent))
+ return NULL;
+ _rv = MenuEvent(&inEvent);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Menu_GetMBarHeight(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short _rv;
+ PyObject *_res = NULL;
+ short _rv;
#ifndef GetMBarHeight
- PyMac_PRECHECK(GetMBarHeight);
+ PyMac_PRECHECK(GetMBarHeight);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetMBarHeight();
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetMBarHeight();
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *Menu_MacDrawMenuBar(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef MacDrawMenuBar
- PyMac_PRECHECK(MacDrawMenuBar);
+ PyMac_PRECHECK(MacDrawMenuBar);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- MacDrawMenuBar();
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ MacDrawMenuBar();
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Menu_InvalMenuBar(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef InvalMenuBar
- PyMac_PRECHECK(InvalMenuBar);
+ PyMac_PRECHECK(InvalMenuBar);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- InvalMenuBar();
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ InvalMenuBar();
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Menu_HiliteMenu(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- MenuID menuID;
+ PyObject *_res = NULL;
+ MenuID menuID;
#ifndef HiliteMenu
- PyMac_PRECHECK(HiliteMenu);
+ PyMac_PRECHECK(HiliteMenu);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &menuID))
- return NULL;
- HiliteMenu(menuID);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &menuID))
+ return NULL;
+ HiliteMenu(menuID);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Menu_GetNewMBar(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- MenuBarHandle _rv;
- short menuBarID;
+ PyObject *_res = NULL;
+ MenuBarHandle _rv;
+ short menuBarID;
#ifndef GetNewMBar
- PyMac_PRECHECK(GetNewMBar);
+ PyMac_PRECHECK(GetNewMBar);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &menuBarID))
- return NULL;
- _rv = GetNewMBar(menuBarID);
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &menuBarID))
+ return NULL;
+ _rv = GetNewMBar(menuBarID);
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *Menu_GetMenuBar(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- MenuBarHandle _rv;
+ PyObject *_res = NULL;
+ MenuBarHandle _rv;
#ifndef GetMenuBar
- PyMac_PRECHECK(GetMenuBar);
+ PyMac_PRECHECK(GetMenuBar);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetMenuBar();
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetMenuBar();
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *Menu_SetMenuBar(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- MenuBarHandle mbar;
+ PyObject *_res = NULL;
+ MenuBarHandle mbar;
#ifndef SetMenuBar
- PyMac_PRECHECK(SetMenuBar);
+ PyMac_PRECHECK(SetMenuBar);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &mbar))
- return NULL;
- SetMenuBar(mbar);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &mbar))
+ return NULL;
+ SetMenuBar(mbar);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Menu_DuplicateMenuBar(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- MenuBarHandle inMbar;
- MenuBarHandle outMbar;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ MenuBarHandle inMbar;
+ MenuBarHandle outMbar;
#ifndef DuplicateMenuBar
- PyMac_PRECHECK(DuplicateMenuBar);
+ PyMac_PRECHECK(DuplicateMenuBar);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &inMbar))
- return NULL;
- _err = DuplicateMenuBar(inMbar,
- &outMbar);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- ResObj_New, outMbar);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &inMbar))
+ return NULL;
+ _err = DuplicateMenuBar(inMbar,
+ &outMbar);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ ResObj_New, outMbar);
+ return _res;
}
static PyObject *Menu_DisposeMenuBar(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- MenuBarHandle inMbar;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ MenuBarHandle inMbar;
#ifndef DisposeMenuBar
- PyMac_PRECHECK(DisposeMenuBar);
+ PyMac_PRECHECK(DisposeMenuBar);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &inMbar))
- return NULL;
- _err = DisposeMenuBar(inMbar);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &inMbar))
+ return NULL;
+ _err = DisposeMenuBar(inMbar);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Menu_GetMenuHandle(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- MenuHandle _rv;
- MenuID menuID;
+ PyObject *_res = NULL;
+ MenuHandle _rv;
+ MenuID menuID;
#ifndef GetMenuHandle
- PyMac_PRECHECK(GetMenuHandle);
+ PyMac_PRECHECK(GetMenuHandle);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &menuID))
- return NULL;
- _rv = GetMenuHandle(menuID);
- _res = Py_BuildValue("O&",
- MenuObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &menuID))
+ return NULL;
+ _rv = GetMenuHandle(menuID);
+ _res = Py_BuildValue("O&",
+ MenuObj_New, _rv);
+ return _res;
}
static PyObject *Menu_MacDeleteMenu(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- MenuID menuID;
+ PyObject *_res = NULL;
+ MenuID menuID;
#ifndef MacDeleteMenu
- PyMac_PRECHECK(MacDeleteMenu);
+ PyMac_PRECHECK(MacDeleteMenu);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &menuID))
- return NULL;
- MacDeleteMenu(menuID);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &menuID))
+ return NULL;
+ MacDeleteMenu(menuID);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Menu_ClearMenuBar(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef ClearMenuBar
- PyMac_PRECHECK(ClearMenuBar);
+ PyMac_PRECHECK(ClearMenuBar);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- ClearMenuBar();
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ ClearMenuBar();
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Menu_SetMenuFlashCount(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short count;
+ PyObject *_res = NULL;
+ short count;
#ifndef SetMenuFlashCount
- PyMac_PRECHECK(SetMenuFlashCount);
+ PyMac_PRECHECK(SetMenuFlashCount);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &count))
- return NULL;
- SetMenuFlashCount(count);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &count))
+ return NULL;
+ SetMenuFlashCount(count);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Menu_FlashMenuBar(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- MenuID menuID;
+ PyObject *_res = NULL;
+ MenuID menuID;
#ifndef FlashMenuBar
- PyMac_PRECHECK(FlashMenuBar);
+ PyMac_PRECHECK(FlashMenuBar);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &menuID))
- return NULL;
- FlashMenuBar(menuID);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &menuID))
+ return NULL;
+ FlashMenuBar(menuID);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Menu_IsMenuBarVisible(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
+ PyObject *_res = NULL;
+ Boolean _rv;
#ifndef IsMenuBarVisible
- PyMac_PRECHECK(IsMenuBarVisible);
+ PyMac_PRECHECK(IsMenuBarVisible);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = IsMenuBarVisible();
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = IsMenuBarVisible();
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *Menu_ShowMenuBar(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef ShowMenuBar
- PyMac_PRECHECK(ShowMenuBar);
+ PyMac_PRECHECK(ShowMenuBar);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- ShowMenuBar();
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ ShowMenuBar();
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Menu_HideMenuBar(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef HideMenuBar
- PyMac_PRECHECK(HideMenuBar);
+ PyMac_PRECHECK(HideMenuBar);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- HideMenuBar();
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ HideMenuBar();
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Menu_AcquireRootMenu(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- MenuHandle _rv;
+ PyObject *_res = NULL;
+ MenuHandle _rv;
#ifndef AcquireRootMenu
- PyMac_PRECHECK(AcquireRootMenu);
+ PyMac_PRECHECK(AcquireRootMenu);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = AcquireRootMenu();
- _res = Py_BuildValue("O&",
- MenuObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = AcquireRootMenu();
+ _res = Py_BuildValue("O&",
+ MenuObj_New, _rv);
+ return _res;
}
static PyObject *Menu_DeleteMCEntries(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- MenuID menuID;
- short menuItem;
+ PyObject *_res = NULL;
+ MenuID menuID;
+ short menuItem;
#ifndef DeleteMCEntries
- PyMac_PRECHECK(DeleteMCEntries);
+ PyMac_PRECHECK(DeleteMCEntries);
#endif
- if (!PyArg_ParseTuple(_args, "hh",
- &menuID,
- &menuItem))
- return NULL;
- DeleteMCEntries(menuID,
- menuItem);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "hh",
+ &menuID,
+ &menuItem))
+ return NULL;
+ DeleteMCEntries(menuID,
+ menuItem);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Menu_InitContextualMenus(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
+ PyObject *_res = NULL;
+ OSStatus _err;
#ifndef InitContextualMenus
- PyMac_PRECHECK(InitContextualMenus);
+ PyMac_PRECHECK(InitContextualMenus);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = InitContextualMenus();
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = InitContextualMenus();
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Menu_IsShowContextualMenuClick(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- EventRecord inEvent;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ EventRecord inEvent;
#ifndef IsShowContextualMenuClick
- PyMac_PRECHECK(IsShowContextualMenuClick);
+ PyMac_PRECHECK(IsShowContextualMenuClick);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetEventRecord, &inEvent))
- return NULL;
- _rv = IsShowContextualMenuClick(&inEvent);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetEventRecord, &inEvent))
+ return NULL;
+ _rv = IsShowContextualMenuClick(&inEvent);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *Menu_LMGetTheMenu(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- SInt16 _rv;
+ PyObject *_res = NULL;
+ SInt16 _rv;
#ifndef LMGetTheMenu
- PyMac_PRECHECK(LMGetTheMenu);
+ PyMac_PRECHECK(LMGetTheMenu);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = LMGetTheMenu();
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = LMGetTheMenu();
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *Menu_as_Menu(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- MenuHandle _rv;
- Handle h;
+ PyObject *_res = NULL;
+ MenuHandle _rv;
+ Handle h;
#ifndef as_Menu
- PyMac_PRECHECK(as_Menu);
+ PyMac_PRECHECK(as_Menu);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &h))
- return NULL;
- _rv = as_Menu(h);
- _res = Py_BuildValue("O&",
- MenuObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &h))
+ return NULL;
+ _rv = as_Menu(h);
+ _res = Py_BuildValue("O&",
+ MenuObj_New, _rv);
+ return _res;
}
static PyObject *Menu_GetMenu(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- MenuHandle _rv;
- short resourceID;
+ PyObject *_res = NULL;
+ MenuHandle _rv;
+ short resourceID;
#ifndef GetMenu
- PyMac_PRECHECK(GetMenu);
+ PyMac_PRECHECK(GetMenu);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &resourceID))
- return NULL;
- _rv = GetMenu(resourceID);
- _res = Py_BuildValue("O&",
- MenuObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &resourceID))
+ return NULL;
+ _rv = GetMenu(resourceID);
+ _res = Py_BuildValue("O&",
+ MenuObj_New, _rv);
+ return _res;
}
static PyObject *Menu_DeleteMenu(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short menuID;
+ PyObject *_res = NULL;
+ short menuID;
#ifndef DeleteMenu
- PyMac_PRECHECK(DeleteMenu);
+ PyMac_PRECHECK(DeleteMenu);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &menuID))
- return NULL;
- DeleteMenu(menuID);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &menuID))
+ return NULL;
+ DeleteMenu(menuID);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Menu_DrawMenuBar(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef DrawMenuBar
- PyMac_PRECHECK(DrawMenuBar);
+ PyMac_PRECHECK(DrawMenuBar);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- DrawMenuBar();
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ DrawMenuBar();
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Menu_CountMenuItemsWithCommandID(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ItemCount _rv;
- MenuHandle inMenu;
- MenuCommand inCommandID;
+ PyObject *_res = NULL;
+ ItemCount _rv;
+ MenuHandle inMenu;
+ MenuCommand inCommandID;
#ifndef CountMenuItemsWithCommandID
- PyMac_PRECHECK(CountMenuItemsWithCommandID);
+ PyMac_PRECHECK(CountMenuItemsWithCommandID);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- OptMenuObj_Convert, &inMenu,
- &inCommandID))
- return NULL;
- _rv = CountMenuItemsWithCommandID(inMenu,
- inCommandID);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ OptMenuObj_Convert, &inMenu,
+ &inCommandID))
+ return NULL;
+ _rv = CountMenuItemsWithCommandID(inMenu,
+ inCommandID);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Menu_GetIndMenuItemWithCommandID(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- MenuHandle inMenu;
- MenuCommand inCommandID;
- UInt32 inItemIndex;
- MenuHandle outMenu;
- MenuItemIndex outIndex;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ MenuHandle inMenu;
+ MenuCommand inCommandID;
+ UInt32 inItemIndex;
+ MenuHandle outMenu;
+ MenuItemIndex outIndex;
#ifndef GetIndMenuItemWithCommandID
- PyMac_PRECHECK(GetIndMenuItemWithCommandID);
-#endif
- if (!PyArg_ParseTuple(_args, "O&ll",
- OptMenuObj_Convert, &inMenu,
- &inCommandID,
- &inItemIndex))
- return NULL;
- _err = GetIndMenuItemWithCommandID(inMenu,
- inCommandID,
- inItemIndex,
- &outMenu,
- &outIndex);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&h",
- MenuObj_New, outMenu,
- outIndex);
- return _res;
+ PyMac_PRECHECK(GetIndMenuItemWithCommandID);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&ll",
+ OptMenuObj_Convert, &inMenu,
+ &inCommandID,
+ &inItemIndex))
+ return NULL;
+ _err = GetIndMenuItemWithCommandID(inMenu,
+ inCommandID,
+ inItemIndex,
+ &outMenu,
+ &outIndex);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&h",
+ MenuObj_New, outMenu,
+ outIndex);
+ return _res;
}
static PyObject *Menu_EnableMenuCommand(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- MenuHandle inMenu;
- MenuCommand inCommandID;
+ PyObject *_res = NULL;
+ MenuHandle inMenu;
+ MenuCommand inCommandID;
#ifndef EnableMenuCommand
- PyMac_PRECHECK(EnableMenuCommand);
+ PyMac_PRECHECK(EnableMenuCommand);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- OptMenuObj_Convert, &inMenu,
- &inCommandID))
- return NULL;
- EnableMenuCommand(inMenu,
- inCommandID);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ OptMenuObj_Convert, &inMenu,
+ &inCommandID))
+ return NULL;
+ EnableMenuCommand(inMenu,
+ inCommandID);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Menu_DisableMenuCommand(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- MenuHandle inMenu;
- MenuCommand inCommandID;
+ PyObject *_res = NULL;
+ MenuHandle inMenu;
+ MenuCommand inCommandID;
#ifndef DisableMenuCommand
- PyMac_PRECHECK(DisableMenuCommand);
+ PyMac_PRECHECK(DisableMenuCommand);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- OptMenuObj_Convert, &inMenu,
- &inCommandID))
- return NULL;
- DisableMenuCommand(inMenu,
- inCommandID);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ OptMenuObj_Convert, &inMenu,
+ &inCommandID))
+ return NULL;
+ DisableMenuCommand(inMenu,
+ inCommandID);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Menu_IsMenuCommandEnabled(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- MenuHandle inMenu;
- MenuCommand inCommandID;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ MenuHandle inMenu;
+ MenuCommand inCommandID;
#ifndef IsMenuCommandEnabled
- PyMac_PRECHECK(IsMenuCommandEnabled);
+ PyMac_PRECHECK(IsMenuCommandEnabled);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- OptMenuObj_Convert, &inMenu,
- &inCommandID))
- return NULL;
- _rv = IsMenuCommandEnabled(inMenu,
- inCommandID);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ OptMenuObj_Convert, &inMenu,
+ &inCommandID))
+ return NULL;
+ _rv = IsMenuCommandEnabled(inMenu,
+ inCommandID);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *Menu_SetMenuCommandMark(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- MenuHandle inMenu;
- MenuCommand inCommandID;
- UniChar inMark;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ MenuHandle inMenu;
+ MenuCommand inCommandID;
+ UniChar inMark;
#ifndef SetMenuCommandMark
- PyMac_PRECHECK(SetMenuCommandMark);
-#endif
- if (!PyArg_ParseTuple(_args, "O&lh",
- OptMenuObj_Convert, &inMenu,
- &inCommandID,
- &inMark))
- return NULL;
- _err = SetMenuCommandMark(inMenu,
- inCommandID,
- inMark);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(SetMenuCommandMark);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&lh",
+ OptMenuObj_Convert, &inMenu,
+ &inCommandID,
+ &inMark))
+ return NULL;
+ _err = SetMenuCommandMark(inMenu,
+ inCommandID,
+ inMark);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Menu_GetMenuCommandMark(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- MenuHandle inMenu;
- MenuCommand inCommandID;
- UniChar outMark;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ MenuHandle inMenu;
+ MenuCommand inCommandID;
+ UniChar outMark;
#ifndef GetMenuCommandMark
- PyMac_PRECHECK(GetMenuCommandMark);
+ PyMac_PRECHECK(GetMenuCommandMark);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- OptMenuObj_Convert, &inMenu,
- &inCommandID))
- return NULL;
- _err = GetMenuCommandMark(inMenu,
- inCommandID,
- &outMark);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("h",
- outMark);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ OptMenuObj_Convert, &inMenu,
+ &inCommandID))
+ return NULL;
+ _err = GetMenuCommandMark(inMenu,
+ inCommandID,
+ &outMark);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("h",
+ outMark);
+ return _res;
}
static PyObject *Menu_GetMenuCommandPropertySize(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- MenuHandle inMenu;
- MenuCommand inCommandID;
- OSType inPropertyCreator;
- OSType inPropertyTag;
- ByteCount outSize;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ MenuHandle inMenu;
+ MenuCommand inCommandID;
+ OSType inPropertyCreator;
+ OSType inPropertyTag;
+ ByteCount outSize;
#ifndef GetMenuCommandPropertySize
- PyMac_PRECHECK(GetMenuCommandPropertySize);
-#endif
- if (!PyArg_ParseTuple(_args, "O&lO&O&",
- OptMenuObj_Convert, &inMenu,
- &inCommandID,
- PyMac_GetOSType, &inPropertyCreator,
- PyMac_GetOSType, &inPropertyTag))
- return NULL;
- _err = GetMenuCommandPropertySize(inMenu,
- inCommandID,
- inPropertyCreator,
- inPropertyTag,
- &outSize);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- outSize);
- return _res;
+ PyMac_PRECHECK(GetMenuCommandPropertySize);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&lO&O&",
+ OptMenuObj_Convert, &inMenu,
+ &inCommandID,
+ PyMac_GetOSType, &inPropertyCreator,
+ PyMac_GetOSType, &inPropertyTag))
+ return NULL;
+ _err = GetMenuCommandPropertySize(inMenu,
+ inCommandID,
+ inPropertyCreator,
+ inPropertyTag,
+ &outSize);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ outSize);
+ return _res;
}
static PyObject *Menu_RemoveMenuCommandProperty(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- MenuHandle inMenu;
- MenuCommand inCommandID;
- OSType inPropertyCreator;
- OSType inPropertyTag;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ MenuHandle inMenu;
+ MenuCommand inCommandID;
+ OSType inPropertyCreator;
+ OSType inPropertyTag;
#ifndef RemoveMenuCommandProperty
- PyMac_PRECHECK(RemoveMenuCommandProperty);
-#endif
- if (!PyArg_ParseTuple(_args, "O&lO&O&",
- OptMenuObj_Convert, &inMenu,
- &inCommandID,
- PyMac_GetOSType, &inPropertyCreator,
- PyMac_GetOSType, &inPropertyTag))
- return NULL;
- _err = RemoveMenuCommandProperty(inMenu,
- inCommandID,
- inPropertyCreator,
- inPropertyTag);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(RemoveMenuCommandProperty);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&lO&O&",
+ OptMenuObj_Convert, &inMenu,
+ &inCommandID,
+ PyMac_GetOSType, &inPropertyCreator,
+ PyMac_GetOSType, &inPropertyTag))
+ return NULL;
+ _err = RemoveMenuCommandProperty(inMenu,
+ inCommandID,
+ inPropertyCreator,
+ inPropertyTag);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
#endif /* __LP64__ */
static PyMethodDef Menu_methods[] = {
#ifndef __LP64__
- {"NewMenu", (PyCFunction)Menu_NewMenu, 1,
- PyDoc_STR("(MenuID menuID, Str255 menuTitle) -> (MenuHandle _rv)")},
- {"MacGetMenu", (PyCFunction)Menu_MacGetMenu, 1,
- PyDoc_STR("(short resourceID) -> (MenuHandle _rv)")},
- {"CreateNewMenu", (PyCFunction)Menu_CreateNewMenu, 1,
- PyDoc_STR("(MenuID inMenuID, MenuAttributes inMenuAttributes) -> (MenuHandle outMenuRef)")},
- {"MenuKey", (PyCFunction)Menu_MenuKey, 1,
- PyDoc_STR("(CharParameter ch) -> (long _rv)")},
- {"MenuSelect", (PyCFunction)Menu_MenuSelect, 1,
- PyDoc_STR("(Point startPt) -> (long _rv)")},
- {"MenuChoice", (PyCFunction)Menu_MenuChoice, 1,
- PyDoc_STR("() -> (long _rv)")},
- {"MenuEvent", (PyCFunction)Menu_MenuEvent, 1,
- PyDoc_STR("(EventRecord inEvent) -> (UInt32 _rv)")},
- {"GetMBarHeight", (PyCFunction)Menu_GetMBarHeight, 1,
- PyDoc_STR("() -> (short _rv)")},
- {"MacDrawMenuBar", (PyCFunction)Menu_MacDrawMenuBar, 1,
- PyDoc_STR("() -> None")},
- {"InvalMenuBar", (PyCFunction)Menu_InvalMenuBar, 1,
- PyDoc_STR("() -> None")},
- {"HiliteMenu", (PyCFunction)Menu_HiliteMenu, 1,
- PyDoc_STR("(MenuID menuID) -> None")},
- {"GetNewMBar", (PyCFunction)Menu_GetNewMBar, 1,
- PyDoc_STR("(short menuBarID) -> (MenuBarHandle _rv)")},
- {"GetMenuBar", (PyCFunction)Menu_GetMenuBar, 1,
- PyDoc_STR("() -> (MenuBarHandle _rv)")},
- {"SetMenuBar", (PyCFunction)Menu_SetMenuBar, 1,
- PyDoc_STR("(MenuBarHandle mbar) -> None")},
- {"DuplicateMenuBar", (PyCFunction)Menu_DuplicateMenuBar, 1,
- PyDoc_STR("(MenuBarHandle inMbar) -> (MenuBarHandle outMbar)")},
- {"DisposeMenuBar", (PyCFunction)Menu_DisposeMenuBar, 1,
- PyDoc_STR("(MenuBarHandle inMbar) -> None")},
- {"GetMenuHandle", (PyCFunction)Menu_GetMenuHandle, 1,
- PyDoc_STR("(MenuID menuID) -> (MenuHandle _rv)")},
- {"MacDeleteMenu", (PyCFunction)Menu_MacDeleteMenu, 1,
- PyDoc_STR("(MenuID menuID) -> None")},
- {"ClearMenuBar", (PyCFunction)Menu_ClearMenuBar, 1,
- PyDoc_STR("() -> None")},
- {"SetMenuFlashCount", (PyCFunction)Menu_SetMenuFlashCount, 1,
- PyDoc_STR("(short count) -> None")},
- {"FlashMenuBar", (PyCFunction)Menu_FlashMenuBar, 1,
- PyDoc_STR("(MenuID menuID) -> None")},
- {"IsMenuBarVisible", (PyCFunction)Menu_IsMenuBarVisible, 1,
- PyDoc_STR("() -> (Boolean _rv)")},
- {"ShowMenuBar", (PyCFunction)Menu_ShowMenuBar, 1,
- PyDoc_STR("() -> None")},
- {"HideMenuBar", (PyCFunction)Menu_HideMenuBar, 1,
- PyDoc_STR("() -> None")},
- {"AcquireRootMenu", (PyCFunction)Menu_AcquireRootMenu, 1,
- PyDoc_STR("() -> (MenuHandle _rv)")},
- {"DeleteMCEntries", (PyCFunction)Menu_DeleteMCEntries, 1,
- PyDoc_STR("(MenuID menuID, short menuItem) -> None")},
- {"InitContextualMenus", (PyCFunction)Menu_InitContextualMenus, 1,
- PyDoc_STR("() -> None")},
- {"IsShowContextualMenuClick", (PyCFunction)Menu_IsShowContextualMenuClick, 1,
- PyDoc_STR("(EventRecord inEvent) -> (Boolean _rv)")},
- {"LMGetTheMenu", (PyCFunction)Menu_LMGetTheMenu, 1,
- PyDoc_STR("() -> (SInt16 _rv)")},
- {"as_Menu", (PyCFunction)Menu_as_Menu, 1,
- PyDoc_STR("(Handle h) -> (MenuHandle _rv)")},
- {"GetMenu", (PyCFunction)Menu_GetMenu, 1,
- PyDoc_STR("(short resourceID) -> (MenuHandle _rv)")},
- {"DeleteMenu", (PyCFunction)Menu_DeleteMenu, 1,
- PyDoc_STR("(short menuID) -> None")},
- {"DrawMenuBar", (PyCFunction)Menu_DrawMenuBar, 1,
- PyDoc_STR("() -> None")},
- {"CountMenuItemsWithCommandID", (PyCFunction)Menu_CountMenuItemsWithCommandID, 1,
- PyDoc_STR("(MenuHandle inMenu, MenuCommand inCommandID) -> (ItemCount _rv)")},
- {"GetIndMenuItemWithCommandID", (PyCFunction)Menu_GetIndMenuItemWithCommandID, 1,
- PyDoc_STR("(MenuHandle inMenu, MenuCommand inCommandID, UInt32 inItemIndex) -> (MenuHandle outMenu, MenuItemIndex outIndex)")},
- {"EnableMenuCommand", (PyCFunction)Menu_EnableMenuCommand, 1,
- PyDoc_STR("(MenuHandle inMenu, MenuCommand inCommandID) -> None")},
- {"DisableMenuCommand", (PyCFunction)Menu_DisableMenuCommand, 1,
- PyDoc_STR("(MenuHandle inMenu, MenuCommand inCommandID) -> None")},
- {"IsMenuCommandEnabled", (PyCFunction)Menu_IsMenuCommandEnabled, 1,
- PyDoc_STR("(MenuHandle inMenu, MenuCommand inCommandID) -> (Boolean _rv)")},
- {"SetMenuCommandMark", (PyCFunction)Menu_SetMenuCommandMark, 1,
- PyDoc_STR("(MenuHandle inMenu, MenuCommand inCommandID, UniChar inMark) -> None")},
- {"GetMenuCommandMark", (PyCFunction)Menu_GetMenuCommandMark, 1,
- PyDoc_STR("(MenuHandle inMenu, MenuCommand inCommandID) -> (UniChar outMark)")},
- {"GetMenuCommandPropertySize", (PyCFunction)Menu_GetMenuCommandPropertySize, 1,
- PyDoc_STR("(MenuHandle inMenu, MenuCommand inCommandID, OSType inPropertyCreator, OSType inPropertyTag) -> (ByteCount outSize)")},
- {"RemoveMenuCommandProperty", (PyCFunction)Menu_RemoveMenuCommandProperty, 1,
- PyDoc_STR("(MenuHandle inMenu, MenuCommand inCommandID, OSType inPropertyCreator, OSType inPropertyTag) -> None")},
+ {"NewMenu", (PyCFunction)Menu_NewMenu, 1,
+ PyDoc_STR("(MenuID menuID, Str255 menuTitle) -> (MenuHandle _rv)")},
+ {"MacGetMenu", (PyCFunction)Menu_MacGetMenu, 1,
+ PyDoc_STR("(short resourceID) -> (MenuHandle _rv)")},
+ {"CreateNewMenu", (PyCFunction)Menu_CreateNewMenu, 1,
+ PyDoc_STR("(MenuID inMenuID, MenuAttributes inMenuAttributes) -> (MenuHandle outMenuRef)")},
+ {"MenuKey", (PyCFunction)Menu_MenuKey, 1,
+ PyDoc_STR("(CharParameter ch) -> (long _rv)")},
+ {"MenuSelect", (PyCFunction)Menu_MenuSelect, 1,
+ PyDoc_STR("(Point startPt) -> (long _rv)")},
+ {"MenuChoice", (PyCFunction)Menu_MenuChoice, 1,
+ PyDoc_STR("() -> (long _rv)")},
+ {"MenuEvent", (PyCFunction)Menu_MenuEvent, 1,
+ PyDoc_STR("(EventRecord inEvent) -> (UInt32 _rv)")},
+ {"GetMBarHeight", (PyCFunction)Menu_GetMBarHeight, 1,
+ PyDoc_STR("() -> (short _rv)")},
+ {"MacDrawMenuBar", (PyCFunction)Menu_MacDrawMenuBar, 1,
+ PyDoc_STR("() -> None")},
+ {"InvalMenuBar", (PyCFunction)Menu_InvalMenuBar, 1,
+ PyDoc_STR("() -> None")},
+ {"HiliteMenu", (PyCFunction)Menu_HiliteMenu, 1,
+ PyDoc_STR("(MenuID menuID) -> None")},
+ {"GetNewMBar", (PyCFunction)Menu_GetNewMBar, 1,
+ PyDoc_STR("(short menuBarID) -> (MenuBarHandle _rv)")},
+ {"GetMenuBar", (PyCFunction)Menu_GetMenuBar, 1,
+ PyDoc_STR("() -> (MenuBarHandle _rv)")},
+ {"SetMenuBar", (PyCFunction)Menu_SetMenuBar, 1,
+ PyDoc_STR("(MenuBarHandle mbar) -> None")},
+ {"DuplicateMenuBar", (PyCFunction)Menu_DuplicateMenuBar, 1,
+ PyDoc_STR("(MenuBarHandle inMbar) -> (MenuBarHandle outMbar)")},
+ {"DisposeMenuBar", (PyCFunction)Menu_DisposeMenuBar, 1,
+ PyDoc_STR("(MenuBarHandle inMbar) -> None")},
+ {"GetMenuHandle", (PyCFunction)Menu_GetMenuHandle, 1,
+ PyDoc_STR("(MenuID menuID) -> (MenuHandle _rv)")},
+ {"MacDeleteMenu", (PyCFunction)Menu_MacDeleteMenu, 1,
+ PyDoc_STR("(MenuID menuID) -> None")},
+ {"ClearMenuBar", (PyCFunction)Menu_ClearMenuBar, 1,
+ PyDoc_STR("() -> None")},
+ {"SetMenuFlashCount", (PyCFunction)Menu_SetMenuFlashCount, 1,
+ PyDoc_STR("(short count) -> None")},
+ {"FlashMenuBar", (PyCFunction)Menu_FlashMenuBar, 1,
+ PyDoc_STR("(MenuID menuID) -> None")},
+ {"IsMenuBarVisible", (PyCFunction)Menu_IsMenuBarVisible, 1,
+ PyDoc_STR("() -> (Boolean _rv)")},
+ {"ShowMenuBar", (PyCFunction)Menu_ShowMenuBar, 1,
+ PyDoc_STR("() -> None")},
+ {"HideMenuBar", (PyCFunction)Menu_HideMenuBar, 1,
+ PyDoc_STR("() -> None")},
+ {"AcquireRootMenu", (PyCFunction)Menu_AcquireRootMenu, 1,
+ PyDoc_STR("() -> (MenuHandle _rv)")},
+ {"DeleteMCEntries", (PyCFunction)Menu_DeleteMCEntries, 1,
+ PyDoc_STR("(MenuID menuID, short menuItem) -> None")},
+ {"InitContextualMenus", (PyCFunction)Menu_InitContextualMenus, 1,
+ PyDoc_STR("() -> None")},
+ {"IsShowContextualMenuClick", (PyCFunction)Menu_IsShowContextualMenuClick, 1,
+ PyDoc_STR("(EventRecord inEvent) -> (Boolean _rv)")},
+ {"LMGetTheMenu", (PyCFunction)Menu_LMGetTheMenu, 1,
+ PyDoc_STR("() -> (SInt16 _rv)")},
+ {"as_Menu", (PyCFunction)Menu_as_Menu, 1,
+ PyDoc_STR("(Handle h) -> (MenuHandle _rv)")},
+ {"GetMenu", (PyCFunction)Menu_GetMenu, 1,
+ PyDoc_STR("(short resourceID) -> (MenuHandle _rv)")},
+ {"DeleteMenu", (PyCFunction)Menu_DeleteMenu, 1,
+ PyDoc_STR("(short menuID) -> None")},
+ {"DrawMenuBar", (PyCFunction)Menu_DrawMenuBar, 1,
+ PyDoc_STR("() -> None")},
+ {"CountMenuItemsWithCommandID", (PyCFunction)Menu_CountMenuItemsWithCommandID, 1,
+ PyDoc_STR("(MenuHandle inMenu, MenuCommand inCommandID) -> (ItemCount _rv)")},
+ {"GetIndMenuItemWithCommandID", (PyCFunction)Menu_GetIndMenuItemWithCommandID, 1,
+ PyDoc_STR("(MenuHandle inMenu, MenuCommand inCommandID, UInt32 inItemIndex) -> (MenuHandle outMenu, MenuItemIndex outIndex)")},
+ {"EnableMenuCommand", (PyCFunction)Menu_EnableMenuCommand, 1,
+ PyDoc_STR("(MenuHandle inMenu, MenuCommand inCommandID) -> None")},
+ {"DisableMenuCommand", (PyCFunction)Menu_DisableMenuCommand, 1,
+ PyDoc_STR("(MenuHandle inMenu, MenuCommand inCommandID) -> None")},
+ {"IsMenuCommandEnabled", (PyCFunction)Menu_IsMenuCommandEnabled, 1,
+ PyDoc_STR("(MenuHandle inMenu, MenuCommand inCommandID) -> (Boolean _rv)")},
+ {"SetMenuCommandMark", (PyCFunction)Menu_SetMenuCommandMark, 1,
+ PyDoc_STR("(MenuHandle inMenu, MenuCommand inCommandID, UniChar inMark) -> None")},
+ {"GetMenuCommandMark", (PyCFunction)Menu_GetMenuCommandMark, 1,
+ PyDoc_STR("(MenuHandle inMenu, MenuCommand inCommandID) -> (UniChar outMark)")},
+ {"GetMenuCommandPropertySize", (PyCFunction)Menu_GetMenuCommandPropertySize, 1,
+ PyDoc_STR("(MenuHandle inMenu, MenuCommand inCommandID, OSType inPropertyCreator, OSType inPropertyTag) -> (ByteCount outSize)")},
+ {"RemoveMenuCommandProperty", (PyCFunction)Menu_RemoveMenuCommandProperty, 1,
+ PyDoc_STR("(MenuHandle inMenu, MenuCommand inCommandID, OSType inPropertyCreator, OSType inPropertyTag) -> None")},
#endif /* __LP64__ */
- {NULL, NULL, 0}
+ {NULL, NULL, 0}
};
@@ -3445,31 +3445,31 @@ static PyMethodDef Menu_methods[] = {
void init_Menu(void)
{
- PyObject *m;
+ PyObject *m;
#ifndef __LP64__
- PyObject *d;
+ PyObject *d;
- PyMac_INIT_TOOLBOX_OBJECT_NEW(MenuHandle, MenuObj_New);
- PyMac_INIT_TOOLBOX_OBJECT_CONVERT(MenuHandle, MenuObj_Convert);
+ PyMac_INIT_TOOLBOX_OBJECT_NEW(MenuHandle, MenuObj_New);
+ PyMac_INIT_TOOLBOX_OBJECT_CONVERT(MenuHandle, MenuObj_Convert);
#endif /* __LP64__ */
- m = Py_InitModule("_Menu", Menu_methods);
+ m = Py_InitModule("_Menu", Menu_methods);
#ifndef __LP64__
- d = PyModule_GetDict(m);
- Menu_Error = PyMac_GetOSErrException();
- if (Menu_Error == NULL ||
- PyDict_SetItemString(d, "Error", Menu_Error) != 0)
- return;
- Menu_Type.ob_type = &PyType_Type;
- if (PyType_Ready(&Menu_Type) < 0) return;
- Py_INCREF(&Menu_Type);
- PyModule_AddObject(m, "Menu", (PyObject *)&Menu_Type);
- /* Backward-compatible name */
- Py_INCREF(&Menu_Type);
- PyModule_AddObject(m, "MenuType", (PyObject *)&Menu_Type);
+ d = PyModule_GetDict(m);
+ Menu_Error = PyMac_GetOSErrException();
+ if (Menu_Error == NULL ||
+ PyDict_SetItemString(d, "Error", Menu_Error) != 0)
+ return;
+ Menu_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&Menu_Type) < 0) return;
+ Py_INCREF(&Menu_Type);
+ PyModule_AddObject(m, "Menu", (PyObject *)&Menu_Type);
+ /* Backward-compatible name */
+ Py_INCREF(&Menu_Type);
+ PyModule_AddObject(m, "MenuType", (PyObject *)&Menu_Type);
#endif /* __LP64__ */
}
diff --git a/Mac/Modules/mlte/_Mltemodule.c b/Mac/Modules/mlte/_Mltemodule.c
index 1a6b6a4..cd698f4 100644
--- a/Mac/Modules/mlte/_Mltemodule.c
+++ b/Mac/Modules/mlte/_Mltemodule.c
@@ -10,9 +10,9 @@
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
- PyErr_SetString(PyExc_NotImplementedError, \
- "Not available in this shared library/OS version"); \
- return NULL; \
+ PyErr_SetString(PyExc_NotImplementedError, \
+ "Not available in this shared library/OS version"); \
+ return NULL; \
}} while(0)
@@ -39,14 +39,14 @@ static int TXNFontMenuObj_Convert(PyObject *, TXNFontMenuObject *);
static int
OptFSSpecPtr_Convert(PyObject *v, FSSpec **p_itself)
{
- static FSSpec fss;
- if (v == Py_None)
- {
- *p_itself = NULL;
- return 1;
- }
- *p_itself = &fss;
- return PyMac_GetFSSpec(v, *p_itself);
+ static FSSpec fss;
+ if (v == Py_None)
+ {
+ *p_itself = NULL;
+ return 1;
+ }
+ *p_itself = &fss;
+ return PyMac_GetFSSpec(v, *p_itself);
}
/*
@@ -55,12 +55,12 @@ OptFSSpecPtr_Convert(PyObject *v, FSSpec **p_itself)
static int
OptGWorldObj_Convert(PyObject *v, GWorldPtr *p_itself)
{
- if (v == Py_None)
- {
- *p_itself = NULL;
- return 1;
- }
- return GWorldObj_Convert(v, p_itself);
+ if (v == Py_None)
+ {
+ *p_itself = NULL;
+ return 1;
+ }
+ return GWorldObj_Convert(v, p_itself);
}
@@ -73,1159 +73,1159 @@ PyTypeObject TXNObject_Type;
#define TXNObj_Check(x) ((x)->ob_type == &TXNObject_Type || PyObject_TypeCheck((x), &TXNObject_Type))
typedef struct TXNObjectObject {
- PyObject_HEAD
- TXNObject ob_itself;
+ PyObject_HEAD
+ TXNObject ob_itself;
} TXNObjectObject;
PyObject *TXNObj_New(TXNObject itself)
{
- TXNObjectObject *it;
- if (itself == NULL) return PyMac_Error(resNotFound);
- it = PyObject_NEW(TXNObjectObject, &TXNObject_Type);
- if (it == NULL) return NULL;
- it->ob_itself = itself;
- return (PyObject *)it;
+ TXNObjectObject *it;
+ if (itself == NULL) return PyMac_Error(resNotFound);
+ it = PyObject_NEW(TXNObjectObject, &TXNObject_Type);
+ if (it == NULL) return NULL;
+ it->ob_itself = itself;
+ return (PyObject *)it;
}
int TXNObj_Convert(PyObject *v, TXNObject *p_itself)
{
- if (!TXNObj_Check(v))
- {
- PyErr_SetString(PyExc_TypeError, "TXNObject required");
- return 0;
- }
- *p_itself = ((TXNObjectObject *)v)->ob_itself;
- return 1;
+ if (!TXNObj_Check(v))
+ {
+ PyErr_SetString(PyExc_TypeError, "TXNObject required");
+ return 0;
+ }
+ *p_itself = ((TXNObjectObject *)v)->ob_itself;
+ return 1;
}
static void TXNObj_dealloc(TXNObjectObject *self)
{
- /* Cleanup of self->ob_itself goes here */
- self->ob_type->tp_free((PyObject *)self);
+ /* Cleanup of self->ob_itself goes here */
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *TXNObj_TXNDeleteObject(TXNObjectObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef TXNDeleteObject
- PyMac_PRECHECK(TXNDeleteObject);
+ PyMac_PRECHECK(TXNDeleteObject);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- TXNDeleteObject(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ TXNDeleteObject(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TXNObj_TXNResizeFrame(TXNObjectObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- UInt32 iWidth;
- UInt32 iHeight;
- TXNFrameID iTXNFrameID;
+ PyObject *_res = NULL;
+ UInt32 iWidth;
+ UInt32 iHeight;
+ TXNFrameID iTXNFrameID;
#ifndef TXNResizeFrame
- PyMac_PRECHECK(TXNResizeFrame);
+ PyMac_PRECHECK(TXNResizeFrame);
#endif
- if (!PyArg_ParseTuple(_args, "lll",
- &iWidth,
- &iHeight,
- &iTXNFrameID))
- return NULL;
- TXNResizeFrame(_self->ob_itself,
- iWidth,
- iHeight,
- iTXNFrameID);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "lll",
+ &iWidth,
+ &iHeight,
+ &iTXNFrameID))
+ return NULL;
+ TXNResizeFrame(_self->ob_itself,
+ iWidth,
+ iHeight,
+ iTXNFrameID);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TXNObj_TXNSetFrameBounds(TXNObjectObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- SInt32 iTop;
- SInt32 iLeft;
- SInt32 iBottom;
- SInt32 iRight;
- TXNFrameID iTXNFrameID;
+ PyObject *_res = NULL;
+ SInt32 iTop;
+ SInt32 iLeft;
+ SInt32 iBottom;
+ SInt32 iRight;
+ TXNFrameID iTXNFrameID;
#ifndef TXNSetFrameBounds
- PyMac_PRECHECK(TXNSetFrameBounds);
+ PyMac_PRECHECK(TXNSetFrameBounds);
#endif
- if (!PyArg_ParseTuple(_args, "lllll",
- &iTop,
- &iLeft,
- &iBottom,
- &iRight,
- &iTXNFrameID))
- return NULL;
- TXNSetFrameBounds(_self->ob_itself,
- iTop,
- iLeft,
- iBottom,
- iRight,
- iTXNFrameID);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "lllll",
+ &iTop,
+ &iLeft,
+ &iBottom,
+ &iRight,
+ &iTXNFrameID))
+ return NULL;
+ TXNSetFrameBounds(_self->ob_itself,
+ iTop,
+ iLeft,
+ iBottom,
+ iRight,
+ iTXNFrameID);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TXNObj_TXNKeyDown(TXNObjectObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- EventRecord iEvent;
+ PyObject *_res = NULL;
+ EventRecord iEvent;
#ifndef TXNKeyDown
- PyMac_PRECHECK(TXNKeyDown);
+ PyMac_PRECHECK(TXNKeyDown);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetEventRecord, &iEvent))
- return NULL;
- TXNKeyDown(_self->ob_itself,
- &iEvent);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetEventRecord, &iEvent))
+ return NULL;
+ TXNKeyDown(_self->ob_itself,
+ &iEvent);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TXNObj_TXNAdjustCursor(TXNObjectObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RgnHandle ioCursorRgn;
+ PyObject *_res = NULL;
+ RgnHandle ioCursorRgn;
#ifndef TXNAdjustCursor
- PyMac_PRECHECK(TXNAdjustCursor);
+ PyMac_PRECHECK(TXNAdjustCursor);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- OptResObj_Convert, &ioCursorRgn))
- return NULL;
- TXNAdjustCursor(_self->ob_itself,
- ioCursorRgn);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ OptResObj_Convert, &ioCursorRgn))
+ return NULL;
+ TXNAdjustCursor(_self->ob_itself,
+ ioCursorRgn);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TXNObj_TXNClick(TXNObjectObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- EventRecord iEvent;
+ PyObject *_res = NULL;
+ EventRecord iEvent;
#ifndef TXNClick
- PyMac_PRECHECK(TXNClick);
+ PyMac_PRECHECK(TXNClick);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetEventRecord, &iEvent))
- return NULL;
- TXNClick(_self->ob_itself,
- &iEvent);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetEventRecord, &iEvent))
+ return NULL;
+ TXNClick(_self->ob_itself,
+ &iEvent);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TXNObj_TXNSelectAll(TXNObjectObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef TXNSelectAll
- PyMac_PRECHECK(TXNSelectAll);
+ PyMac_PRECHECK(TXNSelectAll);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- TXNSelectAll(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ TXNSelectAll(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TXNObj_TXNFocus(TXNObjectObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean iBecomingFocused;
+ PyObject *_res = NULL;
+ Boolean iBecomingFocused;
#ifndef TXNFocus
- PyMac_PRECHECK(TXNFocus);
+ PyMac_PRECHECK(TXNFocus);
#endif
- if (!PyArg_ParseTuple(_args, "b",
- &iBecomingFocused))
- return NULL;
- TXNFocus(_self->ob_itself,
- iBecomingFocused);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "b",
+ &iBecomingFocused))
+ return NULL;
+ TXNFocus(_self->ob_itself,
+ iBecomingFocused);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TXNObj_TXNUpdate(TXNObjectObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef TXNUpdate
- PyMac_PRECHECK(TXNUpdate);
+ PyMac_PRECHECK(TXNUpdate);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- TXNUpdate(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ TXNUpdate(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TXNObj_TXNDraw(TXNObjectObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- GWorldPtr iDrawPort;
+ PyObject *_res = NULL;
+ GWorldPtr iDrawPort;
#ifndef TXNDraw
- PyMac_PRECHECK(TXNDraw);
+ PyMac_PRECHECK(TXNDraw);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- OptGWorldObj_Convert, &iDrawPort))
- return NULL;
- TXNDraw(_self->ob_itself,
- iDrawPort);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ OptGWorldObj_Convert, &iDrawPort))
+ return NULL;
+ TXNDraw(_self->ob_itself,
+ iDrawPort);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TXNObj_TXNForceUpdate(TXNObjectObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef TXNForceUpdate
- PyMac_PRECHECK(TXNForceUpdate);
+ PyMac_PRECHECK(TXNForceUpdate);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- TXNForceUpdate(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ TXNForceUpdate(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TXNObj_TXNGetSleepTicks(TXNObjectObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- UInt32 _rv;
+ PyObject *_res = NULL;
+ UInt32 _rv;
#ifndef TXNGetSleepTicks
- PyMac_PRECHECK(TXNGetSleepTicks);
+ PyMac_PRECHECK(TXNGetSleepTicks);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = TXNGetSleepTicks(_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = TXNGetSleepTicks(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *TXNObj_TXNIdle(TXNObjectObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef TXNIdle
- PyMac_PRECHECK(TXNIdle);
+ PyMac_PRECHECK(TXNIdle);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- TXNIdle(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ TXNIdle(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TXNObj_TXNGrowWindow(TXNObjectObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- EventRecord iEvent;
+ PyObject *_res = NULL;
+ EventRecord iEvent;
#ifndef TXNGrowWindow
- PyMac_PRECHECK(TXNGrowWindow);
+ PyMac_PRECHECK(TXNGrowWindow);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetEventRecord, &iEvent))
- return NULL;
- TXNGrowWindow(_self->ob_itself,
- &iEvent);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetEventRecord, &iEvent))
+ return NULL;
+ TXNGrowWindow(_self->ob_itself,
+ &iEvent);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TXNObj_TXNZoomWindow(TXNObjectObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- SInt16 iPart;
+ PyObject *_res = NULL;
+ SInt16 iPart;
#ifndef TXNZoomWindow
- PyMac_PRECHECK(TXNZoomWindow);
+ PyMac_PRECHECK(TXNZoomWindow);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &iPart))
- return NULL;
- TXNZoomWindow(_self->ob_itself,
- iPart);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &iPart))
+ return NULL;
+ TXNZoomWindow(_self->ob_itself,
+ iPart);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TXNObj_TXNCanUndo(TXNObjectObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- TXNActionKey oTXNActionKey;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ TXNActionKey oTXNActionKey;
#ifndef TXNCanUndo
- PyMac_PRECHECK(TXNCanUndo);
+ PyMac_PRECHECK(TXNCanUndo);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = TXNCanUndo(_self->ob_itself,
- &oTXNActionKey);
- _res = Py_BuildValue("bl",
- _rv,
- oTXNActionKey);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = TXNCanUndo(_self->ob_itself,
+ &oTXNActionKey);
+ _res = Py_BuildValue("bl",
+ _rv,
+ oTXNActionKey);
+ return _res;
}
static PyObject *TXNObj_TXNUndo(TXNObjectObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef TXNUndo
- PyMac_PRECHECK(TXNUndo);
+ PyMac_PRECHECK(TXNUndo);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- TXNUndo(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ TXNUndo(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TXNObj_TXNCanRedo(TXNObjectObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- TXNActionKey oTXNActionKey;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ TXNActionKey oTXNActionKey;
#ifndef TXNCanRedo
- PyMac_PRECHECK(TXNCanRedo);
+ PyMac_PRECHECK(TXNCanRedo);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = TXNCanRedo(_self->ob_itself,
- &oTXNActionKey);
- _res = Py_BuildValue("bl",
- _rv,
- oTXNActionKey);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = TXNCanRedo(_self->ob_itself,
+ &oTXNActionKey);
+ _res = Py_BuildValue("bl",
+ _rv,
+ oTXNActionKey);
+ return _res;
}
static PyObject *TXNObj_TXNRedo(TXNObjectObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef TXNRedo
- PyMac_PRECHECK(TXNRedo);
+ PyMac_PRECHECK(TXNRedo);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- TXNRedo(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ TXNRedo(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TXNObj_TXNCut(TXNObjectObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
+ PyObject *_res = NULL;
+ OSStatus _err;
#ifndef TXNCut
- PyMac_PRECHECK(TXNCut);
+ PyMac_PRECHECK(TXNCut);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = TXNCut(_self->ob_itself);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = TXNCut(_self->ob_itself);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TXNObj_TXNCopy(TXNObjectObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
+ PyObject *_res = NULL;
+ OSStatus _err;
#ifndef TXNCopy
- PyMac_PRECHECK(TXNCopy);
+ PyMac_PRECHECK(TXNCopy);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = TXNCopy(_self->ob_itself);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = TXNCopy(_self->ob_itself);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TXNObj_TXNPaste(TXNObjectObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
+ PyObject *_res = NULL;
+ OSStatus _err;
#ifndef TXNPaste
- PyMac_PRECHECK(TXNPaste);
+ PyMac_PRECHECK(TXNPaste);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = TXNPaste(_self->ob_itself);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = TXNPaste(_self->ob_itself);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TXNObj_TXNClear(TXNObjectObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
+ PyObject *_res = NULL;
+ OSStatus _err;
#ifndef TXNClear
- PyMac_PRECHECK(TXNClear);
+ PyMac_PRECHECK(TXNClear);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = TXNClear(_self->ob_itself);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = TXNClear(_self->ob_itself);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TXNObj_TXNGetSelection(TXNObjectObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- TXNOffset oStartOffset;
- TXNOffset oEndOffset;
+ PyObject *_res = NULL;
+ TXNOffset oStartOffset;
+ TXNOffset oEndOffset;
#ifndef TXNGetSelection
- PyMac_PRECHECK(TXNGetSelection);
+ PyMac_PRECHECK(TXNGetSelection);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- TXNGetSelection(_self->ob_itself,
- &oStartOffset,
- &oEndOffset);
- _res = Py_BuildValue("ll",
- oStartOffset,
- oEndOffset);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ TXNGetSelection(_self->ob_itself,
+ &oStartOffset,
+ &oEndOffset);
+ _res = Py_BuildValue("ll",
+ oStartOffset,
+ oEndOffset);
+ return _res;
}
static PyObject *TXNObj_TXNShowSelection(TXNObjectObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean iShowEnd;
+ PyObject *_res = NULL;
+ Boolean iShowEnd;
#ifndef TXNShowSelection
- PyMac_PRECHECK(TXNShowSelection);
+ PyMac_PRECHECK(TXNShowSelection);
#endif
- if (!PyArg_ParseTuple(_args, "b",
- &iShowEnd))
- return NULL;
- TXNShowSelection(_self->ob_itself,
- iShowEnd);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "b",
+ &iShowEnd))
+ return NULL;
+ TXNShowSelection(_self->ob_itself,
+ iShowEnd);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TXNObj_TXNIsSelectionEmpty(TXNObjectObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
+ PyObject *_res = NULL;
+ Boolean _rv;
#ifndef TXNIsSelectionEmpty
- PyMac_PRECHECK(TXNIsSelectionEmpty);
+ PyMac_PRECHECK(TXNIsSelectionEmpty);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = TXNIsSelectionEmpty(_self->ob_itself);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = TXNIsSelectionEmpty(_self->ob_itself);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *TXNObj_TXNSetSelection(TXNObjectObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- TXNOffset iStartOffset;
- TXNOffset iEndOffset;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ TXNOffset iStartOffset;
+ TXNOffset iEndOffset;
#ifndef TXNSetSelection
- PyMac_PRECHECK(TXNSetSelection);
+ PyMac_PRECHECK(TXNSetSelection);
#endif
- if (!PyArg_ParseTuple(_args, "ll",
- &iStartOffset,
- &iEndOffset))
- return NULL;
- _err = TXNSetSelection(_self->ob_itself,
- iStartOffset,
- iEndOffset);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "ll",
+ &iStartOffset,
+ &iEndOffset))
+ return NULL;
+ _err = TXNSetSelection(_self->ob_itself,
+ iStartOffset,
+ iEndOffset);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TXNObj_TXNCountRunsInRange(TXNObjectObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- TXNOffset iStartOffset;
- TXNOffset iEndOffset;
- ItemCount oRunCount;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ TXNOffset iStartOffset;
+ TXNOffset iEndOffset;
+ ItemCount oRunCount;
#ifndef TXNCountRunsInRange
- PyMac_PRECHECK(TXNCountRunsInRange);
+ PyMac_PRECHECK(TXNCountRunsInRange);
#endif
- if (!PyArg_ParseTuple(_args, "ll",
- &iStartOffset,
- &iEndOffset))
- return NULL;
- _err = TXNCountRunsInRange(_self->ob_itself,
- iStartOffset,
- iEndOffset,
- &oRunCount);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- oRunCount);
- return _res;
+ if (!PyArg_ParseTuple(_args, "ll",
+ &iStartOffset,
+ &iEndOffset))
+ return NULL;
+ _err = TXNCountRunsInRange(_self->ob_itself,
+ iStartOffset,
+ iEndOffset,
+ &oRunCount);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ oRunCount);
+ return _res;
}
static PyObject *TXNObj_TXNDataSize(TXNObjectObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ByteCount _rv;
+ PyObject *_res = NULL;
+ ByteCount _rv;
#ifndef TXNDataSize
- PyMac_PRECHECK(TXNDataSize);
+ PyMac_PRECHECK(TXNDataSize);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = TXNDataSize(_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = TXNDataSize(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *TXNObj_TXNGetData(TXNObjectObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- TXNOffset iStartOffset;
- TXNOffset iEndOffset;
- Handle oDataHandle;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ TXNOffset iStartOffset;
+ TXNOffset iEndOffset;
+ Handle oDataHandle;
#ifndef TXNGetData
- PyMac_PRECHECK(TXNGetData);
+ PyMac_PRECHECK(TXNGetData);
#endif
- if (!PyArg_ParseTuple(_args, "ll",
- &iStartOffset,
- &iEndOffset))
- return NULL;
- _err = TXNGetData(_self->ob_itself,
- iStartOffset,
- iEndOffset,
- &oDataHandle);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- ResObj_New, oDataHandle);
- return _res;
+ if (!PyArg_ParseTuple(_args, "ll",
+ &iStartOffset,
+ &iEndOffset))
+ return NULL;
+ _err = TXNGetData(_self->ob_itself,
+ iStartOffset,
+ iEndOffset,
+ &oDataHandle);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ ResObj_New, oDataHandle);
+ return _res;
}
static PyObject *TXNObj_TXNGetDataEncoded(TXNObjectObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- TXNOffset iStartOffset;
- TXNOffset iEndOffset;
- Handle oDataHandle;
- TXNDataType iEncoding;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ TXNOffset iStartOffset;
+ TXNOffset iEndOffset;
+ Handle oDataHandle;
+ TXNDataType iEncoding;
#ifndef TXNGetDataEncoded
- PyMac_PRECHECK(TXNGetDataEncoded);
+ PyMac_PRECHECK(TXNGetDataEncoded);
#endif
- if (!PyArg_ParseTuple(_args, "llO&",
- &iStartOffset,
- &iEndOffset,
- PyMac_GetOSType, &iEncoding))
- return NULL;
- _err = TXNGetDataEncoded(_self->ob_itself,
- iStartOffset,
- iEndOffset,
- &oDataHandle,
- iEncoding);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- ResObj_New, oDataHandle);
- return _res;
+ if (!PyArg_ParseTuple(_args, "llO&",
+ &iStartOffset,
+ &iEndOffset,
+ PyMac_GetOSType, &iEncoding))
+ return NULL;
+ _err = TXNGetDataEncoded(_self->ob_itself,
+ iStartOffset,
+ iEndOffset,
+ &oDataHandle,
+ iEncoding);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ ResObj_New, oDataHandle);
+ return _res;
}
static PyObject *TXNObj_TXNSetDataFromFile(TXNObjectObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- SInt16 iFileRefNum;
- OSType iFileType;
- ByteCount iFileLength;
- TXNOffset iStartOffset;
- TXNOffset iEndOffset;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ SInt16 iFileRefNum;
+ OSType iFileType;
+ ByteCount iFileLength;
+ TXNOffset iStartOffset;
+ TXNOffset iEndOffset;
#ifndef TXNSetDataFromFile
- PyMac_PRECHECK(TXNSetDataFromFile);
+ PyMac_PRECHECK(TXNSetDataFromFile);
#endif
- if (!PyArg_ParseTuple(_args, "hO&lll",
- &iFileRefNum,
- PyMac_GetOSType, &iFileType,
- &iFileLength,
- &iStartOffset,
- &iEndOffset))
- return NULL;
- _err = TXNSetDataFromFile(_self->ob_itself,
- iFileRefNum,
- iFileType,
- iFileLength,
- iStartOffset,
- iEndOffset);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "hO&lll",
+ &iFileRefNum,
+ PyMac_GetOSType, &iFileType,
+ &iFileLength,
+ &iStartOffset,
+ &iEndOffset))
+ return NULL;
+ _err = TXNSetDataFromFile(_self->ob_itself,
+ iFileRefNum,
+ iFileType,
+ iFileLength,
+ iStartOffset,
+ iEndOffset);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TXNObj_TXNGetChangeCount(TXNObjectObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ItemCount _rv;
+ PyObject *_res = NULL;
+ ItemCount _rv;
#ifndef TXNGetChangeCount
- PyMac_PRECHECK(TXNGetChangeCount);
+ PyMac_PRECHECK(TXNGetChangeCount);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = TXNGetChangeCount(_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = TXNGetChangeCount(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *TXNObj_TXNSave(TXNObjectObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- TXNFileType iType;
- OSType iResType;
- TXNPermanentTextEncodingType iPermanentEncoding;
- FSSpec iFileSpecification;
- SInt16 iDataReference;
- SInt16 iResourceReference;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ TXNFileType iType;
+ OSType iResType;
+ TXNPermanentTextEncodingType iPermanentEncoding;
+ FSSpec iFileSpecification;
+ SInt16 iDataReference;
+ SInt16 iResourceReference;
#ifndef TXNSave
- PyMac_PRECHECK(TXNSave);
+ PyMac_PRECHECK(TXNSave);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&lO&hh",
- PyMac_GetOSType, &iType,
- PyMac_GetOSType, &iResType,
- &iPermanentEncoding,
- PyMac_GetFSSpec, &iFileSpecification,
- &iDataReference,
- &iResourceReference))
- return NULL;
- _err = TXNSave(_self->ob_itself,
- iType,
- iResType,
- iPermanentEncoding,
- &iFileSpecification,
- iDataReference,
- iResourceReference);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&lO&hh",
+ PyMac_GetOSType, &iType,
+ PyMac_GetOSType, &iResType,
+ &iPermanentEncoding,
+ PyMac_GetFSSpec, &iFileSpecification,
+ &iDataReference,
+ &iResourceReference))
+ return NULL;
+ _err = TXNSave(_self->ob_itself,
+ iType,
+ iResType,
+ iPermanentEncoding,
+ &iFileSpecification,
+ iDataReference,
+ iResourceReference);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TXNObj_TXNRevert(TXNObjectObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
+ PyObject *_res = NULL;
+ OSStatus _err;
#ifndef TXNRevert
- PyMac_PRECHECK(TXNRevert);
+ PyMac_PRECHECK(TXNRevert);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = TXNRevert(_self->ob_itself);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = TXNRevert(_self->ob_itself);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TXNObj_TXNPageSetup(TXNObjectObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
+ PyObject *_res = NULL;
+ OSStatus _err;
#ifndef TXNPageSetup
- PyMac_PRECHECK(TXNPageSetup);
+ PyMac_PRECHECK(TXNPageSetup);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = TXNPageSetup(_self->ob_itself);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = TXNPageSetup(_self->ob_itself);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TXNObj_TXNPrint(TXNObjectObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
+ PyObject *_res = NULL;
+ OSStatus _err;
#ifndef TXNPrint
- PyMac_PRECHECK(TXNPrint);
+ PyMac_PRECHECK(TXNPrint);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = TXNPrint(_self->ob_itself);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = TXNPrint(_self->ob_itself);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TXNObj_TXNGetViewRect(TXNObjectObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Rect oViewRect;
+ PyObject *_res = NULL;
+ Rect oViewRect;
#ifndef TXNGetViewRect
- PyMac_PRECHECK(TXNGetViewRect);
+ PyMac_PRECHECK(TXNGetViewRect);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- TXNGetViewRect(_self->ob_itself,
- &oViewRect);
- _res = Py_BuildValue("O&",
- PyMac_BuildRect, &oViewRect);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ TXNGetViewRect(_self->ob_itself,
+ &oViewRect);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildRect, &oViewRect);
+ return _res;
}
static PyObject *TXNObj_TXNSetViewRect(TXNObjectObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Rect iViewRect;
+ PyObject *_res = NULL;
+ Rect iViewRect;
#ifndef TXNSetViewRect
- PyMac_PRECHECK(TXNSetViewRect);
+ PyMac_PRECHECK(TXNSetViewRect);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetRect, &iViewRect))
- return NULL;
- TXNSetViewRect(_self->ob_itself,
- &iViewRect);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetRect, &iViewRect))
+ return NULL;
+ TXNSetViewRect(_self->ob_itself,
+ &iViewRect);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TXNObj_TXNAttachObjectToWindow(TXNObjectObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- GWorldPtr iWindow;
- Boolean iIsActualWindow;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ GWorldPtr iWindow;
+ Boolean iIsActualWindow;
#ifndef TXNAttachObjectToWindow
- PyMac_PRECHECK(TXNAttachObjectToWindow);
+ PyMac_PRECHECK(TXNAttachObjectToWindow);
#endif
- if (!PyArg_ParseTuple(_args, "O&b",
- GWorldObj_Convert, &iWindow,
- &iIsActualWindow))
- return NULL;
- _err = TXNAttachObjectToWindow(_self->ob_itself,
- iWindow,
- iIsActualWindow);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&b",
+ GWorldObj_Convert, &iWindow,
+ &iIsActualWindow))
+ return NULL;
+ _err = TXNAttachObjectToWindow(_self->ob_itself,
+ iWindow,
+ iIsActualWindow);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TXNObj_TXNIsObjectAttachedToWindow(TXNObjectObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
+ PyObject *_res = NULL;
+ Boolean _rv;
#ifndef TXNIsObjectAttachedToWindow
- PyMac_PRECHECK(TXNIsObjectAttachedToWindow);
+ PyMac_PRECHECK(TXNIsObjectAttachedToWindow);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = TXNIsObjectAttachedToWindow(_self->ob_itself);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = TXNIsObjectAttachedToWindow(_self->ob_itself);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *TXNObj_TXNDragTracker(TXNObjectObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- TXNFrameID iTXNFrameID;
- DragTrackingMessage iMessage;
- WindowPtr iWindow;
- DragReference iDragReference;
- Boolean iDifferentObjectSameWindow;
+ PyObject *_res = NULL;
+ OSErr _err;
+ TXNFrameID iTXNFrameID;
+ DragTrackingMessage iMessage;
+ WindowPtr iWindow;
+ DragReference iDragReference;
+ Boolean iDifferentObjectSameWindow;
#ifndef TXNDragTracker
- PyMac_PRECHECK(TXNDragTracker);
+ PyMac_PRECHECK(TXNDragTracker);
#endif
- if (!PyArg_ParseTuple(_args, "lhO&O&b",
- &iTXNFrameID,
- &iMessage,
- WinObj_Convert, &iWindow,
- DragObj_Convert, &iDragReference,
- &iDifferentObjectSameWindow))
- return NULL;
- _err = TXNDragTracker(_self->ob_itself,
- iTXNFrameID,
- iMessage,
- iWindow,
- iDragReference,
- iDifferentObjectSameWindow);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "lhO&O&b",
+ &iTXNFrameID,
+ &iMessage,
+ WinObj_Convert, &iWindow,
+ DragObj_Convert, &iDragReference,
+ &iDifferentObjectSameWindow))
+ return NULL;
+ _err = TXNDragTracker(_self->ob_itself,
+ iTXNFrameID,
+ iMessage,
+ iWindow,
+ iDragReference,
+ iDifferentObjectSameWindow);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TXNObj_TXNDragReceiver(TXNObjectObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- TXNFrameID iTXNFrameID;
- WindowPtr iWindow;
- DragReference iDragReference;
- Boolean iDifferentObjectSameWindow;
+ PyObject *_res = NULL;
+ OSErr _err;
+ TXNFrameID iTXNFrameID;
+ WindowPtr iWindow;
+ DragReference iDragReference;
+ Boolean iDifferentObjectSameWindow;
#ifndef TXNDragReceiver
- PyMac_PRECHECK(TXNDragReceiver);
+ PyMac_PRECHECK(TXNDragReceiver);
#endif
- if (!PyArg_ParseTuple(_args, "lO&O&b",
- &iTXNFrameID,
- WinObj_Convert, &iWindow,
- DragObj_Convert, &iDragReference,
- &iDifferentObjectSameWindow))
- return NULL;
- _err = TXNDragReceiver(_self->ob_itself,
- iTXNFrameID,
- iWindow,
- iDragReference,
- iDifferentObjectSameWindow);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "lO&O&b",
+ &iTXNFrameID,
+ WinObj_Convert, &iWindow,
+ DragObj_Convert, &iDragReference,
+ &iDifferentObjectSameWindow))
+ return NULL;
+ _err = TXNDragReceiver(_self->ob_itself,
+ iTXNFrameID,
+ iWindow,
+ iDragReference,
+ iDifferentObjectSameWindow);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TXNObj_TXNActivate(TXNObjectObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- TXNFrameID iTXNFrameID;
- TXNScrollBarState iActiveState;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ TXNFrameID iTXNFrameID;
+ TXNScrollBarState iActiveState;
#ifndef TXNActivate
- PyMac_PRECHECK(TXNActivate);
+ PyMac_PRECHECK(TXNActivate);
#endif
- if (!PyArg_ParseTuple(_args, "ll",
- &iTXNFrameID,
- &iActiveState))
- return NULL;
- _err = TXNActivate(_self->ob_itself,
- iTXNFrameID,
- iActiveState);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "ll",
+ &iTXNFrameID,
+ &iActiveState))
+ return NULL;
+ _err = TXNActivate(_self->ob_itself,
+ iTXNFrameID,
+ iActiveState);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TXNObj_TXNEchoMode(TXNObjectObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- UniChar iEchoCharacter;
- TextEncoding iEncoding;
- Boolean iOn;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ UniChar iEchoCharacter;
+ TextEncoding iEncoding;
+ Boolean iOn;
#ifndef TXNEchoMode
- PyMac_PRECHECK(TXNEchoMode);
+ PyMac_PRECHECK(TXNEchoMode);
#endif
- if (!PyArg_ParseTuple(_args, "hlb",
- &iEchoCharacter,
- &iEncoding,
- &iOn))
- return NULL;
- _err = TXNEchoMode(_self->ob_itself,
- iEchoCharacter,
- iEncoding,
- iOn);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "hlb",
+ &iEchoCharacter,
+ &iEncoding,
+ &iOn))
+ return NULL;
+ _err = TXNEchoMode(_self->ob_itself,
+ iEchoCharacter,
+ iEncoding,
+ iOn);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TXNObj_TXNDoFontMenuSelection(TXNObjectObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- TXNFontMenuObject iTXNFontMenuObject;
- SInt16 iMenuID;
- SInt16 iMenuItem;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ TXNFontMenuObject iTXNFontMenuObject;
+ SInt16 iMenuID;
+ SInt16 iMenuItem;
#ifndef TXNDoFontMenuSelection
- PyMac_PRECHECK(TXNDoFontMenuSelection);
+ PyMac_PRECHECK(TXNDoFontMenuSelection);
#endif
- if (!PyArg_ParseTuple(_args, "O&hh",
- TXNFontMenuObj_Convert, &iTXNFontMenuObject,
- &iMenuID,
- &iMenuItem))
- return NULL;
- _err = TXNDoFontMenuSelection(_self->ob_itself,
- iTXNFontMenuObject,
- iMenuID,
- iMenuItem);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&hh",
+ TXNFontMenuObj_Convert, &iTXNFontMenuObject,
+ &iMenuID,
+ &iMenuItem))
+ return NULL;
+ _err = TXNDoFontMenuSelection(_self->ob_itself,
+ iTXNFontMenuObject,
+ iMenuID,
+ iMenuItem);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TXNObj_TXNPrepareFontMenu(TXNObjectObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- TXNFontMenuObject iTXNFontMenuObject;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ TXNFontMenuObject iTXNFontMenuObject;
#ifndef TXNPrepareFontMenu
- PyMac_PRECHECK(TXNPrepareFontMenu);
+ PyMac_PRECHECK(TXNPrepareFontMenu);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- TXNFontMenuObj_Convert, &iTXNFontMenuObject))
- return NULL;
- _err = TXNPrepareFontMenu(_self->ob_itself,
- iTXNFontMenuObject);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ TXNFontMenuObj_Convert, &iTXNFontMenuObject))
+ return NULL;
+ _err = TXNPrepareFontMenu(_self->ob_itself,
+ iTXNFontMenuObject);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TXNObj_TXNPointToOffset(TXNObjectObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- Point iPoint;
- TXNOffset oOffset;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Point iPoint;
+ TXNOffset oOffset;
#ifndef TXNPointToOffset
- PyMac_PRECHECK(TXNPointToOffset);
+ PyMac_PRECHECK(TXNPointToOffset);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetPoint, &iPoint))
- return NULL;
- _err = TXNPointToOffset(_self->ob_itself,
- iPoint,
- &oOffset);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- oOffset);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetPoint, &iPoint))
+ return NULL;
+ _err = TXNPointToOffset(_self->ob_itself,
+ iPoint,
+ &oOffset);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ oOffset);
+ return _res;
}
static PyObject *TXNObj_TXNOffsetToPoint(TXNObjectObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- TXNOffset iOffset;
- Point oPoint;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ TXNOffset iOffset;
+ Point oPoint;
#ifndef TXNOffsetToPoint
- PyMac_PRECHECK(TXNOffsetToPoint);
+ PyMac_PRECHECK(TXNOffsetToPoint);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &iOffset))
- return NULL;
- _err = TXNOffsetToPoint(_self->ob_itself,
- iOffset,
- &oPoint);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- PyMac_BuildPoint, oPoint);
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &iOffset))
+ return NULL;
+ _err = TXNOffsetToPoint(_self->ob_itself,
+ iOffset,
+ &oPoint);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildPoint, oPoint);
+ return _res;
}
static PyObject *TXNObj_TXNGetLineCount(TXNObjectObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- ItemCount oLineTotal;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ ItemCount oLineTotal;
#ifndef TXNGetLineCount
- PyMac_PRECHECK(TXNGetLineCount);
+ PyMac_PRECHECK(TXNGetLineCount);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = TXNGetLineCount(_self->ob_itself,
- &oLineTotal);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- oLineTotal);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = TXNGetLineCount(_self->ob_itself,
+ &oLineTotal);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ oLineTotal);
+ return _res;
}
static PyObject *TXNObj_TXNGetLineMetrics(TXNObjectObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- UInt32 iLineNumber;
- Fixed oLineWidth;
- Fixed oLineHeight;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ UInt32 iLineNumber;
+ Fixed oLineWidth;
+ Fixed oLineHeight;
#ifndef TXNGetLineMetrics
- PyMac_PRECHECK(TXNGetLineMetrics);
+ PyMac_PRECHECK(TXNGetLineMetrics);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &iLineNumber))
- return NULL;
- _err = TXNGetLineMetrics(_self->ob_itself,
- iLineNumber,
- &oLineWidth,
- &oLineHeight);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&O&",
- PyMac_BuildFixed, oLineWidth,
- PyMac_BuildFixed, oLineHeight);
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &iLineNumber))
+ return NULL;
+ _err = TXNGetLineMetrics(_self->ob_itself,
+ iLineNumber,
+ &oLineWidth,
+ &oLineHeight);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&O&",
+ PyMac_BuildFixed, oLineWidth,
+ PyMac_BuildFixed, oLineHeight);
+ return _res;
}
static PyObject *TXNObj_TXNIsObjectAttachedToSpecificWindow(TXNObjectObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowPtr iWindow;
- Boolean oAttached;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowPtr iWindow;
+ Boolean oAttached;
#ifndef TXNIsObjectAttachedToSpecificWindow
- PyMac_PRECHECK(TXNIsObjectAttachedToSpecificWindow);
+ PyMac_PRECHECK(TXNIsObjectAttachedToSpecificWindow);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- WinObj_Convert, &iWindow))
- return NULL;
- _err = TXNIsObjectAttachedToSpecificWindow(_self->ob_itself,
- iWindow,
- &oAttached);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("b",
- oAttached);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ WinObj_Convert, &iWindow))
+ return NULL;
+ _err = TXNIsObjectAttachedToSpecificWindow(_self->ob_itself,
+ iWindow,
+ &oAttached);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("b",
+ oAttached);
+ return _res;
}
static PyObject *TXNObj_TXNRecalcTextLayout(TXNObjectObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef TXNRecalcTextLayout
- PyMac_PRECHECK(TXNRecalcTextLayout);
+ PyMac_PRECHECK(TXNRecalcTextLayout);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- TXNRecalcTextLayout(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ TXNRecalcTextLayout(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyMethodDef TXNObj_methods[] = {
- {"TXNDeleteObject", (PyCFunction)TXNObj_TXNDeleteObject, 1,
- PyDoc_STR("() -> None")},
- {"TXNResizeFrame", (PyCFunction)TXNObj_TXNResizeFrame, 1,
- PyDoc_STR("(UInt32 iWidth, UInt32 iHeight, TXNFrameID iTXNFrameID) -> None")},
- {"TXNSetFrameBounds", (PyCFunction)TXNObj_TXNSetFrameBounds, 1,
- PyDoc_STR("(SInt32 iTop, SInt32 iLeft, SInt32 iBottom, SInt32 iRight, TXNFrameID iTXNFrameID) -> None")},
- {"TXNKeyDown", (PyCFunction)TXNObj_TXNKeyDown, 1,
- PyDoc_STR("(EventRecord iEvent) -> None")},
- {"TXNAdjustCursor", (PyCFunction)TXNObj_TXNAdjustCursor, 1,
- PyDoc_STR("(RgnHandle ioCursorRgn) -> None")},
- {"TXNClick", (PyCFunction)TXNObj_TXNClick, 1,
- PyDoc_STR("(EventRecord iEvent) -> None")},
- {"TXNSelectAll", (PyCFunction)TXNObj_TXNSelectAll, 1,
- PyDoc_STR("() -> None")},
- {"TXNFocus", (PyCFunction)TXNObj_TXNFocus, 1,
- PyDoc_STR("(Boolean iBecomingFocused) -> None")},
- {"TXNUpdate", (PyCFunction)TXNObj_TXNUpdate, 1,
- PyDoc_STR("() -> None")},
- {"TXNDraw", (PyCFunction)TXNObj_TXNDraw, 1,
- PyDoc_STR("(GWorldPtr iDrawPort) -> None")},
- {"TXNForceUpdate", (PyCFunction)TXNObj_TXNForceUpdate, 1,
- PyDoc_STR("() -> None")},
- {"TXNGetSleepTicks", (PyCFunction)TXNObj_TXNGetSleepTicks, 1,
- PyDoc_STR("() -> (UInt32 _rv)")},
- {"TXNIdle", (PyCFunction)TXNObj_TXNIdle, 1,
- PyDoc_STR("() -> None")},
- {"TXNGrowWindow", (PyCFunction)TXNObj_TXNGrowWindow, 1,
- PyDoc_STR("(EventRecord iEvent) -> None")},
- {"TXNZoomWindow", (PyCFunction)TXNObj_TXNZoomWindow, 1,
- PyDoc_STR("(SInt16 iPart) -> None")},
- {"TXNCanUndo", (PyCFunction)TXNObj_TXNCanUndo, 1,
- PyDoc_STR("() -> (Boolean _rv, TXNActionKey oTXNActionKey)")},
- {"TXNUndo", (PyCFunction)TXNObj_TXNUndo, 1,
- PyDoc_STR("() -> None")},
- {"TXNCanRedo", (PyCFunction)TXNObj_TXNCanRedo, 1,
- PyDoc_STR("() -> (Boolean _rv, TXNActionKey oTXNActionKey)")},
- {"TXNRedo", (PyCFunction)TXNObj_TXNRedo, 1,
- PyDoc_STR("() -> None")},
- {"TXNCut", (PyCFunction)TXNObj_TXNCut, 1,
- PyDoc_STR("() -> None")},
- {"TXNCopy", (PyCFunction)TXNObj_TXNCopy, 1,
- PyDoc_STR("() -> None")},
- {"TXNPaste", (PyCFunction)TXNObj_TXNPaste, 1,
- PyDoc_STR("() -> None")},
- {"TXNClear", (PyCFunction)TXNObj_TXNClear, 1,
- PyDoc_STR("() -> None")},
- {"TXNGetSelection", (PyCFunction)TXNObj_TXNGetSelection, 1,
- PyDoc_STR("() -> (TXNOffset oStartOffset, TXNOffset oEndOffset)")},
- {"TXNShowSelection", (PyCFunction)TXNObj_TXNShowSelection, 1,
- PyDoc_STR("(Boolean iShowEnd) -> None")},
- {"TXNIsSelectionEmpty", (PyCFunction)TXNObj_TXNIsSelectionEmpty, 1,
- PyDoc_STR("() -> (Boolean _rv)")},
- {"TXNSetSelection", (PyCFunction)TXNObj_TXNSetSelection, 1,
- PyDoc_STR("(TXNOffset iStartOffset, TXNOffset iEndOffset) -> None")},
- {"TXNCountRunsInRange", (PyCFunction)TXNObj_TXNCountRunsInRange, 1,
- PyDoc_STR("(TXNOffset iStartOffset, TXNOffset iEndOffset) -> (ItemCount oRunCount)")},
- {"TXNDataSize", (PyCFunction)TXNObj_TXNDataSize, 1,
- PyDoc_STR("() -> (ByteCount _rv)")},
- {"TXNGetData", (PyCFunction)TXNObj_TXNGetData, 1,
- PyDoc_STR("(TXNOffset iStartOffset, TXNOffset iEndOffset) -> (Handle oDataHandle)")},
- {"TXNGetDataEncoded", (PyCFunction)TXNObj_TXNGetDataEncoded, 1,
- PyDoc_STR("(TXNOffset iStartOffset, TXNOffset iEndOffset, TXNDataType iEncoding) -> (Handle oDataHandle)")},
- {"TXNSetDataFromFile", (PyCFunction)TXNObj_TXNSetDataFromFile, 1,
- PyDoc_STR("(SInt16 iFileRefNum, OSType iFileType, ByteCount iFileLength, TXNOffset iStartOffset, TXNOffset iEndOffset) -> None")},
- {"TXNGetChangeCount", (PyCFunction)TXNObj_TXNGetChangeCount, 1,
- PyDoc_STR("() -> (ItemCount _rv)")},
- {"TXNSave", (PyCFunction)TXNObj_TXNSave, 1,
- PyDoc_STR("(TXNFileType iType, OSType iResType, TXNPermanentTextEncodingType iPermanentEncoding, FSSpec iFileSpecification, SInt16 iDataReference, SInt16 iResourceReference) -> None")},
- {"TXNRevert", (PyCFunction)TXNObj_TXNRevert, 1,
- PyDoc_STR("() -> None")},
- {"TXNPageSetup", (PyCFunction)TXNObj_TXNPageSetup, 1,
- PyDoc_STR("() -> None")},
- {"TXNPrint", (PyCFunction)TXNObj_TXNPrint, 1,
- PyDoc_STR("() -> None")},
- {"TXNGetViewRect", (PyCFunction)TXNObj_TXNGetViewRect, 1,
- PyDoc_STR("() -> (Rect oViewRect)")},
- {"TXNSetViewRect", (PyCFunction)TXNObj_TXNSetViewRect, 1,
- PyDoc_STR("(Rect iViewRect) -> None")},
- {"TXNAttachObjectToWindow", (PyCFunction)TXNObj_TXNAttachObjectToWindow, 1,
- PyDoc_STR("(GWorldPtr iWindow, Boolean iIsActualWindow) -> None")},
- {"TXNIsObjectAttachedToWindow", (PyCFunction)TXNObj_TXNIsObjectAttachedToWindow, 1,
- PyDoc_STR("() -> (Boolean _rv)")},
- {"TXNDragTracker", (PyCFunction)TXNObj_TXNDragTracker, 1,
- PyDoc_STR("(TXNFrameID iTXNFrameID, DragTrackingMessage iMessage, WindowPtr iWindow, DragReference iDragReference, Boolean iDifferentObjectSameWindow) -> None")},
- {"TXNDragReceiver", (PyCFunction)TXNObj_TXNDragReceiver, 1,
- PyDoc_STR("(TXNFrameID iTXNFrameID, WindowPtr iWindow, DragReference iDragReference, Boolean iDifferentObjectSameWindow) -> None")},
- {"TXNActivate", (PyCFunction)TXNObj_TXNActivate, 1,
- PyDoc_STR("(TXNFrameID iTXNFrameID, TXNScrollBarState iActiveState) -> None")},
- {"TXNEchoMode", (PyCFunction)TXNObj_TXNEchoMode, 1,
- PyDoc_STR("(UniChar iEchoCharacter, TextEncoding iEncoding, Boolean iOn) -> None")},
- {"TXNDoFontMenuSelection", (PyCFunction)TXNObj_TXNDoFontMenuSelection, 1,
- PyDoc_STR("(TXNFontMenuObject iTXNFontMenuObject, SInt16 iMenuID, SInt16 iMenuItem) -> None")},
- {"TXNPrepareFontMenu", (PyCFunction)TXNObj_TXNPrepareFontMenu, 1,
- PyDoc_STR("(TXNFontMenuObject iTXNFontMenuObject) -> None")},
- {"TXNPointToOffset", (PyCFunction)TXNObj_TXNPointToOffset, 1,
- PyDoc_STR("(Point iPoint) -> (TXNOffset oOffset)")},
- {"TXNOffsetToPoint", (PyCFunction)TXNObj_TXNOffsetToPoint, 1,
- PyDoc_STR("(TXNOffset iOffset) -> (Point oPoint)")},
- {"TXNGetLineCount", (PyCFunction)TXNObj_TXNGetLineCount, 1,
- PyDoc_STR("() -> (ItemCount oLineTotal)")},
- {"TXNGetLineMetrics", (PyCFunction)TXNObj_TXNGetLineMetrics, 1,
- PyDoc_STR("(UInt32 iLineNumber) -> (Fixed oLineWidth, Fixed oLineHeight)")},
- {"TXNIsObjectAttachedToSpecificWindow", (PyCFunction)TXNObj_TXNIsObjectAttachedToSpecificWindow, 1,
- PyDoc_STR("(WindowPtr iWindow) -> (Boolean oAttached)")},
- {"TXNRecalcTextLayout", (PyCFunction)TXNObj_TXNRecalcTextLayout, 1,
- PyDoc_STR("() -> None")},
- {NULL, NULL, 0}
+ {"TXNDeleteObject", (PyCFunction)TXNObj_TXNDeleteObject, 1,
+ PyDoc_STR("() -> None")},
+ {"TXNResizeFrame", (PyCFunction)TXNObj_TXNResizeFrame, 1,
+ PyDoc_STR("(UInt32 iWidth, UInt32 iHeight, TXNFrameID iTXNFrameID) -> None")},
+ {"TXNSetFrameBounds", (PyCFunction)TXNObj_TXNSetFrameBounds, 1,
+ PyDoc_STR("(SInt32 iTop, SInt32 iLeft, SInt32 iBottom, SInt32 iRight, TXNFrameID iTXNFrameID) -> None")},
+ {"TXNKeyDown", (PyCFunction)TXNObj_TXNKeyDown, 1,
+ PyDoc_STR("(EventRecord iEvent) -> None")},
+ {"TXNAdjustCursor", (PyCFunction)TXNObj_TXNAdjustCursor, 1,
+ PyDoc_STR("(RgnHandle ioCursorRgn) -> None")},
+ {"TXNClick", (PyCFunction)TXNObj_TXNClick, 1,
+ PyDoc_STR("(EventRecord iEvent) -> None")},
+ {"TXNSelectAll", (PyCFunction)TXNObj_TXNSelectAll, 1,
+ PyDoc_STR("() -> None")},
+ {"TXNFocus", (PyCFunction)TXNObj_TXNFocus, 1,
+ PyDoc_STR("(Boolean iBecomingFocused) -> None")},
+ {"TXNUpdate", (PyCFunction)TXNObj_TXNUpdate, 1,
+ PyDoc_STR("() -> None")},
+ {"TXNDraw", (PyCFunction)TXNObj_TXNDraw, 1,
+ PyDoc_STR("(GWorldPtr iDrawPort) -> None")},
+ {"TXNForceUpdate", (PyCFunction)TXNObj_TXNForceUpdate, 1,
+ PyDoc_STR("() -> None")},
+ {"TXNGetSleepTicks", (PyCFunction)TXNObj_TXNGetSleepTicks, 1,
+ PyDoc_STR("() -> (UInt32 _rv)")},
+ {"TXNIdle", (PyCFunction)TXNObj_TXNIdle, 1,
+ PyDoc_STR("() -> None")},
+ {"TXNGrowWindow", (PyCFunction)TXNObj_TXNGrowWindow, 1,
+ PyDoc_STR("(EventRecord iEvent) -> None")},
+ {"TXNZoomWindow", (PyCFunction)TXNObj_TXNZoomWindow, 1,
+ PyDoc_STR("(SInt16 iPart) -> None")},
+ {"TXNCanUndo", (PyCFunction)TXNObj_TXNCanUndo, 1,
+ PyDoc_STR("() -> (Boolean _rv, TXNActionKey oTXNActionKey)")},
+ {"TXNUndo", (PyCFunction)TXNObj_TXNUndo, 1,
+ PyDoc_STR("() -> None")},
+ {"TXNCanRedo", (PyCFunction)TXNObj_TXNCanRedo, 1,
+ PyDoc_STR("() -> (Boolean _rv, TXNActionKey oTXNActionKey)")},
+ {"TXNRedo", (PyCFunction)TXNObj_TXNRedo, 1,
+ PyDoc_STR("() -> None")},
+ {"TXNCut", (PyCFunction)TXNObj_TXNCut, 1,
+ PyDoc_STR("() -> None")},
+ {"TXNCopy", (PyCFunction)TXNObj_TXNCopy, 1,
+ PyDoc_STR("() -> None")},
+ {"TXNPaste", (PyCFunction)TXNObj_TXNPaste, 1,
+ PyDoc_STR("() -> None")},
+ {"TXNClear", (PyCFunction)TXNObj_TXNClear, 1,
+ PyDoc_STR("() -> None")},
+ {"TXNGetSelection", (PyCFunction)TXNObj_TXNGetSelection, 1,
+ PyDoc_STR("() -> (TXNOffset oStartOffset, TXNOffset oEndOffset)")},
+ {"TXNShowSelection", (PyCFunction)TXNObj_TXNShowSelection, 1,
+ PyDoc_STR("(Boolean iShowEnd) -> None")},
+ {"TXNIsSelectionEmpty", (PyCFunction)TXNObj_TXNIsSelectionEmpty, 1,
+ PyDoc_STR("() -> (Boolean _rv)")},
+ {"TXNSetSelection", (PyCFunction)TXNObj_TXNSetSelection, 1,
+ PyDoc_STR("(TXNOffset iStartOffset, TXNOffset iEndOffset) -> None")},
+ {"TXNCountRunsInRange", (PyCFunction)TXNObj_TXNCountRunsInRange, 1,
+ PyDoc_STR("(TXNOffset iStartOffset, TXNOffset iEndOffset) -> (ItemCount oRunCount)")},
+ {"TXNDataSize", (PyCFunction)TXNObj_TXNDataSize, 1,
+ PyDoc_STR("() -> (ByteCount _rv)")},
+ {"TXNGetData", (PyCFunction)TXNObj_TXNGetData, 1,
+ PyDoc_STR("(TXNOffset iStartOffset, TXNOffset iEndOffset) -> (Handle oDataHandle)")},
+ {"TXNGetDataEncoded", (PyCFunction)TXNObj_TXNGetDataEncoded, 1,
+ PyDoc_STR("(TXNOffset iStartOffset, TXNOffset iEndOffset, TXNDataType iEncoding) -> (Handle oDataHandle)")},
+ {"TXNSetDataFromFile", (PyCFunction)TXNObj_TXNSetDataFromFile, 1,
+ PyDoc_STR("(SInt16 iFileRefNum, OSType iFileType, ByteCount iFileLength, TXNOffset iStartOffset, TXNOffset iEndOffset) -> None")},
+ {"TXNGetChangeCount", (PyCFunction)TXNObj_TXNGetChangeCount, 1,
+ PyDoc_STR("() -> (ItemCount _rv)")},
+ {"TXNSave", (PyCFunction)TXNObj_TXNSave, 1,
+ PyDoc_STR("(TXNFileType iType, OSType iResType, TXNPermanentTextEncodingType iPermanentEncoding, FSSpec iFileSpecification, SInt16 iDataReference, SInt16 iResourceReference) -> None")},
+ {"TXNRevert", (PyCFunction)TXNObj_TXNRevert, 1,
+ PyDoc_STR("() -> None")},
+ {"TXNPageSetup", (PyCFunction)TXNObj_TXNPageSetup, 1,
+ PyDoc_STR("() -> None")},
+ {"TXNPrint", (PyCFunction)TXNObj_TXNPrint, 1,
+ PyDoc_STR("() -> None")},
+ {"TXNGetViewRect", (PyCFunction)TXNObj_TXNGetViewRect, 1,
+ PyDoc_STR("() -> (Rect oViewRect)")},
+ {"TXNSetViewRect", (PyCFunction)TXNObj_TXNSetViewRect, 1,
+ PyDoc_STR("(Rect iViewRect) -> None")},
+ {"TXNAttachObjectToWindow", (PyCFunction)TXNObj_TXNAttachObjectToWindow, 1,
+ PyDoc_STR("(GWorldPtr iWindow, Boolean iIsActualWindow) -> None")},
+ {"TXNIsObjectAttachedToWindow", (PyCFunction)TXNObj_TXNIsObjectAttachedToWindow, 1,
+ PyDoc_STR("() -> (Boolean _rv)")},
+ {"TXNDragTracker", (PyCFunction)TXNObj_TXNDragTracker, 1,
+ PyDoc_STR("(TXNFrameID iTXNFrameID, DragTrackingMessage iMessage, WindowPtr iWindow, DragReference iDragReference, Boolean iDifferentObjectSameWindow) -> None")},
+ {"TXNDragReceiver", (PyCFunction)TXNObj_TXNDragReceiver, 1,
+ PyDoc_STR("(TXNFrameID iTXNFrameID, WindowPtr iWindow, DragReference iDragReference, Boolean iDifferentObjectSameWindow) -> None")},
+ {"TXNActivate", (PyCFunction)TXNObj_TXNActivate, 1,
+ PyDoc_STR("(TXNFrameID iTXNFrameID, TXNScrollBarState iActiveState) -> None")},
+ {"TXNEchoMode", (PyCFunction)TXNObj_TXNEchoMode, 1,
+ PyDoc_STR("(UniChar iEchoCharacter, TextEncoding iEncoding, Boolean iOn) -> None")},
+ {"TXNDoFontMenuSelection", (PyCFunction)TXNObj_TXNDoFontMenuSelection, 1,
+ PyDoc_STR("(TXNFontMenuObject iTXNFontMenuObject, SInt16 iMenuID, SInt16 iMenuItem) -> None")},
+ {"TXNPrepareFontMenu", (PyCFunction)TXNObj_TXNPrepareFontMenu, 1,
+ PyDoc_STR("(TXNFontMenuObject iTXNFontMenuObject) -> None")},
+ {"TXNPointToOffset", (PyCFunction)TXNObj_TXNPointToOffset, 1,
+ PyDoc_STR("(Point iPoint) -> (TXNOffset oOffset)")},
+ {"TXNOffsetToPoint", (PyCFunction)TXNObj_TXNOffsetToPoint, 1,
+ PyDoc_STR("(TXNOffset iOffset) -> (Point oPoint)")},
+ {"TXNGetLineCount", (PyCFunction)TXNObj_TXNGetLineCount, 1,
+ PyDoc_STR("() -> (ItemCount oLineTotal)")},
+ {"TXNGetLineMetrics", (PyCFunction)TXNObj_TXNGetLineMetrics, 1,
+ PyDoc_STR("(UInt32 iLineNumber) -> (Fixed oLineWidth, Fixed oLineHeight)")},
+ {"TXNIsObjectAttachedToSpecificWindow", (PyCFunction)TXNObj_TXNIsObjectAttachedToSpecificWindow, 1,
+ PyDoc_STR("(WindowPtr iWindow) -> (Boolean oAttached)")},
+ {"TXNRecalcTextLayout", (PyCFunction)TXNObj_TXNRecalcTextLayout, 1,
+ PyDoc_STR("() -> None")},
+ {NULL, NULL, 0}
};
#define TXNObj_getsetlist NULL
@@ -1242,61 +1242,61 @@ static PyMethodDef TXNObj_methods[] = {
static PyObject *TXNObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
- PyObject *_self;
- TXNObject itself;
- char *kw[] = {"itself", 0};
+ 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;
+ 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 = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
- "_Mlte.TXNObject", /*tp_name*/
- sizeof(TXNObjectObject), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- /* methods */
- (destructor) TXNObj_dealloc, /*tp_dealloc*/
- 0, /*tp_print*/
- (getattrfunc)0, /*tp_getattr*/
- (setattrfunc)0, /*tp_setattr*/
- (cmpfunc) TXNObj_compare, /*tp_compare*/
- (reprfunc) TXNObj_repr, /*tp_repr*/
- (PyNumberMethods *)0, /* tp_as_number */
- (PySequenceMethods *)0, /* tp_as_sequence */
- (PyMappingMethods *)0, /* tp_as_mapping */
- (hashfunc) TXNObj_hash, /*tp_hash*/
- 0, /*tp_call*/
- 0, /*tp_str*/
- PyObject_GenericGetAttr, /*tp_getattro*/
- PyObject_GenericSetAttr, /*tp_setattro */
- 0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
- 0, /*tp_doc*/
- 0, /*tp_traverse*/
- 0, /*tp_clear*/
- 0, /*tp_richcompare*/
- 0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
- 0, /*tp_iternext*/
- TXNObj_methods, /* tp_methods */
- 0, /*tp_members*/
- TXNObj_getsetlist, /*tp_getset*/
- 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 */
+ PyObject_HEAD_INIT(NULL)
+ 0, /*ob_size*/
+ "_Mlte.TXNObject", /*tp_name*/
+ sizeof(TXNObjectObject), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ /* methods */
+ (destructor) TXNObj_dealloc, /*tp_dealloc*/
+ 0, /*tp_print*/
+ (getattrfunc)0, /*tp_getattr*/
+ (setattrfunc)0, /*tp_setattr*/
+ (cmpfunc) TXNObj_compare, /*tp_compare*/
+ (reprfunc) TXNObj_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) TXNObj_hash, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ PyObject_GenericGetAttr, /*tp_getattro*/
+ PyObject_GenericSetAttr, /*tp_setattro */
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
+ 0, /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ TXNObj_methods, /* tp_methods */
+ 0, /*tp_members*/
+ TXNObj_getsetlist, /*tp_getset*/
+ 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 -------------------- */
@@ -1309,77 +1309,77 @@ PyTypeObject TXNFontMenuObject_Type;
#define TXNFontMenuObj_Check(x) ((x)->ob_type == &TXNFontMenuObject_Type || PyObject_TypeCheck((x), &TXNFontMenuObject_Type))
typedef struct TXNFontMenuObjectObject {
- PyObject_HEAD
- TXNFontMenuObject ob_itself;
+ PyObject_HEAD
+ TXNFontMenuObject ob_itself;
} TXNFontMenuObjectObject;
PyObject *TXNFontMenuObj_New(TXNFontMenuObject itself)
{
- TXNFontMenuObjectObject *it;
- if (itself == NULL) return PyMac_Error(resNotFound);
- it = PyObject_NEW(TXNFontMenuObjectObject, &TXNFontMenuObject_Type);
- if (it == NULL) return NULL;
- it->ob_itself = itself;
- return (PyObject *)it;
+ TXNFontMenuObjectObject *it;
+ if (itself == NULL) return PyMac_Error(resNotFound);
+ it = PyObject_NEW(TXNFontMenuObjectObject, &TXNFontMenuObject_Type);
+ if (it == NULL) return NULL;
+ it->ob_itself = itself;
+ return (PyObject *)it;
}
int TXNFontMenuObj_Convert(PyObject *v, TXNFontMenuObject *p_itself)
{
- if (!TXNFontMenuObj_Check(v))
- {
- PyErr_SetString(PyExc_TypeError, "TXNFontMenuObject required");
- return 0;
- }
- *p_itself = ((TXNFontMenuObjectObject *)v)->ob_itself;
- return 1;
+ if (!TXNFontMenuObj_Check(v))
+ {
+ PyErr_SetString(PyExc_TypeError, "TXNFontMenuObject required");
+ return 0;
+ }
+ *p_itself = ((TXNFontMenuObjectObject *)v)->ob_itself;
+ return 1;
}
static void TXNFontMenuObj_dealloc(TXNFontMenuObjectObject *self)
{
- /* Cleanup of self->ob_itself goes here */
- self->ob_type->tp_free((PyObject *)self);
+ /* Cleanup of self->ob_itself goes here */
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *TXNFontMenuObj_TXNGetFontMenuHandle(TXNFontMenuObjectObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- MenuHandle oFontMenuHandle;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ MenuHandle oFontMenuHandle;
#ifndef TXNGetFontMenuHandle
- PyMac_PRECHECK(TXNGetFontMenuHandle);
+ PyMac_PRECHECK(TXNGetFontMenuHandle);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = TXNGetFontMenuHandle(_self->ob_itself,
- &oFontMenuHandle);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- MenuObj_New, oFontMenuHandle);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = TXNGetFontMenuHandle(_self->ob_itself,
+ &oFontMenuHandle);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ MenuObj_New, oFontMenuHandle);
+ return _res;
}
static PyObject *TXNFontMenuObj_TXNDisposeFontMenuObject(TXNFontMenuObjectObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
+ PyObject *_res = NULL;
+ OSStatus _err;
#ifndef TXNDisposeFontMenuObject
- PyMac_PRECHECK(TXNDisposeFontMenuObject);
+ PyMac_PRECHECK(TXNDisposeFontMenuObject);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = TXNDisposeFontMenuObject(_self->ob_itself);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = TXNDisposeFontMenuObject(_self->ob_itself);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyMethodDef TXNFontMenuObj_methods[] = {
- {"TXNGetFontMenuHandle", (PyCFunction)TXNFontMenuObj_TXNGetFontMenuHandle, 1,
- PyDoc_STR("() -> (MenuHandle oFontMenuHandle)")},
- {"TXNDisposeFontMenuObject", (PyCFunction)TXNFontMenuObj_TXNDisposeFontMenuObject, 1,
- PyDoc_STR("() -> None")},
- {NULL, NULL, 0}
+ {"TXNGetFontMenuHandle", (PyCFunction)TXNFontMenuObj_TXNGetFontMenuHandle, 1,
+ PyDoc_STR("() -> (MenuHandle oFontMenuHandle)")},
+ {"TXNDisposeFontMenuObject", (PyCFunction)TXNFontMenuObj_TXNDisposeFontMenuObject, 1,
+ PyDoc_STR("() -> None")},
+ {NULL, NULL, 0}
};
#define TXNFontMenuObj_getsetlist NULL
@@ -1396,61 +1396,61 @@ static PyMethodDef TXNFontMenuObj_methods[] = {
static PyObject *TXNFontMenuObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
- PyObject *_self;
- TXNFontMenuObject itself;
- char *kw[] = {"itself", 0};
+ 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;
+ 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 = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
- "_Mlte.TXNFontMenuObject", /*tp_name*/
- sizeof(TXNFontMenuObjectObject), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- /* methods */
- (destructor) TXNFontMenuObj_dealloc, /*tp_dealloc*/
- 0, /*tp_print*/
- (getattrfunc)0, /*tp_getattr*/
- (setattrfunc)0, /*tp_setattr*/
- (cmpfunc) TXNFontMenuObj_compare, /*tp_compare*/
- (reprfunc) TXNFontMenuObj_repr, /*tp_repr*/
- (PyNumberMethods *)0, /* tp_as_number */
- (PySequenceMethods *)0, /* tp_as_sequence */
- (PyMappingMethods *)0, /* tp_as_mapping */
- (hashfunc) TXNFontMenuObj_hash, /*tp_hash*/
- 0, /*tp_call*/
- 0, /*tp_str*/
- PyObject_GenericGetAttr, /*tp_getattro*/
- PyObject_GenericSetAttr, /*tp_setattro */
- 0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
- 0, /*tp_doc*/
- 0, /*tp_traverse*/
- 0, /*tp_clear*/
- 0, /*tp_richcompare*/
- 0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
- 0, /*tp_iternext*/
- TXNFontMenuObj_methods, /* tp_methods */
- 0, /*tp_members*/
- TXNFontMenuObj_getsetlist, /*tp_getset*/
- 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 */
+ PyObject_HEAD_INIT(NULL)
+ 0, /*ob_size*/
+ "_Mlte.TXNFontMenuObject", /*tp_name*/
+ sizeof(TXNFontMenuObjectObject), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ /* methods */
+ (destructor) TXNFontMenuObj_dealloc, /*tp_dealloc*/
+ 0, /*tp_print*/
+ (getattrfunc)0, /*tp_getattr*/
+ (setattrfunc)0, /*tp_setattr*/
+ (cmpfunc) TXNFontMenuObj_compare, /*tp_compare*/
+ (reprfunc) TXNFontMenuObj_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) TXNFontMenuObj_hash, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ PyObject_GenericGetAttr, /*tp_getattro*/
+ PyObject_GenericSetAttr, /*tp_setattro */
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
+ 0, /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ TXNFontMenuObj_methods, /* tp_methods */
+ 0, /*tp_members*/
+ TXNFontMenuObj_getsetlist, /*tp_getset*/
+ 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 ---------------- */
@@ -1458,168 +1458,168 @@ PyTypeObject TXNFontMenuObject_Type = {
static PyObject *Mlte_TXNNewObject(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- FSSpec * iFileSpec;
- WindowPtr iWindow;
- Rect iFrame;
- TXNFrameOptions iFrameOptions;
- TXNFrameType iFrameType;
- TXNFileType iFileType;
- TXNPermanentTextEncodingType iPermanentEncoding;
- TXNObject oTXNObject;
- TXNFrameID oTXNFrameID;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ FSSpec * iFileSpec;
+ WindowPtr iWindow;
+ Rect iFrame;
+ TXNFrameOptions iFrameOptions;
+ TXNFrameType iFrameType;
+ TXNFileType iFileType;
+ TXNPermanentTextEncodingType iPermanentEncoding;
+ TXNObject oTXNObject;
+ TXNFrameID oTXNFrameID;
#ifndef TXNNewObject
- PyMac_PRECHECK(TXNNewObject);
+ PyMac_PRECHECK(TXNNewObject);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&llO&l",
- OptFSSpecPtr_Convert, &iFileSpec,
- WinObj_Convert, &iWindow,
- PyMac_GetRect, &iFrame,
- &iFrameOptions,
- &iFrameType,
- PyMac_GetOSType, &iFileType,
- &iPermanentEncoding))
- return NULL;
- _err = TXNNewObject(iFileSpec,
- iWindow,
- &iFrame,
- iFrameOptions,
- iFrameType,
- iFileType,
- iPermanentEncoding,
- &oTXNObject,
- &oTXNFrameID,
- (TXNObjectRefcon)0);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&l",
- TXNObj_New, oTXNObject,
- oTXNFrameID);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&O&llO&l",
+ OptFSSpecPtr_Convert, &iFileSpec,
+ WinObj_Convert, &iWindow,
+ PyMac_GetRect, &iFrame,
+ &iFrameOptions,
+ &iFrameType,
+ PyMac_GetOSType, &iFileType,
+ &iPermanentEncoding))
+ return NULL;
+ _err = TXNNewObject(iFileSpec,
+ iWindow,
+ &iFrame,
+ iFrameOptions,
+ iFrameType,
+ iFileType,
+ iPermanentEncoding,
+ &oTXNObject,
+ &oTXNFrameID,
+ (TXNObjectRefcon)0);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&l",
+ TXNObj_New, oTXNObject,
+ oTXNFrameID);
+ return _res;
}
static PyObject *Mlte_TXNTerminateTextension(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef TXNTerminateTextension
- PyMac_PRECHECK(TXNTerminateTextension);
+ PyMac_PRECHECK(TXNTerminateTextension);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- TXNTerminateTextension();
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ TXNTerminateTextension();
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Mlte_TXNIsScrapPastable(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
+ PyObject *_res = NULL;
+ Boolean _rv;
#ifndef TXNIsScrapPastable
- PyMac_PRECHECK(TXNIsScrapPastable);
+ PyMac_PRECHECK(TXNIsScrapPastable);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = TXNIsScrapPastable();
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = TXNIsScrapPastable();
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *Mlte_TXNConvertToPublicScrap(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
+ PyObject *_res = NULL;
+ OSStatus _err;
#ifndef TXNConvertToPublicScrap
- PyMac_PRECHECK(TXNConvertToPublicScrap);
+ PyMac_PRECHECK(TXNConvertToPublicScrap);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = TXNConvertToPublicScrap();
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = TXNConvertToPublicScrap();
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Mlte_TXNConvertFromPublicScrap(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
+ PyObject *_res = NULL;
+ OSStatus _err;
#ifndef TXNConvertFromPublicScrap
- PyMac_PRECHECK(TXNConvertFromPublicScrap);
+ PyMac_PRECHECK(TXNConvertFromPublicScrap);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = TXNConvertFromPublicScrap();
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = TXNConvertFromPublicScrap();
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Mlte_TXNNewFontMenuObject(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- MenuHandle iFontMenuHandle;
- SInt16 iMenuID;
- SInt16 iStartHierMenuID;
- TXNFontMenuObject oTXNFontMenuObject;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ MenuHandle iFontMenuHandle;
+ SInt16 iMenuID;
+ SInt16 iStartHierMenuID;
+ TXNFontMenuObject oTXNFontMenuObject;
#ifndef TXNNewFontMenuObject
- PyMac_PRECHECK(TXNNewFontMenuObject);
+ PyMac_PRECHECK(TXNNewFontMenuObject);
#endif
- if (!PyArg_ParseTuple(_args, "O&hh",
- MenuObj_Convert, &iFontMenuHandle,
- &iMenuID,
- &iStartHierMenuID))
- return NULL;
- _err = TXNNewFontMenuObject(iFontMenuHandle,
- iMenuID,
- iStartHierMenuID,
- &oTXNFontMenuObject);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- TXNFontMenuObj_New, oTXNFontMenuObject);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&hh",
+ MenuObj_Convert, &iFontMenuHandle,
+ &iMenuID,
+ &iStartHierMenuID))
+ return NULL;
+ _err = TXNNewFontMenuObject(iFontMenuHandle,
+ iMenuID,
+ iStartHierMenuID,
+ &oTXNFontMenuObject);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ TXNFontMenuObj_New, oTXNFontMenuObject);
+ return _res;
}
static PyObject *Mlte_TXNVersionInformation(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- TXNVersionValue _rv;
- TXNFeatureBits oFeatureFlags;
+ PyObject *_res = NULL;
+ TXNVersionValue _rv;
+ TXNFeatureBits oFeatureFlags;
#ifndef TXNVersionInformation
- PyMac_PRECHECK(TXNVersionInformation);
+ PyMac_PRECHECK(TXNVersionInformation);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = TXNVersionInformation(&oFeatureFlags);
- _res = Py_BuildValue("ll",
- _rv,
- oFeatureFlags);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = TXNVersionInformation(&oFeatureFlags);
+ _res = Py_BuildValue("ll",
+ _rv,
+ oFeatureFlags);
+ return _res;
}
static PyObject *Mlte_TXNInitTextension(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
- OSStatus _err;
- TXNMacOSPreferredFontDescription * iDefaultFonts = NULL;
- ItemCount iCountDefaultFonts = 0;
- TXNInitOptions iUsageFlags;
- PyMac_PRECHECK(TXNInitTextension);
- if (!PyArg_ParseTuple(_args, "l", &iUsageFlags))
- return NULL;
- _err = TXNInitTextension(iDefaultFonts,
- iCountDefaultFonts,
- iUsageFlags);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ OSStatus _err;
+ TXNMacOSPreferredFontDescription * iDefaultFonts = NULL;
+ ItemCount iCountDefaultFonts = 0;
+ TXNInitOptions iUsageFlags;
+ PyMac_PRECHECK(TXNInitTextension);
+ if (!PyArg_ParseTuple(_args, "l", &iUsageFlags))
+ return NULL;
+ _err = TXNInitTextension(iDefaultFonts,
+ iCountDefaultFonts,
+ iUsageFlags);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
@@ -1627,24 +1627,24 @@ static PyObject *Mlte_TXNInitTextension(PyObject *_self, PyObject *_args)
static PyMethodDef Mlte_methods[] = {
#ifndef __LP64__
- {"TXNNewObject", (PyCFunction)Mlte_TXNNewObject, 1,
- PyDoc_STR("(FSSpec * iFileSpec, WindowPtr iWindow, Rect iFrame, TXNFrameOptions iFrameOptions, TXNFrameType iFrameType, TXNFileType iFileType, TXNPermanentTextEncodingType iPermanentEncoding) -> (TXNObject oTXNObject, TXNFrameID oTXNFrameID)")},
- {"TXNTerminateTextension", (PyCFunction)Mlte_TXNTerminateTextension, 1,
- PyDoc_STR("() -> None")},
- {"TXNIsScrapPastable", (PyCFunction)Mlte_TXNIsScrapPastable, 1,
- PyDoc_STR("() -> (Boolean _rv)")},
- {"TXNConvertToPublicScrap", (PyCFunction)Mlte_TXNConvertToPublicScrap, 1,
- PyDoc_STR("() -> None")},
- {"TXNConvertFromPublicScrap", (PyCFunction)Mlte_TXNConvertFromPublicScrap, 1,
- PyDoc_STR("() -> None")},
- {"TXNNewFontMenuObject", (PyCFunction)Mlte_TXNNewFontMenuObject, 1,
- PyDoc_STR("(MenuHandle iFontMenuHandle, SInt16 iMenuID, SInt16 iStartHierMenuID) -> (TXNFontMenuObject oTXNFontMenuObject)")},
- {"TXNVersionInformation", (PyCFunction)Mlte_TXNVersionInformation, 1,
- PyDoc_STR("() -> (TXNVersionValue _rv, TXNFeatureBits oFeatureFlags)")},
- {"TXNInitTextension", (PyCFunction)Mlte_TXNInitTextension, 1,
- PyDoc_STR("(TXNInitOptions) -> None")},
+ {"TXNNewObject", (PyCFunction)Mlte_TXNNewObject, 1,
+ PyDoc_STR("(FSSpec * iFileSpec, WindowPtr iWindow, Rect iFrame, TXNFrameOptions iFrameOptions, TXNFrameType iFrameType, TXNFileType iFileType, TXNPermanentTextEncodingType iPermanentEncoding) -> (TXNObject oTXNObject, TXNFrameID oTXNFrameID)")},
+ {"TXNTerminateTextension", (PyCFunction)Mlte_TXNTerminateTextension, 1,
+ PyDoc_STR("() -> None")},
+ {"TXNIsScrapPastable", (PyCFunction)Mlte_TXNIsScrapPastable, 1,
+ PyDoc_STR("() -> (Boolean _rv)")},
+ {"TXNConvertToPublicScrap", (PyCFunction)Mlte_TXNConvertToPublicScrap, 1,
+ PyDoc_STR("() -> None")},
+ {"TXNConvertFromPublicScrap", (PyCFunction)Mlte_TXNConvertFromPublicScrap, 1,
+ PyDoc_STR("() -> None")},
+ {"TXNNewFontMenuObject", (PyCFunction)Mlte_TXNNewFontMenuObject, 1,
+ PyDoc_STR("(MenuHandle iFontMenuHandle, SInt16 iMenuID, SInt16 iStartHierMenuID) -> (TXNFontMenuObject oTXNFontMenuObject)")},
+ {"TXNVersionInformation", (PyCFunction)Mlte_TXNVersionInformation, 1,
+ PyDoc_STR("() -> (TXNVersionValue _rv, TXNFeatureBits oFeatureFlags)")},
+ {"TXNInitTextension", (PyCFunction)Mlte_TXNInitTextension, 1,
+ PyDoc_STR("(TXNInitOptions) -> None")},
#endif /* __LP64__ */
- {NULL, NULL, 0}
+ {NULL, NULL, 0}
};
@@ -1652,37 +1652,37 @@ static PyMethodDef Mlte_methods[] = {
void init_Mlte(void)
{
- PyObject *m;
+ PyObject *m;
#ifndef __LP64__
- PyObject *d;
+ PyObject *d;
- // PyMac_INIT_TOOLBOX_OBJECT_NEW(xxxx);
+ // PyMac_INIT_TOOLBOX_OBJECT_NEW(xxxx);
#endif /* __LP64__ */
- m = Py_InitModule("_Mlte", Mlte_methods);
+ m = Py_InitModule("_Mlte", Mlte_methods);
#ifndef __LP64__
- d = PyModule_GetDict(m);
- Mlte_Error = PyMac_GetOSErrException();
- if (Mlte_Error == NULL ||
- PyDict_SetItemString(d, "Error", Mlte_Error) != 0)
- return;
- TXNObject_Type.ob_type = &PyType_Type;
- if (PyType_Ready(&TXNObject_Type) < 0) return;
- Py_INCREF(&TXNObject_Type);
- PyModule_AddObject(m, "TXNObject", (PyObject *)&TXNObject_Type);
- /* Backward-compatible name */
- Py_INCREF(&TXNObject_Type);
- PyModule_AddObject(m, "TXNObjectType", (PyObject *)&TXNObject_Type);
- TXNFontMenuObject_Type.ob_type = &PyType_Type;
- if (PyType_Ready(&TXNFontMenuObject_Type) < 0) return;
- Py_INCREF(&TXNFontMenuObject_Type);
- PyModule_AddObject(m, "TXNFontMenuObject", (PyObject *)&TXNFontMenuObject_Type);
- /* Backward-compatible name */
- Py_INCREF(&TXNFontMenuObject_Type);
- PyModule_AddObject(m, "TXNFontMenuObjectType", (PyObject *)&TXNFontMenuObject_Type);
+ d = PyModule_GetDict(m);
+ Mlte_Error = PyMac_GetOSErrException();
+ if (Mlte_Error == NULL ||
+ PyDict_SetItemString(d, "Error", Mlte_Error) != 0)
+ return;
+ TXNObject_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&TXNObject_Type) < 0) return;
+ Py_INCREF(&TXNObject_Type);
+ PyModule_AddObject(m, "TXNObject", (PyObject *)&TXNObject_Type);
+ /* Backward-compatible name */
+ Py_INCREF(&TXNObject_Type);
+ PyModule_AddObject(m, "TXNObjectType", (PyObject *)&TXNObject_Type);
+ TXNFontMenuObject_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&TXNFontMenuObject_Type) < 0) return;
+ Py_INCREF(&TXNFontMenuObject_Type);
+ PyModule_AddObject(m, "TXNFontMenuObject", (PyObject *)&TXNFontMenuObject_Type);
+ /* Backward-compatible name */
+ Py_INCREF(&TXNFontMenuObject_Type);
+ PyModule_AddObject(m, "TXNFontMenuObjectType", (PyObject *)&TXNFontMenuObject_Type);
#endif /* __LP64__ */
}
diff --git a/Mac/Modules/osa/_OSAmodule.c b/Mac/Modules/osa/_OSAmodule.c
index ab30320..10dd0ff 100644
--- a/Mac/Modules/osa/_OSAmodule.c
+++ b/Mac/Modules/osa/_OSAmodule.c
@@ -9,9 +9,9 @@
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
- PyErr_SetString(PyExc_NotImplementedError, \
- "Not available in this shared library/OS version"); \
- return NULL; \
+ PyErr_SetString(PyExc_NotImplementedError, \
+ "Not available in this shared library/OS version"); \
+ return NULL; \
}} while(0)
@@ -37,753 +37,753 @@ PyTypeObject OSAComponentInstance_Type;
#define OSAObj_Check(x) ((x)->ob_type == &OSAComponentInstance_Type || PyObject_TypeCheck((x), &OSAComponentInstance_Type))
typedef struct OSAComponentInstanceObject {
- PyObject_HEAD
- ComponentInstance ob_itself;
+ PyObject_HEAD
+ ComponentInstance ob_itself;
} OSAComponentInstanceObject;
PyObject *OSAObj_New(ComponentInstance itself)
{
- OSAComponentInstanceObject *it;
- if (itself == NULL) {
- PyErr_SetString(OSA_Error,"NULL ComponentInstance");
- return NULL;
- }
- it = PyObject_NEW(OSAComponentInstanceObject, &OSAComponentInstance_Type);
- if (it == NULL) return NULL;
- it->ob_itself = itself;
- return (PyObject *)it;
+ OSAComponentInstanceObject *it;
+ if (itself == NULL) {
+ PyErr_SetString(OSA_Error,"NULL ComponentInstance");
+ return NULL;
+ }
+ it = PyObject_NEW(OSAComponentInstanceObject, &OSAComponentInstance_Type);
+ if (it == NULL) return NULL;
+ it->ob_itself = itself;
+ return (PyObject *)it;
}
int OSAObj_Convert(PyObject *v, ComponentInstance *p_itself)
{
- if (CmpInstObj_Convert(v, p_itself))
- return 1;
- PyErr_Clear();
-
- if (!OSAObj_Check(v))
- {
- PyErr_SetString(PyExc_TypeError, "OSAComponentInstance required");
- return 0;
- }
- *p_itself = ((OSAComponentInstanceObject *)v)->ob_itself;
- return 1;
+ if (CmpInstObj_Convert(v, p_itself))
+ return 1;
+ PyErr_Clear();
+
+ if (!OSAObj_Check(v))
+ {
+ PyErr_SetString(PyExc_TypeError, "OSAComponentInstance required");
+ return 0;
+ }
+ *p_itself = ((OSAComponentInstanceObject *)v)->ob_itself;
+ return 1;
}
static void OSAObj_dealloc(OSAComponentInstanceObject *self)
{
- /* Cleanup of self->ob_itself goes here */
- self->ob_type->tp_free((PyObject *)self);
+ /* Cleanup of self->ob_itself goes here */
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *OSAObj_OSALoad(OSAComponentInstanceObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSAError _err;
- AEDesc scriptData;
- long modeFlags;
- OSAID resultingScriptID;
+ PyObject *_res = NULL;
+ OSAError _err;
+ AEDesc scriptData;
+ long modeFlags;
+ OSAID resultingScriptID;
#ifndef OSALoad
- PyMac_PRECHECK(OSALoad);
+ PyMac_PRECHECK(OSALoad);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- AEDesc_Convert, &scriptData,
- &modeFlags))
- return NULL;
- _err = OSALoad(_self->ob_itself,
- &scriptData,
- modeFlags,
- &resultingScriptID);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- resultingScriptID);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ AEDesc_Convert, &scriptData,
+ &modeFlags))
+ return NULL;
+ _err = OSALoad(_self->ob_itself,
+ &scriptData,
+ modeFlags,
+ &resultingScriptID);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ resultingScriptID);
+ return _res;
}
static PyObject *OSAObj_OSAStore(OSAComponentInstanceObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSAError _err;
- OSAID scriptID;
- DescType desiredType;
- long modeFlags;
- AEDesc resultingScriptData;
+ PyObject *_res = NULL;
+ OSAError _err;
+ OSAID scriptID;
+ DescType desiredType;
+ long modeFlags;
+ AEDesc resultingScriptData;
#ifndef OSAStore
- PyMac_PRECHECK(OSAStore);
+ PyMac_PRECHECK(OSAStore);
#endif
- if (!PyArg_ParseTuple(_args, "lO&l",
- &scriptID,
- PyMac_GetOSType, &desiredType,
- &modeFlags))
- return NULL;
- _err = OSAStore(_self->ob_itself,
- scriptID,
- desiredType,
- modeFlags,
- &resultingScriptData);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- AEDesc_New, &resultingScriptData);
- return _res;
+ if (!PyArg_ParseTuple(_args, "lO&l",
+ &scriptID,
+ PyMac_GetOSType, &desiredType,
+ &modeFlags))
+ return NULL;
+ _err = OSAStore(_self->ob_itself,
+ scriptID,
+ desiredType,
+ modeFlags,
+ &resultingScriptData);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ AEDesc_New, &resultingScriptData);
+ return _res;
}
static PyObject *OSAObj_OSAExecute(OSAComponentInstanceObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSAError _err;
- OSAID compiledScriptID;
- OSAID contextID;
- long modeFlags;
- OSAID resultingScriptValueID;
+ PyObject *_res = NULL;
+ OSAError _err;
+ OSAID compiledScriptID;
+ OSAID contextID;
+ long modeFlags;
+ OSAID resultingScriptValueID;
#ifndef OSAExecute
- PyMac_PRECHECK(OSAExecute);
+ PyMac_PRECHECK(OSAExecute);
#endif
- if (!PyArg_ParseTuple(_args, "lll",
- &compiledScriptID,
- &contextID,
- &modeFlags))
- return NULL;
- _err = OSAExecute(_self->ob_itself,
- compiledScriptID,
- contextID,
- modeFlags,
- &resultingScriptValueID);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- resultingScriptValueID);
- return _res;
+ if (!PyArg_ParseTuple(_args, "lll",
+ &compiledScriptID,
+ &contextID,
+ &modeFlags))
+ return NULL;
+ _err = OSAExecute(_self->ob_itself,
+ compiledScriptID,
+ contextID,
+ modeFlags,
+ &resultingScriptValueID);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ resultingScriptValueID);
+ return _res;
}
static PyObject *OSAObj_OSADisplay(OSAComponentInstanceObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSAError _err;
- OSAID scriptValueID;
- DescType desiredType;
- long modeFlags;
- AEDesc resultingText;
+ PyObject *_res = NULL;
+ OSAError _err;
+ OSAID scriptValueID;
+ DescType desiredType;
+ long modeFlags;
+ AEDesc resultingText;
#ifndef OSADisplay
- PyMac_PRECHECK(OSADisplay);
+ PyMac_PRECHECK(OSADisplay);
#endif
- if (!PyArg_ParseTuple(_args, "lO&l",
- &scriptValueID,
- PyMac_GetOSType, &desiredType,
- &modeFlags))
- return NULL;
- _err = OSADisplay(_self->ob_itself,
- scriptValueID,
- desiredType,
- modeFlags,
- &resultingText);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- AEDesc_New, &resultingText);
- return _res;
+ if (!PyArg_ParseTuple(_args, "lO&l",
+ &scriptValueID,
+ PyMac_GetOSType, &desiredType,
+ &modeFlags))
+ return NULL;
+ _err = OSADisplay(_self->ob_itself,
+ scriptValueID,
+ desiredType,
+ modeFlags,
+ &resultingText);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ AEDesc_New, &resultingText);
+ return _res;
}
static PyObject *OSAObj_OSAScriptError(OSAComponentInstanceObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSAError _err;
- OSType selector;
- DescType desiredType;
- AEDesc resultingErrorDescription;
+ PyObject *_res = NULL;
+ OSAError _err;
+ OSType selector;
+ DescType desiredType;
+ AEDesc resultingErrorDescription;
#ifndef OSAScriptError
- PyMac_PRECHECK(OSAScriptError);
+ PyMac_PRECHECK(OSAScriptError);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- PyMac_GetOSType, &selector,
- PyMac_GetOSType, &desiredType))
- return NULL;
- _err = OSAScriptError(_self->ob_itself,
- selector,
- desiredType,
- &resultingErrorDescription);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- AEDesc_New, &resultingErrorDescription);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ PyMac_GetOSType, &selector,
+ PyMac_GetOSType, &desiredType))
+ return NULL;
+ _err = OSAScriptError(_self->ob_itself,
+ selector,
+ desiredType,
+ &resultingErrorDescription);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ AEDesc_New, &resultingErrorDescription);
+ return _res;
}
static PyObject *OSAObj_OSADispose(OSAComponentInstanceObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSAError _err;
- OSAID scriptID;
+ PyObject *_res = NULL;
+ OSAError _err;
+ OSAID scriptID;
#ifndef OSADispose
- PyMac_PRECHECK(OSADispose);
+ PyMac_PRECHECK(OSADispose);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &scriptID))
- return NULL;
- _err = OSADispose(_self->ob_itself,
- scriptID);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &scriptID))
+ return NULL;
+ _err = OSADispose(_self->ob_itself,
+ scriptID);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *OSAObj_OSASetScriptInfo(OSAComponentInstanceObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSAError _err;
- OSAID scriptID;
- OSType selector;
- long value;
+ PyObject *_res = NULL;
+ OSAError _err;
+ OSAID scriptID;
+ OSType selector;
+ long value;
#ifndef OSASetScriptInfo
- PyMac_PRECHECK(OSASetScriptInfo);
+ PyMac_PRECHECK(OSASetScriptInfo);
#endif
- if (!PyArg_ParseTuple(_args, "lO&l",
- &scriptID,
- PyMac_GetOSType, &selector,
- &value))
- return NULL;
- _err = OSASetScriptInfo(_self->ob_itself,
- scriptID,
- selector,
- value);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "lO&l",
+ &scriptID,
+ PyMac_GetOSType, &selector,
+ &value))
+ return NULL;
+ _err = OSASetScriptInfo(_self->ob_itself,
+ scriptID,
+ selector,
+ value);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *OSAObj_OSAGetScriptInfo(OSAComponentInstanceObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSAError _err;
- OSAID scriptID;
- OSType selector;
- long result;
+ PyObject *_res = NULL;
+ OSAError _err;
+ OSAID scriptID;
+ OSType selector;
+ long result;
#ifndef OSAGetScriptInfo
- PyMac_PRECHECK(OSAGetScriptInfo);
+ PyMac_PRECHECK(OSAGetScriptInfo);
#endif
- if (!PyArg_ParseTuple(_args, "lO&",
- &scriptID,
- PyMac_GetOSType, &selector))
- return NULL;
- _err = OSAGetScriptInfo(_self->ob_itself,
- scriptID,
- selector,
- &result);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- result);
- return _res;
+ if (!PyArg_ParseTuple(_args, "lO&",
+ &scriptID,
+ PyMac_GetOSType, &selector))
+ return NULL;
+ _err = OSAGetScriptInfo(_self->ob_itself,
+ scriptID,
+ selector,
+ &result);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ result);
+ return _res;
}
static PyObject *OSAObj_OSAScriptingComponentName(OSAComponentInstanceObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSAError _err;
- AEDesc resultingScriptingComponentName;
+ PyObject *_res = NULL;
+ OSAError _err;
+ AEDesc resultingScriptingComponentName;
#ifndef OSAScriptingComponentName
- PyMac_PRECHECK(OSAScriptingComponentName);
+ PyMac_PRECHECK(OSAScriptingComponentName);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = OSAScriptingComponentName(_self->ob_itself,
- &resultingScriptingComponentName);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- AEDesc_New, &resultingScriptingComponentName);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = OSAScriptingComponentName(_self->ob_itself,
+ &resultingScriptingComponentName);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ AEDesc_New, &resultingScriptingComponentName);
+ return _res;
}
static PyObject *OSAObj_OSACompile(OSAComponentInstanceObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSAError _err;
- AEDesc sourceData;
- long modeFlags;
- OSAID previousAndResultingScriptID;
+ PyObject *_res = NULL;
+ OSAError _err;
+ AEDesc sourceData;
+ long modeFlags;
+ OSAID previousAndResultingScriptID;
#ifndef OSACompile
- PyMac_PRECHECK(OSACompile);
+ PyMac_PRECHECK(OSACompile);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- AEDesc_Convert, &sourceData,
- &modeFlags))
- return NULL;
- _err = OSACompile(_self->ob_itself,
- &sourceData,
- modeFlags,
- &previousAndResultingScriptID);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- previousAndResultingScriptID);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ AEDesc_Convert, &sourceData,
+ &modeFlags))
+ return NULL;
+ _err = OSACompile(_self->ob_itself,
+ &sourceData,
+ modeFlags,
+ &previousAndResultingScriptID);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ previousAndResultingScriptID);
+ return _res;
}
static PyObject *OSAObj_OSACopyID(OSAComponentInstanceObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSAError _err;
- OSAID fromID;
- OSAID toID;
+ PyObject *_res = NULL;
+ OSAError _err;
+ OSAID fromID;
+ OSAID toID;
#ifndef OSACopyID
- PyMac_PRECHECK(OSACopyID);
+ PyMac_PRECHECK(OSACopyID);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &fromID))
- return NULL;
- _err = OSACopyID(_self->ob_itself,
- fromID,
- &toID);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- toID);
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &fromID))
+ return NULL;
+ _err = OSACopyID(_self->ob_itself,
+ fromID,
+ &toID);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ toID);
+ return _res;
}
static PyObject *OSAObj_OSAGetSource(OSAComponentInstanceObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSAError _err;
- OSAID scriptID;
- DescType desiredType;
- AEDesc resultingSourceData;
+ PyObject *_res = NULL;
+ OSAError _err;
+ OSAID scriptID;
+ DescType desiredType;
+ AEDesc resultingSourceData;
#ifndef OSAGetSource
- PyMac_PRECHECK(OSAGetSource);
+ PyMac_PRECHECK(OSAGetSource);
#endif
- if (!PyArg_ParseTuple(_args, "lO&",
- &scriptID,
- PyMac_GetOSType, &desiredType))
- return NULL;
- _err = OSAGetSource(_self->ob_itself,
- scriptID,
- desiredType,
- &resultingSourceData);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- AEDesc_New, &resultingSourceData);
- return _res;
+ if (!PyArg_ParseTuple(_args, "lO&",
+ &scriptID,
+ PyMac_GetOSType, &desiredType))
+ return NULL;
+ _err = OSAGetSource(_self->ob_itself,
+ scriptID,
+ desiredType,
+ &resultingSourceData);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ AEDesc_New, &resultingSourceData);
+ return _res;
}
static PyObject *OSAObj_OSACoerceFromDesc(OSAComponentInstanceObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSAError _err;
- AEDesc scriptData;
- long modeFlags;
- OSAID resultingScriptID;
+ PyObject *_res = NULL;
+ OSAError _err;
+ AEDesc scriptData;
+ long modeFlags;
+ OSAID resultingScriptID;
#ifndef OSACoerceFromDesc
- PyMac_PRECHECK(OSACoerceFromDesc);
+ PyMac_PRECHECK(OSACoerceFromDesc);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- AEDesc_Convert, &scriptData,
- &modeFlags))
- return NULL;
- _err = OSACoerceFromDesc(_self->ob_itself,
- &scriptData,
- modeFlags,
- &resultingScriptID);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- resultingScriptID);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ AEDesc_Convert, &scriptData,
+ &modeFlags))
+ return NULL;
+ _err = OSACoerceFromDesc(_self->ob_itself,
+ &scriptData,
+ modeFlags,
+ &resultingScriptID);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ resultingScriptID);
+ return _res;
}
static PyObject *OSAObj_OSACoerceToDesc(OSAComponentInstanceObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSAError _err;
- OSAID scriptID;
- DescType desiredType;
- long modeFlags;
- AEDesc result;
+ PyObject *_res = NULL;
+ OSAError _err;
+ OSAID scriptID;
+ DescType desiredType;
+ long modeFlags;
+ AEDesc result;
#ifndef OSACoerceToDesc
- PyMac_PRECHECK(OSACoerceToDesc);
+ PyMac_PRECHECK(OSACoerceToDesc);
#endif
- if (!PyArg_ParseTuple(_args, "lO&l",
- &scriptID,
- PyMac_GetOSType, &desiredType,
- &modeFlags))
- return NULL;
- _err = OSACoerceToDesc(_self->ob_itself,
- scriptID,
- desiredType,
- modeFlags,
- &result);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- AEDesc_New, &result);
- return _res;
+ if (!PyArg_ParseTuple(_args, "lO&l",
+ &scriptID,
+ PyMac_GetOSType, &desiredType,
+ &modeFlags))
+ return NULL;
+ _err = OSACoerceToDesc(_self->ob_itself,
+ scriptID,
+ desiredType,
+ modeFlags,
+ &result);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ AEDesc_New, &result);
+ return _res;
}
static PyObject *OSAObj_OSASetDefaultTarget(OSAComponentInstanceObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSAError _err;
- AEAddressDesc target;
+ PyObject *_res = NULL;
+ OSAError _err;
+ AEAddressDesc target;
#ifndef OSASetDefaultTarget
- PyMac_PRECHECK(OSASetDefaultTarget);
+ PyMac_PRECHECK(OSASetDefaultTarget);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- AEDesc_Convert, &target))
- return NULL;
- _err = OSASetDefaultTarget(_self->ob_itself,
- &target);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ AEDesc_Convert, &target))
+ return NULL;
+ _err = OSASetDefaultTarget(_self->ob_itself,
+ &target);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *OSAObj_OSAStartRecording(OSAComponentInstanceObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSAError _err;
- OSAID compiledScriptToModifyID;
+ PyObject *_res = NULL;
+ OSAError _err;
+ OSAID compiledScriptToModifyID;
#ifndef OSAStartRecording
- PyMac_PRECHECK(OSAStartRecording);
+ PyMac_PRECHECK(OSAStartRecording);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = OSAStartRecording(_self->ob_itself,
- &compiledScriptToModifyID);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- compiledScriptToModifyID);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = OSAStartRecording(_self->ob_itself,
+ &compiledScriptToModifyID);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ compiledScriptToModifyID);
+ return _res;
}
static PyObject *OSAObj_OSAStopRecording(OSAComponentInstanceObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSAError _err;
- OSAID compiledScriptID;
+ PyObject *_res = NULL;
+ OSAError _err;
+ OSAID compiledScriptID;
#ifndef OSAStopRecording
- PyMac_PRECHECK(OSAStopRecording);
+ PyMac_PRECHECK(OSAStopRecording);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &compiledScriptID))
- return NULL;
- _err = OSAStopRecording(_self->ob_itself,
- compiledScriptID);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &compiledScriptID))
+ return NULL;
+ _err = OSAStopRecording(_self->ob_itself,
+ compiledScriptID);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *OSAObj_OSALoadExecute(OSAComponentInstanceObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSAError _err;
- AEDesc scriptData;
- OSAID contextID;
- long modeFlags;
- OSAID resultingScriptValueID;
+ PyObject *_res = NULL;
+ OSAError _err;
+ AEDesc scriptData;
+ OSAID contextID;
+ long modeFlags;
+ OSAID resultingScriptValueID;
#ifndef OSALoadExecute
- PyMac_PRECHECK(OSALoadExecute);
+ PyMac_PRECHECK(OSALoadExecute);
#endif
- if (!PyArg_ParseTuple(_args, "O&ll",
- AEDesc_Convert, &scriptData,
- &contextID,
- &modeFlags))
- return NULL;
- _err = OSALoadExecute(_self->ob_itself,
- &scriptData,
- contextID,
- modeFlags,
- &resultingScriptValueID);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- resultingScriptValueID);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&ll",
+ AEDesc_Convert, &scriptData,
+ &contextID,
+ &modeFlags))
+ return NULL;
+ _err = OSALoadExecute(_self->ob_itself,
+ &scriptData,
+ contextID,
+ modeFlags,
+ &resultingScriptValueID);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ resultingScriptValueID);
+ return _res;
}
static PyObject *OSAObj_OSACompileExecute(OSAComponentInstanceObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSAError _err;
- AEDesc sourceData;
- OSAID contextID;
- long modeFlags;
- OSAID resultingScriptValueID;
+ PyObject *_res = NULL;
+ OSAError _err;
+ AEDesc sourceData;
+ OSAID contextID;
+ long modeFlags;
+ OSAID resultingScriptValueID;
#ifndef OSACompileExecute
- PyMac_PRECHECK(OSACompileExecute);
+ PyMac_PRECHECK(OSACompileExecute);
#endif
- if (!PyArg_ParseTuple(_args, "O&ll",
- AEDesc_Convert, &sourceData,
- &contextID,
- &modeFlags))
- return NULL;
- _err = OSACompileExecute(_self->ob_itself,
- &sourceData,
- contextID,
- modeFlags,
- &resultingScriptValueID);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- resultingScriptValueID);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&ll",
+ AEDesc_Convert, &sourceData,
+ &contextID,
+ &modeFlags))
+ return NULL;
+ _err = OSACompileExecute(_self->ob_itself,
+ &sourceData,
+ contextID,
+ modeFlags,
+ &resultingScriptValueID);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ resultingScriptValueID);
+ return _res;
}
static PyObject *OSAObj_OSADoScript(OSAComponentInstanceObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSAError _err;
- AEDesc sourceData;
- OSAID contextID;
- DescType desiredType;
- long modeFlags;
- AEDesc resultingText;
+ PyObject *_res = NULL;
+ OSAError _err;
+ AEDesc sourceData;
+ OSAID contextID;
+ DescType desiredType;
+ long modeFlags;
+ AEDesc resultingText;
#ifndef OSADoScript
- PyMac_PRECHECK(OSADoScript);
+ PyMac_PRECHECK(OSADoScript);
#endif
- if (!PyArg_ParseTuple(_args, "O&lO&l",
- AEDesc_Convert, &sourceData,
- &contextID,
- PyMac_GetOSType, &desiredType,
- &modeFlags))
- return NULL;
- _err = OSADoScript(_self->ob_itself,
- &sourceData,
- contextID,
- desiredType,
- modeFlags,
- &resultingText);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- AEDesc_New, &resultingText);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&lO&l",
+ AEDesc_Convert, &sourceData,
+ &contextID,
+ PyMac_GetOSType, &desiredType,
+ &modeFlags))
+ return NULL;
+ _err = OSADoScript(_self->ob_itself,
+ &sourceData,
+ contextID,
+ desiredType,
+ modeFlags,
+ &resultingText);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ AEDesc_New, &resultingText);
+ return _res;
}
static PyObject *OSAObj_OSASetCurrentDialect(OSAComponentInstanceObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSAError _err;
- short dialectCode;
+ PyObject *_res = NULL;
+ OSAError _err;
+ short dialectCode;
#ifndef OSASetCurrentDialect
- PyMac_PRECHECK(OSASetCurrentDialect);
+ PyMac_PRECHECK(OSASetCurrentDialect);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &dialectCode))
- return NULL;
- _err = OSASetCurrentDialect(_self->ob_itself,
- dialectCode);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &dialectCode))
+ return NULL;
+ _err = OSASetCurrentDialect(_self->ob_itself,
+ dialectCode);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *OSAObj_OSAGetCurrentDialect(OSAComponentInstanceObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSAError _err;
- short resultingDialectCode;
+ PyObject *_res = NULL;
+ OSAError _err;
+ short resultingDialectCode;
#ifndef OSAGetCurrentDialect
- PyMac_PRECHECK(OSAGetCurrentDialect);
+ PyMac_PRECHECK(OSAGetCurrentDialect);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = OSAGetCurrentDialect(_self->ob_itself,
- &resultingDialectCode);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("h",
- resultingDialectCode);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = OSAGetCurrentDialect(_self->ob_itself,
+ &resultingDialectCode);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("h",
+ resultingDialectCode);
+ return _res;
}
static PyObject *OSAObj_OSAAvailableDialects(OSAComponentInstanceObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSAError _err;
- AEDesc resultingDialectInfoList;
+ PyObject *_res = NULL;
+ OSAError _err;
+ AEDesc resultingDialectInfoList;
#ifndef OSAAvailableDialects
- PyMac_PRECHECK(OSAAvailableDialects);
+ PyMac_PRECHECK(OSAAvailableDialects);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = OSAAvailableDialects(_self->ob_itself,
- &resultingDialectInfoList);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- AEDesc_New, &resultingDialectInfoList);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = OSAAvailableDialects(_self->ob_itself,
+ &resultingDialectInfoList);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ AEDesc_New, &resultingDialectInfoList);
+ return _res;
}
static PyObject *OSAObj_OSAGetDialectInfo(OSAComponentInstanceObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSAError _err;
- short dialectCode;
- OSType selector;
- AEDesc resultingDialectInfo;
+ PyObject *_res = NULL;
+ OSAError _err;
+ short dialectCode;
+ OSType selector;
+ AEDesc resultingDialectInfo;
#ifndef OSAGetDialectInfo
- PyMac_PRECHECK(OSAGetDialectInfo);
+ PyMac_PRECHECK(OSAGetDialectInfo);
#endif
- if (!PyArg_ParseTuple(_args, "hO&",
- &dialectCode,
- PyMac_GetOSType, &selector))
- return NULL;
- _err = OSAGetDialectInfo(_self->ob_itself,
- dialectCode,
- selector,
- &resultingDialectInfo);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- AEDesc_New, &resultingDialectInfo);
- return _res;
+ if (!PyArg_ParseTuple(_args, "hO&",
+ &dialectCode,
+ PyMac_GetOSType, &selector))
+ return NULL;
+ _err = OSAGetDialectInfo(_self->ob_itself,
+ dialectCode,
+ selector,
+ &resultingDialectInfo);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ AEDesc_New, &resultingDialectInfo);
+ return _res;
}
static PyObject *OSAObj_OSAAvailableDialectCodeList(OSAComponentInstanceObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSAError _err;
- AEDesc resultingDialectCodeList;
+ PyObject *_res = NULL;
+ OSAError _err;
+ AEDesc resultingDialectCodeList;
#ifndef OSAAvailableDialectCodeList
- PyMac_PRECHECK(OSAAvailableDialectCodeList);
+ PyMac_PRECHECK(OSAAvailableDialectCodeList);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = OSAAvailableDialectCodeList(_self->ob_itself,
- &resultingDialectCodeList);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- AEDesc_New, &resultingDialectCodeList);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = OSAAvailableDialectCodeList(_self->ob_itself,
+ &resultingDialectCodeList);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ AEDesc_New, &resultingDialectCodeList);
+ return _res;
}
static PyObject *OSAObj_OSAExecuteEvent(OSAComponentInstanceObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSAError _err;
- AppleEvent theAppleEvent;
- OSAID contextID;
- long modeFlags;
- OSAID resultingScriptValueID;
+ PyObject *_res = NULL;
+ OSAError _err;
+ AppleEvent theAppleEvent;
+ OSAID contextID;
+ long modeFlags;
+ OSAID resultingScriptValueID;
#ifndef OSAExecuteEvent
- PyMac_PRECHECK(OSAExecuteEvent);
+ PyMac_PRECHECK(OSAExecuteEvent);
#endif
- if (!PyArg_ParseTuple(_args, "O&ll",
- AEDesc_Convert, &theAppleEvent,
- &contextID,
- &modeFlags))
- return NULL;
- _err = OSAExecuteEvent(_self->ob_itself,
- &theAppleEvent,
- contextID,
- modeFlags,
- &resultingScriptValueID);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- resultingScriptValueID);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&ll",
+ AEDesc_Convert, &theAppleEvent,
+ &contextID,
+ &modeFlags))
+ return NULL;
+ _err = OSAExecuteEvent(_self->ob_itself,
+ &theAppleEvent,
+ contextID,
+ modeFlags,
+ &resultingScriptValueID);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ resultingScriptValueID);
+ return _res;
}
static PyObject *OSAObj_OSADoEvent(OSAComponentInstanceObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSAError _err;
- AppleEvent theAppleEvent;
- OSAID contextID;
- long modeFlags;
- AppleEvent reply;
+ PyObject *_res = NULL;
+ OSAError _err;
+ AppleEvent theAppleEvent;
+ OSAID contextID;
+ long modeFlags;
+ AppleEvent reply;
#ifndef OSADoEvent
- PyMac_PRECHECK(OSADoEvent);
+ PyMac_PRECHECK(OSADoEvent);
#endif
- if (!PyArg_ParseTuple(_args, "O&ll",
- AEDesc_Convert, &theAppleEvent,
- &contextID,
- &modeFlags))
- return NULL;
- _err = OSADoEvent(_self->ob_itself,
- &theAppleEvent,
- contextID,
- modeFlags,
- &reply);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- AEDesc_New, &reply);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&ll",
+ AEDesc_Convert, &theAppleEvent,
+ &contextID,
+ &modeFlags))
+ return NULL;
+ _err = OSADoEvent(_self->ob_itself,
+ &theAppleEvent,
+ contextID,
+ modeFlags,
+ &reply);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ AEDesc_New, &reply);
+ return _res;
}
static PyObject *OSAObj_OSAMakeContext(OSAComponentInstanceObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSAError _err;
- AEDesc contextName;
- OSAID parentContext;
- OSAID resultingContextID;
+ PyObject *_res = NULL;
+ OSAError _err;
+ AEDesc contextName;
+ OSAID parentContext;
+ OSAID resultingContextID;
#ifndef OSAMakeContext
- PyMac_PRECHECK(OSAMakeContext);
+ PyMac_PRECHECK(OSAMakeContext);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- AEDesc_Convert, &contextName,
- &parentContext))
- return NULL;
- _err = OSAMakeContext(_self->ob_itself,
- &contextName,
- parentContext,
- &resultingContextID);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- resultingContextID);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ AEDesc_Convert, &contextName,
+ &parentContext))
+ return NULL;
+ _err = OSAMakeContext(_self->ob_itself,
+ &contextName,
+ parentContext,
+ &resultingContextID);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ resultingContextID);
+ return _res;
}
static PyMethodDef OSAObj_methods[] = {
- {"OSALoad", (PyCFunction)OSAObj_OSALoad, 1,
- PyDoc_STR("(AEDesc scriptData, long modeFlags) -> (OSAID resultingScriptID)")},
- {"OSAStore", (PyCFunction)OSAObj_OSAStore, 1,
- PyDoc_STR("(OSAID scriptID, DescType desiredType, long modeFlags) -> (AEDesc resultingScriptData)")},
- {"OSAExecute", (PyCFunction)OSAObj_OSAExecute, 1,
- PyDoc_STR("(OSAID compiledScriptID, OSAID contextID, long modeFlags) -> (OSAID resultingScriptValueID)")},
- {"OSADisplay", (PyCFunction)OSAObj_OSADisplay, 1,
- PyDoc_STR("(OSAID scriptValueID, DescType desiredType, long modeFlags) -> (AEDesc resultingText)")},
- {"OSAScriptError", (PyCFunction)OSAObj_OSAScriptError, 1,
- PyDoc_STR("(OSType selector, DescType desiredType) -> (AEDesc resultingErrorDescription)")},
- {"OSADispose", (PyCFunction)OSAObj_OSADispose, 1,
- PyDoc_STR("(OSAID scriptID) -> None")},
- {"OSASetScriptInfo", (PyCFunction)OSAObj_OSASetScriptInfo, 1,
- PyDoc_STR("(OSAID scriptID, OSType selector, long value) -> None")},
- {"OSAGetScriptInfo", (PyCFunction)OSAObj_OSAGetScriptInfo, 1,
- PyDoc_STR("(OSAID scriptID, OSType selector) -> (long result)")},
- {"OSAScriptingComponentName", (PyCFunction)OSAObj_OSAScriptingComponentName, 1,
- PyDoc_STR("() -> (AEDesc resultingScriptingComponentName)")},
- {"OSACompile", (PyCFunction)OSAObj_OSACompile, 1,
- PyDoc_STR("(AEDesc sourceData, long modeFlags) -> (OSAID previousAndResultingScriptID)")},
- {"OSACopyID", (PyCFunction)OSAObj_OSACopyID, 1,
- PyDoc_STR("(OSAID fromID) -> (OSAID toID)")},
- {"OSAGetSource", (PyCFunction)OSAObj_OSAGetSource, 1,
- PyDoc_STR("(OSAID scriptID, DescType desiredType) -> (AEDesc resultingSourceData)")},
- {"OSACoerceFromDesc", (PyCFunction)OSAObj_OSACoerceFromDesc, 1,
- PyDoc_STR("(AEDesc scriptData, long modeFlags) -> (OSAID resultingScriptID)")},
- {"OSACoerceToDesc", (PyCFunction)OSAObj_OSACoerceToDesc, 1,
- PyDoc_STR("(OSAID scriptID, DescType desiredType, long modeFlags) -> (AEDesc result)")},
- {"OSASetDefaultTarget", (PyCFunction)OSAObj_OSASetDefaultTarget, 1,
- PyDoc_STR("(AEAddressDesc target) -> None")},
- {"OSAStartRecording", (PyCFunction)OSAObj_OSAStartRecording, 1,
- PyDoc_STR("() -> (OSAID compiledScriptToModifyID)")},
- {"OSAStopRecording", (PyCFunction)OSAObj_OSAStopRecording, 1,
- PyDoc_STR("(OSAID compiledScriptID) -> None")},
- {"OSALoadExecute", (PyCFunction)OSAObj_OSALoadExecute, 1,
- PyDoc_STR("(AEDesc scriptData, OSAID contextID, long modeFlags) -> (OSAID resultingScriptValueID)")},
- {"OSACompileExecute", (PyCFunction)OSAObj_OSACompileExecute, 1,
- PyDoc_STR("(AEDesc sourceData, OSAID contextID, long modeFlags) -> (OSAID resultingScriptValueID)")},
- {"OSADoScript", (PyCFunction)OSAObj_OSADoScript, 1,
- PyDoc_STR("(AEDesc sourceData, OSAID contextID, DescType desiredType, long modeFlags) -> (AEDesc resultingText)")},
- {"OSASetCurrentDialect", (PyCFunction)OSAObj_OSASetCurrentDialect, 1,
- PyDoc_STR("(short dialectCode) -> None")},
- {"OSAGetCurrentDialect", (PyCFunction)OSAObj_OSAGetCurrentDialect, 1,
- PyDoc_STR("() -> (short resultingDialectCode)")},
- {"OSAAvailableDialects", (PyCFunction)OSAObj_OSAAvailableDialects, 1,
- PyDoc_STR("() -> (AEDesc resultingDialectInfoList)")},
- {"OSAGetDialectInfo", (PyCFunction)OSAObj_OSAGetDialectInfo, 1,
- PyDoc_STR("(short dialectCode, OSType selector) -> (AEDesc resultingDialectInfo)")},
- {"OSAAvailableDialectCodeList", (PyCFunction)OSAObj_OSAAvailableDialectCodeList, 1,
- PyDoc_STR("() -> (AEDesc resultingDialectCodeList)")},
- {"OSAExecuteEvent", (PyCFunction)OSAObj_OSAExecuteEvent, 1,
- PyDoc_STR("(AppleEvent theAppleEvent, OSAID contextID, long modeFlags) -> (OSAID resultingScriptValueID)")},
- {"OSADoEvent", (PyCFunction)OSAObj_OSADoEvent, 1,
- PyDoc_STR("(AppleEvent theAppleEvent, OSAID contextID, long modeFlags) -> (AppleEvent reply)")},
- {"OSAMakeContext", (PyCFunction)OSAObj_OSAMakeContext, 1,
- PyDoc_STR("(AEDesc contextName, OSAID parentContext) -> (OSAID resultingContextID)")},
- {NULL, NULL, 0}
+ {"OSALoad", (PyCFunction)OSAObj_OSALoad, 1,
+ PyDoc_STR("(AEDesc scriptData, long modeFlags) -> (OSAID resultingScriptID)")},
+ {"OSAStore", (PyCFunction)OSAObj_OSAStore, 1,
+ PyDoc_STR("(OSAID scriptID, DescType desiredType, long modeFlags) -> (AEDesc resultingScriptData)")},
+ {"OSAExecute", (PyCFunction)OSAObj_OSAExecute, 1,
+ PyDoc_STR("(OSAID compiledScriptID, OSAID contextID, long modeFlags) -> (OSAID resultingScriptValueID)")},
+ {"OSADisplay", (PyCFunction)OSAObj_OSADisplay, 1,
+ PyDoc_STR("(OSAID scriptValueID, DescType desiredType, long modeFlags) -> (AEDesc resultingText)")},
+ {"OSAScriptError", (PyCFunction)OSAObj_OSAScriptError, 1,
+ PyDoc_STR("(OSType selector, DescType desiredType) -> (AEDesc resultingErrorDescription)")},
+ {"OSADispose", (PyCFunction)OSAObj_OSADispose, 1,
+ PyDoc_STR("(OSAID scriptID) -> None")},
+ {"OSASetScriptInfo", (PyCFunction)OSAObj_OSASetScriptInfo, 1,
+ PyDoc_STR("(OSAID scriptID, OSType selector, long value) -> None")},
+ {"OSAGetScriptInfo", (PyCFunction)OSAObj_OSAGetScriptInfo, 1,
+ PyDoc_STR("(OSAID scriptID, OSType selector) -> (long result)")},
+ {"OSAScriptingComponentName", (PyCFunction)OSAObj_OSAScriptingComponentName, 1,
+ PyDoc_STR("() -> (AEDesc resultingScriptingComponentName)")},
+ {"OSACompile", (PyCFunction)OSAObj_OSACompile, 1,
+ PyDoc_STR("(AEDesc sourceData, long modeFlags) -> (OSAID previousAndResultingScriptID)")},
+ {"OSACopyID", (PyCFunction)OSAObj_OSACopyID, 1,
+ PyDoc_STR("(OSAID fromID) -> (OSAID toID)")},
+ {"OSAGetSource", (PyCFunction)OSAObj_OSAGetSource, 1,
+ PyDoc_STR("(OSAID scriptID, DescType desiredType) -> (AEDesc resultingSourceData)")},
+ {"OSACoerceFromDesc", (PyCFunction)OSAObj_OSACoerceFromDesc, 1,
+ PyDoc_STR("(AEDesc scriptData, long modeFlags) -> (OSAID resultingScriptID)")},
+ {"OSACoerceToDesc", (PyCFunction)OSAObj_OSACoerceToDesc, 1,
+ PyDoc_STR("(OSAID scriptID, DescType desiredType, long modeFlags) -> (AEDesc result)")},
+ {"OSASetDefaultTarget", (PyCFunction)OSAObj_OSASetDefaultTarget, 1,
+ PyDoc_STR("(AEAddressDesc target) -> None")},
+ {"OSAStartRecording", (PyCFunction)OSAObj_OSAStartRecording, 1,
+ PyDoc_STR("() -> (OSAID compiledScriptToModifyID)")},
+ {"OSAStopRecording", (PyCFunction)OSAObj_OSAStopRecording, 1,
+ PyDoc_STR("(OSAID compiledScriptID) -> None")},
+ {"OSALoadExecute", (PyCFunction)OSAObj_OSALoadExecute, 1,
+ PyDoc_STR("(AEDesc scriptData, OSAID contextID, long modeFlags) -> (OSAID resultingScriptValueID)")},
+ {"OSACompileExecute", (PyCFunction)OSAObj_OSACompileExecute, 1,
+ PyDoc_STR("(AEDesc sourceData, OSAID contextID, long modeFlags) -> (OSAID resultingScriptValueID)")},
+ {"OSADoScript", (PyCFunction)OSAObj_OSADoScript, 1,
+ PyDoc_STR("(AEDesc sourceData, OSAID contextID, DescType desiredType, long modeFlags) -> (AEDesc resultingText)")},
+ {"OSASetCurrentDialect", (PyCFunction)OSAObj_OSASetCurrentDialect, 1,
+ PyDoc_STR("(short dialectCode) -> None")},
+ {"OSAGetCurrentDialect", (PyCFunction)OSAObj_OSAGetCurrentDialect, 1,
+ PyDoc_STR("() -> (short resultingDialectCode)")},
+ {"OSAAvailableDialects", (PyCFunction)OSAObj_OSAAvailableDialects, 1,
+ PyDoc_STR("() -> (AEDesc resultingDialectInfoList)")},
+ {"OSAGetDialectInfo", (PyCFunction)OSAObj_OSAGetDialectInfo, 1,
+ PyDoc_STR("(short dialectCode, OSType selector) -> (AEDesc resultingDialectInfo)")},
+ {"OSAAvailableDialectCodeList", (PyCFunction)OSAObj_OSAAvailableDialectCodeList, 1,
+ PyDoc_STR("() -> (AEDesc resultingDialectCodeList)")},
+ {"OSAExecuteEvent", (PyCFunction)OSAObj_OSAExecuteEvent, 1,
+ PyDoc_STR("(AppleEvent theAppleEvent, OSAID contextID, long modeFlags) -> (OSAID resultingScriptValueID)")},
+ {"OSADoEvent", (PyCFunction)OSAObj_OSADoEvent, 1,
+ PyDoc_STR("(AppleEvent theAppleEvent, OSAID contextID, long modeFlags) -> (AppleEvent reply)")},
+ {"OSAMakeContext", (PyCFunction)OSAObj_OSAMakeContext, 1,
+ PyDoc_STR("(AEDesc contextName, OSAID parentContext) -> (OSAID resultingContextID)")},
+ {NULL, NULL, 0}
};
#define OSAObj_getsetlist NULL
@@ -800,68 +800,68 @@ static PyMethodDef OSAObj_methods[] = {
static PyObject *OSAObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
- PyObject *_self;
- ComponentInstance itself;
- char *kw[] = {"itself", 0};
+ PyObject *_self;
+ ComponentInstance itself;
+ char *kw[] = {"itself", 0};
- if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, OSAObj_Convert, &itself)) return NULL;
- if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
- ((OSAComponentInstanceObject *)_self)->ob_itself = itself;
- return _self;
+ if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, OSAObj_Convert, &itself)) return NULL;
+ if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
+ ((OSAComponentInstanceObject *)_self)->ob_itself = itself;
+ return _self;
}
#define OSAObj_tp_free PyObject_Del
PyTypeObject OSAComponentInstance_Type = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
- "_OSA.OSAComponentInstance", /*tp_name*/
- sizeof(OSAComponentInstanceObject), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- /* methods */
- (destructor) OSAObj_dealloc, /*tp_dealloc*/
- 0, /*tp_print*/
- (getattrfunc)0, /*tp_getattr*/
- (setattrfunc)0, /*tp_setattr*/
- (cmpfunc) OSAObj_compare, /*tp_compare*/
- (reprfunc) OSAObj_repr, /*tp_repr*/
- (PyNumberMethods *)0, /* tp_as_number */
- (PySequenceMethods *)0, /* tp_as_sequence */
- (PyMappingMethods *)0, /* tp_as_mapping */
- (hashfunc) OSAObj_hash, /*tp_hash*/
- 0, /*tp_call*/
- 0, /*tp_str*/
- PyObject_GenericGetAttr, /*tp_getattro*/
- PyObject_GenericSetAttr, /*tp_setattro */
- 0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
- 0, /*tp_doc*/
- 0, /*tp_traverse*/
- 0, /*tp_clear*/
- 0, /*tp_richcompare*/
- 0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
- 0, /*tp_iternext*/
- OSAObj_methods, /* tp_methods */
- 0, /*tp_members*/
- OSAObj_getsetlist, /*tp_getset*/
- 0, /*tp_base*/
- 0, /*tp_dict*/
- 0, /*tp_descr_get*/
- 0, /*tp_descr_set*/
- 0, /*tp_dictoffset*/
- OSAObj_tp_init, /* tp_init */
- OSAObj_tp_alloc, /* tp_alloc */
- OSAObj_tp_new, /* tp_new */
- OSAObj_tp_free, /* tp_free */
+ PyObject_HEAD_INIT(NULL)
+ 0, /*ob_size*/
+ "_OSA.OSAComponentInstance", /*tp_name*/
+ sizeof(OSAComponentInstanceObject), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ /* methods */
+ (destructor) OSAObj_dealloc, /*tp_dealloc*/
+ 0, /*tp_print*/
+ (getattrfunc)0, /*tp_getattr*/
+ (setattrfunc)0, /*tp_setattr*/
+ (cmpfunc) OSAObj_compare, /*tp_compare*/
+ (reprfunc) OSAObj_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) OSAObj_hash, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ PyObject_GenericGetAttr, /*tp_getattro*/
+ PyObject_GenericSetAttr, /*tp_setattro */
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
+ 0, /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ OSAObj_methods, /* tp_methods */
+ 0, /*tp_members*/
+ OSAObj_getsetlist, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ OSAObj_tp_init, /* tp_init */
+ OSAObj_tp_alloc, /* tp_alloc */
+ OSAObj_tp_new, /* tp_new */
+ OSAObj_tp_free, /* tp_free */
};
/* -------------- End object type OSAComponentInstance -------------- */
static PyMethodDef OSA_methods[] = {
- {NULL, NULL, 0}
+ {NULL, NULL, 0}
};
@@ -869,30 +869,30 @@ static PyMethodDef OSA_methods[] = {
void init_OSA(void)
{
- PyObject *m;
- PyObject *d;
+ PyObject *m;
+ PyObject *d;
- /*
- PyMac_INIT_TOOLBOX_OBJECT_NEW(ComponentInstance, OSAObj_New);
- PyMac_INIT_TOOLBOX_OBJECT_CONVERT(ComponentInstance, OSAObj_Convert);
- */
+ /*
+ PyMac_INIT_TOOLBOX_OBJECT_NEW(ComponentInstance, OSAObj_New);
+ PyMac_INIT_TOOLBOX_OBJECT_CONVERT(ComponentInstance, OSAObj_Convert);
+ */
- m = Py_InitModule("_OSA", OSA_methods);
- d = PyModule_GetDict(m);
- OSA_Error = PyMac_GetOSErrException();
- if (OSA_Error == NULL ||
- PyDict_SetItemString(d, "Error", OSA_Error) != 0)
- return;
- OSAComponentInstance_Type.ob_type = &PyType_Type;
- if (PyType_Ready(&OSAComponentInstance_Type) < 0) return;
- Py_INCREF(&OSAComponentInstance_Type);
- PyModule_AddObject(m, "OSAComponentInstance", (PyObject *)&OSAComponentInstance_Type);
- /* Backward-compatible name */
- Py_INCREF(&OSAComponentInstance_Type);
- PyModule_AddObject(m, "OSAComponentInstanceType", (PyObject *)&OSAComponentInstance_Type);
+ m = Py_InitModule("_OSA", OSA_methods);
+ d = PyModule_GetDict(m);
+ OSA_Error = PyMac_GetOSErrException();
+ if (OSA_Error == NULL ||
+ PyDict_SetItemString(d, "Error", OSA_Error) != 0)
+ return;
+ OSAComponentInstance_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&OSAComponentInstance_Type) < 0) return;
+ Py_INCREF(&OSAComponentInstance_Type);
+ PyModule_AddObject(m, "OSAComponentInstance", (PyObject *)&OSAComponentInstance_Type);
+ /* Backward-compatible name */
+ Py_INCREF(&OSAComponentInstance_Type);
+ PyModule_AddObject(m, "OSAComponentInstanceType", (PyObject *)&OSAComponentInstance_Type);
}
/* ======================== End module _OSA ========================= */
diff --git a/Mac/Modules/qd/_Qdmodule.c b/Mac/Modules/qd/_Qdmodule.c
index 8c98fa1..c7594b9 100644
--- a/Mac/Modules/qd/_Qdmodule.c
+++ b/Mac/Modules/qd/_Qdmodule.c
@@ -10,9 +10,9 @@
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
- PyErr_SetString(PyExc_NotImplementedError, \
- "Not available in this shared library/OS version"); \
- return NULL; \
+ PyErr_SetString(PyExc_NotImplementedError, \
+ "Not available in this shared library/OS version"); \
+ return NULL; \
}} while(0)
@@ -42,19 +42,19 @@ static PyObject *BMObj_NewCopied(BitMapPtr);
PyObject *QdRGB_New(RGBColorPtr itself)
{
- return Py_BuildValue("lll", (long)itself->red, (long)itself->green, (long)itself->blue);
+ return Py_BuildValue("lll", (long)itself->red, (long)itself->green, (long)itself->blue);
}
int QdRGB_Convert(PyObject *v, RGBColorPtr p_itself)
{
- long red, green, blue;
+ long red, green, blue;
- if( !PyArg_ParseTuple(v, "lll", &red, &green, &blue) )
- return 0;
- p_itself->red = (unsigned short)red;
- p_itself->green = (unsigned short)green;
- p_itself->blue = (unsigned short)blue;
- return 1;
+ if( !PyArg_ParseTuple(v, "lll", &red, &green, &blue) )
+ return 0;
+ p_itself->red = (unsigned short)red;
+ p_itself->green = (unsigned short)green;
+ p_itself->blue = (unsigned short)blue;
+ return 1;
}
/*
@@ -64,8 +64,8 @@ static
PyObject *QdFI_New(FontInfo *itself)
{
- return Py_BuildValue("hhhh", itself->ascent, itself->descent,
- itself->widMax, itself->leading);
+ return Py_BuildValue("hhhh", itself->ascent, itself->descent,
+ itself->widMax, itself->leading);
}
static PyObject *Qd_Error;
@@ -77,1260 +77,1260 @@ PyTypeObject GrafPort_Type;
#define GrafObj_Check(x) ((x)->ob_type == &GrafPort_Type || PyObject_TypeCheck((x), &GrafPort_Type))
typedef struct GrafPortObject {
- PyObject_HEAD
- GrafPtr ob_itself;
+ PyObject_HEAD
+ GrafPtr ob_itself;
} GrafPortObject;
PyObject *GrafObj_New(GrafPtr itself)
{
- GrafPortObject *it;
- if (itself == NULL) return PyMac_Error(resNotFound);
- it = PyObject_NEW(GrafPortObject, &GrafPort_Type);
- if (it == NULL) return NULL;
- it->ob_itself = itself;
- return (PyObject *)it;
+ GrafPortObject *it;
+ if (itself == NULL) return PyMac_Error(resNotFound);
+ it = PyObject_NEW(GrafPortObject, &GrafPort_Type);
+ if (it == NULL) return NULL;
+ it->ob_itself = itself;
+ return (PyObject *)it;
}
int GrafObj_Convert(PyObject *v, GrafPtr *p_itself)
{
#if 1
- {
- WindowRef win;
- if (WinObj_Convert(v, &win) && v) {
- *p_itself = (GrafPtr)GetWindowPort(win);
- return 1;
- }
- PyErr_Clear();
- }
+ {
+ WindowRef win;
+ if (WinObj_Convert(v, &win) && v) {
+ *p_itself = (GrafPtr)GetWindowPort(win);
+ return 1;
+ }
+ PyErr_Clear();
+ }
#else
- if (DlgObj_Check(v)) {
- DialogRef dlg = (DialogRef)((GrafPortObject *)v)->ob_itself;
- *p_itself = (GrafPtr)GetWindowPort(GetDialogWindow(dlg));
- return 1;
- }
- if (WinObj_Check(v)) {
- WindowRef win = (WindowRef)((GrafPortObject *)v)->ob_itself;
- *p_itself = (GrafPtr)GetWindowPort(win);
- return 1;
- }
-#endif
- if (!GrafObj_Check(v))
- {
- PyErr_SetString(PyExc_TypeError, "GrafPort required");
- return 0;
- }
- *p_itself = ((GrafPortObject *)v)->ob_itself;
- return 1;
+ if (DlgObj_Check(v)) {
+ DialogRef dlg = (DialogRef)((GrafPortObject *)v)->ob_itself;
+ *p_itself = (GrafPtr)GetWindowPort(GetDialogWindow(dlg));
+ return 1;
+ }
+ if (WinObj_Check(v)) {
+ WindowRef win = (WindowRef)((GrafPortObject *)v)->ob_itself;
+ *p_itself = (GrafPtr)GetWindowPort(win);
+ return 1;
+ }
+#endif
+ if (!GrafObj_Check(v))
+ {
+ PyErr_SetString(PyExc_TypeError, "GrafPort required");
+ return 0;
+ }
+ *p_itself = ((GrafPortObject *)v)->ob_itself;
+ return 1;
}
static void GrafObj_dealloc(GrafPortObject *self)
{
- /* Cleanup of self->ob_itself goes here */
- self->ob_type->tp_free((PyObject *)self);
+ /* Cleanup of self->ob_itself goes here */
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *GrafObj_MacSetPort(GrafPortObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef MacSetPort
- PyMac_PRECHECK(MacSetPort);
+ PyMac_PRECHECK(MacSetPort);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- MacSetPort(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ MacSetPort(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *GrafObj_QDSwapPort(GrafPortObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- CGrafPtr outOldPort;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ CGrafPtr outOldPort;
#ifndef QDSwapPort
- PyMac_PRECHECK(QDSwapPort);
+ PyMac_PRECHECK(QDSwapPort);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = QDSwapPort(_self->ob_itself,
- &outOldPort);
- _res = Py_BuildValue("bO&",
- _rv,
- GrafObj_New, outOldPort);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = QDSwapPort(_self->ob_itself,
+ &outOldPort);
+ _res = Py_BuildValue("bO&",
+ _rv,
+ GrafObj_New, outOldPort);
+ return _res;
}
static PyObject *GrafObj_IsValidPort(GrafPortObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
+ PyObject *_res = NULL;
+ Boolean _rv;
#ifndef IsValidPort
- PyMac_PRECHECK(IsValidPort);
+ PyMac_PRECHECK(IsValidPort);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = IsValidPort(_self->ob_itself);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = IsValidPort(_self->ob_itself);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *GrafObj_GetPortPixMap(GrafPortObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- PixMapHandle _rv;
+ PyObject *_res = NULL;
+ PixMapHandle _rv;
#ifndef GetPortPixMap
- PyMac_PRECHECK(GetPortPixMap);
+ PyMac_PRECHECK(GetPortPixMap);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetPortPixMap(_self->ob_itself);
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetPortPixMap(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *GrafObj_GetPortBitMapForCopyBits(GrafPortObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- const BitMap * _rv;
+ PyObject *_res = NULL;
+ const BitMap * _rv;
#ifndef GetPortBitMapForCopyBits
- PyMac_PRECHECK(GetPortBitMapForCopyBits);
+ PyMac_PRECHECK(GetPortBitMapForCopyBits);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetPortBitMapForCopyBits(_self->ob_itself);
- _res = Py_BuildValue("O&",
- BMObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetPortBitMapForCopyBits(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ BMObj_New, _rv);
+ return _res;
}
static PyObject *GrafObj_GetPortBounds(GrafPortObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Rect rect;
+ PyObject *_res = NULL;
+ Rect rect;
#ifndef GetPortBounds
- PyMac_PRECHECK(GetPortBounds);
+ PyMac_PRECHECK(GetPortBounds);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- GetPortBounds(_self->ob_itself,
- &rect);
- _res = Py_BuildValue("O&",
- PyMac_BuildRect, &rect);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ GetPortBounds(_self->ob_itself,
+ &rect);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildRect, &rect);
+ return _res;
}
static PyObject *GrafObj_GetPortForeColor(GrafPortObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RGBColor foreColor;
+ PyObject *_res = NULL;
+ RGBColor foreColor;
#ifndef GetPortForeColor
- PyMac_PRECHECK(GetPortForeColor);
+ PyMac_PRECHECK(GetPortForeColor);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- GetPortForeColor(_self->ob_itself,
- &foreColor);
- _res = Py_BuildValue("O&",
- QdRGB_New, &foreColor);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ GetPortForeColor(_self->ob_itself,
+ &foreColor);
+ _res = Py_BuildValue("O&",
+ QdRGB_New, &foreColor);
+ return _res;
}
static PyObject *GrafObj_GetPortBackColor(GrafPortObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RGBColor backColor;
+ PyObject *_res = NULL;
+ RGBColor backColor;
#ifndef GetPortBackColor
- PyMac_PRECHECK(GetPortBackColor);
+ PyMac_PRECHECK(GetPortBackColor);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- GetPortBackColor(_self->ob_itself,
- &backColor);
- _res = Py_BuildValue("O&",
- QdRGB_New, &backColor);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ GetPortBackColor(_self->ob_itself,
+ &backColor);
+ _res = Py_BuildValue("O&",
+ QdRGB_New, &backColor);
+ return _res;
}
static PyObject *GrafObj_GetPortOpColor(GrafPortObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RGBColor opColor;
+ PyObject *_res = NULL;
+ RGBColor opColor;
#ifndef GetPortOpColor
- PyMac_PRECHECK(GetPortOpColor);
+ PyMac_PRECHECK(GetPortOpColor);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- GetPortOpColor(_self->ob_itself,
- &opColor);
- _res = Py_BuildValue("O&",
- QdRGB_New, &opColor);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ GetPortOpColor(_self->ob_itself,
+ &opColor);
+ _res = Py_BuildValue("O&",
+ QdRGB_New, &opColor);
+ return _res;
}
static PyObject *GrafObj_GetPortHiliteColor(GrafPortObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RGBColor hiliteColor;
+ PyObject *_res = NULL;
+ RGBColor hiliteColor;
#ifndef GetPortHiliteColor
- PyMac_PRECHECK(GetPortHiliteColor);
+ PyMac_PRECHECK(GetPortHiliteColor);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- GetPortHiliteColor(_self->ob_itself,
- &hiliteColor);
- _res = Py_BuildValue("O&",
- QdRGB_New, &hiliteColor);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ GetPortHiliteColor(_self->ob_itself,
+ &hiliteColor);
+ _res = Py_BuildValue("O&",
+ QdRGB_New, &hiliteColor);
+ return _res;
}
static PyObject *GrafObj_GetPortTextFont(GrafPortObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short _rv;
+ PyObject *_res = NULL;
+ short _rv;
#ifndef GetPortTextFont
- PyMac_PRECHECK(GetPortTextFont);
+ PyMac_PRECHECK(GetPortTextFont);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetPortTextFont(_self->ob_itself);
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetPortTextFont(_self->ob_itself);
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *GrafObj_GetPortTextFace(GrafPortObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Style _rv;
+ PyObject *_res = NULL;
+ Style _rv;
#ifndef GetPortTextFace
- PyMac_PRECHECK(GetPortTextFace);
+ PyMac_PRECHECK(GetPortTextFace);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetPortTextFace(_self->ob_itself);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetPortTextFace(_self->ob_itself);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *GrafObj_GetPortTextMode(GrafPortObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short _rv;
+ PyObject *_res = NULL;
+ short _rv;
#ifndef GetPortTextMode
- PyMac_PRECHECK(GetPortTextMode);
+ PyMac_PRECHECK(GetPortTextMode);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetPortTextMode(_self->ob_itself);
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetPortTextMode(_self->ob_itself);
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *GrafObj_GetPortTextSize(GrafPortObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short _rv;
+ PyObject *_res = NULL;
+ short _rv;
#ifndef GetPortTextSize
- PyMac_PRECHECK(GetPortTextSize);
+ PyMac_PRECHECK(GetPortTextSize);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetPortTextSize(_self->ob_itself);
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetPortTextSize(_self->ob_itself);
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *GrafObj_GetPortChExtra(GrafPortObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short _rv;
+ PyObject *_res = NULL;
+ short _rv;
#ifndef GetPortChExtra
- PyMac_PRECHECK(GetPortChExtra);
+ PyMac_PRECHECK(GetPortChExtra);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetPortChExtra(_self->ob_itself);
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetPortChExtra(_self->ob_itself);
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *GrafObj_GetPortFracHPenLocation(GrafPortObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short _rv;
+ PyObject *_res = NULL;
+ short _rv;
#ifndef GetPortFracHPenLocation
- PyMac_PRECHECK(GetPortFracHPenLocation);
+ PyMac_PRECHECK(GetPortFracHPenLocation);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetPortFracHPenLocation(_self->ob_itself);
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetPortFracHPenLocation(_self->ob_itself);
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *GrafObj_GetPortSpExtra(GrafPortObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Fixed _rv;
+ PyObject *_res = NULL;
+ Fixed _rv;
#ifndef GetPortSpExtra
- PyMac_PRECHECK(GetPortSpExtra);
+ PyMac_PRECHECK(GetPortSpExtra);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetPortSpExtra(_self->ob_itself);
- _res = Py_BuildValue("O&",
- PyMac_BuildFixed, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetPortSpExtra(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildFixed, _rv);
+ return _res;
}
static PyObject *GrafObj_GetPortPenVisibility(GrafPortObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short _rv;
+ PyObject *_res = NULL;
+ short _rv;
#ifndef GetPortPenVisibility
- PyMac_PRECHECK(GetPortPenVisibility);
+ PyMac_PRECHECK(GetPortPenVisibility);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetPortPenVisibility(_self->ob_itself);
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetPortPenVisibility(_self->ob_itself);
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *GrafObj_GetPortVisibleRegion(GrafPortObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RgnHandle _rv;
- RgnHandle visRgn;
+ PyObject *_res = NULL;
+ RgnHandle _rv;
+ RgnHandle visRgn;
#ifndef GetPortVisibleRegion
- PyMac_PRECHECK(GetPortVisibleRegion);
+ PyMac_PRECHECK(GetPortVisibleRegion);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &visRgn))
- return NULL;
- _rv = GetPortVisibleRegion(_self->ob_itself,
- visRgn);
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &visRgn))
+ return NULL;
+ _rv = GetPortVisibleRegion(_self->ob_itself,
+ visRgn);
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *GrafObj_GetPortClipRegion(GrafPortObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RgnHandle _rv;
- RgnHandle clipRgn;
+ PyObject *_res = NULL;
+ RgnHandle _rv;
+ RgnHandle clipRgn;
#ifndef GetPortClipRegion
- PyMac_PRECHECK(GetPortClipRegion);
+ PyMac_PRECHECK(GetPortClipRegion);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &clipRgn))
- return NULL;
- _rv = GetPortClipRegion(_self->ob_itself,
- clipRgn);
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &clipRgn))
+ return NULL;
+ _rv = GetPortClipRegion(_self->ob_itself,
+ clipRgn);
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *GrafObj_GetPortBackPixPat(GrafPortObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- PixPatHandle _rv;
- PixPatHandle backPattern;
+ PyObject *_res = NULL;
+ PixPatHandle _rv;
+ PixPatHandle backPattern;
#ifndef GetPortBackPixPat
- PyMac_PRECHECK(GetPortBackPixPat);
+ PyMac_PRECHECK(GetPortBackPixPat);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &backPattern))
- return NULL;
- _rv = GetPortBackPixPat(_self->ob_itself,
- backPattern);
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &backPattern))
+ return NULL;
+ _rv = GetPortBackPixPat(_self->ob_itself,
+ backPattern);
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *GrafObj_GetPortPenPixPat(GrafPortObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- PixPatHandle _rv;
- PixPatHandle penPattern;
+ PyObject *_res = NULL;
+ PixPatHandle _rv;
+ PixPatHandle penPattern;
#ifndef GetPortPenPixPat
- PyMac_PRECHECK(GetPortPenPixPat);
+ PyMac_PRECHECK(GetPortPenPixPat);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &penPattern))
- return NULL;
- _rv = GetPortPenPixPat(_self->ob_itself,
- penPattern);
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &penPattern))
+ return NULL;
+ _rv = GetPortPenPixPat(_self->ob_itself,
+ penPattern);
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *GrafObj_GetPortFillPixPat(GrafPortObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- PixPatHandle _rv;
- PixPatHandle fillPattern;
+ PyObject *_res = NULL;
+ PixPatHandle _rv;
+ PixPatHandle fillPattern;
#ifndef GetPortFillPixPat
- PyMac_PRECHECK(GetPortFillPixPat);
+ PyMac_PRECHECK(GetPortFillPixPat);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &fillPattern))
- return NULL;
- _rv = GetPortFillPixPat(_self->ob_itself,
- fillPattern);
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &fillPattern))
+ return NULL;
+ _rv = GetPortFillPixPat(_self->ob_itself,
+ fillPattern);
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *GrafObj_GetPortPenSize(GrafPortObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Point penSize;
+ PyObject *_res = NULL;
+ Point penSize;
#ifndef GetPortPenSize
- PyMac_PRECHECK(GetPortPenSize);
+ PyMac_PRECHECK(GetPortPenSize);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetPoint, &penSize))
- return NULL;
- GetPortPenSize(_self->ob_itself,
- &penSize);
- _res = Py_BuildValue("O&",
- PyMac_BuildPoint, penSize);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetPoint, &penSize))
+ return NULL;
+ GetPortPenSize(_self->ob_itself,
+ &penSize);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildPoint, penSize);
+ return _res;
}
static PyObject *GrafObj_GetPortPenMode(GrafPortObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- SInt32 _rv;
+ PyObject *_res = NULL;
+ SInt32 _rv;
#ifndef GetPortPenMode
- PyMac_PRECHECK(GetPortPenMode);
+ PyMac_PRECHECK(GetPortPenMode);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetPortPenMode(_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetPortPenMode(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *GrafObj_GetPortPenLocation(GrafPortObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Point penLocation;
+ PyObject *_res = NULL;
+ Point penLocation;
#ifndef GetPortPenLocation
- PyMac_PRECHECK(GetPortPenLocation);
+ PyMac_PRECHECK(GetPortPenLocation);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetPoint, &penLocation))
- return NULL;
- GetPortPenLocation(_self->ob_itself,
- &penLocation);
- _res = Py_BuildValue("O&",
- PyMac_BuildPoint, penLocation);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetPoint, &penLocation))
+ return NULL;
+ GetPortPenLocation(_self->ob_itself,
+ &penLocation);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildPoint, penLocation);
+ return _res;
}
static PyObject *GrafObj_IsPortRegionBeingDefined(GrafPortObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
+ PyObject *_res = NULL;
+ Boolean _rv;
#ifndef IsPortRegionBeingDefined
- PyMac_PRECHECK(IsPortRegionBeingDefined);
+ PyMac_PRECHECK(IsPortRegionBeingDefined);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = IsPortRegionBeingDefined(_self->ob_itself);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = IsPortRegionBeingDefined(_self->ob_itself);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *GrafObj_IsPortPictureBeingDefined(GrafPortObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
+ PyObject *_res = NULL;
+ Boolean _rv;
#ifndef IsPortPictureBeingDefined
- PyMac_PRECHECK(IsPortPictureBeingDefined);
+ PyMac_PRECHECK(IsPortPictureBeingDefined);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = IsPortPictureBeingDefined(_self->ob_itself);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = IsPortPictureBeingDefined(_self->ob_itself);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *GrafObj_IsPortPolyBeingDefined(GrafPortObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
+ PyObject *_res = NULL;
+ Boolean _rv;
#ifndef IsPortPolyBeingDefined
- PyMac_PRECHECK(IsPortPolyBeingDefined);
+ PyMac_PRECHECK(IsPortPolyBeingDefined);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = IsPortPolyBeingDefined(_self->ob_itself);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = IsPortPolyBeingDefined(_self->ob_itself);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *GrafObj_IsPortOffscreen(GrafPortObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
+ PyObject *_res = NULL;
+ Boolean _rv;
#ifndef IsPortOffscreen
- PyMac_PRECHECK(IsPortOffscreen);
+ PyMac_PRECHECK(IsPortOffscreen);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = IsPortOffscreen(_self->ob_itself);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = IsPortOffscreen(_self->ob_itself);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *GrafObj_IsPortColor(GrafPortObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
+ PyObject *_res = NULL;
+ Boolean _rv;
#ifndef IsPortColor
- PyMac_PRECHECK(IsPortColor);
+ PyMac_PRECHECK(IsPortColor);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = IsPortColor(_self->ob_itself);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = IsPortColor(_self->ob_itself);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *GrafObj_IsPortVisibleRegionEmpty(GrafPortObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
+ PyObject *_res = NULL;
+ Boolean _rv;
#ifndef IsPortVisibleRegionEmpty
- PyMac_PRECHECK(IsPortVisibleRegionEmpty);
+ PyMac_PRECHECK(IsPortVisibleRegionEmpty);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = IsPortVisibleRegionEmpty(_self->ob_itself);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = IsPortVisibleRegionEmpty(_self->ob_itself);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *GrafObj_IsPortClipRegionEmpty(GrafPortObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
+ PyObject *_res = NULL;
+ Boolean _rv;
#ifndef IsPortClipRegionEmpty
- PyMac_PRECHECK(IsPortClipRegionEmpty);
+ PyMac_PRECHECK(IsPortClipRegionEmpty);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = IsPortClipRegionEmpty(_self->ob_itself);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = IsPortClipRegionEmpty(_self->ob_itself);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *GrafObj_SectRegionWithPortClipRegion(GrafPortObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RgnHandle ioRegion;
+ PyObject *_res = NULL;
+ RgnHandle ioRegion;
#ifndef SectRegionWithPortClipRegion
- PyMac_PRECHECK(SectRegionWithPortClipRegion);
+ PyMac_PRECHECK(SectRegionWithPortClipRegion);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &ioRegion))
- return NULL;
- SectRegionWithPortClipRegion(_self->ob_itself,
- ioRegion);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &ioRegion))
+ return NULL;
+ SectRegionWithPortClipRegion(_self->ob_itself,
+ ioRegion);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *GrafObj_SectRegionWithPortVisibleRegion(GrafPortObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RgnHandle ioRegion;
+ PyObject *_res = NULL;
+ RgnHandle ioRegion;
#ifndef SectRegionWithPortVisibleRegion
- PyMac_PRECHECK(SectRegionWithPortVisibleRegion);
+ PyMac_PRECHECK(SectRegionWithPortVisibleRegion);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &ioRegion))
- return NULL;
- SectRegionWithPortVisibleRegion(_self->ob_itself,
- ioRegion);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &ioRegion))
+ return NULL;
+ SectRegionWithPortVisibleRegion(_self->ob_itself,
+ ioRegion);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *GrafObj_SwapPortPicSaveHandle(GrafPortObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Handle _rv;
- Handle inPicSaveHdl;
+ PyObject *_res = NULL;
+ Handle _rv;
+ Handle inPicSaveHdl;
#ifndef SwapPortPicSaveHandle
- PyMac_PRECHECK(SwapPortPicSaveHandle);
+ PyMac_PRECHECK(SwapPortPicSaveHandle);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &inPicSaveHdl))
- return NULL;
- _rv = SwapPortPicSaveHandle(_self->ob_itself,
- inPicSaveHdl);
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &inPicSaveHdl))
+ return NULL;
+ _rv = SwapPortPicSaveHandle(_self->ob_itself,
+ inPicSaveHdl);
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *GrafObj_SwapPortPolySaveHandle(GrafPortObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Handle _rv;
- Handle inPolySaveHdl;
+ PyObject *_res = NULL;
+ Handle _rv;
+ Handle inPolySaveHdl;
#ifndef SwapPortPolySaveHandle
- PyMac_PRECHECK(SwapPortPolySaveHandle);
+ PyMac_PRECHECK(SwapPortPolySaveHandle);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &inPolySaveHdl))
- return NULL;
- _rv = SwapPortPolySaveHandle(_self->ob_itself,
- inPolySaveHdl);
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &inPolySaveHdl))
+ return NULL;
+ _rv = SwapPortPolySaveHandle(_self->ob_itself,
+ inPolySaveHdl);
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *GrafObj_SwapPortRegionSaveHandle(GrafPortObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Handle _rv;
- Handle inRegionSaveHdl;
+ PyObject *_res = NULL;
+ Handle _rv;
+ Handle inRegionSaveHdl;
#ifndef SwapPortRegionSaveHandle
- PyMac_PRECHECK(SwapPortRegionSaveHandle);
+ PyMac_PRECHECK(SwapPortRegionSaveHandle);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &inRegionSaveHdl))
- return NULL;
- _rv = SwapPortRegionSaveHandle(_self->ob_itself,
- inRegionSaveHdl);
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &inRegionSaveHdl))
+ return NULL;
+ _rv = SwapPortRegionSaveHandle(_self->ob_itself,
+ inRegionSaveHdl);
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *GrafObj_SetPortBounds(GrafPortObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Rect rect;
+ PyObject *_res = NULL;
+ Rect rect;
#ifndef SetPortBounds
- PyMac_PRECHECK(SetPortBounds);
+ PyMac_PRECHECK(SetPortBounds);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetRect, &rect))
- return NULL;
- SetPortBounds(_self->ob_itself,
- &rect);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetRect, &rect))
+ return NULL;
+ SetPortBounds(_self->ob_itself,
+ &rect);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *GrafObj_SetPortOpColor(GrafPortObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RGBColor opColor;
+ PyObject *_res = NULL;
+ RGBColor opColor;
#ifndef SetPortOpColor
- PyMac_PRECHECK(SetPortOpColor);
+ PyMac_PRECHECK(SetPortOpColor);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- QdRGB_Convert, &opColor))
- return NULL;
- SetPortOpColor(_self->ob_itself,
- &opColor);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ QdRGB_Convert, &opColor))
+ return NULL;
+ SetPortOpColor(_self->ob_itself,
+ &opColor);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *GrafObj_SetPortTextFont(GrafPortObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short txFont;
+ PyObject *_res = NULL;
+ short txFont;
#ifndef SetPortTextFont
- PyMac_PRECHECK(SetPortTextFont);
+ PyMac_PRECHECK(SetPortTextFont);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &txFont))
- return NULL;
- SetPortTextFont(_self->ob_itself,
- txFont);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &txFont))
+ return NULL;
+ SetPortTextFont(_self->ob_itself,
+ txFont);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *GrafObj_SetPortTextSize(GrafPortObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short txSize;
+ PyObject *_res = NULL;
+ short txSize;
#ifndef SetPortTextSize
- PyMac_PRECHECK(SetPortTextSize);
+ PyMac_PRECHECK(SetPortTextSize);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &txSize))
- return NULL;
- SetPortTextSize(_self->ob_itself,
- txSize);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &txSize))
+ return NULL;
+ SetPortTextSize(_self->ob_itself,
+ txSize);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *GrafObj_SetPortTextFace(GrafPortObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- StyleParameter face;
+ PyObject *_res = NULL;
+ StyleParameter face;
#ifndef SetPortTextFace
- PyMac_PRECHECK(SetPortTextFace);
+ PyMac_PRECHECK(SetPortTextFace);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &face))
- return NULL;
- SetPortTextFace(_self->ob_itself,
- face);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &face))
+ return NULL;
+ SetPortTextFace(_self->ob_itself,
+ face);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *GrafObj_SetPortTextMode(GrafPortObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short mode;
+ PyObject *_res = NULL;
+ short mode;
#ifndef SetPortTextMode
- PyMac_PRECHECK(SetPortTextMode);
+ PyMac_PRECHECK(SetPortTextMode);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &mode))
- return NULL;
- SetPortTextMode(_self->ob_itself,
- mode);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &mode))
+ return NULL;
+ SetPortTextMode(_self->ob_itself,
+ mode);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *GrafObj_SetPortVisibleRegion(GrafPortObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RgnHandle visRgn;
+ PyObject *_res = NULL;
+ RgnHandle visRgn;
#ifndef SetPortVisibleRegion
- PyMac_PRECHECK(SetPortVisibleRegion);
+ PyMac_PRECHECK(SetPortVisibleRegion);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &visRgn))
- return NULL;
- SetPortVisibleRegion(_self->ob_itself,
- visRgn);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &visRgn))
+ return NULL;
+ SetPortVisibleRegion(_self->ob_itself,
+ visRgn);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *GrafObj_SetPortClipRegion(GrafPortObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RgnHandle clipRgn;
+ PyObject *_res = NULL;
+ RgnHandle clipRgn;
#ifndef SetPortClipRegion
- PyMac_PRECHECK(SetPortClipRegion);
+ PyMac_PRECHECK(SetPortClipRegion);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &clipRgn))
- return NULL;
- SetPortClipRegion(_self->ob_itself,
- clipRgn);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &clipRgn))
+ return NULL;
+ SetPortClipRegion(_self->ob_itself,
+ clipRgn);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *GrafObj_SetPortPenPixPat(GrafPortObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- PixPatHandle penPattern;
+ PyObject *_res = NULL;
+ PixPatHandle penPattern;
#ifndef SetPortPenPixPat
- PyMac_PRECHECK(SetPortPenPixPat);
+ PyMac_PRECHECK(SetPortPenPixPat);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &penPattern))
- return NULL;
- SetPortPenPixPat(_self->ob_itself,
- penPattern);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &penPattern))
+ return NULL;
+ SetPortPenPixPat(_self->ob_itself,
+ penPattern);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *GrafObj_SetPortFillPixPat(GrafPortObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- PixPatHandle penPattern;
+ PyObject *_res = NULL;
+ PixPatHandle penPattern;
#ifndef SetPortFillPixPat
- PyMac_PRECHECK(SetPortFillPixPat);
+ PyMac_PRECHECK(SetPortFillPixPat);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &penPattern))
- return NULL;
- SetPortFillPixPat(_self->ob_itself,
- penPattern);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &penPattern))
+ return NULL;
+ SetPortFillPixPat(_self->ob_itself,
+ penPattern);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *GrafObj_SetPortBackPixPat(GrafPortObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- PixPatHandle backPattern;
+ PyObject *_res = NULL;
+ PixPatHandle backPattern;
#ifndef SetPortBackPixPat
- PyMac_PRECHECK(SetPortBackPixPat);
+ PyMac_PRECHECK(SetPortBackPixPat);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &backPattern))
- return NULL;
- SetPortBackPixPat(_self->ob_itself,
- backPattern);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &backPattern))
+ return NULL;
+ SetPortBackPixPat(_self->ob_itself,
+ backPattern);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *GrafObj_SetPortPenSize(GrafPortObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Point penSize;
+ PyObject *_res = NULL;
+ Point penSize;
#ifndef SetPortPenSize
- PyMac_PRECHECK(SetPortPenSize);
+ PyMac_PRECHECK(SetPortPenSize);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetPoint, &penSize))
- return NULL;
- SetPortPenSize(_self->ob_itself,
- penSize);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetPoint, &penSize))
+ return NULL;
+ SetPortPenSize(_self->ob_itself,
+ penSize);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *GrafObj_SetPortPenMode(GrafPortObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- SInt32 penMode;
+ PyObject *_res = NULL;
+ SInt32 penMode;
#ifndef SetPortPenMode
- PyMac_PRECHECK(SetPortPenMode);
+ PyMac_PRECHECK(SetPortPenMode);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &penMode))
- return NULL;
- SetPortPenMode(_self->ob_itself,
- penMode);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &penMode))
+ return NULL;
+ SetPortPenMode(_self->ob_itself,
+ penMode);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *GrafObj_SetPortFracHPenLocation(GrafPortObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short pnLocHFrac;
+ PyObject *_res = NULL;
+ short pnLocHFrac;
#ifndef SetPortFracHPenLocation
- PyMac_PRECHECK(SetPortFracHPenLocation);
+ PyMac_PRECHECK(SetPortFracHPenLocation);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &pnLocHFrac))
- return NULL;
- SetPortFracHPenLocation(_self->ob_itself,
- pnLocHFrac);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &pnLocHFrac))
+ return NULL;
+ SetPortFracHPenLocation(_self->ob_itself,
+ pnLocHFrac);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *GrafObj_DisposePort(GrafPortObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef DisposePort
- PyMac_PRECHECK(DisposePort);
+ PyMac_PRECHECK(DisposePort);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- DisposePort(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ DisposePort(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *GrafObj_QDLocalToGlobalPoint(GrafPortObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Point point;
+ PyObject *_res = NULL;
+ Point point;
#ifndef QDLocalToGlobalPoint
- PyMac_PRECHECK(QDLocalToGlobalPoint);
+ PyMac_PRECHECK(QDLocalToGlobalPoint);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetPoint, &point))
- return NULL;
- QDLocalToGlobalPoint(_self->ob_itself,
- &point);
- _res = Py_BuildValue("O&",
- PyMac_BuildPoint, point);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetPoint, &point))
+ return NULL;
+ QDLocalToGlobalPoint(_self->ob_itself,
+ &point);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildPoint, point);
+ return _res;
}
static PyObject *GrafObj_QDGlobalToLocalPoint(GrafPortObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Point point;
+ PyObject *_res = NULL;
+ Point point;
#ifndef QDGlobalToLocalPoint
- PyMac_PRECHECK(QDGlobalToLocalPoint);
+ PyMac_PRECHECK(QDGlobalToLocalPoint);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetPoint, &point))
- return NULL;
- QDGlobalToLocalPoint(_self->ob_itself,
- &point);
- _res = Py_BuildValue("O&",
- PyMac_BuildPoint, point);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetPoint, &point))
+ return NULL;
+ QDGlobalToLocalPoint(_self->ob_itself,
+ &point);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildPoint, point);
+ return _res;
}
static PyObject *GrafObj_QDLocalToGlobalRect(GrafPortObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Rect bounds;
+ PyObject *_res = NULL;
+ Rect bounds;
#ifndef QDLocalToGlobalRect
- PyMac_PRECHECK(QDLocalToGlobalRect);
+ PyMac_PRECHECK(QDLocalToGlobalRect);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- QDLocalToGlobalRect(_self->ob_itself,
- &bounds);
- _res = Py_BuildValue("O&",
- PyMac_BuildRect, &bounds);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ QDLocalToGlobalRect(_self->ob_itself,
+ &bounds);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildRect, &bounds);
+ return _res;
}
static PyObject *GrafObj_QDGlobalToLocalRect(GrafPortObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Rect bounds;
+ PyObject *_res = NULL;
+ Rect bounds;
#ifndef QDGlobalToLocalRect
- PyMac_PRECHECK(QDGlobalToLocalRect);
+ PyMac_PRECHECK(QDGlobalToLocalRect);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- QDGlobalToLocalRect(_self->ob_itself,
- &bounds);
- _res = Py_BuildValue("O&",
- PyMac_BuildRect, &bounds);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ QDGlobalToLocalRect(_self->ob_itself,
+ &bounds);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildRect, &bounds);
+ return _res;
}
static PyObject *GrafObj_QDLocalToGlobalRegion(GrafPortObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RgnHandle _rv;
- RgnHandle region;
+ PyObject *_res = NULL;
+ RgnHandle _rv;
+ RgnHandle region;
#ifndef QDLocalToGlobalRegion
- PyMac_PRECHECK(QDLocalToGlobalRegion);
+ PyMac_PRECHECK(QDLocalToGlobalRegion);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &region))
- return NULL;
- _rv = QDLocalToGlobalRegion(_self->ob_itself,
- region);
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &region))
+ return NULL;
+ _rv = QDLocalToGlobalRegion(_self->ob_itself,
+ region);
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *GrafObj_QDGlobalToLocalRegion(GrafPortObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RgnHandle _rv;
- RgnHandle region;
+ PyObject *_res = NULL;
+ RgnHandle _rv;
+ RgnHandle region;
#ifndef QDGlobalToLocalRegion
- PyMac_PRECHECK(QDGlobalToLocalRegion);
+ PyMac_PRECHECK(QDGlobalToLocalRegion);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &region))
- return NULL;
- _rv = QDGlobalToLocalRegion(_self->ob_itself,
- region);
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &region))
+ return NULL;
+ _rv = QDGlobalToLocalRegion(_self->ob_itself,
+ region);
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *GrafObj_QDIsPortBuffered(GrafPortObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
+ PyObject *_res = NULL;
+ Boolean _rv;
#ifndef QDIsPortBuffered
- PyMac_PRECHECK(QDIsPortBuffered);
+ PyMac_PRECHECK(QDIsPortBuffered);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = QDIsPortBuffered(_self->ob_itself);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = QDIsPortBuffered(_self->ob_itself);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *GrafObj_QDIsPortBufferDirty(GrafPortObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
+ PyObject *_res = NULL;
+ Boolean _rv;
#ifndef QDIsPortBufferDirty
- PyMac_PRECHECK(QDIsPortBufferDirty);
+ PyMac_PRECHECK(QDIsPortBufferDirty);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = QDIsPortBufferDirty(_self->ob_itself);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = QDIsPortBufferDirty(_self->ob_itself);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *GrafObj_QDFlushPortBuffer(GrafPortObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RgnHandle region;
+ PyObject *_res = NULL;
+ RgnHandle region;
#ifndef QDFlushPortBuffer
- PyMac_PRECHECK(QDFlushPortBuffer);
+ PyMac_PRECHECK(QDFlushPortBuffer);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- OptResObj_Convert, &region))
- return NULL;
- QDFlushPortBuffer(_self->ob_itself,
- region);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ OptResObj_Convert, &region))
+ return NULL;
+ QDFlushPortBuffer(_self->ob_itself,
+ region);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *GrafObj_QDGetDirtyRegion(GrafPortObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- RgnHandle rgn;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ RgnHandle rgn;
#ifndef QDGetDirtyRegion
- PyMac_PRECHECK(QDGetDirtyRegion);
+ PyMac_PRECHECK(QDGetDirtyRegion);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &rgn))
- return NULL;
- _err = QDGetDirtyRegion(_self->ob_itself,
- rgn);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &rgn))
+ return NULL;
+ _err = QDGetDirtyRegion(_self->ob_itself,
+ rgn);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *GrafObj_QDSetDirtyRegion(GrafPortObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- RgnHandle rgn;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ RgnHandle rgn;
#ifndef QDSetDirtyRegion
- PyMac_PRECHECK(QDSetDirtyRegion);
+ PyMac_PRECHECK(QDSetDirtyRegion);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &rgn))
- return NULL;
- _err = QDSetDirtyRegion(_self->ob_itself,
- rgn);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &rgn))
+ return NULL;
+ _err = QDSetDirtyRegion(_self->ob_itself,
+ rgn);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyMethodDef GrafObj_methods[] = {
- {"MacSetPort", (PyCFunction)GrafObj_MacSetPort, 1,
- PyDoc_STR("() -> None")},
- {"QDSwapPort", (PyCFunction)GrafObj_QDSwapPort, 1,
- PyDoc_STR("() -> (Boolean _rv, CGrafPtr outOldPort)")},
- {"IsValidPort", (PyCFunction)GrafObj_IsValidPort, 1,
- PyDoc_STR("() -> (Boolean _rv)")},
- {"GetPortPixMap", (PyCFunction)GrafObj_GetPortPixMap, 1,
- PyDoc_STR("() -> (PixMapHandle _rv)")},
- {"GetPortBitMapForCopyBits", (PyCFunction)GrafObj_GetPortBitMapForCopyBits, 1,
- PyDoc_STR("() -> (const BitMap * _rv)")},
- {"GetPortBounds", (PyCFunction)GrafObj_GetPortBounds, 1,
- PyDoc_STR("() -> (Rect rect)")},
- {"GetPortForeColor", (PyCFunction)GrafObj_GetPortForeColor, 1,
- PyDoc_STR("() -> (RGBColor foreColor)")},
- {"GetPortBackColor", (PyCFunction)GrafObj_GetPortBackColor, 1,
- PyDoc_STR("() -> (RGBColor backColor)")},
- {"GetPortOpColor", (PyCFunction)GrafObj_GetPortOpColor, 1,
- PyDoc_STR("() -> (RGBColor opColor)")},
- {"GetPortHiliteColor", (PyCFunction)GrafObj_GetPortHiliteColor, 1,
- PyDoc_STR("() -> (RGBColor hiliteColor)")},
- {"GetPortTextFont", (PyCFunction)GrafObj_GetPortTextFont, 1,
- PyDoc_STR("() -> (short _rv)")},
- {"GetPortTextFace", (PyCFunction)GrafObj_GetPortTextFace, 1,
- PyDoc_STR("() -> (Style _rv)")},
- {"GetPortTextMode", (PyCFunction)GrafObj_GetPortTextMode, 1,
- PyDoc_STR("() -> (short _rv)")},
- {"GetPortTextSize", (PyCFunction)GrafObj_GetPortTextSize, 1,
- PyDoc_STR("() -> (short _rv)")},
- {"GetPortChExtra", (PyCFunction)GrafObj_GetPortChExtra, 1,
- PyDoc_STR("() -> (short _rv)")},
- {"GetPortFracHPenLocation", (PyCFunction)GrafObj_GetPortFracHPenLocation, 1,
- PyDoc_STR("() -> (short _rv)")},
- {"GetPortSpExtra", (PyCFunction)GrafObj_GetPortSpExtra, 1,
- PyDoc_STR("() -> (Fixed _rv)")},
- {"GetPortPenVisibility", (PyCFunction)GrafObj_GetPortPenVisibility, 1,
- PyDoc_STR("() -> (short _rv)")},
- {"GetPortVisibleRegion", (PyCFunction)GrafObj_GetPortVisibleRegion, 1,
- PyDoc_STR("(RgnHandle visRgn) -> (RgnHandle _rv)")},
- {"GetPortClipRegion", (PyCFunction)GrafObj_GetPortClipRegion, 1,
- PyDoc_STR("(RgnHandle clipRgn) -> (RgnHandle _rv)")},
- {"GetPortBackPixPat", (PyCFunction)GrafObj_GetPortBackPixPat, 1,
- PyDoc_STR("(PixPatHandle backPattern) -> (PixPatHandle _rv)")},
- {"GetPortPenPixPat", (PyCFunction)GrafObj_GetPortPenPixPat, 1,
- PyDoc_STR("(PixPatHandle penPattern) -> (PixPatHandle _rv)")},
- {"GetPortFillPixPat", (PyCFunction)GrafObj_GetPortFillPixPat, 1,
- PyDoc_STR("(PixPatHandle fillPattern) -> (PixPatHandle _rv)")},
- {"GetPortPenSize", (PyCFunction)GrafObj_GetPortPenSize, 1,
- PyDoc_STR("(Point penSize) -> (Point penSize)")},
- {"GetPortPenMode", (PyCFunction)GrafObj_GetPortPenMode, 1,
- PyDoc_STR("() -> (SInt32 _rv)")},
- {"GetPortPenLocation", (PyCFunction)GrafObj_GetPortPenLocation, 1,
- PyDoc_STR("(Point penLocation) -> (Point penLocation)")},
- {"IsPortRegionBeingDefined", (PyCFunction)GrafObj_IsPortRegionBeingDefined, 1,
- PyDoc_STR("() -> (Boolean _rv)")},
- {"IsPortPictureBeingDefined", (PyCFunction)GrafObj_IsPortPictureBeingDefined, 1,
- PyDoc_STR("() -> (Boolean _rv)")},
- {"IsPortPolyBeingDefined", (PyCFunction)GrafObj_IsPortPolyBeingDefined, 1,
- PyDoc_STR("() -> (Boolean _rv)")},
- {"IsPortOffscreen", (PyCFunction)GrafObj_IsPortOffscreen, 1,
- PyDoc_STR("() -> (Boolean _rv)")},
- {"IsPortColor", (PyCFunction)GrafObj_IsPortColor, 1,
- PyDoc_STR("() -> (Boolean _rv)")},
- {"IsPortVisibleRegionEmpty", (PyCFunction)GrafObj_IsPortVisibleRegionEmpty, 1,
- PyDoc_STR("() -> (Boolean _rv)")},
- {"IsPortClipRegionEmpty", (PyCFunction)GrafObj_IsPortClipRegionEmpty, 1,
- PyDoc_STR("() -> (Boolean _rv)")},
- {"SectRegionWithPortClipRegion", (PyCFunction)GrafObj_SectRegionWithPortClipRegion, 1,
- PyDoc_STR("(RgnHandle ioRegion) -> None")},
- {"SectRegionWithPortVisibleRegion", (PyCFunction)GrafObj_SectRegionWithPortVisibleRegion, 1,
- PyDoc_STR("(RgnHandle ioRegion) -> None")},
- {"SwapPortPicSaveHandle", (PyCFunction)GrafObj_SwapPortPicSaveHandle, 1,
- PyDoc_STR("(Handle inPicSaveHdl) -> (Handle _rv)")},
- {"SwapPortPolySaveHandle", (PyCFunction)GrafObj_SwapPortPolySaveHandle, 1,
- PyDoc_STR("(Handle inPolySaveHdl) -> (Handle _rv)")},
- {"SwapPortRegionSaveHandle", (PyCFunction)GrafObj_SwapPortRegionSaveHandle, 1,
- PyDoc_STR("(Handle inRegionSaveHdl) -> (Handle _rv)")},
- {"SetPortBounds", (PyCFunction)GrafObj_SetPortBounds, 1,
- PyDoc_STR("(Rect rect) -> None")},
- {"SetPortOpColor", (PyCFunction)GrafObj_SetPortOpColor, 1,
- PyDoc_STR("(RGBColor opColor) -> None")},
- {"SetPortTextFont", (PyCFunction)GrafObj_SetPortTextFont, 1,
- PyDoc_STR("(short txFont) -> None")},
- {"SetPortTextSize", (PyCFunction)GrafObj_SetPortTextSize, 1,
- PyDoc_STR("(short txSize) -> None")},
- {"SetPortTextFace", (PyCFunction)GrafObj_SetPortTextFace, 1,
- PyDoc_STR("(StyleParameter face) -> None")},
- {"SetPortTextMode", (PyCFunction)GrafObj_SetPortTextMode, 1,
- PyDoc_STR("(short mode) -> None")},
- {"SetPortVisibleRegion", (PyCFunction)GrafObj_SetPortVisibleRegion, 1,
- PyDoc_STR("(RgnHandle visRgn) -> None")},
- {"SetPortClipRegion", (PyCFunction)GrafObj_SetPortClipRegion, 1,
- PyDoc_STR("(RgnHandle clipRgn) -> None")},
- {"SetPortPenPixPat", (PyCFunction)GrafObj_SetPortPenPixPat, 1,
- PyDoc_STR("(PixPatHandle penPattern) -> None")},
- {"SetPortFillPixPat", (PyCFunction)GrafObj_SetPortFillPixPat, 1,
- PyDoc_STR("(PixPatHandle penPattern) -> None")},
- {"SetPortBackPixPat", (PyCFunction)GrafObj_SetPortBackPixPat, 1,
- PyDoc_STR("(PixPatHandle backPattern) -> None")},
- {"SetPortPenSize", (PyCFunction)GrafObj_SetPortPenSize, 1,
- PyDoc_STR("(Point penSize) -> None")},
- {"SetPortPenMode", (PyCFunction)GrafObj_SetPortPenMode, 1,
- PyDoc_STR("(SInt32 penMode) -> None")},
- {"SetPortFracHPenLocation", (PyCFunction)GrafObj_SetPortFracHPenLocation, 1,
- PyDoc_STR("(short pnLocHFrac) -> None")},
- {"DisposePort", (PyCFunction)GrafObj_DisposePort, 1,
- PyDoc_STR("() -> None")},
- {"QDLocalToGlobalPoint", (PyCFunction)GrafObj_QDLocalToGlobalPoint, 1,
- PyDoc_STR("(Point point) -> (Point point)")},
- {"QDGlobalToLocalPoint", (PyCFunction)GrafObj_QDGlobalToLocalPoint, 1,
- PyDoc_STR("(Point point) -> (Point point)")},
- {"QDLocalToGlobalRect", (PyCFunction)GrafObj_QDLocalToGlobalRect, 1,
- PyDoc_STR("() -> (Rect bounds)")},
- {"QDGlobalToLocalRect", (PyCFunction)GrafObj_QDGlobalToLocalRect, 1,
- PyDoc_STR("() -> (Rect bounds)")},
- {"QDLocalToGlobalRegion", (PyCFunction)GrafObj_QDLocalToGlobalRegion, 1,
- PyDoc_STR("(RgnHandle region) -> (RgnHandle _rv)")},
- {"QDGlobalToLocalRegion", (PyCFunction)GrafObj_QDGlobalToLocalRegion, 1,
- PyDoc_STR("(RgnHandle region) -> (RgnHandle _rv)")},
- {"QDIsPortBuffered", (PyCFunction)GrafObj_QDIsPortBuffered, 1,
- PyDoc_STR("() -> (Boolean _rv)")},
- {"QDIsPortBufferDirty", (PyCFunction)GrafObj_QDIsPortBufferDirty, 1,
- PyDoc_STR("() -> (Boolean _rv)")},
- {"QDFlushPortBuffer", (PyCFunction)GrafObj_QDFlushPortBuffer, 1,
- PyDoc_STR("(RgnHandle region) -> None")},
- {"QDGetDirtyRegion", (PyCFunction)GrafObj_QDGetDirtyRegion, 1,
- PyDoc_STR("(RgnHandle rgn) -> None")},
- {"QDSetDirtyRegion", (PyCFunction)GrafObj_QDSetDirtyRegion, 1,
- PyDoc_STR("(RgnHandle rgn) -> None")},
- {NULL, NULL, 0}
+ {"MacSetPort", (PyCFunction)GrafObj_MacSetPort, 1,
+ PyDoc_STR("() -> None")},
+ {"QDSwapPort", (PyCFunction)GrafObj_QDSwapPort, 1,
+ PyDoc_STR("() -> (Boolean _rv, CGrafPtr outOldPort)")},
+ {"IsValidPort", (PyCFunction)GrafObj_IsValidPort, 1,
+ PyDoc_STR("() -> (Boolean _rv)")},
+ {"GetPortPixMap", (PyCFunction)GrafObj_GetPortPixMap, 1,
+ PyDoc_STR("() -> (PixMapHandle _rv)")},
+ {"GetPortBitMapForCopyBits", (PyCFunction)GrafObj_GetPortBitMapForCopyBits, 1,
+ PyDoc_STR("() -> (const BitMap * _rv)")},
+ {"GetPortBounds", (PyCFunction)GrafObj_GetPortBounds, 1,
+ PyDoc_STR("() -> (Rect rect)")},
+ {"GetPortForeColor", (PyCFunction)GrafObj_GetPortForeColor, 1,
+ PyDoc_STR("() -> (RGBColor foreColor)")},
+ {"GetPortBackColor", (PyCFunction)GrafObj_GetPortBackColor, 1,
+ PyDoc_STR("() -> (RGBColor backColor)")},
+ {"GetPortOpColor", (PyCFunction)GrafObj_GetPortOpColor, 1,
+ PyDoc_STR("() -> (RGBColor opColor)")},
+ {"GetPortHiliteColor", (PyCFunction)GrafObj_GetPortHiliteColor, 1,
+ PyDoc_STR("() -> (RGBColor hiliteColor)")},
+ {"GetPortTextFont", (PyCFunction)GrafObj_GetPortTextFont, 1,
+ PyDoc_STR("() -> (short _rv)")},
+ {"GetPortTextFace", (PyCFunction)GrafObj_GetPortTextFace, 1,
+ PyDoc_STR("() -> (Style _rv)")},
+ {"GetPortTextMode", (PyCFunction)GrafObj_GetPortTextMode, 1,
+ PyDoc_STR("() -> (short _rv)")},
+ {"GetPortTextSize", (PyCFunction)GrafObj_GetPortTextSize, 1,
+ PyDoc_STR("() -> (short _rv)")},
+ {"GetPortChExtra", (PyCFunction)GrafObj_GetPortChExtra, 1,
+ PyDoc_STR("() -> (short _rv)")},
+ {"GetPortFracHPenLocation", (PyCFunction)GrafObj_GetPortFracHPenLocation, 1,
+ PyDoc_STR("() -> (short _rv)")},
+ {"GetPortSpExtra", (PyCFunction)GrafObj_GetPortSpExtra, 1,
+ PyDoc_STR("() -> (Fixed _rv)")},
+ {"GetPortPenVisibility", (PyCFunction)GrafObj_GetPortPenVisibility, 1,
+ PyDoc_STR("() -> (short _rv)")},
+ {"GetPortVisibleRegion", (PyCFunction)GrafObj_GetPortVisibleRegion, 1,
+ PyDoc_STR("(RgnHandle visRgn) -> (RgnHandle _rv)")},
+ {"GetPortClipRegion", (PyCFunction)GrafObj_GetPortClipRegion, 1,
+ PyDoc_STR("(RgnHandle clipRgn) -> (RgnHandle _rv)")},
+ {"GetPortBackPixPat", (PyCFunction)GrafObj_GetPortBackPixPat, 1,
+ PyDoc_STR("(PixPatHandle backPattern) -> (PixPatHandle _rv)")},
+ {"GetPortPenPixPat", (PyCFunction)GrafObj_GetPortPenPixPat, 1,
+ PyDoc_STR("(PixPatHandle penPattern) -> (PixPatHandle _rv)")},
+ {"GetPortFillPixPat", (PyCFunction)GrafObj_GetPortFillPixPat, 1,
+ PyDoc_STR("(PixPatHandle fillPattern) -> (PixPatHandle _rv)")},
+ {"GetPortPenSize", (PyCFunction)GrafObj_GetPortPenSize, 1,
+ PyDoc_STR("(Point penSize) -> (Point penSize)")},
+ {"GetPortPenMode", (PyCFunction)GrafObj_GetPortPenMode, 1,
+ PyDoc_STR("() -> (SInt32 _rv)")},
+ {"GetPortPenLocation", (PyCFunction)GrafObj_GetPortPenLocation, 1,
+ PyDoc_STR("(Point penLocation) -> (Point penLocation)")},
+ {"IsPortRegionBeingDefined", (PyCFunction)GrafObj_IsPortRegionBeingDefined, 1,
+ PyDoc_STR("() -> (Boolean _rv)")},
+ {"IsPortPictureBeingDefined", (PyCFunction)GrafObj_IsPortPictureBeingDefined, 1,
+ PyDoc_STR("() -> (Boolean _rv)")},
+ {"IsPortPolyBeingDefined", (PyCFunction)GrafObj_IsPortPolyBeingDefined, 1,
+ PyDoc_STR("() -> (Boolean _rv)")},
+ {"IsPortOffscreen", (PyCFunction)GrafObj_IsPortOffscreen, 1,
+ PyDoc_STR("() -> (Boolean _rv)")},
+ {"IsPortColor", (PyCFunction)GrafObj_IsPortColor, 1,
+ PyDoc_STR("() -> (Boolean _rv)")},
+ {"IsPortVisibleRegionEmpty", (PyCFunction)GrafObj_IsPortVisibleRegionEmpty, 1,
+ PyDoc_STR("() -> (Boolean _rv)")},
+ {"IsPortClipRegionEmpty", (PyCFunction)GrafObj_IsPortClipRegionEmpty, 1,
+ PyDoc_STR("() -> (Boolean _rv)")},
+ {"SectRegionWithPortClipRegion", (PyCFunction)GrafObj_SectRegionWithPortClipRegion, 1,
+ PyDoc_STR("(RgnHandle ioRegion) -> None")},
+ {"SectRegionWithPortVisibleRegion", (PyCFunction)GrafObj_SectRegionWithPortVisibleRegion, 1,
+ PyDoc_STR("(RgnHandle ioRegion) -> None")},
+ {"SwapPortPicSaveHandle", (PyCFunction)GrafObj_SwapPortPicSaveHandle, 1,
+ PyDoc_STR("(Handle inPicSaveHdl) -> (Handle _rv)")},
+ {"SwapPortPolySaveHandle", (PyCFunction)GrafObj_SwapPortPolySaveHandle, 1,
+ PyDoc_STR("(Handle inPolySaveHdl) -> (Handle _rv)")},
+ {"SwapPortRegionSaveHandle", (PyCFunction)GrafObj_SwapPortRegionSaveHandle, 1,
+ PyDoc_STR("(Handle inRegionSaveHdl) -> (Handle _rv)")},
+ {"SetPortBounds", (PyCFunction)GrafObj_SetPortBounds, 1,
+ PyDoc_STR("(Rect rect) -> None")},
+ {"SetPortOpColor", (PyCFunction)GrafObj_SetPortOpColor, 1,
+ PyDoc_STR("(RGBColor opColor) -> None")},
+ {"SetPortTextFont", (PyCFunction)GrafObj_SetPortTextFont, 1,
+ PyDoc_STR("(short txFont) -> None")},
+ {"SetPortTextSize", (PyCFunction)GrafObj_SetPortTextSize, 1,
+ PyDoc_STR("(short txSize) -> None")},
+ {"SetPortTextFace", (PyCFunction)GrafObj_SetPortTextFace, 1,
+ PyDoc_STR("(StyleParameter face) -> None")},
+ {"SetPortTextMode", (PyCFunction)GrafObj_SetPortTextMode, 1,
+ PyDoc_STR("(short mode) -> None")},
+ {"SetPortVisibleRegion", (PyCFunction)GrafObj_SetPortVisibleRegion, 1,
+ PyDoc_STR("(RgnHandle visRgn) -> None")},
+ {"SetPortClipRegion", (PyCFunction)GrafObj_SetPortClipRegion, 1,
+ PyDoc_STR("(RgnHandle clipRgn) -> None")},
+ {"SetPortPenPixPat", (PyCFunction)GrafObj_SetPortPenPixPat, 1,
+ PyDoc_STR("(PixPatHandle penPattern) -> None")},
+ {"SetPortFillPixPat", (PyCFunction)GrafObj_SetPortFillPixPat, 1,
+ PyDoc_STR("(PixPatHandle penPattern) -> None")},
+ {"SetPortBackPixPat", (PyCFunction)GrafObj_SetPortBackPixPat, 1,
+ PyDoc_STR("(PixPatHandle backPattern) -> None")},
+ {"SetPortPenSize", (PyCFunction)GrafObj_SetPortPenSize, 1,
+ PyDoc_STR("(Point penSize) -> None")},
+ {"SetPortPenMode", (PyCFunction)GrafObj_SetPortPenMode, 1,
+ PyDoc_STR("(SInt32 penMode) -> None")},
+ {"SetPortFracHPenLocation", (PyCFunction)GrafObj_SetPortFracHPenLocation, 1,
+ PyDoc_STR("(short pnLocHFrac) -> None")},
+ {"DisposePort", (PyCFunction)GrafObj_DisposePort, 1,
+ PyDoc_STR("() -> None")},
+ {"QDLocalToGlobalPoint", (PyCFunction)GrafObj_QDLocalToGlobalPoint, 1,
+ PyDoc_STR("(Point point) -> (Point point)")},
+ {"QDGlobalToLocalPoint", (PyCFunction)GrafObj_QDGlobalToLocalPoint, 1,
+ PyDoc_STR("(Point point) -> (Point point)")},
+ {"QDLocalToGlobalRect", (PyCFunction)GrafObj_QDLocalToGlobalRect, 1,
+ PyDoc_STR("() -> (Rect bounds)")},
+ {"QDGlobalToLocalRect", (PyCFunction)GrafObj_QDGlobalToLocalRect, 1,
+ PyDoc_STR("() -> (Rect bounds)")},
+ {"QDLocalToGlobalRegion", (PyCFunction)GrafObj_QDLocalToGlobalRegion, 1,
+ PyDoc_STR("(RgnHandle region) -> (RgnHandle _rv)")},
+ {"QDGlobalToLocalRegion", (PyCFunction)GrafObj_QDGlobalToLocalRegion, 1,
+ PyDoc_STR("(RgnHandle region) -> (RgnHandle _rv)")},
+ {"QDIsPortBuffered", (PyCFunction)GrafObj_QDIsPortBuffered, 1,
+ PyDoc_STR("() -> (Boolean _rv)")},
+ {"QDIsPortBufferDirty", (PyCFunction)GrafObj_QDIsPortBufferDirty, 1,
+ PyDoc_STR("() -> (Boolean _rv)")},
+ {"QDFlushPortBuffer", (PyCFunction)GrafObj_QDFlushPortBuffer, 1,
+ PyDoc_STR("(RgnHandle region) -> None")},
+ {"QDGetDirtyRegion", (PyCFunction)GrafObj_QDGetDirtyRegion, 1,
+ PyDoc_STR("(RgnHandle rgn) -> None")},
+ {"QDSetDirtyRegion", (PyCFunction)GrafObj_QDSetDirtyRegion, 1,
+ PyDoc_STR("(RgnHandle rgn) -> None")},
+ {NULL, NULL, 0}
};
static PyObject *GrafObj_get_visRgn(GrafPortObject *self, void *closure)
{
- RgnHandle h=NewRgn(); /* XXXX wrong dispose routine */
- return Py_BuildValue("O&", ResObj_New, (Handle)GetPortVisibleRegion(self->ob_itself, h));
-
+ RgnHandle h=NewRgn(); /* XXXX wrong dispose routine */
+ return Py_BuildValue("O&", ResObj_New, (Handle)GetPortVisibleRegion(self->ob_itself, h));
+
}
#define GrafObj_set_visRgn NULL
static PyObject *GrafObj_get_clipRgn(GrafPortObject *self, void *closure)
{
- RgnHandle h=NewRgn(); /* XXXX wrong dispose routine */
- return Py_BuildValue("O&", ResObj_New, (Handle)GetPortClipRegion(self->ob_itself, h));
-
+ RgnHandle h=NewRgn(); /* XXXX wrong dispose routine */
+ return Py_BuildValue("O&", ResObj_New, (Handle)GetPortClipRegion(self->ob_itself, h));
+
}
#define GrafObj_set_clipRgn NULL
static PyGetSetDef GrafObj_getsetlist[] = {
- {"visRgn", (getter)GrafObj_get_visRgn, (setter)GrafObj_set_visRgn, "Convenience attribute: return a copy of the visible region"},
- {"clipRgn", (getter)GrafObj_get_clipRgn, (setter)GrafObj_set_clipRgn, "Convenience attribute: return a copy of the clipping region"},
- {NULL, NULL, NULL, NULL},
+ {"visRgn", (getter)GrafObj_get_visRgn, (setter)GrafObj_set_visRgn, "Convenience attribute: return a copy of the visible region"},
+ {"clipRgn", (getter)GrafObj_get_clipRgn, (setter)GrafObj_set_clipRgn, "Convenience attribute: return a copy of the clipping region"},
+ {NULL, NULL, NULL, NULL},
};
@@ -1345,61 +1345,61 @@ static PyGetSetDef GrafObj_getsetlist[] = {
static PyObject *GrafObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
- PyObject *_self;
- GrafPtr itself;
- char *kw[] = {"itself", 0};
+ 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;
+ 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 = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
- "_Qd.GrafPort", /*tp_name*/
- sizeof(GrafPortObject), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- /* methods */
- (destructor) GrafObj_dealloc, /*tp_dealloc*/
- 0, /*tp_print*/
- (getattrfunc)0, /*tp_getattr*/
- (setattrfunc)0, /*tp_setattr*/
- (cmpfunc) GrafObj_compare, /*tp_compare*/
- (reprfunc) GrafObj_repr, /*tp_repr*/
- (PyNumberMethods *)0, /* tp_as_number */
- (PySequenceMethods *)0, /* tp_as_sequence */
- (PyMappingMethods *)0, /* tp_as_mapping */
- (hashfunc) GrafObj_hash, /*tp_hash*/
- 0, /*tp_call*/
- 0, /*tp_str*/
- PyObject_GenericGetAttr, /*tp_getattro*/
- PyObject_GenericSetAttr, /*tp_setattro */
- 0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
- 0, /*tp_doc*/
- 0, /*tp_traverse*/
- 0, /*tp_clear*/
- 0, /*tp_richcompare*/
- 0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
- 0, /*tp_iternext*/
- GrafObj_methods, /* tp_methods */
- 0, /*tp_members*/
- GrafObj_getsetlist, /*tp_getset*/
- 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 */
+ PyObject_HEAD_INIT(NULL)
+ 0, /*ob_size*/
+ "_Qd.GrafPort", /*tp_name*/
+ sizeof(GrafPortObject), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ /* methods */
+ (destructor) GrafObj_dealloc, /*tp_dealloc*/
+ 0, /*tp_print*/
+ (getattrfunc)0, /*tp_getattr*/
+ (setattrfunc)0, /*tp_setattr*/
+ (cmpfunc) GrafObj_compare, /*tp_compare*/
+ (reprfunc) GrafObj_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) GrafObj_hash, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ PyObject_GenericGetAttr, /*tp_getattro*/
+ PyObject_GenericSetAttr, /*tp_setattro */
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
+ 0, /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ GrafObj_methods, /* tp_methods */
+ 0, /*tp_members*/
+ GrafObj_getsetlist, /*tp_getset*/
+ 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 -------------------- */
@@ -1412,124 +1412,124 @@ PyTypeObject BitMap_Type;
#define BMObj_Check(x) ((x)->ob_type == &BitMap_Type || PyObject_TypeCheck((x), &BitMap_Type))
typedef struct BitMapObject {
- PyObject_HEAD
- BitMapPtr ob_itself;
- PyObject *referred_object;
- BitMap *referred_bitmap;
+ PyObject_HEAD
+ BitMapPtr ob_itself;
+ PyObject *referred_object;
+ BitMap *referred_bitmap;
} BitMapObject;
PyObject *BMObj_New(BitMapPtr itself)
{
- BitMapObject *it;
- if (itself == NULL) return PyMac_Error(resNotFound);
- it = PyObject_NEW(BitMapObject, &BitMap_Type);
- if (it == NULL) return NULL;
- it->ob_itself = itself;
- it->referred_object = NULL;
- it->referred_bitmap = NULL;
- return (PyObject *)it;
+ BitMapObject *it;
+ if (itself == NULL) return PyMac_Error(resNotFound);
+ it = PyObject_NEW(BitMapObject, &BitMap_Type);
+ if (it == NULL) return NULL;
+ it->ob_itself = itself;
+ it->referred_object = NULL;
+ it->referred_bitmap = NULL;
+ return (PyObject *)it;
}
int BMObj_Convert(PyObject *v, BitMapPtr *p_itself)
{
- if (!BMObj_Check(v))
- {
- PyErr_SetString(PyExc_TypeError, "BitMap required");
- return 0;
- }
- *p_itself = ((BitMapObject *)v)->ob_itself;
- return 1;
+ if (!BMObj_Check(v))
+ {
+ PyErr_SetString(PyExc_TypeError, "BitMap required");
+ return 0;
+ }
+ *p_itself = ((BitMapObject *)v)->ob_itself;
+ return 1;
}
static void BMObj_dealloc(BitMapObject *self)
{
- Py_XDECREF(self->referred_object);
- if (self->referred_bitmap) free(self->referred_bitmap);
- self->ob_type->tp_free((PyObject *)self);
+ Py_XDECREF(self->referred_object);
+ if (self->referred_bitmap) free(self->referred_bitmap);
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *BMObj_getdata(BitMapObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
- int from, length;
- char *cp;
+ int from, length;
+ char *cp;
- if ( !PyArg_ParseTuple(_args, "ii", &from, &length) )
- return NULL;
- cp = _self->ob_itself->baseAddr+from;
- _res = PyString_FromStringAndSize(cp, length);
- return _res;
+ if ( !PyArg_ParseTuple(_args, "ii", &from, &length) )
+ return NULL;
+ cp = _self->ob_itself->baseAddr+from;
+ _res = PyString_FromStringAndSize(cp, length);
+ return _res;
}
static PyObject *BMObj_putdata(BitMapObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
- int from, length;
- char *cp, *icp;
+ int from, length;
+ char *cp, *icp;
- if ( !PyArg_ParseTuple(_args, "is#", &from, &icp, &length) )
- return NULL;
- cp = _self->ob_itself->baseAddr+from;
- memcpy(cp, icp, length);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if ( !PyArg_ParseTuple(_args, "is#", &from, &icp, &length) )
+ return NULL;
+ cp = _self->ob_itself->baseAddr+from;
+ memcpy(cp, icp, length);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyMethodDef BMObj_methods[] = {
- {"getdata", (PyCFunction)BMObj_getdata, 1,
- PyDoc_STR("(int start, int size) -> string. Return bytes from the bitmap")},
- {"putdata", (PyCFunction)BMObj_putdata, 1,
- PyDoc_STR("(int start, string data). Store bytes into the bitmap")},
- {NULL, NULL, 0}
+ {"getdata", (PyCFunction)BMObj_getdata, 1,
+ PyDoc_STR("(int start, int size) -> string. Return bytes from the bitmap")},
+ {"putdata", (PyCFunction)BMObj_putdata, 1,
+ PyDoc_STR("(int start, string data). Store bytes into the bitmap")},
+ {NULL, NULL, 0}
};
static PyObject *BMObj_get_baseAddr(BitMapObject *self, void *closure)
{
- return PyInt_FromLong((long)self->ob_itself->baseAddr);
+ return PyInt_FromLong((long)self->ob_itself->baseAddr);
}
#define BMObj_set_baseAddr NULL
static PyObject *BMObj_get_rowBytes(BitMapObject *self, void *closure)
{
- return PyInt_FromLong((long)self->ob_itself->rowBytes);
+ return PyInt_FromLong((long)self->ob_itself->rowBytes);
}
#define BMObj_set_rowBytes NULL
static PyObject *BMObj_get_bounds(BitMapObject *self, void *closure)
{
- return Py_BuildValue("O&", PyMac_BuildRect, &self->ob_itself->bounds);
+ return Py_BuildValue("O&", PyMac_BuildRect, &self->ob_itself->bounds);
}
#define BMObj_set_bounds NULL
static PyObject *BMObj_get_bitmap_data(BitMapObject *self, void *closure)
{
- return PyString_FromStringAndSize((char *)self->ob_itself, sizeof(BitMap));
+ return PyString_FromStringAndSize((char *)self->ob_itself, sizeof(BitMap));
}
#define BMObj_set_bitmap_data NULL
static PyObject *BMObj_get_pixmap_data(BitMapObject *self, void *closure)
{
- return PyString_FromStringAndSize((char *)self->ob_itself, sizeof(PixMap));
+ return PyString_FromStringAndSize((char *)self->ob_itself, sizeof(PixMap));
}
#define BMObj_set_pixmap_data NULL
static PyGetSetDef BMObj_getsetlist[] = {
- {"baseAddr", (getter)BMObj_get_baseAddr, (setter)BMObj_set_baseAddr, NULL},
- {"rowBytes", (getter)BMObj_get_rowBytes, (setter)BMObj_set_rowBytes, NULL},
- {"bounds", (getter)BMObj_get_bounds, (setter)BMObj_set_bounds, NULL},
- {"bitmap_data", (getter)BMObj_get_bitmap_data, (setter)BMObj_set_bitmap_data, NULL},
- {"pixmap_data", (getter)BMObj_get_pixmap_data, (setter)BMObj_set_pixmap_data, NULL},
- {NULL, NULL, NULL, NULL},
+ {"baseAddr", (getter)BMObj_get_baseAddr, (setter)BMObj_set_baseAddr, NULL},
+ {"rowBytes", (getter)BMObj_get_rowBytes, (setter)BMObj_set_rowBytes, NULL},
+ {"bounds", (getter)BMObj_get_bounds, (setter)BMObj_set_bounds, NULL},
+ {"bitmap_data", (getter)BMObj_get_bitmap_data, (setter)BMObj_set_bitmap_data, NULL},
+ {"pixmap_data", (getter)BMObj_get_pixmap_data, (setter)BMObj_set_pixmap_data, NULL},
+ {NULL, NULL, NULL, NULL},
};
@@ -1544,61 +1544,61 @@ static PyGetSetDef BMObj_getsetlist[] = {
static PyObject *BMObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
- PyObject *_self;
- BitMapPtr itself;
- char *kw[] = {"itself", 0};
+ 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;
+ 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 = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
- "_Qd.BitMap", /*tp_name*/
- sizeof(BitMapObject), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- /* methods */
- (destructor) BMObj_dealloc, /*tp_dealloc*/
- 0, /*tp_print*/
- (getattrfunc)0, /*tp_getattr*/
- (setattrfunc)0, /*tp_setattr*/
- (cmpfunc) BMObj_compare, /*tp_compare*/
- (reprfunc) BMObj_repr, /*tp_repr*/
- (PyNumberMethods *)0, /* tp_as_number */
- (PySequenceMethods *)0, /* tp_as_sequence */
- (PyMappingMethods *)0, /* tp_as_mapping */
- (hashfunc) BMObj_hash, /*tp_hash*/
- 0, /*tp_call*/
- 0, /*tp_str*/
- PyObject_GenericGetAttr, /*tp_getattro*/
- PyObject_GenericSetAttr, /*tp_setattro */
- 0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
- 0, /*tp_doc*/
- 0, /*tp_traverse*/
- 0, /*tp_clear*/
- 0, /*tp_richcompare*/
- 0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
- 0, /*tp_iternext*/
- BMObj_methods, /* tp_methods */
- 0, /*tp_members*/
- BMObj_getsetlist, /*tp_getset*/
- 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 */
+ PyObject_HEAD_INIT(NULL)
+ 0, /*ob_size*/
+ "_Qd.BitMap", /*tp_name*/
+ sizeof(BitMapObject), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ /* methods */
+ (destructor) BMObj_dealloc, /*tp_dealloc*/
+ 0, /*tp_print*/
+ (getattrfunc)0, /*tp_getattr*/
+ (setattrfunc)0, /*tp_setattr*/
+ (cmpfunc) BMObj_compare, /*tp_compare*/
+ (reprfunc) BMObj_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) BMObj_hash, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ PyObject_GenericGetAttr, /*tp_getattro*/
+ PyObject_GenericSetAttr, /*tp_setattro */
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
+ 0, /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ BMObj_methods, /* tp_methods */
+ 0, /*tp_members*/
+ BMObj_getsetlist, /*tp_getset*/
+ 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 --------------------- */
@@ -1606,5485 +1606,5485 @@ PyTypeObject BitMap_Type = {
static PyObject *Qd_GetPort(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- GrafPtr port;
+ PyObject *_res = NULL;
+ GrafPtr port;
#ifndef GetPort
- PyMac_PRECHECK(GetPort);
+ PyMac_PRECHECK(GetPort);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- GetPort(&port);
- _res = Py_BuildValue("O&",
- GrafObj_New, port);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ GetPort(&port);
+ _res = Py_BuildValue("O&",
+ GrafObj_New, port);
+ return _res;
}
static PyObject *Qd_GrafDevice(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short device;
+ PyObject *_res = NULL;
+ short device;
#ifndef GrafDevice
- PyMac_PRECHECK(GrafDevice);
+ PyMac_PRECHECK(GrafDevice);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &device))
- return NULL;
- GrafDevice(device);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &device))
+ return NULL;
+ GrafDevice(device);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_SetPortBits(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- BitMapPtr bm;
+ PyObject *_res = NULL;
+ BitMapPtr bm;
#ifndef SetPortBits
- PyMac_PRECHECK(SetPortBits);
+ PyMac_PRECHECK(SetPortBits);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- BMObj_Convert, &bm))
- return NULL;
- SetPortBits(bm);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ BMObj_Convert, &bm))
+ return NULL;
+ SetPortBits(bm);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_PortSize(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short width;
- short height;
+ PyObject *_res = NULL;
+ short width;
+ short height;
#ifndef PortSize
- PyMac_PRECHECK(PortSize);
+ PyMac_PRECHECK(PortSize);
#endif
- if (!PyArg_ParseTuple(_args, "hh",
- &width,
- &height))
- return NULL;
- PortSize(width,
- height);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "hh",
+ &width,
+ &height))
+ return NULL;
+ PortSize(width,
+ height);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_MovePortTo(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short leftGlobal;
- short topGlobal;
+ PyObject *_res = NULL;
+ short leftGlobal;
+ short topGlobal;
#ifndef MovePortTo
- PyMac_PRECHECK(MovePortTo);
+ PyMac_PRECHECK(MovePortTo);
#endif
- if (!PyArg_ParseTuple(_args, "hh",
- &leftGlobal,
- &topGlobal))
- return NULL;
- MovePortTo(leftGlobal,
- topGlobal);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "hh",
+ &leftGlobal,
+ &topGlobal))
+ return NULL;
+ MovePortTo(leftGlobal,
+ topGlobal);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_SetOrigin(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short h;
- short v;
+ PyObject *_res = NULL;
+ short h;
+ short v;
#ifndef SetOrigin
- PyMac_PRECHECK(SetOrigin);
+ PyMac_PRECHECK(SetOrigin);
#endif
- if (!PyArg_ParseTuple(_args, "hh",
- &h,
- &v))
- return NULL;
- SetOrigin(h,
- v);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "hh",
+ &h,
+ &v))
+ return NULL;
+ SetOrigin(h,
+ v);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_SetClip(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RgnHandle rgn;
+ PyObject *_res = NULL;
+ RgnHandle rgn;
#ifndef SetClip
- PyMac_PRECHECK(SetClip);
+ PyMac_PRECHECK(SetClip);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &rgn))
- return NULL;
- SetClip(rgn);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &rgn))
+ return NULL;
+ SetClip(rgn);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_GetClip(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RgnHandle rgn;
+ PyObject *_res = NULL;
+ RgnHandle rgn;
#ifndef GetClip
- PyMac_PRECHECK(GetClip);
+ PyMac_PRECHECK(GetClip);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &rgn))
- return NULL;
- GetClip(rgn);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &rgn))
+ return NULL;
+ GetClip(rgn);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_ClipRect(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Rect r;
+ PyObject *_res = NULL;
+ Rect r;
#ifndef ClipRect
- PyMac_PRECHECK(ClipRect);
+ PyMac_PRECHECK(ClipRect);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetRect, &r))
- return NULL;
- ClipRect(&r);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetRect, &r))
+ return NULL;
+ ClipRect(&r);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_BackPat(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Pattern *pat__in__;
- int pat__in_len__;
+ PyObject *_res = NULL;
+ Pattern *pat__in__;
+ int pat__in_len__;
#ifndef BackPat
- PyMac_PRECHECK(BackPat);
-#endif
- if (!PyArg_ParseTuple(_args, "s#",
- (char **)&pat__in__, &pat__in_len__))
- return NULL;
- if (pat__in_len__ != sizeof(Pattern))
- {
- PyErr_SetString(PyExc_TypeError, "buffer length should be sizeof(Pattern)");
- goto pat__error__;
- }
- BackPat(pat__in__);
- Py_INCREF(Py_None);
- _res = Py_None;
+ PyMac_PRECHECK(BackPat);
+#endif
+ if (!PyArg_ParseTuple(_args, "s#",
+ (char **)&pat__in__, &pat__in_len__))
+ return NULL;
+ if (pat__in_len__ != sizeof(Pattern))
+ {
+ PyErr_SetString(PyExc_TypeError, "buffer length should be sizeof(Pattern)");
+ goto pat__error__;
+ }
+ BackPat(pat__in__);
+ Py_INCREF(Py_None);
+ _res = Py_None;
pat__error__: ;
- return _res;
+ return _res;
}
static PyObject *Qd_InitCursor(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef InitCursor
- PyMac_PRECHECK(InitCursor);
+ PyMac_PRECHECK(InitCursor);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- InitCursor();
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ InitCursor();
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_MacSetCursor(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Cursor *crsr__in__;
- int crsr__in_len__;
+ PyObject *_res = NULL;
+ Cursor *crsr__in__;
+ int crsr__in_len__;
#ifndef MacSetCursor
- PyMac_PRECHECK(MacSetCursor);
-#endif
- if (!PyArg_ParseTuple(_args, "s#",
- (char **)&crsr__in__, &crsr__in_len__))
- return NULL;
- if (crsr__in_len__ != sizeof(Cursor))
- {
- PyErr_SetString(PyExc_TypeError, "buffer length should be sizeof(Cursor)");
- goto crsr__error__;
- }
- MacSetCursor(crsr__in__);
- Py_INCREF(Py_None);
- _res = Py_None;
+ PyMac_PRECHECK(MacSetCursor);
+#endif
+ if (!PyArg_ParseTuple(_args, "s#",
+ (char **)&crsr__in__, &crsr__in_len__))
+ return NULL;
+ if (crsr__in_len__ != sizeof(Cursor))
+ {
+ PyErr_SetString(PyExc_TypeError, "buffer length should be sizeof(Cursor)");
+ goto crsr__error__;
+ }
+ MacSetCursor(crsr__in__);
+ Py_INCREF(Py_None);
+ _res = Py_None;
crsr__error__: ;
- return _res;
+ return _res;
}
static PyObject *Qd_HideCursor(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef HideCursor
- PyMac_PRECHECK(HideCursor);
+ PyMac_PRECHECK(HideCursor);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- HideCursor();
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ HideCursor();
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_MacShowCursor(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef MacShowCursor
- PyMac_PRECHECK(MacShowCursor);
+ PyMac_PRECHECK(MacShowCursor);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- MacShowCursor();
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ MacShowCursor();
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_ObscureCursor(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef ObscureCursor
- PyMac_PRECHECK(ObscureCursor);
+ PyMac_PRECHECK(ObscureCursor);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- ObscureCursor();
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ ObscureCursor();
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_HidePen(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef HidePen
- PyMac_PRECHECK(HidePen);
+ PyMac_PRECHECK(HidePen);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- HidePen();
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ HidePen();
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_ShowPen(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef ShowPen
- PyMac_PRECHECK(ShowPen);
+ PyMac_PRECHECK(ShowPen);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- ShowPen();
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ ShowPen();
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_GetPen(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Point pt;
+ PyObject *_res = NULL;
+ Point pt;
#ifndef GetPen
- PyMac_PRECHECK(GetPen);
+ PyMac_PRECHECK(GetPen);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- GetPen(&pt);
- _res = Py_BuildValue("O&",
- PyMac_BuildPoint, pt);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ GetPen(&pt);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildPoint, pt);
+ return _res;
}
static PyObject *Qd_GetPenState(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- PenState pnState__out__;
+ PyObject *_res = NULL;
+ PenState pnState__out__;
#ifndef GetPenState
- PyMac_PRECHECK(GetPenState);
+ PyMac_PRECHECK(GetPenState);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- GetPenState(&pnState__out__);
- _res = Py_BuildValue("s#",
- (char *)&pnState__out__, (int)sizeof(PenState));
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ GetPenState(&pnState__out__);
+ _res = Py_BuildValue("s#",
+ (char *)&pnState__out__, (int)sizeof(PenState));
+ return _res;
}
static PyObject *Qd_SetPenState(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- PenState *pnState__in__;
- int pnState__in_len__;
+ PyObject *_res = NULL;
+ PenState *pnState__in__;
+ int pnState__in_len__;
#ifndef SetPenState
- PyMac_PRECHECK(SetPenState);
-#endif
- if (!PyArg_ParseTuple(_args, "s#",
- (char **)&pnState__in__, &pnState__in_len__))
- return NULL;
- if (pnState__in_len__ != sizeof(PenState))
- {
- PyErr_SetString(PyExc_TypeError, "buffer length should be sizeof(PenState)");
- goto pnState__error__;
- }
- SetPenState(pnState__in__);
- Py_INCREF(Py_None);
- _res = Py_None;
+ PyMac_PRECHECK(SetPenState);
+#endif
+ if (!PyArg_ParseTuple(_args, "s#",
+ (char **)&pnState__in__, &pnState__in_len__))
+ return NULL;
+ if (pnState__in_len__ != sizeof(PenState))
+ {
+ PyErr_SetString(PyExc_TypeError, "buffer length should be sizeof(PenState)");
+ goto pnState__error__;
+ }
+ SetPenState(pnState__in__);
+ Py_INCREF(Py_None);
+ _res = Py_None;
pnState__error__: ;
- return _res;
+ return _res;
}
static PyObject *Qd_PenSize(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short width;
- short height;
+ PyObject *_res = NULL;
+ short width;
+ short height;
#ifndef PenSize
- PyMac_PRECHECK(PenSize);
+ PyMac_PRECHECK(PenSize);
#endif
- if (!PyArg_ParseTuple(_args, "hh",
- &width,
- &height))
- return NULL;
- PenSize(width,
- height);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "hh",
+ &width,
+ &height))
+ return NULL;
+ PenSize(width,
+ height);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_PenMode(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short mode;
+ PyObject *_res = NULL;
+ short mode;
#ifndef PenMode
- PyMac_PRECHECK(PenMode);
+ PyMac_PRECHECK(PenMode);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &mode))
- return NULL;
- PenMode(mode);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &mode))
+ return NULL;
+ PenMode(mode);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_PenPat(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Pattern *pat__in__;
- int pat__in_len__;
+ PyObject *_res = NULL;
+ Pattern *pat__in__;
+ int pat__in_len__;
#ifndef PenPat
- PyMac_PRECHECK(PenPat);
-#endif
- if (!PyArg_ParseTuple(_args, "s#",
- (char **)&pat__in__, &pat__in_len__))
- return NULL;
- if (pat__in_len__ != sizeof(Pattern))
- {
- PyErr_SetString(PyExc_TypeError, "buffer length should be sizeof(Pattern)");
- goto pat__error__;
- }
- PenPat(pat__in__);
- Py_INCREF(Py_None);
- _res = Py_None;
+ PyMac_PRECHECK(PenPat);
+#endif
+ if (!PyArg_ParseTuple(_args, "s#",
+ (char **)&pat__in__, &pat__in_len__))
+ return NULL;
+ if (pat__in_len__ != sizeof(Pattern))
+ {
+ PyErr_SetString(PyExc_TypeError, "buffer length should be sizeof(Pattern)");
+ goto pat__error__;
+ }
+ PenPat(pat__in__);
+ Py_INCREF(Py_None);
+ _res = Py_None;
pat__error__: ;
- return _res;
+ return _res;
}
static PyObject *Qd_PenNormal(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef PenNormal
- PyMac_PRECHECK(PenNormal);
+ PyMac_PRECHECK(PenNormal);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- PenNormal();
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ PenNormal();
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_MoveTo(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short h;
- short v;
+ PyObject *_res = NULL;
+ short h;
+ short v;
#ifndef MoveTo
- PyMac_PRECHECK(MoveTo);
+ PyMac_PRECHECK(MoveTo);
#endif
- if (!PyArg_ParseTuple(_args, "hh",
- &h,
- &v))
- return NULL;
- MoveTo(h,
- v);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "hh",
+ &h,
+ &v))
+ return NULL;
+ MoveTo(h,
+ v);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_Move(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short dh;
- short dv;
+ PyObject *_res = NULL;
+ short dh;
+ short dv;
#ifndef Move
- PyMac_PRECHECK(Move);
+ PyMac_PRECHECK(Move);
#endif
- if (!PyArg_ParseTuple(_args, "hh",
- &dh,
- &dv))
- return NULL;
- Move(dh,
- dv);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "hh",
+ &dh,
+ &dv))
+ return NULL;
+ Move(dh,
+ dv);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_MacLineTo(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short h;
- short v;
+ PyObject *_res = NULL;
+ short h;
+ short v;
#ifndef MacLineTo
- PyMac_PRECHECK(MacLineTo);
+ PyMac_PRECHECK(MacLineTo);
#endif
- if (!PyArg_ParseTuple(_args, "hh",
- &h,
- &v))
- return NULL;
- MacLineTo(h,
- v);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "hh",
+ &h,
+ &v))
+ return NULL;
+ MacLineTo(h,
+ v);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_Line(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short dh;
- short dv;
+ PyObject *_res = NULL;
+ short dh;
+ short dv;
#ifndef Line
- PyMac_PRECHECK(Line);
+ PyMac_PRECHECK(Line);
#endif
- if (!PyArg_ParseTuple(_args, "hh",
- &dh,
- &dv))
- return NULL;
- Line(dh,
- dv);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "hh",
+ &dh,
+ &dv))
+ return NULL;
+ Line(dh,
+ dv);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_ForeColor(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- long color;
+ PyObject *_res = NULL;
+ long color;
#ifndef ForeColor
- PyMac_PRECHECK(ForeColor);
+ PyMac_PRECHECK(ForeColor);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &color))
- return NULL;
- ForeColor(color);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &color))
+ return NULL;
+ ForeColor(color);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_BackColor(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- long color;
+ PyObject *_res = NULL;
+ long color;
#ifndef BackColor
- PyMac_PRECHECK(BackColor);
+ PyMac_PRECHECK(BackColor);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &color))
- return NULL;
- BackColor(color);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &color))
+ return NULL;
+ BackColor(color);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_ColorBit(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short whichBit;
+ PyObject *_res = NULL;
+ short whichBit;
#ifndef ColorBit
- PyMac_PRECHECK(ColorBit);
+ PyMac_PRECHECK(ColorBit);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &whichBit))
- return NULL;
- ColorBit(whichBit);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &whichBit))
+ return NULL;
+ ColorBit(whichBit);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_MacSetRect(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Rect r;
- short left;
- short top;
- short right;
- short bottom;
+ PyObject *_res = NULL;
+ Rect r;
+ short left;
+ short top;
+ short right;
+ short bottom;
#ifndef MacSetRect
- PyMac_PRECHECK(MacSetRect);
-#endif
- if (!PyArg_ParseTuple(_args, "hhhh",
- &left,
- &top,
- &right,
- &bottom))
- return NULL;
- MacSetRect(&r,
- left,
- top,
- right,
- bottom);
- _res = Py_BuildValue("O&",
- PyMac_BuildRect, &r);
- return _res;
+ PyMac_PRECHECK(MacSetRect);
+#endif
+ if (!PyArg_ParseTuple(_args, "hhhh",
+ &left,
+ &top,
+ &right,
+ &bottom))
+ return NULL;
+ MacSetRect(&r,
+ left,
+ top,
+ right,
+ bottom);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildRect, &r);
+ return _res;
}
static PyObject *Qd_MacOffsetRect(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Rect r;
- short dh;
- short dv;
+ PyObject *_res = NULL;
+ Rect r;
+ short dh;
+ short dv;
#ifndef MacOffsetRect
- PyMac_PRECHECK(MacOffsetRect);
+ PyMac_PRECHECK(MacOffsetRect);
#endif
- if (!PyArg_ParseTuple(_args, "O&hh",
- PyMac_GetRect, &r,
- &dh,
- &dv))
- return NULL;
- MacOffsetRect(&r,
- dh,
- dv);
- _res = Py_BuildValue("O&",
- PyMac_BuildRect, &r);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&hh",
+ PyMac_GetRect, &r,
+ &dh,
+ &dv))
+ return NULL;
+ MacOffsetRect(&r,
+ dh,
+ dv);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildRect, &r);
+ return _res;
}
static PyObject *Qd_MacInsetRect(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Rect r;
- short dh;
- short dv;
+ PyObject *_res = NULL;
+ Rect r;
+ short dh;
+ short dv;
#ifndef MacInsetRect
- PyMac_PRECHECK(MacInsetRect);
+ PyMac_PRECHECK(MacInsetRect);
#endif
- if (!PyArg_ParseTuple(_args, "O&hh",
- PyMac_GetRect, &r,
- &dh,
- &dv))
- return NULL;
- MacInsetRect(&r,
- dh,
- dv);
- _res = Py_BuildValue("O&",
- PyMac_BuildRect, &r);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&hh",
+ PyMac_GetRect, &r,
+ &dh,
+ &dv))
+ return NULL;
+ MacInsetRect(&r,
+ dh,
+ dv);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildRect, &r);
+ return _res;
}
static PyObject *Qd_SectRect(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- Rect src1;
- Rect src2;
- Rect dstRect;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ Rect src1;
+ Rect src2;
+ Rect dstRect;
#ifndef SectRect
- PyMac_PRECHECK(SectRect);
+ PyMac_PRECHECK(SectRect);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- PyMac_GetRect, &src1,
- PyMac_GetRect, &src2))
- return NULL;
- _rv = SectRect(&src1,
- &src2,
- &dstRect);
- _res = Py_BuildValue("bO&",
- _rv,
- PyMac_BuildRect, &dstRect);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ PyMac_GetRect, &src1,
+ PyMac_GetRect, &src2))
+ return NULL;
+ _rv = SectRect(&src1,
+ &src2,
+ &dstRect);
+ _res = Py_BuildValue("bO&",
+ _rv,
+ PyMac_BuildRect, &dstRect);
+ return _res;
}
static PyObject *Qd_MacUnionRect(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Rect src1;
- Rect src2;
- Rect dstRect;
+ PyObject *_res = NULL;
+ Rect src1;
+ Rect src2;
+ Rect dstRect;
#ifndef MacUnionRect
- PyMac_PRECHECK(MacUnionRect);
+ PyMac_PRECHECK(MacUnionRect);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- PyMac_GetRect, &src1,
- PyMac_GetRect, &src2))
- return NULL;
- MacUnionRect(&src1,
- &src2,
- &dstRect);
- _res = Py_BuildValue("O&",
- PyMac_BuildRect, &dstRect);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ PyMac_GetRect, &src1,
+ PyMac_GetRect, &src2))
+ return NULL;
+ MacUnionRect(&src1,
+ &src2,
+ &dstRect);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildRect, &dstRect);
+ return _res;
}
static PyObject *Qd_MacEqualRect(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- Rect rect1;
- Rect rect2;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ Rect rect1;
+ Rect rect2;
#ifndef MacEqualRect
- PyMac_PRECHECK(MacEqualRect);
+ PyMac_PRECHECK(MacEqualRect);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- PyMac_GetRect, &rect1,
- PyMac_GetRect, &rect2))
- return NULL;
- _rv = MacEqualRect(&rect1,
- &rect2);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ PyMac_GetRect, &rect1,
+ PyMac_GetRect, &rect2))
+ return NULL;
+ _rv = MacEqualRect(&rect1,
+ &rect2);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *Qd_EmptyRect(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- Rect r;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ Rect r;
#ifndef EmptyRect
- PyMac_PRECHECK(EmptyRect);
+ PyMac_PRECHECK(EmptyRect);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetRect, &r))
- return NULL;
- _rv = EmptyRect(&r);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetRect, &r))
+ return NULL;
+ _rv = EmptyRect(&r);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *Qd_MacFrameRect(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Rect r;
+ PyObject *_res = NULL;
+ Rect r;
#ifndef MacFrameRect
- PyMac_PRECHECK(MacFrameRect);
+ PyMac_PRECHECK(MacFrameRect);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetRect, &r))
- return NULL;
- MacFrameRect(&r);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetRect, &r))
+ return NULL;
+ MacFrameRect(&r);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_PaintRect(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Rect r;
+ PyObject *_res = NULL;
+ Rect r;
#ifndef PaintRect
- PyMac_PRECHECK(PaintRect);
+ PyMac_PRECHECK(PaintRect);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetRect, &r))
- return NULL;
- PaintRect(&r);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetRect, &r))
+ return NULL;
+ PaintRect(&r);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_EraseRect(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Rect r;
+ PyObject *_res = NULL;
+ Rect r;
#ifndef EraseRect
- PyMac_PRECHECK(EraseRect);
+ PyMac_PRECHECK(EraseRect);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetRect, &r))
- return NULL;
- EraseRect(&r);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetRect, &r))
+ return NULL;
+ EraseRect(&r);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_MacInvertRect(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Rect r;
+ PyObject *_res = NULL;
+ Rect r;
#ifndef MacInvertRect
- PyMac_PRECHECK(MacInvertRect);
+ PyMac_PRECHECK(MacInvertRect);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetRect, &r))
- return NULL;
- MacInvertRect(&r);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetRect, &r))
+ return NULL;
+ MacInvertRect(&r);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_MacFillRect(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Rect r;
- Pattern *pat__in__;
- int pat__in_len__;
+ PyObject *_res = NULL;
+ Rect r;
+ Pattern *pat__in__;
+ int pat__in_len__;
#ifndef MacFillRect
- PyMac_PRECHECK(MacFillRect);
-#endif
- if (!PyArg_ParseTuple(_args, "O&s#",
- PyMac_GetRect, &r,
- (char **)&pat__in__, &pat__in_len__))
- return NULL;
- if (pat__in_len__ != sizeof(Pattern))
- {
- PyErr_SetString(PyExc_TypeError, "buffer length should be sizeof(Pattern)");
- goto pat__error__;
- }
- MacFillRect(&r,
- pat__in__);
- Py_INCREF(Py_None);
- _res = Py_None;
+ PyMac_PRECHECK(MacFillRect);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&s#",
+ PyMac_GetRect, &r,
+ (char **)&pat__in__, &pat__in_len__))
+ return NULL;
+ if (pat__in_len__ != sizeof(Pattern))
+ {
+ PyErr_SetString(PyExc_TypeError, "buffer length should be sizeof(Pattern)");
+ goto pat__error__;
+ }
+ MacFillRect(&r,
+ pat__in__);
+ Py_INCREF(Py_None);
+ _res = Py_None;
pat__error__: ;
- return _res;
+ return _res;
}
static PyObject *Qd_FrameOval(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Rect r;
+ PyObject *_res = NULL;
+ Rect r;
#ifndef FrameOval
- PyMac_PRECHECK(FrameOval);
+ PyMac_PRECHECK(FrameOval);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetRect, &r))
- return NULL;
- FrameOval(&r);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetRect, &r))
+ return NULL;
+ FrameOval(&r);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_PaintOval(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Rect r;
+ PyObject *_res = NULL;
+ Rect r;
#ifndef PaintOval
- PyMac_PRECHECK(PaintOval);
+ PyMac_PRECHECK(PaintOval);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetRect, &r))
- return NULL;
- PaintOval(&r);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetRect, &r))
+ return NULL;
+ PaintOval(&r);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_EraseOval(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Rect r;
+ PyObject *_res = NULL;
+ Rect r;
#ifndef EraseOval
- PyMac_PRECHECK(EraseOval);
+ PyMac_PRECHECK(EraseOval);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetRect, &r))
- return NULL;
- EraseOval(&r);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetRect, &r))
+ return NULL;
+ EraseOval(&r);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_InvertOval(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Rect r;
+ PyObject *_res = NULL;
+ Rect r;
#ifndef InvertOval
- PyMac_PRECHECK(InvertOval);
+ PyMac_PRECHECK(InvertOval);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetRect, &r))
- return NULL;
- InvertOval(&r);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetRect, &r))
+ return NULL;
+ InvertOval(&r);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_FillOval(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Rect r;
- Pattern *pat__in__;
- int pat__in_len__;
+ PyObject *_res = NULL;
+ Rect r;
+ Pattern *pat__in__;
+ int pat__in_len__;
#ifndef FillOval
- PyMac_PRECHECK(FillOval);
-#endif
- if (!PyArg_ParseTuple(_args, "O&s#",
- PyMac_GetRect, &r,
- (char **)&pat__in__, &pat__in_len__))
- return NULL;
- if (pat__in_len__ != sizeof(Pattern))
- {
- PyErr_SetString(PyExc_TypeError, "buffer length should be sizeof(Pattern)");
- goto pat__error__;
- }
- FillOval(&r,
- pat__in__);
- Py_INCREF(Py_None);
- _res = Py_None;
+ PyMac_PRECHECK(FillOval);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&s#",
+ PyMac_GetRect, &r,
+ (char **)&pat__in__, &pat__in_len__))
+ return NULL;
+ if (pat__in_len__ != sizeof(Pattern))
+ {
+ PyErr_SetString(PyExc_TypeError, "buffer length should be sizeof(Pattern)");
+ goto pat__error__;
+ }
+ FillOval(&r,
+ pat__in__);
+ Py_INCREF(Py_None);
+ _res = Py_None;
pat__error__: ;
- return _res;
+ return _res;
}
static PyObject *Qd_FrameRoundRect(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Rect r;
- short ovalWidth;
- short ovalHeight;
+ PyObject *_res = NULL;
+ Rect r;
+ short ovalWidth;
+ short ovalHeight;
#ifndef FrameRoundRect
- PyMac_PRECHECK(FrameRoundRect);
+ PyMac_PRECHECK(FrameRoundRect);
#endif
- if (!PyArg_ParseTuple(_args, "O&hh",
- PyMac_GetRect, &r,
- &ovalWidth,
- &ovalHeight))
- return NULL;
- FrameRoundRect(&r,
- ovalWidth,
- ovalHeight);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&hh",
+ PyMac_GetRect, &r,
+ &ovalWidth,
+ &ovalHeight))
+ return NULL;
+ FrameRoundRect(&r,
+ ovalWidth,
+ ovalHeight);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_PaintRoundRect(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Rect r;
- short ovalWidth;
- short ovalHeight;
+ PyObject *_res = NULL;
+ Rect r;
+ short ovalWidth;
+ short ovalHeight;
#ifndef PaintRoundRect
- PyMac_PRECHECK(PaintRoundRect);
+ PyMac_PRECHECK(PaintRoundRect);
#endif
- if (!PyArg_ParseTuple(_args, "O&hh",
- PyMac_GetRect, &r,
- &ovalWidth,
- &ovalHeight))
- return NULL;
- PaintRoundRect(&r,
- ovalWidth,
- ovalHeight);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&hh",
+ PyMac_GetRect, &r,
+ &ovalWidth,
+ &ovalHeight))
+ return NULL;
+ PaintRoundRect(&r,
+ ovalWidth,
+ ovalHeight);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_EraseRoundRect(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Rect r;
- short ovalWidth;
- short ovalHeight;
+ PyObject *_res = NULL;
+ Rect r;
+ short ovalWidth;
+ short ovalHeight;
#ifndef EraseRoundRect
- PyMac_PRECHECK(EraseRoundRect);
+ PyMac_PRECHECK(EraseRoundRect);
#endif
- if (!PyArg_ParseTuple(_args, "O&hh",
- PyMac_GetRect, &r,
- &ovalWidth,
- &ovalHeight))
- return NULL;
- EraseRoundRect(&r,
- ovalWidth,
- ovalHeight);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&hh",
+ PyMac_GetRect, &r,
+ &ovalWidth,
+ &ovalHeight))
+ return NULL;
+ EraseRoundRect(&r,
+ ovalWidth,
+ ovalHeight);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_InvertRoundRect(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Rect r;
- short ovalWidth;
- short ovalHeight;
+ PyObject *_res = NULL;
+ Rect r;
+ short ovalWidth;
+ short ovalHeight;
#ifndef InvertRoundRect
- PyMac_PRECHECK(InvertRoundRect);
+ PyMac_PRECHECK(InvertRoundRect);
#endif
- if (!PyArg_ParseTuple(_args, "O&hh",
- PyMac_GetRect, &r,
- &ovalWidth,
- &ovalHeight))
- return NULL;
- InvertRoundRect(&r,
- ovalWidth,
- ovalHeight);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&hh",
+ PyMac_GetRect, &r,
+ &ovalWidth,
+ &ovalHeight))
+ return NULL;
+ InvertRoundRect(&r,
+ ovalWidth,
+ ovalHeight);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_FillRoundRect(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Rect r;
- short ovalWidth;
- short ovalHeight;
- Pattern *pat__in__;
- int pat__in_len__;
+ PyObject *_res = NULL;
+ Rect r;
+ short ovalWidth;
+ short ovalHeight;
+ Pattern *pat__in__;
+ int pat__in_len__;
#ifndef FillRoundRect
- PyMac_PRECHECK(FillRoundRect);
-#endif
- if (!PyArg_ParseTuple(_args, "O&hhs#",
- PyMac_GetRect, &r,
- &ovalWidth,
- &ovalHeight,
- (char **)&pat__in__, &pat__in_len__))
- return NULL;
- if (pat__in_len__ != sizeof(Pattern))
- {
- PyErr_SetString(PyExc_TypeError, "buffer length should be sizeof(Pattern)");
- goto pat__error__;
- }
- FillRoundRect(&r,
- ovalWidth,
- ovalHeight,
- pat__in__);
- Py_INCREF(Py_None);
- _res = Py_None;
+ PyMac_PRECHECK(FillRoundRect);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&hhs#",
+ PyMac_GetRect, &r,
+ &ovalWidth,
+ &ovalHeight,
+ (char **)&pat__in__, &pat__in_len__))
+ return NULL;
+ if (pat__in_len__ != sizeof(Pattern))
+ {
+ PyErr_SetString(PyExc_TypeError, "buffer length should be sizeof(Pattern)");
+ goto pat__error__;
+ }
+ FillRoundRect(&r,
+ ovalWidth,
+ ovalHeight,
+ pat__in__);
+ Py_INCREF(Py_None);
+ _res = Py_None;
pat__error__: ;
- return _res;
+ return _res;
}
static PyObject *Qd_FrameArc(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Rect r;
- short startAngle;
- short arcAngle;
+ PyObject *_res = NULL;
+ Rect r;
+ short startAngle;
+ short arcAngle;
#ifndef FrameArc
- PyMac_PRECHECK(FrameArc);
+ PyMac_PRECHECK(FrameArc);
#endif
- if (!PyArg_ParseTuple(_args, "O&hh",
- PyMac_GetRect, &r,
- &startAngle,
- &arcAngle))
- return NULL;
- FrameArc(&r,
- startAngle,
- arcAngle);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&hh",
+ PyMac_GetRect, &r,
+ &startAngle,
+ &arcAngle))
+ return NULL;
+ FrameArc(&r,
+ startAngle,
+ arcAngle);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_PaintArc(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Rect r;
- short startAngle;
- short arcAngle;
+ PyObject *_res = NULL;
+ Rect r;
+ short startAngle;
+ short arcAngle;
#ifndef PaintArc
- PyMac_PRECHECK(PaintArc);
+ PyMac_PRECHECK(PaintArc);
#endif
- if (!PyArg_ParseTuple(_args, "O&hh",
- PyMac_GetRect, &r,
- &startAngle,
- &arcAngle))
- return NULL;
- PaintArc(&r,
- startAngle,
- arcAngle);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&hh",
+ PyMac_GetRect, &r,
+ &startAngle,
+ &arcAngle))
+ return NULL;
+ PaintArc(&r,
+ startAngle,
+ arcAngle);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_EraseArc(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Rect r;
- short startAngle;
- short arcAngle;
+ PyObject *_res = NULL;
+ Rect r;
+ short startAngle;
+ short arcAngle;
#ifndef EraseArc
- PyMac_PRECHECK(EraseArc);
+ PyMac_PRECHECK(EraseArc);
#endif
- if (!PyArg_ParseTuple(_args, "O&hh",
- PyMac_GetRect, &r,
- &startAngle,
- &arcAngle))
- return NULL;
- EraseArc(&r,
- startAngle,
- arcAngle);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&hh",
+ PyMac_GetRect, &r,
+ &startAngle,
+ &arcAngle))
+ return NULL;
+ EraseArc(&r,
+ startAngle,
+ arcAngle);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_InvertArc(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Rect r;
- short startAngle;
- short arcAngle;
+ PyObject *_res = NULL;
+ Rect r;
+ short startAngle;
+ short arcAngle;
#ifndef InvertArc
- PyMac_PRECHECK(InvertArc);
+ PyMac_PRECHECK(InvertArc);
#endif
- if (!PyArg_ParseTuple(_args, "O&hh",
- PyMac_GetRect, &r,
- &startAngle,
- &arcAngle))
- return NULL;
- InvertArc(&r,
- startAngle,
- arcAngle);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&hh",
+ PyMac_GetRect, &r,
+ &startAngle,
+ &arcAngle))
+ return NULL;
+ InvertArc(&r,
+ startAngle,
+ arcAngle);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_FillArc(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Rect r;
- short startAngle;
- short arcAngle;
- Pattern *pat__in__;
- int pat__in_len__;
+ PyObject *_res = NULL;
+ Rect r;
+ short startAngle;
+ short arcAngle;
+ Pattern *pat__in__;
+ int pat__in_len__;
#ifndef FillArc
- PyMac_PRECHECK(FillArc);
-#endif
- if (!PyArg_ParseTuple(_args, "O&hhs#",
- PyMac_GetRect, &r,
- &startAngle,
- &arcAngle,
- (char **)&pat__in__, &pat__in_len__))
- return NULL;
- if (pat__in_len__ != sizeof(Pattern))
- {
- PyErr_SetString(PyExc_TypeError, "buffer length should be sizeof(Pattern)");
- goto pat__error__;
- }
- FillArc(&r,
- startAngle,
- arcAngle,
- pat__in__);
- Py_INCREF(Py_None);
- _res = Py_None;
+ PyMac_PRECHECK(FillArc);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&hhs#",
+ PyMac_GetRect, &r,
+ &startAngle,
+ &arcAngle,
+ (char **)&pat__in__, &pat__in_len__))
+ return NULL;
+ if (pat__in_len__ != sizeof(Pattern))
+ {
+ PyErr_SetString(PyExc_TypeError, "buffer length should be sizeof(Pattern)");
+ goto pat__error__;
+ }
+ FillArc(&r,
+ startAngle,
+ arcAngle,
+ pat__in__);
+ Py_INCREF(Py_None);
+ _res = Py_None;
pat__error__: ;
- return _res;
+ return _res;
}
static PyObject *Qd_NewRgn(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RgnHandle _rv;
+ PyObject *_res = NULL;
+ RgnHandle _rv;
#ifndef NewRgn
- PyMac_PRECHECK(NewRgn);
+ PyMac_PRECHECK(NewRgn);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = NewRgn();
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = NewRgn();
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *Qd_OpenRgn(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef OpenRgn
- PyMac_PRECHECK(OpenRgn);
+ PyMac_PRECHECK(OpenRgn);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- OpenRgn();
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ OpenRgn();
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_CloseRgn(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RgnHandle dstRgn;
+ PyObject *_res = NULL;
+ RgnHandle dstRgn;
#ifndef CloseRgn
- PyMac_PRECHECK(CloseRgn);
+ PyMac_PRECHECK(CloseRgn);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &dstRgn))
- return NULL;
- CloseRgn(dstRgn);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &dstRgn))
+ return NULL;
+ CloseRgn(dstRgn);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_BitMapToRegion(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- RgnHandle region;
- BitMapPtr bMap;
+ PyObject *_res = NULL;
+ OSErr _err;
+ RgnHandle region;
+ BitMapPtr bMap;
#ifndef BitMapToRegion
- PyMac_PRECHECK(BitMapToRegion);
+ PyMac_PRECHECK(BitMapToRegion);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- ResObj_Convert, &region,
- BMObj_Convert, &bMap))
- return NULL;
- _err = BitMapToRegion(region,
- bMap);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ ResObj_Convert, &region,
+ BMObj_Convert, &bMap))
+ return NULL;
+ _err = BitMapToRegion(region,
+ bMap);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_RgnToHandle(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RgnHandle region;
- Handle flattenedRgnDataHdl;
+ PyObject *_res = NULL;
+ RgnHandle region;
+ Handle flattenedRgnDataHdl;
#ifndef RgnToHandle
- PyMac_PRECHECK(RgnToHandle);
+ PyMac_PRECHECK(RgnToHandle);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- ResObj_Convert, &region,
- ResObj_Convert, &flattenedRgnDataHdl))
- return NULL;
- RgnToHandle(region,
- flattenedRgnDataHdl);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ ResObj_Convert, &region,
+ ResObj_Convert, &flattenedRgnDataHdl))
+ return NULL;
+ RgnToHandle(region,
+ flattenedRgnDataHdl);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_DisposeRgn(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RgnHandle rgn;
+ PyObject *_res = NULL;
+ RgnHandle rgn;
#ifndef DisposeRgn
- PyMac_PRECHECK(DisposeRgn);
+ PyMac_PRECHECK(DisposeRgn);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &rgn))
- return NULL;
- DisposeRgn(rgn);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &rgn))
+ return NULL;
+ DisposeRgn(rgn);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_MacCopyRgn(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RgnHandle srcRgn;
- RgnHandle dstRgn;
+ PyObject *_res = NULL;
+ RgnHandle srcRgn;
+ RgnHandle dstRgn;
#ifndef MacCopyRgn
- PyMac_PRECHECK(MacCopyRgn);
+ PyMac_PRECHECK(MacCopyRgn);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- ResObj_Convert, &srcRgn,
- ResObj_Convert, &dstRgn))
- return NULL;
- MacCopyRgn(srcRgn,
- dstRgn);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ ResObj_Convert, &srcRgn,
+ ResObj_Convert, &dstRgn))
+ return NULL;
+ MacCopyRgn(srcRgn,
+ dstRgn);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_SetEmptyRgn(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RgnHandle rgn;
+ PyObject *_res = NULL;
+ RgnHandle rgn;
#ifndef SetEmptyRgn
- PyMac_PRECHECK(SetEmptyRgn);
+ PyMac_PRECHECK(SetEmptyRgn);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &rgn))
- return NULL;
- SetEmptyRgn(rgn);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &rgn))
+ return NULL;
+ SetEmptyRgn(rgn);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_MacSetRectRgn(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RgnHandle rgn;
- short left;
- short top;
- short right;
- short bottom;
+ PyObject *_res = NULL;
+ RgnHandle rgn;
+ short left;
+ short top;
+ short right;
+ short bottom;
#ifndef MacSetRectRgn
- PyMac_PRECHECK(MacSetRectRgn);
-#endif
- if (!PyArg_ParseTuple(_args, "O&hhhh",
- ResObj_Convert, &rgn,
- &left,
- &top,
- &right,
- &bottom))
- return NULL;
- MacSetRectRgn(rgn,
- left,
- top,
- right,
- bottom);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(MacSetRectRgn);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&hhhh",
+ ResObj_Convert, &rgn,
+ &left,
+ &top,
+ &right,
+ &bottom))
+ return NULL;
+ MacSetRectRgn(rgn,
+ left,
+ top,
+ right,
+ bottom);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_RectRgn(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RgnHandle rgn;
- Rect r;
+ PyObject *_res = NULL;
+ RgnHandle rgn;
+ Rect r;
#ifndef RectRgn
- PyMac_PRECHECK(RectRgn);
+ PyMac_PRECHECK(RectRgn);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- ResObj_Convert, &rgn,
- PyMac_GetRect, &r))
- return NULL;
- RectRgn(rgn,
- &r);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ ResObj_Convert, &rgn,
+ PyMac_GetRect, &r))
+ return NULL;
+ RectRgn(rgn,
+ &r);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_MacOffsetRgn(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RgnHandle rgn;
- short dh;
- short dv;
+ PyObject *_res = NULL;
+ RgnHandle rgn;
+ short dh;
+ short dv;
#ifndef MacOffsetRgn
- PyMac_PRECHECK(MacOffsetRgn);
+ PyMac_PRECHECK(MacOffsetRgn);
#endif
- if (!PyArg_ParseTuple(_args, "O&hh",
- ResObj_Convert, &rgn,
- &dh,
- &dv))
- return NULL;
- MacOffsetRgn(rgn,
- dh,
- dv);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&hh",
+ ResObj_Convert, &rgn,
+ &dh,
+ &dv))
+ return NULL;
+ MacOffsetRgn(rgn,
+ dh,
+ dv);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_InsetRgn(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RgnHandle rgn;
- short dh;
- short dv;
+ PyObject *_res = NULL;
+ RgnHandle rgn;
+ short dh;
+ short dv;
#ifndef InsetRgn
- PyMac_PRECHECK(InsetRgn);
+ PyMac_PRECHECK(InsetRgn);
#endif
- if (!PyArg_ParseTuple(_args, "O&hh",
- ResObj_Convert, &rgn,
- &dh,
- &dv))
- return NULL;
- InsetRgn(rgn,
- dh,
- dv);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&hh",
+ ResObj_Convert, &rgn,
+ &dh,
+ &dv))
+ return NULL;
+ InsetRgn(rgn,
+ dh,
+ dv);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_SectRgn(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RgnHandle srcRgnA;
- RgnHandle srcRgnB;
- RgnHandle dstRgn;
+ PyObject *_res = NULL;
+ RgnHandle srcRgnA;
+ RgnHandle srcRgnB;
+ RgnHandle dstRgn;
#ifndef SectRgn
- PyMac_PRECHECK(SectRgn);
+ PyMac_PRECHECK(SectRgn);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- ResObj_Convert, &srcRgnA,
- ResObj_Convert, &srcRgnB,
- ResObj_Convert, &dstRgn))
- return NULL;
- SectRgn(srcRgnA,
- srcRgnB,
- dstRgn);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ ResObj_Convert, &srcRgnA,
+ ResObj_Convert, &srcRgnB,
+ ResObj_Convert, &dstRgn))
+ return NULL;
+ SectRgn(srcRgnA,
+ srcRgnB,
+ dstRgn);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_MacUnionRgn(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RgnHandle srcRgnA;
- RgnHandle srcRgnB;
- RgnHandle dstRgn;
+ PyObject *_res = NULL;
+ RgnHandle srcRgnA;
+ RgnHandle srcRgnB;
+ RgnHandle dstRgn;
#ifndef MacUnionRgn
- PyMac_PRECHECK(MacUnionRgn);
+ PyMac_PRECHECK(MacUnionRgn);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- ResObj_Convert, &srcRgnA,
- ResObj_Convert, &srcRgnB,
- ResObj_Convert, &dstRgn))
- return NULL;
- MacUnionRgn(srcRgnA,
- srcRgnB,
- dstRgn);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ ResObj_Convert, &srcRgnA,
+ ResObj_Convert, &srcRgnB,
+ ResObj_Convert, &dstRgn))
+ return NULL;
+ MacUnionRgn(srcRgnA,
+ srcRgnB,
+ dstRgn);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_DiffRgn(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RgnHandle srcRgnA;
- RgnHandle srcRgnB;
- RgnHandle dstRgn;
+ PyObject *_res = NULL;
+ RgnHandle srcRgnA;
+ RgnHandle srcRgnB;
+ RgnHandle dstRgn;
#ifndef DiffRgn
- PyMac_PRECHECK(DiffRgn);
+ PyMac_PRECHECK(DiffRgn);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- ResObj_Convert, &srcRgnA,
- ResObj_Convert, &srcRgnB,
- ResObj_Convert, &dstRgn))
- return NULL;
- DiffRgn(srcRgnA,
- srcRgnB,
- dstRgn);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ ResObj_Convert, &srcRgnA,
+ ResObj_Convert, &srcRgnB,
+ ResObj_Convert, &dstRgn))
+ return NULL;
+ DiffRgn(srcRgnA,
+ srcRgnB,
+ dstRgn);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_MacXorRgn(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RgnHandle srcRgnA;
- RgnHandle srcRgnB;
- RgnHandle dstRgn;
+ PyObject *_res = NULL;
+ RgnHandle srcRgnA;
+ RgnHandle srcRgnB;
+ RgnHandle dstRgn;
#ifndef MacXorRgn
- PyMac_PRECHECK(MacXorRgn);
+ PyMac_PRECHECK(MacXorRgn);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- ResObj_Convert, &srcRgnA,
- ResObj_Convert, &srcRgnB,
- ResObj_Convert, &dstRgn))
- return NULL;
- MacXorRgn(srcRgnA,
- srcRgnB,
- dstRgn);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ ResObj_Convert, &srcRgnA,
+ ResObj_Convert, &srcRgnB,
+ ResObj_Convert, &dstRgn))
+ return NULL;
+ MacXorRgn(srcRgnA,
+ srcRgnB,
+ dstRgn);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_RectInRgn(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- Rect r;
- RgnHandle rgn;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ Rect r;
+ RgnHandle rgn;
#ifndef RectInRgn
- PyMac_PRECHECK(RectInRgn);
+ PyMac_PRECHECK(RectInRgn);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- PyMac_GetRect, &r,
- ResObj_Convert, &rgn))
- return NULL;
- _rv = RectInRgn(&r,
- rgn);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ PyMac_GetRect, &r,
+ ResObj_Convert, &rgn))
+ return NULL;
+ _rv = RectInRgn(&r,
+ rgn);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *Qd_MacEqualRgn(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- RgnHandle rgnA;
- RgnHandle rgnB;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ RgnHandle rgnA;
+ RgnHandle rgnB;
#ifndef MacEqualRgn
- PyMac_PRECHECK(MacEqualRgn);
+ PyMac_PRECHECK(MacEqualRgn);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- ResObj_Convert, &rgnA,
- ResObj_Convert, &rgnB))
- return NULL;
- _rv = MacEqualRgn(rgnA,
- rgnB);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ ResObj_Convert, &rgnA,
+ ResObj_Convert, &rgnB))
+ return NULL;
+ _rv = MacEqualRgn(rgnA,
+ rgnB);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *Qd_EmptyRgn(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- RgnHandle rgn;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ RgnHandle rgn;
#ifndef EmptyRgn
- PyMac_PRECHECK(EmptyRgn);
+ PyMac_PRECHECK(EmptyRgn);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &rgn))
- return NULL;
- _rv = EmptyRgn(rgn);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &rgn))
+ return NULL;
+ _rv = EmptyRgn(rgn);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *Qd_MacFrameRgn(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RgnHandle rgn;
+ PyObject *_res = NULL;
+ RgnHandle rgn;
#ifndef MacFrameRgn
- PyMac_PRECHECK(MacFrameRgn);
+ PyMac_PRECHECK(MacFrameRgn);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &rgn))
- return NULL;
- MacFrameRgn(rgn);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &rgn))
+ return NULL;
+ MacFrameRgn(rgn);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_MacPaintRgn(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RgnHandle rgn;
+ PyObject *_res = NULL;
+ RgnHandle rgn;
#ifndef MacPaintRgn
- PyMac_PRECHECK(MacPaintRgn);
+ PyMac_PRECHECK(MacPaintRgn);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &rgn))
- return NULL;
- MacPaintRgn(rgn);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &rgn))
+ return NULL;
+ MacPaintRgn(rgn);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_EraseRgn(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RgnHandle rgn;
+ PyObject *_res = NULL;
+ RgnHandle rgn;
#ifndef EraseRgn
- PyMac_PRECHECK(EraseRgn);
+ PyMac_PRECHECK(EraseRgn);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &rgn))
- return NULL;
- EraseRgn(rgn);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &rgn))
+ return NULL;
+ EraseRgn(rgn);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_MacInvertRgn(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RgnHandle rgn;
+ PyObject *_res = NULL;
+ RgnHandle rgn;
#ifndef MacInvertRgn
- PyMac_PRECHECK(MacInvertRgn);
+ PyMac_PRECHECK(MacInvertRgn);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &rgn))
- return NULL;
- MacInvertRgn(rgn);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &rgn))
+ return NULL;
+ MacInvertRgn(rgn);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_MacFillRgn(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RgnHandle rgn;
- Pattern *pat__in__;
- int pat__in_len__;
+ PyObject *_res = NULL;
+ RgnHandle rgn;
+ Pattern *pat__in__;
+ int pat__in_len__;
#ifndef MacFillRgn
- PyMac_PRECHECK(MacFillRgn);
-#endif
- if (!PyArg_ParseTuple(_args, "O&s#",
- ResObj_Convert, &rgn,
- (char **)&pat__in__, &pat__in_len__))
- return NULL;
- if (pat__in_len__ != sizeof(Pattern))
- {
- PyErr_SetString(PyExc_TypeError, "buffer length should be sizeof(Pattern)");
- goto pat__error__;
- }
- MacFillRgn(rgn,
- pat__in__);
- Py_INCREF(Py_None);
- _res = Py_None;
+ PyMac_PRECHECK(MacFillRgn);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&s#",
+ ResObj_Convert, &rgn,
+ (char **)&pat__in__, &pat__in_len__))
+ return NULL;
+ if (pat__in_len__ != sizeof(Pattern))
+ {
+ PyErr_SetString(PyExc_TypeError, "buffer length should be sizeof(Pattern)");
+ goto pat__error__;
+ }
+ MacFillRgn(rgn,
+ pat__in__);
+ Py_INCREF(Py_None);
+ _res = Py_None;
pat__error__: ;
- return _res;
+ return _res;
}
static PyObject *Qd_ScrollRect(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Rect r;
- short dh;
- short dv;
- RgnHandle updateRgn;
+ PyObject *_res = NULL;
+ Rect r;
+ short dh;
+ short dv;
+ RgnHandle updateRgn;
#ifndef ScrollRect
- PyMac_PRECHECK(ScrollRect);
-#endif
- if (!PyArg_ParseTuple(_args, "O&hhO&",
- PyMac_GetRect, &r,
- &dh,
- &dv,
- ResObj_Convert, &updateRgn))
- return NULL;
- ScrollRect(&r,
- dh,
- dv,
- updateRgn);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(ScrollRect);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&hhO&",
+ PyMac_GetRect, &r,
+ &dh,
+ &dv,
+ ResObj_Convert, &updateRgn))
+ return NULL;
+ ScrollRect(&r,
+ dh,
+ dv,
+ updateRgn);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_CopyBits(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- BitMapPtr srcBits;
- BitMapPtr dstBits;
- Rect srcRect;
- Rect dstRect;
- short mode;
- RgnHandle maskRgn;
+ PyObject *_res = NULL;
+ BitMapPtr srcBits;
+ BitMapPtr dstBits;
+ Rect srcRect;
+ Rect dstRect;
+ short mode;
+ RgnHandle maskRgn;
#ifndef CopyBits
- PyMac_PRECHECK(CopyBits);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&O&hO&",
- BMObj_Convert, &srcBits,
- BMObj_Convert, &dstBits,
- PyMac_GetRect, &srcRect,
- PyMac_GetRect, &dstRect,
- &mode,
- OptResObj_Convert, &maskRgn))
- return NULL;
- CopyBits(srcBits,
- dstBits,
- &srcRect,
- &dstRect,
- mode,
- maskRgn);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(CopyBits);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&O&hO&",
+ BMObj_Convert, &srcBits,
+ BMObj_Convert, &dstBits,
+ PyMac_GetRect, &srcRect,
+ PyMac_GetRect, &dstRect,
+ &mode,
+ OptResObj_Convert, &maskRgn))
+ return NULL;
+ CopyBits(srcBits,
+ dstBits,
+ &srcRect,
+ &dstRect,
+ mode,
+ maskRgn);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_CopyMask(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- BitMapPtr srcBits;
- BitMapPtr maskBits;
- BitMapPtr dstBits;
- Rect srcRect;
- Rect maskRect;
- Rect dstRect;
+ PyObject *_res = NULL;
+ BitMapPtr srcBits;
+ BitMapPtr maskBits;
+ BitMapPtr dstBits;
+ Rect srcRect;
+ Rect maskRect;
+ Rect dstRect;
#ifndef CopyMask
- PyMac_PRECHECK(CopyMask);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&O&O&O&",
- BMObj_Convert, &srcBits,
- BMObj_Convert, &maskBits,
- BMObj_Convert, &dstBits,
- PyMac_GetRect, &srcRect,
- PyMac_GetRect, &maskRect,
- PyMac_GetRect, &dstRect))
- return NULL;
- CopyMask(srcBits,
- maskBits,
- dstBits,
- &srcRect,
- &maskRect,
- &dstRect);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(CopyMask);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&O&O&O&",
+ BMObj_Convert, &srcBits,
+ BMObj_Convert, &maskBits,
+ BMObj_Convert, &dstBits,
+ PyMac_GetRect, &srcRect,
+ PyMac_GetRect, &maskRect,
+ PyMac_GetRect, &dstRect))
+ return NULL;
+ CopyMask(srcBits,
+ maskBits,
+ dstBits,
+ &srcRect,
+ &maskRect,
+ &dstRect);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_OpenPicture(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- PicHandle _rv;
- Rect picFrame;
+ PyObject *_res = NULL;
+ PicHandle _rv;
+ Rect picFrame;
#ifndef OpenPicture
- PyMac_PRECHECK(OpenPicture);
+ PyMac_PRECHECK(OpenPicture);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetRect, &picFrame))
- return NULL;
- _rv = OpenPicture(&picFrame);
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetRect, &picFrame))
+ return NULL;
+ _rv = OpenPicture(&picFrame);
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *Qd_PicComment(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short kind;
- short dataSize;
- Handle dataHandle;
+ PyObject *_res = NULL;
+ short kind;
+ short dataSize;
+ Handle dataHandle;
#ifndef PicComment
- PyMac_PRECHECK(PicComment);
+ PyMac_PRECHECK(PicComment);
#endif
- if (!PyArg_ParseTuple(_args, "hhO&",
- &kind,
- &dataSize,
- ResObj_Convert, &dataHandle))
- return NULL;
- PicComment(kind,
- dataSize,
- dataHandle);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "hhO&",
+ &kind,
+ &dataSize,
+ ResObj_Convert, &dataHandle))
+ return NULL;
+ PicComment(kind,
+ dataSize,
+ dataHandle);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_ClosePicture(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef ClosePicture
- PyMac_PRECHECK(ClosePicture);
+ PyMac_PRECHECK(ClosePicture);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- ClosePicture();
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ ClosePicture();
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_DrawPicture(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- PicHandle myPicture;
- Rect dstRect;
+ PyObject *_res = NULL;
+ PicHandle myPicture;
+ Rect dstRect;
#ifndef DrawPicture
- PyMac_PRECHECK(DrawPicture);
+ PyMac_PRECHECK(DrawPicture);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- ResObj_Convert, &myPicture,
- PyMac_GetRect, &dstRect))
- return NULL;
- DrawPicture(myPicture,
- &dstRect);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ ResObj_Convert, &myPicture,
+ PyMac_GetRect, &dstRect))
+ return NULL;
+ DrawPicture(myPicture,
+ &dstRect);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_KillPicture(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- PicHandle myPicture;
+ PyObject *_res = NULL;
+ PicHandle myPicture;
#ifndef KillPicture
- PyMac_PRECHECK(KillPicture);
+ PyMac_PRECHECK(KillPicture);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &myPicture))
- return NULL;
- KillPicture(myPicture);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &myPicture))
+ return NULL;
+ KillPicture(myPicture);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_OpenPoly(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- PolyHandle _rv;
+ PyObject *_res = NULL;
+ PolyHandle _rv;
#ifndef OpenPoly
- PyMac_PRECHECK(OpenPoly);
+ PyMac_PRECHECK(OpenPoly);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = OpenPoly();
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = OpenPoly();
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *Qd_ClosePoly(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef ClosePoly
- PyMac_PRECHECK(ClosePoly);
+ PyMac_PRECHECK(ClosePoly);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- ClosePoly();
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ ClosePoly();
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_KillPoly(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- PolyHandle poly;
+ PyObject *_res = NULL;
+ PolyHandle poly;
#ifndef KillPoly
- PyMac_PRECHECK(KillPoly);
+ PyMac_PRECHECK(KillPoly);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &poly))
- return NULL;
- KillPoly(poly);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &poly))
+ return NULL;
+ KillPoly(poly);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_OffsetPoly(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- PolyHandle poly;
- short dh;
- short dv;
+ PyObject *_res = NULL;
+ PolyHandle poly;
+ short dh;
+ short dv;
#ifndef OffsetPoly
- PyMac_PRECHECK(OffsetPoly);
+ PyMac_PRECHECK(OffsetPoly);
#endif
- if (!PyArg_ParseTuple(_args, "O&hh",
- ResObj_Convert, &poly,
- &dh,
- &dv))
- return NULL;
- OffsetPoly(poly,
- dh,
- dv);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&hh",
+ ResObj_Convert, &poly,
+ &dh,
+ &dv))
+ return NULL;
+ OffsetPoly(poly,
+ dh,
+ dv);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_FramePoly(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- PolyHandle poly;
+ PyObject *_res = NULL;
+ PolyHandle poly;
#ifndef FramePoly
- PyMac_PRECHECK(FramePoly);
+ PyMac_PRECHECK(FramePoly);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &poly))
- return NULL;
- FramePoly(poly);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &poly))
+ return NULL;
+ FramePoly(poly);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_PaintPoly(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- PolyHandle poly;
+ PyObject *_res = NULL;
+ PolyHandle poly;
#ifndef PaintPoly
- PyMac_PRECHECK(PaintPoly);
+ PyMac_PRECHECK(PaintPoly);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &poly))
- return NULL;
- PaintPoly(poly);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &poly))
+ return NULL;
+ PaintPoly(poly);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_ErasePoly(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- PolyHandle poly;
+ PyObject *_res = NULL;
+ PolyHandle poly;
#ifndef ErasePoly
- PyMac_PRECHECK(ErasePoly);
+ PyMac_PRECHECK(ErasePoly);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &poly))
- return NULL;
- ErasePoly(poly);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &poly))
+ return NULL;
+ ErasePoly(poly);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_InvertPoly(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- PolyHandle poly;
+ PyObject *_res = NULL;
+ PolyHandle poly;
#ifndef InvertPoly
- PyMac_PRECHECK(InvertPoly);
+ PyMac_PRECHECK(InvertPoly);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &poly))
- return NULL;
- InvertPoly(poly);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &poly))
+ return NULL;
+ InvertPoly(poly);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_FillPoly(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- PolyHandle poly;
- Pattern *pat__in__;
- int pat__in_len__;
+ PyObject *_res = NULL;
+ PolyHandle poly;
+ Pattern *pat__in__;
+ int pat__in_len__;
#ifndef FillPoly
- PyMac_PRECHECK(FillPoly);
-#endif
- if (!PyArg_ParseTuple(_args, "O&s#",
- ResObj_Convert, &poly,
- (char **)&pat__in__, &pat__in_len__))
- return NULL;
- if (pat__in_len__ != sizeof(Pattern))
- {
- PyErr_SetString(PyExc_TypeError, "buffer length should be sizeof(Pattern)");
- goto pat__error__;
- }
- FillPoly(poly,
- pat__in__);
- Py_INCREF(Py_None);
- _res = Py_None;
+ PyMac_PRECHECK(FillPoly);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&s#",
+ ResObj_Convert, &poly,
+ (char **)&pat__in__, &pat__in_len__))
+ return NULL;
+ if (pat__in_len__ != sizeof(Pattern))
+ {
+ PyErr_SetString(PyExc_TypeError, "buffer length should be sizeof(Pattern)");
+ goto pat__error__;
+ }
+ FillPoly(poly,
+ pat__in__);
+ Py_INCREF(Py_None);
+ _res = Py_None;
pat__error__: ;
- return _res;
+ return _res;
}
static PyObject *Qd_SetPt(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Point pt;
- short h;
- short v;
+ PyObject *_res = NULL;
+ Point pt;
+ short h;
+ short v;
#ifndef SetPt
- PyMac_PRECHECK(SetPt);
+ PyMac_PRECHECK(SetPt);
#endif
- if (!PyArg_ParseTuple(_args, "hh",
- &h,
- &v))
- return NULL;
- SetPt(&pt,
- h,
- v);
- _res = Py_BuildValue("O&",
- PyMac_BuildPoint, pt);
- return _res;
+ if (!PyArg_ParseTuple(_args, "hh",
+ &h,
+ &v))
+ return NULL;
+ SetPt(&pt,
+ h,
+ v);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildPoint, pt);
+ return _res;
}
static PyObject *Qd_LocalToGlobal(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Point pt;
+ PyObject *_res = NULL;
+ Point pt;
#ifndef LocalToGlobal
- PyMac_PRECHECK(LocalToGlobal);
+ PyMac_PRECHECK(LocalToGlobal);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetPoint, &pt))
- return NULL;
- LocalToGlobal(&pt);
- _res = Py_BuildValue("O&",
- PyMac_BuildPoint, pt);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetPoint, &pt))
+ return NULL;
+ LocalToGlobal(&pt);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildPoint, pt);
+ return _res;
}
static PyObject *Qd_GlobalToLocal(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Point pt;
+ PyObject *_res = NULL;
+ Point pt;
#ifndef GlobalToLocal
- PyMac_PRECHECK(GlobalToLocal);
+ PyMac_PRECHECK(GlobalToLocal);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetPoint, &pt))
- return NULL;
- GlobalToLocal(&pt);
- _res = Py_BuildValue("O&",
- PyMac_BuildPoint, pt);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetPoint, &pt))
+ return NULL;
+ GlobalToLocal(&pt);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildPoint, pt);
+ return _res;
}
static PyObject *Qd_Random(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short _rv;
+ PyObject *_res = NULL;
+ short _rv;
#ifndef Random
- PyMac_PRECHECK(Random);
+ PyMac_PRECHECK(Random);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = Random();
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = Random();
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *Qd_MacGetPixel(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- short h;
- short v;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ short h;
+ short v;
#ifndef MacGetPixel
- PyMac_PRECHECK(MacGetPixel);
+ PyMac_PRECHECK(MacGetPixel);
#endif
- if (!PyArg_ParseTuple(_args, "hh",
- &h,
- &v))
- return NULL;
- _rv = MacGetPixel(h,
- v);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "hh",
+ &h,
+ &v))
+ return NULL;
+ _rv = MacGetPixel(h,
+ v);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *Qd_ScalePt(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Point pt;
- Rect srcRect;
- Rect dstRect;
+ PyObject *_res = NULL;
+ Point pt;
+ Rect srcRect;
+ Rect dstRect;
#ifndef ScalePt
- PyMac_PRECHECK(ScalePt);
+ PyMac_PRECHECK(ScalePt);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- PyMac_GetPoint, &pt,
- PyMac_GetRect, &srcRect,
- PyMac_GetRect, &dstRect))
- return NULL;
- ScalePt(&pt,
- &srcRect,
- &dstRect);
- _res = Py_BuildValue("O&",
- PyMac_BuildPoint, pt);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ PyMac_GetPoint, &pt,
+ PyMac_GetRect, &srcRect,
+ PyMac_GetRect, &dstRect))
+ return NULL;
+ ScalePt(&pt,
+ &srcRect,
+ &dstRect);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildPoint, pt);
+ return _res;
}
static PyObject *Qd_MapPt(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Point pt;
- Rect srcRect;
- Rect dstRect;
+ PyObject *_res = NULL;
+ Point pt;
+ Rect srcRect;
+ Rect dstRect;
#ifndef MapPt
- PyMac_PRECHECK(MapPt);
+ PyMac_PRECHECK(MapPt);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- PyMac_GetPoint, &pt,
- PyMac_GetRect, &srcRect,
- PyMac_GetRect, &dstRect))
- return NULL;
- MapPt(&pt,
- &srcRect,
- &dstRect);
- _res = Py_BuildValue("O&",
- PyMac_BuildPoint, pt);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ PyMac_GetPoint, &pt,
+ PyMac_GetRect, &srcRect,
+ PyMac_GetRect, &dstRect))
+ return NULL;
+ MapPt(&pt,
+ &srcRect,
+ &dstRect);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildPoint, pt);
+ return _res;
}
static PyObject *Qd_MapRect(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Rect r;
- Rect srcRect;
- Rect dstRect;
+ PyObject *_res = NULL;
+ Rect r;
+ Rect srcRect;
+ Rect dstRect;
#ifndef MapRect
- PyMac_PRECHECK(MapRect);
+ PyMac_PRECHECK(MapRect);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- PyMac_GetRect, &r,
- PyMac_GetRect, &srcRect,
- PyMac_GetRect, &dstRect))
- return NULL;
- MapRect(&r,
- &srcRect,
- &dstRect);
- _res = Py_BuildValue("O&",
- PyMac_BuildRect, &r);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ PyMac_GetRect, &r,
+ PyMac_GetRect, &srcRect,
+ PyMac_GetRect, &dstRect))
+ return NULL;
+ MapRect(&r,
+ &srcRect,
+ &dstRect);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildRect, &r);
+ return _res;
}
static PyObject *Qd_MapRgn(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RgnHandle rgn;
- Rect srcRect;
- Rect dstRect;
+ PyObject *_res = NULL;
+ RgnHandle rgn;
+ Rect srcRect;
+ Rect dstRect;
#ifndef MapRgn
- PyMac_PRECHECK(MapRgn);
+ PyMac_PRECHECK(MapRgn);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- ResObj_Convert, &rgn,
- PyMac_GetRect, &srcRect,
- PyMac_GetRect, &dstRect))
- return NULL;
- MapRgn(rgn,
- &srcRect,
- &dstRect);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ ResObj_Convert, &rgn,
+ PyMac_GetRect, &srcRect,
+ PyMac_GetRect, &dstRect))
+ return NULL;
+ MapRgn(rgn,
+ &srcRect,
+ &dstRect);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_MapPoly(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- PolyHandle poly;
- Rect srcRect;
- Rect dstRect;
+ PyObject *_res = NULL;
+ PolyHandle poly;
+ Rect srcRect;
+ Rect dstRect;
#ifndef MapPoly
- PyMac_PRECHECK(MapPoly);
+ PyMac_PRECHECK(MapPoly);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- ResObj_Convert, &poly,
- PyMac_GetRect, &srcRect,
- PyMac_GetRect, &dstRect))
- return NULL;
- MapPoly(poly,
- &srcRect,
- &dstRect);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ ResObj_Convert, &poly,
+ PyMac_GetRect, &srcRect,
+ PyMac_GetRect, &dstRect))
+ return NULL;
+ MapPoly(poly,
+ &srcRect,
+ &dstRect);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_StdBits(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- BitMapPtr srcBits;
- Rect srcRect;
- Rect dstRect;
- short mode;
- RgnHandle maskRgn;
+ PyObject *_res = NULL;
+ BitMapPtr srcBits;
+ Rect srcRect;
+ Rect dstRect;
+ short mode;
+ RgnHandle maskRgn;
#ifndef StdBits
- PyMac_PRECHECK(StdBits);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&hO&",
- BMObj_Convert, &srcBits,
- PyMac_GetRect, &srcRect,
- PyMac_GetRect, &dstRect,
- &mode,
- OptResObj_Convert, &maskRgn))
- return NULL;
- StdBits(srcBits,
- &srcRect,
- &dstRect,
- mode,
- maskRgn);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(StdBits);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&hO&",
+ BMObj_Convert, &srcBits,
+ PyMac_GetRect, &srcRect,
+ PyMac_GetRect, &dstRect,
+ &mode,
+ OptResObj_Convert, &maskRgn))
+ return NULL;
+ StdBits(srcBits,
+ &srcRect,
+ &dstRect,
+ mode,
+ maskRgn);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_AddPt(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Point src;
- Point dst;
+ PyObject *_res = NULL;
+ Point src;
+ Point dst;
#ifndef AddPt
- PyMac_PRECHECK(AddPt);
+ PyMac_PRECHECK(AddPt);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- PyMac_GetPoint, &src,
- PyMac_GetPoint, &dst))
- return NULL;
- AddPt(src,
- &dst);
- _res = Py_BuildValue("O&",
- PyMac_BuildPoint, dst);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ PyMac_GetPoint, &src,
+ PyMac_GetPoint, &dst))
+ return NULL;
+ AddPt(src,
+ &dst);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildPoint, dst);
+ return _res;
}
static PyObject *Qd_EqualPt(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- Point pt1;
- Point pt2;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ Point pt1;
+ Point pt2;
#ifndef EqualPt
- PyMac_PRECHECK(EqualPt);
+ PyMac_PRECHECK(EqualPt);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- PyMac_GetPoint, &pt1,
- PyMac_GetPoint, &pt2))
- return NULL;
- _rv = EqualPt(pt1,
- pt2);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ PyMac_GetPoint, &pt1,
+ PyMac_GetPoint, &pt2))
+ return NULL;
+ _rv = EqualPt(pt1,
+ pt2);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *Qd_MacPtInRect(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- Point pt;
- Rect r;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ Point pt;
+ Rect r;
#ifndef MacPtInRect
- PyMac_PRECHECK(MacPtInRect);
+ PyMac_PRECHECK(MacPtInRect);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- PyMac_GetPoint, &pt,
- PyMac_GetRect, &r))
- return NULL;
- _rv = MacPtInRect(pt,
- &r);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ PyMac_GetPoint, &pt,
+ PyMac_GetRect, &r))
+ return NULL;
+ _rv = MacPtInRect(pt,
+ &r);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *Qd_Pt2Rect(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Point pt1;
- Point pt2;
- Rect dstRect;
+ PyObject *_res = NULL;
+ Point pt1;
+ Point pt2;
+ Rect dstRect;
#ifndef Pt2Rect
- PyMac_PRECHECK(Pt2Rect);
+ PyMac_PRECHECK(Pt2Rect);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- PyMac_GetPoint, &pt1,
- PyMac_GetPoint, &pt2))
- return NULL;
- Pt2Rect(pt1,
- pt2,
- &dstRect);
- _res = Py_BuildValue("O&",
- PyMac_BuildRect, &dstRect);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ PyMac_GetPoint, &pt1,
+ PyMac_GetPoint, &pt2))
+ return NULL;
+ Pt2Rect(pt1,
+ pt2,
+ &dstRect);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildRect, &dstRect);
+ return _res;
}
static PyObject *Qd_PtToAngle(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Rect r;
- Point pt;
- short angle;
+ PyObject *_res = NULL;
+ Rect r;
+ Point pt;
+ short angle;
#ifndef PtToAngle
- PyMac_PRECHECK(PtToAngle);
+ PyMac_PRECHECK(PtToAngle);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- PyMac_GetRect, &r,
- PyMac_GetPoint, &pt))
- return NULL;
- PtToAngle(&r,
- pt,
- &angle);
- _res = Py_BuildValue("h",
- angle);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ PyMac_GetRect, &r,
+ PyMac_GetPoint, &pt))
+ return NULL;
+ PtToAngle(&r,
+ pt,
+ &angle);
+ _res = Py_BuildValue("h",
+ angle);
+ return _res;
}
static PyObject *Qd_SubPt(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Point src;
- Point dst;
+ PyObject *_res = NULL;
+ Point src;
+ Point dst;
#ifndef SubPt
- PyMac_PRECHECK(SubPt);
+ PyMac_PRECHECK(SubPt);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- PyMac_GetPoint, &src,
- PyMac_GetPoint, &dst))
- return NULL;
- SubPt(src,
- &dst);
- _res = Py_BuildValue("O&",
- PyMac_BuildPoint, dst);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ PyMac_GetPoint, &src,
+ PyMac_GetPoint, &dst))
+ return NULL;
+ SubPt(src,
+ &dst);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildPoint, dst);
+ return _res;
}
static PyObject *Qd_PtInRgn(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- Point pt;
- RgnHandle rgn;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ Point pt;
+ RgnHandle rgn;
#ifndef PtInRgn
- PyMac_PRECHECK(PtInRgn);
+ PyMac_PRECHECK(PtInRgn);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- PyMac_GetPoint, &pt,
- ResObj_Convert, &rgn))
- return NULL;
- _rv = PtInRgn(pt,
- rgn);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ PyMac_GetPoint, &pt,
+ ResObj_Convert, &rgn))
+ return NULL;
+ _rv = PtInRgn(pt,
+ rgn);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *Qd_NewPixMap(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- PixMapHandle _rv;
+ PyObject *_res = NULL;
+ PixMapHandle _rv;
#ifndef NewPixMap
- PyMac_PRECHECK(NewPixMap);
+ PyMac_PRECHECK(NewPixMap);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = NewPixMap();
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = NewPixMap();
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *Qd_DisposePixMap(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- PixMapHandle pm;
+ PyObject *_res = NULL;
+ PixMapHandle pm;
#ifndef DisposePixMap
- PyMac_PRECHECK(DisposePixMap);
+ PyMac_PRECHECK(DisposePixMap);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &pm))
- return NULL;
- DisposePixMap(pm);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &pm))
+ return NULL;
+ DisposePixMap(pm);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_CopyPixMap(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- PixMapHandle srcPM;
- PixMapHandle dstPM;
+ PyObject *_res = NULL;
+ PixMapHandle srcPM;
+ PixMapHandle dstPM;
#ifndef CopyPixMap
- PyMac_PRECHECK(CopyPixMap);
+ PyMac_PRECHECK(CopyPixMap);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- ResObj_Convert, &srcPM,
- ResObj_Convert, &dstPM))
- return NULL;
- CopyPixMap(srcPM,
- dstPM);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ ResObj_Convert, &srcPM,
+ ResObj_Convert, &dstPM))
+ return NULL;
+ CopyPixMap(srcPM,
+ dstPM);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_NewPixPat(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- PixPatHandle _rv;
+ PyObject *_res = NULL;
+ PixPatHandle _rv;
#ifndef NewPixPat
- PyMac_PRECHECK(NewPixPat);
+ PyMac_PRECHECK(NewPixPat);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = NewPixPat();
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = NewPixPat();
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *Qd_DisposePixPat(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- PixPatHandle pp;
+ PyObject *_res = NULL;
+ PixPatHandle pp;
#ifndef DisposePixPat
- PyMac_PRECHECK(DisposePixPat);
+ PyMac_PRECHECK(DisposePixPat);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &pp))
- return NULL;
- DisposePixPat(pp);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &pp))
+ return NULL;
+ DisposePixPat(pp);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_CopyPixPat(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- PixPatHandle srcPP;
- PixPatHandle dstPP;
+ PyObject *_res = NULL;
+ PixPatHandle srcPP;
+ PixPatHandle dstPP;
#ifndef CopyPixPat
- PyMac_PRECHECK(CopyPixPat);
+ PyMac_PRECHECK(CopyPixPat);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- ResObj_Convert, &srcPP,
- ResObj_Convert, &dstPP))
- return NULL;
- CopyPixPat(srcPP,
- dstPP);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ ResObj_Convert, &srcPP,
+ ResObj_Convert, &dstPP))
+ return NULL;
+ CopyPixPat(srcPP,
+ dstPP);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_PenPixPat(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- PixPatHandle pp;
+ PyObject *_res = NULL;
+ PixPatHandle pp;
#ifndef PenPixPat
- PyMac_PRECHECK(PenPixPat);
+ PyMac_PRECHECK(PenPixPat);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &pp))
- return NULL;
- PenPixPat(pp);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &pp))
+ return NULL;
+ PenPixPat(pp);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_BackPixPat(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- PixPatHandle pp;
+ PyObject *_res = NULL;
+ PixPatHandle pp;
#ifndef BackPixPat
- PyMac_PRECHECK(BackPixPat);
+ PyMac_PRECHECK(BackPixPat);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &pp))
- return NULL;
- BackPixPat(pp);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &pp))
+ return NULL;
+ BackPixPat(pp);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_GetPixPat(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- PixPatHandle _rv;
- short patID;
+ PyObject *_res = NULL;
+ PixPatHandle _rv;
+ short patID;
#ifndef GetPixPat
- PyMac_PRECHECK(GetPixPat);
+ PyMac_PRECHECK(GetPixPat);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &patID))
- return NULL;
- _rv = GetPixPat(patID);
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &patID))
+ return NULL;
+ _rv = GetPixPat(patID);
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *Qd_MakeRGBPat(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- PixPatHandle pp;
- RGBColor myColor;
+ PyObject *_res = NULL;
+ PixPatHandle pp;
+ RGBColor myColor;
#ifndef MakeRGBPat
- PyMac_PRECHECK(MakeRGBPat);
+ PyMac_PRECHECK(MakeRGBPat);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- ResObj_Convert, &pp,
- QdRGB_Convert, &myColor))
- return NULL;
- MakeRGBPat(pp,
- &myColor);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ ResObj_Convert, &pp,
+ QdRGB_Convert, &myColor))
+ return NULL;
+ MakeRGBPat(pp,
+ &myColor);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_FillCRect(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Rect r;
- PixPatHandle pp;
+ PyObject *_res = NULL;
+ Rect r;
+ PixPatHandle pp;
#ifndef FillCRect
- PyMac_PRECHECK(FillCRect);
+ PyMac_PRECHECK(FillCRect);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- PyMac_GetRect, &r,
- ResObj_Convert, &pp))
- return NULL;
- FillCRect(&r,
- pp);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ PyMac_GetRect, &r,
+ ResObj_Convert, &pp))
+ return NULL;
+ FillCRect(&r,
+ pp);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_FillCOval(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Rect r;
- PixPatHandle pp;
+ PyObject *_res = NULL;
+ Rect r;
+ PixPatHandle pp;
#ifndef FillCOval
- PyMac_PRECHECK(FillCOval);
+ PyMac_PRECHECK(FillCOval);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- PyMac_GetRect, &r,
- ResObj_Convert, &pp))
- return NULL;
- FillCOval(&r,
- pp);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ PyMac_GetRect, &r,
+ ResObj_Convert, &pp))
+ return NULL;
+ FillCOval(&r,
+ pp);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_FillCRoundRect(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Rect r;
- short ovalWidth;
- short ovalHeight;
- PixPatHandle pp;
+ PyObject *_res = NULL;
+ Rect r;
+ short ovalWidth;
+ short ovalHeight;
+ PixPatHandle pp;
#ifndef FillCRoundRect
- PyMac_PRECHECK(FillCRoundRect);
-#endif
- if (!PyArg_ParseTuple(_args, "O&hhO&",
- PyMac_GetRect, &r,
- &ovalWidth,
- &ovalHeight,
- ResObj_Convert, &pp))
- return NULL;
- FillCRoundRect(&r,
- ovalWidth,
- ovalHeight,
- pp);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(FillCRoundRect);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&hhO&",
+ PyMac_GetRect, &r,
+ &ovalWidth,
+ &ovalHeight,
+ ResObj_Convert, &pp))
+ return NULL;
+ FillCRoundRect(&r,
+ ovalWidth,
+ ovalHeight,
+ pp);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_FillCArc(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Rect r;
- short startAngle;
- short arcAngle;
- PixPatHandle pp;
+ PyObject *_res = NULL;
+ Rect r;
+ short startAngle;
+ short arcAngle;
+ PixPatHandle pp;
#ifndef FillCArc
- PyMac_PRECHECK(FillCArc);
-#endif
- if (!PyArg_ParseTuple(_args, "O&hhO&",
- PyMac_GetRect, &r,
- &startAngle,
- &arcAngle,
- ResObj_Convert, &pp))
- return NULL;
- FillCArc(&r,
- startAngle,
- arcAngle,
- pp);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(FillCArc);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&hhO&",
+ PyMac_GetRect, &r,
+ &startAngle,
+ &arcAngle,
+ ResObj_Convert, &pp))
+ return NULL;
+ FillCArc(&r,
+ startAngle,
+ arcAngle,
+ pp);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_FillCRgn(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RgnHandle rgn;
- PixPatHandle pp;
+ PyObject *_res = NULL;
+ RgnHandle rgn;
+ PixPatHandle pp;
#ifndef FillCRgn
- PyMac_PRECHECK(FillCRgn);
+ PyMac_PRECHECK(FillCRgn);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- ResObj_Convert, &rgn,
- ResObj_Convert, &pp))
- return NULL;
- FillCRgn(rgn,
- pp);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ ResObj_Convert, &rgn,
+ ResObj_Convert, &pp))
+ return NULL;
+ FillCRgn(rgn,
+ pp);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_FillCPoly(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- PolyHandle poly;
- PixPatHandle pp;
+ PyObject *_res = NULL;
+ PolyHandle poly;
+ PixPatHandle pp;
#ifndef FillCPoly
- PyMac_PRECHECK(FillCPoly);
+ PyMac_PRECHECK(FillCPoly);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- ResObj_Convert, &poly,
- ResObj_Convert, &pp))
- return NULL;
- FillCPoly(poly,
- pp);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ ResObj_Convert, &poly,
+ ResObj_Convert, &pp))
+ return NULL;
+ FillCPoly(poly,
+ pp);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_RGBForeColor(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RGBColor color;
+ PyObject *_res = NULL;
+ RGBColor color;
#ifndef RGBForeColor
- PyMac_PRECHECK(RGBForeColor);
+ PyMac_PRECHECK(RGBForeColor);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- QdRGB_Convert, &color))
- return NULL;
- RGBForeColor(&color);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ QdRGB_Convert, &color))
+ return NULL;
+ RGBForeColor(&color);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_RGBBackColor(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RGBColor color;
+ PyObject *_res = NULL;
+ RGBColor color;
#ifndef RGBBackColor
- PyMac_PRECHECK(RGBBackColor);
+ PyMac_PRECHECK(RGBBackColor);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- QdRGB_Convert, &color))
- return NULL;
- RGBBackColor(&color);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ QdRGB_Convert, &color))
+ return NULL;
+ RGBBackColor(&color);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_SetCPixel(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short h;
- short v;
- RGBColor cPix;
+ PyObject *_res = NULL;
+ short h;
+ short v;
+ RGBColor cPix;
#ifndef SetCPixel
- PyMac_PRECHECK(SetCPixel);
+ PyMac_PRECHECK(SetCPixel);
#endif
- if (!PyArg_ParseTuple(_args, "hhO&",
- &h,
- &v,
- QdRGB_Convert, &cPix))
- return NULL;
- SetCPixel(h,
- v,
- &cPix);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "hhO&",
+ &h,
+ &v,
+ QdRGB_Convert, &cPix))
+ return NULL;
+ SetCPixel(h,
+ v,
+ &cPix);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_SetPortPix(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- PixMapHandle pm;
+ PyObject *_res = NULL;
+ PixMapHandle pm;
#ifndef SetPortPix
- PyMac_PRECHECK(SetPortPix);
+ PyMac_PRECHECK(SetPortPix);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &pm))
- return NULL;
- SetPortPix(pm);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &pm))
+ return NULL;
+ SetPortPix(pm);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_GetCPixel(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short h;
- short v;
- RGBColor cPix;
+ PyObject *_res = NULL;
+ short h;
+ short v;
+ RGBColor cPix;
#ifndef GetCPixel
- PyMac_PRECHECK(GetCPixel);
+ PyMac_PRECHECK(GetCPixel);
#endif
- if (!PyArg_ParseTuple(_args, "hh",
- &h,
- &v))
- return NULL;
- GetCPixel(h,
- v,
- &cPix);
- _res = Py_BuildValue("O&",
- QdRGB_New, &cPix);
- return _res;
+ if (!PyArg_ParseTuple(_args, "hh",
+ &h,
+ &v))
+ return NULL;
+ GetCPixel(h,
+ v,
+ &cPix);
+ _res = Py_BuildValue("O&",
+ QdRGB_New, &cPix);
+ return _res;
}
static PyObject *Qd_GetForeColor(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RGBColor color;
+ PyObject *_res = NULL;
+ RGBColor color;
#ifndef GetForeColor
- PyMac_PRECHECK(GetForeColor);
+ PyMac_PRECHECK(GetForeColor);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- GetForeColor(&color);
- _res = Py_BuildValue("O&",
- QdRGB_New, &color);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ GetForeColor(&color);
+ _res = Py_BuildValue("O&",
+ QdRGB_New, &color);
+ return _res;
}
static PyObject *Qd_GetBackColor(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RGBColor color;
+ PyObject *_res = NULL;
+ RGBColor color;
#ifndef GetBackColor
- PyMac_PRECHECK(GetBackColor);
+ PyMac_PRECHECK(GetBackColor);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- GetBackColor(&color);
- _res = Py_BuildValue("O&",
- QdRGB_New, &color);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ GetBackColor(&color);
+ _res = Py_BuildValue("O&",
+ QdRGB_New, &color);
+ return _res;
}
static PyObject *Qd_OpColor(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RGBColor color;
+ PyObject *_res = NULL;
+ RGBColor color;
#ifndef OpColor
- PyMac_PRECHECK(OpColor);
+ PyMac_PRECHECK(OpColor);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- QdRGB_Convert, &color))
- return NULL;
- OpColor(&color);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ QdRGB_Convert, &color))
+ return NULL;
+ OpColor(&color);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_HiliteColor(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RGBColor color;
+ PyObject *_res = NULL;
+ RGBColor color;
#ifndef HiliteColor
- PyMac_PRECHECK(HiliteColor);
+ PyMac_PRECHECK(HiliteColor);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- QdRGB_Convert, &color))
- return NULL;
- HiliteColor(&color);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ QdRGB_Convert, &color))
+ return NULL;
+ HiliteColor(&color);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_DisposeCTable(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CTabHandle cTable;
+ PyObject *_res = NULL;
+ CTabHandle cTable;
#ifndef DisposeCTable
- PyMac_PRECHECK(DisposeCTable);
+ PyMac_PRECHECK(DisposeCTable);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &cTable))
- return NULL;
- DisposeCTable(cTable);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &cTable))
+ return NULL;
+ DisposeCTable(cTable);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_GetCTable(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CTabHandle _rv;
- short ctID;
+ PyObject *_res = NULL;
+ CTabHandle _rv;
+ short ctID;
#ifndef GetCTable
- PyMac_PRECHECK(GetCTable);
+ PyMac_PRECHECK(GetCTable);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &ctID))
- return NULL;
- _rv = GetCTable(ctID);
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &ctID))
+ return NULL;
+ _rv = GetCTable(ctID);
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *Qd_GetCCursor(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CCrsrHandle _rv;
- short crsrID;
+ PyObject *_res = NULL;
+ CCrsrHandle _rv;
+ short crsrID;
#ifndef GetCCursor
- PyMac_PRECHECK(GetCCursor);
+ PyMac_PRECHECK(GetCCursor);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &crsrID))
- return NULL;
- _rv = GetCCursor(crsrID);
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &crsrID))
+ return NULL;
+ _rv = GetCCursor(crsrID);
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *Qd_SetCCursor(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CCrsrHandle cCrsr;
+ PyObject *_res = NULL;
+ CCrsrHandle cCrsr;
#ifndef SetCCursor
- PyMac_PRECHECK(SetCCursor);
+ PyMac_PRECHECK(SetCCursor);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &cCrsr))
- return NULL;
- SetCCursor(cCrsr);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &cCrsr))
+ return NULL;
+ SetCCursor(cCrsr);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_AllocCursor(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef AllocCursor
- PyMac_PRECHECK(AllocCursor);
+ PyMac_PRECHECK(AllocCursor);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- AllocCursor();
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ AllocCursor();
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_DisposeCCursor(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CCrsrHandle cCrsr;
+ PyObject *_res = NULL;
+ CCrsrHandle cCrsr;
#ifndef DisposeCCursor
- PyMac_PRECHECK(DisposeCCursor);
+ PyMac_PRECHECK(DisposeCCursor);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &cCrsr))
- return NULL;
- DisposeCCursor(cCrsr);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &cCrsr))
+ return NULL;
+ DisposeCCursor(cCrsr);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_GetMaxDevice(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- GDHandle _rv;
- Rect globalRect;
+ PyObject *_res = NULL;
+ GDHandle _rv;
+ Rect globalRect;
#ifndef GetMaxDevice
- PyMac_PRECHECK(GetMaxDevice);
+ PyMac_PRECHECK(GetMaxDevice);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetRect, &globalRect))
- return NULL;
- _rv = GetMaxDevice(&globalRect);
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetRect, &globalRect))
+ return NULL;
+ _rv = GetMaxDevice(&globalRect);
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *Qd_GetCTSeed(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- long _rv;
+ PyObject *_res = NULL;
+ long _rv;
#ifndef GetCTSeed
- PyMac_PRECHECK(GetCTSeed);
+ PyMac_PRECHECK(GetCTSeed);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetCTSeed();
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetCTSeed();
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qd_GetDeviceList(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- GDHandle _rv;
+ PyObject *_res = NULL;
+ GDHandle _rv;
#ifndef GetDeviceList
- PyMac_PRECHECK(GetDeviceList);
+ PyMac_PRECHECK(GetDeviceList);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetDeviceList();
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetDeviceList();
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *Qd_GetMainDevice(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- GDHandle _rv;
+ PyObject *_res = NULL;
+ GDHandle _rv;
#ifndef GetMainDevice
- PyMac_PRECHECK(GetMainDevice);
+ PyMac_PRECHECK(GetMainDevice);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetMainDevice();
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetMainDevice();
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *Qd_GetNextDevice(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- GDHandle _rv;
- GDHandle curDevice;
+ PyObject *_res = NULL;
+ GDHandle _rv;
+ GDHandle curDevice;
#ifndef GetNextDevice
- PyMac_PRECHECK(GetNextDevice);
+ PyMac_PRECHECK(GetNextDevice);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &curDevice))
- return NULL;
- _rv = GetNextDevice(curDevice);
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &curDevice))
+ return NULL;
+ _rv = GetNextDevice(curDevice);
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *Qd_TestDeviceAttribute(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- GDHandle gdh;
- short attribute;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ GDHandle gdh;
+ short attribute;
#ifndef TestDeviceAttribute
- PyMac_PRECHECK(TestDeviceAttribute);
+ PyMac_PRECHECK(TestDeviceAttribute);
#endif
- if (!PyArg_ParseTuple(_args, "O&h",
- ResObj_Convert, &gdh,
- &attribute))
- return NULL;
- _rv = TestDeviceAttribute(gdh,
- attribute);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&h",
+ ResObj_Convert, &gdh,
+ &attribute))
+ return NULL;
+ _rv = TestDeviceAttribute(gdh,
+ attribute);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *Qd_SetDeviceAttribute(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- GDHandle gdh;
- short attribute;
- Boolean value;
+ PyObject *_res = NULL;
+ GDHandle gdh;
+ short attribute;
+ Boolean value;
#ifndef SetDeviceAttribute
- PyMac_PRECHECK(SetDeviceAttribute);
+ PyMac_PRECHECK(SetDeviceAttribute);
#endif
- if (!PyArg_ParseTuple(_args, "O&hb",
- ResObj_Convert, &gdh,
- &attribute,
- &value))
- return NULL;
- SetDeviceAttribute(gdh,
- attribute,
- value);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&hb",
+ ResObj_Convert, &gdh,
+ &attribute,
+ &value))
+ return NULL;
+ SetDeviceAttribute(gdh,
+ attribute,
+ value);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_InitGDevice(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short qdRefNum;
- long mode;
- GDHandle gdh;
+ PyObject *_res = NULL;
+ short qdRefNum;
+ long mode;
+ GDHandle gdh;
#ifndef InitGDevice
- PyMac_PRECHECK(InitGDevice);
+ PyMac_PRECHECK(InitGDevice);
#endif
- if (!PyArg_ParseTuple(_args, "hlO&",
- &qdRefNum,
- &mode,
- ResObj_Convert, &gdh))
- return NULL;
- InitGDevice(qdRefNum,
- mode,
- gdh);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "hlO&",
+ &qdRefNum,
+ &mode,
+ ResObj_Convert, &gdh))
+ return NULL;
+ InitGDevice(qdRefNum,
+ mode,
+ gdh);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_NewGDevice(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- GDHandle _rv;
- short refNum;
- long mode;
+ PyObject *_res = NULL;
+ GDHandle _rv;
+ short refNum;
+ long mode;
#ifndef NewGDevice
- PyMac_PRECHECK(NewGDevice);
+ PyMac_PRECHECK(NewGDevice);
#endif
- if (!PyArg_ParseTuple(_args, "hl",
- &refNum,
- &mode))
- return NULL;
- _rv = NewGDevice(refNum,
- mode);
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "hl",
+ &refNum,
+ &mode))
+ return NULL;
+ _rv = NewGDevice(refNum,
+ mode);
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *Qd_DisposeGDevice(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- GDHandle gdh;
+ PyObject *_res = NULL;
+ GDHandle gdh;
#ifndef DisposeGDevice
- PyMac_PRECHECK(DisposeGDevice);
+ PyMac_PRECHECK(DisposeGDevice);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &gdh))
- return NULL;
- DisposeGDevice(gdh);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &gdh))
+ return NULL;
+ DisposeGDevice(gdh);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_SetGDevice(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- GDHandle gd;
+ PyObject *_res = NULL;
+ GDHandle gd;
#ifndef SetGDevice
- PyMac_PRECHECK(SetGDevice);
+ PyMac_PRECHECK(SetGDevice);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &gd))
- return NULL;
- SetGDevice(gd);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &gd))
+ return NULL;
+ SetGDevice(gd);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_GetGDevice(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- GDHandle _rv;
+ PyObject *_res = NULL;
+ GDHandle _rv;
#ifndef GetGDevice
- PyMac_PRECHECK(GetGDevice);
+ PyMac_PRECHECK(GetGDevice);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetGDevice();
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetGDevice();
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *Qd_Color2Index(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- long _rv;
- RGBColor myColor;
+ PyObject *_res = NULL;
+ long _rv;
+ RGBColor myColor;
#ifndef Color2Index
- PyMac_PRECHECK(Color2Index);
+ PyMac_PRECHECK(Color2Index);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- QdRGB_Convert, &myColor))
- return NULL;
- _rv = Color2Index(&myColor);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ QdRGB_Convert, &myColor))
+ return NULL;
+ _rv = Color2Index(&myColor);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qd_Index2Color(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- long index;
- RGBColor aColor;
+ PyObject *_res = NULL;
+ long index;
+ RGBColor aColor;
#ifndef Index2Color
- PyMac_PRECHECK(Index2Color);
+ PyMac_PRECHECK(Index2Color);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &index))
- return NULL;
- Index2Color(index,
- &aColor);
- _res = Py_BuildValue("O&",
- QdRGB_New, &aColor);
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &index))
+ return NULL;
+ Index2Color(index,
+ &aColor);
+ _res = Py_BuildValue("O&",
+ QdRGB_New, &aColor);
+ return _res;
}
static PyObject *Qd_InvertColor(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RGBColor myColor;
+ PyObject *_res = NULL;
+ RGBColor myColor;
#ifndef InvertColor
- PyMac_PRECHECK(InvertColor);
+ PyMac_PRECHECK(InvertColor);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- InvertColor(&myColor);
- _res = Py_BuildValue("O&",
- QdRGB_New, &myColor);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ InvertColor(&myColor);
+ _res = Py_BuildValue("O&",
+ QdRGB_New, &myColor);
+ return _res;
}
static PyObject *Qd_RealColor(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- RGBColor color;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ RGBColor color;
#ifndef RealColor
- PyMac_PRECHECK(RealColor);
+ PyMac_PRECHECK(RealColor);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- QdRGB_Convert, &color))
- return NULL;
- _rv = RealColor(&color);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ QdRGB_Convert, &color))
+ return NULL;
+ _rv = RealColor(&color);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *Qd_GetSubTable(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CTabHandle myColors;
- short iTabRes;
- CTabHandle targetTbl;
+ PyObject *_res = NULL;
+ CTabHandle myColors;
+ short iTabRes;
+ CTabHandle targetTbl;
#ifndef GetSubTable
- PyMac_PRECHECK(GetSubTable);
+ PyMac_PRECHECK(GetSubTable);
#endif
- if (!PyArg_ParseTuple(_args, "O&hO&",
- ResObj_Convert, &myColors,
- &iTabRes,
- ResObj_Convert, &targetTbl))
- return NULL;
- GetSubTable(myColors,
- iTabRes,
- targetTbl);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&hO&",
+ ResObj_Convert, &myColors,
+ &iTabRes,
+ ResObj_Convert, &targetTbl))
+ return NULL;
+ GetSubTable(myColors,
+ iTabRes,
+ targetTbl);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_MakeITable(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CTabHandle cTabH;
- ITabHandle iTabH;
- short res;
+ PyObject *_res = NULL;
+ CTabHandle cTabH;
+ ITabHandle iTabH;
+ short res;
#ifndef MakeITable
- PyMac_PRECHECK(MakeITable);
+ PyMac_PRECHECK(MakeITable);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&h",
- ResObj_Convert, &cTabH,
- ResObj_Convert, &iTabH,
- &res))
- return NULL;
- MakeITable(cTabH,
- iTabH,
- res);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&h",
+ ResObj_Convert, &cTabH,
+ ResObj_Convert, &iTabH,
+ &res))
+ return NULL;
+ MakeITable(cTabH,
+ iTabH,
+ res);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_SetClientID(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short id;
+ PyObject *_res = NULL;
+ short id;
#ifndef SetClientID
- PyMac_PRECHECK(SetClientID);
+ PyMac_PRECHECK(SetClientID);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &id))
- return NULL;
- SetClientID(id);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &id))
+ return NULL;
+ SetClientID(id);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_ProtectEntry(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short index;
- Boolean protect;
+ PyObject *_res = NULL;
+ short index;
+ Boolean protect;
#ifndef ProtectEntry
- PyMac_PRECHECK(ProtectEntry);
+ PyMac_PRECHECK(ProtectEntry);
#endif
- if (!PyArg_ParseTuple(_args, "hb",
- &index,
- &protect))
- return NULL;
- ProtectEntry(index,
- protect);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "hb",
+ &index,
+ &protect))
+ return NULL;
+ ProtectEntry(index,
+ protect);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_ReserveEntry(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short index;
- Boolean reserve;
+ PyObject *_res = NULL;
+ short index;
+ Boolean reserve;
#ifndef ReserveEntry
- PyMac_PRECHECK(ReserveEntry);
+ PyMac_PRECHECK(ReserveEntry);
#endif
- if (!PyArg_ParseTuple(_args, "hb",
- &index,
- &reserve))
- return NULL;
- ReserveEntry(index,
- reserve);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "hb",
+ &index,
+ &reserve))
+ return NULL;
+ ReserveEntry(index,
+ reserve);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_QDError(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short _rv;
+ PyObject *_res = NULL;
+ short _rv;
#ifndef QDError
- PyMac_PRECHECK(QDError);
+ PyMac_PRECHECK(QDError);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = QDError();
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = QDError();
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *Qd_CopyDeepMask(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- BitMapPtr srcBits;
- BitMapPtr maskBits;
- BitMapPtr dstBits;
- Rect srcRect;
- Rect maskRect;
- Rect dstRect;
- short mode;
- RgnHandle maskRgn;
+ PyObject *_res = NULL;
+ BitMapPtr srcBits;
+ BitMapPtr maskBits;
+ BitMapPtr dstBits;
+ Rect srcRect;
+ Rect maskRect;
+ Rect dstRect;
+ short mode;
+ RgnHandle maskRgn;
#ifndef CopyDeepMask
- PyMac_PRECHECK(CopyDeepMask);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&O&O&O&hO&",
- BMObj_Convert, &srcBits,
- BMObj_Convert, &maskBits,
- BMObj_Convert, &dstBits,
- PyMac_GetRect, &srcRect,
- PyMac_GetRect, &maskRect,
- PyMac_GetRect, &dstRect,
- &mode,
- OptResObj_Convert, &maskRgn))
- return NULL;
- CopyDeepMask(srcBits,
- maskBits,
- dstBits,
- &srcRect,
- &maskRect,
- &dstRect,
- mode,
- maskRgn);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(CopyDeepMask);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&O&O&O&hO&",
+ BMObj_Convert, &srcBits,
+ BMObj_Convert, &maskBits,
+ BMObj_Convert, &dstBits,
+ PyMac_GetRect, &srcRect,
+ PyMac_GetRect, &maskRect,
+ PyMac_GetRect, &dstRect,
+ &mode,
+ OptResObj_Convert, &maskRgn))
+ return NULL;
+ CopyDeepMask(srcBits,
+ maskBits,
+ dstBits,
+ &srcRect,
+ &maskRect,
+ &dstRect,
+ mode,
+ maskRgn);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_GetPattern(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- PatHandle _rv;
- short patternID;
+ PyObject *_res = NULL;
+ PatHandle _rv;
+ short patternID;
#ifndef GetPattern
- PyMac_PRECHECK(GetPattern);
+ PyMac_PRECHECK(GetPattern);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &patternID))
- return NULL;
- _rv = GetPattern(patternID);
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &patternID))
+ return NULL;
+ _rv = GetPattern(patternID);
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *Qd_MacGetCursor(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CursHandle _rv;
- short cursorID;
+ PyObject *_res = NULL;
+ CursHandle _rv;
+ short cursorID;
#ifndef MacGetCursor
- PyMac_PRECHECK(MacGetCursor);
+ PyMac_PRECHECK(MacGetCursor);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &cursorID))
- return NULL;
- _rv = MacGetCursor(cursorID);
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &cursorID))
+ return NULL;
+ _rv = MacGetCursor(cursorID);
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *Qd_GetPicture(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- PicHandle _rv;
- short pictureID;
+ PyObject *_res = NULL;
+ PicHandle _rv;
+ short pictureID;
#ifndef GetPicture
- PyMac_PRECHECK(GetPicture);
+ PyMac_PRECHECK(GetPicture);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &pictureID))
- return NULL;
- _rv = GetPicture(pictureID);
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &pictureID))
+ return NULL;
+ _rv = GetPicture(pictureID);
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *Qd_DeltaPoint(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- long _rv;
- Point ptA;
- Point ptB;
+ PyObject *_res = NULL;
+ long _rv;
+ Point ptA;
+ Point ptB;
#ifndef DeltaPoint
- PyMac_PRECHECK(DeltaPoint);
+ PyMac_PRECHECK(DeltaPoint);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- PyMac_GetPoint, &ptA,
- PyMac_GetPoint, &ptB))
- return NULL;
- _rv = DeltaPoint(ptA,
- ptB);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ PyMac_GetPoint, &ptA,
+ PyMac_GetPoint, &ptB))
+ return NULL;
+ _rv = DeltaPoint(ptA,
+ ptB);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qd_ShieldCursor(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Rect shieldRect;
- Point offsetPt;
+ PyObject *_res = NULL;
+ Rect shieldRect;
+ Point offsetPt;
#ifndef ShieldCursor
- PyMac_PRECHECK(ShieldCursor);
+ PyMac_PRECHECK(ShieldCursor);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- PyMac_GetRect, &shieldRect,
- PyMac_GetPoint, &offsetPt))
- return NULL;
- ShieldCursor(&shieldRect,
- offsetPt);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ PyMac_GetRect, &shieldRect,
+ PyMac_GetPoint, &offsetPt))
+ return NULL;
+ ShieldCursor(&shieldRect,
+ offsetPt);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_ScreenRes(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short scrnHRes;
- short scrnVRes;
+ PyObject *_res = NULL;
+ short scrnHRes;
+ short scrnVRes;
#ifndef ScreenRes
- PyMac_PRECHECK(ScreenRes);
+ PyMac_PRECHECK(ScreenRes);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- ScreenRes(&scrnHRes,
- &scrnVRes);
- _res = Py_BuildValue("hh",
- scrnHRes,
- scrnVRes);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ ScreenRes(&scrnHRes,
+ &scrnVRes);
+ _res = Py_BuildValue("hh",
+ scrnHRes,
+ scrnVRes);
+ return _res;
}
static PyObject *Qd_GetIndPattern(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Pattern thePat__out__;
- short patternListID;
- short index;
+ PyObject *_res = NULL;
+ Pattern thePat__out__;
+ short patternListID;
+ short index;
#ifndef GetIndPattern
- PyMac_PRECHECK(GetIndPattern);
+ PyMac_PRECHECK(GetIndPattern);
#endif
- if (!PyArg_ParseTuple(_args, "hh",
- &patternListID,
- &index))
- return NULL;
- GetIndPattern(&thePat__out__,
- patternListID,
- index);
- _res = Py_BuildValue("s#",
- (char *)&thePat__out__, (int)sizeof(Pattern));
- return _res;
+ if (!PyArg_ParseTuple(_args, "hh",
+ &patternListID,
+ &index))
+ return NULL;
+ GetIndPattern(&thePat__out__,
+ patternListID,
+ index);
+ _res = Py_BuildValue("s#",
+ (char *)&thePat__out__, (int)sizeof(Pattern));
+ return _res;
}
static PyObject *Qd_SlopeFromAngle(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Fixed _rv;
- short angle;
+ PyObject *_res = NULL;
+ Fixed _rv;
+ short angle;
#ifndef SlopeFromAngle
- PyMac_PRECHECK(SlopeFromAngle);
+ PyMac_PRECHECK(SlopeFromAngle);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &angle))
- return NULL;
- _rv = SlopeFromAngle(angle);
- _res = Py_BuildValue("O&",
- PyMac_BuildFixed, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &angle))
+ return NULL;
+ _rv = SlopeFromAngle(angle);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildFixed, _rv);
+ return _res;
}
static PyObject *Qd_AngleFromSlope(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short _rv;
- Fixed slope;
+ PyObject *_res = NULL;
+ short _rv;
+ Fixed slope;
#ifndef AngleFromSlope
- PyMac_PRECHECK(AngleFromSlope);
+ PyMac_PRECHECK(AngleFromSlope);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetFixed, &slope))
- return NULL;
- _rv = AngleFromSlope(slope);
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetFixed, &slope))
+ return NULL;
+ _rv = AngleFromSlope(slope);
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *Qd_GetPixBounds(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- PixMapHandle pixMap;
- Rect bounds;
+ PyObject *_res = NULL;
+ PixMapHandle pixMap;
+ Rect bounds;
#ifndef GetPixBounds
- PyMac_PRECHECK(GetPixBounds);
+ PyMac_PRECHECK(GetPixBounds);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &pixMap))
- return NULL;
- GetPixBounds(pixMap,
- &bounds);
- _res = Py_BuildValue("O&",
- PyMac_BuildRect, &bounds);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &pixMap))
+ return NULL;
+ GetPixBounds(pixMap,
+ &bounds);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildRect, &bounds);
+ return _res;
}
static PyObject *Qd_GetPixDepth(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short _rv;
- PixMapHandle pixMap;
+ PyObject *_res = NULL;
+ short _rv;
+ PixMapHandle pixMap;
#ifndef GetPixDepth
- PyMac_PRECHECK(GetPixDepth);
+ PyMac_PRECHECK(GetPixDepth);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &pixMap))
- return NULL;
- _rv = GetPixDepth(pixMap);
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &pixMap))
+ return NULL;
+ _rv = GetPixDepth(pixMap);
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *Qd_GetQDGlobalsRandomSeed(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- long _rv;
+ PyObject *_res = NULL;
+ long _rv;
#ifndef GetQDGlobalsRandomSeed
- PyMac_PRECHECK(GetQDGlobalsRandomSeed);
+ PyMac_PRECHECK(GetQDGlobalsRandomSeed);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetQDGlobalsRandomSeed();
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetQDGlobalsRandomSeed();
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qd_GetQDGlobalsScreenBits(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- BitMap screenBits;
+ PyObject *_res = NULL;
+ BitMap screenBits;
#ifndef GetQDGlobalsScreenBits
- PyMac_PRECHECK(GetQDGlobalsScreenBits);
+ PyMac_PRECHECK(GetQDGlobalsScreenBits);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- GetQDGlobalsScreenBits(&screenBits);
- _res = Py_BuildValue("O&",
- BMObj_NewCopied, &screenBits);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ GetQDGlobalsScreenBits(&screenBits);
+ _res = Py_BuildValue("O&",
+ BMObj_NewCopied, &screenBits);
+ return _res;
}
static PyObject *Qd_GetQDGlobalsArrow(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Cursor arrow__out__;
+ PyObject *_res = NULL;
+ Cursor arrow__out__;
#ifndef GetQDGlobalsArrow
- PyMac_PRECHECK(GetQDGlobalsArrow);
+ PyMac_PRECHECK(GetQDGlobalsArrow);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- GetQDGlobalsArrow(&arrow__out__);
- _res = Py_BuildValue("s#",
- (char *)&arrow__out__, (int)sizeof(Cursor));
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ GetQDGlobalsArrow(&arrow__out__);
+ _res = Py_BuildValue("s#",
+ (char *)&arrow__out__, (int)sizeof(Cursor));
+ return _res;
}
static PyObject *Qd_GetQDGlobalsDarkGray(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Pattern dkGray__out__;
+ PyObject *_res = NULL;
+ Pattern dkGray__out__;
#ifndef GetQDGlobalsDarkGray
- PyMac_PRECHECK(GetQDGlobalsDarkGray);
+ PyMac_PRECHECK(GetQDGlobalsDarkGray);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- GetQDGlobalsDarkGray(&dkGray__out__);
- _res = Py_BuildValue("s#",
- (char *)&dkGray__out__, (int)sizeof(Pattern));
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ GetQDGlobalsDarkGray(&dkGray__out__);
+ _res = Py_BuildValue("s#",
+ (char *)&dkGray__out__, (int)sizeof(Pattern));
+ return _res;
}
static PyObject *Qd_GetQDGlobalsLightGray(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Pattern ltGray__out__;
+ PyObject *_res = NULL;
+ Pattern ltGray__out__;
#ifndef GetQDGlobalsLightGray
- PyMac_PRECHECK(GetQDGlobalsLightGray);
+ PyMac_PRECHECK(GetQDGlobalsLightGray);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- GetQDGlobalsLightGray(&ltGray__out__);
- _res = Py_BuildValue("s#",
- (char *)&ltGray__out__, (int)sizeof(Pattern));
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ GetQDGlobalsLightGray(&ltGray__out__);
+ _res = Py_BuildValue("s#",
+ (char *)&ltGray__out__, (int)sizeof(Pattern));
+ return _res;
}
static PyObject *Qd_GetQDGlobalsGray(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Pattern gray__out__;
+ PyObject *_res = NULL;
+ Pattern gray__out__;
#ifndef GetQDGlobalsGray
- PyMac_PRECHECK(GetQDGlobalsGray);
+ PyMac_PRECHECK(GetQDGlobalsGray);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- GetQDGlobalsGray(&gray__out__);
- _res = Py_BuildValue("s#",
- (char *)&gray__out__, (int)sizeof(Pattern));
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ GetQDGlobalsGray(&gray__out__);
+ _res = Py_BuildValue("s#",
+ (char *)&gray__out__, (int)sizeof(Pattern));
+ return _res;
}
static PyObject *Qd_GetQDGlobalsBlack(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Pattern black__out__;
+ PyObject *_res = NULL;
+ Pattern black__out__;
#ifndef GetQDGlobalsBlack
- PyMac_PRECHECK(GetQDGlobalsBlack);
+ PyMac_PRECHECK(GetQDGlobalsBlack);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- GetQDGlobalsBlack(&black__out__);
- _res = Py_BuildValue("s#",
- (char *)&black__out__, (int)sizeof(Pattern));
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ GetQDGlobalsBlack(&black__out__);
+ _res = Py_BuildValue("s#",
+ (char *)&black__out__, (int)sizeof(Pattern));
+ return _res;
}
static PyObject *Qd_GetQDGlobalsWhite(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Pattern white__out__;
+ PyObject *_res = NULL;
+ Pattern white__out__;
#ifndef GetQDGlobalsWhite
- PyMac_PRECHECK(GetQDGlobalsWhite);
+ PyMac_PRECHECK(GetQDGlobalsWhite);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- GetQDGlobalsWhite(&white__out__);
- _res = Py_BuildValue("s#",
- (char *)&white__out__, (int)sizeof(Pattern));
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ GetQDGlobalsWhite(&white__out__);
+ _res = Py_BuildValue("s#",
+ (char *)&white__out__, (int)sizeof(Pattern));
+ return _res;
}
static PyObject *Qd_GetQDGlobalsThePort(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CGrafPtr _rv;
+ PyObject *_res = NULL;
+ CGrafPtr _rv;
#ifndef GetQDGlobalsThePort
- PyMac_PRECHECK(GetQDGlobalsThePort);
+ PyMac_PRECHECK(GetQDGlobalsThePort);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetQDGlobalsThePort();
- _res = Py_BuildValue("O&",
- GrafObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetQDGlobalsThePort();
+ _res = Py_BuildValue("O&",
+ GrafObj_New, _rv);
+ return _res;
}
static PyObject *Qd_SetQDGlobalsRandomSeed(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- long randomSeed;
+ PyObject *_res = NULL;
+ long randomSeed;
#ifndef SetQDGlobalsRandomSeed
- PyMac_PRECHECK(SetQDGlobalsRandomSeed);
+ PyMac_PRECHECK(SetQDGlobalsRandomSeed);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &randomSeed))
- return NULL;
- SetQDGlobalsRandomSeed(randomSeed);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &randomSeed))
+ return NULL;
+ SetQDGlobalsRandomSeed(randomSeed);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_SetQDGlobalsArrow(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Cursor *arrow__in__;
- int arrow__in_len__;
+ PyObject *_res = NULL;
+ Cursor *arrow__in__;
+ int arrow__in_len__;
#ifndef SetQDGlobalsArrow
- PyMac_PRECHECK(SetQDGlobalsArrow);
-#endif
- if (!PyArg_ParseTuple(_args, "s#",
- (char **)&arrow__in__, &arrow__in_len__))
- return NULL;
- if (arrow__in_len__ != sizeof(Cursor))
- {
- PyErr_SetString(PyExc_TypeError, "buffer length should be sizeof(Cursor)");
- goto arrow__error__;
- }
- SetQDGlobalsArrow(arrow__in__);
- Py_INCREF(Py_None);
- _res = Py_None;
+ PyMac_PRECHECK(SetQDGlobalsArrow);
+#endif
+ if (!PyArg_ParseTuple(_args, "s#",
+ (char **)&arrow__in__, &arrow__in_len__))
+ return NULL;
+ if (arrow__in_len__ != sizeof(Cursor))
+ {
+ PyErr_SetString(PyExc_TypeError, "buffer length should be sizeof(Cursor)");
+ goto arrow__error__;
+ }
+ SetQDGlobalsArrow(arrow__in__);
+ Py_INCREF(Py_None);
+ _res = Py_None;
arrow__error__: ;
- return _res;
+ return _res;
}
static PyObject *Qd_GetRegionBounds(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RgnHandle region;
- Rect bounds;
+ PyObject *_res = NULL;
+ RgnHandle region;
+ Rect bounds;
#ifndef GetRegionBounds
- PyMac_PRECHECK(GetRegionBounds);
+ PyMac_PRECHECK(GetRegionBounds);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &region))
- return NULL;
- GetRegionBounds(region,
- &bounds);
- _res = Py_BuildValue("O&",
- PyMac_BuildRect, &bounds);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &region))
+ return NULL;
+ GetRegionBounds(region,
+ &bounds);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildRect, &bounds);
+ return _res;
}
static PyObject *Qd_IsRegionRectangular(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- RgnHandle region;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ RgnHandle region;
#ifndef IsRegionRectangular
- PyMac_PRECHECK(IsRegionRectangular);
+ PyMac_PRECHECK(IsRegionRectangular);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &region))
- return NULL;
- _rv = IsRegionRectangular(region);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &region))
+ return NULL;
+ _rv = IsRegionRectangular(region);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *Qd_CreateNewPort(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CGrafPtr _rv;
+ PyObject *_res = NULL;
+ CGrafPtr _rv;
#ifndef CreateNewPort
- PyMac_PRECHECK(CreateNewPort);
+ PyMac_PRECHECK(CreateNewPort);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = CreateNewPort();
- _res = Py_BuildValue("O&",
- GrafObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = CreateNewPort();
+ _res = Py_BuildValue("O&",
+ GrafObj_New, _rv);
+ return _res;
}
static PyObject *Qd_SetQDError(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr err;
+ PyObject *_res = NULL;
+ OSErr err;
#ifndef SetQDError
- PyMac_PRECHECK(SetQDError);
+ PyMac_PRECHECK(SetQDError);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &err))
- return NULL;
- SetQDError(err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &err))
+ return NULL;
+ SetQDError(err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_LMGetScrVRes(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- SInt16 _rv;
+ PyObject *_res = NULL;
+ SInt16 _rv;
#ifndef LMGetScrVRes
- PyMac_PRECHECK(LMGetScrVRes);
+ PyMac_PRECHECK(LMGetScrVRes);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = LMGetScrVRes();
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = LMGetScrVRes();
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *Qd_LMSetScrVRes(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- SInt16 value;
+ PyObject *_res = NULL;
+ SInt16 value;
#ifndef LMSetScrVRes
- PyMac_PRECHECK(LMSetScrVRes);
+ PyMac_PRECHECK(LMSetScrVRes);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &value))
- return NULL;
- LMSetScrVRes(value);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &value))
+ return NULL;
+ LMSetScrVRes(value);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_LMGetScrHRes(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- SInt16 _rv;
+ PyObject *_res = NULL;
+ SInt16 _rv;
#ifndef LMGetScrHRes
- PyMac_PRECHECK(LMGetScrHRes);
+ PyMac_PRECHECK(LMGetScrHRes);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = LMGetScrHRes();
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = LMGetScrHRes();
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *Qd_LMSetScrHRes(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- SInt16 value;
+ PyObject *_res = NULL;
+ SInt16 value;
#ifndef LMSetScrHRes
- PyMac_PRECHECK(LMSetScrHRes);
+ PyMac_PRECHECK(LMSetScrHRes);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &value))
- return NULL;
- LMSetScrHRes(value);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &value))
+ return NULL;
+ LMSetScrHRes(value);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_LMGetMainDevice(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- GDHandle _rv;
+ PyObject *_res = NULL;
+ GDHandle _rv;
#ifndef LMGetMainDevice
- PyMac_PRECHECK(LMGetMainDevice);
+ PyMac_PRECHECK(LMGetMainDevice);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = LMGetMainDevice();
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = LMGetMainDevice();
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *Qd_LMSetMainDevice(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- GDHandle value;
+ PyObject *_res = NULL;
+ GDHandle value;
#ifndef LMSetMainDevice
- PyMac_PRECHECK(LMSetMainDevice);
+ PyMac_PRECHECK(LMSetMainDevice);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &value))
- return NULL;
- LMSetMainDevice(value);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &value))
+ return NULL;
+ LMSetMainDevice(value);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_LMGetDeviceList(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- GDHandle _rv;
+ PyObject *_res = NULL;
+ GDHandle _rv;
#ifndef LMGetDeviceList
- PyMac_PRECHECK(LMGetDeviceList);
+ PyMac_PRECHECK(LMGetDeviceList);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = LMGetDeviceList();
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = LMGetDeviceList();
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *Qd_LMSetDeviceList(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- GDHandle value;
+ PyObject *_res = NULL;
+ GDHandle value;
#ifndef LMSetDeviceList
- PyMac_PRECHECK(LMSetDeviceList);
+ PyMac_PRECHECK(LMSetDeviceList);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &value))
- return NULL;
- LMSetDeviceList(value);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &value))
+ return NULL;
+ LMSetDeviceList(value);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_LMGetQDColors(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Handle _rv;
+ PyObject *_res = NULL;
+ Handle _rv;
#ifndef LMGetQDColors
- PyMac_PRECHECK(LMGetQDColors);
+ PyMac_PRECHECK(LMGetQDColors);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = LMGetQDColors();
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = LMGetQDColors();
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *Qd_LMSetQDColors(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Handle value;
+ PyObject *_res = NULL;
+ Handle value;
#ifndef LMSetQDColors
- PyMac_PRECHECK(LMSetQDColors);
+ PyMac_PRECHECK(LMSetQDColors);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &value))
- return NULL;
- LMSetQDColors(value);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &value))
+ return NULL;
+ LMSetQDColors(value);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_LMGetWidthListHand(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Handle _rv;
+ PyObject *_res = NULL;
+ Handle _rv;
#ifndef LMGetWidthListHand
- PyMac_PRECHECK(LMGetWidthListHand);
+ PyMac_PRECHECK(LMGetWidthListHand);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = LMGetWidthListHand();
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = LMGetWidthListHand();
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *Qd_LMSetWidthListHand(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Handle value;
+ PyObject *_res = NULL;
+ Handle value;
#ifndef LMSetWidthListHand
- PyMac_PRECHECK(LMSetWidthListHand);
+ PyMac_PRECHECK(LMSetWidthListHand);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &value))
- return NULL;
- LMSetWidthListHand(value);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &value))
+ return NULL;
+ LMSetWidthListHand(value);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_LMGetHiliteMode(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- UInt8 _rv;
+ PyObject *_res = NULL;
+ UInt8 _rv;
#ifndef LMGetHiliteMode
- PyMac_PRECHECK(LMGetHiliteMode);
+ PyMac_PRECHECK(LMGetHiliteMode);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = LMGetHiliteMode();
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = LMGetHiliteMode();
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *Qd_LMSetHiliteMode(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- UInt8 value;
+ PyObject *_res = NULL;
+ UInt8 value;
#ifndef LMSetHiliteMode
- PyMac_PRECHECK(LMSetHiliteMode);
+ PyMac_PRECHECK(LMSetHiliteMode);
#endif
- if (!PyArg_ParseTuple(_args, "b",
- &value))
- return NULL;
- LMSetHiliteMode(value);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "b",
+ &value))
+ return NULL;
+ LMSetHiliteMode(value);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_LMGetWidthTabHandle(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Handle _rv;
+ PyObject *_res = NULL;
+ Handle _rv;
#ifndef LMGetWidthTabHandle
- PyMac_PRECHECK(LMGetWidthTabHandle);
+ PyMac_PRECHECK(LMGetWidthTabHandle);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = LMGetWidthTabHandle();
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = LMGetWidthTabHandle();
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *Qd_LMSetWidthTabHandle(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Handle value;
+ PyObject *_res = NULL;
+ Handle value;
#ifndef LMSetWidthTabHandle
- PyMac_PRECHECK(LMSetWidthTabHandle);
+ PyMac_PRECHECK(LMSetWidthTabHandle);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &value))
- return NULL;
- LMSetWidthTabHandle(value);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &value))
+ return NULL;
+ LMSetWidthTabHandle(value);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_LMGetLastSPExtra(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- SInt32 _rv;
+ PyObject *_res = NULL;
+ SInt32 _rv;
#ifndef LMGetLastSPExtra
- PyMac_PRECHECK(LMGetLastSPExtra);
+ PyMac_PRECHECK(LMGetLastSPExtra);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = LMGetLastSPExtra();
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = LMGetLastSPExtra();
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qd_LMSetLastSPExtra(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- SInt32 value;
+ PyObject *_res = NULL;
+ SInt32 value;
#ifndef LMSetLastSPExtra
- PyMac_PRECHECK(LMSetLastSPExtra);
+ PyMac_PRECHECK(LMSetLastSPExtra);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &value))
- return NULL;
- LMSetLastSPExtra(value);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &value))
+ return NULL;
+ LMSetLastSPExtra(value);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_LMGetLastFOND(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Handle _rv;
+ PyObject *_res = NULL;
+ Handle _rv;
#ifndef LMGetLastFOND
- PyMac_PRECHECK(LMGetLastFOND);
+ PyMac_PRECHECK(LMGetLastFOND);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = LMGetLastFOND();
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = LMGetLastFOND();
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *Qd_LMSetLastFOND(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Handle value;
+ PyObject *_res = NULL;
+ Handle value;
#ifndef LMSetLastFOND
- PyMac_PRECHECK(LMSetLastFOND);
+ PyMac_PRECHECK(LMSetLastFOND);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &value))
- return NULL;
- LMSetLastFOND(value);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &value))
+ return NULL;
+ LMSetLastFOND(value);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_LMGetFractEnable(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- UInt8 _rv;
+ PyObject *_res = NULL;
+ UInt8 _rv;
#ifndef LMGetFractEnable
- PyMac_PRECHECK(LMGetFractEnable);
+ PyMac_PRECHECK(LMGetFractEnable);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = LMGetFractEnable();
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = LMGetFractEnable();
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *Qd_LMSetFractEnable(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- UInt8 value;
+ PyObject *_res = NULL;
+ UInt8 value;
#ifndef LMSetFractEnable
- PyMac_PRECHECK(LMSetFractEnable);
+ PyMac_PRECHECK(LMSetFractEnable);
#endif
- if (!PyArg_ParseTuple(_args, "b",
- &value))
- return NULL;
- LMSetFractEnable(value);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "b",
+ &value))
+ return NULL;
+ LMSetFractEnable(value);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_LMGetTheGDevice(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- GDHandle _rv;
+ PyObject *_res = NULL;
+ GDHandle _rv;
#ifndef LMGetTheGDevice
- PyMac_PRECHECK(LMGetTheGDevice);
+ PyMac_PRECHECK(LMGetTheGDevice);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = LMGetTheGDevice();
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = LMGetTheGDevice();
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *Qd_LMSetTheGDevice(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- GDHandle value;
+ PyObject *_res = NULL;
+ GDHandle value;
#ifndef LMSetTheGDevice
- PyMac_PRECHECK(LMSetTheGDevice);
+ PyMac_PRECHECK(LMSetTheGDevice);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &value))
- return NULL;
- LMSetTheGDevice(value);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &value))
+ return NULL;
+ LMSetTheGDevice(value);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_LMGetHiliteRGB(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RGBColor hiliteRGBValue;
+ PyObject *_res = NULL;
+ RGBColor hiliteRGBValue;
#ifndef LMGetHiliteRGB
- PyMac_PRECHECK(LMGetHiliteRGB);
+ PyMac_PRECHECK(LMGetHiliteRGB);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- LMGetHiliteRGB(&hiliteRGBValue);
- _res = Py_BuildValue("O&",
- QdRGB_New, &hiliteRGBValue);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ LMGetHiliteRGB(&hiliteRGBValue);
+ _res = Py_BuildValue("O&",
+ QdRGB_New, &hiliteRGBValue);
+ return _res;
}
static PyObject *Qd_LMSetHiliteRGB(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RGBColor hiliteRGBValue;
+ PyObject *_res = NULL;
+ RGBColor hiliteRGBValue;
#ifndef LMSetHiliteRGB
- PyMac_PRECHECK(LMSetHiliteRGB);
+ PyMac_PRECHECK(LMSetHiliteRGB);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- QdRGB_Convert, &hiliteRGBValue))
- return NULL;
- LMSetHiliteRGB(&hiliteRGBValue);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ QdRGB_Convert, &hiliteRGBValue))
+ return NULL;
+ LMSetHiliteRGB(&hiliteRGBValue);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_LMGetCursorNew(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
+ PyObject *_res = NULL;
+ Boolean _rv;
#ifndef LMGetCursorNew
- PyMac_PRECHECK(LMGetCursorNew);
+ PyMac_PRECHECK(LMGetCursorNew);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = LMGetCursorNew();
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = LMGetCursorNew();
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *Qd_LMSetCursorNew(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean value;
+ PyObject *_res = NULL;
+ Boolean value;
#ifndef LMSetCursorNew
- PyMac_PRECHECK(LMSetCursorNew);
+ PyMac_PRECHECK(LMSetCursorNew);
#endif
- if (!PyArg_ParseTuple(_args, "b",
- &value))
- return NULL;
- LMSetCursorNew(value);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "b",
+ &value))
+ return NULL;
+ LMSetCursorNew(value);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_TextFont(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short font;
+ PyObject *_res = NULL;
+ short font;
#ifndef TextFont
- PyMac_PRECHECK(TextFont);
+ PyMac_PRECHECK(TextFont);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &font))
- return NULL;
- TextFont(font);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &font))
+ return NULL;
+ TextFont(font);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_TextFace(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- StyleParameter face;
+ PyObject *_res = NULL;
+ StyleParameter face;
#ifndef TextFace
- PyMac_PRECHECK(TextFace);
+ PyMac_PRECHECK(TextFace);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &face))
- return NULL;
- TextFace(face);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &face))
+ return NULL;
+ TextFace(face);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_TextMode(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short mode;
+ PyObject *_res = NULL;
+ short mode;
#ifndef TextMode
- PyMac_PRECHECK(TextMode);
+ PyMac_PRECHECK(TextMode);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &mode))
- return NULL;
- TextMode(mode);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &mode))
+ return NULL;
+ TextMode(mode);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_TextSize(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short size;
+ PyObject *_res = NULL;
+ short size;
#ifndef TextSize
- PyMac_PRECHECK(TextSize);
+ PyMac_PRECHECK(TextSize);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &size))
- return NULL;
- TextSize(size);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &size))
+ return NULL;
+ TextSize(size);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_SpaceExtra(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Fixed extra;
+ PyObject *_res = NULL;
+ Fixed extra;
#ifndef SpaceExtra
- PyMac_PRECHECK(SpaceExtra);
+ PyMac_PRECHECK(SpaceExtra);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetFixed, &extra))
- return NULL;
- SpaceExtra(extra);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetFixed, &extra))
+ return NULL;
+ SpaceExtra(extra);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_DrawChar(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CharParameter ch;
+ PyObject *_res = NULL;
+ CharParameter ch;
#ifndef DrawChar
- PyMac_PRECHECK(DrawChar);
+ PyMac_PRECHECK(DrawChar);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &ch))
- return NULL;
- DrawChar(ch);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &ch))
+ return NULL;
+ DrawChar(ch);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_DrawString(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Str255 s;
+ PyObject *_res = NULL;
+ Str255 s;
#ifndef DrawString
- PyMac_PRECHECK(DrawString);
+ PyMac_PRECHECK(DrawString);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetStr255, s))
- return NULL;
- DrawString(s);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetStr255, s))
+ return NULL;
+ DrawString(s);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_MacDrawText(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- char *textBuf__in__;
- int textBuf__in_len__;
- short firstByte;
- short byteCount;
+ PyObject *_res = NULL;
+ char *textBuf__in__;
+ int textBuf__in_len__;
+ short firstByte;
+ short byteCount;
#ifndef MacDrawText
- PyMac_PRECHECK(MacDrawText);
-#endif
- if (!PyArg_ParseTuple(_args, "s#hh",
- &textBuf__in__, &textBuf__in_len__,
- &firstByte,
- &byteCount))
- return NULL;
- /* Fool compiler warnings */
- textBuf__in_len__ = textBuf__in_len__;
- MacDrawText(textBuf__in__,
- firstByte,
- byteCount);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(MacDrawText);
+#endif
+ if (!PyArg_ParseTuple(_args, "s#hh",
+ &textBuf__in__, &textBuf__in_len__,
+ &firstByte,
+ &byteCount))
+ return NULL;
+ /* Fool compiler warnings */
+ textBuf__in_len__ = textBuf__in_len__;
+ MacDrawText(textBuf__in__,
+ firstByte,
+ byteCount);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_CharWidth(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short _rv;
- CharParameter ch;
+ PyObject *_res = NULL;
+ short _rv;
+ CharParameter ch;
#ifndef CharWidth
- PyMac_PRECHECK(CharWidth);
+ PyMac_PRECHECK(CharWidth);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &ch))
- return NULL;
- _rv = CharWidth(ch);
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &ch))
+ return NULL;
+ _rv = CharWidth(ch);
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *Qd_StringWidth(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short _rv;
- Str255 s;
+ PyObject *_res = NULL;
+ short _rv;
+ Str255 s;
#ifndef StringWidth
- PyMac_PRECHECK(StringWidth);
+ PyMac_PRECHECK(StringWidth);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetStr255, s))
- return NULL;
- _rv = StringWidth(s);
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetStr255, s))
+ return NULL;
+ _rv = StringWidth(s);
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *Qd_TextWidth(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short _rv;
- char *textBuf__in__;
- int textBuf__in_len__;
- short firstByte;
- short byteCount;
+ PyObject *_res = NULL;
+ short _rv;
+ char *textBuf__in__;
+ int textBuf__in_len__;
+ short firstByte;
+ short byteCount;
#ifndef TextWidth
- PyMac_PRECHECK(TextWidth);
-#endif
- if (!PyArg_ParseTuple(_args, "s#hh",
- &textBuf__in__, &textBuf__in_len__,
- &firstByte,
- &byteCount))
- return NULL;
- /* Fool compiler warnings */
- textBuf__in_len__ = textBuf__in_len__;
- _rv = TextWidth(textBuf__in__,
- firstByte,
- byteCount);
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ PyMac_PRECHECK(TextWidth);
+#endif
+ if (!PyArg_ParseTuple(_args, "s#hh",
+ &textBuf__in__, &textBuf__in_len__,
+ &firstByte,
+ &byteCount))
+ return NULL;
+ /* Fool compiler warnings */
+ textBuf__in_len__ = textBuf__in_len__;
+ _rv = TextWidth(textBuf__in__,
+ firstByte,
+ byteCount);
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *Qd_GetFontInfo(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- FontInfo info;
+ PyObject *_res = NULL;
+ FontInfo info;
#ifndef GetFontInfo
- PyMac_PRECHECK(GetFontInfo);
+ PyMac_PRECHECK(GetFontInfo);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- GetFontInfo(&info);
- _res = Py_BuildValue("O&",
- QdFI_New, &info);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ GetFontInfo(&info);
+ _res = Py_BuildValue("O&",
+ QdFI_New, &info);
+ return _res;
}
static PyObject *Qd_CharExtra(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Fixed extra;
+ PyObject *_res = NULL;
+ Fixed extra;
#ifndef CharExtra
- PyMac_PRECHECK(CharExtra);
+ PyMac_PRECHECK(CharExtra);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetFixed, &extra))
- return NULL;
- CharExtra(extra);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetFixed, &extra))
+ return NULL;
+ CharExtra(extra);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_TruncString(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short _rv;
- short width;
- Str255 theString;
- TruncCode truncWhere;
+ PyObject *_res = NULL;
+ short _rv;
+ short width;
+ Str255 theString;
+ TruncCode truncWhere;
#ifndef TruncString
- PyMac_PRECHECK(TruncString);
+ PyMac_PRECHECK(TruncString);
#endif
- if (!PyArg_ParseTuple(_args, "hO&h",
- &width,
- PyMac_GetStr255, theString,
- &truncWhere))
- return NULL;
- _rv = TruncString(width,
- theString,
- truncWhere);
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "hO&h",
+ &width,
+ PyMac_GetStr255, theString,
+ &truncWhere))
+ return NULL;
+ _rv = TruncString(width,
+ theString,
+ truncWhere);
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *Qd_SetPort(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- GrafPtr thePort;
+ PyObject *_res = NULL;
+ GrafPtr thePort;
#ifndef SetPort
- PyMac_PRECHECK(SetPort);
+ PyMac_PRECHECK(SetPort);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- GrafObj_Convert, &thePort))
- return NULL;
- SetPort(thePort);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ GrafObj_Convert, &thePort))
+ return NULL;
+ SetPort(thePort);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_GetCursor(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CursHandle _rv;
- short cursorID;
+ PyObject *_res = NULL;
+ CursHandle _rv;
+ short cursorID;
#ifndef GetCursor
- PyMac_PRECHECK(GetCursor);
+ PyMac_PRECHECK(GetCursor);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &cursorID))
- return NULL;
- _rv = GetCursor(cursorID);
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &cursorID))
+ return NULL;
+ _rv = GetCursor(cursorID);
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *Qd_SetCursor(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Cursor *crsr__in__;
- int crsr__in_len__;
+ PyObject *_res = NULL;
+ Cursor *crsr__in__;
+ int crsr__in_len__;
#ifndef SetCursor
- PyMac_PRECHECK(SetCursor);
-#endif
- if (!PyArg_ParseTuple(_args, "s#",
- (char **)&crsr__in__, &crsr__in_len__))
- return NULL;
- if (crsr__in_len__ != sizeof(Cursor))
- {
- PyErr_SetString(PyExc_TypeError, "buffer length should be sizeof(Cursor)");
- goto crsr__error__;
- }
- SetCursor(crsr__in__);
- Py_INCREF(Py_None);
- _res = Py_None;
+ PyMac_PRECHECK(SetCursor);
+#endif
+ if (!PyArg_ParseTuple(_args, "s#",
+ (char **)&crsr__in__, &crsr__in_len__))
+ return NULL;
+ if (crsr__in_len__ != sizeof(Cursor))
+ {
+ PyErr_SetString(PyExc_TypeError, "buffer length should be sizeof(Cursor)");
+ goto crsr__error__;
+ }
+ SetCursor(crsr__in__);
+ Py_INCREF(Py_None);
+ _res = Py_None;
crsr__error__: ;
- return _res;
+ return _res;
}
static PyObject *Qd_ShowCursor(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef ShowCursor
- PyMac_PRECHECK(ShowCursor);
+ PyMac_PRECHECK(ShowCursor);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- ShowCursor();
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ ShowCursor();
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_LineTo(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short h;
- short v;
+ PyObject *_res = NULL;
+ short h;
+ short v;
#ifndef LineTo
- PyMac_PRECHECK(LineTo);
+ PyMac_PRECHECK(LineTo);
#endif
- if (!PyArg_ParseTuple(_args, "hh",
- &h,
- &v))
- return NULL;
- LineTo(h,
- v);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "hh",
+ &h,
+ &v))
+ return NULL;
+ LineTo(h,
+ v);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_SetRect(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Rect r;
- short left;
- short top;
- short right;
- short bottom;
+ PyObject *_res = NULL;
+ Rect r;
+ short left;
+ short top;
+ short right;
+ short bottom;
#ifndef SetRect
- PyMac_PRECHECK(SetRect);
-#endif
- if (!PyArg_ParseTuple(_args, "hhhh",
- &left,
- &top,
- &right,
- &bottom))
- return NULL;
- SetRect(&r,
- left,
- top,
- right,
- bottom);
- _res = Py_BuildValue("O&",
- PyMac_BuildRect, &r);
- return _res;
+ PyMac_PRECHECK(SetRect);
+#endif
+ if (!PyArg_ParseTuple(_args, "hhhh",
+ &left,
+ &top,
+ &right,
+ &bottom))
+ return NULL;
+ SetRect(&r,
+ left,
+ top,
+ right,
+ bottom);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildRect, &r);
+ return _res;
}
static PyObject *Qd_OffsetRect(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Rect r;
- short dh;
- short dv;
+ PyObject *_res = NULL;
+ Rect r;
+ short dh;
+ short dv;
#ifndef OffsetRect
- PyMac_PRECHECK(OffsetRect);
+ PyMac_PRECHECK(OffsetRect);
#endif
- if (!PyArg_ParseTuple(_args, "O&hh",
- PyMac_GetRect, &r,
- &dh,
- &dv))
- return NULL;
- OffsetRect(&r,
- dh,
- dv);
- _res = Py_BuildValue("O&",
- PyMac_BuildRect, &r);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&hh",
+ PyMac_GetRect, &r,
+ &dh,
+ &dv))
+ return NULL;
+ OffsetRect(&r,
+ dh,
+ dv);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildRect, &r);
+ return _res;
}
static PyObject *Qd_InsetRect(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Rect r;
- short dh;
- short dv;
+ PyObject *_res = NULL;
+ Rect r;
+ short dh;
+ short dv;
#ifndef InsetRect
- PyMac_PRECHECK(InsetRect);
+ PyMac_PRECHECK(InsetRect);
#endif
- if (!PyArg_ParseTuple(_args, "O&hh",
- PyMac_GetRect, &r,
- &dh,
- &dv))
- return NULL;
- InsetRect(&r,
- dh,
- dv);
- _res = Py_BuildValue("O&",
- PyMac_BuildRect, &r);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&hh",
+ PyMac_GetRect, &r,
+ &dh,
+ &dv))
+ return NULL;
+ InsetRect(&r,
+ dh,
+ dv);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildRect, &r);
+ return _res;
}
static PyObject *Qd_UnionRect(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Rect src1;
- Rect src2;
- Rect dstRect;
+ PyObject *_res = NULL;
+ Rect src1;
+ Rect src2;
+ Rect dstRect;
#ifndef UnionRect
- PyMac_PRECHECK(UnionRect);
+ PyMac_PRECHECK(UnionRect);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- PyMac_GetRect, &src1,
- PyMac_GetRect, &src2))
- return NULL;
- UnionRect(&src1,
- &src2,
- &dstRect);
- _res = Py_BuildValue("O&",
- PyMac_BuildRect, &dstRect);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ PyMac_GetRect, &src1,
+ PyMac_GetRect, &src2))
+ return NULL;
+ UnionRect(&src1,
+ &src2,
+ &dstRect);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildRect, &dstRect);
+ return _res;
}
static PyObject *Qd_EqualRect(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- Rect rect1;
- Rect rect2;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ Rect rect1;
+ Rect rect2;
#ifndef EqualRect
- PyMac_PRECHECK(EqualRect);
+ PyMac_PRECHECK(EqualRect);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- PyMac_GetRect, &rect1,
- PyMac_GetRect, &rect2))
- return NULL;
- _rv = EqualRect(&rect1,
- &rect2);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ PyMac_GetRect, &rect1,
+ PyMac_GetRect, &rect2))
+ return NULL;
+ _rv = EqualRect(&rect1,
+ &rect2);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *Qd_FrameRect(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Rect r;
+ PyObject *_res = NULL;
+ Rect r;
#ifndef FrameRect
- PyMac_PRECHECK(FrameRect);
+ PyMac_PRECHECK(FrameRect);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetRect, &r))
- return NULL;
- FrameRect(&r);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetRect, &r))
+ return NULL;
+ FrameRect(&r);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_InvertRect(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Rect r;
+ PyObject *_res = NULL;
+ Rect r;
#ifndef InvertRect
- PyMac_PRECHECK(InvertRect);
+ PyMac_PRECHECK(InvertRect);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetRect, &r))
- return NULL;
- InvertRect(&r);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetRect, &r))
+ return NULL;
+ InvertRect(&r);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_FillRect(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Rect r;
- Pattern *pat__in__;
- int pat__in_len__;
+ PyObject *_res = NULL;
+ Rect r;
+ Pattern *pat__in__;
+ int pat__in_len__;
#ifndef FillRect
- PyMac_PRECHECK(FillRect);
-#endif
- if (!PyArg_ParseTuple(_args, "O&s#",
- PyMac_GetRect, &r,
- (char **)&pat__in__, &pat__in_len__))
- return NULL;
- if (pat__in_len__ != sizeof(Pattern))
- {
- PyErr_SetString(PyExc_TypeError, "buffer length should be sizeof(Pattern)");
- goto pat__error__;
- }
- FillRect(&r,
- pat__in__);
- Py_INCREF(Py_None);
- _res = Py_None;
+ PyMac_PRECHECK(FillRect);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&s#",
+ PyMac_GetRect, &r,
+ (char **)&pat__in__, &pat__in_len__))
+ return NULL;
+ if (pat__in_len__ != sizeof(Pattern))
+ {
+ PyErr_SetString(PyExc_TypeError, "buffer length should be sizeof(Pattern)");
+ goto pat__error__;
+ }
+ FillRect(&r,
+ pat__in__);
+ Py_INCREF(Py_None);
+ _res = Py_None;
pat__error__: ;
- return _res;
+ return _res;
}
static PyObject *Qd_CopyRgn(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RgnHandle srcRgn;
- RgnHandle dstRgn;
+ PyObject *_res = NULL;
+ RgnHandle srcRgn;
+ RgnHandle dstRgn;
#ifndef CopyRgn
- PyMac_PRECHECK(CopyRgn);
+ PyMac_PRECHECK(CopyRgn);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- ResObj_Convert, &srcRgn,
- ResObj_Convert, &dstRgn))
- return NULL;
- CopyRgn(srcRgn,
- dstRgn);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ ResObj_Convert, &srcRgn,
+ ResObj_Convert, &dstRgn))
+ return NULL;
+ CopyRgn(srcRgn,
+ dstRgn);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_SetRectRgn(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RgnHandle rgn;
- short left;
- short top;
- short right;
- short bottom;
+ PyObject *_res = NULL;
+ RgnHandle rgn;
+ short left;
+ short top;
+ short right;
+ short bottom;
#ifndef SetRectRgn
- PyMac_PRECHECK(SetRectRgn);
-#endif
- if (!PyArg_ParseTuple(_args, "O&hhhh",
- ResObj_Convert, &rgn,
- &left,
- &top,
- &right,
- &bottom))
- return NULL;
- SetRectRgn(rgn,
- left,
- top,
- right,
- bottom);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(SetRectRgn);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&hhhh",
+ ResObj_Convert, &rgn,
+ &left,
+ &top,
+ &right,
+ &bottom))
+ return NULL;
+ SetRectRgn(rgn,
+ left,
+ top,
+ right,
+ bottom);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_OffsetRgn(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RgnHandle rgn;
- short dh;
- short dv;
+ PyObject *_res = NULL;
+ RgnHandle rgn;
+ short dh;
+ short dv;
#ifndef OffsetRgn
- PyMac_PRECHECK(OffsetRgn);
+ PyMac_PRECHECK(OffsetRgn);
#endif
- if (!PyArg_ParseTuple(_args, "O&hh",
- ResObj_Convert, &rgn,
- &dh,
- &dv))
- return NULL;
- OffsetRgn(rgn,
- dh,
- dv);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&hh",
+ ResObj_Convert, &rgn,
+ &dh,
+ &dv))
+ return NULL;
+ OffsetRgn(rgn,
+ dh,
+ dv);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_UnionRgn(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RgnHandle srcRgnA;
- RgnHandle srcRgnB;
- RgnHandle dstRgn;
+ PyObject *_res = NULL;
+ RgnHandle srcRgnA;
+ RgnHandle srcRgnB;
+ RgnHandle dstRgn;
#ifndef UnionRgn
- PyMac_PRECHECK(UnionRgn);
+ PyMac_PRECHECK(UnionRgn);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- ResObj_Convert, &srcRgnA,
- ResObj_Convert, &srcRgnB,
- ResObj_Convert, &dstRgn))
- return NULL;
- UnionRgn(srcRgnA,
- srcRgnB,
- dstRgn);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ ResObj_Convert, &srcRgnA,
+ ResObj_Convert, &srcRgnB,
+ ResObj_Convert, &dstRgn))
+ return NULL;
+ UnionRgn(srcRgnA,
+ srcRgnB,
+ dstRgn);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_XorRgn(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RgnHandle srcRgnA;
- RgnHandle srcRgnB;
- RgnHandle dstRgn;
+ PyObject *_res = NULL;
+ RgnHandle srcRgnA;
+ RgnHandle srcRgnB;
+ RgnHandle dstRgn;
#ifndef XorRgn
- PyMac_PRECHECK(XorRgn);
+ PyMac_PRECHECK(XorRgn);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- ResObj_Convert, &srcRgnA,
- ResObj_Convert, &srcRgnB,
- ResObj_Convert, &dstRgn))
- return NULL;
- XorRgn(srcRgnA,
- srcRgnB,
- dstRgn);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ ResObj_Convert, &srcRgnA,
+ ResObj_Convert, &srcRgnB,
+ ResObj_Convert, &dstRgn))
+ return NULL;
+ XorRgn(srcRgnA,
+ srcRgnB,
+ dstRgn);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_EqualRgn(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- RgnHandle rgnA;
- RgnHandle rgnB;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ RgnHandle rgnA;
+ RgnHandle rgnB;
#ifndef EqualRgn
- PyMac_PRECHECK(EqualRgn);
+ PyMac_PRECHECK(EqualRgn);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- ResObj_Convert, &rgnA,
- ResObj_Convert, &rgnB))
- return NULL;
- _rv = EqualRgn(rgnA,
- rgnB);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ ResObj_Convert, &rgnA,
+ ResObj_Convert, &rgnB))
+ return NULL;
+ _rv = EqualRgn(rgnA,
+ rgnB);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *Qd_FrameRgn(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RgnHandle rgn;
+ PyObject *_res = NULL;
+ RgnHandle rgn;
#ifndef FrameRgn
- PyMac_PRECHECK(FrameRgn);
+ PyMac_PRECHECK(FrameRgn);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &rgn))
- return NULL;
- FrameRgn(rgn);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &rgn))
+ return NULL;
+ FrameRgn(rgn);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_PaintRgn(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RgnHandle rgn;
+ PyObject *_res = NULL;
+ RgnHandle rgn;
#ifndef PaintRgn
- PyMac_PRECHECK(PaintRgn);
+ PyMac_PRECHECK(PaintRgn);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &rgn))
- return NULL;
- PaintRgn(rgn);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &rgn))
+ return NULL;
+ PaintRgn(rgn);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_InvertRgn(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RgnHandle rgn;
+ PyObject *_res = NULL;
+ RgnHandle rgn;
#ifndef InvertRgn
- PyMac_PRECHECK(InvertRgn);
+ PyMac_PRECHECK(InvertRgn);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &rgn))
- return NULL;
- InvertRgn(rgn);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &rgn))
+ return NULL;
+ InvertRgn(rgn);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_FillRgn(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RgnHandle rgn;
- Pattern *pat__in__;
- int pat__in_len__;
+ PyObject *_res = NULL;
+ RgnHandle rgn;
+ Pattern *pat__in__;
+ int pat__in_len__;
#ifndef FillRgn
- PyMac_PRECHECK(FillRgn);
-#endif
- if (!PyArg_ParseTuple(_args, "O&s#",
- ResObj_Convert, &rgn,
- (char **)&pat__in__, &pat__in_len__))
- return NULL;
- if (pat__in_len__ != sizeof(Pattern))
- {
- PyErr_SetString(PyExc_TypeError, "buffer length should be sizeof(Pattern)");
- goto pat__error__;
- }
- FillRgn(rgn,
- pat__in__);
- Py_INCREF(Py_None);
- _res = Py_None;
+ PyMac_PRECHECK(FillRgn);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&s#",
+ ResObj_Convert, &rgn,
+ (char **)&pat__in__, &pat__in_len__))
+ return NULL;
+ if (pat__in_len__ != sizeof(Pattern))
+ {
+ PyErr_SetString(PyExc_TypeError, "buffer length should be sizeof(Pattern)");
+ goto pat__error__;
+ }
+ FillRgn(rgn,
+ pat__in__);
+ Py_INCREF(Py_None);
+ _res = Py_None;
pat__error__: ;
- return _res;
+ return _res;
}
static PyObject *Qd_GetPixel(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- short h;
- short v;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ short h;
+ short v;
#ifndef GetPixel
- PyMac_PRECHECK(GetPixel);
+ PyMac_PRECHECK(GetPixel);
#endif
- if (!PyArg_ParseTuple(_args, "hh",
- &h,
- &v))
- return NULL;
- _rv = GetPixel(h,
- v);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "hh",
+ &h,
+ &v))
+ return NULL;
+ _rv = GetPixel(h,
+ v);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *Qd_PtInRect(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- Point pt;
- Rect r;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ Point pt;
+ Rect r;
#ifndef PtInRect
- PyMac_PRECHECK(PtInRect);
+ PyMac_PRECHECK(PtInRect);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- PyMac_GetPoint, &pt,
- PyMac_GetRect, &r))
- return NULL;
- _rv = PtInRect(pt,
- &r);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ PyMac_GetPoint, &pt,
+ PyMac_GetRect, &r))
+ return NULL;
+ _rv = PtInRect(pt,
+ &r);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *Qd_DrawText(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- char *textBuf__in__;
- int textBuf__in_len__;
- short firstByte;
- short byteCount;
+ PyObject *_res = NULL;
+ char *textBuf__in__;
+ int textBuf__in_len__;
+ short firstByte;
+ short byteCount;
#ifndef DrawText
- PyMac_PRECHECK(DrawText);
-#endif
- if (!PyArg_ParseTuple(_args, "s#hh",
- &textBuf__in__, &textBuf__in_len__,
- &firstByte,
- &byteCount))
- return NULL;
- /* Fool compiler warnings */
- textBuf__in_len__ = textBuf__in_len__;
- DrawText(textBuf__in__,
- firstByte,
- byteCount);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(DrawText);
+#endif
+ if (!PyArg_ParseTuple(_args, "s#hh",
+ &textBuf__in__, &textBuf__in_len__,
+ &firstByte,
+ &byteCount))
+ return NULL;
+ /* Fool compiler warnings */
+ textBuf__in_len__ = textBuf__in_len__;
+ DrawText(textBuf__in__,
+ firstByte,
+ byteCount);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qd_BitMap(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
-
- BitMap *ptr;
- PyObject *source;
- Rect bounds;
- int rowbytes;
- char *data;
-
- if ( !PyArg_ParseTuple(_args, "O!iO&", &PyString_Type, &source, &rowbytes, PyMac_GetRect,
- &bounds) )
- return NULL;
- data = PyString_AsString(source);
- if ((ptr=(BitMap *)malloc(sizeof(BitMap))) == NULL )
- return PyErr_NoMemory();
- ptr->baseAddr = (Ptr)data;
- ptr->rowBytes = rowbytes;
- ptr->bounds = bounds;
- if ( (_res = BMObj_New(ptr)) == NULL ) {
- free(ptr);
- return NULL;
- }
- ((BitMapObject *)_res)->referred_object = source;
- Py_INCREF(source);
- ((BitMapObject *)_res)->referred_bitmap = ptr;
- return _res;
+ PyObject *_res = NULL;
+
+ BitMap *ptr;
+ PyObject *source;
+ Rect bounds;
+ int rowbytes;
+ char *data;
+
+ if ( !PyArg_ParseTuple(_args, "O!iO&", &PyString_Type, &source, &rowbytes, PyMac_GetRect,
+ &bounds) )
+ return NULL;
+ data = PyString_AsString(source);
+ if ((ptr=(BitMap *)malloc(sizeof(BitMap))) == NULL )
+ return PyErr_NoMemory();
+ ptr->baseAddr = (Ptr)data;
+ ptr->rowBytes = rowbytes;
+ ptr->bounds = bounds;
+ if ( (_res = BMObj_New(ptr)) == NULL ) {
+ free(ptr);
+ return NULL;
+ }
+ ((BitMapObject *)_res)->referred_object = source;
+ Py_INCREF(source);
+ ((BitMapObject *)_res)->referred_bitmap = ptr;
+ return _res;
}
static PyObject *Qd_RawBitMap(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
- BitMap *ptr;
- PyObject *source;
+ BitMap *ptr;
+ PyObject *source;
- if ( !PyArg_ParseTuple(_args, "O!", &PyString_Type, &source) )
- return NULL;
- if ( PyString_Size(source) != sizeof(BitMap) && PyString_Size(source) != sizeof(PixMap) ) {
- PyErr_Format(PyExc_TypeError,
- "Argument size was %ld, should be %lu (sizeof BitMap) or %lu (sizeof PixMap)",
- PyString_Size(source), sizeof(BitMap), sizeof(PixMap));
- return NULL;
- }
- ptr = (BitMapPtr)PyString_AsString(source);
- if ( (_res = BMObj_New(ptr)) == NULL ) {
- return NULL;
- }
- ((BitMapObject *)_res)->referred_object = source;
- Py_INCREF(source);
- return _res;
+ if ( !PyArg_ParseTuple(_args, "O!", &PyString_Type, &source) )
+ return NULL;
+ if ( PyString_Size(source) != sizeof(BitMap) && PyString_Size(source) != sizeof(PixMap) ) {
+ PyErr_Format(PyExc_TypeError,
+ "Argument size was %ld, should be %lu (sizeof BitMap) or %lu (sizeof PixMap)",
+ PyString_Size(source), sizeof(BitMap), sizeof(PixMap));
+ return NULL;
+ }
+ ptr = (BitMapPtr)PyString_AsString(source);
+ if ( (_res = BMObj_New(ptr)) == NULL ) {
+ return NULL;
+ }
+ ((BitMapObject *)_res)->referred_object = source;
+ Py_INCREF(source);
+ return _res;
}
#endif /* __LP64__ */
static PyMethodDef Qd_methods[] = {
#ifndef __LP64__
- {"GetPort", (PyCFunction)Qd_GetPort, 1,
- PyDoc_STR("() -> (GrafPtr port)")},
- {"GrafDevice", (PyCFunction)Qd_GrafDevice, 1,
- PyDoc_STR("(short device) -> None")},
- {"SetPortBits", (PyCFunction)Qd_SetPortBits, 1,
- PyDoc_STR("(BitMapPtr bm) -> None")},
- {"PortSize", (PyCFunction)Qd_PortSize, 1,
- PyDoc_STR("(short width, short height) -> None")},
- {"MovePortTo", (PyCFunction)Qd_MovePortTo, 1,
- PyDoc_STR("(short leftGlobal, short topGlobal) -> None")},
- {"SetOrigin", (PyCFunction)Qd_SetOrigin, 1,
- PyDoc_STR("(short h, short v) -> None")},
- {"SetClip", (PyCFunction)Qd_SetClip, 1,
- PyDoc_STR("(RgnHandle rgn) -> None")},
- {"GetClip", (PyCFunction)Qd_GetClip, 1,
- PyDoc_STR("(RgnHandle rgn) -> None")},
- {"ClipRect", (PyCFunction)Qd_ClipRect, 1,
- PyDoc_STR("(Rect r) -> None")},
- {"BackPat", (PyCFunction)Qd_BackPat, 1,
- PyDoc_STR("(Pattern pat) -> None")},
- {"InitCursor", (PyCFunction)Qd_InitCursor, 1,
- PyDoc_STR("() -> None")},
- {"MacSetCursor", (PyCFunction)Qd_MacSetCursor, 1,
- PyDoc_STR("(Cursor crsr) -> None")},
- {"HideCursor", (PyCFunction)Qd_HideCursor, 1,
- PyDoc_STR("() -> None")},
- {"MacShowCursor", (PyCFunction)Qd_MacShowCursor, 1,
- PyDoc_STR("() -> None")},
- {"ObscureCursor", (PyCFunction)Qd_ObscureCursor, 1,
- PyDoc_STR("() -> None")},
- {"HidePen", (PyCFunction)Qd_HidePen, 1,
- PyDoc_STR("() -> None")},
- {"ShowPen", (PyCFunction)Qd_ShowPen, 1,
- PyDoc_STR("() -> None")},
- {"GetPen", (PyCFunction)Qd_GetPen, 1,
- PyDoc_STR("() -> (Point pt)")},
- {"GetPenState", (PyCFunction)Qd_GetPenState, 1,
- PyDoc_STR("() -> (PenState pnState)")},
- {"SetPenState", (PyCFunction)Qd_SetPenState, 1,
- PyDoc_STR("(PenState pnState) -> None")},
- {"PenSize", (PyCFunction)Qd_PenSize, 1,
- PyDoc_STR("(short width, short height) -> None")},
- {"PenMode", (PyCFunction)Qd_PenMode, 1,
- PyDoc_STR("(short mode) -> None")},
- {"PenPat", (PyCFunction)Qd_PenPat, 1,
- PyDoc_STR("(Pattern pat) -> None")},
- {"PenNormal", (PyCFunction)Qd_PenNormal, 1,
- PyDoc_STR("() -> None")},
- {"MoveTo", (PyCFunction)Qd_MoveTo, 1,
- PyDoc_STR("(short h, short v) -> None")},
- {"Move", (PyCFunction)Qd_Move, 1,
- PyDoc_STR("(short dh, short dv) -> None")},
- {"MacLineTo", (PyCFunction)Qd_MacLineTo, 1,
- PyDoc_STR("(short h, short v) -> None")},
- {"Line", (PyCFunction)Qd_Line, 1,
- PyDoc_STR("(short dh, short dv) -> None")},
- {"ForeColor", (PyCFunction)Qd_ForeColor, 1,
- PyDoc_STR("(long color) -> None")},
- {"BackColor", (PyCFunction)Qd_BackColor, 1,
- PyDoc_STR("(long color) -> None")},
- {"ColorBit", (PyCFunction)Qd_ColorBit, 1,
- PyDoc_STR("(short whichBit) -> None")},
- {"MacSetRect", (PyCFunction)Qd_MacSetRect, 1,
- PyDoc_STR("(short left, short top, short right, short bottom) -> (Rect r)")},
- {"MacOffsetRect", (PyCFunction)Qd_MacOffsetRect, 1,
- PyDoc_STR("(Rect r, short dh, short dv) -> (Rect r)")},
- {"MacInsetRect", (PyCFunction)Qd_MacInsetRect, 1,
- PyDoc_STR("(Rect r, short dh, short dv) -> (Rect r)")},
- {"SectRect", (PyCFunction)Qd_SectRect, 1,
- PyDoc_STR("(Rect src1, Rect src2) -> (Boolean _rv, Rect dstRect)")},
- {"MacUnionRect", (PyCFunction)Qd_MacUnionRect, 1,
- PyDoc_STR("(Rect src1, Rect src2) -> (Rect dstRect)")},
- {"MacEqualRect", (PyCFunction)Qd_MacEqualRect, 1,
- PyDoc_STR("(Rect rect1, Rect rect2) -> (Boolean _rv)")},
- {"EmptyRect", (PyCFunction)Qd_EmptyRect, 1,
- PyDoc_STR("(Rect r) -> (Boolean _rv)")},
- {"MacFrameRect", (PyCFunction)Qd_MacFrameRect, 1,
- PyDoc_STR("(Rect r) -> None")},
- {"PaintRect", (PyCFunction)Qd_PaintRect, 1,
- PyDoc_STR("(Rect r) -> None")},
- {"EraseRect", (PyCFunction)Qd_EraseRect, 1,
- PyDoc_STR("(Rect r) -> None")},
- {"MacInvertRect", (PyCFunction)Qd_MacInvertRect, 1,
- PyDoc_STR("(Rect r) -> None")},
- {"MacFillRect", (PyCFunction)Qd_MacFillRect, 1,
- PyDoc_STR("(Rect r, Pattern pat) -> None")},
- {"FrameOval", (PyCFunction)Qd_FrameOval, 1,
- PyDoc_STR("(Rect r) -> None")},
- {"PaintOval", (PyCFunction)Qd_PaintOval, 1,
- PyDoc_STR("(Rect r) -> None")},
- {"EraseOval", (PyCFunction)Qd_EraseOval, 1,
- PyDoc_STR("(Rect r) -> None")},
- {"InvertOval", (PyCFunction)Qd_InvertOval, 1,
- PyDoc_STR("(Rect r) -> None")},
- {"FillOval", (PyCFunction)Qd_FillOval, 1,
- PyDoc_STR("(Rect r, Pattern pat) -> None")},
- {"FrameRoundRect", (PyCFunction)Qd_FrameRoundRect, 1,
- PyDoc_STR("(Rect r, short ovalWidth, short ovalHeight) -> None")},
- {"PaintRoundRect", (PyCFunction)Qd_PaintRoundRect, 1,
- PyDoc_STR("(Rect r, short ovalWidth, short ovalHeight) -> None")},
- {"EraseRoundRect", (PyCFunction)Qd_EraseRoundRect, 1,
- PyDoc_STR("(Rect r, short ovalWidth, short ovalHeight) -> None")},
- {"InvertRoundRect", (PyCFunction)Qd_InvertRoundRect, 1,
- PyDoc_STR("(Rect r, short ovalWidth, short ovalHeight) -> None")},
- {"FillRoundRect", (PyCFunction)Qd_FillRoundRect, 1,
- PyDoc_STR("(Rect r, short ovalWidth, short ovalHeight, Pattern pat) -> None")},
- {"FrameArc", (PyCFunction)Qd_FrameArc, 1,
- PyDoc_STR("(Rect r, short startAngle, short arcAngle) -> None")},
- {"PaintArc", (PyCFunction)Qd_PaintArc, 1,
- PyDoc_STR("(Rect r, short startAngle, short arcAngle) -> None")},
- {"EraseArc", (PyCFunction)Qd_EraseArc, 1,
- PyDoc_STR("(Rect r, short startAngle, short arcAngle) -> None")},
- {"InvertArc", (PyCFunction)Qd_InvertArc, 1,
- PyDoc_STR("(Rect r, short startAngle, short arcAngle) -> None")},
- {"FillArc", (PyCFunction)Qd_FillArc, 1,
- PyDoc_STR("(Rect r, short startAngle, short arcAngle, Pattern pat) -> None")},
- {"NewRgn", (PyCFunction)Qd_NewRgn, 1,
- PyDoc_STR("() -> (RgnHandle _rv)")},
- {"OpenRgn", (PyCFunction)Qd_OpenRgn, 1,
- PyDoc_STR("() -> None")},
- {"CloseRgn", (PyCFunction)Qd_CloseRgn, 1,
- PyDoc_STR("(RgnHandle dstRgn) -> None")},
- {"BitMapToRegion", (PyCFunction)Qd_BitMapToRegion, 1,
- PyDoc_STR("(RgnHandle region, BitMapPtr bMap) -> None")},
- {"RgnToHandle", (PyCFunction)Qd_RgnToHandle, 1,
- PyDoc_STR("(RgnHandle region, Handle flattenedRgnDataHdl) -> None")},
- {"DisposeRgn", (PyCFunction)Qd_DisposeRgn, 1,
- PyDoc_STR("(RgnHandle rgn) -> None")},
- {"MacCopyRgn", (PyCFunction)Qd_MacCopyRgn, 1,
- PyDoc_STR("(RgnHandle srcRgn, RgnHandle dstRgn) -> None")},
- {"SetEmptyRgn", (PyCFunction)Qd_SetEmptyRgn, 1,
- PyDoc_STR("(RgnHandle rgn) -> None")},
- {"MacSetRectRgn", (PyCFunction)Qd_MacSetRectRgn, 1,
- PyDoc_STR("(RgnHandle rgn, short left, short top, short right, short bottom) -> None")},
- {"RectRgn", (PyCFunction)Qd_RectRgn, 1,
- PyDoc_STR("(RgnHandle rgn, Rect r) -> None")},
- {"MacOffsetRgn", (PyCFunction)Qd_MacOffsetRgn, 1,
- PyDoc_STR("(RgnHandle rgn, short dh, short dv) -> None")},
- {"InsetRgn", (PyCFunction)Qd_InsetRgn, 1,
- PyDoc_STR("(RgnHandle rgn, short dh, short dv) -> None")},
- {"SectRgn", (PyCFunction)Qd_SectRgn, 1,
- PyDoc_STR("(RgnHandle srcRgnA, RgnHandle srcRgnB, RgnHandle dstRgn) -> None")},
- {"MacUnionRgn", (PyCFunction)Qd_MacUnionRgn, 1,
- PyDoc_STR("(RgnHandle srcRgnA, RgnHandle srcRgnB, RgnHandle dstRgn) -> None")},
- {"DiffRgn", (PyCFunction)Qd_DiffRgn, 1,
- PyDoc_STR("(RgnHandle srcRgnA, RgnHandle srcRgnB, RgnHandle dstRgn) -> None")},
- {"MacXorRgn", (PyCFunction)Qd_MacXorRgn, 1,
- PyDoc_STR("(RgnHandle srcRgnA, RgnHandle srcRgnB, RgnHandle dstRgn) -> None")},
- {"RectInRgn", (PyCFunction)Qd_RectInRgn, 1,
- PyDoc_STR("(Rect r, RgnHandle rgn) -> (Boolean _rv)")},
- {"MacEqualRgn", (PyCFunction)Qd_MacEqualRgn, 1,
- PyDoc_STR("(RgnHandle rgnA, RgnHandle rgnB) -> (Boolean _rv)")},
- {"EmptyRgn", (PyCFunction)Qd_EmptyRgn, 1,
- PyDoc_STR("(RgnHandle rgn) -> (Boolean _rv)")},
- {"MacFrameRgn", (PyCFunction)Qd_MacFrameRgn, 1,
- PyDoc_STR("(RgnHandle rgn) -> None")},
- {"MacPaintRgn", (PyCFunction)Qd_MacPaintRgn, 1,
- PyDoc_STR("(RgnHandle rgn) -> None")},
- {"EraseRgn", (PyCFunction)Qd_EraseRgn, 1,
- PyDoc_STR("(RgnHandle rgn) -> None")},
- {"MacInvertRgn", (PyCFunction)Qd_MacInvertRgn, 1,
- PyDoc_STR("(RgnHandle rgn) -> None")},
- {"MacFillRgn", (PyCFunction)Qd_MacFillRgn, 1,
- PyDoc_STR("(RgnHandle rgn, Pattern pat) -> None")},
- {"ScrollRect", (PyCFunction)Qd_ScrollRect, 1,
- PyDoc_STR("(Rect r, short dh, short dv, RgnHandle updateRgn) -> None")},
- {"CopyBits", (PyCFunction)Qd_CopyBits, 1,
- PyDoc_STR("(BitMapPtr srcBits, BitMapPtr dstBits, Rect srcRect, Rect dstRect, short mode, RgnHandle maskRgn) -> None")},
- {"CopyMask", (PyCFunction)Qd_CopyMask, 1,
- PyDoc_STR("(BitMapPtr srcBits, BitMapPtr maskBits, BitMapPtr dstBits, Rect srcRect, Rect maskRect, Rect dstRect) -> None")},
- {"OpenPicture", (PyCFunction)Qd_OpenPicture, 1,
- PyDoc_STR("(Rect picFrame) -> (PicHandle _rv)")},
- {"PicComment", (PyCFunction)Qd_PicComment, 1,
- PyDoc_STR("(short kind, short dataSize, Handle dataHandle) -> None")},
- {"ClosePicture", (PyCFunction)Qd_ClosePicture, 1,
- PyDoc_STR("() -> None")},
- {"DrawPicture", (PyCFunction)Qd_DrawPicture, 1,
- PyDoc_STR("(PicHandle myPicture, Rect dstRect) -> None")},
- {"KillPicture", (PyCFunction)Qd_KillPicture, 1,
- PyDoc_STR("(PicHandle myPicture) -> None")},
- {"OpenPoly", (PyCFunction)Qd_OpenPoly, 1,
- PyDoc_STR("() -> (PolyHandle _rv)")},
- {"ClosePoly", (PyCFunction)Qd_ClosePoly, 1,
- PyDoc_STR("() -> None")},
- {"KillPoly", (PyCFunction)Qd_KillPoly, 1,
- PyDoc_STR("(PolyHandle poly) -> None")},
- {"OffsetPoly", (PyCFunction)Qd_OffsetPoly, 1,
- PyDoc_STR("(PolyHandle poly, short dh, short dv) -> None")},
- {"FramePoly", (PyCFunction)Qd_FramePoly, 1,
- PyDoc_STR("(PolyHandle poly) -> None")},
- {"PaintPoly", (PyCFunction)Qd_PaintPoly, 1,
- PyDoc_STR("(PolyHandle poly) -> None")},
- {"ErasePoly", (PyCFunction)Qd_ErasePoly, 1,
- PyDoc_STR("(PolyHandle poly) -> None")},
- {"InvertPoly", (PyCFunction)Qd_InvertPoly, 1,
- PyDoc_STR("(PolyHandle poly) -> None")},
- {"FillPoly", (PyCFunction)Qd_FillPoly, 1,
- PyDoc_STR("(PolyHandle poly, Pattern pat) -> None")},
- {"SetPt", (PyCFunction)Qd_SetPt, 1,
- PyDoc_STR("(short h, short v) -> (Point pt)")},
- {"LocalToGlobal", (PyCFunction)Qd_LocalToGlobal, 1,
- PyDoc_STR("(Point pt) -> (Point pt)")},
- {"GlobalToLocal", (PyCFunction)Qd_GlobalToLocal, 1,
- PyDoc_STR("(Point pt) -> (Point pt)")},
- {"Random", (PyCFunction)Qd_Random, 1,
- PyDoc_STR("() -> (short _rv)")},
- {"MacGetPixel", (PyCFunction)Qd_MacGetPixel, 1,
- PyDoc_STR("(short h, short v) -> (Boolean _rv)")},
- {"ScalePt", (PyCFunction)Qd_ScalePt, 1,
- PyDoc_STR("(Point pt, Rect srcRect, Rect dstRect) -> (Point pt)")},
- {"MapPt", (PyCFunction)Qd_MapPt, 1,
- PyDoc_STR("(Point pt, Rect srcRect, Rect dstRect) -> (Point pt)")},
- {"MapRect", (PyCFunction)Qd_MapRect, 1,
- PyDoc_STR("(Rect r, Rect srcRect, Rect dstRect) -> (Rect r)")},
- {"MapRgn", (PyCFunction)Qd_MapRgn, 1,
- PyDoc_STR("(RgnHandle rgn, Rect srcRect, Rect dstRect) -> None")},
- {"MapPoly", (PyCFunction)Qd_MapPoly, 1,
- PyDoc_STR("(PolyHandle poly, Rect srcRect, Rect dstRect) -> None")},
- {"StdBits", (PyCFunction)Qd_StdBits, 1,
- PyDoc_STR("(BitMapPtr srcBits, Rect srcRect, Rect dstRect, short mode, RgnHandle maskRgn) -> None")},
- {"AddPt", (PyCFunction)Qd_AddPt, 1,
- PyDoc_STR("(Point src, Point dst) -> (Point dst)")},
- {"EqualPt", (PyCFunction)Qd_EqualPt, 1,
- PyDoc_STR("(Point pt1, Point pt2) -> (Boolean _rv)")},
- {"MacPtInRect", (PyCFunction)Qd_MacPtInRect, 1,
- PyDoc_STR("(Point pt, Rect r) -> (Boolean _rv)")},
- {"Pt2Rect", (PyCFunction)Qd_Pt2Rect, 1,
- PyDoc_STR("(Point pt1, Point pt2) -> (Rect dstRect)")},
- {"PtToAngle", (PyCFunction)Qd_PtToAngle, 1,
- PyDoc_STR("(Rect r, Point pt) -> (short angle)")},
- {"SubPt", (PyCFunction)Qd_SubPt, 1,
- PyDoc_STR("(Point src, Point dst) -> (Point dst)")},
- {"PtInRgn", (PyCFunction)Qd_PtInRgn, 1,
- PyDoc_STR("(Point pt, RgnHandle rgn) -> (Boolean _rv)")},
- {"NewPixMap", (PyCFunction)Qd_NewPixMap, 1,
- PyDoc_STR("() -> (PixMapHandle _rv)")},
- {"DisposePixMap", (PyCFunction)Qd_DisposePixMap, 1,
- PyDoc_STR("(PixMapHandle pm) -> None")},
- {"CopyPixMap", (PyCFunction)Qd_CopyPixMap, 1,
- PyDoc_STR("(PixMapHandle srcPM, PixMapHandle dstPM) -> None")},
- {"NewPixPat", (PyCFunction)Qd_NewPixPat, 1,
- PyDoc_STR("() -> (PixPatHandle _rv)")},
- {"DisposePixPat", (PyCFunction)Qd_DisposePixPat, 1,
- PyDoc_STR("(PixPatHandle pp) -> None")},
- {"CopyPixPat", (PyCFunction)Qd_CopyPixPat, 1,
- PyDoc_STR("(PixPatHandle srcPP, PixPatHandle dstPP) -> None")},
- {"PenPixPat", (PyCFunction)Qd_PenPixPat, 1,
- PyDoc_STR("(PixPatHandle pp) -> None")},
- {"BackPixPat", (PyCFunction)Qd_BackPixPat, 1,
- PyDoc_STR("(PixPatHandle pp) -> None")},
- {"GetPixPat", (PyCFunction)Qd_GetPixPat, 1,
- PyDoc_STR("(short patID) -> (PixPatHandle _rv)")},
- {"MakeRGBPat", (PyCFunction)Qd_MakeRGBPat, 1,
- PyDoc_STR("(PixPatHandle pp, RGBColor myColor) -> None")},
- {"FillCRect", (PyCFunction)Qd_FillCRect, 1,
- PyDoc_STR("(Rect r, PixPatHandle pp) -> None")},
- {"FillCOval", (PyCFunction)Qd_FillCOval, 1,
- PyDoc_STR("(Rect r, PixPatHandle pp) -> None")},
- {"FillCRoundRect", (PyCFunction)Qd_FillCRoundRect, 1,
- PyDoc_STR("(Rect r, short ovalWidth, short ovalHeight, PixPatHandle pp) -> None")},
- {"FillCArc", (PyCFunction)Qd_FillCArc, 1,
- PyDoc_STR("(Rect r, short startAngle, short arcAngle, PixPatHandle pp) -> None")},
- {"FillCRgn", (PyCFunction)Qd_FillCRgn, 1,
- PyDoc_STR("(RgnHandle rgn, PixPatHandle pp) -> None")},
- {"FillCPoly", (PyCFunction)Qd_FillCPoly, 1,
- PyDoc_STR("(PolyHandle poly, PixPatHandle pp) -> None")},
- {"RGBForeColor", (PyCFunction)Qd_RGBForeColor, 1,
- PyDoc_STR("(RGBColor color) -> None")},
- {"RGBBackColor", (PyCFunction)Qd_RGBBackColor, 1,
- PyDoc_STR("(RGBColor color) -> None")},
- {"SetCPixel", (PyCFunction)Qd_SetCPixel, 1,
- PyDoc_STR("(short h, short v, RGBColor cPix) -> None")},
- {"SetPortPix", (PyCFunction)Qd_SetPortPix, 1,
- PyDoc_STR("(PixMapHandle pm) -> None")},
- {"GetCPixel", (PyCFunction)Qd_GetCPixel, 1,
- PyDoc_STR("(short h, short v) -> (RGBColor cPix)")},
- {"GetForeColor", (PyCFunction)Qd_GetForeColor, 1,
- PyDoc_STR("() -> (RGBColor color)")},
- {"GetBackColor", (PyCFunction)Qd_GetBackColor, 1,
- PyDoc_STR("() -> (RGBColor color)")},
- {"OpColor", (PyCFunction)Qd_OpColor, 1,
- PyDoc_STR("(RGBColor color) -> None")},
- {"HiliteColor", (PyCFunction)Qd_HiliteColor, 1,
- PyDoc_STR("(RGBColor color) -> None")},
- {"DisposeCTable", (PyCFunction)Qd_DisposeCTable, 1,
- PyDoc_STR("(CTabHandle cTable) -> None")},
- {"GetCTable", (PyCFunction)Qd_GetCTable, 1,
- PyDoc_STR("(short ctID) -> (CTabHandle _rv)")},
- {"GetCCursor", (PyCFunction)Qd_GetCCursor, 1,
- PyDoc_STR("(short crsrID) -> (CCrsrHandle _rv)")},
- {"SetCCursor", (PyCFunction)Qd_SetCCursor, 1,
- PyDoc_STR("(CCrsrHandle cCrsr) -> None")},
- {"AllocCursor", (PyCFunction)Qd_AllocCursor, 1,
- PyDoc_STR("() -> None")},
- {"DisposeCCursor", (PyCFunction)Qd_DisposeCCursor, 1,
- PyDoc_STR("(CCrsrHandle cCrsr) -> None")},
- {"GetMaxDevice", (PyCFunction)Qd_GetMaxDevice, 1,
- PyDoc_STR("(Rect globalRect) -> (GDHandle _rv)")},
- {"GetCTSeed", (PyCFunction)Qd_GetCTSeed, 1,
- PyDoc_STR("() -> (long _rv)")},
- {"GetDeviceList", (PyCFunction)Qd_GetDeviceList, 1,
- PyDoc_STR("() -> (GDHandle _rv)")},
- {"GetMainDevice", (PyCFunction)Qd_GetMainDevice, 1,
- PyDoc_STR("() -> (GDHandle _rv)")},
- {"GetNextDevice", (PyCFunction)Qd_GetNextDevice, 1,
- PyDoc_STR("(GDHandle curDevice) -> (GDHandle _rv)")},
- {"TestDeviceAttribute", (PyCFunction)Qd_TestDeviceAttribute, 1,
- PyDoc_STR("(GDHandle gdh, short attribute) -> (Boolean _rv)")},
- {"SetDeviceAttribute", (PyCFunction)Qd_SetDeviceAttribute, 1,
- PyDoc_STR("(GDHandle gdh, short attribute, Boolean value) -> None")},
- {"InitGDevice", (PyCFunction)Qd_InitGDevice, 1,
- PyDoc_STR("(short qdRefNum, long mode, GDHandle gdh) -> None")},
- {"NewGDevice", (PyCFunction)Qd_NewGDevice, 1,
- PyDoc_STR("(short refNum, long mode) -> (GDHandle _rv)")},
- {"DisposeGDevice", (PyCFunction)Qd_DisposeGDevice, 1,
- PyDoc_STR("(GDHandle gdh) -> None")},
- {"SetGDevice", (PyCFunction)Qd_SetGDevice, 1,
- PyDoc_STR("(GDHandle gd) -> None")},
- {"GetGDevice", (PyCFunction)Qd_GetGDevice, 1,
- PyDoc_STR("() -> (GDHandle _rv)")},
- {"Color2Index", (PyCFunction)Qd_Color2Index, 1,
- PyDoc_STR("(RGBColor myColor) -> (long _rv)")},
- {"Index2Color", (PyCFunction)Qd_Index2Color, 1,
- PyDoc_STR("(long index) -> (RGBColor aColor)")},
- {"InvertColor", (PyCFunction)Qd_InvertColor, 1,
- PyDoc_STR("() -> (RGBColor myColor)")},
- {"RealColor", (PyCFunction)Qd_RealColor, 1,
- PyDoc_STR("(RGBColor color) -> (Boolean _rv)")},
- {"GetSubTable", (PyCFunction)Qd_GetSubTable, 1,
- PyDoc_STR("(CTabHandle myColors, short iTabRes, CTabHandle targetTbl) -> None")},
- {"MakeITable", (PyCFunction)Qd_MakeITable, 1,
- PyDoc_STR("(CTabHandle cTabH, ITabHandle iTabH, short res) -> None")},
- {"SetClientID", (PyCFunction)Qd_SetClientID, 1,
- PyDoc_STR("(short id) -> None")},
- {"ProtectEntry", (PyCFunction)Qd_ProtectEntry, 1,
- PyDoc_STR("(short index, Boolean protect) -> None")},
- {"ReserveEntry", (PyCFunction)Qd_ReserveEntry, 1,
- PyDoc_STR("(short index, Boolean reserve) -> None")},
- {"QDError", (PyCFunction)Qd_QDError, 1,
- PyDoc_STR("() -> (short _rv)")},
- {"CopyDeepMask", (PyCFunction)Qd_CopyDeepMask, 1,
- PyDoc_STR("(BitMapPtr srcBits, BitMapPtr maskBits, BitMapPtr dstBits, Rect srcRect, Rect maskRect, Rect dstRect, short mode, RgnHandle maskRgn) -> None")},
- {"GetPattern", (PyCFunction)Qd_GetPattern, 1,
- PyDoc_STR("(short patternID) -> (PatHandle _rv)")},
- {"MacGetCursor", (PyCFunction)Qd_MacGetCursor, 1,
- PyDoc_STR("(short cursorID) -> (CursHandle _rv)")},
- {"GetPicture", (PyCFunction)Qd_GetPicture, 1,
- PyDoc_STR("(short pictureID) -> (PicHandle _rv)")},
- {"DeltaPoint", (PyCFunction)Qd_DeltaPoint, 1,
- PyDoc_STR("(Point ptA, Point ptB) -> (long _rv)")},
- {"ShieldCursor", (PyCFunction)Qd_ShieldCursor, 1,
- PyDoc_STR("(Rect shieldRect, Point offsetPt) -> None")},
- {"ScreenRes", (PyCFunction)Qd_ScreenRes, 1,
- PyDoc_STR("() -> (short scrnHRes, short scrnVRes)")},
- {"GetIndPattern", (PyCFunction)Qd_GetIndPattern, 1,
- PyDoc_STR("(short patternListID, short index) -> (Pattern thePat)")},
- {"SlopeFromAngle", (PyCFunction)Qd_SlopeFromAngle, 1,
- PyDoc_STR("(short angle) -> (Fixed _rv)")},
- {"AngleFromSlope", (PyCFunction)Qd_AngleFromSlope, 1,
- PyDoc_STR("(Fixed slope) -> (short _rv)")},
- {"GetPixBounds", (PyCFunction)Qd_GetPixBounds, 1,
- PyDoc_STR("(PixMapHandle pixMap) -> (Rect bounds)")},
- {"GetPixDepth", (PyCFunction)Qd_GetPixDepth, 1,
- PyDoc_STR("(PixMapHandle pixMap) -> (short _rv)")},
- {"GetQDGlobalsRandomSeed", (PyCFunction)Qd_GetQDGlobalsRandomSeed, 1,
- PyDoc_STR("() -> (long _rv)")},
- {"GetQDGlobalsScreenBits", (PyCFunction)Qd_GetQDGlobalsScreenBits, 1,
- PyDoc_STR("() -> (BitMap screenBits)")},
- {"GetQDGlobalsArrow", (PyCFunction)Qd_GetQDGlobalsArrow, 1,
- PyDoc_STR("() -> (Cursor arrow)")},
- {"GetQDGlobalsDarkGray", (PyCFunction)Qd_GetQDGlobalsDarkGray, 1,
- PyDoc_STR("() -> (Pattern dkGray)")},
- {"GetQDGlobalsLightGray", (PyCFunction)Qd_GetQDGlobalsLightGray, 1,
- PyDoc_STR("() -> (Pattern ltGray)")},
- {"GetQDGlobalsGray", (PyCFunction)Qd_GetQDGlobalsGray, 1,
- PyDoc_STR("() -> (Pattern gray)")},
- {"GetQDGlobalsBlack", (PyCFunction)Qd_GetQDGlobalsBlack, 1,
- PyDoc_STR("() -> (Pattern black)")},
- {"GetQDGlobalsWhite", (PyCFunction)Qd_GetQDGlobalsWhite, 1,
- PyDoc_STR("() -> (Pattern white)")},
- {"GetQDGlobalsThePort", (PyCFunction)Qd_GetQDGlobalsThePort, 1,
- PyDoc_STR("() -> (CGrafPtr _rv)")},
- {"SetQDGlobalsRandomSeed", (PyCFunction)Qd_SetQDGlobalsRandomSeed, 1,
- PyDoc_STR("(long randomSeed) -> None")},
- {"SetQDGlobalsArrow", (PyCFunction)Qd_SetQDGlobalsArrow, 1,
- PyDoc_STR("(Cursor arrow) -> None")},
- {"GetRegionBounds", (PyCFunction)Qd_GetRegionBounds, 1,
- PyDoc_STR("(RgnHandle region) -> (Rect bounds)")},
- {"IsRegionRectangular", (PyCFunction)Qd_IsRegionRectangular, 1,
- PyDoc_STR("(RgnHandle region) -> (Boolean _rv)")},
- {"CreateNewPort", (PyCFunction)Qd_CreateNewPort, 1,
- PyDoc_STR("() -> (CGrafPtr _rv)")},
- {"SetQDError", (PyCFunction)Qd_SetQDError, 1,
- PyDoc_STR("(OSErr err) -> None")},
- {"LMGetScrVRes", (PyCFunction)Qd_LMGetScrVRes, 1,
- PyDoc_STR("() -> (SInt16 _rv)")},
- {"LMSetScrVRes", (PyCFunction)Qd_LMSetScrVRes, 1,
- PyDoc_STR("(SInt16 value) -> None")},
- {"LMGetScrHRes", (PyCFunction)Qd_LMGetScrHRes, 1,
- PyDoc_STR("() -> (SInt16 _rv)")},
- {"LMSetScrHRes", (PyCFunction)Qd_LMSetScrHRes, 1,
- PyDoc_STR("(SInt16 value) -> None")},
- {"LMGetMainDevice", (PyCFunction)Qd_LMGetMainDevice, 1,
- PyDoc_STR("() -> (GDHandle _rv)")},
- {"LMSetMainDevice", (PyCFunction)Qd_LMSetMainDevice, 1,
- PyDoc_STR("(GDHandle value) -> None")},
- {"LMGetDeviceList", (PyCFunction)Qd_LMGetDeviceList, 1,
- PyDoc_STR("() -> (GDHandle _rv)")},
- {"LMSetDeviceList", (PyCFunction)Qd_LMSetDeviceList, 1,
- PyDoc_STR("(GDHandle value) -> None")},
- {"LMGetQDColors", (PyCFunction)Qd_LMGetQDColors, 1,
- PyDoc_STR("() -> (Handle _rv)")},
- {"LMSetQDColors", (PyCFunction)Qd_LMSetQDColors, 1,
- PyDoc_STR("(Handle value) -> None")},
- {"LMGetWidthListHand", (PyCFunction)Qd_LMGetWidthListHand, 1,
- PyDoc_STR("() -> (Handle _rv)")},
- {"LMSetWidthListHand", (PyCFunction)Qd_LMSetWidthListHand, 1,
- PyDoc_STR("(Handle value) -> None")},
- {"LMGetHiliteMode", (PyCFunction)Qd_LMGetHiliteMode, 1,
- PyDoc_STR("() -> (UInt8 _rv)")},
- {"LMSetHiliteMode", (PyCFunction)Qd_LMSetHiliteMode, 1,
- PyDoc_STR("(UInt8 value) -> None")},
- {"LMGetWidthTabHandle", (PyCFunction)Qd_LMGetWidthTabHandle, 1,
- PyDoc_STR("() -> (Handle _rv)")},
- {"LMSetWidthTabHandle", (PyCFunction)Qd_LMSetWidthTabHandle, 1,
- PyDoc_STR("(Handle value) -> None")},
- {"LMGetLastSPExtra", (PyCFunction)Qd_LMGetLastSPExtra, 1,
- PyDoc_STR("() -> (SInt32 _rv)")},
- {"LMSetLastSPExtra", (PyCFunction)Qd_LMSetLastSPExtra, 1,
- PyDoc_STR("(SInt32 value) -> None")},
- {"LMGetLastFOND", (PyCFunction)Qd_LMGetLastFOND, 1,
- PyDoc_STR("() -> (Handle _rv)")},
- {"LMSetLastFOND", (PyCFunction)Qd_LMSetLastFOND, 1,
- PyDoc_STR("(Handle value) -> None")},
- {"LMGetFractEnable", (PyCFunction)Qd_LMGetFractEnable, 1,
- PyDoc_STR("() -> (UInt8 _rv)")},
- {"LMSetFractEnable", (PyCFunction)Qd_LMSetFractEnable, 1,
- PyDoc_STR("(UInt8 value) -> None")},
- {"LMGetTheGDevice", (PyCFunction)Qd_LMGetTheGDevice, 1,
- PyDoc_STR("() -> (GDHandle _rv)")},
- {"LMSetTheGDevice", (PyCFunction)Qd_LMSetTheGDevice, 1,
- PyDoc_STR("(GDHandle value) -> None")},
- {"LMGetHiliteRGB", (PyCFunction)Qd_LMGetHiliteRGB, 1,
- PyDoc_STR("() -> (RGBColor hiliteRGBValue)")},
- {"LMSetHiliteRGB", (PyCFunction)Qd_LMSetHiliteRGB, 1,
- PyDoc_STR("(RGBColor hiliteRGBValue) -> None")},
- {"LMGetCursorNew", (PyCFunction)Qd_LMGetCursorNew, 1,
- PyDoc_STR("() -> (Boolean _rv)")},
- {"LMSetCursorNew", (PyCFunction)Qd_LMSetCursorNew, 1,
- PyDoc_STR("(Boolean value) -> None")},
- {"TextFont", (PyCFunction)Qd_TextFont, 1,
- PyDoc_STR("(short font) -> None")},
- {"TextFace", (PyCFunction)Qd_TextFace, 1,
- PyDoc_STR("(StyleParameter face) -> None")},
- {"TextMode", (PyCFunction)Qd_TextMode, 1,
- PyDoc_STR("(short mode) -> None")},
- {"TextSize", (PyCFunction)Qd_TextSize, 1,
- PyDoc_STR("(short size) -> None")},
- {"SpaceExtra", (PyCFunction)Qd_SpaceExtra, 1,
- PyDoc_STR("(Fixed extra) -> None")},
- {"DrawChar", (PyCFunction)Qd_DrawChar, 1,
- PyDoc_STR("(CharParameter ch) -> None")},
- {"DrawString", (PyCFunction)Qd_DrawString, 1,
- PyDoc_STR("(Str255 s) -> None")},
- {"MacDrawText", (PyCFunction)Qd_MacDrawText, 1,
- PyDoc_STR("(Buffer textBuf, short firstByte, short byteCount) -> None")},
- {"CharWidth", (PyCFunction)Qd_CharWidth, 1,
- PyDoc_STR("(CharParameter ch) -> (short _rv)")},
- {"StringWidth", (PyCFunction)Qd_StringWidth, 1,
- PyDoc_STR("(Str255 s) -> (short _rv)")},
- {"TextWidth", (PyCFunction)Qd_TextWidth, 1,
- PyDoc_STR("(Buffer textBuf, short firstByte, short byteCount) -> (short _rv)")},
- {"GetFontInfo", (PyCFunction)Qd_GetFontInfo, 1,
- PyDoc_STR("() -> (FontInfo info)")},
- {"CharExtra", (PyCFunction)Qd_CharExtra, 1,
- PyDoc_STR("(Fixed extra) -> None")},
- {"TruncString", (PyCFunction)Qd_TruncString, 1,
- PyDoc_STR("(short width, Str255 theString, TruncCode truncWhere) -> (short _rv)")},
- {"SetPort", (PyCFunction)Qd_SetPort, 1,
- PyDoc_STR("(GrafPtr thePort) -> None")},
- {"GetCursor", (PyCFunction)Qd_GetCursor, 1,
- PyDoc_STR("(short cursorID) -> (CursHandle _rv)")},
- {"SetCursor", (PyCFunction)Qd_SetCursor, 1,
- PyDoc_STR("(Cursor crsr) -> None")},
- {"ShowCursor", (PyCFunction)Qd_ShowCursor, 1,
- PyDoc_STR("() -> None")},
- {"LineTo", (PyCFunction)Qd_LineTo, 1,
- PyDoc_STR("(short h, short v) -> None")},
- {"SetRect", (PyCFunction)Qd_SetRect, 1,
- PyDoc_STR("(short left, short top, short right, short bottom) -> (Rect r)")},
- {"OffsetRect", (PyCFunction)Qd_OffsetRect, 1,
- PyDoc_STR("(Rect r, short dh, short dv) -> (Rect r)")},
- {"InsetRect", (PyCFunction)Qd_InsetRect, 1,
- PyDoc_STR("(Rect r, short dh, short dv) -> (Rect r)")},
- {"UnionRect", (PyCFunction)Qd_UnionRect, 1,
- PyDoc_STR("(Rect src1, Rect src2) -> (Rect dstRect)")},
- {"EqualRect", (PyCFunction)Qd_EqualRect, 1,
- PyDoc_STR("(Rect rect1, Rect rect2) -> (Boolean _rv)")},
- {"FrameRect", (PyCFunction)Qd_FrameRect, 1,
- PyDoc_STR("(Rect r) -> None")},
- {"InvertRect", (PyCFunction)Qd_InvertRect, 1,
- PyDoc_STR("(Rect r) -> None")},
- {"FillRect", (PyCFunction)Qd_FillRect, 1,
- PyDoc_STR("(Rect r, Pattern pat) -> None")},
- {"CopyRgn", (PyCFunction)Qd_CopyRgn, 1,
- PyDoc_STR("(RgnHandle srcRgn, RgnHandle dstRgn) -> None")},
- {"SetRectRgn", (PyCFunction)Qd_SetRectRgn, 1,
- PyDoc_STR("(RgnHandle rgn, short left, short top, short right, short bottom) -> None")},
- {"OffsetRgn", (PyCFunction)Qd_OffsetRgn, 1,
- PyDoc_STR("(RgnHandle rgn, short dh, short dv) -> None")},
- {"UnionRgn", (PyCFunction)Qd_UnionRgn, 1,
- PyDoc_STR("(RgnHandle srcRgnA, RgnHandle srcRgnB, RgnHandle dstRgn) -> None")},
- {"XorRgn", (PyCFunction)Qd_XorRgn, 1,
- PyDoc_STR("(RgnHandle srcRgnA, RgnHandle srcRgnB, RgnHandle dstRgn) -> None")},
- {"EqualRgn", (PyCFunction)Qd_EqualRgn, 1,
- PyDoc_STR("(RgnHandle rgnA, RgnHandle rgnB) -> (Boolean _rv)")},
- {"FrameRgn", (PyCFunction)Qd_FrameRgn, 1,
- PyDoc_STR("(RgnHandle rgn) -> None")},
- {"PaintRgn", (PyCFunction)Qd_PaintRgn, 1,
- PyDoc_STR("(RgnHandle rgn) -> None")},
- {"InvertRgn", (PyCFunction)Qd_InvertRgn, 1,
- PyDoc_STR("(RgnHandle rgn) -> None")},
- {"FillRgn", (PyCFunction)Qd_FillRgn, 1,
- PyDoc_STR("(RgnHandle rgn, Pattern pat) -> None")},
- {"GetPixel", (PyCFunction)Qd_GetPixel, 1,
- PyDoc_STR("(short h, short v) -> (Boolean _rv)")},
- {"PtInRect", (PyCFunction)Qd_PtInRect, 1,
- PyDoc_STR("(Point pt, Rect r) -> (Boolean _rv)")},
- {"DrawText", (PyCFunction)Qd_DrawText, 1,
- PyDoc_STR("(Buffer textBuf, short firstByte, short byteCount) -> None")},
- {"BitMap", (PyCFunction)Qd_BitMap, 1,
- PyDoc_STR("Take (string, int, Rect) argument and create BitMap")},
- {"RawBitMap", (PyCFunction)Qd_RawBitMap, 1,
- PyDoc_STR("Take string BitMap and turn into BitMap object")},
+ {"GetPort", (PyCFunction)Qd_GetPort, 1,
+ PyDoc_STR("() -> (GrafPtr port)")},
+ {"GrafDevice", (PyCFunction)Qd_GrafDevice, 1,
+ PyDoc_STR("(short device) -> None")},
+ {"SetPortBits", (PyCFunction)Qd_SetPortBits, 1,
+ PyDoc_STR("(BitMapPtr bm) -> None")},
+ {"PortSize", (PyCFunction)Qd_PortSize, 1,
+ PyDoc_STR("(short width, short height) -> None")},
+ {"MovePortTo", (PyCFunction)Qd_MovePortTo, 1,
+ PyDoc_STR("(short leftGlobal, short topGlobal) -> None")},
+ {"SetOrigin", (PyCFunction)Qd_SetOrigin, 1,
+ PyDoc_STR("(short h, short v) -> None")},
+ {"SetClip", (PyCFunction)Qd_SetClip, 1,
+ PyDoc_STR("(RgnHandle rgn) -> None")},
+ {"GetClip", (PyCFunction)Qd_GetClip, 1,
+ PyDoc_STR("(RgnHandle rgn) -> None")},
+ {"ClipRect", (PyCFunction)Qd_ClipRect, 1,
+ PyDoc_STR("(Rect r) -> None")},
+ {"BackPat", (PyCFunction)Qd_BackPat, 1,
+ PyDoc_STR("(Pattern pat) -> None")},
+ {"InitCursor", (PyCFunction)Qd_InitCursor, 1,
+ PyDoc_STR("() -> None")},
+ {"MacSetCursor", (PyCFunction)Qd_MacSetCursor, 1,
+ PyDoc_STR("(Cursor crsr) -> None")},
+ {"HideCursor", (PyCFunction)Qd_HideCursor, 1,
+ PyDoc_STR("() -> None")},
+ {"MacShowCursor", (PyCFunction)Qd_MacShowCursor, 1,
+ PyDoc_STR("() -> None")},
+ {"ObscureCursor", (PyCFunction)Qd_ObscureCursor, 1,
+ PyDoc_STR("() -> None")},
+ {"HidePen", (PyCFunction)Qd_HidePen, 1,
+ PyDoc_STR("() -> None")},
+ {"ShowPen", (PyCFunction)Qd_ShowPen, 1,
+ PyDoc_STR("() -> None")},
+ {"GetPen", (PyCFunction)Qd_GetPen, 1,
+ PyDoc_STR("() -> (Point pt)")},
+ {"GetPenState", (PyCFunction)Qd_GetPenState, 1,
+ PyDoc_STR("() -> (PenState pnState)")},
+ {"SetPenState", (PyCFunction)Qd_SetPenState, 1,
+ PyDoc_STR("(PenState pnState) -> None")},
+ {"PenSize", (PyCFunction)Qd_PenSize, 1,
+ PyDoc_STR("(short width, short height) -> None")},
+ {"PenMode", (PyCFunction)Qd_PenMode, 1,
+ PyDoc_STR("(short mode) -> None")},
+ {"PenPat", (PyCFunction)Qd_PenPat, 1,
+ PyDoc_STR("(Pattern pat) -> None")},
+ {"PenNormal", (PyCFunction)Qd_PenNormal, 1,
+ PyDoc_STR("() -> None")},
+ {"MoveTo", (PyCFunction)Qd_MoveTo, 1,
+ PyDoc_STR("(short h, short v) -> None")},
+ {"Move", (PyCFunction)Qd_Move, 1,
+ PyDoc_STR("(short dh, short dv) -> None")},
+ {"MacLineTo", (PyCFunction)Qd_MacLineTo, 1,
+ PyDoc_STR("(short h, short v) -> None")},
+ {"Line", (PyCFunction)Qd_Line, 1,
+ PyDoc_STR("(short dh, short dv) -> None")},
+ {"ForeColor", (PyCFunction)Qd_ForeColor, 1,
+ PyDoc_STR("(long color) -> None")},
+ {"BackColor", (PyCFunction)Qd_BackColor, 1,
+ PyDoc_STR("(long color) -> None")},
+ {"ColorBit", (PyCFunction)Qd_ColorBit, 1,
+ PyDoc_STR("(short whichBit) -> None")},
+ {"MacSetRect", (PyCFunction)Qd_MacSetRect, 1,
+ PyDoc_STR("(short left, short top, short right, short bottom) -> (Rect r)")},
+ {"MacOffsetRect", (PyCFunction)Qd_MacOffsetRect, 1,
+ PyDoc_STR("(Rect r, short dh, short dv) -> (Rect r)")},
+ {"MacInsetRect", (PyCFunction)Qd_MacInsetRect, 1,
+ PyDoc_STR("(Rect r, short dh, short dv) -> (Rect r)")},
+ {"SectRect", (PyCFunction)Qd_SectRect, 1,
+ PyDoc_STR("(Rect src1, Rect src2) -> (Boolean _rv, Rect dstRect)")},
+ {"MacUnionRect", (PyCFunction)Qd_MacUnionRect, 1,
+ PyDoc_STR("(Rect src1, Rect src2) -> (Rect dstRect)")},
+ {"MacEqualRect", (PyCFunction)Qd_MacEqualRect, 1,
+ PyDoc_STR("(Rect rect1, Rect rect2) -> (Boolean _rv)")},
+ {"EmptyRect", (PyCFunction)Qd_EmptyRect, 1,
+ PyDoc_STR("(Rect r) -> (Boolean _rv)")},
+ {"MacFrameRect", (PyCFunction)Qd_MacFrameRect, 1,
+ PyDoc_STR("(Rect r) -> None")},
+ {"PaintRect", (PyCFunction)Qd_PaintRect, 1,
+ PyDoc_STR("(Rect r) -> None")},
+ {"EraseRect", (PyCFunction)Qd_EraseRect, 1,
+ PyDoc_STR("(Rect r) -> None")},
+ {"MacInvertRect", (PyCFunction)Qd_MacInvertRect, 1,
+ PyDoc_STR("(Rect r) -> None")},
+ {"MacFillRect", (PyCFunction)Qd_MacFillRect, 1,
+ PyDoc_STR("(Rect r, Pattern pat) -> None")},
+ {"FrameOval", (PyCFunction)Qd_FrameOval, 1,
+ PyDoc_STR("(Rect r) -> None")},
+ {"PaintOval", (PyCFunction)Qd_PaintOval, 1,
+ PyDoc_STR("(Rect r) -> None")},
+ {"EraseOval", (PyCFunction)Qd_EraseOval, 1,
+ PyDoc_STR("(Rect r) -> None")},
+ {"InvertOval", (PyCFunction)Qd_InvertOval, 1,
+ PyDoc_STR("(Rect r) -> None")},
+ {"FillOval", (PyCFunction)Qd_FillOval, 1,
+ PyDoc_STR("(Rect r, Pattern pat) -> None")},
+ {"FrameRoundRect", (PyCFunction)Qd_FrameRoundRect, 1,
+ PyDoc_STR("(Rect r, short ovalWidth, short ovalHeight) -> None")},
+ {"PaintRoundRect", (PyCFunction)Qd_PaintRoundRect, 1,
+ PyDoc_STR("(Rect r, short ovalWidth, short ovalHeight) -> None")},
+ {"EraseRoundRect", (PyCFunction)Qd_EraseRoundRect, 1,
+ PyDoc_STR("(Rect r, short ovalWidth, short ovalHeight) -> None")},
+ {"InvertRoundRect", (PyCFunction)Qd_InvertRoundRect, 1,
+ PyDoc_STR("(Rect r, short ovalWidth, short ovalHeight) -> None")},
+ {"FillRoundRect", (PyCFunction)Qd_FillRoundRect, 1,
+ PyDoc_STR("(Rect r, short ovalWidth, short ovalHeight, Pattern pat) -> None")},
+ {"FrameArc", (PyCFunction)Qd_FrameArc, 1,
+ PyDoc_STR("(Rect r, short startAngle, short arcAngle) -> None")},
+ {"PaintArc", (PyCFunction)Qd_PaintArc, 1,
+ PyDoc_STR("(Rect r, short startAngle, short arcAngle) -> None")},
+ {"EraseArc", (PyCFunction)Qd_EraseArc, 1,
+ PyDoc_STR("(Rect r, short startAngle, short arcAngle) -> None")},
+ {"InvertArc", (PyCFunction)Qd_InvertArc, 1,
+ PyDoc_STR("(Rect r, short startAngle, short arcAngle) -> None")},
+ {"FillArc", (PyCFunction)Qd_FillArc, 1,
+ PyDoc_STR("(Rect r, short startAngle, short arcAngle, Pattern pat) -> None")},
+ {"NewRgn", (PyCFunction)Qd_NewRgn, 1,
+ PyDoc_STR("() -> (RgnHandle _rv)")},
+ {"OpenRgn", (PyCFunction)Qd_OpenRgn, 1,
+ PyDoc_STR("() -> None")},
+ {"CloseRgn", (PyCFunction)Qd_CloseRgn, 1,
+ PyDoc_STR("(RgnHandle dstRgn) -> None")},
+ {"BitMapToRegion", (PyCFunction)Qd_BitMapToRegion, 1,
+ PyDoc_STR("(RgnHandle region, BitMapPtr bMap) -> None")},
+ {"RgnToHandle", (PyCFunction)Qd_RgnToHandle, 1,
+ PyDoc_STR("(RgnHandle region, Handle flattenedRgnDataHdl) -> None")},
+ {"DisposeRgn", (PyCFunction)Qd_DisposeRgn, 1,
+ PyDoc_STR("(RgnHandle rgn) -> None")},
+ {"MacCopyRgn", (PyCFunction)Qd_MacCopyRgn, 1,
+ PyDoc_STR("(RgnHandle srcRgn, RgnHandle dstRgn) -> None")},
+ {"SetEmptyRgn", (PyCFunction)Qd_SetEmptyRgn, 1,
+ PyDoc_STR("(RgnHandle rgn) -> None")},
+ {"MacSetRectRgn", (PyCFunction)Qd_MacSetRectRgn, 1,
+ PyDoc_STR("(RgnHandle rgn, short left, short top, short right, short bottom) -> None")},
+ {"RectRgn", (PyCFunction)Qd_RectRgn, 1,
+ PyDoc_STR("(RgnHandle rgn, Rect r) -> None")},
+ {"MacOffsetRgn", (PyCFunction)Qd_MacOffsetRgn, 1,
+ PyDoc_STR("(RgnHandle rgn, short dh, short dv) -> None")},
+ {"InsetRgn", (PyCFunction)Qd_InsetRgn, 1,
+ PyDoc_STR("(RgnHandle rgn, short dh, short dv) -> None")},
+ {"SectRgn", (PyCFunction)Qd_SectRgn, 1,
+ PyDoc_STR("(RgnHandle srcRgnA, RgnHandle srcRgnB, RgnHandle dstRgn) -> None")},
+ {"MacUnionRgn", (PyCFunction)Qd_MacUnionRgn, 1,
+ PyDoc_STR("(RgnHandle srcRgnA, RgnHandle srcRgnB, RgnHandle dstRgn) -> None")},
+ {"DiffRgn", (PyCFunction)Qd_DiffRgn, 1,
+ PyDoc_STR("(RgnHandle srcRgnA, RgnHandle srcRgnB, RgnHandle dstRgn) -> None")},
+ {"MacXorRgn", (PyCFunction)Qd_MacXorRgn, 1,
+ PyDoc_STR("(RgnHandle srcRgnA, RgnHandle srcRgnB, RgnHandle dstRgn) -> None")},
+ {"RectInRgn", (PyCFunction)Qd_RectInRgn, 1,
+ PyDoc_STR("(Rect r, RgnHandle rgn) -> (Boolean _rv)")},
+ {"MacEqualRgn", (PyCFunction)Qd_MacEqualRgn, 1,
+ PyDoc_STR("(RgnHandle rgnA, RgnHandle rgnB) -> (Boolean _rv)")},
+ {"EmptyRgn", (PyCFunction)Qd_EmptyRgn, 1,
+ PyDoc_STR("(RgnHandle rgn) -> (Boolean _rv)")},
+ {"MacFrameRgn", (PyCFunction)Qd_MacFrameRgn, 1,
+ PyDoc_STR("(RgnHandle rgn) -> None")},
+ {"MacPaintRgn", (PyCFunction)Qd_MacPaintRgn, 1,
+ PyDoc_STR("(RgnHandle rgn) -> None")},
+ {"EraseRgn", (PyCFunction)Qd_EraseRgn, 1,
+ PyDoc_STR("(RgnHandle rgn) -> None")},
+ {"MacInvertRgn", (PyCFunction)Qd_MacInvertRgn, 1,
+ PyDoc_STR("(RgnHandle rgn) -> None")},
+ {"MacFillRgn", (PyCFunction)Qd_MacFillRgn, 1,
+ PyDoc_STR("(RgnHandle rgn, Pattern pat) -> None")},
+ {"ScrollRect", (PyCFunction)Qd_ScrollRect, 1,
+ PyDoc_STR("(Rect r, short dh, short dv, RgnHandle updateRgn) -> None")},
+ {"CopyBits", (PyCFunction)Qd_CopyBits, 1,
+ PyDoc_STR("(BitMapPtr srcBits, BitMapPtr dstBits, Rect srcRect, Rect dstRect, short mode, RgnHandle maskRgn) -> None")},
+ {"CopyMask", (PyCFunction)Qd_CopyMask, 1,
+ PyDoc_STR("(BitMapPtr srcBits, BitMapPtr maskBits, BitMapPtr dstBits, Rect srcRect, Rect maskRect, Rect dstRect) -> None")},
+ {"OpenPicture", (PyCFunction)Qd_OpenPicture, 1,
+ PyDoc_STR("(Rect picFrame) -> (PicHandle _rv)")},
+ {"PicComment", (PyCFunction)Qd_PicComment, 1,
+ PyDoc_STR("(short kind, short dataSize, Handle dataHandle) -> None")},
+ {"ClosePicture", (PyCFunction)Qd_ClosePicture, 1,
+ PyDoc_STR("() -> None")},
+ {"DrawPicture", (PyCFunction)Qd_DrawPicture, 1,
+ PyDoc_STR("(PicHandle myPicture, Rect dstRect) -> None")},
+ {"KillPicture", (PyCFunction)Qd_KillPicture, 1,
+ PyDoc_STR("(PicHandle myPicture) -> None")},
+ {"OpenPoly", (PyCFunction)Qd_OpenPoly, 1,
+ PyDoc_STR("() -> (PolyHandle _rv)")},
+ {"ClosePoly", (PyCFunction)Qd_ClosePoly, 1,
+ PyDoc_STR("() -> None")},
+ {"KillPoly", (PyCFunction)Qd_KillPoly, 1,
+ PyDoc_STR("(PolyHandle poly) -> None")},
+ {"OffsetPoly", (PyCFunction)Qd_OffsetPoly, 1,
+ PyDoc_STR("(PolyHandle poly, short dh, short dv) -> None")},
+ {"FramePoly", (PyCFunction)Qd_FramePoly, 1,
+ PyDoc_STR("(PolyHandle poly) -> None")},
+ {"PaintPoly", (PyCFunction)Qd_PaintPoly, 1,
+ PyDoc_STR("(PolyHandle poly) -> None")},
+ {"ErasePoly", (PyCFunction)Qd_ErasePoly, 1,
+ PyDoc_STR("(PolyHandle poly) -> None")},
+ {"InvertPoly", (PyCFunction)Qd_InvertPoly, 1,
+ PyDoc_STR("(PolyHandle poly) -> None")},
+ {"FillPoly", (PyCFunction)Qd_FillPoly, 1,
+ PyDoc_STR("(PolyHandle poly, Pattern pat) -> None")},
+ {"SetPt", (PyCFunction)Qd_SetPt, 1,
+ PyDoc_STR("(short h, short v) -> (Point pt)")},
+ {"LocalToGlobal", (PyCFunction)Qd_LocalToGlobal, 1,
+ PyDoc_STR("(Point pt) -> (Point pt)")},
+ {"GlobalToLocal", (PyCFunction)Qd_GlobalToLocal, 1,
+ PyDoc_STR("(Point pt) -> (Point pt)")},
+ {"Random", (PyCFunction)Qd_Random, 1,
+ PyDoc_STR("() -> (short _rv)")},
+ {"MacGetPixel", (PyCFunction)Qd_MacGetPixel, 1,
+ PyDoc_STR("(short h, short v) -> (Boolean _rv)")},
+ {"ScalePt", (PyCFunction)Qd_ScalePt, 1,
+ PyDoc_STR("(Point pt, Rect srcRect, Rect dstRect) -> (Point pt)")},
+ {"MapPt", (PyCFunction)Qd_MapPt, 1,
+ PyDoc_STR("(Point pt, Rect srcRect, Rect dstRect) -> (Point pt)")},
+ {"MapRect", (PyCFunction)Qd_MapRect, 1,
+ PyDoc_STR("(Rect r, Rect srcRect, Rect dstRect) -> (Rect r)")},
+ {"MapRgn", (PyCFunction)Qd_MapRgn, 1,
+ PyDoc_STR("(RgnHandle rgn, Rect srcRect, Rect dstRect) -> None")},
+ {"MapPoly", (PyCFunction)Qd_MapPoly, 1,
+ PyDoc_STR("(PolyHandle poly, Rect srcRect, Rect dstRect) -> None")},
+ {"StdBits", (PyCFunction)Qd_StdBits, 1,
+ PyDoc_STR("(BitMapPtr srcBits, Rect srcRect, Rect dstRect, short mode, RgnHandle maskRgn) -> None")},
+ {"AddPt", (PyCFunction)Qd_AddPt, 1,
+ PyDoc_STR("(Point src, Point dst) -> (Point dst)")},
+ {"EqualPt", (PyCFunction)Qd_EqualPt, 1,
+ PyDoc_STR("(Point pt1, Point pt2) -> (Boolean _rv)")},
+ {"MacPtInRect", (PyCFunction)Qd_MacPtInRect, 1,
+ PyDoc_STR("(Point pt, Rect r) -> (Boolean _rv)")},
+ {"Pt2Rect", (PyCFunction)Qd_Pt2Rect, 1,
+ PyDoc_STR("(Point pt1, Point pt2) -> (Rect dstRect)")},
+ {"PtToAngle", (PyCFunction)Qd_PtToAngle, 1,
+ PyDoc_STR("(Rect r, Point pt) -> (short angle)")},
+ {"SubPt", (PyCFunction)Qd_SubPt, 1,
+ PyDoc_STR("(Point src, Point dst) -> (Point dst)")},
+ {"PtInRgn", (PyCFunction)Qd_PtInRgn, 1,
+ PyDoc_STR("(Point pt, RgnHandle rgn) -> (Boolean _rv)")},
+ {"NewPixMap", (PyCFunction)Qd_NewPixMap, 1,
+ PyDoc_STR("() -> (PixMapHandle _rv)")},
+ {"DisposePixMap", (PyCFunction)Qd_DisposePixMap, 1,
+ PyDoc_STR("(PixMapHandle pm) -> None")},
+ {"CopyPixMap", (PyCFunction)Qd_CopyPixMap, 1,
+ PyDoc_STR("(PixMapHandle srcPM, PixMapHandle dstPM) -> None")},
+ {"NewPixPat", (PyCFunction)Qd_NewPixPat, 1,
+ PyDoc_STR("() -> (PixPatHandle _rv)")},
+ {"DisposePixPat", (PyCFunction)Qd_DisposePixPat, 1,
+ PyDoc_STR("(PixPatHandle pp) -> None")},
+ {"CopyPixPat", (PyCFunction)Qd_CopyPixPat, 1,
+ PyDoc_STR("(PixPatHandle srcPP, PixPatHandle dstPP) -> None")},
+ {"PenPixPat", (PyCFunction)Qd_PenPixPat, 1,
+ PyDoc_STR("(PixPatHandle pp) -> None")},
+ {"BackPixPat", (PyCFunction)Qd_BackPixPat, 1,
+ PyDoc_STR("(PixPatHandle pp) -> None")},
+ {"GetPixPat", (PyCFunction)Qd_GetPixPat, 1,
+ PyDoc_STR("(short patID) -> (PixPatHandle _rv)")},
+ {"MakeRGBPat", (PyCFunction)Qd_MakeRGBPat, 1,
+ PyDoc_STR("(PixPatHandle pp, RGBColor myColor) -> None")},
+ {"FillCRect", (PyCFunction)Qd_FillCRect, 1,
+ PyDoc_STR("(Rect r, PixPatHandle pp) -> None")},
+ {"FillCOval", (PyCFunction)Qd_FillCOval, 1,
+ PyDoc_STR("(Rect r, PixPatHandle pp) -> None")},
+ {"FillCRoundRect", (PyCFunction)Qd_FillCRoundRect, 1,
+ PyDoc_STR("(Rect r, short ovalWidth, short ovalHeight, PixPatHandle pp) -> None")},
+ {"FillCArc", (PyCFunction)Qd_FillCArc, 1,
+ PyDoc_STR("(Rect r, short startAngle, short arcAngle, PixPatHandle pp) -> None")},
+ {"FillCRgn", (PyCFunction)Qd_FillCRgn, 1,
+ PyDoc_STR("(RgnHandle rgn, PixPatHandle pp) -> None")},
+ {"FillCPoly", (PyCFunction)Qd_FillCPoly, 1,
+ PyDoc_STR("(PolyHandle poly, PixPatHandle pp) -> None")},
+ {"RGBForeColor", (PyCFunction)Qd_RGBForeColor, 1,
+ PyDoc_STR("(RGBColor color) -> None")},
+ {"RGBBackColor", (PyCFunction)Qd_RGBBackColor, 1,
+ PyDoc_STR("(RGBColor color) -> None")},
+ {"SetCPixel", (PyCFunction)Qd_SetCPixel, 1,
+ PyDoc_STR("(short h, short v, RGBColor cPix) -> None")},
+ {"SetPortPix", (PyCFunction)Qd_SetPortPix, 1,
+ PyDoc_STR("(PixMapHandle pm) -> None")},
+ {"GetCPixel", (PyCFunction)Qd_GetCPixel, 1,
+ PyDoc_STR("(short h, short v) -> (RGBColor cPix)")},
+ {"GetForeColor", (PyCFunction)Qd_GetForeColor, 1,
+ PyDoc_STR("() -> (RGBColor color)")},
+ {"GetBackColor", (PyCFunction)Qd_GetBackColor, 1,
+ PyDoc_STR("() -> (RGBColor color)")},
+ {"OpColor", (PyCFunction)Qd_OpColor, 1,
+ PyDoc_STR("(RGBColor color) -> None")},
+ {"HiliteColor", (PyCFunction)Qd_HiliteColor, 1,
+ PyDoc_STR("(RGBColor color) -> None")},
+ {"DisposeCTable", (PyCFunction)Qd_DisposeCTable, 1,
+ PyDoc_STR("(CTabHandle cTable) -> None")},
+ {"GetCTable", (PyCFunction)Qd_GetCTable, 1,
+ PyDoc_STR("(short ctID) -> (CTabHandle _rv)")},
+ {"GetCCursor", (PyCFunction)Qd_GetCCursor, 1,
+ PyDoc_STR("(short crsrID) -> (CCrsrHandle _rv)")},
+ {"SetCCursor", (PyCFunction)Qd_SetCCursor, 1,
+ PyDoc_STR("(CCrsrHandle cCrsr) -> None")},
+ {"AllocCursor", (PyCFunction)Qd_AllocCursor, 1,
+ PyDoc_STR("() -> None")},
+ {"DisposeCCursor", (PyCFunction)Qd_DisposeCCursor, 1,
+ PyDoc_STR("(CCrsrHandle cCrsr) -> None")},
+ {"GetMaxDevice", (PyCFunction)Qd_GetMaxDevice, 1,
+ PyDoc_STR("(Rect globalRect) -> (GDHandle _rv)")},
+ {"GetCTSeed", (PyCFunction)Qd_GetCTSeed, 1,
+ PyDoc_STR("() -> (long _rv)")},
+ {"GetDeviceList", (PyCFunction)Qd_GetDeviceList, 1,
+ PyDoc_STR("() -> (GDHandle _rv)")},
+ {"GetMainDevice", (PyCFunction)Qd_GetMainDevice, 1,
+ PyDoc_STR("() -> (GDHandle _rv)")},
+ {"GetNextDevice", (PyCFunction)Qd_GetNextDevice, 1,
+ PyDoc_STR("(GDHandle curDevice) -> (GDHandle _rv)")},
+ {"TestDeviceAttribute", (PyCFunction)Qd_TestDeviceAttribute, 1,
+ PyDoc_STR("(GDHandle gdh, short attribute) -> (Boolean _rv)")},
+ {"SetDeviceAttribute", (PyCFunction)Qd_SetDeviceAttribute, 1,
+ PyDoc_STR("(GDHandle gdh, short attribute, Boolean value) -> None")},
+ {"InitGDevice", (PyCFunction)Qd_InitGDevice, 1,
+ PyDoc_STR("(short qdRefNum, long mode, GDHandle gdh) -> None")},
+ {"NewGDevice", (PyCFunction)Qd_NewGDevice, 1,
+ PyDoc_STR("(short refNum, long mode) -> (GDHandle _rv)")},
+ {"DisposeGDevice", (PyCFunction)Qd_DisposeGDevice, 1,
+ PyDoc_STR("(GDHandle gdh) -> None")},
+ {"SetGDevice", (PyCFunction)Qd_SetGDevice, 1,
+ PyDoc_STR("(GDHandle gd) -> None")},
+ {"GetGDevice", (PyCFunction)Qd_GetGDevice, 1,
+ PyDoc_STR("() -> (GDHandle _rv)")},
+ {"Color2Index", (PyCFunction)Qd_Color2Index, 1,
+ PyDoc_STR("(RGBColor myColor) -> (long _rv)")},
+ {"Index2Color", (PyCFunction)Qd_Index2Color, 1,
+ PyDoc_STR("(long index) -> (RGBColor aColor)")},
+ {"InvertColor", (PyCFunction)Qd_InvertColor, 1,
+ PyDoc_STR("() -> (RGBColor myColor)")},
+ {"RealColor", (PyCFunction)Qd_RealColor, 1,
+ PyDoc_STR("(RGBColor color) -> (Boolean _rv)")},
+ {"GetSubTable", (PyCFunction)Qd_GetSubTable, 1,
+ PyDoc_STR("(CTabHandle myColors, short iTabRes, CTabHandle targetTbl) -> None")},
+ {"MakeITable", (PyCFunction)Qd_MakeITable, 1,
+ PyDoc_STR("(CTabHandle cTabH, ITabHandle iTabH, short res) -> None")},
+ {"SetClientID", (PyCFunction)Qd_SetClientID, 1,
+ PyDoc_STR("(short id) -> None")},
+ {"ProtectEntry", (PyCFunction)Qd_ProtectEntry, 1,
+ PyDoc_STR("(short index, Boolean protect) -> None")},
+ {"ReserveEntry", (PyCFunction)Qd_ReserveEntry, 1,
+ PyDoc_STR("(short index, Boolean reserve) -> None")},
+ {"QDError", (PyCFunction)Qd_QDError, 1,
+ PyDoc_STR("() -> (short _rv)")},
+ {"CopyDeepMask", (PyCFunction)Qd_CopyDeepMask, 1,
+ PyDoc_STR("(BitMapPtr srcBits, BitMapPtr maskBits, BitMapPtr dstBits, Rect srcRect, Rect maskRect, Rect dstRect, short mode, RgnHandle maskRgn) -> None")},
+ {"GetPattern", (PyCFunction)Qd_GetPattern, 1,
+ PyDoc_STR("(short patternID) -> (PatHandle _rv)")},
+ {"MacGetCursor", (PyCFunction)Qd_MacGetCursor, 1,
+ PyDoc_STR("(short cursorID) -> (CursHandle _rv)")},
+ {"GetPicture", (PyCFunction)Qd_GetPicture, 1,
+ PyDoc_STR("(short pictureID) -> (PicHandle _rv)")},
+ {"DeltaPoint", (PyCFunction)Qd_DeltaPoint, 1,
+ PyDoc_STR("(Point ptA, Point ptB) -> (long _rv)")},
+ {"ShieldCursor", (PyCFunction)Qd_ShieldCursor, 1,
+ PyDoc_STR("(Rect shieldRect, Point offsetPt) -> None")},
+ {"ScreenRes", (PyCFunction)Qd_ScreenRes, 1,
+ PyDoc_STR("() -> (short scrnHRes, short scrnVRes)")},
+ {"GetIndPattern", (PyCFunction)Qd_GetIndPattern, 1,
+ PyDoc_STR("(short patternListID, short index) -> (Pattern thePat)")},
+ {"SlopeFromAngle", (PyCFunction)Qd_SlopeFromAngle, 1,
+ PyDoc_STR("(short angle) -> (Fixed _rv)")},
+ {"AngleFromSlope", (PyCFunction)Qd_AngleFromSlope, 1,
+ PyDoc_STR("(Fixed slope) -> (short _rv)")},
+ {"GetPixBounds", (PyCFunction)Qd_GetPixBounds, 1,
+ PyDoc_STR("(PixMapHandle pixMap) -> (Rect bounds)")},
+ {"GetPixDepth", (PyCFunction)Qd_GetPixDepth, 1,
+ PyDoc_STR("(PixMapHandle pixMap) -> (short _rv)")},
+ {"GetQDGlobalsRandomSeed", (PyCFunction)Qd_GetQDGlobalsRandomSeed, 1,
+ PyDoc_STR("() -> (long _rv)")},
+ {"GetQDGlobalsScreenBits", (PyCFunction)Qd_GetQDGlobalsScreenBits, 1,
+ PyDoc_STR("() -> (BitMap screenBits)")},
+ {"GetQDGlobalsArrow", (PyCFunction)Qd_GetQDGlobalsArrow, 1,
+ PyDoc_STR("() -> (Cursor arrow)")},
+ {"GetQDGlobalsDarkGray", (PyCFunction)Qd_GetQDGlobalsDarkGray, 1,
+ PyDoc_STR("() -> (Pattern dkGray)")},
+ {"GetQDGlobalsLightGray", (PyCFunction)Qd_GetQDGlobalsLightGray, 1,
+ PyDoc_STR("() -> (Pattern ltGray)")},
+ {"GetQDGlobalsGray", (PyCFunction)Qd_GetQDGlobalsGray, 1,
+ PyDoc_STR("() -> (Pattern gray)")},
+ {"GetQDGlobalsBlack", (PyCFunction)Qd_GetQDGlobalsBlack, 1,
+ PyDoc_STR("() -> (Pattern black)")},
+ {"GetQDGlobalsWhite", (PyCFunction)Qd_GetQDGlobalsWhite, 1,
+ PyDoc_STR("() -> (Pattern white)")},
+ {"GetQDGlobalsThePort", (PyCFunction)Qd_GetQDGlobalsThePort, 1,
+ PyDoc_STR("() -> (CGrafPtr _rv)")},
+ {"SetQDGlobalsRandomSeed", (PyCFunction)Qd_SetQDGlobalsRandomSeed, 1,
+ PyDoc_STR("(long randomSeed) -> None")},
+ {"SetQDGlobalsArrow", (PyCFunction)Qd_SetQDGlobalsArrow, 1,
+ PyDoc_STR("(Cursor arrow) -> None")},
+ {"GetRegionBounds", (PyCFunction)Qd_GetRegionBounds, 1,
+ PyDoc_STR("(RgnHandle region) -> (Rect bounds)")},
+ {"IsRegionRectangular", (PyCFunction)Qd_IsRegionRectangular, 1,
+ PyDoc_STR("(RgnHandle region) -> (Boolean _rv)")},
+ {"CreateNewPort", (PyCFunction)Qd_CreateNewPort, 1,
+ PyDoc_STR("() -> (CGrafPtr _rv)")},
+ {"SetQDError", (PyCFunction)Qd_SetQDError, 1,
+ PyDoc_STR("(OSErr err) -> None")},
+ {"LMGetScrVRes", (PyCFunction)Qd_LMGetScrVRes, 1,
+ PyDoc_STR("() -> (SInt16 _rv)")},
+ {"LMSetScrVRes", (PyCFunction)Qd_LMSetScrVRes, 1,
+ PyDoc_STR("(SInt16 value) -> None")},
+ {"LMGetScrHRes", (PyCFunction)Qd_LMGetScrHRes, 1,
+ PyDoc_STR("() -> (SInt16 _rv)")},
+ {"LMSetScrHRes", (PyCFunction)Qd_LMSetScrHRes, 1,
+ PyDoc_STR("(SInt16 value) -> None")},
+ {"LMGetMainDevice", (PyCFunction)Qd_LMGetMainDevice, 1,
+ PyDoc_STR("() -> (GDHandle _rv)")},
+ {"LMSetMainDevice", (PyCFunction)Qd_LMSetMainDevice, 1,
+ PyDoc_STR("(GDHandle value) -> None")},
+ {"LMGetDeviceList", (PyCFunction)Qd_LMGetDeviceList, 1,
+ PyDoc_STR("() -> (GDHandle _rv)")},
+ {"LMSetDeviceList", (PyCFunction)Qd_LMSetDeviceList, 1,
+ PyDoc_STR("(GDHandle value) -> None")},
+ {"LMGetQDColors", (PyCFunction)Qd_LMGetQDColors, 1,
+ PyDoc_STR("() -> (Handle _rv)")},
+ {"LMSetQDColors", (PyCFunction)Qd_LMSetQDColors, 1,
+ PyDoc_STR("(Handle value) -> None")},
+ {"LMGetWidthListHand", (PyCFunction)Qd_LMGetWidthListHand, 1,
+ PyDoc_STR("() -> (Handle _rv)")},
+ {"LMSetWidthListHand", (PyCFunction)Qd_LMSetWidthListHand, 1,
+ PyDoc_STR("(Handle value) -> None")},
+ {"LMGetHiliteMode", (PyCFunction)Qd_LMGetHiliteMode, 1,
+ PyDoc_STR("() -> (UInt8 _rv)")},
+ {"LMSetHiliteMode", (PyCFunction)Qd_LMSetHiliteMode, 1,
+ PyDoc_STR("(UInt8 value) -> None")},
+ {"LMGetWidthTabHandle", (PyCFunction)Qd_LMGetWidthTabHandle, 1,
+ PyDoc_STR("() -> (Handle _rv)")},
+ {"LMSetWidthTabHandle", (PyCFunction)Qd_LMSetWidthTabHandle, 1,
+ PyDoc_STR("(Handle value) -> None")},
+ {"LMGetLastSPExtra", (PyCFunction)Qd_LMGetLastSPExtra, 1,
+ PyDoc_STR("() -> (SInt32 _rv)")},
+ {"LMSetLastSPExtra", (PyCFunction)Qd_LMSetLastSPExtra, 1,
+ PyDoc_STR("(SInt32 value) -> None")},
+ {"LMGetLastFOND", (PyCFunction)Qd_LMGetLastFOND, 1,
+ PyDoc_STR("() -> (Handle _rv)")},
+ {"LMSetLastFOND", (PyCFunction)Qd_LMSetLastFOND, 1,
+ PyDoc_STR("(Handle value) -> None")},
+ {"LMGetFractEnable", (PyCFunction)Qd_LMGetFractEnable, 1,
+ PyDoc_STR("() -> (UInt8 _rv)")},
+ {"LMSetFractEnable", (PyCFunction)Qd_LMSetFractEnable, 1,
+ PyDoc_STR("(UInt8 value) -> None")},
+ {"LMGetTheGDevice", (PyCFunction)Qd_LMGetTheGDevice, 1,
+ PyDoc_STR("() -> (GDHandle _rv)")},
+ {"LMSetTheGDevice", (PyCFunction)Qd_LMSetTheGDevice, 1,
+ PyDoc_STR("(GDHandle value) -> None")},
+ {"LMGetHiliteRGB", (PyCFunction)Qd_LMGetHiliteRGB, 1,
+ PyDoc_STR("() -> (RGBColor hiliteRGBValue)")},
+ {"LMSetHiliteRGB", (PyCFunction)Qd_LMSetHiliteRGB, 1,
+ PyDoc_STR("(RGBColor hiliteRGBValue) -> None")},
+ {"LMGetCursorNew", (PyCFunction)Qd_LMGetCursorNew, 1,
+ PyDoc_STR("() -> (Boolean _rv)")},
+ {"LMSetCursorNew", (PyCFunction)Qd_LMSetCursorNew, 1,
+ PyDoc_STR("(Boolean value) -> None")},
+ {"TextFont", (PyCFunction)Qd_TextFont, 1,
+ PyDoc_STR("(short font) -> None")},
+ {"TextFace", (PyCFunction)Qd_TextFace, 1,
+ PyDoc_STR("(StyleParameter face) -> None")},
+ {"TextMode", (PyCFunction)Qd_TextMode, 1,
+ PyDoc_STR("(short mode) -> None")},
+ {"TextSize", (PyCFunction)Qd_TextSize, 1,
+ PyDoc_STR("(short size) -> None")},
+ {"SpaceExtra", (PyCFunction)Qd_SpaceExtra, 1,
+ PyDoc_STR("(Fixed extra) -> None")},
+ {"DrawChar", (PyCFunction)Qd_DrawChar, 1,
+ PyDoc_STR("(CharParameter ch) -> None")},
+ {"DrawString", (PyCFunction)Qd_DrawString, 1,
+ PyDoc_STR("(Str255 s) -> None")},
+ {"MacDrawText", (PyCFunction)Qd_MacDrawText, 1,
+ PyDoc_STR("(Buffer textBuf, short firstByte, short byteCount) -> None")},
+ {"CharWidth", (PyCFunction)Qd_CharWidth, 1,
+ PyDoc_STR("(CharParameter ch) -> (short _rv)")},
+ {"StringWidth", (PyCFunction)Qd_StringWidth, 1,
+ PyDoc_STR("(Str255 s) -> (short _rv)")},
+ {"TextWidth", (PyCFunction)Qd_TextWidth, 1,
+ PyDoc_STR("(Buffer textBuf, short firstByte, short byteCount) -> (short _rv)")},
+ {"GetFontInfo", (PyCFunction)Qd_GetFontInfo, 1,
+ PyDoc_STR("() -> (FontInfo info)")},
+ {"CharExtra", (PyCFunction)Qd_CharExtra, 1,
+ PyDoc_STR("(Fixed extra) -> None")},
+ {"TruncString", (PyCFunction)Qd_TruncString, 1,
+ PyDoc_STR("(short width, Str255 theString, TruncCode truncWhere) -> (short _rv)")},
+ {"SetPort", (PyCFunction)Qd_SetPort, 1,
+ PyDoc_STR("(GrafPtr thePort) -> None")},
+ {"GetCursor", (PyCFunction)Qd_GetCursor, 1,
+ PyDoc_STR("(short cursorID) -> (CursHandle _rv)")},
+ {"SetCursor", (PyCFunction)Qd_SetCursor, 1,
+ PyDoc_STR("(Cursor crsr) -> None")},
+ {"ShowCursor", (PyCFunction)Qd_ShowCursor, 1,
+ PyDoc_STR("() -> None")},
+ {"LineTo", (PyCFunction)Qd_LineTo, 1,
+ PyDoc_STR("(short h, short v) -> None")},
+ {"SetRect", (PyCFunction)Qd_SetRect, 1,
+ PyDoc_STR("(short left, short top, short right, short bottom) -> (Rect r)")},
+ {"OffsetRect", (PyCFunction)Qd_OffsetRect, 1,
+ PyDoc_STR("(Rect r, short dh, short dv) -> (Rect r)")},
+ {"InsetRect", (PyCFunction)Qd_InsetRect, 1,
+ PyDoc_STR("(Rect r, short dh, short dv) -> (Rect r)")},
+ {"UnionRect", (PyCFunction)Qd_UnionRect, 1,
+ PyDoc_STR("(Rect src1, Rect src2) -> (Rect dstRect)")},
+ {"EqualRect", (PyCFunction)Qd_EqualRect, 1,
+ PyDoc_STR("(Rect rect1, Rect rect2) -> (Boolean _rv)")},
+ {"FrameRect", (PyCFunction)Qd_FrameRect, 1,
+ PyDoc_STR("(Rect r) -> None")},
+ {"InvertRect", (PyCFunction)Qd_InvertRect, 1,
+ PyDoc_STR("(Rect r) -> None")},
+ {"FillRect", (PyCFunction)Qd_FillRect, 1,
+ PyDoc_STR("(Rect r, Pattern pat) -> None")},
+ {"CopyRgn", (PyCFunction)Qd_CopyRgn, 1,
+ PyDoc_STR("(RgnHandle srcRgn, RgnHandle dstRgn) -> None")},
+ {"SetRectRgn", (PyCFunction)Qd_SetRectRgn, 1,
+ PyDoc_STR("(RgnHandle rgn, short left, short top, short right, short bottom) -> None")},
+ {"OffsetRgn", (PyCFunction)Qd_OffsetRgn, 1,
+ PyDoc_STR("(RgnHandle rgn, short dh, short dv) -> None")},
+ {"UnionRgn", (PyCFunction)Qd_UnionRgn, 1,
+ PyDoc_STR("(RgnHandle srcRgnA, RgnHandle srcRgnB, RgnHandle dstRgn) -> None")},
+ {"XorRgn", (PyCFunction)Qd_XorRgn, 1,
+ PyDoc_STR("(RgnHandle srcRgnA, RgnHandle srcRgnB, RgnHandle dstRgn) -> None")},
+ {"EqualRgn", (PyCFunction)Qd_EqualRgn, 1,
+ PyDoc_STR("(RgnHandle rgnA, RgnHandle rgnB) -> (Boolean _rv)")},
+ {"FrameRgn", (PyCFunction)Qd_FrameRgn, 1,
+ PyDoc_STR("(RgnHandle rgn) -> None")},
+ {"PaintRgn", (PyCFunction)Qd_PaintRgn, 1,
+ PyDoc_STR("(RgnHandle rgn) -> None")},
+ {"InvertRgn", (PyCFunction)Qd_InvertRgn, 1,
+ PyDoc_STR("(RgnHandle rgn) -> None")},
+ {"FillRgn", (PyCFunction)Qd_FillRgn, 1,
+ PyDoc_STR("(RgnHandle rgn, Pattern pat) -> None")},
+ {"GetPixel", (PyCFunction)Qd_GetPixel, 1,
+ PyDoc_STR("(short h, short v) -> (Boolean _rv)")},
+ {"PtInRect", (PyCFunction)Qd_PtInRect, 1,
+ PyDoc_STR("(Point pt, Rect r) -> (Boolean _rv)")},
+ {"DrawText", (PyCFunction)Qd_DrawText, 1,
+ PyDoc_STR("(Buffer textBuf, short firstByte, short byteCount) -> None")},
+ {"BitMap", (PyCFunction)Qd_BitMap, 1,
+ PyDoc_STR("Take (string, int, Rect) argument and create BitMap")},
+ {"RawBitMap", (PyCFunction)Qd_RawBitMap, 1,
+ PyDoc_STR("Take string BitMap and turn into BitMap object")},
#endif /* __LP64__ */
- {NULL, NULL, 0}
+ {NULL, NULL, 0}
};
@@ -7095,15 +7095,15 @@ static PyMethodDef Qd_methods[] = {
*/
PyObject *BMObj_NewCopied(BitMapPtr itself)
{
- BitMapObject *it;
- BitMapPtr itself_copy;
+ BitMapObject *it;
+ BitMapPtr itself_copy;
- if ((itself_copy=(BitMapPtr)malloc(sizeof(BitMap))) == NULL)
- return PyErr_NoMemory();
- *itself_copy = *itself;
- it = (BitMapObject *)BMObj_New(itself_copy);
- it->referred_bitmap = itself_copy;
- return (PyObject *)it;
+ if ((itself_copy=(BitMapPtr)malloc(sizeof(BitMap))) == NULL)
+ return PyErr_NoMemory();
+ *itself_copy = *itself;
+ it = (BitMapObject *)BMObj_New(itself_copy);
+ it->referred_bitmap = itself_copy;
+ return (PyObject *)it;
}
#endif /* __LP64__ */
@@ -7111,42 +7111,42 @@ PyObject *BMObj_NewCopied(BitMapPtr itself)
void init_Qd(void)
{
- PyObject *m;
+ PyObject *m;
#ifndef __LP64__
- PyObject *d;
+ PyObject *d;
- PyMac_INIT_TOOLBOX_OBJECT_NEW(BitMapPtr, BMObj_New);
- PyMac_INIT_TOOLBOX_OBJECT_CONVERT(BitMapPtr, BMObj_Convert);
- PyMac_INIT_TOOLBOX_OBJECT_NEW(GrafPtr, GrafObj_New);
- PyMac_INIT_TOOLBOX_OBJECT_CONVERT(GrafPtr, GrafObj_Convert);
- PyMac_INIT_TOOLBOX_OBJECT_NEW(RGBColorPtr, QdRGB_New);
- PyMac_INIT_TOOLBOX_OBJECT_CONVERT(RGBColor, QdRGB_Convert);
+ PyMac_INIT_TOOLBOX_OBJECT_NEW(BitMapPtr, BMObj_New);
+ PyMac_INIT_TOOLBOX_OBJECT_CONVERT(BitMapPtr, BMObj_Convert);
+ PyMac_INIT_TOOLBOX_OBJECT_NEW(GrafPtr, GrafObj_New);
+ PyMac_INIT_TOOLBOX_OBJECT_CONVERT(GrafPtr, GrafObj_Convert);
+ PyMac_INIT_TOOLBOX_OBJECT_NEW(RGBColorPtr, QdRGB_New);
+ PyMac_INIT_TOOLBOX_OBJECT_CONVERT(RGBColor, QdRGB_Convert);
#endif /* __LP64__ */
- m = Py_InitModule("_Qd", Qd_methods);
+ m = Py_InitModule("_Qd", Qd_methods);
#ifndef __LP64__
- d = PyModule_GetDict(m);
- Qd_Error = PyMac_GetOSErrException();
- if (Qd_Error == NULL ||
- PyDict_SetItemString(d, "Error", Qd_Error) != 0)
- return;
- GrafPort_Type.ob_type = &PyType_Type;
- if (PyType_Ready(&GrafPort_Type) < 0) return;
- Py_INCREF(&GrafPort_Type);
- PyModule_AddObject(m, "GrafPort", (PyObject *)&GrafPort_Type);
- /* Backward-compatible name */
- Py_INCREF(&GrafPort_Type);
- PyModule_AddObject(m, "GrafPortType", (PyObject *)&GrafPort_Type);
- BitMap_Type.ob_type = &PyType_Type;
- if (PyType_Ready(&BitMap_Type) < 0) return;
- Py_INCREF(&BitMap_Type);
- PyModule_AddObject(m, "BitMap", (PyObject *)&BitMap_Type);
- /* Backward-compatible name */
- Py_INCREF(&BitMap_Type);
- PyModule_AddObject(m, "BitMapType", (PyObject *)&BitMap_Type);
+ d = PyModule_GetDict(m);
+ Qd_Error = PyMac_GetOSErrException();
+ if (Qd_Error == NULL ||
+ PyDict_SetItemString(d, "Error", Qd_Error) != 0)
+ return;
+ GrafPort_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&GrafPort_Type) < 0) return;
+ Py_INCREF(&GrafPort_Type);
+ PyModule_AddObject(m, "GrafPort", (PyObject *)&GrafPort_Type);
+ /* Backward-compatible name */
+ Py_INCREF(&GrafPort_Type);
+ PyModule_AddObject(m, "GrafPortType", (PyObject *)&GrafPort_Type);
+ BitMap_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&BitMap_Type) < 0) return;
+ Py_INCREF(&BitMap_Type);
+ PyModule_AddObject(m, "BitMap", (PyObject *)&BitMap_Type);
+ /* Backward-compatible name */
+ Py_INCREF(&BitMap_Type);
+ PyModule_AddObject(m, "BitMapType", (PyObject *)&BitMap_Type);
#endif /* __LP64__ */
}
diff --git a/Mac/Modules/qdoffs/_Qdoffsmodule.c b/Mac/Modules/qdoffs/_Qdoffsmodule.c
index b451472..686eca4 100644
--- a/Mac/Modules/qdoffs/_Qdoffsmodule.c
+++ b/Mac/Modules/qdoffs/_Qdoffsmodule.c
@@ -10,9 +10,9 @@
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
- PyErr_SetString(PyExc_NotImplementedError, \
- "Not available in this shared library/OS version"); \
- return NULL; \
+ PyErr_SetString(PyExc_NotImplementedError, \
+ "Not available in this shared library/OS version"); \
+ return NULL; \
}} while(0)
@@ -38,90 +38,90 @@ PyTypeObject GWorld_Type;
#define GWorldObj_Check(x) ((x)->ob_type == &GWorld_Type || PyObject_TypeCheck((x), &GWorld_Type))
typedef struct GWorldObject {
- PyObject_HEAD
- GWorldPtr ob_itself;
+ PyObject_HEAD
+ GWorldPtr ob_itself;
} GWorldObject;
PyObject *GWorldObj_New(GWorldPtr itself)
{
- GWorldObject *it;
- if (itself == NULL) return PyMac_Error(resNotFound);
- it = PyObject_NEW(GWorldObject, &GWorld_Type);
- if (it == NULL) return NULL;
- it->ob_itself = itself;
- return (PyObject *)it;
+ GWorldObject *it;
+ if (itself == NULL) return PyMac_Error(resNotFound);
+ it = PyObject_NEW(GWorldObject, &GWorld_Type);
+ if (it == NULL) return NULL;
+ it->ob_itself = itself;
+ return (PyObject *)it;
}
int GWorldObj_Convert(PyObject *v, GWorldPtr *p_itself)
{
- if (!GWorldObj_Check(v))
- {
- PyErr_SetString(PyExc_TypeError, "GWorld required");
- return 0;
- }
- *p_itself = ((GWorldObject *)v)->ob_itself;
- return 1;
+ if (!GWorldObj_Check(v))
+ {
+ PyErr_SetString(PyExc_TypeError, "GWorld required");
+ return 0;
+ }
+ *p_itself = ((GWorldObject *)v)->ob_itself;
+ return 1;
}
static void GWorldObj_dealloc(GWorldObject *self)
{
- DisposeGWorld(self->ob_itself);
- self->ob_type->tp_free((PyObject *)self);
+ DisposeGWorld(self->ob_itself);
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *GWorldObj_GetGWorldDevice(GWorldObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- GDHandle _rv;
+ PyObject *_res = NULL;
+ GDHandle _rv;
#ifndef GetGWorldDevice
- PyMac_PRECHECK(GetGWorldDevice);
+ PyMac_PRECHECK(GetGWorldDevice);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetGWorldDevice(_self->ob_itself);
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetGWorldDevice(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *GWorldObj_GetGWorldPixMap(GWorldObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- PixMapHandle _rv;
+ PyObject *_res = NULL;
+ PixMapHandle _rv;
#ifndef GetGWorldPixMap
- PyMac_PRECHECK(GetGWorldPixMap);
+ PyMac_PRECHECK(GetGWorldPixMap);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetGWorldPixMap(_self->ob_itself);
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetGWorldPixMap(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *GWorldObj_as_GrafPtr(GWorldObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- GrafPtr _rv;
+ PyObject *_res = NULL;
+ GrafPtr _rv;
#ifndef as_GrafPtr
- PyMac_PRECHECK(as_GrafPtr);
+ PyMac_PRECHECK(as_GrafPtr);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = as_GrafPtr(_self->ob_itself);
- _res = Py_BuildValue("O&",
- GrafObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = as_GrafPtr(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ GrafObj_New, _rv);
+ return _res;
}
static PyMethodDef GWorldObj_methods[] = {
- {"GetGWorldDevice", (PyCFunction)GWorldObj_GetGWorldDevice, 1,
- PyDoc_STR("() -> (GDHandle _rv)")},
- {"GetGWorldPixMap", (PyCFunction)GWorldObj_GetGWorldPixMap, 1,
- PyDoc_STR("() -> (PixMapHandle _rv)")},
- {"as_GrafPtr", (PyCFunction)GWorldObj_as_GrafPtr, 1,
- PyDoc_STR("() -> (GrafPtr _rv)")},
- {NULL, NULL, 0}
+ {"GetGWorldDevice", (PyCFunction)GWorldObj_GetGWorldDevice, 1,
+ PyDoc_STR("() -> (GDHandle _rv)")},
+ {"GetGWorldPixMap", (PyCFunction)GWorldObj_GetGWorldPixMap, 1,
+ PyDoc_STR("() -> (PixMapHandle _rv)")},
+ {"as_GrafPtr", (PyCFunction)GWorldObj_as_GrafPtr, 1,
+ PyDoc_STR("() -> (GrafPtr _rv)")},
+ {NULL, NULL, 0}
};
#define GWorldObj_getsetlist NULL
@@ -138,61 +138,61 @@ static PyMethodDef GWorldObj_methods[] = {
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;
+ 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 = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
- "_Qdoffs.GWorld", /*tp_name*/
- sizeof(GWorldObject), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- /* methods */
- (destructor) GWorldObj_dealloc, /*tp_dealloc*/
- 0, /*tp_print*/
- (getattrfunc)0, /*tp_getattr*/
- (setattrfunc)0, /*tp_setattr*/
- (cmpfunc) GWorldObj_compare, /*tp_compare*/
- (reprfunc) GWorldObj_repr, /*tp_repr*/
- (PyNumberMethods *)0, /* tp_as_number */
- (PySequenceMethods *)0, /* tp_as_sequence */
- (PyMappingMethods *)0, /* tp_as_mapping */
- (hashfunc) GWorldObj_hash, /*tp_hash*/
- 0, /*tp_call*/
- 0, /*tp_str*/
- PyObject_GenericGetAttr, /*tp_getattro*/
- PyObject_GenericSetAttr, /*tp_setattro */
- 0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
- 0, /*tp_doc*/
- 0, /*tp_traverse*/
- 0, /*tp_clear*/
- 0, /*tp_richcompare*/
- 0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
- 0, /*tp_iternext*/
- GWorldObj_methods, /* tp_methods */
- 0, /*tp_members*/
- GWorldObj_getsetlist, /*tp_getset*/
- 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 */
+ PyObject_HEAD_INIT(NULL)
+ 0, /*ob_size*/
+ "_Qdoffs.GWorld", /*tp_name*/
+ sizeof(GWorldObject), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ /* methods */
+ (destructor) GWorldObj_dealloc, /*tp_dealloc*/
+ 0, /*tp_print*/
+ (getattrfunc)0, /*tp_getattr*/
+ (setattrfunc)0, /*tp_setattr*/
+ (cmpfunc) GWorldObj_compare, /*tp_compare*/
+ (reprfunc) GWorldObj_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) GWorldObj_hash, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ PyObject_GenericGetAttr, /*tp_getattro*/
+ PyObject_GenericSetAttr, /*tp_setattro */
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
+ 0, /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ GWorldObj_methods, /* tp_methods */
+ 0, /*tp_members*/
+ GWorldObj_getsetlist, /*tp_getset*/
+ 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 --------------------- */
@@ -200,489 +200,489 @@ PyTypeObject GWorld_Type = {
static PyObject *Qdoffs_NewGWorld(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- QDErr _err;
- GWorldPtr offscreenGWorld;
- short PixelDepth;
- Rect boundsRect;
- CTabHandle cTable;
- GDHandle aGDevice;
- GWorldFlags flags;
+ PyObject *_res = NULL;
+ QDErr _err;
+ GWorldPtr offscreenGWorld;
+ short PixelDepth;
+ Rect boundsRect;
+ CTabHandle cTable;
+ GDHandle aGDevice;
+ GWorldFlags flags;
#ifndef NewGWorld
- PyMac_PRECHECK(NewGWorld);
+ PyMac_PRECHECK(NewGWorld);
#endif
- if (!PyArg_ParseTuple(_args, "hO&O&O&l",
- &PixelDepth,
- PyMac_GetRect, &boundsRect,
- OptResObj_Convert, &cTable,
- OptResObj_Convert, &aGDevice,
- &flags))
- return NULL;
- _err = NewGWorld(&offscreenGWorld,
- PixelDepth,
- &boundsRect,
- cTable,
- aGDevice,
- flags);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- GWorldObj_New, offscreenGWorld);
- return _res;
+ if (!PyArg_ParseTuple(_args, "hO&O&O&l",
+ &PixelDepth,
+ PyMac_GetRect, &boundsRect,
+ OptResObj_Convert, &cTable,
+ OptResObj_Convert, &aGDevice,
+ &flags))
+ return NULL;
+ _err = NewGWorld(&offscreenGWorld,
+ PixelDepth,
+ &boundsRect,
+ cTable,
+ aGDevice,
+ flags);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ GWorldObj_New, offscreenGWorld);
+ return _res;
}
static PyObject *Qdoffs_LockPixels(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- PixMapHandle pm;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ PixMapHandle pm;
#ifndef LockPixels
- PyMac_PRECHECK(LockPixels);
+ PyMac_PRECHECK(LockPixels);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &pm))
- return NULL;
- _rv = LockPixels(pm);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &pm))
+ return NULL;
+ _rv = LockPixels(pm);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *Qdoffs_UnlockPixels(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- PixMapHandle pm;
+ PyObject *_res = NULL;
+ PixMapHandle pm;
#ifndef UnlockPixels
- PyMac_PRECHECK(UnlockPixels);
+ PyMac_PRECHECK(UnlockPixels);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &pm))
- return NULL;
- UnlockPixels(pm);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &pm))
+ return NULL;
+ UnlockPixels(pm);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qdoffs_UpdateGWorld(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- GWorldFlags _rv;
- GWorldPtr offscreenGWorld;
- short pixelDepth;
- Rect boundsRect;
- CTabHandle cTable;
- GDHandle aGDevice;
- GWorldFlags flags;
+ PyObject *_res = NULL;
+ GWorldFlags _rv;
+ GWorldPtr offscreenGWorld;
+ short pixelDepth;
+ Rect boundsRect;
+ CTabHandle cTable;
+ GDHandle aGDevice;
+ GWorldFlags flags;
#ifndef UpdateGWorld
- PyMac_PRECHECK(UpdateGWorld);
+ PyMac_PRECHECK(UpdateGWorld);
#endif
- if (!PyArg_ParseTuple(_args, "hO&O&O&l",
- &pixelDepth,
- PyMac_GetRect, &boundsRect,
- OptResObj_Convert, &cTable,
- OptResObj_Convert, &aGDevice,
- &flags))
- return NULL;
- _rv = UpdateGWorld(&offscreenGWorld,
- pixelDepth,
- &boundsRect,
- cTable,
- aGDevice,
- flags);
- _res = Py_BuildValue("lO&",
- _rv,
- GWorldObj_New, offscreenGWorld);
- return _res;
+ if (!PyArg_ParseTuple(_args, "hO&O&O&l",
+ &pixelDepth,
+ PyMac_GetRect, &boundsRect,
+ OptResObj_Convert, &cTable,
+ OptResObj_Convert, &aGDevice,
+ &flags))
+ return NULL;
+ _rv = UpdateGWorld(&offscreenGWorld,
+ pixelDepth,
+ &boundsRect,
+ cTable,
+ aGDevice,
+ flags);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ GWorldObj_New, offscreenGWorld);
+ return _res;
}
static PyObject *Qdoffs_GetGWorld(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CGrafPtr port;
- GDHandle gdh;
+ PyObject *_res = NULL;
+ CGrafPtr port;
+ GDHandle gdh;
#ifndef GetGWorld
- PyMac_PRECHECK(GetGWorld);
+ PyMac_PRECHECK(GetGWorld);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- GetGWorld(&port,
- &gdh);
- _res = Py_BuildValue("O&O&",
- GrafObj_New, port,
- ResObj_New, gdh);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ GetGWorld(&port,
+ &gdh);
+ _res = Py_BuildValue("O&O&",
+ GrafObj_New, port,
+ ResObj_New, gdh);
+ return _res;
}
static PyObject *Qdoffs_SetGWorld(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CGrafPtr port;
- GDHandle gdh;
+ PyObject *_res = NULL;
+ CGrafPtr port;
+ GDHandle gdh;
#ifndef SetGWorld
- PyMac_PRECHECK(SetGWorld);
+ PyMac_PRECHECK(SetGWorld);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- GrafObj_Convert, &port,
- OptResObj_Convert, &gdh))
- return NULL;
- SetGWorld(port,
- gdh);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ GrafObj_Convert, &port,
+ OptResObj_Convert, &gdh))
+ return NULL;
+ SetGWorld(port,
+ gdh);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qdoffs_CTabChanged(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CTabHandle ctab;
+ PyObject *_res = NULL;
+ CTabHandle ctab;
#ifndef CTabChanged
- PyMac_PRECHECK(CTabChanged);
+ PyMac_PRECHECK(CTabChanged);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- OptResObj_Convert, &ctab))
- return NULL;
- CTabChanged(ctab);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ OptResObj_Convert, &ctab))
+ return NULL;
+ CTabChanged(ctab);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qdoffs_PixPatChanged(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- PixPatHandle ppat;
+ PyObject *_res = NULL;
+ PixPatHandle ppat;
#ifndef PixPatChanged
- PyMac_PRECHECK(PixPatChanged);
+ PyMac_PRECHECK(PixPatChanged);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &ppat))
- return NULL;
- PixPatChanged(ppat);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &ppat))
+ return NULL;
+ PixPatChanged(ppat);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qdoffs_PortChanged(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- GrafPtr port;
+ PyObject *_res = NULL;
+ GrafPtr port;
#ifndef PortChanged
- PyMac_PRECHECK(PortChanged);
+ PyMac_PRECHECK(PortChanged);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- GrafObj_Convert, &port))
- return NULL;
- PortChanged(port);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ GrafObj_Convert, &port))
+ return NULL;
+ PortChanged(port);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qdoffs_GDeviceChanged(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- GDHandle gdh;
+ PyObject *_res = NULL;
+ GDHandle gdh;
#ifndef GDeviceChanged
- PyMac_PRECHECK(GDeviceChanged);
+ PyMac_PRECHECK(GDeviceChanged);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- OptResObj_Convert, &gdh))
- return NULL;
- GDeviceChanged(gdh);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ OptResObj_Convert, &gdh))
+ return NULL;
+ GDeviceChanged(gdh);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qdoffs_AllowPurgePixels(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- PixMapHandle pm;
+ PyObject *_res = NULL;
+ PixMapHandle pm;
#ifndef AllowPurgePixels
- PyMac_PRECHECK(AllowPurgePixels);
+ PyMac_PRECHECK(AllowPurgePixels);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &pm))
- return NULL;
- AllowPurgePixels(pm);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &pm))
+ return NULL;
+ AllowPurgePixels(pm);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qdoffs_NoPurgePixels(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- PixMapHandle pm;
+ PyObject *_res = NULL;
+ PixMapHandle pm;
#ifndef NoPurgePixels
- PyMac_PRECHECK(NoPurgePixels);
+ PyMac_PRECHECK(NoPurgePixels);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &pm))
- return NULL;
- NoPurgePixels(pm);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &pm))
+ return NULL;
+ NoPurgePixels(pm);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qdoffs_GetPixelsState(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- GWorldFlags _rv;
- PixMapHandle pm;
+ PyObject *_res = NULL;
+ GWorldFlags _rv;
+ PixMapHandle pm;
#ifndef GetPixelsState
- PyMac_PRECHECK(GetPixelsState);
+ PyMac_PRECHECK(GetPixelsState);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &pm))
- return NULL;
- _rv = GetPixelsState(pm);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &pm))
+ return NULL;
+ _rv = GetPixelsState(pm);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qdoffs_SetPixelsState(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- PixMapHandle pm;
- GWorldFlags state;
+ PyObject *_res = NULL;
+ PixMapHandle pm;
+ GWorldFlags state;
#ifndef SetPixelsState
- PyMac_PRECHECK(SetPixelsState);
+ PyMac_PRECHECK(SetPixelsState);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- ResObj_Convert, &pm,
- &state))
- return NULL;
- SetPixelsState(pm,
- state);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ ResObj_Convert, &pm,
+ &state))
+ return NULL;
+ SetPixelsState(pm,
+ state);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qdoffs_GetPixRowBytes(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- long _rv;
- PixMapHandle pm;
+ PyObject *_res = NULL;
+ long _rv;
+ PixMapHandle pm;
#ifndef GetPixRowBytes
- PyMac_PRECHECK(GetPixRowBytes);
+ PyMac_PRECHECK(GetPixRowBytes);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &pm))
- return NULL;
- _rv = GetPixRowBytes(pm);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &pm))
+ return NULL;
+ _rv = GetPixRowBytes(pm);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qdoffs_NewScreenBuffer(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- QDErr _err;
- Rect globalRect;
- Boolean purgeable;
- GDHandle gdh;
- PixMapHandle offscreenPixMap;
+ PyObject *_res = NULL;
+ QDErr _err;
+ Rect globalRect;
+ Boolean purgeable;
+ GDHandle gdh;
+ PixMapHandle offscreenPixMap;
#ifndef NewScreenBuffer
- PyMac_PRECHECK(NewScreenBuffer);
+ PyMac_PRECHECK(NewScreenBuffer);
#endif
- if (!PyArg_ParseTuple(_args, "O&b",
- PyMac_GetRect, &globalRect,
- &purgeable))
- return NULL;
- _err = NewScreenBuffer(&globalRect,
- purgeable,
- &gdh,
- &offscreenPixMap);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&O&",
- ResObj_New, gdh,
- ResObj_New, offscreenPixMap);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&b",
+ PyMac_GetRect, &globalRect,
+ &purgeable))
+ return NULL;
+ _err = NewScreenBuffer(&globalRect,
+ purgeable,
+ &gdh,
+ &offscreenPixMap);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&O&",
+ ResObj_New, gdh,
+ ResObj_New, offscreenPixMap);
+ return _res;
}
static PyObject *Qdoffs_DisposeScreenBuffer(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- PixMapHandle offscreenPixMap;
+ PyObject *_res = NULL;
+ PixMapHandle offscreenPixMap;
#ifndef DisposeScreenBuffer
- PyMac_PRECHECK(DisposeScreenBuffer);
+ PyMac_PRECHECK(DisposeScreenBuffer);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &offscreenPixMap))
- return NULL;
- DisposeScreenBuffer(offscreenPixMap);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &offscreenPixMap))
+ return NULL;
+ DisposeScreenBuffer(offscreenPixMap);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qdoffs_QDDone(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- GrafPtr port;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ GrafPtr port;
#ifndef QDDone
- PyMac_PRECHECK(QDDone);
+ PyMac_PRECHECK(QDDone);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- GrafObj_Convert, &port))
- return NULL;
- _rv = QDDone(port);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ GrafObj_Convert, &port))
+ return NULL;
+ _rv = QDDone(port);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *Qdoffs_OffscreenVersion(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- long _rv;
+ PyObject *_res = NULL;
+ long _rv;
#ifndef OffscreenVersion
- PyMac_PRECHECK(OffscreenVersion);
+ PyMac_PRECHECK(OffscreenVersion);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = OffscreenVersion();
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = OffscreenVersion();
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qdoffs_NewTempScreenBuffer(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- QDErr _err;
- Rect globalRect;
- Boolean purgeable;
- GDHandle gdh;
- PixMapHandle offscreenPixMap;
+ PyObject *_res = NULL;
+ QDErr _err;
+ Rect globalRect;
+ Boolean purgeable;
+ GDHandle gdh;
+ PixMapHandle offscreenPixMap;
#ifndef NewTempScreenBuffer
- PyMac_PRECHECK(NewTempScreenBuffer);
+ PyMac_PRECHECK(NewTempScreenBuffer);
#endif
- if (!PyArg_ParseTuple(_args, "O&b",
- PyMac_GetRect, &globalRect,
- &purgeable))
- return NULL;
- _err = NewTempScreenBuffer(&globalRect,
- purgeable,
- &gdh,
- &offscreenPixMap);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&O&",
- ResObj_New, gdh,
- ResObj_New, offscreenPixMap);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&b",
+ PyMac_GetRect, &globalRect,
+ &purgeable))
+ return NULL;
+ _err = NewTempScreenBuffer(&globalRect,
+ purgeable,
+ &gdh,
+ &offscreenPixMap);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&O&",
+ ResObj_New, gdh,
+ ResObj_New, offscreenPixMap);
+ return _res;
}
static PyObject *Qdoffs_PixMap32Bit(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- PixMapHandle pmHandle;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ PixMapHandle pmHandle;
#ifndef PixMap32Bit
- PyMac_PRECHECK(PixMap32Bit);
+ PyMac_PRECHECK(PixMap32Bit);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &pmHandle))
- return NULL;
- _rv = PixMap32Bit(pmHandle);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &pmHandle))
+ return NULL;
+ _rv = PixMap32Bit(pmHandle);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *Qdoffs_GetPixMapBytes(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
- PixMapHandle pm;
- int from, length;
- char *cp;
+ PixMapHandle pm;
+ int from, length;
+ char *cp;
- if ( !PyArg_ParseTuple(_args, "O&ii", ResObj_Convert, &pm, &from, &length) )
- return NULL;
- cp = GetPixBaseAddr(pm)+from;
- _res = PyString_FromStringAndSize(cp, length);
- return _res;
+ if ( !PyArg_ParseTuple(_args, "O&ii", ResObj_Convert, &pm, &from, &length) )
+ return NULL;
+ cp = GetPixBaseAddr(pm)+from;
+ _res = PyString_FromStringAndSize(cp, length);
+ return _res;
}
static PyObject *Qdoffs_PutPixMapBytes(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
- PixMapHandle pm;
- int from, length;
- char *cp, *icp;
+ PixMapHandle pm;
+ int from, length;
+ char *cp, *icp;
- if ( !PyArg_ParseTuple(_args, "O&is#", ResObj_Convert, &pm, &from, &icp, &length) )
- return NULL;
- cp = GetPixBaseAddr(pm)+from;
- memcpy(cp, icp, length);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if ( !PyArg_ParseTuple(_args, "O&is#", ResObj_Convert, &pm, &from, &icp, &length) )
+ return NULL;
+ cp = GetPixBaseAddr(pm)+from;
+ memcpy(cp, icp, length);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
#endif /* __LP64__ */
static PyMethodDef Qdoffs_methods[] = {
#ifndef __LP64__
- {"NewGWorld", (PyCFunction)Qdoffs_NewGWorld, 1,
- PyDoc_STR("(short PixelDepth, Rect boundsRect, CTabHandle cTable, GDHandle aGDevice, GWorldFlags flags) -> (GWorldPtr offscreenGWorld)")},
- {"LockPixels", (PyCFunction)Qdoffs_LockPixels, 1,
- PyDoc_STR("(PixMapHandle pm) -> (Boolean _rv)")},
- {"UnlockPixels", (PyCFunction)Qdoffs_UnlockPixels, 1,
- PyDoc_STR("(PixMapHandle pm) -> None")},
- {"UpdateGWorld", (PyCFunction)Qdoffs_UpdateGWorld, 1,
- PyDoc_STR("(short pixelDepth, Rect boundsRect, CTabHandle cTable, GDHandle aGDevice, GWorldFlags flags) -> (GWorldFlags _rv, GWorldPtr offscreenGWorld)")},
- {"GetGWorld", (PyCFunction)Qdoffs_GetGWorld, 1,
- PyDoc_STR("() -> (CGrafPtr port, GDHandle gdh)")},
- {"SetGWorld", (PyCFunction)Qdoffs_SetGWorld, 1,
- PyDoc_STR("(CGrafPtr port, GDHandle gdh) -> None")},
- {"CTabChanged", (PyCFunction)Qdoffs_CTabChanged, 1,
- PyDoc_STR("(CTabHandle ctab) -> None")},
- {"PixPatChanged", (PyCFunction)Qdoffs_PixPatChanged, 1,
- PyDoc_STR("(PixPatHandle ppat) -> None")},
- {"PortChanged", (PyCFunction)Qdoffs_PortChanged, 1,
- PyDoc_STR("(GrafPtr port) -> None")},
- {"GDeviceChanged", (PyCFunction)Qdoffs_GDeviceChanged, 1,
- PyDoc_STR("(GDHandle gdh) -> None")},
- {"AllowPurgePixels", (PyCFunction)Qdoffs_AllowPurgePixels, 1,
- PyDoc_STR("(PixMapHandle pm) -> None")},
- {"NoPurgePixels", (PyCFunction)Qdoffs_NoPurgePixels, 1,
- PyDoc_STR("(PixMapHandle pm) -> None")},
- {"GetPixelsState", (PyCFunction)Qdoffs_GetPixelsState, 1,
- PyDoc_STR("(PixMapHandle pm) -> (GWorldFlags _rv)")},
- {"SetPixelsState", (PyCFunction)Qdoffs_SetPixelsState, 1,
- PyDoc_STR("(PixMapHandle pm, GWorldFlags state) -> None")},
- {"GetPixRowBytes", (PyCFunction)Qdoffs_GetPixRowBytes, 1,
- PyDoc_STR("(PixMapHandle pm) -> (long _rv)")},
- {"NewScreenBuffer", (PyCFunction)Qdoffs_NewScreenBuffer, 1,
- PyDoc_STR("(Rect globalRect, Boolean purgeable) -> (GDHandle gdh, PixMapHandle offscreenPixMap)")},
- {"DisposeScreenBuffer", (PyCFunction)Qdoffs_DisposeScreenBuffer, 1,
- PyDoc_STR("(PixMapHandle offscreenPixMap) -> None")},
- {"QDDone", (PyCFunction)Qdoffs_QDDone, 1,
- PyDoc_STR("(GrafPtr port) -> (Boolean _rv)")},
- {"OffscreenVersion", (PyCFunction)Qdoffs_OffscreenVersion, 1,
- PyDoc_STR("() -> (long _rv)")},
- {"NewTempScreenBuffer", (PyCFunction)Qdoffs_NewTempScreenBuffer, 1,
- PyDoc_STR("(Rect globalRect, Boolean purgeable) -> (GDHandle gdh, PixMapHandle offscreenPixMap)")},
- {"PixMap32Bit", (PyCFunction)Qdoffs_PixMap32Bit, 1,
- PyDoc_STR("(PixMapHandle pmHandle) -> (Boolean _rv)")},
- {"GetPixMapBytes", (PyCFunction)Qdoffs_GetPixMapBytes, 1,
- PyDoc_STR("(pixmap, int start, int size) -> string. Return bytes from the pixmap")},
- {"PutPixMapBytes", (PyCFunction)Qdoffs_PutPixMapBytes, 1,
- PyDoc_STR("(pixmap, int start, string data). Store bytes into the pixmap")},
+ {"NewGWorld", (PyCFunction)Qdoffs_NewGWorld, 1,
+ PyDoc_STR("(short PixelDepth, Rect boundsRect, CTabHandle cTable, GDHandle aGDevice, GWorldFlags flags) -> (GWorldPtr offscreenGWorld)")},
+ {"LockPixels", (PyCFunction)Qdoffs_LockPixels, 1,
+ PyDoc_STR("(PixMapHandle pm) -> (Boolean _rv)")},
+ {"UnlockPixels", (PyCFunction)Qdoffs_UnlockPixels, 1,
+ PyDoc_STR("(PixMapHandle pm) -> None")},
+ {"UpdateGWorld", (PyCFunction)Qdoffs_UpdateGWorld, 1,
+ PyDoc_STR("(short pixelDepth, Rect boundsRect, CTabHandle cTable, GDHandle aGDevice, GWorldFlags flags) -> (GWorldFlags _rv, GWorldPtr offscreenGWorld)")},
+ {"GetGWorld", (PyCFunction)Qdoffs_GetGWorld, 1,
+ PyDoc_STR("() -> (CGrafPtr port, GDHandle gdh)")},
+ {"SetGWorld", (PyCFunction)Qdoffs_SetGWorld, 1,
+ PyDoc_STR("(CGrafPtr port, GDHandle gdh) -> None")},
+ {"CTabChanged", (PyCFunction)Qdoffs_CTabChanged, 1,
+ PyDoc_STR("(CTabHandle ctab) -> None")},
+ {"PixPatChanged", (PyCFunction)Qdoffs_PixPatChanged, 1,
+ PyDoc_STR("(PixPatHandle ppat) -> None")},
+ {"PortChanged", (PyCFunction)Qdoffs_PortChanged, 1,
+ PyDoc_STR("(GrafPtr port) -> None")},
+ {"GDeviceChanged", (PyCFunction)Qdoffs_GDeviceChanged, 1,
+ PyDoc_STR("(GDHandle gdh) -> None")},
+ {"AllowPurgePixels", (PyCFunction)Qdoffs_AllowPurgePixels, 1,
+ PyDoc_STR("(PixMapHandle pm) -> None")},
+ {"NoPurgePixels", (PyCFunction)Qdoffs_NoPurgePixels, 1,
+ PyDoc_STR("(PixMapHandle pm) -> None")},
+ {"GetPixelsState", (PyCFunction)Qdoffs_GetPixelsState, 1,
+ PyDoc_STR("(PixMapHandle pm) -> (GWorldFlags _rv)")},
+ {"SetPixelsState", (PyCFunction)Qdoffs_SetPixelsState, 1,
+ PyDoc_STR("(PixMapHandle pm, GWorldFlags state) -> None")},
+ {"GetPixRowBytes", (PyCFunction)Qdoffs_GetPixRowBytes, 1,
+ PyDoc_STR("(PixMapHandle pm) -> (long _rv)")},
+ {"NewScreenBuffer", (PyCFunction)Qdoffs_NewScreenBuffer, 1,
+ PyDoc_STR("(Rect globalRect, Boolean purgeable) -> (GDHandle gdh, PixMapHandle offscreenPixMap)")},
+ {"DisposeScreenBuffer", (PyCFunction)Qdoffs_DisposeScreenBuffer, 1,
+ PyDoc_STR("(PixMapHandle offscreenPixMap) -> None")},
+ {"QDDone", (PyCFunction)Qdoffs_QDDone, 1,
+ PyDoc_STR("(GrafPtr port) -> (Boolean _rv)")},
+ {"OffscreenVersion", (PyCFunction)Qdoffs_OffscreenVersion, 1,
+ PyDoc_STR("() -> (long _rv)")},
+ {"NewTempScreenBuffer", (PyCFunction)Qdoffs_NewTempScreenBuffer, 1,
+ PyDoc_STR("(Rect globalRect, Boolean purgeable) -> (GDHandle gdh, PixMapHandle offscreenPixMap)")},
+ {"PixMap32Bit", (PyCFunction)Qdoffs_PixMap32Bit, 1,
+ PyDoc_STR("(PixMapHandle pmHandle) -> (Boolean _rv)")},
+ {"GetPixMapBytes", (PyCFunction)Qdoffs_GetPixMapBytes, 1,
+ PyDoc_STR("(pixmap, int start, int size) -> string. Return bytes from the pixmap")},
+ {"PutPixMapBytes", (PyCFunction)Qdoffs_PutPixMapBytes, 1,
+ PyDoc_STR("(pixmap, int start, string data). Store bytes into the pixmap")},
#endif /* __LP64__ */
- {NULL, NULL, 0}
+ {NULL, NULL, 0}
};
@@ -690,31 +690,31 @@ static PyMethodDef Qdoffs_methods[] = {
void init_Qdoffs(void)
{
- PyObject *m;
+ PyObject *m;
#ifndef __LP64__
- PyObject *d;
+ PyObject *d;
- PyMac_INIT_TOOLBOX_OBJECT_NEW(GWorldPtr, GWorldObj_New);
- PyMac_INIT_TOOLBOX_OBJECT_CONVERT(GWorldPtr, GWorldObj_Convert);
+ PyMac_INIT_TOOLBOX_OBJECT_NEW(GWorldPtr, GWorldObj_New);
+ PyMac_INIT_TOOLBOX_OBJECT_CONVERT(GWorldPtr, GWorldObj_Convert);
#endif /* __LP64__ */
- m = Py_InitModule("_Qdoffs", Qdoffs_methods);
+ m = Py_InitModule("_Qdoffs", Qdoffs_methods);
#ifndef __LP64__
- d = PyModule_GetDict(m);
- Qdoffs_Error = PyMac_GetOSErrException();
- if (Qdoffs_Error == NULL ||
- PyDict_SetItemString(d, "Error", Qdoffs_Error) != 0)
- return;
- GWorld_Type.ob_type = &PyType_Type;
- if (PyType_Ready(&GWorld_Type) < 0) return;
- Py_INCREF(&GWorld_Type);
- PyModule_AddObject(m, "GWorld", (PyObject *)&GWorld_Type);
- /* Backward-compatible name */
- Py_INCREF(&GWorld_Type);
- PyModule_AddObject(m, "GWorldType", (PyObject *)&GWorld_Type);
+ d = PyModule_GetDict(m);
+ Qdoffs_Error = PyMac_GetOSErrException();
+ if (Qdoffs_Error == NULL ||
+ PyDict_SetItemString(d, "Error", Qdoffs_Error) != 0)
+ return;
+ GWorld_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&GWorld_Type) < 0) return;
+ Py_INCREF(&GWorld_Type);
+ PyModule_AddObject(m, "GWorld", (PyObject *)&GWorld_Type);
+ /* Backward-compatible name */
+ Py_INCREF(&GWorld_Type);
+ PyModule_AddObject(m, "GWorldType", (PyObject *)&GWorld_Type);
#endif /* __LP64__ */
}
diff --git a/Mac/Modules/qt/_Qtmodule.c b/Mac/Modules/qt/_Qtmodule.c
index 4845e4a..bf67cda 100644
--- a/Mac/Modules/qt/_Qtmodule.c
+++ b/Mac/Modules/qt/_Qtmodule.c
@@ -10,9 +10,9 @@
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
- PyErr_SetString(PyExc_NotImplementedError, \
- "Not available in this shared library/OS version"); \
- return NULL; \
+ PyErr_SetString(PyExc_NotImplementedError, \
+ "Not available in this shared library/OS version"); \
+ return NULL; \
}} while(0)
@@ -56,37 +56,37 @@ extern int _MediaObj_Convert(PyObject *, Media *);
static PyObject *
QtTimeRecord_New(TimeRecord *itself)
{
- if (itself->base)
- return Py_BuildValue("O&lO&", PyMac_Buildwide, &itself->value, itself->scale,
- TimeBaseObj_New, itself->base);
- else
- return Py_BuildValue("O&lO", PyMac_Buildwide, &itself->value, itself->scale,
- Py_None);
+ if (itself->base)
+ return Py_BuildValue("O&lO&", PyMac_Buildwide, &itself->value, itself->scale,
+ TimeBaseObj_New, itself->base);
+ else
+ return Py_BuildValue("O&lO", PyMac_Buildwide, &itself->value, itself->scale,
+ Py_None);
}
static int
QtTimeRecord_Convert(PyObject *v, TimeRecord *p_itself)
{
- PyObject *base = NULL;
- if( !PyArg_ParseTuple(v, "O&l|O", PyMac_Getwide, &p_itself->value, &p_itself->scale,
- &base) )
- return 0;
- if ( base == NULL || base == Py_None )
- p_itself->base = NULL;
- else
- if ( !TimeBaseObj_Convert(base, &p_itself->base) )
- return 0;
- return 1;
+ PyObject *base = NULL;
+ if( !PyArg_ParseTuple(v, "O&l|O", PyMac_Getwide, &p_itself->value, &p_itself->scale,
+ &base) )
+ return 0;
+ if ( base == NULL || base == Py_None )
+ p_itself->base = NULL;
+ else
+ if ( !TimeBaseObj_Convert(base, &p_itself->base) )
+ return 0;
+ return 1;
}
static int
QtMusicMIDIPacket_Convert(PyObject *v, MusicMIDIPacket *p_itself)
{
- int dummy;
+ int dummy;
- if( !PyArg_ParseTuple(v, "hls#", &p_itself->length, &p_itself->reserved, p_itself->data, dummy) )
- return 0;
- return 1;
+ if( !PyArg_ParseTuple(v, "hls#", &p_itself->length, &p_itself->reserved, p_itself->data, dummy) )
+ return 0;
+ return 1;
}
@@ -101,47 +101,47 @@ PyTypeObject IdleManager_Type;
#define IdleManagerObj_Check(x) ((x)->ob_type == &IdleManager_Type || PyObject_TypeCheck((x), &IdleManager_Type))
typedef struct IdleManagerObject {
- PyObject_HEAD
- IdleManager ob_itself;
+ PyObject_HEAD
+ IdleManager ob_itself;
} IdleManagerObject;
PyObject *IdleManagerObj_New(IdleManager itself)
{
- IdleManagerObject *it;
- if (itself == NULL) {
- PyErr_SetString(Qt_Error,"Cannot create IdleManager from NULL pointer");
- return NULL;
- }
- it = PyObject_NEW(IdleManagerObject, &IdleManager_Type);
- if (it == NULL) return NULL;
- it->ob_itself = itself;
- return (PyObject *)it;
+ IdleManagerObject *it;
+ if (itself == NULL) {
+ PyErr_SetString(Qt_Error,"Cannot create IdleManager from NULL pointer");
+ return NULL;
+ }
+ it = PyObject_NEW(IdleManagerObject, &IdleManager_Type);
+ if (it == NULL) return NULL;
+ it->ob_itself = itself;
+ return (PyObject *)it;
}
int IdleManagerObj_Convert(PyObject *v, IdleManager *p_itself)
{
- if (v == Py_None)
- {
- *p_itself = NULL;
- return 1;
- }
- if (!IdleManagerObj_Check(v))
- {
- PyErr_SetString(PyExc_TypeError, "IdleManager required");
- return 0;
- }
- *p_itself = ((IdleManagerObject *)v)->ob_itself;
- return 1;
+ if (v == Py_None)
+ {
+ *p_itself = NULL;
+ return 1;
+ }
+ if (!IdleManagerObj_Check(v))
+ {
+ PyErr_SetString(PyExc_TypeError, "IdleManager required");
+ return 0;
+ }
+ *p_itself = ((IdleManagerObject *)v)->ob_itself;
+ return 1;
}
static void IdleManagerObj_dealloc(IdleManagerObject *self)
{
- /* Cleanup of self->ob_itself goes here */
- self->ob_type->tp_free((PyObject *)self);
+ /* Cleanup of self->ob_itself goes here */
+ self->ob_type->tp_free((PyObject *)self);
}
static PyMethodDef IdleManagerObj_methods[] = {
- {NULL, NULL, 0}
+ {NULL, NULL, 0}
};
#define IdleManagerObj_getsetlist NULL
@@ -158,61 +158,61 @@ static PyMethodDef IdleManagerObj_methods[] = {
static PyObject *IdleManagerObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
- PyObject *_self;
- IdleManager itself;
- char *kw[] = {"itself", 0};
+ PyObject *_self;
+ IdleManager itself;
+ char *kw[] = {"itself", 0};
- if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, IdleManagerObj_Convert, &itself)) return NULL;
- if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
- ((IdleManagerObject *)_self)->ob_itself = itself;
- return _self;
+ if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, IdleManagerObj_Convert, &itself)) return NULL;
+ if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
+ ((IdleManagerObject *)_self)->ob_itself = itself;
+ return _self;
}
#define IdleManagerObj_tp_free PyObject_Del
PyTypeObject IdleManager_Type = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
- "_Qt.IdleManager", /*tp_name*/
- sizeof(IdleManagerObject), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- /* methods */
- (destructor) IdleManagerObj_dealloc, /*tp_dealloc*/
- 0, /*tp_print*/
- (getattrfunc)0, /*tp_getattr*/
- (setattrfunc)0, /*tp_setattr*/
- (cmpfunc) IdleManagerObj_compare, /*tp_compare*/
- (reprfunc) IdleManagerObj_repr, /*tp_repr*/
- (PyNumberMethods *)0, /* tp_as_number */
- (PySequenceMethods *)0, /* tp_as_sequence */
- (PyMappingMethods *)0, /* tp_as_mapping */
- (hashfunc) IdleManagerObj_hash, /*tp_hash*/
- 0, /*tp_call*/
- 0, /*tp_str*/
- PyObject_GenericGetAttr, /*tp_getattro*/
- PyObject_GenericSetAttr, /*tp_setattro */
- 0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
- 0, /*tp_doc*/
- 0, /*tp_traverse*/
- 0, /*tp_clear*/
- 0, /*tp_richcompare*/
- 0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
- 0, /*tp_iternext*/
- IdleManagerObj_methods, /* tp_methods */
- 0, /*tp_members*/
- IdleManagerObj_getsetlist, /*tp_getset*/
- 0, /*tp_base*/
- 0, /*tp_dict*/
- 0, /*tp_descr_get*/
- 0, /*tp_descr_set*/
- 0, /*tp_dictoffset*/
- IdleManagerObj_tp_init, /* tp_init */
- IdleManagerObj_tp_alloc, /* tp_alloc */
- IdleManagerObj_tp_new, /* tp_new */
- IdleManagerObj_tp_free, /* tp_free */
+ PyObject_HEAD_INIT(NULL)
+ 0, /*ob_size*/
+ "_Qt.IdleManager", /*tp_name*/
+ sizeof(IdleManagerObject), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ /* methods */
+ (destructor) IdleManagerObj_dealloc, /*tp_dealloc*/
+ 0, /*tp_print*/
+ (getattrfunc)0, /*tp_getattr*/
+ (setattrfunc)0, /*tp_setattr*/
+ (cmpfunc) IdleManagerObj_compare, /*tp_compare*/
+ (reprfunc) IdleManagerObj_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) IdleManagerObj_hash, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ PyObject_GenericGetAttr, /*tp_getattro*/
+ PyObject_GenericSetAttr, /*tp_setattro */
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
+ 0, /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ IdleManagerObj_methods, /* tp_methods */
+ 0, /*tp_members*/
+ IdleManagerObj_getsetlist, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ IdleManagerObj_tp_init, /* tp_init */
+ IdleManagerObj_tp_alloc, /* tp_alloc */
+ IdleManagerObj_tp_new, /* tp_new */
+ IdleManagerObj_tp_free, /* tp_free */
};
/* ------------------ End object type IdleManager ------------------- */
@@ -225,1043 +225,1043 @@ PyTypeObject MovieController_Type;
#define MovieCtlObj_Check(x) ((x)->ob_type == &MovieController_Type || PyObject_TypeCheck((x), &MovieController_Type))
typedef struct MovieControllerObject {
- PyObject_HEAD
- MovieController ob_itself;
+ PyObject_HEAD
+ MovieController ob_itself;
} MovieControllerObject;
PyObject *MovieCtlObj_New(MovieController itself)
{
- MovieControllerObject *it;
- if (itself == NULL) {
- PyErr_SetString(Qt_Error,"Cannot create MovieController from NULL pointer");
- return NULL;
- }
- it = PyObject_NEW(MovieControllerObject, &MovieController_Type);
- if (it == NULL) return NULL;
- it->ob_itself = itself;
- return (PyObject *)it;
+ MovieControllerObject *it;
+ if (itself == NULL) {
+ PyErr_SetString(Qt_Error,"Cannot create MovieController from NULL pointer");
+ return NULL;
+ }
+ it = PyObject_NEW(MovieControllerObject, &MovieController_Type);
+ if (it == NULL) return NULL;
+ it->ob_itself = itself;
+ return (PyObject *)it;
}
int MovieCtlObj_Convert(PyObject *v, MovieController *p_itself)
{
- if (v == Py_None)
- {
- *p_itself = NULL;
- return 1;
- }
- if (!MovieCtlObj_Check(v))
- {
- PyErr_SetString(PyExc_TypeError, "MovieController required");
- return 0;
- }
- *p_itself = ((MovieControllerObject *)v)->ob_itself;
- return 1;
+ if (v == Py_None)
+ {
+ *p_itself = NULL;
+ return 1;
+ }
+ if (!MovieCtlObj_Check(v))
+ {
+ PyErr_SetString(PyExc_TypeError, "MovieController required");
+ return 0;
+ }
+ *p_itself = ((MovieControllerObject *)v)->ob_itself;
+ return 1;
}
static void MovieCtlObj_dealloc(MovieControllerObject *self)
{
- if (self->ob_itself) DisposeMovieController(self->ob_itself);
- self->ob_type->tp_free((PyObject *)self);
+ if (self->ob_itself) DisposeMovieController(self->ob_itself);
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *MovieCtlObj_MCSetMovie(MovieControllerObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- Movie theMovie;
- WindowPtr movieWindow;
- Point where;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ Movie theMovie;
+ WindowPtr movieWindow;
+ Point where;
#ifndef MCSetMovie
- PyMac_PRECHECK(MCSetMovie);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- MovieObj_Convert, &theMovie,
- WinObj_Convert, &movieWindow,
- PyMac_GetPoint, &where))
- return NULL;
- _rv = MCSetMovie(_self->ob_itself,
- theMovie,
- movieWindow,
- where);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyMac_PRECHECK(MCSetMovie);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ MovieObj_Convert, &theMovie,
+ WinObj_Convert, &movieWindow,
+ PyMac_GetPoint, &where))
+ return NULL;
+ _rv = MCSetMovie(_self->ob_itself,
+ theMovie,
+ movieWindow,
+ where);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *MovieCtlObj_MCGetIndMovie(MovieControllerObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Movie _rv;
- short index;
+ PyObject *_res = NULL;
+ Movie _rv;
+ short index;
#ifndef MCGetIndMovie
- PyMac_PRECHECK(MCGetIndMovie);
+ PyMac_PRECHECK(MCGetIndMovie);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &index))
- return NULL;
- _rv = MCGetIndMovie(_self->ob_itself,
- index);
- _res = Py_BuildValue("O&",
- MovieObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &index))
+ return NULL;
+ _rv = MCGetIndMovie(_self->ob_itself,
+ index);
+ _res = Py_BuildValue("O&",
+ MovieObj_New, _rv);
+ return _res;
}
static PyObject *MovieCtlObj_MCRemoveAllMovies(MovieControllerObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
#ifndef MCRemoveAllMovies
- PyMac_PRECHECK(MCRemoveAllMovies);
+ PyMac_PRECHECK(MCRemoveAllMovies);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = MCRemoveAllMovies(_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = MCRemoveAllMovies(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *MovieCtlObj_MCRemoveAMovie(MovieControllerObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- Movie m;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ Movie m;
#ifndef MCRemoveAMovie
- PyMac_PRECHECK(MCRemoveAMovie);
+ PyMac_PRECHECK(MCRemoveAMovie);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- MovieObj_Convert, &m))
- return NULL;
- _rv = MCRemoveAMovie(_self->ob_itself,
- m);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ MovieObj_Convert, &m))
+ return NULL;
+ _rv = MCRemoveAMovie(_self->ob_itself,
+ m);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *MovieCtlObj_MCRemoveMovie(MovieControllerObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
#ifndef MCRemoveMovie
- PyMac_PRECHECK(MCRemoveMovie);
+ PyMac_PRECHECK(MCRemoveMovie);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = MCRemoveMovie(_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = MCRemoveMovie(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *MovieCtlObj_MCIsPlayerEvent(MovieControllerObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- EventRecord e;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ EventRecord e;
#ifndef MCIsPlayerEvent
- PyMac_PRECHECK(MCIsPlayerEvent);
+ PyMac_PRECHECK(MCIsPlayerEvent);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetEventRecord, &e))
- return NULL;
- _rv = MCIsPlayerEvent(_self->ob_itself,
- &e);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetEventRecord, &e))
+ return NULL;
+ _rv = MCIsPlayerEvent(_self->ob_itself,
+ &e);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *MovieCtlObj_MCDoAction(MovieControllerObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- short action;
- void * params;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ short action;
+ void * params;
#ifndef MCDoAction
- PyMac_PRECHECK(MCDoAction);
+ PyMac_PRECHECK(MCDoAction);
#endif
- if (!PyArg_ParseTuple(_args, "hs",
- &action,
- &params))
- return NULL;
- _rv = MCDoAction(_self->ob_itself,
- action,
- params);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "hs",
+ &action,
+ &params))
+ return NULL;
+ _rv = MCDoAction(_self->ob_itself,
+ action,
+ params);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *MovieCtlObj_MCSetControllerAttached(MovieControllerObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- Boolean attach;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ Boolean attach;
#ifndef MCSetControllerAttached
- PyMac_PRECHECK(MCSetControllerAttached);
+ PyMac_PRECHECK(MCSetControllerAttached);
#endif
- if (!PyArg_ParseTuple(_args, "b",
- &attach))
- return NULL;
- _rv = MCSetControllerAttached(_self->ob_itself,
- attach);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "b",
+ &attach))
+ return NULL;
+ _rv = MCSetControllerAttached(_self->ob_itself,
+ attach);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *MovieCtlObj_MCIsControllerAttached(MovieControllerObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
#ifndef MCIsControllerAttached
- PyMac_PRECHECK(MCIsControllerAttached);
+ PyMac_PRECHECK(MCIsControllerAttached);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = MCIsControllerAttached(_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = MCIsControllerAttached(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *MovieCtlObj_MCSetControllerPort(MovieControllerObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- CGrafPtr gp;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ CGrafPtr gp;
#ifndef MCSetControllerPort
- PyMac_PRECHECK(MCSetControllerPort);
+ PyMac_PRECHECK(MCSetControllerPort);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- GrafObj_Convert, &gp))
- return NULL;
- _rv = MCSetControllerPort(_self->ob_itself,
- gp);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ GrafObj_Convert, &gp))
+ return NULL;
+ _rv = MCSetControllerPort(_self->ob_itself,
+ gp);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *MovieCtlObj_MCGetControllerPort(MovieControllerObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CGrafPtr _rv;
+ PyObject *_res = NULL;
+ CGrafPtr _rv;
#ifndef MCGetControllerPort
- PyMac_PRECHECK(MCGetControllerPort);
+ PyMac_PRECHECK(MCGetControllerPort);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = MCGetControllerPort(_self->ob_itself);
- _res = Py_BuildValue("O&",
- GrafObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = MCGetControllerPort(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ GrafObj_New, _rv);
+ return _res;
}
static PyObject *MovieCtlObj_MCSetVisible(MovieControllerObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- Boolean visible;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ Boolean visible;
#ifndef MCSetVisible
- PyMac_PRECHECK(MCSetVisible);
+ PyMac_PRECHECK(MCSetVisible);
#endif
- if (!PyArg_ParseTuple(_args, "b",
- &visible))
- return NULL;
- _rv = MCSetVisible(_self->ob_itself,
- visible);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "b",
+ &visible))
+ return NULL;
+ _rv = MCSetVisible(_self->ob_itself,
+ visible);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *MovieCtlObj_MCGetVisible(MovieControllerObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
#ifndef MCGetVisible
- PyMac_PRECHECK(MCGetVisible);
+ PyMac_PRECHECK(MCGetVisible);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = MCGetVisible(_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = MCGetVisible(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *MovieCtlObj_MCGetControllerBoundsRect(MovieControllerObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- Rect bounds;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ Rect bounds;
#ifndef MCGetControllerBoundsRect
- PyMac_PRECHECK(MCGetControllerBoundsRect);
+ PyMac_PRECHECK(MCGetControllerBoundsRect);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = MCGetControllerBoundsRect(_self->ob_itself,
- &bounds);
- _res = Py_BuildValue("lO&",
- _rv,
- PyMac_BuildRect, &bounds);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = MCGetControllerBoundsRect(_self->ob_itself,
+ &bounds);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ PyMac_BuildRect, &bounds);
+ return _res;
}
static PyObject *MovieCtlObj_MCSetControllerBoundsRect(MovieControllerObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- Rect bounds;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ Rect bounds;
#ifndef MCSetControllerBoundsRect
- PyMac_PRECHECK(MCSetControllerBoundsRect);
+ PyMac_PRECHECK(MCSetControllerBoundsRect);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetRect, &bounds))
- return NULL;
- _rv = MCSetControllerBoundsRect(_self->ob_itself,
- &bounds);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetRect, &bounds))
+ return NULL;
+ _rv = MCSetControllerBoundsRect(_self->ob_itself,
+ &bounds);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *MovieCtlObj_MCGetControllerBoundsRgn(MovieControllerObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RgnHandle _rv;
+ PyObject *_res = NULL;
+ RgnHandle _rv;
#ifndef MCGetControllerBoundsRgn
- PyMac_PRECHECK(MCGetControllerBoundsRgn);
+ PyMac_PRECHECK(MCGetControllerBoundsRgn);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = MCGetControllerBoundsRgn(_self->ob_itself);
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = MCGetControllerBoundsRgn(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *MovieCtlObj_MCGetWindowRgn(MovieControllerObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RgnHandle _rv;
- WindowPtr w;
+ PyObject *_res = NULL;
+ RgnHandle _rv;
+ WindowPtr w;
#ifndef MCGetWindowRgn
- PyMac_PRECHECK(MCGetWindowRgn);
+ PyMac_PRECHECK(MCGetWindowRgn);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- WinObj_Convert, &w))
- return NULL;
- _rv = MCGetWindowRgn(_self->ob_itself,
- w);
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ WinObj_Convert, &w))
+ return NULL;
+ _rv = MCGetWindowRgn(_self->ob_itself,
+ w);
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *MovieCtlObj_MCMovieChanged(MovieControllerObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- Movie m;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ Movie m;
#ifndef MCMovieChanged
- PyMac_PRECHECK(MCMovieChanged);
+ PyMac_PRECHECK(MCMovieChanged);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- MovieObj_Convert, &m))
- return NULL;
- _rv = MCMovieChanged(_self->ob_itself,
- m);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ MovieObj_Convert, &m))
+ return NULL;
+ _rv = MCMovieChanged(_self->ob_itself,
+ m);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *MovieCtlObj_MCSetDuration(MovieControllerObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- TimeValue duration;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ TimeValue duration;
#ifndef MCSetDuration
- PyMac_PRECHECK(MCSetDuration);
+ PyMac_PRECHECK(MCSetDuration);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &duration))
- return NULL;
- _rv = MCSetDuration(_self->ob_itself,
- duration);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &duration))
+ return NULL;
+ _rv = MCSetDuration(_self->ob_itself,
+ duration);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *MovieCtlObj_MCGetCurrentTime(MovieControllerObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- TimeValue _rv;
- TimeScale scale;
+ PyObject *_res = NULL;
+ TimeValue _rv;
+ TimeScale scale;
#ifndef MCGetCurrentTime
- PyMac_PRECHECK(MCGetCurrentTime);
+ PyMac_PRECHECK(MCGetCurrentTime);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = MCGetCurrentTime(_self->ob_itself,
- &scale);
- _res = Py_BuildValue("ll",
- _rv,
- scale);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = MCGetCurrentTime(_self->ob_itself,
+ &scale);
+ _res = Py_BuildValue("ll",
+ _rv,
+ scale);
+ return _res;
}
static PyObject *MovieCtlObj_MCNewAttachedController(MovieControllerObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- Movie theMovie;
- WindowPtr w;
- Point where;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ Movie theMovie;
+ WindowPtr w;
+ Point where;
#ifndef MCNewAttachedController
- PyMac_PRECHECK(MCNewAttachedController);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- MovieObj_Convert, &theMovie,
- WinObj_Convert, &w,
- PyMac_GetPoint, &where))
- return NULL;
- _rv = MCNewAttachedController(_self->ob_itself,
- theMovie,
- w,
- where);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyMac_PRECHECK(MCNewAttachedController);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ MovieObj_Convert, &theMovie,
+ WinObj_Convert, &w,
+ PyMac_GetPoint, &where))
+ return NULL;
+ _rv = MCNewAttachedController(_self->ob_itself,
+ theMovie,
+ w,
+ where);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *MovieCtlObj_MCDraw(MovieControllerObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- WindowPtr w;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ WindowPtr w;
#ifndef MCDraw
- PyMac_PRECHECK(MCDraw);
+ PyMac_PRECHECK(MCDraw);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- WinObj_Convert, &w))
- return NULL;
- _rv = MCDraw(_self->ob_itself,
- w);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ WinObj_Convert, &w))
+ return NULL;
+ _rv = MCDraw(_self->ob_itself,
+ w);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *MovieCtlObj_MCActivate(MovieControllerObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- WindowPtr w;
- Boolean activate;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ WindowPtr w;
+ Boolean activate;
#ifndef MCActivate
- PyMac_PRECHECK(MCActivate);
+ PyMac_PRECHECK(MCActivate);
#endif
- if (!PyArg_ParseTuple(_args, "O&b",
- WinObj_Convert, &w,
- &activate))
- return NULL;
- _rv = MCActivate(_self->ob_itself,
- w,
- activate);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&b",
+ WinObj_Convert, &w,
+ &activate))
+ return NULL;
+ _rv = MCActivate(_self->ob_itself,
+ w,
+ activate);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *MovieCtlObj_MCIdle(MovieControllerObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
#ifndef MCIdle
- PyMac_PRECHECK(MCIdle);
+ PyMac_PRECHECK(MCIdle);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = MCIdle(_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = MCIdle(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *MovieCtlObj_MCKey(MovieControllerObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SInt8 key;
- long modifiers;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SInt8 key;
+ long modifiers;
#ifndef MCKey
- PyMac_PRECHECK(MCKey);
+ PyMac_PRECHECK(MCKey);
#endif
- if (!PyArg_ParseTuple(_args, "bl",
- &key,
- &modifiers))
- return NULL;
- _rv = MCKey(_self->ob_itself,
- key,
- modifiers);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "bl",
+ &key,
+ &modifiers))
+ return NULL;
+ _rv = MCKey(_self->ob_itself,
+ key,
+ modifiers);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *MovieCtlObj_MCClick(MovieControllerObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- WindowPtr w;
- Point where;
- long when;
- long modifiers;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ WindowPtr w;
+ Point where;
+ long when;
+ long modifiers;
#ifndef MCClick
- PyMac_PRECHECK(MCClick);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&ll",
- WinObj_Convert, &w,
- PyMac_GetPoint, &where,
- &when,
- &modifiers))
- return NULL;
- _rv = MCClick(_self->ob_itself,
- w,
- where,
- when,
- modifiers);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyMac_PRECHECK(MCClick);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&ll",
+ WinObj_Convert, &w,
+ PyMac_GetPoint, &where,
+ &when,
+ &modifiers))
+ return NULL;
+ _rv = MCClick(_self->ob_itself,
+ w,
+ where,
+ when,
+ modifiers);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *MovieCtlObj_MCEnableEditing(MovieControllerObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- Boolean enabled;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ Boolean enabled;
#ifndef MCEnableEditing
- PyMac_PRECHECK(MCEnableEditing);
+ PyMac_PRECHECK(MCEnableEditing);
#endif
- if (!PyArg_ParseTuple(_args, "b",
- &enabled))
- return NULL;
- _rv = MCEnableEditing(_self->ob_itself,
- enabled);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "b",
+ &enabled))
+ return NULL;
+ _rv = MCEnableEditing(_self->ob_itself,
+ enabled);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *MovieCtlObj_MCIsEditingEnabled(MovieControllerObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- long _rv;
+ PyObject *_res = NULL;
+ long _rv;
#ifndef MCIsEditingEnabled
- PyMac_PRECHECK(MCIsEditingEnabled);
+ PyMac_PRECHECK(MCIsEditingEnabled);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = MCIsEditingEnabled(_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = MCIsEditingEnabled(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *MovieCtlObj_MCCopy(MovieControllerObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Movie _rv;
+ PyObject *_res = NULL;
+ Movie _rv;
#ifndef MCCopy
- PyMac_PRECHECK(MCCopy);
+ PyMac_PRECHECK(MCCopy);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = MCCopy(_self->ob_itself);
- _res = Py_BuildValue("O&",
- MovieObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = MCCopy(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ MovieObj_New, _rv);
+ return _res;
}
static PyObject *MovieCtlObj_MCCut(MovieControllerObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Movie _rv;
+ PyObject *_res = NULL;
+ Movie _rv;
#ifndef MCCut
- PyMac_PRECHECK(MCCut);
+ PyMac_PRECHECK(MCCut);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = MCCut(_self->ob_itself);
- _res = Py_BuildValue("O&",
- MovieObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = MCCut(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ MovieObj_New, _rv);
+ return _res;
}
static PyObject *MovieCtlObj_MCPaste(MovieControllerObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- Movie srcMovie;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ Movie srcMovie;
#ifndef MCPaste
- PyMac_PRECHECK(MCPaste);
+ PyMac_PRECHECK(MCPaste);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- MovieObj_Convert, &srcMovie))
- return NULL;
- _rv = MCPaste(_self->ob_itself,
- srcMovie);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ MovieObj_Convert, &srcMovie))
+ return NULL;
+ _rv = MCPaste(_self->ob_itself,
+ srcMovie);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *MovieCtlObj_MCClear(MovieControllerObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
#ifndef MCClear
- PyMac_PRECHECK(MCClear);
+ PyMac_PRECHECK(MCClear);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = MCClear(_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = MCClear(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *MovieCtlObj_MCUndo(MovieControllerObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
#ifndef MCUndo
- PyMac_PRECHECK(MCUndo);
+ PyMac_PRECHECK(MCUndo);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = MCUndo(_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = MCUndo(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *MovieCtlObj_MCPositionController(MovieControllerObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- Rect movieRect;
- Rect controllerRect;
- long someFlags;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ Rect movieRect;
+ Rect controllerRect;
+ long someFlags;
#ifndef MCPositionController
- PyMac_PRECHECK(MCPositionController);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&l",
- PyMac_GetRect, &movieRect,
- PyMac_GetRect, &controllerRect,
- &someFlags))
- return NULL;
- _rv = MCPositionController(_self->ob_itself,
- &movieRect,
- &controllerRect,
- someFlags);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyMac_PRECHECK(MCPositionController);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&l",
+ PyMac_GetRect, &movieRect,
+ PyMac_GetRect, &controllerRect,
+ &someFlags))
+ return NULL;
+ _rv = MCPositionController(_self->ob_itself,
+ &movieRect,
+ &controllerRect,
+ someFlags);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *MovieCtlObj_MCGetControllerInfo(MovieControllerObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- long someFlags;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ long someFlags;
#ifndef MCGetControllerInfo
- PyMac_PRECHECK(MCGetControllerInfo);
+ PyMac_PRECHECK(MCGetControllerInfo);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = MCGetControllerInfo(_self->ob_itself,
- &someFlags);
- _res = Py_BuildValue("ll",
- _rv,
- someFlags);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = MCGetControllerInfo(_self->ob_itself,
+ &someFlags);
+ _res = Py_BuildValue("ll",
+ _rv,
+ someFlags);
+ return _res;
}
static PyObject *MovieCtlObj_MCSetClip(MovieControllerObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- RgnHandle theClip;
- RgnHandle movieClip;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ RgnHandle theClip;
+ RgnHandle movieClip;
#ifndef MCSetClip
- PyMac_PRECHECK(MCSetClip);
+ PyMac_PRECHECK(MCSetClip);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- ResObj_Convert, &theClip,
- ResObj_Convert, &movieClip))
- return NULL;
- _rv = MCSetClip(_self->ob_itself,
- theClip,
- movieClip);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ ResObj_Convert, &theClip,
+ ResObj_Convert, &movieClip))
+ return NULL;
+ _rv = MCSetClip(_self->ob_itself,
+ theClip,
+ movieClip);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *MovieCtlObj_MCGetClip(MovieControllerObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- RgnHandle theClip;
- RgnHandle movieClip;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ RgnHandle theClip;
+ RgnHandle movieClip;
#ifndef MCGetClip
- PyMac_PRECHECK(MCGetClip);
+ PyMac_PRECHECK(MCGetClip);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = MCGetClip(_self->ob_itself,
- &theClip,
- &movieClip);
- _res = Py_BuildValue("lO&O&",
- _rv,
- ResObj_New, theClip,
- ResObj_New, movieClip);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = MCGetClip(_self->ob_itself,
+ &theClip,
+ &movieClip);
+ _res = Py_BuildValue("lO&O&",
+ _rv,
+ ResObj_New, theClip,
+ ResObj_New, movieClip);
+ return _res;
}
static PyObject *MovieCtlObj_MCDrawBadge(MovieControllerObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- RgnHandle movieRgn;
- RgnHandle badgeRgn;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ RgnHandle movieRgn;
+ RgnHandle badgeRgn;
#ifndef MCDrawBadge
- PyMac_PRECHECK(MCDrawBadge);
+ PyMac_PRECHECK(MCDrawBadge);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &movieRgn))
- return NULL;
- _rv = MCDrawBadge(_self->ob_itself,
- movieRgn,
- &badgeRgn);
- _res = Py_BuildValue("lO&",
- _rv,
- ResObj_New, badgeRgn);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &movieRgn))
+ return NULL;
+ _rv = MCDrawBadge(_self->ob_itself,
+ movieRgn,
+ &badgeRgn);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ ResObj_New, badgeRgn);
+ return _res;
}
static PyObject *MovieCtlObj_MCSetUpEditMenu(MovieControllerObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- long modifiers;
- MenuHandle mh;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ long modifiers;
+ MenuHandle mh;
#ifndef MCSetUpEditMenu
- PyMac_PRECHECK(MCSetUpEditMenu);
+ PyMac_PRECHECK(MCSetUpEditMenu);
#endif
- if (!PyArg_ParseTuple(_args, "lO&",
- &modifiers,
- MenuObj_Convert, &mh))
- return NULL;
- _rv = MCSetUpEditMenu(_self->ob_itself,
- modifiers,
- mh);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "lO&",
+ &modifiers,
+ MenuObj_Convert, &mh))
+ return NULL;
+ _rv = MCSetUpEditMenu(_self->ob_itself,
+ modifiers,
+ mh);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *MovieCtlObj_MCGetMenuString(MovieControllerObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- long modifiers;
- short item;
- Str255 aString;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ long modifiers;
+ short item;
+ Str255 aString;
#ifndef MCGetMenuString
- PyMac_PRECHECK(MCGetMenuString);
-#endif
- if (!PyArg_ParseTuple(_args, "lhO&",
- &modifiers,
- &item,
- PyMac_GetStr255, aString))
- return NULL;
- _rv = MCGetMenuString(_self->ob_itself,
- modifiers,
- item,
- aString);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyMac_PRECHECK(MCGetMenuString);
+#endif
+ if (!PyArg_ParseTuple(_args, "lhO&",
+ &modifiers,
+ &item,
+ PyMac_GetStr255, aString))
+ return NULL;
+ _rv = MCGetMenuString(_self->ob_itself,
+ modifiers,
+ item,
+ aString);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *MovieCtlObj_MCPtInController(MovieControllerObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- Point thePt;
- Boolean inController;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ Point thePt;
+ Boolean inController;
#ifndef MCPtInController
- PyMac_PRECHECK(MCPtInController);
+ PyMac_PRECHECK(MCPtInController);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetPoint, &thePt))
- return NULL;
- _rv = MCPtInController(_self->ob_itself,
- thePt,
- &inController);
- _res = Py_BuildValue("lb",
- _rv,
- inController);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetPoint, &thePt))
+ return NULL;
+ _rv = MCPtInController(_self->ob_itself,
+ thePt,
+ &inController);
+ _res = Py_BuildValue("lb",
+ _rv,
+ inController);
+ return _res;
}
static PyObject *MovieCtlObj_MCInvalidate(MovieControllerObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- WindowPtr w;
- RgnHandle invalidRgn;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ WindowPtr w;
+ RgnHandle invalidRgn;
#ifndef MCInvalidate
- PyMac_PRECHECK(MCInvalidate);
+ PyMac_PRECHECK(MCInvalidate);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- WinObj_Convert, &w,
- ResObj_Convert, &invalidRgn))
- return NULL;
- _rv = MCInvalidate(_self->ob_itself,
- w,
- invalidRgn);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ WinObj_Convert, &w,
+ ResObj_Convert, &invalidRgn))
+ return NULL;
+ _rv = MCInvalidate(_self->ob_itself,
+ w,
+ invalidRgn);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *MovieCtlObj_MCAdjustCursor(MovieControllerObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- WindowPtr w;
- Point where;
- long modifiers;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ WindowPtr w;
+ Point where;
+ long modifiers;
#ifndef MCAdjustCursor
- PyMac_PRECHECK(MCAdjustCursor);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&l",
- WinObj_Convert, &w,
- PyMac_GetPoint, &where,
- &modifiers))
- return NULL;
- _rv = MCAdjustCursor(_self->ob_itself,
- w,
- where,
- modifiers);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyMac_PRECHECK(MCAdjustCursor);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&l",
+ WinObj_Convert, &w,
+ PyMac_GetPoint, &where,
+ &modifiers))
+ return NULL;
+ _rv = MCAdjustCursor(_self->ob_itself,
+ w,
+ where,
+ modifiers);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *MovieCtlObj_MCGetInterfaceElement(MovieControllerObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MCInterfaceElement whichElement;
- void * element;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MCInterfaceElement whichElement;
+ void * element;
#ifndef MCGetInterfaceElement
- PyMac_PRECHECK(MCGetInterfaceElement);
+ PyMac_PRECHECK(MCGetInterfaceElement);
#endif
- if (!PyArg_ParseTuple(_args, "ls",
- &whichElement,
- &element))
- return NULL;
- _rv = MCGetInterfaceElement(_self->ob_itself,
- whichElement,
- element);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "ls",
+ &whichElement,
+ &element))
+ return NULL;
+ _rv = MCGetInterfaceElement(_self->ob_itself,
+ whichElement,
+ element);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *MovieCtlObj_MCAddMovieSegment(MovieControllerObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- Movie srcMovie;
- Boolean scaled;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ Movie srcMovie;
+ Boolean scaled;
#ifndef MCAddMovieSegment
- PyMac_PRECHECK(MCAddMovieSegment);
+ PyMac_PRECHECK(MCAddMovieSegment);
#endif
- if (!PyArg_ParseTuple(_args, "O&b",
- MovieObj_Convert, &srcMovie,
- &scaled))
- return NULL;
- _rv = MCAddMovieSegment(_self->ob_itself,
- srcMovie,
- scaled);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&b",
+ MovieObj_Convert, &srcMovie,
+ &scaled))
+ return NULL;
+ _rv = MCAddMovieSegment(_self->ob_itself,
+ srcMovie,
+ scaled);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *MovieCtlObj_MCTrimMovieSegment(MovieControllerObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
#ifndef MCTrimMovieSegment
- PyMac_PRECHECK(MCTrimMovieSegment);
+ PyMac_PRECHECK(MCTrimMovieSegment);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = MCTrimMovieSegment(_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = MCTrimMovieSegment(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *MovieCtlObj_MCSetIdleManager(MovieControllerObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- IdleManager im;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ IdleManager im;
#ifndef MCSetIdleManager
- PyMac_PRECHECK(MCSetIdleManager);
+ PyMac_PRECHECK(MCSetIdleManager);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- IdleManagerObj_Convert, &im))
- return NULL;
- _rv = MCSetIdleManager(_self->ob_itself,
- im);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ IdleManagerObj_Convert, &im))
+ return NULL;
+ _rv = MCSetIdleManager(_self->ob_itself,
+ im);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *MovieCtlObj_MCSetControllerCapabilities(MovieControllerObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- long flags;
- long flagsMask;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ long flags;
+ long flagsMask;
#ifndef MCSetControllerCapabilities
- PyMac_PRECHECK(MCSetControllerCapabilities);
+ PyMac_PRECHECK(MCSetControllerCapabilities);
#endif
- if (!PyArg_ParseTuple(_args, "ll",
- &flags,
- &flagsMask))
- return NULL;
- _rv = MCSetControllerCapabilities(_self->ob_itself,
- flags,
- flagsMask);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "ll",
+ &flags,
+ &flagsMask))
+ return NULL;
+ _rv = MCSetControllerCapabilities(_self->ob_itself,
+ flags,
+ flagsMask);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyMethodDef MovieCtlObj_methods[] = {
- {"MCSetMovie", (PyCFunction)MovieCtlObj_MCSetMovie, 1,
- PyDoc_STR("(Movie theMovie, WindowPtr movieWindow, Point where) -> (ComponentResult _rv)")},
- {"MCGetIndMovie", (PyCFunction)MovieCtlObj_MCGetIndMovie, 1,
- PyDoc_STR("(short index) -> (Movie _rv)")},
- {"MCRemoveAllMovies", (PyCFunction)MovieCtlObj_MCRemoveAllMovies, 1,
- PyDoc_STR("() -> (ComponentResult _rv)")},
- {"MCRemoveAMovie", (PyCFunction)MovieCtlObj_MCRemoveAMovie, 1,
- PyDoc_STR("(Movie m) -> (ComponentResult _rv)")},
- {"MCRemoveMovie", (PyCFunction)MovieCtlObj_MCRemoveMovie, 1,
- PyDoc_STR("() -> (ComponentResult _rv)")},
- {"MCIsPlayerEvent", (PyCFunction)MovieCtlObj_MCIsPlayerEvent, 1,
- PyDoc_STR("(EventRecord e) -> (ComponentResult _rv)")},
- {"MCDoAction", (PyCFunction)MovieCtlObj_MCDoAction, 1,
- PyDoc_STR("(short action, void * params) -> (ComponentResult _rv)")},
- {"MCSetControllerAttached", (PyCFunction)MovieCtlObj_MCSetControllerAttached, 1,
- PyDoc_STR("(Boolean attach) -> (ComponentResult _rv)")},
- {"MCIsControllerAttached", (PyCFunction)MovieCtlObj_MCIsControllerAttached, 1,
- PyDoc_STR("() -> (ComponentResult _rv)")},
- {"MCSetControllerPort", (PyCFunction)MovieCtlObj_MCSetControllerPort, 1,
- PyDoc_STR("(CGrafPtr gp) -> (ComponentResult _rv)")},
- {"MCGetControllerPort", (PyCFunction)MovieCtlObj_MCGetControllerPort, 1,
- PyDoc_STR("() -> (CGrafPtr _rv)")},
- {"MCSetVisible", (PyCFunction)MovieCtlObj_MCSetVisible, 1,
- PyDoc_STR("(Boolean visible) -> (ComponentResult _rv)")},
- {"MCGetVisible", (PyCFunction)MovieCtlObj_MCGetVisible, 1,
- PyDoc_STR("() -> (ComponentResult _rv)")},
- {"MCGetControllerBoundsRect", (PyCFunction)MovieCtlObj_MCGetControllerBoundsRect, 1,
- PyDoc_STR("() -> (ComponentResult _rv, Rect bounds)")},
- {"MCSetControllerBoundsRect", (PyCFunction)MovieCtlObj_MCSetControllerBoundsRect, 1,
- PyDoc_STR("(Rect bounds) -> (ComponentResult _rv)")},
- {"MCGetControllerBoundsRgn", (PyCFunction)MovieCtlObj_MCGetControllerBoundsRgn, 1,
- PyDoc_STR("() -> (RgnHandle _rv)")},
- {"MCGetWindowRgn", (PyCFunction)MovieCtlObj_MCGetWindowRgn, 1,
- PyDoc_STR("(WindowPtr w) -> (RgnHandle _rv)")},
- {"MCMovieChanged", (PyCFunction)MovieCtlObj_MCMovieChanged, 1,
- PyDoc_STR("(Movie m) -> (ComponentResult _rv)")},
- {"MCSetDuration", (PyCFunction)MovieCtlObj_MCSetDuration, 1,
- PyDoc_STR("(TimeValue duration) -> (ComponentResult _rv)")},
- {"MCGetCurrentTime", (PyCFunction)MovieCtlObj_MCGetCurrentTime, 1,
- PyDoc_STR("() -> (TimeValue _rv, TimeScale scale)")},
- {"MCNewAttachedController", (PyCFunction)MovieCtlObj_MCNewAttachedController, 1,
- PyDoc_STR("(Movie theMovie, WindowPtr w, Point where) -> (ComponentResult _rv)")},
- {"MCDraw", (PyCFunction)MovieCtlObj_MCDraw, 1,
- PyDoc_STR("(WindowPtr w) -> (ComponentResult _rv)")},
- {"MCActivate", (PyCFunction)MovieCtlObj_MCActivate, 1,
- PyDoc_STR("(WindowPtr w, Boolean activate) -> (ComponentResult _rv)")},
- {"MCIdle", (PyCFunction)MovieCtlObj_MCIdle, 1,
- PyDoc_STR("() -> (ComponentResult _rv)")},
- {"MCKey", (PyCFunction)MovieCtlObj_MCKey, 1,
- PyDoc_STR("(SInt8 key, long modifiers) -> (ComponentResult _rv)")},
- {"MCClick", (PyCFunction)MovieCtlObj_MCClick, 1,
- PyDoc_STR("(WindowPtr w, Point where, long when, long modifiers) -> (ComponentResult _rv)")},
- {"MCEnableEditing", (PyCFunction)MovieCtlObj_MCEnableEditing, 1,
- PyDoc_STR("(Boolean enabled) -> (ComponentResult _rv)")},
- {"MCIsEditingEnabled", (PyCFunction)MovieCtlObj_MCIsEditingEnabled, 1,
- PyDoc_STR("() -> (long _rv)")},
- {"MCCopy", (PyCFunction)MovieCtlObj_MCCopy, 1,
- PyDoc_STR("() -> (Movie _rv)")},
- {"MCCut", (PyCFunction)MovieCtlObj_MCCut, 1,
- PyDoc_STR("() -> (Movie _rv)")},
- {"MCPaste", (PyCFunction)MovieCtlObj_MCPaste, 1,
- PyDoc_STR("(Movie srcMovie) -> (ComponentResult _rv)")},
- {"MCClear", (PyCFunction)MovieCtlObj_MCClear, 1,
- PyDoc_STR("() -> (ComponentResult _rv)")},
- {"MCUndo", (PyCFunction)MovieCtlObj_MCUndo, 1,
- PyDoc_STR("() -> (ComponentResult _rv)")},
- {"MCPositionController", (PyCFunction)MovieCtlObj_MCPositionController, 1,
- PyDoc_STR("(Rect movieRect, Rect controllerRect, long someFlags) -> (ComponentResult _rv)")},
- {"MCGetControllerInfo", (PyCFunction)MovieCtlObj_MCGetControllerInfo, 1,
- PyDoc_STR("() -> (ComponentResult _rv, long someFlags)")},
- {"MCSetClip", (PyCFunction)MovieCtlObj_MCSetClip, 1,
- PyDoc_STR("(RgnHandle theClip, RgnHandle movieClip) -> (ComponentResult _rv)")},
- {"MCGetClip", (PyCFunction)MovieCtlObj_MCGetClip, 1,
- PyDoc_STR("() -> (ComponentResult _rv, RgnHandle theClip, RgnHandle movieClip)")},
- {"MCDrawBadge", (PyCFunction)MovieCtlObj_MCDrawBadge, 1,
- PyDoc_STR("(RgnHandle movieRgn) -> (ComponentResult _rv, RgnHandle badgeRgn)")},
- {"MCSetUpEditMenu", (PyCFunction)MovieCtlObj_MCSetUpEditMenu, 1,
- PyDoc_STR("(long modifiers, MenuHandle mh) -> (ComponentResult _rv)")},
- {"MCGetMenuString", (PyCFunction)MovieCtlObj_MCGetMenuString, 1,
- PyDoc_STR("(long modifiers, short item, Str255 aString) -> (ComponentResult _rv)")},
- {"MCPtInController", (PyCFunction)MovieCtlObj_MCPtInController, 1,
- PyDoc_STR("(Point thePt) -> (ComponentResult _rv, Boolean inController)")},
- {"MCInvalidate", (PyCFunction)MovieCtlObj_MCInvalidate, 1,
- PyDoc_STR("(WindowPtr w, RgnHandle invalidRgn) -> (ComponentResult _rv)")},
- {"MCAdjustCursor", (PyCFunction)MovieCtlObj_MCAdjustCursor, 1,
- PyDoc_STR("(WindowPtr w, Point where, long modifiers) -> (ComponentResult _rv)")},
- {"MCGetInterfaceElement", (PyCFunction)MovieCtlObj_MCGetInterfaceElement, 1,
- PyDoc_STR("(MCInterfaceElement whichElement, void * element) -> (ComponentResult _rv)")},
- {"MCAddMovieSegment", (PyCFunction)MovieCtlObj_MCAddMovieSegment, 1,
- PyDoc_STR("(Movie srcMovie, Boolean scaled) -> (ComponentResult _rv)")},
- {"MCTrimMovieSegment", (PyCFunction)MovieCtlObj_MCTrimMovieSegment, 1,
- PyDoc_STR("() -> (ComponentResult _rv)")},
- {"MCSetIdleManager", (PyCFunction)MovieCtlObj_MCSetIdleManager, 1,
- PyDoc_STR("(IdleManager im) -> (ComponentResult _rv)")},
- {"MCSetControllerCapabilities", (PyCFunction)MovieCtlObj_MCSetControllerCapabilities, 1,
- PyDoc_STR("(long flags, long flagsMask) -> (ComponentResult _rv)")},
- {NULL, NULL, 0}
+ {"MCSetMovie", (PyCFunction)MovieCtlObj_MCSetMovie, 1,
+ PyDoc_STR("(Movie theMovie, WindowPtr movieWindow, Point where) -> (ComponentResult _rv)")},
+ {"MCGetIndMovie", (PyCFunction)MovieCtlObj_MCGetIndMovie, 1,
+ PyDoc_STR("(short index) -> (Movie _rv)")},
+ {"MCRemoveAllMovies", (PyCFunction)MovieCtlObj_MCRemoveAllMovies, 1,
+ PyDoc_STR("() -> (ComponentResult _rv)")},
+ {"MCRemoveAMovie", (PyCFunction)MovieCtlObj_MCRemoveAMovie, 1,
+ PyDoc_STR("(Movie m) -> (ComponentResult _rv)")},
+ {"MCRemoveMovie", (PyCFunction)MovieCtlObj_MCRemoveMovie, 1,
+ PyDoc_STR("() -> (ComponentResult _rv)")},
+ {"MCIsPlayerEvent", (PyCFunction)MovieCtlObj_MCIsPlayerEvent, 1,
+ PyDoc_STR("(EventRecord e) -> (ComponentResult _rv)")},
+ {"MCDoAction", (PyCFunction)MovieCtlObj_MCDoAction, 1,
+ PyDoc_STR("(short action, void * params) -> (ComponentResult _rv)")},
+ {"MCSetControllerAttached", (PyCFunction)MovieCtlObj_MCSetControllerAttached, 1,
+ PyDoc_STR("(Boolean attach) -> (ComponentResult _rv)")},
+ {"MCIsControllerAttached", (PyCFunction)MovieCtlObj_MCIsControllerAttached, 1,
+ PyDoc_STR("() -> (ComponentResult _rv)")},
+ {"MCSetControllerPort", (PyCFunction)MovieCtlObj_MCSetControllerPort, 1,
+ PyDoc_STR("(CGrafPtr gp) -> (ComponentResult _rv)")},
+ {"MCGetControllerPort", (PyCFunction)MovieCtlObj_MCGetControllerPort, 1,
+ PyDoc_STR("() -> (CGrafPtr _rv)")},
+ {"MCSetVisible", (PyCFunction)MovieCtlObj_MCSetVisible, 1,
+ PyDoc_STR("(Boolean visible) -> (ComponentResult _rv)")},
+ {"MCGetVisible", (PyCFunction)MovieCtlObj_MCGetVisible, 1,
+ PyDoc_STR("() -> (ComponentResult _rv)")},
+ {"MCGetControllerBoundsRect", (PyCFunction)MovieCtlObj_MCGetControllerBoundsRect, 1,
+ PyDoc_STR("() -> (ComponentResult _rv, Rect bounds)")},
+ {"MCSetControllerBoundsRect", (PyCFunction)MovieCtlObj_MCSetControllerBoundsRect, 1,
+ PyDoc_STR("(Rect bounds) -> (ComponentResult _rv)")},
+ {"MCGetControllerBoundsRgn", (PyCFunction)MovieCtlObj_MCGetControllerBoundsRgn, 1,
+ PyDoc_STR("() -> (RgnHandle _rv)")},
+ {"MCGetWindowRgn", (PyCFunction)MovieCtlObj_MCGetWindowRgn, 1,
+ PyDoc_STR("(WindowPtr w) -> (RgnHandle _rv)")},
+ {"MCMovieChanged", (PyCFunction)MovieCtlObj_MCMovieChanged, 1,
+ PyDoc_STR("(Movie m) -> (ComponentResult _rv)")},
+ {"MCSetDuration", (PyCFunction)MovieCtlObj_MCSetDuration, 1,
+ PyDoc_STR("(TimeValue duration) -> (ComponentResult _rv)")},
+ {"MCGetCurrentTime", (PyCFunction)MovieCtlObj_MCGetCurrentTime, 1,
+ PyDoc_STR("() -> (TimeValue _rv, TimeScale scale)")},
+ {"MCNewAttachedController", (PyCFunction)MovieCtlObj_MCNewAttachedController, 1,
+ PyDoc_STR("(Movie theMovie, WindowPtr w, Point where) -> (ComponentResult _rv)")},
+ {"MCDraw", (PyCFunction)MovieCtlObj_MCDraw, 1,
+ PyDoc_STR("(WindowPtr w) -> (ComponentResult _rv)")},
+ {"MCActivate", (PyCFunction)MovieCtlObj_MCActivate, 1,
+ PyDoc_STR("(WindowPtr w, Boolean activate) -> (ComponentResult _rv)")},
+ {"MCIdle", (PyCFunction)MovieCtlObj_MCIdle, 1,
+ PyDoc_STR("() -> (ComponentResult _rv)")},
+ {"MCKey", (PyCFunction)MovieCtlObj_MCKey, 1,
+ PyDoc_STR("(SInt8 key, long modifiers) -> (ComponentResult _rv)")},
+ {"MCClick", (PyCFunction)MovieCtlObj_MCClick, 1,
+ PyDoc_STR("(WindowPtr w, Point where, long when, long modifiers) -> (ComponentResult _rv)")},
+ {"MCEnableEditing", (PyCFunction)MovieCtlObj_MCEnableEditing, 1,
+ PyDoc_STR("(Boolean enabled) -> (ComponentResult _rv)")},
+ {"MCIsEditingEnabled", (PyCFunction)MovieCtlObj_MCIsEditingEnabled, 1,
+ PyDoc_STR("() -> (long _rv)")},
+ {"MCCopy", (PyCFunction)MovieCtlObj_MCCopy, 1,
+ PyDoc_STR("() -> (Movie _rv)")},
+ {"MCCut", (PyCFunction)MovieCtlObj_MCCut, 1,
+ PyDoc_STR("() -> (Movie _rv)")},
+ {"MCPaste", (PyCFunction)MovieCtlObj_MCPaste, 1,
+ PyDoc_STR("(Movie srcMovie) -> (ComponentResult _rv)")},
+ {"MCClear", (PyCFunction)MovieCtlObj_MCClear, 1,
+ PyDoc_STR("() -> (ComponentResult _rv)")},
+ {"MCUndo", (PyCFunction)MovieCtlObj_MCUndo, 1,
+ PyDoc_STR("() -> (ComponentResult _rv)")},
+ {"MCPositionController", (PyCFunction)MovieCtlObj_MCPositionController, 1,
+ PyDoc_STR("(Rect movieRect, Rect controllerRect, long someFlags) -> (ComponentResult _rv)")},
+ {"MCGetControllerInfo", (PyCFunction)MovieCtlObj_MCGetControllerInfo, 1,
+ PyDoc_STR("() -> (ComponentResult _rv, long someFlags)")},
+ {"MCSetClip", (PyCFunction)MovieCtlObj_MCSetClip, 1,
+ PyDoc_STR("(RgnHandle theClip, RgnHandle movieClip) -> (ComponentResult _rv)")},
+ {"MCGetClip", (PyCFunction)MovieCtlObj_MCGetClip, 1,
+ PyDoc_STR("() -> (ComponentResult _rv, RgnHandle theClip, RgnHandle movieClip)")},
+ {"MCDrawBadge", (PyCFunction)MovieCtlObj_MCDrawBadge, 1,
+ PyDoc_STR("(RgnHandle movieRgn) -> (ComponentResult _rv, RgnHandle badgeRgn)")},
+ {"MCSetUpEditMenu", (PyCFunction)MovieCtlObj_MCSetUpEditMenu, 1,
+ PyDoc_STR("(long modifiers, MenuHandle mh) -> (ComponentResult _rv)")},
+ {"MCGetMenuString", (PyCFunction)MovieCtlObj_MCGetMenuString, 1,
+ PyDoc_STR("(long modifiers, short item, Str255 aString) -> (ComponentResult _rv)")},
+ {"MCPtInController", (PyCFunction)MovieCtlObj_MCPtInController, 1,
+ PyDoc_STR("(Point thePt) -> (ComponentResult _rv, Boolean inController)")},
+ {"MCInvalidate", (PyCFunction)MovieCtlObj_MCInvalidate, 1,
+ PyDoc_STR("(WindowPtr w, RgnHandle invalidRgn) -> (ComponentResult _rv)")},
+ {"MCAdjustCursor", (PyCFunction)MovieCtlObj_MCAdjustCursor, 1,
+ PyDoc_STR("(WindowPtr w, Point where, long modifiers) -> (ComponentResult _rv)")},
+ {"MCGetInterfaceElement", (PyCFunction)MovieCtlObj_MCGetInterfaceElement, 1,
+ PyDoc_STR("(MCInterfaceElement whichElement, void * element) -> (ComponentResult _rv)")},
+ {"MCAddMovieSegment", (PyCFunction)MovieCtlObj_MCAddMovieSegment, 1,
+ PyDoc_STR("(Movie srcMovie, Boolean scaled) -> (ComponentResult _rv)")},
+ {"MCTrimMovieSegment", (PyCFunction)MovieCtlObj_MCTrimMovieSegment, 1,
+ PyDoc_STR("() -> (ComponentResult _rv)")},
+ {"MCSetIdleManager", (PyCFunction)MovieCtlObj_MCSetIdleManager, 1,
+ PyDoc_STR("(IdleManager im) -> (ComponentResult _rv)")},
+ {"MCSetControllerCapabilities", (PyCFunction)MovieCtlObj_MCSetControllerCapabilities, 1,
+ PyDoc_STR("(long flags, long flagsMask) -> (ComponentResult _rv)")},
+ {NULL, NULL, 0}
};
#define MovieCtlObj_getsetlist NULL
@@ -1278,61 +1278,61 @@ static PyMethodDef MovieCtlObj_methods[] = {
static PyObject *MovieCtlObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
- PyObject *_self;
- MovieController itself;
- char *kw[] = {"itself", 0};
+ 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;
+ 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 = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
- "_Qt.MovieController", /*tp_name*/
- sizeof(MovieControllerObject), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- /* methods */
- (destructor) MovieCtlObj_dealloc, /*tp_dealloc*/
- 0, /*tp_print*/
- (getattrfunc)0, /*tp_getattr*/
- (setattrfunc)0, /*tp_setattr*/
- (cmpfunc) MovieCtlObj_compare, /*tp_compare*/
- (reprfunc) MovieCtlObj_repr, /*tp_repr*/
- (PyNumberMethods *)0, /* tp_as_number */
- (PySequenceMethods *)0, /* tp_as_sequence */
- (PyMappingMethods *)0, /* tp_as_mapping */
- (hashfunc) MovieCtlObj_hash, /*tp_hash*/
- 0, /*tp_call*/
- 0, /*tp_str*/
- PyObject_GenericGetAttr, /*tp_getattro*/
- PyObject_GenericSetAttr, /*tp_setattro */
- 0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
- 0, /*tp_doc*/
- 0, /*tp_traverse*/
- 0, /*tp_clear*/
- 0, /*tp_richcompare*/
- 0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
- 0, /*tp_iternext*/
- MovieCtlObj_methods, /* tp_methods */
- 0, /*tp_members*/
- MovieCtlObj_getsetlist, /*tp_getset*/
- 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 */
+ PyObject_HEAD_INIT(NULL)
+ 0, /*ob_size*/
+ "_Qt.MovieController", /*tp_name*/
+ sizeof(MovieControllerObject), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ /* methods */
+ (destructor) MovieCtlObj_dealloc, /*tp_dealloc*/
+ 0, /*tp_print*/
+ (getattrfunc)0, /*tp_getattr*/
+ (setattrfunc)0, /*tp_setattr*/
+ (cmpfunc) MovieCtlObj_compare, /*tp_compare*/
+ (reprfunc) MovieCtlObj_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) MovieCtlObj_hash, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ PyObject_GenericGetAttr, /*tp_getattro*/
+ PyObject_GenericSetAttr, /*tp_setattro */
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
+ 0, /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ MovieCtlObj_methods, /* tp_methods */
+ 0, /*tp_members*/
+ MovieCtlObj_getsetlist, /*tp_getset*/
+ 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 ----------------- */
@@ -1345,417 +1345,417 @@ PyTypeObject TimeBase_Type;
#define TimeBaseObj_Check(x) ((x)->ob_type == &TimeBase_Type || PyObject_TypeCheck((x), &TimeBase_Type))
typedef struct TimeBaseObject {
- PyObject_HEAD
- TimeBase ob_itself;
+ PyObject_HEAD
+ TimeBase ob_itself;
} TimeBaseObject;
PyObject *TimeBaseObj_New(TimeBase itself)
{
- TimeBaseObject *it;
- if (itself == NULL) {
- PyErr_SetString(Qt_Error,"Cannot create TimeBase from NULL pointer");
- return NULL;
- }
- it = PyObject_NEW(TimeBaseObject, &TimeBase_Type);
- if (it == NULL) return NULL;
- it->ob_itself = itself;
- return (PyObject *)it;
+ TimeBaseObject *it;
+ if (itself == NULL) {
+ PyErr_SetString(Qt_Error,"Cannot create TimeBase from NULL pointer");
+ return NULL;
+ }
+ it = PyObject_NEW(TimeBaseObject, &TimeBase_Type);
+ if (it == NULL) return NULL;
+ it->ob_itself = itself;
+ return (PyObject *)it;
}
int TimeBaseObj_Convert(PyObject *v, TimeBase *p_itself)
{
- if (v == Py_None)
- {
- *p_itself = NULL;
- return 1;
- }
- if (!TimeBaseObj_Check(v))
- {
- PyErr_SetString(PyExc_TypeError, "TimeBase required");
- return 0;
- }
- *p_itself = ((TimeBaseObject *)v)->ob_itself;
- return 1;
+ if (v == Py_None)
+ {
+ *p_itself = NULL;
+ return 1;
+ }
+ if (!TimeBaseObj_Check(v))
+ {
+ PyErr_SetString(PyExc_TypeError, "TimeBase required");
+ return 0;
+ }
+ *p_itself = ((TimeBaseObject *)v)->ob_itself;
+ return 1;
}
static void TimeBaseObj_dealloc(TimeBaseObject *self)
{
- /* Cleanup of self->ob_itself goes here */
- self->ob_type->tp_free((PyObject *)self);
+ /* Cleanup of self->ob_itself goes here */
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *TimeBaseObj_DisposeTimeBase(TimeBaseObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef DisposeTimeBase
- PyMac_PRECHECK(DisposeTimeBase);
+ PyMac_PRECHECK(DisposeTimeBase);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- DisposeTimeBase(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ DisposeTimeBase(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TimeBaseObj_GetTimeBaseTime(TimeBaseObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- TimeValue _rv;
- TimeScale s;
- TimeRecord tr;
+ PyObject *_res = NULL;
+ TimeValue _rv;
+ TimeScale s;
+ TimeRecord tr;
#ifndef GetTimeBaseTime
- PyMac_PRECHECK(GetTimeBaseTime);
+ PyMac_PRECHECK(GetTimeBaseTime);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &s))
- return NULL;
- _rv = GetTimeBaseTime(_self->ob_itself,
- s,
- &tr);
- _res = Py_BuildValue("lO&",
- _rv,
- QtTimeRecord_New, &tr);
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &s))
+ return NULL;
+ _rv = GetTimeBaseTime(_self->ob_itself,
+ s,
+ &tr);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ QtTimeRecord_New, &tr);
+ return _res;
}
static PyObject *TimeBaseObj_SetTimeBaseTime(TimeBaseObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- TimeRecord tr;
+ PyObject *_res = NULL;
+ TimeRecord tr;
#ifndef SetTimeBaseTime
- PyMac_PRECHECK(SetTimeBaseTime);
+ PyMac_PRECHECK(SetTimeBaseTime);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- QtTimeRecord_Convert, &tr))
- return NULL;
- SetTimeBaseTime(_self->ob_itself,
- &tr);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ QtTimeRecord_Convert, &tr))
+ return NULL;
+ SetTimeBaseTime(_self->ob_itself,
+ &tr);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TimeBaseObj_SetTimeBaseValue(TimeBaseObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- TimeValue t;
- TimeScale s;
+ PyObject *_res = NULL;
+ TimeValue t;
+ TimeScale s;
#ifndef SetTimeBaseValue
- PyMac_PRECHECK(SetTimeBaseValue);
+ PyMac_PRECHECK(SetTimeBaseValue);
#endif
- if (!PyArg_ParseTuple(_args, "ll",
- &t,
- &s))
- return NULL;
- SetTimeBaseValue(_self->ob_itself,
- t,
- s);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "ll",
+ &t,
+ &s))
+ return NULL;
+ SetTimeBaseValue(_self->ob_itself,
+ t,
+ s);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TimeBaseObj_GetTimeBaseRate(TimeBaseObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Fixed _rv;
+ PyObject *_res = NULL;
+ Fixed _rv;
#ifndef GetTimeBaseRate
- PyMac_PRECHECK(GetTimeBaseRate);
+ PyMac_PRECHECK(GetTimeBaseRate);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetTimeBaseRate(_self->ob_itself);
- _res = Py_BuildValue("O&",
- PyMac_BuildFixed, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetTimeBaseRate(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildFixed, _rv);
+ return _res;
}
static PyObject *TimeBaseObj_SetTimeBaseRate(TimeBaseObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Fixed r;
+ PyObject *_res = NULL;
+ Fixed r;
#ifndef SetTimeBaseRate
- PyMac_PRECHECK(SetTimeBaseRate);
+ PyMac_PRECHECK(SetTimeBaseRate);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetFixed, &r))
- return NULL;
- SetTimeBaseRate(_self->ob_itself,
- r);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetFixed, &r))
+ return NULL;
+ SetTimeBaseRate(_self->ob_itself,
+ r);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TimeBaseObj_GetTimeBaseStartTime(TimeBaseObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- TimeValue _rv;
- TimeScale s;
- TimeRecord tr;
+ PyObject *_res = NULL;
+ TimeValue _rv;
+ TimeScale s;
+ TimeRecord tr;
#ifndef GetTimeBaseStartTime
- PyMac_PRECHECK(GetTimeBaseStartTime);
+ PyMac_PRECHECK(GetTimeBaseStartTime);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &s))
- return NULL;
- _rv = GetTimeBaseStartTime(_self->ob_itself,
- s,
- &tr);
- _res = Py_BuildValue("lO&",
- _rv,
- QtTimeRecord_New, &tr);
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &s))
+ return NULL;
+ _rv = GetTimeBaseStartTime(_self->ob_itself,
+ s,
+ &tr);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ QtTimeRecord_New, &tr);
+ return _res;
}
static PyObject *TimeBaseObj_SetTimeBaseStartTime(TimeBaseObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- TimeRecord tr;
+ PyObject *_res = NULL;
+ TimeRecord tr;
#ifndef SetTimeBaseStartTime
- PyMac_PRECHECK(SetTimeBaseStartTime);
+ PyMac_PRECHECK(SetTimeBaseStartTime);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- QtTimeRecord_Convert, &tr))
- return NULL;
- SetTimeBaseStartTime(_self->ob_itself,
- &tr);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ QtTimeRecord_Convert, &tr))
+ return NULL;
+ SetTimeBaseStartTime(_self->ob_itself,
+ &tr);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TimeBaseObj_GetTimeBaseStopTime(TimeBaseObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- TimeValue _rv;
- TimeScale s;
- TimeRecord tr;
+ PyObject *_res = NULL;
+ TimeValue _rv;
+ TimeScale s;
+ TimeRecord tr;
#ifndef GetTimeBaseStopTime
- PyMac_PRECHECK(GetTimeBaseStopTime);
+ PyMac_PRECHECK(GetTimeBaseStopTime);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &s))
- return NULL;
- _rv = GetTimeBaseStopTime(_self->ob_itself,
- s,
- &tr);
- _res = Py_BuildValue("lO&",
- _rv,
- QtTimeRecord_New, &tr);
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &s))
+ return NULL;
+ _rv = GetTimeBaseStopTime(_self->ob_itself,
+ s,
+ &tr);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ QtTimeRecord_New, &tr);
+ return _res;
}
static PyObject *TimeBaseObj_SetTimeBaseStopTime(TimeBaseObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- TimeRecord tr;
+ PyObject *_res = NULL;
+ TimeRecord tr;
#ifndef SetTimeBaseStopTime
- PyMac_PRECHECK(SetTimeBaseStopTime);
+ PyMac_PRECHECK(SetTimeBaseStopTime);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- QtTimeRecord_Convert, &tr))
- return NULL;
- SetTimeBaseStopTime(_self->ob_itself,
- &tr);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ QtTimeRecord_Convert, &tr))
+ return NULL;
+ SetTimeBaseStopTime(_self->ob_itself,
+ &tr);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TimeBaseObj_GetTimeBaseFlags(TimeBaseObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- long _rv;
+ PyObject *_res = NULL;
+ long _rv;
#ifndef GetTimeBaseFlags
- PyMac_PRECHECK(GetTimeBaseFlags);
+ PyMac_PRECHECK(GetTimeBaseFlags);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetTimeBaseFlags(_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetTimeBaseFlags(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *TimeBaseObj_SetTimeBaseFlags(TimeBaseObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- long timeBaseFlags;
+ PyObject *_res = NULL;
+ long timeBaseFlags;
#ifndef SetTimeBaseFlags
- PyMac_PRECHECK(SetTimeBaseFlags);
+ PyMac_PRECHECK(SetTimeBaseFlags);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &timeBaseFlags))
- return NULL;
- SetTimeBaseFlags(_self->ob_itself,
- timeBaseFlags);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &timeBaseFlags))
+ return NULL;
+ SetTimeBaseFlags(_self->ob_itself,
+ timeBaseFlags);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TimeBaseObj_SetTimeBaseMasterTimeBase(TimeBaseObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- TimeBase master;
- TimeRecord slaveZero;
+ PyObject *_res = NULL;
+ TimeBase master;
+ TimeRecord slaveZero;
#ifndef SetTimeBaseMasterTimeBase
- PyMac_PRECHECK(SetTimeBaseMasterTimeBase);
+ PyMac_PRECHECK(SetTimeBaseMasterTimeBase);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- TimeBaseObj_Convert, &master,
- QtTimeRecord_Convert, &slaveZero))
- return NULL;
- SetTimeBaseMasterTimeBase(_self->ob_itself,
- master,
- &slaveZero);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ TimeBaseObj_Convert, &master,
+ QtTimeRecord_Convert, &slaveZero))
+ return NULL;
+ SetTimeBaseMasterTimeBase(_self->ob_itself,
+ master,
+ &slaveZero);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TimeBaseObj_GetTimeBaseMasterTimeBase(TimeBaseObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- TimeBase _rv;
+ PyObject *_res = NULL;
+ TimeBase _rv;
#ifndef GetTimeBaseMasterTimeBase
- PyMac_PRECHECK(GetTimeBaseMasterTimeBase);
+ PyMac_PRECHECK(GetTimeBaseMasterTimeBase);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetTimeBaseMasterTimeBase(_self->ob_itself);
- _res = Py_BuildValue("O&",
- TimeBaseObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetTimeBaseMasterTimeBase(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ TimeBaseObj_New, _rv);
+ return _res;
}
static PyObject *TimeBaseObj_SetTimeBaseMasterClock(TimeBaseObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Component clockMeister;
- TimeRecord slaveZero;
+ PyObject *_res = NULL;
+ Component clockMeister;
+ TimeRecord slaveZero;
#ifndef SetTimeBaseMasterClock
- PyMac_PRECHECK(SetTimeBaseMasterClock);
+ PyMac_PRECHECK(SetTimeBaseMasterClock);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpObj_Convert, &clockMeister,
- QtTimeRecord_Convert, &slaveZero))
- return NULL;
- SetTimeBaseMasterClock(_self->ob_itself,
- clockMeister,
- &slaveZero);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpObj_Convert, &clockMeister,
+ QtTimeRecord_Convert, &slaveZero))
+ return NULL;
+ SetTimeBaseMasterClock(_self->ob_itself,
+ clockMeister,
+ &slaveZero);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TimeBaseObj_GetTimeBaseMasterClock(TimeBaseObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentInstance _rv;
+ PyObject *_res = NULL;
+ ComponentInstance _rv;
#ifndef GetTimeBaseMasterClock
- PyMac_PRECHECK(GetTimeBaseMasterClock);
+ PyMac_PRECHECK(GetTimeBaseMasterClock);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetTimeBaseMasterClock(_self->ob_itself);
- _res = Py_BuildValue("O&",
- CmpInstObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetTimeBaseMasterClock(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ CmpInstObj_New, _rv);
+ return _res;
}
static PyObject *TimeBaseObj_GetTimeBaseStatus(TimeBaseObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- long _rv;
- TimeRecord unpinnedTime;
+ PyObject *_res = NULL;
+ long _rv;
+ TimeRecord unpinnedTime;
#ifndef GetTimeBaseStatus
- PyMac_PRECHECK(GetTimeBaseStatus);
+ PyMac_PRECHECK(GetTimeBaseStatus);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetTimeBaseStatus(_self->ob_itself,
- &unpinnedTime);
- _res = Py_BuildValue("lO&",
- _rv,
- QtTimeRecord_New, &unpinnedTime);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetTimeBaseStatus(_self->ob_itself,
+ &unpinnedTime);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ QtTimeRecord_New, &unpinnedTime);
+ return _res;
}
static PyObject *TimeBaseObj_SetTimeBaseZero(TimeBaseObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- TimeRecord zero;
+ PyObject *_res = NULL;
+ TimeRecord zero;
#ifndef SetTimeBaseZero
- PyMac_PRECHECK(SetTimeBaseZero);
+ PyMac_PRECHECK(SetTimeBaseZero);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- QtTimeRecord_Convert, &zero))
- return NULL;
- SetTimeBaseZero(_self->ob_itself,
- &zero);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ QtTimeRecord_Convert, &zero))
+ return NULL;
+ SetTimeBaseZero(_self->ob_itself,
+ &zero);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TimeBaseObj_GetTimeBaseEffectiveRate(TimeBaseObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Fixed _rv;
+ PyObject *_res = NULL;
+ Fixed _rv;
#ifndef GetTimeBaseEffectiveRate
- PyMac_PRECHECK(GetTimeBaseEffectiveRate);
+ PyMac_PRECHECK(GetTimeBaseEffectiveRate);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetTimeBaseEffectiveRate(_self->ob_itself);
- _res = Py_BuildValue("O&",
- PyMac_BuildFixed, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetTimeBaseEffectiveRate(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildFixed, _rv);
+ return _res;
}
static PyMethodDef TimeBaseObj_methods[] = {
- {"DisposeTimeBase", (PyCFunction)TimeBaseObj_DisposeTimeBase, 1,
- PyDoc_STR("() -> None")},
- {"GetTimeBaseTime", (PyCFunction)TimeBaseObj_GetTimeBaseTime, 1,
- PyDoc_STR("(TimeScale s) -> (TimeValue _rv, TimeRecord tr)")},
- {"SetTimeBaseTime", (PyCFunction)TimeBaseObj_SetTimeBaseTime, 1,
- PyDoc_STR("(TimeRecord tr) -> None")},
- {"SetTimeBaseValue", (PyCFunction)TimeBaseObj_SetTimeBaseValue, 1,
- PyDoc_STR("(TimeValue t, TimeScale s) -> None")},
- {"GetTimeBaseRate", (PyCFunction)TimeBaseObj_GetTimeBaseRate, 1,
- PyDoc_STR("() -> (Fixed _rv)")},
- {"SetTimeBaseRate", (PyCFunction)TimeBaseObj_SetTimeBaseRate, 1,
- PyDoc_STR("(Fixed r) -> None")},
- {"GetTimeBaseStartTime", (PyCFunction)TimeBaseObj_GetTimeBaseStartTime, 1,
- PyDoc_STR("(TimeScale s) -> (TimeValue _rv, TimeRecord tr)")},
- {"SetTimeBaseStartTime", (PyCFunction)TimeBaseObj_SetTimeBaseStartTime, 1,
- PyDoc_STR("(TimeRecord tr) -> None")},
- {"GetTimeBaseStopTime", (PyCFunction)TimeBaseObj_GetTimeBaseStopTime, 1,
- PyDoc_STR("(TimeScale s) -> (TimeValue _rv, TimeRecord tr)")},
- {"SetTimeBaseStopTime", (PyCFunction)TimeBaseObj_SetTimeBaseStopTime, 1,
- PyDoc_STR("(TimeRecord tr) -> None")},
- {"GetTimeBaseFlags", (PyCFunction)TimeBaseObj_GetTimeBaseFlags, 1,
- PyDoc_STR("() -> (long _rv)")},
- {"SetTimeBaseFlags", (PyCFunction)TimeBaseObj_SetTimeBaseFlags, 1,
- PyDoc_STR("(long timeBaseFlags) -> None")},
- {"SetTimeBaseMasterTimeBase", (PyCFunction)TimeBaseObj_SetTimeBaseMasterTimeBase, 1,
- PyDoc_STR("(TimeBase master, TimeRecord slaveZero) -> None")},
- {"GetTimeBaseMasterTimeBase", (PyCFunction)TimeBaseObj_GetTimeBaseMasterTimeBase, 1,
- PyDoc_STR("() -> (TimeBase _rv)")},
- {"SetTimeBaseMasterClock", (PyCFunction)TimeBaseObj_SetTimeBaseMasterClock, 1,
- PyDoc_STR("(Component clockMeister, TimeRecord slaveZero) -> None")},
- {"GetTimeBaseMasterClock", (PyCFunction)TimeBaseObj_GetTimeBaseMasterClock, 1,
- PyDoc_STR("() -> (ComponentInstance _rv)")},
- {"GetTimeBaseStatus", (PyCFunction)TimeBaseObj_GetTimeBaseStatus, 1,
- PyDoc_STR("() -> (long _rv, TimeRecord unpinnedTime)")},
- {"SetTimeBaseZero", (PyCFunction)TimeBaseObj_SetTimeBaseZero, 1,
- PyDoc_STR("(TimeRecord zero) -> None")},
- {"GetTimeBaseEffectiveRate", (PyCFunction)TimeBaseObj_GetTimeBaseEffectiveRate, 1,
- PyDoc_STR("() -> (Fixed _rv)")},
- {NULL, NULL, 0}
+ {"DisposeTimeBase", (PyCFunction)TimeBaseObj_DisposeTimeBase, 1,
+ PyDoc_STR("() -> None")},
+ {"GetTimeBaseTime", (PyCFunction)TimeBaseObj_GetTimeBaseTime, 1,
+ PyDoc_STR("(TimeScale s) -> (TimeValue _rv, TimeRecord tr)")},
+ {"SetTimeBaseTime", (PyCFunction)TimeBaseObj_SetTimeBaseTime, 1,
+ PyDoc_STR("(TimeRecord tr) -> None")},
+ {"SetTimeBaseValue", (PyCFunction)TimeBaseObj_SetTimeBaseValue, 1,
+ PyDoc_STR("(TimeValue t, TimeScale s) -> None")},
+ {"GetTimeBaseRate", (PyCFunction)TimeBaseObj_GetTimeBaseRate, 1,
+ PyDoc_STR("() -> (Fixed _rv)")},
+ {"SetTimeBaseRate", (PyCFunction)TimeBaseObj_SetTimeBaseRate, 1,
+ PyDoc_STR("(Fixed r) -> None")},
+ {"GetTimeBaseStartTime", (PyCFunction)TimeBaseObj_GetTimeBaseStartTime, 1,
+ PyDoc_STR("(TimeScale s) -> (TimeValue _rv, TimeRecord tr)")},
+ {"SetTimeBaseStartTime", (PyCFunction)TimeBaseObj_SetTimeBaseStartTime, 1,
+ PyDoc_STR("(TimeRecord tr) -> None")},
+ {"GetTimeBaseStopTime", (PyCFunction)TimeBaseObj_GetTimeBaseStopTime, 1,
+ PyDoc_STR("(TimeScale s) -> (TimeValue _rv, TimeRecord tr)")},
+ {"SetTimeBaseStopTime", (PyCFunction)TimeBaseObj_SetTimeBaseStopTime, 1,
+ PyDoc_STR("(TimeRecord tr) -> None")},
+ {"GetTimeBaseFlags", (PyCFunction)TimeBaseObj_GetTimeBaseFlags, 1,
+ PyDoc_STR("() -> (long _rv)")},
+ {"SetTimeBaseFlags", (PyCFunction)TimeBaseObj_SetTimeBaseFlags, 1,
+ PyDoc_STR("(long timeBaseFlags) -> None")},
+ {"SetTimeBaseMasterTimeBase", (PyCFunction)TimeBaseObj_SetTimeBaseMasterTimeBase, 1,
+ PyDoc_STR("(TimeBase master, TimeRecord slaveZero) -> None")},
+ {"GetTimeBaseMasterTimeBase", (PyCFunction)TimeBaseObj_GetTimeBaseMasterTimeBase, 1,
+ PyDoc_STR("() -> (TimeBase _rv)")},
+ {"SetTimeBaseMasterClock", (PyCFunction)TimeBaseObj_SetTimeBaseMasterClock, 1,
+ PyDoc_STR("(Component clockMeister, TimeRecord slaveZero) -> None")},
+ {"GetTimeBaseMasterClock", (PyCFunction)TimeBaseObj_GetTimeBaseMasterClock, 1,
+ PyDoc_STR("() -> (ComponentInstance _rv)")},
+ {"GetTimeBaseStatus", (PyCFunction)TimeBaseObj_GetTimeBaseStatus, 1,
+ PyDoc_STR("() -> (long _rv, TimeRecord unpinnedTime)")},
+ {"SetTimeBaseZero", (PyCFunction)TimeBaseObj_SetTimeBaseZero, 1,
+ PyDoc_STR("(TimeRecord zero) -> None")},
+ {"GetTimeBaseEffectiveRate", (PyCFunction)TimeBaseObj_GetTimeBaseEffectiveRate, 1,
+ PyDoc_STR("() -> (Fixed _rv)")},
+ {NULL, NULL, 0}
};
#define TimeBaseObj_getsetlist NULL
@@ -1772,61 +1772,61 @@ static PyMethodDef TimeBaseObj_methods[] = {
static PyObject *TimeBaseObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
- PyObject *_self;
- TimeBase itself;
- char *kw[] = {"itself", 0};
+ 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;
+ 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 = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
- "_Qt.TimeBase", /*tp_name*/
- sizeof(TimeBaseObject), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- /* methods */
- (destructor) TimeBaseObj_dealloc, /*tp_dealloc*/
- 0, /*tp_print*/
- (getattrfunc)0, /*tp_getattr*/
- (setattrfunc)0, /*tp_setattr*/
- (cmpfunc) TimeBaseObj_compare, /*tp_compare*/
- (reprfunc) TimeBaseObj_repr, /*tp_repr*/
- (PyNumberMethods *)0, /* tp_as_number */
- (PySequenceMethods *)0, /* tp_as_sequence */
- (PyMappingMethods *)0, /* tp_as_mapping */
- (hashfunc) TimeBaseObj_hash, /*tp_hash*/
- 0, /*tp_call*/
- 0, /*tp_str*/
- PyObject_GenericGetAttr, /*tp_getattro*/
- PyObject_GenericSetAttr, /*tp_setattro */
- 0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
- 0, /*tp_doc*/
- 0, /*tp_traverse*/
- 0, /*tp_clear*/
- 0, /*tp_richcompare*/
- 0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
- 0, /*tp_iternext*/
- TimeBaseObj_methods, /* tp_methods */
- 0, /*tp_members*/
- TimeBaseObj_getsetlist, /*tp_getset*/
- 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 */
+ PyObject_HEAD_INIT(NULL)
+ 0, /*ob_size*/
+ "_Qt.TimeBase", /*tp_name*/
+ sizeof(TimeBaseObject), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ /* methods */
+ (destructor) TimeBaseObj_dealloc, /*tp_dealloc*/
+ 0, /*tp_print*/
+ (getattrfunc)0, /*tp_getattr*/
+ (setattrfunc)0, /*tp_setattr*/
+ (cmpfunc) TimeBaseObj_compare, /*tp_compare*/
+ (reprfunc) TimeBaseObj_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) TimeBaseObj_hash, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ PyObject_GenericGetAttr, /*tp_getattro*/
+ PyObject_GenericSetAttr, /*tp_setattro */
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
+ 0, /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ TimeBaseObj_methods, /* tp_methods */
+ 0, /*tp_members*/
+ TimeBaseObj_getsetlist, /*tp_getset*/
+ 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 -------------------- */
@@ -1839,294 +1839,294 @@ PyTypeObject UserData_Type;
#define UserDataObj_Check(x) ((x)->ob_type == &UserData_Type || PyObject_TypeCheck((x), &UserData_Type))
typedef struct UserDataObject {
- PyObject_HEAD
- UserData ob_itself;
+ PyObject_HEAD
+ UserData ob_itself;
} UserDataObject;
PyObject *UserDataObj_New(UserData itself)
{
- UserDataObject *it;
- if (itself == NULL) {
- PyErr_SetString(Qt_Error,"Cannot create UserData from NULL pointer");
- return NULL;
- }
- it = PyObject_NEW(UserDataObject, &UserData_Type);
- if (it == NULL) return NULL;
- it->ob_itself = itself;
- return (PyObject *)it;
+ UserDataObject *it;
+ if (itself == NULL) {
+ PyErr_SetString(Qt_Error,"Cannot create UserData from NULL pointer");
+ return NULL;
+ }
+ it = PyObject_NEW(UserDataObject, &UserData_Type);
+ if (it == NULL) return NULL;
+ it->ob_itself = itself;
+ return (PyObject *)it;
}
int UserDataObj_Convert(PyObject *v, UserData *p_itself)
{
- if (v == Py_None)
- {
- *p_itself = NULL;
- return 1;
- }
- if (!UserDataObj_Check(v))
- {
- PyErr_SetString(PyExc_TypeError, "UserData required");
- return 0;
- }
- *p_itself = ((UserDataObject *)v)->ob_itself;
- return 1;
+ if (v == Py_None)
+ {
+ *p_itself = NULL;
+ return 1;
+ }
+ if (!UserDataObj_Check(v))
+ {
+ PyErr_SetString(PyExc_TypeError, "UserData required");
+ return 0;
+ }
+ *p_itself = ((UserDataObject *)v)->ob_itself;
+ return 1;
}
static void UserDataObj_dealloc(UserDataObject *self)
{
- if (self->ob_itself) DisposeUserData(self->ob_itself);
- self->ob_type->tp_free((PyObject *)self);
+ if (self->ob_itself) DisposeUserData(self->ob_itself);
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *UserDataObj_GetUserData(UserDataObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Handle data;
- OSType udType;
- long index;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Handle data;
+ OSType udType;
+ long index;
#ifndef GetUserData
- PyMac_PRECHECK(GetUserData);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&l",
- ResObj_Convert, &data,
- PyMac_GetOSType, &udType,
- &index))
- return NULL;
- _err = GetUserData(_self->ob_itself,
- data,
- udType,
- index);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(GetUserData);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&l",
+ ResObj_Convert, &data,
+ PyMac_GetOSType, &udType,
+ &index))
+ return NULL;
+ _err = GetUserData(_self->ob_itself,
+ data,
+ udType,
+ index);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *UserDataObj_AddUserData(UserDataObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Handle data;
- OSType udType;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Handle data;
+ OSType udType;
#ifndef AddUserData
- PyMac_PRECHECK(AddUserData);
+ PyMac_PRECHECK(AddUserData);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- ResObj_Convert, &data,
- PyMac_GetOSType, &udType))
- return NULL;
- _err = AddUserData(_self->ob_itself,
- data,
- udType);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ ResObj_Convert, &data,
+ PyMac_GetOSType, &udType))
+ return NULL;
+ _err = AddUserData(_self->ob_itself,
+ data,
+ udType);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *UserDataObj_RemoveUserData(UserDataObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- OSType udType;
- long index;
+ PyObject *_res = NULL;
+ OSErr _err;
+ OSType udType;
+ long index;
#ifndef RemoveUserData
- PyMac_PRECHECK(RemoveUserData);
+ PyMac_PRECHECK(RemoveUserData);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- PyMac_GetOSType, &udType,
- &index))
- return NULL;
- _err = RemoveUserData(_self->ob_itself,
- udType,
- index);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ PyMac_GetOSType, &udType,
+ &index))
+ return NULL;
+ _err = RemoveUserData(_self->ob_itself,
+ udType,
+ index);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *UserDataObj_CountUserDataType(UserDataObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short _rv;
- OSType udType;
+ PyObject *_res = NULL;
+ short _rv;
+ OSType udType;
#ifndef CountUserDataType
- PyMac_PRECHECK(CountUserDataType);
+ PyMac_PRECHECK(CountUserDataType);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetOSType, &udType))
- return NULL;
- _rv = CountUserDataType(_self->ob_itself,
- udType);
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetOSType, &udType))
+ return NULL;
+ _rv = CountUserDataType(_self->ob_itself,
+ udType);
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *UserDataObj_GetNextUserDataType(UserDataObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- long _rv;
- OSType udType;
+ PyObject *_res = NULL;
+ long _rv;
+ OSType udType;
#ifndef GetNextUserDataType
- PyMac_PRECHECK(GetNextUserDataType);
+ PyMac_PRECHECK(GetNextUserDataType);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetOSType, &udType))
- return NULL;
- _rv = GetNextUserDataType(_self->ob_itself,
- udType);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetOSType, &udType))
+ return NULL;
+ _rv = GetNextUserDataType(_self->ob_itself,
+ udType);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *UserDataObj_AddUserDataText(UserDataObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Handle data;
- OSType udType;
- long index;
- short itlRegionTag;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Handle data;
+ OSType udType;
+ long index;
+ short itlRegionTag;
#ifndef AddUserDataText
- PyMac_PRECHECK(AddUserDataText);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&lh",
- ResObj_Convert, &data,
- PyMac_GetOSType, &udType,
- &index,
- &itlRegionTag))
- return NULL;
- _err = AddUserDataText(_self->ob_itself,
- data,
- udType,
- index,
- itlRegionTag);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(AddUserDataText);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&lh",
+ ResObj_Convert, &data,
+ PyMac_GetOSType, &udType,
+ &index,
+ &itlRegionTag))
+ return NULL;
+ _err = AddUserDataText(_self->ob_itself,
+ data,
+ udType,
+ index,
+ itlRegionTag);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *UserDataObj_GetUserDataText(UserDataObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Handle data;
- OSType udType;
- long index;
- short itlRegionTag;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Handle data;
+ OSType udType;
+ long index;
+ short itlRegionTag;
#ifndef GetUserDataText
- PyMac_PRECHECK(GetUserDataText);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&lh",
- ResObj_Convert, &data,
- PyMac_GetOSType, &udType,
- &index,
- &itlRegionTag))
- return NULL;
- _err = GetUserDataText(_self->ob_itself,
- data,
- udType,
- index,
- itlRegionTag);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(GetUserDataText);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&lh",
+ ResObj_Convert, &data,
+ PyMac_GetOSType, &udType,
+ &index,
+ &itlRegionTag))
+ return NULL;
+ _err = GetUserDataText(_self->ob_itself,
+ data,
+ udType,
+ index,
+ itlRegionTag);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *UserDataObj_RemoveUserDataText(UserDataObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- OSType udType;
- long index;
- short itlRegionTag;
+ PyObject *_res = NULL;
+ OSErr _err;
+ OSType udType;
+ long index;
+ short itlRegionTag;
#ifndef RemoveUserDataText
- PyMac_PRECHECK(RemoveUserDataText);
-#endif
- if (!PyArg_ParseTuple(_args, "O&lh",
- PyMac_GetOSType, &udType,
- &index,
- &itlRegionTag))
- return NULL;
- _err = RemoveUserDataText(_self->ob_itself,
- udType,
- index,
- itlRegionTag);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(RemoveUserDataText);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&lh",
+ PyMac_GetOSType, &udType,
+ &index,
+ &itlRegionTag))
+ return NULL;
+ _err = RemoveUserDataText(_self->ob_itself,
+ udType,
+ index,
+ itlRegionTag);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *UserDataObj_PutUserDataIntoHandle(UserDataObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Handle h;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Handle h;
#ifndef PutUserDataIntoHandle
- PyMac_PRECHECK(PutUserDataIntoHandle);
+ PyMac_PRECHECK(PutUserDataIntoHandle);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &h))
- return NULL;
- _err = PutUserDataIntoHandle(_self->ob_itself,
- h);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &h))
+ return NULL;
+ _err = PutUserDataIntoHandle(_self->ob_itself,
+ h);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *UserDataObj_CopyUserData(UserDataObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- UserData dstUserData;
- OSType copyRule;
+ PyObject *_res = NULL;
+ OSErr _err;
+ UserData dstUserData;
+ OSType copyRule;
#ifndef CopyUserData
- PyMac_PRECHECK(CopyUserData);
+ PyMac_PRECHECK(CopyUserData);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- UserDataObj_Convert, &dstUserData,
- PyMac_GetOSType, &copyRule))
- return NULL;
- _err = CopyUserData(_self->ob_itself,
- dstUserData,
- copyRule);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ UserDataObj_Convert, &dstUserData,
+ PyMac_GetOSType, &copyRule))
+ return NULL;
+ _err = CopyUserData(_self->ob_itself,
+ dstUserData,
+ copyRule);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyMethodDef UserDataObj_methods[] = {
- {"GetUserData", (PyCFunction)UserDataObj_GetUserData, 1,
- PyDoc_STR("(Handle data, OSType udType, long index) -> None")},
- {"AddUserData", (PyCFunction)UserDataObj_AddUserData, 1,
- PyDoc_STR("(Handle data, OSType udType) -> None")},
- {"RemoveUserData", (PyCFunction)UserDataObj_RemoveUserData, 1,
- PyDoc_STR("(OSType udType, long index) -> None")},
- {"CountUserDataType", (PyCFunction)UserDataObj_CountUserDataType, 1,
- PyDoc_STR("(OSType udType) -> (short _rv)")},
- {"GetNextUserDataType", (PyCFunction)UserDataObj_GetNextUserDataType, 1,
- PyDoc_STR("(OSType udType) -> (long _rv)")},
- {"AddUserDataText", (PyCFunction)UserDataObj_AddUserDataText, 1,
- PyDoc_STR("(Handle data, OSType udType, long index, short itlRegionTag) -> None")},
- {"GetUserDataText", (PyCFunction)UserDataObj_GetUserDataText, 1,
- PyDoc_STR("(Handle data, OSType udType, long index, short itlRegionTag) -> None")},
- {"RemoveUserDataText", (PyCFunction)UserDataObj_RemoveUserDataText, 1,
- PyDoc_STR("(OSType udType, long index, short itlRegionTag) -> None")},
- {"PutUserDataIntoHandle", (PyCFunction)UserDataObj_PutUserDataIntoHandle, 1,
- PyDoc_STR("(Handle h) -> None")},
- {"CopyUserData", (PyCFunction)UserDataObj_CopyUserData, 1,
- PyDoc_STR("(UserData dstUserData, OSType copyRule) -> None")},
- {NULL, NULL, 0}
+ {"GetUserData", (PyCFunction)UserDataObj_GetUserData, 1,
+ PyDoc_STR("(Handle data, OSType udType, long index) -> None")},
+ {"AddUserData", (PyCFunction)UserDataObj_AddUserData, 1,
+ PyDoc_STR("(Handle data, OSType udType) -> None")},
+ {"RemoveUserData", (PyCFunction)UserDataObj_RemoveUserData, 1,
+ PyDoc_STR("(OSType udType, long index) -> None")},
+ {"CountUserDataType", (PyCFunction)UserDataObj_CountUserDataType, 1,
+ PyDoc_STR("(OSType udType) -> (short _rv)")},
+ {"GetNextUserDataType", (PyCFunction)UserDataObj_GetNextUserDataType, 1,
+ PyDoc_STR("(OSType udType) -> (long _rv)")},
+ {"AddUserDataText", (PyCFunction)UserDataObj_AddUserDataText, 1,
+ PyDoc_STR("(Handle data, OSType udType, long index, short itlRegionTag) -> None")},
+ {"GetUserDataText", (PyCFunction)UserDataObj_GetUserDataText, 1,
+ PyDoc_STR("(Handle data, OSType udType, long index, short itlRegionTag) -> None")},
+ {"RemoveUserDataText", (PyCFunction)UserDataObj_RemoveUserDataText, 1,
+ PyDoc_STR("(OSType udType, long index, short itlRegionTag) -> None")},
+ {"PutUserDataIntoHandle", (PyCFunction)UserDataObj_PutUserDataIntoHandle, 1,
+ PyDoc_STR("(Handle h) -> None")},
+ {"CopyUserData", (PyCFunction)UserDataObj_CopyUserData, 1,
+ PyDoc_STR("(UserData dstUserData, OSType copyRule) -> None")},
+ {NULL, NULL, 0}
};
#define UserDataObj_getsetlist NULL
@@ -2143,61 +2143,61 @@ static PyMethodDef UserDataObj_methods[] = {
static PyObject *UserDataObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
- PyObject *_self;
- UserData itself;
- char *kw[] = {"itself", 0};
+ 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;
+ 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 = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
- "_Qt.UserData", /*tp_name*/
- sizeof(UserDataObject), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- /* methods */
- (destructor) UserDataObj_dealloc, /*tp_dealloc*/
- 0, /*tp_print*/
- (getattrfunc)0, /*tp_getattr*/
- (setattrfunc)0, /*tp_setattr*/
- (cmpfunc) UserDataObj_compare, /*tp_compare*/
- (reprfunc) UserDataObj_repr, /*tp_repr*/
- (PyNumberMethods *)0, /* tp_as_number */
- (PySequenceMethods *)0, /* tp_as_sequence */
- (PyMappingMethods *)0, /* tp_as_mapping */
- (hashfunc) UserDataObj_hash, /*tp_hash*/
- 0, /*tp_call*/
- 0, /*tp_str*/
- PyObject_GenericGetAttr, /*tp_getattro*/
- PyObject_GenericSetAttr, /*tp_setattro */
- 0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
- 0, /*tp_doc*/
- 0, /*tp_traverse*/
- 0, /*tp_clear*/
- 0, /*tp_richcompare*/
- 0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
- 0, /*tp_iternext*/
- UserDataObj_methods, /* tp_methods */
- 0, /*tp_members*/
- UserDataObj_getsetlist, /*tp_getset*/
- 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 */
+ PyObject_HEAD_INIT(NULL)
+ 0, /*ob_size*/
+ "_Qt.UserData", /*tp_name*/
+ sizeof(UserDataObject), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ /* methods */
+ (destructor) UserDataObj_dealloc, /*tp_dealloc*/
+ 0, /*tp_print*/
+ (getattrfunc)0, /*tp_getattr*/
+ (setattrfunc)0, /*tp_setattr*/
+ (cmpfunc) UserDataObj_compare, /*tp_compare*/
+ (reprfunc) UserDataObj_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) UserDataObj_hash, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ PyObject_GenericGetAttr, /*tp_getattro*/
+ PyObject_GenericSetAttr, /*tp_setattro */
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
+ 0, /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ UserDataObj_methods, /* tp_methods */
+ 0, /*tp_members*/
+ UserDataObj_getsetlist, /*tp_getset*/
+ 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 -------------------- */
@@ -2210,1165 +2210,1165 @@ PyTypeObject Media_Type;
#define MediaObj_Check(x) ((x)->ob_type == &Media_Type || PyObject_TypeCheck((x), &Media_Type))
typedef struct MediaObject {
- PyObject_HEAD
- Media ob_itself;
+ PyObject_HEAD
+ Media ob_itself;
} MediaObject;
PyObject *MediaObj_New(Media itself)
{
- MediaObject *it;
- if (itself == NULL) {
- PyErr_SetString(Qt_Error,"Cannot create Media from NULL pointer");
- return NULL;
- }
- it = PyObject_NEW(MediaObject, &Media_Type);
- if (it == NULL) return NULL;
- it->ob_itself = itself;
- return (PyObject *)it;
+ MediaObject *it;
+ if (itself == NULL) {
+ PyErr_SetString(Qt_Error,"Cannot create Media from NULL pointer");
+ return NULL;
+ }
+ it = PyObject_NEW(MediaObject, &Media_Type);
+ if (it == NULL) return NULL;
+ it->ob_itself = itself;
+ return (PyObject *)it;
}
int MediaObj_Convert(PyObject *v, Media *p_itself)
{
- if (v == Py_None)
- {
- *p_itself = NULL;
- return 1;
- }
- if (!MediaObj_Check(v))
- {
- PyErr_SetString(PyExc_TypeError, "Media required");
- return 0;
- }
- *p_itself = ((MediaObject *)v)->ob_itself;
- return 1;
+ if (v == Py_None)
+ {
+ *p_itself = NULL;
+ return 1;
+ }
+ if (!MediaObj_Check(v))
+ {
+ PyErr_SetString(PyExc_TypeError, "Media required");
+ return 0;
+ }
+ *p_itself = ((MediaObject *)v)->ob_itself;
+ return 1;
}
static void MediaObj_dealloc(MediaObject *self)
{
- if (self->ob_itself) DisposeTrackMedia(self->ob_itself);
- self->ob_type->tp_free((PyObject *)self);
+ if (self->ob_itself) DisposeTrackMedia(self->ob_itself);
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *MediaObj_LoadMediaIntoRam(MediaObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- TimeValue time;
- TimeValue duration;
- long flags;
+ PyObject *_res = NULL;
+ OSErr _err;
+ TimeValue time;
+ TimeValue duration;
+ long flags;
#ifndef LoadMediaIntoRam
- PyMac_PRECHECK(LoadMediaIntoRam);
-#endif
- if (!PyArg_ParseTuple(_args, "lll",
- &time,
- &duration,
- &flags))
- return NULL;
- _err = LoadMediaIntoRam(_self->ob_itself,
- time,
- duration,
- flags);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(LoadMediaIntoRam);
+#endif
+ if (!PyArg_ParseTuple(_args, "lll",
+ &time,
+ &duration,
+ &flags))
+ return NULL;
+ _err = LoadMediaIntoRam(_self->ob_itself,
+ time,
+ duration,
+ flags);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MediaObj_GetMediaTrack(MediaObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Track _rv;
+ PyObject *_res = NULL;
+ Track _rv;
#ifndef GetMediaTrack
- PyMac_PRECHECK(GetMediaTrack);
+ PyMac_PRECHECK(GetMediaTrack);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetMediaTrack(_self->ob_itself);
- _res = Py_BuildValue("O&",
- TrackObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetMediaTrack(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ TrackObj_New, _rv);
+ return _res;
}
static PyObject *MediaObj_GetMediaCreationTime(MediaObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- unsigned long _rv;
+ PyObject *_res = NULL;
+ unsigned long _rv;
#ifndef GetMediaCreationTime
- PyMac_PRECHECK(GetMediaCreationTime);
+ PyMac_PRECHECK(GetMediaCreationTime);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetMediaCreationTime(_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetMediaCreationTime(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *MediaObj_GetMediaModificationTime(MediaObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- unsigned long _rv;
+ PyObject *_res = NULL;
+ unsigned long _rv;
#ifndef GetMediaModificationTime
- PyMac_PRECHECK(GetMediaModificationTime);
+ PyMac_PRECHECK(GetMediaModificationTime);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetMediaModificationTime(_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetMediaModificationTime(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *MediaObj_GetMediaTimeScale(MediaObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- TimeScale _rv;
+ PyObject *_res = NULL;
+ TimeScale _rv;
#ifndef GetMediaTimeScale
- PyMac_PRECHECK(GetMediaTimeScale);
+ PyMac_PRECHECK(GetMediaTimeScale);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetMediaTimeScale(_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetMediaTimeScale(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *MediaObj_SetMediaTimeScale(MediaObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- TimeScale timeScale;
+ PyObject *_res = NULL;
+ TimeScale timeScale;
#ifndef SetMediaTimeScale
- PyMac_PRECHECK(SetMediaTimeScale);
+ PyMac_PRECHECK(SetMediaTimeScale);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &timeScale))
- return NULL;
- SetMediaTimeScale(_self->ob_itself,
- timeScale);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &timeScale))
+ return NULL;
+ SetMediaTimeScale(_self->ob_itself,
+ timeScale);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MediaObj_GetMediaDuration(MediaObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- TimeValue _rv;
+ PyObject *_res = NULL;
+ TimeValue _rv;
#ifndef GetMediaDuration
- PyMac_PRECHECK(GetMediaDuration);
+ PyMac_PRECHECK(GetMediaDuration);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetMediaDuration(_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetMediaDuration(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *MediaObj_GetMediaLanguage(MediaObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short _rv;
+ PyObject *_res = NULL;
+ short _rv;
#ifndef GetMediaLanguage
- PyMac_PRECHECK(GetMediaLanguage);
+ PyMac_PRECHECK(GetMediaLanguage);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetMediaLanguage(_self->ob_itself);
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetMediaLanguage(_self->ob_itself);
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *MediaObj_SetMediaLanguage(MediaObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short language;
+ PyObject *_res = NULL;
+ short language;
#ifndef SetMediaLanguage
- PyMac_PRECHECK(SetMediaLanguage);
+ PyMac_PRECHECK(SetMediaLanguage);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &language))
- return NULL;
- SetMediaLanguage(_self->ob_itself,
- language);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &language))
+ return NULL;
+ SetMediaLanguage(_self->ob_itself,
+ language);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MediaObj_GetMediaQuality(MediaObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short _rv;
+ PyObject *_res = NULL;
+ short _rv;
#ifndef GetMediaQuality
- PyMac_PRECHECK(GetMediaQuality);
+ PyMac_PRECHECK(GetMediaQuality);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetMediaQuality(_self->ob_itself);
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetMediaQuality(_self->ob_itself);
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *MediaObj_SetMediaQuality(MediaObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short quality;
+ PyObject *_res = NULL;
+ short quality;
#ifndef SetMediaQuality
- PyMac_PRECHECK(SetMediaQuality);
+ PyMac_PRECHECK(SetMediaQuality);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &quality))
- return NULL;
- SetMediaQuality(_self->ob_itself,
- quality);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &quality))
+ return NULL;
+ SetMediaQuality(_self->ob_itself,
+ quality);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MediaObj_GetMediaHandlerDescription(MediaObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSType mediaType;
- Str255 creatorName;
- OSType creatorManufacturer;
+ PyObject *_res = NULL;
+ OSType mediaType;
+ Str255 creatorName;
+ OSType creatorManufacturer;
#ifndef GetMediaHandlerDescription
- PyMac_PRECHECK(GetMediaHandlerDescription);
+ PyMac_PRECHECK(GetMediaHandlerDescription);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetStr255, creatorName))
- return NULL;
- GetMediaHandlerDescription(_self->ob_itself,
- &mediaType,
- creatorName,
- &creatorManufacturer);
- _res = Py_BuildValue("O&O&",
- PyMac_BuildOSType, mediaType,
- PyMac_BuildOSType, creatorManufacturer);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetStr255, creatorName))
+ return NULL;
+ GetMediaHandlerDescription(_self->ob_itself,
+ &mediaType,
+ creatorName,
+ &creatorManufacturer);
+ _res = Py_BuildValue("O&O&",
+ PyMac_BuildOSType, mediaType,
+ PyMac_BuildOSType, creatorManufacturer);
+ return _res;
}
static PyObject *MediaObj_GetMediaUserData(MediaObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- UserData _rv;
+ PyObject *_res = NULL;
+ UserData _rv;
#ifndef GetMediaUserData
- PyMac_PRECHECK(GetMediaUserData);
+ PyMac_PRECHECK(GetMediaUserData);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetMediaUserData(_self->ob_itself);
- _res = Py_BuildValue("O&",
- UserDataObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetMediaUserData(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ UserDataObj_New, _rv);
+ return _res;
}
static PyObject *MediaObj_GetMediaHandler(MediaObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- MediaHandler _rv;
+ PyObject *_res = NULL;
+ MediaHandler _rv;
#ifndef GetMediaHandler
- PyMac_PRECHECK(GetMediaHandler);
+ PyMac_PRECHECK(GetMediaHandler);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetMediaHandler(_self->ob_itself);
- _res = Py_BuildValue("O&",
- CmpInstObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetMediaHandler(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ CmpInstObj_New, _rv);
+ return _res;
}
static PyObject *MediaObj_SetMediaHandler(MediaObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- MediaHandlerComponent mH;
+ PyObject *_res = NULL;
+ OSErr _err;
+ MediaHandlerComponent mH;
#ifndef SetMediaHandler
- PyMac_PRECHECK(SetMediaHandler);
+ PyMac_PRECHECK(SetMediaHandler);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpObj_Convert, &mH))
- return NULL;
- _err = SetMediaHandler(_self->ob_itself,
- mH);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpObj_Convert, &mH))
+ return NULL;
+ _err = SetMediaHandler(_self->ob_itself,
+ mH);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MediaObj_BeginMediaEdits(MediaObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
+ PyObject *_res = NULL;
+ OSErr _err;
#ifndef BeginMediaEdits
- PyMac_PRECHECK(BeginMediaEdits);
+ PyMac_PRECHECK(BeginMediaEdits);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = BeginMediaEdits(_self->ob_itself);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = BeginMediaEdits(_self->ob_itself);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MediaObj_EndMediaEdits(MediaObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
+ PyObject *_res = NULL;
+ OSErr _err;
#ifndef EndMediaEdits
- PyMac_PRECHECK(EndMediaEdits);
+ PyMac_PRECHECK(EndMediaEdits);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = EndMediaEdits(_self->ob_itself);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = EndMediaEdits(_self->ob_itself);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MediaObj_SetMediaDefaultDataRefIndex(MediaObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- short index;
+ PyObject *_res = NULL;
+ OSErr _err;
+ short index;
#ifndef SetMediaDefaultDataRefIndex
- PyMac_PRECHECK(SetMediaDefaultDataRefIndex);
+ PyMac_PRECHECK(SetMediaDefaultDataRefIndex);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &index))
- return NULL;
- _err = SetMediaDefaultDataRefIndex(_self->ob_itself,
- index);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &index))
+ return NULL;
+ _err = SetMediaDefaultDataRefIndex(_self->ob_itself,
+ index);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MediaObj_GetMediaDataHandlerDescription(MediaObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short index;
- OSType dhType;
- Str255 creatorName;
- OSType creatorManufacturer;
+ PyObject *_res = NULL;
+ short index;
+ OSType dhType;
+ Str255 creatorName;
+ OSType creatorManufacturer;
#ifndef GetMediaDataHandlerDescription
- PyMac_PRECHECK(GetMediaDataHandlerDescription);
-#endif
- if (!PyArg_ParseTuple(_args, "hO&",
- &index,
- PyMac_GetStr255, creatorName))
- return NULL;
- GetMediaDataHandlerDescription(_self->ob_itself,
- index,
- &dhType,
- creatorName,
- &creatorManufacturer);
- _res = Py_BuildValue("O&O&",
- PyMac_BuildOSType, dhType,
- PyMac_BuildOSType, creatorManufacturer);
- return _res;
+ PyMac_PRECHECK(GetMediaDataHandlerDescription);
+#endif
+ if (!PyArg_ParseTuple(_args, "hO&",
+ &index,
+ PyMac_GetStr255, creatorName))
+ return NULL;
+ GetMediaDataHandlerDescription(_self->ob_itself,
+ index,
+ &dhType,
+ creatorName,
+ &creatorManufacturer);
+ _res = Py_BuildValue("O&O&",
+ PyMac_BuildOSType, dhType,
+ PyMac_BuildOSType, creatorManufacturer);
+ return _res;
}
static PyObject *MediaObj_GetMediaDataHandler(MediaObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- DataHandler _rv;
- short index;
+ PyObject *_res = NULL;
+ DataHandler _rv;
+ short index;
#ifndef GetMediaDataHandler
- PyMac_PRECHECK(GetMediaDataHandler);
+ PyMac_PRECHECK(GetMediaDataHandler);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &index))
- return NULL;
- _rv = GetMediaDataHandler(_self->ob_itself,
- index);
- _res = Py_BuildValue("O&",
- CmpInstObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &index))
+ return NULL;
+ _rv = GetMediaDataHandler(_self->ob_itself,
+ index);
+ _res = Py_BuildValue("O&",
+ CmpInstObj_New, _rv);
+ return _res;
}
static PyObject *MediaObj_SetMediaDataHandler(MediaObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- short index;
- DataHandlerComponent dataHandler;
+ PyObject *_res = NULL;
+ OSErr _err;
+ short index;
+ DataHandlerComponent dataHandler;
#ifndef SetMediaDataHandler
- PyMac_PRECHECK(SetMediaDataHandler);
+ PyMac_PRECHECK(SetMediaDataHandler);
#endif
- if (!PyArg_ParseTuple(_args, "hO&",
- &index,
- CmpObj_Convert, &dataHandler))
- return NULL;
- _err = SetMediaDataHandler(_self->ob_itself,
- index,
- dataHandler);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "hO&",
+ &index,
+ CmpObj_Convert, &dataHandler))
+ return NULL;
+ _err = SetMediaDataHandler(_self->ob_itself,
+ index,
+ dataHandler);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MediaObj_GetMediaSampleDescriptionCount(MediaObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- long _rv;
+ PyObject *_res = NULL;
+ long _rv;
#ifndef GetMediaSampleDescriptionCount
- PyMac_PRECHECK(GetMediaSampleDescriptionCount);
+ PyMac_PRECHECK(GetMediaSampleDescriptionCount);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetMediaSampleDescriptionCount(_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetMediaSampleDescriptionCount(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *MediaObj_GetMediaSampleDescription(MediaObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- long index;
- SampleDescriptionHandle descH;
+ PyObject *_res = NULL;
+ long index;
+ SampleDescriptionHandle descH;
#ifndef GetMediaSampleDescription
- PyMac_PRECHECK(GetMediaSampleDescription);
+ PyMac_PRECHECK(GetMediaSampleDescription);
#endif
- if (!PyArg_ParseTuple(_args, "lO&",
- &index,
- ResObj_Convert, &descH))
- return NULL;
- GetMediaSampleDescription(_self->ob_itself,
- index,
- descH);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "lO&",
+ &index,
+ ResObj_Convert, &descH))
+ return NULL;
+ GetMediaSampleDescription(_self->ob_itself,
+ index,
+ descH);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MediaObj_SetMediaSampleDescription(MediaObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- long index;
- SampleDescriptionHandle descH;
+ PyObject *_res = NULL;
+ OSErr _err;
+ long index;
+ SampleDescriptionHandle descH;
#ifndef SetMediaSampleDescription
- PyMac_PRECHECK(SetMediaSampleDescription);
+ PyMac_PRECHECK(SetMediaSampleDescription);
#endif
- if (!PyArg_ParseTuple(_args, "lO&",
- &index,
- ResObj_Convert, &descH))
- return NULL;
- _err = SetMediaSampleDescription(_self->ob_itself,
- index,
- descH);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "lO&",
+ &index,
+ ResObj_Convert, &descH))
+ return NULL;
+ _err = SetMediaSampleDescription(_self->ob_itself,
+ index,
+ descH);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MediaObj_GetMediaSampleCount(MediaObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- long _rv;
+ PyObject *_res = NULL;
+ long _rv;
#ifndef GetMediaSampleCount
- PyMac_PRECHECK(GetMediaSampleCount);
+ PyMac_PRECHECK(GetMediaSampleCount);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetMediaSampleCount(_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetMediaSampleCount(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *MediaObj_GetMediaSyncSampleCount(MediaObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- long _rv;
+ PyObject *_res = NULL;
+ long _rv;
#ifndef GetMediaSyncSampleCount
- PyMac_PRECHECK(GetMediaSyncSampleCount);
+ PyMac_PRECHECK(GetMediaSyncSampleCount);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetMediaSyncSampleCount(_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetMediaSyncSampleCount(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *MediaObj_SampleNumToMediaTime(MediaObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- long logicalSampleNum;
- TimeValue sampleTime;
- TimeValue sampleDuration;
+ PyObject *_res = NULL;
+ long logicalSampleNum;
+ TimeValue sampleTime;
+ TimeValue sampleDuration;
#ifndef SampleNumToMediaTime
- PyMac_PRECHECK(SampleNumToMediaTime);
+ PyMac_PRECHECK(SampleNumToMediaTime);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &logicalSampleNum))
- return NULL;
- SampleNumToMediaTime(_self->ob_itself,
- logicalSampleNum,
- &sampleTime,
- &sampleDuration);
- _res = Py_BuildValue("ll",
- sampleTime,
- sampleDuration);
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &logicalSampleNum))
+ return NULL;
+ SampleNumToMediaTime(_self->ob_itself,
+ logicalSampleNum,
+ &sampleTime,
+ &sampleDuration);
+ _res = Py_BuildValue("ll",
+ sampleTime,
+ sampleDuration);
+ return _res;
}
static PyObject *MediaObj_MediaTimeToSampleNum(MediaObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- TimeValue time;
- long sampleNum;
- TimeValue sampleTime;
- TimeValue sampleDuration;
+ PyObject *_res = NULL;
+ TimeValue time;
+ long sampleNum;
+ TimeValue sampleTime;
+ TimeValue sampleDuration;
#ifndef MediaTimeToSampleNum
- PyMac_PRECHECK(MediaTimeToSampleNum);
-#endif
- if (!PyArg_ParseTuple(_args, "l",
- &time))
- return NULL;
- MediaTimeToSampleNum(_self->ob_itself,
- time,
- &sampleNum,
- &sampleTime,
- &sampleDuration);
- _res = Py_BuildValue("lll",
- sampleNum,
- sampleTime,
- sampleDuration);
- return _res;
+ PyMac_PRECHECK(MediaTimeToSampleNum);
+#endif
+ if (!PyArg_ParseTuple(_args, "l",
+ &time))
+ return NULL;
+ MediaTimeToSampleNum(_self->ob_itself,
+ time,
+ &sampleNum,
+ &sampleTime,
+ &sampleDuration);
+ _res = Py_BuildValue("lll",
+ sampleNum,
+ sampleTime,
+ sampleDuration);
+ return _res;
}
static PyObject *MediaObj_AddMediaSample(MediaObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Handle dataIn;
- long inOffset;
- unsigned long size;
- TimeValue durationPerSample;
- SampleDescriptionHandle sampleDescriptionH;
- long numberOfSamples;
- short sampleFlags;
- TimeValue sampleTime;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Handle dataIn;
+ long inOffset;
+ unsigned long size;
+ TimeValue durationPerSample;
+ SampleDescriptionHandle sampleDescriptionH;
+ long numberOfSamples;
+ short sampleFlags;
+ TimeValue sampleTime;
#ifndef AddMediaSample
- PyMac_PRECHECK(AddMediaSample);
-#endif
- if (!PyArg_ParseTuple(_args, "O&lllO&lh",
- ResObj_Convert, &dataIn,
- &inOffset,
- &size,
- &durationPerSample,
- ResObj_Convert, &sampleDescriptionH,
- &numberOfSamples,
- &sampleFlags))
- return NULL;
- _err = AddMediaSample(_self->ob_itself,
- dataIn,
- inOffset,
- size,
- durationPerSample,
- sampleDescriptionH,
- numberOfSamples,
- sampleFlags,
- &sampleTime);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- sampleTime);
- return _res;
+ PyMac_PRECHECK(AddMediaSample);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&lllO&lh",
+ ResObj_Convert, &dataIn,
+ &inOffset,
+ &size,
+ &durationPerSample,
+ ResObj_Convert, &sampleDescriptionH,
+ &numberOfSamples,
+ &sampleFlags))
+ return NULL;
+ _err = AddMediaSample(_self->ob_itself,
+ dataIn,
+ inOffset,
+ size,
+ durationPerSample,
+ sampleDescriptionH,
+ numberOfSamples,
+ sampleFlags,
+ &sampleTime);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ sampleTime);
+ return _res;
}
static PyObject *MediaObj_AddMediaSampleReference(MediaObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- long dataOffset;
- unsigned long size;
- TimeValue durationPerSample;
- SampleDescriptionHandle sampleDescriptionH;
- long numberOfSamples;
- short sampleFlags;
- TimeValue sampleTime;
+ PyObject *_res = NULL;
+ OSErr _err;
+ long dataOffset;
+ unsigned long size;
+ TimeValue durationPerSample;
+ SampleDescriptionHandle sampleDescriptionH;
+ long numberOfSamples;
+ short sampleFlags;
+ TimeValue sampleTime;
#ifndef AddMediaSampleReference
- PyMac_PRECHECK(AddMediaSampleReference);
-#endif
- if (!PyArg_ParseTuple(_args, "lllO&lh",
- &dataOffset,
- &size,
- &durationPerSample,
- ResObj_Convert, &sampleDescriptionH,
- &numberOfSamples,
- &sampleFlags))
- return NULL;
- _err = AddMediaSampleReference(_self->ob_itself,
- dataOffset,
- size,
- durationPerSample,
- sampleDescriptionH,
- numberOfSamples,
- sampleFlags,
- &sampleTime);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- sampleTime);
- return _res;
+ PyMac_PRECHECK(AddMediaSampleReference);
+#endif
+ if (!PyArg_ParseTuple(_args, "lllO&lh",
+ &dataOffset,
+ &size,
+ &durationPerSample,
+ ResObj_Convert, &sampleDescriptionH,
+ &numberOfSamples,
+ &sampleFlags))
+ return NULL;
+ _err = AddMediaSampleReference(_self->ob_itself,
+ dataOffset,
+ size,
+ durationPerSample,
+ sampleDescriptionH,
+ numberOfSamples,
+ sampleFlags,
+ &sampleTime);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ sampleTime);
+ return _res;
}
static PyObject *MediaObj_GetMediaSample(MediaObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Handle dataOut;
- long maxSizeToGrow;
- long size;
- TimeValue time;
- TimeValue sampleTime;
- TimeValue durationPerSample;
- SampleDescriptionHandle sampleDescriptionH;
- long sampleDescriptionIndex;
- long maxNumberOfSamples;
- long numberOfSamples;
- short sampleFlags;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Handle dataOut;
+ long maxSizeToGrow;
+ long size;
+ TimeValue time;
+ TimeValue sampleTime;
+ TimeValue durationPerSample;
+ SampleDescriptionHandle sampleDescriptionH;
+ long sampleDescriptionIndex;
+ long maxNumberOfSamples;
+ long numberOfSamples;
+ short sampleFlags;
#ifndef GetMediaSample
- PyMac_PRECHECK(GetMediaSample);
-#endif
- if (!PyArg_ParseTuple(_args, "O&llO&l",
- ResObj_Convert, &dataOut,
- &maxSizeToGrow,
- &time,
- ResObj_Convert, &sampleDescriptionH,
- &maxNumberOfSamples))
- return NULL;
- _err = GetMediaSample(_self->ob_itself,
- dataOut,
- maxSizeToGrow,
- &size,
- time,
- &sampleTime,
- &durationPerSample,
- sampleDescriptionH,
- &sampleDescriptionIndex,
- maxNumberOfSamples,
- &numberOfSamples,
- &sampleFlags);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("lllllh",
- size,
- sampleTime,
- durationPerSample,
- sampleDescriptionIndex,
- numberOfSamples,
- sampleFlags);
- return _res;
+ PyMac_PRECHECK(GetMediaSample);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&llO&l",
+ ResObj_Convert, &dataOut,
+ &maxSizeToGrow,
+ &time,
+ ResObj_Convert, &sampleDescriptionH,
+ &maxNumberOfSamples))
+ return NULL;
+ _err = GetMediaSample(_self->ob_itself,
+ dataOut,
+ maxSizeToGrow,
+ &size,
+ time,
+ &sampleTime,
+ &durationPerSample,
+ sampleDescriptionH,
+ &sampleDescriptionIndex,
+ maxNumberOfSamples,
+ &numberOfSamples,
+ &sampleFlags);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("lllllh",
+ size,
+ sampleTime,
+ durationPerSample,
+ sampleDescriptionIndex,
+ numberOfSamples,
+ sampleFlags);
+ return _res;
}
static PyObject *MediaObj_GetMediaSampleReference(MediaObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- long dataOffset;
- long size;
- TimeValue time;
- TimeValue sampleTime;
- TimeValue durationPerSample;
- SampleDescriptionHandle sampleDescriptionH;
- long sampleDescriptionIndex;
- long maxNumberOfSamples;
- long numberOfSamples;
- short sampleFlags;
+ PyObject *_res = NULL;
+ OSErr _err;
+ long dataOffset;
+ long size;
+ TimeValue time;
+ TimeValue sampleTime;
+ TimeValue durationPerSample;
+ SampleDescriptionHandle sampleDescriptionH;
+ long sampleDescriptionIndex;
+ long maxNumberOfSamples;
+ long numberOfSamples;
+ short sampleFlags;
#ifndef GetMediaSampleReference
- PyMac_PRECHECK(GetMediaSampleReference);
-#endif
- if (!PyArg_ParseTuple(_args, "lO&l",
- &time,
- ResObj_Convert, &sampleDescriptionH,
- &maxNumberOfSamples))
- return NULL;
- _err = GetMediaSampleReference(_self->ob_itself,
- &dataOffset,
- &size,
- time,
- &sampleTime,
- &durationPerSample,
- sampleDescriptionH,
- &sampleDescriptionIndex,
- maxNumberOfSamples,
- &numberOfSamples,
- &sampleFlags);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("llllllh",
- dataOffset,
- size,
- sampleTime,
- durationPerSample,
- sampleDescriptionIndex,
- numberOfSamples,
- sampleFlags);
- return _res;
+ PyMac_PRECHECK(GetMediaSampleReference);
+#endif
+ if (!PyArg_ParseTuple(_args, "lO&l",
+ &time,
+ ResObj_Convert, &sampleDescriptionH,
+ &maxNumberOfSamples))
+ return NULL;
+ _err = GetMediaSampleReference(_self->ob_itself,
+ &dataOffset,
+ &size,
+ time,
+ &sampleTime,
+ &durationPerSample,
+ sampleDescriptionH,
+ &sampleDescriptionIndex,
+ maxNumberOfSamples,
+ &numberOfSamples,
+ &sampleFlags);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("llllllh",
+ dataOffset,
+ size,
+ sampleTime,
+ durationPerSample,
+ sampleDescriptionIndex,
+ numberOfSamples,
+ sampleFlags);
+ return _res;
}
static PyObject *MediaObj_SetMediaPreferredChunkSize(MediaObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- long maxChunkSize;
+ PyObject *_res = NULL;
+ OSErr _err;
+ long maxChunkSize;
#ifndef SetMediaPreferredChunkSize
- PyMac_PRECHECK(SetMediaPreferredChunkSize);
+ PyMac_PRECHECK(SetMediaPreferredChunkSize);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &maxChunkSize))
- return NULL;
- _err = SetMediaPreferredChunkSize(_self->ob_itself,
- maxChunkSize);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &maxChunkSize))
+ return NULL;
+ _err = SetMediaPreferredChunkSize(_self->ob_itself,
+ maxChunkSize);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MediaObj_GetMediaPreferredChunkSize(MediaObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- long maxChunkSize;
+ PyObject *_res = NULL;
+ OSErr _err;
+ long maxChunkSize;
#ifndef GetMediaPreferredChunkSize
- PyMac_PRECHECK(GetMediaPreferredChunkSize);
+ PyMac_PRECHECK(GetMediaPreferredChunkSize);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetMediaPreferredChunkSize(_self->ob_itself,
- &maxChunkSize);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- maxChunkSize);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetMediaPreferredChunkSize(_self->ob_itself,
+ &maxChunkSize);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ maxChunkSize);
+ return _res;
}
static PyObject *MediaObj_SetMediaShadowSync(MediaObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- long frameDiffSampleNum;
- long syncSampleNum;
+ PyObject *_res = NULL;
+ OSErr _err;
+ long frameDiffSampleNum;
+ long syncSampleNum;
#ifndef SetMediaShadowSync
- PyMac_PRECHECK(SetMediaShadowSync);
+ PyMac_PRECHECK(SetMediaShadowSync);
#endif
- if (!PyArg_ParseTuple(_args, "ll",
- &frameDiffSampleNum,
- &syncSampleNum))
- return NULL;
- _err = SetMediaShadowSync(_self->ob_itself,
- frameDiffSampleNum,
- syncSampleNum);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "ll",
+ &frameDiffSampleNum,
+ &syncSampleNum))
+ return NULL;
+ _err = SetMediaShadowSync(_self->ob_itself,
+ frameDiffSampleNum,
+ syncSampleNum);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MediaObj_GetMediaShadowSync(MediaObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- long frameDiffSampleNum;
- long syncSampleNum;
+ PyObject *_res = NULL;
+ OSErr _err;
+ long frameDiffSampleNum;
+ long syncSampleNum;
#ifndef GetMediaShadowSync
- PyMac_PRECHECK(GetMediaShadowSync);
+ PyMac_PRECHECK(GetMediaShadowSync);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &frameDiffSampleNum))
- return NULL;
- _err = GetMediaShadowSync(_self->ob_itself,
- frameDiffSampleNum,
- &syncSampleNum);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- syncSampleNum);
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &frameDiffSampleNum))
+ return NULL;
+ _err = GetMediaShadowSync(_self->ob_itself,
+ frameDiffSampleNum,
+ &syncSampleNum);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ syncSampleNum);
+ return _res;
}
static PyObject *MediaObj_GetMediaDataSize(MediaObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- long _rv;
- TimeValue startTime;
- TimeValue duration;
+ PyObject *_res = NULL;
+ long _rv;
+ TimeValue startTime;
+ TimeValue duration;
#ifndef GetMediaDataSize
- PyMac_PRECHECK(GetMediaDataSize);
+ PyMac_PRECHECK(GetMediaDataSize);
#endif
- if (!PyArg_ParseTuple(_args, "ll",
- &startTime,
- &duration))
- return NULL;
- _rv = GetMediaDataSize(_self->ob_itself,
- startTime,
- duration);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "ll",
+ &startTime,
+ &duration))
+ return NULL;
+ _rv = GetMediaDataSize(_self->ob_itself,
+ startTime,
+ duration);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *MediaObj_GetMediaDataSize64(MediaObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- TimeValue startTime;
- TimeValue duration;
- wide dataSize;
+ PyObject *_res = NULL;
+ OSErr _err;
+ TimeValue startTime;
+ TimeValue duration;
+ wide dataSize;
#ifndef GetMediaDataSize64
- PyMac_PRECHECK(GetMediaDataSize64);
-#endif
- if (!PyArg_ParseTuple(_args, "ll",
- &startTime,
- &duration))
- return NULL;
- _err = GetMediaDataSize64(_self->ob_itself,
- startTime,
- duration,
- &dataSize);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- PyMac_Buildwide, dataSize);
- return _res;
+ PyMac_PRECHECK(GetMediaDataSize64);
+#endif
+ if (!PyArg_ParseTuple(_args, "ll",
+ &startTime,
+ &duration))
+ return NULL;
+ _err = GetMediaDataSize64(_self->ob_itself,
+ startTime,
+ duration,
+ &dataSize);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ PyMac_Buildwide, dataSize);
+ return _res;
}
static PyObject *MediaObj_CopyMediaUserData(MediaObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Media dstMedia;
- OSType copyRule;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Media dstMedia;
+ OSType copyRule;
#ifndef CopyMediaUserData
- PyMac_PRECHECK(CopyMediaUserData);
+ PyMac_PRECHECK(CopyMediaUserData);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- MediaObj_Convert, &dstMedia,
- PyMac_GetOSType, &copyRule))
- return NULL;
- _err = CopyMediaUserData(_self->ob_itself,
- dstMedia,
- copyRule);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ MediaObj_Convert, &dstMedia,
+ PyMac_GetOSType, &copyRule))
+ return NULL;
+ _err = CopyMediaUserData(_self->ob_itself,
+ dstMedia,
+ copyRule);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MediaObj_GetMediaNextInterestingTime(MediaObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short interestingTimeFlags;
- TimeValue time;
- Fixed rate;
- TimeValue interestingTime;
- TimeValue interestingDuration;
+ PyObject *_res = NULL;
+ short interestingTimeFlags;
+ TimeValue time;
+ Fixed rate;
+ TimeValue interestingTime;
+ TimeValue interestingDuration;
#ifndef GetMediaNextInterestingTime
- PyMac_PRECHECK(GetMediaNextInterestingTime);
-#endif
- if (!PyArg_ParseTuple(_args, "hlO&",
- &interestingTimeFlags,
- &time,
- PyMac_GetFixed, &rate))
- return NULL;
- GetMediaNextInterestingTime(_self->ob_itself,
- interestingTimeFlags,
- time,
- rate,
- &interestingTime,
- &interestingDuration);
- _res = Py_BuildValue("ll",
- interestingTime,
- interestingDuration);
- return _res;
+ PyMac_PRECHECK(GetMediaNextInterestingTime);
+#endif
+ if (!PyArg_ParseTuple(_args, "hlO&",
+ &interestingTimeFlags,
+ &time,
+ PyMac_GetFixed, &rate))
+ return NULL;
+ GetMediaNextInterestingTime(_self->ob_itself,
+ interestingTimeFlags,
+ time,
+ rate,
+ &interestingTime,
+ &interestingDuration);
+ _res = Py_BuildValue("ll",
+ interestingTime,
+ interestingDuration);
+ return _res;
}
static PyObject *MediaObj_GetMediaDataRef(MediaObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- short index;
- Handle dataRef;
- OSType dataRefType;
- long dataRefAttributes;
+ PyObject *_res = NULL;
+ OSErr _err;
+ short index;
+ Handle dataRef;
+ OSType dataRefType;
+ long dataRefAttributes;
#ifndef GetMediaDataRef
- PyMac_PRECHECK(GetMediaDataRef);
-#endif
- if (!PyArg_ParseTuple(_args, "h",
- &index))
- return NULL;
- _err = GetMediaDataRef(_self->ob_itself,
- index,
- &dataRef,
- &dataRefType,
- &dataRefAttributes);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&O&l",
- ResObj_New, dataRef,
- PyMac_BuildOSType, dataRefType,
- dataRefAttributes);
- return _res;
+ PyMac_PRECHECK(GetMediaDataRef);
+#endif
+ if (!PyArg_ParseTuple(_args, "h",
+ &index))
+ return NULL;
+ _err = GetMediaDataRef(_self->ob_itself,
+ index,
+ &dataRef,
+ &dataRefType,
+ &dataRefAttributes);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&O&l",
+ ResObj_New, dataRef,
+ PyMac_BuildOSType, dataRefType,
+ dataRefAttributes);
+ return _res;
}
static PyObject *MediaObj_SetMediaDataRef(MediaObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- short index;
- Handle dataRef;
- OSType dataRefType;
+ PyObject *_res = NULL;
+ OSErr _err;
+ short index;
+ Handle dataRef;
+ OSType dataRefType;
#ifndef SetMediaDataRef
- PyMac_PRECHECK(SetMediaDataRef);
-#endif
- if (!PyArg_ParseTuple(_args, "hO&O&",
- &index,
- ResObj_Convert, &dataRef,
- PyMac_GetOSType, &dataRefType))
- return NULL;
- _err = SetMediaDataRef(_self->ob_itself,
- index,
- dataRef,
- dataRefType);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(SetMediaDataRef);
+#endif
+ if (!PyArg_ParseTuple(_args, "hO&O&",
+ &index,
+ ResObj_Convert, &dataRef,
+ PyMac_GetOSType, &dataRefType))
+ return NULL;
+ _err = SetMediaDataRef(_self->ob_itself,
+ index,
+ dataRef,
+ dataRefType);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MediaObj_SetMediaDataRefAttributes(MediaObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- short index;
- long dataRefAttributes;
+ PyObject *_res = NULL;
+ OSErr _err;
+ short index;
+ long dataRefAttributes;
#ifndef SetMediaDataRefAttributes
- PyMac_PRECHECK(SetMediaDataRefAttributes);
+ PyMac_PRECHECK(SetMediaDataRefAttributes);
#endif
- if (!PyArg_ParseTuple(_args, "hl",
- &index,
- &dataRefAttributes))
- return NULL;
- _err = SetMediaDataRefAttributes(_self->ob_itself,
- index,
- dataRefAttributes);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "hl",
+ &index,
+ &dataRefAttributes))
+ return NULL;
+ _err = SetMediaDataRefAttributes(_self->ob_itself,
+ index,
+ dataRefAttributes);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MediaObj_AddMediaDataRef(MediaObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- short index;
- Handle dataRef;
- OSType dataRefType;
+ PyObject *_res = NULL;
+ OSErr _err;
+ short index;
+ Handle dataRef;
+ OSType dataRefType;
#ifndef AddMediaDataRef
- PyMac_PRECHECK(AddMediaDataRef);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- ResObj_Convert, &dataRef,
- PyMac_GetOSType, &dataRefType))
- return NULL;
- _err = AddMediaDataRef(_self->ob_itself,
- &index,
- dataRef,
- dataRefType);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("h",
- index);
- return _res;
+ PyMac_PRECHECK(AddMediaDataRef);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ ResObj_Convert, &dataRef,
+ PyMac_GetOSType, &dataRefType))
+ return NULL;
+ _err = AddMediaDataRef(_self->ob_itself,
+ &index,
+ dataRef,
+ dataRefType);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("h",
+ index);
+ return _res;
}
static PyObject *MediaObj_GetMediaDataRefCount(MediaObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- short count;
+ PyObject *_res = NULL;
+ OSErr _err;
+ short count;
#ifndef GetMediaDataRefCount
- PyMac_PRECHECK(GetMediaDataRefCount);
+ PyMac_PRECHECK(GetMediaDataRefCount);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetMediaDataRefCount(_self->ob_itself,
- &count);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("h",
- count);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetMediaDataRefCount(_self->ob_itself,
+ &count);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("h",
+ count);
+ return _res;
}
static PyObject *MediaObj_SetMediaPlayHints(MediaObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- long flags;
- long flagsMask;
+ PyObject *_res = NULL;
+ long flags;
+ long flagsMask;
#ifndef SetMediaPlayHints
- PyMac_PRECHECK(SetMediaPlayHints);
+ PyMac_PRECHECK(SetMediaPlayHints);
#endif
- if (!PyArg_ParseTuple(_args, "ll",
- &flags,
- &flagsMask))
- return NULL;
- SetMediaPlayHints(_self->ob_itself,
- flags,
- flagsMask);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "ll",
+ &flags,
+ &flagsMask))
+ return NULL;
+ SetMediaPlayHints(_self->ob_itself,
+ flags,
+ flagsMask);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MediaObj_GetMediaPlayHints(MediaObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- long flags;
+ PyObject *_res = NULL;
+ long flags;
#ifndef GetMediaPlayHints
- PyMac_PRECHECK(GetMediaPlayHints);
+ PyMac_PRECHECK(GetMediaPlayHints);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- GetMediaPlayHints(_self->ob_itself,
- &flags);
- _res = Py_BuildValue("l",
- flags);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ GetMediaPlayHints(_self->ob_itself,
+ &flags);
+ _res = Py_BuildValue("l",
+ flags);
+ return _res;
}
static PyObject *MediaObj_GetMediaNextInterestingTimeOnly(MediaObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short interestingTimeFlags;
- TimeValue time;
- Fixed rate;
- TimeValue interestingTime;
+ PyObject *_res = NULL;
+ short interestingTimeFlags;
+ TimeValue time;
+ Fixed rate;
+ TimeValue interestingTime;
#ifndef GetMediaNextInterestingTimeOnly
- PyMac_PRECHECK(GetMediaNextInterestingTimeOnly);
-#endif
- if (!PyArg_ParseTuple(_args, "hlO&",
- &interestingTimeFlags,
- &time,
- PyMac_GetFixed, &rate))
- return NULL;
- GetMediaNextInterestingTimeOnly(_self->ob_itself,
- interestingTimeFlags,
- time,
- rate,
- &interestingTime);
- _res = Py_BuildValue("l",
- interestingTime);
- return _res;
+ PyMac_PRECHECK(GetMediaNextInterestingTimeOnly);
+#endif
+ if (!PyArg_ParseTuple(_args, "hlO&",
+ &interestingTimeFlags,
+ &time,
+ PyMac_GetFixed, &rate))
+ return NULL;
+ GetMediaNextInterestingTimeOnly(_self->ob_itself,
+ interestingTimeFlags,
+ time,
+ rate,
+ &interestingTime);
+ _res = Py_BuildValue("l",
+ interestingTime);
+ return _res;
}
static PyMethodDef MediaObj_methods[] = {
- {"LoadMediaIntoRam", (PyCFunction)MediaObj_LoadMediaIntoRam, 1,
- PyDoc_STR("(TimeValue time, TimeValue duration, long flags) -> None")},
- {"GetMediaTrack", (PyCFunction)MediaObj_GetMediaTrack, 1,
- PyDoc_STR("() -> (Track _rv)")},
- {"GetMediaCreationTime", (PyCFunction)MediaObj_GetMediaCreationTime, 1,
- PyDoc_STR("() -> (unsigned long _rv)")},
- {"GetMediaModificationTime", (PyCFunction)MediaObj_GetMediaModificationTime, 1,
- PyDoc_STR("() -> (unsigned long _rv)")},
- {"GetMediaTimeScale", (PyCFunction)MediaObj_GetMediaTimeScale, 1,
- PyDoc_STR("() -> (TimeScale _rv)")},
- {"SetMediaTimeScale", (PyCFunction)MediaObj_SetMediaTimeScale, 1,
- PyDoc_STR("(TimeScale timeScale) -> None")},
- {"GetMediaDuration", (PyCFunction)MediaObj_GetMediaDuration, 1,
- PyDoc_STR("() -> (TimeValue _rv)")},
- {"GetMediaLanguage", (PyCFunction)MediaObj_GetMediaLanguage, 1,
- PyDoc_STR("() -> (short _rv)")},
- {"SetMediaLanguage", (PyCFunction)MediaObj_SetMediaLanguage, 1,
- PyDoc_STR("(short language) -> None")},
- {"GetMediaQuality", (PyCFunction)MediaObj_GetMediaQuality, 1,
- PyDoc_STR("() -> (short _rv)")},
- {"SetMediaQuality", (PyCFunction)MediaObj_SetMediaQuality, 1,
- PyDoc_STR("(short quality) -> None")},
- {"GetMediaHandlerDescription", (PyCFunction)MediaObj_GetMediaHandlerDescription, 1,
- PyDoc_STR("(Str255 creatorName) -> (OSType mediaType, OSType creatorManufacturer)")},
- {"GetMediaUserData", (PyCFunction)MediaObj_GetMediaUserData, 1,
- PyDoc_STR("() -> (UserData _rv)")},
- {"GetMediaHandler", (PyCFunction)MediaObj_GetMediaHandler, 1,
- PyDoc_STR("() -> (MediaHandler _rv)")},
- {"SetMediaHandler", (PyCFunction)MediaObj_SetMediaHandler, 1,
- PyDoc_STR("(MediaHandlerComponent mH) -> None")},
- {"BeginMediaEdits", (PyCFunction)MediaObj_BeginMediaEdits, 1,
- PyDoc_STR("() -> None")},
- {"EndMediaEdits", (PyCFunction)MediaObj_EndMediaEdits, 1,
- PyDoc_STR("() -> None")},
- {"SetMediaDefaultDataRefIndex", (PyCFunction)MediaObj_SetMediaDefaultDataRefIndex, 1,
- PyDoc_STR("(short index) -> None")},
- {"GetMediaDataHandlerDescription", (PyCFunction)MediaObj_GetMediaDataHandlerDescription, 1,
- PyDoc_STR("(short index, Str255 creatorName) -> (OSType dhType, OSType creatorManufacturer)")},
- {"GetMediaDataHandler", (PyCFunction)MediaObj_GetMediaDataHandler, 1,
- PyDoc_STR("(short index) -> (DataHandler _rv)")},
- {"SetMediaDataHandler", (PyCFunction)MediaObj_SetMediaDataHandler, 1,
- PyDoc_STR("(short index, DataHandlerComponent dataHandler) -> None")},
- {"GetMediaSampleDescriptionCount", (PyCFunction)MediaObj_GetMediaSampleDescriptionCount, 1,
- PyDoc_STR("() -> (long _rv)")},
- {"GetMediaSampleDescription", (PyCFunction)MediaObj_GetMediaSampleDescription, 1,
- PyDoc_STR("(long index, SampleDescriptionHandle descH) -> None")},
- {"SetMediaSampleDescription", (PyCFunction)MediaObj_SetMediaSampleDescription, 1,
- PyDoc_STR("(long index, SampleDescriptionHandle descH) -> None")},
- {"GetMediaSampleCount", (PyCFunction)MediaObj_GetMediaSampleCount, 1,
- PyDoc_STR("() -> (long _rv)")},
- {"GetMediaSyncSampleCount", (PyCFunction)MediaObj_GetMediaSyncSampleCount, 1,
- PyDoc_STR("() -> (long _rv)")},
- {"SampleNumToMediaTime", (PyCFunction)MediaObj_SampleNumToMediaTime, 1,
- PyDoc_STR("(long logicalSampleNum) -> (TimeValue sampleTime, TimeValue sampleDuration)")},
- {"MediaTimeToSampleNum", (PyCFunction)MediaObj_MediaTimeToSampleNum, 1,
- PyDoc_STR("(TimeValue time) -> (long sampleNum, TimeValue sampleTime, TimeValue sampleDuration)")},
- {"AddMediaSample", (PyCFunction)MediaObj_AddMediaSample, 1,
- PyDoc_STR("(Handle dataIn, long inOffset, unsigned long size, TimeValue durationPerSample, SampleDescriptionHandle sampleDescriptionH, long numberOfSamples, short sampleFlags) -> (TimeValue sampleTime)")},
- {"AddMediaSampleReference", (PyCFunction)MediaObj_AddMediaSampleReference, 1,
- PyDoc_STR("(long dataOffset, unsigned long size, TimeValue durationPerSample, SampleDescriptionHandle sampleDescriptionH, long numberOfSamples, short sampleFlags) -> (TimeValue sampleTime)")},
- {"GetMediaSample", (PyCFunction)MediaObj_GetMediaSample, 1,
- PyDoc_STR("(Handle dataOut, long maxSizeToGrow, TimeValue time, SampleDescriptionHandle sampleDescriptionH, long maxNumberOfSamples) -> (long size, TimeValue sampleTime, TimeValue durationPerSample, long sampleDescriptionIndex, long numberOfSamples, short sampleFlags)")},
- {"GetMediaSampleReference", (PyCFunction)MediaObj_GetMediaSampleReference, 1,
- PyDoc_STR("(TimeValue time, SampleDescriptionHandle sampleDescriptionH, long maxNumberOfSamples) -> (long dataOffset, long size, TimeValue sampleTime, TimeValue durationPerSample, long sampleDescriptionIndex, long numberOfSamples, short sampleFlags)")},
- {"SetMediaPreferredChunkSize", (PyCFunction)MediaObj_SetMediaPreferredChunkSize, 1,
- PyDoc_STR("(long maxChunkSize) -> None")},
- {"GetMediaPreferredChunkSize", (PyCFunction)MediaObj_GetMediaPreferredChunkSize, 1,
- PyDoc_STR("() -> (long maxChunkSize)")},
- {"SetMediaShadowSync", (PyCFunction)MediaObj_SetMediaShadowSync, 1,
- PyDoc_STR("(long frameDiffSampleNum, long syncSampleNum) -> None")},
- {"GetMediaShadowSync", (PyCFunction)MediaObj_GetMediaShadowSync, 1,
- PyDoc_STR("(long frameDiffSampleNum) -> (long syncSampleNum)")},
- {"GetMediaDataSize", (PyCFunction)MediaObj_GetMediaDataSize, 1,
- PyDoc_STR("(TimeValue startTime, TimeValue duration) -> (long _rv)")},
- {"GetMediaDataSize64", (PyCFunction)MediaObj_GetMediaDataSize64, 1,
- PyDoc_STR("(TimeValue startTime, TimeValue duration) -> (wide dataSize)")},
- {"CopyMediaUserData", (PyCFunction)MediaObj_CopyMediaUserData, 1,
- PyDoc_STR("(Media dstMedia, OSType copyRule) -> None")},
- {"GetMediaNextInterestingTime", (PyCFunction)MediaObj_GetMediaNextInterestingTime, 1,
- PyDoc_STR("(short interestingTimeFlags, TimeValue time, Fixed rate) -> (TimeValue interestingTime, TimeValue interestingDuration)")},
- {"GetMediaDataRef", (PyCFunction)MediaObj_GetMediaDataRef, 1,
- PyDoc_STR("(short index) -> (Handle dataRef, OSType dataRefType, long dataRefAttributes)")},
- {"SetMediaDataRef", (PyCFunction)MediaObj_SetMediaDataRef, 1,
- PyDoc_STR("(short index, Handle dataRef, OSType dataRefType) -> None")},
- {"SetMediaDataRefAttributes", (PyCFunction)MediaObj_SetMediaDataRefAttributes, 1,
- PyDoc_STR("(short index, long dataRefAttributes) -> None")},
- {"AddMediaDataRef", (PyCFunction)MediaObj_AddMediaDataRef, 1,
- PyDoc_STR("(Handle dataRef, OSType dataRefType) -> (short index)")},
- {"GetMediaDataRefCount", (PyCFunction)MediaObj_GetMediaDataRefCount, 1,
- PyDoc_STR("() -> (short count)")},
- {"SetMediaPlayHints", (PyCFunction)MediaObj_SetMediaPlayHints, 1,
- PyDoc_STR("(long flags, long flagsMask) -> None")},
- {"GetMediaPlayHints", (PyCFunction)MediaObj_GetMediaPlayHints, 1,
- PyDoc_STR("() -> (long flags)")},
- {"GetMediaNextInterestingTimeOnly", (PyCFunction)MediaObj_GetMediaNextInterestingTimeOnly, 1,
- PyDoc_STR("(short interestingTimeFlags, TimeValue time, Fixed rate) -> (TimeValue interestingTime)")},
- {NULL, NULL, 0}
+ {"LoadMediaIntoRam", (PyCFunction)MediaObj_LoadMediaIntoRam, 1,
+ PyDoc_STR("(TimeValue time, TimeValue duration, long flags) -> None")},
+ {"GetMediaTrack", (PyCFunction)MediaObj_GetMediaTrack, 1,
+ PyDoc_STR("() -> (Track _rv)")},
+ {"GetMediaCreationTime", (PyCFunction)MediaObj_GetMediaCreationTime, 1,
+ PyDoc_STR("() -> (unsigned long _rv)")},
+ {"GetMediaModificationTime", (PyCFunction)MediaObj_GetMediaModificationTime, 1,
+ PyDoc_STR("() -> (unsigned long _rv)")},
+ {"GetMediaTimeScale", (PyCFunction)MediaObj_GetMediaTimeScale, 1,
+ PyDoc_STR("() -> (TimeScale _rv)")},
+ {"SetMediaTimeScale", (PyCFunction)MediaObj_SetMediaTimeScale, 1,
+ PyDoc_STR("(TimeScale timeScale) -> None")},
+ {"GetMediaDuration", (PyCFunction)MediaObj_GetMediaDuration, 1,
+ PyDoc_STR("() -> (TimeValue _rv)")},
+ {"GetMediaLanguage", (PyCFunction)MediaObj_GetMediaLanguage, 1,
+ PyDoc_STR("() -> (short _rv)")},
+ {"SetMediaLanguage", (PyCFunction)MediaObj_SetMediaLanguage, 1,
+ PyDoc_STR("(short language) -> None")},
+ {"GetMediaQuality", (PyCFunction)MediaObj_GetMediaQuality, 1,
+ PyDoc_STR("() -> (short _rv)")},
+ {"SetMediaQuality", (PyCFunction)MediaObj_SetMediaQuality, 1,
+ PyDoc_STR("(short quality) -> None")},
+ {"GetMediaHandlerDescription", (PyCFunction)MediaObj_GetMediaHandlerDescription, 1,
+ PyDoc_STR("(Str255 creatorName) -> (OSType mediaType, OSType creatorManufacturer)")},
+ {"GetMediaUserData", (PyCFunction)MediaObj_GetMediaUserData, 1,
+ PyDoc_STR("() -> (UserData _rv)")},
+ {"GetMediaHandler", (PyCFunction)MediaObj_GetMediaHandler, 1,
+ PyDoc_STR("() -> (MediaHandler _rv)")},
+ {"SetMediaHandler", (PyCFunction)MediaObj_SetMediaHandler, 1,
+ PyDoc_STR("(MediaHandlerComponent mH) -> None")},
+ {"BeginMediaEdits", (PyCFunction)MediaObj_BeginMediaEdits, 1,
+ PyDoc_STR("() -> None")},
+ {"EndMediaEdits", (PyCFunction)MediaObj_EndMediaEdits, 1,
+ PyDoc_STR("() -> None")},
+ {"SetMediaDefaultDataRefIndex", (PyCFunction)MediaObj_SetMediaDefaultDataRefIndex, 1,
+ PyDoc_STR("(short index) -> None")},
+ {"GetMediaDataHandlerDescription", (PyCFunction)MediaObj_GetMediaDataHandlerDescription, 1,
+ PyDoc_STR("(short index, Str255 creatorName) -> (OSType dhType, OSType creatorManufacturer)")},
+ {"GetMediaDataHandler", (PyCFunction)MediaObj_GetMediaDataHandler, 1,
+ PyDoc_STR("(short index) -> (DataHandler _rv)")},
+ {"SetMediaDataHandler", (PyCFunction)MediaObj_SetMediaDataHandler, 1,
+ PyDoc_STR("(short index, DataHandlerComponent dataHandler) -> None")},
+ {"GetMediaSampleDescriptionCount", (PyCFunction)MediaObj_GetMediaSampleDescriptionCount, 1,
+ PyDoc_STR("() -> (long _rv)")},
+ {"GetMediaSampleDescription", (PyCFunction)MediaObj_GetMediaSampleDescription, 1,
+ PyDoc_STR("(long index, SampleDescriptionHandle descH) -> None")},
+ {"SetMediaSampleDescription", (PyCFunction)MediaObj_SetMediaSampleDescription, 1,
+ PyDoc_STR("(long index, SampleDescriptionHandle descH) -> None")},
+ {"GetMediaSampleCount", (PyCFunction)MediaObj_GetMediaSampleCount, 1,
+ PyDoc_STR("() -> (long _rv)")},
+ {"GetMediaSyncSampleCount", (PyCFunction)MediaObj_GetMediaSyncSampleCount, 1,
+ PyDoc_STR("() -> (long _rv)")},
+ {"SampleNumToMediaTime", (PyCFunction)MediaObj_SampleNumToMediaTime, 1,
+ PyDoc_STR("(long logicalSampleNum) -> (TimeValue sampleTime, TimeValue sampleDuration)")},
+ {"MediaTimeToSampleNum", (PyCFunction)MediaObj_MediaTimeToSampleNum, 1,
+ PyDoc_STR("(TimeValue time) -> (long sampleNum, TimeValue sampleTime, TimeValue sampleDuration)")},
+ {"AddMediaSample", (PyCFunction)MediaObj_AddMediaSample, 1,
+ PyDoc_STR("(Handle dataIn, long inOffset, unsigned long size, TimeValue durationPerSample, SampleDescriptionHandle sampleDescriptionH, long numberOfSamples, short sampleFlags) -> (TimeValue sampleTime)")},
+ {"AddMediaSampleReference", (PyCFunction)MediaObj_AddMediaSampleReference, 1,
+ PyDoc_STR("(long dataOffset, unsigned long size, TimeValue durationPerSample, SampleDescriptionHandle sampleDescriptionH, long numberOfSamples, short sampleFlags) -> (TimeValue sampleTime)")},
+ {"GetMediaSample", (PyCFunction)MediaObj_GetMediaSample, 1,
+ PyDoc_STR("(Handle dataOut, long maxSizeToGrow, TimeValue time, SampleDescriptionHandle sampleDescriptionH, long maxNumberOfSamples) -> (long size, TimeValue sampleTime, TimeValue durationPerSample, long sampleDescriptionIndex, long numberOfSamples, short sampleFlags)")},
+ {"GetMediaSampleReference", (PyCFunction)MediaObj_GetMediaSampleReference, 1,
+ PyDoc_STR("(TimeValue time, SampleDescriptionHandle sampleDescriptionH, long maxNumberOfSamples) -> (long dataOffset, long size, TimeValue sampleTime, TimeValue durationPerSample, long sampleDescriptionIndex, long numberOfSamples, short sampleFlags)")},
+ {"SetMediaPreferredChunkSize", (PyCFunction)MediaObj_SetMediaPreferredChunkSize, 1,
+ PyDoc_STR("(long maxChunkSize) -> None")},
+ {"GetMediaPreferredChunkSize", (PyCFunction)MediaObj_GetMediaPreferredChunkSize, 1,
+ PyDoc_STR("() -> (long maxChunkSize)")},
+ {"SetMediaShadowSync", (PyCFunction)MediaObj_SetMediaShadowSync, 1,
+ PyDoc_STR("(long frameDiffSampleNum, long syncSampleNum) -> None")},
+ {"GetMediaShadowSync", (PyCFunction)MediaObj_GetMediaShadowSync, 1,
+ PyDoc_STR("(long frameDiffSampleNum) -> (long syncSampleNum)")},
+ {"GetMediaDataSize", (PyCFunction)MediaObj_GetMediaDataSize, 1,
+ PyDoc_STR("(TimeValue startTime, TimeValue duration) -> (long _rv)")},
+ {"GetMediaDataSize64", (PyCFunction)MediaObj_GetMediaDataSize64, 1,
+ PyDoc_STR("(TimeValue startTime, TimeValue duration) -> (wide dataSize)")},
+ {"CopyMediaUserData", (PyCFunction)MediaObj_CopyMediaUserData, 1,
+ PyDoc_STR("(Media dstMedia, OSType copyRule) -> None")},
+ {"GetMediaNextInterestingTime", (PyCFunction)MediaObj_GetMediaNextInterestingTime, 1,
+ PyDoc_STR("(short interestingTimeFlags, TimeValue time, Fixed rate) -> (TimeValue interestingTime, TimeValue interestingDuration)")},
+ {"GetMediaDataRef", (PyCFunction)MediaObj_GetMediaDataRef, 1,
+ PyDoc_STR("(short index) -> (Handle dataRef, OSType dataRefType, long dataRefAttributes)")},
+ {"SetMediaDataRef", (PyCFunction)MediaObj_SetMediaDataRef, 1,
+ PyDoc_STR("(short index, Handle dataRef, OSType dataRefType) -> None")},
+ {"SetMediaDataRefAttributes", (PyCFunction)MediaObj_SetMediaDataRefAttributes, 1,
+ PyDoc_STR("(short index, long dataRefAttributes) -> None")},
+ {"AddMediaDataRef", (PyCFunction)MediaObj_AddMediaDataRef, 1,
+ PyDoc_STR("(Handle dataRef, OSType dataRefType) -> (short index)")},
+ {"GetMediaDataRefCount", (PyCFunction)MediaObj_GetMediaDataRefCount, 1,
+ PyDoc_STR("() -> (short count)")},
+ {"SetMediaPlayHints", (PyCFunction)MediaObj_SetMediaPlayHints, 1,
+ PyDoc_STR("(long flags, long flagsMask) -> None")},
+ {"GetMediaPlayHints", (PyCFunction)MediaObj_GetMediaPlayHints, 1,
+ PyDoc_STR("() -> (long flags)")},
+ {"GetMediaNextInterestingTimeOnly", (PyCFunction)MediaObj_GetMediaNextInterestingTimeOnly, 1,
+ PyDoc_STR("(short interestingTimeFlags, TimeValue time, Fixed rate) -> (TimeValue interestingTime)")},
+ {NULL, NULL, 0}
};
#define MediaObj_getsetlist NULL
@@ -3385,61 +3385,61 @@ static PyMethodDef MediaObj_methods[] = {
static PyObject *MediaObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
- PyObject *_self;
- Media itself;
- char *kw[] = {"itself", 0};
+ 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;
+ 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 = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
- "_Qt.Media", /*tp_name*/
- sizeof(MediaObject), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- /* methods */
- (destructor) MediaObj_dealloc, /*tp_dealloc*/
- 0, /*tp_print*/
- (getattrfunc)0, /*tp_getattr*/
- (setattrfunc)0, /*tp_setattr*/
- (cmpfunc) MediaObj_compare, /*tp_compare*/
- (reprfunc) MediaObj_repr, /*tp_repr*/
- (PyNumberMethods *)0, /* tp_as_number */
- (PySequenceMethods *)0, /* tp_as_sequence */
- (PyMappingMethods *)0, /* tp_as_mapping */
- (hashfunc) MediaObj_hash, /*tp_hash*/
- 0, /*tp_call*/
- 0, /*tp_str*/
- PyObject_GenericGetAttr, /*tp_getattro*/
- PyObject_GenericSetAttr, /*tp_setattro */
- 0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
- 0, /*tp_doc*/
- 0, /*tp_traverse*/
- 0, /*tp_clear*/
- 0, /*tp_richcompare*/
- 0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
- 0, /*tp_iternext*/
- MediaObj_methods, /* tp_methods */
- 0, /*tp_members*/
- MediaObj_getsetlist, /*tp_getset*/
- 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 */
+ PyObject_HEAD_INIT(NULL)
+ 0, /*ob_size*/
+ "_Qt.Media", /*tp_name*/
+ sizeof(MediaObject), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ /* methods */
+ (destructor) MediaObj_dealloc, /*tp_dealloc*/
+ 0, /*tp_print*/
+ (getattrfunc)0, /*tp_getattr*/
+ (setattrfunc)0, /*tp_setattr*/
+ (cmpfunc) MediaObj_compare, /*tp_compare*/
+ (reprfunc) MediaObj_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) MediaObj_hash, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ PyObject_GenericGetAttr, /*tp_getattro*/
+ PyObject_GenericSetAttr, /*tp_setattro */
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
+ 0, /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ MediaObj_methods, /* tp_methods */
+ 0, /*tp_members*/
+ MediaObj_getsetlist, /*tp_getset*/
+ 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 ---------------------- */
@@ -3452,1271 +3452,1271 @@ PyTypeObject Track_Type;
#define TrackObj_Check(x) ((x)->ob_type == &Track_Type || PyObject_TypeCheck((x), &Track_Type))
typedef struct TrackObject {
- PyObject_HEAD
- Track ob_itself;
+ PyObject_HEAD
+ Track ob_itself;
} TrackObject;
PyObject *TrackObj_New(Track itself)
{
- TrackObject *it;
- if (itself == NULL) {
- PyErr_SetString(Qt_Error,"Cannot create Track from NULL pointer");
- return NULL;
- }
- it = PyObject_NEW(TrackObject, &Track_Type);
- if (it == NULL) return NULL;
- it->ob_itself = itself;
- return (PyObject *)it;
+ TrackObject *it;
+ if (itself == NULL) {
+ PyErr_SetString(Qt_Error,"Cannot create Track from NULL pointer");
+ return NULL;
+ }
+ it = PyObject_NEW(TrackObject, &Track_Type);
+ if (it == NULL) return NULL;
+ it->ob_itself = itself;
+ return (PyObject *)it;
}
int TrackObj_Convert(PyObject *v, Track *p_itself)
{
- if (v == Py_None)
- {
- *p_itself = NULL;
- return 1;
- }
- if (!TrackObj_Check(v))
- {
- PyErr_SetString(PyExc_TypeError, "Track required");
- return 0;
- }
- *p_itself = ((TrackObject *)v)->ob_itself;
- return 1;
+ if (v == Py_None)
+ {
+ *p_itself = NULL;
+ return 1;
+ }
+ if (!TrackObj_Check(v))
+ {
+ PyErr_SetString(PyExc_TypeError, "Track required");
+ return 0;
+ }
+ *p_itself = ((TrackObject *)v)->ob_itself;
+ return 1;
}
static void TrackObj_dealloc(TrackObject *self)
{
- if (self->ob_itself) DisposeMovieTrack(self->ob_itself);
- self->ob_type->tp_free((PyObject *)self);
+ if (self->ob_itself) DisposeMovieTrack(self->ob_itself);
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *TrackObj_LoadTrackIntoRam(TrackObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- TimeValue time;
- TimeValue duration;
- long flags;
+ PyObject *_res = NULL;
+ OSErr _err;
+ TimeValue time;
+ TimeValue duration;
+ long flags;
#ifndef LoadTrackIntoRam
- PyMac_PRECHECK(LoadTrackIntoRam);
-#endif
- if (!PyArg_ParseTuple(_args, "lll",
- &time,
- &duration,
- &flags))
- return NULL;
- _err = LoadTrackIntoRam(_self->ob_itself,
- time,
- duration,
- flags);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(LoadTrackIntoRam);
+#endif
+ if (!PyArg_ParseTuple(_args, "lll",
+ &time,
+ &duration,
+ &flags))
+ return NULL;
+ _err = LoadTrackIntoRam(_self->ob_itself,
+ time,
+ duration,
+ flags);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TrackObj_GetTrackPict(TrackObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- PicHandle _rv;
- TimeValue time;
+ PyObject *_res = NULL;
+ PicHandle _rv;
+ TimeValue time;
#ifndef GetTrackPict
- PyMac_PRECHECK(GetTrackPict);
+ PyMac_PRECHECK(GetTrackPict);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &time))
- return NULL;
- _rv = GetTrackPict(_self->ob_itself,
- time);
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &time))
+ return NULL;
+ _rv = GetTrackPict(_self->ob_itself,
+ time);
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *TrackObj_GetTrackClipRgn(TrackObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RgnHandle _rv;
+ PyObject *_res = NULL;
+ RgnHandle _rv;
#ifndef GetTrackClipRgn
- PyMac_PRECHECK(GetTrackClipRgn);
+ PyMac_PRECHECK(GetTrackClipRgn);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetTrackClipRgn(_self->ob_itself);
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetTrackClipRgn(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *TrackObj_SetTrackClipRgn(TrackObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RgnHandle theClip;
+ PyObject *_res = NULL;
+ RgnHandle theClip;
#ifndef SetTrackClipRgn
- PyMac_PRECHECK(SetTrackClipRgn);
+ PyMac_PRECHECK(SetTrackClipRgn);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &theClip))
- return NULL;
- SetTrackClipRgn(_self->ob_itself,
- theClip);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &theClip))
+ return NULL;
+ SetTrackClipRgn(_self->ob_itself,
+ theClip);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TrackObj_GetTrackDisplayBoundsRgn(TrackObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RgnHandle _rv;
+ PyObject *_res = NULL;
+ RgnHandle _rv;
#ifndef GetTrackDisplayBoundsRgn
- PyMac_PRECHECK(GetTrackDisplayBoundsRgn);
+ PyMac_PRECHECK(GetTrackDisplayBoundsRgn);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetTrackDisplayBoundsRgn(_self->ob_itself);
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetTrackDisplayBoundsRgn(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *TrackObj_GetTrackMovieBoundsRgn(TrackObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RgnHandle _rv;
+ PyObject *_res = NULL;
+ RgnHandle _rv;
#ifndef GetTrackMovieBoundsRgn
- PyMac_PRECHECK(GetTrackMovieBoundsRgn);
+ PyMac_PRECHECK(GetTrackMovieBoundsRgn);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetTrackMovieBoundsRgn(_self->ob_itself);
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetTrackMovieBoundsRgn(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *TrackObj_GetTrackBoundsRgn(TrackObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RgnHandle _rv;
+ PyObject *_res = NULL;
+ RgnHandle _rv;
#ifndef GetTrackBoundsRgn
- PyMac_PRECHECK(GetTrackBoundsRgn);
+ PyMac_PRECHECK(GetTrackBoundsRgn);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetTrackBoundsRgn(_self->ob_itself);
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetTrackBoundsRgn(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *TrackObj_GetTrackMatte(TrackObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- PixMapHandle _rv;
+ PyObject *_res = NULL;
+ PixMapHandle _rv;
#ifndef GetTrackMatte
- PyMac_PRECHECK(GetTrackMatte);
+ PyMac_PRECHECK(GetTrackMatte);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetTrackMatte(_self->ob_itself);
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetTrackMatte(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *TrackObj_SetTrackMatte(TrackObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- PixMapHandle theMatte;
+ PyObject *_res = NULL;
+ PixMapHandle theMatte;
#ifndef SetTrackMatte
- PyMac_PRECHECK(SetTrackMatte);
+ PyMac_PRECHECK(SetTrackMatte);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &theMatte))
- return NULL;
- SetTrackMatte(_self->ob_itself,
- theMatte);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &theMatte))
+ return NULL;
+ SetTrackMatte(_self->ob_itself,
+ theMatte);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TrackObj_GetTrackID(TrackObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- long _rv;
+ PyObject *_res = NULL;
+ long _rv;
#ifndef GetTrackID
- PyMac_PRECHECK(GetTrackID);
+ PyMac_PRECHECK(GetTrackID);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetTrackID(_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetTrackID(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *TrackObj_GetTrackMovie(TrackObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Movie _rv;
+ PyObject *_res = NULL;
+ Movie _rv;
#ifndef GetTrackMovie
- PyMac_PRECHECK(GetTrackMovie);
+ PyMac_PRECHECK(GetTrackMovie);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetTrackMovie(_self->ob_itself);
- _res = Py_BuildValue("O&",
- MovieObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetTrackMovie(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ MovieObj_New, _rv);
+ return _res;
}
static PyObject *TrackObj_GetTrackCreationTime(TrackObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- unsigned long _rv;
+ PyObject *_res = NULL;
+ unsigned long _rv;
#ifndef GetTrackCreationTime
- PyMac_PRECHECK(GetTrackCreationTime);
+ PyMac_PRECHECK(GetTrackCreationTime);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetTrackCreationTime(_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetTrackCreationTime(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *TrackObj_GetTrackModificationTime(TrackObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- unsigned long _rv;
+ PyObject *_res = NULL;
+ unsigned long _rv;
#ifndef GetTrackModificationTime
- PyMac_PRECHECK(GetTrackModificationTime);
+ PyMac_PRECHECK(GetTrackModificationTime);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetTrackModificationTime(_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetTrackModificationTime(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *TrackObj_GetTrackEnabled(TrackObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
+ PyObject *_res = NULL;
+ Boolean _rv;
#ifndef GetTrackEnabled
- PyMac_PRECHECK(GetTrackEnabled);
+ PyMac_PRECHECK(GetTrackEnabled);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetTrackEnabled(_self->ob_itself);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetTrackEnabled(_self->ob_itself);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *TrackObj_SetTrackEnabled(TrackObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean isEnabled;
+ PyObject *_res = NULL;
+ Boolean isEnabled;
#ifndef SetTrackEnabled
- PyMac_PRECHECK(SetTrackEnabled);
+ PyMac_PRECHECK(SetTrackEnabled);
#endif
- if (!PyArg_ParseTuple(_args, "b",
- &isEnabled))
- return NULL;
- SetTrackEnabled(_self->ob_itself,
- isEnabled);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "b",
+ &isEnabled))
+ return NULL;
+ SetTrackEnabled(_self->ob_itself,
+ isEnabled);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TrackObj_GetTrackUsage(TrackObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- long _rv;
+ PyObject *_res = NULL;
+ long _rv;
#ifndef GetTrackUsage
- PyMac_PRECHECK(GetTrackUsage);
+ PyMac_PRECHECK(GetTrackUsage);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetTrackUsage(_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetTrackUsage(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *TrackObj_SetTrackUsage(TrackObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- long usage;
+ PyObject *_res = NULL;
+ long usage;
#ifndef SetTrackUsage
- PyMac_PRECHECK(SetTrackUsage);
+ PyMac_PRECHECK(SetTrackUsage);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &usage))
- return NULL;
- SetTrackUsage(_self->ob_itself,
- usage);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &usage))
+ return NULL;
+ SetTrackUsage(_self->ob_itself,
+ usage);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TrackObj_GetTrackDuration(TrackObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- TimeValue _rv;
+ PyObject *_res = NULL;
+ TimeValue _rv;
#ifndef GetTrackDuration
- PyMac_PRECHECK(GetTrackDuration);
+ PyMac_PRECHECK(GetTrackDuration);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetTrackDuration(_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetTrackDuration(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *TrackObj_GetTrackOffset(TrackObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- TimeValue _rv;
+ PyObject *_res = NULL;
+ TimeValue _rv;
#ifndef GetTrackOffset
- PyMac_PRECHECK(GetTrackOffset);
+ PyMac_PRECHECK(GetTrackOffset);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetTrackOffset(_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetTrackOffset(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *TrackObj_SetTrackOffset(TrackObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- TimeValue movieOffsetTime;
+ PyObject *_res = NULL;
+ TimeValue movieOffsetTime;
#ifndef SetTrackOffset
- PyMac_PRECHECK(SetTrackOffset);
+ PyMac_PRECHECK(SetTrackOffset);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &movieOffsetTime))
- return NULL;
- SetTrackOffset(_self->ob_itself,
- movieOffsetTime);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &movieOffsetTime))
+ return NULL;
+ SetTrackOffset(_self->ob_itself,
+ movieOffsetTime);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TrackObj_GetTrackLayer(TrackObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short _rv;
+ PyObject *_res = NULL;
+ short _rv;
#ifndef GetTrackLayer
- PyMac_PRECHECK(GetTrackLayer);
+ PyMac_PRECHECK(GetTrackLayer);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetTrackLayer(_self->ob_itself);
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetTrackLayer(_self->ob_itself);
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *TrackObj_SetTrackLayer(TrackObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short layer;
+ PyObject *_res = NULL;
+ short layer;
#ifndef SetTrackLayer
- PyMac_PRECHECK(SetTrackLayer);
+ PyMac_PRECHECK(SetTrackLayer);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &layer))
- return NULL;
- SetTrackLayer(_self->ob_itself,
- layer);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &layer))
+ return NULL;
+ SetTrackLayer(_self->ob_itself,
+ layer);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TrackObj_GetTrackAlternate(TrackObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Track _rv;
+ PyObject *_res = NULL;
+ Track _rv;
#ifndef GetTrackAlternate
- PyMac_PRECHECK(GetTrackAlternate);
+ PyMac_PRECHECK(GetTrackAlternate);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetTrackAlternate(_self->ob_itself);
- _res = Py_BuildValue("O&",
- TrackObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetTrackAlternate(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ TrackObj_New, _rv);
+ return _res;
}
static PyObject *TrackObj_SetTrackAlternate(TrackObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Track alternateT;
+ PyObject *_res = NULL;
+ Track alternateT;
#ifndef SetTrackAlternate
- PyMac_PRECHECK(SetTrackAlternate);
+ PyMac_PRECHECK(SetTrackAlternate);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- TrackObj_Convert, &alternateT))
- return NULL;
- SetTrackAlternate(_self->ob_itself,
- alternateT);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ TrackObj_Convert, &alternateT))
+ return NULL;
+ SetTrackAlternate(_self->ob_itself,
+ alternateT);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TrackObj_GetTrackVolume(TrackObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short _rv;
+ PyObject *_res = NULL;
+ short _rv;
#ifndef GetTrackVolume
- PyMac_PRECHECK(GetTrackVolume);
+ PyMac_PRECHECK(GetTrackVolume);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetTrackVolume(_self->ob_itself);
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetTrackVolume(_self->ob_itself);
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *TrackObj_SetTrackVolume(TrackObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short volume;
+ PyObject *_res = NULL;
+ short volume;
#ifndef SetTrackVolume
- PyMac_PRECHECK(SetTrackVolume);
+ PyMac_PRECHECK(SetTrackVolume);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &volume))
- return NULL;
- SetTrackVolume(_self->ob_itself,
- volume);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &volume))
+ return NULL;
+ SetTrackVolume(_self->ob_itself,
+ volume);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TrackObj_GetTrackDimensions(TrackObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Fixed width;
- Fixed height;
+ PyObject *_res = NULL;
+ Fixed width;
+ Fixed height;
#ifndef GetTrackDimensions
- PyMac_PRECHECK(GetTrackDimensions);
+ PyMac_PRECHECK(GetTrackDimensions);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- GetTrackDimensions(_self->ob_itself,
- &width,
- &height);
- _res = Py_BuildValue("O&O&",
- PyMac_BuildFixed, width,
- PyMac_BuildFixed, height);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ GetTrackDimensions(_self->ob_itself,
+ &width,
+ &height);
+ _res = Py_BuildValue("O&O&",
+ PyMac_BuildFixed, width,
+ PyMac_BuildFixed, height);
+ return _res;
}
static PyObject *TrackObj_SetTrackDimensions(TrackObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Fixed width;
- Fixed height;
+ PyObject *_res = NULL;
+ Fixed width;
+ Fixed height;
#ifndef SetTrackDimensions
- PyMac_PRECHECK(SetTrackDimensions);
+ PyMac_PRECHECK(SetTrackDimensions);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- PyMac_GetFixed, &width,
- PyMac_GetFixed, &height))
- return NULL;
- SetTrackDimensions(_self->ob_itself,
- width,
- height);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ PyMac_GetFixed, &width,
+ PyMac_GetFixed, &height))
+ return NULL;
+ SetTrackDimensions(_self->ob_itself,
+ width,
+ height);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TrackObj_GetTrackUserData(TrackObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- UserData _rv;
+ PyObject *_res = NULL;
+ UserData _rv;
#ifndef GetTrackUserData
- PyMac_PRECHECK(GetTrackUserData);
+ PyMac_PRECHECK(GetTrackUserData);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetTrackUserData(_self->ob_itself);
- _res = Py_BuildValue("O&",
- UserDataObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetTrackUserData(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ UserDataObj_New, _rv);
+ return _res;
}
static PyObject *TrackObj_GetTrackSoundLocalizationSettings(TrackObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Handle settings;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Handle settings;
#ifndef GetTrackSoundLocalizationSettings
- PyMac_PRECHECK(GetTrackSoundLocalizationSettings);
+ PyMac_PRECHECK(GetTrackSoundLocalizationSettings);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetTrackSoundLocalizationSettings(_self->ob_itself,
- &settings);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- ResObj_New, settings);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetTrackSoundLocalizationSettings(_self->ob_itself,
+ &settings);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ ResObj_New, settings);
+ return _res;
}
static PyObject *TrackObj_SetTrackSoundLocalizationSettings(TrackObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Handle settings;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Handle settings;
#ifndef SetTrackSoundLocalizationSettings
- PyMac_PRECHECK(SetTrackSoundLocalizationSettings);
+ PyMac_PRECHECK(SetTrackSoundLocalizationSettings);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &settings))
- return NULL;
- _err = SetTrackSoundLocalizationSettings(_self->ob_itself,
- settings);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &settings))
+ return NULL;
+ _err = SetTrackSoundLocalizationSettings(_self->ob_itself,
+ settings);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TrackObj_NewTrackMedia(TrackObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Media _rv;
- OSType mediaType;
- TimeScale timeScale;
- Handle dataRef;
- OSType dataRefType;
+ PyObject *_res = NULL;
+ Media _rv;
+ OSType mediaType;
+ TimeScale timeScale;
+ Handle dataRef;
+ OSType dataRefType;
#ifndef NewTrackMedia
- PyMac_PRECHECK(NewTrackMedia);
-#endif
- if (!PyArg_ParseTuple(_args, "O&lO&O&",
- PyMac_GetOSType, &mediaType,
- &timeScale,
- ResObj_Convert, &dataRef,
- PyMac_GetOSType, &dataRefType))
- return NULL;
- _rv = NewTrackMedia(_self->ob_itself,
- mediaType,
- timeScale,
- dataRef,
- dataRefType);
- _res = Py_BuildValue("O&",
- MediaObj_New, _rv);
- return _res;
+ PyMac_PRECHECK(NewTrackMedia);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&lO&O&",
+ PyMac_GetOSType, &mediaType,
+ &timeScale,
+ ResObj_Convert, &dataRef,
+ PyMac_GetOSType, &dataRefType))
+ return NULL;
+ _rv = NewTrackMedia(_self->ob_itself,
+ mediaType,
+ timeScale,
+ dataRef,
+ dataRefType);
+ _res = Py_BuildValue("O&",
+ MediaObj_New, _rv);
+ return _res;
}
static PyObject *TrackObj_GetTrackMedia(TrackObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Media _rv;
+ PyObject *_res = NULL;
+ Media _rv;
#ifndef GetTrackMedia
- PyMac_PRECHECK(GetTrackMedia);
+ PyMac_PRECHECK(GetTrackMedia);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetTrackMedia(_self->ob_itself);
- _res = Py_BuildValue("O&",
- MediaObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetTrackMedia(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ MediaObj_New, _rv);
+ return _res;
}
static PyObject *TrackObj_InsertMediaIntoTrack(TrackObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- TimeValue trackStart;
- TimeValue mediaTime;
- TimeValue mediaDuration;
- Fixed mediaRate;
+ PyObject *_res = NULL;
+ OSErr _err;
+ TimeValue trackStart;
+ TimeValue mediaTime;
+ TimeValue mediaDuration;
+ Fixed mediaRate;
#ifndef InsertMediaIntoTrack
- PyMac_PRECHECK(InsertMediaIntoTrack);
-#endif
- if (!PyArg_ParseTuple(_args, "lllO&",
- &trackStart,
- &mediaTime,
- &mediaDuration,
- PyMac_GetFixed, &mediaRate))
- return NULL;
- _err = InsertMediaIntoTrack(_self->ob_itself,
- trackStart,
- mediaTime,
- mediaDuration,
- mediaRate);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(InsertMediaIntoTrack);
+#endif
+ if (!PyArg_ParseTuple(_args, "lllO&",
+ &trackStart,
+ &mediaTime,
+ &mediaDuration,
+ PyMac_GetFixed, &mediaRate))
+ return NULL;
+ _err = InsertMediaIntoTrack(_self->ob_itself,
+ trackStart,
+ mediaTime,
+ mediaDuration,
+ mediaRate);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TrackObj_InsertTrackSegment(TrackObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Track dstTrack;
- TimeValue srcIn;
- TimeValue srcDuration;
- TimeValue dstIn;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Track dstTrack;
+ TimeValue srcIn;
+ TimeValue srcDuration;
+ TimeValue dstIn;
#ifndef InsertTrackSegment
- PyMac_PRECHECK(InsertTrackSegment);
-#endif
- if (!PyArg_ParseTuple(_args, "O&lll",
- TrackObj_Convert, &dstTrack,
- &srcIn,
- &srcDuration,
- &dstIn))
- return NULL;
- _err = InsertTrackSegment(_self->ob_itself,
- dstTrack,
- srcIn,
- srcDuration,
- dstIn);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(InsertTrackSegment);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&lll",
+ TrackObj_Convert, &dstTrack,
+ &srcIn,
+ &srcDuration,
+ &dstIn))
+ return NULL;
+ _err = InsertTrackSegment(_self->ob_itself,
+ dstTrack,
+ srcIn,
+ srcDuration,
+ dstIn);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TrackObj_InsertEmptyTrackSegment(TrackObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- TimeValue dstIn;
- TimeValue dstDuration;
+ PyObject *_res = NULL;
+ OSErr _err;
+ TimeValue dstIn;
+ TimeValue dstDuration;
#ifndef InsertEmptyTrackSegment
- PyMac_PRECHECK(InsertEmptyTrackSegment);
+ PyMac_PRECHECK(InsertEmptyTrackSegment);
#endif
- if (!PyArg_ParseTuple(_args, "ll",
- &dstIn,
- &dstDuration))
- return NULL;
- _err = InsertEmptyTrackSegment(_self->ob_itself,
- dstIn,
- dstDuration);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "ll",
+ &dstIn,
+ &dstDuration))
+ return NULL;
+ _err = InsertEmptyTrackSegment(_self->ob_itself,
+ dstIn,
+ dstDuration);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TrackObj_DeleteTrackSegment(TrackObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- TimeValue startTime;
- TimeValue duration;
+ PyObject *_res = NULL;
+ OSErr _err;
+ TimeValue startTime;
+ TimeValue duration;
#ifndef DeleteTrackSegment
- PyMac_PRECHECK(DeleteTrackSegment);
+ PyMac_PRECHECK(DeleteTrackSegment);
#endif
- if (!PyArg_ParseTuple(_args, "ll",
- &startTime,
- &duration))
- return NULL;
- _err = DeleteTrackSegment(_self->ob_itself,
- startTime,
- duration);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "ll",
+ &startTime,
+ &duration))
+ return NULL;
+ _err = DeleteTrackSegment(_self->ob_itself,
+ startTime,
+ duration);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TrackObj_ScaleTrackSegment(TrackObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- TimeValue startTime;
- TimeValue oldDuration;
- TimeValue newDuration;
+ PyObject *_res = NULL;
+ OSErr _err;
+ TimeValue startTime;
+ TimeValue oldDuration;
+ TimeValue newDuration;
#ifndef ScaleTrackSegment
- PyMac_PRECHECK(ScaleTrackSegment);
-#endif
- if (!PyArg_ParseTuple(_args, "lll",
- &startTime,
- &oldDuration,
- &newDuration))
- return NULL;
- _err = ScaleTrackSegment(_self->ob_itself,
- startTime,
- oldDuration,
- newDuration);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(ScaleTrackSegment);
+#endif
+ if (!PyArg_ParseTuple(_args, "lll",
+ &startTime,
+ &oldDuration,
+ &newDuration))
+ return NULL;
+ _err = ScaleTrackSegment(_self->ob_itself,
+ startTime,
+ oldDuration,
+ newDuration);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TrackObj_IsScrapMovie(TrackObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Component _rv;
+ PyObject *_res = NULL;
+ Component _rv;
#ifndef IsScrapMovie
- PyMac_PRECHECK(IsScrapMovie);
+ PyMac_PRECHECK(IsScrapMovie);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = IsScrapMovie(_self->ob_itself);
- _res = Py_BuildValue("O&",
- CmpObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = IsScrapMovie(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ CmpObj_New, _rv);
+ return _res;
}
static PyObject *TrackObj_CopyTrackSettings(TrackObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Track dstTrack;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Track dstTrack;
#ifndef CopyTrackSettings
- PyMac_PRECHECK(CopyTrackSettings);
+ PyMac_PRECHECK(CopyTrackSettings);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- TrackObj_Convert, &dstTrack))
- return NULL;
- _err = CopyTrackSettings(_self->ob_itself,
- dstTrack);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ TrackObj_Convert, &dstTrack))
+ return NULL;
+ _err = CopyTrackSettings(_self->ob_itself,
+ dstTrack);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TrackObj_AddEmptyTrackToMovie(TrackObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Movie dstMovie;
- Handle dataRef;
- OSType dataRefType;
- Track dstTrack;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Movie dstMovie;
+ Handle dataRef;
+ OSType dataRefType;
+ Track dstTrack;
#ifndef AddEmptyTrackToMovie
- PyMac_PRECHECK(AddEmptyTrackToMovie);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- MovieObj_Convert, &dstMovie,
- ResObj_Convert, &dataRef,
- PyMac_GetOSType, &dataRefType))
- return NULL;
- _err = AddEmptyTrackToMovie(_self->ob_itself,
- dstMovie,
- dataRef,
- dataRefType,
- &dstTrack);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- TrackObj_New, dstTrack);
- return _res;
+ PyMac_PRECHECK(AddEmptyTrackToMovie);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ MovieObj_Convert, &dstMovie,
+ ResObj_Convert, &dataRef,
+ PyMac_GetOSType, &dataRefType))
+ return NULL;
+ _err = AddEmptyTrackToMovie(_self->ob_itself,
+ dstMovie,
+ dataRef,
+ dataRefType,
+ &dstTrack);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ TrackObj_New, dstTrack);
+ return _res;
}
static PyObject *TrackObj_AddClonedTrackToMovie(TrackObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Movie dstMovie;
- long flags;
- Track dstTrack;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Movie dstMovie;
+ long flags;
+ Track dstTrack;
#ifndef AddClonedTrackToMovie
- PyMac_PRECHECK(AddClonedTrackToMovie);
-#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- MovieObj_Convert, &dstMovie,
- &flags))
- return NULL;
- _err = AddClonedTrackToMovie(_self->ob_itself,
- dstMovie,
- flags,
- &dstTrack);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- TrackObj_New, dstTrack);
- return _res;
+ PyMac_PRECHECK(AddClonedTrackToMovie);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&l",
+ MovieObj_Convert, &dstMovie,
+ &flags))
+ return NULL;
+ _err = AddClonedTrackToMovie(_self->ob_itself,
+ dstMovie,
+ flags,
+ &dstTrack);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ TrackObj_New, dstTrack);
+ return _res;
}
static PyObject *TrackObj_AddTrackReference(TrackObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Track refTrack;
- OSType refType;
- long addedIndex;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Track refTrack;
+ OSType refType;
+ long addedIndex;
#ifndef AddTrackReference
- PyMac_PRECHECK(AddTrackReference);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- TrackObj_Convert, &refTrack,
- PyMac_GetOSType, &refType))
- return NULL;
- _err = AddTrackReference(_self->ob_itself,
- refTrack,
- refType,
- &addedIndex);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- addedIndex);
- return _res;
+ PyMac_PRECHECK(AddTrackReference);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ TrackObj_Convert, &refTrack,
+ PyMac_GetOSType, &refType))
+ return NULL;
+ _err = AddTrackReference(_self->ob_itself,
+ refTrack,
+ refType,
+ &addedIndex);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ addedIndex);
+ return _res;
}
static PyObject *TrackObj_DeleteTrackReference(TrackObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- OSType refType;
- long index;
+ PyObject *_res = NULL;
+ OSErr _err;
+ OSType refType;
+ long index;
#ifndef DeleteTrackReference
- PyMac_PRECHECK(DeleteTrackReference);
+ PyMac_PRECHECK(DeleteTrackReference);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- PyMac_GetOSType, &refType,
- &index))
- return NULL;
- _err = DeleteTrackReference(_self->ob_itself,
- refType,
- index);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ PyMac_GetOSType, &refType,
+ &index))
+ return NULL;
+ _err = DeleteTrackReference(_self->ob_itself,
+ refType,
+ index);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TrackObj_SetTrackReference(TrackObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Track refTrack;
- OSType refType;
- long index;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Track refTrack;
+ OSType refType;
+ long index;
#ifndef SetTrackReference
- PyMac_PRECHECK(SetTrackReference);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&l",
- TrackObj_Convert, &refTrack,
- PyMac_GetOSType, &refType,
- &index))
- return NULL;
- _err = SetTrackReference(_self->ob_itself,
- refTrack,
- refType,
- index);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(SetTrackReference);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&l",
+ TrackObj_Convert, &refTrack,
+ PyMac_GetOSType, &refType,
+ &index))
+ return NULL;
+ _err = SetTrackReference(_self->ob_itself,
+ refTrack,
+ refType,
+ index);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TrackObj_GetTrackReference(TrackObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Track _rv;
- OSType refType;
- long index;
+ PyObject *_res = NULL;
+ Track _rv;
+ OSType refType;
+ long index;
#ifndef GetTrackReference
- PyMac_PRECHECK(GetTrackReference);
+ PyMac_PRECHECK(GetTrackReference);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- PyMac_GetOSType, &refType,
- &index))
- return NULL;
- _rv = GetTrackReference(_self->ob_itself,
- refType,
- index);
- _res = Py_BuildValue("O&",
- TrackObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ PyMac_GetOSType, &refType,
+ &index))
+ return NULL;
+ _rv = GetTrackReference(_self->ob_itself,
+ refType,
+ index);
+ _res = Py_BuildValue("O&",
+ TrackObj_New, _rv);
+ return _res;
}
static PyObject *TrackObj_GetNextTrackReferenceType(TrackObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSType _rv;
- OSType refType;
+ PyObject *_res = NULL;
+ OSType _rv;
+ OSType refType;
#ifndef GetNextTrackReferenceType
- PyMac_PRECHECK(GetNextTrackReferenceType);
+ PyMac_PRECHECK(GetNextTrackReferenceType);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetOSType, &refType))
- return NULL;
- _rv = GetNextTrackReferenceType(_self->ob_itself,
- refType);
- _res = Py_BuildValue("O&",
- PyMac_BuildOSType, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetOSType, &refType))
+ return NULL;
+ _rv = GetNextTrackReferenceType(_self->ob_itself,
+ refType);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildOSType, _rv);
+ return _res;
}
static PyObject *TrackObj_GetTrackReferenceCount(TrackObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- long _rv;
- OSType refType;
+ PyObject *_res = NULL;
+ long _rv;
+ OSType refType;
#ifndef GetTrackReferenceCount
- PyMac_PRECHECK(GetTrackReferenceCount);
+ PyMac_PRECHECK(GetTrackReferenceCount);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetOSType, &refType))
- return NULL;
- _rv = GetTrackReferenceCount(_self->ob_itself,
- refType);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetOSType, &refType))
+ return NULL;
+ _rv = GetTrackReferenceCount(_self->ob_itself,
+ refType);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *TrackObj_GetTrackEditRate(TrackObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Fixed _rv;
- TimeValue atTime;
+ PyObject *_res = NULL;
+ Fixed _rv;
+ TimeValue atTime;
#ifndef GetTrackEditRate
- PyMac_PRECHECK(GetTrackEditRate);
+ PyMac_PRECHECK(GetTrackEditRate);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &atTime))
- return NULL;
- _rv = GetTrackEditRate(_self->ob_itself,
- atTime);
- _res = Py_BuildValue("O&",
- PyMac_BuildFixed, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &atTime))
+ return NULL;
+ _rv = GetTrackEditRate(_self->ob_itself,
+ atTime);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildFixed, _rv);
+ return _res;
}
static PyObject *TrackObj_GetTrackDataSize(TrackObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- long _rv;
- TimeValue startTime;
- TimeValue duration;
+ PyObject *_res = NULL;
+ long _rv;
+ TimeValue startTime;
+ TimeValue duration;
#ifndef GetTrackDataSize
- PyMac_PRECHECK(GetTrackDataSize);
+ PyMac_PRECHECK(GetTrackDataSize);
#endif
- if (!PyArg_ParseTuple(_args, "ll",
- &startTime,
- &duration))
- return NULL;
- _rv = GetTrackDataSize(_self->ob_itself,
- startTime,
- duration);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "ll",
+ &startTime,
+ &duration))
+ return NULL;
+ _rv = GetTrackDataSize(_self->ob_itself,
+ startTime,
+ duration);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *TrackObj_GetTrackDataSize64(TrackObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- TimeValue startTime;
- TimeValue duration;
- wide dataSize;
+ PyObject *_res = NULL;
+ OSErr _err;
+ TimeValue startTime;
+ TimeValue duration;
+ wide dataSize;
#ifndef GetTrackDataSize64
- PyMac_PRECHECK(GetTrackDataSize64);
-#endif
- if (!PyArg_ParseTuple(_args, "ll",
- &startTime,
- &duration))
- return NULL;
- _err = GetTrackDataSize64(_self->ob_itself,
- startTime,
- duration,
- &dataSize);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- PyMac_Buildwide, dataSize);
- return _res;
+ PyMac_PRECHECK(GetTrackDataSize64);
+#endif
+ if (!PyArg_ParseTuple(_args, "ll",
+ &startTime,
+ &duration))
+ return NULL;
+ _err = GetTrackDataSize64(_self->ob_itself,
+ startTime,
+ duration,
+ &dataSize);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ PyMac_Buildwide, dataSize);
+ return _res;
}
static PyObject *TrackObj_PtInTrack(TrackObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- Point pt;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ Point pt;
#ifndef PtInTrack
- PyMac_PRECHECK(PtInTrack);
+ PyMac_PRECHECK(PtInTrack);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetPoint, &pt))
- return NULL;
- _rv = PtInTrack(_self->ob_itself,
- pt);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetPoint, &pt))
+ return NULL;
+ _rv = PtInTrack(_self->ob_itself,
+ pt);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *TrackObj_CopyTrackUserData(TrackObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Track dstTrack;
- OSType copyRule;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Track dstTrack;
+ OSType copyRule;
#ifndef CopyTrackUserData
- PyMac_PRECHECK(CopyTrackUserData);
+ PyMac_PRECHECK(CopyTrackUserData);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- TrackObj_Convert, &dstTrack,
- PyMac_GetOSType, &copyRule))
- return NULL;
- _err = CopyTrackUserData(_self->ob_itself,
- dstTrack,
- copyRule);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ TrackObj_Convert, &dstTrack,
+ PyMac_GetOSType, &copyRule))
+ return NULL;
+ _err = CopyTrackUserData(_self->ob_itself,
+ dstTrack,
+ copyRule);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TrackObj_GetTrackNextInterestingTime(TrackObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short interestingTimeFlags;
- TimeValue time;
- Fixed rate;
- TimeValue interestingTime;
- TimeValue interestingDuration;
+ PyObject *_res = NULL;
+ short interestingTimeFlags;
+ TimeValue time;
+ Fixed rate;
+ TimeValue interestingTime;
+ TimeValue interestingDuration;
#ifndef GetTrackNextInterestingTime
- PyMac_PRECHECK(GetTrackNextInterestingTime);
-#endif
- if (!PyArg_ParseTuple(_args, "hlO&",
- &interestingTimeFlags,
- &time,
- PyMac_GetFixed, &rate))
- return NULL;
- GetTrackNextInterestingTime(_self->ob_itself,
- interestingTimeFlags,
- time,
- rate,
- &interestingTime,
- &interestingDuration);
- _res = Py_BuildValue("ll",
- interestingTime,
- interestingDuration);
- return _res;
+ PyMac_PRECHECK(GetTrackNextInterestingTime);
+#endif
+ if (!PyArg_ParseTuple(_args, "hlO&",
+ &interestingTimeFlags,
+ &time,
+ PyMac_GetFixed, &rate))
+ return NULL;
+ GetTrackNextInterestingTime(_self->ob_itself,
+ interestingTimeFlags,
+ time,
+ rate,
+ &interestingTime,
+ &interestingDuration);
+ _res = Py_BuildValue("ll",
+ interestingTime,
+ interestingDuration);
+ return _res;
}
static PyObject *TrackObj_GetTrackSegmentDisplayBoundsRgn(TrackObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RgnHandle _rv;
- TimeValue time;
- TimeValue duration;
+ PyObject *_res = NULL;
+ RgnHandle _rv;
+ TimeValue time;
+ TimeValue duration;
#ifndef GetTrackSegmentDisplayBoundsRgn
- PyMac_PRECHECK(GetTrackSegmentDisplayBoundsRgn);
+ PyMac_PRECHECK(GetTrackSegmentDisplayBoundsRgn);
#endif
- if (!PyArg_ParseTuple(_args, "ll",
- &time,
- &duration))
- return NULL;
- _rv = GetTrackSegmentDisplayBoundsRgn(_self->ob_itself,
- time,
- duration);
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "ll",
+ &time,
+ &duration))
+ return NULL;
+ _rv = GetTrackSegmentDisplayBoundsRgn(_self->ob_itself,
+ time,
+ duration);
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *TrackObj_GetTrackStatus(TrackObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
#ifndef GetTrackStatus
- PyMac_PRECHECK(GetTrackStatus);
+ PyMac_PRECHECK(GetTrackStatus);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetTrackStatus(_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetTrackStatus(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *TrackObj_SetTrackLoadSettings(TrackObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- TimeValue preloadTime;
- TimeValue preloadDuration;
- long preloadFlags;
- long defaultHints;
+ PyObject *_res = NULL;
+ TimeValue preloadTime;
+ TimeValue preloadDuration;
+ long preloadFlags;
+ long defaultHints;
#ifndef SetTrackLoadSettings
- PyMac_PRECHECK(SetTrackLoadSettings);
-#endif
- if (!PyArg_ParseTuple(_args, "llll",
- &preloadTime,
- &preloadDuration,
- &preloadFlags,
- &defaultHints))
- return NULL;
- SetTrackLoadSettings(_self->ob_itself,
- preloadTime,
- preloadDuration,
- preloadFlags,
- defaultHints);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(SetTrackLoadSettings);
+#endif
+ if (!PyArg_ParseTuple(_args, "llll",
+ &preloadTime,
+ &preloadDuration,
+ &preloadFlags,
+ &defaultHints))
+ return NULL;
+ SetTrackLoadSettings(_self->ob_itself,
+ preloadTime,
+ preloadDuration,
+ preloadFlags,
+ defaultHints);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TrackObj_GetTrackLoadSettings(TrackObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- TimeValue preloadTime;
- TimeValue preloadDuration;
- long preloadFlags;
- long defaultHints;
+ PyObject *_res = NULL;
+ TimeValue preloadTime;
+ TimeValue preloadDuration;
+ long preloadFlags;
+ long defaultHints;
#ifndef GetTrackLoadSettings
- PyMac_PRECHECK(GetTrackLoadSettings);
-#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- GetTrackLoadSettings(_self->ob_itself,
- &preloadTime,
- &preloadDuration,
- &preloadFlags,
- &defaultHints);
- _res = Py_BuildValue("llll",
- preloadTime,
- preloadDuration,
- preloadFlags,
- defaultHints);
- return _res;
+ PyMac_PRECHECK(GetTrackLoadSettings);
+#endif
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ GetTrackLoadSettings(_self->ob_itself,
+ &preloadTime,
+ &preloadDuration,
+ &preloadFlags,
+ &defaultHints);
+ _res = Py_BuildValue("llll",
+ preloadTime,
+ preloadDuration,
+ preloadFlags,
+ defaultHints);
+ return _res;
}
static PyMethodDef TrackObj_methods[] = {
- {"LoadTrackIntoRam", (PyCFunction)TrackObj_LoadTrackIntoRam, 1,
- PyDoc_STR("(TimeValue time, TimeValue duration, long flags) -> None")},
- {"GetTrackPict", (PyCFunction)TrackObj_GetTrackPict, 1,
- PyDoc_STR("(TimeValue time) -> (PicHandle _rv)")},
- {"GetTrackClipRgn", (PyCFunction)TrackObj_GetTrackClipRgn, 1,
- PyDoc_STR("() -> (RgnHandle _rv)")},
- {"SetTrackClipRgn", (PyCFunction)TrackObj_SetTrackClipRgn, 1,
- PyDoc_STR("(RgnHandle theClip) -> None")},
- {"GetTrackDisplayBoundsRgn", (PyCFunction)TrackObj_GetTrackDisplayBoundsRgn, 1,
- PyDoc_STR("() -> (RgnHandle _rv)")},
- {"GetTrackMovieBoundsRgn", (PyCFunction)TrackObj_GetTrackMovieBoundsRgn, 1,
- PyDoc_STR("() -> (RgnHandle _rv)")},
- {"GetTrackBoundsRgn", (PyCFunction)TrackObj_GetTrackBoundsRgn, 1,
- PyDoc_STR("() -> (RgnHandle _rv)")},
- {"GetTrackMatte", (PyCFunction)TrackObj_GetTrackMatte, 1,
- PyDoc_STR("() -> (PixMapHandle _rv)")},
- {"SetTrackMatte", (PyCFunction)TrackObj_SetTrackMatte, 1,
- PyDoc_STR("(PixMapHandle theMatte) -> None")},
- {"GetTrackID", (PyCFunction)TrackObj_GetTrackID, 1,
- PyDoc_STR("() -> (long _rv)")},
- {"GetTrackMovie", (PyCFunction)TrackObj_GetTrackMovie, 1,
- PyDoc_STR("() -> (Movie _rv)")},
- {"GetTrackCreationTime", (PyCFunction)TrackObj_GetTrackCreationTime, 1,
- PyDoc_STR("() -> (unsigned long _rv)")},
- {"GetTrackModificationTime", (PyCFunction)TrackObj_GetTrackModificationTime, 1,
- PyDoc_STR("() -> (unsigned long _rv)")},
- {"GetTrackEnabled", (PyCFunction)TrackObj_GetTrackEnabled, 1,
- PyDoc_STR("() -> (Boolean _rv)")},
- {"SetTrackEnabled", (PyCFunction)TrackObj_SetTrackEnabled, 1,
- PyDoc_STR("(Boolean isEnabled) -> None")},
- {"GetTrackUsage", (PyCFunction)TrackObj_GetTrackUsage, 1,
- PyDoc_STR("() -> (long _rv)")},
- {"SetTrackUsage", (PyCFunction)TrackObj_SetTrackUsage, 1,
- PyDoc_STR("(long usage) -> None")},
- {"GetTrackDuration", (PyCFunction)TrackObj_GetTrackDuration, 1,
- PyDoc_STR("() -> (TimeValue _rv)")},
- {"GetTrackOffset", (PyCFunction)TrackObj_GetTrackOffset, 1,
- PyDoc_STR("() -> (TimeValue _rv)")},
- {"SetTrackOffset", (PyCFunction)TrackObj_SetTrackOffset, 1,
- PyDoc_STR("(TimeValue movieOffsetTime) -> None")},
- {"GetTrackLayer", (PyCFunction)TrackObj_GetTrackLayer, 1,
- PyDoc_STR("() -> (short _rv)")},
- {"SetTrackLayer", (PyCFunction)TrackObj_SetTrackLayer, 1,
- PyDoc_STR("(short layer) -> None")},
- {"GetTrackAlternate", (PyCFunction)TrackObj_GetTrackAlternate, 1,
- PyDoc_STR("() -> (Track _rv)")},
- {"SetTrackAlternate", (PyCFunction)TrackObj_SetTrackAlternate, 1,
- PyDoc_STR("(Track alternateT) -> None")},
- {"GetTrackVolume", (PyCFunction)TrackObj_GetTrackVolume, 1,
- PyDoc_STR("() -> (short _rv)")},
- {"SetTrackVolume", (PyCFunction)TrackObj_SetTrackVolume, 1,
- PyDoc_STR("(short volume) -> None")},
- {"GetTrackDimensions", (PyCFunction)TrackObj_GetTrackDimensions, 1,
- PyDoc_STR("() -> (Fixed width, Fixed height)")},
- {"SetTrackDimensions", (PyCFunction)TrackObj_SetTrackDimensions, 1,
- PyDoc_STR("(Fixed width, Fixed height) -> None")},
- {"GetTrackUserData", (PyCFunction)TrackObj_GetTrackUserData, 1,
- PyDoc_STR("() -> (UserData _rv)")},
- {"GetTrackSoundLocalizationSettings", (PyCFunction)TrackObj_GetTrackSoundLocalizationSettings, 1,
- PyDoc_STR("() -> (Handle settings)")},
- {"SetTrackSoundLocalizationSettings", (PyCFunction)TrackObj_SetTrackSoundLocalizationSettings, 1,
- PyDoc_STR("(Handle settings) -> None")},
- {"NewTrackMedia", (PyCFunction)TrackObj_NewTrackMedia, 1,
- PyDoc_STR("(OSType mediaType, TimeScale timeScale, Handle dataRef, OSType dataRefType) -> (Media _rv)")},
- {"GetTrackMedia", (PyCFunction)TrackObj_GetTrackMedia, 1,
- PyDoc_STR("() -> (Media _rv)")},
- {"InsertMediaIntoTrack", (PyCFunction)TrackObj_InsertMediaIntoTrack, 1,
- PyDoc_STR("(TimeValue trackStart, TimeValue mediaTime, TimeValue mediaDuration, Fixed mediaRate) -> None")},
- {"InsertTrackSegment", (PyCFunction)TrackObj_InsertTrackSegment, 1,
- PyDoc_STR("(Track dstTrack, TimeValue srcIn, TimeValue srcDuration, TimeValue dstIn) -> None")},
- {"InsertEmptyTrackSegment", (PyCFunction)TrackObj_InsertEmptyTrackSegment, 1,
- PyDoc_STR("(TimeValue dstIn, TimeValue dstDuration) -> None")},
- {"DeleteTrackSegment", (PyCFunction)TrackObj_DeleteTrackSegment, 1,
- PyDoc_STR("(TimeValue startTime, TimeValue duration) -> None")},
- {"ScaleTrackSegment", (PyCFunction)TrackObj_ScaleTrackSegment, 1,
- PyDoc_STR("(TimeValue startTime, TimeValue oldDuration, TimeValue newDuration) -> None")},
- {"IsScrapMovie", (PyCFunction)TrackObj_IsScrapMovie, 1,
- PyDoc_STR("() -> (Component _rv)")},
- {"CopyTrackSettings", (PyCFunction)TrackObj_CopyTrackSettings, 1,
- PyDoc_STR("(Track dstTrack) -> None")},
- {"AddEmptyTrackToMovie", (PyCFunction)TrackObj_AddEmptyTrackToMovie, 1,
- PyDoc_STR("(Movie dstMovie, Handle dataRef, OSType dataRefType) -> (Track dstTrack)")},
- {"AddClonedTrackToMovie", (PyCFunction)TrackObj_AddClonedTrackToMovie, 1,
- PyDoc_STR("(Movie dstMovie, long flags) -> (Track dstTrack)")},
- {"AddTrackReference", (PyCFunction)TrackObj_AddTrackReference, 1,
- PyDoc_STR("(Track refTrack, OSType refType) -> (long addedIndex)")},
- {"DeleteTrackReference", (PyCFunction)TrackObj_DeleteTrackReference, 1,
- PyDoc_STR("(OSType refType, long index) -> None")},
- {"SetTrackReference", (PyCFunction)TrackObj_SetTrackReference, 1,
- PyDoc_STR("(Track refTrack, OSType refType, long index) -> None")},
- {"GetTrackReference", (PyCFunction)TrackObj_GetTrackReference, 1,
- PyDoc_STR("(OSType refType, long index) -> (Track _rv)")},
- {"GetNextTrackReferenceType", (PyCFunction)TrackObj_GetNextTrackReferenceType, 1,
- PyDoc_STR("(OSType refType) -> (OSType _rv)")},
- {"GetTrackReferenceCount", (PyCFunction)TrackObj_GetTrackReferenceCount, 1,
- PyDoc_STR("(OSType refType) -> (long _rv)")},
- {"GetTrackEditRate", (PyCFunction)TrackObj_GetTrackEditRate, 1,
- PyDoc_STR("(TimeValue atTime) -> (Fixed _rv)")},
- {"GetTrackDataSize", (PyCFunction)TrackObj_GetTrackDataSize, 1,
- PyDoc_STR("(TimeValue startTime, TimeValue duration) -> (long _rv)")},
- {"GetTrackDataSize64", (PyCFunction)TrackObj_GetTrackDataSize64, 1,
- PyDoc_STR("(TimeValue startTime, TimeValue duration) -> (wide dataSize)")},
- {"PtInTrack", (PyCFunction)TrackObj_PtInTrack, 1,
- PyDoc_STR("(Point pt) -> (Boolean _rv)")},
- {"CopyTrackUserData", (PyCFunction)TrackObj_CopyTrackUserData, 1,
- PyDoc_STR("(Track dstTrack, OSType copyRule) -> None")},
- {"GetTrackNextInterestingTime", (PyCFunction)TrackObj_GetTrackNextInterestingTime, 1,
- PyDoc_STR("(short interestingTimeFlags, TimeValue time, Fixed rate) -> (TimeValue interestingTime, TimeValue interestingDuration)")},
- {"GetTrackSegmentDisplayBoundsRgn", (PyCFunction)TrackObj_GetTrackSegmentDisplayBoundsRgn, 1,
- PyDoc_STR("(TimeValue time, TimeValue duration) -> (RgnHandle _rv)")},
- {"GetTrackStatus", (PyCFunction)TrackObj_GetTrackStatus, 1,
- PyDoc_STR("() -> (ComponentResult _rv)")},
- {"SetTrackLoadSettings", (PyCFunction)TrackObj_SetTrackLoadSettings, 1,
- PyDoc_STR("(TimeValue preloadTime, TimeValue preloadDuration, long preloadFlags, long defaultHints) -> None")},
- {"GetTrackLoadSettings", (PyCFunction)TrackObj_GetTrackLoadSettings, 1,
- PyDoc_STR("() -> (TimeValue preloadTime, TimeValue preloadDuration, long preloadFlags, long defaultHints)")},
- {NULL, NULL, 0}
+ {"LoadTrackIntoRam", (PyCFunction)TrackObj_LoadTrackIntoRam, 1,
+ PyDoc_STR("(TimeValue time, TimeValue duration, long flags) -> None")},
+ {"GetTrackPict", (PyCFunction)TrackObj_GetTrackPict, 1,
+ PyDoc_STR("(TimeValue time) -> (PicHandle _rv)")},
+ {"GetTrackClipRgn", (PyCFunction)TrackObj_GetTrackClipRgn, 1,
+ PyDoc_STR("() -> (RgnHandle _rv)")},
+ {"SetTrackClipRgn", (PyCFunction)TrackObj_SetTrackClipRgn, 1,
+ PyDoc_STR("(RgnHandle theClip) -> None")},
+ {"GetTrackDisplayBoundsRgn", (PyCFunction)TrackObj_GetTrackDisplayBoundsRgn, 1,
+ PyDoc_STR("() -> (RgnHandle _rv)")},
+ {"GetTrackMovieBoundsRgn", (PyCFunction)TrackObj_GetTrackMovieBoundsRgn, 1,
+ PyDoc_STR("() -> (RgnHandle _rv)")},
+ {"GetTrackBoundsRgn", (PyCFunction)TrackObj_GetTrackBoundsRgn, 1,
+ PyDoc_STR("() -> (RgnHandle _rv)")},
+ {"GetTrackMatte", (PyCFunction)TrackObj_GetTrackMatte, 1,
+ PyDoc_STR("() -> (PixMapHandle _rv)")},
+ {"SetTrackMatte", (PyCFunction)TrackObj_SetTrackMatte, 1,
+ PyDoc_STR("(PixMapHandle theMatte) -> None")},
+ {"GetTrackID", (PyCFunction)TrackObj_GetTrackID, 1,
+ PyDoc_STR("() -> (long _rv)")},
+ {"GetTrackMovie", (PyCFunction)TrackObj_GetTrackMovie, 1,
+ PyDoc_STR("() -> (Movie _rv)")},
+ {"GetTrackCreationTime", (PyCFunction)TrackObj_GetTrackCreationTime, 1,
+ PyDoc_STR("() -> (unsigned long _rv)")},
+ {"GetTrackModificationTime", (PyCFunction)TrackObj_GetTrackModificationTime, 1,
+ PyDoc_STR("() -> (unsigned long _rv)")},
+ {"GetTrackEnabled", (PyCFunction)TrackObj_GetTrackEnabled, 1,
+ PyDoc_STR("() -> (Boolean _rv)")},
+ {"SetTrackEnabled", (PyCFunction)TrackObj_SetTrackEnabled, 1,
+ PyDoc_STR("(Boolean isEnabled) -> None")},
+ {"GetTrackUsage", (PyCFunction)TrackObj_GetTrackUsage, 1,
+ PyDoc_STR("() -> (long _rv)")},
+ {"SetTrackUsage", (PyCFunction)TrackObj_SetTrackUsage, 1,
+ PyDoc_STR("(long usage) -> None")},
+ {"GetTrackDuration", (PyCFunction)TrackObj_GetTrackDuration, 1,
+ PyDoc_STR("() -> (TimeValue _rv)")},
+ {"GetTrackOffset", (PyCFunction)TrackObj_GetTrackOffset, 1,
+ PyDoc_STR("() -> (TimeValue _rv)")},
+ {"SetTrackOffset", (PyCFunction)TrackObj_SetTrackOffset, 1,
+ PyDoc_STR("(TimeValue movieOffsetTime) -> None")},
+ {"GetTrackLayer", (PyCFunction)TrackObj_GetTrackLayer, 1,
+ PyDoc_STR("() -> (short _rv)")},
+ {"SetTrackLayer", (PyCFunction)TrackObj_SetTrackLayer, 1,
+ PyDoc_STR("(short layer) -> None")},
+ {"GetTrackAlternate", (PyCFunction)TrackObj_GetTrackAlternate, 1,
+ PyDoc_STR("() -> (Track _rv)")},
+ {"SetTrackAlternate", (PyCFunction)TrackObj_SetTrackAlternate, 1,
+ PyDoc_STR("(Track alternateT) -> None")},
+ {"GetTrackVolume", (PyCFunction)TrackObj_GetTrackVolume, 1,
+ PyDoc_STR("() -> (short _rv)")},
+ {"SetTrackVolume", (PyCFunction)TrackObj_SetTrackVolume, 1,
+ PyDoc_STR("(short volume) -> None")},
+ {"GetTrackDimensions", (PyCFunction)TrackObj_GetTrackDimensions, 1,
+ PyDoc_STR("() -> (Fixed width, Fixed height)")},
+ {"SetTrackDimensions", (PyCFunction)TrackObj_SetTrackDimensions, 1,
+ PyDoc_STR("(Fixed width, Fixed height) -> None")},
+ {"GetTrackUserData", (PyCFunction)TrackObj_GetTrackUserData, 1,
+ PyDoc_STR("() -> (UserData _rv)")},
+ {"GetTrackSoundLocalizationSettings", (PyCFunction)TrackObj_GetTrackSoundLocalizationSettings, 1,
+ PyDoc_STR("() -> (Handle settings)")},
+ {"SetTrackSoundLocalizationSettings", (PyCFunction)TrackObj_SetTrackSoundLocalizationSettings, 1,
+ PyDoc_STR("(Handle settings) -> None")},
+ {"NewTrackMedia", (PyCFunction)TrackObj_NewTrackMedia, 1,
+ PyDoc_STR("(OSType mediaType, TimeScale timeScale, Handle dataRef, OSType dataRefType) -> (Media _rv)")},
+ {"GetTrackMedia", (PyCFunction)TrackObj_GetTrackMedia, 1,
+ PyDoc_STR("() -> (Media _rv)")},
+ {"InsertMediaIntoTrack", (PyCFunction)TrackObj_InsertMediaIntoTrack, 1,
+ PyDoc_STR("(TimeValue trackStart, TimeValue mediaTime, TimeValue mediaDuration, Fixed mediaRate) -> None")},
+ {"InsertTrackSegment", (PyCFunction)TrackObj_InsertTrackSegment, 1,
+ PyDoc_STR("(Track dstTrack, TimeValue srcIn, TimeValue srcDuration, TimeValue dstIn) -> None")},
+ {"InsertEmptyTrackSegment", (PyCFunction)TrackObj_InsertEmptyTrackSegment, 1,
+ PyDoc_STR("(TimeValue dstIn, TimeValue dstDuration) -> None")},
+ {"DeleteTrackSegment", (PyCFunction)TrackObj_DeleteTrackSegment, 1,
+ PyDoc_STR("(TimeValue startTime, TimeValue duration) -> None")},
+ {"ScaleTrackSegment", (PyCFunction)TrackObj_ScaleTrackSegment, 1,
+ PyDoc_STR("(TimeValue startTime, TimeValue oldDuration, TimeValue newDuration) -> None")},
+ {"IsScrapMovie", (PyCFunction)TrackObj_IsScrapMovie, 1,
+ PyDoc_STR("() -> (Component _rv)")},
+ {"CopyTrackSettings", (PyCFunction)TrackObj_CopyTrackSettings, 1,
+ PyDoc_STR("(Track dstTrack) -> None")},
+ {"AddEmptyTrackToMovie", (PyCFunction)TrackObj_AddEmptyTrackToMovie, 1,
+ PyDoc_STR("(Movie dstMovie, Handle dataRef, OSType dataRefType) -> (Track dstTrack)")},
+ {"AddClonedTrackToMovie", (PyCFunction)TrackObj_AddClonedTrackToMovie, 1,
+ PyDoc_STR("(Movie dstMovie, long flags) -> (Track dstTrack)")},
+ {"AddTrackReference", (PyCFunction)TrackObj_AddTrackReference, 1,
+ PyDoc_STR("(Track refTrack, OSType refType) -> (long addedIndex)")},
+ {"DeleteTrackReference", (PyCFunction)TrackObj_DeleteTrackReference, 1,
+ PyDoc_STR("(OSType refType, long index) -> None")},
+ {"SetTrackReference", (PyCFunction)TrackObj_SetTrackReference, 1,
+ PyDoc_STR("(Track refTrack, OSType refType, long index) -> None")},
+ {"GetTrackReference", (PyCFunction)TrackObj_GetTrackReference, 1,
+ PyDoc_STR("(OSType refType, long index) -> (Track _rv)")},
+ {"GetNextTrackReferenceType", (PyCFunction)TrackObj_GetNextTrackReferenceType, 1,
+ PyDoc_STR("(OSType refType) -> (OSType _rv)")},
+ {"GetTrackReferenceCount", (PyCFunction)TrackObj_GetTrackReferenceCount, 1,
+ PyDoc_STR("(OSType refType) -> (long _rv)")},
+ {"GetTrackEditRate", (PyCFunction)TrackObj_GetTrackEditRate, 1,
+ PyDoc_STR("(TimeValue atTime) -> (Fixed _rv)")},
+ {"GetTrackDataSize", (PyCFunction)TrackObj_GetTrackDataSize, 1,
+ PyDoc_STR("(TimeValue startTime, TimeValue duration) -> (long _rv)")},
+ {"GetTrackDataSize64", (PyCFunction)TrackObj_GetTrackDataSize64, 1,
+ PyDoc_STR("(TimeValue startTime, TimeValue duration) -> (wide dataSize)")},
+ {"PtInTrack", (PyCFunction)TrackObj_PtInTrack, 1,
+ PyDoc_STR("(Point pt) -> (Boolean _rv)")},
+ {"CopyTrackUserData", (PyCFunction)TrackObj_CopyTrackUserData, 1,
+ PyDoc_STR("(Track dstTrack, OSType copyRule) -> None")},
+ {"GetTrackNextInterestingTime", (PyCFunction)TrackObj_GetTrackNextInterestingTime, 1,
+ PyDoc_STR("(short interestingTimeFlags, TimeValue time, Fixed rate) -> (TimeValue interestingTime, TimeValue interestingDuration)")},
+ {"GetTrackSegmentDisplayBoundsRgn", (PyCFunction)TrackObj_GetTrackSegmentDisplayBoundsRgn, 1,
+ PyDoc_STR("(TimeValue time, TimeValue duration) -> (RgnHandle _rv)")},
+ {"GetTrackStatus", (PyCFunction)TrackObj_GetTrackStatus, 1,
+ PyDoc_STR("() -> (ComponentResult _rv)")},
+ {"SetTrackLoadSettings", (PyCFunction)TrackObj_SetTrackLoadSettings, 1,
+ PyDoc_STR("(TimeValue preloadTime, TimeValue preloadDuration, long preloadFlags, long defaultHints) -> None")},
+ {"GetTrackLoadSettings", (PyCFunction)TrackObj_GetTrackLoadSettings, 1,
+ PyDoc_STR("() -> (TimeValue preloadTime, TimeValue preloadDuration, long preloadFlags, long defaultHints)")},
+ {NULL, NULL, 0}
};
#define TrackObj_getsetlist NULL
@@ -4733,61 +4733,61 @@ static PyMethodDef TrackObj_methods[] = {
static PyObject *TrackObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
- PyObject *_self;
- Track itself;
- char *kw[] = {"itself", 0};
+ 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;
+ 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 = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
- "_Qt.Track", /*tp_name*/
- sizeof(TrackObject), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- /* methods */
- (destructor) TrackObj_dealloc, /*tp_dealloc*/
- 0, /*tp_print*/
- (getattrfunc)0, /*tp_getattr*/
- (setattrfunc)0, /*tp_setattr*/
- (cmpfunc) TrackObj_compare, /*tp_compare*/
- (reprfunc) TrackObj_repr, /*tp_repr*/
- (PyNumberMethods *)0, /* tp_as_number */
- (PySequenceMethods *)0, /* tp_as_sequence */
- (PyMappingMethods *)0, /* tp_as_mapping */
- (hashfunc) TrackObj_hash, /*tp_hash*/
- 0, /*tp_call*/
- 0, /*tp_str*/
- PyObject_GenericGetAttr, /*tp_getattro*/
- PyObject_GenericSetAttr, /*tp_setattro */
- 0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
- 0, /*tp_doc*/
- 0, /*tp_traverse*/
- 0, /*tp_clear*/
- 0, /*tp_richcompare*/
- 0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
- 0, /*tp_iternext*/
- TrackObj_methods, /* tp_methods */
- 0, /*tp_members*/
- TrackObj_getsetlist, /*tp_getset*/
- 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 */
+ PyObject_HEAD_INIT(NULL)
+ 0, /*ob_size*/
+ "_Qt.Track", /*tp_name*/
+ sizeof(TrackObject), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ /* methods */
+ (destructor) TrackObj_dealloc, /*tp_dealloc*/
+ 0, /*tp_print*/
+ (getattrfunc)0, /*tp_getattr*/
+ (setattrfunc)0, /*tp_setattr*/
+ (cmpfunc) TrackObj_compare, /*tp_compare*/
+ (reprfunc) TrackObj_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) TrackObj_hash, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ PyObject_GenericGetAttr, /*tp_getattro*/
+ PyObject_GenericSetAttr, /*tp_setattro */
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
+ 0, /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ TrackObj_methods, /* tp_methods */
+ 0, /*tp_members*/
+ TrackObj_getsetlist, /*tp_getset*/
+ 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 ---------------------- */
@@ -4800,2476 +4800,2476 @@ PyTypeObject Movie_Type;
#define MovieObj_Check(x) ((x)->ob_type == &Movie_Type || PyObject_TypeCheck((x), &Movie_Type))
typedef struct MovieObject {
- PyObject_HEAD
- Movie ob_itself;
+ PyObject_HEAD
+ Movie ob_itself;
} MovieObject;
PyObject *MovieObj_New(Movie itself)
{
- MovieObject *it;
- if (itself == NULL) {
- PyErr_SetString(Qt_Error,"Cannot create Movie from NULL pointer");
- return NULL;
- }
- it = PyObject_NEW(MovieObject, &Movie_Type);
- if (it == NULL) return NULL;
- it->ob_itself = itself;
- return (PyObject *)it;
+ MovieObject *it;
+ if (itself == NULL) {
+ PyErr_SetString(Qt_Error,"Cannot create Movie from NULL pointer");
+ return NULL;
+ }
+ it = PyObject_NEW(MovieObject, &Movie_Type);
+ if (it == NULL) return NULL;
+ it->ob_itself = itself;
+ return (PyObject *)it;
}
int MovieObj_Convert(PyObject *v, Movie *p_itself)
{
- if (v == Py_None)
- {
- *p_itself = NULL;
- return 1;
- }
- if (!MovieObj_Check(v))
- {
- PyErr_SetString(PyExc_TypeError, "Movie required");
- return 0;
- }
- *p_itself = ((MovieObject *)v)->ob_itself;
- return 1;
+ if (v == Py_None)
+ {
+ *p_itself = NULL;
+ return 1;
+ }
+ if (!MovieObj_Check(v))
+ {
+ PyErr_SetString(PyExc_TypeError, "Movie required");
+ return 0;
+ }
+ *p_itself = ((MovieObject *)v)->ob_itself;
+ return 1;
}
static void MovieObj_dealloc(MovieObject *self)
{
- if (self->ob_itself) DisposeMovie(self->ob_itself);
- self->ob_type->tp_free((PyObject *)self);
+ if (self->ob_itself) DisposeMovie(self->ob_itself);
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *MovieObj_MoviesTask(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- long maxMilliSecToUse;
+ PyObject *_res = NULL;
+ long maxMilliSecToUse;
#ifndef MoviesTask
- PyMac_PRECHECK(MoviesTask);
+ PyMac_PRECHECK(MoviesTask);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &maxMilliSecToUse))
- return NULL;
- MoviesTask(_self->ob_itself,
- maxMilliSecToUse);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &maxMilliSecToUse))
+ return NULL;
+ MoviesTask(_self->ob_itself,
+ maxMilliSecToUse);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MovieObj_PrerollMovie(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- TimeValue time;
- Fixed Rate;
+ PyObject *_res = NULL;
+ OSErr _err;
+ TimeValue time;
+ Fixed Rate;
#ifndef PrerollMovie
- PyMac_PRECHECK(PrerollMovie);
+ PyMac_PRECHECK(PrerollMovie);
#endif
- if (!PyArg_ParseTuple(_args, "lO&",
- &time,
- PyMac_GetFixed, &Rate))
- return NULL;
- _err = PrerollMovie(_self->ob_itself,
- time,
- Rate);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "lO&",
+ &time,
+ PyMac_GetFixed, &Rate))
+ return NULL;
+ _err = PrerollMovie(_self->ob_itself,
+ time,
+ Rate);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MovieObj_AbortPrePrerollMovie(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr err;
+ PyObject *_res = NULL;
+ OSErr err;
#ifndef AbortPrePrerollMovie
- PyMac_PRECHECK(AbortPrePrerollMovie);
+ PyMac_PRECHECK(AbortPrePrerollMovie);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &err))
- return NULL;
- AbortPrePrerollMovie(_self->ob_itself,
- err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &err))
+ return NULL;
+ AbortPrePrerollMovie(_self->ob_itself,
+ err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MovieObj_LoadMovieIntoRam(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- TimeValue time;
- TimeValue duration;
- long flags;
+ PyObject *_res = NULL;
+ OSErr _err;
+ TimeValue time;
+ TimeValue duration;
+ long flags;
#ifndef LoadMovieIntoRam
- PyMac_PRECHECK(LoadMovieIntoRam);
-#endif
- if (!PyArg_ParseTuple(_args, "lll",
- &time,
- &duration,
- &flags))
- return NULL;
- _err = LoadMovieIntoRam(_self->ob_itself,
- time,
- duration,
- flags);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(LoadMovieIntoRam);
+#endif
+ if (!PyArg_ParseTuple(_args, "lll",
+ &time,
+ &duration,
+ &flags))
+ return NULL;
+ _err = LoadMovieIntoRam(_self->ob_itself,
+ time,
+ duration,
+ flags);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MovieObj_SetMovieActive(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean active;
+ PyObject *_res = NULL;
+ Boolean active;
#ifndef SetMovieActive
- PyMac_PRECHECK(SetMovieActive);
+ PyMac_PRECHECK(SetMovieActive);
#endif
- if (!PyArg_ParseTuple(_args, "b",
- &active))
- return NULL;
- SetMovieActive(_self->ob_itself,
- active);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "b",
+ &active))
+ return NULL;
+ SetMovieActive(_self->ob_itself,
+ active);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MovieObj_GetMovieActive(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
+ PyObject *_res = NULL;
+ Boolean _rv;
#ifndef GetMovieActive
- PyMac_PRECHECK(GetMovieActive);
+ PyMac_PRECHECK(GetMovieActive);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetMovieActive(_self->ob_itself);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetMovieActive(_self->ob_itself);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *MovieObj_StartMovie(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef StartMovie
- PyMac_PRECHECK(StartMovie);
+ PyMac_PRECHECK(StartMovie);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- StartMovie(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ StartMovie(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MovieObj_StopMovie(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef StopMovie
- PyMac_PRECHECK(StopMovie);
+ PyMac_PRECHECK(StopMovie);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- StopMovie(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ StopMovie(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MovieObj_GoToBeginningOfMovie(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef GoToBeginningOfMovie
- PyMac_PRECHECK(GoToBeginningOfMovie);
+ PyMac_PRECHECK(GoToBeginningOfMovie);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- GoToBeginningOfMovie(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ GoToBeginningOfMovie(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MovieObj_GoToEndOfMovie(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef GoToEndOfMovie
- PyMac_PRECHECK(GoToEndOfMovie);
+ PyMac_PRECHECK(GoToEndOfMovie);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- GoToEndOfMovie(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ GoToEndOfMovie(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MovieObj_IsMovieDone(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
+ PyObject *_res = NULL;
+ Boolean _rv;
#ifndef IsMovieDone
- PyMac_PRECHECK(IsMovieDone);
+ PyMac_PRECHECK(IsMovieDone);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = IsMovieDone(_self->ob_itself);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = IsMovieDone(_self->ob_itself);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *MovieObj_GetMoviePreviewMode(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
+ PyObject *_res = NULL;
+ Boolean _rv;
#ifndef GetMoviePreviewMode
- PyMac_PRECHECK(GetMoviePreviewMode);
+ PyMac_PRECHECK(GetMoviePreviewMode);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetMoviePreviewMode(_self->ob_itself);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetMoviePreviewMode(_self->ob_itself);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *MovieObj_SetMoviePreviewMode(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean usePreview;
+ PyObject *_res = NULL;
+ Boolean usePreview;
#ifndef SetMoviePreviewMode
- PyMac_PRECHECK(SetMoviePreviewMode);
+ PyMac_PRECHECK(SetMoviePreviewMode);
#endif
- if (!PyArg_ParseTuple(_args, "b",
- &usePreview))
- return NULL;
- SetMoviePreviewMode(_self->ob_itself,
- usePreview);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "b",
+ &usePreview))
+ return NULL;
+ SetMoviePreviewMode(_self->ob_itself,
+ usePreview);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MovieObj_ShowMoviePoster(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef ShowMoviePoster
- PyMac_PRECHECK(ShowMoviePoster);
+ PyMac_PRECHECK(ShowMoviePoster);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- ShowMoviePoster(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ ShowMoviePoster(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MovieObj_GetMovieTimeBase(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- TimeBase _rv;
+ PyObject *_res = NULL;
+ TimeBase _rv;
#ifndef GetMovieTimeBase
- PyMac_PRECHECK(GetMovieTimeBase);
+ PyMac_PRECHECK(GetMovieTimeBase);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetMovieTimeBase(_self->ob_itself);
- _res = Py_BuildValue("O&",
- TimeBaseObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetMovieTimeBase(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ TimeBaseObj_New, _rv);
+ return _res;
}
static PyObject *MovieObj_SetMovieMasterTimeBase(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- TimeBase tb;
- TimeRecord slaveZero;
+ PyObject *_res = NULL;
+ TimeBase tb;
+ TimeRecord slaveZero;
#ifndef SetMovieMasterTimeBase
- PyMac_PRECHECK(SetMovieMasterTimeBase);
+ PyMac_PRECHECK(SetMovieMasterTimeBase);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- TimeBaseObj_Convert, &tb,
- QtTimeRecord_Convert, &slaveZero))
- return NULL;
- SetMovieMasterTimeBase(_self->ob_itself,
- tb,
- &slaveZero);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ TimeBaseObj_Convert, &tb,
+ QtTimeRecord_Convert, &slaveZero))
+ return NULL;
+ SetMovieMasterTimeBase(_self->ob_itself,
+ tb,
+ &slaveZero);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MovieObj_SetMovieMasterClock(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Component clockMeister;
- TimeRecord slaveZero;
+ PyObject *_res = NULL;
+ Component clockMeister;
+ TimeRecord slaveZero;
#ifndef SetMovieMasterClock
- PyMac_PRECHECK(SetMovieMasterClock);
+ PyMac_PRECHECK(SetMovieMasterClock);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpObj_Convert, &clockMeister,
- QtTimeRecord_Convert, &slaveZero))
- return NULL;
- SetMovieMasterClock(_self->ob_itself,
- clockMeister,
- &slaveZero);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpObj_Convert, &clockMeister,
+ QtTimeRecord_Convert, &slaveZero))
+ return NULL;
+ SetMovieMasterClock(_self->ob_itself,
+ clockMeister,
+ &slaveZero);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MovieObj_ChooseMovieClock(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- long flags;
+ PyObject *_res = NULL;
+ long flags;
#ifndef ChooseMovieClock
- PyMac_PRECHECK(ChooseMovieClock);
+ PyMac_PRECHECK(ChooseMovieClock);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &flags))
- return NULL;
- ChooseMovieClock(_self->ob_itself,
- flags);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &flags))
+ return NULL;
+ ChooseMovieClock(_self->ob_itself,
+ flags);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MovieObj_GetMovieGWorld(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CGrafPtr port;
- GDHandle gdh;
+ PyObject *_res = NULL;
+ CGrafPtr port;
+ GDHandle gdh;
#ifndef GetMovieGWorld
- PyMac_PRECHECK(GetMovieGWorld);
+ PyMac_PRECHECK(GetMovieGWorld);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- GetMovieGWorld(_self->ob_itself,
- &port,
- &gdh);
- _res = Py_BuildValue("O&O&",
- GrafObj_New, port,
- OptResObj_New, gdh);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ GetMovieGWorld(_self->ob_itself,
+ &port,
+ &gdh);
+ _res = Py_BuildValue("O&O&",
+ GrafObj_New, port,
+ OptResObj_New, gdh);
+ return _res;
}
static PyObject *MovieObj_SetMovieGWorld(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CGrafPtr port;
- GDHandle gdh;
+ PyObject *_res = NULL;
+ CGrafPtr port;
+ GDHandle gdh;
#ifndef SetMovieGWorld
- PyMac_PRECHECK(SetMovieGWorld);
+ PyMac_PRECHECK(SetMovieGWorld);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- GrafObj_Convert, &port,
- OptResObj_Convert, &gdh))
- return NULL;
- SetMovieGWorld(_self->ob_itself,
- port,
- gdh);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ GrafObj_Convert, &port,
+ OptResObj_Convert, &gdh))
+ return NULL;
+ SetMovieGWorld(_self->ob_itself,
+ port,
+ gdh);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MovieObj_GetMovieNaturalBoundsRect(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Rect naturalBounds;
+ PyObject *_res = NULL;
+ Rect naturalBounds;
#ifndef GetMovieNaturalBoundsRect
- PyMac_PRECHECK(GetMovieNaturalBoundsRect);
+ PyMac_PRECHECK(GetMovieNaturalBoundsRect);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- GetMovieNaturalBoundsRect(_self->ob_itself,
- &naturalBounds);
- _res = Py_BuildValue("O&",
- PyMac_BuildRect, &naturalBounds);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ GetMovieNaturalBoundsRect(_self->ob_itself,
+ &naturalBounds);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildRect, &naturalBounds);
+ return _res;
}
static PyObject *MovieObj_GetNextTrackForCompositing(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Track _rv;
- Track theTrack;
+ PyObject *_res = NULL;
+ Track _rv;
+ Track theTrack;
#ifndef GetNextTrackForCompositing
- PyMac_PRECHECK(GetNextTrackForCompositing);
+ PyMac_PRECHECK(GetNextTrackForCompositing);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- TrackObj_Convert, &theTrack))
- return NULL;
- _rv = GetNextTrackForCompositing(_self->ob_itself,
- theTrack);
- _res = Py_BuildValue("O&",
- TrackObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ TrackObj_Convert, &theTrack))
+ return NULL;
+ _rv = GetNextTrackForCompositing(_self->ob_itself,
+ theTrack);
+ _res = Py_BuildValue("O&",
+ TrackObj_New, _rv);
+ return _res;
}
static PyObject *MovieObj_GetPrevTrackForCompositing(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Track _rv;
- Track theTrack;
+ PyObject *_res = NULL;
+ Track _rv;
+ Track theTrack;
#ifndef GetPrevTrackForCompositing
- PyMac_PRECHECK(GetPrevTrackForCompositing);
+ PyMac_PRECHECK(GetPrevTrackForCompositing);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- TrackObj_Convert, &theTrack))
- return NULL;
- _rv = GetPrevTrackForCompositing(_self->ob_itself,
- theTrack);
- _res = Py_BuildValue("O&",
- TrackObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ TrackObj_Convert, &theTrack))
+ return NULL;
+ _rv = GetPrevTrackForCompositing(_self->ob_itself,
+ theTrack);
+ _res = Py_BuildValue("O&",
+ TrackObj_New, _rv);
+ return _res;
}
static PyObject *MovieObj_GetMoviePict(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- PicHandle _rv;
- TimeValue time;
+ PyObject *_res = NULL;
+ PicHandle _rv;
+ TimeValue time;
#ifndef GetMoviePict
- PyMac_PRECHECK(GetMoviePict);
+ PyMac_PRECHECK(GetMoviePict);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &time))
- return NULL;
- _rv = GetMoviePict(_self->ob_itself,
- time);
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &time))
+ return NULL;
+ _rv = GetMoviePict(_self->ob_itself,
+ time);
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *MovieObj_GetMoviePosterPict(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- PicHandle _rv;
+ PyObject *_res = NULL;
+ PicHandle _rv;
#ifndef GetMoviePosterPict
- PyMac_PRECHECK(GetMoviePosterPict);
+ PyMac_PRECHECK(GetMoviePosterPict);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetMoviePosterPict(_self->ob_itself);
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetMoviePosterPict(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *MovieObj_UpdateMovie(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
+ PyObject *_res = NULL;
+ OSErr _err;
#ifndef UpdateMovie
- PyMac_PRECHECK(UpdateMovie);
+ PyMac_PRECHECK(UpdateMovie);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = UpdateMovie(_self->ob_itself);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = UpdateMovie(_self->ob_itself);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MovieObj_InvalidateMovieRegion(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- RgnHandle invalidRgn;
+ PyObject *_res = NULL;
+ OSErr _err;
+ RgnHandle invalidRgn;
#ifndef InvalidateMovieRegion
- PyMac_PRECHECK(InvalidateMovieRegion);
+ PyMac_PRECHECK(InvalidateMovieRegion);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &invalidRgn))
- return NULL;
- _err = InvalidateMovieRegion(_self->ob_itself,
- invalidRgn);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &invalidRgn))
+ return NULL;
+ _err = InvalidateMovieRegion(_self->ob_itself,
+ invalidRgn);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MovieObj_GetMovieBox(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Rect boxRect;
+ PyObject *_res = NULL;
+ Rect boxRect;
#ifndef GetMovieBox
- PyMac_PRECHECK(GetMovieBox);
+ PyMac_PRECHECK(GetMovieBox);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- GetMovieBox(_self->ob_itself,
- &boxRect);
- _res = Py_BuildValue("O&",
- PyMac_BuildRect, &boxRect);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ GetMovieBox(_self->ob_itself,
+ &boxRect);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildRect, &boxRect);
+ return _res;
}
static PyObject *MovieObj_SetMovieBox(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Rect boxRect;
+ PyObject *_res = NULL;
+ Rect boxRect;
#ifndef SetMovieBox
- PyMac_PRECHECK(SetMovieBox);
+ PyMac_PRECHECK(SetMovieBox);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetRect, &boxRect))
- return NULL;
- SetMovieBox(_self->ob_itself,
- &boxRect);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetRect, &boxRect))
+ return NULL;
+ SetMovieBox(_self->ob_itself,
+ &boxRect);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MovieObj_GetMovieDisplayClipRgn(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RgnHandle _rv;
+ PyObject *_res = NULL;
+ RgnHandle _rv;
#ifndef GetMovieDisplayClipRgn
- PyMac_PRECHECK(GetMovieDisplayClipRgn);
+ PyMac_PRECHECK(GetMovieDisplayClipRgn);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetMovieDisplayClipRgn(_self->ob_itself);
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetMovieDisplayClipRgn(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *MovieObj_SetMovieDisplayClipRgn(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RgnHandle theClip;
+ PyObject *_res = NULL;
+ RgnHandle theClip;
#ifndef SetMovieDisplayClipRgn
- PyMac_PRECHECK(SetMovieDisplayClipRgn);
+ PyMac_PRECHECK(SetMovieDisplayClipRgn);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &theClip))
- return NULL;
- SetMovieDisplayClipRgn(_self->ob_itself,
- theClip);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &theClip))
+ return NULL;
+ SetMovieDisplayClipRgn(_self->ob_itself,
+ theClip);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MovieObj_GetMovieClipRgn(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RgnHandle _rv;
+ PyObject *_res = NULL;
+ RgnHandle _rv;
#ifndef GetMovieClipRgn
- PyMac_PRECHECK(GetMovieClipRgn);
+ PyMac_PRECHECK(GetMovieClipRgn);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetMovieClipRgn(_self->ob_itself);
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetMovieClipRgn(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *MovieObj_SetMovieClipRgn(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RgnHandle theClip;
+ PyObject *_res = NULL;
+ RgnHandle theClip;
#ifndef SetMovieClipRgn
- PyMac_PRECHECK(SetMovieClipRgn);
+ PyMac_PRECHECK(SetMovieClipRgn);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &theClip))
- return NULL;
- SetMovieClipRgn(_self->ob_itself,
- theClip);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &theClip))
+ return NULL;
+ SetMovieClipRgn(_self->ob_itself,
+ theClip);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MovieObj_GetMovieDisplayBoundsRgn(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RgnHandle _rv;
+ PyObject *_res = NULL;
+ RgnHandle _rv;
#ifndef GetMovieDisplayBoundsRgn
- PyMac_PRECHECK(GetMovieDisplayBoundsRgn);
+ PyMac_PRECHECK(GetMovieDisplayBoundsRgn);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetMovieDisplayBoundsRgn(_self->ob_itself);
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetMovieDisplayBoundsRgn(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *MovieObj_GetMovieBoundsRgn(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RgnHandle _rv;
+ PyObject *_res = NULL;
+ RgnHandle _rv;
#ifndef GetMovieBoundsRgn
- PyMac_PRECHECK(GetMovieBoundsRgn);
+ PyMac_PRECHECK(GetMovieBoundsRgn);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetMovieBoundsRgn(_self->ob_itself);
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetMovieBoundsRgn(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *MovieObj_SetMovieVideoOutput(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentInstance vout;
+ PyObject *_res = NULL;
+ ComponentInstance vout;
#ifndef SetMovieVideoOutput
- PyMac_PRECHECK(SetMovieVideoOutput);
+ PyMac_PRECHECK(SetMovieVideoOutput);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &vout))
- return NULL;
- SetMovieVideoOutput(_self->ob_itself,
- vout);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &vout))
+ return NULL;
+ SetMovieVideoOutput(_self->ob_itself,
+ vout);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MovieObj_PutMovieIntoHandle(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Handle publicMovie;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Handle publicMovie;
#ifndef PutMovieIntoHandle
- PyMac_PRECHECK(PutMovieIntoHandle);
+ PyMac_PRECHECK(PutMovieIntoHandle);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &publicMovie))
- return NULL;
- _err = PutMovieIntoHandle(_self->ob_itself,
- publicMovie);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &publicMovie))
+ return NULL;
+ _err = PutMovieIntoHandle(_self->ob_itself,
+ publicMovie);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MovieObj_PutMovieIntoDataFork(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- short fRefNum;
- long offset;
- long maxSize;
+ PyObject *_res = NULL;
+ OSErr _err;
+ short fRefNum;
+ long offset;
+ long maxSize;
#ifndef PutMovieIntoDataFork
- PyMac_PRECHECK(PutMovieIntoDataFork);
-#endif
- if (!PyArg_ParseTuple(_args, "hll",
- &fRefNum,
- &offset,
- &maxSize))
- return NULL;
- _err = PutMovieIntoDataFork(_self->ob_itself,
- fRefNum,
- offset,
- maxSize);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(PutMovieIntoDataFork);
+#endif
+ if (!PyArg_ParseTuple(_args, "hll",
+ &fRefNum,
+ &offset,
+ &maxSize))
+ return NULL;
+ _err = PutMovieIntoDataFork(_self->ob_itself,
+ fRefNum,
+ offset,
+ maxSize);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MovieObj_PutMovieIntoDataFork64(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- long fRefNum;
- wide offset;
- unsigned long maxSize;
+ PyObject *_res = NULL;
+ OSErr _err;
+ long fRefNum;
+ wide offset;
+ unsigned long maxSize;
#ifndef PutMovieIntoDataFork64
- PyMac_PRECHECK(PutMovieIntoDataFork64);
-#endif
- if (!PyArg_ParseTuple(_args, "lO&l",
- &fRefNum,
- PyMac_Getwide, &offset,
- &maxSize))
- return NULL;
- _err = PutMovieIntoDataFork64(_self->ob_itself,
- fRefNum,
- &offset,
- maxSize);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(PutMovieIntoDataFork64);
+#endif
+ if (!PyArg_ParseTuple(_args, "lO&l",
+ &fRefNum,
+ PyMac_Getwide, &offset,
+ &maxSize))
+ return NULL;
+ _err = PutMovieIntoDataFork64(_self->ob_itself,
+ fRefNum,
+ &offset,
+ maxSize);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MovieObj_PutMovieIntoStorage(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- DataHandler dh;
- wide offset;
- unsigned long maxSize;
+ PyObject *_res = NULL;
+ OSErr _err;
+ DataHandler dh;
+ wide offset;
+ unsigned long maxSize;
#ifndef PutMovieIntoStorage
- PyMac_PRECHECK(PutMovieIntoStorage);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&l",
- CmpInstObj_Convert, &dh,
- PyMac_Getwide, &offset,
- &maxSize))
- return NULL;
- _err = PutMovieIntoStorage(_self->ob_itself,
- dh,
- &offset,
- maxSize);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(PutMovieIntoStorage);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&l",
+ CmpInstObj_Convert, &dh,
+ PyMac_Getwide, &offset,
+ &maxSize))
+ return NULL;
+ _err = PutMovieIntoStorage(_self->ob_itself,
+ dh,
+ &offset,
+ maxSize);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MovieObj_PutMovieForDataRefIntoHandle(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Handle dataRef;
- OSType dataRefType;
- Handle publicMovie;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Handle dataRef;
+ OSType dataRefType;
+ Handle publicMovie;
#ifndef PutMovieForDataRefIntoHandle
- PyMac_PRECHECK(PutMovieForDataRefIntoHandle);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- ResObj_Convert, &dataRef,
- PyMac_GetOSType, &dataRefType,
- ResObj_Convert, &publicMovie))
- return NULL;
- _err = PutMovieForDataRefIntoHandle(_self->ob_itself,
- dataRef,
- dataRefType,
- publicMovie);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(PutMovieForDataRefIntoHandle);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ ResObj_Convert, &dataRef,
+ PyMac_GetOSType, &dataRefType,
+ ResObj_Convert, &publicMovie))
+ return NULL;
+ _err = PutMovieForDataRefIntoHandle(_self->ob_itself,
+ dataRef,
+ dataRefType,
+ publicMovie);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MovieObj_GetMovieCreationTime(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- unsigned long _rv;
+ PyObject *_res = NULL;
+ unsigned long _rv;
#ifndef GetMovieCreationTime
- PyMac_PRECHECK(GetMovieCreationTime);
+ PyMac_PRECHECK(GetMovieCreationTime);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetMovieCreationTime(_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetMovieCreationTime(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *MovieObj_GetMovieModificationTime(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- unsigned long _rv;
+ PyObject *_res = NULL;
+ unsigned long _rv;
#ifndef GetMovieModificationTime
- PyMac_PRECHECK(GetMovieModificationTime);
+ PyMac_PRECHECK(GetMovieModificationTime);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetMovieModificationTime(_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetMovieModificationTime(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *MovieObj_GetMovieTimeScale(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- TimeScale _rv;
+ PyObject *_res = NULL;
+ TimeScale _rv;
#ifndef GetMovieTimeScale
- PyMac_PRECHECK(GetMovieTimeScale);
+ PyMac_PRECHECK(GetMovieTimeScale);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetMovieTimeScale(_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetMovieTimeScale(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *MovieObj_SetMovieTimeScale(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- TimeScale timeScale;
+ PyObject *_res = NULL;
+ TimeScale timeScale;
#ifndef SetMovieTimeScale
- PyMac_PRECHECK(SetMovieTimeScale);
+ PyMac_PRECHECK(SetMovieTimeScale);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &timeScale))
- return NULL;
- SetMovieTimeScale(_self->ob_itself,
- timeScale);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &timeScale))
+ return NULL;
+ SetMovieTimeScale(_self->ob_itself,
+ timeScale);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MovieObj_GetMovieDuration(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- TimeValue _rv;
+ PyObject *_res = NULL;
+ TimeValue _rv;
#ifndef GetMovieDuration
- PyMac_PRECHECK(GetMovieDuration);
+ PyMac_PRECHECK(GetMovieDuration);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetMovieDuration(_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetMovieDuration(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *MovieObj_GetMovieRate(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Fixed _rv;
+ PyObject *_res = NULL;
+ Fixed _rv;
#ifndef GetMovieRate
- PyMac_PRECHECK(GetMovieRate);
+ PyMac_PRECHECK(GetMovieRate);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetMovieRate(_self->ob_itself);
- _res = Py_BuildValue("O&",
- PyMac_BuildFixed, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetMovieRate(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildFixed, _rv);
+ return _res;
}
static PyObject *MovieObj_SetMovieRate(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Fixed rate;
+ PyObject *_res = NULL;
+ Fixed rate;
#ifndef SetMovieRate
- PyMac_PRECHECK(SetMovieRate);
+ PyMac_PRECHECK(SetMovieRate);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetFixed, &rate))
- return NULL;
- SetMovieRate(_self->ob_itself,
- rate);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetFixed, &rate))
+ return NULL;
+ SetMovieRate(_self->ob_itself,
+ rate);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MovieObj_GetMoviePreferredRate(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Fixed _rv;
+ PyObject *_res = NULL;
+ Fixed _rv;
#ifndef GetMoviePreferredRate
- PyMac_PRECHECK(GetMoviePreferredRate);
+ PyMac_PRECHECK(GetMoviePreferredRate);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetMoviePreferredRate(_self->ob_itself);
- _res = Py_BuildValue("O&",
- PyMac_BuildFixed, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetMoviePreferredRate(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildFixed, _rv);
+ return _res;
}
static PyObject *MovieObj_SetMoviePreferredRate(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Fixed rate;
+ PyObject *_res = NULL;
+ Fixed rate;
#ifndef SetMoviePreferredRate
- PyMac_PRECHECK(SetMoviePreferredRate);
+ PyMac_PRECHECK(SetMoviePreferredRate);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetFixed, &rate))
- return NULL;
- SetMoviePreferredRate(_self->ob_itself,
- rate);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetFixed, &rate))
+ return NULL;
+ SetMoviePreferredRate(_self->ob_itself,
+ rate);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MovieObj_GetMoviePreferredVolume(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short _rv;
+ PyObject *_res = NULL;
+ short _rv;
#ifndef GetMoviePreferredVolume
- PyMac_PRECHECK(GetMoviePreferredVolume);
+ PyMac_PRECHECK(GetMoviePreferredVolume);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetMoviePreferredVolume(_self->ob_itself);
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetMoviePreferredVolume(_self->ob_itself);
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *MovieObj_SetMoviePreferredVolume(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short volume;
+ PyObject *_res = NULL;
+ short volume;
#ifndef SetMoviePreferredVolume
- PyMac_PRECHECK(SetMoviePreferredVolume);
+ PyMac_PRECHECK(SetMoviePreferredVolume);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &volume))
- return NULL;
- SetMoviePreferredVolume(_self->ob_itself,
- volume);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &volume))
+ return NULL;
+ SetMoviePreferredVolume(_self->ob_itself,
+ volume);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MovieObj_GetMovieVolume(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short _rv;
+ PyObject *_res = NULL;
+ short _rv;
#ifndef GetMovieVolume
- PyMac_PRECHECK(GetMovieVolume);
+ PyMac_PRECHECK(GetMovieVolume);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetMovieVolume(_self->ob_itself);
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetMovieVolume(_self->ob_itself);
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *MovieObj_SetMovieVolume(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short volume;
+ PyObject *_res = NULL;
+ short volume;
#ifndef SetMovieVolume
- PyMac_PRECHECK(SetMovieVolume);
+ PyMac_PRECHECK(SetMovieVolume);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &volume))
- return NULL;
- SetMovieVolume(_self->ob_itself,
- volume);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &volume))
+ return NULL;
+ SetMovieVolume(_self->ob_itself,
+ volume);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MovieObj_GetMoviePreviewTime(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- TimeValue previewTime;
- TimeValue previewDuration;
+ PyObject *_res = NULL;
+ TimeValue previewTime;
+ TimeValue previewDuration;
#ifndef GetMoviePreviewTime
- PyMac_PRECHECK(GetMoviePreviewTime);
+ PyMac_PRECHECK(GetMoviePreviewTime);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- GetMoviePreviewTime(_self->ob_itself,
- &previewTime,
- &previewDuration);
- _res = Py_BuildValue("ll",
- previewTime,
- previewDuration);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ GetMoviePreviewTime(_self->ob_itself,
+ &previewTime,
+ &previewDuration);
+ _res = Py_BuildValue("ll",
+ previewTime,
+ previewDuration);
+ return _res;
}
static PyObject *MovieObj_SetMoviePreviewTime(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- TimeValue previewTime;
- TimeValue previewDuration;
+ PyObject *_res = NULL;
+ TimeValue previewTime;
+ TimeValue previewDuration;
#ifndef SetMoviePreviewTime
- PyMac_PRECHECK(SetMoviePreviewTime);
+ PyMac_PRECHECK(SetMoviePreviewTime);
#endif
- if (!PyArg_ParseTuple(_args, "ll",
- &previewTime,
- &previewDuration))
- return NULL;
- SetMoviePreviewTime(_self->ob_itself,
- previewTime,
- previewDuration);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "ll",
+ &previewTime,
+ &previewDuration))
+ return NULL;
+ SetMoviePreviewTime(_self->ob_itself,
+ previewTime,
+ previewDuration);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MovieObj_GetMoviePosterTime(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- TimeValue _rv;
+ PyObject *_res = NULL;
+ TimeValue _rv;
#ifndef GetMoviePosterTime
- PyMac_PRECHECK(GetMoviePosterTime);
+ PyMac_PRECHECK(GetMoviePosterTime);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetMoviePosterTime(_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetMoviePosterTime(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *MovieObj_SetMoviePosterTime(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- TimeValue posterTime;
+ PyObject *_res = NULL;
+ TimeValue posterTime;
#ifndef SetMoviePosterTime
- PyMac_PRECHECK(SetMoviePosterTime);
+ PyMac_PRECHECK(SetMoviePosterTime);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &posterTime))
- return NULL;
- SetMoviePosterTime(_self->ob_itself,
- posterTime);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &posterTime))
+ return NULL;
+ SetMoviePosterTime(_self->ob_itself,
+ posterTime);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MovieObj_GetMovieSelection(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- TimeValue selectionTime;
- TimeValue selectionDuration;
+ PyObject *_res = NULL;
+ TimeValue selectionTime;
+ TimeValue selectionDuration;
#ifndef GetMovieSelection
- PyMac_PRECHECK(GetMovieSelection);
+ PyMac_PRECHECK(GetMovieSelection);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- GetMovieSelection(_self->ob_itself,
- &selectionTime,
- &selectionDuration);
- _res = Py_BuildValue("ll",
- selectionTime,
- selectionDuration);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ GetMovieSelection(_self->ob_itself,
+ &selectionTime,
+ &selectionDuration);
+ _res = Py_BuildValue("ll",
+ selectionTime,
+ selectionDuration);
+ return _res;
}
static PyObject *MovieObj_SetMovieSelection(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- TimeValue selectionTime;
- TimeValue selectionDuration;
+ PyObject *_res = NULL;
+ TimeValue selectionTime;
+ TimeValue selectionDuration;
#ifndef SetMovieSelection
- PyMac_PRECHECK(SetMovieSelection);
+ PyMac_PRECHECK(SetMovieSelection);
#endif
- if (!PyArg_ParseTuple(_args, "ll",
- &selectionTime,
- &selectionDuration))
- return NULL;
- SetMovieSelection(_self->ob_itself,
- selectionTime,
- selectionDuration);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "ll",
+ &selectionTime,
+ &selectionDuration))
+ return NULL;
+ SetMovieSelection(_self->ob_itself,
+ selectionTime,
+ selectionDuration);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MovieObj_SetMovieActiveSegment(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- TimeValue startTime;
- TimeValue duration;
+ PyObject *_res = NULL;
+ TimeValue startTime;
+ TimeValue duration;
#ifndef SetMovieActiveSegment
- PyMac_PRECHECK(SetMovieActiveSegment);
+ PyMac_PRECHECK(SetMovieActiveSegment);
#endif
- if (!PyArg_ParseTuple(_args, "ll",
- &startTime,
- &duration))
- return NULL;
- SetMovieActiveSegment(_self->ob_itself,
- startTime,
- duration);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "ll",
+ &startTime,
+ &duration))
+ return NULL;
+ SetMovieActiveSegment(_self->ob_itself,
+ startTime,
+ duration);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MovieObj_GetMovieActiveSegment(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- TimeValue startTime;
- TimeValue duration;
+ PyObject *_res = NULL;
+ TimeValue startTime;
+ TimeValue duration;
#ifndef GetMovieActiveSegment
- PyMac_PRECHECK(GetMovieActiveSegment);
+ PyMac_PRECHECK(GetMovieActiveSegment);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- GetMovieActiveSegment(_self->ob_itself,
- &startTime,
- &duration);
- _res = Py_BuildValue("ll",
- startTime,
- duration);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ GetMovieActiveSegment(_self->ob_itself,
+ &startTime,
+ &duration);
+ _res = Py_BuildValue("ll",
+ startTime,
+ duration);
+ return _res;
}
static PyObject *MovieObj_GetMovieTime(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- TimeValue _rv;
- TimeRecord currentTime;
+ PyObject *_res = NULL;
+ TimeValue _rv;
+ TimeRecord currentTime;
#ifndef GetMovieTime
- PyMac_PRECHECK(GetMovieTime);
+ PyMac_PRECHECK(GetMovieTime);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetMovieTime(_self->ob_itself,
- &currentTime);
- _res = Py_BuildValue("lO&",
- _rv,
- QtTimeRecord_New, &currentTime);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetMovieTime(_self->ob_itself,
+ &currentTime);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ QtTimeRecord_New, &currentTime);
+ return _res;
}
static PyObject *MovieObj_SetMovieTime(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- TimeRecord newtime;
+ PyObject *_res = NULL;
+ TimeRecord newtime;
#ifndef SetMovieTime
- PyMac_PRECHECK(SetMovieTime);
+ PyMac_PRECHECK(SetMovieTime);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- QtTimeRecord_Convert, &newtime))
- return NULL;
- SetMovieTime(_self->ob_itself,
- &newtime);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ QtTimeRecord_Convert, &newtime))
+ return NULL;
+ SetMovieTime(_self->ob_itself,
+ &newtime);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MovieObj_SetMovieTimeValue(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- TimeValue newtime;
+ PyObject *_res = NULL;
+ TimeValue newtime;
#ifndef SetMovieTimeValue
- PyMac_PRECHECK(SetMovieTimeValue);
+ PyMac_PRECHECK(SetMovieTimeValue);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &newtime))
- return NULL;
- SetMovieTimeValue(_self->ob_itself,
- newtime);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &newtime))
+ return NULL;
+ SetMovieTimeValue(_self->ob_itself,
+ newtime);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MovieObj_GetMovieUserData(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- UserData _rv;
+ PyObject *_res = NULL;
+ UserData _rv;
#ifndef GetMovieUserData
- PyMac_PRECHECK(GetMovieUserData);
+ PyMac_PRECHECK(GetMovieUserData);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetMovieUserData(_self->ob_itself);
- _res = Py_BuildValue("O&",
- UserDataObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetMovieUserData(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ UserDataObj_New, _rv);
+ return _res;
}
static PyObject *MovieObj_GetMovieTrackCount(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- long _rv;
+ PyObject *_res = NULL;
+ long _rv;
#ifndef GetMovieTrackCount
- PyMac_PRECHECK(GetMovieTrackCount);
+ PyMac_PRECHECK(GetMovieTrackCount);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetMovieTrackCount(_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetMovieTrackCount(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *MovieObj_GetMovieTrack(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Track _rv;
- long trackID;
+ PyObject *_res = NULL;
+ Track _rv;
+ long trackID;
#ifndef GetMovieTrack
- PyMac_PRECHECK(GetMovieTrack);
+ PyMac_PRECHECK(GetMovieTrack);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &trackID))
- return NULL;
- _rv = GetMovieTrack(_self->ob_itself,
- trackID);
- _res = Py_BuildValue("O&",
- TrackObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &trackID))
+ return NULL;
+ _rv = GetMovieTrack(_self->ob_itself,
+ trackID);
+ _res = Py_BuildValue("O&",
+ TrackObj_New, _rv);
+ return _res;
}
static PyObject *MovieObj_GetMovieIndTrack(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Track _rv;
- long index;
+ PyObject *_res = NULL;
+ Track _rv;
+ long index;
#ifndef GetMovieIndTrack
- PyMac_PRECHECK(GetMovieIndTrack);
+ PyMac_PRECHECK(GetMovieIndTrack);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &index))
- return NULL;
- _rv = GetMovieIndTrack(_self->ob_itself,
- index);
- _res = Py_BuildValue("O&",
- TrackObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &index))
+ return NULL;
+ _rv = GetMovieIndTrack(_self->ob_itself,
+ index);
+ _res = Py_BuildValue("O&",
+ TrackObj_New, _rv);
+ return _res;
}
static PyObject *MovieObj_GetMovieIndTrackType(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Track _rv;
- long index;
- OSType trackType;
- long flags;
+ PyObject *_res = NULL;
+ Track _rv;
+ long index;
+ OSType trackType;
+ long flags;
#ifndef GetMovieIndTrackType
- PyMac_PRECHECK(GetMovieIndTrackType);
-#endif
- if (!PyArg_ParseTuple(_args, "lO&l",
- &index,
- PyMac_GetOSType, &trackType,
- &flags))
- return NULL;
- _rv = GetMovieIndTrackType(_self->ob_itself,
- index,
- trackType,
- flags);
- _res = Py_BuildValue("O&",
- TrackObj_New, _rv);
- return _res;
+ PyMac_PRECHECK(GetMovieIndTrackType);
+#endif
+ if (!PyArg_ParseTuple(_args, "lO&l",
+ &index,
+ PyMac_GetOSType, &trackType,
+ &flags))
+ return NULL;
+ _rv = GetMovieIndTrackType(_self->ob_itself,
+ index,
+ trackType,
+ flags);
+ _res = Py_BuildValue("O&",
+ TrackObj_New, _rv);
+ return _res;
}
static PyObject *MovieObj_NewMovieTrack(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Track _rv;
- Fixed width;
- Fixed height;
- short trackVolume;
+ PyObject *_res = NULL;
+ Track _rv;
+ Fixed width;
+ Fixed height;
+ short trackVolume;
#ifndef NewMovieTrack
- PyMac_PRECHECK(NewMovieTrack);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&h",
- PyMac_GetFixed, &width,
- PyMac_GetFixed, &height,
- &trackVolume))
- return NULL;
- _rv = NewMovieTrack(_self->ob_itself,
- width,
- height,
- trackVolume);
- _res = Py_BuildValue("O&",
- TrackObj_New, _rv);
- return _res;
+ PyMac_PRECHECK(NewMovieTrack);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&h",
+ PyMac_GetFixed, &width,
+ PyMac_GetFixed, &height,
+ &trackVolume))
+ return NULL;
+ _rv = NewMovieTrack(_self->ob_itself,
+ width,
+ height,
+ trackVolume);
+ _res = Py_BuildValue("O&",
+ TrackObj_New, _rv);
+ return _res;
}
static PyObject *MovieObj_SetAutoTrackAlternatesEnabled(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean enable;
+ PyObject *_res = NULL;
+ Boolean enable;
#ifndef SetAutoTrackAlternatesEnabled
- PyMac_PRECHECK(SetAutoTrackAlternatesEnabled);
+ PyMac_PRECHECK(SetAutoTrackAlternatesEnabled);
#endif
- if (!PyArg_ParseTuple(_args, "b",
- &enable))
- return NULL;
- SetAutoTrackAlternatesEnabled(_self->ob_itself,
- enable);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "b",
+ &enable))
+ return NULL;
+ SetAutoTrackAlternatesEnabled(_self->ob_itself,
+ enable);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MovieObj_SelectMovieAlternates(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef SelectMovieAlternates
- PyMac_PRECHECK(SelectMovieAlternates);
+ PyMac_PRECHECK(SelectMovieAlternates);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- SelectMovieAlternates(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ SelectMovieAlternates(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MovieObj_InsertMovieSegment(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Movie dstMovie;
- TimeValue srcIn;
- TimeValue srcDuration;
- TimeValue dstIn;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Movie dstMovie;
+ TimeValue srcIn;
+ TimeValue srcDuration;
+ TimeValue dstIn;
#ifndef InsertMovieSegment
- PyMac_PRECHECK(InsertMovieSegment);
-#endif
- if (!PyArg_ParseTuple(_args, "O&lll",
- MovieObj_Convert, &dstMovie,
- &srcIn,
- &srcDuration,
- &dstIn))
- return NULL;
- _err = InsertMovieSegment(_self->ob_itself,
- dstMovie,
- srcIn,
- srcDuration,
- dstIn);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(InsertMovieSegment);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&lll",
+ MovieObj_Convert, &dstMovie,
+ &srcIn,
+ &srcDuration,
+ &dstIn))
+ return NULL;
+ _err = InsertMovieSegment(_self->ob_itself,
+ dstMovie,
+ srcIn,
+ srcDuration,
+ dstIn);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MovieObj_InsertEmptyMovieSegment(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- TimeValue dstIn;
- TimeValue dstDuration;
+ PyObject *_res = NULL;
+ OSErr _err;
+ TimeValue dstIn;
+ TimeValue dstDuration;
#ifndef InsertEmptyMovieSegment
- PyMac_PRECHECK(InsertEmptyMovieSegment);
+ PyMac_PRECHECK(InsertEmptyMovieSegment);
#endif
- if (!PyArg_ParseTuple(_args, "ll",
- &dstIn,
- &dstDuration))
- return NULL;
- _err = InsertEmptyMovieSegment(_self->ob_itself,
- dstIn,
- dstDuration);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "ll",
+ &dstIn,
+ &dstDuration))
+ return NULL;
+ _err = InsertEmptyMovieSegment(_self->ob_itself,
+ dstIn,
+ dstDuration);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MovieObj_DeleteMovieSegment(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- TimeValue startTime;
- TimeValue duration;
+ PyObject *_res = NULL;
+ OSErr _err;
+ TimeValue startTime;
+ TimeValue duration;
#ifndef DeleteMovieSegment
- PyMac_PRECHECK(DeleteMovieSegment);
+ PyMac_PRECHECK(DeleteMovieSegment);
#endif
- if (!PyArg_ParseTuple(_args, "ll",
- &startTime,
- &duration))
- return NULL;
- _err = DeleteMovieSegment(_self->ob_itself,
- startTime,
- duration);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "ll",
+ &startTime,
+ &duration))
+ return NULL;
+ _err = DeleteMovieSegment(_self->ob_itself,
+ startTime,
+ duration);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MovieObj_ScaleMovieSegment(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- TimeValue startTime;
- TimeValue oldDuration;
- TimeValue newDuration;
+ PyObject *_res = NULL;
+ OSErr _err;
+ TimeValue startTime;
+ TimeValue oldDuration;
+ TimeValue newDuration;
#ifndef ScaleMovieSegment
- PyMac_PRECHECK(ScaleMovieSegment);
-#endif
- if (!PyArg_ParseTuple(_args, "lll",
- &startTime,
- &oldDuration,
- &newDuration))
- return NULL;
- _err = ScaleMovieSegment(_self->ob_itself,
- startTime,
- oldDuration,
- newDuration);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(ScaleMovieSegment);
+#endif
+ if (!PyArg_ParseTuple(_args, "lll",
+ &startTime,
+ &oldDuration,
+ &newDuration))
+ return NULL;
+ _err = ScaleMovieSegment(_self->ob_itself,
+ startTime,
+ oldDuration,
+ newDuration);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MovieObj_CutMovieSelection(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Movie _rv;
+ PyObject *_res = NULL;
+ Movie _rv;
#ifndef CutMovieSelection
- PyMac_PRECHECK(CutMovieSelection);
+ PyMac_PRECHECK(CutMovieSelection);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = CutMovieSelection(_self->ob_itself);
- _res = Py_BuildValue("O&",
- MovieObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = CutMovieSelection(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ MovieObj_New, _rv);
+ return _res;
}
static PyObject *MovieObj_CopyMovieSelection(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Movie _rv;
+ PyObject *_res = NULL;
+ Movie _rv;
#ifndef CopyMovieSelection
- PyMac_PRECHECK(CopyMovieSelection);
+ PyMac_PRECHECK(CopyMovieSelection);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = CopyMovieSelection(_self->ob_itself);
- _res = Py_BuildValue("O&",
- MovieObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = CopyMovieSelection(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ MovieObj_New, _rv);
+ return _res;
}
static PyObject *MovieObj_PasteMovieSelection(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Movie src;
+ PyObject *_res = NULL;
+ Movie src;
#ifndef PasteMovieSelection
- PyMac_PRECHECK(PasteMovieSelection);
+ PyMac_PRECHECK(PasteMovieSelection);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- MovieObj_Convert, &src))
- return NULL;
- PasteMovieSelection(_self->ob_itself,
- src);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ MovieObj_Convert, &src))
+ return NULL;
+ PasteMovieSelection(_self->ob_itself,
+ src);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MovieObj_AddMovieSelection(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Movie src;
+ PyObject *_res = NULL;
+ Movie src;
#ifndef AddMovieSelection
- PyMac_PRECHECK(AddMovieSelection);
+ PyMac_PRECHECK(AddMovieSelection);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- MovieObj_Convert, &src))
- return NULL;
- AddMovieSelection(_self->ob_itself,
- src);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ MovieObj_Convert, &src))
+ return NULL;
+ AddMovieSelection(_self->ob_itself,
+ src);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MovieObj_ClearMovieSelection(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef ClearMovieSelection
- PyMac_PRECHECK(ClearMovieSelection);
+ PyMac_PRECHECK(ClearMovieSelection);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- ClearMovieSelection(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ ClearMovieSelection(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MovieObj_PutMovieIntoTypedHandle(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Track targetTrack;
- OSType handleType;
- Handle publicMovie;
- TimeValue start;
- TimeValue dur;
- long flags;
- ComponentInstance userComp;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Track targetTrack;
+ OSType handleType;
+ Handle publicMovie;
+ TimeValue start;
+ TimeValue dur;
+ long flags;
+ ComponentInstance userComp;
#ifndef PutMovieIntoTypedHandle
- PyMac_PRECHECK(PutMovieIntoTypedHandle);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&lllO&",
- TrackObj_Convert, &targetTrack,
- PyMac_GetOSType, &handleType,
- ResObj_Convert, &publicMovie,
- &start,
- &dur,
- &flags,
- CmpInstObj_Convert, &userComp))
- return NULL;
- _err = PutMovieIntoTypedHandle(_self->ob_itself,
- targetTrack,
- handleType,
- publicMovie,
- start,
- dur,
- flags,
- userComp);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(PutMovieIntoTypedHandle);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&lllO&",
+ TrackObj_Convert, &targetTrack,
+ PyMac_GetOSType, &handleType,
+ ResObj_Convert, &publicMovie,
+ &start,
+ &dur,
+ &flags,
+ CmpInstObj_Convert, &userComp))
+ return NULL;
+ _err = PutMovieIntoTypedHandle(_self->ob_itself,
+ targetTrack,
+ handleType,
+ publicMovie,
+ start,
+ dur,
+ flags,
+ userComp);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MovieObj_CopyMovieSettings(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Movie dstMovie;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Movie dstMovie;
#ifndef CopyMovieSettings
- PyMac_PRECHECK(CopyMovieSettings);
+ PyMac_PRECHECK(CopyMovieSettings);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- MovieObj_Convert, &dstMovie))
- return NULL;
- _err = CopyMovieSettings(_self->ob_itself,
- dstMovie);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ MovieObj_Convert, &dstMovie))
+ return NULL;
+ _err = CopyMovieSettings(_self->ob_itself,
+ dstMovie);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MovieObj_ConvertMovieToFile(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Track onlyTrack;
- FSSpec outputFile;
- OSType fileType;
- OSType creator;
- ScriptCode scriptTag;
- short resID;
- long flags;
- ComponentInstance userComp;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Track onlyTrack;
+ FSSpec outputFile;
+ OSType fileType;
+ OSType creator;
+ ScriptCode scriptTag;
+ short resID;
+ long flags;
+ ComponentInstance userComp;
#ifndef ConvertMovieToFile
- PyMac_PRECHECK(ConvertMovieToFile);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&O&hlO&",
- TrackObj_Convert, &onlyTrack,
- PyMac_GetFSSpec, &outputFile,
- PyMac_GetOSType, &fileType,
- PyMac_GetOSType, &creator,
- &scriptTag,
- &flags,
- CmpInstObj_Convert, &userComp))
- return NULL;
- _err = ConvertMovieToFile(_self->ob_itself,
- onlyTrack,
- &outputFile,
- fileType,
- creator,
- scriptTag,
- &resID,
- flags,
- userComp);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("h",
- resID);
- return _res;
+ PyMac_PRECHECK(ConvertMovieToFile);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&O&hlO&",
+ TrackObj_Convert, &onlyTrack,
+ PyMac_GetFSSpec, &outputFile,
+ PyMac_GetOSType, &fileType,
+ PyMac_GetOSType, &creator,
+ &scriptTag,
+ &flags,
+ CmpInstObj_Convert, &userComp))
+ return NULL;
+ _err = ConvertMovieToFile(_self->ob_itself,
+ onlyTrack,
+ &outputFile,
+ fileType,
+ creator,
+ scriptTag,
+ &resID,
+ flags,
+ userComp);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("h",
+ resID);
+ return _res;
}
static PyObject *MovieObj_GetMovieDataSize(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- long _rv;
- TimeValue startTime;
- TimeValue duration;
+ PyObject *_res = NULL;
+ long _rv;
+ TimeValue startTime;
+ TimeValue duration;
#ifndef GetMovieDataSize
- PyMac_PRECHECK(GetMovieDataSize);
+ PyMac_PRECHECK(GetMovieDataSize);
#endif
- if (!PyArg_ParseTuple(_args, "ll",
- &startTime,
- &duration))
- return NULL;
- _rv = GetMovieDataSize(_self->ob_itself,
- startTime,
- duration);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "ll",
+ &startTime,
+ &duration))
+ return NULL;
+ _rv = GetMovieDataSize(_self->ob_itself,
+ startTime,
+ duration);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *MovieObj_GetMovieDataSize64(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- TimeValue startTime;
- TimeValue duration;
- wide dataSize;
+ PyObject *_res = NULL;
+ OSErr _err;
+ TimeValue startTime;
+ TimeValue duration;
+ wide dataSize;
#ifndef GetMovieDataSize64
- PyMac_PRECHECK(GetMovieDataSize64);
-#endif
- if (!PyArg_ParseTuple(_args, "ll",
- &startTime,
- &duration))
- return NULL;
- _err = GetMovieDataSize64(_self->ob_itself,
- startTime,
- duration,
- &dataSize);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- PyMac_Buildwide, dataSize);
- return _res;
+ PyMac_PRECHECK(GetMovieDataSize64);
+#endif
+ if (!PyArg_ParseTuple(_args, "ll",
+ &startTime,
+ &duration))
+ return NULL;
+ _err = GetMovieDataSize64(_self->ob_itself,
+ startTime,
+ duration,
+ &dataSize);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ PyMac_Buildwide, dataSize);
+ return _res;
}
static PyObject *MovieObj_PtInMovie(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- Point pt;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ Point pt;
#ifndef PtInMovie
- PyMac_PRECHECK(PtInMovie);
+ PyMac_PRECHECK(PtInMovie);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetPoint, &pt))
- return NULL;
- _rv = PtInMovie(_self->ob_itself,
- pt);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetPoint, &pt))
+ return NULL;
+ _rv = PtInMovie(_self->ob_itself,
+ pt);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *MovieObj_SetMovieLanguage(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- long language;
+ PyObject *_res = NULL;
+ long language;
#ifndef SetMovieLanguage
- PyMac_PRECHECK(SetMovieLanguage);
+ PyMac_PRECHECK(SetMovieLanguage);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &language))
- return NULL;
- SetMovieLanguage(_self->ob_itself,
- language);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &language))
+ return NULL;
+ SetMovieLanguage(_self->ob_itself,
+ language);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MovieObj_CopyMovieUserData(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Movie dstMovie;
- OSType copyRule;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Movie dstMovie;
+ OSType copyRule;
#ifndef CopyMovieUserData
- PyMac_PRECHECK(CopyMovieUserData);
+ PyMac_PRECHECK(CopyMovieUserData);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- MovieObj_Convert, &dstMovie,
- PyMac_GetOSType, &copyRule))
- return NULL;
- _err = CopyMovieUserData(_self->ob_itself,
- dstMovie,
- copyRule);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ MovieObj_Convert, &dstMovie,
+ PyMac_GetOSType, &copyRule))
+ return NULL;
+ _err = CopyMovieUserData(_self->ob_itself,
+ dstMovie,
+ copyRule);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MovieObj_GetMovieNextInterestingTime(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short interestingTimeFlags;
- short numMediaTypes;
- OSType whichMediaTypes;
- TimeValue time;
- Fixed rate;
- TimeValue interestingTime;
- TimeValue interestingDuration;
+ PyObject *_res = NULL;
+ short interestingTimeFlags;
+ short numMediaTypes;
+ OSType whichMediaTypes;
+ TimeValue time;
+ Fixed rate;
+ TimeValue interestingTime;
+ TimeValue interestingDuration;
#ifndef GetMovieNextInterestingTime
- PyMac_PRECHECK(GetMovieNextInterestingTime);
-#endif
- if (!PyArg_ParseTuple(_args, "hhO&lO&",
- &interestingTimeFlags,
- &numMediaTypes,
- PyMac_GetOSType, &whichMediaTypes,
- &time,
- PyMac_GetFixed, &rate))
- return NULL;
- GetMovieNextInterestingTime(_self->ob_itself,
- interestingTimeFlags,
- numMediaTypes,
- &whichMediaTypes,
- time,
- rate,
- &interestingTime,
- &interestingDuration);
- _res = Py_BuildValue("ll",
- interestingTime,
- interestingDuration);
- return _res;
+ PyMac_PRECHECK(GetMovieNextInterestingTime);
+#endif
+ if (!PyArg_ParseTuple(_args, "hhO&lO&",
+ &interestingTimeFlags,
+ &numMediaTypes,
+ PyMac_GetOSType, &whichMediaTypes,
+ &time,
+ PyMac_GetFixed, &rate))
+ return NULL;
+ GetMovieNextInterestingTime(_self->ob_itself,
+ interestingTimeFlags,
+ numMediaTypes,
+ &whichMediaTypes,
+ time,
+ rate,
+ &interestingTime,
+ &interestingDuration);
+ _res = Py_BuildValue("ll",
+ interestingTime,
+ interestingDuration);
+ return _res;
}
static PyObject *MovieObj_AddMovieResource(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- short resRefNum;
- short resId;
- Str255 resName;
+ PyObject *_res = NULL;
+ OSErr _err;
+ short resRefNum;
+ short resId;
+ Str255 resName;
#ifndef AddMovieResource
- PyMac_PRECHECK(AddMovieResource);
-#endif
- if (!PyArg_ParseTuple(_args, "hO&",
- &resRefNum,
- PyMac_GetStr255, resName))
- return NULL;
- _err = AddMovieResource(_self->ob_itself,
- resRefNum,
- &resId,
- resName);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("h",
- resId);
- return _res;
+ PyMac_PRECHECK(AddMovieResource);
+#endif
+ if (!PyArg_ParseTuple(_args, "hO&",
+ &resRefNum,
+ PyMac_GetStr255, resName))
+ return NULL;
+ _err = AddMovieResource(_self->ob_itself,
+ resRefNum,
+ &resId,
+ resName);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("h",
+ resId);
+ return _res;
}
static PyObject *MovieObj_UpdateMovieResource(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- short resRefNum;
- short resId;
- Str255 resName;
+ PyObject *_res = NULL;
+ OSErr _err;
+ short resRefNum;
+ short resId;
+ Str255 resName;
#ifndef UpdateMovieResource
- PyMac_PRECHECK(UpdateMovieResource);
-#endif
- if (!PyArg_ParseTuple(_args, "hhO&",
- &resRefNum,
- &resId,
- PyMac_GetStr255, resName))
- return NULL;
- _err = UpdateMovieResource(_self->ob_itself,
- resRefNum,
- resId,
- resName);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(UpdateMovieResource);
+#endif
+ if (!PyArg_ParseTuple(_args, "hhO&",
+ &resRefNum,
+ &resId,
+ PyMac_GetStr255, resName))
+ return NULL;
+ _err = UpdateMovieResource(_self->ob_itself,
+ resRefNum,
+ resId,
+ resName);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MovieObj_AddMovieToStorage(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- DataHandler dh;
+ PyObject *_res = NULL;
+ OSErr _err;
+ DataHandler dh;
#ifndef AddMovieToStorage
- PyMac_PRECHECK(AddMovieToStorage);
+ PyMac_PRECHECK(AddMovieToStorage);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &dh))
- return NULL;
- _err = AddMovieToStorage(_self->ob_itself,
- dh);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &dh))
+ return NULL;
+ _err = AddMovieToStorage(_self->ob_itself,
+ dh);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MovieObj_UpdateMovieInStorage(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- DataHandler dh;
+ PyObject *_res = NULL;
+ OSErr _err;
+ DataHandler dh;
#ifndef UpdateMovieInStorage
- PyMac_PRECHECK(UpdateMovieInStorage);
+ PyMac_PRECHECK(UpdateMovieInStorage);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &dh))
- return NULL;
- _err = UpdateMovieInStorage(_self->ob_itself,
- dh);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &dh))
+ return NULL;
+ _err = UpdateMovieInStorage(_self->ob_itself,
+ dh);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MovieObj_HasMovieChanged(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
+ PyObject *_res = NULL;
+ Boolean _rv;
#ifndef HasMovieChanged
- PyMac_PRECHECK(HasMovieChanged);
+ PyMac_PRECHECK(HasMovieChanged);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = HasMovieChanged(_self->ob_itself);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = HasMovieChanged(_self->ob_itself);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *MovieObj_ClearMovieChanged(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef ClearMovieChanged
- PyMac_PRECHECK(ClearMovieChanged);
+ PyMac_PRECHECK(ClearMovieChanged);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- ClearMovieChanged(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ ClearMovieChanged(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MovieObj_SetMovieDefaultDataRef(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Handle dataRef;
- OSType dataRefType;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Handle dataRef;
+ OSType dataRefType;
#ifndef SetMovieDefaultDataRef
- PyMac_PRECHECK(SetMovieDefaultDataRef);
+ PyMac_PRECHECK(SetMovieDefaultDataRef);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- ResObj_Convert, &dataRef,
- PyMac_GetOSType, &dataRefType))
- return NULL;
- _err = SetMovieDefaultDataRef(_self->ob_itself,
- dataRef,
- dataRefType);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ ResObj_Convert, &dataRef,
+ PyMac_GetOSType, &dataRefType))
+ return NULL;
+ _err = SetMovieDefaultDataRef(_self->ob_itself,
+ dataRef,
+ dataRefType);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MovieObj_GetMovieDefaultDataRef(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Handle dataRef;
- OSType dataRefType;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Handle dataRef;
+ OSType dataRefType;
#ifndef GetMovieDefaultDataRef
- PyMac_PRECHECK(GetMovieDefaultDataRef);
+ PyMac_PRECHECK(GetMovieDefaultDataRef);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetMovieDefaultDataRef(_self->ob_itself,
- &dataRef,
- &dataRefType);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&O&",
- ResObj_New, dataRef,
- PyMac_BuildOSType, dataRefType);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetMovieDefaultDataRef(_self->ob_itself,
+ &dataRef,
+ &dataRefType);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&O&",
+ ResObj_New, dataRef,
+ PyMac_BuildOSType, dataRefType);
+ return _res;
}
static PyObject *MovieObj_SetMovieColorTable(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- CTabHandle ctab;
+ PyObject *_res = NULL;
+ OSErr _err;
+ CTabHandle ctab;
#ifndef SetMovieColorTable
- PyMac_PRECHECK(SetMovieColorTable);
+ PyMac_PRECHECK(SetMovieColorTable);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &ctab))
- return NULL;
- _err = SetMovieColorTable(_self->ob_itself,
- ctab);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &ctab))
+ return NULL;
+ _err = SetMovieColorTable(_self->ob_itself,
+ ctab);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MovieObj_GetMovieColorTable(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- CTabHandle ctab;
+ PyObject *_res = NULL;
+ OSErr _err;
+ CTabHandle ctab;
#ifndef GetMovieColorTable
- PyMac_PRECHECK(GetMovieColorTable);
+ PyMac_PRECHECK(GetMovieColorTable);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetMovieColorTable(_self->ob_itself,
- &ctab);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- ResObj_New, ctab);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetMovieColorTable(_self->ob_itself,
+ &ctab);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ ResObj_New, ctab);
+ return _res;
}
static PyObject *MovieObj_FlattenMovie(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- long movieFlattenFlags;
- FSSpec theFile;
- OSType creator;
- ScriptCode scriptTag;
- long createMovieFileFlags;
- short resId;
- Str255 resName;
+ PyObject *_res = NULL;
+ long movieFlattenFlags;
+ FSSpec theFile;
+ OSType creator;
+ ScriptCode scriptTag;
+ long createMovieFileFlags;
+ short resId;
+ Str255 resName;
#ifndef FlattenMovie
- PyMac_PRECHECK(FlattenMovie);
-#endif
- if (!PyArg_ParseTuple(_args, "lO&O&hlO&",
- &movieFlattenFlags,
- PyMac_GetFSSpec, &theFile,
- PyMac_GetOSType, &creator,
- &scriptTag,
- &createMovieFileFlags,
- PyMac_GetStr255, resName))
- return NULL;
- FlattenMovie(_self->ob_itself,
- movieFlattenFlags,
- &theFile,
- creator,
- scriptTag,
- createMovieFileFlags,
- &resId,
- resName);
- _res = Py_BuildValue("h",
- resId);
- return _res;
+ PyMac_PRECHECK(FlattenMovie);
+#endif
+ if (!PyArg_ParseTuple(_args, "lO&O&hlO&",
+ &movieFlattenFlags,
+ PyMac_GetFSSpec, &theFile,
+ PyMac_GetOSType, &creator,
+ &scriptTag,
+ &createMovieFileFlags,
+ PyMac_GetStr255, resName))
+ return NULL;
+ FlattenMovie(_self->ob_itself,
+ movieFlattenFlags,
+ &theFile,
+ creator,
+ scriptTag,
+ createMovieFileFlags,
+ &resId,
+ resName);
+ _res = Py_BuildValue("h",
+ resId);
+ return _res;
}
static PyObject *MovieObj_FlattenMovieData(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Movie _rv;
- long movieFlattenFlags;
- FSSpec theFile;
- OSType creator;
- ScriptCode scriptTag;
- long createMovieFileFlags;
+ PyObject *_res = NULL;
+ Movie _rv;
+ long movieFlattenFlags;
+ FSSpec theFile;
+ OSType creator;
+ ScriptCode scriptTag;
+ long createMovieFileFlags;
#ifndef FlattenMovieData
- PyMac_PRECHECK(FlattenMovieData);
-#endif
- if (!PyArg_ParseTuple(_args, "lO&O&hl",
- &movieFlattenFlags,
- PyMac_GetFSSpec, &theFile,
- PyMac_GetOSType, &creator,
- &scriptTag,
- &createMovieFileFlags))
- return NULL;
- _rv = FlattenMovieData(_self->ob_itself,
- movieFlattenFlags,
- &theFile,
- creator,
- scriptTag,
- createMovieFileFlags);
- _res = Py_BuildValue("O&",
- MovieObj_New, _rv);
- return _res;
+ PyMac_PRECHECK(FlattenMovieData);
+#endif
+ if (!PyArg_ParseTuple(_args, "lO&O&hl",
+ &movieFlattenFlags,
+ PyMac_GetFSSpec, &theFile,
+ PyMac_GetOSType, &creator,
+ &scriptTag,
+ &createMovieFileFlags))
+ return NULL;
+ _rv = FlattenMovieData(_self->ob_itself,
+ movieFlattenFlags,
+ &theFile,
+ creator,
+ scriptTag,
+ createMovieFileFlags);
+ _res = Py_BuildValue("O&",
+ MovieObj_New, _rv);
+ return _res;
}
static PyObject *MovieObj_FlattenMovieDataToDataRef(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Movie _rv;
- long movieFlattenFlags;
- Handle dataRef;
- OSType dataRefType;
- OSType creator;
- ScriptCode scriptTag;
- long createMovieFileFlags;
+ PyObject *_res = NULL;
+ Movie _rv;
+ long movieFlattenFlags;
+ Handle dataRef;
+ OSType dataRefType;
+ OSType creator;
+ ScriptCode scriptTag;
+ long createMovieFileFlags;
#ifndef FlattenMovieDataToDataRef
- PyMac_PRECHECK(FlattenMovieDataToDataRef);
-#endif
- if (!PyArg_ParseTuple(_args, "lO&O&O&hl",
- &movieFlattenFlags,
- ResObj_Convert, &dataRef,
- PyMac_GetOSType, &dataRefType,
- PyMac_GetOSType, &creator,
- &scriptTag,
- &createMovieFileFlags))
- return NULL;
- _rv = FlattenMovieDataToDataRef(_self->ob_itself,
- movieFlattenFlags,
- dataRef,
- dataRefType,
- creator,
- scriptTag,
- createMovieFileFlags);
- _res = Py_BuildValue("O&",
- MovieObj_New, _rv);
- return _res;
+ PyMac_PRECHECK(FlattenMovieDataToDataRef);
+#endif
+ if (!PyArg_ParseTuple(_args, "lO&O&O&hl",
+ &movieFlattenFlags,
+ ResObj_Convert, &dataRef,
+ PyMac_GetOSType, &dataRefType,
+ PyMac_GetOSType, &creator,
+ &scriptTag,
+ &createMovieFileFlags))
+ return NULL;
+ _rv = FlattenMovieDataToDataRef(_self->ob_itself,
+ movieFlattenFlags,
+ dataRef,
+ dataRefType,
+ creator,
+ scriptTag,
+ createMovieFileFlags);
+ _res = Py_BuildValue("O&",
+ MovieObj_New, _rv);
+ return _res;
}
static PyObject *MovieObj_MovieSearchText(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Ptr text;
- long size;
- long searchFlags;
- Track searchTrack;
- TimeValue searchTime;
- long searchOffset;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Ptr text;
+ long size;
+ long searchFlags;
+ Track searchTrack;
+ TimeValue searchTime;
+ long searchOffset;
#ifndef MovieSearchText
- PyMac_PRECHECK(MovieSearchText);
-#endif
- if (!PyArg_ParseTuple(_args, "sll",
- &text,
- &size,
- &searchFlags))
- return NULL;
- _err = MovieSearchText(_self->ob_itself,
- text,
- size,
- searchFlags,
- &searchTrack,
- &searchTime,
- &searchOffset);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&ll",
- TrackObj_New, searchTrack,
- searchTime,
- searchOffset);
- return _res;
+ PyMac_PRECHECK(MovieSearchText);
+#endif
+ if (!PyArg_ParseTuple(_args, "sll",
+ &text,
+ &size,
+ &searchFlags))
+ return NULL;
+ _err = MovieSearchText(_self->ob_itself,
+ text,
+ size,
+ searchFlags,
+ &searchTrack,
+ &searchTime,
+ &searchOffset);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&ll",
+ TrackObj_New, searchTrack,
+ searchTime,
+ searchOffset);
+ return _res;
}
static PyObject *MovieObj_GetPosterBox(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Rect boxRect;
+ PyObject *_res = NULL;
+ Rect boxRect;
#ifndef GetPosterBox
- PyMac_PRECHECK(GetPosterBox);
+ PyMac_PRECHECK(GetPosterBox);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- GetPosterBox(_self->ob_itself,
- &boxRect);
- _res = Py_BuildValue("O&",
- PyMac_BuildRect, &boxRect);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ GetPosterBox(_self->ob_itself,
+ &boxRect);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildRect, &boxRect);
+ return _res;
}
static PyObject *MovieObj_SetPosterBox(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Rect boxRect;
+ PyObject *_res = NULL;
+ Rect boxRect;
#ifndef SetPosterBox
- PyMac_PRECHECK(SetPosterBox);
+ PyMac_PRECHECK(SetPosterBox);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetRect, &boxRect))
- return NULL;
- SetPosterBox(_self->ob_itself,
- &boxRect);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetRect, &boxRect))
+ return NULL;
+ SetPosterBox(_self->ob_itself,
+ &boxRect);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MovieObj_GetMovieSegmentDisplayBoundsRgn(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RgnHandle _rv;
- TimeValue time;
- TimeValue duration;
+ PyObject *_res = NULL;
+ RgnHandle _rv;
+ TimeValue time;
+ TimeValue duration;
#ifndef GetMovieSegmentDisplayBoundsRgn
- PyMac_PRECHECK(GetMovieSegmentDisplayBoundsRgn);
+ PyMac_PRECHECK(GetMovieSegmentDisplayBoundsRgn);
#endif
- if (!PyArg_ParseTuple(_args, "ll",
- &time,
- &duration))
- return NULL;
- _rv = GetMovieSegmentDisplayBoundsRgn(_self->ob_itself,
- time,
- duration);
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "ll",
+ &time,
+ &duration))
+ return NULL;
+ _rv = GetMovieSegmentDisplayBoundsRgn(_self->ob_itself,
+ time,
+ duration);
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *MovieObj_GetMovieStatus(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- Track firstProblemTrack;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ Track firstProblemTrack;
#ifndef GetMovieStatus
- PyMac_PRECHECK(GetMovieStatus);
+ PyMac_PRECHECK(GetMovieStatus);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetMovieStatus(_self->ob_itself,
- &firstProblemTrack);
- _res = Py_BuildValue("lO&",
- _rv,
- TrackObj_New, firstProblemTrack);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetMovieStatus(_self->ob_itself,
+ &firstProblemTrack);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ TrackObj_New, firstProblemTrack);
+ return _res;
}
static PyObject *MovieObj_NewMovieController(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- MovieController _rv;
- Rect movieRect;
- long someFlags;
+ PyObject *_res = NULL;
+ MovieController _rv;
+ Rect movieRect;
+ long someFlags;
#ifndef NewMovieController
- PyMac_PRECHECK(NewMovieController);
+ PyMac_PRECHECK(NewMovieController);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- PyMac_GetRect, &movieRect,
- &someFlags))
- return NULL;
- _rv = NewMovieController(_self->ob_itself,
- &movieRect,
- someFlags);
- _res = Py_BuildValue("O&",
- MovieCtlObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ PyMac_GetRect, &movieRect,
+ &someFlags))
+ return NULL;
+ _rv = NewMovieController(_self->ob_itself,
+ &movieRect,
+ someFlags);
+ _res = Py_BuildValue("O&",
+ MovieCtlObj_New, _rv);
+ return _res;
}
static PyObject *MovieObj_PutMovieOnScrap(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- long movieScrapFlags;
+ PyObject *_res = NULL;
+ OSErr _err;
+ long movieScrapFlags;
#ifndef PutMovieOnScrap
- PyMac_PRECHECK(PutMovieOnScrap);
+ PyMac_PRECHECK(PutMovieOnScrap);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &movieScrapFlags))
- return NULL;
- _err = PutMovieOnScrap(_self->ob_itself,
- movieScrapFlags);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &movieScrapFlags))
+ return NULL;
+ _err = PutMovieOnScrap(_self->ob_itself,
+ movieScrapFlags);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MovieObj_SetMoviePlayHints(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- long flags;
- long flagsMask;
+ PyObject *_res = NULL;
+ long flags;
+ long flagsMask;
#ifndef SetMoviePlayHints
- PyMac_PRECHECK(SetMoviePlayHints);
+ PyMac_PRECHECK(SetMoviePlayHints);
#endif
- if (!PyArg_ParseTuple(_args, "ll",
- &flags,
- &flagsMask))
- return NULL;
- SetMoviePlayHints(_self->ob_itself,
- flags,
- flagsMask);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "ll",
+ &flags,
+ &flagsMask))
+ return NULL;
+ SetMoviePlayHints(_self->ob_itself,
+ flags,
+ flagsMask);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *MovieObj_GetMaxLoadedTimeInMovie(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- TimeValue time;
+ PyObject *_res = NULL;
+ OSErr _err;
+ TimeValue time;
#ifndef GetMaxLoadedTimeInMovie
- PyMac_PRECHECK(GetMaxLoadedTimeInMovie);
+ PyMac_PRECHECK(GetMaxLoadedTimeInMovie);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetMaxLoadedTimeInMovie(_self->ob_itself,
- &time);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- time);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetMaxLoadedTimeInMovie(_self->ob_itself,
+ &time);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ time);
+ return _res;
}
static PyObject *MovieObj_QTMovieNeedsTimeTable(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Boolean needsTimeTable;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Boolean needsTimeTable;
#ifndef QTMovieNeedsTimeTable
- PyMac_PRECHECK(QTMovieNeedsTimeTable);
+ PyMac_PRECHECK(QTMovieNeedsTimeTable);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = QTMovieNeedsTimeTable(_self->ob_itself,
- &needsTimeTable);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("b",
- needsTimeTable);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = QTMovieNeedsTimeTable(_self->ob_itself,
+ &needsTimeTable);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("b",
+ needsTimeTable);
+ return _res;
}
static PyObject *MovieObj_QTGetDataRefMaxFileOffset(MovieObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- OSType dataRefType;
- Handle dataRef;
- long offset;
+ PyObject *_res = NULL;
+ OSErr _err;
+ OSType dataRefType;
+ Handle dataRef;
+ long offset;
#ifndef QTGetDataRefMaxFileOffset
- PyMac_PRECHECK(QTGetDataRefMaxFileOffset);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- PyMac_GetOSType, &dataRefType,
- ResObj_Convert, &dataRef))
- return NULL;
- _err = QTGetDataRefMaxFileOffset(_self->ob_itself,
- dataRefType,
- dataRef,
- &offset);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- offset);
- return _res;
+ PyMac_PRECHECK(QTGetDataRefMaxFileOffset);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ PyMac_GetOSType, &dataRefType,
+ ResObj_Convert, &dataRef))
+ return NULL;
+ _err = QTGetDataRefMaxFileOffset(_self->ob_itself,
+ dataRefType,
+ dataRef,
+ &offset);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ offset);
+ return _res;
}
static PyMethodDef MovieObj_methods[] = {
- {"MoviesTask", (PyCFunction)MovieObj_MoviesTask, 1,
- PyDoc_STR("(long maxMilliSecToUse) -> None")},
- {"PrerollMovie", (PyCFunction)MovieObj_PrerollMovie, 1,
- PyDoc_STR("(TimeValue time, Fixed Rate) -> None")},
- {"AbortPrePrerollMovie", (PyCFunction)MovieObj_AbortPrePrerollMovie, 1,
- PyDoc_STR("(OSErr err) -> None")},
- {"LoadMovieIntoRam", (PyCFunction)MovieObj_LoadMovieIntoRam, 1,
- PyDoc_STR("(TimeValue time, TimeValue duration, long flags) -> None")},
- {"SetMovieActive", (PyCFunction)MovieObj_SetMovieActive, 1,
- PyDoc_STR("(Boolean active) -> None")},
- {"GetMovieActive", (PyCFunction)MovieObj_GetMovieActive, 1,
- PyDoc_STR("() -> (Boolean _rv)")},
- {"StartMovie", (PyCFunction)MovieObj_StartMovie, 1,
- PyDoc_STR("() -> None")},
- {"StopMovie", (PyCFunction)MovieObj_StopMovie, 1,
- PyDoc_STR("() -> None")},
- {"GoToBeginningOfMovie", (PyCFunction)MovieObj_GoToBeginningOfMovie, 1,
- PyDoc_STR("() -> None")},
- {"GoToEndOfMovie", (PyCFunction)MovieObj_GoToEndOfMovie, 1,
- PyDoc_STR("() -> None")},
- {"IsMovieDone", (PyCFunction)MovieObj_IsMovieDone, 1,
- PyDoc_STR("() -> (Boolean _rv)")},
- {"GetMoviePreviewMode", (PyCFunction)MovieObj_GetMoviePreviewMode, 1,
- PyDoc_STR("() -> (Boolean _rv)")},
- {"SetMoviePreviewMode", (PyCFunction)MovieObj_SetMoviePreviewMode, 1,
- PyDoc_STR("(Boolean usePreview) -> None")},
- {"ShowMoviePoster", (PyCFunction)MovieObj_ShowMoviePoster, 1,
- PyDoc_STR("() -> None")},
- {"GetMovieTimeBase", (PyCFunction)MovieObj_GetMovieTimeBase, 1,
- PyDoc_STR("() -> (TimeBase _rv)")},
- {"SetMovieMasterTimeBase", (PyCFunction)MovieObj_SetMovieMasterTimeBase, 1,
- PyDoc_STR("(TimeBase tb, TimeRecord slaveZero) -> None")},
- {"SetMovieMasterClock", (PyCFunction)MovieObj_SetMovieMasterClock, 1,
- PyDoc_STR("(Component clockMeister, TimeRecord slaveZero) -> None")},
- {"ChooseMovieClock", (PyCFunction)MovieObj_ChooseMovieClock, 1,
- PyDoc_STR("(long flags) -> None")},
- {"GetMovieGWorld", (PyCFunction)MovieObj_GetMovieGWorld, 1,
- PyDoc_STR("() -> (CGrafPtr port, GDHandle gdh)")},
- {"SetMovieGWorld", (PyCFunction)MovieObj_SetMovieGWorld, 1,
- PyDoc_STR("(CGrafPtr port, GDHandle gdh) -> None")},
- {"GetMovieNaturalBoundsRect", (PyCFunction)MovieObj_GetMovieNaturalBoundsRect, 1,
- PyDoc_STR("() -> (Rect naturalBounds)")},
- {"GetNextTrackForCompositing", (PyCFunction)MovieObj_GetNextTrackForCompositing, 1,
- PyDoc_STR("(Track theTrack) -> (Track _rv)")},
- {"GetPrevTrackForCompositing", (PyCFunction)MovieObj_GetPrevTrackForCompositing, 1,
- PyDoc_STR("(Track theTrack) -> (Track _rv)")},
- {"GetMoviePict", (PyCFunction)MovieObj_GetMoviePict, 1,
- PyDoc_STR("(TimeValue time) -> (PicHandle _rv)")},
- {"GetMoviePosterPict", (PyCFunction)MovieObj_GetMoviePosterPict, 1,
- PyDoc_STR("() -> (PicHandle _rv)")},
- {"UpdateMovie", (PyCFunction)MovieObj_UpdateMovie, 1,
- PyDoc_STR("() -> None")},
- {"InvalidateMovieRegion", (PyCFunction)MovieObj_InvalidateMovieRegion, 1,
- PyDoc_STR("(RgnHandle invalidRgn) -> None")},
- {"GetMovieBox", (PyCFunction)MovieObj_GetMovieBox, 1,
- PyDoc_STR("() -> (Rect boxRect)")},
- {"SetMovieBox", (PyCFunction)MovieObj_SetMovieBox, 1,
- PyDoc_STR("(Rect boxRect) -> None")},
- {"GetMovieDisplayClipRgn", (PyCFunction)MovieObj_GetMovieDisplayClipRgn, 1,
- PyDoc_STR("() -> (RgnHandle _rv)")},
- {"SetMovieDisplayClipRgn", (PyCFunction)MovieObj_SetMovieDisplayClipRgn, 1,
- PyDoc_STR("(RgnHandle theClip) -> None")},
- {"GetMovieClipRgn", (PyCFunction)MovieObj_GetMovieClipRgn, 1,
- PyDoc_STR("() -> (RgnHandle _rv)")},
- {"SetMovieClipRgn", (PyCFunction)MovieObj_SetMovieClipRgn, 1,
- PyDoc_STR("(RgnHandle theClip) -> None")},
- {"GetMovieDisplayBoundsRgn", (PyCFunction)MovieObj_GetMovieDisplayBoundsRgn, 1,
- PyDoc_STR("() -> (RgnHandle _rv)")},
- {"GetMovieBoundsRgn", (PyCFunction)MovieObj_GetMovieBoundsRgn, 1,
- PyDoc_STR("() -> (RgnHandle _rv)")},
- {"SetMovieVideoOutput", (PyCFunction)MovieObj_SetMovieVideoOutput, 1,
- PyDoc_STR("(ComponentInstance vout) -> None")},
- {"PutMovieIntoHandle", (PyCFunction)MovieObj_PutMovieIntoHandle, 1,
- PyDoc_STR("(Handle publicMovie) -> None")},
- {"PutMovieIntoDataFork", (PyCFunction)MovieObj_PutMovieIntoDataFork, 1,
- PyDoc_STR("(short fRefNum, long offset, long maxSize) -> None")},
- {"PutMovieIntoDataFork64", (PyCFunction)MovieObj_PutMovieIntoDataFork64, 1,
- PyDoc_STR("(long fRefNum, wide offset, unsigned long maxSize) -> None")},
- {"PutMovieIntoStorage", (PyCFunction)MovieObj_PutMovieIntoStorage, 1,
- PyDoc_STR("(DataHandler dh, wide offset, unsigned long maxSize) -> None")},
- {"PutMovieForDataRefIntoHandle", (PyCFunction)MovieObj_PutMovieForDataRefIntoHandle, 1,
- PyDoc_STR("(Handle dataRef, OSType dataRefType, Handle publicMovie) -> None")},
- {"GetMovieCreationTime", (PyCFunction)MovieObj_GetMovieCreationTime, 1,
- PyDoc_STR("() -> (unsigned long _rv)")},
- {"GetMovieModificationTime", (PyCFunction)MovieObj_GetMovieModificationTime, 1,
- PyDoc_STR("() -> (unsigned long _rv)")},
- {"GetMovieTimeScale", (PyCFunction)MovieObj_GetMovieTimeScale, 1,
- PyDoc_STR("() -> (TimeScale _rv)")},
- {"SetMovieTimeScale", (PyCFunction)MovieObj_SetMovieTimeScale, 1,
- PyDoc_STR("(TimeScale timeScale) -> None")},
- {"GetMovieDuration", (PyCFunction)MovieObj_GetMovieDuration, 1,
- PyDoc_STR("() -> (TimeValue _rv)")},
- {"GetMovieRate", (PyCFunction)MovieObj_GetMovieRate, 1,
- PyDoc_STR("() -> (Fixed _rv)")},
- {"SetMovieRate", (PyCFunction)MovieObj_SetMovieRate, 1,
- PyDoc_STR("(Fixed rate) -> None")},
- {"GetMoviePreferredRate", (PyCFunction)MovieObj_GetMoviePreferredRate, 1,
- PyDoc_STR("() -> (Fixed _rv)")},
- {"SetMoviePreferredRate", (PyCFunction)MovieObj_SetMoviePreferredRate, 1,
- PyDoc_STR("(Fixed rate) -> None")},
- {"GetMoviePreferredVolume", (PyCFunction)MovieObj_GetMoviePreferredVolume, 1,
- PyDoc_STR("() -> (short _rv)")},
- {"SetMoviePreferredVolume", (PyCFunction)MovieObj_SetMoviePreferredVolume, 1,
- PyDoc_STR("(short volume) -> None")},
- {"GetMovieVolume", (PyCFunction)MovieObj_GetMovieVolume, 1,
- PyDoc_STR("() -> (short _rv)")},
- {"SetMovieVolume", (PyCFunction)MovieObj_SetMovieVolume, 1,
- PyDoc_STR("(short volume) -> None")},
- {"GetMoviePreviewTime", (PyCFunction)MovieObj_GetMoviePreviewTime, 1,
- PyDoc_STR("() -> (TimeValue previewTime, TimeValue previewDuration)")},
- {"SetMoviePreviewTime", (PyCFunction)MovieObj_SetMoviePreviewTime, 1,
- PyDoc_STR("(TimeValue previewTime, TimeValue previewDuration) -> None")},
- {"GetMoviePosterTime", (PyCFunction)MovieObj_GetMoviePosterTime, 1,
- PyDoc_STR("() -> (TimeValue _rv)")},
- {"SetMoviePosterTime", (PyCFunction)MovieObj_SetMoviePosterTime, 1,
- PyDoc_STR("(TimeValue posterTime) -> None")},
- {"GetMovieSelection", (PyCFunction)MovieObj_GetMovieSelection, 1,
- PyDoc_STR("() -> (TimeValue selectionTime, TimeValue selectionDuration)")},
- {"SetMovieSelection", (PyCFunction)MovieObj_SetMovieSelection, 1,
- PyDoc_STR("(TimeValue selectionTime, TimeValue selectionDuration) -> None")},
- {"SetMovieActiveSegment", (PyCFunction)MovieObj_SetMovieActiveSegment, 1,
- PyDoc_STR("(TimeValue startTime, TimeValue duration) -> None")},
- {"GetMovieActiveSegment", (PyCFunction)MovieObj_GetMovieActiveSegment, 1,
- PyDoc_STR("() -> (TimeValue startTime, TimeValue duration)")},
- {"GetMovieTime", (PyCFunction)MovieObj_GetMovieTime, 1,
- PyDoc_STR("() -> (TimeValue _rv, TimeRecord currentTime)")},
- {"SetMovieTime", (PyCFunction)MovieObj_SetMovieTime, 1,
- PyDoc_STR("(TimeRecord newtime) -> None")},
- {"SetMovieTimeValue", (PyCFunction)MovieObj_SetMovieTimeValue, 1,
- PyDoc_STR("(TimeValue newtime) -> None")},
- {"GetMovieUserData", (PyCFunction)MovieObj_GetMovieUserData, 1,
- PyDoc_STR("() -> (UserData _rv)")},
- {"GetMovieTrackCount", (PyCFunction)MovieObj_GetMovieTrackCount, 1,
- PyDoc_STR("() -> (long _rv)")},
- {"GetMovieTrack", (PyCFunction)MovieObj_GetMovieTrack, 1,
- PyDoc_STR("(long trackID) -> (Track _rv)")},
- {"GetMovieIndTrack", (PyCFunction)MovieObj_GetMovieIndTrack, 1,
- PyDoc_STR("(long index) -> (Track _rv)")},
- {"GetMovieIndTrackType", (PyCFunction)MovieObj_GetMovieIndTrackType, 1,
- PyDoc_STR("(long index, OSType trackType, long flags) -> (Track _rv)")},
- {"NewMovieTrack", (PyCFunction)MovieObj_NewMovieTrack, 1,
- PyDoc_STR("(Fixed width, Fixed height, short trackVolume) -> (Track _rv)")},
- {"SetAutoTrackAlternatesEnabled", (PyCFunction)MovieObj_SetAutoTrackAlternatesEnabled, 1,
- PyDoc_STR("(Boolean enable) -> None")},
- {"SelectMovieAlternates", (PyCFunction)MovieObj_SelectMovieAlternates, 1,
- PyDoc_STR("() -> None")},
- {"InsertMovieSegment", (PyCFunction)MovieObj_InsertMovieSegment, 1,
- PyDoc_STR("(Movie dstMovie, TimeValue srcIn, TimeValue srcDuration, TimeValue dstIn) -> None")},
- {"InsertEmptyMovieSegment", (PyCFunction)MovieObj_InsertEmptyMovieSegment, 1,
- PyDoc_STR("(TimeValue dstIn, TimeValue dstDuration) -> None")},
- {"DeleteMovieSegment", (PyCFunction)MovieObj_DeleteMovieSegment, 1,
- PyDoc_STR("(TimeValue startTime, TimeValue duration) -> None")},
- {"ScaleMovieSegment", (PyCFunction)MovieObj_ScaleMovieSegment, 1,
- PyDoc_STR("(TimeValue startTime, TimeValue oldDuration, TimeValue newDuration) -> None")},
- {"CutMovieSelection", (PyCFunction)MovieObj_CutMovieSelection, 1,
- PyDoc_STR("() -> (Movie _rv)")},
- {"CopyMovieSelection", (PyCFunction)MovieObj_CopyMovieSelection, 1,
- PyDoc_STR("() -> (Movie _rv)")},
- {"PasteMovieSelection", (PyCFunction)MovieObj_PasteMovieSelection, 1,
- PyDoc_STR("(Movie src) -> None")},
- {"AddMovieSelection", (PyCFunction)MovieObj_AddMovieSelection, 1,
- PyDoc_STR("(Movie src) -> None")},
- {"ClearMovieSelection", (PyCFunction)MovieObj_ClearMovieSelection, 1,
- PyDoc_STR("() -> None")},
- {"PutMovieIntoTypedHandle", (PyCFunction)MovieObj_PutMovieIntoTypedHandle, 1,
- PyDoc_STR("(Track targetTrack, OSType handleType, Handle publicMovie, TimeValue start, TimeValue dur, long flags, ComponentInstance userComp) -> None")},
- {"CopyMovieSettings", (PyCFunction)MovieObj_CopyMovieSettings, 1,
- PyDoc_STR("(Movie dstMovie) -> None")},
- {"ConvertMovieToFile", (PyCFunction)MovieObj_ConvertMovieToFile, 1,
- PyDoc_STR("(Track onlyTrack, FSSpec outputFile, OSType fileType, OSType creator, ScriptCode scriptTag, long flags, ComponentInstance userComp) -> (short resID)")},
- {"GetMovieDataSize", (PyCFunction)MovieObj_GetMovieDataSize, 1,
- PyDoc_STR("(TimeValue startTime, TimeValue duration) -> (long _rv)")},
- {"GetMovieDataSize64", (PyCFunction)MovieObj_GetMovieDataSize64, 1,
- PyDoc_STR("(TimeValue startTime, TimeValue duration) -> (wide dataSize)")},
- {"PtInMovie", (PyCFunction)MovieObj_PtInMovie, 1,
- PyDoc_STR("(Point pt) -> (Boolean _rv)")},
- {"SetMovieLanguage", (PyCFunction)MovieObj_SetMovieLanguage, 1,
- PyDoc_STR("(long language) -> None")},
- {"CopyMovieUserData", (PyCFunction)MovieObj_CopyMovieUserData, 1,
- PyDoc_STR("(Movie dstMovie, OSType copyRule) -> None")},
- {"GetMovieNextInterestingTime", (PyCFunction)MovieObj_GetMovieNextInterestingTime, 1,
- PyDoc_STR("(short interestingTimeFlags, short numMediaTypes, OSType whichMediaTypes, TimeValue time, Fixed rate) -> (TimeValue interestingTime, TimeValue interestingDuration)")},
- {"AddMovieResource", (PyCFunction)MovieObj_AddMovieResource, 1,
- PyDoc_STR("(short resRefNum, Str255 resName) -> (short resId)")},
- {"UpdateMovieResource", (PyCFunction)MovieObj_UpdateMovieResource, 1,
- PyDoc_STR("(short resRefNum, short resId, Str255 resName) -> None")},
- {"AddMovieToStorage", (PyCFunction)MovieObj_AddMovieToStorage, 1,
- PyDoc_STR("(DataHandler dh) -> None")},
- {"UpdateMovieInStorage", (PyCFunction)MovieObj_UpdateMovieInStorage, 1,
- PyDoc_STR("(DataHandler dh) -> None")},
- {"HasMovieChanged", (PyCFunction)MovieObj_HasMovieChanged, 1,
- PyDoc_STR("() -> (Boolean _rv)")},
- {"ClearMovieChanged", (PyCFunction)MovieObj_ClearMovieChanged, 1,
- PyDoc_STR("() -> None")},
- {"SetMovieDefaultDataRef", (PyCFunction)MovieObj_SetMovieDefaultDataRef, 1,
- PyDoc_STR("(Handle dataRef, OSType dataRefType) -> None")},
- {"GetMovieDefaultDataRef", (PyCFunction)MovieObj_GetMovieDefaultDataRef, 1,
- PyDoc_STR("() -> (Handle dataRef, OSType dataRefType)")},
- {"SetMovieColorTable", (PyCFunction)MovieObj_SetMovieColorTable, 1,
- PyDoc_STR("(CTabHandle ctab) -> None")},
- {"GetMovieColorTable", (PyCFunction)MovieObj_GetMovieColorTable, 1,
- PyDoc_STR("() -> (CTabHandle ctab)")},
- {"FlattenMovie", (PyCFunction)MovieObj_FlattenMovie, 1,
- PyDoc_STR("(long movieFlattenFlags, FSSpec theFile, OSType creator, ScriptCode scriptTag, long createMovieFileFlags, Str255 resName) -> (short resId)")},
- {"FlattenMovieData", (PyCFunction)MovieObj_FlattenMovieData, 1,
- PyDoc_STR("(long movieFlattenFlags, FSSpec theFile, OSType creator, ScriptCode scriptTag, long createMovieFileFlags) -> (Movie _rv)")},
- {"FlattenMovieDataToDataRef", (PyCFunction)MovieObj_FlattenMovieDataToDataRef, 1,
- PyDoc_STR("(long movieFlattenFlags, Handle dataRef, OSType dataRefType, OSType creator, ScriptCode scriptTag, long createMovieFileFlags) -> (Movie _rv)")},
- {"MovieSearchText", (PyCFunction)MovieObj_MovieSearchText, 1,
- PyDoc_STR("(Ptr text, long size, long searchFlags) -> (Track searchTrack, TimeValue searchTime, long searchOffset)")},
- {"GetPosterBox", (PyCFunction)MovieObj_GetPosterBox, 1,
- PyDoc_STR("() -> (Rect boxRect)")},
- {"SetPosterBox", (PyCFunction)MovieObj_SetPosterBox, 1,
- PyDoc_STR("(Rect boxRect) -> None")},
- {"GetMovieSegmentDisplayBoundsRgn", (PyCFunction)MovieObj_GetMovieSegmentDisplayBoundsRgn, 1,
- PyDoc_STR("(TimeValue time, TimeValue duration) -> (RgnHandle _rv)")},
- {"GetMovieStatus", (PyCFunction)MovieObj_GetMovieStatus, 1,
- PyDoc_STR("() -> (ComponentResult _rv, Track firstProblemTrack)")},
- {"NewMovieController", (PyCFunction)MovieObj_NewMovieController, 1,
- PyDoc_STR("(Rect movieRect, long someFlags) -> (MovieController _rv)")},
- {"PutMovieOnScrap", (PyCFunction)MovieObj_PutMovieOnScrap, 1,
- PyDoc_STR("(long movieScrapFlags) -> None")},
- {"SetMoviePlayHints", (PyCFunction)MovieObj_SetMoviePlayHints, 1,
- PyDoc_STR("(long flags, long flagsMask) -> None")},
- {"GetMaxLoadedTimeInMovie", (PyCFunction)MovieObj_GetMaxLoadedTimeInMovie, 1,
- PyDoc_STR("() -> (TimeValue time)")},
- {"QTMovieNeedsTimeTable", (PyCFunction)MovieObj_QTMovieNeedsTimeTable, 1,
- PyDoc_STR("() -> (Boolean needsTimeTable)")},
- {"QTGetDataRefMaxFileOffset", (PyCFunction)MovieObj_QTGetDataRefMaxFileOffset, 1,
- PyDoc_STR("(OSType dataRefType, Handle dataRef) -> (long offset)")},
- {NULL, NULL, 0}
+ {"MoviesTask", (PyCFunction)MovieObj_MoviesTask, 1,
+ PyDoc_STR("(long maxMilliSecToUse) -> None")},
+ {"PrerollMovie", (PyCFunction)MovieObj_PrerollMovie, 1,
+ PyDoc_STR("(TimeValue time, Fixed Rate) -> None")},
+ {"AbortPrePrerollMovie", (PyCFunction)MovieObj_AbortPrePrerollMovie, 1,
+ PyDoc_STR("(OSErr err) -> None")},
+ {"LoadMovieIntoRam", (PyCFunction)MovieObj_LoadMovieIntoRam, 1,
+ PyDoc_STR("(TimeValue time, TimeValue duration, long flags) -> None")},
+ {"SetMovieActive", (PyCFunction)MovieObj_SetMovieActive, 1,
+ PyDoc_STR("(Boolean active) -> None")},
+ {"GetMovieActive", (PyCFunction)MovieObj_GetMovieActive, 1,
+ PyDoc_STR("() -> (Boolean _rv)")},
+ {"StartMovie", (PyCFunction)MovieObj_StartMovie, 1,
+ PyDoc_STR("() -> None")},
+ {"StopMovie", (PyCFunction)MovieObj_StopMovie, 1,
+ PyDoc_STR("() -> None")},
+ {"GoToBeginningOfMovie", (PyCFunction)MovieObj_GoToBeginningOfMovie, 1,
+ PyDoc_STR("() -> None")},
+ {"GoToEndOfMovie", (PyCFunction)MovieObj_GoToEndOfMovie, 1,
+ PyDoc_STR("() -> None")},
+ {"IsMovieDone", (PyCFunction)MovieObj_IsMovieDone, 1,
+ PyDoc_STR("() -> (Boolean _rv)")},
+ {"GetMoviePreviewMode", (PyCFunction)MovieObj_GetMoviePreviewMode, 1,
+ PyDoc_STR("() -> (Boolean _rv)")},
+ {"SetMoviePreviewMode", (PyCFunction)MovieObj_SetMoviePreviewMode, 1,
+ PyDoc_STR("(Boolean usePreview) -> None")},
+ {"ShowMoviePoster", (PyCFunction)MovieObj_ShowMoviePoster, 1,
+ PyDoc_STR("() -> None")},
+ {"GetMovieTimeBase", (PyCFunction)MovieObj_GetMovieTimeBase, 1,
+ PyDoc_STR("() -> (TimeBase _rv)")},
+ {"SetMovieMasterTimeBase", (PyCFunction)MovieObj_SetMovieMasterTimeBase, 1,
+ PyDoc_STR("(TimeBase tb, TimeRecord slaveZero) -> None")},
+ {"SetMovieMasterClock", (PyCFunction)MovieObj_SetMovieMasterClock, 1,
+ PyDoc_STR("(Component clockMeister, TimeRecord slaveZero) -> None")},
+ {"ChooseMovieClock", (PyCFunction)MovieObj_ChooseMovieClock, 1,
+ PyDoc_STR("(long flags) -> None")},
+ {"GetMovieGWorld", (PyCFunction)MovieObj_GetMovieGWorld, 1,
+ PyDoc_STR("() -> (CGrafPtr port, GDHandle gdh)")},
+ {"SetMovieGWorld", (PyCFunction)MovieObj_SetMovieGWorld, 1,
+ PyDoc_STR("(CGrafPtr port, GDHandle gdh) -> None")},
+ {"GetMovieNaturalBoundsRect", (PyCFunction)MovieObj_GetMovieNaturalBoundsRect, 1,
+ PyDoc_STR("() -> (Rect naturalBounds)")},
+ {"GetNextTrackForCompositing", (PyCFunction)MovieObj_GetNextTrackForCompositing, 1,
+ PyDoc_STR("(Track theTrack) -> (Track _rv)")},
+ {"GetPrevTrackForCompositing", (PyCFunction)MovieObj_GetPrevTrackForCompositing, 1,
+ PyDoc_STR("(Track theTrack) -> (Track _rv)")},
+ {"GetMoviePict", (PyCFunction)MovieObj_GetMoviePict, 1,
+ PyDoc_STR("(TimeValue time) -> (PicHandle _rv)")},
+ {"GetMoviePosterPict", (PyCFunction)MovieObj_GetMoviePosterPict, 1,
+ PyDoc_STR("() -> (PicHandle _rv)")},
+ {"UpdateMovie", (PyCFunction)MovieObj_UpdateMovie, 1,
+ PyDoc_STR("() -> None")},
+ {"InvalidateMovieRegion", (PyCFunction)MovieObj_InvalidateMovieRegion, 1,
+ PyDoc_STR("(RgnHandle invalidRgn) -> None")},
+ {"GetMovieBox", (PyCFunction)MovieObj_GetMovieBox, 1,
+ PyDoc_STR("() -> (Rect boxRect)")},
+ {"SetMovieBox", (PyCFunction)MovieObj_SetMovieBox, 1,
+ PyDoc_STR("(Rect boxRect) -> None")},
+ {"GetMovieDisplayClipRgn", (PyCFunction)MovieObj_GetMovieDisplayClipRgn, 1,
+ PyDoc_STR("() -> (RgnHandle _rv)")},
+ {"SetMovieDisplayClipRgn", (PyCFunction)MovieObj_SetMovieDisplayClipRgn, 1,
+ PyDoc_STR("(RgnHandle theClip) -> None")},
+ {"GetMovieClipRgn", (PyCFunction)MovieObj_GetMovieClipRgn, 1,
+ PyDoc_STR("() -> (RgnHandle _rv)")},
+ {"SetMovieClipRgn", (PyCFunction)MovieObj_SetMovieClipRgn, 1,
+ PyDoc_STR("(RgnHandle theClip) -> None")},
+ {"GetMovieDisplayBoundsRgn", (PyCFunction)MovieObj_GetMovieDisplayBoundsRgn, 1,
+ PyDoc_STR("() -> (RgnHandle _rv)")},
+ {"GetMovieBoundsRgn", (PyCFunction)MovieObj_GetMovieBoundsRgn, 1,
+ PyDoc_STR("() -> (RgnHandle _rv)")},
+ {"SetMovieVideoOutput", (PyCFunction)MovieObj_SetMovieVideoOutput, 1,
+ PyDoc_STR("(ComponentInstance vout) -> None")},
+ {"PutMovieIntoHandle", (PyCFunction)MovieObj_PutMovieIntoHandle, 1,
+ PyDoc_STR("(Handle publicMovie) -> None")},
+ {"PutMovieIntoDataFork", (PyCFunction)MovieObj_PutMovieIntoDataFork, 1,
+ PyDoc_STR("(short fRefNum, long offset, long maxSize) -> None")},
+ {"PutMovieIntoDataFork64", (PyCFunction)MovieObj_PutMovieIntoDataFork64, 1,
+ PyDoc_STR("(long fRefNum, wide offset, unsigned long maxSize) -> None")},
+ {"PutMovieIntoStorage", (PyCFunction)MovieObj_PutMovieIntoStorage, 1,
+ PyDoc_STR("(DataHandler dh, wide offset, unsigned long maxSize) -> None")},
+ {"PutMovieForDataRefIntoHandle", (PyCFunction)MovieObj_PutMovieForDataRefIntoHandle, 1,
+ PyDoc_STR("(Handle dataRef, OSType dataRefType, Handle publicMovie) -> None")},
+ {"GetMovieCreationTime", (PyCFunction)MovieObj_GetMovieCreationTime, 1,
+ PyDoc_STR("() -> (unsigned long _rv)")},
+ {"GetMovieModificationTime", (PyCFunction)MovieObj_GetMovieModificationTime, 1,
+ PyDoc_STR("() -> (unsigned long _rv)")},
+ {"GetMovieTimeScale", (PyCFunction)MovieObj_GetMovieTimeScale, 1,
+ PyDoc_STR("() -> (TimeScale _rv)")},
+ {"SetMovieTimeScale", (PyCFunction)MovieObj_SetMovieTimeScale, 1,
+ PyDoc_STR("(TimeScale timeScale) -> None")},
+ {"GetMovieDuration", (PyCFunction)MovieObj_GetMovieDuration, 1,
+ PyDoc_STR("() -> (TimeValue _rv)")},
+ {"GetMovieRate", (PyCFunction)MovieObj_GetMovieRate, 1,
+ PyDoc_STR("() -> (Fixed _rv)")},
+ {"SetMovieRate", (PyCFunction)MovieObj_SetMovieRate, 1,
+ PyDoc_STR("(Fixed rate) -> None")},
+ {"GetMoviePreferredRate", (PyCFunction)MovieObj_GetMoviePreferredRate, 1,
+ PyDoc_STR("() -> (Fixed _rv)")},
+ {"SetMoviePreferredRate", (PyCFunction)MovieObj_SetMoviePreferredRate, 1,
+ PyDoc_STR("(Fixed rate) -> None")},
+ {"GetMoviePreferredVolume", (PyCFunction)MovieObj_GetMoviePreferredVolume, 1,
+ PyDoc_STR("() -> (short _rv)")},
+ {"SetMoviePreferredVolume", (PyCFunction)MovieObj_SetMoviePreferredVolume, 1,
+ PyDoc_STR("(short volume) -> None")},
+ {"GetMovieVolume", (PyCFunction)MovieObj_GetMovieVolume, 1,
+ PyDoc_STR("() -> (short _rv)")},
+ {"SetMovieVolume", (PyCFunction)MovieObj_SetMovieVolume, 1,
+ PyDoc_STR("(short volume) -> None")},
+ {"GetMoviePreviewTime", (PyCFunction)MovieObj_GetMoviePreviewTime, 1,
+ PyDoc_STR("() -> (TimeValue previewTime, TimeValue previewDuration)")},
+ {"SetMoviePreviewTime", (PyCFunction)MovieObj_SetMoviePreviewTime, 1,
+ PyDoc_STR("(TimeValue previewTime, TimeValue previewDuration) -> None")},
+ {"GetMoviePosterTime", (PyCFunction)MovieObj_GetMoviePosterTime, 1,
+ PyDoc_STR("() -> (TimeValue _rv)")},
+ {"SetMoviePosterTime", (PyCFunction)MovieObj_SetMoviePosterTime, 1,
+ PyDoc_STR("(TimeValue posterTime) -> None")},
+ {"GetMovieSelection", (PyCFunction)MovieObj_GetMovieSelection, 1,
+ PyDoc_STR("() -> (TimeValue selectionTime, TimeValue selectionDuration)")},
+ {"SetMovieSelection", (PyCFunction)MovieObj_SetMovieSelection, 1,
+ PyDoc_STR("(TimeValue selectionTime, TimeValue selectionDuration) -> None")},
+ {"SetMovieActiveSegment", (PyCFunction)MovieObj_SetMovieActiveSegment, 1,
+ PyDoc_STR("(TimeValue startTime, TimeValue duration) -> None")},
+ {"GetMovieActiveSegment", (PyCFunction)MovieObj_GetMovieActiveSegment, 1,
+ PyDoc_STR("() -> (TimeValue startTime, TimeValue duration)")},
+ {"GetMovieTime", (PyCFunction)MovieObj_GetMovieTime, 1,
+ PyDoc_STR("() -> (TimeValue _rv, TimeRecord currentTime)")},
+ {"SetMovieTime", (PyCFunction)MovieObj_SetMovieTime, 1,
+ PyDoc_STR("(TimeRecord newtime) -> None")},
+ {"SetMovieTimeValue", (PyCFunction)MovieObj_SetMovieTimeValue, 1,
+ PyDoc_STR("(TimeValue newtime) -> None")},
+ {"GetMovieUserData", (PyCFunction)MovieObj_GetMovieUserData, 1,
+ PyDoc_STR("() -> (UserData _rv)")},
+ {"GetMovieTrackCount", (PyCFunction)MovieObj_GetMovieTrackCount, 1,
+ PyDoc_STR("() -> (long _rv)")},
+ {"GetMovieTrack", (PyCFunction)MovieObj_GetMovieTrack, 1,
+ PyDoc_STR("(long trackID) -> (Track _rv)")},
+ {"GetMovieIndTrack", (PyCFunction)MovieObj_GetMovieIndTrack, 1,
+ PyDoc_STR("(long index) -> (Track _rv)")},
+ {"GetMovieIndTrackType", (PyCFunction)MovieObj_GetMovieIndTrackType, 1,
+ PyDoc_STR("(long index, OSType trackType, long flags) -> (Track _rv)")},
+ {"NewMovieTrack", (PyCFunction)MovieObj_NewMovieTrack, 1,
+ PyDoc_STR("(Fixed width, Fixed height, short trackVolume) -> (Track _rv)")},
+ {"SetAutoTrackAlternatesEnabled", (PyCFunction)MovieObj_SetAutoTrackAlternatesEnabled, 1,
+ PyDoc_STR("(Boolean enable) -> None")},
+ {"SelectMovieAlternates", (PyCFunction)MovieObj_SelectMovieAlternates, 1,
+ PyDoc_STR("() -> None")},
+ {"InsertMovieSegment", (PyCFunction)MovieObj_InsertMovieSegment, 1,
+ PyDoc_STR("(Movie dstMovie, TimeValue srcIn, TimeValue srcDuration, TimeValue dstIn) -> None")},
+ {"InsertEmptyMovieSegment", (PyCFunction)MovieObj_InsertEmptyMovieSegment, 1,
+ PyDoc_STR("(TimeValue dstIn, TimeValue dstDuration) -> None")},
+ {"DeleteMovieSegment", (PyCFunction)MovieObj_DeleteMovieSegment, 1,
+ PyDoc_STR("(TimeValue startTime, TimeValue duration) -> None")},
+ {"ScaleMovieSegment", (PyCFunction)MovieObj_ScaleMovieSegment, 1,
+ PyDoc_STR("(TimeValue startTime, TimeValue oldDuration, TimeValue newDuration) -> None")},
+ {"CutMovieSelection", (PyCFunction)MovieObj_CutMovieSelection, 1,
+ PyDoc_STR("() -> (Movie _rv)")},
+ {"CopyMovieSelection", (PyCFunction)MovieObj_CopyMovieSelection, 1,
+ PyDoc_STR("() -> (Movie _rv)")},
+ {"PasteMovieSelection", (PyCFunction)MovieObj_PasteMovieSelection, 1,
+ PyDoc_STR("(Movie src) -> None")},
+ {"AddMovieSelection", (PyCFunction)MovieObj_AddMovieSelection, 1,
+ PyDoc_STR("(Movie src) -> None")},
+ {"ClearMovieSelection", (PyCFunction)MovieObj_ClearMovieSelection, 1,
+ PyDoc_STR("() -> None")},
+ {"PutMovieIntoTypedHandle", (PyCFunction)MovieObj_PutMovieIntoTypedHandle, 1,
+ PyDoc_STR("(Track targetTrack, OSType handleType, Handle publicMovie, TimeValue start, TimeValue dur, long flags, ComponentInstance userComp) -> None")},
+ {"CopyMovieSettings", (PyCFunction)MovieObj_CopyMovieSettings, 1,
+ PyDoc_STR("(Movie dstMovie) -> None")},
+ {"ConvertMovieToFile", (PyCFunction)MovieObj_ConvertMovieToFile, 1,
+ PyDoc_STR("(Track onlyTrack, FSSpec outputFile, OSType fileType, OSType creator, ScriptCode scriptTag, long flags, ComponentInstance userComp) -> (short resID)")},
+ {"GetMovieDataSize", (PyCFunction)MovieObj_GetMovieDataSize, 1,
+ PyDoc_STR("(TimeValue startTime, TimeValue duration) -> (long _rv)")},
+ {"GetMovieDataSize64", (PyCFunction)MovieObj_GetMovieDataSize64, 1,
+ PyDoc_STR("(TimeValue startTime, TimeValue duration) -> (wide dataSize)")},
+ {"PtInMovie", (PyCFunction)MovieObj_PtInMovie, 1,
+ PyDoc_STR("(Point pt) -> (Boolean _rv)")},
+ {"SetMovieLanguage", (PyCFunction)MovieObj_SetMovieLanguage, 1,
+ PyDoc_STR("(long language) -> None")},
+ {"CopyMovieUserData", (PyCFunction)MovieObj_CopyMovieUserData, 1,
+ PyDoc_STR("(Movie dstMovie, OSType copyRule) -> None")},
+ {"GetMovieNextInterestingTime", (PyCFunction)MovieObj_GetMovieNextInterestingTime, 1,
+ PyDoc_STR("(short interestingTimeFlags, short numMediaTypes, OSType whichMediaTypes, TimeValue time, Fixed rate) -> (TimeValue interestingTime, TimeValue interestingDuration)")},
+ {"AddMovieResource", (PyCFunction)MovieObj_AddMovieResource, 1,
+ PyDoc_STR("(short resRefNum, Str255 resName) -> (short resId)")},
+ {"UpdateMovieResource", (PyCFunction)MovieObj_UpdateMovieResource, 1,
+ PyDoc_STR("(short resRefNum, short resId, Str255 resName) -> None")},
+ {"AddMovieToStorage", (PyCFunction)MovieObj_AddMovieToStorage, 1,
+ PyDoc_STR("(DataHandler dh) -> None")},
+ {"UpdateMovieInStorage", (PyCFunction)MovieObj_UpdateMovieInStorage, 1,
+ PyDoc_STR("(DataHandler dh) -> None")},
+ {"HasMovieChanged", (PyCFunction)MovieObj_HasMovieChanged, 1,
+ PyDoc_STR("() -> (Boolean _rv)")},
+ {"ClearMovieChanged", (PyCFunction)MovieObj_ClearMovieChanged, 1,
+ PyDoc_STR("() -> None")},
+ {"SetMovieDefaultDataRef", (PyCFunction)MovieObj_SetMovieDefaultDataRef, 1,
+ PyDoc_STR("(Handle dataRef, OSType dataRefType) -> None")},
+ {"GetMovieDefaultDataRef", (PyCFunction)MovieObj_GetMovieDefaultDataRef, 1,
+ PyDoc_STR("() -> (Handle dataRef, OSType dataRefType)")},
+ {"SetMovieColorTable", (PyCFunction)MovieObj_SetMovieColorTable, 1,
+ PyDoc_STR("(CTabHandle ctab) -> None")},
+ {"GetMovieColorTable", (PyCFunction)MovieObj_GetMovieColorTable, 1,
+ PyDoc_STR("() -> (CTabHandle ctab)")},
+ {"FlattenMovie", (PyCFunction)MovieObj_FlattenMovie, 1,
+ PyDoc_STR("(long movieFlattenFlags, FSSpec theFile, OSType creator, ScriptCode scriptTag, long createMovieFileFlags, Str255 resName) -> (short resId)")},
+ {"FlattenMovieData", (PyCFunction)MovieObj_FlattenMovieData, 1,
+ PyDoc_STR("(long movieFlattenFlags, FSSpec theFile, OSType creator, ScriptCode scriptTag, long createMovieFileFlags) -> (Movie _rv)")},
+ {"FlattenMovieDataToDataRef", (PyCFunction)MovieObj_FlattenMovieDataToDataRef, 1,
+ PyDoc_STR("(long movieFlattenFlags, Handle dataRef, OSType dataRefType, OSType creator, ScriptCode scriptTag, long createMovieFileFlags) -> (Movie _rv)")},
+ {"MovieSearchText", (PyCFunction)MovieObj_MovieSearchText, 1,
+ PyDoc_STR("(Ptr text, long size, long searchFlags) -> (Track searchTrack, TimeValue searchTime, long searchOffset)")},
+ {"GetPosterBox", (PyCFunction)MovieObj_GetPosterBox, 1,
+ PyDoc_STR("() -> (Rect boxRect)")},
+ {"SetPosterBox", (PyCFunction)MovieObj_SetPosterBox, 1,
+ PyDoc_STR("(Rect boxRect) -> None")},
+ {"GetMovieSegmentDisplayBoundsRgn", (PyCFunction)MovieObj_GetMovieSegmentDisplayBoundsRgn, 1,
+ PyDoc_STR("(TimeValue time, TimeValue duration) -> (RgnHandle _rv)")},
+ {"GetMovieStatus", (PyCFunction)MovieObj_GetMovieStatus, 1,
+ PyDoc_STR("() -> (ComponentResult _rv, Track firstProblemTrack)")},
+ {"NewMovieController", (PyCFunction)MovieObj_NewMovieController, 1,
+ PyDoc_STR("(Rect movieRect, long someFlags) -> (MovieController _rv)")},
+ {"PutMovieOnScrap", (PyCFunction)MovieObj_PutMovieOnScrap, 1,
+ PyDoc_STR("(long movieScrapFlags) -> None")},
+ {"SetMoviePlayHints", (PyCFunction)MovieObj_SetMoviePlayHints, 1,
+ PyDoc_STR("(long flags, long flagsMask) -> None")},
+ {"GetMaxLoadedTimeInMovie", (PyCFunction)MovieObj_GetMaxLoadedTimeInMovie, 1,
+ PyDoc_STR("() -> (TimeValue time)")},
+ {"QTMovieNeedsTimeTable", (PyCFunction)MovieObj_QTMovieNeedsTimeTable, 1,
+ PyDoc_STR("() -> (Boolean needsTimeTable)")},
+ {"QTGetDataRefMaxFileOffset", (PyCFunction)MovieObj_QTGetDataRefMaxFileOffset, 1,
+ PyDoc_STR("(OSType dataRefType, Handle dataRef) -> (long offset)")},
+ {NULL, NULL, 0}
};
#define MovieObj_getsetlist NULL
@@ -7286,61 +7286,61 @@ static PyMethodDef MovieObj_methods[] = {
static PyObject *MovieObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
- PyObject *_self;
- Movie itself;
- char *kw[] = {"itself", 0};
+ 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;
+ 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 = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
- "_Qt.Movie", /*tp_name*/
- sizeof(MovieObject), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- /* methods */
- (destructor) MovieObj_dealloc, /*tp_dealloc*/
- 0, /*tp_print*/
- (getattrfunc)0, /*tp_getattr*/
- (setattrfunc)0, /*tp_setattr*/
- (cmpfunc) MovieObj_compare, /*tp_compare*/
- (reprfunc) MovieObj_repr, /*tp_repr*/
- (PyNumberMethods *)0, /* tp_as_number */
- (PySequenceMethods *)0, /* tp_as_sequence */
- (PyMappingMethods *)0, /* tp_as_mapping */
- (hashfunc) MovieObj_hash, /*tp_hash*/
- 0, /*tp_call*/
- 0, /*tp_str*/
- PyObject_GenericGetAttr, /*tp_getattro*/
- PyObject_GenericSetAttr, /*tp_setattro */
- 0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
- 0, /*tp_doc*/
- 0, /*tp_traverse*/
- 0, /*tp_clear*/
- 0, /*tp_richcompare*/
- 0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
- 0, /*tp_iternext*/
- MovieObj_methods, /* tp_methods */
- 0, /*tp_members*/
- MovieObj_getsetlist, /*tp_getset*/
- 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 */
+ PyObject_HEAD_INIT(NULL)
+ 0, /*ob_size*/
+ "_Qt.Movie", /*tp_name*/
+ sizeof(MovieObject), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ /* methods */
+ (destructor) MovieObj_dealloc, /*tp_dealloc*/
+ 0, /*tp_print*/
+ (getattrfunc)0, /*tp_getattr*/
+ (setattrfunc)0, /*tp_setattr*/
+ (cmpfunc) MovieObj_compare, /*tp_compare*/
+ (reprfunc) MovieObj_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) MovieObj_hash, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ PyObject_GenericGetAttr, /*tp_getattro*/
+ PyObject_GenericSetAttr, /*tp_setattro */
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
+ 0, /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ MovieObj_methods, /* tp_methods */
+ 0, /*tp_members*/
+ MovieObj_getsetlist, /*tp_getset*/
+ 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 ---------------------- */
@@ -7353,47 +7353,47 @@ PyTypeObject SGOutput_Type;
#define SGOutputObj_Check(x) ((x)->ob_type == &SGOutput_Type || PyObject_TypeCheck((x), &SGOutput_Type))
typedef struct SGOutputObject {
- PyObject_HEAD
- SGOutput ob_itself;
+ PyObject_HEAD
+ SGOutput ob_itself;
} SGOutputObject;
PyObject *SGOutputObj_New(SGOutput itself)
{
- SGOutputObject *it;
- if (itself == NULL) {
- PyErr_SetString(Qt_Error,"Cannot create SGOutput from NULL pointer");
- return NULL;
- }
- it = PyObject_NEW(SGOutputObject, &SGOutput_Type);
- if (it == NULL) return NULL;
- it->ob_itself = itself;
- return (PyObject *)it;
+ SGOutputObject *it;
+ if (itself == NULL) {
+ PyErr_SetString(Qt_Error,"Cannot create SGOutput from NULL pointer");
+ return NULL;
+ }
+ it = PyObject_NEW(SGOutputObject, &SGOutput_Type);
+ if (it == NULL) return NULL;
+ it->ob_itself = itself;
+ return (PyObject *)it;
}
int SGOutputObj_Convert(PyObject *v, SGOutput *p_itself)
{
- if (v == Py_None)
- {
- *p_itself = NULL;
- return 1;
- }
- if (!SGOutputObj_Check(v))
- {
- PyErr_SetString(PyExc_TypeError, "SGOutput required");
- return 0;
- }
- *p_itself = ((SGOutputObject *)v)->ob_itself;
- return 1;
+ if (v == Py_None)
+ {
+ *p_itself = NULL;
+ return 1;
+ }
+ if (!SGOutputObj_Check(v))
+ {
+ PyErr_SetString(PyExc_TypeError, "SGOutput required");
+ return 0;
+ }
+ *p_itself = ((SGOutputObject *)v)->ob_itself;
+ return 1;
}
static void SGOutputObj_dealloc(SGOutputObject *self)
{
- /* Cleanup of self->ob_itself goes here */
- self->ob_type->tp_free((PyObject *)self);
+ /* Cleanup of self->ob_itself goes here */
+ self->ob_type->tp_free((PyObject *)self);
}
static PyMethodDef SGOutputObj_methods[] = {
- {NULL, NULL, 0}
+ {NULL, NULL, 0}
};
#define SGOutputObj_getsetlist NULL
@@ -7410,61 +7410,61 @@ static PyMethodDef SGOutputObj_methods[] = {
static PyObject *SGOutputObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
- PyObject *_self;
- SGOutput itself;
- char *kw[] = {"itself", 0};
+ PyObject *_self;
+ SGOutput itself;
+ char *kw[] = {"itself", 0};
- if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, SGOutputObj_Convert, &itself)) return NULL;
- if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
- ((SGOutputObject *)_self)->ob_itself = itself;
- return _self;
+ if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, SGOutputObj_Convert, &itself)) return NULL;
+ if ((_self = type->tp_alloc(type, 0)) == NULL) return NULL;
+ ((SGOutputObject *)_self)->ob_itself = itself;
+ return _self;
}
#define SGOutputObj_tp_free PyObject_Del
PyTypeObject SGOutput_Type = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
- "_Qt.SGOutput", /*tp_name*/
- sizeof(SGOutputObject), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- /* methods */
- (destructor) SGOutputObj_dealloc, /*tp_dealloc*/
- 0, /*tp_print*/
- (getattrfunc)0, /*tp_getattr*/
- (setattrfunc)0, /*tp_setattr*/
- (cmpfunc) SGOutputObj_compare, /*tp_compare*/
- (reprfunc) SGOutputObj_repr, /*tp_repr*/
- (PyNumberMethods *)0, /* tp_as_number */
- (PySequenceMethods *)0, /* tp_as_sequence */
- (PyMappingMethods *)0, /* tp_as_mapping */
- (hashfunc) SGOutputObj_hash, /*tp_hash*/
- 0, /*tp_call*/
- 0, /*tp_str*/
- PyObject_GenericGetAttr, /*tp_getattro*/
- PyObject_GenericSetAttr, /*tp_setattro */
- 0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
- 0, /*tp_doc*/
- 0, /*tp_traverse*/
- 0, /*tp_clear*/
- 0, /*tp_richcompare*/
- 0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
- 0, /*tp_iternext*/
- SGOutputObj_methods, /* tp_methods */
- 0, /*tp_members*/
- SGOutputObj_getsetlist, /*tp_getset*/
- 0, /*tp_base*/
- 0, /*tp_dict*/
- 0, /*tp_descr_get*/
- 0, /*tp_descr_set*/
- 0, /*tp_dictoffset*/
- SGOutputObj_tp_init, /* tp_init */
- SGOutputObj_tp_alloc, /* tp_alloc */
- SGOutputObj_tp_new, /* tp_new */
- SGOutputObj_tp_free, /* tp_free */
+ PyObject_HEAD_INIT(NULL)
+ 0, /*ob_size*/
+ "_Qt.SGOutput", /*tp_name*/
+ sizeof(SGOutputObject), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ /* methods */
+ (destructor) SGOutputObj_dealloc, /*tp_dealloc*/
+ 0, /*tp_print*/
+ (getattrfunc)0, /*tp_getattr*/
+ (setattrfunc)0, /*tp_setattr*/
+ (cmpfunc) SGOutputObj_compare, /*tp_compare*/
+ (reprfunc) SGOutputObj_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) SGOutputObj_hash, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ PyObject_GenericGetAttr, /*tp_getattro*/
+ PyObject_GenericSetAttr, /*tp_setattro */
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
+ 0, /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ SGOutputObj_methods, /* tp_methods */
+ 0, /*tp_members*/
+ SGOutputObj_getsetlist, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ SGOutputObj_tp_init, /* tp_init */
+ SGOutputObj_tp_alloc, /* tp_alloc */
+ SGOutputObj_tp_new, /* tp_new */
+ SGOutputObj_tp_free, /* tp_free */
};
/* -------------------- End object type SGOutput -------------------- */
@@ -7472,20527 +7472,20527 @@ PyTypeObject SGOutput_Type = {
static PyObject *Qt_EnterMovies(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
+ PyObject *_res = NULL;
+ OSErr _err;
#ifndef EnterMovies
- PyMac_PRECHECK(EnterMovies);
+ PyMac_PRECHECK(EnterMovies);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = EnterMovies();
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = EnterMovies();
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qt_ExitMovies(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef ExitMovies
- PyMac_PRECHECK(ExitMovies);
+ PyMac_PRECHECK(ExitMovies);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- ExitMovies();
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ ExitMovies();
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qt_GetMoviesError(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
+ PyObject *_res = NULL;
+ OSErr _err;
#ifndef GetMoviesError
- PyMac_PRECHECK(GetMoviesError);
+ PyMac_PRECHECK(GetMoviesError);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetMoviesError();
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetMoviesError();
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qt_ClearMoviesStickyError(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef ClearMoviesStickyError
- PyMac_PRECHECK(ClearMoviesStickyError);
+ PyMac_PRECHECK(ClearMoviesStickyError);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- ClearMoviesStickyError();
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ ClearMoviesStickyError();
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qt_GetMoviesStickyError(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
+ PyObject *_res = NULL;
+ OSErr _err;
#ifndef GetMoviesStickyError
- PyMac_PRECHECK(GetMoviesStickyError);
+ PyMac_PRECHECK(GetMoviesStickyError);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetMoviesStickyError();
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetMoviesStickyError();
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qt_QTGetWallClockTimeBase(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- TimeBase wallClockTimeBase;
+ PyObject *_res = NULL;
+ OSErr _err;
+ TimeBase wallClockTimeBase;
#ifndef QTGetWallClockTimeBase
- PyMac_PRECHECK(QTGetWallClockTimeBase);
+ PyMac_PRECHECK(QTGetWallClockTimeBase);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = QTGetWallClockTimeBase(&wallClockTimeBase);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- TimeBaseObj_New, wallClockTimeBase);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = QTGetWallClockTimeBase(&wallClockTimeBase);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ TimeBaseObj_New, wallClockTimeBase);
+ return _res;
}
static PyObject *Qt_QTIdleManagerOpen(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- IdleManager _rv;
+ PyObject *_res = NULL;
+ IdleManager _rv;
#ifndef QTIdleManagerOpen
- PyMac_PRECHECK(QTIdleManagerOpen);
+ PyMac_PRECHECK(QTIdleManagerOpen);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = QTIdleManagerOpen();
- _res = Py_BuildValue("O&",
- IdleManagerObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = QTIdleManagerOpen();
+ _res = Py_BuildValue("O&",
+ IdleManagerObj_New, _rv);
+ return _res;
}
static PyObject *Qt_CreateMovieControl(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- WindowPtr theWindow;
- Rect localRect;
- Movie theMovie;
- UInt32 options;
- ControlHandle returnedControl;
+ PyObject *_res = NULL;
+ OSErr _err;
+ WindowPtr theWindow;
+ Rect localRect;
+ Movie theMovie;
+ UInt32 options;
+ ControlHandle returnedControl;
#ifndef CreateMovieControl
- PyMac_PRECHECK(CreateMovieControl);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&l",
- WinObj_Convert, &theWindow,
- MovieObj_Convert, &theMovie,
- &options))
- return NULL;
- _err = CreateMovieControl(theWindow,
- &localRect,
- theMovie,
- options,
- &returnedControl);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&O&",
- PyMac_BuildRect, &localRect,
- CtlObj_New, returnedControl);
- return _res;
+ PyMac_PRECHECK(CreateMovieControl);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&l",
+ WinObj_Convert, &theWindow,
+ MovieObj_Convert, &theMovie,
+ &options))
+ return NULL;
+ _err = CreateMovieControl(theWindow,
+ &localRect,
+ theMovie,
+ options,
+ &returnedControl);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&O&",
+ PyMac_BuildRect, &localRect,
+ CtlObj_New, returnedControl);
+ return _res;
}
static PyObject *Qt_DisposeMatte(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- PixMapHandle theMatte;
+ PyObject *_res = NULL;
+ PixMapHandle theMatte;
#ifndef DisposeMatte
- PyMac_PRECHECK(DisposeMatte);
+ PyMac_PRECHECK(DisposeMatte);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &theMatte))
- return NULL;
- DisposeMatte(theMatte);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &theMatte))
+ return NULL;
+ DisposeMatte(theMatte);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qt_NewMovie(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Movie _rv;
- long flags;
+ PyObject *_res = NULL;
+ Movie _rv;
+ long flags;
#ifndef NewMovie
- PyMac_PRECHECK(NewMovie);
+ PyMac_PRECHECK(NewMovie);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &flags))
- return NULL;
- _rv = NewMovie(flags);
- _res = Py_BuildValue("O&",
- MovieObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &flags))
+ return NULL;
+ _rv = NewMovie(flags);
+ _res = Py_BuildValue("O&",
+ MovieObj_New, _rv);
+ return _res;
}
static PyObject *Qt_QTGetTimeUntilNextTask(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- long duration;
- long scale;
+ PyObject *_res = NULL;
+ OSErr _err;
+ long duration;
+ long scale;
#ifndef QTGetTimeUntilNextTask
- PyMac_PRECHECK(QTGetTimeUntilNextTask);
+ PyMac_PRECHECK(QTGetTimeUntilNextTask);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &scale))
- return NULL;
- _err = QTGetTimeUntilNextTask(&duration,
- scale);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- duration);
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &scale))
+ return NULL;
+ _err = QTGetTimeUntilNextTask(&duration,
+ scale);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ duration);
+ return _res;
}
static PyObject *Qt_GetDataHandler(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Component _rv;
- Handle dataRef;
- OSType dataHandlerSubType;
- long flags;
+ PyObject *_res = NULL;
+ Component _rv;
+ Handle dataRef;
+ OSType dataHandlerSubType;
+ long flags;
#ifndef GetDataHandler
- PyMac_PRECHECK(GetDataHandler);
+ PyMac_PRECHECK(GetDataHandler);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&l",
- ResObj_Convert, &dataRef,
- PyMac_GetOSType, &dataHandlerSubType,
- &flags))
- return NULL;
- _rv = GetDataHandler(dataRef,
- dataHandlerSubType,
- flags);
- _res = Py_BuildValue("O&",
- CmpObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&l",
+ ResObj_Convert, &dataRef,
+ PyMac_GetOSType, &dataHandlerSubType,
+ &flags))
+ return NULL;
+ _rv = GetDataHandler(dataRef,
+ dataHandlerSubType,
+ flags);
+ _res = Py_BuildValue("O&",
+ CmpObj_New, _rv);
+ return _res;
}
static PyObject *Qt_PasteHandleIntoMovie(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Handle h;
- OSType handleType;
- Movie theMovie;
- long flags;
- ComponentInstance userComp;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Handle h;
+ OSType handleType;
+ Movie theMovie;
+ long flags;
+ ComponentInstance userComp;
#ifndef PasteHandleIntoMovie
- PyMac_PRECHECK(PasteHandleIntoMovie);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&lO&",
- ResObj_Convert, &h,
- PyMac_GetOSType, &handleType,
- MovieObj_Convert, &theMovie,
- &flags,
- CmpInstObj_Convert, &userComp))
- return NULL;
- _err = PasteHandleIntoMovie(h,
- handleType,
- theMovie,
- flags,
- userComp);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(PasteHandleIntoMovie);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&lO&",
+ ResObj_Convert, &h,
+ PyMac_GetOSType, &handleType,
+ MovieObj_Convert, &theMovie,
+ &flags,
+ CmpInstObj_Convert, &userComp))
+ return NULL;
+ _err = PasteHandleIntoMovie(h,
+ handleType,
+ theMovie,
+ flags,
+ userComp);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qt_GetMovieImporterForDataRef(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- OSType dataRefType;
- Handle dataRef;
- long flags;
- Component importer;
+ PyObject *_res = NULL;
+ OSErr _err;
+ OSType dataRefType;
+ Handle dataRef;
+ long flags;
+ Component importer;
#ifndef GetMovieImporterForDataRef
- PyMac_PRECHECK(GetMovieImporterForDataRef);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&l",
- PyMac_GetOSType, &dataRefType,
- ResObj_Convert, &dataRef,
- &flags))
- return NULL;
- _err = GetMovieImporterForDataRef(dataRefType,
- dataRef,
- flags,
- &importer);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- CmpObj_New, importer);
- return _res;
+ PyMac_PRECHECK(GetMovieImporterForDataRef);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&l",
+ PyMac_GetOSType, &dataRefType,
+ ResObj_Convert, &dataRef,
+ &flags))
+ return NULL;
+ _err = GetMovieImporterForDataRef(dataRefType,
+ dataRef,
+ flags,
+ &importer);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ CmpObj_New, importer);
+ return _res;
}
static PyObject *Qt_QTGetMIMETypeInfo(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- char* mimeStringStart;
- short mimeStringLength;
- OSType infoSelector;
- void * infoDataPtr;
- long infoDataSize;
+ PyObject *_res = NULL;
+ OSErr _err;
+ char* mimeStringStart;
+ short mimeStringLength;
+ OSType infoSelector;
+ void * infoDataPtr;
+ long infoDataSize;
#ifndef QTGetMIMETypeInfo
- PyMac_PRECHECK(QTGetMIMETypeInfo);
-#endif
- if (!PyArg_ParseTuple(_args, "shO&s",
- &mimeStringStart,
- &mimeStringLength,
- PyMac_GetOSType, &infoSelector,
- &infoDataPtr))
- return NULL;
- _err = QTGetMIMETypeInfo(mimeStringStart,
- mimeStringLength,
- infoSelector,
- infoDataPtr,
- &infoDataSize);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- infoDataSize);
- return _res;
+ PyMac_PRECHECK(QTGetMIMETypeInfo);
+#endif
+ if (!PyArg_ParseTuple(_args, "shO&s",
+ &mimeStringStart,
+ &mimeStringLength,
+ PyMac_GetOSType, &infoSelector,
+ &infoDataPtr))
+ return NULL;
+ _err = QTGetMIMETypeInfo(mimeStringStart,
+ mimeStringLength,
+ infoSelector,
+ infoDataPtr,
+ &infoDataSize);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ infoDataSize);
+ return _res;
}
static PyObject *Qt_TrackTimeToMediaTime(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- TimeValue _rv;
- TimeValue value;
- Track theTrack;
+ PyObject *_res = NULL;
+ TimeValue _rv;
+ TimeValue value;
+ Track theTrack;
#ifndef TrackTimeToMediaTime
- PyMac_PRECHECK(TrackTimeToMediaTime);
+ PyMac_PRECHECK(TrackTimeToMediaTime);
#endif
- if (!PyArg_ParseTuple(_args, "lO&",
- &value,
- TrackObj_Convert, &theTrack))
- return NULL;
- _rv = TrackTimeToMediaTime(value,
- theTrack);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "lO&",
+ &value,
+ TrackObj_Convert, &theTrack))
+ return NULL;
+ _rv = TrackTimeToMediaTime(value,
+ theTrack);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_NewUserData(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- UserData theUserData;
+ PyObject *_res = NULL;
+ OSErr _err;
+ UserData theUserData;
#ifndef NewUserData
- PyMac_PRECHECK(NewUserData);
+ PyMac_PRECHECK(NewUserData);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = NewUserData(&theUserData);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- UserDataObj_New, theUserData);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = NewUserData(&theUserData);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ UserDataObj_New, theUserData);
+ return _res;
}
static PyObject *Qt_NewUserDataFromHandle(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Handle h;
- UserData theUserData;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Handle h;
+ UserData theUserData;
#ifndef NewUserDataFromHandle
- PyMac_PRECHECK(NewUserDataFromHandle);
+ PyMac_PRECHECK(NewUserDataFromHandle);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &h))
- return NULL;
- _err = NewUserDataFromHandle(h,
- &theUserData);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- UserDataObj_New, theUserData);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &h))
+ return NULL;
+ _err = NewUserDataFromHandle(h,
+ &theUserData);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ UserDataObj_New, theUserData);
+ return _res;
}
static PyObject *Qt_CreateMovieFile(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- FSSpec fileSpec;
- OSType creator;
- ScriptCode scriptTag;
- long createMovieFileFlags;
- short resRefNum;
- Movie newmovie;
+ PyObject *_res = NULL;
+ OSErr _err;
+ FSSpec fileSpec;
+ OSType creator;
+ ScriptCode scriptTag;
+ long createMovieFileFlags;
+ short resRefNum;
+ Movie newmovie;
#ifndef CreateMovieFile
- PyMac_PRECHECK(CreateMovieFile);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&hl",
- PyMac_GetFSSpec, &fileSpec,
- PyMac_GetOSType, &creator,
- &scriptTag,
- &createMovieFileFlags))
- return NULL;
- _err = CreateMovieFile(&fileSpec,
- creator,
- scriptTag,
- createMovieFileFlags,
- &resRefNum,
- &newmovie);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("hO&",
- resRefNum,
- MovieObj_New, newmovie);
- return _res;
+ PyMac_PRECHECK(CreateMovieFile);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&hl",
+ PyMac_GetFSSpec, &fileSpec,
+ PyMac_GetOSType, &creator,
+ &scriptTag,
+ &createMovieFileFlags))
+ return NULL;
+ _err = CreateMovieFile(&fileSpec,
+ creator,
+ scriptTag,
+ createMovieFileFlags,
+ &resRefNum,
+ &newmovie);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("hO&",
+ resRefNum,
+ MovieObj_New, newmovie);
+ return _res;
}
static PyObject *Qt_OpenMovieFile(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- FSSpec fileSpec;
- short resRefNum;
- SInt8 permission;
+ PyObject *_res = NULL;
+ OSErr _err;
+ FSSpec fileSpec;
+ short resRefNum;
+ SInt8 permission;
#ifndef OpenMovieFile
- PyMac_PRECHECK(OpenMovieFile);
+ PyMac_PRECHECK(OpenMovieFile);
#endif
- if (!PyArg_ParseTuple(_args, "O&b",
- PyMac_GetFSSpec, &fileSpec,
- &permission))
- return NULL;
- _err = OpenMovieFile(&fileSpec,
- &resRefNum,
- permission);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("h",
- resRefNum);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&b",
+ PyMac_GetFSSpec, &fileSpec,
+ &permission))
+ return NULL;
+ _err = OpenMovieFile(&fileSpec,
+ &resRefNum,
+ permission);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("h",
+ resRefNum);
+ return _res;
}
static PyObject *Qt_CloseMovieFile(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- short resRefNum;
+ PyObject *_res = NULL;
+ OSErr _err;
+ short resRefNum;
#ifndef CloseMovieFile
- PyMac_PRECHECK(CloseMovieFile);
+ PyMac_PRECHECK(CloseMovieFile);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &resRefNum))
- return NULL;
- _err = CloseMovieFile(resRefNum);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &resRefNum))
+ return NULL;
+ _err = CloseMovieFile(resRefNum);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qt_DeleteMovieFile(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- FSSpec fileSpec;
+ PyObject *_res = NULL;
+ OSErr _err;
+ FSSpec fileSpec;
#ifndef DeleteMovieFile
- PyMac_PRECHECK(DeleteMovieFile);
+ PyMac_PRECHECK(DeleteMovieFile);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetFSSpec, &fileSpec))
- return NULL;
- _err = DeleteMovieFile(&fileSpec);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetFSSpec, &fileSpec))
+ return NULL;
+ _err = DeleteMovieFile(&fileSpec);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qt_NewMovieFromFile(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Movie theMovie;
- short resRefNum;
- short resId;
- short newMovieFlags;
- Boolean dataRefWasChanged;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Movie theMovie;
+ short resRefNum;
+ short resId;
+ short newMovieFlags;
+ Boolean dataRefWasChanged;
#ifndef NewMovieFromFile
- PyMac_PRECHECK(NewMovieFromFile);
-#endif
- if (!PyArg_ParseTuple(_args, "hhh",
- &resRefNum,
- &resId,
- &newMovieFlags))
- return NULL;
- _err = NewMovieFromFile(&theMovie,
- resRefNum,
- &resId,
- (StringPtr)0,
- newMovieFlags,
- &dataRefWasChanged);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&hb",
- MovieObj_New, theMovie,
- resId,
- dataRefWasChanged);
- return _res;
+ PyMac_PRECHECK(NewMovieFromFile);
+#endif
+ if (!PyArg_ParseTuple(_args, "hhh",
+ &resRefNum,
+ &resId,
+ &newMovieFlags))
+ return NULL;
+ _err = NewMovieFromFile(&theMovie,
+ resRefNum,
+ &resId,
+ (StringPtr)0,
+ newMovieFlags,
+ &dataRefWasChanged);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&hb",
+ MovieObj_New, theMovie,
+ resId,
+ dataRefWasChanged);
+ return _res;
}
static PyObject *Qt_NewMovieFromHandle(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Movie theMovie;
- Handle h;
- short newMovieFlags;
- Boolean dataRefWasChanged;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Movie theMovie;
+ Handle h;
+ short newMovieFlags;
+ Boolean dataRefWasChanged;
#ifndef NewMovieFromHandle
- PyMac_PRECHECK(NewMovieFromHandle);
-#endif
- if (!PyArg_ParseTuple(_args, "O&h",
- ResObj_Convert, &h,
- &newMovieFlags))
- return NULL;
- _err = NewMovieFromHandle(&theMovie,
- h,
- newMovieFlags,
- &dataRefWasChanged);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&b",
- MovieObj_New, theMovie,
- dataRefWasChanged);
- return _res;
+ PyMac_PRECHECK(NewMovieFromHandle);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&h",
+ ResObj_Convert, &h,
+ &newMovieFlags))
+ return NULL;
+ _err = NewMovieFromHandle(&theMovie,
+ h,
+ newMovieFlags,
+ &dataRefWasChanged);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&b",
+ MovieObj_New, theMovie,
+ dataRefWasChanged);
+ return _res;
}
static PyObject *Qt_NewMovieFromDataFork(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Movie theMovie;
- short fRefNum;
- long fileOffset;
- short newMovieFlags;
- Boolean dataRefWasChanged;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Movie theMovie;
+ short fRefNum;
+ long fileOffset;
+ short newMovieFlags;
+ Boolean dataRefWasChanged;
#ifndef NewMovieFromDataFork
- PyMac_PRECHECK(NewMovieFromDataFork);
-#endif
- if (!PyArg_ParseTuple(_args, "hlh",
- &fRefNum,
- &fileOffset,
- &newMovieFlags))
- return NULL;
- _err = NewMovieFromDataFork(&theMovie,
- fRefNum,
- fileOffset,
- newMovieFlags,
- &dataRefWasChanged);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&b",
- MovieObj_New, theMovie,
- dataRefWasChanged);
- return _res;
+ PyMac_PRECHECK(NewMovieFromDataFork);
+#endif
+ if (!PyArg_ParseTuple(_args, "hlh",
+ &fRefNum,
+ &fileOffset,
+ &newMovieFlags))
+ return NULL;
+ _err = NewMovieFromDataFork(&theMovie,
+ fRefNum,
+ fileOffset,
+ newMovieFlags,
+ &dataRefWasChanged);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&b",
+ MovieObj_New, theMovie,
+ dataRefWasChanged);
+ return _res;
}
static PyObject *Qt_NewMovieFromDataFork64(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Movie theMovie;
- long fRefNum;
- wide fileOffset;
- short newMovieFlags;
- Boolean dataRefWasChanged;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Movie theMovie;
+ long fRefNum;
+ wide fileOffset;
+ short newMovieFlags;
+ Boolean dataRefWasChanged;
#ifndef NewMovieFromDataFork64
- PyMac_PRECHECK(NewMovieFromDataFork64);
-#endif
- if (!PyArg_ParseTuple(_args, "lO&h",
- &fRefNum,
- PyMac_Getwide, &fileOffset,
- &newMovieFlags))
- return NULL;
- _err = NewMovieFromDataFork64(&theMovie,
- fRefNum,
- &fileOffset,
- newMovieFlags,
- &dataRefWasChanged);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&b",
- MovieObj_New, theMovie,
- dataRefWasChanged);
- return _res;
+ PyMac_PRECHECK(NewMovieFromDataFork64);
+#endif
+ if (!PyArg_ParseTuple(_args, "lO&h",
+ &fRefNum,
+ PyMac_Getwide, &fileOffset,
+ &newMovieFlags))
+ return NULL;
+ _err = NewMovieFromDataFork64(&theMovie,
+ fRefNum,
+ &fileOffset,
+ newMovieFlags,
+ &dataRefWasChanged);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&b",
+ MovieObj_New, theMovie,
+ dataRefWasChanged);
+ return _res;
}
static PyObject *Qt_NewMovieFromDataRef(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Movie m;
- short flags;
- short id;
- Handle dataRef;
- OSType dtaRefType;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Movie m;
+ short flags;
+ short id;
+ Handle dataRef;
+ OSType dtaRefType;
#ifndef NewMovieFromDataRef
- PyMac_PRECHECK(NewMovieFromDataRef);
-#endif
- if (!PyArg_ParseTuple(_args, "hO&O&",
- &flags,
- ResObj_Convert, &dataRef,
- PyMac_GetOSType, &dtaRefType))
- return NULL;
- _err = NewMovieFromDataRef(&m,
- flags,
- &id,
- dataRef,
- dtaRefType);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&h",
- MovieObj_New, m,
- id);
- return _res;
+ PyMac_PRECHECK(NewMovieFromDataRef);
+#endif
+ if (!PyArg_ParseTuple(_args, "hO&O&",
+ &flags,
+ ResObj_Convert, &dataRef,
+ PyMac_GetOSType, &dtaRefType))
+ return NULL;
+ _err = NewMovieFromDataRef(&m,
+ flags,
+ &id,
+ dataRef,
+ dtaRefType);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&h",
+ MovieObj_New, m,
+ id);
+ return _res;
}
static PyObject *Qt_NewMovieFromStorageOffset(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Movie theMovie;
- DataHandler dh;
- wide fileOffset;
- short newMovieFlags;
- Boolean dataRefWasCataRefType;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Movie theMovie;
+ DataHandler dh;
+ wide fileOffset;
+ short newMovieFlags;
+ Boolean dataRefWasCataRefType;
#ifndef NewMovieFromStorageOffset
- PyMac_PRECHECK(NewMovieFromStorageOffset);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&h",
- CmpInstObj_Convert, &dh,
- PyMac_Getwide, &fileOffset,
- &newMovieFlags))
- return NULL;
- _err = NewMovieFromStorageOffset(&theMovie,
- dh,
- &fileOffset,
- newMovieFlags,
- &dataRefWasCataRefType);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&b",
- MovieObj_New, theMovie,
- dataRefWasCataRefType);
- return _res;
+ PyMac_PRECHECK(NewMovieFromStorageOffset);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&h",
+ CmpInstObj_Convert, &dh,
+ PyMac_Getwide, &fileOffset,
+ &newMovieFlags))
+ return NULL;
+ _err = NewMovieFromStorageOffset(&theMovie,
+ dh,
+ &fileOffset,
+ newMovieFlags,
+ &dataRefWasCataRefType);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&b",
+ MovieObj_New, theMovie,
+ dataRefWasCataRefType);
+ return _res;
}
static PyObject *Qt_NewMovieForDataRefFromHandle(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Movie theMovie;
- Handle h;
- short newMovieFlags;
- Boolean dataRefWasChanged;
- Handle dataRef;
- OSType dataRefType;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Movie theMovie;
+ Handle h;
+ short newMovieFlags;
+ Boolean dataRefWasChanged;
+ Handle dataRef;
+ OSType dataRefType;
#ifndef NewMovieForDataRefFromHandle
- PyMac_PRECHECK(NewMovieForDataRefFromHandle);
-#endif
- if (!PyArg_ParseTuple(_args, "O&hO&O&",
- ResObj_Convert, &h,
- &newMovieFlags,
- ResObj_Convert, &dataRef,
- PyMac_GetOSType, &dataRefType))
- return NULL;
- _err = NewMovieForDataRefFromHandle(&theMovie,
- h,
- newMovieFlags,
- &dataRefWasChanged,
- dataRef,
- dataRefType);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&b",
- MovieObj_New, theMovie,
- dataRefWasChanged);
- return _res;
+ PyMac_PRECHECK(NewMovieForDataRefFromHandle);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&hO&O&",
+ ResObj_Convert, &h,
+ &newMovieFlags,
+ ResObj_Convert, &dataRef,
+ PyMac_GetOSType, &dataRefType))
+ return NULL;
+ _err = NewMovieForDataRefFromHandle(&theMovie,
+ h,
+ newMovieFlags,
+ &dataRefWasChanged,
+ dataRef,
+ dataRefType);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&b",
+ MovieObj_New, theMovie,
+ dataRefWasChanged);
+ return _res;
}
static PyObject *Qt_RemoveMovieResource(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- short resRefNum;
- short resId;
+ PyObject *_res = NULL;
+ OSErr _err;
+ short resRefNum;
+ short resId;
#ifndef RemoveMovieResource
- PyMac_PRECHECK(RemoveMovieResource);
+ PyMac_PRECHECK(RemoveMovieResource);
#endif
- if (!PyArg_ParseTuple(_args, "hh",
- &resRefNum,
- &resId))
- return NULL;
- _err = RemoveMovieResource(resRefNum,
- resId);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "hh",
+ &resRefNum,
+ &resId))
+ return NULL;
+ _err = RemoveMovieResource(resRefNum,
+ resId);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qt_CreateMovieStorage(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Handle dataRef;
- OSType dataRefType;
- OSType creator;
- ScriptCode scriptTag;
- long createMovieFileFlags;
- DataHandler outDataHandler;
- Movie newmovie;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Handle dataRef;
+ OSType dataRefType;
+ OSType creator;
+ ScriptCode scriptTag;
+ long createMovieFileFlags;
+ DataHandler outDataHandler;
+ Movie newmovie;
#ifndef CreateMovieStorage
- PyMac_PRECHECK(CreateMovieStorage);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&hl",
- ResObj_Convert, &dataRef,
- PyMac_GetOSType, &dataRefType,
- PyMac_GetOSType, &creator,
- &scriptTag,
- &createMovieFileFlags))
- return NULL;
- _err = CreateMovieStorage(dataRef,
- dataRefType,
- creator,
- scriptTag,
- createMovieFileFlags,
- &outDataHandler,
- &newmovie);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&O&",
- CmpInstObj_New, outDataHandler,
- MovieObj_New, newmovie);
- return _res;
+ PyMac_PRECHECK(CreateMovieStorage);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&hl",
+ ResObj_Convert, &dataRef,
+ PyMac_GetOSType, &dataRefType,
+ PyMac_GetOSType, &creator,
+ &scriptTag,
+ &createMovieFileFlags))
+ return NULL;
+ _err = CreateMovieStorage(dataRef,
+ dataRefType,
+ creator,
+ scriptTag,
+ createMovieFileFlags,
+ &outDataHandler,
+ &newmovie);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&O&",
+ CmpInstObj_New, outDataHandler,
+ MovieObj_New, newmovie);
+ return _res;
}
static PyObject *Qt_OpenMovieStorage(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Handle dataRef;
- OSType dataRefType;
- long flags;
- DataHandler outDataHandler;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Handle dataRef;
+ OSType dataRefType;
+ long flags;
+ DataHandler outDataHandler;
#ifndef OpenMovieStorage
- PyMac_PRECHECK(OpenMovieStorage);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&l",
- ResObj_Convert, &dataRef,
- PyMac_GetOSType, &dataRefType,
- &flags))
- return NULL;
- _err = OpenMovieStorage(dataRef,
- dataRefType,
- flags,
- &outDataHandler);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- CmpInstObj_New, outDataHandler);
- return _res;
+ PyMac_PRECHECK(OpenMovieStorage);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&l",
+ ResObj_Convert, &dataRef,
+ PyMac_GetOSType, &dataRefType,
+ &flags))
+ return NULL;
+ _err = OpenMovieStorage(dataRef,
+ dataRefType,
+ flags,
+ &outDataHandler);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ CmpInstObj_New, outDataHandler);
+ return _res;
}
static PyObject *Qt_CloseMovieStorage(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- DataHandler dh;
+ PyObject *_res = NULL;
+ OSErr _err;
+ DataHandler dh;
#ifndef CloseMovieStorage
- PyMac_PRECHECK(CloseMovieStorage);
+ PyMac_PRECHECK(CloseMovieStorage);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &dh))
- return NULL;
- _err = CloseMovieStorage(dh);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &dh))
+ return NULL;
+ _err = CloseMovieStorage(dh);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qt_DeleteMovieStorage(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Handle dataRef;
- OSType dataRefType;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Handle dataRef;
+ OSType dataRefType;
#ifndef DeleteMovieStorage
- PyMac_PRECHECK(DeleteMovieStorage);
+ PyMac_PRECHECK(DeleteMovieStorage);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- ResObj_Convert, &dataRef,
- PyMac_GetOSType, &dataRefType))
- return NULL;
- _err = DeleteMovieStorage(dataRef,
- dataRefType);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ ResObj_Convert, &dataRef,
+ PyMac_GetOSType, &dataRefType))
+ return NULL;
+ _err = DeleteMovieStorage(dataRef,
+ dataRefType);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qt_CreateShortcutMovieFile(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- FSSpec fileSpec;
- OSType creator;
- ScriptCode scriptTag;
- long createMovieFileFlags;
- Handle targetDataRef;
- OSType targetDataRefType;
+ PyObject *_res = NULL;
+ OSErr _err;
+ FSSpec fileSpec;
+ OSType creator;
+ ScriptCode scriptTag;
+ long createMovieFileFlags;
+ Handle targetDataRef;
+ OSType targetDataRefType;
#ifndef CreateShortcutMovieFile
- PyMac_PRECHECK(CreateShortcutMovieFile);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&hlO&O&",
- PyMac_GetFSSpec, &fileSpec,
- PyMac_GetOSType, &creator,
- &scriptTag,
- &createMovieFileFlags,
- ResObj_Convert, &targetDataRef,
- PyMac_GetOSType, &targetDataRefType))
- return NULL;
- _err = CreateShortcutMovieFile(&fileSpec,
- creator,
- scriptTag,
- createMovieFileFlags,
- targetDataRef,
- targetDataRefType);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(CreateShortcutMovieFile);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&hlO&O&",
+ PyMac_GetFSSpec, &fileSpec,
+ PyMac_GetOSType, &creator,
+ &scriptTag,
+ &createMovieFileFlags,
+ ResObj_Convert, &targetDataRef,
+ PyMac_GetOSType, &targetDataRefType))
+ return NULL;
+ _err = CreateShortcutMovieFile(&fileSpec,
+ creator,
+ scriptTag,
+ createMovieFileFlags,
+ targetDataRef,
+ targetDataRefType);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qt_CanQuickTimeOpenFile(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- FSSpec fileSpec;
- OSType fileType;
- OSType fileNameExtension;
- Boolean outCanOpenWithGraphicsImporter;
- Boolean outCanOpenAsMovie;
- Boolean outPreferGraphicsImporter;
- UInt32 inFlags;
+ PyObject *_res = NULL;
+ OSErr _err;
+ FSSpec fileSpec;
+ OSType fileType;
+ OSType fileNameExtension;
+ Boolean outCanOpenWithGraphicsImporter;
+ Boolean outCanOpenAsMovie;
+ Boolean outPreferGraphicsImporter;
+ UInt32 inFlags;
#ifndef CanQuickTimeOpenFile
- PyMac_PRECHECK(CanQuickTimeOpenFile);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&l",
- PyMac_GetFSSpec, &fileSpec,
- PyMac_GetOSType, &fileType,
- PyMac_GetOSType, &fileNameExtension,
- &inFlags))
- return NULL;
- _err = CanQuickTimeOpenFile(&fileSpec,
- fileType,
- fileNameExtension,
- &outCanOpenWithGraphicsImporter,
- &outCanOpenAsMovie,
- &outPreferGraphicsImporter,
- inFlags);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("bbb",
- outCanOpenWithGraphicsImporter,
- outCanOpenAsMovie,
- outPreferGraphicsImporter);
- return _res;
+ PyMac_PRECHECK(CanQuickTimeOpenFile);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&l",
+ PyMac_GetFSSpec, &fileSpec,
+ PyMac_GetOSType, &fileType,
+ PyMac_GetOSType, &fileNameExtension,
+ &inFlags))
+ return NULL;
+ _err = CanQuickTimeOpenFile(&fileSpec,
+ fileType,
+ fileNameExtension,
+ &outCanOpenWithGraphicsImporter,
+ &outCanOpenAsMovie,
+ &outPreferGraphicsImporter,
+ inFlags);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("bbb",
+ outCanOpenWithGraphicsImporter,
+ outCanOpenAsMovie,
+ outPreferGraphicsImporter);
+ return _res;
}
static PyObject *Qt_CanQuickTimeOpenDataRef(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Handle dataRef;
- OSType dataRefType;
- Boolean outCanOpenWithGraphicsImporter;
- Boolean outCanOpenAsMovie;
- Boolean outPreferGraphicsImporter;
- UInt32 inFlags;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Handle dataRef;
+ OSType dataRefType;
+ Boolean outCanOpenWithGraphicsImporter;
+ Boolean outCanOpenAsMovie;
+ Boolean outPreferGraphicsImporter;
+ UInt32 inFlags;
#ifndef CanQuickTimeOpenDataRef
- PyMac_PRECHECK(CanQuickTimeOpenDataRef);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&l",
- ResObj_Convert, &dataRef,
- PyMac_GetOSType, &dataRefType,
- &inFlags))
- return NULL;
- _err = CanQuickTimeOpenDataRef(dataRef,
- dataRefType,
- &outCanOpenWithGraphicsImporter,
- &outCanOpenAsMovie,
- &outPreferGraphicsImporter,
- inFlags);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("bbb",
- outCanOpenWithGraphicsImporter,
- outCanOpenAsMovie,
- outPreferGraphicsImporter);
- return _res;
+ PyMac_PRECHECK(CanQuickTimeOpenDataRef);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&l",
+ ResObj_Convert, &dataRef,
+ PyMac_GetOSType, &dataRefType,
+ &inFlags))
+ return NULL;
+ _err = CanQuickTimeOpenDataRef(dataRef,
+ dataRefType,
+ &outCanOpenWithGraphicsImporter,
+ &outCanOpenAsMovie,
+ &outPreferGraphicsImporter,
+ inFlags);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("bbb",
+ outCanOpenWithGraphicsImporter,
+ outCanOpenAsMovie,
+ outPreferGraphicsImporter);
+ return _res;
}
static PyObject *Qt_NewMovieFromScrap(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Movie _rv;
- long newMovieFlags;
+ PyObject *_res = NULL;
+ Movie _rv;
+ long newMovieFlags;
#ifndef NewMovieFromScrap
- PyMac_PRECHECK(NewMovieFromScrap);
+ PyMac_PRECHECK(NewMovieFromScrap);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &newMovieFlags))
- return NULL;
- _rv = NewMovieFromScrap(newMovieFlags);
- _res = Py_BuildValue("O&",
- MovieObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &newMovieFlags))
+ return NULL;
+ _rv = NewMovieFromScrap(newMovieFlags);
+ _res = Py_BuildValue("O&",
+ MovieObj_New, _rv);
+ return _res;
}
static PyObject *Qt_QTNewAlias(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- FSSpec fss;
- AliasHandle alias;
- Boolean minimal;
+ PyObject *_res = NULL;
+ OSErr _err;
+ FSSpec fss;
+ AliasHandle alias;
+ Boolean minimal;
#ifndef QTNewAlias
- PyMac_PRECHECK(QTNewAlias);
+ PyMac_PRECHECK(QTNewAlias);
#endif
- if (!PyArg_ParseTuple(_args, "O&b",
- PyMac_GetFSSpec, &fss,
- &minimal))
- return NULL;
- _err = QTNewAlias(&fss,
- &alias,
- minimal);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- ResObj_New, alias);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&b",
+ PyMac_GetFSSpec, &fss,
+ &minimal))
+ return NULL;
+ _err = QTNewAlias(&fss,
+ &alias,
+ minimal);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ ResObj_New, alias);
+ return _res;
}
static PyObject *Qt_EndFullScreen(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Ptr fullState;
- long flags;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Ptr fullState;
+ long flags;
#ifndef EndFullScreen
- PyMac_PRECHECK(EndFullScreen);
+ PyMac_PRECHECK(EndFullScreen);
#endif
- if (!PyArg_ParseTuple(_args, "sl",
- &fullState,
- &flags))
- return NULL;
- _err = EndFullScreen(fullState,
- flags);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "sl",
+ &fullState,
+ &flags))
+ return NULL;
+ _err = EndFullScreen(fullState,
+ flags);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qt_AddSoundDescriptionExtension(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- SoundDescriptionHandle desc;
- Handle extension;
- OSType idType;
+ PyObject *_res = NULL;
+ OSErr _err;
+ SoundDescriptionHandle desc;
+ Handle extension;
+ OSType idType;
#ifndef AddSoundDescriptionExtension
- PyMac_PRECHECK(AddSoundDescriptionExtension);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- ResObj_Convert, &desc,
- ResObj_Convert, &extension,
- PyMac_GetOSType, &idType))
- return NULL;
- _err = AddSoundDescriptionExtension(desc,
- extension,
- idType);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(AddSoundDescriptionExtension);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ ResObj_Convert, &desc,
+ ResObj_Convert, &extension,
+ PyMac_GetOSType, &idType))
+ return NULL;
+ _err = AddSoundDescriptionExtension(desc,
+ extension,
+ idType);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qt_GetSoundDescriptionExtension(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- SoundDescriptionHandle desc;
- Handle extension;
- OSType idType;
+ PyObject *_res = NULL;
+ OSErr _err;
+ SoundDescriptionHandle desc;
+ Handle extension;
+ OSType idType;
#ifndef GetSoundDescriptionExtension
- PyMac_PRECHECK(GetSoundDescriptionExtension);
+ PyMac_PRECHECK(GetSoundDescriptionExtension);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- ResObj_Convert, &desc,
- PyMac_GetOSType, &idType))
- return NULL;
- _err = GetSoundDescriptionExtension(desc,
- &extension,
- idType);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- ResObj_New, extension);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ ResObj_Convert, &desc,
+ PyMac_GetOSType, &idType))
+ return NULL;
+ _err = GetSoundDescriptionExtension(desc,
+ &extension,
+ idType);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ ResObj_New, extension);
+ return _res;
}
static PyObject *Qt_RemoveSoundDescriptionExtension(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- SoundDescriptionHandle desc;
- OSType idType;
+ PyObject *_res = NULL;
+ OSErr _err;
+ SoundDescriptionHandle desc;
+ OSType idType;
#ifndef RemoveSoundDescriptionExtension
- PyMac_PRECHECK(RemoveSoundDescriptionExtension);
+ PyMac_PRECHECK(RemoveSoundDescriptionExtension);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- ResObj_Convert, &desc,
- PyMac_GetOSType, &idType))
- return NULL;
- _err = RemoveSoundDescriptionExtension(desc,
- idType);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ ResObj_Convert, &desc,
+ PyMac_GetOSType, &idType))
+ return NULL;
+ _err = RemoveSoundDescriptionExtension(desc,
+ idType);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qt_QTIsStandardParameterDialogEvent(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- EventRecord pEvent;
- QTParameterDialog createdDialog;
+ PyObject *_res = NULL;
+ OSErr _err;
+ EventRecord pEvent;
+ QTParameterDialog createdDialog;
#ifndef QTIsStandardParameterDialogEvent
- PyMac_PRECHECK(QTIsStandardParameterDialogEvent);
+ PyMac_PRECHECK(QTIsStandardParameterDialogEvent);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &createdDialog))
- return NULL;
- _err = QTIsStandardParameterDialogEvent(&pEvent,
- createdDialog);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- PyMac_BuildEventRecord, &pEvent);
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &createdDialog))
+ return NULL;
+ _err = QTIsStandardParameterDialogEvent(&pEvent,
+ createdDialog);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildEventRecord, &pEvent);
+ return _res;
}
static PyObject *Qt_QTDismissStandardParameterDialog(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- QTParameterDialog createdDialog;
+ PyObject *_res = NULL;
+ OSErr _err;
+ QTParameterDialog createdDialog;
#ifndef QTDismissStandardParameterDialog
- PyMac_PRECHECK(QTDismissStandardParameterDialog);
+ PyMac_PRECHECK(QTDismissStandardParameterDialog);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &createdDialog))
- return NULL;
- _err = QTDismissStandardParameterDialog(createdDialog);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &createdDialog))
+ return NULL;
+ _err = QTDismissStandardParameterDialog(createdDialog);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qt_QTStandardParameterDialogDoAction(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- QTParameterDialog createdDialog;
- long action;
- void * params;
+ PyObject *_res = NULL;
+ OSErr _err;
+ QTParameterDialog createdDialog;
+ long action;
+ void * params;
#ifndef QTStandardParameterDialogDoAction
- PyMac_PRECHECK(QTStandardParameterDialogDoAction);
-#endif
- if (!PyArg_ParseTuple(_args, "lls",
- &createdDialog,
- &action,
- &params))
- return NULL;
- _err = QTStandardParameterDialogDoAction(createdDialog,
- action,
- params);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(QTStandardParameterDialogDoAction);
+#endif
+ if (!PyArg_ParseTuple(_args, "lls",
+ &createdDialog,
+ &action,
+ &params))
+ return NULL;
+ _err = QTStandardParameterDialogDoAction(createdDialog,
+ action,
+ params);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qt_QTRegisterAccessKey(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Str255 accessKeyType;
- long flags;
- Handle accessKey;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Str255 accessKeyType;
+ long flags;
+ Handle accessKey;
#ifndef QTRegisterAccessKey
- PyMac_PRECHECK(QTRegisterAccessKey);
-#endif
- if (!PyArg_ParseTuple(_args, "O&lO&",
- PyMac_GetStr255, accessKeyType,
- &flags,
- ResObj_Convert, &accessKey))
- return NULL;
- _err = QTRegisterAccessKey(accessKeyType,
- flags,
- accessKey);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(QTRegisterAccessKey);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&lO&",
+ PyMac_GetStr255, accessKeyType,
+ &flags,
+ ResObj_Convert, &accessKey))
+ return NULL;
+ _err = QTRegisterAccessKey(accessKeyType,
+ flags,
+ accessKey);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qt_QTUnregisterAccessKey(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Str255 accessKeyType;
- long flags;
- Handle accessKey;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Str255 accessKeyType;
+ long flags;
+ Handle accessKey;
#ifndef QTUnregisterAccessKey
- PyMac_PRECHECK(QTUnregisterAccessKey);
-#endif
- if (!PyArg_ParseTuple(_args, "O&lO&",
- PyMac_GetStr255, accessKeyType,
- &flags,
- ResObj_Convert, &accessKey))
- return NULL;
- _err = QTUnregisterAccessKey(accessKeyType,
- flags,
- accessKey);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(QTUnregisterAccessKey);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&lO&",
+ PyMac_GetStr255, accessKeyType,
+ &flags,
+ ResObj_Convert, &accessKey))
+ return NULL;
+ _err = QTUnregisterAccessKey(accessKeyType,
+ flags,
+ accessKey);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qt_QTGetSupportedRestrictions(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- OSType inRestrictionClass;
- UInt32 outRestrictionIDs;
+ PyObject *_res = NULL;
+ OSErr _err;
+ OSType inRestrictionClass;
+ UInt32 outRestrictionIDs;
#ifndef QTGetSupportedRestrictions
- PyMac_PRECHECK(QTGetSupportedRestrictions);
+ PyMac_PRECHECK(QTGetSupportedRestrictions);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetOSType, &inRestrictionClass))
- return NULL;
- _err = QTGetSupportedRestrictions(inRestrictionClass,
- &outRestrictionIDs);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- outRestrictionIDs);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetOSType, &inRestrictionClass))
+ return NULL;
+ _err = QTGetSupportedRestrictions(inRestrictionClass,
+ &outRestrictionIDs);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ outRestrictionIDs);
+ return _res;
}
static PyObject *Qt_QTTextToNativeText(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Handle theText;
- long encoding;
- long flags;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Handle theText;
+ long encoding;
+ long flags;
#ifndef QTTextToNativeText
- PyMac_PRECHECK(QTTextToNativeText);
-#endif
- if (!PyArg_ParseTuple(_args, "O&ll",
- ResObj_Convert, &theText,
- &encoding,
- &flags))
- return NULL;
- _err = QTTextToNativeText(theText,
- encoding,
- flags);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(QTTextToNativeText);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&ll",
+ ResObj_Convert, &theText,
+ &encoding,
+ &flags))
+ return NULL;
+ _err = QTTextToNativeText(theText,
+ encoding,
+ flags);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qt_VideoMediaResetStatistics(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
#ifndef VideoMediaResetStatistics
- PyMac_PRECHECK(VideoMediaResetStatistics);
+ PyMac_PRECHECK(VideoMediaResetStatistics);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &mh))
- return NULL;
- _rv = VideoMediaResetStatistics(mh);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &mh))
+ return NULL;
+ _rv = VideoMediaResetStatistics(mh);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_VideoMediaGetStatistics(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
#ifndef VideoMediaGetStatistics
- PyMac_PRECHECK(VideoMediaGetStatistics);
+ PyMac_PRECHECK(VideoMediaGetStatistics);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &mh))
- return NULL;
- _rv = VideoMediaGetStatistics(mh);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &mh))
+ return NULL;
+ _rv = VideoMediaGetStatistics(mh);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_VideoMediaGetStallCount(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- unsigned long stalls;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ unsigned long stalls;
#ifndef VideoMediaGetStallCount
- PyMac_PRECHECK(VideoMediaGetStallCount);
+ PyMac_PRECHECK(VideoMediaGetStallCount);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &mh))
- return NULL;
- _rv = VideoMediaGetStallCount(mh,
- &stalls);
- _res = Py_BuildValue("ll",
- _rv,
- stalls);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &mh))
+ return NULL;
+ _rv = VideoMediaGetStallCount(mh,
+ &stalls);
+ _res = Py_BuildValue("ll",
+ _rv,
+ stalls);
+ return _res;
}
static PyObject *Qt_VideoMediaSetCodecParameter(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- CodecType cType;
- OSType parameterID;
- long parameterChangeSeed;
- void * dataPtr;
- long dataSize;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ CodecType cType;
+ OSType parameterID;
+ long parameterChangeSeed;
+ void * dataPtr;
+ long dataSize;
#ifndef VideoMediaSetCodecParameter
- PyMac_PRECHECK(VideoMediaSetCodecParameter);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&lsl",
- CmpInstObj_Convert, &mh,
- PyMac_GetOSType, &cType,
- PyMac_GetOSType, &parameterID,
- &parameterChangeSeed,
- &dataPtr,
- &dataSize))
- return NULL;
- _rv = VideoMediaSetCodecParameter(mh,
- cType,
- parameterID,
- parameterChangeSeed,
- dataPtr,
- dataSize);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyMac_PRECHECK(VideoMediaSetCodecParameter);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&lsl",
+ CmpInstObj_Convert, &mh,
+ PyMac_GetOSType, &cType,
+ PyMac_GetOSType, &parameterID,
+ &parameterChangeSeed,
+ &dataPtr,
+ &dataSize))
+ return NULL;
+ _rv = VideoMediaSetCodecParameter(mh,
+ cType,
+ parameterID,
+ parameterChangeSeed,
+ dataPtr,
+ dataSize);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_VideoMediaGetCodecParameter(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- CodecType cType;
- OSType parameterID;
- Handle outParameterData;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ CodecType cType;
+ OSType parameterID;
+ Handle outParameterData;
#ifndef VideoMediaGetCodecParameter
- PyMac_PRECHECK(VideoMediaGetCodecParameter);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&O&",
- CmpInstObj_Convert, &mh,
- PyMac_GetOSType, &cType,
- PyMac_GetOSType, &parameterID,
- ResObj_Convert, &outParameterData))
- return NULL;
- _rv = VideoMediaGetCodecParameter(mh,
- cType,
- parameterID,
- outParameterData);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyMac_PRECHECK(VideoMediaGetCodecParameter);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&O&",
+ CmpInstObj_Convert, &mh,
+ PyMac_GetOSType, &cType,
+ PyMac_GetOSType, &parameterID,
+ ResObj_Convert, &outParameterData))
+ return NULL;
+ _rv = VideoMediaGetCodecParameter(mh,
+ cType,
+ parameterID,
+ outParameterData);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_TextMediaAddTextSample(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- Ptr text;
- unsigned long size;
- short fontNumber;
- short fontSize;
- Style textFace;
- RGBColor textColor;
- RGBColor backColor;
- short textJustification;
- Rect textBox;
- long displayFlags;
- TimeValue scrollDelay;
- short hiliteStart;
- short hiliteEnd;
- RGBColor rgbHiliteColor;
- TimeValue duration;
- TimeValue sampleTime;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ Ptr text;
+ unsigned long size;
+ short fontNumber;
+ short fontSize;
+ Style textFace;
+ RGBColor textColor;
+ RGBColor backColor;
+ short textJustification;
+ Rect textBox;
+ long displayFlags;
+ TimeValue scrollDelay;
+ short hiliteStart;
+ short hiliteEnd;
+ RGBColor rgbHiliteColor;
+ TimeValue duration;
+ TimeValue sampleTime;
#ifndef TextMediaAddTextSample
- PyMac_PRECHECK(TextMediaAddTextSample);
-#endif
- if (!PyArg_ParseTuple(_args, "O&slhhbhllhhl",
- CmpInstObj_Convert, &mh,
- &text,
- &size,
- &fontNumber,
- &fontSize,
- &textFace,
- &textJustification,
- &displayFlags,
- &scrollDelay,
- &hiliteStart,
- &hiliteEnd,
- &duration))
- return NULL;
- _rv = TextMediaAddTextSample(mh,
- text,
- size,
- fontNumber,
- fontSize,
- textFace,
- &textColor,
- &backColor,
- textJustification,
- &textBox,
- displayFlags,
- scrollDelay,
- hiliteStart,
- hiliteEnd,
- &rgbHiliteColor,
- duration,
- &sampleTime);
- _res = Py_BuildValue("lO&O&O&O&l",
- _rv,
- QdRGB_New, &textColor,
- QdRGB_New, &backColor,
- PyMac_BuildRect, &textBox,
- QdRGB_New, &rgbHiliteColor,
- sampleTime);
- return _res;
+ PyMac_PRECHECK(TextMediaAddTextSample);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&slhhbhllhhl",
+ CmpInstObj_Convert, &mh,
+ &text,
+ &size,
+ &fontNumber,
+ &fontSize,
+ &textFace,
+ &textJustification,
+ &displayFlags,
+ &scrollDelay,
+ &hiliteStart,
+ &hiliteEnd,
+ &duration))
+ return NULL;
+ _rv = TextMediaAddTextSample(mh,
+ text,
+ size,
+ fontNumber,
+ fontSize,
+ textFace,
+ &textColor,
+ &backColor,
+ textJustification,
+ &textBox,
+ displayFlags,
+ scrollDelay,
+ hiliteStart,
+ hiliteEnd,
+ &rgbHiliteColor,
+ duration,
+ &sampleTime);
+ _res = Py_BuildValue("lO&O&O&O&l",
+ _rv,
+ QdRGB_New, &textColor,
+ QdRGB_New, &backColor,
+ PyMac_BuildRect, &textBox,
+ QdRGB_New, &rgbHiliteColor,
+ sampleTime);
+ return _res;
}
static PyObject *Qt_TextMediaAddTESample(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- TEHandle hTE;
- RGBColor backColor;
- short textJustification;
- Rect textBox;
- long displayFlags;
- TimeValue scrollDelay;
- short hiliteStart;
- short hiliteEnd;
- RGBColor rgbHiliteColor;
- TimeValue duration;
- TimeValue sampleTime;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ TEHandle hTE;
+ RGBColor backColor;
+ short textJustification;
+ Rect textBox;
+ long displayFlags;
+ TimeValue scrollDelay;
+ short hiliteStart;
+ short hiliteEnd;
+ RGBColor rgbHiliteColor;
+ TimeValue duration;
+ TimeValue sampleTime;
#ifndef TextMediaAddTESample
- PyMac_PRECHECK(TextMediaAddTESample);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&hllhhl",
- CmpInstObj_Convert, &mh,
- ResObj_Convert, &hTE,
- &textJustification,
- &displayFlags,
- &scrollDelay,
- &hiliteStart,
- &hiliteEnd,
- &duration))
- return NULL;
- _rv = TextMediaAddTESample(mh,
- hTE,
- &backColor,
- textJustification,
- &textBox,
- displayFlags,
- scrollDelay,
- hiliteStart,
- hiliteEnd,
- &rgbHiliteColor,
- duration,
- &sampleTime);
- _res = Py_BuildValue("lO&O&O&l",
- _rv,
- QdRGB_New, &backColor,
- PyMac_BuildRect, &textBox,
- QdRGB_New, &rgbHiliteColor,
- sampleTime);
- return _res;
+ PyMac_PRECHECK(TextMediaAddTESample);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&hllhhl",
+ CmpInstObj_Convert, &mh,
+ ResObj_Convert, &hTE,
+ &textJustification,
+ &displayFlags,
+ &scrollDelay,
+ &hiliteStart,
+ &hiliteEnd,
+ &duration))
+ return NULL;
+ _rv = TextMediaAddTESample(mh,
+ hTE,
+ &backColor,
+ textJustification,
+ &textBox,
+ displayFlags,
+ scrollDelay,
+ hiliteStart,
+ hiliteEnd,
+ &rgbHiliteColor,
+ duration,
+ &sampleTime);
+ _res = Py_BuildValue("lO&O&O&l",
+ _rv,
+ QdRGB_New, &backColor,
+ PyMac_BuildRect, &textBox,
+ QdRGB_New, &rgbHiliteColor,
+ sampleTime);
+ return _res;
}
static PyObject *Qt_TextMediaAddHiliteSample(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- short hiliteStart;
- short hiliteEnd;
- RGBColor rgbHiliteColor;
- TimeValue duration;
- TimeValue sampleTime;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ short hiliteStart;
+ short hiliteEnd;
+ RGBColor rgbHiliteColor;
+ TimeValue duration;
+ TimeValue sampleTime;
#ifndef TextMediaAddHiliteSample
- PyMac_PRECHECK(TextMediaAddHiliteSample);
-#endif
- if (!PyArg_ParseTuple(_args, "O&hhl",
- CmpInstObj_Convert, &mh,
- &hiliteStart,
- &hiliteEnd,
- &duration))
- return NULL;
- _rv = TextMediaAddHiliteSample(mh,
- hiliteStart,
- hiliteEnd,
- &rgbHiliteColor,
- duration,
- &sampleTime);
- _res = Py_BuildValue("lO&l",
- _rv,
- QdRGB_New, &rgbHiliteColor,
- sampleTime);
- return _res;
+ PyMac_PRECHECK(TextMediaAddHiliteSample);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&hhl",
+ CmpInstObj_Convert, &mh,
+ &hiliteStart,
+ &hiliteEnd,
+ &duration))
+ return NULL;
+ _rv = TextMediaAddHiliteSample(mh,
+ hiliteStart,
+ hiliteEnd,
+ &rgbHiliteColor,
+ duration,
+ &sampleTime);
+ _res = Py_BuildValue("lO&l",
+ _rv,
+ QdRGB_New, &rgbHiliteColor,
+ sampleTime);
+ return _res;
}
static PyObject *Qt_TextMediaDrawRaw(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- GWorldPtr gw;
- GDHandle gd;
- void * data;
- long dataSize;
- TextDescriptionHandle tdh;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ GWorldPtr gw;
+ GDHandle gd;
+ void * data;
+ long dataSize;
+ TextDescriptionHandle tdh;
#ifndef TextMediaDrawRaw
- PyMac_PRECHECK(TextMediaDrawRaw);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&slO&",
- CmpInstObj_Convert, &mh,
- GWorldObj_Convert, &gw,
- OptResObj_Convert, &gd,
- &data,
- &dataSize,
- ResObj_Convert, &tdh))
- return NULL;
- _rv = TextMediaDrawRaw(mh,
- gw,
- gd,
- data,
- dataSize,
- tdh);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyMac_PRECHECK(TextMediaDrawRaw);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&slO&",
+ CmpInstObj_Convert, &mh,
+ GWorldObj_Convert, &gw,
+ OptResObj_Convert, &gd,
+ &data,
+ &dataSize,
+ ResObj_Convert, &tdh))
+ return NULL;
+ _rv = TextMediaDrawRaw(mh,
+ gw,
+ gd,
+ data,
+ dataSize,
+ tdh);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_TextMediaSetTextProperty(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- TimeValue atMediaTime;
- long propertyType;
- void * data;
- long dataSize;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ TimeValue atMediaTime;
+ long propertyType;
+ void * data;
+ long dataSize;
#ifndef TextMediaSetTextProperty
- PyMac_PRECHECK(TextMediaSetTextProperty);
-#endif
- if (!PyArg_ParseTuple(_args, "O&llsl",
- CmpInstObj_Convert, &mh,
- &atMediaTime,
- &propertyType,
- &data,
- &dataSize))
- return NULL;
- _rv = TextMediaSetTextProperty(mh,
- atMediaTime,
- propertyType,
- data,
- dataSize);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyMac_PRECHECK(TextMediaSetTextProperty);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&llsl",
+ CmpInstObj_Convert, &mh,
+ &atMediaTime,
+ &propertyType,
+ &data,
+ &dataSize))
+ return NULL;
+ _rv = TextMediaSetTextProperty(mh,
+ atMediaTime,
+ propertyType,
+ data,
+ dataSize);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_TextMediaRawSetup(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- GWorldPtr gw;
- GDHandle gd;
- void * data;
- long dataSize;
- TextDescriptionHandle tdh;
- TimeValue sampleDuration;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ GWorldPtr gw;
+ GDHandle gd;
+ void * data;
+ long dataSize;
+ TextDescriptionHandle tdh;
+ TimeValue sampleDuration;
#ifndef TextMediaRawSetup
- PyMac_PRECHECK(TextMediaRawSetup);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&slO&l",
- CmpInstObj_Convert, &mh,
- GWorldObj_Convert, &gw,
- OptResObj_Convert, &gd,
- &data,
- &dataSize,
- ResObj_Convert, &tdh,
- &sampleDuration))
- return NULL;
- _rv = TextMediaRawSetup(mh,
- gw,
- gd,
- data,
- dataSize,
- tdh,
- sampleDuration);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyMac_PRECHECK(TextMediaRawSetup);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&slO&l",
+ CmpInstObj_Convert, &mh,
+ GWorldObj_Convert, &gw,
+ OptResObj_Convert, &gd,
+ &data,
+ &dataSize,
+ ResObj_Convert, &tdh,
+ &sampleDuration))
+ return NULL;
+ _rv = TextMediaRawSetup(mh,
+ gw,
+ gd,
+ data,
+ dataSize,
+ tdh,
+ sampleDuration);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_TextMediaRawIdle(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- GWorldPtr gw;
- GDHandle gd;
- TimeValue sampleTime;
- long flagsIn;
- long flagsOut;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ GWorldPtr gw;
+ GDHandle gd;
+ TimeValue sampleTime;
+ long flagsIn;
+ long flagsOut;
#ifndef TextMediaRawIdle
- PyMac_PRECHECK(TextMediaRawIdle);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&ll",
- CmpInstObj_Convert, &mh,
- GWorldObj_Convert, &gw,
- OptResObj_Convert, &gd,
- &sampleTime,
- &flagsIn))
- return NULL;
- _rv = TextMediaRawIdle(mh,
- gw,
- gd,
- sampleTime,
- flagsIn,
- &flagsOut);
- _res = Py_BuildValue("ll",
- _rv,
- flagsOut);
- return _res;
+ PyMac_PRECHECK(TextMediaRawIdle);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&ll",
+ CmpInstObj_Convert, &mh,
+ GWorldObj_Convert, &gw,
+ OptResObj_Convert, &gd,
+ &sampleTime,
+ &flagsIn))
+ return NULL;
+ _rv = TextMediaRawIdle(mh,
+ gw,
+ gd,
+ sampleTime,
+ flagsIn,
+ &flagsOut);
+ _res = Py_BuildValue("ll",
+ _rv,
+ flagsOut);
+ return _res;
}
static PyObject *Qt_TextMediaGetTextProperty(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- TimeValue atMediaTime;
- long propertyType;
- void * data;
- long dataSize;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ TimeValue atMediaTime;
+ long propertyType;
+ void * data;
+ long dataSize;
#ifndef TextMediaGetTextProperty
- PyMac_PRECHECK(TextMediaGetTextProperty);
-#endif
- if (!PyArg_ParseTuple(_args, "O&llsl",
- CmpInstObj_Convert, &mh,
- &atMediaTime,
- &propertyType,
- &data,
- &dataSize))
- return NULL;
- _rv = TextMediaGetTextProperty(mh,
- atMediaTime,
- propertyType,
- data,
- dataSize);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyMac_PRECHECK(TextMediaGetTextProperty);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&llsl",
+ CmpInstObj_Convert, &mh,
+ &atMediaTime,
+ &propertyType,
+ &data,
+ &dataSize))
+ return NULL;
+ _rv = TextMediaGetTextProperty(mh,
+ atMediaTime,
+ propertyType,
+ data,
+ dataSize);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_TextMediaFindNextText(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- Ptr text;
- long size;
- short findFlags;
- TimeValue startTime;
- TimeValue foundTime;
- TimeValue foundDuration;
- long offset;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ Ptr text;
+ long size;
+ short findFlags;
+ TimeValue startTime;
+ TimeValue foundTime;
+ TimeValue foundDuration;
+ long offset;
#ifndef TextMediaFindNextText
- PyMac_PRECHECK(TextMediaFindNextText);
-#endif
- if (!PyArg_ParseTuple(_args, "O&slhl",
- CmpInstObj_Convert, &mh,
- &text,
- &size,
- &findFlags,
- &startTime))
- return NULL;
- _rv = TextMediaFindNextText(mh,
- text,
- size,
- findFlags,
- startTime,
- &foundTime,
- &foundDuration,
- &offset);
- _res = Py_BuildValue("llll",
- _rv,
- foundTime,
- foundDuration,
- offset);
- return _res;
+ PyMac_PRECHECK(TextMediaFindNextText);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&slhl",
+ CmpInstObj_Convert, &mh,
+ &text,
+ &size,
+ &findFlags,
+ &startTime))
+ return NULL;
+ _rv = TextMediaFindNextText(mh,
+ text,
+ size,
+ findFlags,
+ startTime,
+ &foundTime,
+ &foundDuration,
+ &offset);
+ _res = Py_BuildValue("llll",
+ _rv,
+ foundTime,
+ foundDuration,
+ offset);
+ return _res;
}
static PyObject *Qt_TextMediaHiliteTextSample(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- TimeValue sampleTime;
- short hiliteStart;
- short hiliteEnd;
- RGBColor rgbHiliteColor;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ TimeValue sampleTime;
+ short hiliteStart;
+ short hiliteEnd;
+ RGBColor rgbHiliteColor;
#ifndef TextMediaHiliteTextSample
- PyMac_PRECHECK(TextMediaHiliteTextSample);
-#endif
- if (!PyArg_ParseTuple(_args, "O&lhh",
- CmpInstObj_Convert, &mh,
- &sampleTime,
- &hiliteStart,
- &hiliteEnd))
- return NULL;
- _rv = TextMediaHiliteTextSample(mh,
- sampleTime,
- hiliteStart,
- hiliteEnd,
- &rgbHiliteColor);
- _res = Py_BuildValue("lO&",
- _rv,
- QdRGB_New, &rgbHiliteColor);
- return _res;
+ PyMac_PRECHECK(TextMediaHiliteTextSample);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&lhh",
+ CmpInstObj_Convert, &mh,
+ &sampleTime,
+ &hiliteStart,
+ &hiliteEnd))
+ return NULL;
+ _rv = TextMediaHiliteTextSample(mh,
+ sampleTime,
+ hiliteStart,
+ hiliteEnd,
+ &rgbHiliteColor);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ QdRGB_New, &rgbHiliteColor);
+ return _res;
}
static PyObject *Qt_TextMediaSetTextSampleData(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- void * data;
- OSType dataType;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ void * data;
+ OSType dataType;
#ifndef TextMediaSetTextSampleData
- PyMac_PRECHECK(TextMediaSetTextSampleData);
+ PyMac_PRECHECK(TextMediaSetTextSampleData);
#endif
- if (!PyArg_ParseTuple(_args, "O&sO&",
- CmpInstObj_Convert, &mh,
- &data,
- PyMac_GetOSType, &dataType))
- return NULL;
- _rv = TextMediaSetTextSampleData(mh,
- data,
- dataType);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&sO&",
+ CmpInstObj_Convert, &mh,
+ &data,
+ PyMac_GetOSType, &dataType))
+ return NULL;
+ _rv = TextMediaSetTextSampleData(mh,
+ data,
+ dataType);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SpriteMediaSetProperty(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- short spriteIndex;
- long propertyType;
- void * propertyValue;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ short spriteIndex;
+ long propertyType;
+ void * propertyValue;
#ifndef SpriteMediaSetProperty
- PyMac_PRECHECK(SpriteMediaSetProperty);
-#endif
- if (!PyArg_ParseTuple(_args, "O&hls",
- CmpInstObj_Convert, &mh,
- &spriteIndex,
- &propertyType,
- &propertyValue))
- return NULL;
- _rv = SpriteMediaSetProperty(mh,
- spriteIndex,
- propertyType,
- propertyValue);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyMac_PRECHECK(SpriteMediaSetProperty);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&hls",
+ CmpInstObj_Convert, &mh,
+ &spriteIndex,
+ &propertyType,
+ &propertyValue))
+ return NULL;
+ _rv = SpriteMediaSetProperty(mh,
+ spriteIndex,
+ propertyType,
+ propertyValue);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SpriteMediaGetProperty(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- short spriteIndex;
- long propertyType;
- void * propertyValue;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ short spriteIndex;
+ long propertyType;
+ void * propertyValue;
#ifndef SpriteMediaGetProperty
- PyMac_PRECHECK(SpriteMediaGetProperty);
-#endif
- if (!PyArg_ParseTuple(_args, "O&hls",
- CmpInstObj_Convert, &mh,
- &spriteIndex,
- &propertyType,
- &propertyValue))
- return NULL;
- _rv = SpriteMediaGetProperty(mh,
- spriteIndex,
- propertyType,
- propertyValue);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyMac_PRECHECK(SpriteMediaGetProperty);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&hls",
+ CmpInstObj_Convert, &mh,
+ &spriteIndex,
+ &propertyType,
+ &propertyValue))
+ return NULL;
+ _rv = SpriteMediaGetProperty(mh,
+ spriteIndex,
+ propertyType,
+ propertyValue);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SpriteMediaHitTestSprites(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- long flags;
- Point loc;
- short spriteHitIndex;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ long flags;
+ Point loc;
+ short spriteHitIndex;
#ifndef SpriteMediaHitTestSprites
- PyMac_PRECHECK(SpriteMediaHitTestSprites);
-#endif
- if (!PyArg_ParseTuple(_args, "O&lO&",
- CmpInstObj_Convert, &mh,
- &flags,
- PyMac_GetPoint, &loc))
- return NULL;
- _rv = SpriteMediaHitTestSprites(mh,
- flags,
- loc,
- &spriteHitIndex);
- _res = Py_BuildValue("lh",
- _rv,
- spriteHitIndex);
- return _res;
+ PyMac_PRECHECK(SpriteMediaHitTestSprites);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&lO&",
+ CmpInstObj_Convert, &mh,
+ &flags,
+ PyMac_GetPoint, &loc))
+ return NULL;
+ _rv = SpriteMediaHitTestSprites(mh,
+ flags,
+ loc,
+ &spriteHitIndex);
+ _res = Py_BuildValue("lh",
+ _rv,
+ spriteHitIndex);
+ return _res;
}
static PyObject *Qt_SpriteMediaCountSprites(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- short numSprites;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ short numSprites;
#ifndef SpriteMediaCountSprites
- PyMac_PRECHECK(SpriteMediaCountSprites);
+ PyMac_PRECHECK(SpriteMediaCountSprites);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &mh))
- return NULL;
- _rv = SpriteMediaCountSprites(mh,
- &numSprites);
- _res = Py_BuildValue("lh",
- _rv,
- numSprites);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &mh))
+ return NULL;
+ _rv = SpriteMediaCountSprites(mh,
+ &numSprites);
+ _res = Py_BuildValue("lh",
+ _rv,
+ numSprites);
+ return _res;
}
static PyObject *Qt_SpriteMediaCountImages(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- short numImages;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ short numImages;
#ifndef SpriteMediaCountImages
- PyMac_PRECHECK(SpriteMediaCountImages);
+ PyMac_PRECHECK(SpriteMediaCountImages);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &mh))
- return NULL;
- _rv = SpriteMediaCountImages(mh,
- &numImages);
- _res = Py_BuildValue("lh",
- _rv,
- numImages);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &mh))
+ return NULL;
+ _rv = SpriteMediaCountImages(mh,
+ &numImages);
+ _res = Py_BuildValue("lh",
+ _rv,
+ numImages);
+ return _res;
}
static PyObject *Qt_SpriteMediaGetIndImageDescription(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- short imageIndex;
- ImageDescriptionHandle imageDescription;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ short imageIndex;
+ ImageDescriptionHandle imageDescription;
#ifndef SpriteMediaGetIndImageDescription
- PyMac_PRECHECK(SpriteMediaGetIndImageDescription);
+ PyMac_PRECHECK(SpriteMediaGetIndImageDescription);
#endif
- if (!PyArg_ParseTuple(_args, "O&hO&",
- CmpInstObj_Convert, &mh,
- &imageIndex,
- ResObj_Convert, &imageDescription))
- return NULL;
- _rv = SpriteMediaGetIndImageDescription(mh,
- imageIndex,
- imageDescription);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&hO&",
+ CmpInstObj_Convert, &mh,
+ &imageIndex,
+ ResObj_Convert, &imageDescription))
+ return NULL;
+ _rv = SpriteMediaGetIndImageDescription(mh,
+ imageIndex,
+ imageDescription);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SpriteMediaGetDisplayedSampleNumber(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- long sampleNum;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ long sampleNum;
#ifndef SpriteMediaGetDisplayedSampleNumber
- PyMac_PRECHECK(SpriteMediaGetDisplayedSampleNumber);
+ PyMac_PRECHECK(SpriteMediaGetDisplayedSampleNumber);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &mh))
- return NULL;
- _rv = SpriteMediaGetDisplayedSampleNumber(mh,
- &sampleNum);
- _res = Py_BuildValue("ll",
- _rv,
- sampleNum);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &mh))
+ return NULL;
+ _rv = SpriteMediaGetDisplayedSampleNumber(mh,
+ &sampleNum);
+ _res = Py_BuildValue("ll",
+ _rv,
+ sampleNum);
+ return _res;
}
static PyObject *Qt_SpriteMediaGetSpriteName(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- QTAtomID spriteID;
- Str255 spriteName;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ QTAtomID spriteID;
+ Str255 spriteName;
#ifndef SpriteMediaGetSpriteName
- PyMac_PRECHECK(SpriteMediaGetSpriteName);
+ PyMac_PRECHECK(SpriteMediaGetSpriteName);
#endif
- if (!PyArg_ParseTuple(_args, "O&lO&",
- CmpInstObj_Convert, &mh,
- &spriteID,
- PyMac_GetStr255, spriteName))
- return NULL;
- _rv = SpriteMediaGetSpriteName(mh,
- spriteID,
- spriteName);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&lO&",
+ CmpInstObj_Convert, &mh,
+ &spriteID,
+ PyMac_GetStr255, spriteName))
+ return NULL;
+ _rv = SpriteMediaGetSpriteName(mh,
+ spriteID,
+ spriteName);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SpriteMediaGetImageName(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- short imageIndex;
- Str255 imageName;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ short imageIndex;
+ Str255 imageName;
#ifndef SpriteMediaGetImageName
- PyMac_PRECHECK(SpriteMediaGetImageName);
+ PyMac_PRECHECK(SpriteMediaGetImageName);
#endif
- if (!PyArg_ParseTuple(_args, "O&hO&",
- CmpInstObj_Convert, &mh,
- &imageIndex,
- PyMac_GetStr255, imageName))
- return NULL;
- _rv = SpriteMediaGetImageName(mh,
- imageIndex,
- imageName);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&hO&",
+ CmpInstObj_Convert, &mh,
+ &imageIndex,
+ PyMac_GetStr255, imageName))
+ return NULL;
+ _rv = SpriteMediaGetImageName(mh,
+ imageIndex,
+ imageName);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SpriteMediaSetSpriteProperty(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- QTAtomID spriteID;
- long propertyType;
- void * propertyValue;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ QTAtomID spriteID;
+ long propertyType;
+ void * propertyValue;
#ifndef SpriteMediaSetSpriteProperty
- PyMac_PRECHECK(SpriteMediaSetSpriteProperty);
-#endif
- if (!PyArg_ParseTuple(_args, "O&lls",
- CmpInstObj_Convert, &mh,
- &spriteID,
- &propertyType,
- &propertyValue))
- return NULL;
- _rv = SpriteMediaSetSpriteProperty(mh,
- spriteID,
- propertyType,
- propertyValue);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyMac_PRECHECK(SpriteMediaSetSpriteProperty);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&lls",
+ CmpInstObj_Convert, &mh,
+ &spriteID,
+ &propertyType,
+ &propertyValue))
+ return NULL;
+ _rv = SpriteMediaSetSpriteProperty(mh,
+ spriteID,
+ propertyType,
+ propertyValue);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SpriteMediaGetSpriteProperty(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- QTAtomID spriteID;
- long propertyType;
- void * propertyValue;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ QTAtomID spriteID;
+ long propertyType;
+ void * propertyValue;
#ifndef SpriteMediaGetSpriteProperty
- PyMac_PRECHECK(SpriteMediaGetSpriteProperty);
-#endif
- if (!PyArg_ParseTuple(_args, "O&lls",
- CmpInstObj_Convert, &mh,
- &spriteID,
- &propertyType,
- &propertyValue))
- return NULL;
- _rv = SpriteMediaGetSpriteProperty(mh,
- spriteID,
- propertyType,
- propertyValue);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyMac_PRECHECK(SpriteMediaGetSpriteProperty);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&lls",
+ CmpInstObj_Convert, &mh,
+ &spriteID,
+ &propertyType,
+ &propertyValue))
+ return NULL;
+ _rv = SpriteMediaGetSpriteProperty(mh,
+ spriteID,
+ propertyType,
+ propertyValue);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SpriteMediaHitTestAllSprites(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- long flags;
- Point loc;
- QTAtomID spriteHitID;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ long flags;
+ Point loc;
+ QTAtomID spriteHitID;
#ifndef SpriteMediaHitTestAllSprites
- PyMac_PRECHECK(SpriteMediaHitTestAllSprites);
-#endif
- if (!PyArg_ParseTuple(_args, "O&lO&",
- CmpInstObj_Convert, &mh,
- &flags,
- PyMac_GetPoint, &loc))
- return NULL;
- _rv = SpriteMediaHitTestAllSprites(mh,
- flags,
- loc,
- &spriteHitID);
- _res = Py_BuildValue("ll",
- _rv,
- spriteHitID);
- return _res;
+ PyMac_PRECHECK(SpriteMediaHitTestAllSprites);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&lO&",
+ CmpInstObj_Convert, &mh,
+ &flags,
+ PyMac_GetPoint, &loc))
+ return NULL;
+ _rv = SpriteMediaHitTestAllSprites(mh,
+ flags,
+ loc,
+ &spriteHitID);
+ _res = Py_BuildValue("ll",
+ _rv,
+ spriteHitID);
+ return _res;
}
static PyObject *Qt_SpriteMediaHitTestOneSprite(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- QTAtomID spriteID;
- long flags;
- Point loc;
- Boolean wasHit;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ QTAtomID spriteID;
+ long flags;
+ Point loc;
+ Boolean wasHit;
#ifndef SpriteMediaHitTestOneSprite
- PyMac_PRECHECK(SpriteMediaHitTestOneSprite);
-#endif
- if (!PyArg_ParseTuple(_args, "O&llO&",
- CmpInstObj_Convert, &mh,
- &spriteID,
- &flags,
- PyMac_GetPoint, &loc))
- return NULL;
- _rv = SpriteMediaHitTestOneSprite(mh,
- spriteID,
- flags,
- loc,
- &wasHit);
- _res = Py_BuildValue("lb",
- _rv,
- wasHit);
- return _res;
+ PyMac_PRECHECK(SpriteMediaHitTestOneSprite);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&llO&",
+ CmpInstObj_Convert, &mh,
+ &spriteID,
+ &flags,
+ PyMac_GetPoint, &loc))
+ return NULL;
+ _rv = SpriteMediaHitTestOneSprite(mh,
+ spriteID,
+ flags,
+ loc,
+ &wasHit);
+ _res = Py_BuildValue("lb",
+ _rv,
+ wasHit);
+ return _res;
}
static PyObject *Qt_SpriteMediaSpriteIndexToID(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- short spriteIndex;
- QTAtomID spriteID;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ short spriteIndex;
+ QTAtomID spriteID;
#ifndef SpriteMediaSpriteIndexToID
- PyMac_PRECHECK(SpriteMediaSpriteIndexToID);
+ PyMac_PRECHECK(SpriteMediaSpriteIndexToID);
#endif
- if (!PyArg_ParseTuple(_args, "O&h",
- CmpInstObj_Convert, &mh,
- &spriteIndex))
- return NULL;
- _rv = SpriteMediaSpriteIndexToID(mh,
- spriteIndex,
- &spriteID);
- _res = Py_BuildValue("ll",
- _rv,
- spriteID);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&h",
+ CmpInstObj_Convert, &mh,
+ &spriteIndex))
+ return NULL;
+ _rv = SpriteMediaSpriteIndexToID(mh,
+ spriteIndex,
+ &spriteID);
+ _res = Py_BuildValue("ll",
+ _rv,
+ spriteID);
+ return _res;
}
static PyObject *Qt_SpriteMediaSpriteIDToIndex(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- QTAtomID spriteID;
- short spriteIndex;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ QTAtomID spriteID;
+ short spriteIndex;
#ifndef SpriteMediaSpriteIDToIndex
- PyMac_PRECHECK(SpriteMediaSpriteIDToIndex);
+ PyMac_PRECHECK(SpriteMediaSpriteIDToIndex);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &mh,
- &spriteID))
- return NULL;
- _rv = SpriteMediaSpriteIDToIndex(mh,
- spriteID,
- &spriteIndex);
- _res = Py_BuildValue("lh",
- _rv,
- spriteIndex);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &mh,
+ &spriteID))
+ return NULL;
+ _rv = SpriteMediaSpriteIDToIndex(mh,
+ spriteID,
+ &spriteIndex);
+ _res = Py_BuildValue("lh",
+ _rv,
+ spriteIndex);
+ return _res;
}
static PyObject *Qt_SpriteMediaSetActionVariable(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- QTAtomID variableID;
- float value;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ QTAtomID variableID;
+ float value;
#ifndef SpriteMediaSetActionVariable
- PyMac_PRECHECK(SpriteMediaSetActionVariable);
+ PyMac_PRECHECK(SpriteMediaSetActionVariable);
#endif
- if (!PyArg_ParseTuple(_args, "O&lf",
- CmpInstObj_Convert, &mh,
- &variableID,
- &value))
- return NULL;
- _rv = SpriteMediaSetActionVariable(mh,
- variableID,
- &value);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&lf",
+ CmpInstObj_Convert, &mh,
+ &variableID,
+ &value))
+ return NULL;
+ _rv = SpriteMediaSetActionVariable(mh,
+ variableID,
+ &value);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SpriteMediaGetActionVariable(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- QTAtomID variableID;
- float value;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ QTAtomID variableID;
+ float value;
#ifndef SpriteMediaGetActionVariable
- PyMac_PRECHECK(SpriteMediaGetActionVariable);
+ PyMac_PRECHECK(SpriteMediaGetActionVariable);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &mh,
- &variableID))
- return NULL;
- _rv = SpriteMediaGetActionVariable(mh,
- variableID,
- &value);
- _res = Py_BuildValue("lf",
- _rv,
- value);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &mh,
+ &variableID))
+ return NULL;
+ _rv = SpriteMediaGetActionVariable(mh,
+ variableID,
+ &value);
+ _res = Py_BuildValue("lf",
+ _rv,
+ value);
+ return _res;
}
static PyObject *Qt_SpriteMediaDisposeSprite(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- QTAtomID spriteID;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ QTAtomID spriteID;
#ifndef SpriteMediaDisposeSprite
- PyMac_PRECHECK(SpriteMediaDisposeSprite);
+ PyMac_PRECHECK(SpriteMediaDisposeSprite);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &mh,
- &spriteID))
- return NULL;
- _rv = SpriteMediaDisposeSprite(mh,
- spriteID);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &mh,
+ &spriteID))
+ return NULL;
+ _rv = SpriteMediaDisposeSprite(mh,
+ spriteID);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SpriteMediaSetActionVariableToString(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- QTAtomID variableID;
- Ptr theCString;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ QTAtomID variableID;
+ Ptr theCString;
#ifndef SpriteMediaSetActionVariableToString
- PyMac_PRECHECK(SpriteMediaSetActionVariableToString);
+ PyMac_PRECHECK(SpriteMediaSetActionVariableToString);
#endif
- if (!PyArg_ParseTuple(_args, "O&ls",
- CmpInstObj_Convert, &mh,
- &variableID,
- &theCString))
- return NULL;
- _rv = SpriteMediaSetActionVariableToString(mh,
- variableID,
- theCString);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&ls",
+ CmpInstObj_Convert, &mh,
+ &variableID,
+ &theCString))
+ return NULL;
+ _rv = SpriteMediaSetActionVariableToString(mh,
+ variableID,
+ theCString);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SpriteMediaGetActionVariableAsString(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- QTAtomID variableID;
- Handle theCString;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ QTAtomID variableID;
+ Handle theCString;
#ifndef SpriteMediaGetActionVariableAsString
- PyMac_PRECHECK(SpriteMediaGetActionVariableAsString);
+ PyMac_PRECHECK(SpriteMediaGetActionVariableAsString);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &mh,
- &variableID))
- return NULL;
- _rv = SpriteMediaGetActionVariableAsString(mh,
- variableID,
- &theCString);
- _res = Py_BuildValue("lO&",
- _rv,
- ResObj_New, theCString);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &mh,
+ &variableID))
+ return NULL;
+ _rv = SpriteMediaGetActionVariableAsString(mh,
+ variableID,
+ &theCString);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ ResObj_New, theCString);
+ return _res;
}
static PyObject *Qt_SpriteMediaNewImage(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- Handle dataRef;
- OSType dataRefType;
- QTAtomID desiredID;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ Handle dataRef;
+ OSType dataRefType;
+ QTAtomID desiredID;
#ifndef SpriteMediaNewImage
- PyMac_PRECHECK(SpriteMediaNewImage);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&l",
- CmpInstObj_Convert, &mh,
- ResObj_Convert, &dataRef,
- PyMac_GetOSType, &dataRefType,
- &desiredID))
- return NULL;
- _rv = SpriteMediaNewImage(mh,
- dataRef,
- dataRefType,
- desiredID);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyMac_PRECHECK(SpriteMediaNewImage);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&l",
+ CmpInstObj_Convert, &mh,
+ ResObj_Convert, &dataRef,
+ PyMac_GetOSType, &dataRefType,
+ &desiredID))
+ return NULL;
+ _rv = SpriteMediaNewImage(mh,
+ dataRef,
+ dataRefType,
+ desiredID);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SpriteMediaDisposeImage(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- short imageIndex;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ short imageIndex;
#ifndef SpriteMediaDisposeImage
- PyMac_PRECHECK(SpriteMediaDisposeImage);
+ PyMac_PRECHECK(SpriteMediaDisposeImage);
#endif
- if (!PyArg_ParseTuple(_args, "O&h",
- CmpInstObj_Convert, &mh,
- &imageIndex))
- return NULL;
- _rv = SpriteMediaDisposeImage(mh,
- imageIndex);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&h",
+ CmpInstObj_Convert, &mh,
+ &imageIndex))
+ return NULL;
+ _rv = SpriteMediaDisposeImage(mh,
+ imageIndex);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SpriteMediaImageIndexToID(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- short imageIndex;
- QTAtomID imageID;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ short imageIndex;
+ QTAtomID imageID;
#ifndef SpriteMediaImageIndexToID
- PyMac_PRECHECK(SpriteMediaImageIndexToID);
+ PyMac_PRECHECK(SpriteMediaImageIndexToID);
#endif
- if (!PyArg_ParseTuple(_args, "O&h",
- CmpInstObj_Convert, &mh,
- &imageIndex))
- return NULL;
- _rv = SpriteMediaImageIndexToID(mh,
- imageIndex,
- &imageID);
- _res = Py_BuildValue("ll",
- _rv,
- imageID);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&h",
+ CmpInstObj_Convert, &mh,
+ &imageIndex))
+ return NULL;
+ _rv = SpriteMediaImageIndexToID(mh,
+ imageIndex,
+ &imageID);
+ _res = Py_BuildValue("ll",
+ _rv,
+ imageID);
+ return _res;
}
static PyObject *Qt_SpriteMediaImageIDToIndex(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- QTAtomID imageID;
- short imageIndex;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ QTAtomID imageID;
+ short imageIndex;
#ifndef SpriteMediaImageIDToIndex
- PyMac_PRECHECK(SpriteMediaImageIDToIndex);
+ PyMac_PRECHECK(SpriteMediaImageIDToIndex);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &mh,
- &imageID))
- return NULL;
- _rv = SpriteMediaImageIDToIndex(mh,
- imageID,
- &imageIndex);
- _res = Py_BuildValue("lh",
- _rv,
- imageIndex);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &mh,
+ &imageID))
+ return NULL;
+ _rv = SpriteMediaImageIDToIndex(mh,
+ imageID,
+ &imageIndex);
+ _res = Py_BuildValue("lh",
+ _rv,
+ imageIndex);
+ return _res;
}
static PyObject *Qt_FlashMediaSetPan(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- short xPercent;
- short yPercent;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ short xPercent;
+ short yPercent;
#ifndef FlashMediaSetPan
- PyMac_PRECHECK(FlashMediaSetPan);
+ PyMac_PRECHECK(FlashMediaSetPan);
#endif
- if (!PyArg_ParseTuple(_args, "O&hh",
- CmpInstObj_Convert, &mh,
- &xPercent,
- &yPercent))
- return NULL;
- _rv = FlashMediaSetPan(mh,
- xPercent,
- yPercent);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&hh",
+ CmpInstObj_Convert, &mh,
+ &xPercent,
+ &yPercent))
+ return NULL;
+ _rv = FlashMediaSetPan(mh,
+ xPercent,
+ yPercent);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_FlashMediaSetZoom(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- short factor;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ short factor;
#ifndef FlashMediaSetZoom
- PyMac_PRECHECK(FlashMediaSetZoom);
+ PyMac_PRECHECK(FlashMediaSetZoom);
#endif
- if (!PyArg_ParseTuple(_args, "O&h",
- CmpInstObj_Convert, &mh,
- &factor))
- return NULL;
- _rv = FlashMediaSetZoom(mh,
- factor);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&h",
+ CmpInstObj_Convert, &mh,
+ &factor))
+ return NULL;
+ _rv = FlashMediaSetZoom(mh,
+ factor);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_FlashMediaSetZoomRect(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- long left;
- long top;
- long right;
- long bottom;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ long left;
+ long top;
+ long right;
+ long bottom;
#ifndef FlashMediaSetZoomRect
- PyMac_PRECHECK(FlashMediaSetZoomRect);
-#endif
- if (!PyArg_ParseTuple(_args, "O&llll",
- CmpInstObj_Convert, &mh,
- &left,
- &top,
- &right,
- &bottom))
- return NULL;
- _rv = FlashMediaSetZoomRect(mh,
- left,
- top,
- right,
- bottom);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyMac_PRECHECK(FlashMediaSetZoomRect);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&llll",
+ CmpInstObj_Convert, &mh,
+ &left,
+ &top,
+ &right,
+ &bottom))
+ return NULL;
+ _rv = FlashMediaSetZoomRect(mh,
+ left,
+ top,
+ right,
+ bottom);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_FlashMediaGetRefConBounds(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- long refCon;
- long left;
- long top;
- long right;
- long bottom;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ long refCon;
+ long left;
+ long top;
+ long right;
+ long bottom;
#ifndef FlashMediaGetRefConBounds
- PyMac_PRECHECK(FlashMediaGetRefConBounds);
-#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &mh,
- &refCon))
- return NULL;
- _rv = FlashMediaGetRefConBounds(mh,
- refCon,
- &left,
- &top,
- &right,
- &bottom);
- _res = Py_BuildValue("lllll",
- _rv,
- left,
- top,
- right,
- bottom);
- return _res;
+ PyMac_PRECHECK(FlashMediaGetRefConBounds);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &mh,
+ &refCon))
+ return NULL;
+ _rv = FlashMediaGetRefConBounds(mh,
+ refCon,
+ &left,
+ &top,
+ &right,
+ &bottom);
+ _res = Py_BuildValue("lllll",
+ _rv,
+ left,
+ top,
+ right,
+ bottom);
+ return _res;
}
static PyObject *Qt_FlashMediaGetRefConID(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- long refCon;
- long refConID;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ long refCon;
+ long refConID;
#ifndef FlashMediaGetRefConID
- PyMac_PRECHECK(FlashMediaGetRefConID);
+ PyMac_PRECHECK(FlashMediaGetRefConID);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &mh,
- &refCon))
- return NULL;
- _rv = FlashMediaGetRefConID(mh,
- refCon,
- &refConID);
- _res = Py_BuildValue("ll",
- _rv,
- refConID);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &mh,
+ &refCon))
+ return NULL;
+ _rv = FlashMediaGetRefConID(mh,
+ refCon,
+ &refConID);
+ _res = Py_BuildValue("ll",
+ _rv,
+ refConID);
+ return _res;
}
static PyObject *Qt_FlashMediaIDToRefCon(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- long refConID;
- long refCon;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ long refConID;
+ long refCon;
#ifndef FlashMediaIDToRefCon
- PyMac_PRECHECK(FlashMediaIDToRefCon);
+ PyMac_PRECHECK(FlashMediaIDToRefCon);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &mh,
- &refConID))
- return NULL;
- _rv = FlashMediaIDToRefCon(mh,
- refConID,
- &refCon);
- _res = Py_BuildValue("ll",
- _rv,
- refCon);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &mh,
+ &refConID))
+ return NULL;
+ _rv = FlashMediaIDToRefCon(mh,
+ refConID,
+ &refCon);
+ _res = Py_BuildValue("ll",
+ _rv,
+ refCon);
+ return _res;
}
static PyObject *Qt_FlashMediaGetDisplayedFrameNumber(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- long flashFrameNumber;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ long flashFrameNumber;
#ifndef FlashMediaGetDisplayedFrameNumber
- PyMac_PRECHECK(FlashMediaGetDisplayedFrameNumber);
+ PyMac_PRECHECK(FlashMediaGetDisplayedFrameNumber);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &mh))
- return NULL;
- _rv = FlashMediaGetDisplayedFrameNumber(mh,
- &flashFrameNumber);
- _res = Py_BuildValue("ll",
- _rv,
- flashFrameNumber);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &mh))
+ return NULL;
+ _rv = FlashMediaGetDisplayedFrameNumber(mh,
+ &flashFrameNumber);
+ _res = Py_BuildValue("ll",
+ _rv,
+ flashFrameNumber);
+ return _res;
}
static PyObject *Qt_FlashMediaFrameNumberToMovieTime(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- long flashFrameNumber;
- TimeValue movieTime;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ long flashFrameNumber;
+ TimeValue movieTime;
#ifndef FlashMediaFrameNumberToMovieTime
- PyMac_PRECHECK(FlashMediaFrameNumberToMovieTime);
+ PyMac_PRECHECK(FlashMediaFrameNumberToMovieTime);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &mh,
- &flashFrameNumber))
- return NULL;
- _rv = FlashMediaFrameNumberToMovieTime(mh,
- flashFrameNumber,
- &movieTime);
- _res = Py_BuildValue("ll",
- _rv,
- movieTime);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &mh,
+ &flashFrameNumber))
+ return NULL;
+ _rv = FlashMediaFrameNumberToMovieTime(mh,
+ flashFrameNumber,
+ &movieTime);
+ _res = Py_BuildValue("ll",
+ _rv,
+ movieTime);
+ return _res;
}
static PyObject *Qt_FlashMediaFrameLabelToMovieTime(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- Ptr theLabel;
- TimeValue movieTime;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ Ptr theLabel;
+ TimeValue movieTime;
#ifndef FlashMediaFrameLabelToMovieTime
- PyMac_PRECHECK(FlashMediaFrameLabelToMovieTime);
+ PyMac_PRECHECK(FlashMediaFrameLabelToMovieTime);
#endif
- if (!PyArg_ParseTuple(_args, "O&s",
- CmpInstObj_Convert, &mh,
- &theLabel))
- return NULL;
- _rv = FlashMediaFrameLabelToMovieTime(mh,
- theLabel,
- &movieTime);
- _res = Py_BuildValue("ll",
- _rv,
- movieTime);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&s",
+ CmpInstObj_Convert, &mh,
+ &theLabel))
+ return NULL;
+ _rv = FlashMediaFrameLabelToMovieTime(mh,
+ theLabel,
+ &movieTime);
+ _res = Py_BuildValue("ll",
+ _rv,
+ movieTime);
+ return _res;
}
static PyObject *Qt_FlashMediaGetFlashVariable(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- char path;
- char name;
- Handle theVariableCStringOut;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ char path;
+ char name;
+ Handle theVariableCStringOut;
#ifndef FlashMediaGetFlashVariable
- PyMac_PRECHECK(FlashMediaGetFlashVariable);
-#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &mh))
- return NULL;
- _rv = FlashMediaGetFlashVariable(mh,
- &path,
- &name,
- &theVariableCStringOut);
- _res = Py_BuildValue("lccO&",
- _rv,
- path,
- name,
- ResObj_New, theVariableCStringOut);
- return _res;
+ PyMac_PRECHECK(FlashMediaGetFlashVariable);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &mh))
+ return NULL;
+ _rv = FlashMediaGetFlashVariable(mh,
+ &path,
+ &name,
+ &theVariableCStringOut);
+ _res = Py_BuildValue("lccO&",
+ _rv,
+ path,
+ name,
+ ResObj_New, theVariableCStringOut);
+ return _res;
}
static PyObject *Qt_FlashMediaSetFlashVariable(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- char path;
- char name;
- char value;
- Boolean updateFocus;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ char path;
+ char name;
+ char value;
+ Boolean updateFocus;
#ifndef FlashMediaSetFlashVariable
- PyMac_PRECHECK(FlashMediaSetFlashVariable);
-#endif
- if (!PyArg_ParseTuple(_args, "O&b",
- CmpInstObj_Convert, &mh,
- &updateFocus))
- return NULL;
- _rv = FlashMediaSetFlashVariable(mh,
- &path,
- &name,
- &value,
- updateFocus);
- _res = Py_BuildValue("lccc",
- _rv,
- path,
- name,
- value);
- return _res;
+ PyMac_PRECHECK(FlashMediaSetFlashVariable);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&b",
+ CmpInstObj_Convert, &mh,
+ &updateFocus))
+ return NULL;
+ _rv = FlashMediaSetFlashVariable(mh,
+ &path,
+ &name,
+ &value,
+ updateFocus);
+ _res = Py_BuildValue("lccc",
+ _rv,
+ path,
+ name,
+ value);
+ return _res;
}
static PyObject *Qt_FlashMediaDoButtonActions(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- char path;
- long buttonID;
- long transition;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ char path;
+ long buttonID;
+ long transition;
#ifndef FlashMediaDoButtonActions
- PyMac_PRECHECK(FlashMediaDoButtonActions);
-#endif
- if (!PyArg_ParseTuple(_args, "O&ll",
- CmpInstObj_Convert, &mh,
- &buttonID,
- &transition))
- return NULL;
- _rv = FlashMediaDoButtonActions(mh,
- &path,
- buttonID,
- transition);
- _res = Py_BuildValue("lc",
- _rv,
- path);
- return _res;
+ PyMac_PRECHECK(FlashMediaDoButtonActions);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&ll",
+ CmpInstObj_Convert, &mh,
+ &buttonID,
+ &transition))
+ return NULL;
+ _rv = FlashMediaDoButtonActions(mh,
+ &path,
+ buttonID,
+ transition);
+ _res = Py_BuildValue("lc",
+ _rv,
+ path);
+ return _res;
}
static PyObject *Qt_FlashMediaGetSupportedSwfVersion(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- UInt8 swfVersion;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ UInt8 swfVersion;
#ifndef FlashMediaGetSupportedSwfVersion
- PyMac_PRECHECK(FlashMediaGetSupportedSwfVersion);
+ PyMac_PRECHECK(FlashMediaGetSupportedSwfVersion);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &mh))
- return NULL;
- _rv = FlashMediaGetSupportedSwfVersion(mh,
- &swfVersion);
- _res = Py_BuildValue("lb",
- _rv,
- swfVersion);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &mh))
+ return NULL;
+ _rv = FlashMediaGetSupportedSwfVersion(mh,
+ &swfVersion);
+ _res = Py_BuildValue("lb",
+ _rv,
+ swfVersion);
+ return _res;
}
static PyObject *Qt_Media3DGetCurrentGroup(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- void * group;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ void * group;
#ifndef Media3DGetCurrentGroup
- PyMac_PRECHECK(Media3DGetCurrentGroup);
+ PyMac_PRECHECK(Media3DGetCurrentGroup);
#endif
- if (!PyArg_ParseTuple(_args, "O&s",
- CmpInstObj_Convert, &mh,
- &group))
- return NULL;
- _rv = Media3DGetCurrentGroup(mh,
- group);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&s",
+ CmpInstObj_Convert, &mh,
+ &group))
+ return NULL;
+ _rv = Media3DGetCurrentGroup(mh,
+ group);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_Media3DTranslateNamedObjectTo(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- char objectName;
- Fixed x;
- Fixed y;
- Fixed z;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ char objectName;
+ Fixed x;
+ Fixed y;
+ Fixed z;
#ifndef Media3DTranslateNamedObjectTo
- PyMac_PRECHECK(Media3DTranslateNamedObjectTo);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&O&",
- CmpInstObj_Convert, &mh,
- PyMac_GetFixed, &x,
- PyMac_GetFixed, &y,
- PyMac_GetFixed, &z))
- return NULL;
- _rv = Media3DTranslateNamedObjectTo(mh,
- &objectName,
- x,
- y,
- z);
- _res = Py_BuildValue("lc",
- _rv,
- objectName);
- return _res;
+ PyMac_PRECHECK(Media3DTranslateNamedObjectTo);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&O&",
+ CmpInstObj_Convert, &mh,
+ PyMac_GetFixed, &x,
+ PyMac_GetFixed, &y,
+ PyMac_GetFixed, &z))
+ return NULL;
+ _rv = Media3DTranslateNamedObjectTo(mh,
+ &objectName,
+ x,
+ y,
+ z);
+ _res = Py_BuildValue("lc",
+ _rv,
+ objectName);
+ return _res;
}
static PyObject *Qt_Media3DScaleNamedObjectTo(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- char objectName;
- Fixed xScale;
- Fixed yScale;
- Fixed zScale;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ char objectName;
+ Fixed xScale;
+ Fixed yScale;
+ Fixed zScale;
#ifndef Media3DScaleNamedObjectTo
- PyMac_PRECHECK(Media3DScaleNamedObjectTo);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&O&",
- CmpInstObj_Convert, &mh,
- PyMac_GetFixed, &xScale,
- PyMac_GetFixed, &yScale,
- PyMac_GetFixed, &zScale))
- return NULL;
- _rv = Media3DScaleNamedObjectTo(mh,
- &objectName,
- xScale,
- yScale,
- zScale);
- _res = Py_BuildValue("lc",
- _rv,
- objectName);
- return _res;
+ PyMac_PRECHECK(Media3DScaleNamedObjectTo);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&O&",
+ CmpInstObj_Convert, &mh,
+ PyMac_GetFixed, &xScale,
+ PyMac_GetFixed, &yScale,
+ PyMac_GetFixed, &zScale))
+ return NULL;
+ _rv = Media3DScaleNamedObjectTo(mh,
+ &objectName,
+ xScale,
+ yScale,
+ zScale);
+ _res = Py_BuildValue("lc",
+ _rv,
+ objectName);
+ return _res;
}
static PyObject *Qt_Media3DRotateNamedObjectTo(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- char objectName;
- Fixed xDegrees;
- Fixed yDegrees;
- Fixed zDegrees;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ char objectName;
+ Fixed xDegrees;
+ Fixed yDegrees;
+ Fixed zDegrees;
#ifndef Media3DRotateNamedObjectTo
- PyMac_PRECHECK(Media3DRotateNamedObjectTo);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&O&",
- CmpInstObj_Convert, &mh,
- PyMac_GetFixed, &xDegrees,
- PyMac_GetFixed, &yDegrees,
- PyMac_GetFixed, &zDegrees))
- return NULL;
- _rv = Media3DRotateNamedObjectTo(mh,
- &objectName,
- xDegrees,
- yDegrees,
- zDegrees);
- _res = Py_BuildValue("lc",
- _rv,
- objectName);
- return _res;
+ PyMac_PRECHECK(Media3DRotateNamedObjectTo);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&O&",
+ CmpInstObj_Convert, &mh,
+ PyMac_GetFixed, &xDegrees,
+ PyMac_GetFixed, &yDegrees,
+ PyMac_GetFixed, &zDegrees))
+ return NULL;
+ _rv = Media3DRotateNamedObjectTo(mh,
+ &objectName,
+ xDegrees,
+ yDegrees,
+ zDegrees);
+ _res = Py_BuildValue("lc",
+ _rv,
+ objectName);
+ return _res;
}
static PyObject *Qt_Media3DSetCameraData(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- void * cameraData;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ void * cameraData;
#ifndef Media3DSetCameraData
- PyMac_PRECHECK(Media3DSetCameraData);
+ PyMac_PRECHECK(Media3DSetCameraData);
#endif
- if (!PyArg_ParseTuple(_args, "O&s",
- CmpInstObj_Convert, &mh,
- &cameraData))
- return NULL;
- _rv = Media3DSetCameraData(mh,
- cameraData);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&s",
+ CmpInstObj_Convert, &mh,
+ &cameraData))
+ return NULL;
+ _rv = Media3DSetCameraData(mh,
+ cameraData);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_Media3DGetCameraData(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- void * cameraData;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ void * cameraData;
#ifndef Media3DGetCameraData
- PyMac_PRECHECK(Media3DGetCameraData);
+ PyMac_PRECHECK(Media3DGetCameraData);
#endif
- if (!PyArg_ParseTuple(_args, "O&s",
- CmpInstObj_Convert, &mh,
- &cameraData))
- return NULL;
- _rv = Media3DGetCameraData(mh,
- cameraData);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&s",
+ CmpInstObj_Convert, &mh,
+ &cameraData))
+ return NULL;
+ _rv = Media3DGetCameraData(mh,
+ cameraData);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_Media3DSetCameraAngleAspect(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- QTFloatSingle fov;
- QTFloatSingle aspectRatioXToY;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ QTFloatSingle fov;
+ QTFloatSingle aspectRatioXToY;
#ifndef Media3DSetCameraAngleAspect
- PyMac_PRECHECK(Media3DSetCameraAngleAspect);
+ PyMac_PRECHECK(Media3DSetCameraAngleAspect);
#endif
- if (!PyArg_ParseTuple(_args, "O&ff",
- CmpInstObj_Convert, &mh,
- &fov,
- &aspectRatioXToY))
- return NULL;
- _rv = Media3DSetCameraAngleAspect(mh,
- fov,
- aspectRatioXToY);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&ff",
+ CmpInstObj_Convert, &mh,
+ &fov,
+ &aspectRatioXToY))
+ return NULL;
+ _rv = Media3DSetCameraAngleAspect(mh,
+ fov,
+ aspectRatioXToY);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_Media3DGetCameraAngleAspect(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- QTFloatSingle fov;
- QTFloatSingle aspectRatioXToY;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ QTFloatSingle fov;
+ QTFloatSingle aspectRatioXToY;
#ifndef Media3DGetCameraAngleAspect
- PyMac_PRECHECK(Media3DGetCameraAngleAspect);
+ PyMac_PRECHECK(Media3DGetCameraAngleAspect);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &mh))
- return NULL;
- _rv = Media3DGetCameraAngleAspect(mh,
- &fov,
- &aspectRatioXToY);
- _res = Py_BuildValue("lff",
- _rv,
- fov,
- aspectRatioXToY);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &mh))
+ return NULL;
+ _rv = Media3DGetCameraAngleAspect(mh,
+ &fov,
+ &aspectRatioXToY);
+ _res = Py_BuildValue("lff",
+ _rv,
+ fov,
+ aspectRatioXToY);
+ return _res;
}
static PyObject *Qt_Media3DSetCameraRange(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- void * tQ3CameraRange;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ void * tQ3CameraRange;
#ifndef Media3DSetCameraRange
- PyMac_PRECHECK(Media3DSetCameraRange);
+ PyMac_PRECHECK(Media3DSetCameraRange);
#endif
- if (!PyArg_ParseTuple(_args, "O&s",
- CmpInstObj_Convert, &mh,
- &tQ3CameraRange))
- return NULL;
- _rv = Media3DSetCameraRange(mh,
- tQ3CameraRange);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&s",
+ CmpInstObj_Convert, &mh,
+ &tQ3CameraRange))
+ return NULL;
+ _rv = Media3DSetCameraRange(mh,
+ tQ3CameraRange);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_Media3DGetCameraRange(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- void * tQ3CameraRange;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ void * tQ3CameraRange;
#ifndef Media3DGetCameraRange
- PyMac_PRECHECK(Media3DGetCameraRange);
+ PyMac_PRECHECK(Media3DGetCameraRange);
#endif
- if (!PyArg_ParseTuple(_args, "O&s",
- CmpInstObj_Convert, &mh,
- &tQ3CameraRange))
- return NULL;
- _rv = Media3DGetCameraRange(mh,
- tQ3CameraRange);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&s",
+ CmpInstObj_Convert, &mh,
+ &tQ3CameraRange))
+ return NULL;
+ _rv = Media3DGetCameraRange(mh,
+ tQ3CameraRange);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_NewTimeBase(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- TimeBase _rv;
+ PyObject *_res = NULL;
+ TimeBase _rv;
#ifndef NewTimeBase
- PyMac_PRECHECK(NewTimeBase);
+ PyMac_PRECHECK(NewTimeBase);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = NewTimeBase();
- _res = Py_BuildValue("O&",
- TimeBaseObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = NewTimeBase();
+ _res = Py_BuildValue("O&",
+ TimeBaseObj_New, _rv);
+ return _res;
}
static PyObject *Qt_ConvertTime(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- TimeRecord theTime;
- TimeBase newBase;
+ PyObject *_res = NULL;
+ TimeRecord theTime;
+ TimeBase newBase;
#ifndef ConvertTime
- PyMac_PRECHECK(ConvertTime);
+ PyMac_PRECHECK(ConvertTime);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- QtTimeRecord_Convert, &theTime,
- TimeBaseObj_Convert, &newBase))
- return NULL;
- ConvertTime(&theTime,
- newBase);
- _res = Py_BuildValue("O&",
- QtTimeRecord_New, &theTime);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ QtTimeRecord_Convert, &theTime,
+ TimeBaseObj_Convert, &newBase))
+ return NULL;
+ ConvertTime(&theTime,
+ newBase);
+ _res = Py_BuildValue("O&",
+ QtTimeRecord_New, &theTime);
+ return _res;
}
static PyObject *Qt_ConvertTimeScale(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- TimeRecord theTime;
- TimeScale newScale;
+ PyObject *_res = NULL;
+ TimeRecord theTime;
+ TimeScale newScale;
#ifndef ConvertTimeScale
- PyMac_PRECHECK(ConvertTimeScale);
+ PyMac_PRECHECK(ConvertTimeScale);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- QtTimeRecord_Convert, &theTime,
- &newScale))
- return NULL;
- ConvertTimeScale(&theTime,
- newScale);
- _res = Py_BuildValue("O&",
- QtTimeRecord_New, &theTime);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ QtTimeRecord_Convert, &theTime,
+ &newScale))
+ return NULL;
+ ConvertTimeScale(&theTime,
+ newScale);
+ _res = Py_BuildValue("O&",
+ QtTimeRecord_New, &theTime);
+ return _res;
}
static PyObject *Qt_AddTime(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- TimeRecord dst;
- TimeRecord src;
+ PyObject *_res = NULL;
+ TimeRecord dst;
+ TimeRecord src;
#ifndef AddTime
- PyMac_PRECHECK(AddTime);
+ PyMac_PRECHECK(AddTime);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- QtTimeRecord_Convert, &dst,
- QtTimeRecord_Convert, &src))
- return NULL;
- AddTime(&dst,
- &src);
- _res = Py_BuildValue("O&",
- QtTimeRecord_New, &dst);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ QtTimeRecord_Convert, &dst,
+ QtTimeRecord_Convert, &src))
+ return NULL;
+ AddTime(&dst,
+ &src);
+ _res = Py_BuildValue("O&",
+ QtTimeRecord_New, &dst);
+ return _res;
}
static PyObject *Qt_SubtractTime(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- TimeRecord dst;
- TimeRecord src;
+ PyObject *_res = NULL;
+ TimeRecord dst;
+ TimeRecord src;
#ifndef SubtractTime
- PyMac_PRECHECK(SubtractTime);
+ PyMac_PRECHECK(SubtractTime);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- QtTimeRecord_Convert, &dst,
- QtTimeRecord_Convert, &src))
- return NULL;
- SubtractTime(&dst,
- &src);
- _res = Py_BuildValue("O&",
- QtTimeRecord_New, &dst);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ QtTimeRecord_Convert, &dst,
+ QtTimeRecord_Convert, &src))
+ return NULL;
+ SubtractTime(&dst,
+ &src);
+ _res = Py_BuildValue("O&",
+ QtTimeRecord_New, &dst);
+ return _res;
}
static PyObject *Qt_MusicMediaGetIndexedTunePlayer(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- ComponentInstance ti;
- long sampleDescIndex;
- ComponentInstance tp;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ ComponentInstance ti;
+ long sampleDescIndex;
+ ComponentInstance tp;
#ifndef MusicMediaGetIndexedTunePlayer
- PyMac_PRECHECK(MusicMediaGetIndexedTunePlayer);
+ PyMac_PRECHECK(MusicMediaGetIndexedTunePlayer);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &ti,
- &sampleDescIndex))
- return NULL;
- _rv = MusicMediaGetIndexedTunePlayer(ti,
- sampleDescIndex,
- &tp);
- _res = Py_BuildValue("lO&",
- _rv,
- CmpInstObj_New, tp);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &ti,
+ &sampleDescIndex))
+ return NULL;
+ _rv = MusicMediaGetIndexedTunePlayer(ti,
+ sampleDescIndex,
+ &tp);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ CmpInstObj_New, tp);
+ return _res;
}
static PyObject *Qt_CodecManagerVersion(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- long version;
+ PyObject *_res = NULL;
+ OSErr _err;
+ long version;
#ifndef CodecManagerVersion
- PyMac_PRECHECK(CodecManagerVersion);
+ PyMac_PRECHECK(CodecManagerVersion);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = CodecManagerVersion(&version);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- version);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = CodecManagerVersion(&version);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ version);
+ return _res;
}
static PyObject *Qt_GetMaxCompressionSize(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- PixMapHandle src;
- Rect srcRect;
- short colorDepth;
- CodecQ quality;
- CodecType cType;
- CompressorComponent codec;
- long size;
+ PyObject *_res = NULL;
+ OSErr _err;
+ PixMapHandle src;
+ Rect srcRect;
+ short colorDepth;
+ CodecQ quality;
+ CodecType cType;
+ CompressorComponent codec;
+ long size;
#ifndef GetMaxCompressionSize
- PyMac_PRECHECK(GetMaxCompressionSize);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&hlO&O&",
- ResObj_Convert, &src,
- PyMac_GetRect, &srcRect,
- &colorDepth,
- &quality,
- PyMac_GetOSType, &cType,
- CmpObj_Convert, &codec))
- return NULL;
- _err = GetMaxCompressionSize(src,
- &srcRect,
- colorDepth,
- quality,
- cType,
- codec,
- &size);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- size);
- return _res;
+ PyMac_PRECHECK(GetMaxCompressionSize);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&hlO&O&",
+ ResObj_Convert, &src,
+ PyMac_GetRect, &srcRect,
+ &colorDepth,
+ &quality,
+ PyMac_GetOSType, &cType,
+ CmpObj_Convert, &codec))
+ return NULL;
+ _err = GetMaxCompressionSize(src,
+ &srcRect,
+ colorDepth,
+ quality,
+ cType,
+ codec,
+ &size);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ size);
+ return _res;
}
static PyObject *Qt_GetCompressionTime(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- PixMapHandle src;
- Rect srcRect;
- short colorDepth;
- CodecType cType;
- CompressorComponent codec;
- CodecQ spatialQuality;
- CodecQ temporalQuality;
- unsigned long compressTime;
+ PyObject *_res = NULL;
+ OSErr _err;
+ PixMapHandle src;
+ Rect srcRect;
+ short colorDepth;
+ CodecType cType;
+ CompressorComponent codec;
+ CodecQ spatialQuality;
+ CodecQ temporalQuality;
+ unsigned long compressTime;
#ifndef GetCompressionTime
- PyMac_PRECHECK(GetCompressionTime);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&hO&O&",
- ResObj_Convert, &src,
- PyMac_GetRect, &srcRect,
- &colorDepth,
- PyMac_GetOSType, &cType,
- CmpObj_Convert, &codec))
- return NULL;
- _err = GetCompressionTime(src,
- &srcRect,
- colorDepth,
- cType,
- codec,
- &spatialQuality,
- &temporalQuality,
- &compressTime);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("lll",
- spatialQuality,
- temporalQuality,
- compressTime);
- return _res;
+ PyMac_PRECHECK(GetCompressionTime);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&hO&O&",
+ ResObj_Convert, &src,
+ PyMac_GetRect, &srcRect,
+ &colorDepth,
+ PyMac_GetOSType, &cType,
+ CmpObj_Convert, &codec))
+ return NULL;
+ _err = GetCompressionTime(src,
+ &srcRect,
+ colorDepth,
+ cType,
+ codec,
+ &spatialQuality,
+ &temporalQuality,
+ &compressTime);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("lll",
+ spatialQuality,
+ temporalQuality,
+ compressTime);
+ return _res;
}
static PyObject *Qt_CompressImage(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- PixMapHandle src;
- Rect srcRect;
- CodecQ quality;
- CodecType cType;
- ImageDescriptionHandle desc;
- Ptr data;
+ PyObject *_res = NULL;
+ OSErr _err;
+ PixMapHandle src;
+ Rect srcRect;
+ CodecQ quality;
+ CodecType cType;
+ ImageDescriptionHandle desc;
+ Ptr data;
#ifndef CompressImage
- PyMac_PRECHECK(CompressImage);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&lO&O&s",
- ResObj_Convert, &src,
- PyMac_GetRect, &srcRect,
- &quality,
- PyMac_GetOSType, &cType,
- ResObj_Convert, &desc,
- &data))
- return NULL;
- _err = CompressImage(src,
- &srcRect,
- quality,
- cType,
- desc,
- data);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(CompressImage);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&lO&O&s",
+ ResObj_Convert, &src,
+ PyMac_GetRect, &srcRect,
+ &quality,
+ PyMac_GetOSType, &cType,
+ ResObj_Convert, &desc,
+ &data))
+ return NULL;
+ _err = CompressImage(src,
+ &srcRect,
+ quality,
+ cType,
+ desc,
+ data);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qt_DecompressImage(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Ptr data;
- ImageDescriptionHandle desc;
- PixMapHandle dst;
- Rect srcRect;
- Rect dstRect;
- short mode;
- RgnHandle mask;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Ptr data;
+ ImageDescriptionHandle desc;
+ PixMapHandle dst;
+ Rect srcRect;
+ Rect dstRect;
+ short mode;
+ RgnHandle mask;
#ifndef DecompressImage
- PyMac_PRECHECK(DecompressImage);
-#endif
- if (!PyArg_ParseTuple(_args, "sO&O&O&O&hO&",
- &data,
- ResObj_Convert, &desc,
- ResObj_Convert, &dst,
- PyMac_GetRect, &srcRect,
- PyMac_GetRect, &dstRect,
- &mode,
- ResObj_Convert, &mask))
- return NULL;
- _err = DecompressImage(data,
- desc,
- dst,
- &srcRect,
- &dstRect,
- mode,
- mask);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(DecompressImage);
+#endif
+ if (!PyArg_ParseTuple(_args, "sO&O&O&O&hO&",
+ &data,
+ ResObj_Convert, &desc,
+ ResObj_Convert, &dst,
+ PyMac_GetRect, &srcRect,
+ PyMac_GetRect, &dstRect,
+ &mode,
+ ResObj_Convert, &mask))
+ return NULL;
+ _err = DecompressImage(data,
+ desc,
+ dst,
+ &srcRect,
+ &dstRect,
+ mode,
+ mask);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qt_GetSimilarity(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- PixMapHandle src;
- Rect srcRect;
- ImageDescriptionHandle desc;
- Ptr data;
- Fixed similarity;
+ PyObject *_res = NULL;
+ OSErr _err;
+ PixMapHandle src;
+ Rect srcRect;
+ ImageDescriptionHandle desc;
+ Ptr data;
+ Fixed similarity;
#ifndef GetSimilarity
- PyMac_PRECHECK(GetSimilarity);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&s",
- ResObj_Convert, &src,
- PyMac_GetRect, &srcRect,
- ResObj_Convert, &desc,
- &data))
- return NULL;
- _err = GetSimilarity(src,
- &srcRect,
- desc,
- data,
- &similarity);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- PyMac_BuildFixed, similarity);
- return _res;
+ PyMac_PRECHECK(GetSimilarity);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&s",
+ ResObj_Convert, &src,
+ PyMac_GetRect, &srcRect,
+ ResObj_Convert, &desc,
+ &data))
+ return NULL;
+ _err = GetSimilarity(src,
+ &srcRect,
+ desc,
+ data,
+ &similarity);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildFixed, similarity);
+ return _res;
}
static PyObject *Qt_GetImageDescriptionCTable(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- ImageDescriptionHandle desc;
- CTabHandle ctable;
+ PyObject *_res = NULL;
+ OSErr _err;
+ ImageDescriptionHandle desc;
+ CTabHandle ctable;
#ifndef GetImageDescriptionCTable
- PyMac_PRECHECK(GetImageDescriptionCTable);
+ PyMac_PRECHECK(GetImageDescriptionCTable);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &desc))
- return NULL;
- _err = GetImageDescriptionCTable(desc,
- &ctable);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- ResObj_New, ctable);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &desc))
+ return NULL;
+ _err = GetImageDescriptionCTable(desc,
+ &ctable);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ ResObj_New, ctable);
+ return _res;
}
static PyObject *Qt_SetImageDescriptionCTable(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- ImageDescriptionHandle desc;
- CTabHandle ctable;
+ PyObject *_res = NULL;
+ OSErr _err;
+ ImageDescriptionHandle desc;
+ CTabHandle ctable;
#ifndef SetImageDescriptionCTable
- PyMac_PRECHECK(SetImageDescriptionCTable);
+ PyMac_PRECHECK(SetImageDescriptionCTable);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- ResObj_Convert, &desc,
- ResObj_Convert, &ctable))
- return NULL;
- _err = SetImageDescriptionCTable(desc,
- ctable);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ ResObj_Convert, &desc,
+ ResObj_Convert, &ctable))
+ return NULL;
+ _err = SetImageDescriptionCTable(desc,
+ ctable);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qt_GetImageDescriptionExtension(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- ImageDescriptionHandle desc;
- Handle extension;
- long idType;
- long index;
+ PyObject *_res = NULL;
+ OSErr _err;
+ ImageDescriptionHandle desc;
+ Handle extension;
+ long idType;
+ long index;
#ifndef GetImageDescriptionExtension
- PyMac_PRECHECK(GetImageDescriptionExtension);
-#endif
- if (!PyArg_ParseTuple(_args, "O&ll",
- ResObj_Convert, &desc,
- &idType,
- &index))
- return NULL;
- _err = GetImageDescriptionExtension(desc,
- &extension,
- idType,
- index);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- ResObj_New, extension);
- return _res;
+ PyMac_PRECHECK(GetImageDescriptionExtension);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&ll",
+ ResObj_Convert, &desc,
+ &idType,
+ &index))
+ return NULL;
+ _err = GetImageDescriptionExtension(desc,
+ &extension,
+ idType,
+ index);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ ResObj_New, extension);
+ return _res;
}
static PyObject *Qt_AddImageDescriptionExtension(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- ImageDescriptionHandle desc;
- Handle extension;
- long idType;
+ PyObject *_res = NULL;
+ OSErr _err;
+ ImageDescriptionHandle desc;
+ Handle extension;
+ long idType;
#ifndef AddImageDescriptionExtension
- PyMac_PRECHECK(AddImageDescriptionExtension);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&l",
- ResObj_Convert, &desc,
- ResObj_Convert, &extension,
- &idType))
- return NULL;
- _err = AddImageDescriptionExtension(desc,
- extension,
- idType);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(AddImageDescriptionExtension);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&l",
+ ResObj_Convert, &desc,
+ ResObj_Convert, &extension,
+ &idType))
+ return NULL;
+ _err = AddImageDescriptionExtension(desc,
+ extension,
+ idType);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qt_RemoveImageDescriptionExtension(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- ImageDescriptionHandle desc;
- long idType;
- long index;
+ PyObject *_res = NULL;
+ OSErr _err;
+ ImageDescriptionHandle desc;
+ long idType;
+ long index;
#ifndef RemoveImageDescriptionExtension
- PyMac_PRECHECK(RemoveImageDescriptionExtension);
-#endif
- if (!PyArg_ParseTuple(_args, "O&ll",
- ResObj_Convert, &desc,
- &idType,
- &index))
- return NULL;
- _err = RemoveImageDescriptionExtension(desc,
- idType,
- index);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(RemoveImageDescriptionExtension);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&ll",
+ ResObj_Convert, &desc,
+ &idType,
+ &index))
+ return NULL;
+ _err = RemoveImageDescriptionExtension(desc,
+ idType,
+ index);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qt_CountImageDescriptionExtensionType(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- ImageDescriptionHandle desc;
- long idType;
- long count;
+ PyObject *_res = NULL;
+ OSErr _err;
+ ImageDescriptionHandle desc;
+ long idType;
+ long count;
#ifndef CountImageDescriptionExtensionType
- PyMac_PRECHECK(CountImageDescriptionExtensionType);
+ PyMac_PRECHECK(CountImageDescriptionExtensionType);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- ResObj_Convert, &desc,
- &idType))
- return NULL;
- _err = CountImageDescriptionExtensionType(desc,
- idType,
- &count);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- count);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ ResObj_Convert, &desc,
+ &idType))
+ return NULL;
+ _err = CountImageDescriptionExtensionType(desc,
+ idType,
+ &count);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ count);
+ return _res;
}
static PyObject *Qt_GetNextImageDescriptionExtensionType(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- ImageDescriptionHandle desc;
- long idType;
+ PyObject *_res = NULL;
+ OSErr _err;
+ ImageDescriptionHandle desc;
+ long idType;
#ifndef GetNextImageDescriptionExtensionType
- PyMac_PRECHECK(GetNextImageDescriptionExtensionType);
+ PyMac_PRECHECK(GetNextImageDescriptionExtensionType);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &desc))
- return NULL;
- _err = GetNextImageDescriptionExtensionType(desc,
- &idType);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- idType);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &desc))
+ return NULL;
+ _err = GetNextImageDescriptionExtensionType(desc,
+ &idType);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ idType);
+ return _res;
}
static PyObject *Qt_FindCodec(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- CodecType cType;
- CodecComponent specCodec;
- CompressorComponent compressor;
- DecompressorComponent decompressor;
+ PyObject *_res = NULL;
+ OSErr _err;
+ CodecType cType;
+ CodecComponent specCodec;
+ CompressorComponent compressor;
+ DecompressorComponent decompressor;
#ifndef FindCodec
- PyMac_PRECHECK(FindCodec);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- PyMac_GetOSType, &cType,
- CmpObj_Convert, &specCodec))
- return NULL;
- _err = FindCodec(cType,
- specCodec,
- &compressor,
- &decompressor);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&O&",
- CmpObj_New, compressor,
- CmpObj_New, decompressor);
- return _res;
+ PyMac_PRECHECK(FindCodec);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ PyMac_GetOSType, &cType,
+ CmpObj_Convert, &specCodec))
+ return NULL;
+ _err = FindCodec(cType,
+ specCodec,
+ &compressor,
+ &decompressor);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&O&",
+ CmpObj_New, compressor,
+ CmpObj_New, decompressor);
+ return _res;
}
static PyObject *Qt_CompressPicture(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- PicHandle srcPicture;
- PicHandle dstPicture;
- CodecQ quality;
- CodecType cType;
+ PyObject *_res = NULL;
+ OSErr _err;
+ PicHandle srcPicture;
+ PicHandle dstPicture;
+ CodecQ quality;
+ CodecType cType;
#ifndef CompressPicture
- PyMac_PRECHECK(CompressPicture);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&lO&",
- ResObj_Convert, &srcPicture,
- ResObj_Convert, &dstPicture,
- &quality,
- PyMac_GetOSType, &cType))
- return NULL;
- _err = CompressPicture(srcPicture,
- dstPicture,
- quality,
- cType);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(CompressPicture);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&lO&",
+ ResObj_Convert, &srcPicture,
+ ResObj_Convert, &dstPicture,
+ &quality,
+ PyMac_GetOSType, &cType))
+ return NULL;
+ _err = CompressPicture(srcPicture,
+ dstPicture,
+ quality,
+ cType);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qt_CompressPictureFile(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- short srcRefNum;
- short dstRefNum;
- CodecQ quality;
- CodecType cType;
+ PyObject *_res = NULL;
+ OSErr _err;
+ short srcRefNum;
+ short dstRefNum;
+ CodecQ quality;
+ CodecType cType;
#ifndef CompressPictureFile
- PyMac_PRECHECK(CompressPictureFile);
-#endif
- if (!PyArg_ParseTuple(_args, "hhlO&",
- &srcRefNum,
- &dstRefNum,
- &quality,
- PyMac_GetOSType, &cType))
- return NULL;
- _err = CompressPictureFile(srcRefNum,
- dstRefNum,
- quality,
- cType);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(CompressPictureFile);
+#endif
+ if (!PyArg_ParseTuple(_args, "hhlO&",
+ &srcRefNum,
+ &dstRefNum,
+ &quality,
+ PyMac_GetOSType, &cType))
+ return NULL;
+ _err = CompressPictureFile(srcRefNum,
+ dstRefNum,
+ quality,
+ cType);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qt_ConvertImage(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- ImageDescriptionHandle srcDD;
- Ptr srcData;
- short colorDepth;
- CTabHandle ctable;
- CodecQ accuracy;
- CodecQ quality;
- CodecType cType;
- CodecComponent codec;
- ImageDescriptionHandle dstDD;
- Ptr dstData;
+ PyObject *_res = NULL;
+ OSErr _err;
+ ImageDescriptionHandle srcDD;
+ Ptr srcData;
+ short colorDepth;
+ CTabHandle ctable;
+ CodecQ accuracy;
+ CodecQ quality;
+ CodecType cType;
+ CodecComponent codec;
+ ImageDescriptionHandle dstDD;
+ Ptr dstData;
#ifndef ConvertImage
- PyMac_PRECHECK(ConvertImage);
-#endif
- if (!PyArg_ParseTuple(_args, "O&shO&llO&O&O&s",
- ResObj_Convert, &srcDD,
- &srcData,
- &colorDepth,
- ResObj_Convert, &ctable,
- &accuracy,
- &quality,
- PyMac_GetOSType, &cType,
- CmpObj_Convert, &codec,
- ResObj_Convert, &dstDD,
- &dstData))
- return NULL;
- _err = ConvertImage(srcDD,
- srcData,
- colorDepth,
- ctable,
- accuracy,
- quality,
- cType,
- codec,
- dstDD,
- dstData);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(ConvertImage);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&shO&llO&O&O&s",
+ ResObj_Convert, &srcDD,
+ &srcData,
+ &colorDepth,
+ ResObj_Convert, &ctable,
+ &accuracy,
+ &quality,
+ PyMac_GetOSType, &cType,
+ CmpObj_Convert, &codec,
+ ResObj_Convert, &dstDD,
+ &dstData))
+ return NULL;
+ _err = ConvertImage(srcDD,
+ srcData,
+ colorDepth,
+ ctable,
+ accuracy,
+ quality,
+ cType,
+ codec,
+ dstDD,
+ dstData);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qt_AddFilePreview(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- short resRefNum;
- OSType previewType;
- Handle previewData;
+ PyObject *_res = NULL;
+ OSErr _err;
+ short resRefNum;
+ OSType previewType;
+ Handle previewData;
#ifndef AddFilePreview
- PyMac_PRECHECK(AddFilePreview);
-#endif
- if (!PyArg_ParseTuple(_args, "hO&O&",
- &resRefNum,
- PyMac_GetOSType, &previewType,
- ResObj_Convert, &previewData))
- return NULL;
- _err = AddFilePreview(resRefNum,
- previewType,
- previewData);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(AddFilePreview);
+#endif
+ if (!PyArg_ParseTuple(_args, "hO&O&",
+ &resRefNum,
+ PyMac_GetOSType, &previewType,
+ ResObj_Convert, &previewData))
+ return NULL;
+ _err = AddFilePreview(resRefNum,
+ previewType,
+ previewData);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qt_GetBestDeviceRect(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- GDHandle gdh;
- Rect rp;
+ PyObject *_res = NULL;
+ OSErr _err;
+ GDHandle gdh;
+ Rect rp;
#ifndef GetBestDeviceRect
- PyMac_PRECHECK(GetBestDeviceRect);
+ PyMac_PRECHECK(GetBestDeviceRect);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetBestDeviceRect(&gdh,
- &rp);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&O&",
- OptResObj_New, gdh,
- PyMac_BuildRect, &rp);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetBestDeviceRect(&gdh,
+ &rp);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&O&",
+ OptResObj_New, gdh,
+ PyMac_BuildRect, &rp);
+ return _res;
}
static PyObject *Qt_GDHasScale(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- GDHandle gdh;
- short depth;
- Fixed scale;
+ PyObject *_res = NULL;
+ OSErr _err;
+ GDHandle gdh;
+ short depth;
+ Fixed scale;
#ifndef GDHasScale
- PyMac_PRECHECK(GDHasScale);
+ PyMac_PRECHECK(GDHasScale);
#endif
- if (!PyArg_ParseTuple(_args, "O&h",
- OptResObj_Convert, &gdh,
- &depth))
- return NULL;
- _err = GDHasScale(gdh,
- depth,
- &scale);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- PyMac_BuildFixed, scale);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&h",
+ OptResObj_Convert, &gdh,
+ &depth))
+ return NULL;
+ _err = GDHasScale(gdh,
+ depth,
+ &scale);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildFixed, scale);
+ return _res;
}
static PyObject *Qt_GDGetScale(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- GDHandle gdh;
- Fixed scale;
- short flags;
+ PyObject *_res = NULL;
+ OSErr _err;
+ GDHandle gdh;
+ Fixed scale;
+ short flags;
#ifndef GDGetScale
- PyMac_PRECHECK(GDGetScale);
+ PyMac_PRECHECK(GDGetScale);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- OptResObj_Convert, &gdh))
- return NULL;
- _err = GDGetScale(gdh,
- &scale,
- &flags);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&h",
- PyMac_BuildFixed, scale,
- flags);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ OptResObj_Convert, &gdh))
+ return NULL;
+ _err = GDGetScale(gdh,
+ &scale,
+ &flags);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&h",
+ PyMac_BuildFixed, scale,
+ flags);
+ return _res;
}
static PyObject *Qt_GDSetScale(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- GDHandle gdh;
- Fixed scale;
- short flags;
+ PyObject *_res = NULL;
+ OSErr _err;
+ GDHandle gdh;
+ Fixed scale;
+ short flags;
#ifndef GDSetScale
- PyMac_PRECHECK(GDSetScale);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&h",
- OptResObj_Convert, &gdh,
- PyMac_GetFixed, &scale,
- &flags))
- return NULL;
- _err = GDSetScale(gdh,
- scale,
- flags);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(GDSetScale);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&h",
+ OptResObj_Convert, &gdh,
+ PyMac_GetFixed, &scale,
+ &flags))
+ return NULL;
+ _err = GDSetScale(gdh,
+ scale,
+ flags);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qt_GetGraphicsImporterForFile(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- FSSpec theFile;
- ComponentInstance gi;
+ PyObject *_res = NULL;
+ OSErr _err;
+ FSSpec theFile;
+ ComponentInstance gi;
#ifndef GetGraphicsImporterForFile
- PyMac_PRECHECK(GetGraphicsImporterForFile);
+ PyMac_PRECHECK(GetGraphicsImporterForFile);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetFSSpec, &theFile))
- return NULL;
- _err = GetGraphicsImporterForFile(&theFile,
- &gi);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- CmpInstObj_New, gi);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetFSSpec, &theFile))
+ return NULL;
+ _err = GetGraphicsImporterForFile(&theFile,
+ &gi);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ CmpInstObj_New, gi);
+ return _res;
}
static PyObject *Qt_GetGraphicsImporterForDataRef(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Handle dataRef;
- OSType dataRefType;
- ComponentInstance gi;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Handle dataRef;
+ OSType dataRefType;
+ ComponentInstance gi;
#ifndef GetGraphicsImporterForDataRef
- PyMac_PRECHECK(GetGraphicsImporterForDataRef);
+ PyMac_PRECHECK(GetGraphicsImporterForDataRef);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- ResObj_Convert, &dataRef,
- PyMac_GetOSType, &dataRefType))
- return NULL;
- _err = GetGraphicsImporterForDataRef(dataRef,
- dataRefType,
- &gi);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- CmpInstObj_New, gi);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ ResObj_Convert, &dataRef,
+ PyMac_GetOSType, &dataRefType))
+ return NULL;
+ _err = GetGraphicsImporterForDataRef(dataRef,
+ dataRefType,
+ &gi);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ CmpInstObj_New, gi);
+ return _res;
}
static PyObject *Qt_GetGraphicsImporterForFileWithFlags(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- FSSpec theFile;
- ComponentInstance gi;
- long flags;
+ PyObject *_res = NULL;
+ OSErr _err;
+ FSSpec theFile;
+ ComponentInstance gi;
+ long flags;
#ifndef GetGraphicsImporterForFileWithFlags
- PyMac_PRECHECK(GetGraphicsImporterForFileWithFlags);
+ PyMac_PRECHECK(GetGraphicsImporterForFileWithFlags);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- PyMac_GetFSSpec, &theFile,
- &flags))
- return NULL;
- _err = GetGraphicsImporterForFileWithFlags(&theFile,
- &gi,
- flags);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- CmpInstObj_New, gi);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ PyMac_GetFSSpec, &theFile,
+ &flags))
+ return NULL;
+ _err = GetGraphicsImporterForFileWithFlags(&theFile,
+ &gi,
+ flags);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ CmpInstObj_New, gi);
+ return _res;
}
static PyObject *Qt_GetGraphicsImporterForDataRefWithFlags(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Handle dataRef;
- OSType dataRefType;
- ComponentInstance gi;
- long flags;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Handle dataRef;
+ OSType dataRefType;
+ ComponentInstance gi;
+ long flags;
#ifndef GetGraphicsImporterForDataRefWithFlags
- PyMac_PRECHECK(GetGraphicsImporterForDataRefWithFlags);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&l",
- ResObj_Convert, &dataRef,
- PyMac_GetOSType, &dataRefType,
- &flags))
- return NULL;
- _err = GetGraphicsImporterForDataRefWithFlags(dataRef,
- dataRefType,
- &gi,
- flags);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- CmpInstObj_New, gi);
- return _res;
+ PyMac_PRECHECK(GetGraphicsImporterForDataRefWithFlags);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&l",
+ ResObj_Convert, &dataRef,
+ PyMac_GetOSType, &dataRefType,
+ &flags))
+ return NULL;
+ _err = GetGraphicsImporterForDataRefWithFlags(dataRef,
+ dataRefType,
+ &gi,
+ flags);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ CmpInstObj_New, gi);
+ return _res;
}
static PyObject *Qt_MakeImageDescriptionForPixMap(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- PixMapHandle pixmap;
- ImageDescriptionHandle idh;
+ PyObject *_res = NULL;
+ OSErr _err;
+ PixMapHandle pixmap;
+ ImageDescriptionHandle idh;
#ifndef MakeImageDescriptionForPixMap
- PyMac_PRECHECK(MakeImageDescriptionForPixMap);
+ PyMac_PRECHECK(MakeImageDescriptionForPixMap);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &pixmap))
- return NULL;
- _err = MakeImageDescriptionForPixMap(pixmap,
- &idh);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- ResObj_New, idh);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &pixmap))
+ return NULL;
+ _err = MakeImageDescriptionForPixMap(pixmap,
+ &idh);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ ResObj_New, idh);
+ return _res;
}
static PyObject *Qt_MakeImageDescriptionForEffect(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- OSType effectType;
- ImageDescriptionHandle idh;
+ PyObject *_res = NULL;
+ OSErr _err;
+ OSType effectType;
+ ImageDescriptionHandle idh;
#ifndef MakeImageDescriptionForEffect
- PyMac_PRECHECK(MakeImageDescriptionForEffect);
+ PyMac_PRECHECK(MakeImageDescriptionForEffect);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetOSType, &effectType))
- return NULL;
- _err = MakeImageDescriptionForEffect(effectType,
- &idh);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- ResObj_New, idh);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetOSType, &effectType))
+ return NULL;
+ _err = MakeImageDescriptionForEffect(effectType,
+ &idh);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ ResObj_New, idh);
+ return _res;
}
static PyObject *Qt_QTGetPixelSize(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short _rv;
- OSType PixelFormat;
+ PyObject *_res = NULL;
+ short _rv;
+ OSType PixelFormat;
#ifndef QTGetPixelSize
- PyMac_PRECHECK(QTGetPixelSize);
+ PyMac_PRECHECK(QTGetPixelSize);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetOSType, &PixelFormat))
- return NULL;
- _rv = QTGetPixelSize(PixelFormat);
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetOSType, &PixelFormat))
+ return NULL;
+ _rv = QTGetPixelSize(PixelFormat);
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *Qt_QTGetPixelFormatDepthForImageDescription(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short _rv;
- OSType PixelFormat;
+ PyObject *_res = NULL;
+ short _rv;
+ OSType PixelFormat;
#ifndef QTGetPixelFormatDepthForImageDescription
- PyMac_PRECHECK(QTGetPixelFormatDepthForImageDescription);
+ PyMac_PRECHECK(QTGetPixelFormatDepthForImageDescription);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetOSType, &PixelFormat))
- return NULL;
- _rv = QTGetPixelFormatDepthForImageDescription(PixelFormat);
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetOSType, &PixelFormat))
+ return NULL;
+ _rv = QTGetPixelFormatDepthForImageDescription(PixelFormat);
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *Qt_QTGetPixMapHandleRowBytes(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- long _rv;
- PixMapHandle pm;
+ PyObject *_res = NULL;
+ long _rv;
+ PixMapHandle pm;
#ifndef QTGetPixMapHandleRowBytes
- PyMac_PRECHECK(QTGetPixMapHandleRowBytes);
+ PyMac_PRECHECK(QTGetPixMapHandleRowBytes);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &pm))
- return NULL;
- _rv = QTGetPixMapHandleRowBytes(pm);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &pm))
+ return NULL;
+ _rv = QTGetPixMapHandleRowBytes(pm);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_QTSetPixMapHandleRowBytes(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- PixMapHandle pm;
- long rowBytes;
+ PyObject *_res = NULL;
+ OSErr _err;
+ PixMapHandle pm;
+ long rowBytes;
#ifndef QTSetPixMapHandleRowBytes
- PyMac_PRECHECK(QTSetPixMapHandleRowBytes);
+ PyMac_PRECHECK(QTSetPixMapHandleRowBytes);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- ResObj_Convert, &pm,
- &rowBytes))
- return NULL;
- _err = QTSetPixMapHandleRowBytes(pm,
- rowBytes);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ ResObj_Convert, &pm,
+ &rowBytes))
+ return NULL;
+ _err = QTSetPixMapHandleRowBytes(pm,
+ rowBytes);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qt_QTGetPixMapHandleGammaLevel(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Fixed _rv;
- PixMapHandle pm;
+ PyObject *_res = NULL;
+ Fixed _rv;
+ PixMapHandle pm;
#ifndef QTGetPixMapHandleGammaLevel
- PyMac_PRECHECK(QTGetPixMapHandleGammaLevel);
+ PyMac_PRECHECK(QTGetPixMapHandleGammaLevel);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &pm))
- return NULL;
- _rv = QTGetPixMapHandleGammaLevel(pm);
- _res = Py_BuildValue("O&",
- PyMac_BuildFixed, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &pm))
+ return NULL;
+ _rv = QTGetPixMapHandleGammaLevel(pm);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildFixed, _rv);
+ return _res;
}
static PyObject *Qt_QTSetPixMapHandleGammaLevel(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- PixMapHandle pm;
- Fixed gammaLevel;
+ PyObject *_res = NULL;
+ OSErr _err;
+ PixMapHandle pm;
+ Fixed gammaLevel;
#ifndef QTSetPixMapHandleGammaLevel
- PyMac_PRECHECK(QTSetPixMapHandleGammaLevel);
+ PyMac_PRECHECK(QTSetPixMapHandleGammaLevel);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- ResObj_Convert, &pm,
- PyMac_GetFixed, &gammaLevel))
- return NULL;
- _err = QTSetPixMapHandleGammaLevel(pm,
- gammaLevel);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ ResObj_Convert, &pm,
+ PyMac_GetFixed, &gammaLevel))
+ return NULL;
+ _err = QTSetPixMapHandleGammaLevel(pm,
+ gammaLevel);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qt_QTGetPixMapHandleRequestedGammaLevel(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Fixed _rv;
- PixMapHandle pm;
+ PyObject *_res = NULL;
+ Fixed _rv;
+ PixMapHandle pm;
#ifndef QTGetPixMapHandleRequestedGammaLevel
- PyMac_PRECHECK(QTGetPixMapHandleRequestedGammaLevel);
+ PyMac_PRECHECK(QTGetPixMapHandleRequestedGammaLevel);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &pm))
- return NULL;
- _rv = QTGetPixMapHandleRequestedGammaLevel(pm);
- _res = Py_BuildValue("O&",
- PyMac_BuildFixed, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &pm))
+ return NULL;
+ _rv = QTGetPixMapHandleRequestedGammaLevel(pm);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildFixed, _rv);
+ return _res;
}
static PyObject *Qt_QTSetPixMapHandleRequestedGammaLevel(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- PixMapHandle pm;
- Fixed requestedGammaLevel;
+ PyObject *_res = NULL;
+ OSErr _err;
+ PixMapHandle pm;
+ Fixed requestedGammaLevel;
#ifndef QTSetPixMapHandleRequestedGammaLevel
- PyMac_PRECHECK(QTSetPixMapHandleRequestedGammaLevel);
+ PyMac_PRECHECK(QTSetPixMapHandleRequestedGammaLevel);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- ResObj_Convert, &pm,
- PyMac_GetFixed, &requestedGammaLevel))
- return NULL;
- _err = QTSetPixMapHandleRequestedGammaLevel(pm,
- requestedGammaLevel);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ ResObj_Convert, &pm,
+ PyMac_GetFixed, &requestedGammaLevel))
+ return NULL;
+ _err = QTSetPixMapHandleRequestedGammaLevel(pm,
+ requestedGammaLevel);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qt_CompAdd(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- wide src;
- wide dst;
+ PyObject *_res = NULL;
+ wide src;
+ wide dst;
#ifndef CompAdd
- PyMac_PRECHECK(CompAdd);
+ PyMac_PRECHECK(CompAdd);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- CompAdd(&src,
- &dst);
- _res = Py_BuildValue("O&O&",
- PyMac_Buildwide, src,
- PyMac_Buildwide, dst);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ CompAdd(&src,
+ &dst);
+ _res = Py_BuildValue("O&O&",
+ PyMac_Buildwide, src,
+ PyMac_Buildwide, dst);
+ return _res;
}
static PyObject *Qt_CompSub(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- wide src;
- wide dst;
+ PyObject *_res = NULL;
+ wide src;
+ wide dst;
#ifndef CompSub
- PyMac_PRECHECK(CompSub);
+ PyMac_PRECHECK(CompSub);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- CompSub(&src,
- &dst);
- _res = Py_BuildValue("O&O&",
- PyMac_Buildwide, src,
- PyMac_Buildwide, dst);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ CompSub(&src,
+ &dst);
+ _res = Py_BuildValue("O&O&",
+ PyMac_Buildwide, src,
+ PyMac_Buildwide, dst);
+ return _res;
}
static PyObject *Qt_CompNeg(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- wide dst;
+ PyObject *_res = NULL;
+ wide dst;
#ifndef CompNeg
- PyMac_PRECHECK(CompNeg);
+ PyMac_PRECHECK(CompNeg);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- CompNeg(&dst);
- _res = Py_BuildValue("O&",
- PyMac_Buildwide, dst);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ CompNeg(&dst);
+ _res = Py_BuildValue("O&",
+ PyMac_Buildwide, dst);
+ return _res;
}
static PyObject *Qt_CompShift(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- wide src;
- short shift;
+ PyObject *_res = NULL;
+ wide src;
+ short shift;
#ifndef CompShift
- PyMac_PRECHECK(CompShift);
+ PyMac_PRECHECK(CompShift);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &shift))
- return NULL;
- CompShift(&src,
- shift);
- _res = Py_BuildValue("O&",
- PyMac_Buildwide, src);
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &shift))
+ return NULL;
+ CompShift(&src,
+ shift);
+ _res = Py_BuildValue("O&",
+ PyMac_Buildwide, src);
+ return _res;
}
static PyObject *Qt_CompMul(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- long src1;
- long src2;
- wide dst;
+ PyObject *_res = NULL;
+ long src1;
+ long src2;
+ wide dst;
#ifndef CompMul
- PyMac_PRECHECK(CompMul);
+ PyMac_PRECHECK(CompMul);
#endif
- if (!PyArg_ParseTuple(_args, "ll",
- &src1,
- &src2))
- return NULL;
- CompMul(src1,
- src2,
- &dst);
- _res = Py_BuildValue("O&",
- PyMac_Buildwide, dst);
- return _res;
+ if (!PyArg_ParseTuple(_args, "ll",
+ &src1,
+ &src2))
+ return NULL;
+ CompMul(src1,
+ src2,
+ &dst);
+ _res = Py_BuildValue("O&",
+ PyMac_Buildwide, dst);
+ return _res;
}
static PyObject *Qt_CompDiv(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- long _rv;
- wide numerator;
- long denominator;
- long remainder;
+ PyObject *_res = NULL;
+ long _rv;
+ wide numerator;
+ long denominator;
+ long remainder;
#ifndef CompDiv
- PyMac_PRECHECK(CompDiv);
+ PyMac_PRECHECK(CompDiv);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &denominator))
- return NULL;
- _rv = CompDiv(&numerator,
- denominator,
- &remainder);
- _res = Py_BuildValue("lO&l",
- _rv,
- PyMac_Buildwide, numerator,
- remainder);
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &denominator))
+ return NULL;
+ _rv = CompDiv(&numerator,
+ denominator,
+ &remainder);
+ _res = Py_BuildValue("lO&l",
+ _rv,
+ PyMac_Buildwide, numerator,
+ remainder);
+ return _res;
}
static PyObject *Qt_CompFixMul(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- wide compSrc;
- Fixed fixSrc;
- wide compDst;
+ PyObject *_res = NULL;
+ wide compSrc;
+ Fixed fixSrc;
+ wide compDst;
#ifndef CompFixMul
- PyMac_PRECHECK(CompFixMul);
+ PyMac_PRECHECK(CompFixMul);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetFixed, &fixSrc))
- return NULL;
- CompFixMul(&compSrc,
- fixSrc,
- &compDst);
- _res = Py_BuildValue("O&O&",
- PyMac_Buildwide, compSrc,
- PyMac_Buildwide, compDst);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetFixed, &fixSrc))
+ return NULL;
+ CompFixMul(&compSrc,
+ fixSrc,
+ &compDst);
+ _res = Py_BuildValue("O&O&",
+ PyMac_Buildwide, compSrc,
+ PyMac_Buildwide, compDst);
+ return _res;
}
static PyObject *Qt_CompMulDiv(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- wide co;
- long mul;
- long divisor;
+ PyObject *_res = NULL;
+ wide co;
+ long mul;
+ long divisor;
#ifndef CompMulDiv
- PyMac_PRECHECK(CompMulDiv);
+ PyMac_PRECHECK(CompMulDiv);
#endif
- if (!PyArg_ParseTuple(_args, "ll",
- &mul,
- &divisor))
- return NULL;
- CompMulDiv(&co,
- mul,
- divisor);
- _res = Py_BuildValue("O&",
- PyMac_Buildwide, co);
- return _res;
+ if (!PyArg_ParseTuple(_args, "ll",
+ &mul,
+ &divisor))
+ return NULL;
+ CompMulDiv(&co,
+ mul,
+ divisor);
+ _res = Py_BuildValue("O&",
+ PyMac_Buildwide, co);
+ return _res;
}
static PyObject *Qt_CompMulDivTrunc(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- wide co;
- long mul;
- long divisor;
- long remainder;
+ PyObject *_res = NULL;
+ wide co;
+ long mul;
+ long divisor;
+ long remainder;
#ifndef CompMulDivTrunc
- PyMac_PRECHECK(CompMulDivTrunc);
-#endif
- if (!PyArg_ParseTuple(_args, "ll",
- &mul,
- &divisor))
- return NULL;
- CompMulDivTrunc(&co,
- mul,
- divisor,
- &remainder);
- _res = Py_BuildValue("O&l",
- PyMac_Buildwide, co,
- remainder);
- return _res;
+ PyMac_PRECHECK(CompMulDivTrunc);
+#endif
+ if (!PyArg_ParseTuple(_args, "ll",
+ &mul,
+ &divisor))
+ return NULL;
+ CompMulDivTrunc(&co,
+ mul,
+ divisor,
+ &remainder);
+ _res = Py_BuildValue("O&l",
+ PyMac_Buildwide, co,
+ remainder);
+ return _res;
}
static PyObject *Qt_CompCompare(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- long _rv;
- wide a;
- wide minusb;
+ PyObject *_res = NULL;
+ long _rv;
+ wide a;
+ wide minusb;
#ifndef CompCompare
- PyMac_PRECHECK(CompCompare);
+ PyMac_PRECHECK(CompCompare);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- PyMac_Getwide, &a,
- PyMac_Getwide, &minusb))
- return NULL;
- _rv = CompCompare(&a,
- &minusb);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ PyMac_Getwide, &a,
+ PyMac_Getwide, &minusb))
+ return NULL;
+ _rv = CompCompare(&a,
+ &minusb);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_CompSquareRoot(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- unsigned long _rv;
- wide src;
+ PyObject *_res = NULL;
+ unsigned long _rv;
+ wide src;
#ifndef CompSquareRoot
- PyMac_PRECHECK(CompSquareRoot);
+ PyMac_PRECHECK(CompSquareRoot);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_Getwide, &src))
- return NULL;
- _rv = CompSquareRoot(&src);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_Getwide, &src))
+ return NULL;
+ _rv = CompSquareRoot(&src);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_FixMulDiv(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Fixed _rv;
- Fixed src;
- Fixed mul;
- Fixed divisor;
+ PyObject *_res = NULL;
+ Fixed _rv;
+ Fixed src;
+ Fixed mul;
+ Fixed divisor;
#ifndef FixMulDiv
- PyMac_PRECHECK(FixMulDiv);
+ PyMac_PRECHECK(FixMulDiv);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- PyMac_GetFixed, &src,
- PyMac_GetFixed, &mul,
- PyMac_GetFixed, &divisor))
- return NULL;
- _rv = FixMulDiv(src,
- mul,
- divisor);
- _res = Py_BuildValue("O&",
- PyMac_BuildFixed, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ PyMac_GetFixed, &src,
+ PyMac_GetFixed, &mul,
+ PyMac_GetFixed, &divisor))
+ return NULL;
+ _rv = FixMulDiv(src,
+ mul,
+ divisor);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildFixed, _rv);
+ return _res;
}
static PyObject *Qt_UnsignedFixMulDiv(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Fixed _rv;
- Fixed src;
- Fixed mul;
- Fixed divisor;
+ PyObject *_res = NULL;
+ Fixed _rv;
+ Fixed src;
+ Fixed mul;
+ Fixed divisor;
#ifndef UnsignedFixMulDiv
- PyMac_PRECHECK(UnsignedFixMulDiv);
+ PyMac_PRECHECK(UnsignedFixMulDiv);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- PyMac_GetFixed, &src,
- PyMac_GetFixed, &mul,
- PyMac_GetFixed, &divisor))
- return NULL;
- _rv = UnsignedFixMulDiv(src,
- mul,
- divisor);
- _res = Py_BuildValue("O&",
- PyMac_BuildFixed, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ PyMac_GetFixed, &src,
+ PyMac_GetFixed, &mul,
+ PyMac_GetFixed, &divisor))
+ return NULL;
+ _rv = UnsignedFixMulDiv(src,
+ mul,
+ divisor);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildFixed, _rv);
+ return _res;
}
static PyObject *Qt_FixExp2(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Fixed _rv;
- Fixed src;
+ PyObject *_res = NULL;
+ Fixed _rv;
+ Fixed src;
#ifndef FixExp2
- PyMac_PRECHECK(FixExp2);
+ PyMac_PRECHECK(FixExp2);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetFixed, &src))
- return NULL;
- _rv = FixExp2(src);
- _res = Py_BuildValue("O&",
- PyMac_BuildFixed, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetFixed, &src))
+ return NULL;
+ _rv = FixExp2(src);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildFixed, _rv);
+ return _res;
}
static PyObject *Qt_FixLog2(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Fixed _rv;
- Fixed src;
+ PyObject *_res = NULL;
+ Fixed _rv;
+ Fixed src;
#ifndef FixLog2
- PyMac_PRECHECK(FixLog2);
+ PyMac_PRECHECK(FixLog2);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetFixed, &src))
- return NULL;
- _rv = FixLog2(src);
- _res = Py_BuildValue("O&",
- PyMac_BuildFixed, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetFixed, &src))
+ return NULL;
+ _rv = FixLog2(src);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildFixed, _rv);
+ return _res;
}
static PyObject *Qt_FixPow(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Fixed _rv;
- Fixed base;
- Fixed exp;
+ PyObject *_res = NULL;
+ Fixed _rv;
+ Fixed base;
+ Fixed exp;
#ifndef FixPow
- PyMac_PRECHECK(FixPow);
+ PyMac_PRECHECK(FixPow);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- PyMac_GetFixed, &base,
- PyMac_GetFixed, &exp))
- return NULL;
- _rv = FixPow(base,
- exp);
- _res = Py_BuildValue("O&",
- PyMac_BuildFixed, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ PyMac_GetFixed, &base,
+ PyMac_GetFixed, &exp))
+ return NULL;
+ _rv = FixPow(base,
+ exp);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildFixed, _rv);
+ return _res;
}
static PyObject *Qt_GraphicsImportSetDataReference(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsImportComponent ci;
- Handle dataRef;
- OSType dataReType;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsImportComponent ci;
+ Handle dataRef;
+ OSType dataReType;
#ifndef GraphicsImportSetDataReference
- PyMac_PRECHECK(GraphicsImportSetDataReference);
+ PyMac_PRECHECK(GraphicsImportSetDataReference);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- CmpInstObj_Convert, &ci,
- ResObj_Convert, &dataRef,
- PyMac_GetOSType, &dataReType))
- return NULL;
- _rv = GraphicsImportSetDataReference(ci,
- dataRef,
- dataReType);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ CmpInstObj_Convert, &ci,
+ ResObj_Convert, &dataRef,
+ PyMac_GetOSType, &dataReType))
+ return NULL;
+ _rv = GraphicsImportSetDataReference(ci,
+ dataRef,
+ dataReType);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_GraphicsImportGetDataReference(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsImportComponent ci;
- Handle dataRef;
- OSType dataReType;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsImportComponent ci;
+ Handle dataRef;
+ OSType dataReType;
#ifndef GraphicsImportGetDataReference
- PyMac_PRECHECK(GraphicsImportGetDataReference);
+ PyMac_PRECHECK(GraphicsImportGetDataReference);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = GraphicsImportGetDataReference(ci,
- &dataRef,
- &dataReType);
- _res = Py_BuildValue("lO&O&",
- _rv,
- ResObj_New, dataRef,
- PyMac_BuildOSType, dataReType);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = GraphicsImportGetDataReference(ci,
+ &dataRef,
+ &dataReType);
+ _res = Py_BuildValue("lO&O&",
+ _rv,
+ ResObj_New, dataRef,
+ PyMac_BuildOSType, dataReType);
+ return _res;
}
static PyObject *Qt_GraphicsImportSetDataFile(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsImportComponent ci;
- FSSpec theFile;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsImportComponent ci;
+ FSSpec theFile;
#ifndef GraphicsImportSetDataFile
- PyMac_PRECHECK(GraphicsImportSetDataFile);
+ PyMac_PRECHECK(GraphicsImportSetDataFile);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &ci,
- PyMac_GetFSSpec, &theFile))
- return NULL;
- _rv = GraphicsImportSetDataFile(ci,
- &theFile);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &ci,
+ PyMac_GetFSSpec, &theFile))
+ return NULL;
+ _rv = GraphicsImportSetDataFile(ci,
+ &theFile);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_GraphicsImportGetDataFile(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsImportComponent ci;
- FSSpec theFile;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsImportComponent ci;
+ FSSpec theFile;
#ifndef GraphicsImportGetDataFile
- PyMac_PRECHECK(GraphicsImportGetDataFile);
+ PyMac_PRECHECK(GraphicsImportGetDataFile);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &ci,
- PyMac_GetFSSpec, &theFile))
- return NULL;
- _rv = GraphicsImportGetDataFile(ci,
- &theFile);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &ci,
+ PyMac_GetFSSpec, &theFile))
+ return NULL;
+ _rv = GraphicsImportGetDataFile(ci,
+ &theFile);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_GraphicsImportSetDataHandle(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsImportComponent ci;
- Handle h;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsImportComponent ci;
+ Handle h;
#ifndef GraphicsImportSetDataHandle
- PyMac_PRECHECK(GraphicsImportSetDataHandle);
+ PyMac_PRECHECK(GraphicsImportSetDataHandle);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &ci,
- ResObj_Convert, &h))
- return NULL;
- _rv = GraphicsImportSetDataHandle(ci,
- h);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &ci,
+ ResObj_Convert, &h))
+ return NULL;
+ _rv = GraphicsImportSetDataHandle(ci,
+ h);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_GraphicsImportGetDataHandle(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsImportComponent ci;
- Handle h;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsImportComponent ci;
+ Handle h;
#ifndef GraphicsImportGetDataHandle
- PyMac_PRECHECK(GraphicsImportGetDataHandle);
+ PyMac_PRECHECK(GraphicsImportGetDataHandle);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = GraphicsImportGetDataHandle(ci,
- &h);
- _res = Py_BuildValue("lO&",
- _rv,
- ResObj_New, h);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = GraphicsImportGetDataHandle(ci,
+ &h);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ ResObj_New, h);
+ return _res;
}
static PyObject *Qt_GraphicsImportGetImageDescription(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsImportComponent ci;
- ImageDescriptionHandle desc;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsImportComponent ci;
+ ImageDescriptionHandle desc;
#ifndef GraphicsImportGetImageDescription
- PyMac_PRECHECK(GraphicsImportGetImageDescription);
+ PyMac_PRECHECK(GraphicsImportGetImageDescription);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = GraphicsImportGetImageDescription(ci,
- &desc);
- _res = Py_BuildValue("lO&",
- _rv,
- ResObj_New, desc);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = GraphicsImportGetImageDescription(ci,
+ &desc);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ ResObj_New, desc);
+ return _res;
}
static PyObject *Qt_GraphicsImportGetDataOffsetAndSize(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsImportComponent ci;
- unsigned long offset;
- unsigned long size;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsImportComponent ci;
+ unsigned long offset;
+ unsigned long size;
#ifndef GraphicsImportGetDataOffsetAndSize
- PyMac_PRECHECK(GraphicsImportGetDataOffsetAndSize);
+ PyMac_PRECHECK(GraphicsImportGetDataOffsetAndSize);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = GraphicsImportGetDataOffsetAndSize(ci,
- &offset,
- &size);
- _res = Py_BuildValue("lll",
- _rv,
- offset,
- size);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = GraphicsImportGetDataOffsetAndSize(ci,
+ &offset,
+ &size);
+ _res = Py_BuildValue("lll",
+ _rv,
+ offset,
+ size);
+ return _res;
}
static PyObject *Qt_GraphicsImportReadData(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsImportComponent ci;
- void * dataPtr;
- unsigned long dataOffset;
- unsigned long dataSize;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsImportComponent ci;
+ void * dataPtr;
+ unsigned long dataOffset;
+ unsigned long dataSize;
#ifndef GraphicsImportReadData
- PyMac_PRECHECK(GraphicsImportReadData);
-#endif
- if (!PyArg_ParseTuple(_args, "O&sll",
- CmpInstObj_Convert, &ci,
- &dataPtr,
- &dataOffset,
- &dataSize))
- return NULL;
- _rv = GraphicsImportReadData(ci,
- dataPtr,
- dataOffset,
- dataSize);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyMac_PRECHECK(GraphicsImportReadData);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&sll",
+ CmpInstObj_Convert, &ci,
+ &dataPtr,
+ &dataOffset,
+ &dataSize))
+ return NULL;
+ _rv = GraphicsImportReadData(ci,
+ dataPtr,
+ dataOffset,
+ dataSize);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_GraphicsImportSetClip(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsImportComponent ci;
- RgnHandle clipRgn;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsImportComponent ci;
+ RgnHandle clipRgn;
#ifndef GraphicsImportSetClip
- PyMac_PRECHECK(GraphicsImportSetClip);
+ PyMac_PRECHECK(GraphicsImportSetClip);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &ci,
- ResObj_Convert, &clipRgn))
- return NULL;
- _rv = GraphicsImportSetClip(ci,
- clipRgn);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &ci,
+ ResObj_Convert, &clipRgn))
+ return NULL;
+ _rv = GraphicsImportSetClip(ci,
+ clipRgn);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_GraphicsImportGetClip(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsImportComponent ci;
- RgnHandle clipRgn;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsImportComponent ci;
+ RgnHandle clipRgn;
#ifndef GraphicsImportGetClip
- PyMac_PRECHECK(GraphicsImportGetClip);
+ PyMac_PRECHECK(GraphicsImportGetClip);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = GraphicsImportGetClip(ci,
- &clipRgn);
- _res = Py_BuildValue("lO&",
- _rv,
- ResObj_New, clipRgn);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = GraphicsImportGetClip(ci,
+ &clipRgn);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ ResObj_New, clipRgn);
+ return _res;
}
static PyObject *Qt_GraphicsImportSetSourceRect(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsImportComponent ci;
- Rect sourceRect;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsImportComponent ci;
+ Rect sourceRect;
#ifndef GraphicsImportSetSourceRect
- PyMac_PRECHECK(GraphicsImportSetSourceRect);
+ PyMac_PRECHECK(GraphicsImportSetSourceRect);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &ci,
- PyMac_GetRect, &sourceRect))
- return NULL;
- _rv = GraphicsImportSetSourceRect(ci,
- &sourceRect);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &ci,
+ PyMac_GetRect, &sourceRect))
+ return NULL;
+ _rv = GraphicsImportSetSourceRect(ci,
+ &sourceRect);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_GraphicsImportGetSourceRect(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsImportComponent ci;
- Rect sourceRect;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsImportComponent ci;
+ Rect sourceRect;
#ifndef GraphicsImportGetSourceRect
- PyMac_PRECHECK(GraphicsImportGetSourceRect);
+ PyMac_PRECHECK(GraphicsImportGetSourceRect);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = GraphicsImportGetSourceRect(ci,
- &sourceRect);
- _res = Py_BuildValue("lO&",
- _rv,
- PyMac_BuildRect, &sourceRect);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = GraphicsImportGetSourceRect(ci,
+ &sourceRect);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ PyMac_BuildRect, &sourceRect);
+ return _res;
}
static PyObject *Qt_GraphicsImportGetNaturalBounds(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsImportComponent ci;
- Rect naturalBounds;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsImportComponent ci;
+ Rect naturalBounds;
#ifndef GraphicsImportGetNaturalBounds
- PyMac_PRECHECK(GraphicsImportGetNaturalBounds);
+ PyMac_PRECHECK(GraphicsImportGetNaturalBounds);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = GraphicsImportGetNaturalBounds(ci,
- &naturalBounds);
- _res = Py_BuildValue("lO&",
- _rv,
- PyMac_BuildRect, &naturalBounds);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = GraphicsImportGetNaturalBounds(ci,
+ &naturalBounds);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ PyMac_BuildRect, &naturalBounds);
+ return _res;
}
static PyObject *Qt_GraphicsImportDraw(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsImportComponent ci;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsImportComponent ci;
#ifndef GraphicsImportDraw
- PyMac_PRECHECK(GraphicsImportDraw);
+ PyMac_PRECHECK(GraphicsImportDraw);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = GraphicsImportDraw(ci);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = GraphicsImportDraw(ci);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_GraphicsImportSetGWorld(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsImportComponent ci;
- CGrafPtr port;
- GDHandle gd;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsImportComponent ci;
+ CGrafPtr port;
+ GDHandle gd;
#ifndef GraphicsImportSetGWorld
- PyMac_PRECHECK(GraphicsImportSetGWorld);
+ PyMac_PRECHECK(GraphicsImportSetGWorld);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- CmpInstObj_Convert, &ci,
- GrafObj_Convert, &port,
- OptResObj_Convert, &gd))
- return NULL;
- _rv = GraphicsImportSetGWorld(ci,
- port,
- gd);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ CmpInstObj_Convert, &ci,
+ GrafObj_Convert, &port,
+ OptResObj_Convert, &gd))
+ return NULL;
+ _rv = GraphicsImportSetGWorld(ci,
+ port,
+ gd);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_GraphicsImportGetGWorld(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsImportComponent ci;
- CGrafPtr port;
- GDHandle gd;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsImportComponent ci;
+ CGrafPtr port;
+ GDHandle gd;
#ifndef GraphicsImportGetGWorld
- PyMac_PRECHECK(GraphicsImportGetGWorld);
+ PyMac_PRECHECK(GraphicsImportGetGWorld);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = GraphicsImportGetGWorld(ci,
- &port,
- &gd);
- _res = Py_BuildValue("lO&O&",
- _rv,
- GrafObj_New, port,
- OptResObj_New, gd);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = GraphicsImportGetGWorld(ci,
+ &port,
+ &gd);
+ _res = Py_BuildValue("lO&O&",
+ _rv,
+ GrafObj_New, port,
+ OptResObj_New, gd);
+ return _res;
}
static PyObject *Qt_GraphicsImportSetBoundsRect(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsImportComponent ci;
- Rect bounds;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsImportComponent ci;
+ Rect bounds;
#ifndef GraphicsImportSetBoundsRect
- PyMac_PRECHECK(GraphicsImportSetBoundsRect);
+ PyMac_PRECHECK(GraphicsImportSetBoundsRect);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &ci,
- PyMac_GetRect, &bounds))
- return NULL;
- _rv = GraphicsImportSetBoundsRect(ci,
- &bounds);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &ci,
+ PyMac_GetRect, &bounds))
+ return NULL;
+ _rv = GraphicsImportSetBoundsRect(ci,
+ &bounds);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_GraphicsImportGetBoundsRect(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsImportComponent ci;
- Rect bounds;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsImportComponent ci;
+ Rect bounds;
#ifndef GraphicsImportGetBoundsRect
- PyMac_PRECHECK(GraphicsImportGetBoundsRect);
+ PyMac_PRECHECK(GraphicsImportGetBoundsRect);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = GraphicsImportGetBoundsRect(ci,
- &bounds);
- _res = Py_BuildValue("lO&",
- _rv,
- PyMac_BuildRect, &bounds);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = GraphicsImportGetBoundsRect(ci,
+ &bounds);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ PyMac_BuildRect, &bounds);
+ return _res;
}
static PyObject *Qt_GraphicsImportSaveAsPicture(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsImportComponent ci;
- FSSpec fss;
- ScriptCode scriptTag;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsImportComponent ci;
+ FSSpec fss;
+ ScriptCode scriptTag;
#ifndef GraphicsImportSaveAsPicture
- PyMac_PRECHECK(GraphicsImportSaveAsPicture);
+ PyMac_PRECHECK(GraphicsImportSaveAsPicture);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&h",
- CmpInstObj_Convert, &ci,
- PyMac_GetFSSpec, &fss,
- &scriptTag))
- return NULL;
- _rv = GraphicsImportSaveAsPicture(ci,
- &fss,
- scriptTag);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&h",
+ CmpInstObj_Convert, &ci,
+ PyMac_GetFSSpec, &fss,
+ &scriptTag))
+ return NULL;
+ _rv = GraphicsImportSaveAsPicture(ci,
+ &fss,
+ scriptTag);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_GraphicsImportSetGraphicsMode(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsImportComponent ci;
- long graphicsMode;
- RGBColor opColor;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsImportComponent ci;
+ long graphicsMode;
+ RGBColor opColor;
#ifndef GraphicsImportSetGraphicsMode
- PyMac_PRECHECK(GraphicsImportSetGraphicsMode);
+ PyMac_PRECHECK(GraphicsImportSetGraphicsMode);
#endif
- if (!PyArg_ParseTuple(_args, "O&lO&",
- CmpInstObj_Convert, &ci,
- &graphicsMode,
- QdRGB_Convert, &opColor))
- return NULL;
- _rv = GraphicsImportSetGraphicsMode(ci,
- graphicsMode,
- &opColor);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&lO&",
+ CmpInstObj_Convert, &ci,
+ &graphicsMode,
+ QdRGB_Convert, &opColor))
+ return NULL;
+ _rv = GraphicsImportSetGraphicsMode(ci,
+ graphicsMode,
+ &opColor);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_GraphicsImportGetGraphicsMode(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsImportComponent ci;
- long graphicsMode;
- RGBColor opColor;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsImportComponent ci;
+ long graphicsMode;
+ RGBColor opColor;
#ifndef GraphicsImportGetGraphicsMode
- PyMac_PRECHECK(GraphicsImportGetGraphicsMode);
+ PyMac_PRECHECK(GraphicsImportGetGraphicsMode);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = GraphicsImportGetGraphicsMode(ci,
- &graphicsMode,
- &opColor);
- _res = Py_BuildValue("llO&",
- _rv,
- graphicsMode,
- QdRGB_New, &opColor);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = GraphicsImportGetGraphicsMode(ci,
+ &graphicsMode,
+ &opColor);
+ _res = Py_BuildValue("llO&",
+ _rv,
+ graphicsMode,
+ QdRGB_New, &opColor);
+ return _res;
}
static PyObject *Qt_GraphicsImportSetQuality(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsImportComponent ci;
- CodecQ quality;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsImportComponent ci;
+ CodecQ quality;
#ifndef GraphicsImportSetQuality
- PyMac_PRECHECK(GraphicsImportSetQuality);
+ PyMac_PRECHECK(GraphicsImportSetQuality);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &ci,
- &quality))
- return NULL;
- _rv = GraphicsImportSetQuality(ci,
- quality);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &ci,
+ &quality))
+ return NULL;
+ _rv = GraphicsImportSetQuality(ci,
+ quality);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_GraphicsImportGetQuality(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsImportComponent ci;
- CodecQ quality;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsImportComponent ci;
+ CodecQ quality;
#ifndef GraphicsImportGetQuality
- PyMac_PRECHECK(GraphicsImportGetQuality);
+ PyMac_PRECHECK(GraphicsImportGetQuality);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = GraphicsImportGetQuality(ci,
- &quality);
- _res = Py_BuildValue("ll",
- _rv,
- quality);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = GraphicsImportGetQuality(ci,
+ &quality);
+ _res = Py_BuildValue("ll",
+ _rv,
+ quality);
+ return _res;
}
static PyObject *Qt_GraphicsImportSaveAsQuickTimeImageFile(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsImportComponent ci;
- FSSpec fss;
- ScriptCode scriptTag;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsImportComponent ci;
+ FSSpec fss;
+ ScriptCode scriptTag;
#ifndef GraphicsImportSaveAsQuickTimeImageFile
- PyMac_PRECHECK(GraphicsImportSaveAsQuickTimeImageFile);
+ PyMac_PRECHECK(GraphicsImportSaveAsQuickTimeImageFile);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&h",
- CmpInstObj_Convert, &ci,
- PyMac_GetFSSpec, &fss,
- &scriptTag))
- return NULL;
- _rv = GraphicsImportSaveAsQuickTimeImageFile(ci,
- &fss,
- scriptTag);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&h",
+ CmpInstObj_Convert, &ci,
+ PyMac_GetFSSpec, &fss,
+ &scriptTag))
+ return NULL;
+ _rv = GraphicsImportSaveAsQuickTimeImageFile(ci,
+ &fss,
+ scriptTag);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_GraphicsImportSetDataReferenceOffsetAndLimit(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsImportComponent ci;
- unsigned long offset;
- unsigned long limit;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsImportComponent ci;
+ unsigned long offset;
+ unsigned long limit;
#ifndef GraphicsImportSetDataReferenceOffsetAndLimit
- PyMac_PRECHECK(GraphicsImportSetDataReferenceOffsetAndLimit);
+ PyMac_PRECHECK(GraphicsImportSetDataReferenceOffsetAndLimit);
#endif
- if (!PyArg_ParseTuple(_args, "O&ll",
- CmpInstObj_Convert, &ci,
- &offset,
- &limit))
- return NULL;
- _rv = GraphicsImportSetDataReferenceOffsetAndLimit(ci,
- offset,
- limit);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&ll",
+ CmpInstObj_Convert, &ci,
+ &offset,
+ &limit))
+ return NULL;
+ _rv = GraphicsImportSetDataReferenceOffsetAndLimit(ci,
+ offset,
+ limit);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_GraphicsImportGetDataReferenceOffsetAndLimit(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsImportComponent ci;
- unsigned long offset;
- unsigned long limit;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsImportComponent ci;
+ unsigned long offset;
+ unsigned long limit;
#ifndef GraphicsImportGetDataReferenceOffsetAndLimit
- PyMac_PRECHECK(GraphicsImportGetDataReferenceOffsetAndLimit);
+ PyMac_PRECHECK(GraphicsImportGetDataReferenceOffsetAndLimit);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = GraphicsImportGetDataReferenceOffsetAndLimit(ci,
- &offset,
- &limit);
- _res = Py_BuildValue("lll",
- _rv,
- offset,
- limit);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = GraphicsImportGetDataReferenceOffsetAndLimit(ci,
+ &offset,
+ &limit);
+ _res = Py_BuildValue("lll",
+ _rv,
+ offset,
+ limit);
+ return _res;
}
static PyObject *Qt_GraphicsImportGetAliasedDataReference(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsImportComponent ci;
- Handle dataRef;
- OSType dataRefType;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsImportComponent ci;
+ Handle dataRef;
+ OSType dataRefType;
#ifndef GraphicsImportGetAliasedDataReference
- PyMac_PRECHECK(GraphicsImportGetAliasedDataReference);
+ PyMac_PRECHECK(GraphicsImportGetAliasedDataReference);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = GraphicsImportGetAliasedDataReference(ci,
- &dataRef,
- &dataRefType);
- _res = Py_BuildValue("lO&O&",
- _rv,
- ResObj_New, dataRef,
- PyMac_BuildOSType, dataRefType);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = GraphicsImportGetAliasedDataReference(ci,
+ &dataRef,
+ &dataRefType);
+ _res = Py_BuildValue("lO&O&",
+ _rv,
+ ResObj_New, dataRef,
+ PyMac_BuildOSType, dataRefType);
+ return _res;
}
static PyObject *Qt_GraphicsImportValidate(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsImportComponent ci;
- Boolean valid;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsImportComponent ci;
+ Boolean valid;
#ifndef GraphicsImportValidate
- PyMac_PRECHECK(GraphicsImportValidate);
+ PyMac_PRECHECK(GraphicsImportValidate);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = GraphicsImportValidate(ci,
- &valid);
- _res = Py_BuildValue("lb",
- _rv,
- valid);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = GraphicsImportValidate(ci,
+ &valid);
+ _res = Py_BuildValue("lb",
+ _rv,
+ valid);
+ return _res;
}
static PyObject *Qt_GraphicsImportGetMetaData(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsImportComponent ci;
- void * userData;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsImportComponent ci;
+ void * userData;
#ifndef GraphicsImportGetMetaData
- PyMac_PRECHECK(GraphicsImportGetMetaData);
+ PyMac_PRECHECK(GraphicsImportGetMetaData);
#endif
- if (!PyArg_ParseTuple(_args, "O&s",
- CmpInstObj_Convert, &ci,
- &userData))
- return NULL;
- _rv = GraphicsImportGetMetaData(ci,
- userData);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&s",
+ CmpInstObj_Convert, &ci,
+ &userData))
+ return NULL;
+ _rv = GraphicsImportGetMetaData(ci,
+ userData);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_GraphicsImportGetMIMETypeList(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsImportComponent ci;
- void * qtAtomContainerPtr;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsImportComponent ci;
+ void * qtAtomContainerPtr;
#ifndef GraphicsImportGetMIMETypeList
- PyMac_PRECHECK(GraphicsImportGetMIMETypeList);
+ PyMac_PRECHECK(GraphicsImportGetMIMETypeList);
#endif
- if (!PyArg_ParseTuple(_args, "O&s",
- CmpInstObj_Convert, &ci,
- &qtAtomContainerPtr))
- return NULL;
- _rv = GraphicsImportGetMIMETypeList(ci,
- qtAtomContainerPtr);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&s",
+ CmpInstObj_Convert, &ci,
+ &qtAtomContainerPtr))
+ return NULL;
+ _rv = GraphicsImportGetMIMETypeList(ci,
+ qtAtomContainerPtr);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_GraphicsImportDoesDrawAllPixels(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsImportComponent ci;
- short drawsAllPixels;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsImportComponent ci;
+ short drawsAllPixels;
#ifndef GraphicsImportDoesDrawAllPixels
- PyMac_PRECHECK(GraphicsImportDoesDrawAllPixels);
+ PyMac_PRECHECK(GraphicsImportDoesDrawAllPixels);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = GraphicsImportDoesDrawAllPixels(ci,
- &drawsAllPixels);
- _res = Py_BuildValue("lh",
- _rv,
- drawsAllPixels);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = GraphicsImportDoesDrawAllPixels(ci,
+ &drawsAllPixels);
+ _res = Py_BuildValue("lh",
+ _rv,
+ drawsAllPixels);
+ return _res;
}
static PyObject *Qt_GraphicsImportGetAsPicture(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsImportComponent ci;
- PicHandle picture;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsImportComponent ci;
+ PicHandle picture;
#ifndef GraphicsImportGetAsPicture
- PyMac_PRECHECK(GraphicsImportGetAsPicture);
+ PyMac_PRECHECK(GraphicsImportGetAsPicture);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = GraphicsImportGetAsPicture(ci,
- &picture);
- _res = Py_BuildValue("lO&",
- _rv,
- ResObj_New, picture);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = GraphicsImportGetAsPicture(ci,
+ &picture);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ ResObj_New, picture);
+ return _res;
}
static PyObject *Qt_GraphicsImportExportImageFile(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsImportComponent ci;
- OSType fileType;
- OSType fileCreator;
- FSSpec fss;
- ScriptCode scriptTag;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsImportComponent ci;
+ OSType fileType;
+ OSType fileCreator;
+ FSSpec fss;
+ ScriptCode scriptTag;
#ifndef GraphicsImportExportImageFile
- PyMac_PRECHECK(GraphicsImportExportImageFile);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&O&h",
- CmpInstObj_Convert, &ci,
- PyMac_GetOSType, &fileType,
- PyMac_GetOSType, &fileCreator,
- PyMac_GetFSSpec, &fss,
- &scriptTag))
- return NULL;
- _rv = GraphicsImportExportImageFile(ci,
- fileType,
- fileCreator,
- &fss,
- scriptTag);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyMac_PRECHECK(GraphicsImportExportImageFile);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&O&h",
+ CmpInstObj_Convert, &ci,
+ PyMac_GetOSType, &fileType,
+ PyMac_GetOSType, &fileCreator,
+ PyMac_GetFSSpec, &fss,
+ &scriptTag))
+ return NULL;
+ _rv = GraphicsImportExportImageFile(ci,
+ fileType,
+ fileCreator,
+ &fss,
+ scriptTag);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_GraphicsImportGetExportImageTypeList(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsImportComponent ci;
- void * qtAtomContainerPtr;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsImportComponent ci;
+ void * qtAtomContainerPtr;
#ifndef GraphicsImportGetExportImageTypeList
- PyMac_PRECHECK(GraphicsImportGetExportImageTypeList);
+ PyMac_PRECHECK(GraphicsImportGetExportImageTypeList);
#endif
- if (!PyArg_ParseTuple(_args, "O&s",
- CmpInstObj_Convert, &ci,
- &qtAtomContainerPtr))
- return NULL;
- _rv = GraphicsImportGetExportImageTypeList(ci,
- qtAtomContainerPtr);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&s",
+ CmpInstObj_Convert, &ci,
+ &qtAtomContainerPtr))
+ return NULL;
+ _rv = GraphicsImportGetExportImageTypeList(ci,
+ qtAtomContainerPtr);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_GraphicsImportGetExportSettingsAsAtomContainer(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsImportComponent ci;
- void * qtAtomContainerPtr;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsImportComponent ci;
+ void * qtAtomContainerPtr;
#ifndef GraphicsImportGetExportSettingsAsAtomContainer
- PyMac_PRECHECK(GraphicsImportGetExportSettingsAsAtomContainer);
+ PyMac_PRECHECK(GraphicsImportGetExportSettingsAsAtomContainer);
#endif
- if (!PyArg_ParseTuple(_args, "O&s",
- CmpInstObj_Convert, &ci,
- &qtAtomContainerPtr))
- return NULL;
- _rv = GraphicsImportGetExportSettingsAsAtomContainer(ci,
- qtAtomContainerPtr);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&s",
+ CmpInstObj_Convert, &ci,
+ &qtAtomContainerPtr))
+ return NULL;
+ _rv = GraphicsImportGetExportSettingsAsAtomContainer(ci,
+ qtAtomContainerPtr);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_GraphicsImportSetExportSettingsFromAtomContainer(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsImportComponent ci;
- void * qtAtomContainer;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsImportComponent ci;
+ void * qtAtomContainer;
#ifndef GraphicsImportSetExportSettingsFromAtomContainer
- PyMac_PRECHECK(GraphicsImportSetExportSettingsFromAtomContainer);
+ PyMac_PRECHECK(GraphicsImportSetExportSettingsFromAtomContainer);
#endif
- if (!PyArg_ParseTuple(_args, "O&s",
- CmpInstObj_Convert, &ci,
- &qtAtomContainer))
- return NULL;
- _rv = GraphicsImportSetExportSettingsFromAtomContainer(ci,
- qtAtomContainer);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&s",
+ CmpInstObj_Convert, &ci,
+ &qtAtomContainer))
+ return NULL;
+ _rv = GraphicsImportSetExportSettingsFromAtomContainer(ci,
+ qtAtomContainer);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_GraphicsImportGetImageCount(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsImportComponent ci;
- unsigned long imageCount;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsImportComponent ci;
+ unsigned long imageCount;
#ifndef GraphicsImportGetImageCount
- PyMac_PRECHECK(GraphicsImportGetImageCount);
+ PyMac_PRECHECK(GraphicsImportGetImageCount);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = GraphicsImportGetImageCount(ci,
- &imageCount);
- _res = Py_BuildValue("ll",
- _rv,
- imageCount);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = GraphicsImportGetImageCount(ci,
+ &imageCount);
+ _res = Py_BuildValue("ll",
+ _rv,
+ imageCount);
+ return _res;
}
static PyObject *Qt_GraphicsImportSetImageIndex(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsImportComponent ci;
- unsigned long imageIndex;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsImportComponent ci;
+ unsigned long imageIndex;
#ifndef GraphicsImportSetImageIndex
- PyMac_PRECHECK(GraphicsImportSetImageIndex);
+ PyMac_PRECHECK(GraphicsImportSetImageIndex);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &ci,
- &imageIndex))
- return NULL;
- _rv = GraphicsImportSetImageIndex(ci,
- imageIndex);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &ci,
+ &imageIndex))
+ return NULL;
+ _rv = GraphicsImportSetImageIndex(ci,
+ imageIndex);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_GraphicsImportGetImageIndex(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsImportComponent ci;
- unsigned long imageIndex;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsImportComponent ci;
+ unsigned long imageIndex;
#ifndef GraphicsImportGetImageIndex
- PyMac_PRECHECK(GraphicsImportGetImageIndex);
+ PyMac_PRECHECK(GraphicsImportGetImageIndex);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = GraphicsImportGetImageIndex(ci,
- &imageIndex);
- _res = Py_BuildValue("ll",
- _rv,
- imageIndex);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = GraphicsImportGetImageIndex(ci,
+ &imageIndex);
+ _res = Py_BuildValue("ll",
+ _rv,
+ imageIndex);
+ return _res;
}
static PyObject *Qt_GraphicsImportGetDataOffsetAndSize64(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsImportComponent ci;
- wide offset;
- wide size;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsImportComponent ci;
+ wide offset;
+ wide size;
#ifndef GraphicsImportGetDataOffsetAndSize64
- PyMac_PRECHECK(GraphicsImportGetDataOffsetAndSize64);
+ PyMac_PRECHECK(GraphicsImportGetDataOffsetAndSize64);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = GraphicsImportGetDataOffsetAndSize64(ci,
- &offset,
- &size);
- _res = Py_BuildValue("lO&O&",
- _rv,
- PyMac_Buildwide, offset,
- PyMac_Buildwide, size);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = GraphicsImportGetDataOffsetAndSize64(ci,
+ &offset,
+ &size);
+ _res = Py_BuildValue("lO&O&",
+ _rv,
+ PyMac_Buildwide, offset,
+ PyMac_Buildwide, size);
+ return _res;
}
static PyObject *Qt_GraphicsImportReadData64(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsImportComponent ci;
- void * dataPtr;
- wide dataOffset;
- unsigned long dataSize;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsImportComponent ci;
+ void * dataPtr;
+ wide dataOffset;
+ unsigned long dataSize;
#ifndef GraphicsImportReadData64
- PyMac_PRECHECK(GraphicsImportReadData64);
-#endif
- if (!PyArg_ParseTuple(_args, "O&sO&l",
- CmpInstObj_Convert, &ci,
- &dataPtr,
- PyMac_Getwide, &dataOffset,
- &dataSize))
- return NULL;
- _rv = GraphicsImportReadData64(ci,
- dataPtr,
- &dataOffset,
- dataSize);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyMac_PRECHECK(GraphicsImportReadData64);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&sO&l",
+ CmpInstObj_Convert, &ci,
+ &dataPtr,
+ PyMac_Getwide, &dataOffset,
+ &dataSize))
+ return NULL;
+ _rv = GraphicsImportReadData64(ci,
+ dataPtr,
+ &dataOffset,
+ dataSize);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_GraphicsImportSetDataReferenceOffsetAndLimit64(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsImportComponent ci;
- wide offset;
- wide limit;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsImportComponent ci;
+ wide offset;
+ wide limit;
#ifndef GraphicsImportSetDataReferenceOffsetAndLimit64
- PyMac_PRECHECK(GraphicsImportSetDataReferenceOffsetAndLimit64);
+ PyMac_PRECHECK(GraphicsImportSetDataReferenceOffsetAndLimit64);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- CmpInstObj_Convert, &ci,
- PyMac_Getwide, &offset,
- PyMac_Getwide, &limit))
- return NULL;
- _rv = GraphicsImportSetDataReferenceOffsetAndLimit64(ci,
- &offset,
- &limit);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ CmpInstObj_Convert, &ci,
+ PyMac_Getwide, &offset,
+ PyMac_Getwide, &limit))
+ return NULL;
+ _rv = GraphicsImportSetDataReferenceOffsetAndLimit64(ci,
+ &offset,
+ &limit);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_GraphicsImportGetDataReferenceOffsetAndLimit64(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsImportComponent ci;
- wide offset;
- wide limit;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsImportComponent ci;
+ wide offset;
+ wide limit;
#ifndef GraphicsImportGetDataReferenceOffsetAndLimit64
- PyMac_PRECHECK(GraphicsImportGetDataReferenceOffsetAndLimit64);
+ PyMac_PRECHECK(GraphicsImportGetDataReferenceOffsetAndLimit64);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = GraphicsImportGetDataReferenceOffsetAndLimit64(ci,
- &offset,
- &limit);
- _res = Py_BuildValue("lO&O&",
- _rv,
- PyMac_Buildwide, offset,
- PyMac_Buildwide, limit);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = GraphicsImportGetDataReferenceOffsetAndLimit64(ci,
+ &offset,
+ &limit);
+ _res = Py_BuildValue("lO&O&",
+ _rv,
+ PyMac_Buildwide, offset,
+ PyMac_Buildwide, limit);
+ return _res;
}
static PyObject *Qt_GraphicsImportGetDefaultClip(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsImportComponent ci;
- RgnHandle defaultRgn;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsImportComponent ci;
+ RgnHandle defaultRgn;
#ifndef GraphicsImportGetDefaultClip
- PyMac_PRECHECK(GraphicsImportGetDefaultClip);
+ PyMac_PRECHECK(GraphicsImportGetDefaultClip);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = GraphicsImportGetDefaultClip(ci,
- &defaultRgn);
- _res = Py_BuildValue("lO&",
- _rv,
- ResObj_New, defaultRgn);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = GraphicsImportGetDefaultClip(ci,
+ &defaultRgn);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ ResObj_New, defaultRgn);
+ return _res;
}
static PyObject *Qt_GraphicsImportGetDefaultGraphicsMode(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsImportComponent ci;
- long defaultGraphicsMode;
- RGBColor defaultOpColor;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsImportComponent ci;
+ long defaultGraphicsMode;
+ RGBColor defaultOpColor;
#ifndef GraphicsImportGetDefaultGraphicsMode
- PyMac_PRECHECK(GraphicsImportGetDefaultGraphicsMode);
+ PyMac_PRECHECK(GraphicsImportGetDefaultGraphicsMode);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = GraphicsImportGetDefaultGraphicsMode(ci,
- &defaultGraphicsMode,
- &defaultOpColor);
- _res = Py_BuildValue("llO&",
- _rv,
- defaultGraphicsMode,
- QdRGB_New, &defaultOpColor);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = GraphicsImportGetDefaultGraphicsMode(ci,
+ &defaultGraphicsMode,
+ &defaultOpColor);
+ _res = Py_BuildValue("llO&",
+ _rv,
+ defaultGraphicsMode,
+ QdRGB_New, &defaultOpColor);
+ return _res;
}
static PyObject *Qt_GraphicsImportGetDefaultSourceRect(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsImportComponent ci;
- Rect defaultSourceRect;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsImportComponent ci;
+ Rect defaultSourceRect;
#ifndef GraphicsImportGetDefaultSourceRect
- PyMac_PRECHECK(GraphicsImportGetDefaultSourceRect);
+ PyMac_PRECHECK(GraphicsImportGetDefaultSourceRect);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = GraphicsImportGetDefaultSourceRect(ci,
- &defaultSourceRect);
- _res = Py_BuildValue("lO&",
- _rv,
- PyMac_BuildRect, &defaultSourceRect);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = GraphicsImportGetDefaultSourceRect(ci,
+ &defaultSourceRect);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ PyMac_BuildRect, &defaultSourceRect);
+ return _res;
}
static PyObject *Qt_GraphicsImportGetColorSyncProfile(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsImportComponent ci;
- Handle profile;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsImportComponent ci;
+ Handle profile;
#ifndef GraphicsImportGetColorSyncProfile
- PyMac_PRECHECK(GraphicsImportGetColorSyncProfile);
+ PyMac_PRECHECK(GraphicsImportGetColorSyncProfile);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = GraphicsImportGetColorSyncProfile(ci,
- &profile);
- _res = Py_BuildValue("lO&",
- _rv,
- ResObj_New, profile);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = GraphicsImportGetColorSyncProfile(ci,
+ &profile);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ ResObj_New, profile);
+ return _res;
}
static PyObject *Qt_GraphicsImportSetDestRect(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsImportComponent ci;
- Rect destRect;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsImportComponent ci;
+ Rect destRect;
#ifndef GraphicsImportSetDestRect
- PyMac_PRECHECK(GraphicsImportSetDestRect);
+ PyMac_PRECHECK(GraphicsImportSetDestRect);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &ci,
- PyMac_GetRect, &destRect))
- return NULL;
- _rv = GraphicsImportSetDestRect(ci,
- &destRect);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &ci,
+ PyMac_GetRect, &destRect))
+ return NULL;
+ _rv = GraphicsImportSetDestRect(ci,
+ &destRect);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_GraphicsImportGetDestRect(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsImportComponent ci;
- Rect destRect;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsImportComponent ci;
+ Rect destRect;
#ifndef GraphicsImportGetDestRect
- PyMac_PRECHECK(GraphicsImportGetDestRect);
+ PyMac_PRECHECK(GraphicsImportGetDestRect);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = GraphicsImportGetDestRect(ci,
- &destRect);
- _res = Py_BuildValue("lO&",
- _rv,
- PyMac_BuildRect, &destRect);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = GraphicsImportGetDestRect(ci,
+ &destRect);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ PyMac_BuildRect, &destRect);
+ return _res;
}
static PyObject *Qt_GraphicsImportSetFlags(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsImportComponent ci;
- long flags;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsImportComponent ci;
+ long flags;
#ifndef GraphicsImportSetFlags
- PyMac_PRECHECK(GraphicsImportSetFlags);
+ PyMac_PRECHECK(GraphicsImportSetFlags);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &ci,
- &flags))
- return NULL;
- _rv = GraphicsImportSetFlags(ci,
- flags);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &ci,
+ &flags))
+ return NULL;
+ _rv = GraphicsImportSetFlags(ci,
+ flags);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_GraphicsImportGetFlags(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsImportComponent ci;
- long flags;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsImportComponent ci;
+ long flags;
#ifndef GraphicsImportGetFlags
- PyMac_PRECHECK(GraphicsImportGetFlags);
+ PyMac_PRECHECK(GraphicsImportGetFlags);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = GraphicsImportGetFlags(ci,
- &flags);
- _res = Py_BuildValue("ll",
- _rv,
- flags);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = GraphicsImportGetFlags(ci,
+ &flags);
+ _res = Py_BuildValue("ll",
+ _rv,
+ flags);
+ return _res;
}
static PyObject *Qt_GraphicsImportGetBaseDataOffsetAndSize64(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsImportComponent ci;
- wide offset;
- wide size;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsImportComponent ci;
+ wide offset;
+ wide size;
#ifndef GraphicsImportGetBaseDataOffsetAndSize64
- PyMac_PRECHECK(GraphicsImportGetBaseDataOffsetAndSize64);
+ PyMac_PRECHECK(GraphicsImportGetBaseDataOffsetAndSize64);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = GraphicsImportGetBaseDataOffsetAndSize64(ci,
- &offset,
- &size);
- _res = Py_BuildValue("lO&O&",
- _rv,
- PyMac_Buildwide, offset,
- PyMac_Buildwide, size);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = GraphicsImportGetBaseDataOffsetAndSize64(ci,
+ &offset,
+ &size);
+ _res = Py_BuildValue("lO&O&",
+ _rv,
+ PyMac_Buildwide, offset,
+ PyMac_Buildwide, size);
+ return _res;
}
static PyObject *Qt_GraphicsImportSetImageIndexToThumbnail(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsImportComponent ci;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsImportComponent ci;
#ifndef GraphicsImportSetImageIndexToThumbnail
- PyMac_PRECHECK(GraphicsImportSetImageIndexToThumbnail);
+ PyMac_PRECHECK(GraphicsImportSetImageIndexToThumbnail);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = GraphicsImportSetImageIndexToThumbnail(ci);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = GraphicsImportSetImageIndexToThumbnail(ci);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_GraphicsExportDoExport(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- unsigned long actualSizeWritten;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ unsigned long actualSizeWritten;
#ifndef GraphicsExportDoExport
- PyMac_PRECHECK(GraphicsExportDoExport);
+ PyMac_PRECHECK(GraphicsExportDoExport);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = GraphicsExportDoExport(ci,
- &actualSizeWritten);
- _res = Py_BuildValue("ll",
- _rv,
- actualSizeWritten);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = GraphicsExportDoExport(ci,
+ &actualSizeWritten);
+ _res = Py_BuildValue("ll",
+ _rv,
+ actualSizeWritten);
+ return _res;
}
static PyObject *Qt_GraphicsExportCanTranscode(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- Boolean canTranscode;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ Boolean canTranscode;
#ifndef GraphicsExportCanTranscode
- PyMac_PRECHECK(GraphicsExportCanTranscode);
+ PyMac_PRECHECK(GraphicsExportCanTranscode);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = GraphicsExportCanTranscode(ci,
- &canTranscode);
- _res = Py_BuildValue("lb",
- _rv,
- canTranscode);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = GraphicsExportCanTranscode(ci,
+ &canTranscode);
+ _res = Py_BuildValue("lb",
+ _rv,
+ canTranscode);
+ return _res;
}
static PyObject *Qt_GraphicsExportDoTranscode(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
#ifndef GraphicsExportDoTranscode
- PyMac_PRECHECK(GraphicsExportDoTranscode);
+ PyMac_PRECHECK(GraphicsExportDoTranscode);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = GraphicsExportDoTranscode(ci);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = GraphicsExportDoTranscode(ci);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_GraphicsExportCanUseCompressor(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- Boolean canUseCompressor;
- void * codecSettingsAtomContainerPtr;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ Boolean canUseCompressor;
+ void * codecSettingsAtomContainerPtr;
#ifndef GraphicsExportCanUseCompressor
- PyMac_PRECHECK(GraphicsExportCanUseCompressor);
+ PyMac_PRECHECK(GraphicsExportCanUseCompressor);
#endif
- if (!PyArg_ParseTuple(_args, "O&s",
- CmpInstObj_Convert, &ci,
- &codecSettingsAtomContainerPtr))
- return NULL;
- _rv = GraphicsExportCanUseCompressor(ci,
- &canUseCompressor,
- codecSettingsAtomContainerPtr);
- _res = Py_BuildValue("lb",
- _rv,
- canUseCompressor);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&s",
+ CmpInstObj_Convert, &ci,
+ &codecSettingsAtomContainerPtr))
+ return NULL;
+ _rv = GraphicsExportCanUseCompressor(ci,
+ &canUseCompressor,
+ codecSettingsAtomContainerPtr);
+ _res = Py_BuildValue("lb",
+ _rv,
+ canUseCompressor);
+ return _res;
}
static PyObject *Qt_GraphicsExportDoUseCompressor(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- void * codecSettingsAtomContainer;
- ImageDescriptionHandle outDesc;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ void * codecSettingsAtomContainer;
+ ImageDescriptionHandle outDesc;
#ifndef GraphicsExportDoUseCompressor
- PyMac_PRECHECK(GraphicsExportDoUseCompressor);
+ PyMac_PRECHECK(GraphicsExportDoUseCompressor);
#endif
- if (!PyArg_ParseTuple(_args, "O&s",
- CmpInstObj_Convert, &ci,
- &codecSettingsAtomContainer))
- return NULL;
- _rv = GraphicsExportDoUseCompressor(ci,
- codecSettingsAtomContainer,
- &outDesc);
- _res = Py_BuildValue("lO&",
- _rv,
- ResObj_New, outDesc);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&s",
+ CmpInstObj_Convert, &ci,
+ &codecSettingsAtomContainer))
+ return NULL;
+ _rv = GraphicsExportDoUseCompressor(ci,
+ codecSettingsAtomContainer,
+ &outDesc);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ ResObj_New, outDesc);
+ return _res;
}
static PyObject *Qt_GraphicsExportDoStandaloneExport(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
#ifndef GraphicsExportDoStandaloneExport
- PyMac_PRECHECK(GraphicsExportDoStandaloneExport);
+ PyMac_PRECHECK(GraphicsExportDoStandaloneExport);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = GraphicsExportDoStandaloneExport(ci);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = GraphicsExportDoStandaloneExport(ci);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_GraphicsExportGetDefaultFileTypeAndCreator(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- OSType fileType;
- OSType fileCreator;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ OSType fileType;
+ OSType fileCreator;
#ifndef GraphicsExportGetDefaultFileTypeAndCreator
- PyMac_PRECHECK(GraphicsExportGetDefaultFileTypeAndCreator);
+ PyMac_PRECHECK(GraphicsExportGetDefaultFileTypeAndCreator);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = GraphicsExportGetDefaultFileTypeAndCreator(ci,
- &fileType,
- &fileCreator);
- _res = Py_BuildValue("lO&O&",
- _rv,
- PyMac_BuildOSType, fileType,
- PyMac_BuildOSType, fileCreator);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = GraphicsExportGetDefaultFileTypeAndCreator(ci,
+ &fileType,
+ &fileCreator);
+ _res = Py_BuildValue("lO&O&",
+ _rv,
+ PyMac_BuildOSType, fileType,
+ PyMac_BuildOSType, fileCreator);
+ return _res;
}
static PyObject *Qt_GraphicsExportGetDefaultFileNameExtension(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- OSType fileNameExtension;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ OSType fileNameExtension;
#ifndef GraphicsExportGetDefaultFileNameExtension
- PyMac_PRECHECK(GraphicsExportGetDefaultFileNameExtension);
+ PyMac_PRECHECK(GraphicsExportGetDefaultFileNameExtension);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = GraphicsExportGetDefaultFileNameExtension(ci,
- &fileNameExtension);
- _res = Py_BuildValue("lO&",
- _rv,
- PyMac_BuildOSType, fileNameExtension);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = GraphicsExportGetDefaultFileNameExtension(ci,
+ &fileNameExtension);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ PyMac_BuildOSType, fileNameExtension);
+ return _res;
}
static PyObject *Qt_GraphicsExportGetMIMETypeList(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- void * qtAtomContainerPtr;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ void * qtAtomContainerPtr;
#ifndef GraphicsExportGetMIMETypeList
- PyMac_PRECHECK(GraphicsExportGetMIMETypeList);
+ PyMac_PRECHECK(GraphicsExportGetMIMETypeList);
#endif
- if (!PyArg_ParseTuple(_args, "O&s",
- CmpInstObj_Convert, &ci,
- &qtAtomContainerPtr))
- return NULL;
- _rv = GraphicsExportGetMIMETypeList(ci,
- qtAtomContainerPtr);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&s",
+ CmpInstObj_Convert, &ci,
+ &qtAtomContainerPtr))
+ return NULL;
+ _rv = GraphicsExportGetMIMETypeList(ci,
+ qtAtomContainerPtr);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_GraphicsExportSetSettingsFromAtomContainer(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- void * qtAtomContainer;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ void * qtAtomContainer;
#ifndef GraphicsExportSetSettingsFromAtomContainer
- PyMac_PRECHECK(GraphicsExportSetSettingsFromAtomContainer);
+ PyMac_PRECHECK(GraphicsExportSetSettingsFromAtomContainer);
#endif
- if (!PyArg_ParseTuple(_args, "O&s",
- CmpInstObj_Convert, &ci,
- &qtAtomContainer))
- return NULL;
- _rv = GraphicsExportSetSettingsFromAtomContainer(ci,
- qtAtomContainer);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&s",
+ CmpInstObj_Convert, &ci,
+ &qtAtomContainer))
+ return NULL;
+ _rv = GraphicsExportSetSettingsFromAtomContainer(ci,
+ qtAtomContainer);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_GraphicsExportGetSettingsAsAtomContainer(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- void * qtAtomContainerPtr;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ void * qtAtomContainerPtr;
#ifndef GraphicsExportGetSettingsAsAtomContainer
- PyMac_PRECHECK(GraphicsExportGetSettingsAsAtomContainer);
+ PyMac_PRECHECK(GraphicsExportGetSettingsAsAtomContainer);
#endif
- if (!PyArg_ParseTuple(_args, "O&s",
- CmpInstObj_Convert, &ci,
- &qtAtomContainerPtr))
- return NULL;
- _rv = GraphicsExportGetSettingsAsAtomContainer(ci,
- qtAtomContainerPtr);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&s",
+ CmpInstObj_Convert, &ci,
+ &qtAtomContainerPtr))
+ return NULL;
+ _rv = GraphicsExportGetSettingsAsAtomContainer(ci,
+ qtAtomContainerPtr);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_GraphicsExportGetSettingsAsText(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- Handle theText;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ Handle theText;
#ifndef GraphicsExportGetSettingsAsText
- PyMac_PRECHECK(GraphicsExportGetSettingsAsText);
+ PyMac_PRECHECK(GraphicsExportGetSettingsAsText);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = GraphicsExportGetSettingsAsText(ci,
- &theText);
- _res = Py_BuildValue("lO&",
- _rv,
- ResObj_New, theText);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = GraphicsExportGetSettingsAsText(ci,
+ &theText);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ ResObj_New, theText);
+ return _res;
}
static PyObject *Qt_GraphicsExportSetDontRecompress(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- Boolean dontRecompress;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ Boolean dontRecompress;
#ifndef GraphicsExportSetDontRecompress
- PyMac_PRECHECK(GraphicsExportSetDontRecompress);
+ PyMac_PRECHECK(GraphicsExportSetDontRecompress);
#endif
- if (!PyArg_ParseTuple(_args, "O&b",
- CmpInstObj_Convert, &ci,
- &dontRecompress))
- return NULL;
- _rv = GraphicsExportSetDontRecompress(ci,
- dontRecompress);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&b",
+ CmpInstObj_Convert, &ci,
+ &dontRecompress))
+ return NULL;
+ _rv = GraphicsExportSetDontRecompress(ci,
+ dontRecompress);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_GraphicsExportGetDontRecompress(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- Boolean dontRecompress;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ Boolean dontRecompress;
#ifndef GraphicsExportGetDontRecompress
- PyMac_PRECHECK(GraphicsExportGetDontRecompress);
+ PyMac_PRECHECK(GraphicsExportGetDontRecompress);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = GraphicsExportGetDontRecompress(ci,
- &dontRecompress);
- _res = Py_BuildValue("lb",
- _rv,
- dontRecompress);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = GraphicsExportGetDontRecompress(ci,
+ &dontRecompress);
+ _res = Py_BuildValue("lb",
+ _rv,
+ dontRecompress);
+ return _res;
}
static PyObject *Qt_GraphicsExportSetInterlaceStyle(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- unsigned long interlaceStyle;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ unsigned long interlaceStyle;
#ifndef GraphicsExportSetInterlaceStyle
- PyMac_PRECHECK(GraphicsExportSetInterlaceStyle);
+ PyMac_PRECHECK(GraphicsExportSetInterlaceStyle);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &ci,
- &interlaceStyle))
- return NULL;
- _rv = GraphicsExportSetInterlaceStyle(ci,
- interlaceStyle);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &ci,
+ &interlaceStyle))
+ return NULL;
+ _rv = GraphicsExportSetInterlaceStyle(ci,
+ interlaceStyle);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_GraphicsExportGetInterlaceStyle(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- unsigned long interlaceStyle;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ unsigned long interlaceStyle;
#ifndef GraphicsExportGetInterlaceStyle
- PyMac_PRECHECK(GraphicsExportGetInterlaceStyle);
+ PyMac_PRECHECK(GraphicsExportGetInterlaceStyle);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = GraphicsExportGetInterlaceStyle(ci,
- &interlaceStyle);
- _res = Py_BuildValue("ll",
- _rv,
- interlaceStyle);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = GraphicsExportGetInterlaceStyle(ci,
+ &interlaceStyle);
+ _res = Py_BuildValue("ll",
+ _rv,
+ interlaceStyle);
+ return _res;
}
static PyObject *Qt_GraphicsExportSetMetaData(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- void * userData;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ void * userData;
#ifndef GraphicsExportSetMetaData
- PyMac_PRECHECK(GraphicsExportSetMetaData);
+ PyMac_PRECHECK(GraphicsExportSetMetaData);
#endif
- if (!PyArg_ParseTuple(_args, "O&s",
- CmpInstObj_Convert, &ci,
- &userData))
- return NULL;
- _rv = GraphicsExportSetMetaData(ci,
- userData);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&s",
+ CmpInstObj_Convert, &ci,
+ &userData))
+ return NULL;
+ _rv = GraphicsExportSetMetaData(ci,
+ userData);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_GraphicsExportGetMetaData(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- void * userData;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ void * userData;
#ifndef GraphicsExportGetMetaData
- PyMac_PRECHECK(GraphicsExportGetMetaData);
+ PyMac_PRECHECK(GraphicsExportGetMetaData);
#endif
- if (!PyArg_ParseTuple(_args, "O&s",
- CmpInstObj_Convert, &ci,
- &userData))
- return NULL;
- _rv = GraphicsExportGetMetaData(ci,
- userData);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&s",
+ CmpInstObj_Convert, &ci,
+ &userData))
+ return NULL;
+ _rv = GraphicsExportGetMetaData(ci,
+ userData);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_GraphicsExportSetTargetDataSize(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- unsigned long targetDataSize;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ unsigned long targetDataSize;
#ifndef GraphicsExportSetTargetDataSize
- PyMac_PRECHECK(GraphicsExportSetTargetDataSize);
+ PyMac_PRECHECK(GraphicsExportSetTargetDataSize);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &ci,
- &targetDataSize))
- return NULL;
- _rv = GraphicsExportSetTargetDataSize(ci,
- targetDataSize);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &ci,
+ &targetDataSize))
+ return NULL;
+ _rv = GraphicsExportSetTargetDataSize(ci,
+ targetDataSize);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_GraphicsExportGetTargetDataSize(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- unsigned long targetDataSize;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ unsigned long targetDataSize;
#ifndef GraphicsExportGetTargetDataSize
- PyMac_PRECHECK(GraphicsExportGetTargetDataSize);
+ PyMac_PRECHECK(GraphicsExportGetTargetDataSize);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = GraphicsExportGetTargetDataSize(ci,
- &targetDataSize);
- _res = Py_BuildValue("ll",
- _rv,
- targetDataSize);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = GraphicsExportGetTargetDataSize(ci,
+ &targetDataSize);
+ _res = Py_BuildValue("ll",
+ _rv,
+ targetDataSize);
+ return _res;
}
static PyObject *Qt_GraphicsExportSetCompressionMethod(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- long compressionMethod;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ long compressionMethod;
#ifndef GraphicsExportSetCompressionMethod
- PyMac_PRECHECK(GraphicsExportSetCompressionMethod);
+ PyMac_PRECHECK(GraphicsExportSetCompressionMethod);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &ci,
- &compressionMethod))
- return NULL;
- _rv = GraphicsExportSetCompressionMethod(ci,
- compressionMethod);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &ci,
+ &compressionMethod))
+ return NULL;
+ _rv = GraphicsExportSetCompressionMethod(ci,
+ compressionMethod);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_GraphicsExportGetCompressionMethod(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- long compressionMethod;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ long compressionMethod;
#ifndef GraphicsExportGetCompressionMethod
- PyMac_PRECHECK(GraphicsExportGetCompressionMethod);
+ PyMac_PRECHECK(GraphicsExportGetCompressionMethod);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = GraphicsExportGetCompressionMethod(ci,
- &compressionMethod);
- _res = Py_BuildValue("ll",
- _rv,
- compressionMethod);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = GraphicsExportGetCompressionMethod(ci,
+ &compressionMethod);
+ _res = Py_BuildValue("ll",
+ _rv,
+ compressionMethod);
+ return _res;
}
static PyObject *Qt_GraphicsExportSetCompressionQuality(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- CodecQ spatialQuality;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ CodecQ spatialQuality;
#ifndef GraphicsExportSetCompressionQuality
- PyMac_PRECHECK(GraphicsExportSetCompressionQuality);
+ PyMac_PRECHECK(GraphicsExportSetCompressionQuality);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &ci,
- &spatialQuality))
- return NULL;
- _rv = GraphicsExportSetCompressionQuality(ci,
- spatialQuality);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &ci,
+ &spatialQuality))
+ return NULL;
+ _rv = GraphicsExportSetCompressionQuality(ci,
+ spatialQuality);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_GraphicsExportGetCompressionQuality(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- CodecQ spatialQuality;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ CodecQ spatialQuality;
#ifndef GraphicsExportGetCompressionQuality
- PyMac_PRECHECK(GraphicsExportGetCompressionQuality);
+ PyMac_PRECHECK(GraphicsExportGetCompressionQuality);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = GraphicsExportGetCompressionQuality(ci,
- &spatialQuality);
- _res = Py_BuildValue("ll",
- _rv,
- spatialQuality);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = GraphicsExportGetCompressionQuality(ci,
+ &spatialQuality);
+ _res = Py_BuildValue("ll",
+ _rv,
+ spatialQuality);
+ return _res;
}
static PyObject *Qt_GraphicsExportSetResolution(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- Fixed horizontalResolution;
- Fixed verticalResolution;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ Fixed horizontalResolution;
+ Fixed verticalResolution;
#ifndef GraphicsExportSetResolution
- PyMac_PRECHECK(GraphicsExportSetResolution);
+ PyMac_PRECHECK(GraphicsExportSetResolution);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- CmpInstObj_Convert, &ci,
- PyMac_GetFixed, &horizontalResolution,
- PyMac_GetFixed, &verticalResolution))
- return NULL;
- _rv = GraphicsExportSetResolution(ci,
- horizontalResolution,
- verticalResolution);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ CmpInstObj_Convert, &ci,
+ PyMac_GetFixed, &horizontalResolution,
+ PyMac_GetFixed, &verticalResolution))
+ return NULL;
+ _rv = GraphicsExportSetResolution(ci,
+ horizontalResolution,
+ verticalResolution);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_GraphicsExportGetResolution(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- Fixed horizontalResolution;
- Fixed verticalResolution;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ Fixed horizontalResolution;
+ Fixed verticalResolution;
#ifndef GraphicsExportGetResolution
- PyMac_PRECHECK(GraphicsExportGetResolution);
+ PyMac_PRECHECK(GraphicsExportGetResolution);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = GraphicsExportGetResolution(ci,
- &horizontalResolution,
- &verticalResolution);
- _res = Py_BuildValue("lO&O&",
- _rv,
- PyMac_BuildFixed, horizontalResolution,
- PyMac_BuildFixed, verticalResolution);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = GraphicsExportGetResolution(ci,
+ &horizontalResolution,
+ &verticalResolution);
+ _res = Py_BuildValue("lO&O&",
+ _rv,
+ PyMac_BuildFixed, horizontalResolution,
+ PyMac_BuildFixed, verticalResolution);
+ return _res;
}
static PyObject *Qt_GraphicsExportSetDepth(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- long depth;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ long depth;
#ifndef GraphicsExportSetDepth
- PyMac_PRECHECK(GraphicsExportSetDepth);
+ PyMac_PRECHECK(GraphicsExportSetDepth);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &ci,
- &depth))
- return NULL;
- _rv = GraphicsExportSetDepth(ci,
- depth);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &ci,
+ &depth))
+ return NULL;
+ _rv = GraphicsExportSetDepth(ci,
+ depth);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_GraphicsExportGetDepth(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- long depth;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ long depth;
#ifndef GraphicsExportGetDepth
- PyMac_PRECHECK(GraphicsExportGetDepth);
+ PyMac_PRECHECK(GraphicsExportGetDepth);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = GraphicsExportGetDepth(ci,
- &depth);
- _res = Py_BuildValue("ll",
- _rv,
- depth);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = GraphicsExportGetDepth(ci,
+ &depth);
+ _res = Py_BuildValue("ll",
+ _rv,
+ depth);
+ return _res;
}
static PyObject *Qt_GraphicsExportSetColorSyncProfile(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- Handle colorSyncProfile;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ Handle colorSyncProfile;
#ifndef GraphicsExportSetColorSyncProfile
- PyMac_PRECHECK(GraphicsExportSetColorSyncProfile);
+ PyMac_PRECHECK(GraphicsExportSetColorSyncProfile);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &ci,
- ResObj_Convert, &colorSyncProfile))
- return NULL;
- _rv = GraphicsExportSetColorSyncProfile(ci,
- colorSyncProfile);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &ci,
+ ResObj_Convert, &colorSyncProfile))
+ return NULL;
+ _rv = GraphicsExportSetColorSyncProfile(ci,
+ colorSyncProfile);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_GraphicsExportGetColorSyncProfile(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- Handle colorSyncProfile;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ Handle colorSyncProfile;
#ifndef GraphicsExportGetColorSyncProfile
- PyMac_PRECHECK(GraphicsExportGetColorSyncProfile);
+ PyMac_PRECHECK(GraphicsExportGetColorSyncProfile);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = GraphicsExportGetColorSyncProfile(ci,
- &colorSyncProfile);
- _res = Py_BuildValue("lO&",
- _rv,
- ResObj_New, colorSyncProfile);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = GraphicsExportGetColorSyncProfile(ci,
+ &colorSyncProfile);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ ResObj_New, colorSyncProfile);
+ return _res;
}
static PyObject *Qt_GraphicsExportSetInputDataReference(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- Handle dataRef;
- OSType dataRefType;
- ImageDescriptionHandle desc;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ Handle dataRef;
+ OSType dataRefType;
+ ImageDescriptionHandle desc;
#ifndef GraphicsExportSetInputDataReference
- PyMac_PRECHECK(GraphicsExportSetInputDataReference);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&O&",
- CmpInstObj_Convert, &ci,
- ResObj_Convert, &dataRef,
- PyMac_GetOSType, &dataRefType,
- ResObj_Convert, &desc))
- return NULL;
- _rv = GraphicsExportSetInputDataReference(ci,
- dataRef,
- dataRefType,
- desc);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyMac_PRECHECK(GraphicsExportSetInputDataReference);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&O&",
+ CmpInstObj_Convert, &ci,
+ ResObj_Convert, &dataRef,
+ PyMac_GetOSType, &dataRefType,
+ ResObj_Convert, &desc))
+ return NULL;
+ _rv = GraphicsExportSetInputDataReference(ci,
+ dataRef,
+ dataRefType,
+ desc);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_GraphicsExportGetInputDataReference(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- Handle dataRef;
- OSType dataRefType;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ Handle dataRef;
+ OSType dataRefType;
#ifndef GraphicsExportGetInputDataReference
- PyMac_PRECHECK(GraphicsExportGetInputDataReference);
+ PyMac_PRECHECK(GraphicsExportGetInputDataReference);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = GraphicsExportGetInputDataReference(ci,
- &dataRef,
- &dataRefType);
- _res = Py_BuildValue("lO&O&",
- _rv,
- ResObj_New, dataRef,
- PyMac_BuildOSType, dataRefType);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = GraphicsExportGetInputDataReference(ci,
+ &dataRef,
+ &dataRefType);
+ _res = Py_BuildValue("lO&O&",
+ _rv,
+ ResObj_New, dataRef,
+ PyMac_BuildOSType, dataRefType);
+ return _res;
}
static PyObject *Qt_GraphicsExportSetInputFile(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- FSSpec theFile;
- ImageDescriptionHandle desc;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ FSSpec theFile;
+ ImageDescriptionHandle desc;
#ifndef GraphicsExportSetInputFile
- PyMac_PRECHECK(GraphicsExportSetInputFile);
+ PyMac_PRECHECK(GraphicsExportSetInputFile);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- CmpInstObj_Convert, &ci,
- PyMac_GetFSSpec, &theFile,
- ResObj_Convert, &desc))
- return NULL;
- _rv = GraphicsExportSetInputFile(ci,
- &theFile,
- desc);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ CmpInstObj_Convert, &ci,
+ PyMac_GetFSSpec, &theFile,
+ ResObj_Convert, &desc))
+ return NULL;
+ _rv = GraphicsExportSetInputFile(ci,
+ &theFile,
+ desc);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_GraphicsExportGetInputFile(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- FSSpec theFile;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ FSSpec theFile;
#ifndef GraphicsExportGetInputFile
- PyMac_PRECHECK(GraphicsExportGetInputFile);
+ PyMac_PRECHECK(GraphicsExportGetInputFile);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &ci,
- PyMac_GetFSSpec, &theFile))
- return NULL;
- _rv = GraphicsExportGetInputFile(ci,
- &theFile);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &ci,
+ PyMac_GetFSSpec, &theFile))
+ return NULL;
+ _rv = GraphicsExportGetInputFile(ci,
+ &theFile);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_GraphicsExportSetInputHandle(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- Handle h;
- ImageDescriptionHandle desc;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ Handle h;
+ ImageDescriptionHandle desc;
#ifndef GraphicsExportSetInputHandle
- PyMac_PRECHECK(GraphicsExportSetInputHandle);
+ PyMac_PRECHECK(GraphicsExportSetInputHandle);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- CmpInstObj_Convert, &ci,
- ResObj_Convert, &h,
- ResObj_Convert, &desc))
- return NULL;
- _rv = GraphicsExportSetInputHandle(ci,
- h,
- desc);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ CmpInstObj_Convert, &ci,
+ ResObj_Convert, &h,
+ ResObj_Convert, &desc))
+ return NULL;
+ _rv = GraphicsExportSetInputHandle(ci,
+ h,
+ desc);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_GraphicsExportGetInputHandle(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- Handle h;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ Handle h;
#ifndef GraphicsExportGetInputHandle
- PyMac_PRECHECK(GraphicsExportGetInputHandle);
+ PyMac_PRECHECK(GraphicsExportGetInputHandle);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = GraphicsExportGetInputHandle(ci,
- &h);
- _res = Py_BuildValue("lO&",
- _rv,
- ResObj_New, h);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = GraphicsExportGetInputHandle(ci,
+ &h);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ ResObj_New, h);
+ return _res;
}
static PyObject *Qt_GraphicsExportSetInputPtr(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- Ptr p;
- unsigned long size;
- ImageDescriptionHandle desc;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ Ptr p;
+ unsigned long size;
+ ImageDescriptionHandle desc;
#ifndef GraphicsExportSetInputPtr
- PyMac_PRECHECK(GraphicsExportSetInputPtr);
-#endif
- if (!PyArg_ParseTuple(_args, "O&slO&",
- CmpInstObj_Convert, &ci,
- &p,
- &size,
- ResObj_Convert, &desc))
- return NULL;
- _rv = GraphicsExportSetInputPtr(ci,
- p,
- size,
- desc);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyMac_PRECHECK(GraphicsExportSetInputPtr);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&slO&",
+ CmpInstObj_Convert, &ci,
+ &p,
+ &size,
+ ResObj_Convert, &desc))
+ return NULL;
+ _rv = GraphicsExportSetInputPtr(ci,
+ p,
+ size,
+ desc);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_GraphicsExportSetInputGraphicsImporter(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- GraphicsImportComponent grip;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ GraphicsImportComponent grip;
#ifndef GraphicsExportSetInputGraphicsImporter
- PyMac_PRECHECK(GraphicsExportSetInputGraphicsImporter);
+ PyMac_PRECHECK(GraphicsExportSetInputGraphicsImporter);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &ci,
- CmpInstObj_Convert, &grip))
- return NULL;
- _rv = GraphicsExportSetInputGraphicsImporter(ci,
- grip);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &ci,
+ CmpInstObj_Convert, &grip))
+ return NULL;
+ _rv = GraphicsExportSetInputGraphicsImporter(ci,
+ grip);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_GraphicsExportGetInputGraphicsImporter(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- GraphicsImportComponent grip;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ GraphicsImportComponent grip;
#ifndef GraphicsExportGetInputGraphicsImporter
- PyMac_PRECHECK(GraphicsExportGetInputGraphicsImporter);
+ PyMac_PRECHECK(GraphicsExportGetInputGraphicsImporter);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = GraphicsExportGetInputGraphicsImporter(ci,
- &grip);
- _res = Py_BuildValue("lO&",
- _rv,
- CmpInstObj_New, grip);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = GraphicsExportGetInputGraphicsImporter(ci,
+ &grip);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ CmpInstObj_New, grip);
+ return _res;
}
static PyObject *Qt_GraphicsExportSetInputPicture(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- PicHandle picture;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ PicHandle picture;
#ifndef GraphicsExportSetInputPicture
- PyMac_PRECHECK(GraphicsExportSetInputPicture);
+ PyMac_PRECHECK(GraphicsExportSetInputPicture);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &ci,
- ResObj_Convert, &picture))
- return NULL;
- _rv = GraphicsExportSetInputPicture(ci,
- picture);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &ci,
+ ResObj_Convert, &picture))
+ return NULL;
+ _rv = GraphicsExportSetInputPicture(ci,
+ picture);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_GraphicsExportGetInputPicture(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- PicHandle picture;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ PicHandle picture;
#ifndef GraphicsExportGetInputPicture
- PyMac_PRECHECK(GraphicsExportGetInputPicture);
+ PyMac_PRECHECK(GraphicsExportGetInputPicture);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = GraphicsExportGetInputPicture(ci,
- &picture);
- _res = Py_BuildValue("lO&",
- _rv,
- ResObj_New, picture);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = GraphicsExportGetInputPicture(ci,
+ &picture);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ ResObj_New, picture);
+ return _res;
}
static PyObject *Qt_GraphicsExportSetInputGWorld(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- GWorldPtr gworld;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ GWorldPtr gworld;
#ifndef GraphicsExportSetInputGWorld
- PyMac_PRECHECK(GraphicsExportSetInputGWorld);
+ PyMac_PRECHECK(GraphicsExportSetInputGWorld);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &ci,
- GWorldObj_Convert, &gworld))
- return NULL;
- _rv = GraphicsExportSetInputGWorld(ci,
- gworld);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &ci,
+ GWorldObj_Convert, &gworld))
+ return NULL;
+ _rv = GraphicsExportSetInputGWorld(ci,
+ gworld);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_GraphicsExportGetInputGWorld(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- GWorldPtr gworld;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ GWorldPtr gworld;
#ifndef GraphicsExportGetInputGWorld
- PyMac_PRECHECK(GraphicsExportGetInputGWorld);
+ PyMac_PRECHECK(GraphicsExportGetInputGWorld);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = GraphicsExportGetInputGWorld(ci,
- &gworld);
- _res = Py_BuildValue("lO&",
- _rv,
- GWorldObj_New, gworld);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = GraphicsExportGetInputGWorld(ci,
+ &gworld);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ GWorldObj_New, gworld);
+ return _res;
}
static PyObject *Qt_GraphicsExportSetInputPixmap(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- PixMapHandle pixmap;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ PixMapHandle pixmap;
#ifndef GraphicsExportSetInputPixmap
- PyMac_PRECHECK(GraphicsExportSetInputPixmap);
+ PyMac_PRECHECK(GraphicsExportSetInputPixmap);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &ci,
- ResObj_Convert, &pixmap))
- return NULL;
- _rv = GraphicsExportSetInputPixmap(ci,
- pixmap);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &ci,
+ ResObj_Convert, &pixmap))
+ return NULL;
+ _rv = GraphicsExportSetInputPixmap(ci,
+ pixmap);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_GraphicsExportGetInputPixmap(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- PixMapHandle pixmap;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ PixMapHandle pixmap;
#ifndef GraphicsExportGetInputPixmap
- PyMac_PRECHECK(GraphicsExportGetInputPixmap);
+ PyMac_PRECHECK(GraphicsExportGetInputPixmap);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = GraphicsExportGetInputPixmap(ci,
- &pixmap);
- _res = Py_BuildValue("lO&",
- _rv,
- ResObj_New, pixmap);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = GraphicsExportGetInputPixmap(ci,
+ &pixmap);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ ResObj_New, pixmap);
+ return _res;
}
static PyObject *Qt_GraphicsExportSetInputOffsetAndLimit(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- unsigned long offset;
- unsigned long limit;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ unsigned long offset;
+ unsigned long limit;
#ifndef GraphicsExportSetInputOffsetAndLimit
- PyMac_PRECHECK(GraphicsExportSetInputOffsetAndLimit);
+ PyMac_PRECHECK(GraphicsExportSetInputOffsetAndLimit);
#endif
- if (!PyArg_ParseTuple(_args, "O&ll",
- CmpInstObj_Convert, &ci,
- &offset,
- &limit))
- return NULL;
- _rv = GraphicsExportSetInputOffsetAndLimit(ci,
- offset,
- limit);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&ll",
+ CmpInstObj_Convert, &ci,
+ &offset,
+ &limit))
+ return NULL;
+ _rv = GraphicsExportSetInputOffsetAndLimit(ci,
+ offset,
+ limit);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_GraphicsExportGetInputOffsetAndLimit(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- unsigned long offset;
- unsigned long limit;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ unsigned long offset;
+ unsigned long limit;
#ifndef GraphicsExportGetInputOffsetAndLimit
- PyMac_PRECHECK(GraphicsExportGetInputOffsetAndLimit);
+ PyMac_PRECHECK(GraphicsExportGetInputOffsetAndLimit);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = GraphicsExportGetInputOffsetAndLimit(ci,
- &offset,
- &limit);
- _res = Py_BuildValue("lll",
- _rv,
- offset,
- limit);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = GraphicsExportGetInputOffsetAndLimit(ci,
+ &offset,
+ &limit);
+ _res = Py_BuildValue("lll",
+ _rv,
+ offset,
+ limit);
+ return _res;
}
static PyObject *Qt_GraphicsExportMayExporterReadInputData(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- Boolean mayReadInputData;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ Boolean mayReadInputData;
#ifndef GraphicsExportMayExporterReadInputData
- PyMac_PRECHECK(GraphicsExportMayExporterReadInputData);
+ PyMac_PRECHECK(GraphicsExportMayExporterReadInputData);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = GraphicsExportMayExporterReadInputData(ci,
- &mayReadInputData);
- _res = Py_BuildValue("lb",
- _rv,
- mayReadInputData);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = GraphicsExportMayExporterReadInputData(ci,
+ &mayReadInputData);
+ _res = Py_BuildValue("lb",
+ _rv,
+ mayReadInputData);
+ return _res;
}
static PyObject *Qt_GraphicsExportGetInputDataSize(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- unsigned long size;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ unsigned long size;
#ifndef GraphicsExportGetInputDataSize
- PyMac_PRECHECK(GraphicsExportGetInputDataSize);
+ PyMac_PRECHECK(GraphicsExportGetInputDataSize);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = GraphicsExportGetInputDataSize(ci,
- &size);
- _res = Py_BuildValue("ll",
- _rv,
- size);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = GraphicsExportGetInputDataSize(ci,
+ &size);
+ _res = Py_BuildValue("ll",
+ _rv,
+ size);
+ return _res;
}
static PyObject *Qt_GraphicsExportReadInputData(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- void * dataPtr;
- unsigned long dataOffset;
- unsigned long dataSize;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ void * dataPtr;
+ unsigned long dataOffset;
+ unsigned long dataSize;
#ifndef GraphicsExportReadInputData
- PyMac_PRECHECK(GraphicsExportReadInputData);
-#endif
- if (!PyArg_ParseTuple(_args, "O&sll",
- CmpInstObj_Convert, &ci,
- &dataPtr,
- &dataOffset,
- &dataSize))
- return NULL;
- _rv = GraphicsExportReadInputData(ci,
- dataPtr,
- dataOffset,
- dataSize);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyMac_PRECHECK(GraphicsExportReadInputData);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&sll",
+ CmpInstObj_Convert, &ci,
+ &dataPtr,
+ &dataOffset,
+ &dataSize))
+ return NULL;
+ _rv = GraphicsExportReadInputData(ci,
+ dataPtr,
+ dataOffset,
+ dataSize);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_GraphicsExportGetInputImageDescription(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- ImageDescriptionHandle desc;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ ImageDescriptionHandle desc;
#ifndef GraphicsExportGetInputImageDescription
- PyMac_PRECHECK(GraphicsExportGetInputImageDescription);
+ PyMac_PRECHECK(GraphicsExportGetInputImageDescription);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = GraphicsExportGetInputImageDescription(ci,
- &desc);
- _res = Py_BuildValue("lO&",
- _rv,
- ResObj_New, desc);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = GraphicsExportGetInputImageDescription(ci,
+ &desc);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ ResObj_New, desc);
+ return _res;
}
static PyObject *Qt_GraphicsExportGetInputImageDimensions(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- Rect dimensions;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ Rect dimensions;
#ifndef GraphicsExportGetInputImageDimensions
- PyMac_PRECHECK(GraphicsExportGetInputImageDimensions);
+ PyMac_PRECHECK(GraphicsExportGetInputImageDimensions);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = GraphicsExportGetInputImageDimensions(ci,
- &dimensions);
- _res = Py_BuildValue("lO&",
- _rv,
- PyMac_BuildRect, &dimensions);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = GraphicsExportGetInputImageDimensions(ci,
+ &dimensions);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ PyMac_BuildRect, &dimensions);
+ return _res;
}
static PyObject *Qt_GraphicsExportGetInputImageDepth(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- long inputDepth;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ long inputDepth;
#ifndef GraphicsExportGetInputImageDepth
- PyMac_PRECHECK(GraphicsExportGetInputImageDepth);
+ PyMac_PRECHECK(GraphicsExportGetInputImageDepth);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = GraphicsExportGetInputImageDepth(ci,
- &inputDepth);
- _res = Py_BuildValue("ll",
- _rv,
- inputDepth);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = GraphicsExportGetInputImageDepth(ci,
+ &inputDepth);
+ _res = Py_BuildValue("ll",
+ _rv,
+ inputDepth);
+ return _res;
}
static PyObject *Qt_GraphicsExportDrawInputImage(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- CGrafPtr gw;
- GDHandle gd;
- Rect srcRect;
- Rect dstRect;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ CGrafPtr gw;
+ GDHandle gd;
+ Rect srcRect;
+ Rect dstRect;
#ifndef GraphicsExportDrawInputImage
- PyMac_PRECHECK(GraphicsExportDrawInputImage);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&O&O&",
- CmpInstObj_Convert, &ci,
- GrafObj_Convert, &gw,
- OptResObj_Convert, &gd,
- PyMac_GetRect, &srcRect,
- PyMac_GetRect, &dstRect))
- return NULL;
- _rv = GraphicsExportDrawInputImage(ci,
- gw,
- gd,
- &srcRect,
- &dstRect);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyMac_PRECHECK(GraphicsExportDrawInputImage);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&O&O&",
+ CmpInstObj_Convert, &ci,
+ GrafObj_Convert, &gw,
+ OptResObj_Convert, &gd,
+ PyMac_GetRect, &srcRect,
+ PyMac_GetRect, &dstRect))
+ return NULL;
+ _rv = GraphicsExportDrawInputImage(ci,
+ gw,
+ gd,
+ &srcRect,
+ &dstRect);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_GraphicsExportSetOutputDataReference(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- Handle dataRef;
- OSType dataRefType;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ Handle dataRef;
+ OSType dataRefType;
#ifndef GraphicsExportSetOutputDataReference
- PyMac_PRECHECK(GraphicsExportSetOutputDataReference);
+ PyMac_PRECHECK(GraphicsExportSetOutputDataReference);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- CmpInstObj_Convert, &ci,
- ResObj_Convert, &dataRef,
- PyMac_GetOSType, &dataRefType))
- return NULL;
- _rv = GraphicsExportSetOutputDataReference(ci,
- dataRef,
- dataRefType);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ CmpInstObj_Convert, &ci,
+ ResObj_Convert, &dataRef,
+ PyMac_GetOSType, &dataRefType))
+ return NULL;
+ _rv = GraphicsExportSetOutputDataReference(ci,
+ dataRef,
+ dataRefType);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_GraphicsExportGetOutputDataReference(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- Handle dataRef;
- OSType dataRefType;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ Handle dataRef;
+ OSType dataRefType;
#ifndef GraphicsExportGetOutputDataReference
- PyMac_PRECHECK(GraphicsExportGetOutputDataReference);
+ PyMac_PRECHECK(GraphicsExportGetOutputDataReference);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = GraphicsExportGetOutputDataReference(ci,
- &dataRef,
- &dataRefType);
- _res = Py_BuildValue("lO&O&",
- _rv,
- ResObj_New, dataRef,
- PyMac_BuildOSType, dataRefType);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = GraphicsExportGetOutputDataReference(ci,
+ &dataRef,
+ &dataRefType);
+ _res = Py_BuildValue("lO&O&",
+ _rv,
+ ResObj_New, dataRef,
+ PyMac_BuildOSType, dataRefType);
+ return _res;
}
static PyObject *Qt_GraphicsExportSetOutputFile(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- FSSpec theFile;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ FSSpec theFile;
#ifndef GraphicsExportSetOutputFile
- PyMac_PRECHECK(GraphicsExportSetOutputFile);
+ PyMac_PRECHECK(GraphicsExportSetOutputFile);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &ci,
- PyMac_GetFSSpec, &theFile))
- return NULL;
- _rv = GraphicsExportSetOutputFile(ci,
- &theFile);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &ci,
+ PyMac_GetFSSpec, &theFile))
+ return NULL;
+ _rv = GraphicsExportSetOutputFile(ci,
+ &theFile);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_GraphicsExportGetOutputFile(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- FSSpec theFile;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ FSSpec theFile;
#ifndef GraphicsExportGetOutputFile
- PyMac_PRECHECK(GraphicsExportGetOutputFile);
+ PyMac_PRECHECK(GraphicsExportGetOutputFile);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &ci,
- PyMac_GetFSSpec, &theFile))
- return NULL;
- _rv = GraphicsExportGetOutputFile(ci,
- &theFile);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &ci,
+ PyMac_GetFSSpec, &theFile))
+ return NULL;
+ _rv = GraphicsExportGetOutputFile(ci,
+ &theFile);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_GraphicsExportSetOutputHandle(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- Handle h;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ Handle h;
#ifndef GraphicsExportSetOutputHandle
- PyMac_PRECHECK(GraphicsExportSetOutputHandle);
+ PyMac_PRECHECK(GraphicsExportSetOutputHandle);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &ci,
- ResObj_Convert, &h))
- return NULL;
- _rv = GraphicsExportSetOutputHandle(ci,
- h);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &ci,
+ ResObj_Convert, &h))
+ return NULL;
+ _rv = GraphicsExportSetOutputHandle(ci,
+ h);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_GraphicsExportGetOutputHandle(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- Handle h;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ Handle h;
#ifndef GraphicsExportGetOutputHandle
- PyMac_PRECHECK(GraphicsExportGetOutputHandle);
+ PyMac_PRECHECK(GraphicsExportGetOutputHandle);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = GraphicsExportGetOutputHandle(ci,
- &h);
- _res = Py_BuildValue("lO&",
- _rv,
- ResObj_New, h);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = GraphicsExportGetOutputHandle(ci,
+ &h);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ ResObj_New, h);
+ return _res;
}
static PyObject *Qt_GraphicsExportSetOutputOffsetAndMaxSize(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- unsigned long offset;
- unsigned long maxSize;
- Boolean truncateFile;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ unsigned long offset;
+ unsigned long maxSize;
+ Boolean truncateFile;
#ifndef GraphicsExportSetOutputOffsetAndMaxSize
- PyMac_PRECHECK(GraphicsExportSetOutputOffsetAndMaxSize);
-#endif
- if (!PyArg_ParseTuple(_args, "O&llb",
- CmpInstObj_Convert, &ci,
- &offset,
- &maxSize,
- &truncateFile))
- return NULL;
- _rv = GraphicsExportSetOutputOffsetAndMaxSize(ci,
- offset,
- maxSize,
- truncateFile);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyMac_PRECHECK(GraphicsExportSetOutputOffsetAndMaxSize);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&llb",
+ CmpInstObj_Convert, &ci,
+ &offset,
+ &maxSize,
+ &truncateFile))
+ return NULL;
+ _rv = GraphicsExportSetOutputOffsetAndMaxSize(ci,
+ offset,
+ maxSize,
+ truncateFile);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_GraphicsExportGetOutputOffsetAndMaxSize(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- unsigned long offset;
- unsigned long maxSize;
- Boolean truncateFile;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ unsigned long offset;
+ unsigned long maxSize;
+ Boolean truncateFile;
#ifndef GraphicsExportGetOutputOffsetAndMaxSize
- PyMac_PRECHECK(GraphicsExportGetOutputOffsetAndMaxSize);
-#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = GraphicsExportGetOutputOffsetAndMaxSize(ci,
- &offset,
- &maxSize,
- &truncateFile);
- _res = Py_BuildValue("lllb",
- _rv,
- offset,
- maxSize,
- truncateFile);
- return _res;
+ PyMac_PRECHECK(GraphicsExportGetOutputOffsetAndMaxSize);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = GraphicsExportGetOutputOffsetAndMaxSize(ci,
+ &offset,
+ &maxSize,
+ &truncateFile);
+ _res = Py_BuildValue("lllb",
+ _rv,
+ offset,
+ maxSize,
+ truncateFile);
+ return _res;
}
static PyObject *Qt_GraphicsExportSetOutputFileTypeAndCreator(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- OSType fileType;
- OSType fileCreator;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ OSType fileType;
+ OSType fileCreator;
#ifndef GraphicsExportSetOutputFileTypeAndCreator
- PyMac_PRECHECK(GraphicsExportSetOutputFileTypeAndCreator);
+ PyMac_PRECHECK(GraphicsExportSetOutputFileTypeAndCreator);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- CmpInstObj_Convert, &ci,
- PyMac_GetOSType, &fileType,
- PyMac_GetOSType, &fileCreator))
- return NULL;
- _rv = GraphicsExportSetOutputFileTypeAndCreator(ci,
- fileType,
- fileCreator);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ CmpInstObj_Convert, &ci,
+ PyMac_GetOSType, &fileType,
+ PyMac_GetOSType, &fileCreator))
+ return NULL;
+ _rv = GraphicsExportSetOutputFileTypeAndCreator(ci,
+ fileType,
+ fileCreator);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_GraphicsExportGetOutputFileTypeAndCreator(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- OSType fileType;
- OSType fileCreator;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ OSType fileType;
+ OSType fileCreator;
#ifndef GraphicsExportGetOutputFileTypeAndCreator
- PyMac_PRECHECK(GraphicsExportGetOutputFileTypeAndCreator);
+ PyMac_PRECHECK(GraphicsExportGetOutputFileTypeAndCreator);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = GraphicsExportGetOutputFileTypeAndCreator(ci,
- &fileType,
- &fileCreator);
- _res = Py_BuildValue("lO&O&",
- _rv,
- PyMac_BuildOSType, fileType,
- PyMac_BuildOSType, fileCreator);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = GraphicsExportGetOutputFileTypeAndCreator(ci,
+ &fileType,
+ &fileCreator);
+ _res = Py_BuildValue("lO&O&",
+ _rv,
+ PyMac_BuildOSType, fileType,
+ PyMac_BuildOSType, fileCreator);
+ return _res;
}
static PyObject *Qt_GraphicsExportSetOutputMark(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- unsigned long mark;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ unsigned long mark;
#ifndef GraphicsExportSetOutputMark
- PyMac_PRECHECK(GraphicsExportSetOutputMark);
+ PyMac_PRECHECK(GraphicsExportSetOutputMark);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &ci,
- &mark))
- return NULL;
- _rv = GraphicsExportSetOutputMark(ci,
- mark);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &ci,
+ &mark))
+ return NULL;
+ _rv = GraphicsExportSetOutputMark(ci,
+ mark);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_GraphicsExportGetOutputMark(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- unsigned long mark;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ unsigned long mark;
#ifndef GraphicsExportGetOutputMark
- PyMac_PRECHECK(GraphicsExportGetOutputMark);
+ PyMac_PRECHECK(GraphicsExportGetOutputMark);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = GraphicsExportGetOutputMark(ci,
- &mark);
- _res = Py_BuildValue("ll",
- _rv,
- mark);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = GraphicsExportGetOutputMark(ci,
+ &mark);
+ _res = Py_BuildValue("ll",
+ _rv,
+ mark);
+ return _res;
}
static PyObject *Qt_GraphicsExportReadOutputData(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- void * dataPtr;
- unsigned long dataOffset;
- unsigned long dataSize;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ void * dataPtr;
+ unsigned long dataOffset;
+ unsigned long dataSize;
#ifndef GraphicsExportReadOutputData
- PyMac_PRECHECK(GraphicsExportReadOutputData);
-#endif
- if (!PyArg_ParseTuple(_args, "O&sll",
- CmpInstObj_Convert, &ci,
- &dataPtr,
- &dataOffset,
- &dataSize))
- return NULL;
- _rv = GraphicsExportReadOutputData(ci,
- dataPtr,
- dataOffset,
- dataSize);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyMac_PRECHECK(GraphicsExportReadOutputData);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&sll",
+ CmpInstObj_Convert, &ci,
+ &dataPtr,
+ &dataOffset,
+ &dataSize))
+ return NULL;
+ _rv = GraphicsExportReadOutputData(ci,
+ dataPtr,
+ dataOffset,
+ dataSize);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_GraphicsExportSetThumbnailEnabled(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- Boolean enableThumbnail;
- long maxThumbnailWidth;
- long maxThumbnailHeight;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ Boolean enableThumbnail;
+ long maxThumbnailWidth;
+ long maxThumbnailHeight;
#ifndef GraphicsExportSetThumbnailEnabled
- PyMac_PRECHECK(GraphicsExportSetThumbnailEnabled);
-#endif
- if (!PyArg_ParseTuple(_args, "O&bll",
- CmpInstObj_Convert, &ci,
- &enableThumbnail,
- &maxThumbnailWidth,
- &maxThumbnailHeight))
- return NULL;
- _rv = GraphicsExportSetThumbnailEnabled(ci,
- enableThumbnail,
- maxThumbnailWidth,
- maxThumbnailHeight);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyMac_PRECHECK(GraphicsExportSetThumbnailEnabled);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&bll",
+ CmpInstObj_Convert, &ci,
+ &enableThumbnail,
+ &maxThumbnailWidth,
+ &maxThumbnailHeight))
+ return NULL;
+ _rv = GraphicsExportSetThumbnailEnabled(ci,
+ enableThumbnail,
+ maxThumbnailWidth,
+ maxThumbnailHeight);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_GraphicsExportGetThumbnailEnabled(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- Boolean thumbnailEnabled;
- long maxThumbnailWidth;
- long maxThumbnailHeight;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ Boolean thumbnailEnabled;
+ long maxThumbnailWidth;
+ long maxThumbnailHeight;
#ifndef GraphicsExportGetThumbnailEnabled
- PyMac_PRECHECK(GraphicsExportGetThumbnailEnabled);
-#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = GraphicsExportGetThumbnailEnabled(ci,
- &thumbnailEnabled,
- &maxThumbnailWidth,
- &maxThumbnailHeight);
- _res = Py_BuildValue("lbll",
- _rv,
- thumbnailEnabled,
- maxThumbnailWidth,
- maxThumbnailHeight);
- return _res;
+ PyMac_PRECHECK(GraphicsExportGetThumbnailEnabled);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = GraphicsExportGetThumbnailEnabled(ci,
+ &thumbnailEnabled,
+ &maxThumbnailWidth,
+ &maxThumbnailHeight);
+ _res = Py_BuildValue("lbll",
+ _rv,
+ thumbnailEnabled,
+ maxThumbnailWidth,
+ maxThumbnailHeight);
+ return _res;
}
static PyObject *Qt_GraphicsExportSetExifEnabled(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- Boolean enableExif;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ Boolean enableExif;
#ifndef GraphicsExportSetExifEnabled
- PyMac_PRECHECK(GraphicsExportSetExifEnabled);
+ PyMac_PRECHECK(GraphicsExportSetExifEnabled);
#endif
- if (!PyArg_ParseTuple(_args, "O&b",
- CmpInstObj_Convert, &ci,
- &enableExif))
- return NULL;
- _rv = GraphicsExportSetExifEnabled(ci,
- enableExif);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&b",
+ CmpInstObj_Convert, &ci,
+ &enableExif))
+ return NULL;
+ _rv = GraphicsExportSetExifEnabled(ci,
+ enableExif);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_GraphicsExportGetExifEnabled(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicsExportComponent ci;
- Boolean exifEnabled;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicsExportComponent ci;
+ Boolean exifEnabled;
#ifndef GraphicsExportGetExifEnabled
- PyMac_PRECHECK(GraphicsExportGetExifEnabled);
+ PyMac_PRECHECK(GraphicsExportGetExifEnabled);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = GraphicsExportGetExifEnabled(ci,
- &exifEnabled);
- _res = Py_BuildValue("lb",
- _rv,
- exifEnabled);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = GraphicsExportGetExifEnabled(ci,
+ &exifEnabled);
+ _res = Py_BuildValue("lb",
+ _rv,
+ exifEnabled);
+ return _res;
}
static PyObject *Qt_ImageTranscoderBeginSequence(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- ImageTranscoderComponent itc;
- ImageDescriptionHandle srcDesc;
- ImageDescriptionHandle dstDesc;
- void * data;
- long dataSize;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ ImageTranscoderComponent itc;
+ ImageDescriptionHandle srcDesc;
+ ImageDescriptionHandle dstDesc;
+ void * data;
+ long dataSize;
#ifndef ImageTranscoderBeginSequence
- PyMac_PRECHECK(ImageTranscoderBeginSequence);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&sl",
- CmpInstObj_Convert, &itc,
- ResObj_Convert, &srcDesc,
- &data,
- &dataSize))
- return NULL;
- _rv = ImageTranscoderBeginSequence(itc,
- srcDesc,
- &dstDesc,
- data,
- dataSize);
- _res = Py_BuildValue("lO&",
- _rv,
- ResObj_New, dstDesc);
- return _res;
+ PyMac_PRECHECK(ImageTranscoderBeginSequence);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&sl",
+ CmpInstObj_Convert, &itc,
+ ResObj_Convert, &srcDesc,
+ &data,
+ &dataSize))
+ return NULL;
+ _rv = ImageTranscoderBeginSequence(itc,
+ srcDesc,
+ &dstDesc,
+ data,
+ dataSize);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ ResObj_New, dstDesc);
+ return _res;
}
static PyObject *Qt_ImageTranscoderDisposeData(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- ImageTranscoderComponent itc;
- void * dstData;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ ImageTranscoderComponent itc;
+ void * dstData;
#ifndef ImageTranscoderDisposeData
- PyMac_PRECHECK(ImageTranscoderDisposeData);
+ PyMac_PRECHECK(ImageTranscoderDisposeData);
#endif
- if (!PyArg_ParseTuple(_args, "O&s",
- CmpInstObj_Convert, &itc,
- &dstData))
- return NULL;
- _rv = ImageTranscoderDisposeData(itc,
- dstData);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&s",
+ CmpInstObj_Convert, &itc,
+ &dstData))
+ return NULL;
+ _rv = ImageTranscoderDisposeData(itc,
+ dstData);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_ImageTranscoderEndSequence(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- ImageTranscoderComponent itc;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ ImageTranscoderComponent itc;
#ifndef ImageTranscoderEndSequence
- PyMac_PRECHECK(ImageTranscoderEndSequence);
+ PyMac_PRECHECK(ImageTranscoderEndSequence);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &itc))
- return NULL;
- _rv = ImageTranscoderEndSequence(itc);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &itc))
+ return NULL;
+ _rv = ImageTranscoderEndSequence(itc);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_ClockGetTime(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- ComponentInstance aClock;
- TimeRecord out;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ ComponentInstance aClock;
+ TimeRecord out;
#ifndef ClockGetTime
- PyMac_PRECHECK(ClockGetTime);
+ PyMac_PRECHECK(ClockGetTime);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &aClock))
- return NULL;
- _rv = ClockGetTime(aClock,
- &out);
- _res = Py_BuildValue("lO&",
- _rv,
- QtTimeRecord_New, &out);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &aClock))
+ return NULL;
+ _rv = ClockGetTime(aClock,
+ &out);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ QtTimeRecord_New, &out);
+ return _res;
}
static PyObject *Qt_ClockSetTimeBase(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- ComponentInstance aClock;
- TimeBase tb;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ ComponentInstance aClock;
+ TimeBase tb;
#ifndef ClockSetTimeBase
- PyMac_PRECHECK(ClockSetTimeBase);
+ PyMac_PRECHECK(ClockSetTimeBase);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &aClock,
- TimeBaseObj_Convert, &tb))
- return NULL;
- _rv = ClockSetTimeBase(aClock,
- tb);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &aClock,
+ TimeBaseObj_Convert, &tb))
+ return NULL;
+ _rv = ClockSetTimeBase(aClock,
+ tb);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_ClockGetRate(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- ComponentInstance aClock;
- Fixed rate;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ ComponentInstance aClock;
+ Fixed rate;
#ifndef ClockGetRate
- PyMac_PRECHECK(ClockGetRate);
+ PyMac_PRECHECK(ClockGetRate);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &aClock))
- return NULL;
- _rv = ClockGetRate(aClock,
- &rate);
- _res = Py_BuildValue("lO&",
- _rv,
- PyMac_BuildFixed, rate);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &aClock))
+ return NULL;
+ _rv = ClockGetRate(aClock,
+ &rate);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ PyMac_BuildFixed, rate);
+ return _res;
}
static PyObject *Qt_SCPositionRect(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- ComponentInstance ci;
- Rect rp;
- Point where;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ ComponentInstance ci;
+ Rect rp;
+ Point where;
#ifndef SCPositionRect
- PyMac_PRECHECK(SCPositionRect);
+ PyMac_PRECHECK(SCPositionRect);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = SCPositionRect(ci,
- &rp,
- &where);
- _res = Py_BuildValue("lO&O&",
- _rv,
- PyMac_BuildRect, &rp,
- PyMac_BuildPoint, where);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = SCPositionRect(ci,
+ &rp,
+ &where);
+ _res = Py_BuildValue("lO&O&",
+ _rv,
+ PyMac_BuildRect, &rp,
+ PyMac_BuildPoint, where);
+ return _res;
}
static PyObject *Qt_SCPositionDialog(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- ComponentInstance ci;
- short id;
- Point where;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ ComponentInstance ci;
+ short id;
+ Point where;
#ifndef SCPositionDialog
- PyMac_PRECHECK(SCPositionDialog);
+ PyMac_PRECHECK(SCPositionDialog);
#endif
- if (!PyArg_ParseTuple(_args, "O&h",
- CmpInstObj_Convert, &ci,
- &id))
- return NULL;
- _rv = SCPositionDialog(ci,
- id,
- &where);
- _res = Py_BuildValue("lO&",
- _rv,
- PyMac_BuildPoint, where);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&h",
+ CmpInstObj_Convert, &ci,
+ &id))
+ return NULL;
+ _rv = SCPositionDialog(ci,
+ id,
+ &where);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ PyMac_BuildPoint, where);
+ return _res;
}
static PyObject *Qt_SCSetTestImagePictHandle(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- ComponentInstance ci;
- PicHandle testPict;
- Rect testRect;
- short testFlags;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ ComponentInstance ci;
+ PicHandle testPict;
+ Rect testRect;
+ short testFlags;
#ifndef SCSetTestImagePictHandle
- PyMac_PRECHECK(SCSetTestImagePictHandle);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&h",
- CmpInstObj_Convert, &ci,
- ResObj_Convert, &testPict,
- &testFlags))
- return NULL;
- _rv = SCSetTestImagePictHandle(ci,
- testPict,
- &testRect,
- testFlags);
- _res = Py_BuildValue("lO&",
- _rv,
- PyMac_BuildRect, &testRect);
- return _res;
+ PyMac_PRECHECK(SCSetTestImagePictHandle);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&h",
+ CmpInstObj_Convert, &ci,
+ ResObj_Convert, &testPict,
+ &testFlags))
+ return NULL;
+ _rv = SCSetTestImagePictHandle(ci,
+ testPict,
+ &testRect,
+ testFlags);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ PyMac_BuildRect, &testRect);
+ return _res;
}
static PyObject *Qt_SCSetTestImagePictFile(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- ComponentInstance ci;
- short testFileRef;
- Rect testRect;
- short testFlags;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ ComponentInstance ci;
+ short testFileRef;
+ Rect testRect;
+ short testFlags;
#ifndef SCSetTestImagePictFile
- PyMac_PRECHECK(SCSetTestImagePictFile);
-#endif
- if (!PyArg_ParseTuple(_args, "O&hh",
- CmpInstObj_Convert, &ci,
- &testFileRef,
- &testFlags))
- return NULL;
- _rv = SCSetTestImagePictFile(ci,
- testFileRef,
- &testRect,
- testFlags);
- _res = Py_BuildValue("lO&",
- _rv,
- PyMac_BuildRect, &testRect);
- return _res;
+ PyMac_PRECHECK(SCSetTestImagePictFile);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&hh",
+ CmpInstObj_Convert, &ci,
+ &testFileRef,
+ &testFlags))
+ return NULL;
+ _rv = SCSetTestImagePictFile(ci,
+ testFileRef,
+ &testRect,
+ testFlags);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ PyMac_BuildRect, &testRect);
+ return _res;
}
static PyObject *Qt_SCSetTestImagePixMap(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- ComponentInstance ci;
- PixMapHandle testPixMap;
- Rect testRect;
- short testFlags;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ ComponentInstance ci;
+ PixMapHandle testPixMap;
+ Rect testRect;
+ short testFlags;
#ifndef SCSetTestImagePixMap
- PyMac_PRECHECK(SCSetTestImagePixMap);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&h",
- CmpInstObj_Convert, &ci,
- ResObj_Convert, &testPixMap,
- &testFlags))
- return NULL;
- _rv = SCSetTestImagePixMap(ci,
- testPixMap,
- &testRect,
- testFlags);
- _res = Py_BuildValue("lO&",
- _rv,
- PyMac_BuildRect, &testRect);
- return _res;
+ PyMac_PRECHECK(SCSetTestImagePixMap);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&h",
+ CmpInstObj_Convert, &ci,
+ ResObj_Convert, &testPixMap,
+ &testFlags))
+ return NULL;
+ _rv = SCSetTestImagePixMap(ci,
+ testPixMap,
+ &testRect,
+ testFlags);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ PyMac_BuildRect, &testRect);
+ return _res;
}
static PyObject *Qt_SCGetBestDeviceRect(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- ComponentInstance ci;
- Rect r;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ ComponentInstance ci;
+ Rect r;
#ifndef SCGetBestDeviceRect
- PyMac_PRECHECK(SCGetBestDeviceRect);
+ PyMac_PRECHECK(SCGetBestDeviceRect);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = SCGetBestDeviceRect(ci,
- &r);
- _res = Py_BuildValue("lO&",
- _rv,
- PyMac_BuildRect, &r);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = SCGetBestDeviceRect(ci,
+ &r);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ PyMac_BuildRect, &r);
+ return _res;
}
static PyObject *Qt_SCRequestImageSettings(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- ComponentInstance ci;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ ComponentInstance ci;
#ifndef SCRequestImageSettings
- PyMac_PRECHECK(SCRequestImageSettings);
+ PyMac_PRECHECK(SCRequestImageSettings);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = SCRequestImageSettings(ci);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = SCRequestImageSettings(ci);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SCCompressImage(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- ComponentInstance ci;
- PixMapHandle src;
- Rect srcRect;
- ImageDescriptionHandle desc;
- Handle data;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ ComponentInstance ci;
+ PixMapHandle src;
+ Rect srcRect;
+ ImageDescriptionHandle desc;
+ Handle data;
#ifndef SCCompressImage
- PyMac_PRECHECK(SCCompressImage);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- CmpInstObj_Convert, &ci,
- ResObj_Convert, &src,
- PyMac_GetRect, &srcRect))
- return NULL;
- _rv = SCCompressImage(ci,
- src,
- &srcRect,
- &desc,
- &data);
- _res = Py_BuildValue("lO&O&",
- _rv,
- ResObj_New, desc,
- ResObj_New, data);
- return _res;
+ PyMac_PRECHECK(SCCompressImage);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ CmpInstObj_Convert, &ci,
+ ResObj_Convert, &src,
+ PyMac_GetRect, &srcRect))
+ return NULL;
+ _rv = SCCompressImage(ci,
+ src,
+ &srcRect,
+ &desc,
+ &data);
+ _res = Py_BuildValue("lO&O&",
+ _rv,
+ ResObj_New, desc,
+ ResObj_New, data);
+ return _res;
}
static PyObject *Qt_SCCompressPicture(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- ComponentInstance ci;
- PicHandle srcPicture;
- PicHandle dstPicture;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ ComponentInstance ci;
+ PicHandle srcPicture;
+ PicHandle dstPicture;
#ifndef SCCompressPicture
- PyMac_PRECHECK(SCCompressPicture);
+ PyMac_PRECHECK(SCCompressPicture);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- CmpInstObj_Convert, &ci,
- ResObj_Convert, &srcPicture,
- ResObj_Convert, &dstPicture))
- return NULL;
- _rv = SCCompressPicture(ci,
- srcPicture,
- dstPicture);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ CmpInstObj_Convert, &ci,
+ ResObj_Convert, &srcPicture,
+ ResObj_Convert, &dstPicture))
+ return NULL;
+ _rv = SCCompressPicture(ci,
+ srcPicture,
+ dstPicture);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SCCompressPictureFile(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- ComponentInstance ci;
- short srcRefNum;
- short dstRefNum;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ ComponentInstance ci;
+ short srcRefNum;
+ short dstRefNum;
#ifndef SCCompressPictureFile
- PyMac_PRECHECK(SCCompressPictureFile);
+ PyMac_PRECHECK(SCCompressPictureFile);
#endif
- if (!PyArg_ParseTuple(_args, "O&hh",
- CmpInstObj_Convert, &ci,
- &srcRefNum,
- &dstRefNum))
- return NULL;
- _rv = SCCompressPictureFile(ci,
- srcRefNum,
- dstRefNum);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&hh",
+ CmpInstObj_Convert, &ci,
+ &srcRefNum,
+ &dstRefNum))
+ return NULL;
+ _rv = SCCompressPictureFile(ci,
+ srcRefNum,
+ dstRefNum);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SCRequestSequenceSettings(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- ComponentInstance ci;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ ComponentInstance ci;
#ifndef SCRequestSequenceSettings
- PyMac_PRECHECK(SCRequestSequenceSettings);
+ PyMac_PRECHECK(SCRequestSequenceSettings);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = SCRequestSequenceSettings(ci);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = SCRequestSequenceSettings(ci);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SCCompressSequenceBegin(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- ComponentInstance ci;
- PixMapHandle src;
- Rect srcRect;
- ImageDescriptionHandle desc;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ ComponentInstance ci;
+ PixMapHandle src;
+ Rect srcRect;
+ ImageDescriptionHandle desc;
#ifndef SCCompressSequenceBegin
- PyMac_PRECHECK(SCCompressSequenceBegin);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- CmpInstObj_Convert, &ci,
- ResObj_Convert, &src,
- PyMac_GetRect, &srcRect))
- return NULL;
- _rv = SCCompressSequenceBegin(ci,
- src,
- &srcRect,
- &desc);
- _res = Py_BuildValue("lO&",
- _rv,
- ResObj_New, desc);
- return _res;
+ PyMac_PRECHECK(SCCompressSequenceBegin);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ CmpInstObj_Convert, &ci,
+ ResObj_Convert, &src,
+ PyMac_GetRect, &srcRect))
+ return NULL;
+ _rv = SCCompressSequenceBegin(ci,
+ src,
+ &srcRect,
+ &desc);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ ResObj_New, desc);
+ return _res;
}
static PyObject *Qt_SCCompressSequenceFrame(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- ComponentInstance ci;
- PixMapHandle src;
- Rect srcRect;
- Handle data;
- long dataSize;
- short notSyncFlag;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ ComponentInstance ci;
+ PixMapHandle src;
+ Rect srcRect;
+ Handle data;
+ long dataSize;
+ short notSyncFlag;
#ifndef SCCompressSequenceFrame
- PyMac_PRECHECK(SCCompressSequenceFrame);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- CmpInstObj_Convert, &ci,
- ResObj_Convert, &src,
- PyMac_GetRect, &srcRect))
- return NULL;
- _rv = SCCompressSequenceFrame(ci,
- src,
- &srcRect,
- &data,
- &dataSize,
- &notSyncFlag);
- _res = Py_BuildValue("lO&lh",
- _rv,
- ResObj_New, data,
- dataSize,
- notSyncFlag);
- return _res;
+ PyMac_PRECHECK(SCCompressSequenceFrame);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ CmpInstObj_Convert, &ci,
+ ResObj_Convert, &src,
+ PyMac_GetRect, &srcRect))
+ return NULL;
+ _rv = SCCompressSequenceFrame(ci,
+ src,
+ &srcRect,
+ &data,
+ &dataSize,
+ &notSyncFlag);
+ _res = Py_BuildValue("lO&lh",
+ _rv,
+ ResObj_New, data,
+ dataSize,
+ notSyncFlag);
+ return _res;
}
static PyObject *Qt_SCCompressSequenceEnd(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- ComponentInstance ci;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ ComponentInstance ci;
#ifndef SCCompressSequenceEnd
- PyMac_PRECHECK(SCCompressSequenceEnd);
+ PyMac_PRECHECK(SCCompressSequenceEnd);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = SCCompressSequenceEnd(ci);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = SCCompressSequenceEnd(ci);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SCDefaultPictHandleSettings(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- ComponentInstance ci;
- PicHandle srcPicture;
- short motion;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ ComponentInstance ci;
+ PicHandle srcPicture;
+ short motion;
#ifndef SCDefaultPictHandleSettings
- PyMac_PRECHECK(SCDefaultPictHandleSettings);
+ PyMac_PRECHECK(SCDefaultPictHandleSettings);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&h",
- CmpInstObj_Convert, &ci,
- ResObj_Convert, &srcPicture,
- &motion))
- return NULL;
- _rv = SCDefaultPictHandleSettings(ci,
- srcPicture,
- motion);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&h",
+ CmpInstObj_Convert, &ci,
+ ResObj_Convert, &srcPicture,
+ &motion))
+ return NULL;
+ _rv = SCDefaultPictHandleSettings(ci,
+ srcPicture,
+ motion);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SCDefaultPictFileSettings(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- ComponentInstance ci;
- short srcRef;
- short motion;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ ComponentInstance ci;
+ short srcRef;
+ short motion;
#ifndef SCDefaultPictFileSettings
- PyMac_PRECHECK(SCDefaultPictFileSettings);
+ PyMac_PRECHECK(SCDefaultPictFileSettings);
#endif
- if (!PyArg_ParseTuple(_args, "O&hh",
- CmpInstObj_Convert, &ci,
- &srcRef,
- &motion))
- return NULL;
- _rv = SCDefaultPictFileSettings(ci,
- srcRef,
- motion);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&hh",
+ CmpInstObj_Convert, &ci,
+ &srcRef,
+ &motion))
+ return NULL;
+ _rv = SCDefaultPictFileSettings(ci,
+ srcRef,
+ motion);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SCDefaultPixMapSettings(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- ComponentInstance ci;
- PixMapHandle src;
- short motion;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ ComponentInstance ci;
+ PixMapHandle src;
+ short motion;
#ifndef SCDefaultPixMapSettings
- PyMac_PRECHECK(SCDefaultPixMapSettings);
+ PyMac_PRECHECK(SCDefaultPixMapSettings);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&h",
- CmpInstObj_Convert, &ci,
- ResObj_Convert, &src,
- &motion))
- return NULL;
- _rv = SCDefaultPixMapSettings(ci,
- src,
- motion);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&h",
+ CmpInstObj_Convert, &ci,
+ ResObj_Convert, &src,
+ &motion))
+ return NULL;
+ _rv = SCDefaultPixMapSettings(ci,
+ src,
+ motion);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SCGetInfo(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- ComponentInstance ci;
- OSType infoType;
- void * info;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ ComponentInstance ci;
+ OSType infoType;
+ void * info;
#ifndef SCGetInfo
- PyMac_PRECHECK(SCGetInfo);
+ PyMac_PRECHECK(SCGetInfo);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&s",
- CmpInstObj_Convert, &ci,
- PyMac_GetOSType, &infoType,
- &info))
- return NULL;
- _rv = SCGetInfo(ci,
- infoType,
- info);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&s",
+ CmpInstObj_Convert, &ci,
+ PyMac_GetOSType, &infoType,
+ &info))
+ return NULL;
+ _rv = SCGetInfo(ci,
+ infoType,
+ info);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SCSetInfo(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- ComponentInstance ci;
- OSType infoType;
- void * info;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ ComponentInstance ci;
+ OSType infoType;
+ void * info;
#ifndef SCSetInfo
- PyMac_PRECHECK(SCSetInfo);
+ PyMac_PRECHECK(SCSetInfo);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&s",
- CmpInstObj_Convert, &ci,
- PyMac_GetOSType, &infoType,
- &info))
- return NULL;
- _rv = SCSetInfo(ci,
- infoType,
- info);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&s",
+ CmpInstObj_Convert, &ci,
+ PyMac_GetOSType, &infoType,
+ &info))
+ return NULL;
+ _rv = SCSetInfo(ci,
+ infoType,
+ info);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SCSetCompressFlags(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- ComponentInstance ci;
- long flags;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ ComponentInstance ci;
+ long flags;
#ifndef SCSetCompressFlags
- PyMac_PRECHECK(SCSetCompressFlags);
+ PyMac_PRECHECK(SCSetCompressFlags);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &ci,
- &flags))
- return NULL;
- _rv = SCSetCompressFlags(ci,
- flags);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &ci,
+ &flags))
+ return NULL;
+ _rv = SCSetCompressFlags(ci,
+ flags);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SCGetCompressFlags(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- ComponentInstance ci;
- long flags;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ ComponentInstance ci;
+ long flags;
#ifndef SCGetCompressFlags
- PyMac_PRECHECK(SCGetCompressFlags);
+ PyMac_PRECHECK(SCGetCompressFlags);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = SCGetCompressFlags(ci,
- &flags);
- _res = Py_BuildValue("ll",
- _rv,
- flags);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = SCGetCompressFlags(ci,
+ &flags);
+ _res = Py_BuildValue("ll",
+ _rv,
+ flags);
+ return _res;
}
static PyObject *Qt_SCGetSettingsAsText(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- ComponentInstance ci;
- Handle text;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ ComponentInstance ci;
+ Handle text;
#ifndef SCGetSettingsAsText
- PyMac_PRECHECK(SCGetSettingsAsText);
+ PyMac_PRECHECK(SCGetSettingsAsText);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = SCGetSettingsAsText(ci,
- &text);
- _res = Py_BuildValue("lO&",
- _rv,
- ResObj_New, text);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = SCGetSettingsAsText(ci,
+ &text);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ ResObj_New, text);
+ return _res;
}
static PyObject *Qt_SCAsyncIdle(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- ComponentInstance ci;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ ComponentInstance ci;
#ifndef SCAsyncIdle
- PyMac_PRECHECK(SCAsyncIdle);
+ PyMac_PRECHECK(SCAsyncIdle);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = SCAsyncIdle(ci);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = SCAsyncIdle(ci);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_TweenerReset(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- TweenerComponent tc;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ TweenerComponent tc;
#ifndef TweenerReset
- PyMac_PRECHECK(TweenerReset);
+ PyMac_PRECHECK(TweenerReset);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &tc))
- return NULL;
- _rv = TweenerReset(tc);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &tc))
+ return NULL;
+ _rv = TweenerReset(tc);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_TCGetSourceRef(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- HandlerError _rv;
- MediaHandler mh;
- TimeCodeDescriptionHandle tcdH;
- UserData srefH;
+ PyObject *_res = NULL;
+ HandlerError _rv;
+ MediaHandler mh;
+ TimeCodeDescriptionHandle tcdH;
+ UserData srefH;
#ifndef TCGetSourceRef
- PyMac_PRECHECK(TCGetSourceRef);
+ PyMac_PRECHECK(TCGetSourceRef);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &mh,
- ResObj_Convert, &tcdH))
- return NULL;
- _rv = TCGetSourceRef(mh,
- tcdH,
- &srefH);
- _res = Py_BuildValue("lO&",
- _rv,
- UserDataObj_New, srefH);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &mh,
+ ResObj_Convert, &tcdH))
+ return NULL;
+ _rv = TCGetSourceRef(mh,
+ tcdH,
+ &srefH);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ UserDataObj_New, srefH);
+ return _res;
}
static PyObject *Qt_TCSetSourceRef(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- HandlerError _rv;
- MediaHandler mh;
- TimeCodeDescriptionHandle tcdH;
- UserData srefH;
+ PyObject *_res = NULL;
+ HandlerError _rv;
+ MediaHandler mh;
+ TimeCodeDescriptionHandle tcdH;
+ UserData srefH;
#ifndef TCSetSourceRef
- PyMac_PRECHECK(TCSetSourceRef);
+ PyMac_PRECHECK(TCSetSourceRef);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- CmpInstObj_Convert, &mh,
- ResObj_Convert, &tcdH,
- UserDataObj_Convert, &srefH))
- return NULL;
- _rv = TCSetSourceRef(mh,
- tcdH,
- srefH);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ CmpInstObj_Convert, &mh,
+ ResObj_Convert, &tcdH,
+ UserDataObj_Convert, &srefH))
+ return NULL;
+ _rv = TCSetSourceRef(mh,
+ tcdH,
+ srefH);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_TCSetTimeCodeFlags(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- HandlerError _rv;
- MediaHandler mh;
- long flags;
- long flagsMask;
+ PyObject *_res = NULL;
+ HandlerError _rv;
+ MediaHandler mh;
+ long flags;
+ long flagsMask;
#ifndef TCSetTimeCodeFlags
- PyMac_PRECHECK(TCSetTimeCodeFlags);
+ PyMac_PRECHECK(TCSetTimeCodeFlags);
#endif
- if (!PyArg_ParseTuple(_args, "O&ll",
- CmpInstObj_Convert, &mh,
- &flags,
- &flagsMask))
- return NULL;
- _rv = TCSetTimeCodeFlags(mh,
- flags,
- flagsMask);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&ll",
+ CmpInstObj_Convert, &mh,
+ &flags,
+ &flagsMask))
+ return NULL;
+ _rv = TCSetTimeCodeFlags(mh,
+ flags,
+ flagsMask);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_TCGetTimeCodeFlags(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- HandlerError _rv;
- MediaHandler mh;
- long flags;
+ PyObject *_res = NULL;
+ HandlerError _rv;
+ MediaHandler mh;
+ long flags;
#ifndef TCGetTimeCodeFlags
- PyMac_PRECHECK(TCGetTimeCodeFlags);
+ PyMac_PRECHECK(TCGetTimeCodeFlags);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &mh))
- return NULL;
- _rv = TCGetTimeCodeFlags(mh,
- &flags);
- _res = Py_BuildValue("ll",
- _rv,
- flags);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &mh))
+ return NULL;
+ _rv = TCGetTimeCodeFlags(mh,
+ &flags);
+ _res = Py_BuildValue("ll",
+ _rv,
+ flags);
+ return _res;
}
static PyObject *Qt_MovieImportHandle(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MovieImportComponent ci;
- Handle dataH;
- Movie theMovie;
- Track targetTrack;
- Track usedTrack;
- TimeValue atTime;
- TimeValue addedDuration;
- long inFlags;
- long outFlags;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MovieImportComponent ci;
+ Handle dataH;
+ Movie theMovie;
+ Track targetTrack;
+ Track usedTrack;
+ TimeValue atTime;
+ TimeValue addedDuration;
+ long inFlags;
+ long outFlags;
#ifndef MovieImportHandle
- PyMac_PRECHECK(MovieImportHandle);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&O&ll",
- CmpInstObj_Convert, &ci,
- ResObj_Convert, &dataH,
- MovieObj_Convert, &theMovie,
- TrackObj_Convert, &targetTrack,
- &atTime,
- &inFlags))
- return NULL;
- _rv = MovieImportHandle(ci,
- dataH,
- theMovie,
- targetTrack,
- &usedTrack,
- atTime,
- &addedDuration,
- inFlags,
- &outFlags);
- _res = Py_BuildValue("lO&ll",
- _rv,
- TrackObj_New, usedTrack,
- addedDuration,
- outFlags);
- return _res;
+ PyMac_PRECHECK(MovieImportHandle);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&O&ll",
+ CmpInstObj_Convert, &ci,
+ ResObj_Convert, &dataH,
+ MovieObj_Convert, &theMovie,
+ TrackObj_Convert, &targetTrack,
+ &atTime,
+ &inFlags))
+ return NULL;
+ _rv = MovieImportHandle(ci,
+ dataH,
+ theMovie,
+ targetTrack,
+ &usedTrack,
+ atTime,
+ &addedDuration,
+ inFlags,
+ &outFlags);
+ _res = Py_BuildValue("lO&ll",
+ _rv,
+ TrackObj_New, usedTrack,
+ addedDuration,
+ outFlags);
+ return _res;
}
static PyObject *Qt_MovieImportFile(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MovieImportComponent ci;
- FSSpec theFile;
- Movie theMovie;
- Track targetTrack;
- Track usedTrack;
- TimeValue atTime;
- TimeValue addedDuration;
- long inFlags;
- long outFlags;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MovieImportComponent ci;
+ FSSpec theFile;
+ Movie theMovie;
+ Track targetTrack;
+ Track usedTrack;
+ TimeValue atTime;
+ TimeValue addedDuration;
+ long inFlags;
+ long outFlags;
#ifndef MovieImportFile
- PyMac_PRECHECK(MovieImportFile);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&O&ll",
- CmpInstObj_Convert, &ci,
- PyMac_GetFSSpec, &theFile,
- MovieObj_Convert, &theMovie,
- TrackObj_Convert, &targetTrack,
- &atTime,
- &inFlags))
- return NULL;
- _rv = MovieImportFile(ci,
- &theFile,
- theMovie,
- targetTrack,
- &usedTrack,
- atTime,
- &addedDuration,
- inFlags,
- &outFlags);
- _res = Py_BuildValue("lO&ll",
- _rv,
- TrackObj_New, usedTrack,
- addedDuration,
- outFlags);
- return _res;
+ PyMac_PRECHECK(MovieImportFile);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&O&ll",
+ CmpInstObj_Convert, &ci,
+ PyMac_GetFSSpec, &theFile,
+ MovieObj_Convert, &theMovie,
+ TrackObj_Convert, &targetTrack,
+ &atTime,
+ &inFlags))
+ return NULL;
+ _rv = MovieImportFile(ci,
+ &theFile,
+ theMovie,
+ targetTrack,
+ &usedTrack,
+ atTime,
+ &addedDuration,
+ inFlags,
+ &outFlags);
+ _res = Py_BuildValue("lO&ll",
+ _rv,
+ TrackObj_New, usedTrack,
+ addedDuration,
+ outFlags);
+ return _res;
}
static PyObject *Qt_MovieImportSetSampleDuration(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MovieImportComponent ci;
- TimeValue duration;
- TimeScale scale;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MovieImportComponent ci;
+ TimeValue duration;
+ TimeScale scale;
#ifndef MovieImportSetSampleDuration
- PyMac_PRECHECK(MovieImportSetSampleDuration);
+ PyMac_PRECHECK(MovieImportSetSampleDuration);
#endif
- if (!PyArg_ParseTuple(_args, "O&ll",
- CmpInstObj_Convert, &ci,
- &duration,
- &scale))
- return NULL;
- _rv = MovieImportSetSampleDuration(ci,
- duration,
- scale);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&ll",
+ CmpInstObj_Convert, &ci,
+ &duration,
+ &scale))
+ return NULL;
+ _rv = MovieImportSetSampleDuration(ci,
+ duration,
+ scale);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MovieImportSetSampleDescription(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MovieImportComponent ci;
- SampleDescriptionHandle desc;
- OSType mediaType;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MovieImportComponent ci;
+ SampleDescriptionHandle desc;
+ OSType mediaType;
#ifndef MovieImportSetSampleDescription
- PyMac_PRECHECK(MovieImportSetSampleDescription);
+ PyMac_PRECHECK(MovieImportSetSampleDescription);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- CmpInstObj_Convert, &ci,
- ResObj_Convert, &desc,
- PyMac_GetOSType, &mediaType))
- return NULL;
- _rv = MovieImportSetSampleDescription(ci,
- desc,
- mediaType);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ CmpInstObj_Convert, &ci,
+ ResObj_Convert, &desc,
+ PyMac_GetOSType, &mediaType))
+ return NULL;
+ _rv = MovieImportSetSampleDescription(ci,
+ desc,
+ mediaType);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MovieImportSetMediaFile(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MovieImportComponent ci;
- AliasHandle alias;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MovieImportComponent ci;
+ AliasHandle alias;
#ifndef MovieImportSetMediaFile
- PyMac_PRECHECK(MovieImportSetMediaFile);
+ PyMac_PRECHECK(MovieImportSetMediaFile);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &ci,
- ResObj_Convert, &alias))
- return NULL;
- _rv = MovieImportSetMediaFile(ci,
- alias);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &ci,
+ ResObj_Convert, &alias))
+ return NULL;
+ _rv = MovieImportSetMediaFile(ci,
+ alias);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MovieImportSetDimensions(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MovieImportComponent ci;
- Fixed width;
- Fixed height;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MovieImportComponent ci;
+ Fixed width;
+ Fixed height;
#ifndef MovieImportSetDimensions
- PyMac_PRECHECK(MovieImportSetDimensions);
+ PyMac_PRECHECK(MovieImportSetDimensions);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- CmpInstObj_Convert, &ci,
- PyMac_GetFixed, &width,
- PyMac_GetFixed, &height))
- return NULL;
- _rv = MovieImportSetDimensions(ci,
- width,
- height);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ CmpInstObj_Convert, &ci,
+ PyMac_GetFixed, &width,
+ PyMac_GetFixed, &height))
+ return NULL;
+ _rv = MovieImportSetDimensions(ci,
+ width,
+ height);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MovieImportSetChunkSize(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MovieImportComponent ci;
- long chunkSize;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MovieImportComponent ci;
+ long chunkSize;
#ifndef MovieImportSetChunkSize
- PyMac_PRECHECK(MovieImportSetChunkSize);
+ PyMac_PRECHECK(MovieImportSetChunkSize);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &ci,
- &chunkSize))
- return NULL;
- _rv = MovieImportSetChunkSize(ci,
- chunkSize);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &ci,
+ &chunkSize))
+ return NULL;
+ _rv = MovieImportSetChunkSize(ci,
+ chunkSize);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MovieImportSetAuxiliaryData(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MovieImportComponent ci;
- Handle data;
- OSType handleType;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MovieImportComponent ci;
+ Handle data;
+ OSType handleType;
#ifndef MovieImportSetAuxiliaryData
- PyMac_PRECHECK(MovieImportSetAuxiliaryData);
+ PyMac_PRECHECK(MovieImportSetAuxiliaryData);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- CmpInstObj_Convert, &ci,
- ResObj_Convert, &data,
- PyMac_GetOSType, &handleType))
- return NULL;
- _rv = MovieImportSetAuxiliaryData(ci,
- data,
- handleType);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ CmpInstObj_Convert, &ci,
+ ResObj_Convert, &data,
+ PyMac_GetOSType, &handleType))
+ return NULL;
+ _rv = MovieImportSetAuxiliaryData(ci,
+ data,
+ handleType);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MovieImportSetFromScrap(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MovieImportComponent ci;
- Boolean fromScrap;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MovieImportComponent ci;
+ Boolean fromScrap;
#ifndef MovieImportSetFromScrap
- PyMac_PRECHECK(MovieImportSetFromScrap);
+ PyMac_PRECHECK(MovieImportSetFromScrap);
#endif
- if (!PyArg_ParseTuple(_args, "O&b",
- CmpInstObj_Convert, &ci,
- &fromScrap))
- return NULL;
- _rv = MovieImportSetFromScrap(ci,
- fromScrap);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&b",
+ CmpInstObj_Convert, &ci,
+ &fromScrap))
+ return NULL;
+ _rv = MovieImportSetFromScrap(ci,
+ fromScrap);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MovieImportDoUserDialog(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MovieImportComponent ci;
- FSSpec theFile;
- Handle theData;
- Boolean canceled;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MovieImportComponent ci;
+ FSSpec theFile;
+ Handle theData;
+ Boolean canceled;
#ifndef MovieImportDoUserDialog
- PyMac_PRECHECK(MovieImportDoUserDialog);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- CmpInstObj_Convert, &ci,
- PyMac_GetFSSpec, &theFile,
- ResObj_Convert, &theData))
- return NULL;
- _rv = MovieImportDoUserDialog(ci,
- &theFile,
- theData,
- &canceled);
- _res = Py_BuildValue("lb",
- _rv,
- canceled);
- return _res;
+ PyMac_PRECHECK(MovieImportDoUserDialog);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ CmpInstObj_Convert, &ci,
+ PyMac_GetFSSpec, &theFile,
+ ResObj_Convert, &theData))
+ return NULL;
+ _rv = MovieImportDoUserDialog(ci,
+ &theFile,
+ theData,
+ &canceled);
+ _res = Py_BuildValue("lb",
+ _rv,
+ canceled);
+ return _res;
}
static PyObject *Qt_MovieImportSetDuration(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MovieImportComponent ci;
- TimeValue duration;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MovieImportComponent ci;
+ TimeValue duration;
#ifndef MovieImportSetDuration
- PyMac_PRECHECK(MovieImportSetDuration);
+ PyMac_PRECHECK(MovieImportSetDuration);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &ci,
- &duration))
- return NULL;
- _rv = MovieImportSetDuration(ci,
- duration);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &ci,
+ &duration))
+ return NULL;
+ _rv = MovieImportSetDuration(ci,
+ duration);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MovieImportGetAuxiliaryDataType(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MovieImportComponent ci;
- OSType auxType;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MovieImportComponent ci;
+ OSType auxType;
#ifndef MovieImportGetAuxiliaryDataType
- PyMac_PRECHECK(MovieImportGetAuxiliaryDataType);
+ PyMac_PRECHECK(MovieImportGetAuxiliaryDataType);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = MovieImportGetAuxiliaryDataType(ci,
- &auxType);
- _res = Py_BuildValue("lO&",
- _rv,
- PyMac_BuildOSType, auxType);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = MovieImportGetAuxiliaryDataType(ci,
+ &auxType);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ PyMac_BuildOSType, auxType);
+ return _res;
}
static PyObject *Qt_MovieImportValidate(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MovieImportComponent ci;
- FSSpec theFile;
- Handle theData;
- Boolean valid;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MovieImportComponent ci;
+ FSSpec theFile;
+ Handle theData;
+ Boolean valid;
#ifndef MovieImportValidate
- PyMac_PRECHECK(MovieImportValidate);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- CmpInstObj_Convert, &ci,
- PyMac_GetFSSpec, &theFile,
- ResObj_Convert, &theData))
- return NULL;
- _rv = MovieImportValidate(ci,
- &theFile,
- theData,
- &valid);
- _res = Py_BuildValue("lb",
- _rv,
- valid);
- return _res;
+ PyMac_PRECHECK(MovieImportValidate);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ CmpInstObj_Convert, &ci,
+ PyMac_GetFSSpec, &theFile,
+ ResObj_Convert, &theData))
+ return NULL;
+ _rv = MovieImportValidate(ci,
+ &theFile,
+ theData,
+ &valid);
+ _res = Py_BuildValue("lb",
+ _rv,
+ valid);
+ return _res;
}
static PyObject *Qt_MovieImportGetFileType(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MovieImportComponent ci;
- OSType fileType;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MovieImportComponent ci;
+ OSType fileType;
#ifndef MovieImportGetFileType
- PyMac_PRECHECK(MovieImportGetFileType);
+ PyMac_PRECHECK(MovieImportGetFileType);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = MovieImportGetFileType(ci,
- &fileType);
- _res = Py_BuildValue("lO&",
- _rv,
- PyMac_BuildOSType, fileType);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = MovieImportGetFileType(ci,
+ &fileType);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ PyMac_BuildOSType, fileType);
+ return _res;
}
static PyObject *Qt_MovieImportDataRef(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MovieImportComponent ci;
- Handle dataRef;
- OSType dataRefType;
- Movie theMovie;
- Track targetTrack;
- Track usedTrack;
- TimeValue atTime;
- TimeValue addedDuration;
- long inFlags;
- long outFlags;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MovieImportComponent ci;
+ Handle dataRef;
+ OSType dataRefType;
+ Movie theMovie;
+ Track targetTrack;
+ Track usedTrack;
+ TimeValue atTime;
+ TimeValue addedDuration;
+ long inFlags;
+ long outFlags;
#ifndef MovieImportDataRef
- PyMac_PRECHECK(MovieImportDataRef);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&O&O&ll",
- CmpInstObj_Convert, &ci,
- ResObj_Convert, &dataRef,
- PyMac_GetOSType, &dataRefType,
- MovieObj_Convert, &theMovie,
- TrackObj_Convert, &targetTrack,
- &atTime,
- &inFlags))
- return NULL;
- _rv = MovieImportDataRef(ci,
- dataRef,
- dataRefType,
- theMovie,
- targetTrack,
- &usedTrack,
- atTime,
- &addedDuration,
- inFlags,
- &outFlags);
- _res = Py_BuildValue("lO&ll",
- _rv,
- TrackObj_New, usedTrack,
- addedDuration,
- outFlags);
- return _res;
+ PyMac_PRECHECK(MovieImportDataRef);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&O&O&ll",
+ CmpInstObj_Convert, &ci,
+ ResObj_Convert, &dataRef,
+ PyMac_GetOSType, &dataRefType,
+ MovieObj_Convert, &theMovie,
+ TrackObj_Convert, &targetTrack,
+ &atTime,
+ &inFlags))
+ return NULL;
+ _rv = MovieImportDataRef(ci,
+ dataRef,
+ dataRefType,
+ theMovie,
+ targetTrack,
+ &usedTrack,
+ atTime,
+ &addedDuration,
+ inFlags,
+ &outFlags);
+ _res = Py_BuildValue("lO&ll",
+ _rv,
+ TrackObj_New, usedTrack,
+ addedDuration,
+ outFlags);
+ return _res;
}
static PyObject *Qt_MovieImportGetSampleDescription(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MovieImportComponent ci;
- SampleDescriptionHandle desc;
- OSType mediaType;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MovieImportComponent ci;
+ SampleDescriptionHandle desc;
+ OSType mediaType;
#ifndef MovieImportGetSampleDescription
- PyMac_PRECHECK(MovieImportGetSampleDescription);
+ PyMac_PRECHECK(MovieImportGetSampleDescription);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = MovieImportGetSampleDescription(ci,
- &desc,
- &mediaType);
- _res = Py_BuildValue("lO&O&",
- _rv,
- ResObj_New, desc,
- PyMac_BuildOSType, mediaType);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = MovieImportGetSampleDescription(ci,
+ &desc,
+ &mediaType);
+ _res = Py_BuildValue("lO&O&",
+ _rv,
+ ResObj_New, desc,
+ PyMac_BuildOSType, mediaType);
+ return _res;
}
static PyObject *Qt_MovieImportSetOffsetAndLimit(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MovieImportComponent ci;
- unsigned long offset;
- unsigned long limit;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MovieImportComponent ci;
+ unsigned long offset;
+ unsigned long limit;
#ifndef MovieImportSetOffsetAndLimit
- PyMac_PRECHECK(MovieImportSetOffsetAndLimit);
+ PyMac_PRECHECK(MovieImportSetOffsetAndLimit);
#endif
- if (!PyArg_ParseTuple(_args, "O&ll",
- CmpInstObj_Convert, &ci,
- &offset,
- &limit))
- return NULL;
- _rv = MovieImportSetOffsetAndLimit(ci,
- offset,
- limit);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&ll",
+ CmpInstObj_Convert, &ci,
+ &offset,
+ &limit))
+ return NULL;
+ _rv = MovieImportSetOffsetAndLimit(ci,
+ offset,
+ limit);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MovieImportSetOffsetAndLimit64(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MovieImportComponent ci;
- wide offset;
- wide limit;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MovieImportComponent ci;
+ wide offset;
+ wide limit;
#ifndef MovieImportSetOffsetAndLimit64
- PyMac_PRECHECK(MovieImportSetOffsetAndLimit64);
+ PyMac_PRECHECK(MovieImportSetOffsetAndLimit64);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- CmpInstObj_Convert, &ci,
- PyMac_Getwide, &offset,
- PyMac_Getwide, &limit))
- return NULL;
- _rv = MovieImportSetOffsetAndLimit64(ci,
- &offset,
- &limit);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ CmpInstObj_Convert, &ci,
+ PyMac_Getwide, &offset,
+ PyMac_Getwide, &limit))
+ return NULL;
+ _rv = MovieImportSetOffsetAndLimit64(ci,
+ &offset,
+ &limit);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MovieImportIdle(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MovieImportComponent ci;
- long inFlags;
- long outFlags;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MovieImportComponent ci;
+ long inFlags;
+ long outFlags;
#ifndef MovieImportIdle
- PyMac_PRECHECK(MovieImportIdle);
+ PyMac_PRECHECK(MovieImportIdle);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &ci,
- &inFlags))
- return NULL;
- _rv = MovieImportIdle(ci,
- inFlags,
- &outFlags);
- _res = Py_BuildValue("ll",
- _rv,
- outFlags);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &ci,
+ &inFlags))
+ return NULL;
+ _rv = MovieImportIdle(ci,
+ inFlags,
+ &outFlags);
+ _res = Py_BuildValue("ll",
+ _rv,
+ outFlags);
+ return _res;
}
static PyObject *Qt_MovieImportValidateDataRef(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MovieImportComponent ci;
- Handle dataRef;
- OSType dataRefType;
- UInt8 valid;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MovieImportComponent ci;
+ Handle dataRef;
+ OSType dataRefType;
+ UInt8 valid;
#ifndef MovieImportValidateDataRef
- PyMac_PRECHECK(MovieImportValidateDataRef);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- CmpInstObj_Convert, &ci,
- ResObj_Convert, &dataRef,
- PyMac_GetOSType, &dataRefType))
- return NULL;
- _rv = MovieImportValidateDataRef(ci,
- dataRef,
- dataRefType,
- &valid);
- _res = Py_BuildValue("lb",
- _rv,
- valid);
- return _res;
+ PyMac_PRECHECK(MovieImportValidateDataRef);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ CmpInstObj_Convert, &ci,
+ ResObj_Convert, &dataRef,
+ PyMac_GetOSType, &dataRefType))
+ return NULL;
+ _rv = MovieImportValidateDataRef(ci,
+ dataRef,
+ dataRefType,
+ &valid);
+ _res = Py_BuildValue("lb",
+ _rv,
+ valid);
+ return _res;
}
static PyObject *Qt_MovieImportGetLoadState(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MovieImportComponent ci;
- long importerLoadState;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MovieImportComponent ci;
+ long importerLoadState;
#ifndef MovieImportGetLoadState
- PyMac_PRECHECK(MovieImportGetLoadState);
+ PyMac_PRECHECK(MovieImportGetLoadState);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = MovieImportGetLoadState(ci,
- &importerLoadState);
- _res = Py_BuildValue("ll",
- _rv,
- importerLoadState);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = MovieImportGetLoadState(ci,
+ &importerLoadState);
+ _res = Py_BuildValue("ll",
+ _rv,
+ importerLoadState);
+ return _res;
}
static PyObject *Qt_MovieImportGetMaxLoadedTime(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MovieImportComponent ci;
- TimeValue time;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MovieImportComponent ci;
+ TimeValue time;
#ifndef MovieImportGetMaxLoadedTime
- PyMac_PRECHECK(MovieImportGetMaxLoadedTime);
+ PyMac_PRECHECK(MovieImportGetMaxLoadedTime);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = MovieImportGetMaxLoadedTime(ci,
- &time);
- _res = Py_BuildValue("ll",
- _rv,
- time);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = MovieImportGetMaxLoadedTime(ci,
+ &time);
+ _res = Py_BuildValue("ll",
+ _rv,
+ time);
+ return _res;
}
static PyObject *Qt_MovieImportEstimateCompletionTime(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MovieImportComponent ci;
- TimeRecord time;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MovieImportComponent ci;
+ TimeRecord time;
#ifndef MovieImportEstimateCompletionTime
- PyMac_PRECHECK(MovieImportEstimateCompletionTime);
+ PyMac_PRECHECK(MovieImportEstimateCompletionTime);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = MovieImportEstimateCompletionTime(ci,
- &time);
- _res = Py_BuildValue("lO&",
- _rv,
- QtTimeRecord_New, &time);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = MovieImportEstimateCompletionTime(ci,
+ &time);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ QtTimeRecord_New, &time);
+ return _res;
}
static PyObject *Qt_MovieImportSetDontBlock(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MovieImportComponent ci;
- Boolean dontBlock;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MovieImportComponent ci;
+ Boolean dontBlock;
#ifndef MovieImportSetDontBlock
- PyMac_PRECHECK(MovieImportSetDontBlock);
+ PyMac_PRECHECK(MovieImportSetDontBlock);
#endif
- if (!PyArg_ParseTuple(_args, "O&b",
- CmpInstObj_Convert, &ci,
- &dontBlock))
- return NULL;
- _rv = MovieImportSetDontBlock(ci,
- dontBlock);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&b",
+ CmpInstObj_Convert, &ci,
+ &dontBlock))
+ return NULL;
+ _rv = MovieImportSetDontBlock(ci,
+ dontBlock);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MovieImportGetDontBlock(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MovieImportComponent ci;
- Boolean willBlock;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MovieImportComponent ci;
+ Boolean willBlock;
#ifndef MovieImportGetDontBlock
- PyMac_PRECHECK(MovieImportGetDontBlock);
+ PyMac_PRECHECK(MovieImportGetDontBlock);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = MovieImportGetDontBlock(ci,
- &willBlock);
- _res = Py_BuildValue("lb",
- _rv,
- willBlock);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = MovieImportGetDontBlock(ci,
+ &willBlock);
+ _res = Py_BuildValue("lb",
+ _rv,
+ willBlock);
+ return _res;
}
static PyObject *Qt_MovieImportSetIdleManager(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MovieImportComponent ci;
- IdleManager im;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MovieImportComponent ci;
+ IdleManager im;
#ifndef MovieImportSetIdleManager
- PyMac_PRECHECK(MovieImportSetIdleManager);
+ PyMac_PRECHECK(MovieImportSetIdleManager);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &ci,
- IdleManagerObj_Convert, &im))
- return NULL;
- _rv = MovieImportSetIdleManager(ci,
- im);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &ci,
+ IdleManagerObj_Convert, &im))
+ return NULL;
+ _rv = MovieImportSetIdleManager(ci,
+ im);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MovieImportSetNewMovieFlags(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MovieImportComponent ci;
- long newMovieFlags;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MovieImportComponent ci;
+ long newMovieFlags;
#ifndef MovieImportSetNewMovieFlags
- PyMac_PRECHECK(MovieImportSetNewMovieFlags);
+ PyMac_PRECHECK(MovieImportSetNewMovieFlags);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &ci,
- &newMovieFlags))
- return NULL;
- _rv = MovieImportSetNewMovieFlags(ci,
- newMovieFlags);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &ci,
+ &newMovieFlags))
+ return NULL;
+ _rv = MovieImportSetNewMovieFlags(ci,
+ newMovieFlags);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MovieImportGetDestinationMediaType(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MovieImportComponent ci;
- OSType mediaType;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MovieImportComponent ci;
+ OSType mediaType;
#ifndef MovieImportGetDestinationMediaType
- PyMac_PRECHECK(MovieImportGetDestinationMediaType);
+ PyMac_PRECHECK(MovieImportGetDestinationMediaType);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = MovieImportGetDestinationMediaType(ci,
- &mediaType);
- _res = Py_BuildValue("lO&",
- _rv,
- PyMac_BuildOSType, mediaType);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = MovieImportGetDestinationMediaType(ci,
+ &mediaType);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ PyMac_BuildOSType, mediaType);
+ return _res;
}
static PyObject *Qt_MovieExportToHandle(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MovieExportComponent ci;
- Handle dataH;
- Movie theMovie;
- Track onlyThisTrack;
- TimeValue startTime;
- TimeValue duration;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MovieExportComponent ci;
+ Handle dataH;
+ Movie theMovie;
+ Track onlyThisTrack;
+ TimeValue startTime;
+ TimeValue duration;
#ifndef MovieExportToHandle
- PyMac_PRECHECK(MovieExportToHandle);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&O&ll",
- CmpInstObj_Convert, &ci,
- ResObj_Convert, &dataH,
- MovieObj_Convert, &theMovie,
- TrackObj_Convert, &onlyThisTrack,
- &startTime,
- &duration))
- return NULL;
- _rv = MovieExportToHandle(ci,
- dataH,
- theMovie,
- onlyThisTrack,
- startTime,
- duration);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyMac_PRECHECK(MovieExportToHandle);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&O&ll",
+ CmpInstObj_Convert, &ci,
+ ResObj_Convert, &dataH,
+ MovieObj_Convert, &theMovie,
+ TrackObj_Convert, &onlyThisTrack,
+ &startTime,
+ &duration))
+ return NULL;
+ _rv = MovieExportToHandle(ci,
+ dataH,
+ theMovie,
+ onlyThisTrack,
+ startTime,
+ duration);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MovieExportToFile(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MovieExportComponent ci;
- FSSpec theFile;
- Movie theMovie;
- Track onlyThisTrack;
- TimeValue startTime;
- TimeValue duration;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MovieExportComponent ci;
+ FSSpec theFile;
+ Movie theMovie;
+ Track onlyThisTrack;
+ TimeValue startTime;
+ TimeValue duration;
#ifndef MovieExportToFile
- PyMac_PRECHECK(MovieExportToFile);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&O&ll",
- CmpInstObj_Convert, &ci,
- PyMac_GetFSSpec, &theFile,
- MovieObj_Convert, &theMovie,
- TrackObj_Convert, &onlyThisTrack,
- &startTime,
- &duration))
- return NULL;
- _rv = MovieExportToFile(ci,
- &theFile,
- theMovie,
- onlyThisTrack,
- startTime,
- duration);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyMac_PRECHECK(MovieExportToFile);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&O&ll",
+ CmpInstObj_Convert, &ci,
+ PyMac_GetFSSpec, &theFile,
+ MovieObj_Convert, &theMovie,
+ TrackObj_Convert, &onlyThisTrack,
+ &startTime,
+ &duration))
+ return NULL;
+ _rv = MovieExportToFile(ci,
+ &theFile,
+ theMovie,
+ onlyThisTrack,
+ startTime,
+ duration);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MovieExportGetAuxiliaryData(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MovieExportComponent ci;
- Handle dataH;
- OSType handleType;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MovieExportComponent ci;
+ Handle dataH;
+ OSType handleType;
#ifndef MovieExportGetAuxiliaryData
- PyMac_PRECHECK(MovieExportGetAuxiliaryData);
+ PyMac_PRECHECK(MovieExportGetAuxiliaryData);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &ci,
- ResObj_Convert, &dataH))
- return NULL;
- _rv = MovieExportGetAuxiliaryData(ci,
- dataH,
- &handleType);
- _res = Py_BuildValue("lO&",
- _rv,
- PyMac_BuildOSType, handleType);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &ci,
+ ResObj_Convert, &dataH))
+ return NULL;
+ _rv = MovieExportGetAuxiliaryData(ci,
+ dataH,
+ &handleType);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ PyMac_BuildOSType, handleType);
+ return _res;
}
static PyObject *Qt_MovieExportSetSampleDescription(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MovieExportComponent ci;
- SampleDescriptionHandle desc;
- OSType mediaType;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MovieExportComponent ci;
+ SampleDescriptionHandle desc;
+ OSType mediaType;
#ifndef MovieExportSetSampleDescription
- PyMac_PRECHECK(MovieExportSetSampleDescription);
+ PyMac_PRECHECK(MovieExportSetSampleDescription);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- CmpInstObj_Convert, &ci,
- ResObj_Convert, &desc,
- PyMac_GetOSType, &mediaType))
- return NULL;
- _rv = MovieExportSetSampleDescription(ci,
- desc,
- mediaType);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ CmpInstObj_Convert, &ci,
+ ResObj_Convert, &desc,
+ PyMac_GetOSType, &mediaType))
+ return NULL;
+ _rv = MovieExportSetSampleDescription(ci,
+ desc,
+ mediaType);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MovieExportDoUserDialog(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MovieExportComponent ci;
- Movie theMovie;
- Track onlyThisTrack;
- TimeValue startTime;
- TimeValue duration;
- Boolean canceled;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MovieExportComponent ci;
+ Movie theMovie;
+ Track onlyThisTrack;
+ TimeValue startTime;
+ TimeValue duration;
+ Boolean canceled;
#ifndef MovieExportDoUserDialog
- PyMac_PRECHECK(MovieExportDoUserDialog);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&ll",
- CmpInstObj_Convert, &ci,
- MovieObj_Convert, &theMovie,
- TrackObj_Convert, &onlyThisTrack,
- &startTime,
- &duration))
- return NULL;
- _rv = MovieExportDoUserDialog(ci,
- theMovie,
- onlyThisTrack,
- startTime,
- duration,
- &canceled);
- _res = Py_BuildValue("lb",
- _rv,
- canceled);
- return _res;
+ PyMac_PRECHECK(MovieExportDoUserDialog);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&ll",
+ CmpInstObj_Convert, &ci,
+ MovieObj_Convert, &theMovie,
+ TrackObj_Convert, &onlyThisTrack,
+ &startTime,
+ &duration))
+ return NULL;
+ _rv = MovieExportDoUserDialog(ci,
+ theMovie,
+ onlyThisTrack,
+ startTime,
+ duration,
+ &canceled);
+ _res = Py_BuildValue("lb",
+ _rv,
+ canceled);
+ return _res;
}
static PyObject *Qt_MovieExportGetCreatorType(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MovieExportComponent ci;
- OSType creator;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MovieExportComponent ci;
+ OSType creator;
#ifndef MovieExportGetCreatorType
- PyMac_PRECHECK(MovieExportGetCreatorType);
+ PyMac_PRECHECK(MovieExportGetCreatorType);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = MovieExportGetCreatorType(ci,
- &creator);
- _res = Py_BuildValue("lO&",
- _rv,
- PyMac_BuildOSType, creator);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = MovieExportGetCreatorType(ci,
+ &creator);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ PyMac_BuildOSType, creator);
+ return _res;
}
static PyObject *Qt_MovieExportToDataRef(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MovieExportComponent ci;
- Handle dataRef;
- OSType dataRefType;
- Movie theMovie;
- Track onlyThisTrack;
- TimeValue startTime;
- TimeValue duration;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MovieExportComponent ci;
+ Handle dataRef;
+ OSType dataRefType;
+ Movie theMovie;
+ Track onlyThisTrack;
+ TimeValue startTime;
+ TimeValue duration;
#ifndef MovieExportToDataRef
- PyMac_PRECHECK(MovieExportToDataRef);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&O&O&ll",
- CmpInstObj_Convert, &ci,
- ResObj_Convert, &dataRef,
- PyMac_GetOSType, &dataRefType,
- MovieObj_Convert, &theMovie,
- TrackObj_Convert, &onlyThisTrack,
- &startTime,
- &duration))
- return NULL;
- _rv = MovieExportToDataRef(ci,
- dataRef,
- dataRefType,
- theMovie,
- onlyThisTrack,
- startTime,
- duration);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyMac_PRECHECK(MovieExportToDataRef);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&O&O&ll",
+ CmpInstObj_Convert, &ci,
+ ResObj_Convert, &dataRef,
+ PyMac_GetOSType, &dataRefType,
+ MovieObj_Convert, &theMovie,
+ TrackObj_Convert, &onlyThisTrack,
+ &startTime,
+ &duration))
+ return NULL;
+ _rv = MovieExportToDataRef(ci,
+ dataRef,
+ dataRefType,
+ theMovie,
+ onlyThisTrack,
+ startTime,
+ duration);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MovieExportFromProceduresToDataRef(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MovieExportComponent ci;
- Handle dataRef;
- OSType dataRefType;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MovieExportComponent ci;
+ Handle dataRef;
+ OSType dataRefType;
#ifndef MovieExportFromProceduresToDataRef
- PyMac_PRECHECK(MovieExportFromProceduresToDataRef);
+ PyMac_PRECHECK(MovieExportFromProceduresToDataRef);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- CmpInstObj_Convert, &ci,
- ResObj_Convert, &dataRef,
- PyMac_GetOSType, &dataRefType))
- return NULL;
- _rv = MovieExportFromProceduresToDataRef(ci,
- dataRef,
- dataRefType);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ CmpInstObj_Convert, &ci,
+ ResObj_Convert, &dataRef,
+ PyMac_GetOSType, &dataRefType))
+ return NULL;
+ _rv = MovieExportFromProceduresToDataRef(ci,
+ dataRef,
+ dataRefType);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MovieExportValidate(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MovieExportComponent ci;
- Movie theMovie;
- Track onlyThisTrack;
- Boolean valid;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MovieExportComponent ci;
+ Movie theMovie;
+ Track onlyThisTrack;
+ Boolean valid;
#ifndef MovieExportValidate
- PyMac_PRECHECK(MovieExportValidate);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- CmpInstObj_Convert, &ci,
- MovieObj_Convert, &theMovie,
- TrackObj_Convert, &onlyThisTrack))
- return NULL;
- _rv = MovieExportValidate(ci,
- theMovie,
- onlyThisTrack,
- &valid);
- _res = Py_BuildValue("lb",
- _rv,
- valid);
- return _res;
+ PyMac_PRECHECK(MovieExportValidate);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ CmpInstObj_Convert, &ci,
+ MovieObj_Convert, &theMovie,
+ TrackObj_Convert, &onlyThisTrack))
+ return NULL;
+ _rv = MovieExportValidate(ci,
+ theMovie,
+ onlyThisTrack,
+ &valid);
+ _res = Py_BuildValue("lb",
+ _rv,
+ valid);
+ return _res;
}
static PyObject *Qt_MovieExportGetFileNameExtension(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MovieExportComponent ci;
- OSType extension;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MovieExportComponent ci;
+ OSType extension;
#ifndef MovieExportGetFileNameExtension
- PyMac_PRECHECK(MovieExportGetFileNameExtension);
+ PyMac_PRECHECK(MovieExportGetFileNameExtension);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = MovieExportGetFileNameExtension(ci,
- &extension);
- _res = Py_BuildValue("lO&",
- _rv,
- PyMac_BuildOSType, extension);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = MovieExportGetFileNameExtension(ci,
+ &extension);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ PyMac_BuildOSType, extension);
+ return _res;
}
static PyObject *Qt_MovieExportGetShortFileTypeString(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MovieExportComponent ci;
- Str255 typeString;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MovieExportComponent ci;
+ Str255 typeString;
#ifndef MovieExportGetShortFileTypeString
- PyMac_PRECHECK(MovieExportGetShortFileTypeString);
+ PyMac_PRECHECK(MovieExportGetShortFileTypeString);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &ci,
- PyMac_GetStr255, typeString))
- return NULL;
- _rv = MovieExportGetShortFileTypeString(ci,
- typeString);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &ci,
+ PyMac_GetStr255, typeString))
+ return NULL;
+ _rv = MovieExportGetShortFileTypeString(ci,
+ typeString);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MovieExportGetSourceMediaType(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MovieExportComponent ci;
- OSType mediaType;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MovieExportComponent ci;
+ OSType mediaType;
#ifndef MovieExportGetSourceMediaType
- PyMac_PRECHECK(MovieExportGetSourceMediaType);
+ PyMac_PRECHECK(MovieExportGetSourceMediaType);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = MovieExportGetSourceMediaType(ci,
- &mediaType);
- _res = Py_BuildValue("lO&",
- _rv,
- PyMac_BuildOSType, mediaType);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = MovieExportGetSourceMediaType(ci,
+ &mediaType);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ PyMac_BuildOSType, mediaType);
+ return _res;
}
static PyObject *Qt_TextExportGetTimeFraction(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- TextExportComponent ci;
- long movieTimeFraction;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ TextExportComponent ci;
+ long movieTimeFraction;
#ifndef TextExportGetTimeFraction
- PyMac_PRECHECK(TextExportGetTimeFraction);
+ PyMac_PRECHECK(TextExportGetTimeFraction);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = TextExportGetTimeFraction(ci,
- &movieTimeFraction);
- _res = Py_BuildValue("ll",
- _rv,
- movieTimeFraction);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = TextExportGetTimeFraction(ci,
+ &movieTimeFraction);
+ _res = Py_BuildValue("ll",
+ _rv,
+ movieTimeFraction);
+ return _res;
}
static PyObject *Qt_TextExportSetTimeFraction(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- TextExportComponent ci;
- long movieTimeFraction;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ TextExportComponent ci;
+ long movieTimeFraction;
#ifndef TextExportSetTimeFraction
- PyMac_PRECHECK(TextExportSetTimeFraction);
+ PyMac_PRECHECK(TextExportSetTimeFraction);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &ci,
- &movieTimeFraction))
- return NULL;
- _rv = TextExportSetTimeFraction(ci,
- movieTimeFraction);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &ci,
+ &movieTimeFraction))
+ return NULL;
+ _rv = TextExportSetTimeFraction(ci,
+ movieTimeFraction);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_TextExportGetSettings(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- TextExportComponent ci;
- long setting;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ TextExportComponent ci;
+ long setting;
#ifndef TextExportGetSettings
- PyMac_PRECHECK(TextExportGetSettings);
+ PyMac_PRECHECK(TextExportGetSettings);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = TextExportGetSettings(ci,
- &setting);
- _res = Py_BuildValue("ll",
- _rv,
- setting);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = TextExportGetSettings(ci,
+ &setting);
+ _res = Py_BuildValue("ll",
+ _rv,
+ setting);
+ return _res;
}
static PyObject *Qt_TextExportSetSettings(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- TextExportComponent ci;
- long setting;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ TextExportComponent ci;
+ long setting;
#ifndef TextExportSetSettings
- PyMac_PRECHECK(TextExportSetSettings);
+ PyMac_PRECHECK(TextExportSetSettings);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &ci,
- &setting))
- return NULL;
- _rv = TextExportSetSettings(ci,
- setting);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &ci,
+ &setting))
+ return NULL;
+ _rv = TextExportSetSettings(ci,
+ setting);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MIDIImportGetSettings(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- TextExportComponent ci;
- long setting;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ TextExportComponent ci;
+ long setting;
#ifndef MIDIImportGetSettings
- PyMac_PRECHECK(MIDIImportGetSettings);
+ PyMac_PRECHECK(MIDIImportGetSettings);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = MIDIImportGetSettings(ci,
- &setting);
- _res = Py_BuildValue("ll",
- _rv,
- setting);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = MIDIImportGetSettings(ci,
+ &setting);
+ _res = Py_BuildValue("ll",
+ _rv,
+ setting);
+ return _res;
}
static PyObject *Qt_MIDIImportSetSettings(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- TextExportComponent ci;
- long setting;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ TextExportComponent ci;
+ long setting;
#ifndef MIDIImportSetSettings
- PyMac_PRECHECK(MIDIImportSetSettings);
+ PyMac_PRECHECK(MIDIImportSetSettings);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &ci,
- &setting))
- return NULL;
- _rv = MIDIImportSetSettings(ci,
- setting);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &ci,
+ &setting))
+ return NULL;
+ _rv = MIDIImportSetSettings(ci,
+ setting);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_GraphicsImageImportSetSequenceEnabled(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicImageMovieImportComponent ci;
- Boolean enable;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicImageMovieImportComponent ci;
+ Boolean enable;
#ifndef GraphicsImageImportSetSequenceEnabled
- PyMac_PRECHECK(GraphicsImageImportSetSequenceEnabled);
+ PyMac_PRECHECK(GraphicsImageImportSetSequenceEnabled);
#endif
- if (!PyArg_ParseTuple(_args, "O&b",
- CmpInstObj_Convert, &ci,
- &enable))
- return NULL;
- _rv = GraphicsImageImportSetSequenceEnabled(ci,
- enable);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&b",
+ CmpInstObj_Convert, &ci,
+ &enable))
+ return NULL;
+ _rv = GraphicsImageImportSetSequenceEnabled(ci,
+ enable);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_GraphicsImageImportGetSequenceEnabled(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- GraphicImageMovieImportComponent ci;
- Boolean enable;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ GraphicImageMovieImportComponent ci;
+ Boolean enable;
#ifndef GraphicsImageImportGetSequenceEnabled
- PyMac_PRECHECK(GraphicsImageImportGetSequenceEnabled);
+ PyMac_PRECHECK(GraphicsImageImportGetSequenceEnabled);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = GraphicsImageImportGetSequenceEnabled(ci,
- &enable);
- _res = Py_BuildValue("lb",
- _rv,
- enable);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = GraphicsImageImportGetSequenceEnabled(ci,
+ &enable);
+ _res = Py_BuildValue("lb",
+ _rv,
+ enable);
+ return _res;
}
static PyObject *Qt_PreviewShowData(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- pnotComponent p;
- OSType dataType;
- Handle data;
- Rect inHere;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ pnotComponent p;
+ OSType dataType;
+ Handle data;
+ Rect inHere;
#ifndef PreviewShowData
- PyMac_PRECHECK(PreviewShowData);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&O&",
- CmpInstObj_Convert, &p,
- PyMac_GetOSType, &dataType,
- ResObj_Convert, &data,
- PyMac_GetRect, &inHere))
- return NULL;
- _rv = PreviewShowData(p,
- dataType,
- data,
- &inHere);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyMac_PRECHECK(PreviewShowData);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&O&",
+ CmpInstObj_Convert, &p,
+ PyMac_GetOSType, &dataType,
+ ResObj_Convert, &data,
+ PyMac_GetRect, &inHere))
+ return NULL;
+ _rv = PreviewShowData(p,
+ dataType,
+ data,
+ &inHere);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_PreviewMakePreviewReference(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- pnotComponent p;
- OSType previewType;
- short resID;
- FSSpec sourceFile;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ pnotComponent p;
+ OSType previewType;
+ short resID;
+ FSSpec sourceFile;
#ifndef PreviewMakePreviewReference
- PyMac_PRECHECK(PreviewMakePreviewReference);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &p,
- PyMac_GetFSSpec, &sourceFile))
- return NULL;
- _rv = PreviewMakePreviewReference(p,
- &previewType,
- &resID,
- &sourceFile);
- _res = Py_BuildValue("lO&h",
- _rv,
- PyMac_BuildOSType, previewType,
- resID);
- return _res;
+ PyMac_PRECHECK(PreviewMakePreviewReference);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &p,
+ PyMac_GetFSSpec, &sourceFile))
+ return NULL;
+ _rv = PreviewMakePreviewReference(p,
+ &previewType,
+ &resID,
+ &sourceFile);
+ _res = Py_BuildValue("lO&h",
+ _rv,
+ PyMac_BuildOSType, previewType,
+ resID);
+ return _res;
}
static PyObject *Qt_PreviewEvent(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- pnotComponent p;
- EventRecord e;
- Boolean handledEvent;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ pnotComponent p;
+ EventRecord e;
+ Boolean handledEvent;
#ifndef PreviewEvent
- PyMac_PRECHECK(PreviewEvent);
+ PyMac_PRECHECK(PreviewEvent);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &p))
- return NULL;
- _rv = PreviewEvent(p,
- &e,
- &handledEvent);
- _res = Py_BuildValue("lO&b",
- _rv,
- PyMac_BuildEventRecord, &e,
- handledEvent);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &p))
+ return NULL;
+ _rv = PreviewEvent(p,
+ &e,
+ &handledEvent);
+ _res = Py_BuildValue("lO&b",
+ _rv,
+ PyMac_BuildEventRecord, &e,
+ handledEvent);
+ return _res;
}
static PyObject *Qt_DataCodecDecompress(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataCodecComponent dc;
- void * srcData;
- UInt32 srcSize;
- void * dstData;
- UInt32 dstBufferSize;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataCodecComponent dc;
+ void * srcData;
+ UInt32 srcSize;
+ void * dstData;
+ UInt32 dstBufferSize;
#ifndef DataCodecDecompress
- PyMac_PRECHECK(DataCodecDecompress);
-#endif
- if (!PyArg_ParseTuple(_args, "O&slsl",
- CmpInstObj_Convert, &dc,
- &srcData,
- &srcSize,
- &dstData,
- &dstBufferSize))
- return NULL;
- _rv = DataCodecDecompress(dc,
- srcData,
- srcSize,
- dstData,
- dstBufferSize);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyMac_PRECHECK(DataCodecDecompress);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&slsl",
+ CmpInstObj_Convert, &dc,
+ &srcData,
+ &srcSize,
+ &dstData,
+ &dstBufferSize))
+ return NULL;
+ _rv = DataCodecDecompress(dc,
+ srcData,
+ srcSize,
+ dstData,
+ dstBufferSize);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_DataCodecGetCompressBufferSize(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataCodecComponent dc;
- UInt32 srcSize;
- UInt32 dstSize;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataCodecComponent dc;
+ UInt32 srcSize;
+ UInt32 dstSize;
#ifndef DataCodecGetCompressBufferSize
- PyMac_PRECHECK(DataCodecGetCompressBufferSize);
+ PyMac_PRECHECK(DataCodecGetCompressBufferSize);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &dc,
- &srcSize))
- return NULL;
- _rv = DataCodecGetCompressBufferSize(dc,
- srcSize,
- &dstSize);
- _res = Py_BuildValue("ll",
- _rv,
- dstSize);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &dc,
+ &srcSize))
+ return NULL;
+ _rv = DataCodecGetCompressBufferSize(dc,
+ srcSize,
+ &dstSize);
+ _res = Py_BuildValue("ll",
+ _rv,
+ dstSize);
+ return _res;
}
static PyObject *Qt_DataCodecCompress(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataCodecComponent dc;
- void * srcData;
- UInt32 srcSize;
- void * dstData;
- UInt32 dstBufferSize;
- UInt32 actualDstSize;
- UInt32 decompressSlop;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataCodecComponent dc;
+ void * srcData;
+ UInt32 srcSize;
+ void * dstData;
+ UInt32 dstBufferSize;
+ UInt32 actualDstSize;
+ UInt32 decompressSlop;
#ifndef DataCodecCompress
- PyMac_PRECHECK(DataCodecCompress);
-#endif
- if (!PyArg_ParseTuple(_args, "O&slsl",
- CmpInstObj_Convert, &dc,
- &srcData,
- &srcSize,
- &dstData,
- &dstBufferSize))
- return NULL;
- _rv = DataCodecCompress(dc,
- srcData,
- srcSize,
- dstData,
- dstBufferSize,
- &actualDstSize,
- &decompressSlop);
- _res = Py_BuildValue("lll",
- _rv,
- actualDstSize,
- decompressSlop);
- return _res;
+ PyMac_PRECHECK(DataCodecCompress);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&slsl",
+ CmpInstObj_Convert, &dc,
+ &srcData,
+ &srcSize,
+ &dstData,
+ &dstBufferSize))
+ return NULL;
+ _rv = DataCodecCompress(dc,
+ srcData,
+ srcSize,
+ dstData,
+ dstBufferSize,
+ &actualDstSize,
+ &decompressSlop);
+ _res = Py_BuildValue("lll",
+ _rv,
+ actualDstSize,
+ decompressSlop);
+ return _res;
}
static PyObject *Qt_DataCodecBeginInterruptSafe(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataCodecComponent dc;
- unsigned long maxSrcSize;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataCodecComponent dc;
+ unsigned long maxSrcSize;
#ifndef DataCodecBeginInterruptSafe
- PyMac_PRECHECK(DataCodecBeginInterruptSafe);
+ PyMac_PRECHECK(DataCodecBeginInterruptSafe);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &dc,
- &maxSrcSize))
- return NULL;
- _rv = DataCodecBeginInterruptSafe(dc,
- maxSrcSize);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &dc,
+ &maxSrcSize))
+ return NULL;
+ _rv = DataCodecBeginInterruptSafe(dc,
+ maxSrcSize);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_DataCodecEndInterruptSafe(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataCodecComponent dc;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataCodecComponent dc;
#ifndef DataCodecEndInterruptSafe
- PyMac_PRECHECK(DataCodecEndInterruptSafe);
+ PyMac_PRECHECK(DataCodecEndInterruptSafe);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &dc))
- return NULL;
- _rv = DataCodecEndInterruptSafe(dc);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &dc))
+ return NULL;
+ _rv = DataCodecEndInterruptSafe(dc);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_DataHGetData(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataHandler dh;
- Handle h;
- long hOffset;
- long offset;
- long size;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataHandler dh;
+ Handle h;
+ long hOffset;
+ long offset;
+ long size;
#ifndef DataHGetData
- PyMac_PRECHECK(DataHGetData);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&lll",
- CmpInstObj_Convert, &dh,
- ResObj_Convert, &h,
- &hOffset,
- &offset,
- &size))
- return NULL;
- _rv = DataHGetData(dh,
- h,
- hOffset,
- offset,
- size);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyMac_PRECHECK(DataHGetData);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&lll",
+ CmpInstObj_Convert, &dh,
+ ResObj_Convert, &h,
+ &hOffset,
+ &offset,
+ &size))
+ return NULL;
+ _rv = DataHGetData(dh,
+ h,
+ hOffset,
+ offset,
+ size);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_DataHPutData(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataHandler dh;
- Handle h;
- long hOffset;
- long offset;
- long size;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataHandler dh;
+ Handle h;
+ long hOffset;
+ long offset;
+ long size;
#ifndef DataHPutData
- PyMac_PRECHECK(DataHPutData);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&ll",
- CmpInstObj_Convert, &dh,
- ResObj_Convert, &h,
- &hOffset,
- &size))
- return NULL;
- _rv = DataHPutData(dh,
- h,
- hOffset,
- &offset,
- size);
- _res = Py_BuildValue("ll",
- _rv,
- offset);
- return _res;
+ PyMac_PRECHECK(DataHPutData);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&ll",
+ CmpInstObj_Convert, &dh,
+ ResObj_Convert, &h,
+ &hOffset,
+ &size))
+ return NULL;
+ _rv = DataHPutData(dh,
+ h,
+ hOffset,
+ &offset,
+ size);
+ _res = Py_BuildValue("ll",
+ _rv,
+ offset);
+ return _res;
}
static PyObject *Qt_DataHFlushData(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataHandler dh;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataHandler dh;
#ifndef DataHFlushData
- PyMac_PRECHECK(DataHFlushData);
+ PyMac_PRECHECK(DataHFlushData);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &dh))
- return NULL;
- _rv = DataHFlushData(dh);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &dh))
+ return NULL;
+ _rv = DataHFlushData(dh);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_DataHOpenForWrite(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataHandler dh;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataHandler dh;
#ifndef DataHOpenForWrite
- PyMac_PRECHECK(DataHOpenForWrite);
+ PyMac_PRECHECK(DataHOpenForWrite);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &dh))
- return NULL;
- _rv = DataHOpenForWrite(dh);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &dh))
+ return NULL;
+ _rv = DataHOpenForWrite(dh);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_DataHCloseForWrite(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataHandler dh;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataHandler dh;
#ifndef DataHCloseForWrite
- PyMac_PRECHECK(DataHCloseForWrite);
+ PyMac_PRECHECK(DataHCloseForWrite);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &dh))
- return NULL;
- _rv = DataHCloseForWrite(dh);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &dh))
+ return NULL;
+ _rv = DataHCloseForWrite(dh);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_DataHOpenForRead(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataHandler dh;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataHandler dh;
#ifndef DataHOpenForRead
- PyMac_PRECHECK(DataHOpenForRead);
+ PyMac_PRECHECK(DataHOpenForRead);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &dh))
- return NULL;
- _rv = DataHOpenForRead(dh);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &dh))
+ return NULL;
+ _rv = DataHOpenForRead(dh);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_DataHCloseForRead(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataHandler dh;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataHandler dh;
#ifndef DataHCloseForRead
- PyMac_PRECHECK(DataHCloseForRead);
+ PyMac_PRECHECK(DataHCloseForRead);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &dh))
- return NULL;
- _rv = DataHCloseForRead(dh);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &dh))
+ return NULL;
+ _rv = DataHCloseForRead(dh);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_DataHSetDataRef(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataHandler dh;
- Handle dataRef;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataHandler dh;
+ Handle dataRef;
#ifndef DataHSetDataRef
- PyMac_PRECHECK(DataHSetDataRef);
+ PyMac_PRECHECK(DataHSetDataRef);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &dh,
- ResObj_Convert, &dataRef))
- return NULL;
- _rv = DataHSetDataRef(dh,
- dataRef);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &dh,
+ ResObj_Convert, &dataRef))
+ return NULL;
+ _rv = DataHSetDataRef(dh,
+ dataRef);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_DataHGetDataRef(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataHandler dh;
- Handle dataRef;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataHandler dh;
+ Handle dataRef;
#ifndef DataHGetDataRef
- PyMac_PRECHECK(DataHGetDataRef);
+ PyMac_PRECHECK(DataHGetDataRef);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &dh))
- return NULL;
- _rv = DataHGetDataRef(dh,
- &dataRef);
- _res = Py_BuildValue("lO&",
- _rv,
- ResObj_New, dataRef);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &dh))
+ return NULL;
+ _rv = DataHGetDataRef(dh,
+ &dataRef);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ ResObj_New, dataRef);
+ return _res;
}
static PyObject *Qt_DataHCompareDataRef(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataHandler dh;
- Handle dataRef;
- Boolean equal;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataHandler dh;
+ Handle dataRef;
+ Boolean equal;
#ifndef DataHCompareDataRef
- PyMac_PRECHECK(DataHCompareDataRef);
+ PyMac_PRECHECK(DataHCompareDataRef);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &dh,
- ResObj_Convert, &dataRef))
- return NULL;
- _rv = DataHCompareDataRef(dh,
- dataRef,
- &equal);
- _res = Py_BuildValue("lb",
- _rv,
- equal);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &dh,
+ ResObj_Convert, &dataRef))
+ return NULL;
+ _rv = DataHCompareDataRef(dh,
+ dataRef,
+ &equal);
+ _res = Py_BuildValue("lb",
+ _rv,
+ equal);
+ return _res;
}
static PyObject *Qt_DataHTask(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataHandler dh;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataHandler dh;
#ifndef DataHTask
- PyMac_PRECHECK(DataHTask);
+ PyMac_PRECHECK(DataHTask);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &dh))
- return NULL;
- _rv = DataHTask(dh);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &dh))
+ return NULL;
+ _rv = DataHTask(dh);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_DataHFinishData(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataHandler dh;
- Ptr PlaceToPutDataPtr;
- Boolean Cancel;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataHandler dh;
+ Ptr PlaceToPutDataPtr;
+ Boolean Cancel;
#ifndef DataHFinishData
- PyMac_PRECHECK(DataHFinishData);
+ PyMac_PRECHECK(DataHFinishData);
#endif
- if (!PyArg_ParseTuple(_args, "O&sb",
- CmpInstObj_Convert, &dh,
- &PlaceToPutDataPtr,
- &Cancel))
- return NULL;
- _rv = DataHFinishData(dh,
- PlaceToPutDataPtr,
- Cancel);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&sb",
+ CmpInstObj_Convert, &dh,
+ &PlaceToPutDataPtr,
+ &Cancel))
+ return NULL;
+ _rv = DataHFinishData(dh,
+ PlaceToPutDataPtr,
+ Cancel);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_DataHFlushCache(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataHandler dh;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataHandler dh;
#ifndef DataHFlushCache
- PyMac_PRECHECK(DataHFlushCache);
+ PyMac_PRECHECK(DataHFlushCache);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &dh))
- return NULL;
- _rv = DataHFlushCache(dh);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &dh))
+ return NULL;
+ _rv = DataHFlushCache(dh);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_DataHResolveDataRef(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataHandler dh;
- Handle theDataRef;
- Boolean wasChanged;
- Boolean userInterfaceAllowed;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataHandler dh;
+ Handle theDataRef;
+ Boolean wasChanged;
+ Boolean userInterfaceAllowed;
#ifndef DataHResolveDataRef
- PyMac_PRECHECK(DataHResolveDataRef);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&b",
- CmpInstObj_Convert, &dh,
- ResObj_Convert, &theDataRef,
- &userInterfaceAllowed))
- return NULL;
- _rv = DataHResolveDataRef(dh,
- theDataRef,
- &wasChanged,
- userInterfaceAllowed);
- _res = Py_BuildValue("lb",
- _rv,
- wasChanged);
- return _res;
+ PyMac_PRECHECK(DataHResolveDataRef);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&b",
+ CmpInstObj_Convert, &dh,
+ ResObj_Convert, &theDataRef,
+ &userInterfaceAllowed))
+ return NULL;
+ _rv = DataHResolveDataRef(dh,
+ theDataRef,
+ &wasChanged,
+ userInterfaceAllowed);
+ _res = Py_BuildValue("lb",
+ _rv,
+ wasChanged);
+ return _res;
}
static PyObject *Qt_DataHGetFileSize(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataHandler dh;
- long fileSize;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataHandler dh;
+ long fileSize;
#ifndef DataHGetFileSize
- PyMac_PRECHECK(DataHGetFileSize);
+ PyMac_PRECHECK(DataHGetFileSize);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &dh))
- return NULL;
- _rv = DataHGetFileSize(dh,
- &fileSize);
- _res = Py_BuildValue("ll",
- _rv,
- fileSize);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &dh))
+ return NULL;
+ _rv = DataHGetFileSize(dh,
+ &fileSize);
+ _res = Py_BuildValue("ll",
+ _rv,
+ fileSize);
+ return _res;
}
static PyObject *Qt_DataHCanUseDataRef(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataHandler dh;
- Handle dataRef;
- long useFlags;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataHandler dh;
+ Handle dataRef;
+ long useFlags;
#ifndef DataHCanUseDataRef
- PyMac_PRECHECK(DataHCanUseDataRef);
+ PyMac_PRECHECK(DataHCanUseDataRef);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &dh,
- ResObj_Convert, &dataRef))
- return NULL;
- _rv = DataHCanUseDataRef(dh,
- dataRef,
- &useFlags);
- _res = Py_BuildValue("ll",
- _rv,
- useFlags);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &dh,
+ ResObj_Convert, &dataRef))
+ return NULL;
+ _rv = DataHCanUseDataRef(dh,
+ dataRef,
+ &useFlags);
+ _res = Py_BuildValue("ll",
+ _rv,
+ useFlags);
+ return _res;
}
static PyObject *Qt_DataHPreextend(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataHandler dh;
- unsigned long maxToAdd;
- unsigned long spaceAdded;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataHandler dh;
+ unsigned long maxToAdd;
+ unsigned long spaceAdded;
#ifndef DataHPreextend
- PyMac_PRECHECK(DataHPreextend);
+ PyMac_PRECHECK(DataHPreextend);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &dh,
- &maxToAdd))
- return NULL;
- _rv = DataHPreextend(dh,
- maxToAdd,
- &spaceAdded);
- _res = Py_BuildValue("ll",
- _rv,
- spaceAdded);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &dh,
+ &maxToAdd))
+ return NULL;
+ _rv = DataHPreextend(dh,
+ maxToAdd,
+ &spaceAdded);
+ _res = Py_BuildValue("ll",
+ _rv,
+ spaceAdded);
+ return _res;
}
static PyObject *Qt_DataHSetFileSize(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataHandler dh;
- long fileSize;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataHandler dh;
+ long fileSize;
#ifndef DataHSetFileSize
- PyMac_PRECHECK(DataHSetFileSize);
+ PyMac_PRECHECK(DataHSetFileSize);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &dh,
- &fileSize))
- return NULL;
- _rv = DataHSetFileSize(dh,
- fileSize);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &dh,
+ &fileSize))
+ return NULL;
+ _rv = DataHSetFileSize(dh,
+ fileSize);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_DataHGetFreeSpace(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataHandler dh;
- unsigned long freeSize;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataHandler dh;
+ unsigned long freeSize;
#ifndef DataHGetFreeSpace
- PyMac_PRECHECK(DataHGetFreeSpace);
+ PyMac_PRECHECK(DataHGetFreeSpace);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &dh))
- return NULL;
- _rv = DataHGetFreeSpace(dh,
- &freeSize);
- _res = Py_BuildValue("ll",
- _rv,
- freeSize);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &dh))
+ return NULL;
+ _rv = DataHGetFreeSpace(dh,
+ &freeSize);
+ _res = Py_BuildValue("ll",
+ _rv,
+ freeSize);
+ return _res;
}
static PyObject *Qt_DataHCreateFile(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataHandler dh;
- OSType creator;
- Boolean deleteExisting;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataHandler dh;
+ OSType creator;
+ Boolean deleteExisting;
#ifndef DataHCreateFile
- PyMac_PRECHECK(DataHCreateFile);
+ PyMac_PRECHECK(DataHCreateFile);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&b",
- CmpInstObj_Convert, &dh,
- PyMac_GetOSType, &creator,
- &deleteExisting))
- return NULL;
- _rv = DataHCreateFile(dh,
- creator,
- deleteExisting);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&b",
+ CmpInstObj_Convert, &dh,
+ PyMac_GetOSType, &creator,
+ &deleteExisting))
+ return NULL;
+ _rv = DataHCreateFile(dh,
+ creator,
+ deleteExisting);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_DataHGetPreferredBlockSize(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataHandler dh;
- long blockSize;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataHandler dh;
+ long blockSize;
#ifndef DataHGetPreferredBlockSize
- PyMac_PRECHECK(DataHGetPreferredBlockSize);
+ PyMac_PRECHECK(DataHGetPreferredBlockSize);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &dh))
- return NULL;
- _rv = DataHGetPreferredBlockSize(dh,
- &blockSize);
- _res = Py_BuildValue("ll",
- _rv,
- blockSize);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &dh))
+ return NULL;
+ _rv = DataHGetPreferredBlockSize(dh,
+ &blockSize);
+ _res = Py_BuildValue("ll",
+ _rv,
+ blockSize);
+ return _res;
}
static PyObject *Qt_DataHGetDeviceIndex(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataHandler dh;
- long deviceIndex;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataHandler dh;
+ long deviceIndex;
#ifndef DataHGetDeviceIndex
- PyMac_PRECHECK(DataHGetDeviceIndex);
+ PyMac_PRECHECK(DataHGetDeviceIndex);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &dh))
- return NULL;
- _rv = DataHGetDeviceIndex(dh,
- &deviceIndex);
- _res = Py_BuildValue("ll",
- _rv,
- deviceIndex);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &dh))
+ return NULL;
+ _rv = DataHGetDeviceIndex(dh,
+ &deviceIndex);
+ _res = Py_BuildValue("ll",
+ _rv,
+ deviceIndex);
+ return _res;
}
static PyObject *Qt_DataHIsStreamingDataHandler(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataHandler dh;
- Boolean yes;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataHandler dh;
+ Boolean yes;
#ifndef DataHIsStreamingDataHandler
- PyMac_PRECHECK(DataHIsStreamingDataHandler);
+ PyMac_PRECHECK(DataHIsStreamingDataHandler);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &dh))
- return NULL;
- _rv = DataHIsStreamingDataHandler(dh,
- &yes);
- _res = Py_BuildValue("lb",
- _rv,
- yes);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &dh))
+ return NULL;
+ _rv = DataHIsStreamingDataHandler(dh,
+ &yes);
+ _res = Py_BuildValue("lb",
+ _rv,
+ yes);
+ return _res;
}
static PyObject *Qt_DataHGetDataInBuffer(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataHandler dh;
- long startOffset;
- long size;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataHandler dh;
+ long startOffset;
+ long size;
#ifndef DataHGetDataInBuffer
- PyMac_PRECHECK(DataHGetDataInBuffer);
+ PyMac_PRECHECK(DataHGetDataInBuffer);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &dh,
- &startOffset))
- return NULL;
- _rv = DataHGetDataInBuffer(dh,
- startOffset,
- &size);
- _res = Py_BuildValue("ll",
- _rv,
- size);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &dh,
+ &startOffset))
+ return NULL;
+ _rv = DataHGetDataInBuffer(dh,
+ startOffset,
+ &size);
+ _res = Py_BuildValue("ll",
+ _rv,
+ size);
+ return _res;
}
static PyObject *Qt_DataHGetScheduleAheadTime(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataHandler dh;
- long millisecs;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataHandler dh;
+ long millisecs;
#ifndef DataHGetScheduleAheadTime
- PyMac_PRECHECK(DataHGetScheduleAheadTime);
+ PyMac_PRECHECK(DataHGetScheduleAheadTime);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &dh))
- return NULL;
- _rv = DataHGetScheduleAheadTime(dh,
- &millisecs);
- _res = Py_BuildValue("ll",
- _rv,
- millisecs);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &dh))
+ return NULL;
+ _rv = DataHGetScheduleAheadTime(dh,
+ &millisecs);
+ _res = Py_BuildValue("ll",
+ _rv,
+ millisecs);
+ return _res;
}
static PyObject *Qt_DataHSetCacheSizeLimit(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataHandler dh;
- Size cacheSizeLimit;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataHandler dh;
+ Size cacheSizeLimit;
#ifndef DataHSetCacheSizeLimit
- PyMac_PRECHECK(DataHSetCacheSizeLimit);
+ PyMac_PRECHECK(DataHSetCacheSizeLimit);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &dh,
- &cacheSizeLimit))
- return NULL;
- _rv = DataHSetCacheSizeLimit(dh,
- cacheSizeLimit);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &dh,
+ &cacheSizeLimit))
+ return NULL;
+ _rv = DataHSetCacheSizeLimit(dh,
+ cacheSizeLimit);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_DataHGetCacheSizeLimit(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataHandler dh;
- Size cacheSizeLimit;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataHandler dh;
+ Size cacheSizeLimit;
#ifndef DataHGetCacheSizeLimit
- PyMac_PRECHECK(DataHGetCacheSizeLimit);
+ PyMac_PRECHECK(DataHGetCacheSizeLimit);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &dh))
- return NULL;
- _rv = DataHGetCacheSizeLimit(dh,
- &cacheSizeLimit);
- _res = Py_BuildValue("ll",
- _rv,
- cacheSizeLimit);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &dh))
+ return NULL;
+ _rv = DataHGetCacheSizeLimit(dh,
+ &cacheSizeLimit);
+ _res = Py_BuildValue("ll",
+ _rv,
+ cacheSizeLimit);
+ return _res;
}
static PyObject *Qt_DataHGetMovie(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataHandler dh;
- Movie theMovie;
- short id;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataHandler dh;
+ Movie theMovie;
+ short id;
#ifndef DataHGetMovie
- PyMac_PRECHECK(DataHGetMovie);
+ PyMac_PRECHECK(DataHGetMovie);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &dh))
- return NULL;
- _rv = DataHGetMovie(dh,
- &theMovie,
- &id);
- _res = Py_BuildValue("lO&h",
- _rv,
- MovieObj_New, theMovie,
- id);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &dh))
+ return NULL;
+ _rv = DataHGetMovie(dh,
+ &theMovie,
+ &id);
+ _res = Py_BuildValue("lO&h",
+ _rv,
+ MovieObj_New, theMovie,
+ id);
+ return _res;
}
static PyObject *Qt_DataHAddMovie(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataHandler dh;
- Movie theMovie;
- short id;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataHandler dh;
+ Movie theMovie;
+ short id;
#ifndef DataHAddMovie
- PyMac_PRECHECK(DataHAddMovie);
+ PyMac_PRECHECK(DataHAddMovie);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &dh,
- MovieObj_Convert, &theMovie))
- return NULL;
- _rv = DataHAddMovie(dh,
- theMovie,
- &id);
- _res = Py_BuildValue("lh",
- _rv,
- id);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &dh,
+ MovieObj_Convert, &theMovie))
+ return NULL;
+ _rv = DataHAddMovie(dh,
+ theMovie,
+ &id);
+ _res = Py_BuildValue("lh",
+ _rv,
+ id);
+ return _res;
}
static PyObject *Qt_DataHUpdateMovie(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataHandler dh;
- Movie theMovie;
- short id;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataHandler dh;
+ Movie theMovie;
+ short id;
#ifndef DataHUpdateMovie
- PyMac_PRECHECK(DataHUpdateMovie);
+ PyMac_PRECHECK(DataHUpdateMovie);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&h",
- CmpInstObj_Convert, &dh,
- MovieObj_Convert, &theMovie,
- &id))
- return NULL;
- _rv = DataHUpdateMovie(dh,
- theMovie,
- id);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&h",
+ CmpInstObj_Convert, &dh,
+ MovieObj_Convert, &theMovie,
+ &id))
+ return NULL;
+ _rv = DataHUpdateMovie(dh,
+ theMovie,
+ id);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_DataHDoesBuffer(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataHandler dh;
- Boolean buffersReads;
- Boolean buffersWrites;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataHandler dh;
+ Boolean buffersReads;
+ Boolean buffersWrites;
#ifndef DataHDoesBuffer
- PyMac_PRECHECK(DataHDoesBuffer);
+ PyMac_PRECHECK(DataHDoesBuffer);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &dh))
- return NULL;
- _rv = DataHDoesBuffer(dh,
- &buffersReads,
- &buffersWrites);
- _res = Py_BuildValue("lbb",
- _rv,
- buffersReads,
- buffersWrites);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &dh))
+ return NULL;
+ _rv = DataHDoesBuffer(dh,
+ &buffersReads,
+ &buffersWrites);
+ _res = Py_BuildValue("lbb",
+ _rv,
+ buffersReads,
+ buffersWrites);
+ return _res;
}
static PyObject *Qt_DataHGetFileName(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataHandler dh;
- Str255 str;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataHandler dh;
+ Str255 str;
#ifndef DataHGetFileName
- PyMac_PRECHECK(DataHGetFileName);
+ PyMac_PRECHECK(DataHGetFileName);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &dh,
- PyMac_GetStr255, str))
- return NULL;
- _rv = DataHGetFileName(dh,
- str);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &dh,
+ PyMac_GetStr255, str))
+ return NULL;
+ _rv = DataHGetFileName(dh,
+ str);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_DataHGetAvailableFileSize(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataHandler dh;
- long fileSize;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataHandler dh;
+ long fileSize;
#ifndef DataHGetAvailableFileSize
- PyMac_PRECHECK(DataHGetAvailableFileSize);
+ PyMac_PRECHECK(DataHGetAvailableFileSize);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &dh))
- return NULL;
- _rv = DataHGetAvailableFileSize(dh,
- &fileSize);
- _res = Py_BuildValue("ll",
- _rv,
- fileSize);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &dh))
+ return NULL;
+ _rv = DataHGetAvailableFileSize(dh,
+ &fileSize);
+ _res = Py_BuildValue("ll",
+ _rv,
+ fileSize);
+ return _res;
}
static PyObject *Qt_DataHGetMacOSFileType(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataHandler dh;
- OSType fileType;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataHandler dh;
+ OSType fileType;
#ifndef DataHGetMacOSFileType
- PyMac_PRECHECK(DataHGetMacOSFileType);
+ PyMac_PRECHECK(DataHGetMacOSFileType);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &dh))
- return NULL;
- _rv = DataHGetMacOSFileType(dh,
- &fileType);
- _res = Py_BuildValue("lO&",
- _rv,
- PyMac_BuildOSType, fileType);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &dh))
+ return NULL;
+ _rv = DataHGetMacOSFileType(dh,
+ &fileType);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ PyMac_BuildOSType, fileType);
+ return _res;
}
static PyObject *Qt_DataHGetMIMEType(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataHandler dh;
- Str255 mimeType;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataHandler dh;
+ Str255 mimeType;
#ifndef DataHGetMIMEType
- PyMac_PRECHECK(DataHGetMIMEType);
+ PyMac_PRECHECK(DataHGetMIMEType);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &dh,
- PyMac_GetStr255, mimeType))
- return NULL;
- _rv = DataHGetMIMEType(dh,
- mimeType);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &dh,
+ PyMac_GetStr255, mimeType))
+ return NULL;
+ _rv = DataHGetMIMEType(dh,
+ mimeType);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_DataHSetDataRefWithAnchor(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataHandler dh;
- Handle anchorDataRef;
- OSType dataRefType;
- Handle dataRef;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataHandler dh;
+ Handle anchorDataRef;
+ OSType dataRefType;
+ Handle dataRef;
#ifndef DataHSetDataRefWithAnchor
- PyMac_PRECHECK(DataHSetDataRefWithAnchor);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&O&",
- CmpInstObj_Convert, &dh,
- ResObj_Convert, &anchorDataRef,
- PyMac_GetOSType, &dataRefType,
- ResObj_Convert, &dataRef))
- return NULL;
- _rv = DataHSetDataRefWithAnchor(dh,
- anchorDataRef,
- dataRefType,
- dataRef);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyMac_PRECHECK(DataHSetDataRefWithAnchor);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&O&",
+ CmpInstObj_Convert, &dh,
+ ResObj_Convert, &anchorDataRef,
+ PyMac_GetOSType, &dataRefType,
+ ResObj_Convert, &dataRef))
+ return NULL;
+ _rv = DataHSetDataRefWithAnchor(dh,
+ anchorDataRef,
+ dataRefType,
+ dataRef);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_DataHGetDataRefWithAnchor(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataHandler dh;
- Handle anchorDataRef;
- OSType dataRefType;
- Handle dataRef;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataHandler dh;
+ Handle anchorDataRef;
+ OSType dataRefType;
+ Handle dataRef;
#ifndef DataHGetDataRefWithAnchor
- PyMac_PRECHECK(DataHGetDataRefWithAnchor);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- CmpInstObj_Convert, &dh,
- ResObj_Convert, &anchorDataRef,
- PyMac_GetOSType, &dataRefType))
- return NULL;
- _rv = DataHGetDataRefWithAnchor(dh,
- anchorDataRef,
- dataRefType,
- &dataRef);
- _res = Py_BuildValue("lO&",
- _rv,
- ResObj_New, dataRef);
- return _res;
+ PyMac_PRECHECK(DataHGetDataRefWithAnchor);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ CmpInstObj_Convert, &dh,
+ ResObj_Convert, &anchorDataRef,
+ PyMac_GetOSType, &dataRefType))
+ return NULL;
+ _rv = DataHGetDataRefWithAnchor(dh,
+ anchorDataRef,
+ dataRefType,
+ &dataRef);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ ResObj_New, dataRef);
+ return _res;
}
static PyObject *Qt_DataHSetMacOSFileType(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataHandler dh;
- OSType fileType;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataHandler dh;
+ OSType fileType;
#ifndef DataHSetMacOSFileType
- PyMac_PRECHECK(DataHSetMacOSFileType);
+ PyMac_PRECHECK(DataHSetMacOSFileType);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &dh,
- PyMac_GetOSType, &fileType))
- return NULL;
- _rv = DataHSetMacOSFileType(dh,
- fileType);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &dh,
+ PyMac_GetOSType, &fileType))
+ return NULL;
+ _rv = DataHSetMacOSFileType(dh,
+ fileType);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_DataHSetTimeBase(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataHandler dh;
- TimeBase tb;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataHandler dh;
+ TimeBase tb;
#ifndef DataHSetTimeBase
- PyMac_PRECHECK(DataHSetTimeBase);
+ PyMac_PRECHECK(DataHSetTimeBase);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &dh,
- TimeBaseObj_Convert, &tb))
- return NULL;
- _rv = DataHSetTimeBase(dh,
- tb);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &dh,
+ TimeBaseObj_Convert, &tb))
+ return NULL;
+ _rv = DataHSetTimeBase(dh,
+ tb);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_DataHGetInfoFlags(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataHandler dh;
- UInt32 flags;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataHandler dh;
+ UInt32 flags;
#ifndef DataHGetInfoFlags
- PyMac_PRECHECK(DataHGetInfoFlags);
+ PyMac_PRECHECK(DataHGetInfoFlags);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &dh))
- return NULL;
- _rv = DataHGetInfoFlags(dh,
- &flags);
- _res = Py_BuildValue("ll",
- _rv,
- flags);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &dh))
+ return NULL;
+ _rv = DataHGetInfoFlags(dh,
+ &flags);
+ _res = Py_BuildValue("ll",
+ _rv,
+ flags);
+ return _res;
}
static PyObject *Qt_DataHGetFileSize64(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataHandler dh;
- wide fileSize;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataHandler dh;
+ wide fileSize;
#ifndef DataHGetFileSize64
- PyMac_PRECHECK(DataHGetFileSize64);
+ PyMac_PRECHECK(DataHGetFileSize64);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &dh))
- return NULL;
- _rv = DataHGetFileSize64(dh,
- &fileSize);
- _res = Py_BuildValue("lO&",
- _rv,
- PyMac_Buildwide, fileSize);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &dh))
+ return NULL;
+ _rv = DataHGetFileSize64(dh,
+ &fileSize);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ PyMac_Buildwide, fileSize);
+ return _res;
}
static PyObject *Qt_DataHPreextend64(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataHandler dh;
- wide maxToAdd;
- wide spaceAdded;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataHandler dh;
+ wide maxToAdd;
+ wide spaceAdded;
#ifndef DataHPreextend64
- PyMac_PRECHECK(DataHPreextend64);
+ PyMac_PRECHECK(DataHPreextend64);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &dh,
- PyMac_Getwide, &maxToAdd))
- return NULL;
- _rv = DataHPreextend64(dh,
- &maxToAdd,
- &spaceAdded);
- _res = Py_BuildValue("lO&",
- _rv,
- PyMac_Buildwide, spaceAdded);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &dh,
+ PyMac_Getwide, &maxToAdd))
+ return NULL;
+ _rv = DataHPreextend64(dh,
+ &maxToAdd,
+ &spaceAdded);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ PyMac_Buildwide, spaceAdded);
+ return _res;
}
static PyObject *Qt_DataHSetFileSize64(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataHandler dh;
- wide fileSize;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataHandler dh;
+ wide fileSize;
#ifndef DataHSetFileSize64
- PyMac_PRECHECK(DataHSetFileSize64);
+ PyMac_PRECHECK(DataHSetFileSize64);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &dh,
- PyMac_Getwide, &fileSize))
- return NULL;
- _rv = DataHSetFileSize64(dh,
- &fileSize);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &dh,
+ PyMac_Getwide, &fileSize))
+ return NULL;
+ _rv = DataHSetFileSize64(dh,
+ &fileSize);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_DataHGetFreeSpace64(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataHandler dh;
- wide freeSize;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataHandler dh;
+ wide freeSize;
#ifndef DataHGetFreeSpace64
- PyMac_PRECHECK(DataHGetFreeSpace64);
+ PyMac_PRECHECK(DataHGetFreeSpace64);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &dh))
- return NULL;
- _rv = DataHGetFreeSpace64(dh,
- &freeSize);
- _res = Py_BuildValue("lO&",
- _rv,
- PyMac_Buildwide, freeSize);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &dh))
+ return NULL;
+ _rv = DataHGetFreeSpace64(dh,
+ &freeSize);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ PyMac_Buildwide, freeSize);
+ return _res;
}
static PyObject *Qt_DataHAppend64(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataHandler dh;
- void * data;
- wide fileOffset;
- unsigned long size;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataHandler dh;
+ void * data;
+ wide fileOffset;
+ unsigned long size;
#ifndef DataHAppend64
- PyMac_PRECHECK(DataHAppend64);
-#endif
- if (!PyArg_ParseTuple(_args, "O&sl",
- CmpInstObj_Convert, &dh,
- &data,
- &size))
- return NULL;
- _rv = DataHAppend64(dh,
- data,
- &fileOffset,
- size);
- _res = Py_BuildValue("lO&",
- _rv,
- PyMac_Buildwide, fileOffset);
- return _res;
+ PyMac_PRECHECK(DataHAppend64);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&sl",
+ CmpInstObj_Convert, &dh,
+ &data,
+ &size))
+ return NULL;
+ _rv = DataHAppend64(dh,
+ data,
+ &fileOffset,
+ size);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ PyMac_Buildwide, fileOffset);
+ return _res;
}
static PyObject *Qt_DataHPollRead(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataHandler dh;
- void * dataPtr;
- UInt32 dataSizeSoFar;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataHandler dh;
+ void * dataPtr;
+ UInt32 dataSizeSoFar;
#ifndef DataHPollRead
- PyMac_PRECHECK(DataHPollRead);
+ PyMac_PRECHECK(DataHPollRead);
#endif
- if (!PyArg_ParseTuple(_args, "O&s",
- CmpInstObj_Convert, &dh,
- &dataPtr))
- return NULL;
- _rv = DataHPollRead(dh,
- dataPtr,
- &dataSizeSoFar);
- _res = Py_BuildValue("ll",
- _rv,
- dataSizeSoFar);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&s",
+ CmpInstObj_Convert, &dh,
+ &dataPtr))
+ return NULL;
+ _rv = DataHPollRead(dh,
+ dataPtr,
+ &dataSizeSoFar);
+ _res = Py_BuildValue("ll",
+ _rv,
+ dataSizeSoFar);
+ return _res;
}
static PyObject *Qt_DataHGetDataAvailability(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataHandler dh;
- long offset;
- long len;
- long missing_offset;
- long missing_len;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataHandler dh;
+ long offset;
+ long len;
+ long missing_offset;
+ long missing_len;
#ifndef DataHGetDataAvailability
- PyMac_PRECHECK(DataHGetDataAvailability);
-#endif
- if (!PyArg_ParseTuple(_args, "O&ll",
- CmpInstObj_Convert, &dh,
- &offset,
- &len))
- return NULL;
- _rv = DataHGetDataAvailability(dh,
- offset,
- len,
- &missing_offset,
- &missing_len);
- _res = Py_BuildValue("lll",
- _rv,
- missing_offset,
- missing_len);
- return _res;
+ PyMac_PRECHECK(DataHGetDataAvailability);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&ll",
+ CmpInstObj_Convert, &dh,
+ &offset,
+ &len))
+ return NULL;
+ _rv = DataHGetDataAvailability(dh,
+ offset,
+ len,
+ &missing_offset,
+ &missing_len);
+ _res = Py_BuildValue("lll",
+ _rv,
+ missing_offset,
+ missing_len);
+ return _res;
}
static PyObject *Qt_DataHGetDataRefAsType(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataHandler dh;
- OSType requestedType;
- Handle dataRef;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataHandler dh;
+ OSType requestedType;
+ Handle dataRef;
#ifndef DataHGetDataRefAsType
- PyMac_PRECHECK(DataHGetDataRefAsType);
+ PyMac_PRECHECK(DataHGetDataRefAsType);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &dh,
- PyMac_GetOSType, &requestedType))
- return NULL;
- _rv = DataHGetDataRefAsType(dh,
- requestedType,
- &dataRef);
- _res = Py_BuildValue("lO&",
- _rv,
- ResObj_New, dataRef);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &dh,
+ PyMac_GetOSType, &requestedType))
+ return NULL;
+ _rv = DataHGetDataRefAsType(dh,
+ requestedType,
+ &dataRef);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ ResObj_New, dataRef);
+ return _res;
}
static PyObject *Qt_DataHSetDataRefExtension(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataHandler dh;
- Handle extension;
- OSType idType;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataHandler dh;
+ Handle extension;
+ OSType idType;
#ifndef DataHSetDataRefExtension
- PyMac_PRECHECK(DataHSetDataRefExtension);
+ PyMac_PRECHECK(DataHSetDataRefExtension);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- CmpInstObj_Convert, &dh,
- ResObj_Convert, &extension,
- PyMac_GetOSType, &idType))
- return NULL;
- _rv = DataHSetDataRefExtension(dh,
- extension,
- idType);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ CmpInstObj_Convert, &dh,
+ ResObj_Convert, &extension,
+ PyMac_GetOSType, &idType))
+ return NULL;
+ _rv = DataHSetDataRefExtension(dh,
+ extension,
+ idType);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_DataHGetDataRefExtension(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataHandler dh;
- Handle extension;
- OSType idType;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataHandler dh;
+ Handle extension;
+ OSType idType;
#ifndef DataHGetDataRefExtension
- PyMac_PRECHECK(DataHGetDataRefExtension);
+ PyMac_PRECHECK(DataHGetDataRefExtension);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &dh,
- PyMac_GetOSType, &idType))
- return NULL;
- _rv = DataHGetDataRefExtension(dh,
- &extension,
- idType);
- _res = Py_BuildValue("lO&",
- _rv,
- ResObj_New, extension);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &dh,
+ PyMac_GetOSType, &idType))
+ return NULL;
+ _rv = DataHGetDataRefExtension(dh,
+ &extension,
+ idType);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ ResObj_New, extension);
+ return _res;
}
static PyObject *Qt_DataHGetMovieWithFlags(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataHandler dh;
- Movie theMovie;
- short id;
- short flags;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataHandler dh;
+ Movie theMovie;
+ short id;
+ short flags;
#ifndef DataHGetMovieWithFlags
- PyMac_PRECHECK(DataHGetMovieWithFlags);
-#endif
- if (!PyArg_ParseTuple(_args, "O&h",
- CmpInstObj_Convert, &dh,
- &flags))
- return NULL;
- _rv = DataHGetMovieWithFlags(dh,
- &theMovie,
- &id,
- flags);
- _res = Py_BuildValue("lO&h",
- _rv,
- MovieObj_New, theMovie,
- id);
- return _res;
+ PyMac_PRECHECK(DataHGetMovieWithFlags);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&h",
+ CmpInstObj_Convert, &dh,
+ &flags))
+ return NULL;
+ _rv = DataHGetMovieWithFlags(dh,
+ &theMovie,
+ &id,
+ flags);
+ _res = Py_BuildValue("lO&h",
+ _rv,
+ MovieObj_New, theMovie,
+ id);
+ return _res;
}
static PyObject *Qt_DataHGetFileTypeOrdering(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataHandler dh;
- DataHFileTypeOrderingHandle orderingListHandle;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataHandler dh;
+ DataHFileTypeOrderingHandle orderingListHandle;
#ifndef DataHGetFileTypeOrdering
- PyMac_PRECHECK(DataHGetFileTypeOrdering);
+ PyMac_PRECHECK(DataHGetFileTypeOrdering);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &dh))
- return NULL;
- _rv = DataHGetFileTypeOrdering(dh,
- &orderingListHandle);
- _res = Py_BuildValue("lO&",
- _rv,
- ResObj_New, orderingListHandle);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &dh))
+ return NULL;
+ _rv = DataHGetFileTypeOrdering(dh,
+ &orderingListHandle);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ ResObj_New, orderingListHandle);
+ return _res;
}
static PyObject *Qt_DataHCreateFileWithFlags(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataHandler dh;
- OSType creator;
- Boolean deleteExisting;
- UInt32 flags;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataHandler dh;
+ OSType creator;
+ Boolean deleteExisting;
+ UInt32 flags;
#ifndef DataHCreateFileWithFlags
- PyMac_PRECHECK(DataHCreateFileWithFlags);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&bl",
- CmpInstObj_Convert, &dh,
- PyMac_GetOSType, &creator,
- &deleteExisting,
- &flags))
- return NULL;
- _rv = DataHCreateFileWithFlags(dh,
- creator,
- deleteExisting,
- flags);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyMac_PRECHECK(DataHCreateFileWithFlags);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&bl",
+ CmpInstObj_Convert, &dh,
+ PyMac_GetOSType, &creator,
+ &deleteExisting,
+ &flags))
+ return NULL;
+ _rv = DataHCreateFileWithFlags(dh,
+ creator,
+ deleteExisting,
+ flags);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_DataHGetInfo(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataHandler dh;
- OSType what;
- void * info;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataHandler dh;
+ OSType what;
+ void * info;
#ifndef DataHGetInfo
- PyMac_PRECHECK(DataHGetInfo);
+ PyMac_PRECHECK(DataHGetInfo);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&s",
- CmpInstObj_Convert, &dh,
- PyMac_GetOSType, &what,
- &info))
- return NULL;
- _rv = DataHGetInfo(dh,
- what,
- info);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&s",
+ CmpInstObj_Convert, &dh,
+ PyMac_GetOSType, &what,
+ &info))
+ return NULL;
+ _rv = DataHGetInfo(dh,
+ what,
+ info);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_DataHSetIdleManager(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataHandler dh;
- IdleManager im;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataHandler dh;
+ IdleManager im;
#ifndef DataHSetIdleManager
- PyMac_PRECHECK(DataHSetIdleManager);
+ PyMac_PRECHECK(DataHSetIdleManager);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &dh,
- IdleManagerObj_Convert, &im))
- return NULL;
- _rv = DataHSetIdleManager(dh,
- im);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &dh,
+ IdleManagerObj_Convert, &im))
+ return NULL;
+ _rv = DataHSetIdleManager(dh,
+ im);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_DataHDeleteFile(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataHandler dh;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataHandler dh;
#ifndef DataHDeleteFile
- PyMac_PRECHECK(DataHDeleteFile);
+ PyMac_PRECHECK(DataHDeleteFile);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &dh))
- return NULL;
- _rv = DataHDeleteFile(dh);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &dh))
+ return NULL;
+ _rv = DataHDeleteFile(dh);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_DataHSetMovieUsageFlags(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataHandler dh;
- long flags;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataHandler dh;
+ long flags;
#ifndef DataHSetMovieUsageFlags
- PyMac_PRECHECK(DataHSetMovieUsageFlags);
+ PyMac_PRECHECK(DataHSetMovieUsageFlags);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &dh,
- &flags))
- return NULL;
- _rv = DataHSetMovieUsageFlags(dh,
- flags);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &dh,
+ &flags))
+ return NULL;
+ _rv = DataHSetMovieUsageFlags(dh,
+ flags);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_DataHUseTemporaryDataRef(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataHandler dh;
- long inFlags;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataHandler dh;
+ long inFlags;
#ifndef DataHUseTemporaryDataRef
- PyMac_PRECHECK(DataHUseTemporaryDataRef);
+ PyMac_PRECHECK(DataHUseTemporaryDataRef);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &dh,
- &inFlags))
- return NULL;
- _rv = DataHUseTemporaryDataRef(dh,
- inFlags);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &dh,
+ &inFlags))
+ return NULL;
+ _rv = DataHUseTemporaryDataRef(dh,
+ inFlags);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_DataHGetTemporaryDataRefCapabilities(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataHandler dh;
- long outUnderstoodFlags;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataHandler dh;
+ long outUnderstoodFlags;
#ifndef DataHGetTemporaryDataRefCapabilities
- PyMac_PRECHECK(DataHGetTemporaryDataRefCapabilities);
+ PyMac_PRECHECK(DataHGetTemporaryDataRefCapabilities);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &dh))
- return NULL;
- _rv = DataHGetTemporaryDataRefCapabilities(dh,
- &outUnderstoodFlags);
- _res = Py_BuildValue("ll",
- _rv,
- outUnderstoodFlags);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &dh))
+ return NULL;
+ _rv = DataHGetTemporaryDataRefCapabilities(dh,
+ &outUnderstoodFlags);
+ _res = Py_BuildValue("ll",
+ _rv,
+ outUnderstoodFlags);
+ return _res;
}
static PyObject *Qt_DataHRenameFile(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataHandler dh;
- Handle newDataRef;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataHandler dh;
+ Handle newDataRef;
#ifndef DataHRenameFile
- PyMac_PRECHECK(DataHRenameFile);
+ PyMac_PRECHECK(DataHRenameFile);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &dh,
- ResObj_Convert, &newDataRef))
- return NULL;
- _rv = DataHRenameFile(dh,
- newDataRef);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &dh,
+ ResObj_Convert, &newDataRef))
+ return NULL;
+ _rv = DataHRenameFile(dh,
+ newDataRef);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_DataHPlaybackHints(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataHandler dh;
- long flags;
- unsigned long minFileOffset;
- unsigned long maxFileOffset;
- long bytesPerSecond;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataHandler dh;
+ long flags;
+ unsigned long minFileOffset;
+ unsigned long maxFileOffset;
+ long bytesPerSecond;
#ifndef DataHPlaybackHints
- PyMac_PRECHECK(DataHPlaybackHints);
-#endif
- if (!PyArg_ParseTuple(_args, "O&llll",
- CmpInstObj_Convert, &dh,
- &flags,
- &minFileOffset,
- &maxFileOffset,
- &bytesPerSecond))
- return NULL;
- _rv = DataHPlaybackHints(dh,
- flags,
- minFileOffset,
- maxFileOffset,
- bytesPerSecond);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyMac_PRECHECK(DataHPlaybackHints);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&llll",
+ CmpInstObj_Convert, &dh,
+ &flags,
+ &minFileOffset,
+ &maxFileOffset,
+ &bytesPerSecond))
+ return NULL;
+ _rv = DataHPlaybackHints(dh,
+ flags,
+ minFileOffset,
+ maxFileOffset,
+ bytesPerSecond);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_DataHPlaybackHints64(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataHandler dh;
- long flags;
- wide minFileOffset;
- wide maxFileOffset;
- long bytesPerSecond;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataHandler dh;
+ long flags;
+ wide minFileOffset;
+ wide maxFileOffset;
+ long bytesPerSecond;
#ifndef DataHPlaybackHints64
- PyMac_PRECHECK(DataHPlaybackHints64);
-#endif
- if (!PyArg_ParseTuple(_args, "O&lO&O&l",
- CmpInstObj_Convert, &dh,
- &flags,
- PyMac_Getwide, &minFileOffset,
- PyMac_Getwide, &maxFileOffset,
- &bytesPerSecond))
- return NULL;
- _rv = DataHPlaybackHints64(dh,
- flags,
- &minFileOffset,
- &maxFileOffset,
- bytesPerSecond);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyMac_PRECHECK(DataHPlaybackHints64);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&lO&O&l",
+ CmpInstObj_Convert, &dh,
+ &flags,
+ PyMac_Getwide, &minFileOffset,
+ PyMac_Getwide, &maxFileOffset,
+ &bytesPerSecond))
+ return NULL;
+ _rv = DataHPlaybackHints64(dh,
+ flags,
+ &minFileOffset,
+ &maxFileOffset,
+ bytesPerSecond);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_DataHGetDataRate(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataHandler dh;
- long flags;
- long bytesPerSecond;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataHandler dh;
+ long flags;
+ long bytesPerSecond;
#ifndef DataHGetDataRate
- PyMac_PRECHECK(DataHGetDataRate);
+ PyMac_PRECHECK(DataHGetDataRate);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &dh,
- &flags))
- return NULL;
- _rv = DataHGetDataRate(dh,
- flags,
- &bytesPerSecond);
- _res = Py_BuildValue("ll",
- _rv,
- bytesPerSecond);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &dh,
+ &flags))
+ return NULL;
+ _rv = DataHGetDataRate(dh,
+ flags,
+ &bytesPerSecond);
+ _res = Py_BuildValue("ll",
+ _rv,
+ bytesPerSecond);
+ return _res;
}
static PyObject *Qt_DataHSetTimeHints(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- DataHandler dh;
- long flags;
- long bandwidthPriority;
- TimeScale scale;
- TimeValue minTime;
- TimeValue maxTime;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ DataHandler dh;
+ long flags;
+ long bandwidthPriority;
+ TimeScale scale;
+ TimeValue minTime;
+ TimeValue maxTime;
#ifndef DataHSetTimeHints
- PyMac_PRECHECK(DataHSetTimeHints);
-#endif
- if (!PyArg_ParseTuple(_args, "O&lllll",
- CmpInstObj_Convert, &dh,
- &flags,
- &bandwidthPriority,
- &scale,
- &minTime,
- &maxTime))
- return NULL;
- _rv = DataHSetTimeHints(dh,
- flags,
- bandwidthPriority,
- scale,
- minTime,
- maxTime);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyMac_PRECHECK(DataHSetTimeHints);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&lllll",
+ CmpInstObj_Convert, &dh,
+ &flags,
+ &bandwidthPriority,
+ &scale,
+ &minTime,
+ &maxTime))
+ return NULL;
+ _rv = DataHSetTimeHints(dh,
+ flags,
+ bandwidthPriority,
+ scale,
+ minTime,
+ maxTime);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_VDGetMaxSrcRect(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- short inputStd;
- Rect maxSrcRect;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ short inputStd;
+ Rect maxSrcRect;
#ifndef VDGetMaxSrcRect
- PyMac_PRECHECK(VDGetMaxSrcRect);
+ PyMac_PRECHECK(VDGetMaxSrcRect);
#endif
- if (!PyArg_ParseTuple(_args, "O&h",
- CmpInstObj_Convert, &ci,
- &inputStd))
- return NULL;
- _rv = VDGetMaxSrcRect(ci,
- inputStd,
- &maxSrcRect);
- _res = Py_BuildValue("lO&",
- _rv,
- PyMac_BuildRect, &maxSrcRect);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&h",
+ CmpInstObj_Convert, &ci,
+ &inputStd))
+ return NULL;
+ _rv = VDGetMaxSrcRect(ci,
+ inputStd,
+ &maxSrcRect);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ PyMac_BuildRect, &maxSrcRect);
+ return _res;
}
static PyObject *Qt_VDGetActiveSrcRect(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- short inputStd;
- Rect activeSrcRect;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ short inputStd;
+ Rect activeSrcRect;
#ifndef VDGetActiveSrcRect
- PyMac_PRECHECK(VDGetActiveSrcRect);
+ PyMac_PRECHECK(VDGetActiveSrcRect);
#endif
- if (!PyArg_ParseTuple(_args, "O&h",
- CmpInstObj_Convert, &ci,
- &inputStd))
- return NULL;
- _rv = VDGetActiveSrcRect(ci,
- inputStd,
- &activeSrcRect);
- _res = Py_BuildValue("lO&",
- _rv,
- PyMac_BuildRect, &activeSrcRect);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&h",
+ CmpInstObj_Convert, &ci,
+ &inputStd))
+ return NULL;
+ _rv = VDGetActiveSrcRect(ci,
+ inputStd,
+ &activeSrcRect);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ PyMac_BuildRect, &activeSrcRect);
+ return _res;
}
static PyObject *Qt_VDSetDigitizerRect(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- Rect digitizerRect;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ Rect digitizerRect;
#ifndef VDSetDigitizerRect
- PyMac_PRECHECK(VDSetDigitizerRect);
+ PyMac_PRECHECK(VDSetDigitizerRect);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = VDSetDigitizerRect(ci,
- &digitizerRect);
- _res = Py_BuildValue("lO&",
- _rv,
- PyMac_BuildRect, &digitizerRect);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = VDSetDigitizerRect(ci,
+ &digitizerRect);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ PyMac_BuildRect, &digitizerRect);
+ return _res;
}
static PyObject *Qt_VDGetDigitizerRect(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- Rect digitizerRect;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ Rect digitizerRect;
#ifndef VDGetDigitizerRect
- PyMac_PRECHECK(VDGetDigitizerRect);
+ PyMac_PRECHECK(VDGetDigitizerRect);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = VDGetDigitizerRect(ci,
- &digitizerRect);
- _res = Py_BuildValue("lO&",
- _rv,
- PyMac_BuildRect, &digitizerRect);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = VDGetDigitizerRect(ci,
+ &digitizerRect);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ PyMac_BuildRect, &digitizerRect);
+ return _res;
}
static PyObject *Qt_VDGetVBlankRect(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- short inputStd;
- Rect vBlankRect;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ short inputStd;
+ Rect vBlankRect;
#ifndef VDGetVBlankRect
- PyMac_PRECHECK(VDGetVBlankRect);
+ PyMac_PRECHECK(VDGetVBlankRect);
#endif
- if (!PyArg_ParseTuple(_args, "O&h",
- CmpInstObj_Convert, &ci,
- &inputStd))
- return NULL;
- _rv = VDGetVBlankRect(ci,
- inputStd,
- &vBlankRect);
- _res = Py_BuildValue("lO&",
- _rv,
- PyMac_BuildRect, &vBlankRect);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&h",
+ CmpInstObj_Convert, &ci,
+ &inputStd))
+ return NULL;
+ _rv = VDGetVBlankRect(ci,
+ inputStd,
+ &vBlankRect);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ PyMac_BuildRect, &vBlankRect);
+ return _res;
}
static PyObject *Qt_VDGetMaskPixMap(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- PixMapHandle maskPixMap;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ PixMapHandle maskPixMap;
#ifndef VDGetMaskPixMap
- PyMac_PRECHECK(VDGetMaskPixMap);
+ PyMac_PRECHECK(VDGetMaskPixMap);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &ci,
- ResObj_Convert, &maskPixMap))
- return NULL;
- _rv = VDGetMaskPixMap(ci,
- maskPixMap);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &ci,
+ ResObj_Convert, &maskPixMap))
+ return NULL;
+ _rv = VDGetMaskPixMap(ci,
+ maskPixMap);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_VDUseThisCLUT(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- CTabHandle colorTableHandle;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ CTabHandle colorTableHandle;
#ifndef VDUseThisCLUT
- PyMac_PRECHECK(VDUseThisCLUT);
+ PyMac_PRECHECK(VDUseThisCLUT);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &ci,
- ResObj_Convert, &colorTableHandle))
- return NULL;
- _rv = VDUseThisCLUT(ci,
- colorTableHandle);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &ci,
+ ResObj_Convert, &colorTableHandle))
+ return NULL;
+ _rv = VDUseThisCLUT(ci,
+ colorTableHandle);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_VDSetInputGammaValue(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- Fixed channel1;
- Fixed channel2;
- Fixed channel3;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ Fixed channel1;
+ Fixed channel2;
+ Fixed channel3;
#ifndef VDSetInputGammaValue
- PyMac_PRECHECK(VDSetInputGammaValue);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&O&",
- CmpInstObj_Convert, &ci,
- PyMac_GetFixed, &channel1,
- PyMac_GetFixed, &channel2,
- PyMac_GetFixed, &channel3))
- return NULL;
- _rv = VDSetInputGammaValue(ci,
- channel1,
- channel2,
- channel3);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyMac_PRECHECK(VDSetInputGammaValue);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&O&",
+ CmpInstObj_Convert, &ci,
+ PyMac_GetFixed, &channel1,
+ PyMac_GetFixed, &channel2,
+ PyMac_GetFixed, &channel3))
+ return NULL;
+ _rv = VDSetInputGammaValue(ci,
+ channel1,
+ channel2,
+ channel3);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_VDGetInputGammaValue(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- Fixed channel1;
- Fixed channel2;
- Fixed channel3;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ Fixed channel1;
+ Fixed channel2;
+ Fixed channel3;
#ifndef VDGetInputGammaValue
- PyMac_PRECHECK(VDGetInputGammaValue);
-#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = VDGetInputGammaValue(ci,
- &channel1,
- &channel2,
- &channel3);
- _res = Py_BuildValue("lO&O&O&",
- _rv,
- PyMac_BuildFixed, channel1,
- PyMac_BuildFixed, channel2,
- PyMac_BuildFixed, channel3);
- return _res;
+ PyMac_PRECHECK(VDGetInputGammaValue);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = VDGetInputGammaValue(ci,
+ &channel1,
+ &channel2,
+ &channel3);
+ _res = Py_BuildValue("lO&O&O&",
+ _rv,
+ PyMac_BuildFixed, channel1,
+ PyMac_BuildFixed, channel2,
+ PyMac_BuildFixed, channel3);
+ return _res;
}
static PyObject *Qt_VDSetBrightness(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- unsigned short brightness;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ unsigned short brightness;
#ifndef VDSetBrightness
- PyMac_PRECHECK(VDSetBrightness);
+ PyMac_PRECHECK(VDSetBrightness);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = VDSetBrightness(ci,
- &brightness);
- _res = Py_BuildValue("lH",
- _rv,
- brightness);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = VDSetBrightness(ci,
+ &brightness);
+ _res = Py_BuildValue("lH",
+ _rv,
+ brightness);
+ return _res;
}
static PyObject *Qt_VDGetBrightness(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- unsigned short brightness;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ unsigned short brightness;
#ifndef VDGetBrightness
- PyMac_PRECHECK(VDGetBrightness);
+ PyMac_PRECHECK(VDGetBrightness);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = VDGetBrightness(ci,
- &brightness);
- _res = Py_BuildValue("lH",
- _rv,
- brightness);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = VDGetBrightness(ci,
+ &brightness);
+ _res = Py_BuildValue("lH",
+ _rv,
+ brightness);
+ return _res;
}
static PyObject *Qt_VDSetContrast(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- unsigned short contrast;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ unsigned short contrast;
#ifndef VDSetContrast
- PyMac_PRECHECK(VDSetContrast);
+ PyMac_PRECHECK(VDSetContrast);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = VDSetContrast(ci,
- &contrast);
- _res = Py_BuildValue("lH",
- _rv,
- contrast);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = VDSetContrast(ci,
+ &contrast);
+ _res = Py_BuildValue("lH",
+ _rv,
+ contrast);
+ return _res;
}
static PyObject *Qt_VDSetHue(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- unsigned short hue;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ unsigned short hue;
#ifndef VDSetHue
- PyMac_PRECHECK(VDSetHue);
+ PyMac_PRECHECK(VDSetHue);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = VDSetHue(ci,
- &hue);
- _res = Py_BuildValue("lH",
- _rv,
- hue);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = VDSetHue(ci,
+ &hue);
+ _res = Py_BuildValue("lH",
+ _rv,
+ hue);
+ return _res;
}
static PyObject *Qt_VDSetSharpness(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- unsigned short sharpness;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ unsigned short sharpness;
#ifndef VDSetSharpness
- PyMac_PRECHECK(VDSetSharpness);
+ PyMac_PRECHECK(VDSetSharpness);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = VDSetSharpness(ci,
- &sharpness);
- _res = Py_BuildValue("lH",
- _rv,
- sharpness);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = VDSetSharpness(ci,
+ &sharpness);
+ _res = Py_BuildValue("lH",
+ _rv,
+ sharpness);
+ return _res;
}
static PyObject *Qt_VDSetSaturation(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- unsigned short saturation;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ unsigned short saturation;
#ifndef VDSetSaturation
- PyMac_PRECHECK(VDSetSaturation);
+ PyMac_PRECHECK(VDSetSaturation);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = VDSetSaturation(ci,
- &saturation);
- _res = Py_BuildValue("lH",
- _rv,
- saturation);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = VDSetSaturation(ci,
+ &saturation);
+ _res = Py_BuildValue("lH",
+ _rv,
+ saturation);
+ return _res;
}
static PyObject *Qt_VDGetContrast(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- unsigned short contrast;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ unsigned short contrast;
#ifndef VDGetContrast
- PyMac_PRECHECK(VDGetContrast);
+ PyMac_PRECHECK(VDGetContrast);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = VDGetContrast(ci,
- &contrast);
- _res = Py_BuildValue("lH",
- _rv,
- contrast);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = VDGetContrast(ci,
+ &contrast);
+ _res = Py_BuildValue("lH",
+ _rv,
+ contrast);
+ return _res;
}
static PyObject *Qt_VDGetHue(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- unsigned short hue;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ unsigned short hue;
#ifndef VDGetHue
- PyMac_PRECHECK(VDGetHue);
+ PyMac_PRECHECK(VDGetHue);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = VDGetHue(ci,
- &hue);
- _res = Py_BuildValue("lH",
- _rv,
- hue);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = VDGetHue(ci,
+ &hue);
+ _res = Py_BuildValue("lH",
+ _rv,
+ hue);
+ return _res;
}
static PyObject *Qt_VDGetSharpness(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- unsigned short sharpness;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ unsigned short sharpness;
#ifndef VDGetSharpness
- PyMac_PRECHECK(VDGetSharpness);
+ PyMac_PRECHECK(VDGetSharpness);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = VDGetSharpness(ci,
- &sharpness);
- _res = Py_BuildValue("lH",
- _rv,
- sharpness);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = VDGetSharpness(ci,
+ &sharpness);
+ _res = Py_BuildValue("lH",
+ _rv,
+ sharpness);
+ return _res;
}
static PyObject *Qt_VDGetSaturation(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- unsigned short saturation;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ unsigned short saturation;
#ifndef VDGetSaturation
- PyMac_PRECHECK(VDGetSaturation);
+ PyMac_PRECHECK(VDGetSaturation);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = VDGetSaturation(ci,
- &saturation);
- _res = Py_BuildValue("lH",
- _rv,
- saturation);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = VDGetSaturation(ci,
+ &saturation);
+ _res = Py_BuildValue("lH",
+ _rv,
+ saturation);
+ return _res;
}
static PyObject *Qt_VDGrabOneFrame(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
#ifndef VDGrabOneFrame
- PyMac_PRECHECK(VDGrabOneFrame);
+ PyMac_PRECHECK(VDGrabOneFrame);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = VDGrabOneFrame(ci);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = VDGrabOneFrame(ci);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_VDGetMaxAuxBuffer(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- PixMapHandle pm;
- Rect r;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ PixMapHandle pm;
+ Rect r;
#ifndef VDGetMaxAuxBuffer
- PyMac_PRECHECK(VDGetMaxAuxBuffer);
+ PyMac_PRECHECK(VDGetMaxAuxBuffer);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = VDGetMaxAuxBuffer(ci,
- &pm,
- &r);
- _res = Py_BuildValue("lO&O&",
- _rv,
- ResObj_New, pm,
- PyMac_BuildRect, &r);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = VDGetMaxAuxBuffer(ci,
+ &pm,
+ &r);
+ _res = Py_BuildValue("lO&O&",
+ _rv,
+ ResObj_New, pm,
+ PyMac_BuildRect, &r);
+ return _res;
}
static PyObject *Qt_VDGetCurrentFlags(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- long inputCurrentFlag;
- long outputCurrentFlag;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ long inputCurrentFlag;
+ long outputCurrentFlag;
#ifndef VDGetCurrentFlags
- PyMac_PRECHECK(VDGetCurrentFlags);
+ PyMac_PRECHECK(VDGetCurrentFlags);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = VDGetCurrentFlags(ci,
- &inputCurrentFlag,
- &outputCurrentFlag);
- _res = Py_BuildValue("lll",
- _rv,
- inputCurrentFlag,
- outputCurrentFlag);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = VDGetCurrentFlags(ci,
+ &inputCurrentFlag,
+ &outputCurrentFlag);
+ _res = Py_BuildValue("lll",
+ _rv,
+ inputCurrentFlag,
+ outputCurrentFlag);
+ return _res;
}
static PyObject *Qt_VDSetKeyColor(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- long index;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ long index;
#ifndef VDSetKeyColor
- PyMac_PRECHECK(VDSetKeyColor);
+ PyMac_PRECHECK(VDSetKeyColor);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &ci,
- &index))
- return NULL;
- _rv = VDSetKeyColor(ci,
- index);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &ci,
+ &index))
+ return NULL;
+ _rv = VDSetKeyColor(ci,
+ index);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_VDGetKeyColor(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- long index;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ long index;
#ifndef VDGetKeyColor
- PyMac_PRECHECK(VDGetKeyColor);
+ PyMac_PRECHECK(VDGetKeyColor);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = VDGetKeyColor(ci,
- &index);
- _res = Py_BuildValue("ll",
- _rv,
- index);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = VDGetKeyColor(ci,
+ &index);
+ _res = Py_BuildValue("ll",
+ _rv,
+ index);
+ return _res;
}
static PyObject *Qt_VDAddKeyColor(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- long index;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ long index;
#ifndef VDAddKeyColor
- PyMac_PRECHECK(VDAddKeyColor);
+ PyMac_PRECHECK(VDAddKeyColor);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = VDAddKeyColor(ci,
- &index);
- _res = Py_BuildValue("ll",
- _rv,
- index);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = VDAddKeyColor(ci,
+ &index);
+ _res = Py_BuildValue("ll",
+ _rv,
+ index);
+ return _res;
}
static PyObject *Qt_VDGetNextKeyColor(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- long index;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ long index;
#ifndef VDGetNextKeyColor
- PyMac_PRECHECK(VDGetNextKeyColor);
+ PyMac_PRECHECK(VDGetNextKeyColor);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &ci,
- &index))
- return NULL;
- _rv = VDGetNextKeyColor(ci,
- index);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &ci,
+ &index))
+ return NULL;
+ _rv = VDGetNextKeyColor(ci,
+ index);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_VDSetKeyColorRange(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- RGBColor minRGB;
- RGBColor maxRGB;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ RGBColor minRGB;
+ RGBColor maxRGB;
#ifndef VDSetKeyColorRange
- PyMac_PRECHECK(VDSetKeyColorRange);
+ PyMac_PRECHECK(VDSetKeyColorRange);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = VDSetKeyColorRange(ci,
- &minRGB,
- &maxRGB);
- _res = Py_BuildValue("lO&O&",
- _rv,
- QdRGB_New, &minRGB,
- QdRGB_New, &maxRGB);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = VDSetKeyColorRange(ci,
+ &minRGB,
+ &maxRGB);
+ _res = Py_BuildValue("lO&O&",
+ _rv,
+ QdRGB_New, &minRGB,
+ QdRGB_New, &maxRGB);
+ return _res;
}
static PyObject *Qt_VDGetKeyColorRange(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- RGBColor minRGB;
- RGBColor maxRGB;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ RGBColor minRGB;
+ RGBColor maxRGB;
#ifndef VDGetKeyColorRange
- PyMac_PRECHECK(VDGetKeyColorRange);
+ PyMac_PRECHECK(VDGetKeyColorRange);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = VDGetKeyColorRange(ci,
- &minRGB,
- &maxRGB);
- _res = Py_BuildValue("lO&O&",
- _rv,
- QdRGB_New, &minRGB,
- QdRGB_New, &maxRGB);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = VDGetKeyColorRange(ci,
+ &minRGB,
+ &maxRGB);
+ _res = Py_BuildValue("lO&O&",
+ _rv,
+ QdRGB_New, &minRGB,
+ QdRGB_New, &maxRGB);
+ return _res;
}
static PyObject *Qt_VDSetInputColorSpaceMode(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- short colorSpaceMode;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ short colorSpaceMode;
#ifndef VDSetInputColorSpaceMode
- PyMac_PRECHECK(VDSetInputColorSpaceMode);
+ PyMac_PRECHECK(VDSetInputColorSpaceMode);
#endif
- if (!PyArg_ParseTuple(_args, "O&h",
- CmpInstObj_Convert, &ci,
- &colorSpaceMode))
- return NULL;
- _rv = VDSetInputColorSpaceMode(ci,
- colorSpaceMode);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&h",
+ CmpInstObj_Convert, &ci,
+ &colorSpaceMode))
+ return NULL;
+ _rv = VDSetInputColorSpaceMode(ci,
+ colorSpaceMode);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_VDGetInputColorSpaceMode(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- short colorSpaceMode;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ short colorSpaceMode;
#ifndef VDGetInputColorSpaceMode
- PyMac_PRECHECK(VDGetInputColorSpaceMode);
+ PyMac_PRECHECK(VDGetInputColorSpaceMode);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = VDGetInputColorSpaceMode(ci,
- &colorSpaceMode);
- _res = Py_BuildValue("lh",
- _rv,
- colorSpaceMode);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = VDGetInputColorSpaceMode(ci,
+ &colorSpaceMode);
+ _res = Py_BuildValue("lh",
+ _rv,
+ colorSpaceMode);
+ return _res;
}
static PyObject *Qt_VDSetClipState(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- short clipEnable;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ short clipEnable;
#ifndef VDSetClipState
- PyMac_PRECHECK(VDSetClipState);
+ PyMac_PRECHECK(VDSetClipState);
#endif
- if (!PyArg_ParseTuple(_args, "O&h",
- CmpInstObj_Convert, &ci,
- &clipEnable))
- return NULL;
- _rv = VDSetClipState(ci,
- clipEnable);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&h",
+ CmpInstObj_Convert, &ci,
+ &clipEnable))
+ return NULL;
+ _rv = VDSetClipState(ci,
+ clipEnable);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_VDGetClipState(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- short clipEnable;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ short clipEnable;
#ifndef VDGetClipState
- PyMac_PRECHECK(VDGetClipState);
+ PyMac_PRECHECK(VDGetClipState);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = VDGetClipState(ci,
- &clipEnable);
- _res = Py_BuildValue("lh",
- _rv,
- clipEnable);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = VDGetClipState(ci,
+ &clipEnable);
+ _res = Py_BuildValue("lh",
+ _rv,
+ clipEnable);
+ return _res;
}
static PyObject *Qt_VDSetClipRgn(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- RgnHandle clipRegion;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ RgnHandle clipRegion;
#ifndef VDSetClipRgn
- PyMac_PRECHECK(VDSetClipRgn);
+ PyMac_PRECHECK(VDSetClipRgn);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &ci,
- ResObj_Convert, &clipRegion))
- return NULL;
- _rv = VDSetClipRgn(ci,
- clipRegion);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &ci,
+ ResObj_Convert, &clipRegion))
+ return NULL;
+ _rv = VDSetClipRgn(ci,
+ clipRegion);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_VDClearClipRgn(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- RgnHandle clipRegion;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ RgnHandle clipRegion;
#ifndef VDClearClipRgn
- PyMac_PRECHECK(VDClearClipRgn);
+ PyMac_PRECHECK(VDClearClipRgn);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &ci,
- ResObj_Convert, &clipRegion))
- return NULL;
- _rv = VDClearClipRgn(ci,
- clipRegion);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &ci,
+ ResObj_Convert, &clipRegion))
+ return NULL;
+ _rv = VDClearClipRgn(ci,
+ clipRegion);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_VDGetCLUTInUse(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- CTabHandle colorTableHandle;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ CTabHandle colorTableHandle;
#ifndef VDGetCLUTInUse
- PyMac_PRECHECK(VDGetCLUTInUse);
+ PyMac_PRECHECK(VDGetCLUTInUse);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = VDGetCLUTInUse(ci,
- &colorTableHandle);
- _res = Py_BuildValue("lO&",
- _rv,
- ResObj_New, colorTableHandle);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = VDGetCLUTInUse(ci,
+ &colorTableHandle);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ ResObj_New, colorTableHandle);
+ return _res;
}
static PyObject *Qt_VDSetPLLFilterType(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- short pllType;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ short pllType;
#ifndef VDSetPLLFilterType
- PyMac_PRECHECK(VDSetPLLFilterType);
+ PyMac_PRECHECK(VDSetPLLFilterType);
#endif
- if (!PyArg_ParseTuple(_args, "O&h",
- CmpInstObj_Convert, &ci,
- &pllType))
- return NULL;
- _rv = VDSetPLLFilterType(ci,
- pllType);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&h",
+ CmpInstObj_Convert, &ci,
+ &pllType))
+ return NULL;
+ _rv = VDSetPLLFilterType(ci,
+ pllType);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_VDGetPLLFilterType(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- short pllType;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ short pllType;
#ifndef VDGetPLLFilterType
- PyMac_PRECHECK(VDGetPLLFilterType);
+ PyMac_PRECHECK(VDGetPLLFilterType);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = VDGetPLLFilterType(ci,
- &pllType);
- _res = Py_BuildValue("lh",
- _rv,
- pllType);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = VDGetPLLFilterType(ci,
+ &pllType);
+ _res = Py_BuildValue("lh",
+ _rv,
+ pllType);
+ return _res;
}
static PyObject *Qt_VDGetMaskandValue(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- unsigned short blendLevel;
- long mask;
- long value;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ unsigned short blendLevel;
+ long mask;
+ long value;
#ifndef VDGetMaskandValue
- PyMac_PRECHECK(VDGetMaskandValue);
-#endif
- if (!PyArg_ParseTuple(_args, "O&H",
- CmpInstObj_Convert, &ci,
- &blendLevel))
- return NULL;
- _rv = VDGetMaskandValue(ci,
- blendLevel,
- &mask,
- &value);
- _res = Py_BuildValue("lll",
- _rv,
- mask,
- value);
- return _res;
+ PyMac_PRECHECK(VDGetMaskandValue);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&H",
+ CmpInstObj_Convert, &ci,
+ &blendLevel))
+ return NULL;
+ _rv = VDGetMaskandValue(ci,
+ blendLevel,
+ &mask,
+ &value);
+ _res = Py_BuildValue("lll",
+ _rv,
+ mask,
+ value);
+ return _res;
}
static PyObject *Qt_VDSetMasterBlendLevel(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- unsigned short blendLevel;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ unsigned short blendLevel;
#ifndef VDSetMasterBlendLevel
- PyMac_PRECHECK(VDSetMasterBlendLevel);
+ PyMac_PRECHECK(VDSetMasterBlendLevel);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = VDSetMasterBlendLevel(ci,
- &blendLevel);
- _res = Py_BuildValue("lH",
- _rv,
- blendLevel);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = VDSetMasterBlendLevel(ci,
+ &blendLevel);
+ _res = Py_BuildValue("lH",
+ _rv,
+ blendLevel);
+ return _res;
}
static PyObject *Qt_VDSetPlayThruOnOff(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- short state;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ short state;
#ifndef VDSetPlayThruOnOff
- PyMac_PRECHECK(VDSetPlayThruOnOff);
+ PyMac_PRECHECK(VDSetPlayThruOnOff);
#endif
- if (!PyArg_ParseTuple(_args, "O&h",
- CmpInstObj_Convert, &ci,
- &state))
- return NULL;
- _rv = VDSetPlayThruOnOff(ci,
- state);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&h",
+ CmpInstObj_Convert, &ci,
+ &state))
+ return NULL;
+ _rv = VDSetPlayThruOnOff(ci,
+ state);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_VDSetFieldPreference(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- short fieldFlag;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ short fieldFlag;
#ifndef VDSetFieldPreference
- PyMac_PRECHECK(VDSetFieldPreference);
+ PyMac_PRECHECK(VDSetFieldPreference);
#endif
- if (!PyArg_ParseTuple(_args, "O&h",
- CmpInstObj_Convert, &ci,
- &fieldFlag))
- return NULL;
- _rv = VDSetFieldPreference(ci,
- fieldFlag);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&h",
+ CmpInstObj_Convert, &ci,
+ &fieldFlag))
+ return NULL;
+ _rv = VDSetFieldPreference(ci,
+ fieldFlag);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_VDGetFieldPreference(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- short fieldFlag;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ short fieldFlag;
#ifndef VDGetFieldPreference
- PyMac_PRECHECK(VDGetFieldPreference);
+ PyMac_PRECHECK(VDGetFieldPreference);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = VDGetFieldPreference(ci,
- &fieldFlag);
- _res = Py_BuildValue("lh",
- _rv,
- fieldFlag);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = VDGetFieldPreference(ci,
+ &fieldFlag);
+ _res = Py_BuildValue("lh",
+ _rv,
+ fieldFlag);
+ return _res;
}
static PyObject *Qt_VDPreflightGlobalRect(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- GrafPtr theWindow;
- Rect globalRect;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ GrafPtr theWindow;
+ Rect globalRect;
#ifndef VDPreflightGlobalRect
- PyMac_PRECHECK(VDPreflightGlobalRect);
+ PyMac_PRECHECK(VDPreflightGlobalRect);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &ci,
- GrafObj_Convert, &theWindow))
- return NULL;
- _rv = VDPreflightGlobalRect(ci,
- theWindow,
- &globalRect);
- _res = Py_BuildValue("lO&",
- _rv,
- PyMac_BuildRect, &globalRect);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &ci,
+ GrafObj_Convert, &theWindow))
+ return NULL;
+ _rv = VDPreflightGlobalRect(ci,
+ theWindow,
+ &globalRect);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ PyMac_BuildRect, &globalRect);
+ return _res;
}
static PyObject *Qt_VDSetPlayThruGlobalRect(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- GrafPtr theWindow;
- Rect globalRect;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ GrafPtr theWindow;
+ Rect globalRect;
#ifndef VDSetPlayThruGlobalRect
- PyMac_PRECHECK(VDSetPlayThruGlobalRect);
+ PyMac_PRECHECK(VDSetPlayThruGlobalRect);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &ci,
- GrafObj_Convert, &theWindow))
- return NULL;
- _rv = VDSetPlayThruGlobalRect(ci,
- theWindow,
- &globalRect);
- _res = Py_BuildValue("lO&",
- _rv,
- PyMac_BuildRect, &globalRect);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &ci,
+ GrafObj_Convert, &theWindow))
+ return NULL;
+ _rv = VDSetPlayThruGlobalRect(ci,
+ theWindow,
+ &globalRect);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ PyMac_BuildRect, &globalRect);
+ return _res;
}
static PyObject *Qt_VDSetBlackLevelValue(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- unsigned short blackLevel;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ unsigned short blackLevel;
#ifndef VDSetBlackLevelValue
- PyMac_PRECHECK(VDSetBlackLevelValue);
+ PyMac_PRECHECK(VDSetBlackLevelValue);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = VDSetBlackLevelValue(ci,
- &blackLevel);
- _res = Py_BuildValue("lH",
- _rv,
- blackLevel);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = VDSetBlackLevelValue(ci,
+ &blackLevel);
+ _res = Py_BuildValue("lH",
+ _rv,
+ blackLevel);
+ return _res;
}
static PyObject *Qt_VDGetBlackLevelValue(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- unsigned short blackLevel;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ unsigned short blackLevel;
#ifndef VDGetBlackLevelValue
- PyMac_PRECHECK(VDGetBlackLevelValue);
+ PyMac_PRECHECK(VDGetBlackLevelValue);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = VDGetBlackLevelValue(ci,
- &blackLevel);
- _res = Py_BuildValue("lH",
- _rv,
- blackLevel);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = VDGetBlackLevelValue(ci,
+ &blackLevel);
+ _res = Py_BuildValue("lH",
+ _rv,
+ blackLevel);
+ return _res;
}
static PyObject *Qt_VDSetWhiteLevelValue(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- unsigned short whiteLevel;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ unsigned short whiteLevel;
#ifndef VDSetWhiteLevelValue
- PyMac_PRECHECK(VDSetWhiteLevelValue);
+ PyMac_PRECHECK(VDSetWhiteLevelValue);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = VDSetWhiteLevelValue(ci,
- &whiteLevel);
- _res = Py_BuildValue("lH",
- _rv,
- whiteLevel);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = VDSetWhiteLevelValue(ci,
+ &whiteLevel);
+ _res = Py_BuildValue("lH",
+ _rv,
+ whiteLevel);
+ return _res;
}
static PyObject *Qt_VDGetWhiteLevelValue(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- unsigned short whiteLevel;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ unsigned short whiteLevel;
#ifndef VDGetWhiteLevelValue
- PyMac_PRECHECK(VDGetWhiteLevelValue);
+ PyMac_PRECHECK(VDGetWhiteLevelValue);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = VDGetWhiteLevelValue(ci,
- &whiteLevel);
- _res = Py_BuildValue("lH",
- _rv,
- whiteLevel);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = VDGetWhiteLevelValue(ci,
+ &whiteLevel);
+ _res = Py_BuildValue("lH",
+ _rv,
+ whiteLevel);
+ return _res;
}
static PyObject *Qt_VDGetVideoDefaults(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- unsigned short blackLevel;
- unsigned short whiteLevel;
- unsigned short brightness;
- unsigned short hue;
- unsigned short saturation;
- unsigned short contrast;
- unsigned short sharpness;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ unsigned short blackLevel;
+ unsigned short whiteLevel;
+ unsigned short brightness;
+ unsigned short hue;
+ unsigned short saturation;
+ unsigned short contrast;
+ unsigned short sharpness;
#ifndef VDGetVideoDefaults
- PyMac_PRECHECK(VDGetVideoDefaults);
-#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = VDGetVideoDefaults(ci,
- &blackLevel,
- &whiteLevel,
- &brightness,
- &hue,
- &saturation,
- &contrast,
- &sharpness);
- _res = Py_BuildValue("lHHHHHHH",
- _rv,
- blackLevel,
- whiteLevel,
- brightness,
- hue,
- saturation,
- contrast,
- sharpness);
- return _res;
+ PyMac_PRECHECK(VDGetVideoDefaults);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = VDGetVideoDefaults(ci,
+ &blackLevel,
+ &whiteLevel,
+ &brightness,
+ &hue,
+ &saturation,
+ &contrast,
+ &sharpness);
+ _res = Py_BuildValue("lHHHHHHH",
+ _rv,
+ blackLevel,
+ whiteLevel,
+ brightness,
+ hue,
+ saturation,
+ contrast,
+ sharpness);
+ return _res;
}
static PyObject *Qt_VDGetNumberOfInputs(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- short inputs;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ short inputs;
#ifndef VDGetNumberOfInputs
- PyMac_PRECHECK(VDGetNumberOfInputs);
+ PyMac_PRECHECK(VDGetNumberOfInputs);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = VDGetNumberOfInputs(ci,
- &inputs);
- _res = Py_BuildValue("lh",
- _rv,
- inputs);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = VDGetNumberOfInputs(ci,
+ &inputs);
+ _res = Py_BuildValue("lh",
+ _rv,
+ inputs);
+ return _res;
}
static PyObject *Qt_VDGetInputFormat(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- short input;
- short format;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ short input;
+ short format;
#ifndef VDGetInputFormat
- PyMac_PRECHECK(VDGetInputFormat);
+ PyMac_PRECHECK(VDGetInputFormat);
#endif
- if (!PyArg_ParseTuple(_args, "O&h",
- CmpInstObj_Convert, &ci,
- &input))
- return NULL;
- _rv = VDGetInputFormat(ci,
- input,
- &format);
- _res = Py_BuildValue("lh",
- _rv,
- format);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&h",
+ CmpInstObj_Convert, &ci,
+ &input))
+ return NULL;
+ _rv = VDGetInputFormat(ci,
+ input,
+ &format);
+ _res = Py_BuildValue("lh",
+ _rv,
+ format);
+ return _res;
}
static PyObject *Qt_VDSetInput(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- short input;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ short input;
#ifndef VDSetInput
- PyMac_PRECHECK(VDSetInput);
+ PyMac_PRECHECK(VDSetInput);
#endif
- if (!PyArg_ParseTuple(_args, "O&h",
- CmpInstObj_Convert, &ci,
- &input))
- return NULL;
- _rv = VDSetInput(ci,
- input);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&h",
+ CmpInstObj_Convert, &ci,
+ &input))
+ return NULL;
+ _rv = VDSetInput(ci,
+ input);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_VDGetInput(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- short input;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ short input;
#ifndef VDGetInput
- PyMac_PRECHECK(VDGetInput);
+ PyMac_PRECHECK(VDGetInput);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = VDGetInput(ci,
- &input);
- _res = Py_BuildValue("lh",
- _rv,
- input);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = VDGetInput(ci,
+ &input);
+ _res = Py_BuildValue("lh",
+ _rv,
+ input);
+ return _res;
}
static PyObject *Qt_VDSetInputStandard(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- short inputStandard;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ short inputStandard;
#ifndef VDSetInputStandard
- PyMac_PRECHECK(VDSetInputStandard);
+ PyMac_PRECHECK(VDSetInputStandard);
#endif
- if (!PyArg_ParseTuple(_args, "O&h",
- CmpInstObj_Convert, &ci,
- &inputStandard))
- return NULL;
- _rv = VDSetInputStandard(ci,
- inputStandard);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&h",
+ CmpInstObj_Convert, &ci,
+ &inputStandard))
+ return NULL;
+ _rv = VDSetInputStandard(ci,
+ inputStandard);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_VDSetupBuffers(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- VdigBufferRecListHandle bufferList;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ VdigBufferRecListHandle bufferList;
#ifndef VDSetupBuffers
- PyMac_PRECHECK(VDSetupBuffers);
+ PyMac_PRECHECK(VDSetupBuffers);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &ci,
- ResObj_Convert, &bufferList))
- return NULL;
- _rv = VDSetupBuffers(ci,
- bufferList);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &ci,
+ ResObj_Convert, &bufferList))
+ return NULL;
+ _rv = VDSetupBuffers(ci,
+ bufferList);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_VDGrabOneFrameAsync(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- short buffer;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ short buffer;
#ifndef VDGrabOneFrameAsync
- PyMac_PRECHECK(VDGrabOneFrameAsync);
+ PyMac_PRECHECK(VDGrabOneFrameAsync);
#endif
- if (!PyArg_ParseTuple(_args, "O&h",
- CmpInstObj_Convert, &ci,
- &buffer))
- return NULL;
- _rv = VDGrabOneFrameAsync(ci,
- buffer);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&h",
+ CmpInstObj_Convert, &ci,
+ &buffer))
+ return NULL;
+ _rv = VDGrabOneFrameAsync(ci,
+ buffer);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_VDDone(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- short buffer;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ short buffer;
#ifndef VDDone
- PyMac_PRECHECK(VDDone);
+ PyMac_PRECHECK(VDDone);
#endif
- if (!PyArg_ParseTuple(_args, "O&h",
- CmpInstObj_Convert, &ci,
- &buffer))
- return NULL;
- _rv = VDDone(ci,
- buffer);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&h",
+ CmpInstObj_Convert, &ci,
+ &buffer))
+ return NULL;
+ _rv = VDDone(ci,
+ buffer);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_VDSetCompression(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- OSType compressType;
- short depth;
- Rect bounds;
- CodecQ spatialQuality;
- CodecQ temporalQuality;
- long keyFrameRate;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ OSType compressType;
+ short depth;
+ Rect bounds;
+ CodecQ spatialQuality;
+ CodecQ temporalQuality;
+ long keyFrameRate;
#ifndef VDSetCompression
- PyMac_PRECHECK(VDSetCompression);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&hlll",
- CmpInstObj_Convert, &ci,
- PyMac_GetOSType, &compressType,
- &depth,
- &spatialQuality,
- &temporalQuality,
- &keyFrameRate))
- return NULL;
- _rv = VDSetCompression(ci,
- compressType,
- depth,
- &bounds,
- spatialQuality,
- temporalQuality,
- keyFrameRate);
- _res = Py_BuildValue("lO&",
- _rv,
- PyMac_BuildRect, &bounds);
- return _res;
+ PyMac_PRECHECK(VDSetCompression);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&hlll",
+ CmpInstObj_Convert, &ci,
+ PyMac_GetOSType, &compressType,
+ &depth,
+ &spatialQuality,
+ &temporalQuality,
+ &keyFrameRate))
+ return NULL;
+ _rv = VDSetCompression(ci,
+ compressType,
+ depth,
+ &bounds,
+ spatialQuality,
+ temporalQuality,
+ keyFrameRate);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ PyMac_BuildRect, &bounds);
+ return _res;
}
static PyObject *Qt_VDCompressOneFrameAsync(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
#ifndef VDCompressOneFrameAsync
- PyMac_PRECHECK(VDCompressOneFrameAsync);
+ PyMac_PRECHECK(VDCompressOneFrameAsync);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = VDCompressOneFrameAsync(ci);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = VDCompressOneFrameAsync(ci);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_VDGetImageDescription(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- ImageDescriptionHandle desc;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ ImageDescriptionHandle desc;
#ifndef VDGetImageDescription
- PyMac_PRECHECK(VDGetImageDescription);
+ PyMac_PRECHECK(VDGetImageDescription);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &ci,
- ResObj_Convert, &desc))
- return NULL;
- _rv = VDGetImageDescription(ci,
- desc);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &ci,
+ ResObj_Convert, &desc))
+ return NULL;
+ _rv = VDGetImageDescription(ci,
+ desc);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_VDResetCompressSequence(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
#ifndef VDResetCompressSequence
- PyMac_PRECHECK(VDResetCompressSequence);
+ PyMac_PRECHECK(VDResetCompressSequence);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = VDResetCompressSequence(ci);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = VDResetCompressSequence(ci);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_VDSetCompressionOnOff(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- Boolean state;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ Boolean state;
#ifndef VDSetCompressionOnOff
- PyMac_PRECHECK(VDSetCompressionOnOff);
+ PyMac_PRECHECK(VDSetCompressionOnOff);
#endif
- if (!PyArg_ParseTuple(_args, "O&b",
- CmpInstObj_Convert, &ci,
- &state))
- return NULL;
- _rv = VDSetCompressionOnOff(ci,
- state);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&b",
+ CmpInstObj_Convert, &ci,
+ &state))
+ return NULL;
+ _rv = VDSetCompressionOnOff(ci,
+ state);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_VDGetCompressionTypes(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- VDCompressionListHandle h;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ VDCompressionListHandle h;
#ifndef VDGetCompressionTypes
- PyMac_PRECHECK(VDGetCompressionTypes);
+ PyMac_PRECHECK(VDGetCompressionTypes);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &ci,
- ResObj_Convert, &h))
- return NULL;
- _rv = VDGetCompressionTypes(ci,
- h);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &ci,
+ ResObj_Convert, &h))
+ return NULL;
+ _rv = VDGetCompressionTypes(ci,
+ h);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_VDSetTimeBase(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- TimeBase t;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ TimeBase t;
#ifndef VDSetTimeBase
- PyMac_PRECHECK(VDSetTimeBase);
+ PyMac_PRECHECK(VDSetTimeBase);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &ci,
- TimeBaseObj_Convert, &t))
- return NULL;
- _rv = VDSetTimeBase(ci,
- t);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &ci,
+ TimeBaseObj_Convert, &t))
+ return NULL;
+ _rv = VDSetTimeBase(ci,
+ t);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_VDSetFrameRate(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- Fixed framesPerSecond;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ Fixed framesPerSecond;
#ifndef VDSetFrameRate
- PyMac_PRECHECK(VDSetFrameRate);
+ PyMac_PRECHECK(VDSetFrameRate);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &ci,
- PyMac_GetFixed, &framesPerSecond))
- return NULL;
- _rv = VDSetFrameRate(ci,
- framesPerSecond);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &ci,
+ PyMac_GetFixed, &framesPerSecond))
+ return NULL;
+ _rv = VDSetFrameRate(ci,
+ framesPerSecond);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_VDGetDataRate(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- long milliSecPerFrame;
- Fixed framesPerSecond;
- long bytesPerSecond;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ long milliSecPerFrame;
+ Fixed framesPerSecond;
+ long bytesPerSecond;
#ifndef VDGetDataRate
- PyMac_PRECHECK(VDGetDataRate);
-#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = VDGetDataRate(ci,
- &milliSecPerFrame,
- &framesPerSecond,
- &bytesPerSecond);
- _res = Py_BuildValue("llO&l",
- _rv,
- milliSecPerFrame,
- PyMac_BuildFixed, framesPerSecond,
- bytesPerSecond);
- return _res;
+ PyMac_PRECHECK(VDGetDataRate);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = VDGetDataRate(ci,
+ &milliSecPerFrame,
+ &framesPerSecond,
+ &bytesPerSecond);
+ _res = Py_BuildValue("llO&l",
+ _rv,
+ milliSecPerFrame,
+ PyMac_BuildFixed, framesPerSecond,
+ bytesPerSecond);
+ return _res;
}
static PyObject *Qt_VDGetSoundInputDriver(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- Str255 soundDriverName;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ Str255 soundDriverName;
#ifndef VDGetSoundInputDriver
- PyMac_PRECHECK(VDGetSoundInputDriver);
+ PyMac_PRECHECK(VDGetSoundInputDriver);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &ci,
- PyMac_GetStr255, soundDriverName))
- return NULL;
- _rv = VDGetSoundInputDriver(ci,
- soundDriverName);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &ci,
+ PyMac_GetStr255, soundDriverName))
+ return NULL;
+ _rv = VDGetSoundInputDriver(ci,
+ soundDriverName);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_VDGetDMADepths(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- long depthArray;
- long preferredDepth;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ long depthArray;
+ long preferredDepth;
#ifndef VDGetDMADepths
- PyMac_PRECHECK(VDGetDMADepths);
+ PyMac_PRECHECK(VDGetDMADepths);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = VDGetDMADepths(ci,
- &depthArray,
- &preferredDepth);
- _res = Py_BuildValue("lll",
- _rv,
- depthArray,
- preferredDepth);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = VDGetDMADepths(ci,
+ &depthArray,
+ &preferredDepth);
+ _res = Py_BuildValue("lll",
+ _rv,
+ depthArray,
+ preferredDepth);
+ return _res;
}
static PyObject *Qt_VDGetPreferredTimeScale(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- TimeScale preferred;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ TimeScale preferred;
#ifndef VDGetPreferredTimeScale
- PyMac_PRECHECK(VDGetPreferredTimeScale);
+ PyMac_PRECHECK(VDGetPreferredTimeScale);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = VDGetPreferredTimeScale(ci,
- &preferred);
- _res = Py_BuildValue("ll",
- _rv,
- preferred);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = VDGetPreferredTimeScale(ci,
+ &preferred);
+ _res = Py_BuildValue("ll",
+ _rv,
+ preferred);
+ return _res;
}
static PyObject *Qt_VDReleaseAsyncBuffers(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
#ifndef VDReleaseAsyncBuffers
- PyMac_PRECHECK(VDReleaseAsyncBuffers);
+ PyMac_PRECHECK(VDReleaseAsyncBuffers);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = VDReleaseAsyncBuffers(ci);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = VDReleaseAsyncBuffers(ci);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_VDSetDataRate(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- long bytesPerSecond;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ long bytesPerSecond;
#ifndef VDSetDataRate
- PyMac_PRECHECK(VDSetDataRate);
+ PyMac_PRECHECK(VDSetDataRate);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &ci,
- &bytesPerSecond))
- return NULL;
- _rv = VDSetDataRate(ci,
- bytesPerSecond);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &ci,
+ &bytesPerSecond))
+ return NULL;
+ _rv = VDSetDataRate(ci,
+ bytesPerSecond);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_VDGetTimeCode(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- TimeRecord atTime;
- void * timeCodeFormat;
- void * timeCodeTime;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ TimeRecord atTime;
+ void * timeCodeFormat;
+ void * timeCodeTime;
#ifndef VDGetTimeCode
- PyMac_PRECHECK(VDGetTimeCode);
-#endif
- if (!PyArg_ParseTuple(_args, "O&ss",
- CmpInstObj_Convert, &ci,
- &timeCodeFormat,
- &timeCodeTime))
- return NULL;
- _rv = VDGetTimeCode(ci,
- &atTime,
- timeCodeFormat,
- timeCodeTime);
- _res = Py_BuildValue("lO&",
- _rv,
- QtTimeRecord_New, &atTime);
- return _res;
+ PyMac_PRECHECK(VDGetTimeCode);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&ss",
+ CmpInstObj_Convert, &ci,
+ &timeCodeFormat,
+ &timeCodeTime))
+ return NULL;
+ _rv = VDGetTimeCode(ci,
+ &atTime,
+ timeCodeFormat,
+ timeCodeTime);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ QtTimeRecord_New, &atTime);
+ return _res;
}
static PyObject *Qt_VDUseSafeBuffers(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- Boolean useSafeBuffers;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ Boolean useSafeBuffers;
#ifndef VDUseSafeBuffers
- PyMac_PRECHECK(VDUseSafeBuffers);
+ PyMac_PRECHECK(VDUseSafeBuffers);
#endif
- if (!PyArg_ParseTuple(_args, "O&b",
- CmpInstObj_Convert, &ci,
- &useSafeBuffers))
- return NULL;
- _rv = VDUseSafeBuffers(ci,
- useSafeBuffers);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&b",
+ CmpInstObj_Convert, &ci,
+ &useSafeBuffers))
+ return NULL;
+ _rv = VDUseSafeBuffers(ci,
+ useSafeBuffers);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_VDGetSoundInputSource(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- long videoInput;
- long soundInput;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ long videoInput;
+ long soundInput;
#ifndef VDGetSoundInputSource
- PyMac_PRECHECK(VDGetSoundInputSource);
+ PyMac_PRECHECK(VDGetSoundInputSource);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &ci,
- &videoInput))
- return NULL;
- _rv = VDGetSoundInputSource(ci,
- videoInput,
- &soundInput);
- _res = Py_BuildValue("ll",
- _rv,
- soundInput);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &ci,
+ &videoInput))
+ return NULL;
+ _rv = VDGetSoundInputSource(ci,
+ videoInput,
+ &soundInput);
+ _res = Py_BuildValue("ll",
+ _rv,
+ soundInput);
+ return _res;
}
static PyObject *Qt_VDGetCompressionTime(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- OSType compressionType;
- short depth;
- Rect srcRect;
- CodecQ spatialQuality;
- CodecQ temporalQuality;
- unsigned long compressTime;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ OSType compressionType;
+ short depth;
+ Rect srcRect;
+ CodecQ spatialQuality;
+ CodecQ temporalQuality;
+ unsigned long compressTime;
#ifndef VDGetCompressionTime
- PyMac_PRECHECK(VDGetCompressionTime);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&h",
- CmpInstObj_Convert, &ci,
- PyMac_GetOSType, &compressionType,
- &depth))
- return NULL;
- _rv = VDGetCompressionTime(ci,
- compressionType,
- depth,
- &srcRect,
- &spatialQuality,
- &temporalQuality,
- &compressTime);
- _res = Py_BuildValue("lO&lll",
- _rv,
- PyMac_BuildRect, &srcRect,
- spatialQuality,
- temporalQuality,
- compressTime);
- return _res;
+ PyMac_PRECHECK(VDGetCompressionTime);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&h",
+ CmpInstObj_Convert, &ci,
+ PyMac_GetOSType, &compressionType,
+ &depth))
+ return NULL;
+ _rv = VDGetCompressionTime(ci,
+ compressionType,
+ depth,
+ &srcRect,
+ &spatialQuality,
+ &temporalQuality,
+ &compressTime);
+ _res = Py_BuildValue("lO&lll",
+ _rv,
+ PyMac_BuildRect, &srcRect,
+ spatialQuality,
+ temporalQuality,
+ compressTime);
+ return _res;
}
static PyObject *Qt_VDSetPreferredPacketSize(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- long preferredPacketSizeInBytes;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ long preferredPacketSizeInBytes;
#ifndef VDSetPreferredPacketSize
- PyMac_PRECHECK(VDSetPreferredPacketSize);
+ PyMac_PRECHECK(VDSetPreferredPacketSize);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &ci,
- &preferredPacketSizeInBytes))
- return NULL;
- _rv = VDSetPreferredPacketSize(ci,
- preferredPacketSizeInBytes);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &ci,
+ &preferredPacketSizeInBytes))
+ return NULL;
+ _rv = VDSetPreferredPacketSize(ci,
+ preferredPacketSizeInBytes);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_VDSetPreferredImageDimensions(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- long width;
- long height;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ long width;
+ long height;
#ifndef VDSetPreferredImageDimensions
- PyMac_PRECHECK(VDSetPreferredImageDimensions);
+ PyMac_PRECHECK(VDSetPreferredImageDimensions);
#endif
- if (!PyArg_ParseTuple(_args, "O&ll",
- CmpInstObj_Convert, &ci,
- &width,
- &height))
- return NULL;
- _rv = VDSetPreferredImageDimensions(ci,
- width,
- height);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&ll",
+ CmpInstObj_Convert, &ci,
+ &width,
+ &height))
+ return NULL;
+ _rv = VDSetPreferredImageDimensions(ci,
+ width,
+ height);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_VDGetPreferredImageDimensions(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- long width;
- long height;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ long width;
+ long height;
#ifndef VDGetPreferredImageDimensions
- PyMac_PRECHECK(VDGetPreferredImageDimensions);
+ PyMac_PRECHECK(VDGetPreferredImageDimensions);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = VDGetPreferredImageDimensions(ci,
- &width,
- &height);
- _res = Py_BuildValue("lll",
- _rv,
- width,
- height);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = VDGetPreferredImageDimensions(ci,
+ &width,
+ &height);
+ _res = Py_BuildValue("lll",
+ _rv,
+ width,
+ height);
+ return _res;
}
static PyObject *Qt_VDGetInputName(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- long videoInput;
- Str255 name;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ long videoInput;
+ Str255 name;
#ifndef VDGetInputName
- PyMac_PRECHECK(VDGetInputName);
+ PyMac_PRECHECK(VDGetInputName);
#endif
- if (!PyArg_ParseTuple(_args, "O&lO&",
- CmpInstObj_Convert, &ci,
- &videoInput,
- PyMac_GetStr255, name))
- return NULL;
- _rv = VDGetInputName(ci,
- videoInput,
- name);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&lO&",
+ CmpInstObj_Convert, &ci,
+ &videoInput,
+ PyMac_GetStr255, name))
+ return NULL;
+ _rv = VDGetInputName(ci,
+ videoInput,
+ name);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_VDSetDestinationPort(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- CGrafPtr destPort;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ CGrafPtr destPort;
#ifndef VDSetDestinationPort
- PyMac_PRECHECK(VDSetDestinationPort);
+ PyMac_PRECHECK(VDSetDestinationPort);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &ci,
- GrafObj_Convert, &destPort))
- return NULL;
- _rv = VDSetDestinationPort(ci,
- destPort);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &ci,
+ GrafObj_Convert, &destPort))
+ return NULL;
+ _rv = VDSetDestinationPort(ci,
+ destPort);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_VDGetDeviceNameAndFlags(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- Str255 outName;
- UInt32 outNameFlags;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ Str255 outName;
+ UInt32 outNameFlags;
#ifndef VDGetDeviceNameAndFlags
- PyMac_PRECHECK(VDGetDeviceNameAndFlags);
+ PyMac_PRECHECK(VDGetDeviceNameAndFlags);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &ci,
- PyMac_GetStr255, outName))
- return NULL;
- _rv = VDGetDeviceNameAndFlags(ci,
- outName,
- &outNameFlags);
- _res = Py_BuildValue("ll",
- _rv,
- outNameFlags);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &ci,
+ PyMac_GetStr255, outName))
+ return NULL;
+ _rv = VDGetDeviceNameAndFlags(ci,
+ outName,
+ &outNameFlags);
+ _res = Py_BuildValue("ll",
+ _rv,
+ outNameFlags);
+ return _res;
}
static PyObject *Qt_VDCaptureStateChanging(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- VideoDigitizerComponent ci;
- UInt32 inStateFlags;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ VideoDigitizerComponent ci;
+ UInt32 inStateFlags;
#ifndef VDCaptureStateChanging
- PyMac_PRECHECK(VDCaptureStateChanging);
+ PyMac_PRECHECK(VDCaptureStateChanging);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &ci,
- &inStateFlags))
- return NULL;
- _rv = VDCaptureStateChanging(ci,
- inStateFlags);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &ci,
+ &inStateFlags))
+ return NULL;
+ _rv = VDCaptureStateChanging(ci,
+ inStateFlags);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_XMLParseGetDetailedParseError(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- ComponentInstance aParser;
- long errorLine;
- StringPtr errDesc;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ ComponentInstance aParser;
+ long errorLine;
+ StringPtr errDesc;
#ifndef XMLParseGetDetailedParseError
- PyMac_PRECHECK(XMLParseGetDetailedParseError);
+ PyMac_PRECHECK(XMLParseGetDetailedParseError);
#endif
- if (!PyArg_ParseTuple(_args, "O&s",
- CmpInstObj_Convert, &aParser,
- &errDesc))
- return NULL;
- _rv = XMLParseGetDetailedParseError(aParser,
- &errorLine,
- errDesc);
- _res = Py_BuildValue("ll",
- _rv,
- errorLine);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&s",
+ CmpInstObj_Convert, &aParser,
+ &errDesc))
+ return NULL;
+ _rv = XMLParseGetDetailedParseError(aParser,
+ &errorLine,
+ errDesc);
+ _res = Py_BuildValue("ll",
+ _rv,
+ errorLine);
+ return _res;
}
static PyObject *Qt_XMLParseAddElement(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- ComponentInstance aParser;
- char elementName;
- UInt32 nameSpaceID;
- UInt32 elementID;
- long elementFlags;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ ComponentInstance aParser;
+ char elementName;
+ UInt32 nameSpaceID;
+ UInt32 elementID;
+ long elementFlags;
#ifndef XMLParseAddElement
- PyMac_PRECHECK(XMLParseAddElement);
-#endif
- if (!PyArg_ParseTuple(_args, "O&ll",
- CmpInstObj_Convert, &aParser,
- &nameSpaceID,
- &elementFlags))
- return NULL;
- _rv = XMLParseAddElement(aParser,
- &elementName,
- nameSpaceID,
- &elementID,
- elementFlags);
- _res = Py_BuildValue("lcl",
- _rv,
- elementName,
- elementID);
- return _res;
+ PyMac_PRECHECK(XMLParseAddElement);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&ll",
+ CmpInstObj_Convert, &aParser,
+ &nameSpaceID,
+ &elementFlags))
+ return NULL;
+ _rv = XMLParseAddElement(aParser,
+ &elementName,
+ nameSpaceID,
+ &elementID,
+ elementFlags);
+ _res = Py_BuildValue("lcl",
+ _rv,
+ elementName,
+ elementID);
+ return _res;
}
static PyObject *Qt_XMLParseAddAttribute(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- ComponentInstance aParser;
- UInt32 elementID;
- UInt32 nameSpaceID;
- char attributeName;
- UInt32 attributeID;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ ComponentInstance aParser;
+ UInt32 elementID;
+ UInt32 nameSpaceID;
+ char attributeName;
+ UInt32 attributeID;
#ifndef XMLParseAddAttribute
- PyMac_PRECHECK(XMLParseAddAttribute);
-#endif
- if (!PyArg_ParseTuple(_args, "O&ll",
- CmpInstObj_Convert, &aParser,
- &elementID,
- &nameSpaceID))
- return NULL;
- _rv = XMLParseAddAttribute(aParser,
- elementID,
- nameSpaceID,
- &attributeName,
- &attributeID);
- _res = Py_BuildValue("lcl",
- _rv,
- attributeName,
- attributeID);
- return _res;
+ PyMac_PRECHECK(XMLParseAddAttribute);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&ll",
+ CmpInstObj_Convert, &aParser,
+ &elementID,
+ &nameSpaceID))
+ return NULL;
+ _rv = XMLParseAddAttribute(aParser,
+ elementID,
+ nameSpaceID,
+ &attributeName,
+ &attributeID);
+ _res = Py_BuildValue("lcl",
+ _rv,
+ attributeName,
+ attributeID);
+ return _res;
}
static PyObject *Qt_XMLParseAddMultipleAttributes(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- ComponentInstance aParser;
- UInt32 elementID;
- UInt32 nameSpaceIDs;
- char attributeNames;
- UInt32 attributeIDs;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ ComponentInstance aParser;
+ UInt32 elementID;
+ UInt32 nameSpaceIDs;
+ char attributeNames;
+ UInt32 attributeIDs;
#ifndef XMLParseAddMultipleAttributes
- PyMac_PRECHECK(XMLParseAddMultipleAttributes);
-#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &aParser,
- &elementID))
- return NULL;
- _rv = XMLParseAddMultipleAttributes(aParser,
- elementID,
- &nameSpaceIDs,
- &attributeNames,
- &attributeIDs);
- _res = Py_BuildValue("llcl",
- _rv,
- nameSpaceIDs,
- attributeNames,
- attributeIDs);
- return _res;
+ PyMac_PRECHECK(XMLParseAddMultipleAttributes);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &aParser,
+ &elementID))
+ return NULL;
+ _rv = XMLParseAddMultipleAttributes(aParser,
+ elementID,
+ &nameSpaceIDs,
+ &attributeNames,
+ &attributeIDs);
+ _res = Py_BuildValue("llcl",
+ _rv,
+ nameSpaceIDs,
+ attributeNames,
+ attributeIDs);
+ return _res;
}
static PyObject *Qt_XMLParseAddAttributeAndValue(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- ComponentInstance aParser;
- UInt32 elementID;
- UInt32 nameSpaceID;
- char attributeName;
- UInt32 attributeID;
- UInt32 attributeValueKind;
- void * attributeValueKindInfo;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ ComponentInstance aParser;
+ UInt32 elementID;
+ UInt32 nameSpaceID;
+ char attributeName;
+ UInt32 attributeID;
+ UInt32 attributeValueKind;
+ void * attributeValueKindInfo;
#ifndef XMLParseAddAttributeAndValue
- PyMac_PRECHECK(XMLParseAddAttributeAndValue);
-#endif
- if (!PyArg_ParseTuple(_args, "O&llls",
- CmpInstObj_Convert, &aParser,
- &elementID,
- &nameSpaceID,
- &attributeValueKind,
- &attributeValueKindInfo))
- return NULL;
- _rv = XMLParseAddAttributeAndValue(aParser,
- elementID,
- nameSpaceID,
- &attributeName,
- &attributeID,
- attributeValueKind,
- attributeValueKindInfo);
- _res = Py_BuildValue("lcl",
- _rv,
- attributeName,
- attributeID);
- return _res;
+ PyMac_PRECHECK(XMLParseAddAttributeAndValue);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&llls",
+ CmpInstObj_Convert, &aParser,
+ &elementID,
+ &nameSpaceID,
+ &attributeValueKind,
+ &attributeValueKindInfo))
+ return NULL;
+ _rv = XMLParseAddAttributeAndValue(aParser,
+ elementID,
+ nameSpaceID,
+ &attributeName,
+ &attributeID,
+ attributeValueKind,
+ attributeValueKindInfo);
+ _res = Py_BuildValue("lcl",
+ _rv,
+ attributeName,
+ attributeID);
+ return _res;
}
static PyObject *Qt_XMLParseAddAttributeValueKind(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- ComponentInstance aParser;
- UInt32 elementID;
- UInt32 attributeID;
- UInt32 attributeValueKind;
- void * attributeValueKindInfo;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ ComponentInstance aParser;
+ UInt32 elementID;
+ UInt32 attributeID;
+ UInt32 attributeValueKind;
+ void * attributeValueKindInfo;
#ifndef XMLParseAddAttributeValueKind
- PyMac_PRECHECK(XMLParseAddAttributeValueKind);
-#endif
- if (!PyArg_ParseTuple(_args, "O&llls",
- CmpInstObj_Convert, &aParser,
- &elementID,
- &attributeID,
- &attributeValueKind,
- &attributeValueKindInfo))
- return NULL;
- _rv = XMLParseAddAttributeValueKind(aParser,
- elementID,
- attributeID,
- attributeValueKind,
- attributeValueKindInfo);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyMac_PRECHECK(XMLParseAddAttributeValueKind);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&llls",
+ CmpInstObj_Convert, &aParser,
+ &elementID,
+ &attributeID,
+ &attributeValueKind,
+ &attributeValueKindInfo))
+ return NULL;
+ _rv = XMLParseAddAttributeValueKind(aParser,
+ elementID,
+ attributeID,
+ attributeValueKind,
+ attributeValueKindInfo);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_XMLParseAddNameSpace(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- ComponentInstance aParser;
- char nameSpaceURL;
- UInt32 nameSpaceID;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ ComponentInstance aParser;
+ char nameSpaceURL;
+ UInt32 nameSpaceID;
#ifndef XMLParseAddNameSpace
- PyMac_PRECHECK(XMLParseAddNameSpace);
+ PyMac_PRECHECK(XMLParseAddNameSpace);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &aParser))
- return NULL;
- _rv = XMLParseAddNameSpace(aParser,
- &nameSpaceURL,
- &nameSpaceID);
- _res = Py_BuildValue("lcl",
- _rv,
- nameSpaceURL,
- nameSpaceID);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &aParser))
+ return NULL;
+ _rv = XMLParseAddNameSpace(aParser,
+ &nameSpaceURL,
+ &nameSpaceID);
+ _res = Py_BuildValue("lcl",
+ _rv,
+ nameSpaceURL,
+ nameSpaceID);
+ return _res;
}
static PyObject *Qt_XMLParseSetOffsetAndLimit(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- ComponentInstance aParser;
- UInt32 offset;
- UInt32 limit;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ ComponentInstance aParser;
+ UInt32 offset;
+ UInt32 limit;
#ifndef XMLParseSetOffsetAndLimit
- PyMac_PRECHECK(XMLParseSetOffsetAndLimit);
+ PyMac_PRECHECK(XMLParseSetOffsetAndLimit);
#endif
- if (!PyArg_ParseTuple(_args, "O&ll",
- CmpInstObj_Convert, &aParser,
- &offset,
- &limit))
- return NULL;
- _rv = XMLParseSetOffsetAndLimit(aParser,
- offset,
- limit);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&ll",
+ CmpInstObj_Convert, &aParser,
+ &offset,
+ &limit))
+ return NULL;
+ _rv = XMLParseSetOffsetAndLimit(aParser,
+ offset,
+ limit);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_XMLParseSetEventParseRefCon(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- ComponentInstance aParser;
- long refcon;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ ComponentInstance aParser;
+ long refcon;
#ifndef XMLParseSetEventParseRefCon
- PyMac_PRECHECK(XMLParseSetEventParseRefCon);
+ PyMac_PRECHECK(XMLParseSetEventParseRefCon);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &aParser,
- &refcon))
- return NULL;
- _rv = XMLParseSetEventParseRefCon(aParser,
- refcon);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &aParser,
+ &refcon))
+ return NULL;
+ _rv = XMLParseSetEventParseRefCon(aParser,
+ refcon);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGInitialize(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SeqGrabComponent s;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SeqGrabComponent s;
#ifndef SGInitialize
- PyMac_PRECHECK(SGInitialize);
+ PyMac_PRECHECK(SGInitialize);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &s))
- return NULL;
- _rv = SGInitialize(s);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &s))
+ return NULL;
+ _rv = SGInitialize(s);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGSetDataOutput(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SeqGrabComponent s;
- FSSpec movieFile;
- long whereFlags;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SeqGrabComponent s;
+ FSSpec movieFile;
+ long whereFlags;
#ifndef SGSetDataOutput
- PyMac_PRECHECK(SGSetDataOutput);
+ PyMac_PRECHECK(SGSetDataOutput);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&l",
- CmpInstObj_Convert, &s,
- PyMac_GetFSSpec, &movieFile,
- &whereFlags))
- return NULL;
- _rv = SGSetDataOutput(s,
- &movieFile,
- whereFlags);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&l",
+ CmpInstObj_Convert, &s,
+ PyMac_GetFSSpec, &movieFile,
+ &whereFlags))
+ return NULL;
+ _rv = SGSetDataOutput(s,
+ &movieFile,
+ whereFlags);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGGetDataOutput(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SeqGrabComponent s;
- FSSpec movieFile;
- long whereFlags;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SeqGrabComponent s;
+ FSSpec movieFile;
+ long whereFlags;
#ifndef SGGetDataOutput
- PyMac_PRECHECK(SGGetDataOutput);
+ PyMac_PRECHECK(SGGetDataOutput);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &s,
- PyMac_GetFSSpec, &movieFile))
- return NULL;
- _rv = SGGetDataOutput(s,
- &movieFile,
- &whereFlags);
- _res = Py_BuildValue("ll",
- _rv,
- whereFlags);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &s,
+ PyMac_GetFSSpec, &movieFile))
+ return NULL;
+ _rv = SGGetDataOutput(s,
+ &movieFile,
+ &whereFlags);
+ _res = Py_BuildValue("ll",
+ _rv,
+ whereFlags);
+ return _res;
}
static PyObject *Qt_SGSetGWorld(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SeqGrabComponent s;
- CGrafPtr gp;
- GDHandle gd;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SeqGrabComponent s;
+ CGrafPtr gp;
+ GDHandle gd;
#ifndef SGSetGWorld
- PyMac_PRECHECK(SGSetGWorld);
+ PyMac_PRECHECK(SGSetGWorld);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- CmpInstObj_Convert, &s,
- GrafObj_Convert, &gp,
- OptResObj_Convert, &gd))
- return NULL;
- _rv = SGSetGWorld(s,
- gp,
- gd);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ CmpInstObj_Convert, &s,
+ GrafObj_Convert, &gp,
+ OptResObj_Convert, &gd))
+ return NULL;
+ _rv = SGSetGWorld(s,
+ gp,
+ gd);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGGetGWorld(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SeqGrabComponent s;
- CGrafPtr gp;
- GDHandle gd;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SeqGrabComponent s;
+ CGrafPtr gp;
+ GDHandle gd;
#ifndef SGGetGWorld
- PyMac_PRECHECK(SGGetGWorld);
+ PyMac_PRECHECK(SGGetGWorld);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &s))
- return NULL;
- _rv = SGGetGWorld(s,
- &gp,
- &gd);
- _res = Py_BuildValue("lO&O&",
- _rv,
- GrafObj_New, gp,
- OptResObj_New, gd);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &s))
+ return NULL;
+ _rv = SGGetGWorld(s,
+ &gp,
+ &gd);
+ _res = Py_BuildValue("lO&O&",
+ _rv,
+ GrafObj_New, gp,
+ OptResObj_New, gd);
+ return _res;
}
static PyObject *Qt_SGNewChannel(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SeqGrabComponent s;
- OSType channelType;
- SGChannel ref;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SeqGrabComponent s;
+ OSType channelType;
+ SGChannel ref;
#ifndef SGNewChannel
- PyMac_PRECHECK(SGNewChannel);
+ PyMac_PRECHECK(SGNewChannel);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &s,
- PyMac_GetOSType, &channelType))
- return NULL;
- _rv = SGNewChannel(s,
- channelType,
- &ref);
- _res = Py_BuildValue("lO&",
- _rv,
- CmpInstObj_New, ref);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &s,
+ PyMac_GetOSType, &channelType))
+ return NULL;
+ _rv = SGNewChannel(s,
+ channelType,
+ &ref);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ CmpInstObj_New, ref);
+ return _res;
}
static PyObject *Qt_SGDisposeChannel(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SeqGrabComponent s;
- SGChannel c;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SeqGrabComponent s;
+ SGChannel c;
#ifndef SGDisposeChannel
- PyMac_PRECHECK(SGDisposeChannel);
+ PyMac_PRECHECK(SGDisposeChannel);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &s,
- CmpInstObj_Convert, &c))
- return NULL;
- _rv = SGDisposeChannel(s,
- c);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &s,
+ CmpInstObj_Convert, &c))
+ return NULL;
+ _rv = SGDisposeChannel(s,
+ c);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGStartPreview(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SeqGrabComponent s;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SeqGrabComponent s;
#ifndef SGStartPreview
- PyMac_PRECHECK(SGStartPreview);
+ PyMac_PRECHECK(SGStartPreview);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &s))
- return NULL;
- _rv = SGStartPreview(s);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &s))
+ return NULL;
+ _rv = SGStartPreview(s);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGStartRecord(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SeqGrabComponent s;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SeqGrabComponent s;
#ifndef SGStartRecord
- PyMac_PRECHECK(SGStartRecord);
+ PyMac_PRECHECK(SGStartRecord);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &s))
- return NULL;
- _rv = SGStartRecord(s);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &s))
+ return NULL;
+ _rv = SGStartRecord(s);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGIdle(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SeqGrabComponent s;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SeqGrabComponent s;
#ifndef SGIdle
- PyMac_PRECHECK(SGIdle);
+ PyMac_PRECHECK(SGIdle);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &s))
- return NULL;
- _rv = SGIdle(s);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &s))
+ return NULL;
+ _rv = SGIdle(s);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGStop(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SeqGrabComponent s;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SeqGrabComponent s;
#ifndef SGStop
- PyMac_PRECHECK(SGStop);
+ PyMac_PRECHECK(SGStop);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &s))
- return NULL;
- _rv = SGStop(s);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &s))
+ return NULL;
+ _rv = SGStop(s);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGPause(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SeqGrabComponent s;
- Boolean pause;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SeqGrabComponent s;
+ Boolean pause;
#ifndef SGPause
- PyMac_PRECHECK(SGPause);
+ PyMac_PRECHECK(SGPause);
#endif
- if (!PyArg_ParseTuple(_args, "O&b",
- CmpInstObj_Convert, &s,
- &pause))
- return NULL;
- _rv = SGPause(s,
- pause);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&b",
+ CmpInstObj_Convert, &s,
+ &pause))
+ return NULL;
+ _rv = SGPause(s,
+ pause);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGPrepare(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SeqGrabComponent s;
- Boolean prepareForPreview;
- Boolean prepareForRecord;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SeqGrabComponent s;
+ Boolean prepareForPreview;
+ Boolean prepareForRecord;
#ifndef SGPrepare
- PyMac_PRECHECK(SGPrepare);
+ PyMac_PRECHECK(SGPrepare);
#endif
- if (!PyArg_ParseTuple(_args, "O&bb",
- CmpInstObj_Convert, &s,
- &prepareForPreview,
- &prepareForRecord))
- return NULL;
- _rv = SGPrepare(s,
- prepareForPreview,
- prepareForRecord);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&bb",
+ CmpInstObj_Convert, &s,
+ &prepareForPreview,
+ &prepareForRecord))
+ return NULL;
+ _rv = SGPrepare(s,
+ prepareForPreview,
+ prepareForRecord);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGRelease(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SeqGrabComponent s;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SeqGrabComponent s;
#ifndef SGRelease
- PyMac_PRECHECK(SGRelease);
+ PyMac_PRECHECK(SGRelease);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &s))
- return NULL;
- _rv = SGRelease(s);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &s))
+ return NULL;
+ _rv = SGRelease(s);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGGetMovie(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Movie _rv;
- SeqGrabComponent s;
+ PyObject *_res = NULL;
+ Movie _rv;
+ SeqGrabComponent s;
#ifndef SGGetMovie
- PyMac_PRECHECK(SGGetMovie);
+ PyMac_PRECHECK(SGGetMovie);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &s))
- return NULL;
- _rv = SGGetMovie(s);
- _res = Py_BuildValue("O&",
- MovieObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &s))
+ return NULL;
+ _rv = SGGetMovie(s);
+ _res = Py_BuildValue("O&",
+ MovieObj_New, _rv);
+ return _res;
}
static PyObject *Qt_SGSetMaximumRecordTime(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SeqGrabComponent s;
- unsigned long ticks;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SeqGrabComponent s;
+ unsigned long ticks;
#ifndef SGSetMaximumRecordTime
- PyMac_PRECHECK(SGSetMaximumRecordTime);
+ PyMac_PRECHECK(SGSetMaximumRecordTime);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &s,
- &ticks))
- return NULL;
- _rv = SGSetMaximumRecordTime(s,
- ticks);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &s,
+ &ticks))
+ return NULL;
+ _rv = SGSetMaximumRecordTime(s,
+ ticks);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGGetMaximumRecordTime(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SeqGrabComponent s;
- unsigned long ticks;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SeqGrabComponent s;
+ unsigned long ticks;
#ifndef SGGetMaximumRecordTime
- PyMac_PRECHECK(SGGetMaximumRecordTime);
+ PyMac_PRECHECK(SGGetMaximumRecordTime);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &s))
- return NULL;
- _rv = SGGetMaximumRecordTime(s,
- &ticks);
- _res = Py_BuildValue("ll",
- _rv,
- ticks);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &s))
+ return NULL;
+ _rv = SGGetMaximumRecordTime(s,
+ &ticks);
+ _res = Py_BuildValue("ll",
+ _rv,
+ ticks);
+ return _res;
}
static PyObject *Qt_SGGetStorageSpaceRemaining(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SeqGrabComponent s;
- unsigned long bytes;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SeqGrabComponent s;
+ unsigned long bytes;
#ifndef SGGetStorageSpaceRemaining
- PyMac_PRECHECK(SGGetStorageSpaceRemaining);
+ PyMac_PRECHECK(SGGetStorageSpaceRemaining);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &s))
- return NULL;
- _rv = SGGetStorageSpaceRemaining(s,
- &bytes);
- _res = Py_BuildValue("ll",
- _rv,
- bytes);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &s))
+ return NULL;
+ _rv = SGGetStorageSpaceRemaining(s,
+ &bytes);
+ _res = Py_BuildValue("ll",
+ _rv,
+ bytes);
+ return _res;
}
static PyObject *Qt_SGGetTimeRemaining(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SeqGrabComponent s;
- long ticksLeft;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SeqGrabComponent s;
+ long ticksLeft;
#ifndef SGGetTimeRemaining
- PyMac_PRECHECK(SGGetTimeRemaining);
+ PyMac_PRECHECK(SGGetTimeRemaining);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &s))
- return NULL;
- _rv = SGGetTimeRemaining(s,
- &ticksLeft);
- _res = Py_BuildValue("ll",
- _rv,
- ticksLeft);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &s))
+ return NULL;
+ _rv = SGGetTimeRemaining(s,
+ &ticksLeft);
+ _res = Py_BuildValue("ll",
+ _rv,
+ ticksLeft);
+ return _res;
}
static PyObject *Qt_SGGrabPict(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SeqGrabComponent s;
- PicHandle p;
- Rect bounds;
- short offscreenDepth;
- long grabPictFlags;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SeqGrabComponent s;
+ PicHandle p;
+ Rect bounds;
+ short offscreenDepth;
+ long grabPictFlags;
#ifndef SGGrabPict
- PyMac_PRECHECK(SGGrabPict);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&hl",
- CmpInstObj_Convert, &s,
- PyMac_GetRect, &bounds,
- &offscreenDepth,
- &grabPictFlags))
- return NULL;
- _rv = SGGrabPict(s,
- &p,
- &bounds,
- offscreenDepth,
- grabPictFlags);
- _res = Py_BuildValue("lO&",
- _rv,
- ResObj_New, p);
- return _res;
+ PyMac_PRECHECK(SGGrabPict);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&hl",
+ CmpInstObj_Convert, &s,
+ PyMac_GetRect, &bounds,
+ &offscreenDepth,
+ &grabPictFlags))
+ return NULL;
+ _rv = SGGrabPict(s,
+ &p,
+ &bounds,
+ offscreenDepth,
+ grabPictFlags);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ ResObj_New, p);
+ return _res;
}
static PyObject *Qt_SGGetLastMovieResID(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SeqGrabComponent s;
- short resID;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SeqGrabComponent s;
+ short resID;
#ifndef SGGetLastMovieResID
- PyMac_PRECHECK(SGGetLastMovieResID);
+ PyMac_PRECHECK(SGGetLastMovieResID);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &s))
- return NULL;
- _rv = SGGetLastMovieResID(s,
- &resID);
- _res = Py_BuildValue("lh",
- _rv,
- resID);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &s))
+ return NULL;
+ _rv = SGGetLastMovieResID(s,
+ &resID);
+ _res = Py_BuildValue("lh",
+ _rv,
+ resID);
+ return _res;
}
static PyObject *Qt_SGSetFlags(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SeqGrabComponent s;
- long sgFlags;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SeqGrabComponent s;
+ long sgFlags;
#ifndef SGSetFlags
- PyMac_PRECHECK(SGSetFlags);
+ PyMac_PRECHECK(SGSetFlags);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &s,
- &sgFlags))
- return NULL;
- _rv = SGSetFlags(s,
- sgFlags);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &s,
+ &sgFlags))
+ return NULL;
+ _rv = SGSetFlags(s,
+ sgFlags);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGGetFlags(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SeqGrabComponent s;
- long sgFlags;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SeqGrabComponent s;
+ long sgFlags;
#ifndef SGGetFlags
- PyMac_PRECHECK(SGGetFlags);
+ PyMac_PRECHECK(SGGetFlags);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &s))
- return NULL;
- _rv = SGGetFlags(s,
- &sgFlags);
- _res = Py_BuildValue("ll",
- _rv,
- sgFlags);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &s))
+ return NULL;
+ _rv = SGGetFlags(s,
+ &sgFlags);
+ _res = Py_BuildValue("ll",
+ _rv,
+ sgFlags);
+ return _res;
}
static PyObject *Qt_SGNewChannelFromComponent(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SeqGrabComponent s;
- SGChannel newChannel;
- Component sgChannelComponent;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SeqGrabComponent s;
+ SGChannel newChannel;
+ Component sgChannelComponent;
#ifndef SGNewChannelFromComponent
- PyMac_PRECHECK(SGNewChannelFromComponent);
+ PyMac_PRECHECK(SGNewChannelFromComponent);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &s,
- CmpObj_Convert, &sgChannelComponent))
- return NULL;
- _rv = SGNewChannelFromComponent(s,
- &newChannel,
- sgChannelComponent);
- _res = Py_BuildValue("lO&",
- _rv,
- CmpInstObj_New, newChannel);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &s,
+ CmpObj_Convert, &sgChannelComponent))
+ return NULL;
+ _rv = SGNewChannelFromComponent(s,
+ &newChannel,
+ sgChannelComponent);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ CmpInstObj_New, newChannel);
+ return _res;
}
static PyObject *Qt_SGSetSettings(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SeqGrabComponent s;
- UserData ud;
- long flags;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SeqGrabComponent s;
+ UserData ud;
+ long flags;
#ifndef SGSetSettings
- PyMac_PRECHECK(SGSetSettings);
+ PyMac_PRECHECK(SGSetSettings);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&l",
- CmpInstObj_Convert, &s,
- UserDataObj_Convert, &ud,
- &flags))
- return NULL;
- _rv = SGSetSettings(s,
- ud,
- flags);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&l",
+ CmpInstObj_Convert, &s,
+ UserDataObj_Convert, &ud,
+ &flags))
+ return NULL;
+ _rv = SGSetSettings(s,
+ ud,
+ flags);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGGetSettings(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SeqGrabComponent s;
- UserData ud;
- long flags;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SeqGrabComponent s;
+ UserData ud;
+ long flags;
#ifndef SGGetSettings
- PyMac_PRECHECK(SGGetSettings);
+ PyMac_PRECHECK(SGGetSettings);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &s,
- &flags))
- return NULL;
- _rv = SGGetSettings(s,
- &ud,
- flags);
- _res = Py_BuildValue("lO&",
- _rv,
- UserDataObj_New, ud);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &s,
+ &flags))
+ return NULL;
+ _rv = SGGetSettings(s,
+ &ud,
+ flags);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ UserDataObj_New, ud);
+ return _res;
}
static PyObject *Qt_SGGetIndChannel(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SeqGrabComponent s;
- short index;
- SGChannel ref;
- OSType chanType;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SeqGrabComponent s;
+ short index;
+ SGChannel ref;
+ OSType chanType;
#ifndef SGGetIndChannel
- PyMac_PRECHECK(SGGetIndChannel);
-#endif
- if (!PyArg_ParseTuple(_args, "O&h",
- CmpInstObj_Convert, &s,
- &index))
- return NULL;
- _rv = SGGetIndChannel(s,
- index,
- &ref,
- &chanType);
- _res = Py_BuildValue("lO&O&",
- _rv,
- CmpInstObj_New, ref,
- PyMac_BuildOSType, chanType);
- return _res;
+ PyMac_PRECHECK(SGGetIndChannel);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&h",
+ CmpInstObj_Convert, &s,
+ &index))
+ return NULL;
+ _rv = SGGetIndChannel(s,
+ index,
+ &ref,
+ &chanType);
+ _res = Py_BuildValue("lO&O&",
+ _rv,
+ CmpInstObj_New, ref,
+ PyMac_BuildOSType, chanType);
+ return _res;
}
static PyObject *Qt_SGUpdate(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SeqGrabComponent s;
- RgnHandle updateRgn;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SeqGrabComponent s;
+ RgnHandle updateRgn;
#ifndef SGUpdate
- PyMac_PRECHECK(SGUpdate);
+ PyMac_PRECHECK(SGUpdate);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &s,
- ResObj_Convert, &updateRgn))
- return NULL;
- _rv = SGUpdate(s,
- updateRgn);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &s,
+ ResObj_Convert, &updateRgn))
+ return NULL;
+ _rv = SGUpdate(s,
+ updateRgn);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGGetPause(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SeqGrabComponent s;
- Boolean paused;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SeqGrabComponent s;
+ Boolean paused;
#ifndef SGGetPause
- PyMac_PRECHECK(SGGetPause);
+ PyMac_PRECHECK(SGGetPause);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &s))
- return NULL;
- _rv = SGGetPause(s,
- &paused);
- _res = Py_BuildValue("lb",
- _rv,
- paused);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &s))
+ return NULL;
+ _rv = SGGetPause(s,
+ &paused);
+ _res = Py_BuildValue("lb",
+ _rv,
+ paused);
+ return _res;
}
static PyObject *Qt_SGSetChannelSettings(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SeqGrabComponent s;
- SGChannel c;
- UserData ud;
- long flags;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SeqGrabComponent s;
+ SGChannel c;
+ UserData ud;
+ long flags;
#ifndef SGSetChannelSettings
- PyMac_PRECHECK(SGSetChannelSettings);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&l",
- CmpInstObj_Convert, &s,
- CmpInstObj_Convert, &c,
- UserDataObj_Convert, &ud,
- &flags))
- return NULL;
- _rv = SGSetChannelSettings(s,
- c,
- ud,
- flags);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyMac_PRECHECK(SGSetChannelSettings);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&l",
+ CmpInstObj_Convert, &s,
+ CmpInstObj_Convert, &c,
+ UserDataObj_Convert, &ud,
+ &flags))
+ return NULL;
+ _rv = SGSetChannelSettings(s,
+ c,
+ ud,
+ flags);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGGetChannelSettings(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SeqGrabComponent s;
- SGChannel c;
- UserData ud;
- long flags;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SeqGrabComponent s;
+ SGChannel c;
+ UserData ud;
+ long flags;
#ifndef SGGetChannelSettings
- PyMac_PRECHECK(SGGetChannelSettings);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&l",
- CmpInstObj_Convert, &s,
- CmpInstObj_Convert, &c,
- &flags))
- return NULL;
- _rv = SGGetChannelSettings(s,
- c,
- &ud,
- flags);
- _res = Py_BuildValue("lO&",
- _rv,
- UserDataObj_New, ud);
- return _res;
+ PyMac_PRECHECK(SGGetChannelSettings);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&l",
+ CmpInstObj_Convert, &s,
+ CmpInstObj_Convert, &c,
+ &flags))
+ return NULL;
+ _rv = SGGetChannelSettings(s,
+ c,
+ &ud,
+ flags);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ UserDataObj_New, ud);
+ return _res;
}
static PyObject *Qt_SGGetMode(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SeqGrabComponent s;
- Boolean previewMode;
- Boolean recordMode;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SeqGrabComponent s;
+ Boolean previewMode;
+ Boolean recordMode;
#ifndef SGGetMode
- PyMac_PRECHECK(SGGetMode);
+ PyMac_PRECHECK(SGGetMode);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &s))
- return NULL;
- _rv = SGGetMode(s,
- &previewMode,
- &recordMode);
- _res = Py_BuildValue("lbb",
- _rv,
- previewMode,
- recordMode);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &s))
+ return NULL;
+ _rv = SGGetMode(s,
+ &previewMode,
+ &recordMode);
+ _res = Py_BuildValue("lbb",
+ _rv,
+ previewMode,
+ recordMode);
+ return _res;
}
static PyObject *Qt_SGSetDataRef(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SeqGrabComponent s;
- Handle dataRef;
- OSType dataRefType;
- long whereFlags;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SeqGrabComponent s;
+ Handle dataRef;
+ OSType dataRefType;
+ long whereFlags;
#ifndef SGSetDataRef
- PyMac_PRECHECK(SGSetDataRef);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&l",
- CmpInstObj_Convert, &s,
- ResObj_Convert, &dataRef,
- PyMac_GetOSType, &dataRefType,
- &whereFlags))
- return NULL;
- _rv = SGSetDataRef(s,
- dataRef,
- dataRefType,
- whereFlags);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyMac_PRECHECK(SGSetDataRef);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&l",
+ CmpInstObj_Convert, &s,
+ ResObj_Convert, &dataRef,
+ PyMac_GetOSType, &dataRefType,
+ &whereFlags))
+ return NULL;
+ _rv = SGSetDataRef(s,
+ dataRef,
+ dataRefType,
+ whereFlags);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGGetDataRef(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SeqGrabComponent s;
- Handle dataRef;
- OSType dataRefType;
- long whereFlags;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SeqGrabComponent s;
+ Handle dataRef;
+ OSType dataRefType;
+ long whereFlags;
#ifndef SGGetDataRef
- PyMac_PRECHECK(SGGetDataRef);
-#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &s))
- return NULL;
- _rv = SGGetDataRef(s,
- &dataRef,
- &dataRefType,
- &whereFlags);
- _res = Py_BuildValue("lO&O&l",
- _rv,
- ResObj_New, dataRef,
- PyMac_BuildOSType, dataRefType,
- whereFlags);
- return _res;
+ PyMac_PRECHECK(SGGetDataRef);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &s))
+ return NULL;
+ _rv = SGGetDataRef(s,
+ &dataRef,
+ &dataRefType,
+ &whereFlags);
+ _res = Py_BuildValue("lO&O&l",
+ _rv,
+ ResObj_New, dataRef,
+ PyMac_BuildOSType, dataRefType,
+ whereFlags);
+ return _res;
}
static PyObject *Qt_SGNewOutput(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SeqGrabComponent s;
- Handle dataRef;
- OSType dataRefType;
- long whereFlags;
- SGOutput sgOut;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SeqGrabComponent s;
+ Handle dataRef;
+ OSType dataRefType;
+ long whereFlags;
+ SGOutput sgOut;
#ifndef SGNewOutput
- PyMac_PRECHECK(SGNewOutput);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&l",
- CmpInstObj_Convert, &s,
- ResObj_Convert, &dataRef,
- PyMac_GetOSType, &dataRefType,
- &whereFlags))
- return NULL;
- _rv = SGNewOutput(s,
- dataRef,
- dataRefType,
- whereFlags,
- &sgOut);
- _res = Py_BuildValue("lO&",
- _rv,
- SGOutputObj_New, sgOut);
- return _res;
+ PyMac_PRECHECK(SGNewOutput);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&l",
+ CmpInstObj_Convert, &s,
+ ResObj_Convert, &dataRef,
+ PyMac_GetOSType, &dataRefType,
+ &whereFlags))
+ return NULL;
+ _rv = SGNewOutput(s,
+ dataRef,
+ dataRefType,
+ whereFlags,
+ &sgOut);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ SGOutputObj_New, sgOut);
+ return _res;
}
static PyObject *Qt_SGDisposeOutput(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SeqGrabComponent s;
- SGOutput sgOut;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SeqGrabComponent s;
+ SGOutput sgOut;
#ifndef SGDisposeOutput
- PyMac_PRECHECK(SGDisposeOutput);
+ PyMac_PRECHECK(SGDisposeOutput);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &s,
- SGOutputObj_Convert, &sgOut))
- return NULL;
- _rv = SGDisposeOutput(s,
- sgOut);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &s,
+ SGOutputObj_Convert, &sgOut))
+ return NULL;
+ _rv = SGDisposeOutput(s,
+ sgOut);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGSetOutputFlags(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SeqGrabComponent s;
- SGOutput sgOut;
- long whereFlags;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SeqGrabComponent s;
+ SGOutput sgOut;
+ long whereFlags;
#ifndef SGSetOutputFlags
- PyMac_PRECHECK(SGSetOutputFlags);
+ PyMac_PRECHECK(SGSetOutputFlags);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&l",
- CmpInstObj_Convert, &s,
- SGOutputObj_Convert, &sgOut,
- &whereFlags))
- return NULL;
- _rv = SGSetOutputFlags(s,
- sgOut,
- whereFlags);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&l",
+ CmpInstObj_Convert, &s,
+ SGOutputObj_Convert, &sgOut,
+ &whereFlags))
+ return NULL;
+ _rv = SGSetOutputFlags(s,
+ sgOut,
+ whereFlags);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGSetChannelOutput(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SeqGrabComponent s;
- SGChannel c;
- SGOutput sgOut;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SeqGrabComponent s;
+ SGChannel c;
+ SGOutput sgOut;
#ifndef SGSetChannelOutput
- PyMac_PRECHECK(SGSetChannelOutput);
+ PyMac_PRECHECK(SGSetChannelOutput);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- CmpInstObj_Convert, &s,
- CmpInstObj_Convert, &c,
- SGOutputObj_Convert, &sgOut))
- return NULL;
- _rv = SGSetChannelOutput(s,
- c,
- sgOut);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ CmpInstObj_Convert, &s,
+ CmpInstObj_Convert, &c,
+ SGOutputObj_Convert, &sgOut))
+ return NULL;
+ _rv = SGSetChannelOutput(s,
+ c,
+ sgOut);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGGetDataOutputStorageSpaceRemaining(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SeqGrabComponent s;
- SGOutput sgOut;
- unsigned long space;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SeqGrabComponent s;
+ SGOutput sgOut;
+ unsigned long space;
#ifndef SGGetDataOutputStorageSpaceRemaining
- PyMac_PRECHECK(SGGetDataOutputStorageSpaceRemaining);
+ PyMac_PRECHECK(SGGetDataOutputStorageSpaceRemaining);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &s,
- SGOutputObj_Convert, &sgOut))
- return NULL;
- _rv = SGGetDataOutputStorageSpaceRemaining(s,
- sgOut,
- &space);
- _res = Py_BuildValue("ll",
- _rv,
- space);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &s,
+ SGOutputObj_Convert, &sgOut))
+ return NULL;
+ _rv = SGGetDataOutputStorageSpaceRemaining(s,
+ sgOut,
+ &space);
+ _res = Py_BuildValue("ll",
+ _rv,
+ space);
+ return _res;
}
static PyObject *Qt_SGHandleUpdateEvent(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SeqGrabComponent s;
- EventRecord event;
- Boolean handled;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SeqGrabComponent s;
+ EventRecord event;
+ Boolean handled;
#ifndef SGHandleUpdateEvent
- PyMac_PRECHECK(SGHandleUpdateEvent);
+ PyMac_PRECHECK(SGHandleUpdateEvent);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &s,
- PyMac_GetEventRecord, &event))
- return NULL;
- _rv = SGHandleUpdateEvent(s,
- &event,
- &handled);
- _res = Py_BuildValue("lb",
- _rv,
- handled);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &s,
+ PyMac_GetEventRecord, &event))
+ return NULL;
+ _rv = SGHandleUpdateEvent(s,
+ &event,
+ &handled);
+ _res = Py_BuildValue("lb",
+ _rv,
+ handled);
+ return _res;
}
static PyObject *Qt_SGSetOutputNextOutput(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SeqGrabComponent s;
- SGOutput sgOut;
- SGOutput nextOut;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SeqGrabComponent s;
+ SGOutput sgOut;
+ SGOutput nextOut;
#ifndef SGSetOutputNextOutput
- PyMac_PRECHECK(SGSetOutputNextOutput);
+ PyMac_PRECHECK(SGSetOutputNextOutput);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- CmpInstObj_Convert, &s,
- SGOutputObj_Convert, &sgOut,
- SGOutputObj_Convert, &nextOut))
- return NULL;
- _rv = SGSetOutputNextOutput(s,
- sgOut,
- nextOut);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ CmpInstObj_Convert, &s,
+ SGOutputObj_Convert, &sgOut,
+ SGOutputObj_Convert, &nextOut))
+ return NULL;
+ _rv = SGSetOutputNextOutput(s,
+ sgOut,
+ nextOut);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGGetOutputNextOutput(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SeqGrabComponent s;
- SGOutput sgOut;
- SGOutput nextOut;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SeqGrabComponent s;
+ SGOutput sgOut;
+ SGOutput nextOut;
#ifndef SGGetOutputNextOutput
- PyMac_PRECHECK(SGGetOutputNextOutput);
+ PyMac_PRECHECK(SGGetOutputNextOutput);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &s,
- SGOutputObj_Convert, &sgOut))
- return NULL;
- _rv = SGGetOutputNextOutput(s,
- sgOut,
- &nextOut);
- _res = Py_BuildValue("lO&",
- _rv,
- SGOutputObj_New, nextOut);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &s,
+ SGOutputObj_Convert, &sgOut))
+ return NULL;
+ _rv = SGGetOutputNextOutput(s,
+ sgOut,
+ &nextOut);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ SGOutputObj_New, nextOut);
+ return _res;
}
static PyObject *Qt_SGSetOutputMaximumOffset(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SeqGrabComponent s;
- SGOutput sgOut;
- wide maxOffset;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SeqGrabComponent s;
+ SGOutput sgOut;
+ wide maxOffset;
#ifndef SGSetOutputMaximumOffset
- PyMac_PRECHECK(SGSetOutputMaximumOffset);
+ PyMac_PRECHECK(SGSetOutputMaximumOffset);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- CmpInstObj_Convert, &s,
- SGOutputObj_Convert, &sgOut,
- PyMac_Getwide, &maxOffset))
- return NULL;
- _rv = SGSetOutputMaximumOffset(s,
- sgOut,
- &maxOffset);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ CmpInstObj_Convert, &s,
+ SGOutputObj_Convert, &sgOut,
+ PyMac_Getwide, &maxOffset))
+ return NULL;
+ _rv = SGSetOutputMaximumOffset(s,
+ sgOut,
+ &maxOffset);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGGetOutputMaximumOffset(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SeqGrabComponent s;
- SGOutput sgOut;
- wide maxOffset;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SeqGrabComponent s;
+ SGOutput sgOut;
+ wide maxOffset;
#ifndef SGGetOutputMaximumOffset
- PyMac_PRECHECK(SGGetOutputMaximumOffset);
+ PyMac_PRECHECK(SGGetOutputMaximumOffset);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &s,
- SGOutputObj_Convert, &sgOut))
- return NULL;
- _rv = SGGetOutputMaximumOffset(s,
- sgOut,
- &maxOffset);
- _res = Py_BuildValue("lO&",
- _rv,
- PyMac_Buildwide, maxOffset);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &s,
+ SGOutputObj_Convert, &sgOut))
+ return NULL;
+ _rv = SGGetOutputMaximumOffset(s,
+ sgOut,
+ &maxOffset);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ PyMac_Buildwide, maxOffset);
+ return _res;
}
static PyObject *Qt_SGGetOutputDataReference(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SeqGrabComponent s;
- SGOutput sgOut;
- Handle dataRef;
- OSType dataRefType;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SeqGrabComponent s;
+ SGOutput sgOut;
+ Handle dataRef;
+ OSType dataRefType;
#ifndef SGGetOutputDataReference
- PyMac_PRECHECK(SGGetOutputDataReference);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &s,
- SGOutputObj_Convert, &sgOut))
- return NULL;
- _rv = SGGetOutputDataReference(s,
- sgOut,
- &dataRef,
- &dataRefType);
- _res = Py_BuildValue("lO&O&",
- _rv,
- ResObj_New, dataRef,
- PyMac_BuildOSType, dataRefType);
- return _res;
+ PyMac_PRECHECK(SGGetOutputDataReference);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &s,
+ SGOutputObj_Convert, &sgOut))
+ return NULL;
+ _rv = SGGetOutputDataReference(s,
+ sgOut,
+ &dataRef,
+ &dataRefType);
+ _res = Py_BuildValue("lO&O&",
+ _rv,
+ ResObj_New, dataRef,
+ PyMac_BuildOSType, dataRefType);
+ return _res;
}
static PyObject *Qt_SGWriteExtendedMovieData(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SeqGrabComponent s;
- SGChannel c;
- Ptr p;
- long len;
- wide offset;
- SGOutput sgOut;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SeqGrabComponent s;
+ SGChannel c;
+ Ptr p;
+ long len;
+ wide offset;
+ SGOutput sgOut;
#ifndef SGWriteExtendedMovieData
- PyMac_PRECHECK(SGWriteExtendedMovieData);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&sl",
- CmpInstObj_Convert, &s,
- CmpInstObj_Convert, &c,
- &p,
- &len))
- return NULL;
- _rv = SGWriteExtendedMovieData(s,
- c,
- p,
- len,
- &offset,
- &sgOut);
- _res = Py_BuildValue("lO&O&",
- _rv,
- PyMac_Buildwide, offset,
- SGOutputObj_New, sgOut);
- return _res;
+ PyMac_PRECHECK(SGWriteExtendedMovieData);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&sl",
+ CmpInstObj_Convert, &s,
+ CmpInstObj_Convert, &c,
+ &p,
+ &len))
+ return NULL;
+ _rv = SGWriteExtendedMovieData(s,
+ c,
+ p,
+ len,
+ &offset,
+ &sgOut);
+ _res = Py_BuildValue("lO&O&",
+ _rv,
+ PyMac_Buildwide, offset,
+ SGOutputObj_New, sgOut);
+ return _res;
}
static PyObject *Qt_SGGetStorageSpaceRemaining64(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SeqGrabComponent s;
- wide bytes;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SeqGrabComponent s;
+ wide bytes;
#ifndef SGGetStorageSpaceRemaining64
- PyMac_PRECHECK(SGGetStorageSpaceRemaining64);
+ PyMac_PRECHECK(SGGetStorageSpaceRemaining64);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &s))
- return NULL;
- _rv = SGGetStorageSpaceRemaining64(s,
- &bytes);
- _res = Py_BuildValue("lO&",
- _rv,
- PyMac_Buildwide, bytes);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &s))
+ return NULL;
+ _rv = SGGetStorageSpaceRemaining64(s,
+ &bytes);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ PyMac_Buildwide, bytes);
+ return _res;
}
static PyObject *Qt_SGGetDataOutputStorageSpaceRemaining64(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SeqGrabComponent s;
- SGOutput sgOut;
- wide space;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SeqGrabComponent s;
+ SGOutput sgOut;
+ wide space;
#ifndef SGGetDataOutputStorageSpaceRemaining64
- PyMac_PRECHECK(SGGetDataOutputStorageSpaceRemaining64);
+ PyMac_PRECHECK(SGGetDataOutputStorageSpaceRemaining64);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &s,
- SGOutputObj_Convert, &sgOut))
- return NULL;
- _rv = SGGetDataOutputStorageSpaceRemaining64(s,
- sgOut,
- &space);
- _res = Py_BuildValue("lO&",
- _rv,
- PyMac_Buildwide, space);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &s,
+ SGOutputObj_Convert, &sgOut))
+ return NULL;
+ _rv = SGGetDataOutputStorageSpaceRemaining64(s,
+ sgOut,
+ &space);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ PyMac_Buildwide, space);
+ return _res;
}
static PyObject *Qt_SGWriteMovieData(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SeqGrabComponent s;
- SGChannel c;
- Ptr p;
- long len;
- long offset;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SeqGrabComponent s;
+ SGChannel c;
+ Ptr p;
+ long len;
+ long offset;
#ifndef SGWriteMovieData
- PyMac_PRECHECK(SGWriteMovieData);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&sl",
- CmpInstObj_Convert, &s,
- CmpInstObj_Convert, &c,
- &p,
- &len))
- return NULL;
- _rv = SGWriteMovieData(s,
- c,
- p,
- len,
- &offset);
- _res = Py_BuildValue("ll",
- _rv,
- offset);
- return _res;
+ PyMac_PRECHECK(SGWriteMovieData);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&sl",
+ CmpInstObj_Convert, &s,
+ CmpInstObj_Convert, &c,
+ &p,
+ &len))
+ return NULL;
+ _rv = SGWriteMovieData(s,
+ c,
+ p,
+ len,
+ &offset);
+ _res = Py_BuildValue("ll",
+ _rv,
+ offset);
+ return _res;
}
static PyObject *Qt_SGGetTimeBase(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SeqGrabComponent s;
- TimeBase tb;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SeqGrabComponent s;
+ TimeBase tb;
#ifndef SGGetTimeBase
- PyMac_PRECHECK(SGGetTimeBase);
+ PyMac_PRECHECK(SGGetTimeBase);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &s))
- return NULL;
- _rv = SGGetTimeBase(s,
- &tb);
- _res = Py_BuildValue("lO&",
- _rv,
- TimeBaseObj_New, tb);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &s))
+ return NULL;
+ _rv = SGGetTimeBase(s,
+ &tb);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ TimeBaseObj_New, tb);
+ return _res;
}
static PyObject *Qt_SGAddMovieData(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SeqGrabComponent s;
- SGChannel c;
- Ptr p;
- long len;
- long offset;
- long chRefCon;
- TimeValue time;
- short writeType;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SeqGrabComponent s;
+ SGChannel c;
+ Ptr p;
+ long len;
+ long offset;
+ long chRefCon;
+ TimeValue time;
+ short writeType;
#ifndef SGAddMovieData
- PyMac_PRECHECK(SGAddMovieData);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&slllh",
- CmpInstObj_Convert, &s,
- CmpInstObj_Convert, &c,
- &p,
- &len,
- &chRefCon,
- &time,
- &writeType))
- return NULL;
- _rv = SGAddMovieData(s,
- c,
- p,
- len,
- &offset,
- chRefCon,
- time,
- writeType);
- _res = Py_BuildValue("ll",
- _rv,
- offset);
- return _res;
+ PyMac_PRECHECK(SGAddMovieData);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&slllh",
+ CmpInstObj_Convert, &s,
+ CmpInstObj_Convert, &c,
+ &p,
+ &len,
+ &chRefCon,
+ &time,
+ &writeType))
+ return NULL;
+ _rv = SGAddMovieData(s,
+ c,
+ p,
+ len,
+ &offset,
+ chRefCon,
+ time,
+ writeType);
+ _res = Py_BuildValue("ll",
+ _rv,
+ offset);
+ return _res;
}
static PyObject *Qt_SGChangedSource(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SeqGrabComponent s;
- SGChannel c;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SeqGrabComponent s;
+ SGChannel c;
#ifndef SGChangedSource
- PyMac_PRECHECK(SGChangedSource);
+ PyMac_PRECHECK(SGChangedSource);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &s,
- CmpInstObj_Convert, &c))
- return NULL;
- _rv = SGChangedSource(s,
- c);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &s,
+ CmpInstObj_Convert, &c))
+ return NULL;
+ _rv = SGChangedSource(s,
+ c);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGAddExtendedMovieData(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SeqGrabComponent s;
- SGChannel c;
- Ptr p;
- long len;
- wide offset;
- long chRefCon;
- TimeValue time;
- short writeType;
- SGOutput whichOutput;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SeqGrabComponent s;
+ SGChannel c;
+ Ptr p;
+ long len;
+ wide offset;
+ long chRefCon;
+ TimeValue time;
+ short writeType;
+ SGOutput whichOutput;
#ifndef SGAddExtendedMovieData
- PyMac_PRECHECK(SGAddExtendedMovieData);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&slllh",
- CmpInstObj_Convert, &s,
- CmpInstObj_Convert, &c,
- &p,
- &len,
- &chRefCon,
- &time,
- &writeType))
- return NULL;
- _rv = SGAddExtendedMovieData(s,
- c,
- p,
- len,
- &offset,
- chRefCon,
- time,
- writeType,
- &whichOutput);
- _res = Py_BuildValue("lO&O&",
- _rv,
- PyMac_Buildwide, offset,
- SGOutputObj_New, whichOutput);
- return _res;
+ PyMac_PRECHECK(SGAddExtendedMovieData);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&slllh",
+ CmpInstObj_Convert, &s,
+ CmpInstObj_Convert, &c,
+ &p,
+ &len,
+ &chRefCon,
+ &time,
+ &writeType))
+ return NULL;
+ _rv = SGAddExtendedMovieData(s,
+ c,
+ p,
+ len,
+ &offset,
+ chRefCon,
+ time,
+ writeType,
+ &whichOutput);
+ _res = Py_BuildValue("lO&O&",
+ _rv,
+ PyMac_Buildwide, offset,
+ SGOutputObj_New, whichOutput);
+ return _res;
}
static PyObject *Qt_SGAddOutputDataRefToMedia(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SeqGrabComponent s;
- SGOutput sgOut;
- Media theMedia;
- SampleDescriptionHandle desc;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SeqGrabComponent s;
+ SGOutput sgOut;
+ Media theMedia;
+ SampleDescriptionHandle desc;
#ifndef SGAddOutputDataRefToMedia
- PyMac_PRECHECK(SGAddOutputDataRefToMedia);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&O&",
- CmpInstObj_Convert, &s,
- SGOutputObj_Convert, &sgOut,
- MediaObj_Convert, &theMedia,
- ResObj_Convert, &desc))
- return NULL;
- _rv = SGAddOutputDataRefToMedia(s,
- sgOut,
- theMedia,
- desc);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyMac_PRECHECK(SGAddOutputDataRefToMedia);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&O&",
+ CmpInstObj_Convert, &s,
+ SGOutputObj_Convert, &sgOut,
+ MediaObj_Convert, &theMedia,
+ ResObj_Convert, &desc))
+ return NULL;
+ _rv = SGAddOutputDataRefToMedia(s,
+ sgOut,
+ theMedia,
+ desc);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGSetSettingsSummary(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SeqGrabComponent s;
- Handle summaryText;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SeqGrabComponent s;
+ Handle summaryText;
#ifndef SGSetSettingsSummary
- PyMac_PRECHECK(SGSetSettingsSummary);
+ PyMac_PRECHECK(SGSetSettingsSummary);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &s,
- ResObj_Convert, &summaryText))
- return NULL;
- _rv = SGSetSettingsSummary(s,
- summaryText);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &s,
+ ResObj_Convert, &summaryText))
+ return NULL;
+ _rv = SGSetSettingsSummary(s,
+ summaryText);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGSetChannelUsage(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
- long usage;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
+ long usage;
#ifndef SGSetChannelUsage
- PyMac_PRECHECK(SGSetChannelUsage);
+ PyMac_PRECHECK(SGSetChannelUsage);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &c,
- &usage))
- return NULL;
- _rv = SGSetChannelUsage(c,
- usage);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &c,
+ &usage))
+ return NULL;
+ _rv = SGSetChannelUsage(c,
+ usage);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGGetChannelUsage(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
- long usage;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
+ long usage;
#ifndef SGGetChannelUsage
- PyMac_PRECHECK(SGGetChannelUsage);
+ PyMac_PRECHECK(SGGetChannelUsage);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &c))
- return NULL;
- _rv = SGGetChannelUsage(c,
- &usage);
- _res = Py_BuildValue("ll",
- _rv,
- usage);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &c))
+ return NULL;
+ _rv = SGGetChannelUsage(c,
+ &usage);
+ _res = Py_BuildValue("ll",
+ _rv,
+ usage);
+ return _res;
}
static PyObject *Qt_SGSetChannelBounds(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
- Rect bounds;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
+ Rect bounds;
#ifndef SGSetChannelBounds
- PyMac_PRECHECK(SGSetChannelBounds);
+ PyMac_PRECHECK(SGSetChannelBounds);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &c,
- PyMac_GetRect, &bounds))
- return NULL;
- _rv = SGSetChannelBounds(c,
- &bounds);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &c,
+ PyMac_GetRect, &bounds))
+ return NULL;
+ _rv = SGSetChannelBounds(c,
+ &bounds);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGGetChannelBounds(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
- Rect bounds;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
+ Rect bounds;
#ifndef SGGetChannelBounds
- PyMac_PRECHECK(SGGetChannelBounds);
+ PyMac_PRECHECK(SGGetChannelBounds);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &c))
- return NULL;
- _rv = SGGetChannelBounds(c,
- &bounds);
- _res = Py_BuildValue("lO&",
- _rv,
- PyMac_BuildRect, &bounds);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &c))
+ return NULL;
+ _rv = SGGetChannelBounds(c,
+ &bounds);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ PyMac_BuildRect, &bounds);
+ return _res;
}
static PyObject *Qt_SGSetChannelVolume(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
- short volume;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
+ short volume;
#ifndef SGSetChannelVolume
- PyMac_PRECHECK(SGSetChannelVolume);
+ PyMac_PRECHECK(SGSetChannelVolume);
#endif
- if (!PyArg_ParseTuple(_args, "O&h",
- CmpInstObj_Convert, &c,
- &volume))
- return NULL;
- _rv = SGSetChannelVolume(c,
- volume);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&h",
+ CmpInstObj_Convert, &c,
+ &volume))
+ return NULL;
+ _rv = SGSetChannelVolume(c,
+ volume);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGGetChannelVolume(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
- short volume;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
+ short volume;
#ifndef SGGetChannelVolume
- PyMac_PRECHECK(SGGetChannelVolume);
+ PyMac_PRECHECK(SGGetChannelVolume);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &c))
- return NULL;
- _rv = SGGetChannelVolume(c,
- &volume);
- _res = Py_BuildValue("lh",
- _rv,
- volume);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &c))
+ return NULL;
+ _rv = SGGetChannelVolume(c,
+ &volume);
+ _res = Py_BuildValue("lh",
+ _rv,
+ volume);
+ return _res;
}
static PyObject *Qt_SGGetChannelInfo(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
- long channelInfo;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
+ long channelInfo;
#ifndef SGGetChannelInfo
- PyMac_PRECHECK(SGGetChannelInfo);
+ PyMac_PRECHECK(SGGetChannelInfo);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &c))
- return NULL;
- _rv = SGGetChannelInfo(c,
- &channelInfo);
- _res = Py_BuildValue("ll",
- _rv,
- channelInfo);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &c))
+ return NULL;
+ _rv = SGGetChannelInfo(c,
+ &channelInfo);
+ _res = Py_BuildValue("ll",
+ _rv,
+ channelInfo);
+ return _res;
}
static PyObject *Qt_SGSetChannelPlayFlags(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
- long playFlags;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
+ long playFlags;
#ifndef SGSetChannelPlayFlags
- PyMac_PRECHECK(SGSetChannelPlayFlags);
+ PyMac_PRECHECK(SGSetChannelPlayFlags);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &c,
- &playFlags))
- return NULL;
- _rv = SGSetChannelPlayFlags(c,
- playFlags);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &c,
+ &playFlags))
+ return NULL;
+ _rv = SGSetChannelPlayFlags(c,
+ playFlags);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGGetChannelPlayFlags(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
- long playFlags;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
+ long playFlags;
#ifndef SGGetChannelPlayFlags
- PyMac_PRECHECK(SGGetChannelPlayFlags);
+ PyMac_PRECHECK(SGGetChannelPlayFlags);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &c))
- return NULL;
- _rv = SGGetChannelPlayFlags(c,
- &playFlags);
- _res = Py_BuildValue("ll",
- _rv,
- playFlags);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &c))
+ return NULL;
+ _rv = SGGetChannelPlayFlags(c,
+ &playFlags);
+ _res = Py_BuildValue("ll",
+ _rv,
+ playFlags);
+ return _res;
}
static PyObject *Qt_SGSetChannelMaxFrames(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
- long frameCount;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
+ long frameCount;
#ifndef SGSetChannelMaxFrames
- PyMac_PRECHECK(SGSetChannelMaxFrames);
+ PyMac_PRECHECK(SGSetChannelMaxFrames);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &c,
- &frameCount))
- return NULL;
- _rv = SGSetChannelMaxFrames(c,
- frameCount);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &c,
+ &frameCount))
+ return NULL;
+ _rv = SGSetChannelMaxFrames(c,
+ frameCount);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGGetChannelMaxFrames(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
- long frameCount;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
+ long frameCount;
#ifndef SGGetChannelMaxFrames
- PyMac_PRECHECK(SGGetChannelMaxFrames);
+ PyMac_PRECHECK(SGGetChannelMaxFrames);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &c))
- return NULL;
- _rv = SGGetChannelMaxFrames(c,
- &frameCount);
- _res = Py_BuildValue("ll",
- _rv,
- frameCount);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &c))
+ return NULL;
+ _rv = SGGetChannelMaxFrames(c,
+ &frameCount);
+ _res = Py_BuildValue("ll",
+ _rv,
+ frameCount);
+ return _res;
}
static PyObject *Qt_SGSetChannelRefCon(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
- long refCon;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
+ long refCon;
#ifndef SGSetChannelRefCon
- PyMac_PRECHECK(SGSetChannelRefCon);
+ PyMac_PRECHECK(SGSetChannelRefCon);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &c,
- &refCon))
- return NULL;
- _rv = SGSetChannelRefCon(c,
- refCon);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &c,
+ &refCon))
+ return NULL;
+ _rv = SGSetChannelRefCon(c,
+ refCon);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGSetChannelClip(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
- RgnHandle theClip;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
+ RgnHandle theClip;
#ifndef SGSetChannelClip
- PyMac_PRECHECK(SGSetChannelClip);
+ PyMac_PRECHECK(SGSetChannelClip);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &c,
- ResObj_Convert, &theClip))
- return NULL;
- _rv = SGSetChannelClip(c,
- theClip);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &c,
+ ResObj_Convert, &theClip))
+ return NULL;
+ _rv = SGSetChannelClip(c,
+ theClip);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGGetChannelClip(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
- RgnHandle theClip;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
+ RgnHandle theClip;
#ifndef SGGetChannelClip
- PyMac_PRECHECK(SGGetChannelClip);
+ PyMac_PRECHECK(SGGetChannelClip);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &c))
- return NULL;
- _rv = SGGetChannelClip(c,
- &theClip);
- _res = Py_BuildValue("lO&",
- _rv,
- ResObj_New, theClip);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &c))
+ return NULL;
+ _rv = SGGetChannelClip(c,
+ &theClip);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ ResObj_New, theClip);
+ return _res;
}
static PyObject *Qt_SGGetChannelSampleDescription(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
- Handle sampleDesc;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
+ Handle sampleDesc;
#ifndef SGGetChannelSampleDescription
- PyMac_PRECHECK(SGGetChannelSampleDescription);
+ PyMac_PRECHECK(SGGetChannelSampleDescription);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &c,
- ResObj_Convert, &sampleDesc))
- return NULL;
- _rv = SGGetChannelSampleDescription(c,
- sampleDesc);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &c,
+ ResObj_Convert, &sampleDesc))
+ return NULL;
+ _rv = SGGetChannelSampleDescription(c,
+ sampleDesc);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGSetChannelDevice(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
- StringPtr name;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
+ StringPtr name;
#ifndef SGSetChannelDevice
- PyMac_PRECHECK(SGSetChannelDevice);
+ PyMac_PRECHECK(SGSetChannelDevice);
#endif
- if (!PyArg_ParseTuple(_args, "O&s",
- CmpInstObj_Convert, &c,
- &name))
- return NULL;
- _rv = SGSetChannelDevice(c,
- name);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&s",
+ CmpInstObj_Convert, &c,
+ &name))
+ return NULL;
+ _rv = SGSetChannelDevice(c,
+ name);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGGetChannelTimeScale(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
- TimeScale scale;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
+ TimeScale scale;
#ifndef SGGetChannelTimeScale
- PyMac_PRECHECK(SGGetChannelTimeScale);
+ PyMac_PRECHECK(SGGetChannelTimeScale);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &c))
- return NULL;
- _rv = SGGetChannelTimeScale(c,
- &scale);
- _res = Py_BuildValue("ll",
- _rv,
- scale);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &c))
+ return NULL;
+ _rv = SGGetChannelTimeScale(c,
+ &scale);
+ _res = Py_BuildValue("ll",
+ _rv,
+ scale);
+ return _res;
}
static PyObject *Qt_SGChannelPutPicture(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
#ifndef SGChannelPutPicture
- PyMac_PRECHECK(SGChannelPutPicture);
+ PyMac_PRECHECK(SGChannelPutPicture);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &c))
- return NULL;
- _rv = SGChannelPutPicture(c);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &c))
+ return NULL;
+ _rv = SGChannelPutPicture(c);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGChannelSetRequestedDataRate(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
- long bytesPerSecond;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
+ long bytesPerSecond;
#ifndef SGChannelSetRequestedDataRate
- PyMac_PRECHECK(SGChannelSetRequestedDataRate);
+ PyMac_PRECHECK(SGChannelSetRequestedDataRate);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &c,
- &bytesPerSecond))
- return NULL;
- _rv = SGChannelSetRequestedDataRate(c,
- bytesPerSecond);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &c,
+ &bytesPerSecond))
+ return NULL;
+ _rv = SGChannelSetRequestedDataRate(c,
+ bytesPerSecond);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGChannelGetRequestedDataRate(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
- long bytesPerSecond;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
+ long bytesPerSecond;
#ifndef SGChannelGetRequestedDataRate
- PyMac_PRECHECK(SGChannelGetRequestedDataRate);
+ PyMac_PRECHECK(SGChannelGetRequestedDataRate);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &c))
- return NULL;
- _rv = SGChannelGetRequestedDataRate(c,
- &bytesPerSecond);
- _res = Py_BuildValue("ll",
- _rv,
- bytesPerSecond);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &c))
+ return NULL;
+ _rv = SGChannelGetRequestedDataRate(c,
+ &bytesPerSecond);
+ _res = Py_BuildValue("ll",
+ _rv,
+ bytesPerSecond);
+ return _res;
}
static PyObject *Qt_SGChannelSetDataSourceName(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
- Str255 name;
- ScriptCode scriptTag;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
+ Str255 name;
+ ScriptCode scriptTag;
#ifndef SGChannelSetDataSourceName
- PyMac_PRECHECK(SGChannelSetDataSourceName);
+ PyMac_PRECHECK(SGChannelSetDataSourceName);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&h",
- CmpInstObj_Convert, &c,
- PyMac_GetStr255, name,
- &scriptTag))
- return NULL;
- _rv = SGChannelSetDataSourceName(c,
- name,
- scriptTag);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&h",
+ CmpInstObj_Convert, &c,
+ PyMac_GetStr255, name,
+ &scriptTag))
+ return NULL;
+ _rv = SGChannelSetDataSourceName(c,
+ name,
+ scriptTag);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGChannelGetDataSourceName(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
- Str255 name;
- ScriptCode scriptTag;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
+ Str255 name;
+ ScriptCode scriptTag;
#ifndef SGChannelGetDataSourceName
- PyMac_PRECHECK(SGChannelGetDataSourceName);
+ PyMac_PRECHECK(SGChannelGetDataSourceName);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &c,
- PyMac_GetStr255, name))
- return NULL;
- _rv = SGChannelGetDataSourceName(c,
- name,
- &scriptTag);
- _res = Py_BuildValue("lh",
- _rv,
- scriptTag);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &c,
+ PyMac_GetStr255, name))
+ return NULL;
+ _rv = SGChannelGetDataSourceName(c,
+ name,
+ &scriptTag);
+ _res = Py_BuildValue("lh",
+ _rv,
+ scriptTag);
+ return _res;
}
static PyObject *Qt_SGChannelSetCodecSettings(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
- Handle settings;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
+ Handle settings;
#ifndef SGChannelSetCodecSettings
- PyMac_PRECHECK(SGChannelSetCodecSettings);
+ PyMac_PRECHECK(SGChannelSetCodecSettings);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &c,
- ResObj_Convert, &settings))
- return NULL;
- _rv = SGChannelSetCodecSettings(c,
- settings);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &c,
+ ResObj_Convert, &settings))
+ return NULL;
+ _rv = SGChannelSetCodecSettings(c,
+ settings);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGChannelGetCodecSettings(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
- Handle settings;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
+ Handle settings;
#ifndef SGChannelGetCodecSettings
- PyMac_PRECHECK(SGChannelGetCodecSettings);
+ PyMac_PRECHECK(SGChannelGetCodecSettings);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &c))
- return NULL;
- _rv = SGChannelGetCodecSettings(c,
- &settings);
- _res = Py_BuildValue("lO&",
- _rv,
- ResObj_New, settings);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &c))
+ return NULL;
+ _rv = SGChannelGetCodecSettings(c,
+ &settings);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ ResObj_New, settings);
+ return _res;
}
static PyObject *Qt_SGGetChannelTimeBase(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
- TimeBase tb;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
+ TimeBase tb;
#ifndef SGGetChannelTimeBase
- PyMac_PRECHECK(SGGetChannelTimeBase);
+ PyMac_PRECHECK(SGGetChannelTimeBase);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &c))
- return NULL;
- _rv = SGGetChannelTimeBase(c,
- &tb);
- _res = Py_BuildValue("lO&",
- _rv,
- TimeBaseObj_New, tb);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &c))
+ return NULL;
+ _rv = SGGetChannelTimeBase(c,
+ &tb);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ TimeBaseObj_New, tb);
+ return _res;
}
static PyObject *Qt_SGGetChannelRefCon(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
- long refCon;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
+ long refCon;
#ifndef SGGetChannelRefCon
- PyMac_PRECHECK(SGGetChannelRefCon);
+ PyMac_PRECHECK(SGGetChannelRefCon);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &c))
- return NULL;
- _rv = SGGetChannelRefCon(c,
- &refCon);
- _res = Py_BuildValue("ll",
- _rv,
- refCon);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &c))
+ return NULL;
+ _rv = SGGetChannelRefCon(c,
+ &refCon);
+ _res = Py_BuildValue("ll",
+ _rv,
+ refCon);
+ return _res;
}
static PyObject *Qt_SGGetChannelDeviceAndInputNames(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
- Str255 outDeviceName;
- Str255 outInputName;
- short outInputNumber;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
+ Str255 outDeviceName;
+ Str255 outInputName;
+ short outInputNumber;
#ifndef SGGetChannelDeviceAndInputNames
- PyMac_PRECHECK(SGGetChannelDeviceAndInputNames);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- CmpInstObj_Convert, &c,
- PyMac_GetStr255, outDeviceName,
- PyMac_GetStr255, outInputName))
- return NULL;
- _rv = SGGetChannelDeviceAndInputNames(c,
- outDeviceName,
- outInputName,
- &outInputNumber);
- _res = Py_BuildValue("lh",
- _rv,
- outInputNumber);
- return _res;
+ PyMac_PRECHECK(SGGetChannelDeviceAndInputNames);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ CmpInstObj_Convert, &c,
+ PyMac_GetStr255, outDeviceName,
+ PyMac_GetStr255, outInputName))
+ return NULL;
+ _rv = SGGetChannelDeviceAndInputNames(c,
+ outDeviceName,
+ outInputName,
+ &outInputNumber);
+ _res = Py_BuildValue("lh",
+ _rv,
+ outInputNumber);
+ return _res;
}
static PyObject *Qt_SGSetChannelDeviceInput(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
- short inInputNumber;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
+ short inInputNumber;
#ifndef SGSetChannelDeviceInput
- PyMac_PRECHECK(SGSetChannelDeviceInput);
+ PyMac_PRECHECK(SGSetChannelDeviceInput);
#endif
- if (!PyArg_ParseTuple(_args, "O&h",
- CmpInstObj_Convert, &c,
- &inInputNumber))
- return NULL;
- _rv = SGSetChannelDeviceInput(c,
- inInputNumber);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&h",
+ CmpInstObj_Convert, &c,
+ &inInputNumber))
+ return NULL;
+ _rv = SGSetChannelDeviceInput(c,
+ inInputNumber);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGSetChannelSettingsStateChanging(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
- UInt32 inFlags;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
+ UInt32 inFlags;
#ifndef SGSetChannelSettingsStateChanging
- PyMac_PRECHECK(SGSetChannelSettingsStateChanging);
+ PyMac_PRECHECK(SGSetChannelSettingsStateChanging);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &c,
- &inFlags))
- return NULL;
- _rv = SGSetChannelSettingsStateChanging(c,
- inFlags);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &c,
+ &inFlags))
+ return NULL;
+ _rv = SGSetChannelSettingsStateChanging(c,
+ inFlags);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGInitChannel(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
- SeqGrabComponent owner;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
+ SeqGrabComponent owner;
#ifndef SGInitChannel
- PyMac_PRECHECK(SGInitChannel);
+ PyMac_PRECHECK(SGInitChannel);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &c,
- CmpInstObj_Convert, &owner))
- return NULL;
- _rv = SGInitChannel(c,
- owner);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &c,
+ CmpInstObj_Convert, &owner))
+ return NULL;
+ _rv = SGInitChannel(c,
+ owner);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGWriteSamples(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
- Movie m;
- AliasHandle theFile;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
+ Movie m;
+ AliasHandle theFile;
#ifndef SGWriteSamples
- PyMac_PRECHECK(SGWriteSamples);
+ PyMac_PRECHECK(SGWriteSamples);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- CmpInstObj_Convert, &c,
- MovieObj_Convert, &m,
- ResObj_Convert, &theFile))
- return NULL;
- _rv = SGWriteSamples(c,
- m,
- theFile);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ CmpInstObj_Convert, &c,
+ MovieObj_Convert, &m,
+ ResObj_Convert, &theFile))
+ return NULL;
+ _rv = SGWriteSamples(c,
+ m,
+ theFile);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGGetDataRate(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
- long bytesPerSecond;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
+ long bytesPerSecond;
#ifndef SGGetDataRate
- PyMac_PRECHECK(SGGetDataRate);
+ PyMac_PRECHECK(SGGetDataRate);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &c))
- return NULL;
- _rv = SGGetDataRate(c,
- &bytesPerSecond);
- _res = Py_BuildValue("ll",
- _rv,
- bytesPerSecond);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &c))
+ return NULL;
+ _rv = SGGetDataRate(c,
+ &bytesPerSecond);
+ _res = Py_BuildValue("ll",
+ _rv,
+ bytesPerSecond);
+ return _res;
}
static PyObject *Qt_SGAlignChannelRect(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
- Rect r;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
+ Rect r;
#ifndef SGAlignChannelRect
- PyMac_PRECHECK(SGAlignChannelRect);
+ PyMac_PRECHECK(SGAlignChannelRect);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &c))
- return NULL;
- _rv = SGAlignChannelRect(c,
- &r);
- _res = Py_BuildValue("lO&",
- _rv,
- PyMac_BuildRect, &r);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &c))
+ return NULL;
+ _rv = SGAlignChannelRect(c,
+ &r);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ PyMac_BuildRect, &r);
+ return _res;
}
static PyObject *Qt_SGPanelGetDitl(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SeqGrabComponent s;
- Handle ditl;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SeqGrabComponent s;
+ Handle ditl;
#ifndef SGPanelGetDitl
- PyMac_PRECHECK(SGPanelGetDitl);
+ PyMac_PRECHECK(SGPanelGetDitl);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &s))
- return NULL;
- _rv = SGPanelGetDitl(s,
- &ditl);
- _res = Py_BuildValue("lO&",
- _rv,
- ResObj_New, ditl);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &s))
+ return NULL;
+ _rv = SGPanelGetDitl(s,
+ &ditl);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ ResObj_New, ditl);
+ return _res;
}
static PyObject *Qt_SGPanelGetTitle(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SeqGrabComponent s;
- Str255 title;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SeqGrabComponent s;
+ Str255 title;
#ifndef SGPanelGetTitle
- PyMac_PRECHECK(SGPanelGetTitle);
+ PyMac_PRECHECK(SGPanelGetTitle);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &s,
- PyMac_GetStr255, title))
- return NULL;
- _rv = SGPanelGetTitle(s,
- title);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &s,
+ PyMac_GetStr255, title))
+ return NULL;
+ _rv = SGPanelGetTitle(s,
+ title);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGPanelCanRun(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SeqGrabComponent s;
- SGChannel c;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SeqGrabComponent s;
+ SGChannel c;
#ifndef SGPanelCanRun
- PyMac_PRECHECK(SGPanelCanRun);
+ PyMac_PRECHECK(SGPanelCanRun);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &s,
- CmpInstObj_Convert, &c))
- return NULL;
- _rv = SGPanelCanRun(s,
- c);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &s,
+ CmpInstObj_Convert, &c))
+ return NULL;
+ _rv = SGPanelCanRun(s,
+ c);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGPanelInstall(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SeqGrabComponent s;
- SGChannel c;
- DialogPtr d;
- short itemOffset;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SeqGrabComponent s;
+ SGChannel c;
+ DialogPtr d;
+ short itemOffset;
#ifndef SGPanelInstall
- PyMac_PRECHECK(SGPanelInstall);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&h",
- CmpInstObj_Convert, &s,
- CmpInstObj_Convert, &c,
- DlgObj_Convert, &d,
- &itemOffset))
- return NULL;
- _rv = SGPanelInstall(s,
- c,
- d,
- itemOffset);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyMac_PRECHECK(SGPanelInstall);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&h",
+ CmpInstObj_Convert, &s,
+ CmpInstObj_Convert, &c,
+ DlgObj_Convert, &d,
+ &itemOffset))
+ return NULL;
+ _rv = SGPanelInstall(s,
+ c,
+ d,
+ itemOffset);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGPanelEvent(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SeqGrabComponent s;
- SGChannel c;
- DialogPtr d;
- short itemOffset;
- EventRecord theEvent;
- short itemHit;
- Boolean handled;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SeqGrabComponent s;
+ SGChannel c;
+ DialogPtr d;
+ short itemOffset;
+ EventRecord theEvent;
+ short itemHit;
+ Boolean handled;
#ifndef SGPanelEvent
- PyMac_PRECHECK(SGPanelEvent);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&hO&",
- CmpInstObj_Convert, &s,
- CmpInstObj_Convert, &c,
- DlgObj_Convert, &d,
- &itemOffset,
- PyMac_GetEventRecord, &theEvent))
- return NULL;
- _rv = SGPanelEvent(s,
- c,
- d,
- itemOffset,
- &theEvent,
- &itemHit,
- &handled);
- _res = Py_BuildValue("lhb",
- _rv,
- itemHit,
- handled);
- return _res;
+ PyMac_PRECHECK(SGPanelEvent);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&hO&",
+ CmpInstObj_Convert, &s,
+ CmpInstObj_Convert, &c,
+ DlgObj_Convert, &d,
+ &itemOffset,
+ PyMac_GetEventRecord, &theEvent))
+ return NULL;
+ _rv = SGPanelEvent(s,
+ c,
+ d,
+ itemOffset,
+ &theEvent,
+ &itemHit,
+ &handled);
+ _res = Py_BuildValue("lhb",
+ _rv,
+ itemHit,
+ handled);
+ return _res;
}
static PyObject *Qt_SGPanelItem(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SeqGrabComponent s;
- SGChannel c;
- DialogPtr d;
- short itemOffset;
- short itemNum;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SeqGrabComponent s;
+ SGChannel c;
+ DialogPtr d;
+ short itemOffset;
+ short itemNum;
#ifndef SGPanelItem
- PyMac_PRECHECK(SGPanelItem);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&hh",
- CmpInstObj_Convert, &s,
- CmpInstObj_Convert, &c,
- DlgObj_Convert, &d,
- &itemOffset,
- &itemNum))
- return NULL;
- _rv = SGPanelItem(s,
- c,
- d,
- itemOffset,
- itemNum);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyMac_PRECHECK(SGPanelItem);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&hh",
+ CmpInstObj_Convert, &s,
+ CmpInstObj_Convert, &c,
+ DlgObj_Convert, &d,
+ &itemOffset,
+ &itemNum))
+ return NULL;
+ _rv = SGPanelItem(s,
+ c,
+ d,
+ itemOffset,
+ itemNum);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGPanelRemove(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SeqGrabComponent s;
- SGChannel c;
- DialogPtr d;
- short itemOffset;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SeqGrabComponent s;
+ SGChannel c;
+ DialogPtr d;
+ short itemOffset;
#ifndef SGPanelRemove
- PyMac_PRECHECK(SGPanelRemove);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&h",
- CmpInstObj_Convert, &s,
- CmpInstObj_Convert, &c,
- DlgObj_Convert, &d,
- &itemOffset))
- return NULL;
- _rv = SGPanelRemove(s,
- c,
- d,
- itemOffset);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyMac_PRECHECK(SGPanelRemove);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&h",
+ CmpInstObj_Convert, &s,
+ CmpInstObj_Convert, &c,
+ DlgObj_Convert, &d,
+ &itemOffset))
+ return NULL;
+ _rv = SGPanelRemove(s,
+ c,
+ d,
+ itemOffset);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGPanelSetGrabber(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SeqGrabComponent s;
- SeqGrabComponent sg;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SeqGrabComponent s;
+ SeqGrabComponent sg;
#ifndef SGPanelSetGrabber
- PyMac_PRECHECK(SGPanelSetGrabber);
+ PyMac_PRECHECK(SGPanelSetGrabber);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &s,
- CmpInstObj_Convert, &sg))
- return NULL;
- _rv = SGPanelSetGrabber(s,
- sg);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &s,
+ CmpInstObj_Convert, &sg))
+ return NULL;
+ _rv = SGPanelSetGrabber(s,
+ sg);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGPanelSetResFile(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SeqGrabComponent s;
- short resRef;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SeqGrabComponent s;
+ short resRef;
#ifndef SGPanelSetResFile
- PyMac_PRECHECK(SGPanelSetResFile);
+ PyMac_PRECHECK(SGPanelSetResFile);
#endif
- if (!PyArg_ParseTuple(_args, "O&h",
- CmpInstObj_Convert, &s,
- &resRef))
- return NULL;
- _rv = SGPanelSetResFile(s,
- resRef);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&h",
+ CmpInstObj_Convert, &s,
+ &resRef))
+ return NULL;
+ _rv = SGPanelSetResFile(s,
+ resRef);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGPanelGetSettings(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SeqGrabComponent s;
- SGChannel c;
- UserData ud;
- long flags;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SeqGrabComponent s;
+ SGChannel c;
+ UserData ud;
+ long flags;
#ifndef SGPanelGetSettings
- PyMac_PRECHECK(SGPanelGetSettings);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&l",
- CmpInstObj_Convert, &s,
- CmpInstObj_Convert, &c,
- &flags))
- return NULL;
- _rv = SGPanelGetSettings(s,
- c,
- &ud,
- flags);
- _res = Py_BuildValue("lO&",
- _rv,
- UserDataObj_New, ud);
- return _res;
+ PyMac_PRECHECK(SGPanelGetSettings);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&l",
+ CmpInstObj_Convert, &s,
+ CmpInstObj_Convert, &c,
+ &flags))
+ return NULL;
+ _rv = SGPanelGetSettings(s,
+ c,
+ &ud,
+ flags);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ UserDataObj_New, ud);
+ return _res;
}
static PyObject *Qt_SGPanelSetSettings(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SeqGrabComponent s;
- SGChannel c;
- UserData ud;
- long flags;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SeqGrabComponent s;
+ SGChannel c;
+ UserData ud;
+ long flags;
#ifndef SGPanelSetSettings
- PyMac_PRECHECK(SGPanelSetSettings);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&l",
- CmpInstObj_Convert, &s,
- CmpInstObj_Convert, &c,
- UserDataObj_Convert, &ud,
- &flags))
- return NULL;
- _rv = SGPanelSetSettings(s,
- c,
- ud,
- flags);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyMac_PRECHECK(SGPanelSetSettings);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&l",
+ CmpInstObj_Convert, &s,
+ CmpInstObj_Convert, &c,
+ UserDataObj_Convert, &ud,
+ &flags))
+ return NULL;
+ _rv = SGPanelSetSettings(s,
+ c,
+ ud,
+ flags);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGPanelValidateInput(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SeqGrabComponent s;
- Boolean ok;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SeqGrabComponent s;
+ Boolean ok;
#ifndef SGPanelValidateInput
- PyMac_PRECHECK(SGPanelValidateInput);
+ PyMac_PRECHECK(SGPanelValidateInput);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &s))
- return NULL;
- _rv = SGPanelValidateInput(s,
- &ok);
- _res = Py_BuildValue("lb",
- _rv,
- ok);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &s))
+ return NULL;
+ _rv = SGPanelValidateInput(s,
+ &ok);
+ _res = Py_BuildValue("lb",
+ _rv,
+ ok);
+ return _res;
}
static PyObject *Qt_SGPanelGetDITLForSize(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SeqGrabComponent s;
- Handle ditl;
- Point requestedSize;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SeqGrabComponent s;
+ Handle ditl;
+ Point requestedSize;
#ifndef SGPanelGetDITLForSize
- PyMac_PRECHECK(SGPanelGetDITLForSize);
+ PyMac_PRECHECK(SGPanelGetDITLForSize);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &s))
- return NULL;
- _rv = SGPanelGetDITLForSize(s,
- &ditl,
- &requestedSize);
- _res = Py_BuildValue("lO&O&",
- _rv,
- ResObj_New, ditl,
- PyMac_BuildPoint, requestedSize);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &s))
+ return NULL;
+ _rv = SGPanelGetDITLForSize(s,
+ &ditl,
+ &requestedSize);
+ _res = Py_BuildValue("lO&O&",
+ _rv,
+ ResObj_New, ditl,
+ PyMac_BuildPoint, requestedSize);
+ return _res;
}
static PyObject *Qt_SGGetSrcVideoBounds(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
- Rect r;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
+ Rect r;
#ifndef SGGetSrcVideoBounds
- PyMac_PRECHECK(SGGetSrcVideoBounds);
+ PyMac_PRECHECK(SGGetSrcVideoBounds);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &c))
- return NULL;
- _rv = SGGetSrcVideoBounds(c,
- &r);
- _res = Py_BuildValue("lO&",
- _rv,
- PyMac_BuildRect, &r);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &c))
+ return NULL;
+ _rv = SGGetSrcVideoBounds(c,
+ &r);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ PyMac_BuildRect, &r);
+ return _res;
}
static PyObject *Qt_SGSetVideoRect(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
- Rect r;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
+ Rect r;
#ifndef SGSetVideoRect
- PyMac_PRECHECK(SGSetVideoRect);
+ PyMac_PRECHECK(SGSetVideoRect);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &c,
- PyMac_GetRect, &r))
- return NULL;
- _rv = SGSetVideoRect(c,
- &r);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &c,
+ PyMac_GetRect, &r))
+ return NULL;
+ _rv = SGSetVideoRect(c,
+ &r);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGGetVideoRect(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
- Rect r;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
+ Rect r;
#ifndef SGGetVideoRect
- PyMac_PRECHECK(SGGetVideoRect);
+ PyMac_PRECHECK(SGGetVideoRect);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &c))
- return NULL;
- _rv = SGGetVideoRect(c,
- &r);
- _res = Py_BuildValue("lO&",
- _rv,
- PyMac_BuildRect, &r);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &c))
+ return NULL;
+ _rv = SGGetVideoRect(c,
+ &r);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ PyMac_BuildRect, &r);
+ return _res;
}
static PyObject *Qt_SGGetVideoCompressorType(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
- OSType compressorType;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
+ OSType compressorType;
#ifndef SGGetVideoCompressorType
- PyMac_PRECHECK(SGGetVideoCompressorType);
+ PyMac_PRECHECK(SGGetVideoCompressorType);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &c))
- return NULL;
- _rv = SGGetVideoCompressorType(c,
- &compressorType);
- _res = Py_BuildValue("lO&",
- _rv,
- PyMac_BuildOSType, compressorType);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &c))
+ return NULL;
+ _rv = SGGetVideoCompressorType(c,
+ &compressorType);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ PyMac_BuildOSType, compressorType);
+ return _res;
}
static PyObject *Qt_SGSetVideoCompressorType(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
- OSType compressorType;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
+ OSType compressorType;
#ifndef SGSetVideoCompressorType
- PyMac_PRECHECK(SGSetVideoCompressorType);
+ PyMac_PRECHECK(SGSetVideoCompressorType);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &c,
- PyMac_GetOSType, &compressorType))
- return NULL;
- _rv = SGSetVideoCompressorType(c,
- compressorType);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &c,
+ PyMac_GetOSType, &compressorType))
+ return NULL;
+ _rv = SGSetVideoCompressorType(c,
+ compressorType);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGSetVideoCompressor(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
- short depth;
- CompressorComponent compressor;
- CodecQ spatialQuality;
- CodecQ temporalQuality;
- long keyFrameRate;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
+ short depth;
+ CompressorComponent compressor;
+ CodecQ spatialQuality;
+ CodecQ temporalQuality;
+ long keyFrameRate;
#ifndef SGSetVideoCompressor
- PyMac_PRECHECK(SGSetVideoCompressor);
-#endif
- if (!PyArg_ParseTuple(_args, "O&hO&lll",
- CmpInstObj_Convert, &c,
- &depth,
- CmpObj_Convert, &compressor,
- &spatialQuality,
- &temporalQuality,
- &keyFrameRate))
- return NULL;
- _rv = SGSetVideoCompressor(c,
- depth,
- compressor,
- spatialQuality,
- temporalQuality,
- keyFrameRate);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyMac_PRECHECK(SGSetVideoCompressor);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&hO&lll",
+ CmpInstObj_Convert, &c,
+ &depth,
+ CmpObj_Convert, &compressor,
+ &spatialQuality,
+ &temporalQuality,
+ &keyFrameRate))
+ return NULL;
+ _rv = SGSetVideoCompressor(c,
+ depth,
+ compressor,
+ spatialQuality,
+ temporalQuality,
+ keyFrameRate);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGGetVideoCompressor(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
- short depth;
- CompressorComponent compressor;
- CodecQ spatialQuality;
- CodecQ temporalQuality;
- long keyFrameRate;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
+ short depth;
+ CompressorComponent compressor;
+ CodecQ spatialQuality;
+ CodecQ temporalQuality;
+ long keyFrameRate;
#ifndef SGGetVideoCompressor
- PyMac_PRECHECK(SGGetVideoCompressor);
-#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &c))
- return NULL;
- _rv = SGGetVideoCompressor(c,
- &depth,
- &compressor,
- &spatialQuality,
- &temporalQuality,
- &keyFrameRate);
- _res = Py_BuildValue("lhO&lll",
- _rv,
- depth,
- CmpObj_New, compressor,
- spatialQuality,
- temporalQuality,
- keyFrameRate);
- return _res;
+ PyMac_PRECHECK(SGGetVideoCompressor);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &c))
+ return NULL;
+ _rv = SGGetVideoCompressor(c,
+ &depth,
+ &compressor,
+ &spatialQuality,
+ &temporalQuality,
+ &keyFrameRate);
+ _res = Py_BuildValue("lhO&lll",
+ _rv,
+ depth,
+ CmpObj_New, compressor,
+ spatialQuality,
+ temporalQuality,
+ keyFrameRate);
+ return _res;
}
static PyObject *Qt_SGGetVideoDigitizerComponent(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentInstance _rv;
- SGChannel c;
+ PyObject *_res = NULL;
+ ComponentInstance _rv;
+ SGChannel c;
#ifndef SGGetVideoDigitizerComponent
- PyMac_PRECHECK(SGGetVideoDigitizerComponent);
+ PyMac_PRECHECK(SGGetVideoDigitizerComponent);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &c))
- return NULL;
- _rv = SGGetVideoDigitizerComponent(c);
- _res = Py_BuildValue("O&",
- CmpInstObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &c))
+ return NULL;
+ _rv = SGGetVideoDigitizerComponent(c);
+ _res = Py_BuildValue("O&",
+ CmpInstObj_New, _rv);
+ return _res;
}
static PyObject *Qt_SGSetVideoDigitizerComponent(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
- ComponentInstance vdig;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
+ ComponentInstance vdig;
#ifndef SGSetVideoDigitizerComponent
- PyMac_PRECHECK(SGSetVideoDigitizerComponent);
+ PyMac_PRECHECK(SGSetVideoDigitizerComponent);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &c,
- CmpInstObj_Convert, &vdig))
- return NULL;
- _rv = SGSetVideoDigitizerComponent(c,
- vdig);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &c,
+ CmpInstObj_Convert, &vdig))
+ return NULL;
+ _rv = SGSetVideoDigitizerComponent(c,
+ vdig);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGVideoDigitizerChanged(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
#ifndef SGVideoDigitizerChanged
- PyMac_PRECHECK(SGVideoDigitizerChanged);
+ PyMac_PRECHECK(SGVideoDigitizerChanged);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &c))
- return NULL;
- _rv = SGVideoDigitizerChanged(c);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &c))
+ return NULL;
+ _rv = SGVideoDigitizerChanged(c);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGGrabFrame(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
- short bufferNum;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
+ short bufferNum;
#ifndef SGGrabFrame
- PyMac_PRECHECK(SGGrabFrame);
+ PyMac_PRECHECK(SGGrabFrame);
#endif
- if (!PyArg_ParseTuple(_args, "O&h",
- CmpInstObj_Convert, &c,
- &bufferNum))
- return NULL;
- _rv = SGGrabFrame(c,
- bufferNum);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&h",
+ CmpInstObj_Convert, &c,
+ &bufferNum))
+ return NULL;
+ _rv = SGGrabFrame(c,
+ bufferNum);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGGrabFrameComplete(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
- short bufferNum;
- Boolean done;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
+ short bufferNum;
+ Boolean done;
#ifndef SGGrabFrameComplete
- PyMac_PRECHECK(SGGrabFrameComplete);
+ PyMac_PRECHECK(SGGrabFrameComplete);
#endif
- if (!PyArg_ParseTuple(_args, "O&h",
- CmpInstObj_Convert, &c,
- &bufferNum))
- return NULL;
- _rv = SGGrabFrameComplete(c,
- bufferNum,
- &done);
- _res = Py_BuildValue("lb",
- _rv,
- done);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&h",
+ CmpInstObj_Convert, &c,
+ &bufferNum))
+ return NULL;
+ _rv = SGGrabFrameComplete(c,
+ bufferNum,
+ &done);
+ _res = Py_BuildValue("lb",
+ _rv,
+ done);
+ return _res;
}
static PyObject *Qt_SGCompressFrame(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
- short bufferNum;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
+ short bufferNum;
#ifndef SGCompressFrame
- PyMac_PRECHECK(SGCompressFrame);
+ PyMac_PRECHECK(SGCompressFrame);
#endif
- if (!PyArg_ParseTuple(_args, "O&h",
- CmpInstObj_Convert, &c,
- &bufferNum))
- return NULL;
- _rv = SGCompressFrame(c,
- bufferNum);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&h",
+ CmpInstObj_Convert, &c,
+ &bufferNum))
+ return NULL;
+ _rv = SGCompressFrame(c,
+ bufferNum);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGSetCompressBuffer(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
- short depth;
- Rect compressSize;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
+ short depth;
+ Rect compressSize;
#ifndef SGSetCompressBuffer
- PyMac_PRECHECK(SGSetCompressBuffer);
+ PyMac_PRECHECK(SGSetCompressBuffer);
#endif
- if (!PyArg_ParseTuple(_args, "O&hO&",
- CmpInstObj_Convert, &c,
- &depth,
- PyMac_GetRect, &compressSize))
- return NULL;
- _rv = SGSetCompressBuffer(c,
- depth,
- &compressSize);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&hO&",
+ CmpInstObj_Convert, &c,
+ &depth,
+ PyMac_GetRect, &compressSize))
+ return NULL;
+ _rv = SGSetCompressBuffer(c,
+ depth,
+ &compressSize);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGGetCompressBuffer(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
- short depth;
- Rect compressSize;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
+ short depth;
+ Rect compressSize;
#ifndef SGGetCompressBuffer
- PyMac_PRECHECK(SGGetCompressBuffer);
+ PyMac_PRECHECK(SGGetCompressBuffer);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &c))
- return NULL;
- _rv = SGGetCompressBuffer(c,
- &depth,
- &compressSize);
- _res = Py_BuildValue("lhO&",
- _rv,
- depth,
- PyMac_BuildRect, &compressSize);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &c))
+ return NULL;
+ _rv = SGGetCompressBuffer(c,
+ &depth,
+ &compressSize);
+ _res = Py_BuildValue("lhO&",
+ _rv,
+ depth,
+ PyMac_BuildRect, &compressSize);
+ return _res;
}
static PyObject *Qt_SGGetBufferInfo(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
- short bufferNum;
- PixMapHandle bufferPM;
- Rect bufferRect;
- GWorldPtr compressBuffer;
- Rect compressBufferRect;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
+ short bufferNum;
+ PixMapHandle bufferPM;
+ Rect bufferRect;
+ GWorldPtr compressBuffer;
+ Rect compressBufferRect;
#ifndef SGGetBufferInfo
- PyMac_PRECHECK(SGGetBufferInfo);
-#endif
- if (!PyArg_ParseTuple(_args, "O&h",
- CmpInstObj_Convert, &c,
- &bufferNum))
- return NULL;
- _rv = SGGetBufferInfo(c,
- bufferNum,
- &bufferPM,
- &bufferRect,
- &compressBuffer,
- &compressBufferRect);
- _res = Py_BuildValue("lO&O&O&O&",
- _rv,
- ResObj_New, bufferPM,
- PyMac_BuildRect, &bufferRect,
- GWorldObj_New, compressBuffer,
- PyMac_BuildRect, &compressBufferRect);
- return _res;
+ PyMac_PRECHECK(SGGetBufferInfo);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&h",
+ CmpInstObj_Convert, &c,
+ &bufferNum))
+ return NULL;
+ _rv = SGGetBufferInfo(c,
+ bufferNum,
+ &bufferPM,
+ &bufferRect,
+ &compressBuffer,
+ &compressBufferRect);
+ _res = Py_BuildValue("lO&O&O&O&",
+ _rv,
+ ResObj_New, bufferPM,
+ PyMac_BuildRect, &bufferRect,
+ GWorldObj_New, compressBuffer,
+ PyMac_BuildRect, &compressBufferRect);
+ return _res;
}
static PyObject *Qt_SGSetUseScreenBuffer(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
- Boolean useScreenBuffer;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
+ Boolean useScreenBuffer;
#ifndef SGSetUseScreenBuffer
- PyMac_PRECHECK(SGSetUseScreenBuffer);
+ PyMac_PRECHECK(SGSetUseScreenBuffer);
#endif
- if (!PyArg_ParseTuple(_args, "O&b",
- CmpInstObj_Convert, &c,
- &useScreenBuffer))
- return NULL;
- _rv = SGSetUseScreenBuffer(c,
- useScreenBuffer);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&b",
+ CmpInstObj_Convert, &c,
+ &useScreenBuffer))
+ return NULL;
+ _rv = SGSetUseScreenBuffer(c,
+ useScreenBuffer);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGGetUseScreenBuffer(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
- Boolean useScreenBuffer;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
+ Boolean useScreenBuffer;
#ifndef SGGetUseScreenBuffer
- PyMac_PRECHECK(SGGetUseScreenBuffer);
+ PyMac_PRECHECK(SGGetUseScreenBuffer);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &c))
- return NULL;
- _rv = SGGetUseScreenBuffer(c,
- &useScreenBuffer);
- _res = Py_BuildValue("lb",
- _rv,
- useScreenBuffer);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &c))
+ return NULL;
+ _rv = SGGetUseScreenBuffer(c,
+ &useScreenBuffer);
+ _res = Py_BuildValue("lb",
+ _rv,
+ useScreenBuffer);
+ return _res;
}
static PyObject *Qt_SGSetFrameRate(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
- Fixed frameRate;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
+ Fixed frameRate;
#ifndef SGSetFrameRate
- PyMac_PRECHECK(SGSetFrameRate);
+ PyMac_PRECHECK(SGSetFrameRate);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &c,
- PyMac_GetFixed, &frameRate))
- return NULL;
- _rv = SGSetFrameRate(c,
- frameRate);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &c,
+ PyMac_GetFixed, &frameRate))
+ return NULL;
+ _rv = SGSetFrameRate(c,
+ frameRate);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGGetFrameRate(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
- Fixed frameRate;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
+ Fixed frameRate;
#ifndef SGGetFrameRate
- PyMac_PRECHECK(SGGetFrameRate);
+ PyMac_PRECHECK(SGGetFrameRate);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &c))
- return NULL;
- _rv = SGGetFrameRate(c,
- &frameRate);
- _res = Py_BuildValue("lO&",
- _rv,
- PyMac_BuildFixed, frameRate);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &c))
+ return NULL;
+ _rv = SGGetFrameRate(c,
+ &frameRate);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ PyMac_BuildFixed, frameRate);
+ return _res;
}
static PyObject *Qt_SGSetPreferredPacketSize(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
- long preferredPacketSizeInBytes;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
+ long preferredPacketSizeInBytes;
#ifndef SGSetPreferredPacketSize
- PyMac_PRECHECK(SGSetPreferredPacketSize);
+ PyMac_PRECHECK(SGSetPreferredPacketSize);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &c,
- &preferredPacketSizeInBytes))
- return NULL;
- _rv = SGSetPreferredPacketSize(c,
- preferredPacketSizeInBytes);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &c,
+ &preferredPacketSizeInBytes))
+ return NULL;
+ _rv = SGSetPreferredPacketSize(c,
+ preferredPacketSizeInBytes);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGGetPreferredPacketSize(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
- long preferredPacketSizeInBytes;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
+ long preferredPacketSizeInBytes;
#ifndef SGGetPreferredPacketSize
- PyMac_PRECHECK(SGGetPreferredPacketSize);
+ PyMac_PRECHECK(SGGetPreferredPacketSize);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &c))
- return NULL;
- _rv = SGGetPreferredPacketSize(c,
- &preferredPacketSizeInBytes);
- _res = Py_BuildValue("ll",
- _rv,
- preferredPacketSizeInBytes);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &c))
+ return NULL;
+ _rv = SGGetPreferredPacketSize(c,
+ &preferredPacketSizeInBytes);
+ _res = Py_BuildValue("ll",
+ _rv,
+ preferredPacketSizeInBytes);
+ return _res;
}
static PyObject *Qt_SGSetUserVideoCompressorList(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
- Handle compressorTypes;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
+ Handle compressorTypes;
#ifndef SGSetUserVideoCompressorList
- PyMac_PRECHECK(SGSetUserVideoCompressorList);
+ PyMac_PRECHECK(SGSetUserVideoCompressorList);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &c,
- ResObj_Convert, &compressorTypes))
- return NULL;
- _rv = SGSetUserVideoCompressorList(c,
- compressorTypes);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &c,
+ ResObj_Convert, &compressorTypes))
+ return NULL;
+ _rv = SGSetUserVideoCompressorList(c,
+ compressorTypes);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGGetUserVideoCompressorList(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
- Handle compressorTypes;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
+ Handle compressorTypes;
#ifndef SGGetUserVideoCompressorList
- PyMac_PRECHECK(SGGetUserVideoCompressorList);
+ PyMac_PRECHECK(SGGetUserVideoCompressorList);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &c))
- return NULL;
- _rv = SGGetUserVideoCompressorList(c,
- &compressorTypes);
- _res = Py_BuildValue("lO&",
- _rv,
- ResObj_New, compressorTypes);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &c))
+ return NULL;
+ _rv = SGGetUserVideoCompressorList(c,
+ &compressorTypes);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ ResObj_New, compressorTypes);
+ return _res;
}
static PyObject *Qt_SGSetSoundInputDriver(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
- Str255 driverName;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
+ Str255 driverName;
#ifndef SGSetSoundInputDriver
- PyMac_PRECHECK(SGSetSoundInputDriver);
+ PyMac_PRECHECK(SGSetSoundInputDriver);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &c,
- PyMac_GetStr255, driverName))
- return NULL;
- _rv = SGSetSoundInputDriver(c,
- driverName);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &c,
+ PyMac_GetStr255, driverName))
+ return NULL;
+ _rv = SGSetSoundInputDriver(c,
+ driverName);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGGetSoundInputDriver(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- long _rv;
- SGChannel c;
+ PyObject *_res = NULL;
+ long _rv;
+ SGChannel c;
#ifndef SGGetSoundInputDriver
- PyMac_PRECHECK(SGGetSoundInputDriver);
+ PyMac_PRECHECK(SGGetSoundInputDriver);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &c))
- return NULL;
- _rv = SGGetSoundInputDriver(c);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &c))
+ return NULL;
+ _rv = SGGetSoundInputDriver(c);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGSoundInputDriverChanged(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
#ifndef SGSoundInputDriverChanged
- PyMac_PRECHECK(SGSoundInputDriverChanged);
+ PyMac_PRECHECK(SGSoundInputDriverChanged);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &c))
- return NULL;
- _rv = SGSoundInputDriverChanged(c);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &c))
+ return NULL;
+ _rv = SGSoundInputDriverChanged(c);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGSetSoundRecordChunkSize(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
- long seconds;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
+ long seconds;
#ifndef SGSetSoundRecordChunkSize
- PyMac_PRECHECK(SGSetSoundRecordChunkSize);
+ PyMac_PRECHECK(SGSetSoundRecordChunkSize);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &c,
- &seconds))
- return NULL;
- _rv = SGSetSoundRecordChunkSize(c,
- seconds);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &c,
+ &seconds))
+ return NULL;
+ _rv = SGSetSoundRecordChunkSize(c,
+ seconds);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGGetSoundRecordChunkSize(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- long _rv;
- SGChannel c;
+ PyObject *_res = NULL;
+ long _rv;
+ SGChannel c;
#ifndef SGGetSoundRecordChunkSize
- PyMac_PRECHECK(SGGetSoundRecordChunkSize);
+ PyMac_PRECHECK(SGGetSoundRecordChunkSize);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &c))
- return NULL;
- _rv = SGGetSoundRecordChunkSize(c);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &c))
+ return NULL;
+ _rv = SGGetSoundRecordChunkSize(c);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGSetSoundInputRate(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
- Fixed rate;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
+ Fixed rate;
#ifndef SGSetSoundInputRate
- PyMac_PRECHECK(SGSetSoundInputRate);
+ PyMac_PRECHECK(SGSetSoundInputRate);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &c,
- PyMac_GetFixed, &rate))
- return NULL;
- _rv = SGSetSoundInputRate(c,
- rate);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &c,
+ PyMac_GetFixed, &rate))
+ return NULL;
+ _rv = SGSetSoundInputRate(c,
+ rate);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGGetSoundInputRate(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Fixed _rv;
- SGChannel c;
+ PyObject *_res = NULL;
+ Fixed _rv;
+ SGChannel c;
#ifndef SGGetSoundInputRate
- PyMac_PRECHECK(SGGetSoundInputRate);
+ PyMac_PRECHECK(SGGetSoundInputRate);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &c))
- return NULL;
- _rv = SGGetSoundInputRate(c);
- _res = Py_BuildValue("O&",
- PyMac_BuildFixed, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &c))
+ return NULL;
+ _rv = SGGetSoundInputRate(c);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildFixed, _rv);
+ return _res;
}
static PyObject *Qt_SGSetSoundInputParameters(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
- short sampleSize;
- short numChannels;
- OSType compressionType;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
+ short sampleSize;
+ short numChannels;
+ OSType compressionType;
#ifndef SGSetSoundInputParameters
- PyMac_PRECHECK(SGSetSoundInputParameters);
-#endif
- if (!PyArg_ParseTuple(_args, "O&hhO&",
- CmpInstObj_Convert, &c,
- &sampleSize,
- &numChannels,
- PyMac_GetOSType, &compressionType))
- return NULL;
- _rv = SGSetSoundInputParameters(c,
- sampleSize,
- numChannels,
- compressionType);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyMac_PRECHECK(SGSetSoundInputParameters);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&hhO&",
+ CmpInstObj_Convert, &c,
+ &sampleSize,
+ &numChannels,
+ PyMac_GetOSType, &compressionType))
+ return NULL;
+ _rv = SGSetSoundInputParameters(c,
+ sampleSize,
+ numChannels,
+ compressionType);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGGetSoundInputParameters(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
- short sampleSize;
- short numChannels;
- OSType compressionType;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
+ short sampleSize;
+ short numChannels;
+ OSType compressionType;
#ifndef SGGetSoundInputParameters
- PyMac_PRECHECK(SGGetSoundInputParameters);
-#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &c))
- return NULL;
- _rv = SGGetSoundInputParameters(c,
- &sampleSize,
- &numChannels,
- &compressionType);
- _res = Py_BuildValue("lhhO&",
- _rv,
- sampleSize,
- numChannels,
- PyMac_BuildOSType, compressionType);
- return _res;
+ PyMac_PRECHECK(SGGetSoundInputParameters);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &c))
+ return NULL;
+ _rv = SGGetSoundInputParameters(c,
+ &sampleSize,
+ &numChannels,
+ &compressionType);
+ _res = Py_BuildValue("lhhO&",
+ _rv,
+ sampleSize,
+ numChannels,
+ PyMac_BuildOSType, compressionType);
+ return _res;
}
static PyObject *Qt_SGSetAdditionalSoundRates(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
- Handle rates;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
+ Handle rates;
#ifndef SGSetAdditionalSoundRates
- PyMac_PRECHECK(SGSetAdditionalSoundRates);
+ PyMac_PRECHECK(SGSetAdditionalSoundRates);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &c,
- ResObj_Convert, &rates))
- return NULL;
- _rv = SGSetAdditionalSoundRates(c,
- rates);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &c,
+ ResObj_Convert, &rates))
+ return NULL;
+ _rv = SGSetAdditionalSoundRates(c,
+ rates);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGGetAdditionalSoundRates(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
- Handle rates;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
+ Handle rates;
#ifndef SGGetAdditionalSoundRates
- PyMac_PRECHECK(SGGetAdditionalSoundRates);
+ PyMac_PRECHECK(SGGetAdditionalSoundRates);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &c))
- return NULL;
- _rv = SGGetAdditionalSoundRates(c,
- &rates);
- _res = Py_BuildValue("lO&",
- _rv,
- ResObj_New, rates);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &c))
+ return NULL;
+ _rv = SGGetAdditionalSoundRates(c,
+ &rates);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ ResObj_New, rates);
+ return _res;
}
static PyObject *Qt_SGSetFontName(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
- StringPtr pstr;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
+ StringPtr pstr;
#ifndef SGSetFontName
- PyMac_PRECHECK(SGSetFontName);
+ PyMac_PRECHECK(SGSetFontName);
#endif
- if (!PyArg_ParseTuple(_args, "O&s",
- CmpInstObj_Convert, &c,
- &pstr))
- return NULL;
- _rv = SGSetFontName(c,
- pstr);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&s",
+ CmpInstObj_Convert, &c,
+ &pstr))
+ return NULL;
+ _rv = SGSetFontName(c,
+ pstr);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGSetFontSize(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
- short fontSize;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
+ short fontSize;
#ifndef SGSetFontSize
- PyMac_PRECHECK(SGSetFontSize);
+ PyMac_PRECHECK(SGSetFontSize);
#endif
- if (!PyArg_ParseTuple(_args, "O&h",
- CmpInstObj_Convert, &c,
- &fontSize))
- return NULL;
- _rv = SGSetFontSize(c,
- fontSize);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&h",
+ CmpInstObj_Convert, &c,
+ &fontSize))
+ return NULL;
+ _rv = SGSetFontSize(c,
+ fontSize);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGSetTextForeColor(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
- RGBColor theColor;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
+ RGBColor theColor;
#ifndef SGSetTextForeColor
- PyMac_PRECHECK(SGSetTextForeColor);
+ PyMac_PRECHECK(SGSetTextForeColor);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &c))
- return NULL;
- _rv = SGSetTextForeColor(c,
- &theColor);
- _res = Py_BuildValue("lO&",
- _rv,
- QdRGB_New, &theColor);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &c))
+ return NULL;
+ _rv = SGSetTextForeColor(c,
+ &theColor);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ QdRGB_New, &theColor);
+ return _res;
}
static PyObject *Qt_SGSetTextBackColor(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
- RGBColor theColor;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
+ RGBColor theColor;
#ifndef SGSetTextBackColor
- PyMac_PRECHECK(SGSetTextBackColor);
+ PyMac_PRECHECK(SGSetTextBackColor);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &c))
- return NULL;
- _rv = SGSetTextBackColor(c,
- &theColor);
- _res = Py_BuildValue("lO&",
- _rv,
- QdRGB_New, &theColor);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &c))
+ return NULL;
+ _rv = SGSetTextBackColor(c,
+ &theColor);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ QdRGB_New, &theColor);
+ return _res;
}
static PyObject *Qt_SGSetJustification(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
- short just;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
+ short just;
#ifndef SGSetJustification
- PyMac_PRECHECK(SGSetJustification);
+ PyMac_PRECHECK(SGSetJustification);
#endif
- if (!PyArg_ParseTuple(_args, "O&h",
- CmpInstObj_Convert, &c,
- &just))
- return NULL;
- _rv = SGSetJustification(c,
- just);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&h",
+ CmpInstObj_Convert, &c,
+ &just))
+ return NULL;
+ _rv = SGSetJustification(c,
+ just);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_SGGetTextReturnToSpaceValue(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
- short rettospace;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
+ short rettospace;
#ifndef SGGetTextReturnToSpaceValue
- PyMac_PRECHECK(SGGetTextReturnToSpaceValue);
+ PyMac_PRECHECK(SGGetTextReturnToSpaceValue);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &c))
- return NULL;
- _rv = SGGetTextReturnToSpaceValue(c,
- &rettospace);
- _res = Py_BuildValue("lh",
- _rv,
- rettospace);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &c))
+ return NULL;
+ _rv = SGGetTextReturnToSpaceValue(c,
+ &rettospace);
+ _res = Py_BuildValue("lh",
+ _rv,
+ rettospace);
+ return _res;
}
static PyObject *Qt_SGSetTextReturnToSpaceValue(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- SGChannel c;
- short rettospace;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ SGChannel c;
+ short rettospace;
#ifndef SGSetTextReturnToSpaceValue
- PyMac_PRECHECK(SGSetTextReturnToSpaceValue);
+ PyMac_PRECHECK(SGSetTextReturnToSpaceValue);
#endif
- if (!PyArg_ParseTuple(_args, "O&h",
- CmpInstObj_Convert, &c,
- &rettospace))
- return NULL;
- _rv = SGSetTextReturnToSpaceValue(c,
- rettospace);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&h",
+ CmpInstObj_Convert, &c,
+ &rettospace))
+ return NULL;
+ _rv = SGSetTextReturnToSpaceValue(c,
+ rettospace);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_QTVideoOutputGetCurrentClientName(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- QTVideoOutputComponent vo;
- Str255 str;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ QTVideoOutputComponent vo;
+ Str255 str;
#ifndef QTVideoOutputGetCurrentClientName
- PyMac_PRECHECK(QTVideoOutputGetCurrentClientName);
+ PyMac_PRECHECK(QTVideoOutputGetCurrentClientName);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &vo,
- PyMac_GetStr255, str))
- return NULL;
- _rv = QTVideoOutputGetCurrentClientName(vo,
- str);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &vo,
+ PyMac_GetStr255, str))
+ return NULL;
+ _rv = QTVideoOutputGetCurrentClientName(vo,
+ str);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_QTVideoOutputSetClientName(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- QTVideoOutputComponent vo;
- Str255 str;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ QTVideoOutputComponent vo;
+ Str255 str;
#ifndef QTVideoOutputSetClientName
- PyMac_PRECHECK(QTVideoOutputSetClientName);
+ PyMac_PRECHECK(QTVideoOutputSetClientName);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &vo,
- PyMac_GetStr255, str))
- return NULL;
- _rv = QTVideoOutputSetClientName(vo,
- str);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &vo,
+ PyMac_GetStr255, str))
+ return NULL;
+ _rv = QTVideoOutputSetClientName(vo,
+ str);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_QTVideoOutputGetClientName(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- QTVideoOutputComponent vo;
- Str255 str;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ QTVideoOutputComponent vo;
+ Str255 str;
#ifndef QTVideoOutputGetClientName
- PyMac_PRECHECK(QTVideoOutputGetClientName);
+ PyMac_PRECHECK(QTVideoOutputGetClientName);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &vo,
- PyMac_GetStr255, str))
- return NULL;
- _rv = QTVideoOutputGetClientName(vo,
- str);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &vo,
+ PyMac_GetStr255, str))
+ return NULL;
+ _rv = QTVideoOutputGetClientName(vo,
+ str);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_QTVideoOutputBegin(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- QTVideoOutputComponent vo;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ QTVideoOutputComponent vo;
#ifndef QTVideoOutputBegin
- PyMac_PRECHECK(QTVideoOutputBegin);
+ PyMac_PRECHECK(QTVideoOutputBegin);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &vo))
- return NULL;
- _rv = QTVideoOutputBegin(vo);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &vo))
+ return NULL;
+ _rv = QTVideoOutputBegin(vo);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_QTVideoOutputEnd(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- QTVideoOutputComponent vo;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ QTVideoOutputComponent vo;
#ifndef QTVideoOutputEnd
- PyMac_PRECHECK(QTVideoOutputEnd);
+ PyMac_PRECHECK(QTVideoOutputEnd);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &vo))
- return NULL;
- _rv = QTVideoOutputEnd(vo);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &vo))
+ return NULL;
+ _rv = QTVideoOutputEnd(vo);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_QTVideoOutputSetDisplayMode(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- QTVideoOutputComponent vo;
- long displayModeID;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ QTVideoOutputComponent vo;
+ long displayModeID;
#ifndef QTVideoOutputSetDisplayMode
- PyMac_PRECHECK(QTVideoOutputSetDisplayMode);
+ PyMac_PRECHECK(QTVideoOutputSetDisplayMode);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &vo,
- &displayModeID))
- return NULL;
- _rv = QTVideoOutputSetDisplayMode(vo,
- displayModeID);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &vo,
+ &displayModeID))
+ return NULL;
+ _rv = QTVideoOutputSetDisplayMode(vo,
+ displayModeID);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_QTVideoOutputGetDisplayMode(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- QTVideoOutputComponent vo;
- long displayModeID;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ QTVideoOutputComponent vo;
+ long displayModeID;
#ifndef QTVideoOutputGetDisplayMode
- PyMac_PRECHECK(QTVideoOutputGetDisplayMode);
+ PyMac_PRECHECK(QTVideoOutputGetDisplayMode);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &vo))
- return NULL;
- _rv = QTVideoOutputGetDisplayMode(vo,
- &displayModeID);
- _res = Py_BuildValue("ll",
- _rv,
- displayModeID);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &vo))
+ return NULL;
+ _rv = QTVideoOutputGetDisplayMode(vo,
+ &displayModeID);
+ _res = Py_BuildValue("ll",
+ _rv,
+ displayModeID);
+ return _res;
}
static PyObject *Qt_QTVideoOutputGetGWorld(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- QTVideoOutputComponent vo;
- GWorldPtr gw;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ QTVideoOutputComponent vo;
+ GWorldPtr gw;
#ifndef QTVideoOutputGetGWorld
- PyMac_PRECHECK(QTVideoOutputGetGWorld);
+ PyMac_PRECHECK(QTVideoOutputGetGWorld);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &vo))
- return NULL;
- _rv = QTVideoOutputGetGWorld(vo,
- &gw);
- _res = Py_BuildValue("lO&",
- _rv,
- GWorldObj_New, gw);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &vo))
+ return NULL;
+ _rv = QTVideoOutputGetGWorld(vo,
+ &gw);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ GWorldObj_New, gw);
+ return _res;
}
static PyObject *Qt_QTVideoOutputGetIndSoundOutput(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- QTVideoOutputComponent vo;
- long index;
- Component outputComponent;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ QTVideoOutputComponent vo;
+ long index;
+ Component outputComponent;
#ifndef QTVideoOutputGetIndSoundOutput
- PyMac_PRECHECK(QTVideoOutputGetIndSoundOutput);
+ PyMac_PRECHECK(QTVideoOutputGetIndSoundOutput);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &vo,
- &index))
- return NULL;
- _rv = QTVideoOutputGetIndSoundOutput(vo,
- index,
- &outputComponent);
- _res = Py_BuildValue("lO&",
- _rv,
- CmpObj_New, outputComponent);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &vo,
+ &index))
+ return NULL;
+ _rv = QTVideoOutputGetIndSoundOutput(vo,
+ index,
+ &outputComponent);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ CmpObj_New, outputComponent);
+ return _res;
}
static PyObject *Qt_QTVideoOutputGetClock(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- QTVideoOutputComponent vo;
- ComponentInstance clock;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ QTVideoOutputComponent vo;
+ ComponentInstance clock;
#ifndef QTVideoOutputGetClock
- PyMac_PRECHECK(QTVideoOutputGetClock);
+ PyMac_PRECHECK(QTVideoOutputGetClock);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &vo))
- return NULL;
- _rv = QTVideoOutputGetClock(vo,
- &clock);
- _res = Py_BuildValue("lO&",
- _rv,
- CmpInstObj_New, clock);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &vo))
+ return NULL;
+ _rv = QTVideoOutputGetClock(vo,
+ &clock);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ CmpInstObj_New, clock);
+ return _res;
}
static PyObject *Qt_QTVideoOutputSetEchoPort(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- QTVideoOutputComponent vo;
- CGrafPtr echoPort;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ QTVideoOutputComponent vo;
+ CGrafPtr echoPort;
#ifndef QTVideoOutputSetEchoPort
- PyMac_PRECHECK(QTVideoOutputSetEchoPort);
+ PyMac_PRECHECK(QTVideoOutputSetEchoPort);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &vo,
- GrafObj_Convert, &echoPort))
- return NULL;
- _rv = QTVideoOutputSetEchoPort(vo,
- echoPort);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &vo,
+ GrafObj_Convert, &echoPort))
+ return NULL;
+ _rv = QTVideoOutputSetEchoPort(vo,
+ echoPort);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_QTVideoOutputGetIndImageDecompressor(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- QTVideoOutputComponent vo;
- long index;
- Component codec;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ QTVideoOutputComponent vo;
+ long index;
+ Component codec;
#ifndef QTVideoOutputGetIndImageDecompressor
- PyMac_PRECHECK(QTVideoOutputGetIndImageDecompressor);
+ PyMac_PRECHECK(QTVideoOutputGetIndImageDecompressor);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &vo,
- &index))
- return NULL;
- _rv = QTVideoOutputGetIndImageDecompressor(vo,
- index,
- &codec);
- _res = Py_BuildValue("lO&",
- _rv,
- CmpObj_New, codec);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &vo,
+ &index))
+ return NULL;
+ _rv = QTVideoOutputGetIndImageDecompressor(vo,
+ index,
+ &codec);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ CmpObj_New, codec);
+ return _res;
}
static PyObject *Qt_QTVideoOutputBaseSetEchoPort(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- QTVideoOutputComponent vo;
- CGrafPtr echoPort;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ QTVideoOutputComponent vo;
+ CGrafPtr echoPort;
#ifndef QTVideoOutputBaseSetEchoPort
- PyMac_PRECHECK(QTVideoOutputBaseSetEchoPort);
+ PyMac_PRECHECK(QTVideoOutputBaseSetEchoPort);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &vo,
- GrafObj_Convert, &echoPort))
- return NULL;
- _rv = QTVideoOutputBaseSetEchoPort(vo,
- echoPort);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &vo,
+ GrafObj_Convert, &echoPort))
+ return NULL;
+ _rv = QTVideoOutputBaseSetEchoPort(vo,
+ echoPort);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MediaSetChunkManagementFlags(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- UInt32 flags;
- UInt32 flagsMask;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ UInt32 flags;
+ UInt32 flagsMask;
#ifndef MediaSetChunkManagementFlags
- PyMac_PRECHECK(MediaSetChunkManagementFlags);
+ PyMac_PRECHECK(MediaSetChunkManagementFlags);
#endif
- if (!PyArg_ParseTuple(_args, "O&ll",
- CmpInstObj_Convert, &mh,
- &flags,
- &flagsMask))
- return NULL;
- _rv = MediaSetChunkManagementFlags(mh,
- flags,
- flagsMask);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&ll",
+ CmpInstObj_Convert, &mh,
+ &flags,
+ &flagsMask))
+ return NULL;
+ _rv = MediaSetChunkManagementFlags(mh,
+ flags,
+ flagsMask);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MediaGetChunkManagementFlags(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- UInt32 flags;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ UInt32 flags;
#ifndef MediaGetChunkManagementFlags
- PyMac_PRECHECK(MediaGetChunkManagementFlags);
+ PyMac_PRECHECK(MediaGetChunkManagementFlags);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &mh))
- return NULL;
- _rv = MediaGetChunkManagementFlags(mh,
- &flags);
- _res = Py_BuildValue("ll",
- _rv,
- flags);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &mh))
+ return NULL;
+ _rv = MediaGetChunkManagementFlags(mh,
+ &flags);
+ _res = Py_BuildValue("ll",
+ _rv,
+ flags);
+ return _res;
}
static PyObject *Qt_MediaSetPurgeableChunkMemoryAllowance(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- Size allowance;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ Size allowance;
#ifndef MediaSetPurgeableChunkMemoryAllowance
- PyMac_PRECHECK(MediaSetPurgeableChunkMemoryAllowance);
+ PyMac_PRECHECK(MediaSetPurgeableChunkMemoryAllowance);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &mh,
- &allowance))
- return NULL;
- _rv = MediaSetPurgeableChunkMemoryAllowance(mh,
- allowance);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &mh,
+ &allowance))
+ return NULL;
+ _rv = MediaSetPurgeableChunkMemoryAllowance(mh,
+ allowance);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MediaGetPurgeableChunkMemoryAllowance(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- Size allowance;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ Size allowance;
#ifndef MediaGetPurgeableChunkMemoryAllowance
- PyMac_PRECHECK(MediaGetPurgeableChunkMemoryAllowance);
+ PyMac_PRECHECK(MediaGetPurgeableChunkMemoryAllowance);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &mh))
- return NULL;
- _rv = MediaGetPurgeableChunkMemoryAllowance(mh,
- &allowance);
- _res = Py_BuildValue("ll",
- _rv,
- allowance);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &mh))
+ return NULL;
+ _rv = MediaGetPurgeableChunkMemoryAllowance(mh,
+ &allowance);
+ _res = Py_BuildValue("ll",
+ _rv,
+ allowance);
+ return _res;
}
static PyObject *Qt_MediaEmptyAllPurgeableChunks(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
#ifndef MediaEmptyAllPurgeableChunks
- PyMac_PRECHECK(MediaEmptyAllPurgeableChunks);
+ PyMac_PRECHECK(MediaEmptyAllPurgeableChunks);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &mh))
- return NULL;
- _rv = MediaEmptyAllPurgeableChunks(mh);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &mh))
+ return NULL;
+ _rv = MediaEmptyAllPurgeableChunks(mh);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MediaSetHandlerCapabilities(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- long flags;
- long flagsMask;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ long flags;
+ long flagsMask;
#ifndef MediaSetHandlerCapabilities
- PyMac_PRECHECK(MediaSetHandlerCapabilities);
+ PyMac_PRECHECK(MediaSetHandlerCapabilities);
#endif
- if (!PyArg_ParseTuple(_args, "O&ll",
- CmpInstObj_Convert, &mh,
- &flags,
- &flagsMask))
- return NULL;
- _rv = MediaSetHandlerCapabilities(mh,
- flags,
- flagsMask);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&ll",
+ CmpInstObj_Convert, &mh,
+ &flags,
+ &flagsMask))
+ return NULL;
+ _rv = MediaSetHandlerCapabilities(mh,
+ flags,
+ flagsMask);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MediaIdle(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- TimeValue atMediaTime;
- long flagsIn;
- long flagsOut;
- TimeRecord movieTime;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ TimeValue atMediaTime;
+ long flagsIn;
+ long flagsOut;
+ TimeRecord movieTime;
#ifndef MediaIdle
- PyMac_PRECHECK(MediaIdle);
-#endif
- if (!PyArg_ParseTuple(_args, "O&llO&",
- CmpInstObj_Convert, &mh,
- &atMediaTime,
- &flagsIn,
- QtTimeRecord_Convert, &movieTime))
- return NULL;
- _rv = MediaIdle(mh,
- atMediaTime,
- flagsIn,
- &flagsOut,
- &movieTime);
- _res = Py_BuildValue("ll",
- _rv,
- flagsOut);
- return _res;
+ PyMac_PRECHECK(MediaIdle);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&llO&",
+ CmpInstObj_Convert, &mh,
+ &atMediaTime,
+ &flagsIn,
+ QtTimeRecord_Convert, &movieTime))
+ return NULL;
+ _rv = MediaIdle(mh,
+ atMediaTime,
+ flagsIn,
+ &flagsOut,
+ &movieTime);
+ _res = Py_BuildValue("ll",
+ _rv,
+ flagsOut);
+ return _res;
}
static PyObject *Qt_MediaGetMediaInfo(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- Handle h;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ Handle h;
#ifndef MediaGetMediaInfo
- PyMac_PRECHECK(MediaGetMediaInfo);
+ PyMac_PRECHECK(MediaGetMediaInfo);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &mh,
- ResObj_Convert, &h))
- return NULL;
- _rv = MediaGetMediaInfo(mh,
- h);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &mh,
+ ResObj_Convert, &h))
+ return NULL;
+ _rv = MediaGetMediaInfo(mh,
+ h);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MediaPutMediaInfo(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- Handle h;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ Handle h;
#ifndef MediaPutMediaInfo
- PyMac_PRECHECK(MediaPutMediaInfo);
+ PyMac_PRECHECK(MediaPutMediaInfo);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &mh,
- ResObj_Convert, &h))
- return NULL;
- _rv = MediaPutMediaInfo(mh,
- h);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &mh,
+ ResObj_Convert, &h))
+ return NULL;
+ _rv = MediaPutMediaInfo(mh,
+ h);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MediaSetActive(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- Boolean enableMedia;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ Boolean enableMedia;
#ifndef MediaSetActive
- PyMac_PRECHECK(MediaSetActive);
+ PyMac_PRECHECK(MediaSetActive);
#endif
- if (!PyArg_ParseTuple(_args, "O&b",
- CmpInstObj_Convert, &mh,
- &enableMedia))
- return NULL;
- _rv = MediaSetActive(mh,
- enableMedia);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&b",
+ CmpInstObj_Convert, &mh,
+ &enableMedia))
+ return NULL;
+ _rv = MediaSetActive(mh,
+ enableMedia);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MediaSetRate(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- Fixed rate;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ Fixed rate;
#ifndef MediaSetRate
- PyMac_PRECHECK(MediaSetRate);
+ PyMac_PRECHECK(MediaSetRate);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &mh,
- PyMac_GetFixed, &rate))
- return NULL;
- _rv = MediaSetRate(mh,
- rate);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &mh,
+ PyMac_GetFixed, &rate))
+ return NULL;
+ _rv = MediaSetRate(mh,
+ rate);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MediaGGetStatus(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- ComponentResult statusErr;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ ComponentResult statusErr;
#ifndef MediaGGetStatus
- PyMac_PRECHECK(MediaGGetStatus);
+ PyMac_PRECHECK(MediaGGetStatus);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &mh))
- return NULL;
- _rv = MediaGGetStatus(mh,
- &statusErr);
- _res = Py_BuildValue("ll",
- _rv,
- statusErr);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &mh))
+ return NULL;
+ _rv = MediaGGetStatus(mh,
+ &statusErr);
+ _res = Py_BuildValue("ll",
+ _rv,
+ statusErr);
+ return _res;
}
static PyObject *Qt_MediaTrackEdited(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
#ifndef MediaTrackEdited
- PyMac_PRECHECK(MediaTrackEdited);
+ PyMac_PRECHECK(MediaTrackEdited);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &mh))
- return NULL;
- _rv = MediaTrackEdited(mh);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &mh))
+ return NULL;
+ _rv = MediaTrackEdited(mh);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MediaSetMediaTimeScale(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- TimeScale newTimeScale;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ TimeScale newTimeScale;
#ifndef MediaSetMediaTimeScale
- PyMac_PRECHECK(MediaSetMediaTimeScale);
+ PyMac_PRECHECK(MediaSetMediaTimeScale);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &mh,
- &newTimeScale))
- return NULL;
- _rv = MediaSetMediaTimeScale(mh,
- newTimeScale);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &mh,
+ &newTimeScale))
+ return NULL;
+ _rv = MediaSetMediaTimeScale(mh,
+ newTimeScale);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MediaSetMovieTimeScale(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- TimeScale newTimeScale;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ TimeScale newTimeScale;
#ifndef MediaSetMovieTimeScale
- PyMac_PRECHECK(MediaSetMovieTimeScale);
+ PyMac_PRECHECK(MediaSetMovieTimeScale);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &mh,
- &newTimeScale))
- return NULL;
- _rv = MediaSetMovieTimeScale(mh,
- newTimeScale);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &mh,
+ &newTimeScale))
+ return NULL;
+ _rv = MediaSetMovieTimeScale(mh,
+ newTimeScale);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MediaSetGWorld(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- CGrafPtr aPort;
- GDHandle aGD;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ CGrafPtr aPort;
+ GDHandle aGD;
#ifndef MediaSetGWorld
- PyMac_PRECHECK(MediaSetGWorld);
+ PyMac_PRECHECK(MediaSetGWorld);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- CmpInstObj_Convert, &mh,
- GrafObj_Convert, &aPort,
- OptResObj_Convert, &aGD))
- return NULL;
- _rv = MediaSetGWorld(mh,
- aPort,
- aGD);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ CmpInstObj_Convert, &mh,
+ GrafObj_Convert, &aPort,
+ OptResObj_Convert, &aGD))
+ return NULL;
+ _rv = MediaSetGWorld(mh,
+ aPort,
+ aGD);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MediaSetDimensions(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- Fixed width;
- Fixed height;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ Fixed width;
+ Fixed height;
#ifndef MediaSetDimensions
- PyMac_PRECHECK(MediaSetDimensions);
+ PyMac_PRECHECK(MediaSetDimensions);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- CmpInstObj_Convert, &mh,
- PyMac_GetFixed, &width,
- PyMac_GetFixed, &height))
- return NULL;
- _rv = MediaSetDimensions(mh,
- width,
- height);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ CmpInstObj_Convert, &mh,
+ PyMac_GetFixed, &width,
+ PyMac_GetFixed, &height))
+ return NULL;
+ _rv = MediaSetDimensions(mh,
+ width,
+ height);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MediaSetClip(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- RgnHandle theClip;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ RgnHandle theClip;
#ifndef MediaSetClip
- PyMac_PRECHECK(MediaSetClip);
+ PyMac_PRECHECK(MediaSetClip);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &mh,
- ResObj_Convert, &theClip))
- return NULL;
- _rv = MediaSetClip(mh,
- theClip);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &mh,
+ ResObj_Convert, &theClip))
+ return NULL;
+ _rv = MediaSetClip(mh,
+ theClip);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MediaGetTrackOpaque(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- Boolean trackIsOpaque;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ Boolean trackIsOpaque;
#ifndef MediaGetTrackOpaque
- PyMac_PRECHECK(MediaGetTrackOpaque);
+ PyMac_PRECHECK(MediaGetTrackOpaque);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &mh))
- return NULL;
- _rv = MediaGetTrackOpaque(mh,
- &trackIsOpaque);
- _res = Py_BuildValue("lb",
- _rv,
- trackIsOpaque);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &mh))
+ return NULL;
+ _rv = MediaGetTrackOpaque(mh,
+ &trackIsOpaque);
+ _res = Py_BuildValue("lb",
+ _rv,
+ trackIsOpaque);
+ return _res;
}
static PyObject *Qt_MediaSetGraphicsMode(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- long mode;
- RGBColor opColor;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ long mode;
+ RGBColor opColor;
#ifndef MediaSetGraphicsMode
- PyMac_PRECHECK(MediaSetGraphicsMode);
+ PyMac_PRECHECK(MediaSetGraphicsMode);
#endif
- if (!PyArg_ParseTuple(_args, "O&lO&",
- CmpInstObj_Convert, &mh,
- &mode,
- QdRGB_Convert, &opColor))
- return NULL;
- _rv = MediaSetGraphicsMode(mh,
- mode,
- &opColor);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&lO&",
+ CmpInstObj_Convert, &mh,
+ &mode,
+ QdRGB_Convert, &opColor))
+ return NULL;
+ _rv = MediaSetGraphicsMode(mh,
+ mode,
+ &opColor);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MediaGetGraphicsMode(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- long mode;
- RGBColor opColor;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ long mode;
+ RGBColor opColor;
#ifndef MediaGetGraphicsMode
- PyMac_PRECHECK(MediaGetGraphicsMode);
+ PyMac_PRECHECK(MediaGetGraphicsMode);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &mh))
- return NULL;
- _rv = MediaGetGraphicsMode(mh,
- &mode,
- &opColor);
- _res = Py_BuildValue("llO&",
- _rv,
- mode,
- QdRGB_New, &opColor);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &mh))
+ return NULL;
+ _rv = MediaGetGraphicsMode(mh,
+ &mode,
+ &opColor);
+ _res = Py_BuildValue("llO&",
+ _rv,
+ mode,
+ QdRGB_New, &opColor);
+ return _res;
}
static PyObject *Qt_MediaGSetVolume(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- short volume;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ short volume;
#ifndef MediaGSetVolume
- PyMac_PRECHECK(MediaGSetVolume);
+ PyMac_PRECHECK(MediaGSetVolume);
#endif
- if (!PyArg_ParseTuple(_args, "O&h",
- CmpInstObj_Convert, &mh,
- &volume))
- return NULL;
- _rv = MediaGSetVolume(mh,
- volume);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&h",
+ CmpInstObj_Convert, &mh,
+ &volume))
+ return NULL;
+ _rv = MediaGSetVolume(mh,
+ volume);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MediaSetSoundBalance(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- short balance;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ short balance;
#ifndef MediaSetSoundBalance
- PyMac_PRECHECK(MediaSetSoundBalance);
+ PyMac_PRECHECK(MediaSetSoundBalance);
#endif
- if (!PyArg_ParseTuple(_args, "O&h",
- CmpInstObj_Convert, &mh,
- &balance))
- return NULL;
- _rv = MediaSetSoundBalance(mh,
- balance);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&h",
+ CmpInstObj_Convert, &mh,
+ &balance))
+ return NULL;
+ _rv = MediaSetSoundBalance(mh,
+ balance);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MediaGetSoundBalance(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- short balance;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ short balance;
#ifndef MediaGetSoundBalance
- PyMac_PRECHECK(MediaGetSoundBalance);
+ PyMac_PRECHECK(MediaGetSoundBalance);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &mh))
- return NULL;
- _rv = MediaGetSoundBalance(mh,
- &balance);
- _res = Py_BuildValue("lh",
- _rv,
- balance);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &mh))
+ return NULL;
+ _rv = MediaGetSoundBalance(mh,
+ &balance);
+ _res = Py_BuildValue("lh",
+ _rv,
+ balance);
+ return _res;
}
static PyObject *Qt_MediaGetNextBoundsChange(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- TimeValue when;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ TimeValue when;
#ifndef MediaGetNextBoundsChange
- PyMac_PRECHECK(MediaGetNextBoundsChange);
+ PyMac_PRECHECK(MediaGetNextBoundsChange);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &mh))
- return NULL;
- _rv = MediaGetNextBoundsChange(mh,
- &when);
- _res = Py_BuildValue("ll",
- _rv,
- when);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &mh))
+ return NULL;
+ _rv = MediaGetNextBoundsChange(mh,
+ &when);
+ _res = Py_BuildValue("ll",
+ _rv,
+ when);
+ return _res;
}
static PyObject *Qt_MediaGetSrcRgn(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- RgnHandle rgn;
- TimeValue atMediaTime;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ RgnHandle rgn;
+ TimeValue atMediaTime;
#ifndef MediaGetSrcRgn
- PyMac_PRECHECK(MediaGetSrcRgn);
+ PyMac_PRECHECK(MediaGetSrcRgn);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&l",
- CmpInstObj_Convert, &mh,
- ResObj_Convert, &rgn,
- &atMediaTime))
- return NULL;
- _rv = MediaGetSrcRgn(mh,
- rgn,
- atMediaTime);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&l",
+ CmpInstObj_Convert, &mh,
+ ResObj_Convert, &rgn,
+ &atMediaTime))
+ return NULL;
+ _rv = MediaGetSrcRgn(mh,
+ rgn,
+ atMediaTime);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MediaPreroll(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- TimeValue time;
- Fixed rate;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ TimeValue time;
+ Fixed rate;
#ifndef MediaPreroll
- PyMac_PRECHECK(MediaPreroll);
+ PyMac_PRECHECK(MediaPreroll);
#endif
- if (!PyArg_ParseTuple(_args, "O&lO&",
- CmpInstObj_Convert, &mh,
- &time,
- PyMac_GetFixed, &rate))
- return NULL;
- _rv = MediaPreroll(mh,
- time,
- rate);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&lO&",
+ CmpInstObj_Convert, &mh,
+ &time,
+ PyMac_GetFixed, &rate))
+ return NULL;
+ _rv = MediaPreroll(mh,
+ time,
+ rate);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MediaSampleDescriptionChanged(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- long index;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ long index;
#ifndef MediaSampleDescriptionChanged
- PyMac_PRECHECK(MediaSampleDescriptionChanged);
+ PyMac_PRECHECK(MediaSampleDescriptionChanged);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &mh,
- &index))
- return NULL;
- _rv = MediaSampleDescriptionChanged(mh,
- index);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &mh,
+ &index))
+ return NULL;
+ _rv = MediaSampleDescriptionChanged(mh,
+ index);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MediaHasCharacteristic(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- OSType characteristic;
- Boolean hasIt;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ OSType characteristic;
+ Boolean hasIt;
#ifndef MediaHasCharacteristic
- PyMac_PRECHECK(MediaHasCharacteristic);
+ PyMac_PRECHECK(MediaHasCharacteristic);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &mh,
- PyMac_GetOSType, &characteristic))
- return NULL;
- _rv = MediaHasCharacteristic(mh,
- characteristic,
- &hasIt);
- _res = Py_BuildValue("lb",
- _rv,
- hasIt);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &mh,
+ PyMac_GetOSType, &characteristic))
+ return NULL;
+ _rv = MediaHasCharacteristic(mh,
+ characteristic,
+ &hasIt);
+ _res = Py_BuildValue("lb",
+ _rv,
+ hasIt);
+ return _res;
}
static PyObject *Qt_MediaGetOffscreenBufferSize(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- Rect bounds;
- short depth;
- CTabHandle ctab;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ Rect bounds;
+ short depth;
+ CTabHandle ctab;
#ifndef MediaGetOffscreenBufferSize
- PyMac_PRECHECK(MediaGetOffscreenBufferSize);
-#endif
- if (!PyArg_ParseTuple(_args, "O&hO&",
- CmpInstObj_Convert, &mh,
- &depth,
- ResObj_Convert, &ctab))
- return NULL;
- _rv = MediaGetOffscreenBufferSize(mh,
- &bounds,
- depth,
- ctab);
- _res = Py_BuildValue("lO&",
- _rv,
- PyMac_BuildRect, &bounds);
- return _res;
+ PyMac_PRECHECK(MediaGetOffscreenBufferSize);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&hO&",
+ CmpInstObj_Convert, &mh,
+ &depth,
+ ResObj_Convert, &ctab))
+ return NULL;
+ _rv = MediaGetOffscreenBufferSize(mh,
+ &bounds,
+ depth,
+ ctab);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ PyMac_BuildRect, &bounds);
+ return _res;
}
static PyObject *Qt_MediaSetHints(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- long hints;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ long hints;
#ifndef MediaSetHints
- PyMac_PRECHECK(MediaSetHints);
+ PyMac_PRECHECK(MediaSetHints);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &mh,
- &hints))
- return NULL;
- _rv = MediaSetHints(mh,
- hints);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &mh,
+ &hints))
+ return NULL;
+ _rv = MediaSetHints(mh,
+ hints);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MediaGetName(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- Str255 name;
- long requestedLanguage;
- long actualLanguage;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ Str255 name;
+ long requestedLanguage;
+ long actualLanguage;
#ifndef MediaGetName
- PyMac_PRECHECK(MediaGetName);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&l",
- CmpInstObj_Convert, &mh,
- PyMac_GetStr255, name,
- &requestedLanguage))
- return NULL;
- _rv = MediaGetName(mh,
- name,
- requestedLanguage,
- &actualLanguage);
- _res = Py_BuildValue("ll",
- _rv,
- actualLanguage);
- return _res;
+ PyMac_PRECHECK(MediaGetName);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&l",
+ CmpInstObj_Convert, &mh,
+ PyMac_GetStr255, name,
+ &requestedLanguage))
+ return NULL;
+ _rv = MediaGetName(mh,
+ name,
+ requestedLanguage,
+ &actualLanguage);
+ _res = Py_BuildValue("ll",
+ _rv,
+ actualLanguage);
+ return _res;
}
static PyObject *Qt_MediaForceUpdate(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- long forceUpdateFlags;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ long forceUpdateFlags;
#ifndef MediaForceUpdate
- PyMac_PRECHECK(MediaForceUpdate);
+ PyMac_PRECHECK(MediaForceUpdate);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &mh,
- &forceUpdateFlags))
- return NULL;
- _rv = MediaForceUpdate(mh,
- forceUpdateFlags);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &mh,
+ &forceUpdateFlags))
+ return NULL;
+ _rv = MediaForceUpdate(mh,
+ forceUpdateFlags);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MediaGetDrawingRgn(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- RgnHandle partialRgn;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ RgnHandle partialRgn;
#ifndef MediaGetDrawingRgn
- PyMac_PRECHECK(MediaGetDrawingRgn);
+ PyMac_PRECHECK(MediaGetDrawingRgn);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &mh))
- return NULL;
- _rv = MediaGetDrawingRgn(mh,
- &partialRgn);
- _res = Py_BuildValue("lO&",
- _rv,
- ResObj_New, partialRgn);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &mh))
+ return NULL;
+ _rv = MediaGetDrawingRgn(mh,
+ &partialRgn);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ ResObj_New, partialRgn);
+ return _res;
}
static PyObject *Qt_MediaGSetActiveSegment(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- TimeValue activeStart;
- TimeValue activeDuration;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ TimeValue activeStart;
+ TimeValue activeDuration;
#ifndef MediaGSetActiveSegment
- PyMac_PRECHECK(MediaGSetActiveSegment);
+ PyMac_PRECHECK(MediaGSetActiveSegment);
#endif
- if (!PyArg_ParseTuple(_args, "O&ll",
- CmpInstObj_Convert, &mh,
- &activeStart,
- &activeDuration))
- return NULL;
- _rv = MediaGSetActiveSegment(mh,
- activeStart,
- activeDuration);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&ll",
+ CmpInstObj_Convert, &mh,
+ &activeStart,
+ &activeDuration))
+ return NULL;
+ _rv = MediaGSetActiveSegment(mh,
+ activeStart,
+ activeDuration);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MediaInvalidateRegion(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- RgnHandle invalRgn;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ RgnHandle invalRgn;
#ifndef MediaInvalidateRegion
- PyMac_PRECHECK(MediaInvalidateRegion);
+ PyMac_PRECHECK(MediaInvalidateRegion);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &mh,
- ResObj_Convert, &invalRgn))
- return NULL;
- _rv = MediaInvalidateRegion(mh,
- invalRgn);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &mh,
+ ResObj_Convert, &invalRgn))
+ return NULL;
+ _rv = MediaInvalidateRegion(mh,
+ invalRgn);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MediaGetNextStepTime(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- short flags;
- TimeValue mediaTimeIn;
- TimeValue mediaTimeOut;
- Fixed rate;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ short flags;
+ TimeValue mediaTimeIn;
+ TimeValue mediaTimeOut;
+ Fixed rate;
#ifndef MediaGetNextStepTime
- PyMac_PRECHECK(MediaGetNextStepTime);
-#endif
- if (!PyArg_ParseTuple(_args, "O&hlO&",
- CmpInstObj_Convert, &mh,
- &flags,
- &mediaTimeIn,
- PyMac_GetFixed, &rate))
- return NULL;
- _rv = MediaGetNextStepTime(mh,
- flags,
- mediaTimeIn,
- &mediaTimeOut,
- rate);
- _res = Py_BuildValue("ll",
- _rv,
- mediaTimeOut);
- return _res;
+ PyMac_PRECHECK(MediaGetNextStepTime);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&hlO&",
+ CmpInstObj_Convert, &mh,
+ &flags,
+ &mediaTimeIn,
+ PyMac_GetFixed, &rate))
+ return NULL;
+ _rv = MediaGetNextStepTime(mh,
+ flags,
+ mediaTimeIn,
+ &mediaTimeOut,
+ rate);
+ _res = Py_BuildValue("ll",
+ _rv,
+ mediaTimeOut);
+ return _res;
}
static PyObject *Qt_MediaChangedNonPrimarySource(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- long inputIndex;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ long inputIndex;
#ifndef MediaChangedNonPrimarySource
- PyMac_PRECHECK(MediaChangedNonPrimarySource);
+ PyMac_PRECHECK(MediaChangedNonPrimarySource);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &mh,
- &inputIndex))
- return NULL;
- _rv = MediaChangedNonPrimarySource(mh,
- inputIndex);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &mh,
+ &inputIndex))
+ return NULL;
+ _rv = MediaChangedNonPrimarySource(mh,
+ inputIndex);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MediaTrackReferencesChanged(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
#ifndef MediaTrackReferencesChanged
- PyMac_PRECHECK(MediaTrackReferencesChanged);
+ PyMac_PRECHECK(MediaTrackReferencesChanged);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &mh))
- return NULL;
- _rv = MediaTrackReferencesChanged(mh);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &mh))
+ return NULL;
+ _rv = MediaTrackReferencesChanged(mh);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MediaReleaseSampleDataPointer(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- long sampleNum;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ long sampleNum;
#ifndef MediaReleaseSampleDataPointer
- PyMac_PRECHECK(MediaReleaseSampleDataPointer);
+ PyMac_PRECHECK(MediaReleaseSampleDataPointer);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &mh,
- &sampleNum))
- return NULL;
- _rv = MediaReleaseSampleDataPointer(mh,
- sampleNum);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &mh,
+ &sampleNum))
+ return NULL;
+ _rv = MediaReleaseSampleDataPointer(mh,
+ sampleNum);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MediaTrackPropertyAtomChanged(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
#ifndef MediaTrackPropertyAtomChanged
- PyMac_PRECHECK(MediaTrackPropertyAtomChanged);
+ PyMac_PRECHECK(MediaTrackPropertyAtomChanged);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &mh))
- return NULL;
- _rv = MediaTrackPropertyAtomChanged(mh);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &mh))
+ return NULL;
+ _rv = MediaTrackPropertyAtomChanged(mh);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MediaSetVideoParam(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- long whichParam;
- unsigned short value;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ long whichParam;
+ unsigned short value;
#ifndef MediaSetVideoParam
- PyMac_PRECHECK(MediaSetVideoParam);
+ PyMac_PRECHECK(MediaSetVideoParam);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &mh,
- &whichParam))
- return NULL;
- _rv = MediaSetVideoParam(mh,
- whichParam,
- &value);
- _res = Py_BuildValue("lH",
- _rv,
- value);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &mh,
+ &whichParam))
+ return NULL;
+ _rv = MediaSetVideoParam(mh,
+ whichParam,
+ &value);
+ _res = Py_BuildValue("lH",
+ _rv,
+ value);
+ return _res;
}
static PyObject *Qt_MediaGetVideoParam(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- long whichParam;
- unsigned short value;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ long whichParam;
+ unsigned short value;
#ifndef MediaGetVideoParam
- PyMac_PRECHECK(MediaGetVideoParam);
+ PyMac_PRECHECK(MediaGetVideoParam);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &mh,
- &whichParam))
- return NULL;
- _rv = MediaGetVideoParam(mh,
- whichParam,
- &value);
- _res = Py_BuildValue("lH",
- _rv,
- value);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &mh,
+ &whichParam))
+ return NULL;
+ _rv = MediaGetVideoParam(mh,
+ whichParam,
+ &value);
+ _res = Py_BuildValue("lH",
+ _rv,
+ value);
+ return _res;
}
static PyObject *Qt_MediaCompare(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- Boolean isOK;
- Media srcMedia;
- ComponentInstance srcMediaComponent;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ Boolean isOK;
+ Media srcMedia;
+ ComponentInstance srcMediaComponent;
#ifndef MediaCompare
- PyMac_PRECHECK(MediaCompare);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- CmpInstObj_Convert, &mh,
- MediaObj_Convert, &srcMedia,
- CmpInstObj_Convert, &srcMediaComponent))
- return NULL;
- _rv = MediaCompare(mh,
- &isOK,
- srcMedia,
- srcMediaComponent);
- _res = Py_BuildValue("lb",
- _rv,
- isOK);
- return _res;
+ PyMac_PRECHECK(MediaCompare);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ CmpInstObj_Convert, &mh,
+ MediaObj_Convert, &srcMedia,
+ CmpInstObj_Convert, &srcMediaComponent))
+ return NULL;
+ _rv = MediaCompare(mh,
+ &isOK,
+ srcMedia,
+ srcMediaComponent);
+ _res = Py_BuildValue("lb",
+ _rv,
+ isOK);
+ return _res;
}
static PyObject *Qt_MediaGetClock(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- ComponentInstance clock;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ ComponentInstance clock;
#ifndef MediaGetClock
- PyMac_PRECHECK(MediaGetClock);
+ PyMac_PRECHECK(MediaGetClock);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &mh))
- return NULL;
- _rv = MediaGetClock(mh,
- &clock);
- _res = Py_BuildValue("lO&",
- _rv,
- CmpInstObj_New, clock);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &mh))
+ return NULL;
+ _rv = MediaGetClock(mh,
+ &clock);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ CmpInstObj_New, clock);
+ return _res;
}
static PyObject *Qt_MediaSetSoundOutputComponent(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- Component outputComponent;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ Component outputComponent;
#ifndef MediaSetSoundOutputComponent
- PyMac_PRECHECK(MediaSetSoundOutputComponent);
+ PyMac_PRECHECK(MediaSetSoundOutputComponent);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &mh,
- CmpObj_Convert, &outputComponent))
- return NULL;
- _rv = MediaSetSoundOutputComponent(mh,
- outputComponent);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &mh,
+ CmpObj_Convert, &outputComponent))
+ return NULL;
+ _rv = MediaSetSoundOutputComponent(mh,
+ outputComponent);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MediaGetSoundOutputComponent(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- Component outputComponent;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ Component outputComponent;
#ifndef MediaGetSoundOutputComponent
- PyMac_PRECHECK(MediaGetSoundOutputComponent);
+ PyMac_PRECHECK(MediaGetSoundOutputComponent);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &mh))
- return NULL;
- _rv = MediaGetSoundOutputComponent(mh,
- &outputComponent);
- _res = Py_BuildValue("lO&",
- _rv,
- CmpObj_New, outputComponent);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &mh))
+ return NULL;
+ _rv = MediaGetSoundOutputComponent(mh,
+ &outputComponent);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ CmpObj_New, outputComponent);
+ return _res;
}
static PyObject *Qt_MediaSetSoundLocalizationData(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- Handle data;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ Handle data;
#ifndef MediaSetSoundLocalizationData
- PyMac_PRECHECK(MediaSetSoundLocalizationData);
+ PyMac_PRECHECK(MediaSetSoundLocalizationData);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &mh,
- ResObj_Convert, &data))
- return NULL;
- _rv = MediaSetSoundLocalizationData(mh,
- data);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &mh,
+ ResObj_Convert, &data))
+ return NULL;
+ _rv = MediaSetSoundLocalizationData(mh,
+ data);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MediaGetInvalidRegion(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- RgnHandle rgn;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ RgnHandle rgn;
#ifndef MediaGetInvalidRegion
- PyMac_PRECHECK(MediaGetInvalidRegion);
+ PyMac_PRECHECK(MediaGetInvalidRegion);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &mh,
- ResObj_Convert, &rgn))
- return NULL;
- _rv = MediaGetInvalidRegion(mh,
- rgn);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &mh,
+ ResObj_Convert, &rgn))
+ return NULL;
+ _rv = MediaGetInvalidRegion(mh,
+ rgn);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MediaSampleDescriptionB2N(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- SampleDescriptionHandle sampleDescriptionH;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ SampleDescriptionHandle sampleDescriptionH;
#ifndef MediaSampleDescriptionB2N
- PyMac_PRECHECK(MediaSampleDescriptionB2N);
+ PyMac_PRECHECK(MediaSampleDescriptionB2N);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &mh,
- ResObj_Convert, &sampleDescriptionH))
- return NULL;
- _rv = MediaSampleDescriptionB2N(mh,
- sampleDescriptionH);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &mh,
+ ResObj_Convert, &sampleDescriptionH))
+ return NULL;
+ _rv = MediaSampleDescriptionB2N(mh,
+ sampleDescriptionH);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MediaSampleDescriptionN2B(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- SampleDescriptionHandle sampleDescriptionH;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ SampleDescriptionHandle sampleDescriptionH;
#ifndef MediaSampleDescriptionN2B
- PyMac_PRECHECK(MediaSampleDescriptionN2B);
+ PyMac_PRECHECK(MediaSampleDescriptionN2B);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &mh,
- ResObj_Convert, &sampleDescriptionH))
- return NULL;
- _rv = MediaSampleDescriptionN2B(mh,
- sampleDescriptionH);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &mh,
+ ResObj_Convert, &sampleDescriptionH))
+ return NULL;
+ _rv = MediaSampleDescriptionN2B(mh,
+ sampleDescriptionH);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MediaFlushNonPrimarySourceData(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- long inputIndex;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ long inputIndex;
#ifndef MediaFlushNonPrimarySourceData
- PyMac_PRECHECK(MediaFlushNonPrimarySourceData);
+ PyMac_PRECHECK(MediaFlushNonPrimarySourceData);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &mh,
- &inputIndex))
- return NULL;
- _rv = MediaFlushNonPrimarySourceData(mh,
- inputIndex);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &mh,
+ &inputIndex))
+ return NULL;
+ _rv = MediaFlushNonPrimarySourceData(mh,
+ inputIndex);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MediaGetURLLink(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- Point displayWhere;
- Handle urlLink;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ Point displayWhere;
+ Handle urlLink;
#ifndef MediaGetURLLink
- PyMac_PRECHECK(MediaGetURLLink);
+ PyMac_PRECHECK(MediaGetURLLink);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &mh,
- PyMac_GetPoint, &displayWhere))
- return NULL;
- _rv = MediaGetURLLink(mh,
- displayWhere,
- &urlLink);
- _res = Py_BuildValue("lO&",
- _rv,
- ResObj_New, urlLink);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &mh,
+ PyMac_GetPoint, &displayWhere))
+ return NULL;
+ _rv = MediaGetURLLink(mh,
+ displayWhere,
+ &urlLink);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ ResObj_New, urlLink);
+ return _res;
}
static PyObject *Qt_MediaHitTestForTargetRefCon(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- long flags;
- Point loc;
- long targetRefCon;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ long flags;
+ Point loc;
+ long targetRefCon;
#ifndef MediaHitTestForTargetRefCon
- PyMac_PRECHECK(MediaHitTestForTargetRefCon);
-#endif
- if (!PyArg_ParseTuple(_args, "O&lO&",
- CmpInstObj_Convert, &mh,
- &flags,
- PyMac_GetPoint, &loc))
- return NULL;
- _rv = MediaHitTestForTargetRefCon(mh,
- flags,
- loc,
- &targetRefCon);
- _res = Py_BuildValue("ll",
- _rv,
- targetRefCon);
- return _res;
+ PyMac_PRECHECK(MediaHitTestForTargetRefCon);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&lO&",
+ CmpInstObj_Convert, &mh,
+ &flags,
+ PyMac_GetPoint, &loc))
+ return NULL;
+ _rv = MediaHitTestForTargetRefCon(mh,
+ flags,
+ loc,
+ &targetRefCon);
+ _res = Py_BuildValue("ll",
+ _rv,
+ targetRefCon);
+ return _res;
}
static PyObject *Qt_MediaHitTestTargetRefCon(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- long targetRefCon;
- long flags;
- Point loc;
- Boolean wasHit;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ long targetRefCon;
+ long flags;
+ Point loc;
+ Boolean wasHit;
#ifndef MediaHitTestTargetRefCon
- PyMac_PRECHECK(MediaHitTestTargetRefCon);
-#endif
- if (!PyArg_ParseTuple(_args, "O&llO&",
- CmpInstObj_Convert, &mh,
- &targetRefCon,
- &flags,
- PyMac_GetPoint, &loc))
- return NULL;
- _rv = MediaHitTestTargetRefCon(mh,
- targetRefCon,
- flags,
- loc,
- &wasHit);
- _res = Py_BuildValue("lb",
- _rv,
- wasHit);
- return _res;
+ PyMac_PRECHECK(MediaHitTestTargetRefCon);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&llO&",
+ CmpInstObj_Convert, &mh,
+ &targetRefCon,
+ &flags,
+ PyMac_GetPoint, &loc))
+ return NULL;
+ _rv = MediaHitTestTargetRefCon(mh,
+ targetRefCon,
+ flags,
+ loc,
+ &wasHit);
+ _res = Py_BuildValue("lb",
+ _rv,
+ wasHit);
+ return _res;
}
static PyObject *Qt_MediaDisposeTargetRefCon(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- long targetRefCon;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ long targetRefCon;
#ifndef MediaDisposeTargetRefCon
- PyMac_PRECHECK(MediaDisposeTargetRefCon);
+ PyMac_PRECHECK(MediaDisposeTargetRefCon);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &mh,
- &targetRefCon))
- return NULL;
- _rv = MediaDisposeTargetRefCon(mh,
- targetRefCon);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &mh,
+ &targetRefCon))
+ return NULL;
+ _rv = MediaDisposeTargetRefCon(mh,
+ targetRefCon);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MediaTargetRefConsEqual(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- long firstRefCon;
- long secondRefCon;
- Boolean equal;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ long firstRefCon;
+ long secondRefCon;
+ Boolean equal;
#ifndef MediaTargetRefConsEqual
- PyMac_PRECHECK(MediaTargetRefConsEqual);
-#endif
- if (!PyArg_ParseTuple(_args, "O&ll",
- CmpInstObj_Convert, &mh,
- &firstRefCon,
- &secondRefCon))
- return NULL;
- _rv = MediaTargetRefConsEqual(mh,
- firstRefCon,
- secondRefCon,
- &equal);
- _res = Py_BuildValue("lb",
- _rv,
- equal);
- return _res;
+ PyMac_PRECHECK(MediaTargetRefConsEqual);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&ll",
+ CmpInstObj_Convert, &mh,
+ &firstRefCon,
+ &secondRefCon))
+ return NULL;
+ _rv = MediaTargetRefConsEqual(mh,
+ firstRefCon,
+ secondRefCon,
+ &equal);
+ _res = Py_BuildValue("lb",
+ _rv,
+ equal);
+ return _res;
}
static PyObject *Qt_MediaPrePrerollCancel(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- void * refcon;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ void * refcon;
#ifndef MediaPrePrerollCancel
- PyMac_PRECHECK(MediaPrePrerollCancel);
+ PyMac_PRECHECK(MediaPrePrerollCancel);
#endif
- if (!PyArg_ParseTuple(_args, "O&s",
- CmpInstObj_Convert, &mh,
- &refcon))
- return NULL;
- _rv = MediaPrePrerollCancel(mh,
- refcon);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&s",
+ CmpInstObj_Convert, &mh,
+ &refcon))
+ return NULL;
+ _rv = MediaPrePrerollCancel(mh,
+ refcon);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MediaEnterEmptyEdit(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
#ifndef MediaEnterEmptyEdit
- PyMac_PRECHECK(MediaEnterEmptyEdit);
+ PyMac_PRECHECK(MediaEnterEmptyEdit);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &mh))
- return NULL;
- _rv = MediaEnterEmptyEdit(mh);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &mh))
+ return NULL;
+ _rv = MediaEnterEmptyEdit(mh);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MediaCurrentMediaQueuedData(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- long milliSecs;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ long milliSecs;
#ifndef MediaCurrentMediaQueuedData
- PyMac_PRECHECK(MediaCurrentMediaQueuedData);
+ PyMac_PRECHECK(MediaCurrentMediaQueuedData);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &mh))
- return NULL;
- _rv = MediaCurrentMediaQueuedData(mh,
- &milliSecs);
- _res = Py_BuildValue("ll",
- _rv,
- milliSecs);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &mh))
+ return NULL;
+ _rv = MediaCurrentMediaQueuedData(mh,
+ &milliSecs);
+ _res = Py_BuildValue("ll",
+ _rv,
+ milliSecs);
+ return _res;
}
static PyObject *Qt_MediaGetEffectiveVolume(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- short volume;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ short volume;
#ifndef MediaGetEffectiveVolume
- PyMac_PRECHECK(MediaGetEffectiveVolume);
+ PyMac_PRECHECK(MediaGetEffectiveVolume);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &mh))
- return NULL;
- _rv = MediaGetEffectiveVolume(mh,
- &volume);
- _res = Py_BuildValue("lh",
- _rv,
- volume);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &mh))
+ return NULL;
+ _rv = MediaGetEffectiveVolume(mh,
+ &volume);
+ _res = Py_BuildValue("lh",
+ _rv,
+ volume);
+ return _res;
}
static PyObject *Qt_MediaGetSoundLevelMeteringEnabled(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- Boolean enabled;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ Boolean enabled;
#ifndef MediaGetSoundLevelMeteringEnabled
- PyMac_PRECHECK(MediaGetSoundLevelMeteringEnabled);
+ PyMac_PRECHECK(MediaGetSoundLevelMeteringEnabled);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &mh))
- return NULL;
- _rv = MediaGetSoundLevelMeteringEnabled(mh,
- &enabled);
- _res = Py_BuildValue("lb",
- _rv,
- enabled);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &mh))
+ return NULL;
+ _rv = MediaGetSoundLevelMeteringEnabled(mh,
+ &enabled);
+ _res = Py_BuildValue("lb",
+ _rv,
+ enabled);
+ return _res;
}
static PyObject *Qt_MediaSetSoundLevelMeteringEnabled(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- Boolean enable;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ Boolean enable;
#ifndef MediaSetSoundLevelMeteringEnabled
- PyMac_PRECHECK(MediaSetSoundLevelMeteringEnabled);
+ PyMac_PRECHECK(MediaSetSoundLevelMeteringEnabled);
#endif
- if (!PyArg_ParseTuple(_args, "O&b",
- CmpInstObj_Convert, &mh,
- &enable))
- return NULL;
- _rv = MediaSetSoundLevelMeteringEnabled(mh,
- enable);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&b",
+ CmpInstObj_Convert, &mh,
+ &enable))
+ return NULL;
+ _rv = MediaSetSoundLevelMeteringEnabled(mh,
+ enable);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MediaGetEffectiveSoundBalance(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- short balance;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ short balance;
#ifndef MediaGetEffectiveSoundBalance
- PyMac_PRECHECK(MediaGetEffectiveSoundBalance);
+ PyMac_PRECHECK(MediaGetEffectiveSoundBalance);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &mh))
- return NULL;
- _rv = MediaGetEffectiveSoundBalance(mh,
- &balance);
- _res = Py_BuildValue("lh",
- _rv,
- balance);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &mh))
+ return NULL;
+ _rv = MediaGetEffectiveSoundBalance(mh,
+ &balance);
+ _res = Py_BuildValue("lh",
+ _rv,
+ balance);
+ return _res;
}
static PyObject *Qt_MediaSetScreenLock(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- Boolean lockIt;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ Boolean lockIt;
#ifndef MediaSetScreenLock
- PyMac_PRECHECK(MediaSetScreenLock);
+ PyMac_PRECHECK(MediaSetScreenLock);
#endif
- if (!PyArg_ParseTuple(_args, "O&b",
- CmpInstObj_Convert, &mh,
- &lockIt))
- return NULL;
- _rv = MediaSetScreenLock(mh,
- lockIt);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&b",
+ CmpInstObj_Convert, &mh,
+ &lockIt))
+ return NULL;
+ _rv = MediaSetScreenLock(mh,
+ lockIt);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MediaGetErrorString(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- ComponentResult theError;
- Str255 errorString;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ ComponentResult theError;
+ Str255 errorString;
#ifndef MediaGetErrorString
- PyMac_PRECHECK(MediaGetErrorString);
+ PyMac_PRECHECK(MediaGetErrorString);
#endif
- if (!PyArg_ParseTuple(_args, "O&lO&",
- CmpInstObj_Convert, &mh,
- &theError,
- PyMac_GetStr255, errorString))
- return NULL;
- _rv = MediaGetErrorString(mh,
- theError,
- errorString);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&lO&",
+ CmpInstObj_Convert, &mh,
+ &theError,
+ PyMac_GetStr255, errorString))
+ return NULL;
+ _rv = MediaGetErrorString(mh,
+ theError,
+ errorString);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MediaGetSoundEqualizerBandLevels(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- UInt8 bandLevels;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ UInt8 bandLevels;
#ifndef MediaGetSoundEqualizerBandLevels
- PyMac_PRECHECK(MediaGetSoundEqualizerBandLevels);
+ PyMac_PRECHECK(MediaGetSoundEqualizerBandLevels);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &mh))
- return NULL;
- _rv = MediaGetSoundEqualizerBandLevels(mh,
- &bandLevels);
- _res = Py_BuildValue("lb",
- _rv,
- bandLevels);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &mh))
+ return NULL;
+ _rv = MediaGetSoundEqualizerBandLevels(mh,
+ &bandLevels);
+ _res = Py_BuildValue("lb",
+ _rv,
+ bandLevels);
+ return _res;
}
static PyObject *Qt_MediaDoIdleActions(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
#ifndef MediaDoIdleActions
- PyMac_PRECHECK(MediaDoIdleActions);
+ PyMac_PRECHECK(MediaDoIdleActions);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &mh))
- return NULL;
- _rv = MediaDoIdleActions(mh);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &mh))
+ return NULL;
+ _rv = MediaDoIdleActions(mh);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MediaSetSoundBassAndTreble(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- short bass;
- short treble;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ short bass;
+ short treble;
#ifndef MediaSetSoundBassAndTreble
- PyMac_PRECHECK(MediaSetSoundBassAndTreble);
+ PyMac_PRECHECK(MediaSetSoundBassAndTreble);
#endif
- if (!PyArg_ParseTuple(_args, "O&hh",
- CmpInstObj_Convert, &mh,
- &bass,
- &treble))
- return NULL;
- _rv = MediaSetSoundBassAndTreble(mh,
- bass,
- treble);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&hh",
+ CmpInstObj_Convert, &mh,
+ &bass,
+ &treble))
+ return NULL;
+ _rv = MediaSetSoundBassAndTreble(mh,
+ bass,
+ treble);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MediaGetSoundBassAndTreble(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- short bass;
- short treble;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ short bass;
+ short treble;
#ifndef MediaGetSoundBassAndTreble
- PyMac_PRECHECK(MediaGetSoundBassAndTreble);
+ PyMac_PRECHECK(MediaGetSoundBassAndTreble);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &mh))
- return NULL;
- _rv = MediaGetSoundBassAndTreble(mh,
- &bass,
- &treble);
- _res = Py_BuildValue("lhh",
- _rv,
- bass,
- treble);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &mh))
+ return NULL;
+ _rv = MediaGetSoundBassAndTreble(mh,
+ &bass,
+ &treble);
+ _res = Py_BuildValue("lhh",
+ _rv,
+ bass,
+ treble);
+ return _res;
}
static PyObject *Qt_MediaTimeBaseChanged(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
#ifndef MediaTimeBaseChanged
- PyMac_PRECHECK(MediaTimeBaseChanged);
+ PyMac_PRECHECK(MediaTimeBaseChanged);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &mh))
- return NULL;
- _rv = MediaTimeBaseChanged(mh);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &mh))
+ return NULL;
+ _rv = MediaTimeBaseChanged(mh);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MediaMCIsPlayerEvent(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- EventRecord e;
- Boolean handledIt;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ EventRecord e;
+ Boolean handledIt;
#ifndef MediaMCIsPlayerEvent
- PyMac_PRECHECK(MediaMCIsPlayerEvent);
+ PyMac_PRECHECK(MediaMCIsPlayerEvent);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &mh,
- PyMac_GetEventRecord, &e))
- return NULL;
- _rv = MediaMCIsPlayerEvent(mh,
- &e,
- &handledIt);
- _res = Py_BuildValue("lb",
- _rv,
- handledIt);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &mh,
+ PyMac_GetEventRecord, &e))
+ return NULL;
+ _rv = MediaMCIsPlayerEvent(mh,
+ &e,
+ &handledIt);
+ _res = Py_BuildValue("lb",
+ _rv,
+ handledIt);
+ return _res;
}
static PyObject *Qt_MediaGetMediaLoadState(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- long mediaLoadState;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ long mediaLoadState;
#ifndef MediaGetMediaLoadState
- PyMac_PRECHECK(MediaGetMediaLoadState);
+ PyMac_PRECHECK(MediaGetMediaLoadState);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &mh))
- return NULL;
- _rv = MediaGetMediaLoadState(mh,
- &mediaLoadState);
- _res = Py_BuildValue("ll",
- _rv,
- mediaLoadState);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &mh))
+ return NULL;
+ _rv = MediaGetMediaLoadState(mh,
+ &mediaLoadState);
+ _res = Py_BuildValue("ll",
+ _rv,
+ mediaLoadState);
+ return _res;
}
static PyObject *Qt_MediaVideoOutputChanged(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- ComponentInstance vout;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ ComponentInstance vout;
#ifndef MediaVideoOutputChanged
- PyMac_PRECHECK(MediaVideoOutputChanged);
+ PyMac_PRECHECK(MediaVideoOutputChanged);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &mh,
- CmpInstObj_Convert, &vout))
- return NULL;
- _rv = MediaVideoOutputChanged(mh,
- vout);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &mh,
+ CmpInstObj_Convert, &vout))
+ return NULL;
+ _rv = MediaVideoOutputChanged(mh,
+ vout);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MediaEmptySampleCache(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- long sampleNum;
- long sampleCount;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ long sampleNum;
+ long sampleCount;
#ifndef MediaEmptySampleCache
- PyMac_PRECHECK(MediaEmptySampleCache);
+ PyMac_PRECHECK(MediaEmptySampleCache);
#endif
- if (!PyArg_ParseTuple(_args, "O&ll",
- CmpInstObj_Convert, &mh,
- &sampleNum,
- &sampleCount))
- return NULL;
- _rv = MediaEmptySampleCache(mh,
- sampleNum,
- sampleCount);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&ll",
+ CmpInstObj_Convert, &mh,
+ &sampleNum,
+ &sampleCount))
+ return NULL;
+ _rv = MediaEmptySampleCache(mh,
+ sampleNum,
+ sampleCount);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MediaGetPublicInfo(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- OSType infoSelector;
- void * infoDataPtr;
- Size ioDataSize;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ OSType infoSelector;
+ void * infoDataPtr;
+ Size ioDataSize;
#ifndef MediaGetPublicInfo
- PyMac_PRECHECK(MediaGetPublicInfo);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&s",
- CmpInstObj_Convert, &mh,
- PyMac_GetOSType, &infoSelector,
- &infoDataPtr))
- return NULL;
- _rv = MediaGetPublicInfo(mh,
- infoSelector,
- infoDataPtr,
- &ioDataSize);
- _res = Py_BuildValue("ll",
- _rv,
- ioDataSize);
- return _res;
+ PyMac_PRECHECK(MediaGetPublicInfo);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&s",
+ CmpInstObj_Convert, &mh,
+ PyMac_GetOSType, &infoSelector,
+ &infoDataPtr))
+ return NULL;
+ _rv = MediaGetPublicInfo(mh,
+ infoSelector,
+ infoDataPtr,
+ &ioDataSize);
+ _res = Py_BuildValue("ll",
+ _rv,
+ ioDataSize);
+ return _res;
}
static PyObject *Qt_MediaSetPublicInfo(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- OSType infoSelector;
- void * infoDataPtr;
- Size dataSize;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ OSType infoSelector;
+ void * infoDataPtr;
+ Size dataSize;
#ifndef MediaSetPublicInfo
- PyMac_PRECHECK(MediaSetPublicInfo);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&sl",
- CmpInstObj_Convert, &mh,
- PyMac_GetOSType, &infoSelector,
- &infoDataPtr,
- &dataSize))
- return NULL;
- _rv = MediaSetPublicInfo(mh,
- infoSelector,
- infoDataPtr,
- dataSize);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyMac_PRECHECK(MediaSetPublicInfo);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&sl",
+ CmpInstObj_Convert, &mh,
+ PyMac_GetOSType, &infoSelector,
+ &infoDataPtr,
+ &dataSize))
+ return NULL;
+ _rv = MediaSetPublicInfo(mh,
+ infoSelector,
+ infoDataPtr,
+ dataSize);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MediaRefConSetProperty(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- long refCon;
- long propertyType;
- void * propertyValue;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ long refCon;
+ long propertyType;
+ void * propertyValue;
#ifndef MediaRefConSetProperty
- PyMac_PRECHECK(MediaRefConSetProperty);
-#endif
- if (!PyArg_ParseTuple(_args, "O&lls",
- CmpInstObj_Convert, &mh,
- &refCon,
- &propertyType,
- &propertyValue))
- return NULL;
- _rv = MediaRefConSetProperty(mh,
- refCon,
- propertyType,
- propertyValue);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyMac_PRECHECK(MediaRefConSetProperty);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&lls",
+ CmpInstObj_Convert, &mh,
+ &refCon,
+ &propertyType,
+ &propertyValue))
+ return NULL;
+ _rv = MediaRefConSetProperty(mh,
+ refCon,
+ propertyType,
+ propertyValue);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MediaRefConGetProperty(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- long refCon;
- long propertyType;
- void * propertyValue;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ long refCon;
+ long propertyType;
+ void * propertyValue;
#ifndef MediaRefConGetProperty
- PyMac_PRECHECK(MediaRefConGetProperty);
-#endif
- if (!PyArg_ParseTuple(_args, "O&lls",
- CmpInstObj_Convert, &mh,
- &refCon,
- &propertyType,
- &propertyValue))
- return NULL;
- _rv = MediaRefConGetProperty(mh,
- refCon,
- propertyType,
- propertyValue);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyMac_PRECHECK(MediaRefConGetProperty);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&lls",
+ CmpInstObj_Convert, &mh,
+ &refCon,
+ &propertyType,
+ &propertyValue))
+ return NULL;
+ _rv = MediaRefConGetProperty(mh,
+ refCon,
+ propertyType,
+ propertyValue);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MediaNavigateTargetRefCon(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- long navigation;
- long refCon;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ long navigation;
+ long refCon;
#ifndef MediaNavigateTargetRefCon
- PyMac_PRECHECK(MediaNavigateTargetRefCon);
+ PyMac_PRECHECK(MediaNavigateTargetRefCon);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &mh,
- &navigation))
- return NULL;
- _rv = MediaNavigateTargetRefCon(mh,
- navigation,
- &refCon);
- _res = Py_BuildValue("ll",
- _rv,
- refCon);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &mh,
+ &navigation))
+ return NULL;
+ _rv = MediaNavigateTargetRefCon(mh,
+ navigation,
+ &refCon);
+ _res = Py_BuildValue("ll",
+ _rv,
+ refCon);
+ return _res;
}
static PyObject *Qt_MediaGGetIdleManager(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- IdleManager pim;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ IdleManager pim;
#ifndef MediaGGetIdleManager
- PyMac_PRECHECK(MediaGGetIdleManager);
+ PyMac_PRECHECK(MediaGGetIdleManager);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &mh))
- return NULL;
- _rv = MediaGGetIdleManager(mh,
- &pim);
- _res = Py_BuildValue("lO&",
- _rv,
- IdleManagerObj_New, pim);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &mh))
+ return NULL;
+ _rv = MediaGGetIdleManager(mh,
+ &pim);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ IdleManagerObj_New, pim);
+ return _res;
}
static PyObject *Qt_MediaGSetIdleManager(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MediaHandler mh;
- IdleManager im;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MediaHandler mh;
+ IdleManager im;
#ifndef MediaGSetIdleManager
- PyMac_PRECHECK(MediaGSetIdleManager);
+ PyMac_PRECHECK(MediaGSetIdleManager);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &mh,
- IdleManagerObj_Convert, &im))
- return NULL;
- _rv = MediaGSetIdleManager(mh,
- im);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &mh,
+ IdleManagerObj_Convert, &im))
+ return NULL;
+ _rv = MediaGSetIdleManager(mh,
+ im);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_QTMIDIGetMIDIPorts(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- QTMIDIComponent ci;
- QTMIDIPortListHandle inputPorts;
- QTMIDIPortListHandle outputPorts;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ QTMIDIComponent ci;
+ QTMIDIPortListHandle inputPorts;
+ QTMIDIPortListHandle outputPorts;
#ifndef QTMIDIGetMIDIPorts
- PyMac_PRECHECK(QTMIDIGetMIDIPorts);
+ PyMac_PRECHECK(QTMIDIGetMIDIPorts);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &ci))
- return NULL;
- _rv = QTMIDIGetMIDIPorts(ci,
- &inputPorts,
- &outputPorts);
- _res = Py_BuildValue("lO&O&",
- _rv,
- ResObj_New, inputPorts,
- ResObj_New, outputPorts);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &ci))
+ return NULL;
+ _rv = QTMIDIGetMIDIPorts(ci,
+ &inputPorts,
+ &outputPorts);
+ _res = Py_BuildValue("lO&O&",
+ _rv,
+ ResObj_New, inputPorts,
+ ResObj_New, outputPorts);
+ return _res;
}
static PyObject *Qt_QTMIDIUseSendPort(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- QTMIDIComponent ci;
- long portIndex;
- long inUse;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ QTMIDIComponent ci;
+ long portIndex;
+ long inUse;
#ifndef QTMIDIUseSendPort
- PyMac_PRECHECK(QTMIDIUseSendPort);
+ PyMac_PRECHECK(QTMIDIUseSendPort);
#endif
- if (!PyArg_ParseTuple(_args, "O&ll",
- CmpInstObj_Convert, &ci,
- &portIndex,
- &inUse))
- return NULL;
- _rv = QTMIDIUseSendPort(ci,
- portIndex,
- inUse);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&ll",
+ CmpInstObj_Convert, &ci,
+ &portIndex,
+ &inUse))
+ return NULL;
+ _rv = QTMIDIUseSendPort(ci,
+ portIndex,
+ inUse);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_QTMIDISendMIDI(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- QTMIDIComponent ci;
- long portIndex;
- MusicMIDIPacket mp;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ QTMIDIComponent ci;
+ long portIndex;
+ MusicMIDIPacket mp;
#ifndef QTMIDISendMIDI
- PyMac_PRECHECK(QTMIDISendMIDI);
+ PyMac_PRECHECK(QTMIDISendMIDI);
#endif
- if (!PyArg_ParseTuple(_args, "O&lO&",
- CmpInstObj_Convert, &ci,
- &portIndex,
- QtMusicMIDIPacket_Convert, &mp))
- return NULL;
- _rv = QTMIDISendMIDI(ci,
- portIndex,
- &mp);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&lO&",
+ CmpInstObj_Convert, &ci,
+ &portIndex,
+ QtMusicMIDIPacket_Convert, &mp))
+ return NULL;
+ _rv = QTMIDISendMIDI(ci,
+ portIndex,
+ &mp);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MusicGetPart(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MusicComponent mc;
- long part;
- long midiChannel;
- long polyphony;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MusicComponent mc;
+ long part;
+ long midiChannel;
+ long polyphony;
#ifndef MusicGetPart
- PyMac_PRECHECK(MusicGetPart);
-#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &mc,
- &part))
- return NULL;
- _rv = MusicGetPart(mc,
- part,
- &midiChannel,
- &polyphony);
- _res = Py_BuildValue("lll",
- _rv,
- midiChannel,
- polyphony);
- return _res;
+ PyMac_PRECHECK(MusicGetPart);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &mc,
+ &part))
+ return NULL;
+ _rv = MusicGetPart(mc,
+ part,
+ &midiChannel,
+ &polyphony);
+ _res = Py_BuildValue("lll",
+ _rv,
+ midiChannel,
+ polyphony);
+ return _res;
}
static PyObject *Qt_MusicSetPart(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MusicComponent mc;
- long part;
- long midiChannel;
- long polyphony;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MusicComponent mc;
+ long part;
+ long midiChannel;
+ long polyphony;
#ifndef MusicSetPart
- PyMac_PRECHECK(MusicSetPart);
-#endif
- if (!PyArg_ParseTuple(_args, "O&lll",
- CmpInstObj_Convert, &mc,
- &part,
- &midiChannel,
- &polyphony))
- return NULL;
- _rv = MusicSetPart(mc,
- part,
- midiChannel,
- polyphony);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyMac_PRECHECK(MusicSetPart);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&lll",
+ CmpInstObj_Convert, &mc,
+ &part,
+ &midiChannel,
+ &polyphony))
+ return NULL;
+ _rv = MusicSetPart(mc,
+ part,
+ midiChannel,
+ polyphony);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MusicSetPartInstrumentNumber(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MusicComponent mc;
- long part;
- long instrumentNumber;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MusicComponent mc;
+ long part;
+ long instrumentNumber;
#ifndef MusicSetPartInstrumentNumber
- PyMac_PRECHECK(MusicSetPartInstrumentNumber);
+ PyMac_PRECHECK(MusicSetPartInstrumentNumber);
#endif
- if (!PyArg_ParseTuple(_args, "O&ll",
- CmpInstObj_Convert, &mc,
- &part,
- &instrumentNumber))
- return NULL;
- _rv = MusicSetPartInstrumentNumber(mc,
- part,
- instrumentNumber);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&ll",
+ CmpInstObj_Convert, &mc,
+ &part,
+ &instrumentNumber))
+ return NULL;
+ _rv = MusicSetPartInstrumentNumber(mc,
+ part,
+ instrumentNumber);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MusicGetPartInstrumentNumber(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MusicComponent mc;
- long part;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MusicComponent mc;
+ long part;
#ifndef MusicGetPartInstrumentNumber
- PyMac_PRECHECK(MusicGetPartInstrumentNumber);
+ PyMac_PRECHECK(MusicGetPartInstrumentNumber);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &mc,
- &part))
- return NULL;
- _rv = MusicGetPartInstrumentNumber(mc,
- part);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &mc,
+ &part))
+ return NULL;
+ _rv = MusicGetPartInstrumentNumber(mc,
+ part);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MusicStorePartInstrument(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MusicComponent mc;
- long part;
- long instrumentNumber;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MusicComponent mc;
+ long part;
+ long instrumentNumber;
#ifndef MusicStorePartInstrument
- PyMac_PRECHECK(MusicStorePartInstrument);
+ PyMac_PRECHECK(MusicStorePartInstrument);
#endif
- if (!PyArg_ParseTuple(_args, "O&ll",
- CmpInstObj_Convert, &mc,
- &part,
- &instrumentNumber))
- return NULL;
- _rv = MusicStorePartInstrument(mc,
- part,
- instrumentNumber);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&ll",
+ CmpInstObj_Convert, &mc,
+ &part,
+ &instrumentNumber))
+ return NULL;
+ _rv = MusicStorePartInstrument(mc,
+ part,
+ instrumentNumber);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MusicGetPartAtomicInstrument(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MusicComponent mc;
- long part;
- AtomicInstrument ai;
- long flags;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MusicComponent mc;
+ long part;
+ AtomicInstrument ai;
+ long flags;
#ifndef MusicGetPartAtomicInstrument
- PyMac_PRECHECK(MusicGetPartAtomicInstrument);
-#endif
- if (!PyArg_ParseTuple(_args, "O&ll",
- CmpInstObj_Convert, &mc,
- &part,
- &flags))
- return NULL;
- _rv = MusicGetPartAtomicInstrument(mc,
- part,
- &ai,
- flags);
- _res = Py_BuildValue("lO&",
- _rv,
- ResObj_New, ai);
- return _res;
+ PyMac_PRECHECK(MusicGetPartAtomicInstrument);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&ll",
+ CmpInstObj_Convert, &mc,
+ &part,
+ &flags))
+ return NULL;
+ _rv = MusicGetPartAtomicInstrument(mc,
+ part,
+ &ai,
+ flags);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ ResObj_New, ai);
+ return _res;
}
static PyObject *Qt_MusicSetPartAtomicInstrument(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MusicComponent mc;
- long part;
- AtomicInstrumentPtr aiP;
- long flags;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MusicComponent mc;
+ long part;
+ AtomicInstrumentPtr aiP;
+ long flags;
#ifndef MusicSetPartAtomicInstrument
- PyMac_PRECHECK(MusicSetPartAtomicInstrument);
-#endif
- if (!PyArg_ParseTuple(_args, "O&lsl",
- CmpInstObj_Convert, &mc,
- &part,
- &aiP,
- &flags))
- return NULL;
- _rv = MusicSetPartAtomicInstrument(mc,
- part,
- aiP,
- flags);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyMac_PRECHECK(MusicSetPartAtomicInstrument);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&lsl",
+ CmpInstObj_Convert, &mc,
+ &part,
+ &aiP,
+ &flags))
+ return NULL;
+ _rv = MusicSetPartAtomicInstrument(mc,
+ part,
+ aiP,
+ flags);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MusicGetPartKnob(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MusicComponent mc;
- long part;
- long knobID;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MusicComponent mc;
+ long part;
+ long knobID;
#ifndef MusicGetPartKnob
- PyMac_PRECHECK(MusicGetPartKnob);
+ PyMac_PRECHECK(MusicGetPartKnob);
#endif
- if (!PyArg_ParseTuple(_args, "O&ll",
- CmpInstObj_Convert, &mc,
- &part,
- &knobID))
- return NULL;
- _rv = MusicGetPartKnob(mc,
- part,
- knobID);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&ll",
+ CmpInstObj_Convert, &mc,
+ &part,
+ &knobID))
+ return NULL;
+ _rv = MusicGetPartKnob(mc,
+ part,
+ knobID);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MusicSetPartKnob(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MusicComponent mc;
- long part;
- long knobID;
- long knobValue;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MusicComponent mc;
+ long part;
+ long knobID;
+ long knobValue;
#ifndef MusicSetPartKnob
- PyMac_PRECHECK(MusicSetPartKnob);
-#endif
- if (!PyArg_ParseTuple(_args, "O&lll",
- CmpInstObj_Convert, &mc,
- &part,
- &knobID,
- &knobValue))
- return NULL;
- _rv = MusicSetPartKnob(mc,
- part,
- knobID,
- knobValue);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyMac_PRECHECK(MusicSetPartKnob);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&lll",
+ CmpInstObj_Convert, &mc,
+ &part,
+ &knobID,
+ &knobValue))
+ return NULL;
+ _rv = MusicSetPartKnob(mc,
+ part,
+ knobID,
+ knobValue);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MusicGetKnob(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MusicComponent mc;
- long knobID;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MusicComponent mc;
+ long knobID;
#ifndef MusicGetKnob
- PyMac_PRECHECK(MusicGetKnob);
+ PyMac_PRECHECK(MusicGetKnob);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &mc,
- &knobID))
- return NULL;
- _rv = MusicGetKnob(mc,
- knobID);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &mc,
+ &knobID))
+ return NULL;
+ _rv = MusicGetKnob(mc,
+ knobID);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MusicSetKnob(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MusicComponent mc;
- long knobID;
- long knobValue;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MusicComponent mc;
+ long knobID;
+ long knobValue;
#ifndef MusicSetKnob
- PyMac_PRECHECK(MusicSetKnob);
+ PyMac_PRECHECK(MusicSetKnob);
#endif
- if (!PyArg_ParseTuple(_args, "O&ll",
- CmpInstObj_Convert, &mc,
- &knobID,
- &knobValue))
- return NULL;
- _rv = MusicSetKnob(mc,
- knobID,
- knobValue);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&ll",
+ CmpInstObj_Convert, &mc,
+ &knobID,
+ &knobValue))
+ return NULL;
+ _rv = MusicSetKnob(mc,
+ knobID,
+ knobValue);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MusicGetPartName(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MusicComponent mc;
- long part;
- StringPtr name;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MusicComponent mc;
+ long part;
+ StringPtr name;
#ifndef MusicGetPartName
- PyMac_PRECHECK(MusicGetPartName);
+ PyMac_PRECHECK(MusicGetPartName);
#endif
- if (!PyArg_ParseTuple(_args, "O&ls",
- CmpInstObj_Convert, &mc,
- &part,
- &name))
- return NULL;
- _rv = MusicGetPartName(mc,
- part,
- name);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&ls",
+ CmpInstObj_Convert, &mc,
+ &part,
+ &name))
+ return NULL;
+ _rv = MusicGetPartName(mc,
+ part,
+ name);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MusicSetPartName(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MusicComponent mc;
- long part;
- StringPtr name;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MusicComponent mc;
+ long part;
+ StringPtr name;
#ifndef MusicSetPartName
- PyMac_PRECHECK(MusicSetPartName);
+ PyMac_PRECHECK(MusicSetPartName);
#endif
- if (!PyArg_ParseTuple(_args, "O&ls",
- CmpInstObj_Convert, &mc,
- &part,
- &name))
- return NULL;
- _rv = MusicSetPartName(mc,
- part,
- name);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&ls",
+ CmpInstObj_Convert, &mc,
+ &part,
+ &name))
+ return NULL;
+ _rv = MusicSetPartName(mc,
+ part,
+ name);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MusicPlayNote(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MusicComponent mc;
- long part;
- long pitch;
- long velocity;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MusicComponent mc;
+ long part;
+ long pitch;
+ long velocity;
#ifndef MusicPlayNote
- PyMac_PRECHECK(MusicPlayNote);
-#endif
- if (!PyArg_ParseTuple(_args, "O&lll",
- CmpInstObj_Convert, &mc,
- &part,
- &pitch,
- &velocity))
- return NULL;
- _rv = MusicPlayNote(mc,
- part,
- pitch,
- velocity);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyMac_PRECHECK(MusicPlayNote);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&lll",
+ CmpInstObj_Convert, &mc,
+ &part,
+ &pitch,
+ &velocity))
+ return NULL;
+ _rv = MusicPlayNote(mc,
+ part,
+ pitch,
+ velocity);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MusicResetPart(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MusicComponent mc;
- long part;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MusicComponent mc;
+ long part;
#ifndef MusicResetPart
- PyMac_PRECHECK(MusicResetPart);
+ PyMac_PRECHECK(MusicResetPart);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &mc,
- &part))
- return NULL;
- _rv = MusicResetPart(mc,
- part);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &mc,
+ &part))
+ return NULL;
+ _rv = MusicResetPart(mc,
+ part);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MusicSetPartController(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MusicComponent mc;
- long part;
- MusicController controllerNumber;
- long controllerValue;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MusicComponent mc;
+ long part;
+ MusicController controllerNumber;
+ long controllerValue;
#ifndef MusicSetPartController
- PyMac_PRECHECK(MusicSetPartController);
-#endif
- if (!PyArg_ParseTuple(_args, "O&lll",
- CmpInstObj_Convert, &mc,
- &part,
- &controllerNumber,
- &controllerValue))
- return NULL;
- _rv = MusicSetPartController(mc,
- part,
- controllerNumber,
- controllerValue);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyMac_PRECHECK(MusicSetPartController);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&lll",
+ CmpInstObj_Convert, &mc,
+ &part,
+ &controllerNumber,
+ &controllerValue))
+ return NULL;
+ _rv = MusicSetPartController(mc,
+ part,
+ controllerNumber,
+ controllerValue);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MusicGetPartController(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MusicComponent mc;
- long part;
- MusicController controllerNumber;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MusicComponent mc;
+ long part;
+ MusicController controllerNumber;
#ifndef MusicGetPartController
- PyMac_PRECHECK(MusicGetPartController);
+ PyMac_PRECHECK(MusicGetPartController);
#endif
- if (!PyArg_ParseTuple(_args, "O&ll",
- CmpInstObj_Convert, &mc,
- &part,
- &controllerNumber))
- return NULL;
- _rv = MusicGetPartController(mc,
- part,
- controllerNumber);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&ll",
+ CmpInstObj_Convert, &mc,
+ &part,
+ &controllerNumber))
+ return NULL;
+ _rv = MusicGetPartController(mc,
+ part,
+ controllerNumber);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MusicGetInstrumentNames(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MusicComponent mc;
- long modifiableInstruments;
- Handle instrumentNames;
- Handle instrumentCategoryLasts;
- Handle instrumentCategoryNames;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MusicComponent mc;
+ long modifiableInstruments;
+ Handle instrumentNames;
+ Handle instrumentCategoryLasts;
+ Handle instrumentCategoryNames;
#ifndef MusicGetInstrumentNames
- PyMac_PRECHECK(MusicGetInstrumentNames);
-#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &mc,
- &modifiableInstruments))
- return NULL;
- _rv = MusicGetInstrumentNames(mc,
- modifiableInstruments,
- &instrumentNames,
- &instrumentCategoryLasts,
- &instrumentCategoryNames);
- _res = Py_BuildValue("lO&O&O&",
- _rv,
- ResObj_New, instrumentNames,
- ResObj_New, instrumentCategoryLasts,
- ResObj_New, instrumentCategoryNames);
- return _res;
+ PyMac_PRECHECK(MusicGetInstrumentNames);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &mc,
+ &modifiableInstruments))
+ return NULL;
+ _rv = MusicGetInstrumentNames(mc,
+ modifiableInstruments,
+ &instrumentNames,
+ &instrumentCategoryLasts,
+ &instrumentCategoryNames);
+ _res = Py_BuildValue("lO&O&O&",
+ _rv,
+ ResObj_New, instrumentNames,
+ ResObj_New, instrumentCategoryLasts,
+ ResObj_New, instrumentCategoryNames);
+ return _res;
}
static PyObject *Qt_MusicGetDrumNames(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MusicComponent mc;
- long modifiableInstruments;
- Handle instrumentNumbers;
- Handle instrumentNames;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MusicComponent mc;
+ long modifiableInstruments;
+ Handle instrumentNumbers;
+ Handle instrumentNames;
#ifndef MusicGetDrumNames
- PyMac_PRECHECK(MusicGetDrumNames);
-#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &mc,
- &modifiableInstruments))
- return NULL;
- _rv = MusicGetDrumNames(mc,
- modifiableInstruments,
- &instrumentNumbers,
- &instrumentNames);
- _res = Py_BuildValue("lO&O&",
- _rv,
- ResObj_New, instrumentNumbers,
- ResObj_New, instrumentNames);
- return _res;
+ PyMac_PRECHECK(MusicGetDrumNames);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &mc,
+ &modifiableInstruments))
+ return NULL;
+ _rv = MusicGetDrumNames(mc,
+ modifiableInstruments,
+ &instrumentNumbers,
+ &instrumentNames);
+ _res = Py_BuildValue("lO&O&",
+ _rv,
+ ResObj_New, instrumentNumbers,
+ ResObj_New, instrumentNames);
+ return _res;
}
static PyObject *Qt_MusicGetMasterTune(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MusicComponent mc;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MusicComponent mc;
#ifndef MusicGetMasterTune
- PyMac_PRECHECK(MusicGetMasterTune);
+ PyMac_PRECHECK(MusicGetMasterTune);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &mc))
- return NULL;
- _rv = MusicGetMasterTune(mc);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &mc))
+ return NULL;
+ _rv = MusicGetMasterTune(mc);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MusicSetMasterTune(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MusicComponent mc;
- long masterTune;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MusicComponent mc;
+ long masterTune;
#ifndef MusicSetMasterTune
- PyMac_PRECHECK(MusicSetMasterTune);
+ PyMac_PRECHECK(MusicSetMasterTune);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &mc,
- &masterTune))
- return NULL;
- _rv = MusicSetMasterTune(mc,
- masterTune);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &mc,
+ &masterTune))
+ return NULL;
+ _rv = MusicSetMasterTune(mc,
+ masterTune);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MusicGetDeviceConnection(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MusicComponent mc;
- long index;
- long id1;
- long id2;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MusicComponent mc;
+ long index;
+ long id1;
+ long id2;
#ifndef MusicGetDeviceConnection
- PyMac_PRECHECK(MusicGetDeviceConnection);
-#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &mc,
- &index))
- return NULL;
- _rv = MusicGetDeviceConnection(mc,
- index,
- &id1,
- &id2);
- _res = Py_BuildValue("lll",
- _rv,
- id1,
- id2);
- return _res;
+ PyMac_PRECHECK(MusicGetDeviceConnection);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &mc,
+ &index))
+ return NULL;
+ _rv = MusicGetDeviceConnection(mc,
+ index,
+ &id1,
+ &id2);
+ _res = Py_BuildValue("lll",
+ _rv,
+ id1,
+ id2);
+ return _res;
}
static PyObject *Qt_MusicUseDeviceConnection(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MusicComponent mc;
- long id1;
- long id2;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MusicComponent mc;
+ long id1;
+ long id2;
#ifndef MusicUseDeviceConnection
- PyMac_PRECHECK(MusicUseDeviceConnection);
+ PyMac_PRECHECK(MusicUseDeviceConnection);
#endif
- if (!PyArg_ParseTuple(_args, "O&ll",
- CmpInstObj_Convert, &mc,
- &id1,
- &id2))
- return NULL;
- _rv = MusicUseDeviceConnection(mc,
- id1,
- id2);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&ll",
+ CmpInstObj_Convert, &mc,
+ &id1,
+ &id2))
+ return NULL;
+ _rv = MusicUseDeviceConnection(mc,
+ id1,
+ id2);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MusicGetKnobSettingStrings(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MusicComponent mc;
- long knobIndex;
- long isGlobal;
- Handle settingsNames;
- Handle settingsCategoryLasts;
- Handle settingsCategoryNames;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MusicComponent mc;
+ long knobIndex;
+ long isGlobal;
+ Handle settingsNames;
+ Handle settingsCategoryLasts;
+ Handle settingsCategoryNames;
#ifndef MusicGetKnobSettingStrings
- PyMac_PRECHECK(MusicGetKnobSettingStrings);
-#endif
- if (!PyArg_ParseTuple(_args, "O&ll",
- CmpInstObj_Convert, &mc,
- &knobIndex,
- &isGlobal))
- return NULL;
- _rv = MusicGetKnobSettingStrings(mc,
- knobIndex,
- isGlobal,
- &settingsNames,
- &settingsCategoryLasts,
- &settingsCategoryNames);
- _res = Py_BuildValue("lO&O&O&",
- _rv,
- ResObj_New, settingsNames,
- ResObj_New, settingsCategoryLasts,
- ResObj_New, settingsCategoryNames);
- return _res;
+ PyMac_PRECHECK(MusicGetKnobSettingStrings);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&ll",
+ CmpInstObj_Convert, &mc,
+ &knobIndex,
+ &isGlobal))
+ return NULL;
+ _rv = MusicGetKnobSettingStrings(mc,
+ knobIndex,
+ isGlobal,
+ &settingsNames,
+ &settingsCategoryLasts,
+ &settingsCategoryNames);
+ _res = Py_BuildValue("lO&O&O&",
+ _rv,
+ ResObj_New, settingsNames,
+ ResObj_New, settingsCategoryLasts,
+ ResObj_New, settingsCategoryNames);
+ return _res;
}
static PyObject *Qt_MusicGetMIDIPorts(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MusicComponent mc;
- long inputPortCount;
- long outputPortCount;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MusicComponent mc;
+ long inputPortCount;
+ long outputPortCount;
#ifndef MusicGetMIDIPorts
- PyMac_PRECHECK(MusicGetMIDIPorts);
+ PyMac_PRECHECK(MusicGetMIDIPorts);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &mc))
- return NULL;
- _rv = MusicGetMIDIPorts(mc,
- &inputPortCount,
- &outputPortCount);
- _res = Py_BuildValue("lll",
- _rv,
- inputPortCount,
- outputPortCount);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &mc))
+ return NULL;
+ _rv = MusicGetMIDIPorts(mc,
+ &inputPortCount,
+ &outputPortCount);
+ _res = Py_BuildValue("lll",
+ _rv,
+ inputPortCount,
+ outputPortCount);
+ return _res;
}
static PyObject *Qt_MusicSendMIDI(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MusicComponent mc;
- long portIndex;
- MusicMIDIPacket mp;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MusicComponent mc;
+ long portIndex;
+ MusicMIDIPacket mp;
#ifndef MusicSendMIDI
- PyMac_PRECHECK(MusicSendMIDI);
+ PyMac_PRECHECK(MusicSendMIDI);
#endif
- if (!PyArg_ParseTuple(_args, "O&lO&",
- CmpInstObj_Convert, &mc,
- &portIndex,
- QtMusicMIDIPacket_Convert, &mp))
- return NULL;
- _rv = MusicSendMIDI(mc,
- portIndex,
- &mp);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&lO&",
+ CmpInstObj_Convert, &mc,
+ &portIndex,
+ QtMusicMIDIPacket_Convert, &mp))
+ return NULL;
+ _rv = MusicSendMIDI(mc,
+ portIndex,
+ &mp);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MusicSetOfflineTimeTo(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MusicComponent mc;
- long newTimeStamp;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MusicComponent mc;
+ long newTimeStamp;
#ifndef MusicSetOfflineTimeTo
- PyMac_PRECHECK(MusicSetOfflineTimeTo);
+ PyMac_PRECHECK(MusicSetOfflineTimeTo);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &mc,
- &newTimeStamp))
- return NULL;
- _rv = MusicSetOfflineTimeTo(mc,
- newTimeStamp);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &mc,
+ &newTimeStamp))
+ return NULL;
+ _rv = MusicSetOfflineTimeTo(mc,
+ newTimeStamp);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MusicGetInfoText(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MusicComponent mc;
- long selector;
- Handle textH;
- Handle styleH;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MusicComponent mc;
+ long selector;
+ Handle textH;
+ Handle styleH;
#ifndef MusicGetInfoText
- PyMac_PRECHECK(MusicGetInfoText);
-#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &mc,
- &selector))
- return NULL;
- _rv = MusicGetInfoText(mc,
- selector,
- &textH,
- &styleH);
- _res = Py_BuildValue("lO&O&",
- _rv,
- ResObj_New, textH,
- ResObj_New, styleH);
- return _res;
+ PyMac_PRECHECK(MusicGetInfoText);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &mc,
+ &selector))
+ return NULL;
+ _rv = MusicGetInfoText(mc,
+ selector,
+ &textH,
+ &styleH);
+ _res = Py_BuildValue("lO&O&",
+ _rv,
+ ResObj_New, textH,
+ ResObj_New, styleH);
+ return _res;
}
static PyObject *Qt_MusicGetInstrumentInfo(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MusicComponent mc;
- long getInstrumentInfoFlags;
- InstrumentInfoListHandle infoListH;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MusicComponent mc;
+ long getInstrumentInfoFlags;
+ InstrumentInfoListHandle infoListH;
#ifndef MusicGetInstrumentInfo
- PyMac_PRECHECK(MusicGetInstrumentInfo);
+ PyMac_PRECHECK(MusicGetInstrumentInfo);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &mc,
- &getInstrumentInfoFlags))
- return NULL;
- _rv = MusicGetInstrumentInfo(mc,
- getInstrumentInfoFlags,
- &infoListH);
- _res = Py_BuildValue("lO&",
- _rv,
- ResObj_New, infoListH);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &mc,
+ &getInstrumentInfoFlags))
+ return NULL;
+ _rv = MusicGetInstrumentInfo(mc,
+ getInstrumentInfoFlags,
+ &infoListH);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ ResObj_New, infoListH);
+ return _res;
}
static PyObject *Qt_MusicTask(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MusicComponent mc;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MusicComponent mc;
#ifndef MusicTask
- PyMac_PRECHECK(MusicTask);
+ PyMac_PRECHECK(MusicTask);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &mc))
- return NULL;
- _rv = MusicTask(mc);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &mc))
+ return NULL;
+ _rv = MusicTask(mc);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MusicSetPartInstrumentNumberInterruptSafe(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MusicComponent mc;
- long part;
- long instrumentNumber;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MusicComponent mc;
+ long part;
+ long instrumentNumber;
#ifndef MusicSetPartInstrumentNumberInterruptSafe
- PyMac_PRECHECK(MusicSetPartInstrumentNumberInterruptSafe);
+ PyMac_PRECHECK(MusicSetPartInstrumentNumberInterruptSafe);
#endif
- if (!PyArg_ParseTuple(_args, "O&ll",
- CmpInstObj_Convert, &mc,
- &part,
- &instrumentNumber))
- return NULL;
- _rv = MusicSetPartInstrumentNumberInterruptSafe(mc,
- part,
- instrumentNumber);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&ll",
+ CmpInstObj_Convert, &mc,
+ &part,
+ &instrumentNumber))
+ return NULL;
+ _rv = MusicSetPartInstrumentNumberInterruptSafe(mc,
+ part,
+ instrumentNumber);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MusicSetPartSoundLocalization(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MusicComponent mc;
- long part;
- Handle data;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MusicComponent mc;
+ long part;
+ Handle data;
#ifndef MusicSetPartSoundLocalization
- PyMac_PRECHECK(MusicSetPartSoundLocalization);
+ PyMac_PRECHECK(MusicSetPartSoundLocalization);
#endif
- if (!PyArg_ParseTuple(_args, "O&lO&",
- CmpInstObj_Convert, &mc,
- &part,
- ResObj_Convert, &data))
- return NULL;
- _rv = MusicSetPartSoundLocalization(mc,
- part,
- data);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&lO&",
+ CmpInstObj_Convert, &mc,
+ &part,
+ ResObj_Convert, &data))
+ return NULL;
+ _rv = MusicSetPartSoundLocalization(mc,
+ part,
+ data);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MusicGenericConfigure(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MusicComponent mc;
- long mode;
- long flags;
- long baseResID;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MusicComponent mc;
+ long mode;
+ long flags;
+ long baseResID;
#ifndef MusicGenericConfigure
- PyMac_PRECHECK(MusicGenericConfigure);
-#endif
- if (!PyArg_ParseTuple(_args, "O&lll",
- CmpInstObj_Convert, &mc,
- &mode,
- &flags,
- &baseResID))
- return NULL;
- _rv = MusicGenericConfigure(mc,
- mode,
- flags,
- baseResID);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyMac_PRECHECK(MusicGenericConfigure);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&lll",
+ CmpInstObj_Convert, &mc,
+ &mode,
+ &flags,
+ &baseResID))
+ return NULL;
+ _rv = MusicGenericConfigure(mc,
+ mode,
+ flags,
+ baseResID);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MusicGenericGetKnobList(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MusicComponent mc;
- long knobType;
- GenericKnobDescriptionListHandle gkdlH;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MusicComponent mc;
+ long knobType;
+ GenericKnobDescriptionListHandle gkdlH;
#ifndef MusicGenericGetKnobList
- PyMac_PRECHECK(MusicGenericGetKnobList);
+ PyMac_PRECHECK(MusicGenericGetKnobList);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &mc,
- &knobType))
- return NULL;
- _rv = MusicGenericGetKnobList(mc,
- knobType,
- &gkdlH);
- _res = Py_BuildValue("lO&",
- _rv,
- ResObj_New, gkdlH);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &mc,
+ &knobType))
+ return NULL;
+ _rv = MusicGenericGetKnobList(mc,
+ knobType,
+ &gkdlH);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ ResObj_New, gkdlH);
+ return _res;
}
static PyObject *Qt_MusicGenericSetResourceNumbers(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MusicComponent mc;
- Handle resourceIDH;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MusicComponent mc;
+ Handle resourceIDH;
#ifndef MusicGenericSetResourceNumbers
- PyMac_PRECHECK(MusicGenericSetResourceNumbers);
+ PyMac_PRECHECK(MusicGenericSetResourceNumbers);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &mc,
- ResObj_Convert, &resourceIDH))
- return NULL;
- _rv = MusicGenericSetResourceNumbers(mc,
- resourceIDH);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &mc,
+ ResObj_Convert, &resourceIDH))
+ return NULL;
+ _rv = MusicGenericSetResourceNumbers(mc,
+ resourceIDH);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MusicDerivedMIDISend(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MusicComponent mc;
- MusicMIDIPacket packet;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MusicComponent mc;
+ MusicMIDIPacket packet;
#ifndef MusicDerivedMIDISend
- PyMac_PRECHECK(MusicDerivedMIDISend);
+ PyMac_PRECHECK(MusicDerivedMIDISend);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &mc,
- QtMusicMIDIPacket_Convert, &packet))
- return NULL;
- _rv = MusicDerivedMIDISend(mc,
- &packet);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &mc,
+ QtMusicMIDIPacket_Convert, &packet))
+ return NULL;
+ _rv = MusicDerivedMIDISend(mc,
+ &packet);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MusicDerivedOpenResFile(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MusicComponent mc;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MusicComponent mc;
#ifndef MusicDerivedOpenResFile
- PyMac_PRECHECK(MusicDerivedOpenResFile);
+ PyMac_PRECHECK(MusicDerivedOpenResFile);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &mc))
- return NULL;
- _rv = MusicDerivedOpenResFile(mc);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &mc))
+ return NULL;
+ _rv = MusicDerivedOpenResFile(mc);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_MusicDerivedCloseResFile(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- MusicComponent mc;
- short resRefNum;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ MusicComponent mc;
+ short resRefNum;
#ifndef MusicDerivedCloseResFile
- PyMac_PRECHECK(MusicDerivedCloseResFile);
+ PyMac_PRECHECK(MusicDerivedCloseResFile);
#endif
- if (!PyArg_ParseTuple(_args, "O&h",
- CmpInstObj_Convert, &mc,
- &resRefNum))
- return NULL;
- _rv = MusicDerivedCloseResFile(mc,
- resRefNum);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&h",
+ CmpInstObj_Convert, &mc,
+ &resRefNum))
+ return NULL;
+ _rv = MusicDerivedCloseResFile(mc,
+ resRefNum);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_NAUnregisterMusicDevice(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- NoteAllocator na;
- long index;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ NoteAllocator na;
+ long index;
#ifndef NAUnregisterMusicDevice
- PyMac_PRECHECK(NAUnregisterMusicDevice);
+ PyMac_PRECHECK(NAUnregisterMusicDevice);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &na,
- &index))
- return NULL;
- _rv = NAUnregisterMusicDevice(na,
- index);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &na,
+ &index))
+ return NULL;
+ _rv = NAUnregisterMusicDevice(na,
+ index);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_NASaveMusicConfiguration(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- NoteAllocator na;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ NoteAllocator na;
#ifndef NASaveMusicConfiguration
- PyMac_PRECHECK(NASaveMusicConfiguration);
+ PyMac_PRECHECK(NASaveMusicConfiguration);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &na))
- return NULL;
- _rv = NASaveMusicConfiguration(na);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &na))
+ return NULL;
+ _rv = NASaveMusicConfiguration(na);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_NAGetMIDIPorts(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- NoteAllocator na;
- QTMIDIPortListHandle inputPorts;
- QTMIDIPortListHandle outputPorts;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ NoteAllocator na;
+ QTMIDIPortListHandle inputPorts;
+ QTMIDIPortListHandle outputPorts;
#ifndef NAGetMIDIPorts
- PyMac_PRECHECK(NAGetMIDIPorts);
+ PyMac_PRECHECK(NAGetMIDIPorts);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &na))
- return NULL;
- _rv = NAGetMIDIPorts(na,
- &inputPorts,
- &outputPorts);
- _res = Py_BuildValue("lO&O&",
- _rv,
- ResObj_New, inputPorts,
- ResObj_New, outputPorts);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &na))
+ return NULL;
+ _rv = NAGetMIDIPorts(na,
+ &inputPorts,
+ &outputPorts);
+ _res = Py_BuildValue("lO&O&",
+ _rv,
+ ResObj_New, inputPorts,
+ ResObj_New, outputPorts);
+ return _res;
}
static PyObject *Qt_NATask(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- NoteAllocator na;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ NoteAllocator na;
#ifndef NATask
- PyMac_PRECHECK(NATask);
+ PyMac_PRECHECK(NATask);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &na))
- return NULL;
- _rv = NATask(na);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &na))
+ return NULL;
+ _rv = NATask(na);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_TuneSetHeader(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- TunePlayer tp;
- unsigned long * header;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ TunePlayer tp;
+ unsigned long * header;
#ifndef TuneSetHeader
- PyMac_PRECHECK(TuneSetHeader);
+ PyMac_PRECHECK(TuneSetHeader);
#endif
- if (!PyArg_ParseTuple(_args, "O&s",
- CmpInstObj_Convert, &tp,
- &header))
- return NULL;
- _rv = TuneSetHeader(tp,
- header);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&s",
+ CmpInstObj_Convert, &tp,
+ &header))
+ return NULL;
+ _rv = TuneSetHeader(tp,
+ header);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_TuneGetTimeBase(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- TunePlayer tp;
- TimeBase tb;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ TunePlayer tp;
+ TimeBase tb;
#ifndef TuneGetTimeBase
- PyMac_PRECHECK(TuneGetTimeBase);
+ PyMac_PRECHECK(TuneGetTimeBase);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &tp))
- return NULL;
- _rv = TuneGetTimeBase(tp,
- &tb);
- _res = Py_BuildValue("lO&",
- _rv,
- TimeBaseObj_New, tb);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &tp))
+ return NULL;
+ _rv = TuneGetTimeBase(tp,
+ &tb);
+ _res = Py_BuildValue("lO&",
+ _rv,
+ TimeBaseObj_New, tb);
+ return _res;
}
static PyObject *Qt_TuneSetTimeScale(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- TunePlayer tp;
- TimeScale scale;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ TunePlayer tp;
+ TimeScale scale;
#ifndef TuneSetTimeScale
- PyMac_PRECHECK(TuneSetTimeScale);
+ PyMac_PRECHECK(TuneSetTimeScale);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &tp,
- &scale))
- return NULL;
- _rv = TuneSetTimeScale(tp,
- scale);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &tp,
+ &scale))
+ return NULL;
+ _rv = TuneSetTimeScale(tp,
+ scale);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_TuneGetTimeScale(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- TunePlayer tp;
- TimeScale scale;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ TunePlayer tp;
+ TimeScale scale;
#ifndef TuneGetTimeScale
- PyMac_PRECHECK(TuneGetTimeScale);
+ PyMac_PRECHECK(TuneGetTimeScale);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &tp))
- return NULL;
- _rv = TuneGetTimeScale(tp,
- &scale);
- _res = Py_BuildValue("ll",
- _rv,
- scale);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &tp))
+ return NULL;
+ _rv = TuneGetTimeScale(tp,
+ &scale);
+ _res = Py_BuildValue("ll",
+ _rv,
+ scale);
+ return _res;
}
static PyObject *Qt_TuneInstant(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- TunePlayer tp;
- unsigned long tune;
- unsigned long tunePosition;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ TunePlayer tp;
+ unsigned long tune;
+ unsigned long tunePosition;
#ifndef TuneInstant
- PyMac_PRECHECK(TuneInstant);
+ PyMac_PRECHECK(TuneInstant);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &tp,
- &tunePosition))
- return NULL;
- _rv = TuneInstant(tp,
- &tune,
- tunePosition);
- _res = Py_BuildValue("ll",
- _rv,
- tune);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &tp,
+ &tunePosition))
+ return NULL;
+ _rv = TuneInstant(tp,
+ &tune,
+ tunePosition);
+ _res = Py_BuildValue("ll",
+ _rv,
+ tune);
+ return _res;
}
static PyObject *Qt_TuneStop(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- TunePlayer tp;
- long stopFlags;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ TunePlayer tp;
+ long stopFlags;
#ifndef TuneStop
- PyMac_PRECHECK(TuneStop);
+ PyMac_PRECHECK(TuneStop);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &tp,
- &stopFlags))
- return NULL;
- _rv = TuneStop(tp,
- stopFlags);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &tp,
+ &stopFlags))
+ return NULL;
+ _rv = TuneStop(tp,
+ stopFlags);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_TuneSetVolume(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- TunePlayer tp;
- Fixed volume;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ TunePlayer tp;
+ Fixed volume;
#ifndef TuneSetVolume
- PyMac_PRECHECK(TuneSetVolume);
+ PyMac_PRECHECK(TuneSetVolume);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &tp,
- PyMac_GetFixed, &volume))
- return NULL;
- _rv = TuneSetVolume(tp,
- volume);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &tp,
+ PyMac_GetFixed, &volume))
+ return NULL;
+ _rv = TuneSetVolume(tp,
+ volume);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_TuneGetVolume(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- TunePlayer tp;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ TunePlayer tp;
#ifndef TuneGetVolume
- PyMac_PRECHECK(TuneGetVolume);
+ PyMac_PRECHECK(TuneGetVolume);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &tp))
- return NULL;
- _rv = TuneGetVolume(tp);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &tp))
+ return NULL;
+ _rv = TuneGetVolume(tp);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_TunePreroll(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- TunePlayer tp;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ TunePlayer tp;
#ifndef TunePreroll
- PyMac_PRECHECK(TunePreroll);
+ PyMac_PRECHECK(TunePreroll);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &tp))
- return NULL;
- _rv = TunePreroll(tp);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &tp))
+ return NULL;
+ _rv = TunePreroll(tp);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_TuneUnroll(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- TunePlayer tp;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ TunePlayer tp;
#ifndef TuneUnroll
- PyMac_PRECHECK(TuneUnroll);
+ PyMac_PRECHECK(TuneUnroll);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &tp))
- return NULL;
- _rv = TuneUnroll(tp);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &tp))
+ return NULL;
+ _rv = TuneUnroll(tp);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_TuneSetPartTranspose(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- TunePlayer tp;
- unsigned long part;
- long transpose;
- long velocityShift;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ TunePlayer tp;
+ unsigned long part;
+ long transpose;
+ long velocityShift;
#ifndef TuneSetPartTranspose
- PyMac_PRECHECK(TuneSetPartTranspose);
-#endif
- if (!PyArg_ParseTuple(_args, "O&lll",
- CmpInstObj_Convert, &tp,
- &part,
- &transpose,
- &velocityShift))
- return NULL;
- _rv = TuneSetPartTranspose(tp,
- part,
- transpose,
- velocityShift);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyMac_PRECHECK(TuneSetPartTranspose);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&lll",
+ CmpInstObj_Convert, &tp,
+ &part,
+ &transpose,
+ &velocityShift))
+ return NULL;
+ _rv = TuneSetPartTranspose(tp,
+ part,
+ transpose,
+ velocityShift);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_TuneGetNoteAllocator(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- NoteAllocator _rv;
- TunePlayer tp;
+ PyObject *_res = NULL;
+ NoteAllocator _rv;
+ TunePlayer tp;
#ifndef TuneGetNoteAllocator
- PyMac_PRECHECK(TuneGetNoteAllocator);
+ PyMac_PRECHECK(TuneGetNoteAllocator);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &tp))
- return NULL;
- _rv = TuneGetNoteAllocator(tp);
- _res = Py_BuildValue("O&",
- CmpInstObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &tp))
+ return NULL;
+ _rv = TuneGetNoteAllocator(tp);
+ _res = Py_BuildValue("O&",
+ CmpInstObj_New, _rv);
+ return _res;
}
static PyObject *Qt_TuneSetSofter(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- TunePlayer tp;
- long softer;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ TunePlayer tp;
+ long softer;
#ifndef TuneSetSofter
- PyMac_PRECHECK(TuneSetSofter);
+ PyMac_PRECHECK(TuneSetSofter);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &tp,
- &softer))
- return NULL;
- _rv = TuneSetSofter(tp,
- softer);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &tp,
+ &softer))
+ return NULL;
+ _rv = TuneSetSofter(tp,
+ softer);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_TuneTask(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- TunePlayer tp;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ TunePlayer tp;
#ifndef TuneTask
- PyMac_PRECHECK(TuneTask);
+ PyMac_PRECHECK(TuneTask);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CmpInstObj_Convert, &tp))
- return NULL;
- _rv = TuneTask(tp);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CmpInstObj_Convert, &tp))
+ return NULL;
+ _rv = TuneTask(tp);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_TuneSetBalance(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- TunePlayer tp;
- long balance;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ TunePlayer tp;
+ long balance;
#ifndef TuneSetBalance
- PyMac_PRECHECK(TuneSetBalance);
+ PyMac_PRECHECK(TuneSetBalance);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &tp,
- &balance))
- return NULL;
- _rv = TuneSetBalance(tp,
- balance);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &tp,
+ &balance))
+ return NULL;
+ _rv = TuneSetBalance(tp,
+ balance);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_TuneSetSoundLocalization(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- TunePlayer tp;
- Handle data;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ TunePlayer tp;
+ Handle data;
#ifndef TuneSetSoundLocalization
- PyMac_PRECHECK(TuneSetSoundLocalization);
+ PyMac_PRECHECK(TuneSetSoundLocalization);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- CmpInstObj_Convert, &tp,
- ResObj_Convert, &data))
- return NULL;
- _rv = TuneSetSoundLocalization(tp,
- data);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ CmpInstObj_Convert, &tp,
+ ResObj_Convert, &data))
+ return NULL;
+ _rv = TuneSetSoundLocalization(tp,
+ data);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_TuneSetHeaderWithSize(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- TunePlayer tp;
- unsigned long * header;
- unsigned long size;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ TunePlayer tp;
+ unsigned long * header;
+ unsigned long size;
#ifndef TuneSetHeaderWithSize
- PyMac_PRECHECK(TuneSetHeaderWithSize);
+ PyMac_PRECHECK(TuneSetHeaderWithSize);
#endif
- if (!PyArg_ParseTuple(_args, "O&sl",
- CmpInstObj_Convert, &tp,
- &header,
- &size))
- return NULL;
- _rv = TuneSetHeaderWithSize(tp,
- header,
- size);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&sl",
+ CmpInstObj_Convert, &tp,
+ &header,
+ &size))
+ return NULL;
+ _rv = TuneSetHeaderWithSize(tp,
+ header,
+ size);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_TuneSetPartMix(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- TunePlayer tp;
- unsigned long partNumber;
- long volume;
- long balance;
- long mixFlags;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ TunePlayer tp;
+ unsigned long partNumber;
+ long volume;
+ long balance;
+ long mixFlags;
#ifndef TuneSetPartMix
- PyMac_PRECHECK(TuneSetPartMix);
-#endif
- if (!PyArg_ParseTuple(_args, "O&llll",
- CmpInstObj_Convert, &tp,
- &partNumber,
- &volume,
- &balance,
- &mixFlags))
- return NULL;
- _rv = TuneSetPartMix(tp,
- partNumber,
- volume,
- balance,
- mixFlags);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ PyMac_PRECHECK(TuneSetPartMix);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&llll",
+ CmpInstObj_Convert, &tp,
+ &partNumber,
+ &volume,
+ &balance,
+ &mixFlags))
+ return NULL;
+ _rv = TuneSetPartMix(tp,
+ partNumber,
+ volume,
+ balance,
+ mixFlags);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Qt_TuneGetPartMix(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ComponentResult _rv;
- TunePlayer tp;
- unsigned long partNumber;
- long volumeOut;
- long balanceOut;
- long mixFlagsOut;
+ PyObject *_res = NULL;
+ ComponentResult _rv;
+ TunePlayer tp;
+ unsigned long partNumber;
+ long volumeOut;
+ long balanceOut;
+ long mixFlagsOut;
#ifndef TuneGetPartMix
- PyMac_PRECHECK(TuneGetPartMix);
-#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- CmpInstObj_Convert, &tp,
- &partNumber))
- return NULL;
- _rv = TuneGetPartMix(tp,
- partNumber,
- &volumeOut,
- &balanceOut,
- &mixFlagsOut);
- _res = Py_BuildValue("llll",
- _rv,
- volumeOut,
- balanceOut,
- mixFlagsOut);
- return _res;
+ PyMac_PRECHECK(TuneGetPartMix);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&l",
+ CmpInstObj_Convert, &tp,
+ &partNumber))
+ return NULL;
+ _rv = TuneGetPartMix(tp,
+ partNumber,
+ &volumeOut,
+ &balanceOut,
+ &mixFlagsOut);
+ _res = Py_BuildValue("llll",
+ _rv,
+ volumeOut,
+ balanceOut,
+ mixFlagsOut);
+ return _res;
}
static PyObject *Qt_AlignWindow(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- WindowPtr wp;
- Boolean front;
+ PyObject *_res = NULL;
+ WindowPtr wp;
+ Boolean front;
#ifndef AlignWindow
- PyMac_PRECHECK(AlignWindow);
+ PyMac_PRECHECK(AlignWindow);
#endif
- if (!PyArg_ParseTuple(_args, "O&b",
- WinObj_Convert, &wp,
- &front))
- return NULL;
- AlignWindow(wp,
- front,
- (Rect *)0,
- (ICMAlignmentProcRecordPtr)0);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&b",
+ WinObj_Convert, &wp,
+ &front))
+ return NULL;
+ AlignWindow(wp,
+ front,
+ (Rect *)0,
+ (ICMAlignmentProcRecordPtr)0);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qt_DragAlignedWindow(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- WindowPtr wp;
- Point startPt;
- Rect boundsRect;
+ PyObject *_res = NULL;
+ WindowPtr wp;
+ Point startPt;
+ Rect boundsRect;
#ifndef DragAlignedWindow
- PyMac_PRECHECK(DragAlignedWindow);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- WinObj_Convert, &wp,
- PyMac_GetPoint, &startPt,
- PyMac_GetRect, &boundsRect))
- return NULL;
- DragAlignedWindow(wp,
- startPt,
- &boundsRect,
- (Rect *)0,
- (ICMAlignmentProcRecordPtr)0);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(DragAlignedWindow);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ WinObj_Convert, &wp,
+ PyMac_GetPoint, &startPt,
+ PyMac_GetRect, &boundsRect))
+ return NULL;
+ DragAlignedWindow(wp,
+ startPt,
+ &boundsRect,
+ (Rect *)0,
+ (ICMAlignmentProcRecordPtr)0);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Qt_MoviesTask(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- long maxMilliSecToUse;
+ PyObject *_res = NULL;
+ long maxMilliSecToUse;
#ifndef MoviesTask
- PyMac_PRECHECK(MoviesTask);
+ PyMac_PRECHECK(MoviesTask);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &maxMilliSecToUse))
- return NULL;
- MoviesTask((Movie)0,
- maxMilliSecToUse);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &maxMilliSecToUse))
+ return NULL;
+ MoviesTask((Movie)0,
+ maxMilliSecToUse);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
#endif /* __LP64__ */
static PyMethodDef Qt_methods[] = {
#ifndef __LP64__
- {"EnterMovies", (PyCFunction)Qt_EnterMovies, 1,
- PyDoc_STR("() -> None")},
- {"ExitMovies", (PyCFunction)Qt_ExitMovies, 1,
- PyDoc_STR("() -> None")},
- {"GetMoviesError", (PyCFunction)Qt_GetMoviesError, 1,
- PyDoc_STR("() -> None")},
- {"ClearMoviesStickyError", (PyCFunction)Qt_ClearMoviesStickyError, 1,
- PyDoc_STR("() -> None")},
- {"GetMoviesStickyError", (PyCFunction)Qt_GetMoviesStickyError, 1,
- PyDoc_STR("() -> None")},
- {"QTGetWallClockTimeBase", (PyCFunction)Qt_QTGetWallClockTimeBase, 1,
- PyDoc_STR("() -> (TimeBase wallClockTimeBase)")},
- {"QTIdleManagerOpen", (PyCFunction)Qt_QTIdleManagerOpen, 1,
- PyDoc_STR("() -> (IdleManager _rv)")},
- {"CreateMovieControl", (PyCFunction)Qt_CreateMovieControl, 1,
- PyDoc_STR("(WindowPtr theWindow, Movie theMovie, UInt32 options) -> (Rect localRect, ControlHandle returnedControl)")},
- {"DisposeMatte", (PyCFunction)Qt_DisposeMatte, 1,
- PyDoc_STR("(PixMapHandle theMatte) -> None")},
- {"NewMovie", (PyCFunction)Qt_NewMovie, 1,
- PyDoc_STR("(long flags) -> (Movie _rv)")},
- {"QTGetTimeUntilNextTask", (PyCFunction)Qt_QTGetTimeUntilNextTask, 1,
- PyDoc_STR("(long scale) -> (long duration)")},
- {"GetDataHandler", (PyCFunction)Qt_GetDataHandler, 1,
- PyDoc_STR("(Handle dataRef, OSType dataHandlerSubType, long flags) -> (Component _rv)")},
- {"PasteHandleIntoMovie", (PyCFunction)Qt_PasteHandleIntoMovie, 1,
- PyDoc_STR("(Handle h, OSType handleType, Movie theMovie, long flags, ComponentInstance userComp) -> None")},
- {"GetMovieImporterForDataRef", (PyCFunction)Qt_GetMovieImporterForDataRef, 1,
- PyDoc_STR("(OSType dataRefType, Handle dataRef, long flags) -> (Component importer)")},
- {"QTGetMIMETypeInfo", (PyCFunction)Qt_QTGetMIMETypeInfo, 1,
- PyDoc_STR("(char* mimeStringStart, short mimeStringLength, OSType infoSelector, void * infoDataPtr) -> (long infoDataSize)")},
- {"TrackTimeToMediaTime", (PyCFunction)Qt_TrackTimeToMediaTime, 1,
- PyDoc_STR("(TimeValue value, Track theTrack) -> (TimeValue _rv)")},
- {"NewUserData", (PyCFunction)Qt_NewUserData, 1,
- PyDoc_STR("() -> (UserData theUserData)")},
- {"NewUserDataFromHandle", (PyCFunction)Qt_NewUserDataFromHandle, 1,
- PyDoc_STR("(Handle h) -> (UserData theUserData)")},
- {"CreateMovieFile", (PyCFunction)Qt_CreateMovieFile, 1,
- PyDoc_STR("(FSSpec fileSpec, OSType creator, ScriptCode scriptTag, long createMovieFileFlags) -> (short resRefNum, Movie newmovie)")},
- {"OpenMovieFile", (PyCFunction)Qt_OpenMovieFile, 1,
- PyDoc_STR("(FSSpec fileSpec, SInt8 permission) -> (short resRefNum)")},
- {"CloseMovieFile", (PyCFunction)Qt_CloseMovieFile, 1,
- PyDoc_STR("(short resRefNum) -> None")},
- {"DeleteMovieFile", (PyCFunction)Qt_DeleteMovieFile, 1,
- PyDoc_STR("(FSSpec fileSpec) -> None")},
- {"NewMovieFromFile", (PyCFunction)Qt_NewMovieFromFile, 1,
- PyDoc_STR("(short resRefNum, short resId, short newMovieFlags) -> (Movie theMovie, short resId, Boolean dataRefWasChanged)")},
- {"NewMovieFromHandle", (PyCFunction)Qt_NewMovieFromHandle, 1,
- PyDoc_STR("(Handle h, short newMovieFlags) -> (Movie theMovie, Boolean dataRefWasChanged)")},
- {"NewMovieFromDataFork", (PyCFunction)Qt_NewMovieFromDataFork, 1,
- PyDoc_STR("(short fRefNum, long fileOffset, short newMovieFlags) -> (Movie theMovie, Boolean dataRefWasChanged)")},
- {"NewMovieFromDataFork64", (PyCFunction)Qt_NewMovieFromDataFork64, 1,
- PyDoc_STR("(long fRefNum, wide fileOffset, short newMovieFlags) -> (Movie theMovie, Boolean dataRefWasChanged)")},
- {"NewMovieFromDataRef", (PyCFunction)Qt_NewMovieFromDataRef, 1,
- PyDoc_STR("(short flags, Handle dataRef, OSType dtaRefType) -> (Movie m, short id)")},
- {"NewMovieFromStorageOffset", (PyCFunction)Qt_NewMovieFromStorageOffset, 1,
- PyDoc_STR("(DataHandler dh, wide fileOffset, short newMovieFlags) -> (Movie theMovie, Boolean dataRefWasCataRefType)")},
- {"NewMovieForDataRefFromHandle", (PyCFunction)Qt_NewMovieForDataRefFromHandle, 1,
- PyDoc_STR("(Handle h, short newMovieFlags, Handle dataRef, OSType dataRefType) -> (Movie theMovie, Boolean dataRefWasChanged)")},
- {"RemoveMovieResource", (PyCFunction)Qt_RemoveMovieResource, 1,
- PyDoc_STR("(short resRefNum, short resId) -> None")},
- {"CreateMovieStorage", (PyCFunction)Qt_CreateMovieStorage, 1,
- PyDoc_STR("(Handle dataRef, OSType dataRefType, OSType creator, ScriptCode scriptTag, long createMovieFileFlags) -> (DataHandler outDataHandler, Movie newmovie)")},
- {"OpenMovieStorage", (PyCFunction)Qt_OpenMovieStorage, 1,
- PyDoc_STR("(Handle dataRef, OSType dataRefType, long flags) -> (DataHandler outDataHandler)")},
- {"CloseMovieStorage", (PyCFunction)Qt_CloseMovieStorage, 1,
- PyDoc_STR("(DataHandler dh) -> None")},
- {"DeleteMovieStorage", (PyCFunction)Qt_DeleteMovieStorage, 1,
- PyDoc_STR("(Handle dataRef, OSType dataRefType) -> None")},
- {"CreateShortcutMovieFile", (PyCFunction)Qt_CreateShortcutMovieFile, 1,
- PyDoc_STR("(FSSpec fileSpec, OSType creator, ScriptCode scriptTag, long createMovieFileFlags, Handle targetDataRef, OSType targetDataRefType) -> None")},
- {"CanQuickTimeOpenFile", (PyCFunction)Qt_CanQuickTimeOpenFile, 1,
- PyDoc_STR("(FSSpec fileSpec, OSType fileType, OSType fileNameExtension, UInt32 inFlags) -> (Boolean outCanOpenWithGraphicsImporter, Boolean outCanOpenAsMovie, Boolean outPreferGraphicsImporter)")},
- {"CanQuickTimeOpenDataRef", (PyCFunction)Qt_CanQuickTimeOpenDataRef, 1,
- PyDoc_STR("(Handle dataRef, OSType dataRefType, UInt32 inFlags) -> (Boolean outCanOpenWithGraphicsImporter, Boolean outCanOpenAsMovie, Boolean outPreferGraphicsImporter)")},
- {"NewMovieFromScrap", (PyCFunction)Qt_NewMovieFromScrap, 1,
- PyDoc_STR("(long newMovieFlags) -> (Movie _rv)")},
- {"QTNewAlias", (PyCFunction)Qt_QTNewAlias, 1,
- PyDoc_STR("(FSSpec fss, Boolean minimal) -> (AliasHandle alias)")},
- {"EndFullScreen", (PyCFunction)Qt_EndFullScreen, 1,
- PyDoc_STR("(Ptr fullState, long flags) -> None")},
- {"AddSoundDescriptionExtension", (PyCFunction)Qt_AddSoundDescriptionExtension, 1,
- PyDoc_STR("(SoundDescriptionHandle desc, Handle extension, OSType idType) -> None")},
- {"GetSoundDescriptionExtension", (PyCFunction)Qt_GetSoundDescriptionExtension, 1,
- PyDoc_STR("(SoundDescriptionHandle desc, OSType idType) -> (Handle extension)")},
- {"RemoveSoundDescriptionExtension", (PyCFunction)Qt_RemoveSoundDescriptionExtension, 1,
- PyDoc_STR("(SoundDescriptionHandle desc, OSType idType) -> None")},
- {"QTIsStandardParameterDialogEvent", (PyCFunction)Qt_QTIsStandardParameterDialogEvent, 1,
- PyDoc_STR("(QTParameterDialog createdDialog) -> (EventRecord pEvent)")},
- {"QTDismissStandardParameterDialog", (PyCFunction)Qt_QTDismissStandardParameterDialog, 1,
- PyDoc_STR("(QTParameterDialog createdDialog) -> None")},
- {"QTStandardParameterDialogDoAction", (PyCFunction)Qt_QTStandardParameterDialogDoAction, 1,
- PyDoc_STR("(QTParameterDialog createdDialog, long action, void * params) -> None")},
- {"QTRegisterAccessKey", (PyCFunction)Qt_QTRegisterAccessKey, 1,
- PyDoc_STR("(Str255 accessKeyType, long flags, Handle accessKey) -> None")},
- {"QTUnregisterAccessKey", (PyCFunction)Qt_QTUnregisterAccessKey, 1,
- PyDoc_STR("(Str255 accessKeyType, long flags, Handle accessKey) -> None")},
- {"QTGetSupportedRestrictions", (PyCFunction)Qt_QTGetSupportedRestrictions, 1,
- PyDoc_STR("(OSType inRestrictionClass) -> (UInt32 outRestrictionIDs)")},
- {"QTTextToNativeText", (PyCFunction)Qt_QTTextToNativeText, 1,
- PyDoc_STR("(Handle theText, long encoding, long flags) -> None")},
- {"VideoMediaResetStatistics", (PyCFunction)Qt_VideoMediaResetStatistics, 1,
- PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv)")},
- {"VideoMediaGetStatistics", (PyCFunction)Qt_VideoMediaGetStatistics, 1,
- PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv)")},
- {"VideoMediaGetStallCount", (PyCFunction)Qt_VideoMediaGetStallCount, 1,
- PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, unsigned long stalls)")},
- {"VideoMediaSetCodecParameter", (PyCFunction)Qt_VideoMediaSetCodecParameter, 1,
- PyDoc_STR("(MediaHandler mh, CodecType cType, OSType parameterID, long parameterChangeSeed, void * dataPtr, long dataSize) -> (ComponentResult _rv)")},
- {"VideoMediaGetCodecParameter", (PyCFunction)Qt_VideoMediaGetCodecParameter, 1,
- PyDoc_STR("(MediaHandler mh, CodecType cType, OSType parameterID, Handle outParameterData) -> (ComponentResult _rv)")},
- {"TextMediaAddTextSample", (PyCFunction)Qt_TextMediaAddTextSample, 1,
- PyDoc_STR("(MediaHandler mh, Ptr text, unsigned long size, short fontNumber, short fontSize, Style textFace, short textJustification, long displayFlags, TimeValue scrollDelay, short hiliteStart, short hiliteEnd, TimeValue duration) -> (ComponentResult _rv, RGBColor textColor, RGBColor backColor, Rect textBox, RGBColor rgbHiliteColor, TimeValue sampleTime)")},
- {"TextMediaAddTESample", (PyCFunction)Qt_TextMediaAddTESample, 1,
- PyDoc_STR("(MediaHandler mh, TEHandle hTE, short textJustification, long displayFlags, TimeValue scrollDelay, short hiliteStart, short hiliteEnd, TimeValue duration) -> (ComponentResult _rv, RGBColor backColor, Rect textBox, RGBColor rgbHiliteColor, TimeValue sampleTime)")},
- {"TextMediaAddHiliteSample", (PyCFunction)Qt_TextMediaAddHiliteSample, 1,
- PyDoc_STR("(MediaHandler mh, short hiliteStart, short hiliteEnd, TimeValue duration) -> (ComponentResult _rv, RGBColor rgbHiliteColor, TimeValue sampleTime)")},
- {"TextMediaDrawRaw", (PyCFunction)Qt_TextMediaDrawRaw, 1,
- PyDoc_STR("(MediaHandler mh, GWorldPtr gw, GDHandle gd, void * data, long dataSize, TextDescriptionHandle tdh) -> (ComponentResult _rv)")},
- {"TextMediaSetTextProperty", (PyCFunction)Qt_TextMediaSetTextProperty, 1,
- PyDoc_STR("(MediaHandler mh, TimeValue atMediaTime, long propertyType, void * data, long dataSize) -> (ComponentResult _rv)")},
- {"TextMediaRawSetup", (PyCFunction)Qt_TextMediaRawSetup, 1,
- PyDoc_STR("(MediaHandler mh, GWorldPtr gw, GDHandle gd, void * data, long dataSize, TextDescriptionHandle tdh, TimeValue sampleDuration) -> (ComponentResult _rv)")},
- {"TextMediaRawIdle", (PyCFunction)Qt_TextMediaRawIdle, 1,
- PyDoc_STR("(MediaHandler mh, GWorldPtr gw, GDHandle gd, TimeValue sampleTime, long flagsIn) -> (ComponentResult _rv, long flagsOut)")},
- {"TextMediaGetTextProperty", (PyCFunction)Qt_TextMediaGetTextProperty, 1,
- PyDoc_STR("(MediaHandler mh, TimeValue atMediaTime, long propertyType, void * data, long dataSize) -> (ComponentResult _rv)")},
- {"TextMediaFindNextText", (PyCFunction)Qt_TextMediaFindNextText, 1,
- PyDoc_STR("(MediaHandler mh, Ptr text, long size, short findFlags, TimeValue startTime) -> (ComponentResult _rv, TimeValue foundTime, TimeValue foundDuration, long offset)")},
- {"TextMediaHiliteTextSample", (PyCFunction)Qt_TextMediaHiliteTextSample, 1,
- PyDoc_STR("(MediaHandler mh, TimeValue sampleTime, short hiliteStart, short hiliteEnd) -> (ComponentResult _rv, RGBColor rgbHiliteColor)")},
- {"TextMediaSetTextSampleData", (PyCFunction)Qt_TextMediaSetTextSampleData, 1,
- PyDoc_STR("(MediaHandler mh, void * data, OSType dataType) -> (ComponentResult _rv)")},
- {"SpriteMediaSetProperty", (PyCFunction)Qt_SpriteMediaSetProperty, 1,
- PyDoc_STR("(MediaHandler mh, short spriteIndex, long propertyType, void * propertyValue) -> (ComponentResult _rv)")},
- {"SpriteMediaGetProperty", (PyCFunction)Qt_SpriteMediaGetProperty, 1,
- PyDoc_STR("(MediaHandler mh, short spriteIndex, long propertyType, void * propertyValue) -> (ComponentResult _rv)")},
- {"SpriteMediaHitTestSprites", (PyCFunction)Qt_SpriteMediaHitTestSprites, 1,
- PyDoc_STR("(MediaHandler mh, long flags, Point loc) -> (ComponentResult _rv, short spriteHitIndex)")},
- {"SpriteMediaCountSprites", (PyCFunction)Qt_SpriteMediaCountSprites, 1,
- PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, short numSprites)")},
- {"SpriteMediaCountImages", (PyCFunction)Qt_SpriteMediaCountImages, 1,
- PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, short numImages)")},
- {"SpriteMediaGetIndImageDescription", (PyCFunction)Qt_SpriteMediaGetIndImageDescription, 1,
- PyDoc_STR("(MediaHandler mh, short imageIndex, ImageDescriptionHandle imageDescription) -> (ComponentResult _rv)")},
- {"SpriteMediaGetDisplayedSampleNumber", (PyCFunction)Qt_SpriteMediaGetDisplayedSampleNumber, 1,
- PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, long sampleNum)")},
- {"SpriteMediaGetSpriteName", (PyCFunction)Qt_SpriteMediaGetSpriteName, 1,
- PyDoc_STR("(MediaHandler mh, QTAtomID spriteID, Str255 spriteName) -> (ComponentResult _rv)")},
- {"SpriteMediaGetImageName", (PyCFunction)Qt_SpriteMediaGetImageName, 1,
- PyDoc_STR("(MediaHandler mh, short imageIndex, Str255 imageName) -> (ComponentResult _rv)")},
- {"SpriteMediaSetSpriteProperty", (PyCFunction)Qt_SpriteMediaSetSpriteProperty, 1,
- PyDoc_STR("(MediaHandler mh, QTAtomID spriteID, long propertyType, void * propertyValue) -> (ComponentResult _rv)")},
- {"SpriteMediaGetSpriteProperty", (PyCFunction)Qt_SpriteMediaGetSpriteProperty, 1,
- PyDoc_STR("(MediaHandler mh, QTAtomID spriteID, long propertyType, void * propertyValue) -> (ComponentResult _rv)")},
- {"SpriteMediaHitTestAllSprites", (PyCFunction)Qt_SpriteMediaHitTestAllSprites, 1,
- PyDoc_STR("(MediaHandler mh, long flags, Point loc) -> (ComponentResult _rv, QTAtomID spriteHitID)")},
- {"SpriteMediaHitTestOneSprite", (PyCFunction)Qt_SpriteMediaHitTestOneSprite, 1,
- PyDoc_STR("(MediaHandler mh, QTAtomID spriteID, long flags, Point loc) -> (ComponentResult _rv, Boolean wasHit)")},
- {"SpriteMediaSpriteIndexToID", (PyCFunction)Qt_SpriteMediaSpriteIndexToID, 1,
- PyDoc_STR("(MediaHandler mh, short spriteIndex) -> (ComponentResult _rv, QTAtomID spriteID)")},
- {"SpriteMediaSpriteIDToIndex", (PyCFunction)Qt_SpriteMediaSpriteIDToIndex, 1,
- PyDoc_STR("(MediaHandler mh, QTAtomID spriteID) -> (ComponentResult _rv, short spriteIndex)")},
- {"SpriteMediaSetActionVariable", (PyCFunction)Qt_SpriteMediaSetActionVariable, 1,
- PyDoc_STR("(MediaHandler mh, QTAtomID variableID, float value) -> (ComponentResult _rv)")},
- {"SpriteMediaGetActionVariable", (PyCFunction)Qt_SpriteMediaGetActionVariable, 1,
- PyDoc_STR("(MediaHandler mh, QTAtomID variableID) -> (ComponentResult _rv, float value)")},
- {"SpriteMediaDisposeSprite", (PyCFunction)Qt_SpriteMediaDisposeSprite, 1,
- PyDoc_STR("(MediaHandler mh, QTAtomID spriteID) -> (ComponentResult _rv)")},
- {"SpriteMediaSetActionVariableToString", (PyCFunction)Qt_SpriteMediaSetActionVariableToString, 1,
- PyDoc_STR("(MediaHandler mh, QTAtomID variableID, Ptr theCString) -> (ComponentResult _rv)")},
- {"SpriteMediaGetActionVariableAsString", (PyCFunction)Qt_SpriteMediaGetActionVariableAsString, 1,
- PyDoc_STR("(MediaHandler mh, QTAtomID variableID) -> (ComponentResult _rv, Handle theCString)")},
- {"SpriteMediaNewImage", (PyCFunction)Qt_SpriteMediaNewImage, 1,
- PyDoc_STR("(MediaHandler mh, Handle dataRef, OSType dataRefType, QTAtomID desiredID) -> (ComponentResult _rv)")},
- {"SpriteMediaDisposeImage", (PyCFunction)Qt_SpriteMediaDisposeImage, 1,
- PyDoc_STR("(MediaHandler mh, short imageIndex) -> (ComponentResult _rv)")},
- {"SpriteMediaImageIndexToID", (PyCFunction)Qt_SpriteMediaImageIndexToID, 1,
- PyDoc_STR("(MediaHandler mh, short imageIndex) -> (ComponentResult _rv, QTAtomID imageID)")},
- {"SpriteMediaImageIDToIndex", (PyCFunction)Qt_SpriteMediaImageIDToIndex, 1,
- PyDoc_STR("(MediaHandler mh, QTAtomID imageID) -> (ComponentResult _rv, short imageIndex)")},
- {"FlashMediaSetPan", (PyCFunction)Qt_FlashMediaSetPan, 1,
- PyDoc_STR("(MediaHandler mh, short xPercent, short yPercent) -> (ComponentResult _rv)")},
- {"FlashMediaSetZoom", (PyCFunction)Qt_FlashMediaSetZoom, 1,
- PyDoc_STR("(MediaHandler mh, short factor) -> (ComponentResult _rv)")},
- {"FlashMediaSetZoomRect", (PyCFunction)Qt_FlashMediaSetZoomRect, 1,
- PyDoc_STR("(MediaHandler mh, long left, long top, long right, long bottom) -> (ComponentResult _rv)")},
- {"FlashMediaGetRefConBounds", (PyCFunction)Qt_FlashMediaGetRefConBounds, 1,
- PyDoc_STR("(MediaHandler mh, long refCon) -> (ComponentResult _rv, long left, long top, long right, long bottom)")},
- {"FlashMediaGetRefConID", (PyCFunction)Qt_FlashMediaGetRefConID, 1,
- PyDoc_STR("(MediaHandler mh, long refCon) -> (ComponentResult _rv, long refConID)")},
- {"FlashMediaIDToRefCon", (PyCFunction)Qt_FlashMediaIDToRefCon, 1,
- PyDoc_STR("(MediaHandler mh, long refConID) -> (ComponentResult _rv, long refCon)")},
- {"FlashMediaGetDisplayedFrameNumber", (PyCFunction)Qt_FlashMediaGetDisplayedFrameNumber, 1,
- PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, long flashFrameNumber)")},
- {"FlashMediaFrameNumberToMovieTime", (PyCFunction)Qt_FlashMediaFrameNumberToMovieTime, 1,
- PyDoc_STR("(MediaHandler mh, long flashFrameNumber) -> (ComponentResult _rv, TimeValue movieTime)")},
- {"FlashMediaFrameLabelToMovieTime", (PyCFunction)Qt_FlashMediaFrameLabelToMovieTime, 1,
- PyDoc_STR("(MediaHandler mh, Ptr theLabel) -> (ComponentResult _rv, TimeValue movieTime)")},
- {"FlashMediaGetFlashVariable", (PyCFunction)Qt_FlashMediaGetFlashVariable, 1,
- PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, char path, char name, Handle theVariableCStringOut)")},
- {"FlashMediaSetFlashVariable", (PyCFunction)Qt_FlashMediaSetFlashVariable, 1,
- PyDoc_STR("(MediaHandler mh, Boolean updateFocus) -> (ComponentResult _rv, char path, char name, char value)")},
- {"FlashMediaDoButtonActions", (PyCFunction)Qt_FlashMediaDoButtonActions, 1,
- PyDoc_STR("(MediaHandler mh, long buttonID, long transition) -> (ComponentResult _rv, char path)")},
- {"FlashMediaGetSupportedSwfVersion", (PyCFunction)Qt_FlashMediaGetSupportedSwfVersion, 1,
- PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, UInt8 swfVersion)")},
- {"Media3DGetCurrentGroup", (PyCFunction)Qt_Media3DGetCurrentGroup, 1,
- PyDoc_STR("(MediaHandler mh, void * group) -> (ComponentResult _rv)")},
- {"Media3DTranslateNamedObjectTo", (PyCFunction)Qt_Media3DTranslateNamedObjectTo, 1,
- PyDoc_STR("(MediaHandler mh, Fixed x, Fixed y, Fixed z) -> (ComponentResult _rv, char objectName)")},
- {"Media3DScaleNamedObjectTo", (PyCFunction)Qt_Media3DScaleNamedObjectTo, 1,
- PyDoc_STR("(MediaHandler mh, Fixed xScale, Fixed yScale, Fixed zScale) -> (ComponentResult _rv, char objectName)")},
- {"Media3DRotateNamedObjectTo", (PyCFunction)Qt_Media3DRotateNamedObjectTo, 1,
- PyDoc_STR("(MediaHandler mh, Fixed xDegrees, Fixed yDegrees, Fixed zDegrees) -> (ComponentResult _rv, char objectName)")},
- {"Media3DSetCameraData", (PyCFunction)Qt_Media3DSetCameraData, 1,
- PyDoc_STR("(MediaHandler mh, void * cameraData) -> (ComponentResult _rv)")},
- {"Media3DGetCameraData", (PyCFunction)Qt_Media3DGetCameraData, 1,
- PyDoc_STR("(MediaHandler mh, void * cameraData) -> (ComponentResult _rv)")},
- {"Media3DSetCameraAngleAspect", (PyCFunction)Qt_Media3DSetCameraAngleAspect, 1,
- PyDoc_STR("(MediaHandler mh, QTFloatSingle fov, QTFloatSingle aspectRatioXToY) -> (ComponentResult _rv)")},
- {"Media3DGetCameraAngleAspect", (PyCFunction)Qt_Media3DGetCameraAngleAspect, 1,
- PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, QTFloatSingle fov, QTFloatSingle aspectRatioXToY)")},
- {"Media3DSetCameraRange", (PyCFunction)Qt_Media3DSetCameraRange, 1,
- PyDoc_STR("(MediaHandler mh, void * tQ3CameraRange) -> (ComponentResult _rv)")},
- {"Media3DGetCameraRange", (PyCFunction)Qt_Media3DGetCameraRange, 1,
- PyDoc_STR("(MediaHandler mh, void * tQ3CameraRange) -> (ComponentResult _rv)")},
- {"NewTimeBase", (PyCFunction)Qt_NewTimeBase, 1,
- PyDoc_STR("() -> (TimeBase _rv)")},
- {"ConvertTime", (PyCFunction)Qt_ConvertTime, 1,
- PyDoc_STR("(TimeRecord theTime, TimeBase newBase) -> (TimeRecord theTime)")},
- {"ConvertTimeScale", (PyCFunction)Qt_ConvertTimeScale, 1,
- PyDoc_STR("(TimeRecord theTime, TimeScale newScale) -> (TimeRecord theTime)")},
- {"AddTime", (PyCFunction)Qt_AddTime, 1,
- PyDoc_STR("(TimeRecord dst, TimeRecord src) -> (TimeRecord dst)")},
- {"SubtractTime", (PyCFunction)Qt_SubtractTime, 1,
- PyDoc_STR("(TimeRecord dst, TimeRecord src) -> (TimeRecord dst)")},
- {"MusicMediaGetIndexedTunePlayer", (PyCFunction)Qt_MusicMediaGetIndexedTunePlayer, 1,
- PyDoc_STR("(ComponentInstance ti, long sampleDescIndex) -> (ComponentResult _rv, ComponentInstance tp)")},
- {"CodecManagerVersion", (PyCFunction)Qt_CodecManagerVersion, 1,
- PyDoc_STR("() -> (long version)")},
- {"GetMaxCompressionSize", (PyCFunction)Qt_GetMaxCompressionSize, 1,
- PyDoc_STR("(PixMapHandle src, Rect srcRect, short colorDepth, CodecQ quality, CodecType cType, CompressorComponent codec) -> (long size)")},
- {"GetCompressionTime", (PyCFunction)Qt_GetCompressionTime, 1,
- PyDoc_STR("(PixMapHandle src, Rect srcRect, short colorDepth, CodecType cType, CompressorComponent codec) -> (CodecQ spatialQuality, CodecQ temporalQuality, unsigned long compressTime)")},
- {"CompressImage", (PyCFunction)Qt_CompressImage, 1,
- PyDoc_STR("(PixMapHandle src, Rect srcRect, CodecQ quality, CodecType cType, ImageDescriptionHandle desc, Ptr data) -> None")},
- {"DecompressImage", (PyCFunction)Qt_DecompressImage, 1,
- PyDoc_STR("(Ptr data, ImageDescriptionHandle desc, PixMapHandle dst, Rect srcRect, Rect dstRect, short mode, RgnHandle mask) -> None")},
- {"GetSimilarity", (PyCFunction)Qt_GetSimilarity, 1,
- PyDoc_STR("(PixMapHandle src, Rect srcRect, ImageDescriptionHandle desc, Ptr data) -> (Fixed similarity)")},
- {"GetImageDescriptionCTable", (PyCFunction)Qt_GetImageDescriptionCTable, 1,
- PyDoc_STR("(ImageDescriptionHandle desc) -> (CTabHandle ctable)")},
- {"SetImageDescriptionCTable", (PyCFunction)Qt_SetImageDescriptionCTable, 1,
- PyDoc_STR("(ImageDescriptionHandle desc, CTabHandle ctable) -> None")},
- {"GetImageDescriptionExtension", (PyCFunction)Qt_GetImageDescriptionExtension, 1,
- PyDoc_STR("(ImageDescriptionHandle desc, long idType, long index) -> (Handle extension)")},
- {"AddImageDescriptionExtension", (PyCFunction)Qt_AddImageDescriptionExtension, 1,
- PyDoc_STR("(ImageDescriptionHandle desc, Handle extension, long idType) -> None")},
- {"RemoveImageDescriptionExtension", (PyCFunction)Qt_RemoveImageDescriptionExtension, 1,
- PyDoc_STR("(ImageDescriptionHandle desc, long idType, long index) -> None")},
- {"CountImageDescriptionExtensionType", (PyCFunction)Qt_CountImageDescriptionExtensionType, 1,
- PyDoc_STR("(ImageDescriptionHandle desc, long idType) -> (long count)")},
- {"GetNextImageDescriptionExtensionType", (PyCFunction)Qt_GetNextImageDescriptionExtensionType, 1,
- PyDoc_STR("(ImageDescriptionHandle desc) -> (long idType)")},
- {"FindCodec", (PyCFunction)Qt_FindCodec, 1,
- PyDoc_STR("(CodecType cType, CodecComponent specCodec) -> (CompressorComponent compressor, DecompressorComponent decompressor)")},
- {"CompressPicture", (PyCFunction)Qt_CompressPicture, 1,
- PyDoc_STR("(PicHandle srcPicture, PicHandle dstPicture, CodecQ quality, CodecType cType) -> None")},
- {"CompressPictureFile", (PyCFunction)Qt_CompressPictureFile, 1,
- PyDoc_STR("(short srcRefNum, short dstRefNum, CodecQ quality, CodecType cType) -> None")},
- {"ConvertImage", (PyCFunction)Qt_ConvertImage, 1,
- PyDoc_STR("(ImageDescriptionHandle srcDD, Ptr srcData, short colorDepth, CTabHandle ctable, CodecQ accuracy, CodecQ quality, CodecType cType, CodecComponent codec, ImageDescriptionHandle dstDD, Ptr dstData) -> None")},
- {"AddFilePreview", (PyCFunction)Qt_AddFilePreview, 1,
- PyDoc_STR("(short resRefNum, OSType previewType, Handle previewData) -> None")},
- {"GetBestDeviceRect", (PyCFunction)Qt_GetBestDeviceRect, 1,
- PyDoc_STR("() -> (GDHandle gdh, Rect rp)")},
- {"GDHasScale", (PyCFunction)Qt_GDHasScale, 1,
- PyDoc_STR("(GDHandle gdh, short depth) -> (Fixed scale)")},
- {"GDGetScale", (PyCFunction)Qt_GDGetScale, 1,
- PyDoc_STR("(GDHandle gdh) -> (Fixed scale, short flags)")},
- {"GDSetScale", (PyCFunction)Qt_GDSetScale, 1,
- PyDoc_STR("(GDHandle gdh, Fixed scale, short flags) -> None")},
- {"GetGraphicsImporterForFile", (PyCFunction)Qt_GetGraphicsImporterForFile, 1,
- PyDoc_STR("(FSSpec theFile) -> (ComponentInstance gi)")},
- {"GetGraphicsImporterForDataRef", (PyCFunction)Qt_GetGraphicsImporterForDataRef, 1,
- PyDoc_STR("(Handle dataRef, OSType dataRefType) -> (ComponentInstance gi)")},
- {"GetGraphicsImporterForFileWithFlags", (PyCFunction)Qt_GetGraphicsImporterForFileWithFlags, 1,
- PyDoc_STR("(FSSpec theFile, long flags) -> (ComponentInstance gi)")},
- {"GetGraphicsImporterForDataRefWithFlags", (PyCFunction)Qt_GetGraphicsImporterForDataRefWithFlags, 1,
- PyDoc_STR("(Handle dataRef, OSType dataRefType, long flags) -> (ComponentInstance gi)")},
- {"MakeImageDescriptionForPixMap", (PyCFunction)Qt_MakeImageDescriptionForPixMap, 1,
- PyDoc_STR("(PixMapHandle pixmap) -> (ImageDescriptionHandle idh)")},
- {"MakeImageDescriptionForEffect", (PyCFunction)Qt_MakeImageDescriptionForEffect, 1,
- PyDoc_STR("(OSType effectType) -> (ImageDescriptionHandle idh)")},
- {"QTGetPixelSize", (PyCFunction)Qt_QTGetPixelSize, 1,
- PyDoc_STR("(OSType PixelFormat) -> (short _rv)")},
- {"QTGetPixelFormatDepthForImageDescription", (PyCFunction)Qt_QTGetPixelFormatDepthForImageDescription, 1,
- PyDoc_STR("(OSType PixelFormat) -> (short _rv)")},
- {"QTGetPixMapHandleRowBytes", (PyCFunction)Qt_QTGetPixMapHandleRowBytes, 1,
- PyDoc_STR("(PixMapHandle pm) -> (long _rv)")},
- {"QTSetPixMapHandleRowBytes", (PyCFunction)Qt_QTSetPixMapHandleRowBytes, 1,
- PyDoc_STR("(PixMapHandle pm, long rowBytes) -> None")},
- {"QTGetPixMapHandleGammaLevel", (PyCFunction)Qt_QTGetPixMapHandleGammaLevel, 1,
- PyDoc_STR("(PixMapHandle pm) -> (Fixed _rv)")},
- {"QTSetPixMapHandleGammaLevel", (PyCFunction)Qt_QTSetPixMapHandleGammaLevel, 1,
- PyDoc_STR("(PixMapHandle pm, Fixed gammaLevel) -> None")},
- {"QTGetPixMapHandleRequestedGammaLevel", (PyCFunction)Qt_QTGetPixMapHandleRequestedGammaLevel, 1,
- PyDoc_STR("(PixMapHandle pm) -> (Fixed _rv)")},
- {"QTSetPixMapHandleRequestedGammaLevel", (PyCFunction)Qt_QTSetPixMapHandleRequestedGammaLevel, 1,
- PyDoc_STR("(PixMapHandle pm, Fixed requestedGammaLevel) -> None")},
- {"CompAdd", (PyCFunction)Qt_CompAdd, 1,
- PyDoc_STR("() -> (wide src, wide dst)")},
- {"CompSub", (PyCFunction)Qt_CompSub, 1,
- PyDoc_STR("() -> (wide src, wide dst)")},
- {"CompNeg", (PyCFunction)Qt_CompNeg, 1,
- PyDoc_STR("() -> (wide dst)")},
- {"CompShift", (PyCFunction)Qt_CompShift, 1,
- PyDoc_STR("(short shift) -> (wide src)")},
- {"CompMul", (PyCFunction)Qt_CompMul, 1,
- PyDoc_STR("(long src1, long src2) -> (wide dst)")},
- {"CompDiv", (PyCFunction)Qt_CompDiv, 1,
- PyDoc_STR("(long denominator) -> (long _rv, wide numerator, long remainder)")},
- {"CompFixMul", (PyCFunction)Qt_CompFixMul, 1,
- PyDoc_STR("(Fixed fixSrc) -> (wide compSrc, wide compDst)")},
- {"CompMulDiv", (PyCFunction)Qt_CompMulDiv, 1,
- PyDoc_STR("(long mul, long divisor) -> (wide co)")},
- {"CompMulDivTrunc", (PyCFunction)Qt_CompMulDivTrunc, 1,
- PyDoc_STR("(long mul, long divisor) -> (wide co, long remainder)")},
- {"CompCompare", (PyCFunction)Qt_CompCompare, 1,
- PyDoc_STR("(wide a, wide minusb) -> (long _rv)")},
- {"CompSquareRoot", (PyCFunction)Qt_CompSquareRoot, 1,
- PyDoc_STR("(wide src) -> (unsigned long _rv)")},
- {"FixMulDiv", (PyCFunction)Qt_FixMulDiv, 1,
- PyDoc_STR("(Fixed src, Fixed mul, Fixed divisor) -> (Fixed _rv)")},
- {"UnsignedFixMulDiv", (PyCFunction)Qt_UnsignedFixMulDiv, 1,
- PyDoc_STR("(Fixed src, Fixed mul, Fixed divisor) -> (Fixed _rv)")},
- {"FixExp2", (PyCFunction)Qt_FixExp2, 1,
- PyDoc_STR("(Fixed src) -> (Fixed _rv)")},
- {"FixLog2", (PyCFunction)Qt_FixLog2, 1,
- PyDoc_STR("(Fixed src) -> (Fixed _rv)")},
- {"FixPow", (PyCFunction)Qt_FixPow, 1,
- PyDoc_STR("(Fixed base, Fixed exp) -> (Fixed _rv)")},
- {"GraphicsImportSetDataReference", (PyCFunction)Qt_GraphicsImportSetDataReference, 1,
- PyDoc_STR("(GraphicsImportComponent ci, Handle dataRef, OSType dataReType) -> (ComponentResult _rv)")},
- {"GraphicsImportGetDataReference", (PyCFunction)Qt_GraphicsImportGetDataReference, 1,
- PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, Handle dataRef, OSType dataReType)")},
- {"GraphicsImportSetDataFile", (PyCFunction)Qt_GraphicsImportSetDataFile, 1,
- PyDoc_STR("(GraphicsImportComponent ci, FSSpec theFile) -> (ComponentResult _rv)")},
- {"GraphicsImportGetDataFile", (PyCFunction)Qt_GraphicsImportGetDataFile, 1,
- PyDoc_STR("(GraphicsImportComponent ci, FSSpec theFile) -> (ComponentResult _rv)")},
- {"GraphicsImportSetDataHandle", (PyCFunction)Qt_GraphicsImportSetDataHandle, 1,
- PyDoc_STR("(GraphicsImportComponent ci, Handle h) -> (ComponentResult _rv)")},
- {"GraphicsImportGetDataHandle", (PyCFunction)Qt_GraphicsImportGetDataHandle, 1,
- PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, Handle h)")},
- {"GraphicsImportGetImageDescription", (PyCFunction)Qt_GraphicsImportGetImageDescription, 1,
- PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, ImageDescriptionHandle desc)")},
- {"GraphicsImportGetDataOffsetAndSize", (PyCFunction)Qt_GraphicsImportGetDataOffsetAndSize, 1,
- PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, unsigned long offset, unsigned long size)")},
- {"GraphicsImportReadData", (PyCFunction)Qt_GraphicsImportReadData, 1,
- PyDoc_STR("(GraphicsImportComponent ci, void * dataPtr, unsigned long dataOffset, unsigned long dataSize) -> (ComponentResult _rv)")},
- {"GraphicsImportSetClip", (PyCFunction)Qt_GraphicsImportSetClip, 1,
- PyDoc_STR("(GraphicsImportComponent ci, RgnHandle clipRgn) -> (ComponentResult _rv)")},
- {"GraphicsImportGetClip", (PyCFunction)Qt_GraphicsImportGetClip, 1,
- PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, RgnHandle clipRgn)")},
- {"GraphicsImportSetSourceRect", (PyCFunction)Qt_GraphicsImportSetSourceRect, 1,
- PyDoc_STR("(GraphicsImportComponent ci, Rect sourceRect) -> (ComponentResult _rv)")},
- {"GraphicsImportGetSourceRect", (PyCFunction)Qt_GraphicsImportGetSourceRect, 1,
- PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, Rect sourceRect)")},
- {"GraphicsImportGetNaturalBounds", (PyCFunction)Qt_GraphicsImportGetNaturalBounds, 1,
- PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, Rect naturalBounds)")},
- {"GraphicsImportDraw", (PyCFunction)Qt_GraphicsImportDraw, 1,
- PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv)")},
- {"GraphicsImportSetGWorld", (PyCFunction)Qt_GraphicsImportSetGWorld, 1,
- PyDoc_STR("(GraphicsImportComponent ci, CGrafPtr port, GDHandle gd) -> (ComponentResult _rv)")},
- {"GraphicsImportGetGWorld", (PyCFunction)Qt_GraphicsImportGetGWorld, 1,
- PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, CGrafPtr port, GDHandle gd)")},
- {"GraphicsImportSetBoundsRect", (PyCFunction)Qt_GraphicsImportSetBoundsRect, 1,
- PyDoc_STR("(GraphicsImportComponent ci, Rect bounds) -> (ComponentResult _rv)")},
- {"GraphicsImportGetBoundsRect", (PyCFunction)Qt_GraphicsImportGetBoundsRect, 1,
- PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, Rect bounds)")},
- {"GraphicsImportSaveAsPicture", (PyCFunction)Qt_GraphicsImportSaveAsPicture, 1,
- PyDoc_STR("(GraphicsImportComponent ci, FSSpec fss, ScriptCode scriptTag) -> (ComponentResult _rv)")},
- {"GraphicsImportSetGraphicsMode", (PyCFunction)Qt_GraphicsImportSetGraphicsMode, 1,
- PyDoc_STR("(GraphicsImportComponent ci, long graphicsMode, RGBColor opColor) -> (ComponentResult _rv)")},
- {"GraphicsImportGetGraphicsMode", (PyCFunction)Qt_GraphicsImportGetGraphicsMode, 1,
- PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, long graphicsMode, RGBColor opColor)")},
- {"GraphicsImportSetQuality", (PyCFunction)Qt_GraphicsImportSetQuality, 1,
- PyDoc_STR("(GraphicsImportComponent ci, CodecQ quality) -> (ComponentResult _rv)")},
- {"GraphicsImportGetQuality", (PyCFunction)Qt_GraphicsImportGetQuality, 1,
- PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, CodecQ quality)")},
- {"GraphicsImportSaveAsQuickTimeImageFile", (PyCFunction)Qt_GraphicsImportSaveAsQuickTimeImageFile, 1,
- PyDoc_STR("(GraphicsImportComponent ci, FSSpec fss, ScriptCode scriptTag) -> (ComponentResult _rv)")},
- {"GraphicsImportSetDataReferenceOffsetAndLimit", (PyCFunction)Qt_GraphicsImportSetDataReferenceOffsetAndLimit, 1,
- PyDoc_STR("(GraphicsImportComponent ci, unsigned long offset, unsigned long limit) -> (ComponentResult _rv)")},
- {"GraphicsImportGetDataReferenceOffsetAndLimit", (PyCFunction)Qt_GraphicsImportGetDataReferenceOffsetAndLimit, 1,
- PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, unsigned long offset, unsigned long limit)")},
- {"GraphicsImportGetAliasedDataReference", (PyCFunction)Qt_GraphicsImportGetAliasedDataReference, 1,
- PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, Handle dataRef, OSType dataRefType)")},
- {"GraphicsImportValidate", (PyCFunction)Qt_GraphicsImportValidate, 1,
- PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, Boolean valid)")},
- {"GraphicsImportGetMetaData", (PyCFunction)Qt_GraphicsImportGetMetaData, 1,
- PyDoc_STR("(GraphicsImportComponent ci, void * userData) -> (ComponentResult _rv)")},
- {"GraphicsImportGetMIMETypeList", (PyCFunction)Qt_GraphicsImportGetMIMETypeList, 1,
- PyDoc_STR("(GraphicsImportComponent ci, void * qtAtomContainerPtr) -> (ComponentResult _rv)")},
- {"GraphicsImportDoesDrawAllPixels", (PyCFunction)Qt_GraphicsImportDoesDrawAllPixels, 1,
- PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, short drawsAllPixels)")},
- {"GraphicsImportGetAsPicture", (PyCFunction)Qt_GraphicsImportGetAsPicture, 1,
- PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, PicHandle picture)")},
- {"GraphicsImportExportImageFile", (PyCFunction)Qt_GraphicsImportExportImageFile, 1,
- PyDoc_STR("(GraphicsImportComponent ci, OSType fileType, OSType fileCreator, FSSpec fss, ScriptCode scriptTag) -> (ComponentResult _rv)")},
- {"GraphicsImportGetExportImageTypeList", (PyCFunction)Qt_GraphicsImportGetExportImageTypeList, 1,
- PyDoc_STR("(GraphicsImportComponent ci, void * qtAtomContainerPtr) -> (ComponentResult _rv)")},
- {"GraphicsImportGetExportSettingsAsAtomContainer", (PyCFunction)Qt_GraphicsImportGetExportSettingsAsAtomContainer, 1,
- PyDoc_STR("(GraphicsImportComponent ci, void * qtAtomContainerPtr) -> (ComponentResult _rv)")},
- {"GraphicsImportSetExportSettingsFromAtomContainer", (PyCFunction)Qt_GraphicsImportSetExportSettingsFromAtomContainer, 1,
- PyDoc_STR("(GraphicsImportComponent ci, void * qtAtomContainer) -> (ComponentResult _rv)")},
- {"GraphicsImportGetImageCount", (PyCFunction)Qt_GraphicsImportGetImageCount, 1,
- PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, unsigned long imageCount)")},
- {"GraphicsImportSetImageIndex", (PyCFunction)Qt_GraphicsImportSetImageIndex, 1,
- PyDoc_STR("(GraphicsImportComponent ci, unsigned long imageIndex) -> (ComponentResult _rv)")},
- {"GraphicsImportGetImageIndex", (PyCFunction)Qt_GraphicsImportGetImageIndex, 1,
- PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, unsigned long imageIndex)")},
- {"GraphicsImportGetDataOffsetAndSize64", (PyCFunction)Qt_GraphicsImportGetDataOffsetAndSize64, 1,
- PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, wide offset, wide size)")},
- {"GraphicsImportReadData64", (PyCFunction)Qt_GraphicsImportReadData64, 1,
- PyDoc_STR("(GraphicsImportComponent ci, void * dataPtr, wide dataOffset, unsigned long dataSize) -> (ComponentResult _rv)")},
- {"GraphicsImportSetDataReferenceOffsetAndLimit64", (PyCFunction)Qt_GraphicsImportSetDataReferenceOffsetAndLimit64, 1,
- PyDoc_STR("(GraphicsImportComponent ci, wide offset, wide limit) -> (ComponentResult _rv)")},
- {"GraphicsImportGetDataReferenceOffsetAndLimit64", (PyCFunction)Qt_GraphicsImportGetDataReferenceOffsetAndLimit64, 1,
- PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, wide offset, wide limit)")},
- {"GraphicsImportGetDefaultClip", (PyCFunction)Qt_GraphicsImportGetDefaultClip, 1,
- PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, RgnHandle defaultRgn)")},
- {"GraphicsImportGetDefaultGraphicsMode", (PyCFunction)Qt_GraphicsImportGetDefaultGraphicsMode, 1,
- PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, long defaultGraphicsMode, RGBColor defaultOpColor)")},
- {"GraphicsImportGetDefaultSourceRect", (PyCFunction)Qt_GraphicsImportGetDefaultSourceRect, 1,
- PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, Rect defaultSourceRect)")},
- {"GraphicsImportGetColorSyncProfile", (PyCFunction)Qt_GraphicsImportGetColorSyncProfile, 1,
- PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, Handle profile)")},
- {"GraphicsImportSetDestRect", (PyCFunction)Qt_GraphicsImportSetDestRect, 1,
- PyDoc_STR("(GraphicsImportComponent ci, Rect destRect) -> (ComponentResult _rv)")},
- {"GraphicsImportGetDestRect", (PyCFunction)Qt_GraphicsImportGetDestRect, 1,
- PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, Rect destRect)")},
- {"GraphicsImportSetFlags", (PyCFunction)Qt_GraphicsImportSetFlags, 1,
- PyDoc_STR("(GraphicsImportComponent ci, long flags) -> (ComponentResult _rv)")},
- {"GraphicsImportGetFlags", (PyCFunction)Qt_GraphicsImportGetFlags, 1,
- PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, long flags)")},
- {"GraphicsImportGetBaseDataOffsetAndSize64", (PyCFunction)Qt_GraphicsImportGetBaseDataOffsetAndSize64, 1,
- PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, wide offset, wide size)")},
- {"GraphicsImportSetImageIndexToThumbnail", (PyCFunction)Qt_GraphicsImportSetImageIndexToThumbnail, 1,
- PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv)")},
- {"GraphicsExportDoExport", (PyCFunction)Qt_GraphicsExportDoExport, 1,
- PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, unsigned long actualSizeWritten)")},
- {"GraphicsExportCanTranscode", (PyCFunction)Qt_GraphicsExportCanTranscode, 1,
- PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, Boolean canTranscode)")},
- {"GraphicsExportDoTranscode", (PyCFunction)Qt_GraphicsExportDoTranscode, 1,
- PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv)")},
- {"GraphicsExportCanUseCompressor", (PyCFunction)Qt_GraphicsExportCanUseCompressor, 1,
- PyDoc_STR("(GraphicsExportComponent ci, void * codecSettingsAtomContainerPtr) -> (ComponentResult _rv, Boolean canUseCompressor)")},
- {"GraphicsExportDoUseCompressor", (PyCFunction)Qt_GraphicsExportDoUseCompressor, 1,
- PyDoc_STR("(GraphicsExportComponent ci, void * codecSettingsAtomContainer) -> (ComponentResult _rv, ImageDescriptionHandle outDesc)")},
- {"GraphicsExportDoStandaloneExport", (PyCFunction)Qt_GraphicsExportDoStandaloneExport, 1,
- PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv)")},
- {"GraphicsExportGetDefaultFileTypeAndCreator", (PyCFunction)Qt_GraphicsExportGetDefaultFileTypeAndCreator, 1,
- PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, OSType fileType, OSType fileCreator)")},
- {"GraphicsExportGetDefaultFileNameExtension", (PyCFunction)Qt_GraphicsExportGetDefaultFileNameExtension, 1,
- PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, OSType fileNameExtension)")},
- {"GraphicsExportGetMIMETypeList", (PyCFunction)Qt_GraphicsExportGetMIMETypeList, 1,
- PyDoc_STR("(GraphicsExportComponent ci, void * qtAtomContainerPtr) -> (ComponentResult _rv)")},
- {"GraphicsExportSetSettingsFromAtomContainer", (PyCFunction)Qt_GraphicsExportSetSettingsFromAtomContainer, 1,
- PyDoc_STR("(GraphicsExportComponent ci, void * qtAtomContainer) -> (ComponentResult _rv)")},
- {"GraphicsExportGetSettingsAsAtomContainer", (PyCFunction)Qt_GraphicsExportGetSettingsAsAtomContainer, 1,
- PyDoc_STR("(GraphicsExportComponent ci, void * qtAtomContainerPtr) -> (ComponentResult _rv)")},
- {"GraphicsExportGetSettingsAsText", (PyCFunction)Qt_GraphicsExportGetSettingsAsText, 1,
- PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, Handle theText)")},
- {"GraphicsExportSetDontRecompress", (PyCFunction)Qt_GraphicsExportSetDontRecompress, 1,
- PyDoc_STR("(GraphicsExportComponent ci, Boolean dontRecompress) -> (ComponentResult _rv)")},
- {"GraphicsExportGetDontRecompress", (PyCFunction)Qt_GraphicsExportGetDontRecompress, 1,
- PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, Boolean dontRecompress)")},
- {"GraphicsExportSetInterlaceStyle", (PyCFunction)Qt_GraphicsExportSetInterlaceStyle, 1,
- PyDoc_STR("(GraphicsExportComponent ci, unsigned long interlaceStyle) -> (ComponentResult _rv)")},
- {"GraphicsExportGetInterlaceStyle", (PyCFunction)Qt_GraphicsExportGetInterlaceStyle, 1,
- PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, unsigned long interlaceStyle)")},
- {"GraphicsExportSetMetaData", (PyCFunction)Qt_GraphicsExportSetMetaData, 1,
- PyDoc_STR("(GraphicsExportComponent ci, void * userData) -> (ComponentResult _rv)")},
- {"GraphicsExportGetMetaData", (PyCFunction)Qt_GraphicsExportGetMetaData, 1,
- PyDoc_STR("(GraphicsExportComponent ci, void * userData) -> (ComponentResult _rv)")},
- {"GraphicsExportSetTargetDataSize", (PyCFunction)Qt_GraphicsExportSetTargetDataSize, 1,
- PyDoc_STR("(GraphicsExportComponent ci, unsigned long targetDataSize) -> (ComponentResult _rv)")},
- {"GraphicsExportGetTargetDataSize", (PyCFunction)Qt_GraphicsExportGetTargetDataSize, 1,
- PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, unsigned long targetDataSize)")},
- {"GraphicsExportSetCompressionMethod", (PyCFunction)Qt_GraphicsExportSetCompressionMethod, 1,
- PyDoc_STR("(GraphicsExportComponent ci, long compressionMethod) -> (ComponentResult _rv)")},
- {"GraphicsExportGetCompressionMethod", (PyCFunction)Qt_GraphicsExportGetCompressionMethod, 1,
- PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, long compressionMethod)")},
- {"GraphicsExportSetCompressionQuality", (PyCFunction)Qt_GraphicsExportSetCompressionQuality, 1,
- PyDoc_STR("(GraphicsExportComponent ci, CodecQ spatialQuality) -> (ComponentResult _rv)")},
- {"GraphicsExportGetCompressionQuality", (PyCFunction)Qt_GraphicsExportGetCompressionQuality, 1,
- PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, CodecQ spatialQuality)")},
- {"GraphicsExportSetResolution", (PyCFunction)Qt_GraphicsExportSetResolution, 1,
- PyDoc_STR("(GraphicsExportComponent ci, Fixed horizontalResolution, Fixed verticalResolution) -> (ComponentResult _rv)")},
- {"GraphicsExportGetResolution", (PyCFunction)Qt_GraphicsExportGetResolution, 1,
- PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, Fixed horizontalResolution, Fixed verticalResolution)")},
- {"GraphicsExportSetDepth", (PyCFunction)Qt_GraphicsExportSetDepth, 1,
- PyDoc_STR("(GraphicsExportComponent ci, long depth) -> (ComponentResult _rv)")},
- {"GraphicsExportGetDepth", (PyCFunction)Qt_GraphicsExportGetDepth, 1,
- PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, long depth)")},
- {"GraphicsExportSetColorSyncProfile", (PyCFunction)Qt_GraphicsExportSetColorSyncProfile, 1,
- PyDoc_STR("(GraphicsExportComponent ci, Handle colorSyncProfile) -> (ComponentResult _rv)")},
- {"GraphicsExportGetColorSyncProfile", (PyCFunction)Qt_GraphicsExportGetColorSyncProfile, 1,
- PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, Handle colorSyncProfile)")},
- {"GraphicsExportSetInputDataReference", (PyCFunction)Qt_GraphicsExportSetInputDataReference, 1,
- PyDoc_STR("(GraphicsExportComponent ci, Handle dataRef, OSType dataRefType, ImageDescriptionHandle desc) -> (ComponentResult _rv)")},
- {"GraphicsExportGetInputDataReference", (PyCFunction)Qt_GraphicsExportGetInputDataReference, 1,
- PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, Handle dataRef, OSType dataRefType)")},
- {"GraphicsExportSetInputFile", (PyCFunction)Qt_GraphicsExportSetInputFile, 1,
- PyDoc_STR("(GraphicsExportComponent ci, FSSpec theFile, ImageDescriptionHandle desc) -> (ComponentResult _rv)")},
- {"GraphicsExportGetInputFile", (PyCFunction)Qt_GraphicsExportGetInputFile, 1,
- PyDoc_STR("(GraphicsExportComponent ci, FSSpec theFile) -> (ComponentResult _rv)")},
- {"GraphicsExportSetInputHandle", (PyCFunction)Qt_GraphicsExportSetInputHandle, 1,
- PyDoc_STR("(GraphicsExportComponent ci, Handle h, ImageDescriptionHandle desc) -> (ComponentResult _rv)")},
- {"GraphicsExportGetInputHandle", (PyCFunction)Qt_GraphicsExportGetInputHandle, 1,
- PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, Handle h)")},
- {"GraphicsExportSetInputPtr", (PyCFunction)Qt_GraphicsExportSetInputPtr, 1,
- PyDoc_STR("(GraphicsExportComponent ci, Ptr p, unsigned long size, ImageDescriptionHandle desc) -> (ComponentResult _rv)")},
- {"GraphicsExportSetInputGraphicsImporter", (PyCFunction)Qt_GraphicsExportSetInputGraphicsImporter, 1,
- PyDoc_STR("(GraphicsExportComponent ci, GraphicsImportComponent grip) -> (ComponentResult _rv)")},
- {"GraphicsExportGetInputGraphicsImporter", (PyCFunction)Qt_GraphicsExportGetInputGraphicsImporter, 1,
- PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, GraphicsImportComponent grip)")},
- {"GraphicsExportSetInputPicture", (PyCFunction)Qt_GraphicsExportSetInputPicture, 1,
- PyDoc_STR("(GraphicsExportComponent ci, PicHandle picture) -> (ComponentResult _rv)")},
- {"GraphicsExportGetInputPicture", (PyCFunction)Qt_GraphicsExportGetInputPicture, 1,
- PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, PicHandle picture)")},
- {"GraphicsExportSetInputGWorld", (PyCFunction)Qt_GraphicsExportSetInputGWorld, 1,
- PyDoc_STR("(GraphicsExportComponent ci, GWorldPtr gworld) -> (ComponentResult _rv)")},
- {"GraphicsExportGetInputGWorld", (PyCFunction)Qt_GraphicsExportGetInputGWorld, 1,
- PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, GWorldPtr gworld)")},
- {"GraphicsExportSetInputPixmap", (PyCFunction)Qt_GraphicsExportSetInputPixmap, 1,
- PyDoc_STR("(GraphicsExportComponent ci, PixMapHandle pixmap) -> (ComponentResult _rv)")},
- {"GraphicsExportGetInputPixmap", (PyCFunction)Qt_GraphicsExportGetInputPixmap, 1,
- PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, PixMapHandle pixmap)")},
- {"GraphicsExportSetInputOffsetAndLimit", (PyCFunction)Qt_GraphicsExportSetInputOffsetAndLimit, 1,
- PyDoc_STR("(GraphicsExportComponent ci, unsigned long offset, unsigned long limit) -> (ComponentResult _rv)")},
- {"GraphicsExportGetInputOffsetAndLimit", (PyCFunction)Qt_GraphicsExportGetInputOffsetAndLimit, 1,
- PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, unsigned long offset, unsigned long limit)")},
- {"GraphicsExportMayExporterReadInputData", (PyCFunction)Qt_GraphicsExportMayExporterReadInputData, 1,
- PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, Boolean mayReadInputData)")},
- {"GraphicsExportGetInputDataSize", (PyCFunction)Qt_GraphicsExportGetInputDataSize, 1,
- PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, unsigned long size)")},
- {"GraphicsExportReadInputData", (PyCFunction)Qt_GraphicsExportReadInputData, 1,
- PyDoc_STR("(GraphicsExportComponent ci, void * dataPtr, unsigned long dataOffset, unsigned long dataSize) -> (ComponentResult _rv)")},
- {"GraphicsExportGetInputImageDescription", (PyCFunction)Qt_GraphicsExportGetInputImageDescription, 1,
- PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, ImageDescriptionHandle desc)")},
- {"GraphicsExportGetInputImageDimensions", (PyCFunction)Qt_GraphicsExportGetInputImageDimensions, 1,
- PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, Rect dimensions)")},
- {"GraphicsExportGetInputImageDepth", (PyCFunction)Qt_GraphicsExportGetInputImageDepth, 1,
- PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, long inputDepth)")},
- {"GraphicsExportDrawInputImage", (PyCFunction)Qt_GraphicsExportDrawInputImage, 1,
- PyDoc_STR("(GraphicsExportComponent ci, CGrafPtr gw, GDHandle gd, Rect srcRect, Rect dstRect) -> (ComponentResult _rv)")},
- {"GraphicsExportSetOutputDataReference", (PyCFunction)Qt_GraphicsExportSetOutputDataReference, 1,
- PyDoc_STR("(GraphicsExportComponent ci, Handle dataRef, OSType dataRefType) -> (ComponentResult _rv)")},
- {"GraphicsExportGetOutputDataReference", (PyCFunction)Qt_GraphicsExportGetOutputDataReference, 1,
- PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, Handle dataRef, OSType dataRefType)")},
- {"GraphicsExportSetOutputFile", (PyCFunction)Qt_GraphicsExportSetOutputFile, 1,
- PyDoc_STR("(GraphicsExportComponent ci, FSSpec theFile) -> (ComponentResult _rv)")},
- {"GraphicsExportGetOutputFile", (PyCFunction)Qt_GraphicsExportGetOutputFile, 1,
- PyDoc_STR("(GraphicsExportComponent ci, FSSpec theFile) -> (ComponentResult _rv)")},
- {"GraphicsExportSetOutputHandle", (PyCFunction)Qt_GraphicsExportSetOutputHandle, 1,
- PyDoc_STR("(GraphicsExportComponent ci, Handle h) -> (ComponentResult _rv)")},
- {"GraphicsExportGetOutputHandle", (PyCFunction)Qt_GraphicsExportGetOutputHandle, 1,
- PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, Handle h)")},
- {"GraphicsExportSetOutputOffsetAndMaxSize", (PyCFunction)Qt_GraphicsExportSetOutputOffsetAndMaxSize, 1,
- PyDoc_STR("(GraphicsExportComponent ci, unsigned long offset, unsigned long maxSize, Boolean truncateFile) -> (ComponentResult _rv)")},
- {"GraphicsExportGetOutputOffsetAndMaxSize", (PyCFunction)Qt_GraphicsExportGetOutputOffsetAndMaxSize, 1,
- PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, unsigned long offset, unsigned long maxSize, Boolean truncateFile)")},
- {"GraphicsExportSetOutputFileTypeAndCreator", (PyCFunction)Qt_GraphicsExportSetOutputFileTypeAndCreator, 1,
- PyDoc_STR("(GraphicsExportComponent ci, OSType fileType, OSType fileCreator) -> (ComponentResult _rv)")},
- {"GraphicsExportGetOutputFileTypeAndCreator", (PyCFunction)Qt_GraphicsExportGetOutputFileTypeAndCreator, 1,
- PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, OSType fileType, OSType fileCreator)")},
- {"GraphicsExportSetOutputMark", (PyCFunction)Qt_GraphicsExportSetOutputMark, 1,
- PyDoc_STR("(GraphicsExportComponent ci, unsigned long mark) -> (ComponentResult _rv)")},
- {"GraphicsExportGetOutputMark", (PyCFunction)Qt_GraphicsExportGetOutputMark, 1,
- PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, unsigned long mark)")},
- {"GraphicsExportReadOutputData", (PyCFunction)Qt_GraphicsExportReadOutputData, 1,
- PyDoc_STR("(GraphicsExportComponent ci, void * dataPtr, unsigned long dataOffset, unsigned long dataSize) -> (ComponentResult _rv)")},
- {"GraphicsExportSetThumbnailEnabled", (PyCFunction)Qt_GraphicsExportSetThumbnailEnabled, 1,
- PyDoc_STR("(GraphicsExportComponent ci, Boolean enableThumbnail, long maxThumbnailWidth, long maxThumbnailHeight) -> (ComponentResult _rv)")},
- {"GraphicsExportGetThumbnailEnabled", (PyCFunction)Qt_GraphicsExportGetThumbnailEnabled, 1,
- PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, Boolean thumbnailEnabled, long maxThumbnailWidth, long maxThumbnailHeight)")},
- {"GraphicsExportSetExifEnabled", (PyCFunction)Qt_GraphicsExportSetExifEnabled, 1,
- PyDoc_STR("(GraphicsExportComponent ci, Boolean enableExif) -> (ComponentResult _rv)")},
- {"GraphicsExportGetExifEnabled", (PyCFunction)Qt_GraphicsExportGetExifEnabled, 1,
- PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, Boolean exifEnabled)")},
- {"ImageTranscoderBeginSequence", (PyCFunction)Qt_ImageTranscoderBeginSequence, 1,
- PyDoc_STR("(ImageTranscoderComponent itc, ImageDescriptionHandle srcDesc, void * data, long dataSize) -> (ComponentResult _rv, ImageDescriptionHandle dstDesc)")},
- {"ImageTranscoderDisposeData", (PyCFunction)Qt_ImageTranscoderDisposeData, 1,
- PyDoc_STR("(ImageTranscoderComponent itc, void * dstData) -> (ComponentResult _rv)")},
- {"ImageTranscoderEndSequence", (PyCFunction)Qt_ImageTranscoderEndSequence, 1,
- PyDoc_STR("(ImageTranscoderComponent itc) -> (ComponentResult _rv)")},
- {"ClockGetTime", (PyCFunction)Qt_ClockGetTime, 1,
- PyDoc_STR("(ComponentInstance aClock) -> (ComponentResult _rv, TimeRecord out)")},
- {"ClockSetTimeBase", (PyCFunction)Qt_ClockSetTimeBase, 1,
- PyDoc_STR("(ComponentInstance aClock, TimeBase tb) -> (ComponentResult _rv)")},
- {"ClockGetRate", (PyCFunction)Qt_ClockGetRate, 1,
- PyDoc_STR("(ComponentInstance aClock) -> (ComponentResult _rv, Fixed rate)")},
- {"SCPositionRect", (PyCFunction)Qt_SCPositionRect, 1,
- PyDoc_STR("(ComponentInstance ci) -> (ComponentResult _rv, Rect rp, Point where)")},
- {"SCPositionDialog", (PyCFunction)Qt_SCPositionDialog, 1,
- PyDoc_STR("(ComponentInstance ci, short id) -> (ComponentResult _rv, Point where)")},
- {"SCSetTestImagePictHandle", (PyCFunction)Qt_SCSetTestImagePictHandle, 1,
- PyDoc_STR("(ComponentInstance ci, PicHandle testPict, short testFlags) -> (ComponentResult _rv, Rect testRect)")},
- {"SCSetTestImagePictFile", (PyCFunction)Qt_SCSetTestImagePictFile, 1,
- PyDoc_STR("(ComponentInstance ci, short testFileRef, short testFlags) -> (ComponentResult _rv, Rect testRect)")},
- {"SCSetTestImagePixMap", (PyCFunction)Qt_SCSetTestImagePixMap, 1,
- PyDoc_STR("(ComponentInstance ci, PixMapHandle testPixMap, short testFlags) -> (ComponentResult _rv, Rect testRect)")},
- {"SCGetBestDeviceRect", (PyCFunction)Qt_SCGetBestDeviceRect, 1,
- PyDoc_STR("(ComponentInstance ci) -> (ComponentResult _rv, Rect r)")},
- {"SCRequestImageSettings", (PyCFunction)Qt_SCRequestImageSettings, 1,
- PyDoc_STR("(ComponentInstance ci) -> (ComponentResult _rv)")},
- {"SCCompressImage", (PyCFunction)Qt_SCCompressImage, 1,
- PyDoc_STR("(ComponentInstance ci, PixMapHandle src, Rect srcRect) -> (ComponentResult _rv, ImageDescriptionHandle desc, Handle data)")},
- {"SCCompressPicture", (PyCFunction)Qt_SCCompressPicture, 1,
- PyDoc_STR("(ComponentInstance ci, PicHandle srcPicture, PicHandle dstPicture) -> (ComponentResult _rv)")},
- {"SCCompressPictureFile", (PyCFunction)Qt_SCCompressPictureFile, 1,
- PyDoc_STR("(ComponentInstance ci, short srcRefNum, short dstRefNum) -> (ComponentResult _rv)")},
- {"SCRequestSequenceSettings", (PyCFunction)Qt_SCRequestSequenceSettings, 1,
- PyDoc_STR("(ComponentInstance ci) -> (ComponentResult _rv)")},
- {"SCCompressSequenceBegin", (PyCFunction)Qt_SCCompressSequenceBegin, 1,
- PyDoc_STR("(ComponentInstance ci, PixMapHandle src, Rect srcRect) -> (ComponentResult _rv, ImageDescriptionHandle desc)")},
- {"SCCompressSequenceFrame", (PyCFunction)Qt_SCCompressSequenceFrame, 1,
- PyDoc_STR("(ComponentInstance ci, PixMapHandle src, Rect srcRect) -> (ComponentResult _rv, Handle data, long dataSize, short notSyncFlag)")},
- {"SCCompressSequenceEnd", (PyCFunction)Qt_SCCompressSequenceEnd, 1,
- PyDoc_STR("(ComponentInstance ci) -> (ComponentResult _rv)")},
- {"SCDefaultPictHandleSettings", (PyCFunction)Qt_SCDefaultPictHandleSettings, 1,
- PyDoc_STR("(ComponentInstance ci, PicHandle srcPicture, short motion) -> (ComponentResult _rv)")},
- {"SCDefaultPictFileSettings", (PyCFunction)Qt_SCDefaultPictFileSettings, 1,
- PyDoc_STR("(ComponentInstance ci, short srcRef, short motion) -> (ComponentResult _rv)")},
- {"SCDefaultPixMapSettings", (PyCFunction)Qt_SCDefaultPixMapSettings, 1,
- PyDoc_STR("(ComponentInstance ci, PixMapHandle src, short motion) -> (ComponentResult _rv)")},
- {"SCGetInfo", (PyCFunction)Qt_SCGetInfo, 1,
- PyDoc_STR("(ComponentInstance ci, OSType infoType, void * info) -> (ComponentResult _rv)")},
- {"SCSetInfo", (PyCFunction)Qt_SCSetInfo, 1,
- PyDoc_STR("(ComponentInstance ci, OSType infoType, void * info) -> (ComponentResult _rv)")},
- {"SCSetCompressFlags", (PyCFunction)Qt_SCSetCompressFlags, 1,
- PyDoc_STR("(ComponentInstance ci, long flags) -> (ComponentResult _rv)")},
- {"SCGetCompressFlags", (PyCFunction)Qt_SCGetCompressFlags, 1,
- PyDoc_STR("(ComponentInstance ci) -> (ComponentResult _rv, long flags)")},
- {"SCGetSettingsAsText", (PyCFunction)Qt_SCGetSettingsAsText, 1,
- PyDoc_STR("(ComponentInstance ci) -> (ComponentResult _rv, Handle text)")},
- {"SCAsyncIdle", (PyCFunction)Qt_SCAsyncIdle, 1,
- PyDoc_STR("(ComponentInstance ci) -> (ComponentResult _rv)")},
- {"TweenerReset", (PyCFunction)Qt_TweenerReset, 1,
- PyDoc_STR("(TweenerComponent tc) -> (ComponentResult _rv)")},
- {"TCGetSourceRef", (PyCFunction)Qt_TCGetSourceRef, 1,
- PyDoc_STR("(MediaHandler mh, TimeCodeDescriptionHandle tcdH) -> (HandlerError _rv, UserData srefH)")},
- {"TCSetSourceRef", (PyCFunction)Qt_TCSetSourceRef, 1,
- PyDoc_STR("(MediaHandler mh, TimeCodeDescriptionHandle tcdH, UserData srefH) -> (HandlerError _rv)")},
- {"TCSetTimeCodeFlags", (PyCFunction)Qt_TCSetTimeCodeFlags, 1,
- PyDoc_STR("(MediaHandler mh, long flags, long flagsMask) -> (HandlerError _rv)")},
- {"TCGetTimeCodeFlags", (PyCFunction)Qt_TCGetTimeCodeFlags, 1,
- PyDoc_STR("(MediaHandler mh) -> (HandlerError _rv, long flags)")},
- {"MovieImportHandle", (PyCFunction)Qt_MovieImportHandle, 1,
- PyDoc_STR("(MovieImportComponent ci, Handle dataH, Movie theMovie, Track targetTrack, TimeValue atTime, long inFlags) -> (ComponentResult _rv, Track usedTrack, TimeValue addedDuration, long outFlags)")},
- {"MovieImportFile", (PyCFunction)Qt_MovieImportFile, 1,
- PyDoc_STR("(MovieImportComponent ci, FSSpec theFile, Movie theMovie, Track targetTrack, TimeValue atTime, long inFlags) -> (ComponentResult _rv, Track usedTrack, TimeValue addedDuration, long outFlags)")},
- {"MovieImportSetSampleDuration", (PyCFunction)Qt_MovieImportSetSampleDuration, 1,
- PyDoc_STR("(MovieImportComponent ci, TimeValue duration, TimeScale scale) -> (ComponentResult _rv)")},
- {"MovieImportSetSampleDescription", (PyCFunction)Qt_MovieImportSetSampleDescription, 1,
- PyDoc_STR("(MovieImportComponent ci, SampleDescriptionHandle desc, OSType mediaType) -> (ComponentResult _rv)")},
- {"MovieImportSetMediaFile", (PyCFunction)Qt_MovieImportSetMediaFile, 1,
- PyDoc_STR("(MovieImportComponent ci, AliasHandle alias) -> (ComponentResult _rv)")},
- {"MovieImportSetDimensions", (PyCFunction)Qt_MovieImportSetDimensions, 1,
- PyDoc_STR("(MovieImportComponent ci, Fixed width, Fixed height) -> (ComponentResult _rv)")},
- {"MovieImportSetChunkSize", (PyCFunction)Qt_MovieImportSetChunkSize, 1,
- PyDoc_STR("(MovieImportComponent ci, long chunkSize) -> (ComponentResult _rv)")},
- {"MovieImportSetAuxiliaryData", (PyCFunction)Qt_MovieImportSetAuxiliaryData, 1,
- PyDoc_STR("(MovieImportComponent ci, Handle data, OSType handleType) -> (ComponentResult _rv)")},
- {"MovieImportSetFromScrap", (PyCFunction)Qt_MovieImportSetFromScrap, 1,
- PyDoc_STR("(MovieImportComponent ci, Boolean fromScrap) -> (ComponentResult _rv)")},
- {"MovieImportDoUserDialog", (PyCFunction)Qt_MovieImportDoUserDialog, 1,
- PyDoc_STR("(MovieImportComponent ci, FSSpec theFile, Handle theData) -> (ComponentResult _rv, Boolean canceled)")},
- {"MovieImportSetDuration", (PyCFunction)Qt_MovieImportSetDuration, 1,
- PyDoc_STR("(MovieImportComponent ci, TimeValue duration) -> (ComponentResult _rv)")},
- {"MovieImportGetAuxiliaryDataType", (PyCFunction)Qt_MovieImportGetAuxiliaryDataType, 1,
- PyDoc_STR("(MovieImportComponent ci) -> (ComponentResult _rv, OSType auxType)")},
- {"MovieImportValidate", (PyCFunction)Qt_MovieImportValidate, 1,
- PyDoc_STR("(MovieImportComponent ci, FSSpec theFile, Handle theData) -> (ComponentResult _rv, Boolean valid)")},
- {"MovieImportGetFileType", (PyCFunction)Qt_MovieImportGetFileType, 1,
- PyDoc_STR("(MovieImportComponent ci) -> (ComponentResult _rv, OSType fileType)")},
- {"MovieImportDataRef", (PyCFunction)Qt_MovieImportDataRef, 1,
- PyDoc_STR("(MovieImportComponent ci, Handle dataRef, OSType dataRefType, Movie theMovie, Track targetTrack, TimeValue atTime, long inFlags) -> (ComponentResult _rv, Track usedTrack, TimeValue addedDuration, long outFlags)")},
- {"MovieImportGetSampleDescription", (PyCFunction)Qt_MovieImportGetSampleDescription, 1,
- PyDoc_STR("(MovieImportComponent ci) -> (ComponentResult _rv, SampleDescriptionHandle desc, OSType mediaType)")},
- {"MovieImportSetOffsetAndLimit", (PyCFunction)Qt_MovieImportSetOffsetAndLimit, 1,
- PyDoc_STR("(MovieImportComponent ci, unsigned long offset, unsigned long limit) -> (ComponentResult _rv)")},
- {"MovieImportSetOffsetAndLimit64", (PyCFunction)Qt_MovieImportSetOffsetAndLimit64, 1,
- PyDoc_STR("(MovieImportComponent ci, wide offset, wide limit) -> (ComponentResult _rv)")},
- {"MovieImportIdle", (PyCFunction)Qt_MovieImportIdle, 1,
- PyDoc_STR("(MovieImportComponent ci, long inFlags) -> (ComponentResult _rv, long outFlags)")},
- {"MovieImportValidateDataRef", (PyCFunction)Qt_MovieImportValidateDataRef, 1,
- PyDoc_STR("(MovieImportComponent ci, Handle dataRef, OSType dataRefType) -> (ComponentResult _rv, UInt8 valid)")},
- {"MovieImportGetLoadState", (PyCFunction)Qt_MovieImportGetLoadState, 1,
- PyDoc_STR("(MovieImportComponent ci) -> (ComponentResult _rv, long importerLoadState)")},
- {"MovieImportGetMaxLoadedTime", (PyCFunction)Qt_MovieImportGetMaxLoadedTime, 1,
- PyDoc_STR("(MovieImportComponent ci) -> (ComponentResult _rv, TimeValue time)")},
- {"MovieImportEstimateCompletionTime", (PyCFunction)Qt_MovieImportEstimateCompletionTime, 1,
- PyDoc_STR("(MovieImportComponent ci) -> (ComponentResult _rv, TimeRecord time)")},
- {"MovieImportSetDontBlock", (PyCFunction)Qt_MovieImportSetDontBlock, 1,
- PyDoc_STR("(MovieImportComponent ci, Boolean dontBlock) -> (ComponentResult _rv)")},
- {"MovieImportGetDontBlock", (PyCFunction)Qt_MovieImportGetDontBlock, 1,
- PyDoc_STR("(MovieImportComponent ci) -> (ComponentResult _rv, Boolean willBlock)")},
- {"MovieImportSetIdleManager", (PyCFunction)Qt_MovieImportSetIdleManager, 1,
- PyDoc_STR("(MovieImportComponent ci, IdleManager im) -> (ComponentResult _rv)")},
- {"MovieImportSetNewMovieFlags", (PyCFunction)Qt_MovieImportSetNewMovieFlags, 1,
- PyDoc_STR("(MovieImportComponent ci, long newMovieFlags) -> (ComponentResult _rv)")},
- {"MovieImportGetDestinationMediaType", (PyCFunction)Qt_MovieImportGetDestinationMediaType, 1,
- PyDoc_STR("(MovieImportComponent ci) -> (ComponentResult _rv, OSType mediaType)")},
- {"MovieExportToHandle", (PyCFunction)Qt_MovieExportToHandle, 1,
- PyDoc_STR("(MovieExportComponent ci, Handle dataH, Movie theMovie, Track onlyThisTrack, TimeValue startTime, TimeValue duration) -> (ComponentResult _rv)")},
- {"MovieExportToFile", (PyCFunction)Qt_MovieExportToFile, 1,
- PyDoc_STR("(MovieExportComponent ci, FSSpec theFile, Movie theMovie, Track onlyThisTrack, TimeValue startTime, TimeValue duration) -> (ComponentResult _rv)")},
- {"MovieExportGetAuxiliaryData", (PyCFunction)Qt_MovieExportGetAuxiliaryData, 1,
- PyDoc_STR("(MovieExportComponent ci, Handle dataH) -> (ComponentResult _rv, OSType handleType)")},
- {"MovieExportSetSampleDescription", (PyCFunction)Qt_MovieExportSetSampleDescription, 1,
- PyDoc_STR("(MovieExportComponent ci, SampleDescriptionHandle desc, OSType mediaType) -> (ComponentResult _rv)")},
- {"MovieExportDoUserDialog", (PyCFunction)Qt_MovieExportDoUserDialog, 1,
- PyDoc_STR("(MovieExportComponent ci, Movie theMovie, Track onlyThisTrack, TimeValue startTime, TimeValue duration) -> (ComponentResult _rv, Boolean canceled)")},
- {"MovieExportGetCreatorType", (PyCFunction)Qt_MovieExportGetCreatorType, 1,
- PyDoc_STR("(MovieExportComponent ci) -> (ComponentResult _rv, OSType creator)")},
- {"MovieExportToDataRef", (PyCFunction)Qt_MovieExportToDataRef, 1,
- PyDoc_STR("(MovieExportComponent ci, Handle dataRef, OSType dataRefType, Movie theMovie, Track onlyThisTrack, TimeValue startTime, TimeValue duration) -> (ComponentResult _rv)")},
- {"MovieExportFromProceduresToDataRef", (PyCFunction)Qt_MovieExportFromProceduresToDataRef, 1,
- PyDoc_STR("(MovieExportComponent ci, Handle dataRef, OSType dataRefType) -> (ComponentResult _rv)")},
- {"MovieExportValidate", (PyCFunction)Qt_MovieExportValidate, 1,
- PyDoc_STR("(MovieExportComponent ci, Movie theMovie, Track onlyThisTrack) -> (ComponentResult _rv, Boolean valid)")},
- {"MovieExportGetFileNameExtension", (PyCFunction)Qt_MovieExportGetFileNameExtension, 1,
- PyDoc_STR("(MovieExportComponent ci) -> (ComponentResult _rv, OSType extension)")},
- {"MovieExportGetShortFileTypeString", (PyCFunction)Qt_MovieExportGetShortFileTypeString, 1,
- PyDoc_STR("(MovieExportComponent ci, Str255 typeString) -> (ComponentResult _rv)")},
- {"MovieExportGetSourceMediaType", (PyCFunction)Qt_MovieExportGetSourceMediaType, 1,
- PyDoc_STR("(MovieExportComponent ci) -> (ComponentResult _rv, OSType mediaType)")},
- {"TextExportGetTimeFraction", (PyCFunction)Qt_TextExportGetTimeFraction, 1,
- PyDoc_STR("(TextExportComponent ci) -> (ComponentResult _rv, long movieTimeFraction)")},
- {"TextExportSetTimeFraction", (PyCFunction)Qt_TextExportSetTimeFraction, 1,
- PyDoc_STR("(TextExportComponent ci, long movieTimeFraction) -> (ComponentResult _rv)")},
- {"TextExportGetSettings", (PyCFunction)Qt_TextExportGetSettings, 1,
- PyDoc_STR("(TextExportComponent ci) -> (ComponentResult _rv, long setting)")},
- {"TextExportSetSettings", (PyCFunction)Qt_TextExportSetSettings, 1,
- PyDoc_STR("(TextExportComponent ci, long setting) -> (ComponentResult _rv)")},
- {"MIDIImportGetSettings", (PyCFunction)Qt_MIDIImportGetSettings, 1,
- PyDoc_STR("(TextExportComponent ci) -> (ComponentResult _rv, long setting)")},
- {"MIDIImportSetSettings", (PyCFunction)Qt_MIDIImportSetSettings, 1,
- PyDoc_STR("(TextExportComponent ci, long setting) -> (ComponentResult _rv)")},
- {"GraphicsImageImportSetSequenceEnabled", (PyCFunction)Qt_GraphicsImageImportSetSequenceEnabled, 1,
- PyDoc_STR("(GraphicImageMovieImportComponent ci, Boolean enable) -> (ComponentResult _rv)")},
- {"GraphicsImageImportGetSequenceEnabled", (PyCFunction)Qt_GraphicsImageImportGetSequenceEnabled, 1,
- PyDoc_STR("(GraphicImageMovieImportComponent ci) -> (ComponentResult _rv, Boolean enable)")},
- {"PreviewShowData", (PyCFunction)Qt_PreviewShowData, 1,
- PyDoc_STR("(pnotComponent p, OSType dataType, Handle data, Rect inHere) -> (ComponentResult _rv)")},
- {"PreviewMakePreviewReference", (PyCFunction)Qt_PreviewMakePreviewReference, 1,
- PyDoc_STR("(pnotComponent p, FSSpec sourceFile) -> (ComponentResult _rv, OSType previewType, short resID)")},
- {"PreviewEvent", (PyCFunction)Qt_PreviewEvent, 1,
- PyDoc_STR("(pnotComponent p) -> (ComponentResult _rv, EventRecord e, Boolean handledEvent)")},
- {"DataCodecDecompress", (PyCFunction)Qt_DataCodecDecompress, 1,
- PyDoc_STR("(DataCodecComponent dc, void * srcData, UInt32 srcSize, void * dstData, UInt32 dstBufferSize) -> (ComponentResult _rv)")},
- {"DataCodecGetCompressBufferSize", (PyCFunction)Qt_DataCodecGetCompressBufferSize, 1,
- PyDoc_STR("(DataCodecComponent dc, UInt32 srcSize) -> (ComponentResult _rv, UInt32 dstSize)")},
- {"DataCodecCompress", (PyCFunction)Qt_DataCodecCompress, 1,
- PyDoc_STR("(DataCodecComponent dc, void * srcData, UInt32 srcSize, void * dstData, UInt32 dstBufferSize) -> (ComponentResult _rv, UInt32 actualDstSize, UInt32 decompressSlop)")},
- {"DataCodecBeginInterruptSafe", (PyCFunction)Qt_DataCodecBeginInterruptSafe, 1,
- PyDoc_STR("(DataCodecComponent dc, unsigned long maxSrcSize) -> (ComponentResult _rv)")},
- {"DataCodecEndInterruptSafe", (PyCFunction)Qt_DataCodecEndInterruptSafe, 1,
- PyDoc_STR("(DataCodecComponent dc) -> (ComponentResult _rv)")},
- {"DataHGetData", (PyCFunction)Qt_DataHGetData, 1,
- PyDoc_STR("(DataHandler dh, Handle h, long hOffset, long offset, long size) -> (ComponentResult _rv)")},
- {"DataHPutData", (PyCFunction)Qt_DataHPutData, 1,
- PyDoc_STR("(DataHandler dh, Handle h, long hOffset, long size) -> (ComponentResult _rv, long offset)")},
- {"DataHFlushData", (PyCFunction)Qt_DataHFlushData, 1,
- PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv)")},
- {"DataHOpenForWrite", (PyCFunction)Qt_DataHOpenForWrite, 1,
- PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv)")},
- {"DataHCloseForWrite", (PyCFunction)Qt_DataHCloseForWrite, 1,
- PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv)")},
- {"DataHOpenForRead", (PyCFunction)Qt_DataHOpenForRead, 1,
- PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv)")},
- {"DataHCloseForRead", (PyCFunction)Qt_DataHCloseForRead, 1,
- PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv)")},
- {"DataHSetDataRef", (PyCFunction)Qt_DataHSetDataRef, 1,
- PyDoc_STR("(DataHandler dh, Handle dataRef) -> (ComponentResult _rv)")},
- {"DataHGetDataRef", (PyCFunction)Qt_DataHGetDataRef, 1,
- PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv, Handle dataRef)")},
- {"DataHCompareDataRef", (PyCFunction)Qt_DataHCompareDataRef, 1,
- PyDoc_STR("(DataHandler dh, Handle dataRef) -> (ComponentResult _rv, Boolean equal)")},
- {"DataHTask", (PyCFunction)Qt_DataHTask, 1,
- PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv)")},
- {"DataHFinishData", (PyCFunction)Qt_DataHFinishData, 1,
- PyDoc_STR("(DataHandler dh, Ptr PlaceToPutDataPtr, Boolean Cancel) -> (ComponentResult _rv)")},
- {"DataHFlushCache", (PyCFunction)Qt_DataHFlushCache, 1,
- PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv)")},
- {"DataHResolveDataRef", (PyCFunction)Qt_DataHResolveDataRef, 1,
- PyDoc_STR("(DataHandler dh, Handle theDataRef, Boolean userInterfaceAllowed) -> (ComponentResult _rv, Boolean wasChanged)")},
- {"DataHGetFileSize", (PyCFunction)Qt_DataHGetFileSize, 1,
- PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv, long fileSize)")},
- {"DataHCanUseDataRef", (PyCFunction)Qt_DataHCanUseDataRef, 1,
- PyDoc_STR("(DataHandler dh, Handle dataRef) -> (ComponentResult _rv, long useFlags)")},
- {"DataHPreextend", (PyCFunction)Qt_DataHPreextend, 1,
- PyDoc_STR("(DataHandler dh, unsigned long maxToAdd) -> (ComponentResult _rv, unsigned long spaceAdded)")},
- {"DataHSetFileSize", (PyCFunction)Qt_DataHSetFileSize, 1,
- PyDoc_STR("(DataHandler dh, long fileSize) -> (ComponentResult _rv)")},
- {"DataHGetFreeSpace", (PyCFunction)Qt_DataHGetFreeSpace, 1,
- PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv, unsigned long freeSize)")},
- {"DataHCreateFile", (PyCFunction)Qt_DataHCreateFile, 1,
- PyDoc_STR("(DataHandler dh, OSType creator, Boolean deleteExisting) -> (ComponentResult _rv)")},
- {"DataHGetPreferredBlockSize", (PyCFunction)Qt_DataHGetPreferredBlockSize, 1,
- PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv, long blockSize)")},
- {"DataHGetDeviceIndex", (PyCFunction)Qt_DataHGetDeviceIndex, 1,
- PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv, long deviceIndex)")},
- {"DataHIsStreamingDataHandler", (PyCFunction)Qt_DataHIsStreamingDataHandler, 1,
- PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv, Boolean yes)")},
- {"DataHGetDataInBuffer", (PyCFunction)Qt_DataHGetDataInBuffer, 1,
- PyDoc_STR("(DataHandler dh, long startOffset) -> (ComponentResult _rv, long size)")},
- {"DataHGetScheduleAheadTime", (PyCFunction)Qt_DataHGetScheduleAheadTime, 1,
- PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv, long millisecs)")},
- {"DataHSetCacheSizeLimit", (PyCFunction)Qt_DataHSetCacheSizeLimit, 1,
- PyDoc_STR("(DataHandler dh, Size cacheSizeLimit) -> (ComponentResult _rv)")},
- {"DataHGetCacheSizeLimit", (PyCFunction)Qt_DataHGetCacheSizeLimit, 1,
- PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv, Size cacheSizeLimit)")},
- {"DataHGetMovie", (PyCFunction)Qt_DataHGetMovie, 1,
- PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv, Movie theMovie, short id)")},
- {"DataHAddMovie", (PyCFunction)Qt_DataHAddMovie, 1,
- PyDoc_STR("(DataHandler dh, Movie theMovie) -> (ComponentResult _rv, short id)")},
- {"DataHUpdateMovie", (PyCFunction)Qt_DataHUpdateMovie, 1,
- PyDoc_STR("(DataHandler dh, Movie theMovie, short id) -> (ComponentResult _rv)")},
- {"DataHDoesBuffer", (PyCFunction)Qt_DataHDoesBuffer, 1,
- PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv, Boolean buffersReads, Boolean buffersWrites)")},
- {"DataHGetFileName", (PyCFunction)Qt_DataHGetFileName, 1,
- PyDoc_STR("(DataHandler dh, Str255 str) -> (ComponentResult _rv)")},
- {"DataHGetAvailableFileSize", (PyCFunction)Qt_DataHGetAvailableFileSize, 1,
- PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv, long fileSize)")},
- {"DataHGetMacOSFileType", (PyCFunction)Qt_DataHGetMacOSFileType, 1,
- PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv, OSType fileType)")},
- {"DataHGetMIMEType", (PyCFunction)Qt_DataHGetMIMEType, 1,
- PyDoc_STR("(DataHandler dh, Str255 mimeType) -> (ComponentResult _rv)")},
- {"DataHSetDataRefWithAnchor", (PyCFunction)Qt_DataHSetDataRefWithAnchor, 1,
- PyDoc_STR("(DataHandler dh, Handle anchorDataRef, OSType dataRefType, Handle dataRef) -> (ComponentResult _rv)")},
- {"DataHGetDataRefWithAnchor", (PyCFunction)Qt_DataHGetDataRefWithAnchor, 1,
- PyDoc_STR("(DataHandler dh, Handle anchorDataRef, OSType dataRefType) -> (ComponentResult _rv, Handle dataRef)")},
- {"DataHSetMacOSFileType", (PyCFunction)Qt_DataHSetMacOSFileType, 1,
- PyDoc_STR("(DataHandler dh, OSType fileType) -> (ComponentResult _rv)")},
- {"DataHSetTimeBase", (PyCFunction)Qt_DataHSetTimeBase, 1,
- PyDoc_STR("(DataHandler dh, TimeBase tb) -> (ComponentResult _rv)")},
- {"DataHGetInfoFlags", (PyCFunction)Qt_DataHGetInfoFlags, 1,
- PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv, UInt32 flags)")},
- {"DataHGetFileSize64", (PyCFunction)Qt_DataHGetFileSize64, 1,
- PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv, wide fileSize)")},
- {"DataHPreextend64", (PyCFunction)Qt_DataHPreextend64, 1,
- PyDoc_STR("(DataHandler dh, wide maxToAdd) -> (ComponentResult _rv, wide spaceAdded)")},
- {"DataHSetFileSize64", (PyCFunction)Qt_DataHSetFileSize64, 1,
- PyDoc_STR("(DataHandler dh, wide fileSize) -> (ComponentResult _rv)")},
- {"DataHGetFreeSpace64", (PyCFunction)Qt_DataHGetFreeSpace64, 1,
- PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv, wide freeSize)")},
- {"DataHAppend64", (PyCFunction)Qt_DataHAppend64, 1,
- PyDoc_STR("(DataHandler dh, void * data, unsigned long size) -> (ComponentResult _rv, wide fileOffset)")},
- {"DataHPollRead", (PyCFunction)Qt_DataHPollRead, 1,
- PyDoc_STR("(DataHandler dh, void * dataPtr) -> (ComponentResult _rv, UInt32 dataSizeSoFar)")},
- {"DataHGetDataAvailability", (PyCFunction)Qt_DataHGetDataAvailability, 1,
- PyDoc_STR("(DataHandler dh, long offset, long len) -> (ComponentResult _rv, long missing_offset, long missing_len)")},
- {"DataHGetDataRefAsType", (PyCFunction)Qt_DataHGetDataRefAsType, 1,
- PyDoc_STR("(DataHandler dh, OSType requestedType) -> (ComponentResult _rv, Handle dataRef)")},
- {"DataHSetDataRefExtension", (PyCFunction)Qt_DataHSetDataRefExtension, 1,
- PyDoc_STR("(DataHandler dh, Handle extension, OSType idType) -> (ComponentResult _rv)")},
- {"DataHGetDataRefExtension", (PyCFunction)Qt_DataHGetDataRefExtension, 1,
- PyDoc_STR("(DataHandler dh, OSType idType) -> (ComponentResult _rv, Handle extension)")},
- {"DataHGetMovieWithFlags", (PyCFunction)Qt_DataHGetMovieWithFlags, 1,
- PyDoc_STR("(DataHandler dh, short flags) -> (ComponentResult _rv, Movie theMovie, short id)")},
- {"DataHGetFileTypeOrdering", (PyCFunction)Qt_DataHGetFileTypeOrdering, 1,
- PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv, DataHFileTypeOrderingHandle orderingListHandle)")},
- {"DataHCreateFileWithFlags", (PyCFunction)Qt_DataHCreateFileWithFlags, 1,
- PyDoc_STR("(DataHandler dh, OSType creator, Boolean deleteExisting, UInt32 flags) -> (ComponentResult _rv)")},
- {"DataHGetInfo", (PyCFunction)Qt_DataHGetInfo, 1,
- PyDoc_STR("(DataHandler dh, OSType what, void * info) -> (ComponentResult _rv)")},
- {"DataHSetIdleManager", (PyCFunction)Qt_DataHSetIdleManager, 1,
- PyDoc_STR("(DataHandler dh, IdleManager im) -> (ComponentResult _rv)")},
- {"DataHDeleteFile", (PyCFunction)Qt_DataHDeleteFile, 1,
- PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv)")},
- {"DataHSetMovieUsageFlags", (PyCFunction)Qt_DataHSetMovieUsageFlags, 1,
- PyDoc_STR("(DataHandler dh, long flags) -> (ComponentResult _rv)")},
- {"DataHUseTemporaryDataRef", (PyCFunction)Qt_DataHUseTemporaryDataRef, 1,
- PyDoc_STR("(DataHandler dh, long inFlags) -> (ComponentResult _rv)")},
- {"DataHGetTemporaryDataRefCapabilities", (PyCFunction)Qt_DataHGetTemporaryDataRefCapabilities, 1,
- PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv, long outUnderstoodFlags)")},
- {"DataHRenameFile", (PyCFunction)Qt_DataHRenameFile, 1,
- PyDoc_STR("(DataHandler dh, Handle newDataRef) -> (ComponentResult _rv)")},
- {"DataHPlaybackHints", (PyCFunction)Qt_DataHPlaybackHints, 1,
- PyDoc_STR("(DataHandler dh, long flags, unsigned long minFileOffset, unsigned long maxFileOffset, long bytesPerSecond) -> (ComponentResult _rv)")},
- {"DataHPlaybackHints64", (PyCFunction)Qt_DataHPlaybackHints64, 1,
- PyDoc_STR("(DataHandler dh, long flags, wide minFileOffset, wide maxFileOffset, long bytesPerSecond) -> (ComponentResult _rv)")},
- {"DataHGetDataRate", (PyCFunction)Qt_DataHGetDataRate, 1,
- PyDoc_STR("(DataHandler dh, long flags) -> (ComponentResult _rv, long bytesPerSecond)")},
- {"DataHSetTimeHints", (PyCFunction)Qt_DataHSetTimeHints, 1,
- PyDoc_STR("(DataHandler dh, long flags, long bandwidthPriority, TimeScale scale, TimeValue minTime, TimeValue maxTime) -> (ComponentResult _rv)")},
- {"VDGetMaxSrcRect", (PyCFunction)Qt_VDGetMaxSrcRect, 1,
- PyDoc_STR("(VideoDigitizerComponent ci, short inputStd) -> (ComponentResult _rv, Rect maxSrcRect)")},
- {"VDGetActiveSrcRect", (PyCFunction)Qt_VDGetActiveSrcRect, 1,
- PyDoc_STR("(VideoDigitizerComponent ci, short inputStd) -> (ComponentResult _rv, Rect activeSrcRect)")},
- {"VDSetDigitizerRect", (PyCFunction)Qt_VDSetDigitizerRect, 1,
- PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, Rect digitizerRect)")},
- {"VDGetDigitizerRect", (PyCFunction)Qt_VDGetDigitizerRect, 1,
- PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, Rect digitizerRect)")},
- {"VDGetVBlankRect", (PyCFunction)Qt_VDGetVBlankRect, 1,
- PyDoc_STR("(VideoDigitizerComponent ci, short inputStd) -> (ComponentResult _rv, Rect vBlankRect)")},
- {"VDGetMaskPixMap", (PyCFunction)Qt_VDGetMaskPixMap, 1,
- PyDoc_STR("(VideoDigitizerComponent ci, PixMapHandle maskPixMap) -> (ComponentResult _rv)")},
- {"VDUseThisCLUT", (PyCFunction)Qt_VDUseThisCLUT, 1,
- PyDoc_STR("(VideoDigitizerComponent ci, CTabHandle colorTableHandle) -> (ComponentResult _rv)")},
- {"VDSetInputGammaValue", (PyCFunction)Qt_VDSetInputGammaValue, 1,
- PyDoc_STR("(VideoDigitizerComponent ci, Fixed channel1, Fixed channel2, Fixed channel3) -> (ComponentResult _rv)")},
- {"VDGetInputGammaValue", (PyCFunction)Qt_VDGetInputGammaValue, 1,
- PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, Fixed channel1, Fixed channel2, Fixed channel3)")},
- {"VDSetBrightness", (PyCFunction)Qt_VDSetBrightness, 1,
- PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, unsigned short brightness)")},
- {"VDGetBrightness", (PyCFunction)Qt_VDGetBrightness, 1,
- PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, unsigned short brightness)")},
- {"VDSetContrast", (PyCFunction)Qt_VDSetContrast, 1,
- PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, unsigned short contrast)")},
- {"VDSetHue", (PyCFunction)Qt_VDSetHue, 1,
- PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, unsigned short hue)")},
- {"VDSetSharpness", (PyCFunction)Qt_VDSetSharpness, 1,
- PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, unsigned short sharpness)")},
- {"VDSetSaturation", (PyCFunction)Qt_VDSetSaturation, 1,
- PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, unsigned short saturation)")},
- {"VDGetContrast", (PyCFunction)Qt_VDGetContrast, 1,
- PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, unsigned short contrast)")},
- {"VDGetHue", (PyCFunction)Qt_VDGetHue, 1,
- PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, unsigned short hue)")},
- {"VDGetSharpness", (PyCFunction)Qt_VDGetSharpness, 1,
- PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, unsigned short sharpness)")},
- {"VDGetSaturation", (PyCFunction)Qt_VDGetSaturation, 1,
- PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, unsigned short saturation)")},
- {"VDGrabOneFrame", (PyCFunction)Qt_VDGrabOneFrame, 1,
- PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv)")},
- {"VDGetMaxAuxBuffer", (PyCFunction)Qt_VDGetMaxAuxBuffer, 1,
- PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, PixMapHandle pm, Rect r)")},
- {"VDGetCurrentFlags", (PyCFunction)Qt_VDGetCurrentFlags, 1,
- PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, long inputCurrentFlag, long outputCurrentFlag)")},
- {"VDSetKeyColor", (PyCFunction)Qt_VDSetKeyColor, 1,
- PyDoc_STR("(VideoDigitizerComponent ci, long index) -> (ComponentResult _rv)")},
- {"VDGetKeyColor", (PyCFunction)Qt_VDGetKeyColor, 1,
- PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, long index)")},
- {"VDAddKeyColor", (PyCFunction)Qt_VDAddKeyColor, 1,
- PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, long index)")},
- {"VDGetNextKeyColor", (PyCFunction)Qt_VDGetNextKeyColor, 1,
- PyDoc_STR("(VideoDigitizerComponent ci, long index) -> (ComponentResult _rv)")},
- {"VDSetKeyColorRange", (PyCFunction)Qt_VDSetKeyColorRange, 1,
- PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, RGBColor minRGB, RGBColor maxRGB)")},
- {"VDGetKeyColorRange", (PyCFunction)Qt_VDGetKeyColorRange, 1,
- PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, RGBColor minRGB, RGBColor maxRGB)")},
- {"VDSetInputColorSpaceMode", (PyCFunction)Qt_VDSetInputColorSpaceMode, 1,
- PyDoc_STR("(VideoDigitizerComponent ci, short colorSpaceMode) -> (ComponentResult _rv)")},
- {"VDGetInputColorSpaceMode", (PyCFunction)Qt_VDGetInputColorSpaceMode, 1,
- PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, short colorSpaceMode)")},
- {"VDSetClipState", (PyCFunction)Qt_VDSetClipState, 1,
- PyDoc_STR("(VideoDigitizerComponent ci, short clipEnable) -> (ComponentResult _rv)")},
- {"VDGetClipState", (PyCFunction)Qt_VDGetClipState, 1,
- PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, short clipEnable)")},
- {"VDSetClipRgn", (PyCFunction)Qt_VDSetClipRgn, 1,
- PyDoc_STR("(VideoDigitizerComponent ci, RgnHandle clipRegion) -> (ComponentResult _rv)")},
- {"VDClearClipRgn", (PyCFunction)Qt_VDClearClipRgn, 1,
- PyDoc_STR("(VideoDigitizerComponent ci, RgnHandle clipRegion) -> (ComponentResult _rv)")},
- {"VDGetCLUTInUse", (PyCFunction)Qt_VDGetCLUTInUse, 1,
- PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, CTabHandle colorTableHandle)")},
- {"VDSetPLLFilterType", (PyCFunction)Qt_VDSetPLLFilterType, 1,
- PyDoc_STR("(VideoDigitizerComponent ci, short pllType) -> (ComponentResult _rv)")},
- {"VDGetPLLFilterType", (PyCFunction)Qt_VDGetPLLFilterType, 1,
- PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, short pllType)")},
- {"VDGetMaskandValue", (PyCFunction)Qt_VDGetMaskandValue, 1,
- PyDoc_STR("(VideoDigitizerComponent ci, unsigned short blendLevel) -> (ComponentResult _rv, long mask, long value)")},
- {"VDSetMasterBlendLevel", (PyCFunction)Qt_VDSetMasterBlendLevel, 1,
- PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, unsigned short blendLevel)")},
- {"VDSetPlayThruOnOff", (PyCFunction)Qt_VDSetPlayThruOnOff, 1,
- PyDoc_STR("(VideoDigitizerComponent ci, short state) -> (ComponentResult _rv)")},
- {"VDSetFieldPreference", (PyCFunction)Qt_VDSetFieldPreference, 1,
- PyDoc_STR("(VideoDigitizerComponent ci, short fieldFlag) -> (ComponentResult _rv)")},
- {"VDGetFieldPreference", (PyCFunction)Qt_VDGetFieldPreference, 1,
- PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, short fieldFlag)")},
- {"VDPreflightGlobalRect", (PyCFunction)Qt_VDPreflightGlobalRect, 1,
- PyDoc_STR("(VideoDigitizerComponent ci, GrafPtr theWindow) -> (ComponentResult _rv, Rect globalRect)")},
- {"VDSetPlayThruGlobalRect", (PyCFunction)Qt_VDSetPlayThruGlobalRect, 1,
- PyDoc_STR("(VideoDigitizerComponent ci, GrafPtr theWindow) -> (ComponentResult _rv, Rect globalRect)")},
- {"VDSetBlackLevelValue", (PyCFunction)Qt_VDSetBlackLevelValue, 1,
- PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, unsigned short blackLevel)")},
- {"VDGetBlackLevelValue", (PyCFunction)Qt_VDGetBlackLevelValue, 1,
- PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, unsigned short blackLevel)")},
- {"VDSetWhiteLevelValue", (PyCFunction)Qt_VDSetWhiteLevelValue, 1,
- PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, unsigned short whiteLevel)")},
- {"VDGetWhiteLevelValue", (PyCFunction)Qt_VDGetWhiteLevelValue, 1,
- PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, unsigned short whiteLevel)")},
- {"VDGetVideoDefaults", (PyCFunction)Qt_VDGetVideoDefaults, 1,
- PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, unsigned short blackLevel, unsigned short whiteLevel, unsigned short brightness, unsigned short hue, unsigned short saturation, unsigned short contrast, unsigned short sharpness)")},
- {"VDGetNumberOfInputs", (PyCFunction)Qt_VDGetNumberOfInputs, 1,
- PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, short inputs)")},
- {"VDGetInputFormat", (PyCFunction)Qt_VDGetInputFormat, 1,
- PyDoc_STR("(VideoDigitizerComponent ci, short input) -> (ComponentResult _rv, short format)")},
- {"VDSetInput", (PyCFunction)Qt_VDSetInput, 1,
- PyDoc_STR("(VideoDigitizerComponent ci, short input) -> (ComponentResult _rv)")},
- {"VDGetInput", (PyCFunction)Qt_VDGetInput, 1,
- PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, short input)")},
- {"VDSetInputStandard", (PyCFunction)Qt_VDSetInputStandard, 1,
- PyDoc_STR("(VideoDigitizerComponent ci, short inputStandard) -> (ComponentResult _rv)")},
- {"VDSetupBuffers", (PyCFunction)Qt_VDSetupBuffers, 1,
- PyDoc_STR("(VideoDigitizerComponent ci, VdigBufferRecListHandle bufferList) -> (ComponentResult _rv)")},
- {"VDGrabOneFrameAsync", (PyCFunction)Qt_VDGrabOneFrameAsync, 1,
- PyDoc_STR("(VideoDigitizerComponent ci, short buffer) -> (ComponentResult _rv)")},
- {"VDDone", (PyCFunction)Qt_VDDone, 1,
- PyDoc_STR("(VideoDigitizerComponent ci, short buffer) -> (ComponentResult _rv)")},
- {"VDSetCompression", (PyCFunction)Qt_VDSetCompression, 1,
- PyDoc_STR("(VideoDigitizerComponent ci, OSType compressType, short depth, CodecQ spatialQuality, CodecQ temporalQuality, long keyFrameRate) -> (ComponentResult _rv, Rect bounds)")},
- {"VDCompressOneFrameAsync", (PyCFunction)Qt_VDCompressOneFrameAsync, 1,
- PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv)")},
- {"VDGetImageDescription", (PyCFunction)Qt_VDGetImageDescription, 1,
- PyDoc_STR("(VideoDigitizerComponent ci, ImageDescriptionHandle desc) -> (ComponentResult _rv)")},
- {"VDResetCompressSequence", (PyCFunction)Qt_VDResetCompressSequence, 1,
- PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv)")},
- {"VDSetCompressionOnOff", (PyCFunction)Qt_VDSetCompressionOnOff, 1,
- PyDoc_STR("(VideoDigitizerComponent ci, Boolean state) -> (ComponentResult _rv)")},
- {"VDGetCompressionTypes", (PyCFunction)Qt_VDGetCompressionTypes, 1,
- PyDoc_STR("(VideoDigitizerComponent ci, VDCompressionListHandle h) -> (ComponentResult _rv)")},
- {"VDSetTimeBase", (PyCFunction)Qt_VDSetTimeBase, 1,
- PyDoc_STR("(VideoDigitizerComponent ci, TimeBase t) -> (ComponentResult _rv)")},
- {"VDSetFrameRate", (PyCFunction)Qt_VDSetFrameRate, 1,
- PyDoc_STR("(VideoDigitizerComponent ci, Fixed framesPerSecond) -> (ComponentResult _rv)")},
- {"VDGetDataRate", (PyCFunction)Qt_VDGetDataRate, 1,
- PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, long milliSecPerFrame, Fixed framesPerSecond, long bytesPerSecond)")},
- {"VDGetSoundInputDriver", (PyCFunction)Qt_VDGetSoundInputDriver, 1,
- PyDoc_STR("(VideoDigitizerComponent ci, Str255 soundDriverName) -> (ComponentResult _rv)")},
- {"VDGetDMADepths", (PyCFunction)Qt_VDGetDMADepths, 1,
- PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, long depthArray, long preferredDepth)")},
- {"VDGetPreferredTimeScale", (PyCFunction)Qt_VDGetPreferredTimeScale, 1,
- PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, TimeScale preferred)")},
- {"VDReleaseAsyncBuffers", (PyCFunction)Qt_VDReleaseAsyncBuffers, 1,
- PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv)")},
- {"VDSetDataRate", (PyCFunction)Qt_VDSetDataRate, 1,
- PyDoc_STR("(VideoDigitizerComponent ci, long bytesPerSecond) -> (ComponentResult _rv)")},
- {"VDGetTimeCode", (PyCFunction)Qt_VDGetTimeCode, 1,
- PyDoc_STR("(VideoDigitizerComponent ci, void * timeCodeFormat, void * timeCodeTime) -> (ComponentResult _rv, TimeRecord atTime)")},
- {"VDUseSafeBuffers", (PyCFunction)Qt_VDUseSafeBuffers, 1,
- PyDoc_STR("(VideoDigitizerComponent ci, Boolean useSafeBuffers) -> (ComponentResult _rv)")},
- {"VDGetSoundInputSource", (PyCFunction)Qt_VDGetSoundInputSource, 1,
- PyDoc_STR("(VideoDigitizerComponent ci, long videoInput) -> (ComponentResult _rv, long soundInput)")},
- {"VDGetCompressionTime", (PyCFunction)Qt_VDGetCompressionTime, 1,
- PyDoc_STR("(VideoDigitizerComponent ci, OSType compressionType, short depth) -> (ComponentResult _rv, Rect srcRect, CodecQ spatialQuality, CodecQ temporalQuality, unsigned long compressTime)")},
- {"VDSetPreferredPacketSize", (PyCFunction)Qt_VDSetPreferredPacketSize, 1,
- PyDoc_STR("(VideoDigitizerComponent ci, long preferredPacketSizeInBytes) -> (ComponentResult _rv)")},
- {"VDSetPreferredImageDimensions", (PyCFunction)Qt_VDSetPreferredImageDimensions, 1,
- PyDoc_STR("(VideoDigitizerComponent ci, long width, long height) -> (ComponentResult _rv)")},
- {"VDGetPreferredImageDimensions", (PyCFunction)Qt_VDGetPreferredImageDimensions, 1,
- PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, long width, long height)")},
- {"VDGetInputName", (PyCFunction)Qt_VDGetInputName, 1,
- PyDoc_STR("(VideoDigitizerComponent ci, long videoInput, Str255 name) -> (ComponentResult _rv)")},
- {"VDSetDestinationPort", (PyCFunction)Qt_VDSetDestinationPort, 1,
- PyDoc_STR("(VideoDigitizerComponent ci, CGrafPtr destPort) -> (ComponentResult _rv)")},
- {"VDGetDeviceNameAndFlags", (PyCFunction)Qt_VDGetDeviceNameAndFlags, 1,
- PyDoc_STR("(VideoDigitizerComponent ci, Str255 outName) -> (ComponentResult _rv, UInt32 outNameFlags)")},
- {"VDCaptureStateChanging", (PyCFunction)Qt_VDCaptureStateChanging, 1,
- PyDoc_STR("(VideoDigitizerComponent ci, UInt32 inStateFlags) -> (ComponentResult _rv)")},
- {"XMLParseGetDetailedParseError", (PyCFunction)Qt_XMLParseGetDetailedParseError, 1,
- PyDoc_STR("(ComponentInstance aParser, StringPtr errDesc) -> (ComponentResult _rv, long errorLine)")},
- {"XMLParseAddElement", (PyCFunction)Qt_XMLParseAddElement, 1,
- PyDoc_STR("(ComponentInstance aParser, UInt32 nameSpaceID, long elementFlags) -> (ComponentResult _rv, char elementName, UInt32 elementID)")},
- {"XMLParseAddAttribute", (PyCFunction)Qt_XMLParseAddAttribute, 1,
- PyDoc_STR("(ComponentInstance aParser, UInt32 elementID, UInt32 nameSpaceID) -> (ComponentResult _rv, char attributeName, UInt32 attributeID)")},
- {"XMLParseAddMultipleAttributes", (PyCFunction)Qt_XMLParseAddMultipleAttributes, 1,
- PyDoc_STR("(ComponentInstance aParser, UInt32 elementID) -> (ComponentResult _rv, UInt32 nameSpaceIDs, char attributeNames, UInt32 attributeIDs)")},
- {"XMLParseAddAttributeAndValue", (PyCFunction)Qt_XMLParseAddAttributeAndValue, 1,
- PyDoc_STR("(ComponentInstance aParser, UInt32 elementID, UInt32 nameSpaceID, UInt32 attributeValueKind, void * attributeValueKindInfo) -> (ComponentResult _rv, char attributeName, UInt32 attributeID)")},
- {"XMLParseAddAttributeValueKind", (PyCFunction)Qt_XMLParseAddAttributeValueKind, 1,
- PyDoc_STR("(ComponentInstance aParser, UInt32 elementID, UInt32 attributeID, UInt32 attributeValueKind, void * attributeValueKindInfo) -> (ComponentResult _rv)")},
- {"XMLParseAddNameSpace", (PyCFunction)Qt_XMLParseAddNameSpace, 1,
- PyDoc_STR("(ComponentInstance aParser) -> (ComponentResult _rv, char nameSpaceURL, UInt32 nameSpaceID)")},
- {"XMLParseSetOffsetAndLimit", (PyCFunction)Qt_XMLParseSetOffsetAndLimit, 1,
- PyDoc_STR("(ComponentInstance aParser, UInt32 offset, UInt32 limit) -> (ComponentResult _rv)")},
- {"XMLParseSetEventParseRefCon", (PyCFunction)Qt_XMLParseSetEventParseRefCon, 1,
- PyDoc_STR("(ComponentInstance aParser, long refcon) -> (ComponentResult _rv)")},
- {"SGInitialize", (PyCFunction)Qt_SGInitialize, 1,
- PyDoc_STR("(SeqGrabComponent s) -> (ComponentResult _rv)")},
- {"SGSetDataOutput", (PyCFunction)Qt_SGSetDataOutput, 1,
- PyDoc_STR("(SeqGrabComponent s, FSSpec movieFile, long whereFlags) -> (ComponentResult _rv)")},
- {"SGGetDataOutput", (PyCFunction)Qt_SGGetDataOutput, 1,
- PyDoc_STR("(SeqGrabComponent s, FSSpec movieFile) -> (ComponentResult _rv, long whereFlags)")},
- {"SGSetGWorld", (PyCFunction)Qt_SGSetGWorld, 1,
- PyDoc_STR("(SeqGrabComponent s, CGrafPtr gp, GDHandle gd) -> (ComponentResult _rv)")},
- {"SGGetGWorld", (PyCFunction)Qt_SGGetGWorld, 1,
- PyDoc_STR("(SeqGrabComponent s) -> (ComponentResult _rv, CGrafPtr gp, GDHandle gd)")},
- {"SGNewChannel", (PyCFunction)Qt_SGNewChannel, 1,
- PyDoc_STR("(SeqGrabComponent s, OSType channelType) -> (ComponentResult _rv, SGChannel ref)")},
- {"SGDisposeChannel", (PyCFunction)Qt_SGDisposeChannel, 1,
- PyDoc_STR("(SeqGrabComponent s, SGChannel c) -> (ComponentResult _rv)")},
- {"SGStartPreview", (PyCFunction)Qt_SGStartPreview, 1,
- PyDoc_STR("(SeqGrabComponent s) -> (ComponentResult _rv)")},
- {"SGStartRecord", (PyCFunction)Qt_SGStartRecord, 1,
- PyDoc_STR("(SeqGrabComponent s) -> (ComponentResult _rv)")},
- {"SGIdle", (PyCFunction)Qt_SGIdle, 1,
- PyDoc_STR("(SeqGrabComponent s) -> (ComponentResult _rv)")},
- {"SGStop", (PyCFunction)Qt_SGStop, 1,
- PyDoc_STR("(SeqGrabComponent s) -> (ComponentResult _rv)")},
- {"SGPause", (PyCFunction)Qt_SGPause, 1,
- PyDoc_STR("(SeqGrabComponent s, Boolean pause) -> (ComponentResult _rv)")},
- {"SGPrepare", (PyCFunction)Qt_SGPrepare, 1,
- PyDoc_STR("(SeqGrabComponent s, Boolean prepareForPreview, Boolean prepareForRecord) -> (ComponentResult _rv)")},
- {"SGRelease", (PyCFunction)Qt_SGRelease, 1,
- PyDoc_STR("(SeqGrabComponent s) -> (ComponentResult _rv)")},
- {"SGGetMovie", (PyCFunction)Qt_SGGetMovie, 1,
- PyDoc_STR("(SeqGrabComponent s) -> (Movie _rv)")},
- {"SGSetMaximumRecordTime", (PyCFunction)Qt_SGSetMaximumRecordTime, 1,
- PyDoc_STR("(SeqGrabComponent s, unsigned long ticks) -> (ComponentResult _rv)")},
- {"SGGetMaximumRecordTime", (PyCFunction)Qt_SGGetMaximumRecordTime, 1,
- PyDoc_STR("(SeqGrabComponent s) -> (ComponentResult _rv, unsigned long ticks)")},
- {"SGGetStorageSpaceRemaining", (PyCFunction)Qt_SGGetStorageSpaceRemaining, 1,
- PyDoc_STR("(SeqGrabComponent s) -> (ComponentResult _rv, unsigned long bytes)")},
- {"SGGetTimeRemaining", (PyCFunction)Qt_SGGetTimeRemaining, 1,
- PyDoc_STR("(SeqGrabComponent s) -> (ComponentResult _rv, long ticksLeft)")},
- {"SGGrabPict", (PyCFunction)Qt_SGGrabPict, 1,
- PyDoc_STR("(SeqGrabComponent s, Rect bounds, short offscreenDepth, long grabPictFlags) -> (ComponentResult _rv, PicHandle p)")},
- {"SGGetLastMovieResID", (PyCFunction)Qt_SGGetLastMovieResID, 1,
- PyDoc_STR("(SeqGrabComponent s) -> (ComponentResult _rv, short resID)")},
- {"SGSetFlags", (PyCFunction)Qt_SGSetFlags, 1,
- PyDoc_STR("(SeqGrabComponent s, long sgFlags) -> (ComponentResult _rv)")},
- {"SGGetFlags", (PyCFunction)Qt_SGGetFlags, 1,
- PyDoc_STR("(SeqGrabComponent s) -> (ComponentResult _rv, long sgFlags)")},
- {"SGNewChannelFromComponent", (PyCFunction)Qt_SGNewChannelFromComponent, 1,
- PyDoc_STR("(SeqGrabComponent s, Component sgChannelComponent) -> (ComponentResult _rv, SGChannel newChannel)")},
- {"SGSetSettings", (PyCFunction)Qt_SGSetSettings, 1,
- PyDoc_STR("(SeqGrabComponent s, UserData ud, long flags) -> (ComponentResult _rv)")},
- {"SGGetSettings", (PyCFunction)Qt_SGGetSettings, 1,
- PyDoc_STR("(SeqGrabComponent s, long flags) -> (ComponentResult _rv, UserData ud)")},
- {"SGGetIndChannel", (PyCFunction)Qt_SGGetIndChannel, 1,
- PyDoc_STR("(SeqGrabComponent s, short index) -> (ComponentResult _rv, SGChannel ref, OSType chanType)")},
- {"SGUpdate", (PyCFunction)Qt_SGUpdate, 1,
- PyDoc_STR("(SeqGrabComponent s, RgnHandle updateRgn) -> (ComponentResult _rv)")},
- {"SGGetPause", (PyCFunction)Qt_SGGetPause, 1,
- PyDoc_STR("(SeqGrabComponent s) -> (ComponentResult _rv, Boolean paused)")},
- {"SGSetChannelSettings", (PyCFunction)Qt_SGSetChannelSettings, 1,
- PyDoc_STR("(SeqGrabComponent s, SGChannel c, UserData ud, long flags) -> (ComponentResult _rv)")},
- {"SGGetChannelSettings", (PyCFunction)Qt_SGGetChannelSettings, 1,
- PyDoc_STR("(SeqGrabComponent s, SGChannel c, long flags) -> (ComponentResult _rv, UserData ud)")},
- {"SGGetMode", (PyCFunction)Qt_SGGetMode, 1,
- PyDoc_STR("(SeqGrabComponent s) -> (ComponentResult _rv, Boolean previewMode, Boolean recordMode)")},
- {"SGSetDataRef", (PyCFunction)Qt_SGSetDataRef, 1,
- PyDoc_STR("(SeqGrabComponent s, Handle dataRef, OSType dataRefType, long whereFlags) -> (ComponentResult _rv)")},
- {"SGGetDataRef", (PyCFunction)Qt_SGGetDataRef, 1,
- PyDoc_STR("(SeqGrabComponent s) -> (ComponentResult _rv, Handle dataRef, OSType dataRefType, long whereFlags)")},
- {"SGNewOutput", (PyCFunction)Qt_SGNewOutput, 1,
- PyDoc_STR("(SeqGrabComponent s, Handle dataRef, OSType dataRefType, long whereFlags) -> (ComponentResult _rv, SGOutput sgOut)")},
- {"SGDisposeOutput", (PyCFunction)Qt_SGDisposeOutput, 1,
- PyDoc_STR("(SeqGrabComponent s, SGOutput sgOut) -> (ComponentResult _rv)")},
- {"SGSetOutputFlags", (PyCFunction)Qt_SGSetOutputFlags, 1,
- PyDoc_STR("(SeqGrabComponent s, SGOutput sgOut, long whereFlags) -> (ComponentResult _rv)")},
- {"SGSetChannelOutput", (PyCFunction)Qt_SGSetChannelOutput, 1,
- PyDoc_STR("(SeqGrabComponent s, SGChannel c, SGOutput sgOut) -> (ComponentResult _rv)")},
- {"SGGetDataOutputStorageSpaceRemaining", (PyCFunction)Qt_SGGetDataOutputStorageSpaceRemaining, 1,
- PyDoc_STR("(SeqGrabComponent s, SGOutput sgOut) -> (ComponentResult _rv, unsigned long space)")},
- {"SGHandleUpdateEvent", (PyCFunction)Qt_SGHandleUpdateEvent, 1,
- PyDoc_STR("(SeqGrabComponent s, EventRecord event) -> (ComponentResult _rv, Boolean handled)")},
- {"SGSetOutputNextOutput", (PyCFunction)Qt_SGSetOutputNextOutput, 1,
- PyDoc_STR("(SeqGrabComponent s, SGOutput sgOut, SGOutput nextOut) -> (ComponentResult _rv)")},
- {"SGGetOutputNextOutput", (PyCFunction)Qt_SGGetOutputNextOutput, 1,
- PyDoc_STR("(SeqGrabComponent s, SGOutput sgOut) -> (ComponentResult _rv, SGOutput nextOut)")},
- {"SGSetOutputMaximumOffset", (PyCFunction)Qt_SGSetOutputMaximumOffset, 1,
- PyDoc_STR("(SeqGrabComponent s, SGOutput sgOut, wide maxOffset) -> (ComponentResult _rv)")},
- {"SGGetOutputMaximumOffset", (PyCFunction)Qt_SGGetOutputMaximumOffset, 1,
- PyDoc_STR("(SeqGrabComponent s, SGOutput sgOut) -> (ComponentResult _rv, wide maxOffset)")},
- {"SGGetOutputDataReference", (PyCFunction)Qt_SGGetOutputDataReference, 1,
- PyDoc_STR("(SeqGrabComponent s, SGOutput sgOut) -> (ComponentResult _rv, Handle dataRef, OSType dataRefType)")},
- {"SGWriteExtendedMovieData", (PyCFunction)Qt_SGWriteExtendedMovieData, 1,
- PyDoc_STR("(SeqGrabComponent s, SGChannel c, Ptr p, long len) -> (ComponentResult _rv, wide offset, SGOutput sgOut)")},
- {"SGGetStorageSpaceRemaining64", (PyCFunction)Qt_SGGetStorageSpaceRemaining64, 1,
- PyDoc_STR("(SeqGrabComponent s) -> (ComponentResult _rv, wide bytes)")},
- {"SGGetDataOutputStorageSpaceRemaining64", (PyCFunction)Qt_SGGetDataOutputStorageSpaceRemaining64, 1,
- PyDoc_STR("(SeqGrabComponent s, SGOutput sgOut) -> (ComponentResult _rv, wide space)")},
- {"SGWriteMovieData", (PyCFunction)Qt_SGWriteMovieData, 1,
- PyDoc_STR("(SeqGrabComponent s, SGChannel c, Ptr p, long len) -> (ComponentResult _rv, long offset)")},
- {"SGGetTimeBase", (PyCFunction)Qt_SGGetTimeBase, 1,
- PyDoc_STR("(SeqGrabComponent s) -> (ComponentResult _rv, TimeBase tb)")},
- {"SGAddMovieData", (PyCFunction)Qt_SGAddMovieData, 1,
- PyDoc_STR("(SeqGrabComponent s, SGChannel c, Ptr p, long len, long chRefCon, TimeValue time, short writeType) -> (ComponentResult _rv, long offset)")},
- {"SGChangedSource", (PyCFunction)Qt_SGChangedSource, 1,
- PyDoc_STR("(SeqGrabComponent s, SGChannel c) -> (ComponentResult _rv)")},
- {"SGAddExtendedMovieData", (PyCFunction)Qt_SGAddExtendedMovieData, 1,
- PyDoc_STR("(SeqGrabComponent s, SGChannel c, Ptr p, long len, long chRefCon, TimeValue time, short writeType) -> (ComponentResult _rv, wide offset, SGOutput whichOutput)")},
- {"SGAddOutputDataRefToMedia", (PyCFunction)Qt_SGAddOutputDataRefToMedia, 1,
- PyDoc_STR("(SeqGrabComponent s, SGOutput sgOut, Media theMedia, SampleDescriptionHandle desc) -> (ComponentResult _rv)")},
- {"SGSetSettingsSummary", (PyCFunction)Qt_SGSetSettingsSummary, 1,
- PyDoc_STR("(SeqGrabComponent s, Handle summaryText) -> (ComponentResult _rv)")},
- {"SGSetChannelUsage", (PyCFunction)Qt_SGSetChannelUsage, 1,
- PyDoc_STR("(SGChannel c, long usage) -> (ComponentResult _rv)")},
- {"SGGetChannelUsage", (PyCFunction)Qt_SGGetChannelUsage, 1,
- PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, long usage)")},
- {"SGSetChannelBounds", (PyCFunction)Qt_SGSetChannelBounds, 1,
- PyDoc_STR("(SGChannel c, Rect bounds) -> (ComponentResult _rv)")},
- {"SGGetChannelBounds", (PyCFunction)Qt_SGGetChannelBounds, 1,
- PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, Rect bounds)")},
- {"SGSetChannelVolume", (PyCFunction)Qt_SGSetChannelVolume, 1,
- PyDoc_STR("(SGChannel c, short volume) -> (ComponentResult _rv)")},
- {"SGGetChannelVolume", (PyCFunction)Qt_SGGetChannelVolume, 1,
- PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, short volume)")},
- {"SGGetChannelInfo", (PyCFunction)Qt_SGGetChannelInfo, 1,
- PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, long channelInfo)")},
- {"SGSetChannelPlayFlags", (PyCFunction)Qt_SGSetChannelPlayFlags, 1,
- PyDoc_STR("(SGChannel c, long playFlags) -> (ComponentResult _rv)")},
- {"SGGetChannelPlayFlags", (PyCFunction)Qt_SGGetChannelPlayFlags, 1,
- PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, long playFlags)")},
- {"SGSetChannelMaxFrames", (PyCFunction)Qt_SGSetChannelMaxFrames, 1,
- PyDoc_STR("(SGChannel c, long frameCount) -> (ComponentResult _rv)")},
- {"SGGetChannelMaxFrames", (PyCFunction)Qt_SGGetChannelMaxFrames, 1,
- PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, long frameCount)")},
- {"SGSetChannelRefCon", (PyCFunction)Qt_SGSetChannelRefCon, 1,
- PyDoc_STR("(SGChannel c, long refCon) -> (ComponentResult _rv)")},
- {"SGSetChannelClip", (PyCFunction)Qt_SGSetChannelClip, 1,
- PyDoc_STR("(SGChannel c, RgnHandle theClip) -> (ComponentResult _rv)")},
- {"SGGetChannelClip", (PyCFunction)Qt_SGGetChannelClip, 1,
- PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, RgnHandle theClip)")},
- {"SGGetChannelSampleDescription", (PyCFunction)Qt_SGGetChannelSampleDescription, 1,
- PyDoc_STR("(SGChannel c, Handle sampleDesc) -> (ComponentResult _rv)")},
- {"SGSetChannelDevice", (PyCFunction)Qt_SGSetChannelDevice, 1,
- PyDoc_STR("(SGChannel c, StringPtr name) -> (ComponentResult _rv)")},
- {"SGGetChannelTimeScale", (PyCFunction)Qt_SGGetChannelTimeScale, 1,
- PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, TimeScale scale)")},
- {"SGChannelPutPicture", (PyCFunction)Qt_SGChannelPutPicture, 1,
- PyDoc_STR("(SGChannel c) -> (ComponentResult _rv)")},
- {"SGChannelSetRequestedDataRate", (PyCFunction)Qt_SGChannelSetRequestedDataRate, 1,
- PyDoc_STR("(SGChannel c, long bytesPerSecond) -> (ComponentResult _rv)")},
- {"SGChannelGetRequestedDataRate", (PyCFunction)Qt_SGChannelGetRequestedDataRate, 1,
- PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, long bytesPerSecond)")},
- {"SGChannelSetDataSourceName", (PyCFunction)Qt_SGChannelSetDataSourceName, 1,
- PyDoc_STR("(SGChannel c, Str255 name, ScriptCode scriptTag) -> (ComponentResult _rv)")},
- {"SGChannelGetDataSourceName", (PyCFunction)Qt_SGChannelGetDataSourceName, 1,
- PyDoc_STR("(SGChannel c, Str255 name) -> (ComponentResult _rv, ScriptCode scriptTag)")},
- {"SGChannelSetCodecSettings", (PyCFunction)Qt_SGChannelSetCodecSettings, 1,
- PyDoc_STR("(SGChannel c, Handle settings) -> (ComponentResult _rv)")},
- {"SGChannelGetCodecSettings", (PyCFunction)Qt_SGChannelGetCodecSettings, 1,
- PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, Handle settings)")},
- {"SGGetChannelTimeBase", (PyCFunction)Qt_SGGetChannelTimeBase, 1,
- PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, TimeBase tb)")},
- {"SGGetChannelRefCon", (PyCFunction)Qt_SGGetChannelRefCon, 1,
- PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, long refCon)")},
- {"SGGetChannelDeviceAndInputNames", (PyCFunction)Qt_SGGetChannelDeviceAndInputNames, 1,
- PyDoc_STR("(SGChannel c, Str255 outDeviceName, Str255 outInputName) -> (ComponentResult _rv, short outInputNumber)")},
- {"SGSetChannelDeviceInput", (PyCFunction)Qt_SGSetChannelDeviceInput, 1,
- PyDoc_STR("(SGChannel c, short inInputNumber) -> (ComponentResult _rv)")},
- {"SGSetChannelSettingsStateChanging", (PyCFunction)Qt_SGSetChannelSettingsStateChanging, 1,
- PyDoc_STR("(SGChannel c, UInt32 inFlags) -> (ComponentResult _rv)")},
- {"SGInitChannel", (PyCFunction)Qt_SGInitChannel, 1,
- PyDoc_STR("(SGChannel c, SeqGrabComponent owner) -> (ComponentResult _rv)")},
- {"SGWriteSamples", (PyCFunction)Qt_SGWriteSamples, 1,
- PyDoc_STR("(SGChannel c, Movie m, AliasHandle theFile) -> (ComponentResult _rv)")},
- {"SGGetDataRate", (PyCFunction)Qt_SGGetDataRate, 1,
- PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, long bytesPerSecond)")},
- {"SGAlignChannelRect", (PyCFunction)Qt_SGAlignChannelRect, 1,
- PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, Rect r)")},
- {"SGPanelGetDitl", (PyCFunction)Qt_SGPanelGetDitl, 1,
- PyDoc_STR("(SeqGrabComponent s) -> (ComponentResult _rv, Handle ditl)")},
- {"SGPanelGetTitle", (PyCFunction)Qt_SGPanelGetTitle, 1,
- PyDoc_STR("(SeqGrabComponent s, Str255 title) -> (ComponentResult _rv)")},
- {"SGPanelCanRun", (PyCFunction)Qt_SGPanelCanRun, 1,
- PyDoc_STR("(SeqGrabComponent s, SGChannel c) -> (ComponentResult _rv)")},
- {"SGPanelInstall", (PyCFunction)Qt_SGPanelInstall, 1,
- PyDoc_STR("(SeqGrabComponent s, SGChannel c, DialogPtr d, short itemOffset) -> (ComponentResult _rv)")},
- {"SGPanelEvent", (PyCFunction)Qt_SGPanelEvent, 1,
- PyDoc_STR("(SeqGrabComponent s, SGChannel c, DialogPtr d, short itemOffset, EventRecord theEvent) -> (ComponentResult _rv, short itemHit, Boolean handled)")},
- {"SGPanelItem", (PyCFunction)Qt_SGPanelItem, 1,
- PyDoc_STR("(SeqGrabComponent s, SGChannel c, DialogPtr d, short itemOffset, short itemNum) -> (ComponentResult _rv)")},
- {"SGPanelRemove", (PyCFunction)Qt_SGPanelRemove, 1,
- PyDoc_STR("(SeqGrabComponent s, SGChannel c, DialogPtr d, short itemOffset) -> (ComponentResult _rv)")},
- {"SGPanelSetGrabber", (PyCFunction)Qt_SGPanelSetGrabber, 1,
- PyDoc_STR("(SeqGrabComponent s, SeqGrabComponent sg) -> (ComponentResult _rv)")},
- {"SGPanelSetResFile", (PyCFunction)Qt_SGPanelSetResFile, 1,
- PyDoc_STR("(SeqGrabComponent s, short resRef) -> (ComponentResult _rv)")},
- {"SGPanelGetSettings", (PyCFunction)Qt_SGPanelGetSettings, 1,
- PyDoc_STR("(SeqGrabComponent s, SGChannel c, long flags) -> (ComponentResult _rv, UserData ud)")},
- {"SGPanelSetSettings", (PyCFunction)Qt_SGPanelSetSettings, 1,
- PyDoc_STR("(SeqGrabComponent s, SGChannel c, UserData ud, long flags) -> (ComponentResult _rv)")},
- {"SGPanelValidateInput", (PyCFunction)Qt_SGPanelValidateInput, 1,
- PyDoc_STR("(SeqGrabComponent s) -> (ComponentResult _rv, Boolean ok)")},
- {"SGPanelGetDITLForSize", (PyCFunction)Qt_SGPanelGetDITLForSize, 1,
- PyDoc_STR("(SeqGrabComponent s) -> (ComponentResult _rv, Handle ditl, Point requestedSize)")},
- {"SGGetSrcVideoBounds", (PyCFunction)Qt_SGGetSrcVideoBounds, 1,
- PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, Rect r)")},
- {"SGSetVideoRect", (PyCFunction)Qt_SGSetVideoRect, 1,
- PyDoc_STR("(SGChannel c, Rect r) -> (ComponentResult _rv)")},
- {"SGGetVideoRect", (PyCFunction)Qt_SGGetVideoRect, 1,
- PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, Rect r)")},
- {"SGGetVideoCompressorType", (PyCFunction)Qt_SGGetVideoCompressorType, 1,
- PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, OSType compressorType)")},
- {"SGSetVideoCompressorType", (PyCFunction)Qt_SGSetVideoCompressorType, 1,
- PyDoc_STR("(SGChannel c, OSType compressorType) -> (ComponentResult _rv)")},
- {"SGSetVideoCompressor", (PyCFunction)Qt_SGSetVideoCompressor, 1,
- PyDoc_STR("(SGChannel c, short depth, CompressorComponent compressor, CodecQ spatialQuality, CodecQ temporalQuality, long keyFrameRate) -> (ComponentResult _rv)")},
- {"SGGetVideoCompressor", (PyCFunction)Qt_SGGetVideoCompressor, 1,
- PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, short depth, CompressorComponent compressor, CodecQ spatialQuality, CodecQ temporalQuality, long keyFrameRate)")},
- {"SGGetVideoDigitizerComponent", (PyCFunction)Qt_SGGetVideoDigitizerComponent, 1,
- PyDoc_STR("(SGChannel c) -> (ComponentInstance _rv)")},
- {"SGSetVideoDigitizerComponent", (PyCFunction)Qt_SGSetVideoDigitizerComponent, 1,
- PyDoc_STR("(SGChannel c, ComponentInstance vdig) -> (ComponentResult _rv)")},
- {"SGVideoDigitizerChanged", (PyCFunction)Qt_SGVideoDigitizerChanged, 1,
- PyDoc_STR("(SGChannel c) -> (ComponentResult _rv)")},
- {"SGGrabFrame", (PyCFunction)Qt_SGGrabFrame, 1,
- PyDoc_STR("(SGChannel c, short bufferNum) -> (ComponentResult _rv)")},
- {"SGGrabFrameComplete", (PyCFunction)Qt_SGGrabFrameComplete, 1,
- PyDoc_STR("(SGChannel c, short bufferNum) -> (ComponentResult _rv, Boolean done)")},
- {"SGCompressFrame", (PyCFunction)Qt_SGCompressFrame, 1,
- PyDoc_STR("(SGChannel c, short bufferNum) -> (ComponentResult _rv)")},
- {"SGSetCompressBuffer", (PyCFunction)Qt_SGSetCompressBuffer, 1,
- PyDoc_STR("(SGChannel c, short depth, Rect compressSize) -> (ComponentResult _rv)")},
- {"SGGetCompressBuffer", (PyCFunction)Qt_SGGetCompressBuffer, 1,
- PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, short depth, Rect compressSize)")},
- {"SGGetBufferInfo", (PyCFunction)Qt_SGGetBufferInfo, 1,
- PyDoc_STR("(SGChannel c, short bufferNum) -> (ComponentResult _rv, PixMapHandle bufferPM, Rect bufferRect, GWorldPtr compressBuffer, Rect compressBufferRect)")},
- {"SGSetUseScreenBuffer", (PyCFunction)Qt_SGSetUseScreenBuffer, 1,
- PyDoc_STR("(SGChannel c, Boolean useScreenBuffer) -> (ComponentResult _rv)")},
- {"SGGetUseScreenBuffer", (PyCFunction)Qt_SGGetUseScreenBuffer, 1,
- PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, Boolean useScreenBuffer)")},
- {"SGSetFrameRate", (PyCFunction)Qt_SGSetFrameRate, 1,
- PyDoc_STR("(SGChannel c, Fixed frameRate) -> (ComponentResult _rv)")},
- {"SGGetFrameRate", (PyCFunction)Qt_SGGetFrameRate, 1,
- PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, Fixed frameRate)")},
- {"SGSetPreferredPacketSize", (PyCFunction)Qt_SGSetPreferredPacketSize, 1,
- PyDoc_STR("(SGChannel c, long preferredPacketSizeInBytes) -> (ComponentResult _rv)")},
- {"SGGetPreferredPacketSize", (PyCFunction)Qt_SGGetPreferredPacketSize, 1,
- PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, long preferredPacketSizeInBytes)")},
- {"SGSetUserVideoCompressorList", (PyCFunction)Qt_SGSetUserVideoCompressorList, 1,
- PyDoc_STR("(SGChannel c, Handle compressorTypes) -> (ComponentResult _rv)")},
- {"SGGetUserVideoCompressorList", (PyCFunction)Qt_SGGetUserVideoCompressorList, 1,
- PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, Handle compressorTypes)")},
- {"SGSetSoundInputDriver", (PyCFunction)Qt_SGSetSoundInputDriver, 1,
- PyDoc_STR("(SGChannel c, Str255 driverName) -> (ComponentResult _rv)")},
- {"SGGetSoundInputDriver", (PyCFunction)Qt_SGGetSoundInputDriver, 1,
- PyDoc_STR("(SGChannel c) -> (long _rv)")},
- {"SGSoundInputDriverChanged", (PyCFunction)Qt_SGSoundInputDriverChanged, 1,
- PyDoc_STR("(SGChannel c) -> (ComponentResult _rv)")},
- {"SGSetSoundRecordChunkSize", (PyCFunction)Qt_SGSetSoundRecordChunkSize, 1,
- PyDoc_STR("(SGChannel c, long seconds) -> (ComponentResult _rv)")},
- {"SGGetSoundRecordChunkSize", (PyCFunction)Qt_SGGetSoundRecordChunkSize, 1,
- PyDoc_STR("(SGChannel c) -> (long _rv)")},
- {"SGSetSoundInputRate", (PyCFunction)Qt_SGSetSoundInputRate, 1,
- PyDoc_STR("(SGChannel c, Fixed rate) -> (ComponentResult _rv)")},
- {"SGGetSoundInputRate", (PyCFunction)Qt_SGGetSoundInputRate, 1,
- PyDoc_STR("(SGChannel c) -> (Fixed _rv)")},
- {"SGSetSoundInputParameters", (PyCFunction)Qt_SGSetSoundInputParameters, 1,
- PyDoc_STR("(SGChannel c, short sampleSize, short numChannels, OSType compressionType) -> (ComponentResult _rv)")},
- {"SGGetSoundInputParameters", (PyCFunction)Qt_SGGetSoundInputParameters, 1,
- PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, short sampleSize, short numChannels, OSType compressionType)")},
- {"SGSetAdditionalSoundRates", (PyCFunction)Qt_SGSetAdditionalSoundRates, 1,
- PyDoc_STR("(SGChannel c, Handle rates) -> (ComponentResult _rv)")},
- {"SGGetAdditionalSoundRates", (PyCFunction)Qt_SGGetAdditionalSoundRates, 1,
- PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, Handle rates)")},
- {"SGSetFontName", (PyCFunction)Qt_SGSetFontName, 1,
- PyDoc_STR("(SGChannel c, StringPtr pstr) -> (ComponentResult _rv)")},
- {"SGSetFontSize", (PyCFunction)Qt_SGSetFontSize, 1,
- PyDoc_STR("(SGChannel c, short fontSize) -> (ComponentResult _rv)")},
- {"SGSetTextForeColor", (PyCFunction)Qt_SGSetTextForeColor, 1,
- PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, RGBColor theColor)")},
- {"SGSetTextBackColor", (PyCFunction)Qt_SGSetTextBackColor, 1,
- PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, RGBColor theColor)")},
- {"SGSetJustification", (PyCFunction)Qt_SGSetJustification, 1,
- PyDoc_STR("(SGChannel c, short just) -> (ComponentResult _rv)")},
- {"SGGetTextReturnToSpaceValue", (PyCFunction)Qt_SGGetTextReturnToSpaceValue, 1,
- PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, short rettospace)")},
- {"SGSetTextReturnToSpaceValue", (PyCFunction)Qt_SGSetTextReturnToSpaceValue, 1,
- PyDoc_STR("(SGChannel c, short rettospace) -> (ComponentResult _rv)")},
- {"QTVideoOutputGetCurrentClientName", (PyCFunction)Qt_QTVideoOutputGetCurrentClientName, 1,
- PyDoc_STR("(QTVideoOutputComponent vo, Str255 str) -> (ComponentResult _rv)")},
- {"QTVideoOutputSetClientName", (PyCFunction)Qt_QTVideoOutputSetClientName, 1,
- PyDoc_STR("(QTVideoOutputComponent vo, Str255 str) -> (ComponentResult _rv)")},
- {"QTVideoOutputGetClientName", (PyCFunction)Qt_QTVideoOutputGetClientName, 1,
- PyDoc_STR("(QTVideoOutputComponent vo, Str255 str) -> (ComponentResult _rv)")},
- {"QTVideoOutputBegin", (PyCFunction)Qt_QTVideoOutputBegin, 1,
- PyDoc_STR("(QTVideoOutputComponent vo) -> (ComponentResult _rv)")},
- {"QTVideoOutputEnd", (PyCFunction)Qt_QTVideoOutputEnd, 1,
- PyDoc_STR("(QTVideoOutputComponent vo) -> (ComponentResult _rv)")},
- {"QTVideoOutputSetDisplayMode", (PyCFunction)Qt_QTVideoOutputSetDisplayMode, 1,
- PyDoc_STR("(QTVideoOutputComponent vo, long displayModeID) -> (ComponentResult _rv)")},
- {"QTVideoOutputGetDisplayMode", (PyCFunction)Qt_QTVideoOutputGetDisplayMode, 1,
- PyDoc_STR("(QTVideoOutputComponent vo) -> (ComponentResult _rv, long displayModeID)")},
- {"QTVideoOutputGetGWorld", (PyCFunction)Qt_QTVideoOutputGetGWorld, 1,
- PyDoc_STR("(QTVideoOutputComponent vo) -> (ComponentResult _rv, GWorldPtr gw)")},
- {"QTVideoOutputGetIndSoundOutput", (PyCFunction)Qt_QTVideoOutputGetIndSoundOutput, 1,
- PyDoc_STR("(QTVideoOutputComponent vo, long index) -> (ComponentResult _rv, Component outputComponent)")},
- {"QTVideoOutputGetClock", (PyCFunction)Qt_QTVideoOutputGetClock, 1,
- PyDoc_STR("(QTVideoOutputComponent vo) -> (ComponentResult _rv, ComponentInstance clock)")},
- {"QTVideoOutputSetEchoPort", (PyCFunction)Qt_QTVideoOutputSetEchoPort, 1,
- PyDoc_STR("(QTVideoOutputComponent vo, CGrafPtr echoPort) -> (ComponentResult _rv)")},
- {"QTVideoOutputGetIndImageDecompressor", (PyCFunction)Qt_QTVideoOutputGetIndImageDecompressor, 1,
- PyDoc_STR("(QTVideoOutputComponent vo, long index) -> (ComponentResult _rv, Component codec)")},
- {"QTVideoOutputBaseSetEchoPort", (PyCFunction)Qt_QTVideoOutputBaseSetEchoPort, 1,
- PyDoc_STR("(QTVideoOutputComponent vo, CGrafPtr echoPort) -> (ComponentResult _rv)")},
- {"MediaSetChunkManagementFlags", (PyCFunction)Qt_MediaSetChunkManagementFlags, 1,
- PyDoc_STR("(MediaHandler mh, UInt32 flags, UInt32 flagsMask) -> (ComponentResult _rv)")},
- {"MediaGetChunkManagementFlags", (PyCFunction)Qt_MediaGetChunkManagementFlags, 1,
- PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, UInt32 flags)")},
- {"MediaSetPurgeableChunkMemoryAllowance", (PyCFunction)Qt_MediaSetPurgeableChunkMemoryAllowance, 1,
- PyDoc_STR("(MediaHandler mh, Size allowance) -> (ComponentResult _rv)")},
- {"MediaGetPurgeableChunkMemoryAllowance", (PyCFunction)Qt_MediaGetPurgeableChunkMemoryAllowance, 1,
- PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, Size allowance)")},
- {"MediaEmptyAllPurgeableChunks", (PyCFunction)Qt_MediaEmptyAllPurgeableChunks, 1,
- PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv)")},
- {"MediaSetHandlerCapabilities", (PyCFunction)Qt_MediaSetHandlerCapabilities, 1,
- PyDoc_STR("(MediaHandler mh, long flags, long flagsMask) -> (ComponentResult _rv)")},
- {"MediaIdle", (PyCFunction)Qt_MediaIdle, 1,
- PyDoc_STR("(MediaHandler mh, TimeValue atMediaTime, long flagsIn, TimeRecord movieTime) -> (ComponentResult _rv, long flagsOut)")},
- {"MediaGetMediaInfo", (PyCFunction)Qt_MediaGetMediaInfo, 1,
- PyDoc_STR("(MediaHandler mh, Handle h) -> (ComponentResult _rv)")},
- {"MediaPutMediaInfo", (PyCFunction)Qt_MediaPutMediaInfo, 1,
- PyDoc_STR("(MediaHandler mh, Handle h) -> (ComponentResult _rv)")},
- {"MediaSetActive", (PyCFunction)Qt_MediaSetActive, 1,
- PyDoc_STR("(MediaHandler mh, Boolean enableMedia) -> (ComponentResult _rv)")},
- {"MediaSetRate", (PyCFunction)Qt_MediaSetRate, 1,
- PyDoc_STR("(MediaHandler mh, Fixed rate) -> (ComponentResult _rv)")},
- {"MediaGGetStatus", (PyCFunction)Qt_MediaGGetStatus, 1,
- PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, ComponentResult statusErr)")},
- {"MediaTrackEdited", (PyCFunction)Qt_MediaTrackEdited, 1,
- PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv)")},
- {"MediaSetMediaTimeScale", (PyCFunction)Qt_MediaSetMediaTimeScale, 1,
- PyDoc_STR("(MediaHandler mh, TimeScale newTimeScale) -> (ComponentResult _rv)")},
- {"MediaSetMovieTimeScale", (PyCFunction)Qt_MediaSetMovieTimeScale, 1,
- PyDoc_STR("(MediaHandler mh, TimeScale newTimeScale) -> (ComponentResult _rv)")},
- {"MediaSetGWorld", (PyCFunction)Qt_MediaSetGWorld, 1,
- PyDoc_STR("(MediaHandler mh, CGrafPtr aPort, GDHandle aGD) -> (ComponentResult _rv)")},
- {"MediaSetDimensions", (PyCFunction)Qt_MediaSetDimensions, 1,
- PyDoc_STR("(MediaHandler mh, Fixed width, Fixed height) -> (ComponentResult _rv)")},
- {"MediaSetClip", (PyCFunction)Qt_MediaSetClip, 1,
- PyDoc_STR("(MediaHandler mh, RgnHandle theClip) -> (ComponentResult _rv)")},
- {"MediaGetTrackOpaque", (PyCFunction)Qt_MediaGetTrackOpaque, 1,
- PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, Boolean trackIsOpaque)")},
- {"MediaSetGraphicsMode", (PyCFunction)Qt_MediaSetGraphicsMode, 1,
- PyDoc_STR("(MediaHandler mh, long mode, RGBColor opColor) -> (ComponentResult _rv)")},
- {"MediaGetGraphicsMode", (PyCFunction)Qt_MediaGetGraphicsMode, 1,
- PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, long mode, RGBColor opColor)")},
- {"MediaGSetVolume", (PyCFunction)Qt_MediaGSetVolume, 1,
- PyDoc_STR("(MediaHandler mh, short volume) -> (ComponentResult _rv)")},
- {"MediaSetSoundBalance", (PyCFunction)Qt_MediaSetSoundBalance, 1,
- PyDoc_STR("(MediaHandler mh, short balance) -> (ComponentResult _rv)")},
- {"MediaGetSoundBalance", (PyCFunction)Qt_MediaGetSoundBalance, 1,
- PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, short balance)")},
- {"MediaGetNextBoundsChange", (PyCFunction)Qt_MediaGetNextBoundsChange, 1,
- PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, TimeValue when)")},
- {"MediaGetSrcRgn", (PyCFunction)Qt_MediaGetSrcRgn, 1,
- PyDoc_STR("(MediaHandler mh, RgnHandle rgn, TimeValue atMediaTime) -> (ComponentResult _rv)")},
- {"MediaPreroll", (PyCFunction)Qt_MediaPreroll, 1,
- PyDoc_STR("(MediaHandler mh, TimeValue time, Fixed rate) -> (ComponentResult _rv)")},
- {"MediaSampleDescriptionChanged", (PyCFunction)Qt_MediaSampleDescriptionChanged, 1,
- PyDoc_STR("(MediaHandler mh, long index) -> (ComponentResult _rv)")},
- {"MediaHasCharacteristic", (PyCFunction)Qt_MediaHasCharacteristic, 1,
- PyDoc_STR("(MediaHandler mh, OSType characteristic) -> (ComponentResult _rv, Boolean hasIt)")},
- {"MediaGetOffscreenBufferSize", (PyCFunction)Qt_MediaGetOffscreenBufferSize, 1,
- PyDoc_STR("(MediaHandler mh, short depth, CTabHandle ctab) -> (ComponentResult _rv, Rect bounds)")},
- {"MediaSetHints", (PyCFunction)Qt_MediaSetHints, 1,
- PyDoc_STR("(MediaHandler mh, long hints) -> (ComponentResult _rv)")},
- {"MediaGetName", (PyCFunction)Qt_MediaGetName, 1,
- PyDoc_STR("(MediaHandler mh, Str255 name, long requestedLanguage) -> (ComponentResult _rv, long actualLanguage)")},
- {"MediaForceUpdate", (PyCFunction)Qt_MediaForceUpdate, 1,
- PyDoc_STR("(MediaHandler mh, long forceUpdateFlags) -> (ComponentResult _rv)")},
- {"MediaGetDrawingRgn", (PyCFunction)Qt_MediaGetDrawingRgn, 1,
- PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, RgnHandle partialRgn)")},
- {"MediaGSetActiveSegment", (PyCFunction)Qt_MediaGSetActiveSegment, 1,
- PyDoc_STR("(MediaHandler mh, TimeValue activeStart, TimeValue activeDuration) -> (ComponentResult _rv)")},
- {"MediaInvalidateRegion", (PyCFunction)Qt_MediaInvalidateRegion, 1,
- PyDoc_STR("(MediaHandler mh, RgnHandle invalRgn) -> (ComponentResult _rv)")},
- {"MediaGetNextStepTime", (PyCFunction)Qt_MediaGetNextStepTime, 1,
- PyDoc_STR("(MediaHandler mh, short flags, TimeValue mediaTimeIn, Fixed rate) -> (ComponentResult _rv, TimeValue mediaTimeOut)")},
- {"MediaChangedNonPrimarySource", (PyCFunction)Qt_MediaChangedNonPrimarySource, 1,
- PyDoc_STR("(MediaHandler mh, long inputIndex) -> (ComponentResult _rv)")},
- {"MediaTrackReferencesChanged", (PyCFunction)Qt_MediaTrackReferencesChanged, 1,
- PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv)")},
- {"MediaReleaseSampleDataPointer", (PyCFunction)Qt_MediaReleaseSampleDataPointer, 1,
- PyDoc_STR("(MediaHandler mh, long sampleNum) -> (ComponentResult _rv)")},
- {"MediaTrackPropertyAtomChanged", (PyCFunction)Qt_MediaTrackPropertyAtomChanged, 1,
- PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv)")},
- {"MediaSetVideoParam", (PyCFunction)Qt_MediaSetVideoParam, 1,
- PyDoc_STR("(MediaHandler mh, long whichParam) -> (ComponentResult _rv, unsigned short value)")},
- {"MediaGetVideoParam", (PyCFunction)Qt_MediaGetVideoParam, 1,
- PyDoc_STR("(MediaHandler mh, long whichParam) -> (ComponentResult _rv, unsigned short value)")},
- {"MediaCompare", (PyCFunction)Qt_MediaCompare, 1,
- PyDoc_STR("(MediaHandler mh, Media srcMedia, ComponentInstance srcMediaComponent) -> (ComponentResult _rv, Boolean isOK)")},
- {"MediaGetClock", (PyCFunction)Qt_MediaGetClock, 1,
- PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, ComponentInstance clock)")},
- {"MediaSetSoundOutputComponent", (PyCFunction)Qt_MediaSetSoundOutputComponent, 1,
- PyDoc_STR("(MediaHandler mh, Component outputComponent) -> (ComponentResult _rv)")},
- {"MediaGetSoundOutputComponent", (PyCFunction)Qt_MediaGetSoundOutputComponent, 1,
- PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, Component outputComponent)")},
- {"MediaSetSoundLocalizationData", (PyCFunction)Qt_MediaSetSoundLocalizationData, 1,
- PyDoc_STR("(MediaHandler mh, Handle data) -> (ComponentResult _rv)")},
- {"MediaGetInvalidRegion", (PyCFunction)Qt_MediaGetInvalidRegion, 1,
- PyDoc_STR("(MediaHandler mh, RgnHandle rgn) -> (ComponentResult _rv)")},
- {"MediaSampleDescriptionB2N", (PyCFunction)Qt_MediaSampleDescriptionB2N, 1,
- PyDoc_STR("(MediaHandler mh, SampleDescriptionHandle sampleDescriptionH) -> (ComponentResult _rv)")},
- {"MediaSampleDescriptionN2B", (PyCFunction)Qt_MediaSampleDescriptionN2B, 1,
- PyDoc_STR("(MediaHandler mh, SampleDescriptionHandle sampleDescriptionH) -> (ComponentResult _rv)")},
- {"MediaFlushNonPrimarySourceData", (PyCFunction)Qt_MediaFlushNonPrimarySourceData, 1,
- PyDoc_STR("(MediaHandler mh, long inputIndex) -> (ComponentResult _rv)")},
- {"MediaGetURLLink", (PyCFunction)Qt_MediaGetURLLink, 1,
- PyDoc_STR("(MediaHandler mh, Point displayWhere) -> (ComponentResult _rv, Handle urlLink)")},
- {"MediaHitTestForTargetRefCon", (PyCFunction)Qt_MediaHitTestForTargetRefCon, 1,
- PyDoc_STR("(MediaHandler mh, long flags, Point loc) -> (ComponentResult _rv, long targetRefCon)")},
- {"MediaHitTestTargetRefCon", (PyCFunction)Qt_MediaHitTestTargetRefCon, 1,
- PyDoc_STR("(MediaHandler mh, long targetRefCon, long flags, Point loc) -> (ComponentResult _rv, Boolean wasHit)")},
- {"MediaDisposeTargetRefCon", (PyCFunction)Qt_MediaDisposeTargetRefCon, 1,
- PyDoc_STR("(MediaHandler mh, long targetRefCon) -> (ComponentResult _rv)")},
- {"MediaTargetRefConsEqual", (PyCFunction)Qt_MediaTargetRefConsEqual, 1,
- PyDoc_STR("(MediaHandler mh, long firstRefCon, long secondRefCon) -> (ComponentResult _rv, Boolean equal)")},
- {"MediaPrePrerollCancel", (PyCFunction)Qt_MediaPrePrerollCancel, 1,
- PyDoc_STR("(MediaHandler mh, void * refcon) -> (ComponentResult _rv)")},
- {"MediaEnterEmptyEdit", (PyCFunction)Qt_MediaEnterEmptyEdit, 1,
- PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv)")},
- {"MediaCurrentMediaQueuedData", (PyCFunction)Qt_MediaCurrentMediaQueuedData, 1,
- PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, long milliSecs)")},
- {"MediaGetEffectiveVolume", (PyCFunction)Qt_MediaGetEffectiveVolume, 1,
- PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, short volume)")},
- {"MediaGetSoundLevelMeteringEnabled", (PyCFunction)Qt_MediaGetSoundLevelMeteringEnabled, 1,
- PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, Boolean enabled)")},
- {"MediaSetSoundLevelMeteringEnabled", (PyCFunction)Qt_MediaSetSoundLevelMeteringEnabled, 1,
- PyDoc_STR("(MediaHandler mh, Boolean enable) -> (ComponentResult _rv)")},
- {"MediaGetEffectiveSoundBalance", (PyCFunction)Qt_MediaGetEffectiveSoundBalance, 1,
- PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, short balance)")},
- {"MediaSetScreenLock", (PyCFunction)Qt_MediaSetScreenLock, 1,
- PyDoc_STR("(MediaHandler mh, Boolean lockIt) -> (ComponentResult _rv)")},
- {"MediaGetErrorString", (PyCFunction)Qt_MediaGetErrorString, 1,
- PyDoc_STR("(MediaHandler mh, ComponentResult theError, Str255 errorString) -> (ComponentResult _rv)")},
- {"MediaGetSoundEqualizerBandLevels", (PyCFunction)Qt_MediaGetSoundEqualizerBandLevels, 1,
- PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, UInt8 bandLevels)")},
- {"MediaDoIdleActions", (PyCFunction)Qt_MediaDoIdleActions, 1,
- PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv)")},
- {"MediaSetSoundBassAndTreble", (PyCFunction)Qt_MediaSetSoundBassAndTreble, 1,
- PyDoc_STR("(MediaHandler mh, short bass, short treble) -> (ComponentResult _rv)")},
- {"MediaGetSoundBassAndTreble", (PyCFunction)Qt_MediaGetSoundBassAndTreble, 1,
- PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, short bass, short treble)")},
- {"MediaTimeBaseChanged", (PyCFunction)Qt_MediaTimeBaseChanged, 1,
- PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv)")},
- {"MediaMCIsPlayerEvent", (PyCFunction)Qt_MediaMCIsPlayerEvent, 1,
- PyDoc_STR("(MediaHandler mh, EventRecord e) -> (ComponentResult _rv, Boolean handledIt)")},
- {"MediaGetMediaLoadState", (PyCFunction)Qt_MediaGetMediaLoadState, 1,
- PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, long mediaLoadState)")},
- {"MediaVideoOutputChanged", (PyCFunction)Qt_MediaVideoOutputChanged, 1,
- PyDoc_STR("(MediaHandler mh, ComponentInstance vout) -> (ComponentResult _rv)")},
- {"MediaEmptySampleCache", (PyCFunction)Qt_MediaEmptySampleCache, 1,
- PyDoc_STR("(MediaHandler mh, long sampleNum, long sampleCount) -> (ComponentResult _rv)")},
- {"MediaGetPublicInfo", (PyCFunction)Qt_MediaGetPublicInfo, 1,
- PyDoc_STR("(MediaHandler mh, OSType infoSelector, void * infoDataPtr) -> (ComponentResult _rv, Size ioDataSize)")},
- {"MediaSetPublicInfo", (PyCFunction)Qt_MediaSetPublicInfo, 1,
- PyDoc_STR("(MediaHandler mh, OSType infoSelector, void * infoDataPtr, Size dataSize) -> (ComponentResult _rv)")},
- {"MediaRefConSetProperty", (PyCFunction)Qt_MediaRefConSetProperty, 1,
- PyDoc_STR("(MediaHandler mh, long refCon, long propertyType, void * propertyValue) -> (ComponentResult _rv)")},
- {"MediaRefConGetProperty", (PyCFunction)Qt_MediaRefConGetProperty, 1,
- PyDoc_STR("(MediaHandler mh, long refCon, long propertyType, void * propertyValue) -> (ComponentResult _rv)")},
- {"MediaNavigateTargetRefCon", (PyCFunction)Qt_MediaNavigateTargetRefCon, 1,
- PyDoc_STR("(MediaHandler mh, long navigation) -> (ComponentResult _rv, long refCon)")},
- {"MediaGGetIdleManager", (PyCFunction)Qt_MediaGGetIdleManager, 1,
- PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, IdleManager pim)")},
- {"MediaGSetIdleManager", (PyCFunction)Qt_MediaGSetIdleManager, 1,
- PyDoc_STR("(MediaHandler mh, IdleManager im) -> (ComponentResult _rv)")},
- {"QTMIDIGetMIDIPorts", (PyCFunction)Qt_QTMIDIGetMIDIPorts, 1,
- PyDoc_STR("(QTMIDIComponent ci) -> (ComponentResult _rv, QTMIDIPortListHandle inputPorts, QTMIDIPortListHandle outputPorts)")},
- {"QTMIDIUseSendPort", (PyCFunction)Qt_QTMIDIUseSendPort, 1,
- PyDoc_STR("(QTMIDIComponent ci, long portIndex, long inUse) -> (ComponentResult _rv)")},
- {"QTMIDISendMIDI", (PyCFunction)Qt_QTMIDISendMIDI, 1,
- PyDoc_STR("(QTMIDIComponent ci, long portIndex, MusicMIDIPacket mp) -> (ComponentResult _rv)")},
- {"MusicGetPart", (PyCFunction)Qt_MusicGetPart, 1,
- PyDoc_STR("(MusicComponent mc, long part) -> (ComponentResult _rv, long midiChannel, long polyphony)")},
- {"MusicSetPart", (PyCFunction)Qt_MusicSetPart, 1,
- PyDoc_STR("(MusicComponent mc, long part, long midiChannel, long polyphony) -> (ComponentResult _rv)")},
- {"MusicSetPartInstrumentNumber", (PyCFunction)Qt_MusicSetPartInstrumentNumber, 1,
- PyDoc_STR("(MusicComponent mc, long part, long instrumentNumber) -> (ComponentResult _rv)")},
- {"MusicGetPartInstrumentNumber", (PyCFunction)Qt_MusicGetPartInstrumentNumber, 1,
- PyDoc_STR("(MusicComponent mc, long part) -> (ComponentResult _rv)")},
- {"MusicStorePartInstrument", (PyCFunction)Qt_MusicStorePartInstrument, 1,
- PyDoc_STR("(MusicComponent mc, long part, long instrumentNumber) -> (ComponentResult _rv)")},
- {"MusicGetPartAtomicInstrument", (PyCFunction)Qt_MusicGetPartAtomicInstrument, 1,
- PyDoc_STR("(MusicComponent mc, long part, long flags) -> (ComponentResult _rv, AtomicInstrument ai)")},
- {"MusicSetPartAtomicInstrument", (PyCFunction)Qt_MusicSetPartAtomicInstrument, 1,
- PyDoc_STR("(MusicComponent mc, long part, AtomicInstrumentPtr aiP, long flags) -> (ComponentResult _rv)")},
- {"MusicGetPartKnob", (PyCFunction)Qt_MusicGetPartKnob, 1,
- PyDoc_STR("(MusicComponent mc, long part, long knobID) -> (ComponentResult _rv)")},
- {"MusicSetPartKnob", (PyCFunction)Qt_MusicSetPartKnob, 1,
- PyDoc_STR("(MusicComponent mc, long part, long knobID, long knobValue) -> (ComponentResult _rv)")},
- {"MusicGetKnob", (PyCFunction)Qt_MusicGetKnob, 1,
- PyDoc_STR("(MusicComponent mc, long knobID) -> (ComponentResult _rv)")},
- {"MusicSetKnob", (PyCFunction)Qt_MusicSetKnob, 1,
- PyDoc_STR("(MusicComponent mc, long knobID, long knobValue) -> (ComponentResult _rv)")},
- {"MusicGetPartName", (PyCFunction)Qt_MusicGetPartName, 1,
- PyDoc_STR("(MusicComponent mc, long part, StringPtr name) -> (ComponentResult _rv)")},
- {"MusicSetPartName", (PyCFunction)Qt_MusicSetPartName, 1,
- PyDoc_STR("(MusicComponent mc, long part, StringPtr name) -> (ComponentResult _rv)")},
- {"MusicPlayNote", (PyCFunction)Qt_MusicPlayNote, 1,
- PyDoc_STR("(MusicComponent mc, long part, long pitch, long velocity) -> (ComponentResult _rv)")},
- {"MusicResetPart", (PyCFunction)Qt_MusicResetPart, 1,
- PyDoc_STR("(MusicComponent mc, long part) -> (ComponentResult _rv)")},
- {"MusicSetPartController", (PyCFunction)Qt_MusicSetPartController, 1,
- PyDoc_STR("(MusicComponent mc, long part, MusicController controllerNumber, long controllerValue) -> (ComponentResult _rv)")},
- {"MusicGetPartController", (PyCFunction)Qt_MusicGetPartController, 1,
- PyDoc_STR("(MusicComponent mc, long part, MusicController controllerNumber) -> (ComponentResult _rv)")},
- {"MusicGetInstrumentNames", (PyCFunction)Qt_MusicGetInstrumentNames, 1,
- PyDoc_STR("(MusicComponent mc, long modifiableInstruments) -> (ComponentResult _rv, Handle instrumentNames, Handle instrumentCategoryLasts, Handle instrumentCategoryNames)")},
- {"MusicGetDrumNames", (PyCFunction)Qt_MusicGetDrumNames, 1,
- PyDoc_STR("(MusicComponent mc, long modifiableInstruments) -> (ComponentResult _rv, Handle instrumentNumbers, Handle instrumentNames)")},
- {"MusicGetMasterTune", (PyCFunction)Qt_MusicGetMasterTune, 1,
- PyDoc_STR("(MusicComponent mc) -> (ComponentResult _rv)")},
- {"MusicSetMasterTune", (PyCFunction)Qt_MusicSetMasterTune, 1,
- PyDoc_STR("(MusicComponent mc, long masterTune) -> (ComponentResult _rv)")},
- {"MusicGetDeviceConnection", (PyCFunction)Qt_MusicGetDeviceConnection, 1,
- PyDoc_STR("(MusicComponent mc, long index) -> (ComponentResult _rv, long id1, long id2)")},
- {"MusicUseDeviceConnection", (PyCFunction)Qt_MusicUseDeviceConnection, 1,
- PyDoc_STR("(MusicComponent mc, long id1, long id2) -> (ComponentResult _rv)")},
- {"MusicGetKnobSettingStrings", (PyCFunction)Qt_MusicGetKnobSettingStrings, 1,
- PyDoc_STR("(MusicComponent mc, long knobIndex, long isGlobal) -> (ComponentResult _rv, Handle settingsNames, Handle settingsCategoryLasts, Handle settingsCategoryNames)")},
- {"MusicGetMIDIPorts", (PyCFunction)Qt_MusicGetMIDIPorts, 1,
- PyDoc_STR("(MusicComponent mc) -> (ComponentResult _rv, long inputPortCount, long outputPortCount)")},
- {"MusicSendMIDI", (PyCFunction)Qt_MusicSendMIDI, 1,
- PyDoc_STR("(MusicComponent mc, long portIndex, MusicMIDIPacket mp) -> (ComponentResult _rv)")},
- {"MusicSetOfflineTimeTo", (PyCFunction)Qt_MusicSetOfflineTimeTo, 1,
- PyDoc_STR("(MusicComponent mc, long newTimeStamp) -> (ComponentResult _rv)")},
- {"MusicGetInfoText", (PyCFunction)Qt_MusicGetInfoText, 1,
- PyDoc_STR("(MusicComponent mc, long selector) -> (ComponentResult _rv, Handle textH, Handle styleH)")},
- {"MusicGetInstrumentInfo", (PyCFunction)Qt_MusicGetInstrumentInfo, 1,
- PyDoc_STR("(MusicComponent mc, long getInstrumentInfoFlags) -> (ComponentResult _rv, InstrumentInfoListHandle infoListH)")},
- {"MusicTask", (PyCFunction)Qt_MusicTask, 1,
- PyDoc_STR("(MusicComponent mc) -> (ComponentResult _rv)")},
- {"MusicSetPartInstrumentNumberInterruptSafe", (PyCFunction)Qt_MusicSetPartInstrumentNumberInterruptSafe, 1,
- PyDoc_STR("(MusicComponent mc, long part, long instrumentNumber) -> (ComponentResult _rv)")},
- {"MusicSetPartSoundLocalization", (PyCFunction)Qt_MusicSetPartSoundLocalization, 1,
- PyDoc_STR("(MusicComponent mc, long part, Handle data) -> (ComponentResult _rv)")},
- {"MusicGenericConfigure", (PyCFunction)Qt_MusicGenericConfigure, 1,
- PyDoc_STR("(MusicComponent mc, long mode, long flags, long baseResID) -> (ComponentResult _rv)")},
- {"MusicGenericGetKnobList", (PyCFunction)Qt_MusicGenericGetKnobList, 1,
- PyDoc_STR("(MusicComponent mc, long knobType) -> (ComponentResult _rv, GenericKnobDescriptionListHandle gkdlH)")},
- {"MusicGenericSetResourceNumbers", (PyCFunction)Qt_MusicGenericSetResourceNumbers, 1,
- PyDoc_STR("(MusicComponent mc, Handle resourceIDH) -> (ComponentResult _rv)")},
- {"MusicDerivedMIDISend", (PyCFunction)Qt_MusicDerivedMIDISend, 1,
- PyDoc_STR("(MusicComponent mc, MusicMIDIPacket packet) -> (ComponentResult _rv)")},
- {"MusicDerivedOpenResFile", (PyCFunction)Qt_MusicDerivedOpenResFile, 1,
- PyDoc_STR("(MusicComponent mc) -> (ComponentResult _rv)")},
- {"MusicDerivedCloseResFile", (PyCFunction)Qt_MusicDerivedCloseResFile, 1,
- PyDoc_STR("(MusicComponent mc, short resRefNum) -> (ComponentResult _rv)")},
- {"NAUnregisterMusicDevice", (PyCFunction)Qt_NAUnregisterMusicDevice, 1,
- PyDoc_STR("(NoteAllocator na, long index) -> (ComponentResult _rv)")},
- {"NASaveMusicConfiguration", (PyCFunction)Qt_NASaveMusicConfiguration, 1,
- PyDoc_STR("(NoteAllocator na) -> (ComponentResult _rv)")},
- {"NAGetMIDIPorts", (PyCFunction)Qt_NAGetMIDIPorts, 1,
- PyDoc_STR("(NoteAllocator na) -> (ComponentResult _rv, QTMIDIPortListHandle inputPorts, QTMIDIPortListHandle outputPorts)")},
- {"NATask", (PyCFunction)Qt_NATask, 1,
- PyDoc_STR("(NoteAllocator na) -> (ComponentResult _rv)")},
- {"TuneSetHeader", (PyCFunction)Qt_TuneSetHeader, 1,
- PyDoc_STR("(TunePlayer tp, unsigned long * header) -> (ComponentResult _rv)")},
- {"TuneGetTimeBase", (PyCFunction)Qt_TuneGetTimeBase, 1,
- PyDoc_STR("(TunePlayer tp) -> (ComponentResult _rv, TimeBase tb)")},
- {"TuneSetTimeScale", (PyCFunction)Qt_TuneSetTimeScale, 1,
- PyDoc_STR("(TunePlayer tp, TimeScale scale) -> (ComponentResult _rv)")},
- {"TuneGetTimeScale", (PyCFunction)Qt_TuneGetTimeScale, 1,
- PyDoc_STR("(TunePlayer tp) -> (ComponentResult _rv, TimeScale scale)")},
- {"TuneInstant", (PyCFunction)Qt_TuneInstant, 1,
- PyDoc_STR("(TunePlayer tp, unsigned long tunePosition) -> (ComponentResult _rv, unsigned long tune)")},
- {"TuneStop", (PyCFunction)Qt_TuneStop, 1,
- PyDoc_STR("(TunePlayer tp, long stopFlags) -> (ComponentResult _rv)")},
- {"TuneSetVolume", (PyCFunction)Qt_TuneSetVolume, 1,
- PyDoc_STR("(TunePlayer tp, Fixed volume) -> (ComponentResult _rv)")},
- {"TuneGetVolume", (PyCFunction)Qt_TuneGetVolume, 1,
- PyDoc_STR("(TunePlayer tp) -> (ComponentResult _rv)")},
- {"TunePreroll", (PyCFunction)Qt_TunePreroll, 1,
- PyDoc_STR("(TunePlayer tp) -> (ComponentResult _rv)")},
- {"TuneUnroll", (PyCFunction)Qt_TuneUnroll, 1,
- PyDoc_STR("(TunePlayer tp) -> (ComponentResult _rv)")},
- {"TuneSetPartTranspose", (PyCFunction)Qt_TuneSetPartTranspose, 1,
- PyDoc_STR("(TunePlayer tp, unsigned long part, long transpose, long velocityShift) -> (ComponentResult _rv)")},
- {"TuneGetNoteAllocator", (PyCFunction)Qt_TuneGetNoteAllocator, 1,
- PyDoc_STR("(TunePlayer tp) -> (NoteAllocator _rv)")},
- {"TuneSetSofter", (PyCFunction)Qt_TuneSetSofter, 1,
- PyDoc_STR("(TunePlayer tp, long softer) -> (ComponentResult _rv)")},
- {"TuneTask", (PyCFunction)Qt_TuneTask, 1,
- PyDoc_STR("(TunePlayer tp) -> (ComponentResult _rv)")},
- {"TuneSetBalance", (PyCFunction)Qt_TuneSetBalance, 1,
- PyDoc_STR("(TunePlayer tp, long balance) -> (ComponentResult _rv)")},
- {"TuneSetSoundLocalization", (PyCFunction)Qt_TuneSetSoundLocalization, 1,
- PyDoc_STR("(TunePlayer tp, Handle data) -> (ComponentResult _rv)")},
- {"TuneSetHeaderWithSize", (PyCFunction)Qt_TuneSetHeaderWithSize, 1,
- PyDoc_STR("(TunePlayer tp, unsigned long * header, unsigned long size) -> (ComponentResult _rv)")},
- {"TuneSetPartMix", (PyCFunction)Qt_TuneSetPartMix, 1,
- PyDoc_STR("(TunePlayer tp, unsigned long partNumber, long volume, long balance, long mixFlags) -> (ComponentResult _rv)")},
- {"TuneGetPartMix", (PyCFunction)Qt_TuneGetPartMix, 1,
- PyDoc_STR("(TunePlayer tp, unsigned long partNumber) -> (ComponentResult _rv, long volumeOut, long balanceOut, long mixFlagsOut)")},
- {"AlignWindow", (PyCFunction)Qt_AlignWindow, 1,
- PyDoc_STR("(WindowPtr wp, Boolean front) -> None")},
- {"DragAlignedWindow", (PyCFunction)Qt_DragAlignedWindow, 1,
- PyDoc_STR("(WindowPtr wp, Point startPt, Rect boundsRect) -> None")},
- {"MoviesTask", (PyCFunction)Qt_MoviesTask, 1,
- PyDoc_STR("(long maxMilliSecToUse) -> None")},
+ {"EnterMovies", (PyCFunction)Qt_EnterMovies, 1,
+ PyDoc_STR("() -> None")},
+ {"ExitMovies", (PyCFunction)Qt_ExitMovies, 1,
+ PyDoc_STR("() -> None")},
+ {"GetMoviesError", (PyCFunction)Qt_GetMoviesError, 1,
+ PyDoc_STR("() -> None")},
+ {"ClearMoviesStickyError", (PyCFunction)Qt_ClearMoviesStickyError, 1,
+ PyDoc_STR("() -> None")},
+ {"GetMoviesStickyError", (PyCFunction)Qt_GetMoviesStickyError, 1,
+ PyDoc_STR("() -> None")},
+ {"QTGetWallClockTimeBase", (PyCFunction)Qt_QTGetWallClockTimeBase, 1,
+ PyDoc_STR("() -> (TimeBase wallClockTimeBase)")},
+ {"QTIdleManagerOpen", (PyCFunction)Qt_QTIdleManagerOpen, 1,
+ PyDoc_STR("() -> (IdleManager _rv)")},
+ {"CreateMovieControl", (PyCFunction)Qt_CreateMovieControl, 1,
+ PyDoc_STR("(WindowPtr theWindow, Movie theMovie, UInt32 options) -> (Rect localRect, ControlHandle returnedControl)")},
+ {"DisposeMatte", (PyCFunction)Qt_DisposeMatte, 1,
+ PyDoc_STR("(PixMapHandle theMatte) -> None")},
+ {"NewMovie", (PyCFunction)Qt_NewMovie, 1,
+ PyDoc_STR("(long flags) -> (Movie _rv)")},
+ {"QTGetTimeUntilNextTask", (PyCFunction)Qt_QTGetTimeUntilNextTask, 1,
+ PyDoc_STR("(long scale) -> (long duration)")},
+ {"GetDataHandler", (PyCFunction)Qt_GetDataHandler, 1,
+ PyDoc_STR("(Handle dataRef, OSType dataHandlerSubType, long flags) -> (Component _rv)")},
+ {"PasteHandleIntoMovie", (PyCFunction)Qt_PasteHandleIntoMovie, 1,
+ PyDoc_STR("(Handle h, OSType handleType, Movie theMovie, long flags, ComponentInstance userComp) -> None")},
+ {"GetMovieImporterForDataRef", (PyCFunction)Qt_GetMovieImporterForDataRef, 1,
+ PyDoc_STR("(OSType dataRefType, Handle dataRef, long flags) -> (Component importer)")},
+ {"QTGetMIMETypeInfo", (PyCFunction)Qt_QTGetMIMETypeInfo, 1,
+ PyDoc_STR("(char* mimeStringStart, short mimeStringLength, OSType infoSelector, void * infoDataPtr) -> (long infoDataSize)")},
+ {"TrackTimeToMediaTime", (PyCFunction)Qt_TrackTimeToMediaTime, 1,
+ PyDoc_STR("(TimeValue value, Track theTrack) -> (TimeValue _rv)")},
+ {"NewUserData", (PyCFunction)Qt_NewUserData, 1,
+ PyDoc_STR("() -> (UserData theUserData)")},
+ {"NewUserDataFromHandle", (PyCFunction)Qt_NewUserDataFromHandle, 1,
+ PyDoc_STR("(Handle h) -> (UserData theUserData)")},
+ {"CreateMovieFile", (PyCFunction)Qt_CreateMovieFile, 1,
+ PyDoc_STR("(FSSpec fileSpec, OSType creator, ScriptCode scriptTag, long createMovieFileFlags) -> (short resRefNum, Movie newmovie)")},
+ {"OpenMovieFile", (PyCFunction)Qt_OpenMovieFile, 1,
+ PyDoc_STR("(FSSpec fileSpec, SInt8 permission) -> (short resRefNum)")},
+ {"CloseMovieFile", (PyCFunction)Qt_CloseMovieFile, 1,
+ PyDoc_STR("(short resRefNum) -> None")},
+ {"DeleteMovieFile", (PyCFunction)Qt_DeleteMovieFile, 1,
+ PyDoc_STR("(FSSpec fileSpec) -> None")},
+ {"NewMovieFromFile", (PyCFunction)Qt_NewMovieFromFile, 1,
+ PyDoc_STR("(short resRefNum, short resId, short newMovieFlags) -> (Movie theMovie, short resId, Boolean dataRefWasChanged)")},
+ {"NewMovieFromHandle", (PyCFunction)Qt_NewMovieFromHandle, 1,
+ PyDoc_STR("(Handle h, short newMovieFlags) -> (Movie theMovie, Boolean dataRefWasChanged)")},
+ {"NewMovieFromDataFork", (PyCFunction)Qt_NewMovieFromDataFork, 1,
+ PyDoc_STR("(short fRefNum, long fileOffset, short newMovieFlags) -> (Movie theMovie, Boolean dataRefWasChanged)")},
+ {"NewMovieFromDataFork64", (PyCFunction)Qt_NewMovieFromDataFork64, 1,
+ PyDoc_STR("(long fRefNum, wide fileOffset, short newMovieFlags) -> (Movie theMovie, Boolean dataRefWasChanged)")},
+ {"NewMovieFromDataRef", (PyCFunction)Qt_NewMovieFromDataRef, 1,
+ PyDoc_STR("(short flags, Handle dataRef, OSType dtaRefType) -> (Movie m, short id)")},
+ {"NewMovieFromStorageOffset", (PyCFunction)Qt_NewMovieFromStorageOffset, 1,
+ PyDoc_STR("(DataHandler dh, wide fileOffset, short newMovieFlags) -> (Movie theMovie, Boolean dataRefWasCataRefType)")},
+ {"NewMovieForDataRefFromHandle", (PyCFunction)Qt_NewMovieForDataRefFromHandle, 1,
+ PyDoc_STR("(Handle h, short newMovieFlags, Handle dataRef, OSType dataRefType) -> (Movie theMovie, Boolean dataRefWasChanged)")},
+ {"RemoveMovieResource", (PyCFunction)Qt_RemoveMovieResource, 1,
+ PyDoc_STR("(short resRefNum, short resId) -> None")},
+ {"CreateMovieStorage", (PyCFunction)Qt_CreateMovieStorage, 1,
+ PyDoc_STR("(Handle dataRef, OSType dataRefType, OSType creator, ScriptCode scriptTag, long createMovieFileFlags) -> (DataHandler outDataHandler, Movie newmovie)")},
+ {"OpenMovieStorage", (PyCFunction)Qt_OpenMovieStorage, 1,
+ PyDoc_STR("(Handle dataRef, OSType dataRefType, long flags) -> (DataHandler outDataHandler)")},
+ {"CloseMovieStorage", (PyCFunction)Qt_CloseMovieStorage, 1,
+ PyDoc_STR("(DataHandler dh) -> None")},
+ {"DeleteMovieStorage", (PyCFunction)Qt_DeleteMovieStorage, 1,
+ PyDoc_STR("(Handle dataRef, OSType dataRefType) -> None")},
+ {"CreateShortcutMovieFile", (PyCFunction)Qt_CreateShortcutMovieFile, 1,
+ PyDoc_STR("(FSSpec fileSpec, OSType creator, ScriptCode scriptTag, long createMovieFileFlags, Handle targetDataRef, OSType targetDataRefType) -> None")},
+ {"CanQuickTimeOpenFile", (PyCFunction)Qt_CanQuickTimeOpenFile, 1,
+ PyDoc_STR("(FSSpec fileSpec, OSType fileType, OSType fileNameExtension, UInt32 inFlags) -> (Boolean outCanOpenWithGraphicsImporter, Boolean outCanOpenAsMovie, Boolean outPreferGraphicsImporter)")},
+ {"CanQuickTimeOpenDataRef", (PyCFunction)Qt_CanQuickTimeOpenDataRef, 1,
+ PyDoc_STR("(Handle dataRef, OSType dataRefType, UInt32 inFlags) -> (Boolean outCanOpenWithGraphicsImporter, Boolean outCanOpenAsMovie, Boolean outPreferGraphicsImporter)")},
+ {"NewMovieFromScrap", (PyCFunction)Qt_NewMovieFromScrap, 1,
+ PyDoc_STR("(long newMovieFlags) -> (Movie _rv)")},
+ {"QTNewAlias", (PyCFunction)Qt_QTNewAlias, 1,
+ PyDoc_STR("(FSSpec fss, Boolean minimal) -> (AliasHandle alias)")},
+ {"EndFullScreen", (PyCFunction)Qt_EndFullScreen, 1,
+ PyDoc_STR("(Ptr fullState, long flags) -> None")},
+ {"AddSoundDescriptionExtension", (PyCFunction)Qt_AddSoundDescriptionExtension, 1,
+ PyDoc_STR("(SoundDescriptionHandle desc, Handle extension, OSType idType) -> None")},
+ {"GetSoundDescriptionExtension", (PyCFunction)Qt_GetSoundDescriptionExtension, 1,
+ PyDoc_STR("(SoundDescriptionHandle desc, OSType idType) -> (Handle extension)")},
+ {"RemoveSoundDescriptionExtension", (PyCFunction)Qt_RemoveSoundDescriptionExtension, 1,
+ PyDoc_STR("(SoundDescriptionHandle desc, OSType idType) -> None")},
+ {"QTIsStandardParameterDialogEvent", (PyCFunction)Qt_QTIsStandardParameterDialogEvent, 1,
+ PyDoc_STR("(QTParameterDialog createdDialog) -> (EventRecord pEvent)")},
+ {"QTDismissStandardParameterDialog", (PyCFunction)Qt_QTDismissStandardParameterDialog, 1,
+ PyDoc_STR("(QTParameterDialog createdDialog) -> None")},
+ {"QTStandardParameterDialogDoAction", (PyCFunction)Qt_QTStandardParameterDialogDoAction, 1,
+ PyDoc_STR("(QTParameterDialog createdDialog, long action, void * params) -> None")},
+ {"QTRegisterAccessKey", (PyCFunction)Qt_QTRegisterAccessKey, 1,
+ PyDoc_STR("(Str255 accessKeyType, long flags, Handle accessKey) -> None")},
+ {"QTUnregisterAccessKey", (PyCFunction)Qt_QTUnregisterAccessKey, 1,
+ PyDoc_STR("(Str255 accessKeyType, long flags, Handle accessKey) -> None")},
+ {"QTGetSupportedRestrictions", (PyCFunction)Qt_QTGetSupportedRestrictions, 1,
+ PyDoc_STR("(OSType inRestrictionClass) -> (UInt32 outRestrictionIDs)")},
+ {"QTTextToNativeText", (PyCFunction)Qt_QTTextToNativeText, 1,
+ PyDoc_STR("(Handle theText, long encoding, long flags) -> None")},
+ {"VideoMediaResetStatistics", (PyCFunction)Qt_VideoMediaResetStatistics, 1,
+ PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv)")},
+ {"VideoMediaGetStatistics", (PyCFunction)Qt_VideoMediaGetStatistics, 1,
+ PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv)")},
+ {"VideoMediaGetStallCount", (PyCFunction)Qt_VideoMediaGetStallCount, 1,
+ PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, unsigned long stalls)")},
+ {"VideoMediaSetCodecParameter", (PyCFunction)Qt_VideoMediaSetCodecParameter, 1,
+ PyDoc_STR("(MediaHandler mh, CodecType cType, OSType parameterID, long parameterChangeSeed, void * dataPtr, long dataSize) -> (ComponentResult _rv)")},
+ {"VideoMediaGetCodecParameter", (PyCFunction)Qt_VideoMediaGetCodecParameter, 1,
+ PyDoc_STR("(MediaHandler mh, CodecType cType, OSType parameterID, Handle outParameterData) -> (ComponentResult _rv)")},
+ {"TextMediaAddTextSample", (PyCFunction)Qt_TextMediaAddTextSample, 1,
+ PyDoc_STR("(MediaHandler mh, Ptr text, unsigned long size, short fontNumber, short fontSize, Style textFace, short textJustification, long displayFlags, TimeValue scrollDelay, short hiliteStart, short hiliteEnd, TimeValue duration) -> (ComponentResult _rv, RGBColor textColor, RGBColor backColor, Rect textBox, RGBColor rgbHiliteColor, TimeValue sampleTime)")},
+ {"TextMediaAddTESample", (PyCFunction)Qt_TextMediaAddTESample, 1,
+ PyDoc_STR("(MediaHandler mh, TEHandle hTE, short textJustification, long displayFlags, TimeValue scrollDelay, short hiliteStart, short hiliteEnd, TimeValue duration) -> (ComponentResult _rv, RGBColor backColor, Rect textBox, RGBColor rgbHiliteColor, TimeValue sampleTime)")},
+ {"TextMediaAddHiliteSample", (PyCFunction)Qt_TextMediaAddHiliteSample, 1,
+ PyDoc_STR("(MediaHandler mh, short hiliteStart, short hiliteEnd, TimeValue duration) -> (ComponentResult _rv, RGBColor rgbHiliteColor, TimeValue sampleTime)")},
+ {"TextMediaDrawRaw", (PyCFunction)Qt_TextMediaDrawRaw, 1,
+ PyDoc_STR("(MediaHandler mh, GWorldPtr gw, GDHandle gd, void * data, long dataSize, TextDescriptionHandle tdh) -> (ComponentResult _rv)")},
+ {"TextMediaSetTextProperty", (PyCFunction)Qt_TextMediaSetTextProperty, 1,
+ PyDoc_STR("(MediaHandler mh, TimeValue atMediaTime, long propertyType, void * data, long dataSize) -> (ComponentResult _rv)")},
+ {"TextMediaRawSetup", (PyCFunction)Qt_TextMediaRawSetup, 1,
+ PyDoc_STR("(MediaHandler mh, GWorldPtr gw, GDHandle gd, void * data, long dataSize, TextDescriptionHandle tdh, TimeValue sampleDuration) -> (ComponentResult _rv)")},
+ {"TextMediaRawIdle", (PyCFunction)Qt_TextMediaRawIdle, 1,
+ PyDoc_STR("(MediaHandler mh, GWorldPtr gw, GDHandle gd, TimeValue sampleTime, long flagsIn) -> (ComponentResult _rv, long flagsOut)")},
+ {"TextMediaGetTextProperty", (PyCFunction)Qt_TextMediaGetTextProperty, 1,
+ PyDoc_STR("(MediaHandler mh, TimeValue atMediaTime, long propertyType, void * data, long dataSize) -> (ComponentResult _rv)")},
+ {"TextMediaFindNextText", (PyCFunction)Qt_TextMediaFindNextText, 1,
+ PyDoc_STR("(MediaHandler mh, Ptr text, long size, short findFlags, TimeValue startTime) -> (ComponentResult _rv, TimeValue foundTime, TimeValue foundDuration, long offset)")},
+ {"TextMediaHiliteTextSample", (PyCFunction)Qt_TextMediaHiliteTextSample, 1,
+ PyDoc_STR("(MediaHandler mh, TimeValue sampleTime, short hiliteStart, short hiliteEnd) -> (ComponentResult _rv, RGBColor rgbHiliteColor)")},
+ {"TextMediaSetTextSampleData", (PyCFunction)Qt_TextMediaSetTextSampleData, 1,
+ PyDoc_STR("(MediaHandler mh, void * data, OSType dataType) -> (ComponentResult _rv)")},
+ {"SpriteMediaSetProperty", (PyCFunction)Qt_SpriteMediaSetProperty, 1,
+ PyDoc_STR("(MediaHandler mh, short spriteIndex, long propertyType, void * propertyValue) -> (ComponentResult _rv)")},
+ {"SpriteMediaGetProperty", (PyCFunction)Qt_SpriteMediaGetProperty, 1,
+ PyDoc_STR("(MediaHandler mh, short spriteIndex, long propertyType, void * propertyValue) -> (ComponentResult _rv)")},
+ {"SpriteMediaHitTestSprites", (PyCFunction)Qt_SpriteMediaHitTestSprites, 1,
+ PyDoc_STR("(MediaHandler mh, long flags, Point loc) -> (ComponentResult _rv, short spriteHitIndex)")},
+ {"SpriteMediaCountSprites", (PyCFunction)Qt_SpriteMediaCountSprites, 1,
+ PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, short numSprites)")},
+ {"SpriteMediaCountImages", (PyCFunction)Qt_SpriteMediaCountImages, 1,
+ PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, short numImages)")},
+ {"SpriteMediaGetIndImageDescription", (PyCFunction)Qt_SpriteMediaGetIndImageDescription, 1,
+ PyDoc_STR("(MediaHandler mh, short imageIndex, ImageDescriptionHandle imageDescription) -> (ComponentResult _rv)")},
+ {"SpriteMediaGetDisplayedSampleNumber", (PyCFunction)Qt_SpriteMediaGetDisplayedSampleNumber, 1,
+ PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, long sampleNum)")},
+ {"SpriteMediaGetSpriteName", (PyCFunction)Qt_SpriteMediaGetSpriteName, 1,
+ PyDoc_STR("(MediaHandler mh, QTAtomID spriteID, Str255 spriteName) -> (ComponentResult _rv)")},
+ {"SpriteMediaGetImageName", (PyCFunction)Qt_SpriteMediaGetImageName, 1,
+ PyDoc_STR("(MediaHandler mh, short imageIndex, Str255 imageName) -> (ComponentResult _rv)")},
+ {"SpriteMediaSetSpriteProperty", (PyCFunction)Qt_SpriteMediaSetSpriteProperty, 1,
+ PyDoc_STR("(MediaHandler mh, QTAtomID spriteID, long propertyType, void * propertyValue) -> (ComponentResult _rv)")},
+ {"SpriteMediaGetSpriteProperty", (PyCFunction)Qt_SpriteMediaGetSpriteProperty, 1,
+ PyDoc_STR("(MediaHandler mh, QTAtomID spriteID, long propertyType, void * propertyValue) -> (ComponentResult _rv)")},
+ {"SpriteMediaHitTestAllSprites", (PyCFunction)Qt_SpriteMediaHitTestAllSprites, 1,
+ PyDoc_STR("(MediaHandler mh, long flags, Point loc) -> (ComponentResult _rv, QTAtomID spriteHitID)")},
+ {"SpriteMediaHitTestOneSprite", (PyCFunction)Qt_SpriteMediaHitTestOneSprite, 1,
+ PyDoc_STR("(MediaHandler mh, QTAtomID spriteID, long flags, Point loc) -> (ComponentResult _rv, Boolean wasHit)")},
+ {"SpriteMediaSpriteIndexToID", (PyCFunction)Qt_SpriteMediaSpriteIndexToID, 1,
+ PyDoc_STR("(MediaHandler mh, short spriteIndex) -> (ComponentResult _rv, QTAtomID spriteID)")},
+ {"SpriteMediaSpriteIDToIndex", (PyCFunction)Qt_SpriteMediaSpriteIDToIndex, 1,
+ PyDoc_STR("(MediaHandler mh, QTAtomID spriteID) -> (ComponentResult _rv, short spriteIndex)")},
+ {"SpriteMediaSetActionVariable", (PyCFunction)Qt_SpriteMediaSetActionVariable, 1,
+ PyDoc_STR("(MediaHandler mh, QTAtomID variableID, float value) -> (ComponentResult _rv)")},
+ {"SpriteMediaGetActionVariable", (PyCFunction)Qt_SpriteMediaGetActionVariable, 1,
+ PyDoc_STR("(MediaHandler mh, QTAtomID variableID) -> (ComponentResult _rv, float value)")},
+ {"SpriteMediaDisposeSprite", (PyCFunction)Qt_SpriteMediaDisposeSprite, 1,
+ PyDoc_STR("(MediaHandler mh, QTAtomID spriteID) -> (ComponentResult _rv)")},
+ {"SpriteMediaSetActionVariableToString", (PyCFunction)Qt_SpriteMediaSetActionVariableToString, 1,
+ PyDoc_STR("(MediaHandler mh, QTAtomID variableID, Ptr theCString) -> (ComponentResult _rv)")},
+ {"SpriteMediaGetActionVariableAsString", (PyCFunction)Qt_SpriteMediaGetActionVariableAsString, 1,
+ PyDoc_STR("(MediaHandler mh, QTAtomID variableID) -> (ComponentResult _rv, Handle theCString)")},
+ {"SpriteMediaNewImage", (PyCFunction)Qt_SpriteMediaNewImage, 1,
+ PyDoc_STR("(MediaHandler mh, Handle dataRef, OSType dataRefType, QTAtomID desiredID) -> (ComponentResult _rv)")},
+ {"SpriteMediaDisposeImage", (PyCFunction)Qt_SpriteMediaDisposeImage, 1,
+ PyDoc_STR("(MediaHandler mh, short imageIndex) -> (ComponentResult _rv)")},
+ {"SpriteMediaImageIndexToID", (PyCFunction)Qt_SpriteMediaImageIndexToID, 1,
+ PyDoc_STR("(MediaHandler mh, short imageIndex) -> (ComponentResult _rv, QTAtomID imageID)")},
+ {"SpriteMediaImageIDToIndex", (PyCFunction)Qt_SpriteMediaImageIDToIndex, 1,
+ PyDoc_STR("(MediaHandler mh, QTAtomID imageID) -> (ComponentResult _rv, short imageIndex)")},
+ {"FlashMediaSetPan", (PyCFunction)Qt_FlashMediaSetPan, 1,
+ PyDoc_STR("(MediaHandler mh, short xPercent, short yPercent) -> (ComponentResult _rv)")},
+ {"FlashMediaSetZoom", (PyCFunction)Qt_FlashMediaSetZoom, 1,
+ PyDoc_STR("(MediaHandler mh, short factor) -> (ComponentResult _rv)")},
+ {"FlashMediaSetZoomRect", (PyCFunction)Qt_FlashMediaSetZoomRect, 1,
+ PyDoc_STR("(MediaHandler mh, long left, long top, long right, long bottom) -> (ComponentResult _rv)")},
+ {"FlashMediaGetRefConBounds", (PyCFunction)Qt_FlashMediaGetRefConBounds, 1,
+ PyDoc_STR("(MediaHandler mh, long refCon) -> (ComponentResult _rv, long left, long top, long right, long bottom)")},
+ {"FlashMediaGetRefConID", (PyCFunction)Qt_FlashMediaGetRefConID, 1,
+ PyDoc_STR("(MediaHandler mh, long refCon) -> (ComponentResult _rv, long refConID)")},
+ {"FlashMediaIDToRefCon", (PyCFunction)Qt_FlashMediaIDToRefCon, 1,
+ PyDoc_STR("(MediaHandler mh, long refConID) -> (ComponentResult _rv, long refCon)")},
+ {"FlashMediaGetDisplayedFrameNumber", (PyCFunction)Qt_FlashMediaGetDisplayedFrameNumber, 1,
+ PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, long flashFrameNumber)")},
+ {"FlashMediaFrameNumberToMovieTime", (PyCFunction)Qt_FlashMediaFrameNumberToMovieTime, 1,
+ PyDoc_STR("(MediaHandler mh, long flashFrameNumber) -> (ComponentResult _rv, TimeValue movieTime)")},
+ {"FlashMediaFrameLabelToMovieTime", (PyCFunction)Qt_FlashMediaFrameLabelToMovieTime, 1,
+ PyDoc_STR("(MediaHandler mh, Ptr theLabel) -> (ComponentResult _rv, TimeValue movieTime)")},
+ {"FlashMediaGetFlashVariable", (PyCFunction)Qt_FlashMediaGetFlashVariable, 1,
+ PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, char path, char name, Handle theVariableCStringOut)")},
+ {"FlashMediaSetFlashVariable", (PyCFunction)Qt_FlashMediaSetFlashVariable, 1,
+ PyDoc_STR("(MediaHandler mh, Boolean updateFocus) -> (ComponentResult _rv, char path, char name, char value)")},
+ {"FlashMediaDoButtonActions", (PyCFunction)Qt_FlashMediaDoButtonActions, 1,
+ PyDoc_STR("(MediaHandler mh, long buttonID, long transition) -> (ComponentResult _rv, char path)")},
+ {"FlashMediaGetSupportedSwfVersion", (PyCFunction)Qt_FlashMediaGetSupportedSwfVersion, 1,
+ PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, UInt8 swfVersion)")},
+ {"Media3DGetCurrentGroup", (PyCFunction)Qt_Media3DGetCurrentGroup, 1,
+ PyDoc_STR("(MediaHandler mh, void * group) -> (ComponentResult _rv)")},
+ {"Media3DTranslateNamedObjectTo", (PyCFunction)Qt_Media3DTranslateNamedObjectTo, 1,
+ PyDoc_STR("(MediaHandler mh, Fixed x, Fixed y, Fixed z) -> (ComponentResult _rv, char objectName)")},
+ {"Media3DScaleNamedObjectTo", (PyCFunction)Qt_Media3DScaleNamedObjectTo, 1,
+ PyDoc_STR("(MediaHandler mh, Fixed xScale, Fixed yScale, Fixed zScale) -> (ComponentResult _rv, char objectName)")},
+ {"Media3DRotateNamedObjectTo", (PyCFunction)Qt_Media3DRotateNamedObjectTo, 1,
+ PyDoc_STR("(MediaHandler mh, Fixed xDegrees, Fixed yDegrees, Fixed zDegrees) -> (ComponentResult _rv, char objectName)")},
+ {"Media3DSetCameraData", (PyCFunction)Qt_Media3DSetCameraData, 1,
+ PyDoc_STR("(MediaHandler mh, void * cameraData) -> (ComponentResult _rv)")},
+ {"Media3DGetCameraData", (PyCFunction)Qt_Media3DGetCameraData, 1,
+ PyDoc_STR("(MediaHandler mh, void * cameraData) -> (ComponentResult _rv)")},
+ {"Media3DSetCameraAngleAspect", (PyCFunction)Qt_Media3DSetCameraAngleAspect, 1,
+ PyDoc_STR("(MediaHandler mh, QTFloatSingle fov, QTFloatSingle aspectRatioXToY) -> (ComponentResult _rv)")},
+ {"Media3DGetCameraAngleAspect", (PyCFunction)Qt_Media3DGetCameraAngleAspect, 1,
+ PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, QTFloatSingle fov, QTFloatSingle aspectRatioXToY)")},
+ {"Media3DSetCameraRange", (PyCFunction)Qt_Media3DSetCameraRange, 1,
+ PyDoc_STR("(MediaHandler mh, void * tQ3CameraRange) -> (ComponentResult _rv)")},
+ {"Media3DGetCameraRange", (PyCFunction)Qt_Media3DGetCameraRange, 1,
+ PyDoc_STR("(MediaHandler mh, void * tQ3CameraRange) -> (ComponentResult _rv)")},
+ {"NewTimeBase", (PyCFunction)Qt_NewTimeBase, 1,
+ PyDoc_STR("() -> (TimeBase _rv)")},
+ {"ConvertTime", (PyCFunction)Qt_ConvertTime, 1,
+ PyDoc_STR("(TimeRecord theTime, TimeBase newBase) -> (TimeRecord theTime)")},
+ {"ConvertTimeScale", (PyCFunction)Qt_ConvertTimeScale, 1,
+ PyDoc_STR("(TimeRecord theTime, TimeScale newScale) -> (TimeRecord theTime)")},
+ {"AddTime", (PyCFunction)Qt_AddTime, 1,
+ PyDoc_STR("(TimeRecord dst, TimeRecord src) -> (TimeRecord dst)")},
+ {"SubtractTime", (PyCFunction)Qt_SubtractTime, 1,
+ PyDoc_STR("(TimeRecord dst, TimeRecord src) -> (TimeRecord dst)")},
+ {"MusicMediaGetIndexedTunePlayer", (PyCFunction)Qt_MusicMediaGetIndexedTunePlayer, 1,
+ PyDoc_STR("(ComponentInstance ti, long sampleDescIndex) -> (ComponentResult _rv, ComponentInstance tp)")},
+ {"CodecManagerVersion", (PyCFunction)Qt_CodecManagerVersion, 1,
+ PyDoc_STR("() -> (long version)")},
+ {"GetMaxCompressionSize", (PyCFunction)Qt_GetMaxCompressionSize, 1,
+ PyDoc_STR("(PixMapHandle src, Rect srcRect, short colorDepth, CodecQ quality, CodecType cType, CompressorComponent codec) -> (long size)")},
+ {"GetCompressionTime", (PyCFunction)Qt_GetCompressionTime, 1,
+ PyDoc_STR("(PixMapHandle src, Rect srcRect, short colorDepth, CodecType cType, CompressorComponent codec) -> (CodecQ spatialQuality, CodecQ temporalQuality, unsigned long compressTime)")},
+ {"CompressImage", (PyCFunction)Qt_CompressImage, 1,
+ PyDoc_STR("(PixMapHandle src, Rect srcRect, CodecQ quality, CodecType cType, ImageDescriptionHandle desc, Ptr data) -> None")},
+ {"DecompressImage", (PyCFunction)Qt_DecompressImage, 1,
+ PyDoc_STR("(Ptr data, ImageDescriptionHandle desc, PixMapHandle dst, Rect srcRect, Rect dstRect, short mode, RgnHandle mask) -> None")},
+ {"GetSimilarity", (PyCFunction)Qt_GetSimilarity, 1,
+ PyDoc_STR("(PixMapHandle src, Rect srcRect, ImageDescriptionHandle desc, Ptr data) -> (Fixed similarity)")},
+ {"GetImageDescriptionCTable", (PyCFunction)Qt_GetImageDescriptionCTable, 1,
+ PyDoc_STR("(ImageDescriptionHandle desc) -> (CTabHandle ctable)")},
+ {"SetImageDescriptionCTable", (PyCFunction)Qt_SetImageDescriptionCTable, 1,
+ PyDoc_STR("(ImageDescriptionHandle desc, CTabHandle ctable) -> None")},
+ {"GetImageDescriptionExtension", (PyCFunction)Qt_GetImageDescriptionExtension, 1,
+ PyDoc_STR("(ImageDescriptionHandle desc, long idType, long index) -> (Handle extension)")},
+ {"AddImageDescriptionExtension", (PyCFunction)Qt_AddImageDescriptionExtension, 1,
+ PyDoc_STR("(ImageDescriptionHandle desc, Handle extension, long idType) -> None")},
+ {"RemoveImageDescriptionExtension", (PyCFunction)Qt_RemoveImageDescriptionExtension, 1,
+ PyDoc_STR("(ImageDescriptionHandle desc, long idType, long index) -> None")},
+ {"CountImageDescriptionExtensionType", (PyCFunction)Qt_CountImageDescriptionExtensionType, 1,
+ PyDoc_STR("(ImageDescriptionHandle desc, long idType) -> (long count)")},
+ {"GetNextImageDescriptionExtensionType", (PyCFunction)Qt_GetNextImageDescriptionExtensionType, 1,
+ PyDoc_STR("(ImageDescriptionHandle desc) -> (long idType)")},
+ {"FindCodec", (PyCFunction)Qt_FindCodec, 1,
+ PyDoc_STR("(CodecType cType, CodecComponent specCodec) -> (CompressorComponent compressor, DecompressorComponent decompressor)")},
+ {"CompressPicture", (PyCFunction)Qt_CompressPicture, 1,
+ PyDoc_STR("(PicHandle srcPicture, PicHandle dstPicture, CodecQ quality, CodecType cType) -> None")},
+ {"CompressPictureFile", (PyCFunction)Qt_CompressPictureFile, 1,
+ PyDoc_STR("(short srcRefNum, short dstRefNum, CodecQ quality, CodecType cType) -> None")},
+ {"ConvertImage", (PyCFunction)Qt_ConvertImage, 1,
+ PyDoc_STR("(ImageDescriptionHandle srcDD, Ptr srcData, short colorDepth, CTabHandle ctable, CodecQ accuracy, CodecQ quality, CodecType cType, CodecComponent codec, ImageDescriptionHandle dstDD, Ptr dstData) -> None")},
+ {"AddFilePreview", (PyCFunction)Qt_AddFilePreview, 1,
+ PyDoc_STR("(short resRefNum, OSType previewType, Handle previewData) -> None")},
+ {"GetBestDeviceRect", (PyCFunction)Qt_GetBestDeviceRect, 1,
+ PyDoc_STR("() -> (GDHandle gdh, Rect rp)")},
+ {"GDHasScale", (PyCFunction)Qt_GDHasScale, 1,
+ PyDoc_STR("(GDHandle gdh, short depth) -> (Fixed scale)")},
+ {"GDGetScale", (PyCFunction)Qt_GDGetScale, 1,
+ PyDoc_STR("(GDHandle gdh) -> (Fixed scale, short flags)")},
+ {"GDSetScale", (PyCFunction)Qt_GDSetScale, 1,
+ PyDoc_STR("(GDHandle gdh, Fixed scale, short flags) -> None")},
+ {"GetGraphicsImporterForFile", (PyCFunction)Qt_GetGraphicsImporterForFile, 1,
+ PyDoc_STR("(FSSpec theFile) -> (ComponentInstance gi)")},
+ {"GetGraphicsImporterForDataRef", (PyCFunction)Qt_GetGraphicsImporterForDataRef, 1,
+ PyDoc_STR("(Handle dataRef, OSType dataRefType) -> (ComponentInstance gi)")},
+ {"GetGraphicsImporterForFileWithFlags", (PyCFunction)Qt_GetGraphicsImporterForFileWithFlags, 1,
+ PyDoc_STR("(FSSpec theFile, long flags) -> (ComponentInstance gi)")},
+ {"GetGraphicsImporterForDataRefWithFlags", (PyCFunction)Qt_GetGraphicsImporterForDataRefWithFlags, 1,
+ PyDoc_STR("(Handle dataRef, OSType dataRefType, long flags) -> (ComponentInstance gi)")},
+ {"MakeImageDescriptionForPixMap", (PyCFunction)Qt_MakeImageDescriptionForPixMap, 1,
+ PyDoc_STR("(PixMapHandle pixmap) -> (ImageDescriptionHandle idh)")},
+ {"MakeImageDescriptionForEffect", (PyCFunction)Qt_MakeImageDescriptionForEffect, 1,
+ PyDoc_STR("(OSType effectType) -> (ImageDescriptionHandle idh)")},
+ {"QTGetPixelSize", (PyCFunction)Qt_QTGetPixelSize, 1,
+ PyDoc_STR("(OSType PixelFormat) -> (short _rv)")},
+ {"QTGetPixelFormatDepthForImageDescription", (PyCFunction)Qt_QTGetPixelFormatDepthForImageDescription, 1,
+ PyDoc_STR("(OSType PixelFormat) -> (short _rv)")},
+ {"QTGetPixMapHandleRowBytes", (PyCFunction)Qt_QTGetPixMapHandleRowBytes, 1,
+ PyDoc_STR("(PixMapHandle pm) -> (long _rv)")},
+ {"QTSetPixMapHandleRowBytes", (PyCFunction)Qt_QTSetPixMapHandleRowBytes, 1,
+ PyDoc_STR("(PixMapHandle pm, long rowBytes) -> None")},
+ {"QTGetPixMapHandleGammaLevel", (PyCFunction)Qt_QTGetPixMapHandleGammaLevel, 1,
+ PyDoc_STR("(PixMapHandle pm) -> (Fixed _rv)")},
+ {"QTSetPixMapHandleGammaLevel", (PyCFunction)Qt_QTSetPixMapHandleGammaLevel, 1,
+ PyDoc_STR("(PixMapHandle pm, Fixed gammaLevel) -> None")},
+ {"QTGetPixMapHandleRequestedGammaLevel", (PyCFunction)Qt_QTGetPixMapHandleRequestedGammaLevel, 1,
+ PyDoc_STR("(PixMapHandle pm) -> (Fixed _rv)")},
+ {"QTSetPixMapHandleRequestedGammaLevel", (PyCFunction)Qt_QTSetPixMapHandleRequestedGammaLevel, 1,
+ PyDoc_STR("(PixMapHandle pm, Fixed requestedGammaLevel) -> None")},
+ {"CompAdd", (PyCFunction)Qt_CompAdd, 1,
+ PyDoc_STR("() -> (wide src, wide dst)")},
+ {"CompSub", (PyCFunction)Qt_CompSub, 1,
+ PyDoc_STR("() -> (wide src, wide dst)")},
+ {"CompNeg", (PyCFunction)Qt_CompNeg, 1,
+ PyDoc_STR("() -> (wide dst)")},
+ {"CompShift", (PyCFunction)Qt_CompShift, 1,
+ PyDoc_STR("(short shift) -> (wide src)")},
+ {"CompMul", (PyCFunction)Qt_CompMul, 1,
+ PyDoc_STR("(long src1, long src2) -> (wide dst)")},
+ {"CompDiv", (PyCFunction)Qt_CompDiv, 1,
+ PyDoc_STR("(long denominator) -> (long _rv, wide numerator, long remainder)")},
+ {"CompFixMul", (PyCFunction)Qt_CompFixMul, 1,
+ PyDoc_STR("(Fixed fixSrc) -> (wide compSrc, wide compDst)")},
+ {"CompMulDiv", (PyCFunction)Qt_CompMulDiv, 1,
+ PyDoc_STR("(long mul, long divisor) -> (wide co)")},
+ {"CompMulDivTrunc", (PyCFunction)Qt_CompMulDivTrunc, 1,
+ PyDoc_STR("(long mul, long divisor) -> (wide co, long remainder)")},
+ {"CompCompare", (PyCFunction)Qt_CompCompare, 1,
+ PyDoc_STR("(wide a, wide minusb) -> (long _rv)")},
+ {"CompSquareRoot", (PyCFunction)Qt_CompSquareRoot, 1,
+ PyDoc_STR("(wide src) -> (unsigned long _rv)")},
+ {"FixMulDiv", (PyCFunction)Qt_FixMulDiv, 1,
+ PyDoc_STR("(Fixed src, Fixed mul, Fixed divisor) -> (Fixed _rv)")},
+ {"UnsignedFixMulDiv", (PyCFunction)Qt_UnsignedFixMulDiv, 1,
+ PyDoc_STR("(Fixed src, Fixed mul, Fixed divisor) -> (Fixed _rv)")},
+ {"FixExp2", (PyCFunction)Qt_FixExp2, 1,
+ PyDoc_STR("(Fixed src) -> (Fixed _rv)")},
+ {"FixLog2", (PyCFunction)Qt_FixLog2, 1,
+ PyDoc_STR("(Fixed src) -> (Fixed _rv)")},
+ {"FixPow", (PyCFunction)Qt_FixPow, 1,
+ PyDoc_STR("(Fixed base, Fixed exp) -> (Fixed _rv)")},
+ {"GraphicsImportSetDataReference", (PyCFunction)Qt_GraphicsImportSetDataReference, 1,
+ PyDoc_STR("(GraphicsImportComponent ci, Handle dataRef, OSType dataReType) -> (ComponentResult _rv)")},
+ {"GraphicsImportGetDataReference", (PyCFunction)Qt_GraphicsImportGetDataReference, 1,
+ PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, Handle dataRef, OSType dataReType)")},
+ {"GraphicsImportSetDataFile", (PyCFunction)Qt_GraphicsImportSetDataFile, 1,
+ PyDoc_STR("(GraphicsImportComponent ci, FSSpec theFile) -> (ComponentResult _rv)")},
+ {"GraphicsImportGetDataFile", (PyCFunction)Qt_GraphicsImportGetDataFile, 1,
+ PyDoc_STR("(GraphicsImportComponent ci, FSSpec theFile) -> (ComponentResult _rv)")},
+ {"GraphicsImportSetDataHandle", (PyCFunction)Qt_GraphicsImportSetDataHandle, 1,
+ PyDoc_STR("(GraphicsImportComponent ci, Handle h) -> (ComponentResult _rv)")},
+ {"GraphicsImportGetDataHandle", (PyCFunction)Qt_GraphicsImportGetDataHandle, 1,
+ PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, Handle h)")},
+ {"GraphicsImportGetImageDescription", (PyCFunction)Qt_GraphicsImportGetImageDescription, 1,
+ PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, ImageDescriptionHandle desc)")},
+ {"GraphicsImportGetDataOffsetAndSize", (PyCFunction)Qt_GraphicsImportGetDataOffsetAndSize, 1,
+ PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, unsigned long offset, unsigned long size)")},
+ {"GraphicsImportReadData", (PyCFunction)Qt_GraphicsImportReadData, 1,
+ PyDoc_STR("(GraphicsImportComponent ci, void * dataPtr, unsigned long dataOffset, unsigned long dataSize) -> (ComponentResult _rv)")},
+ {"GraphicsImportSetClip", (PyCFunction)Qt_GraphicsImportSetClip, 1,
+ PyDoc_STR("(GraphicsImportComponent ci, RgnHandle clipRgn) -> (ComponentResult _rv)")},
+ {"GraphicsImportGetClip", (PyCFunction)Qt_GraphicsImportGetClip, 1,
+ PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, RgnHandle clipRgn)")},
+ {"GraphicsImportSetSourceRect", (PyCFunction)Qt_GraphicsImportSetSourceRect, 1,
+ PyDoc_STR("(GraphicsImportComponent ci, Rect sourceRect) -> (ComponentResult _rv)")},
+ {"GraphicsImportGetSourceRect", (PyCFunction)Qt_GraphicsImportGetSourceRect, 1,
+ PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, Rect sourceRect)")},
+ {"GraphicsImportGetNaturalBounds", (PyCFunction)Qt_GraphicsImportGetNaturalBounds, 1,
+ PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, Rect naturalBounds)")},
+ {"GraphicsImportDraw", (PyCFunction)Qt_GraphicsImportDraw, 1,
+ PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv)")},
+ {"GraphicsImportSetGWorld", (PyCFunction)Qt_GraphicsImportSetGWorld, 1,
+ PyDoc_STR("(GraphicsImportComponent ci, CGrafPtr port, GDHandle gd) -> (ComponentResult _rv)")},
+ {"GraphicsImportGetGWorld", (PyCFunction)Qt_GraphicsImportGetGWorld, 1,
+ PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, CGrafPtr port, GDHandle gd)")},
+ {"GraphicsImportSetBoundsRect", (PyCFunction)Qt_GraphicsImportSetBoundsRect, 1,
+ PyDoc_STR("(GraphicsImportComponent ci, Rect bounds) -> (ComponentResult _rv)")},
+ {"GraphicsImportGetBoundsRect", (PyCFunction)Qt_GraphicsImportGetBoundsRect, 1,
+ PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, Rect bounds)")},
+ {"GraphicsImportSaveAsPicture", (PyCFunction)Qt_GraphicsImportSaveAsPicture, 1,
+ PyDoc_STR("(GraphicsImportComponent ci, FSSpec fss, ScriptCode scriptTag) -> (ComponentResult _rv)")},
+ {"GraphicsImportSetGraphicsMode", (PyCFunction)Qt_GraphicsImportSetGraphicsMode, 1,
+ PyDoc_STR("(GraphicsImportComponent ci, long graphicsMode, RGBColor opColor) -> (ComponentResult _rv)")},
+ {"GraphicsImportGetGraphicsMode", (PyCFunction)Qt_GraphicsImportGetGraphicsMode, 1,
+ PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, long graphicsMode, RGBColor opColor)")},
+ {"GraphicsImportSetQuality", (PyCFunction)Qt_GraphicsImportSetQuality, 1,
+ PyDoc_STR("(GraphicsImportComponent ci, CodecQ quality) -> (ComponentResult _rv)")},
+ {"GraphicsImportGetQuality", (PyCFunction)Qt_GraphicsImportGetQuality, 1,
+ PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, CodecQ quality)")},
+ {"GraphicsImportSaveAsQuickTimeImageFile", (PyCFunction)Qt_GraphicsImportSaveAsQuickTimeImageFile, 1,
+ PyDoc_STR("(GraphicsImportComponent ci, FSSpec fss, ScriptCode scriptTag) -> (ComponentResult _rv)")},
+ {"GraphicsImportSetDataReferenceOffsetAndLimit", (PyCFunction)Qt_GraphicsImportSetDataReferenceOffsetAndLimit, 1,
+ PyDoc_STR("(GraphicsImportComponent ci, unsigned long offset, unsigned long limit) -> (ComponentResult _rv)")},
+ {"GraphicsImportGetDataReferenceOffsetAndLimit", (PyCFunction)Qt_GraphicsImportGetDataReferenceOffsetAndLimit, 1,
+ PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, unsigned long offset, unsigned long limit)")},
+ {"GraphicsImportGetAliasedDataReference", (PyCFunction)Qt_GraphicsImportGetAliasedDataReference, 1,
+ PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, Handle dataRef, OSType dataRefType)")},
+ {"GraphicsImportValidate", (PyCFunction)Qt_GraphicsImportValidate, 1,
+ PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, Boolean valid)")},
+ {"GraphicsImportGetMetaData", (PyCFunction)Qt_GraphicsImportGetMetaData, 1,
+ PyDoc_STR("(GraphicsImportComponent ci, void * userData) -> (ComponentResult _rv)")},
+ {"GraphicsImportGetMIMETypeList", (PyCFunction)Qt_GraphicsImportGetMIMETypeList, 1,
+ PyDoc_STR("(GraphicsImportComponent ci, void * qtAtomContainerPtr) -> (ComponentResult _rv)")},
+ {"GraphicsImportDoesDrawAllPixels", (PyCFunction)Qt_GraphicsImportDoesDrawAllPixels, 1,
+ PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, short drawsAllPixels)")},
+ {"GraphicsImportGetAsPicture", (PyCFunction)Qt_GraphicsImportGetAsPicture, 1,
+ PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, PicHandle picture)")},
+ {"GraphicsImportExportImageFile", (PyCFunction)Qt_GraphicsImportExportImageFile, 1,
+ PyDoc_STR("(GraphicsImportComponent ci, OSType fileType, OSType fileCreator, FSSpec fss, ScriptCode scriptTag) -> (ComponentResult _rv)")},
+ {"GraphicsImportGetExportImageTypeList", (PyCFunction)Qt_GraphicsImportGetExportImageTypeList, 1,
+ PyDoc_STR("(GraphicsImportComponent ci, void * qtAtomContainerPtr) -> (ComponentResult _rv)")},
+ {"GraphicsImportGetExportSettingsAsAtomContainer", (PyCFunction)Qt_GraphicsImportGetExportSettingsAsAtomContainer, 1,
+ PyDoc_STR("(GraphicsImportComponent ci, void * qtAtomContainerPtr) -> (ComponentResult _rv)")},
+ {"GraphicsImportSetExportSettingsFromAtomContainer", (PyCFunction)Qt_GraphicsImportSetExportSettingsFromAtomContainer, 1,
+ PyDoc_STR("(GraphicsImportComponent ci, void * qtAtomContainer) -> (ComponentResult _rv)")},
+ {"GraphicsImportGetImageCount", (PyCFunction)Qt_GraphicsImportGetImageCount, 1,
+ PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, unsigned long imageCount)")},
+ {"GraphicsImportSetImageIndex", (PyCFunction)Qt_GraphicsImportSetImageIndex, 1,
+ PyDoc_STR("(GraphicsImportComponent ci, unsigned long imageIndex) -> (ComponentResult _rv)")},
+ {"GraphicsImportGetImageIndex", (PyCFunction)Qt_GraphicsImportGetImageIndex, 1,
+ PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, unsigned long imageIndex)")},
+ {"GraphicsImportGetDataOffsetAndSize64", (PyCFunction)Qt_GraphicsImportGetDataOffsetAndSize64, 1,
+ PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, wide offset, wide size)")},
+ {"GraphicsImportReadData64", (PyCFunction)Qt_GraphicsImportReadData64, 1,
+ PyDoc_STR("(GraphicsImportComponent ci, void * dataPtr, wide dataOffset, unsigned long dataSize) -> (ComponentResult _rv)")},
+ {"GraphicsImportSetDataReferenceOffsetAndLimit64", (PyCFunction)Qt_GraphicsImportSetDataReferenceOffsetAndLimit64, 1,
+ PyDoc_STR("(GraphicsImportComponent ci, wide offset, wide limit) -> (ComponentResult _rv)")},
+ {"GraphicsImportGetDataReferenceOffsetAndLimit64", (PyCFunction)Qt_GraphicsImportGetDataReferenceOffsetAndLimit64, 1,
+ PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, wide offset, wide limit)")},
+ {"GraphicsImportGetDefaultClip", (PyCFunction)Qt_GraphicsImportGetDefaultClip, 1,
+ PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, RgnHandle defaultRgn)")},
+ {"GraphicsImportGetDefaultGraphicsMode", (PyCFunction)Qt_GraphicsImportGetDefaultGraphicsMode, 1,
+ PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, long defaultGraphicsMode, RGBColor defaultOpColor)")},
+ {"GraphicsImportGetDefaultSourceRect", (PyCFunction)Qt_GraphicsImportGetDefaultSourceRect, 1,
+ PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, Rect defaultSourceRect)")},
+ {"GraphicsImportGetColorSyncProfile", (PyCFunction)Qt_GraphicsImportGetColorSyncProfile, 1,
+ PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, Handle profile)")},
+ {"GraphicsImportSetDestRect", (PyCFunction)Qt_GraphicsImportSetDestRect, 1,
+ PyDoc_STR("(GraphicsImportComponent ci, Rect destRect) -> (ComponentResult _rv)")},
+ {"GraphicsImportGetDestRect", (PyCFunction)Qt_GraphicsImportGetDestRect, 1,
+ PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, Rect destRect)")},
+ {"GraphicsImportSetFlags", (PyCFunction)Qt_GraphicsImportSetFlags, 1,
+ PyDoc_STR("(GraphicsImportComponent ci, long flags) -> (ComponentResult _rv)")},
+ {"GraphicsImportGetFlags", (PyCFunction)Qt_GraphicsImportGetFlags, 1,
+ PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, long flags)")},
+ {"GraphicsImportGetBaseDataOffsetAndSize64", (PyCFunction)Qt_GraphicsImportGetBaseDataOffsetAndSize64, 1,
+ PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv, wide offset, wide size)")},
+ {"GraphicsImportSetImageIndexToThumbnail", (PyCFunction)Qt_GraphicsImportSetImageIndexToThumbnail, 1,
+ PyDoc_STR("(GraphicsImportComponent ci) -> (ComponentResult _rv)")},
+ {"GraphicsExportDoExport", (PyCFunction)Qt_GraphicsExportDoExport, 1,
+ PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, unsigned long actualSizeWritten)")},
+ {"GraphicsExportCanTranscode", (PyCFunction)Qt_GraphicsExportCanTranscode, 1,
+ PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, Boolean canTranscode)")},
+ {"GraphicsExportDoTranscode", (PyCFunction)Qt_GraphicsExportDoTranscode, 1,
+ PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv)")},
+ {"GraphicsExportCanUseCompressor", (PyCFunction)Qt_GraphicsExportCanUseCompressor, 1,
+ PyDoc_STR("(GraphicsExportComponent ci, void * codecSettingsAtomContainerPtr) -> (ComponentResult _rv, Boolean canUseCompressor)")},
+ {"GraphicsExportDoUseCompressor", (PyCFunction)Qt_GraphicsExportDoUseCompressor, 1,
+ PyDoc_STR("(GraphicsExportComponent ci, void * codecSettingsAtomContainer) -> (ComponentResult _rv, ImageDescriptionHandle outDesc)")},
+ {"GraphicsExportDoStandaloneExport", (PyCFunction)Qt_GraphicsExportDoStandaloneExport, 1,
+ PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv)")},
+ {"GraphicsExportGetDefaultFileTypeAndCreator", (PyCFunction)Qt_GraphicsExportGetDefaultFileTypeAndCreator, 1,
+ PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, OSType fileType, OSType fileCreator)")},
+ {"GraphicsExportGetDefaultFileNameExtension", (PyCFunction)Qt_GraphicsExportGetDefaultFileNameExtension, 1,
+ PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, OSType fileNameExtension)")},
+ {"GraphicsExportGetMIMETypeList", (PyCFunction)Qt_GraphicsExportGetMIMETypeList, 1,
+ PyDoc_STR("(GraphicsExportComponent ci, void * qtAtomContainerPtr) -> (ComponentResult _rv)")},
+ {"GraphicsExportSetSettingsFromAtomContainer", (PyCFunction)Qt_GraphicsExportSetSettingsFromAtomContainer, 1,
+ PyDoc_STR("(GraphicsExportComponent ci, void * qtAtomContainer) -> (ComponentResult _rv)")},
+ {"GraphicsExportGetSettingsAsAtomContainer", (PyCFunction)Qt_GraphicsExportGetSettingsAsAtomContainer, 1,
+ PyDoc_STR("(GraphicsExportComponent ci, void * qtAtomContainerPtr) -> (ComponentResult _rv)")},
+ {"GraphicsExportGetSettingsAsText", (PyCFunction)Qt_GraphicsExportGetSettingsAsText, 1,
+ PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, Handle theText)")},
+ {"GraphicsExportSetDontRecompress", (PyCFunction)Qt_GraphicsExportSetDontRecompress, 1,
+ PyDoc_STR("(GraphicsExportComponent ci, Boolean dontRecompress) -> (ComponentResult _rv)")},
+ {"GraphicsExportGetDontRecompress", (PyCFunction)Qt_GraphicsExportGetDontRecompress, 1,
+ PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, Boolean dontRecompress)")},
+ {"GraphicsExportSetInterlaceStyle", (PyCFunction)Qt_GraphicsExportSetInterlaceStyle, 1,
+ PyDoc_STR("(GraphicsExportComponent ci, unsigned long interlaceStyle) -> (ComponentResult _rv)")},
+ {"GraphicsExportGetInterlaceStyle", (PyCFunction)Qt_GraphicsExportGetInterlaceStyle, 1,
+ PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, unsigned long interlaceStyle)")},
+ {"GraphicsExportSetMetaData", (PyCFunction)Qt_GraphicsExportSetMetaData, 1,
+ PyDoc_STR("(GraphicsExportComponent ci, void * userData) -> (ComponentResult _rv)")},
+ {"GraphicsExportGetMetaData", (PyCFunction)Qt_GraphicsExportGetMetaData, 1,
+ PyDoc_STR("(GraphicsExportComponent ci, void * userData) -> (ComponentResult _rv)")},
+ {"GraphicsExportSetTargetDataSize", (PyCFunction)Qt_GraphicsExportSetTargetDataSize, 1,
+ PyDoc_STR("(GraphicsExportComponent ci, unsigned long targetDataSize) -> (ComponentResult _rv)")},
+ {"GraphicsExportGetTargetDataSize", (PyCFunction)Qt_GraphicsExportGetTargetDataSize, 1,
+ PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, unsigned long targetDataSize)")},
+ {"GraphicsExportSetCompressionMethod", (PyCFunction)Qt_GraphicsExportSetCompressionMethod, 1,
+ PyDoc_STR("(GraphicsExportComponent ci, long compressionMethod) -> (ComponentResult _rv)")},
+ {"GraphicsExportGetCompressionMethod", (PyCFunction)Qt_GraphicsExportGetCompressionMethod, 1,
+ PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, long compressionMethod)")},
+ {"GraphicsExportSetCompressionQuality", (PyCFunction)Qt_GraphicsExportSetCompressionQuality, 1,
+ PyDoc_STR("(GraphicsExportComponent ci, CodecQ spatialQuality) -> (ComponentResult _rv)")},
+ {"GraphicsExportGetCompressionQuality", (PyCFunction)Qt_GraphicsExportGetCompressionQuality, 1,
+ PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, CodecQ spatialQuality)")},
+ {"GraphicsExportSetResolution", (PyCFunction)Qt_GraphicsExportSetResolution, 1,
+ PyDoc_STR("(GraphicsExportComponent ci, Fixed horizontalResolution, Fixed verticalResolution) -> (ComponentResult _rv)")},
+ {"GraphicsExportGetResolution", (PyCFunction)Qt_GraphicsExportGetResolution, 1,
+ PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, Fixed horizontalResolution, Fixed verticalResolution)")},
+ {"GraphicsExportSetDepth", (PyCFunction)Qt_GraphicsExportSetDepth, 1,
+ PyDoc_STR("(GraphicsExportComponent ci, long depth) -> (ComponentResult _rv)")},
+ {"GraphicsExportGetDepth", (PyCFunction)Qt_GraphicsExportGetDepth, 1,
+ PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, long depth)")},
+ {"GraphicsExportSetColorSyncProfile", (PyCFunction)Qt_GraphicsExportSetColorSyncProfile, 1,
+ PyDoc_STR("(GraphicsExportComponent ci, Handle colorSyncProfile) -> (ComponentResult _rv)")},
+ {"GraphicsExportGetColorSyncProfile", (PyCFunction)Qt_GraphicsExportGetColorSyncProfile, 1,
+ PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, Handle colorSyncProfile)")},
+ {"GraphicsExportSetInputDataReference", (PyCFunction)Qt_GraphicsExportSetInputDataReference, 1,
+ PyDoc_STR("(GraphicsExportComponent ci, Handle dataRef, OSType dataRefType, ImageDescriptionHandle desc) -> (ComponentResult _rv)")},
+ {"GraphicsExportGetInputDataReference", (PyCFunction)Qt_GraphicsExportGetInputDataReference, 1,
+ PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, Handle dataRef, OSType dataRefType)")},
+ {"GraphicsExportSetInputFile", (PyCFunction)Qt_GraphicsExportSetInputFile, 1,
+ PyDoc_STR("(GraphicsExportComponent ci, FSSpec theFile, ImageDescriptionHandle desc) -> (ComponentResult _rv)")},
+ {"GraphicsExportGetInputFile", (PyCFunction)Qt_GraphicsExportGetInputFile, 1,
+ PyDoc_STR("(GraphicsExportComponent ci, FSSpec theFile) -> (ComponentResult _rv)")},
+ {"GraphicsExportSetInputHandle", (PyCFunction)Qt_GraphicsExportSetInputHandle, 1,
+ PyDoc_STR("(GraphicsExportComponent ci, Handle h, ImageDescriptionHandle desc) -> (ComponentResult _rv)")},
+ {"GraphicsExportGetInputHandle", (PyCFunction)Qt_GraphicsExportGetInputHandle, 1,
+ PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, Handle h)")},
+ {"GraphicsExportSetInputPtr", (PyCFunction)Qt_GraphicsExportSetInputPtr, 1,
+ PyDoc_STR("(GraphicsExportComponent ci, Ptr p, unsigned long size, ImageDescriptionHandle desc) -> (ComponentResult _rv)")},
+ {"GraphicsExportSetInputGraphicsImporter", (PyCFunction)Qt_GraphicsExportSetInputGraphicsImporter, 1,
+ PyDoc_STR("(GraphicsExportComponent ci, GraphicsImportComponent grip) -> (ComponentResult _rv)")},
+ {"GraphicsExportGetInputGraphicsImporter", (PyCFunction)Qt_GraphicsExportGetInputGraphicsImporter, 1,
+ PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, GraphicsImportComponent grip)")},
+ {"GraphicsExportSetInputPicture", (PyCFunction)Qt_GraphicsExportSetInputPicture, 1,
+ PyDoc_STR("(GraphicsExportComponent ci, PicHandle picture) -> (ComponentResult _rv)")},
+ {"GraphicsExportGetInputPicture", (PyCFunction)Qt_GraphicsExportGetInputPicture, 1,
+ PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, PicHandle picture)")},
+ {"GraphicsExportSetInputGWorld", (PyCFunction)Qt_GraphicsExportSetInputGWorld, 1,
+ PyDoc_STR("(GraphicsExportComponent ci, GWorldPtr gworld) -> (ComponentResult _rv)")},
+ {"GraphicsExportGetInputGWorld", (PyCFunction)Qt_GraphicsExportGetInputGWorld, 1,
+ PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, GWorldPtr gworld)")},
+ {"GraphicsExportSetInputPixmap", (PyCFunction)Qt_GraphicsExportSetInputPixmap, 1,
+ PyDoc_STR("(GraphicsExportComponent ci, PixMapHandle pixmap) -> (ComponentResult _rv)")},
+ {"GraphicsExportGetInputPixmap", (PyCFunction)Qt_GraphicsExportGetInputPixmap, 1,
+ PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, PixMapHandle pixmap)")},
+ {"GraphicsExportSetInputOffsetAndLimit", (PyCFunction)Qt_GraphicsExportSetInputOffsetAndLimit, 1,
+ PyDoc_STR("(GraphicsExportComponent ci, unsigned long offset, unsigned long limit) -> (ComponentResult _rv)")},
+ {"GraphicsExportGetInputOffsetAndLimit", (PyCFunction)Qt_GraphicsExportGetInputOffsetAndLimit, 1,
+ PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, unsigned long offset, unsigned long limit)")},
+ {"GraphicsExportMayExporterReadInputData", (PyCFunction)Qt_GraphicsExportMayExporterReadInputData, 1,
+ PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, Boolean mayReadInputData)")},
+ {"GraphicsExportGetInputDataSize", (PyCFunction)Qt_GraphicsExportGetInputDataSize, 1,
+ PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, unsigned long size)")},
+ {"GraphicsExportReadInputData", (PyCFunction)Qt_GraphicsExportReadInputData, 1,
+ PyDoc_STR("(GraphicsExportComponent ci, void * dataPtr, unsigned long dataOffset, unsigned long dataSize) -> (ComponentResult _rv)")},
+ {"GraphicsExportGetInputImageDescription", (PyCFunction)Qt_GraphicsExportGetInputImageDescription, 1,
+ PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, ImageDescriptionHandle desc)")},
+ {"GraphicsExportGetInputImageDimensions", (PyCFunction)Qt_GraphicsExportGetInputImageDimensions, 1,
+ PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, Rect dimensions)")},
+ {"GraphicsExportGetInputImageDepth", (PyCFunction)Qt_GraphicsExportGetInputImageDepth, 1,
+ PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, long inputDepth)")},
+ {"GraphicsExportDrawInputImage", (PyCFunction)Qt_GraphicsExportDrawInputImage, 1,
+ PyDoc_STR("(GraphicsExportComponent ci, CGrafPtr gw, GDHandle gd, Rect srcRect, Rect dstRect) -> (ComponentResult _rv)")},
+ {"GraphicsExportSetOutputDataReference", (PyCFunction)Qt_GraphicsExportSetOutputDataReference, 1,
+ PyDoc_STR("(GraphicsExportComponent ci, Handle dataRef, OSType dataRefType) -> (ComponentResult _rv)")},
+ {"GraphicsExportGetOutputDataReference", (PyCFunction)Qt_GraphicsExportGetOutputDataReference, 1,
+ PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, Handle dataRef, OSType dataRefType)")},
+ {"GraphicsExportSetOutputFile", (PyCFunction)Qt_GraphicsExportSetOutputFile, 1,
+ PyDoc_STR("(GraphicsExportComponent ci, FSSpec theFile) -> (ComponentResult _rv)")},
+ {"GraphicsExportGetOutputFile", (PyCFunction)Qt_GraphicsExportGetOutputFile, 1,
+ PyDoc_STR("(GraphicsExportComponent ci, FSSpec theFile) -> (ComponentResult _rv)")},
+ {"GraphicsExportSetOutputHandle", (PyCFunction)Qt_GraphicsExportSetOutputHandle, 1,
+ PyDoc_STR("(GraphicsExportComponent ci, Handle h) -> (ComponentResult _rv)")},
+ {"GraphicsExportGetOutputHandle", (PyCFunction)Qt_GraphicsExportGetOutputHandle, 1,
+ PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, Handle h)")},
+ {"GraphicsExportSetOutputOffsetAndMaxSize", (PyCFunction)Qt_GraphicsExportSetOutputOffsetAndMaxSize, 1,
+ PyDoc_STR("(GraphicsExportComponent ci, unsigned long offset, unsigned long maxSize, Boolean truncateFile) -> (ComponentResult _rv)")},
+ {"GraphicsExportGetOutputOffsetAndMaxSize", (PyCFunction)Qt_GraphicsExportGetOutputOffsetAndMaxSize, 1,
+ PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, unsigned long offset, unsigned long maxSize, Boolean truncateFile)")},
+ {"GraphicsExportSetOutputFileTypeAndCreator", (PyCFunction)Qt_GraphicsExportSetOutputFileTypeAndCreator, 1,
+ PyDoc_STR("(GraphicsExportComponent ci, OSType fileType, OSType fileCreator) -> (ComponentResult _rv)")},
+ {"GraphicsExportGetOutputFileTypeAndCreator", (PyCFunction)Qt_GraphicsExportGetOutputFileTypeAndCreator, 1,
+ PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, OSType fileType, OSType fileCreator)")},
+ {"GraphicsExportSetOutputMark", (PyCFunction)Qt_GraphicsExportSetOutputMark, 1,
+ PyDoc_STR("(GraphicsExportComponent ci, unsigned long mark) -> (ComponentResult _rv)")},
+ {"GraphicsExportGetOutputMark", (PyCFunction)Qt_GraphicsExportGetOutputMark, 1,
+ PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, unsigned long mark)")},
+ {"GraphicsExportReadOutputData", (PyCFunction)Qt_GraphicsExportReadOutputData, 1,
+ PyDoc_STR("(GraphicsExportComponent ci, void * dataPtr, unsigned long dataOffset, unsigned long dataSize) -> (ComponentResult _rv)")},
+ {"GraphicsExportSetThumbnailEnabled", (PyCFunction)Qt_GraphicsExportSetThumbnailEnabled, 1,
+ PyDoc_STR("(GraphicsExportComponent ci, Boolean enableThumbnail, long maxThumbnailWidth, long maxThumbnailHeight) -> (ComponentResult _rv)")},
+ {"GraphicsExportGetThumbnailEnabled", (PyCFunction)Qt_GraphicsExportGetThumbnailEnabled, 1,
+ PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, Boolean thumbnailEnabled, long maxThumbnailWidth, long maxThumbnailHeight)")},
+ {"GraphicsExportSetExifEnabled", (PyCFunction)Qt_GraphicsExportSetExifEnabled, 1,
+ PyDoc_STR("(GraphicsExportComponent ci, Boolean enableExif) -> (ComponentResult _rv)")},
+ {"GraphicsExportGetExifEnabled", (PyCFunction)Qt_GraphicsExportGetExifEnabled, 1,
+ PyDoc_STR("(GraphicsExportComponent ci) -> (ComponentResult _rv, Boolean exifEnabled)")},
+ {"ImageTranscoderBeginSequence", (PyCFunction)Qt_ImageTranscoderBeginSequence, 1,
+ PyDoc_STR("(ImageTranscoderComponent itc, ImageDescriptionHandle srcDesc, void * data, long dataSize) -> (ComponentResult _rv, ImageDescriptionHandle dstDesc)")},
+ {"ImageTranscoderDisposeData", (PyCFunction)Qt_ImageTranscoderDisposeData, 1,
+ PyDoc_STR("(ImageTranscoderComponent itc, void * dstData) -> (ComponentResult _rv)")},
+ {"ImageTranscoderEndSequence", (PyCFunction)Qt_ImageTranscoderEndSequence, 1,
+ PyDoc_STR("(ImageTranscoderComponent itc) -> (ComponentResult _rv)")},
+ {"ClockGetTime", (PyCFunction)Qt_ClockGetTime, 1,
+ PyDoc_STR("(ComponentInstance aClock) -> (ComponentResult _rv, TimeRecord out)")},
+ {"ClockSetTimeBase", (PyCFunction)Qt_ClockSetTimeBase, 1,
+ PyDoc_STR("(ComponentInstance aClock, TimeBase tb) -> (ComponentResult _rv)")},
+ {"ClockGetRate", (PyCFunction)Qt_ClockGetRate, 1,
+ PyDoc_STR("(ComponentInstance aClock) -> (ComponentResult _rv, Fixed rate)")},
+ {"SCPositionRect", (PyCFunction)Qt_SCPositionRect, 1,
+ PyDoc_STR("(ComponentInstance ci) -> (ComponentResult _rv, Rect rp, Point where)")},
+ {"SCPositionDialog", (PyCFunction)Qt_SCPositionDialog, 1,
+ PyDoc_STR("(ComponentInstance ci, short id) -> (ComponentResult _rv, Point where)")},
+ {"SCSetTestImagePictHandle", (PyCFunction)Qt_SCSetTestImagePictHandle, 1,
+ PyDoc_STR("(ComponentInstance ci, PicHandle testPict, short testFlags) -> (ComponentResult _rv, Rect testRect)")},
+ {"SCSetTestImagePictFile", (PyCFunction)Qt_SCSetTestImagePictFile, 1,
+ PyDoc_STR("(ComponentInstance ci, short testFileRef, short testFlags) -> (ComponentResult _rv, Rect testRect)")},
+ {"SCSetTestImagePixMap", (PyCFunction)Qt_SCSetTestImagePixMap, 1,
+ PyDoc_STR("(ComponentInstance ci, PixMapHandle testPixMap, short testFlags) -> (ComponentResult _rv, Rect testRect)")},
+ {"SCGetBestDeviceRect", (PyCFunction)Qt_SCGetBestDeviceRect, 1,
+ PyDoc_STR("(ComponentInstance ci) -> (ComponentResult _rv, Rect r)")},
+ {"SCRequestImageSettings", (PyCFunction)Qt_SCRequestImageSettings, 1,
+ PyDoc_STR("(ComponentInstance ci) -> (ComponentResult _rv)")},
+ {"SCCompressImage", (PyCFunction)Qt_SCCompressImage, 1,
+ PyDoc_STR("(ComponentInstance ci, PixMapHandle src, Rect srcRect) -> (ComponentResult _rv, ImageDescriptionHandle desc, Handle data)")},
+ {"SCCompressPicture", (PyCFunction)Qt_SCCompressPicture, 1,
+ PyDoc_STR("(ComponentInstance ci, PicHandle srcPicture, PicHandle dstPicture) -> (ComponentResult _rv)")},
+ {"SCCompressPictureFile", (PyCFunction)Qt_SCCompressPictureFile, 1,
+ PyDoc_STR("(ComponentInstance ci, short srcRefNum, short dstRefNum) -> (ComponentResult _rv)")},
+ {"SCRequestSequenceSettings", (PyCFunction)Qt_SCRequestSequenceSettings, 1,
+ PyDoc_STR("(ComponentInstance ci) -> (ComponentResult _rv)")},
+ {"SCCompressSequenceBegin", (PyCFunction)Qt_SCCompressSequenceBegin, 1,
+ PyDoc_STR("(ComponentInstance ci, PixMapHandle src, Rect srcRect) -> (ComponentResult _rv, ImageDescriptionHandle desc)")},
+ {"SCCompressSequenceFrame", (PyCFunction)Qt_SCCompressSequenceFrame, 1,
+ PyDoc_STR("(ComponentInstance ci, PixMapHandle src, Rect srcRect) -> (ComponentResult _rv, Handle data, long dataSize, short notSyncFlag)")},
+ {"SCCompressSequenceEnd", (PyCFunction)Qt_SCCompressSequenceEnd, 1,
+ PyDoc_STR("(ComponentInstance ci) -> (ComponentResult _rv)")},
+ {"SCDefaultPictHandleSettings", (PyCFunction)Qt_SCDefaultPictHandleSettings, 1,
+ PyDoc_STR("(ComponentInstance ci, PicHandle srcPicture, short motion) -> (ComponentResult _rv)")},
+ {"SCDefaultPictFileSettings", (PyCFunction)Qt_SCDefaultPictFileSettings, 1,
+ PyDoc_STR("(ComponentInstance ci, short srcRef, short motion) -> (ComponentResult _rv)")},
+ {"SCDefaultPixMapSettings", (PyCFunction)Qt_SCDefaultPixMapSettings, 1,
+ PyDoc_STR("(ComponentInstance ci, PixMapHandle src, short motion) -> (ComponentResult _rv)")},
+ {"SCGetInfo", (PyCFunction)Qt_SCGetInfo, 1,
+ PyDoc_STR("(ComponentInstance ci, OSType infoType, void * info) -> (ComponentResult _rv)")},
+ {"SCSetInfo", (PyCFunction)Qt_SCSetInfo, 1,
+ PyDoc_STR("(ComponentInstance ci, OSType infoType, void * info) -> (ComponentResult _rv)")},
+ {"SCSetCompressFlags", (PyCFunction)Qt_SCSetCompressFlags, 1,
+ PyDoc_STR("(ComponentInstance ci, long flags) -> (ComponentResult _rv)")},
+ {"SCGetCompressFlags", (PyCFunction)Qt_SCGetCompressFlags, 1,
+ PyDoc_STR("(ComponentInstance ci) -> (ComponentResult _rv, long flags)")},
+ {"SCGetSettingsAsText", (PyCFunction)Qt_SCGetSettingsAsText, 1,
+ PyDoc_STR("(ComponentInstance ci) -> (ComponentResult _rv, Handle text)")},
+ {"SCAsyncIdle", (PyCFunction)Qt_SCAsyncIdle, 1,
+ PyDoc_STR("(ComponentInstance ci) -> (ComponentResult _rv)")},
+ {"TweenerReset", (PyCFunction)Qt_TweenerReset, 1,
+ PyDoc_STR("(TweenerComponent tc) -> (ComponentResult _rv)")},
+ {"TCGetSourceRef", (PyCFunction)Qt_TCGetSourceRef, 1,
+ PyDoc_STR("(MediaHandler mh, TimeCodeDescriptionHandle tcdH) -> (HandlerError _rv, UserData srefH)")},
+ {"TCSetSourceRef", (PyCFunction)Qt_TCSetSourceRef, 1,
+ PyDoc_STR("(MediaHandler mh, TimeCodeDescriptionHandle tcdH, UserData srefH) -> (HandlerError _rv)")},
+ {"TCSetTimeCodeFlags", (PyCFunction)Qt_TCSetTimeCodeFlags, 1,
+ PyDoc_STR("(MediaHandler mh, long flags, long flagsMask) -> (HandlerError _rv)")},
+ {"TCGetTimeCodeFlags", (PyCFunction)Qt_TCGetTimeCodeFlags, 1,
+ PyDoc_STR("(MediaHandler mh) -> (HandlerError _rv, long flags)")},
+ {"MovieImportHandle", (PyCFunction)Qt_MovieImportHandle, 1,
+ PyDoc_STR("(MovieImportComponent ci, Handle dataH, Movie theMovie, Track targetTrack, TimeValue atTime, long inFlags) -> (ComponentResult _rv, Track usedTrack, TimeValue addedDuration, long outFlags)")},
+ {"MovieImportFile", (PyCFunction)Qt_MovieImportFile, 1,
+ PyDoc_STR("(MovieImportComponent ci, FSSpec theFile, Movie theMovie, Track targetTrack, TimeValue atTime, long inFlags) -> (ComponentResult _rv, Track usedTrack, TimeValue addedDuration, long outFlags)")},
+ {"MovieImportSetSampleDuration", (PyCFunction)Qt_MovieImportSetSampleDuration, 1,
+ PyDoc_STR("(MovieImportComponent ci, TimeValue duration, TimeScale scale) -> (ComponentResult _rv)")},
+ {"MovieImportSetSampleDescription", (PyCFunction)Qt_MovieImportSetSampleDescription, 1,
+ PyDoc_STR("(MovieImportComponent ci, SampleDescriptionHandle desc, OSType mediaType) -> (ComponentResult _rv)")},
+ {"MovieImportSetMediaFile", (PyCFunction)Qt_MovieImportSetMediaFile, 1,
+ PyDoc_STR("(MovieImportComponent ci, AliasHandle alias) -> (ComponentResult _rv)")},
+ {"MovieImportSetDimensions", (PyCFunction)Qt_MovieImportSetDimensions, 1,
+ PyDoc_STR("(MovieImportComponent ci, Fixed width, Fixed height) -> (ComponentResult _rv)")},
+ {"MovieImportSetChunkSize", (PyCFunction)Qt_MovieImportSetChunkSize, 1,
+ PyDoc_STR("(MovieImportComponent ci, long chunkSize) -> (ComponentResult _rv)")},
+ {"MovieImportSetAuxiliaryData", (PyCFunction)Qt_MovieImportSetAuxiliaryData, 1,
+ PyDoc_STR("(MovieImportComponent ci, Handle data, OSType handleType) -> (ComponentResult _rv)")},
+ {"MovieImportSetFromScrap", (PyCFunction)Qt_MovieImportSetFromScrap, 1,
+ PyDoc_STR("(MovieImportComponent ci, Boolean fromScrap) -> (ComponentResult _rv)")},
+ {"MovieImportDoUserDialog", (PyCFunction)Qt_MovieImportDoUserDialog, 1,
+ PyDoc_STR("(MovieImportComponent ci, FSSpec theFile, Handle theData) -> (ComponentResult _rv, Boolean canceled)")},
+ {"MovieImportSetDuration", (PyCFunction)Qt_MovieImportSetDuration, 1,
+ PyDoc_STR("(MovieImportComponent ci, TimeValue duration) -> (ComponentResult _rv)")},
+ {"MovieImportGetAuxiliaryDataType", (PyCFunction)Qt_MovieImportGetAuxiliaryDataType, 1,
+ PyDoc_STR("(MovieImportComponent ci) -> (ComponentResult _rv, OSType auxType)")},
+ {"MovieImportValidate", (PyCFunction)Qt_MovieImportValidate, 1,
+ PyDoc_STR("(MovieImportComponent ci, FSSpec theFile, Handle theData) -> (ComponentResult _rv, Boolean valid)")},
+ {"MovieImportGetFileType", (PyCFunction)Qt_MovieImportGetFileType, 1,
+ PyDoc_STR("(MovieImportComponent ci) -> (ComponentResult _rv, OSType fileType)")},
+ {"MovieImportDataRef", (PyCFunction)Qt_MovieImportDataRef, 1,
+ PyDoc_STR("(MovieImportComponent ci, Handle dataRef, OSType dataRefType, Movie theMovie, Track targetTrack, TimeValue atTime, long inFlags) -> (ComponentResult _rv, Track usedTrack, TimeValue addedDuration, long outFlags)")},
+ {"MovieImportGetSampleDescription", (PyCFunction)Qt_MovieImportGetSampleDescription, 1,
+ PyDoc_STR("(MovieImportComponent ci) -> (ComponentResult _rv, SampleDescriptionHandle desc, OSType mediaType)")},
+ {"MovieImportSetOffsetAndLimit", (PyCFunction)Qt_MovieImportSetOffsetAndLimit, 1,
+ PyDoc_STR("(MovieImportComponent ci, unsigned long offset, unsigned long limit) -> (ComponentResult _rv)")},
+ {"MovieImportSetOffsetAndLimit64", (PyCFunction)Qt_MovieImportSetOffsetAndLimit64, 1,
+ PyDoc_STR("(MovieImportComponent ci, wide offset, wide limit) -> (ComponentResult _rv)")},
+ {"MovieImportIdle", (PyCFunction)Qt_MovieImportIdle, 1,
+ PyDoc_STR("(MovieImportComponent ci, long inFlags) -> (ComponentResult _rv, long outFlags)")},
+ {"MovieImportValidateDataRef", (PyCFunction)Qt_MovieImportValidateDataRef, 1,
+ PyDoc_STR("(MovieImportComponent ci, Handle dataRef, OSType dataRefType) -> (ComponentResult _rv, UInt8 valid)")},
+ {"MovieImportGetLoadState", (PyCFunction)Qt_MovieImportGetLoadState, 1,
+ PyDoc_STR("(MovieImportComponent ci) -> (ComponentResult _rv, long importerLoadState)")},
+ {"MovieImportGetMaxLoadedTime", (PyCFunction)Qt_MovieImportGetMaxLoadedTime, 1,
+ PyDoc_STR("(MovieImportComponent ci) -> (ComponentResult _rv, TimeValue time)")},
+ {"MovieImportEstimateCompletionTime", (PyCFunction)Qt_MovieImportEstimateCompletionTime, 1,
+ PyDoc_STR("(MovieImportComponent ci) -> (ComponentResult _rv, TimeRecord time)")},
+ {"MovieImportSetDontBlock", (PyCFunction)Qt_MovieImportSetDontBlock, 1,
+ PyDoc_STR("(MovieImportComponent ci, Boolean dontBlock) -> (ComponentResult _rv)")},
+ {"MovieImportGetDontBlock", (PyCFunction)Qt_MovieImportGetDontBlock, 1,
+ PyDoc_STR("(MovieImportComponent ci) -> (ComponentResult _rv, Boolean willBlock)")},
+ {"MovieImportSetIdleManager", (PyCFunction)Qt_MovieImportSetIdleManager, 1,
+ PyDoc_STR("(MovieImportComponent ci, IdleManager im) -> (ComponentResult _rv)")},
+ {"MovieImportSetNewMovieFlags", (PyCFunction)Qt_MovieImportSetNewMovieFlags, 1,
+ PyDoc_STR("(MovieImportComponent ci, long newMovieFlags) -> (ComponentResult _rv)")},
+ {"MovieImportGetDestinationMediaType", (PyCFunction)Qt_MovieImportGetDestinationMediaType, 1,
+ PyDoc_STR("(MovieImportComponent ci) -> (ComponentResult _rv, OSType mediaType)")},
+ {"MovieExportToHandle", (PyCFunction)Qt_MovieExportToHandle, 1,
+ PyDoc_STR("(MovieExportComponent ci, Handle dataH, Movie theMovie, Track onlyThisTrack, TimeValue startTime, TimeValue duration) -> (ComponentResult _rv)")},
+ {"MovieExportToFile", (PyCFunction)Qt_MovieExportToFile, 1,
+ PyDoc_STR("(MovieExportComponent ci, FSSpec theFile, Movie theMovie, Track onlyThisTrack, TimeValue startTime, TimeValue duration) -> (ComponentResult _rv)")},
+ {"MovieExportGetAuxiliaryData", (PyCFunction)Qt_MovieExportGetAuxiliaryData, 1,
+ PyDoc_STR("(MovieExportComponent ci, Handle dataH) -> (ComponentResult _rv, OSType handleType)")},
+ {"MovieExportSetSampleDescription", (PyCFunction)Qt_MovieExportSetSampleDescription, 1,
+ PyDoc_STR("(MovieExportComponent ci, SampleDescriptionHandle desc, OSType mediaType) -> (ComponentResult _rv)")},
+ {"MovieExportDoUserDialog", (PyCFunction)Qt_MovieExportDoUserDialog, 1,
+ PyDoc_STR("(MovieExportComponent ci, Movie theMovie, Track onlyThisTrack, TimeValue startTime, TimeValue duration) -> (ComponentResult _rv, Boolean canceled)")},
+ {"MovieExportGetCreatorType", (PyCFunction)Qt_MovieExportGetCreatorType, 1,
+ PyDoc_STR("(MovieExportComponent ci) -> (ComponentResult _rv, OSType creator)")},
+ {"MovieExportToDataRef", (PyCFunction)Qt_MovieExportToDataRef, 1,
+ PyDoc_STR("(MovieExportComponent ci, Handle dataRef, OSType dataRefType, Movie theMovie, Track onlyThisTrack, TimeValue startTime, TimeValue duration) -> (ComponentResult _rv)")},
+ {"MovieExportFromProceduresToDataRef", (PyCFunction)Qt_MovieExportFromProceduresToDataRef, 1,
+ PyDoc_STR("(MovieExportComponent ci, Handle dataRef, OSType dataRefType) -> (ComponentResult _rv)")},
+ {"MovieExportValidate", (PyCFunction)Qt_MovieExportValidate, 1,
+ PyDoc_STR("(MovieExportComponent ci, Movie theMovie, Track onlyThisTrack) -> (ComponentResult _rv, Boolean valid)")},
+ {"MovieExportGetFileNameExtension", (PyCFunction)Qt_MovieExportGetFileNameExtension, 1,
+ PyDoc_STR("(MovieExportComponent ci) -> (ComponentResult _rv, OSType extension)")},
+ {"MovieExportGetShortFileTypeString", (PyCFunction)Qt_MovieExportGetShortFileTypeString, 1,
+ PyDoc_STR("(MovieExportComponent ci, Str255 typeString) -> (ComponentResult _rv)")},
+ {"MovieExportGetSourceMediaType", (PyCFunction)Qt_MovieExportGetSourceMediaType, 1,
+ PyDoc_STR("(MovieExportComponent ci) -> (ComponentResult _rv, OSType mediaType)")},
+ {"TextExportGetTimeFraction", (PyCFunction)Qt_TextExportGetTimeFraction, 1,
+ PyDoc_STR("(TextExportComponent ci) -> (ComponentResult _rv, long movieTimeFraction)")},
+ {"TextExportSetTimeFraction", (PyCFunction)Qt_TextExportSetTimeFraction, 1,
+ PyDoc_STR("(TextExportComponent ci, long movieTimeFraction) -> (ComponentResult _rv)")},
+ {"TextExportGetSettings", (PyCFunction)Qt_TextExportGetSettings, 1,
+ PyDoc_STR("(TextExportComponent ci) -> (ComponentResult _rv, long setting)")},
+ {"TextExportSetSettings", (PyCFunction)Qt_TextExportSetSettings, 1,
+ PyDoc_STR("(TextExportComponent ci, long setting) -> (ComponentResult _rv)")},
+ {"MIDIImportGetSettings", (PyCFunction)Qt_MIDIImportGetSettings, 1,
+ PyDoc_STR("(TextExportComponent ci) -> (ComponentResult _rv, long setting)")},
+ {"MIDIImportSetSettings", (PyCFunction)Qt_MIDIImportSetSettings, 1,
+ PyDoc_STR("(TextExportComponent ci, long setting) -> (ComponentResult _rv)")},
+ {"GraphicsImageImportSetSequenceEnabled", (PyCFunction)Qt_GraphicsImageImportSetSequenceEnabled, 1,
+ PyDoc_STR("(GraphicImageMovieImportComponent ci, Boolean enable) -> (ComponentResult _rv)")},
+ {"GraphicsImageImportGetSequenceEnabled", (PyCFunction)Qt_GraphicsImageImportGetSequenceEnabled, 1,
+ PyDoc_STR("(GraphicImageMovieImportComponent ci) -> (ComponentResult _rv, Boolean enable)")},
+ {"PreviewShowData", (PyCFunction)Qt_PreviewShowData, 1,
+ PyDoc_STR("(pnotComponent p, OSType dataType, Handle data, Rect inHere) -> (ComponentResult _rv)")},
+ {"PreviewMakePreviewReference", (PyCFunction)Qt_PreviewMakePreviewReference, 1,
+ PyDoc_STR("(pnotComponent p, FSSpec sourceFile) -> (ComponentResult _rv, OSType previewType, short resID)")},
+ {"PreviewEvent", (PyCFunction)Qt_PreviewEvent, 1,
+ PyDoc_STR("(pnotComponent p) -> (ComponentResult _rv, EventRecord e, Boolean handledEvent)")},
+ {"DataCodecDecompress", (PyCFunction)Qt_DataCodecDecompress, 1,
+ PyDoc_STR("(DataCodecComponent dc, void * srcData, UInt32 srcSize, void * dstData, UInt32 dstBufferSize) -> (ComponentResult _rv)")},
+ {"DataCodecGetCompressBufferSize", (PyCFunction)Qt_DataCodecGetCompressBufferSize, 1,
+ PyDoc_STR("(DataCodecComponent dc, UInt32 srcSize) -> (ComponentResult _rv, UInt32 dstSize)")},
+ {"DataCodecCompress", (PyCFunction)Qt_DataCodecCompress, 1,
+ PyDoc_STR("(DataCodecComponent dc, void * srcData, UInt32 srcSize, void * dstData, UInt32 dstBufferSize) -> (ComponentResult _rv, UInt32 actualDstSize, UInt32 decompressSlop)")},
+ {"DataCodecBeginInterruptSafe", (PyCFunction)Qt_DataCodecBeginInterruptSafe, 1,
+ PyDoc_STR("(DataCodecComponent dc, unsigned long maxSrcSize) -> (ComponentResult _rv)")},
+ {"DataCodecEndInterruptSafe", (PyCFunction)Qt_DataCodecEndInterruptSafe, 1,
+ PyDoc_STR("(DataCodecComponent dc) -> (ComponentResult _rv)")},
+ {"DataHGetData", (PyCFunction)Qt_DataHGetData, 1,
+ PyDoc_STR("(DataHandler dh, Handle h, long hOffset, long offset, long size) -> (ComponentResult _rv)")},
+ {"DataHPutData", (PyCFunction)Qt_DataHPutData, 1,
+ PyDoc_STR("(DataHandler dh, Handle h, long hOffset, long size) -> (ComponentResult _rv, long offset)")},
+ {"DataHFlushData", (PyCFunction)Qt_DataHFlushData, 1,
+ PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv)")},
+ {"DataHOpenForWrite", (PyCFunction)Qt_DataHOpenForWrite, 1,
+ PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv)")},
+ {"DataHCloseForWrite", (PyCFunction)Qt_DataHCloseForWrite, 1,
+ PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv)")},
+ {"DataHOpenForRead", (PyCFunction)Qt_DataHOpenForRead, 1,
+ PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv)")},
+ {"DataHCloseForRead", (PyCFunction)Qt_DataHCloseForRead, 1,
+ PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv)")},
+ {"DataHSetDataRef", (PyCFunction)Qt_DataHSetDataRef, 1,
+ PyDoc_STR("(DataHandler dh, Handle dataRef) -> (ComponentResult _rv)")},
+ {"DataHGetDataRef", (PyCFunction)Qt_DataHGetDataRef, 1,
+ PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv, Handle dataRef)")},
+ {"DataHCompareDataRef", (PyCFunction)Qt_DataHCompareDataRef, 1,
+ PyDoc_STR("(DataHandler dh, Handle dataRef) -> (ComponentResult _rv, Boolean equal)")},
+ {"DataHTask", (PyCFunction)Qt_DataHTask, 1,
+ PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv)")},
+ {"DataHFinishData", (PyCFunction)Qt_DataHFinishData, 1,
+ PyDoc_STR("(DataHandler dh, Ptr PlaceToPutDataPtr, Boolean Cancel) -> (ComponentResult _rv)")},
+ {"DataHFlushCache", (PyCFunction)Qt_DataHFlushCache, 1,
+ PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv)")},
+ {"DataHResolveDataRef", (PyCFunction)Qt_DataHResolveDataRef, 1,
+ PyDoc_STR("(DataHandler dh, Handle theDataRef, Boolean userInterfaceAllowed) -> (ComponentResult _rv, Boolean wasChanged)")},
+ {"DataHGetFileSize", (PyCFunction)Qt_DataHGetFileSize, 1,
+ PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv, long fileSize)")},
+ {"DataHCanUseDataRef", (PyCFunction)Qt_DataHCanUseDataRef, 1,
+ PyDoc_STR("(DataHandler dh, Handle dataRef) -> (ComponentResult _rv, long useFlags)")},
+ {"DataHPreextend", (PyCFunction)Qt_DataHPreextend, 1,
+ PyDoc_STR("(DataHandler dh, unsigned long maxToAdd) -> (ComponentResult _rv, unsigned long spaceAdded)")},
+ {"DataHSetFileSize", (PyCFunction)Qt_DataHSetFileSize, 1,
+ PyDoc_STR("(DataHandler dh, long fileSize) -> (ComponentResult _rv)")},
+ {"DataHGetFreeSpace", (PyCFunction)Qt_DataHGetFreeSpace, 1,
+ PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv, unsigned long freeSize)")},
+ {"DataHCreateFile", (PyCFunction)Qt_DataHCreateFile, 1,
+ PyDoc_STR("(DataHandler dh, OSType creator, Boolean deleteExisting) -> (ComponentResult _rv)")},
+ {"DataHGetPreferredBlockSize", (PyCFunction)Qt_DataHGetPreferredBlockSize, 1,
+ PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv, long blockSize)")},
+ {"DataHGetDeviceIndex", (PyCFunction)Qt_DataHGetDeviceIndex, 1,
+ PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv, long deviceIndex)")},
+ {"DataHIsStreamingDataHandler", (PyCFunction)Qt_DataHIsStreamingDataHandler, 1,
+ PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv, Boolean yes)")},
+ {"DataHGetDataInBuffer", (PyCFunction)Qt_DataHGetDataInBuffer, 1,
+ PyDoc_STR("(DataHandler dh, long startOffset) -> (ComponentResult _rv, long size)")},
+ {"DataHGetScheduleAheadTime", (PyCFunction)Qt_DataHGetScheduleAheadTime, 1,
+ PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv, long millisecs)")},
+ {"DataHSetCacheSizeLimit", (PyCFunction)Qt_DataHSetCacheSizeLimit, 1,
+ PyDoc_STR("(DataHandler dh, Size cacheSizeLimit) -> (ComponentResult _rv)")},
+ {"DataHGetCacheSizeLimit", (PyCFunction)Qt_DataHGetCacheSizeLimit, 1,
+ PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv, Size cacheSizeLimit)")},
+ {"DataHGetMovie", (PyCFunction)Qt_DataHGetMovie, 1,
+ PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv, Movie theMovie, short id)")},
+ {"DataHAddMovie", (PyCFunction)Qt_DataHAddMovie, 1,
+ PyDoc_STR("(DataHandler dh, Movie theMovie) -> (ComponentResult _rv, short id)")},
+ {"DataHUpdateMovie", (PyCFunction)Qt_DataHUpdateMovie, 1,
+ PyDoc_STR("(DataHandler dh, Movie theMovie, short id) -> (ComponentResult _rv)")},
+ {"DataHDoesBuffer", (PyCFunction)Qt_DataHDoesBuffer, 1,
+ PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv, Boolean buffersReads, Boolean buffersWrites)")},
+ {"DataHGetFileName", (PyCFunction)Qt_DataHGetFileName, 1,
+ PyDoc_STR("(DataHandler dh, Str255 str) -> (ComponentResult _rv)")},
+ {"DataHGetAvailableFileSize", (PyCFunction)Qt_DataHGetAvailableFileSize, 1,
+ PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv, long fileSize)")},
+ {"DataHGetMacOSFileType", (PyCFunction)Qt_DataHGetMacOSFileType, 1,
+ PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv, OSType fileType)")},
+ {"DataHGetMIMEType", (PyCFunction)Qt_DataHGetMIMEType, 1,
+ PyDoc_STR("(DataHandler dh, Str255 mimeType) -> (ComponentResult _rv)")},
+ {"DataHSetDataRefWithAnchor", (PyCFunction)Qt_DataHSetDataRefWithAnchor, 1,
+ PyDoc_STR("(DataHandler dh, Handle anchorDataRef, OSType dataRefType, Handle dataRef) -> (ComponentResult _rv)")},
+ {"DataHGetDataRefWithAnchor", (PyCFunction)Qt_DataHGetDataRefWithAnchor, 1,
+ PyDoc_STR("(DataHandler dh, Handle anchorDataRef, OSType dataRefType) -> (ComponentResult _rv, Handle dataRef)")},
+ {"DataHSetMacOSFileType", (PyCFunction)Qt_DataHSetMacOSFileType, 1,
+ PyDoc_STR("(DataHandler dh, OSType fileType) -> (ComponentResult _rv)")},
+ {"DataHSetTimeBase", (PyCFunction)Qt_DataHSetTimeBase, 1,
+ PyDoc_STR("(DataHandler dh, TimeBase tb) -> (ComponentResult _rv)")},
+ {"DataHGetInfoFlags", (PyCFunction)Qt_DataHGetInfoFlags, 1,
+ PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv, UInt32 flags)")},
+ {"DataHGetFileSize64", (PyCFunction)Qt_DataHGetFileSize64, 1,
+ PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv, wide fileSize)")},
+ {"DataHPreextend64", (PyCFunction)Qt_DataHPreextend64, 1,
+ PyDoc_STR("(DataHandler dh, wide maxToAdd) -> (ComponentResult _rv, wide spaceAdded)")},
+ {"DataHSetFileSize64", (PyCFunction)Qt_DataHSetFileSize64, 1,
+ PyDoc_STR("(DataHandler dh, wide fileSize) -> (ComponentResult _rv)")},
+ {"DataHGetFreeSpace64", (PyCFunction)Qt_DataHGetFreeSpace64, 1,
+ PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv, wide freeSize)")},
+ {"DataHAppend64", (PyCFunction)Qt_DataHAppend64, 1,
+ PyDoc_STR("(DataHandler dh, void * data, unsigned long size) -> (ComponentResult _rv, wide fileOffset)")},
+ {"DataHPollRead", (PyCFunction)Qt_DataHPollRead, 1,
+ PyDoc_STR("(DataHandler dh, void * dataPtr) -> (ComponentResult _rv, UInt32 dataSizeSoFar)")},
+ {"DataHGetDataAvailability", (PyCFunction)Qt_DataHGetDataAvailability, 1,
+ PyDoc_STR("(DataHandler dh, long offset, long len) -> (ComponentResult _rv, long missing_offset, long missing_len)")},
+ {"DataHGetDataRefAsType", (PyCFunction)Qt_DataHGetDataRefAsType, 1,
+ PyDoc_STR("(DataHandler dh, OSType requestedType) -> (ComponentResult _rv, Handle dataRef)")},
+ {"DataHSetDataRefExtension", (PyCFunction)Qt_DataHSetDataRefExtension, 1,
+ PyDoc_STR("(DataHandler dh, Handle extension, OSType idType) -> (ComponentResult _rv)")},
+ {"DataHGetDataRefExtension", (PyCFunction)Qt_DataHGetDataRefExtension, 1,
+ PyDoc_STR("(DataHandler dh, OSType idType) -> (ComponentResult _rv, Handle extension)")},
+ {"DataHGetMovieWithFlags", (PyCFunction)Qt_DataHGetMovieWithFlags, 1,
+ PyDoc_STR("(DataHandler dh, short flags) -> (ComponentResult _rv, Movie theMovie, short id)")},
+ {"DataHGetFileTypeOrdering", (PyCFunction)Qt_DataHGetFileTypeOrdering, 1,
+ PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv, DataHFileTypeOrderingHandle orderingListHandle)")},
+ {"DataHCreateFileWithFlags", (PyCFunction)Qt_DataHCreateFileWithFlags, 1,
+ PyDoc_STR("(DataHandler dh, OSType creator, Boolean deleteExisting, UInt32 flags) -> (ComponentResult _rv)")},
+ {"DataHGetInfo", (PyCFunction)Qt_DataHGetInfo, 1,
+ PyDoc_STR("(DataHandler dh, OSType what, void * info) -> (ComponentResult _rv)")},
+ {"DataHSetIdleManager", (PyCFunction)Qt_DataHSetIdleManager, 1,
+ PyDoc_STR("(DataHandler dh, IdleManager im) -> (ComponentResult _rv)")},
+ {"DataHDeleteFile", (PyCFunction)Qt_DataHDeleteFile, 1,
+ PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv)")},
+ {"DataHSetMovieUsageFlags", (PyCFunction)Qt_DataHSetMovieUsageFlags, 1,
+ PyDoc_STR("(DataHandler dh, long flags) -> (ComponentResult _rv)")},
+ {"DataHUseTemporaryDataRef", (PyCFunction)Qt_DataHUseTemporaryDataRef, 1,
+ PyDoc_STR("(DataHandler dh, long inFlags) -> (ComponentResult _rv)")},
+ {"DataHGetTemporaryDataRefCapabilities", (PyCFunction)Qt_DataHGetTemporaryDataRefCapabilities, 1,
+ PyDoc_STR("(DataHandler dh) -> (ComponentResult _rv, long outUnderstoodFlags)")},
+ {"DataHRenameFile", (PyCFunction)Qt_DataHRenameFile, 1,
+ PyDoc_STR("(DataHandler dh, Handle newDataRef) -> (ComponentResult _rv)")},
+ {"DataHPlaybackHints", (PyCFunction)Qt_DataHPlaybackHints, 1,
+ PyDoc_STR("(DataHandler dh, long flags, unsigned long minFileOffset, unsigned long maxFileOffset, long bytesPerSecond) -> (ComponentResult _rv)")},
+ {"DataHPlaybackHints64", (PyCFunction)Qt_DataHPlaybackHints64, 1,
+ PyDoc_STR("(DataHandler dh, long flags, wide minFileOffset, wide maxFileOffset, long bytesPerSecond) -> (ComponentResult _rv)")},
+ {"DataHGetDataRate", (PyCFunction)Qt_DataHGetDataRate, 1,
+ PyDoc_STR("(DataHandler dh, long flags) -> (ComponentResult _rv, long bytesPerSecond)")},
+ {"DataHSetTimeHints", (PyCFunction)Qt_DataHSetTimeHints, 1,
+ PyDoc_STR("(DataHandler dh, long flags, long bandwidthPriority, TimeScale scale, TimeValue minTime, TimeValue maxTime) -> (ComponentResult _rv)")},
+ {"VDGetMaxSrcRect", (PyCFunction)Qt_VDGetMaxSrcRect, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci, short inputStd) -> (ComponentResult _rv, Rect maxSrcRect)")},
+ {"VDGetActiveSrcRect", (PyCFunction)Qt_VDGetActiveSrcRect, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci, short inputStd) -> (ComponentResult _rv, Rect activeSrcRect)")},
+ {"VDSetDigitizerRect", (PyCFunction)Qt_VDSetDigitizerRect, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, Rect digitizerRect)")},
+ {"VDGetDigitizerRect", (PyCFunction)Qt_VDGetDigitizerRect, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, Rect digitizerRect)")},
+ {"VDGetVBlankRect", (PyCFunction)Qt_VDGetVBlankRect, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci, short inputStd) -> (ComponentResult _rv, Rect vBlankRect)")},
+ {"VDGetMaskPixMap", (PyCFunction)Qt_VDGetMaskPixMap, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci, PixMapHandle maskPixMap) -> (ComponentResult _rv)")},
+ {"VDUseThisCLUT", (PyCFunction)Qt_VDUseThisCLUT, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci, CTabHandle colorTableHandle) -> (ComponentResult _rv)")},
+ {"VDSetInputGammaValue", (PyCFunction)Qt_VDSetInputGammaValue, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci, Fixed channel1, Fixed channel2, Fixed channel3) -> (ComponentResult _rv)")},
+ {"VDGetInputGammaValue", (PyCFunction)Qt_VDGetInputGammaValue, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, Fixed channel1, Fixed channel2, Fixed channel3)")},
+ {"VDSetBrightness", (PyCFunction)Qt_VDSetBrightness, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, unsigned short brightness)")},
+ {"VDGetBrightness", (PyCFunction)Qt_VDGetBrightness, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, unsigned short brightness)")},
+ {"VDSetContrast", (PyCFunction)Qt_VDSetContrast, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, unsigned short contrast)")},
+ {"VDSetHue", (PyCFunction)Qt_VDSetHue, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, unsigned short hue)")},
+ {"VDSetSharpness", (PyCFunction)Qt_VDSetSharpness, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, unsigned short sharpness)")},
+ {"VDSetSaturation", (PyCFunction)Qt_VDSetSaturation, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, unsigned short saturation)")},
+ {"VDGetContrast", (PyCFunction)Qt_VDGetContrast, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, unsigned short contrast)")},
+ {"VDGetHue", (PyCFunction)Qt_VDGetHue, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, unsigned short hue)")},
+ {"VDGetSharpness", (PyCFunction)Qt_VDGetSharpness, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, unsigned short sharpness)")},
+ {"VDGetSaturation", (PyCFunction)Qt_VDGetSaturation, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, unsigned short saturation)")},
+ {"VDGrabOneFrame", (PyCFunction)Qt_VDGrabOneFrame, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv)")},
+ {"VDGetMaxAuxBuffer", (PyCFunction)Qt_VDGetMaxAuxBuffer, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, PixMapHandle pm, Rect r)")},
+ {"VDGetCurrentFlags", (PyCFunction)Qt_VDGetCurrentFlags, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, long inputCurrentFlag, long outputCurrentFlag)")},
+ {"VDSetKeyColor", (PyCFunction)Qt_VDSetKeyColor, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci, long index) -> (ComponentResult _rv)")},
+ {"VDGetKeyColor", (PyCFunction)Qt_VDGetKeyColor, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, long index)")},
+ {"VDAddKeyColor", (PyCFunction)Qt_VDAddKeyColor, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, long index)")},
+ {"VDGetNextKeyColor", (PyCFunction)Qt_VDGetNextKeyColor, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci, long index) -> (ComponentResult _rv)")},
+ {"VDSetKeyColorRange", (PyCFunction)Qt_VDSetKeyColorRange, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, RGBColor minRGB, RGBColor maxRGB)")},
+ {"VDGetKeyColorRange", (PyCFunction)Qt_VDGetKeyColorRange, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, RGBColor minRGB, RGBColor maxRGB)")},
+ {"VDSetInputColorSpaceMode", (PyCFunction)Qt_VDSetInputColorSpaceMode, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci, short colorSpaceMode) -> (ComponentResult _rv)")},
+ {"VDGetInputColorSpaceMode", (PyCFunction)Qt_VDGetInputColorSpaceMode, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, short colorSpaceMode)")},
+ {"VDSetClipState", (PyCFunction)Qt_VDSetClipState, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci, short clipEnable) -> (ComponentResult _rv)")},
+ {"VDGetClipState", (PyCFunction)Qt_VDGetClipState, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, short clipEnable)")},
+ {"VDSetClipRgn", (PyCFunction)Qt_VDSetClipRgn, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci, RgnHandle clipRegion) -> (ComponentResult _rv)")},
+ {"VDClearClipRgn", (PyCFunction)Qt_VDClearClipRgn, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci, RgnHandle clipRegion) -> (ComponentResult _rv)")},
+ {"VDGetCLUTInUse", (PyCFunction)Qt_VDGetCLUTInUse, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, CTabHandle colorTableHandle)")},
+ {"VDSetPLLFilterType", (PyCFunction)Qt_VDSetPLLFilterType, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci, short pllType) -> (ComponentResult _rv)")},
+ {"VDGetPLLFilterType", (PyCFunction)Qt_VDGetPLLFilterType, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, short pllType)")},
+ {"VDGetMaskandValue", (PyCFunction)Qt_VDGetMaskandValue, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci, unsigned short blendLevel) -> (ComponentResult _rv, long mask, long value)")},
+ {"VDSetMasterBlendLevel", (PyCFunction)Qt_VDSetMasterBlendLevel, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, unsigned short blendLevel)")},
+ {"VDSetPlayThruOnOff", (PyCFunction)Qt_VDSetPlayThruOnOff, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci, short state) -> (ComponentResult _rv)")},
+ {"VDSetFieldPreference", (PyCFunction)Qt_VDSetFieldPreference, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci, short fieldFlag) -> (ComponentResult _rv)")},
+ {"VDGetFieldPreference", (PyCFunction)Qt_VDGetFieldPreference, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, short fieldFlag)")},
+ {"VDPreflightGlobalRect", (PyCFunction)Qt_VDPreflightGlobalRect, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci, GrafPtr theWindow) -> (ComponentResult _rv, Rect globalRect)")},
+ {"VDSetPlayThruGlobalRect", (PyCFunction)Qt_VDSetPlayThruGlobalRect, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci, GrafPtr theWindow) -> (ComponentResult _rv, Rect globalRect)")},
+ {"VDSetBlackLevelValue", (PyCFunction)Qt_VDSetBlackLevelValue, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, unsigned short blackLevel)")},
+ {"VDGetBlackLevelValue", (PyCFunction)Qt_VDGetBlackLevelValue, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, unsigned short blackLevel)")},
+ {"VDSetWhiteLevelValue", (PyCFunction)Qt_VDSetWhiteLevelValue, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, unsigned short whiteLevel)")},
+ {"VDGetWhiteLevelValue", (PyCFunction)Qt_VDGetWhiteLevelValue, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, unsigned short whiteLevel)")},
+ {"VDGetVideoDefaults", (PyCFunction)Qt_VDGetVideoDefaults, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, unsigned short blackLevel, unsigned short whiteLevel, unsigned short brightness, unsigned short hue, unsigned short saturation, unsigned short contrast, unsigned short sharpness)")},
+ {"VDGetNumberOfInputs", (PyCFunction)Qt_VDGetNumberOfInputs, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, short inputs)")},
+ {"VDGetInputFormat", (PyCFunction)Qt_VDGetInputFormat, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci, short input) -> (ComponentResult _rv, short format)")},
+ {"VDSetInput", (PyCFunction)Qt_VDSetInput, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci, short input) -> (ComponentResult _rv)")},
+ {"VDGetInput", (PyCFunction)Qt_VDGetInput, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, short input)")},
+ {"VDSetInputStandard", (PyCFunction)Qt_VDSetInputStandard, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci, short inputStandard) -> (ComponentResult _rv)")},
+ {"VDSetupBuffers", (PyCFunction)Qt_VDSetupBuffers, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci, VdigBufferRecListHandle bufferList) -> (ComponentResult _rv)")},
+ {"VDGrabOneFrameAsync", (PyCFunction)Qt_VDGrabOneFrameAsync, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci, short buffer) -> (ComponentResult _rv)")},
+ {"VDDone", (PyCFunction)Qt_VDDone, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci, short buffer) -> (ComponentResult _rv)")},
+ {"VDSetCompression", (PyCFunction)Qt_VDSetCompression, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci, OSType compressType, short depth, CodecQ spatialQuality, CodecQ temporalQuality, long keyFrameRate) -> (ComponentResult _rv, Rect bounds)")},
+ {"VDCompressOneFrameAsync", (PyCFunction)Qt_VDCompressOneFrameAsync, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv)")},
+ {"VDGetImageDescription", (PyCFunction)Qt_VDGetImageDescription, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci, ImageDescriptionHandle desc) -> (ComponentResult _rv)")},
+ {"VDResetCompressSequence", (PyCFunction)Qt_VDResetCompressSequence, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv)")},
+ {"VDSetCompressionOnOff", (PyCFunction)Qt_VDSetCompressionOnOff, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci, Boolean state) -> (ComponentResult _rv)")},
+ {"VDGetCompressionTypes", (PyCFunction)Qt_VDGetCompressionTypes, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci, VDCompressionListHandle h) -> (ComponentResult _rv)")},
+ {"VDSetTimeBase", (PyCFunction)Qt_VDSetTimeBase, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci, TimeBase t) -> (ComponentResult _rv)")},
+ {"VDSetFrameRate", (PyCFunction)Qt_VDSetFrameRate, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci, Fixed framesPerSecond) -> (ComponentResult _rv)")},
+ {"VDGetDataRate", (PyCFunction)Qt_VDGetDataRate, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, long milliSecPerFrame, Fixed framesPerSecond, long bytesPerSecond)")},
+ {"VDGetSoundInputDriver", (PyCFunction)Qt_VDGetSoundInputDriver, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci, Str255 soundDriverName) -> (ComponentResult _rv)")},
+ {"VDGetDMADepths", (PyCFunction)Qt_VDGetDMADepths, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, long depthArray, long preferredDepth)")},
+ {"VDGetPreferredTimeScale", (PyCFunction)Qt_VDGetPreferredTimeScale, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, TimeScale preferred)")},
+ {"VDReleaseAsyncBuffers", (PyCFunction)Qt_VDReleaseAsyncBuffers, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv)")},
+ {"VDSetDataRate", (PyCFunction)Qt_VDSetDataRate, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci, long bytesPerSecond) -> (ComponentResult _rv)")},
+ {"VDGetTimeCode", (PyCFunction)Qt_VDGetTimeCode, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci, void * timeCodeFormat, void * timeCodeTime) -> (ComponentResult _rv, TimeRecord atTime)")},
+ {"VDUseSafeBuffers", (PyCFunction)Qt_VDUseSafeBuffers, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci, Boolean useSafeBuffers) -> (ComponentResult _rv)")},
+ {"VDGetSoundInputSource", (PyCFunction)Qt_VDGetSoundInputSource, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci, long videoInput) -> (ComponentResult _rv, long soundInput)")},
+ {"VDGetCompressionTime", (PyCFunction)Qt_VDGetCompressionTime, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci, OSType compressionType, short depth) -> (ComponentResult _rv, Rect srcRect, CodecQ spatialQuality, CodecQ temporalQuality, unsigned long compressTime)")},
+ {"VDSetPreferredPacketSize", (PyCFunction)Qt_VDSetPreferredPacketSize, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci, long preferredPacketSizeInBytes) -> (ComponentResult _rv)")},
+ {"VDSetPreferredImageDimensions", (PyCFunction)Qt_VDSetPreferredImageDimensions, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci, long width, long height) -> (ComponentResult _rv)")},
+ {"VDGetPreferredImageDimensions", (PyCFunction)Qt_VDGetPreferredImageDimensions, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci) -> (ComponentResult _rv, long width, long height)")},
+ {"VDGetInputName", (PyCFunction)Qt_VDGetInputName, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci, long videoInput, Str255 name) -> (ComponentResult _rv)")},
+ {"VDSetDestinationPort", (PyCFunction)Qt_VDSetDestinationPort, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci, CGrafPtr destPort) -> (ComponentResult _rv)")},
+ {"VDGetDeviceNameAndFlags", (PyCFunction)Qt_VDGetDeviceNameAndFlags, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci, Str255 outName) -> (ComponentResult _rv, UInt32 outNameFlags)")},
+ {"VDCaptureStateChanging", (PyCFunction)Qt_VDCaptureStateChanging, 1,
+ PyDoc_STR("(VideoDigitizerComponent ci, UInt32 inStateFlags) -> (ComponentResult _rv)")},
+ {"XMLParseGetDetailedParseError", (PyCFunction)Qt_XMLParseGetDetailedParseError, 1,
+ PyDoc_STR("(ComponentInstance aParser, StringPtr errDesc) -> (ComponentResult _rv, long errorLine)")},
+ {"XMLParseAddElement", (PyCFunction)Qt_XMLParseAddElement, 1,
+ PyDoc_STR("(ComponentInstance aParser, UInt32 nameSpaceID, long elementFlags) -> (ComponentResult _rv, char elementName, UInt32 elementID)")},
+ {"XMLParseAddAttribute", (PyCFunction)Qt_XMLParseAddAttribute, 1,
+ PyDoc_STR("(ComponentInstance aParser, UInt32 elementID, UInt32 nameSpaceID) -> (ComponentResult _rv, char attributeName, UInt32 attributeID)")},
+ {"XMLParseAddMultipleAttributes", (PyCFunction)Qt_XMLParseAddMultipleAttributes, 1,
+ PyDoc_STR("(ComponentInstance aParser, UInt32 elementID) -> (ComponentResult _rv, UInt32 nameSpaceIDs, char attributeNames, UInt32 attributeIDs)")},
+ {"XMLParseAddAttributeAndValue", (PyCFunction)Qt_XMLParseAddAttributeAndValue, 1,
+ PyDoc_STR("(ComponentInstance aParser, UInt32 elementID, UInt32 nameSpaceID, UInt32 attributeValueKind, void * attributeValueKindInfo) -> (ComponentResult _rv, char attributeName, UInt32 attributeID)")},
+ {"XMLParseAddAttributeValueKind", (PyCFunction)Qt_XMLParseAddAttributeValueKind, 1,
+ PyDoc_STR("(ComponentInstance aParser, UInt32 elementID, UInt32 attributeID, UInt32 attributeValueKind, void * attributeValueKindInfo) -> (ComponentResult _rv)")},
+ {"XMLParseAddNameSpace", (PyCFunction)Qt_XMLParseAddNameSpace, 1,
+ PyDoc_STR("(ComponentInstance aParser) -> (ComponentResult _rv, char nameSpaceURL, UInt32 nameSpaceID)")},
+ {"XMLParseSetOffsetAndLimit", (PyCFunction)Qt_XMLParseSetOffsetAndLimit, 1,
+ PyDoc_STR("(ComponentInstance aParser, UInt32 offset, UInt32 limit) -> (ComponentResult _rv)")},
+ {"XMLParseSetEventParseRefCon", (PyCFunction)Qt_XMLParseSetEventParseRefCon, 1,
+ PyDoc_STR("(ComponentInstance aParser, long refcon) -> (ComponentResult _rv)")},
+ {"SGInitialize", (PyCFunction)Qt_SGInitialize, 1,
+ PyDoc_STR("(SeqGrabComponent s) -> (ComponentResult _rv)")},
+ {"SGSetDataOutput", (PyCFunction)Qt_SGSetDataOutput, 1,
+ PyDoc_STR("(SeqGrabComponent s, FSSpec movieFile, long whereFlags) -> (ComponentResult _rv)")},
+ {"SGGetDataOutput", (PyCFunction)Qt_SGGetDataOutput, 1,
+ PyDoc_STR("(SeqGrabComponent s, FSSpec movieFile) -> (ComponentResult _rv, long whereFlags)")},
+ {"SGSetGWorld", (PyCFunction)Qt_SGSetGWorld, 1,
+ PyDoc_STR("(SeqGrabComponent s, CGrafPtr gp, GDHandle gd) -> (ComponentResult _rv)")},
+ {"SGGetGWorld", (PyCFunction)Qt_SGGetGWorld, 1,
+ PyDoc_STR("(SeqGrabComponent s) -> (ComponentResult _rv, CGrafPtr gp, GDHandle gd)")},
+ {"SGNewChannel", (PyCFunction)Qt_SGNewChannel, 1,
+ PyDoc_STR("(SeqGrabComponent s, OSType channelType) -> (ComponentResult _rv, SGChannel ref)")},
+ {"SGDisposeChannel", (PyCFunction)Qt_SGDisposeChannel, 1,
+ PyDoc_STR("(SeqGrabComponent s, SGChannel c) -> (ComponentResult _rv)")},
+ {"SGStartPreview", (PyCFunction)Qt_SGStartPreview, 1,
+ PyDoc_STR("(SeqGrabComponent s) -> (ComponentResult _rv)")},
+ {"SGStartRecord", (PyCFunction)Qt_SGStartRecord, 1,
+ PyDoc_STR("(SeqGrabComponent s) -> (ComponentResult _rv)")},
+ {"SGIdle", (PyCFunction)Qt_SGIdle, 1,
+ PyDoc_STR("(SeqGrabComponent s) -> (ComponentResult _rv)")},
+ {"SGStop", (PyCFunction)Qt_SGStop, 1,
+ PyDoc_STR("(SeqGrabComponent s) -> (ComponentResult _rv)")},
+ {"SGPause", (PyCFunction)Qt_SGPause, 1,
+ PyDoc_STR("(SeqGrabComponent s, Boolean pause) -> (ComponentResult _rv)")},
+ {"SGPrepare", (PyCFunction)Qt_SGPrepare, 1,
+ PyDoc_STR("(SeqGrabComponent s, Boolean prepareForPreview, Boolean prepareForRecord) -> (ComponentResult _rv)")},
+ {"SGRelease", (PyCFunction)Qt_SGRelease, 1,
+ PyDoc_STR("(SeqGrabComponent s) -> (ComponentResult _rv)")},
+ {"SGGetMovie", (PyCFunction)Qt_SGGetMovie, 1,
+ PyDoc_STR("(SeqGrabComponent s) -> (Movie _rv)")},
+ {"SGSetMaximumRecordTime", (PyCFunction)Qt_SGSetMaximumRecordTime, 1,
+ PyDoc_STR("(SeqGrabComponent s, unsigned long ticks) -> (ComponentResult _rv)")},
+ {"SGGetMaximumRecordTime", (PyCFunction)Qt_SGGetMaximumRecordTime, 1,
+ PyDoc_STR("(SeqGrabComponent s) -> (ComponentResult _rv, unsigned long ticks)")},
+ {"SGGetStorageSpaceRemaining", (PyCFunction)Qt_SGGetStorageSpaceRemaining, 1,
+ PyDoc_STR("(SeqGrabComponent s) -> (ComponentResult _rv, unsigned long bytes)")},
+ {"SGGetTimeRemaining", (PyCFunction)Qt_SGGetTimeRemaining, 1,
+ PyDoc_STR("(SeqGrabComponent s) -> (ComponentResult _rv, long ticksLeft)")},
+ {"SGGrabPict", (PyCFunction)Qt_SGGrabPict, 1,
+ PyDoc_STR("(SeqGrabComponent s, Rect bounds, short offscreenDepth, long grabPictFlags) -> (ComponentResult _rv, PicHandle p)")},
+ {"SGGetLastMovieResID", (PyCFunction)Qt_SGGetLastMovieResID, 1,
+ PyDoc_STR("(SeqGrabComponent s) -> (ComponentResult _rv, short resID)")},
+ {"SGSetFlags", (PyCFunction)Qt_SGSetFlags, 1,
+ PyDoc_STR("(SeqGrabComponent s, long sgFlags) -> (ComponentResult _rv)")},
+ {"SGGetFlags", (PyCFunction)Qt_SGGetFlags, 1,
+ PyDoc_STR("(SeqGrabComponent s) -> (ComponentResult _rv, long sgFlags)")},
+ {"SGNewChannelFromComponent", (PyCFunction)Qt_SGNewChannelFromComponent, 1,
+ PyDoc_STR("(SeqGrabComponent s, Component sgChannelComponent) -> (ComponentResult _rv, SGChannel newChannel)")},
+ {"SGSetSettings", (PyCFunction)Qt_SGSetSettings, 1,
+ PyDoc_STR("(SeqGrabComponent s, UserData ud, long flags) -> (ComponentResult _rv)")},
+ {"SGGetSettings", (PyCFunction)Qt_SGGetSettings, 1,
+ PyDoc_STR("(SeqGrabComponent s, long flags) -> (ComponentResult _rv, UserData ud)")},
+ {"SGGetIndChannel", (PyCFunction)Qt_SGGetIndChannel, 1,
+ PyDoc_STR("(SeqGrabComponent s, short index) -> (ComponentResult _rv, SGChannel ref, OSType chanType)")},
+ {"SGUpdate", (PyCFunction)Qt_SGUpdate, 1,
+ PyDoc_STR("(SeqGrabComponent s, RgnHandle updateRgn) -> (ComponentResult _rv)")},
+ {"SGGetPause", (PyCFunction)Qt_SGGetPause, 1,
+ PyDoc_STR("(SeqGrabComponent s) -> (ComponentResult _rv, Boolean paused)")},
+ {"SGSetChannelSettings", (PyCFunction)Qt_SGSetChannelSettings, 1,
+ PyDoc_STR("(SeqGrabComponent s, SGChannel c, UserData ud, long flags) -> (ComponentResult _rv)")},
+ {"SGGetChannelSettings", (PyCFunction)Qt_SGGetChannelSettings, 1,
+ PyDoc_STR("(SeqGrabComponent s, SGChannel c, long flags) -> (ComponentResult _rv, UserData ud)")},
+ {"SGGetMode", (PyCFunction)Qt_SGGetMode, 1,
+ PyDoc_STR("(SeqGrabComponent s) -> (ComponentResult _rv, Boolean previewMode, Boolean recordMode)")},
+ {"SGSetDataRef", (PyCFunction)Qt_SGSetDataRef, 1,
+ PyDoc_STR("(SeqGrabComponent s, Handle dataRef, OSType dataRefType, long whereFlags) -> (ComponentResult _rv)")},
+ {"SGGetDataRef", (PyCFunction)Qt_SGGetDataRef, 1,
+ PyDoc_STR("(SeqGrabComponent s) -> (ComponentResult _rv, Handle dataRef, OSType dataRefType, long whereFlags)")},
+ {"SGNewOutput", (PyCFunction)Qt_SGNewOutput, 1,
+ PyDoc_STR("(SeqGrabComponent s, Handle dataRef, OSType dataRefType, long whereFlags) -> (ComponentResult _rv, SGOutput sgOut)")},
+ {"SGDisposeOutput", (PyCFunction)Qt_SGDisposeOutput, 1,
+ PyDoc_STR("(SeqGrabComponent s, SGOutput sgOut) -> (ComponentResult _rv)")},
+ {"SGSetOutputFlags", (PyCFunction)Qt_SGSetOutputFlags, 1,
+ PyDoc_STR("(SeqGrabComponent s, SGOutput sgOut, long whereFlags) -> (ComponentResult _rv)")},
+ {"SGSetChannelOutput", (PyCFunction)Qt_SGSetChannelOutput, 1,
+ PyDoc_STR("(SeqGrabComponent s, SGChannel c, SGOutput sgOut) -> (ComponentResult _rv)")},
+ {"SGGetDataOutputStorageSpaceRemaining", (PyCFunction)Qt_SGGetDataOutputStorageSpaceRemaining, 1,
+ PyDoc_STR("(SeqGrabComponent s, SGOutput sgOut) -> (ComponentResult _rv, unsigned long space)")},
+ {"SGHandleUpdateEvent", (PyCFunction)Qt_SGHandleUpdateEvent, 1,
+ PyDoc_STR("(SeqGrabComponent s, EventRecord event) -> (ComponentResult _rv, Boolean handled)")},
+ {"SGSetOutputNextOutput", (PyCFunction)Qt_SGSetOutputNextOutput, 1,
+ PyDoc_STR("(SeqGrabComponent s, SGOutput sgOut, SGOutput nextOut) -> (ComponentResult _rv)")},
+ {"SGGetOutputNextOutput", (PyCFunction)Qt_SGGetOutputNextOutput, 1,
+ PyDoc_STR("(SeqGrabComponent s, SGOutput sgOut) -> (ComponentResult _rv, SGOutput nextOut)")},
+ {"SGSetOutputMaximumOffset", (PyCFunction)Qt_SGSetOutputMaximumOffset, 1,
+ PyDoc_STR("(SeqGrabComponent s, SGOutput sgOut, wide maxOffset) -> (ComponentResult _rv)")},
+ {"SGGetOutputMaximumOffset", (PyCFunction)Qt_SGGetOutputMaximumOffset, 1,
+ PyDoc_STR("(SeqGrabComponent s, SGOutput sgOut) -> (ComponentResult _rv, wide maxOffset)")},
+ {"SGGetOutputDataReference", (PyCFunction)Qt_SGGetOutputDataReference, 1,
+ PyDoc_STR("(SeqGrabComponent s, SGOutput sgOut) -> (ComponentResult _rv, Handle dataRef, OSType dataRefType)")},
+ {"SGWriteExtendedMovieData", (PyCFunction)Qt_SGWriteExtendedMovieData, 1,
+ PyDoc_STR("(SeqGrabComponent s, SGChannel c, Ptr p, long len) -> (ComponentResult _rv, wide offset, SGOutput sgOut)")},
+ {"SGGetStorageSpaceRemaining64", (PyCFunction)Qt_SGGetStorageSpaceRemaining64, 1,
+ PyDoc_STR("(SeqGrabComponent s) -> (ComponentResult _rv, wide bytes)")},
+ {"SGGetDataOutputStorageSpaceRemaining64", (PyCFunction)Qt_SGGetDataOutputStorageSpaceRemaining64, 1,
+ PyDoc_STR("(SeqGrabComponent s, SGOutput sgOut) -> (ComponentResult _rv, wide space)")},
+ {"SGWriteMovieData", (PyCFunction)Qt_SGWriteMovieData, 1,
+ PyDoc_STR("(SeqGrabComponent s, SGChannel c, Ptr p, long len) -> (ComponentResult _rv, long offset)")},
+ {"SGGetTimeBase", (PyCFunction)Qt_SGGetTimeBase, 1,
+ PyDoc_STR("(SeqGrabComponent s) -> (ComponentResult _rv, TimeBase tb)")},
+ {"SGAddMovieData", (PyCFunction)Qt_SGAddMovieData, 1,
+ PyDoc_STR("(SeqGrabComponent s, SGChannel c, Ptr p, long len, long chRefCon, TimeValue time, short writeType) -> (ComponentResult _rv, long offset)")},
+ {"SGChangedSource", (PyCFunction)Qt_SGChangedSource, 1,
+ PyDoc_STR("(SeqGrabComponent s, SGChannel c) -> (ComponentResult _rv)")},
+ {"SGAddExtendedMovieData", (PyCFunction)Qt_SGAddExtendedMovieData, 1,
+ PyDoc_STR("(SeqGrabComponent s, SGChannel c, Ptr p, long len, long chRefCon, TimeValue time, short writeType) -> (ComponentResult _rv, wide offset, SGOutput whichOutput)")},
+ {"SGAddOutputDataRefToMedia", (PyCFunction)Qt_SGAddOutputDataRefToMedia, 1,
+ PyDoc_STR("(SeqGrabComponent s, SGOutput sgOut, Media theMedia, SampleDescriptionHandle desc) -> (ComponentResult _rv)")},
+ {"SGSetSettingsSummary", (PyCFunction)Qt_SGSetSettingsSummary, 1,
+ PyDoc_STR("(SeqGrabComponent s, Handle summaryText) -> (ComponentResult _rv)")},
+ {"SGSetChannelUsage", (PyCFunction)Qt_SGSetChannelUsage, 1,
+ PyDoc_STR("(SGChannel c, long usage) -> (ComponentResult _rv)")},
+ {"SGGetChannelUsage", (PyCFunction)Qt_SGGetChannelUsage, 1,
+ PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, long usage)")},
+ {"SGSetChannelBounds", (PyCFunction)Qt_SGSetChannelBounds, 1,
+ PyDoc_STR("(SGChannel c, Rect bounds) -> (ComponentResult _rv)")},
+ {"SGGetChannelBounds", (PyCFunction)Qt_SGGetChannelBounds, 1,
+ PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, Rect bounds)")},
+ {"SGSetChannelVolume", (PyCFunction)Qt_SGSetChannelVolume, 1,
+ PyDoc_STR("(SGChannel c, short volume) -> (ComponentResult _rv)")},
+ {"SGGetChannelVolume", (PyCFunction)Qt_SGGetChannelVolume, 1,
+ PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, short volume)")},
+ {"SGGetChannelInfo", (PyCFunction)Qt_SGGetChannelInfo, 1,
+ PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, long channelInfo)")},
+ {"SGSetChannelPlayFlags", (PyCFunction)Qt_SGSetChannelPlayFlags, 1,
+ PyDoc_STR("(SGChannel c, long playFlags) -> (ComponentResult _rv)")},
+ {"SGGetChannelPlayFlags", (PyCFunction)Qt_SGGetChannelPlayFlags, 1,
+ PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, long playFlags)")},
+ {"SGSetChannelMaxFrames", (PyCFunction)Qt_SGSetChannelMaxFrames, 1,
+ PyDoc_STR("(SGChannel c, long frameCount) -> (ComponentResult _rv)")},
+ {"SGGetChannelMaxFrames", (PyCFunction)Qt_SGGetChannelMaxFrames, 1,
+ PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, long frameCount)")},
+ {"SGSetChannelRefCon", (PyCFunction)Qt_SGSetChannelRefCon, 1,
+ PyDoc_STR("(SGChannel c, long refCon) -> (ComponentResult _rv)")},
+ {"SGSetChannelClip", (PyCFunction)Qt_SGSetChannelClip, 1,
+ PyDoc_STR("(SGChannel c, RgnHandle theClip) -> (ComponentResult _rv)")},
+ {"SGGetChannelClip", (PyCFunction)Qt_SGGetChannelClip, 1,
+ PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, RgnHandle theClip)")},
+ {"SGGetChannelSampleDescription", (PyCFunction)Qt_SGGetChannelSampleDescription, 1,
+ PyDoc_STR("(SGChannel c, Handle sampleDesc) -> (ComponentResult _rv)")},
+ {"SGSetChannelDevice", (PyCFunction)Qt_SGSetChannelDevice, 1,
+ PyDoc_STR("(SGChannel c, StringPtr name) -> (ComponentResult _rv)")},
+ {"SGGetChannelTimeScale", (PyCFunction)Qt_SGGetChannelTimeScale, 1,
+ PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, TimeScale scale)")},
+ {"SGChannelPutPicture", (PyCFunction)Qt_SGChannelPutPicture, 1,
+ PyDoc_STR("(SGChannel c) -> (ComponentResult _rv)")},
+ {"SGChannelSetRequestedDataRate", (PyCFunction)Qt_SGChannelSetRequestedDataRate, 1,
+ PyDoc_STR("(SGChannel c, long bytesPerSecond) -> (ComponentResult _rv)")},
+ {"SGChannelGetRequestedDataRate", (PyCFunction)Qt_SGChannelGetRequestedDataRate, 1,
+ PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, long bytesPerSecond)")},
+ {"SGChannelSetDataSourceName", (PyCFunction)Qt_SGChannelSetDataSourceName, 1,
+ PyDoc_STR("(SGChannel c, Str255 name, ScriptCode scriptTag) -> (ComponentResult _rv)")},
+ {"SGChannelGetDataSourceName", (PyCFunction)Qt_SGChannelGetDataSourceName, 1,
+ PyDoc_STR("(SGChannel c, Str255 name) -> (ComponentResult _rv, ScriptCode scriptTag)")},
+ {"SGChannelSetCodecSettings", (PyCFunction)Qt_SGChannelSetCodecSettings, 1,
+ PyDoc_STR("(SGChannel c, Handle settings) -> (ComponentResult _rv)")},
+ {"SGChannelGetCodecSettings", (PyCFunction)Qt_SGChannelGetCodecSettings, 1,
+ PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, Handle settings)")},
+ {"SGGetChannelTimeBase", (PyCFunction)Qt_SGGetChannelTimeBase, 1,
+ PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, TimeBase tb)")},
+ {"SGGetChannelRefCon", (PyCFunction)Qt_SGGetChannelRefCon, 1,
+ PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, long refCon)")},
+ {"SGGetChannelDeviceAndInputNames", (PyCFunction)Qt_SGGetChannelDeviceAndInputNames, 1,
+ PyDoc_STR("(SGChannel c, Str255 outDeviceName, Str255 outInputName) -> (ComponentResult _rv, short outInputNumber)")},
+ {"SGSetChannelDeviceInput", (PyCFunction)Qt_SGSetChannelDeviceInput, 1,
+ PyDoc_STR("(SGChannel c, short inInputNumber) -> (ComponentResult _rv)")},
+ {"SGSetChannelSettingsStateChanging", (PyCFunction)Qt_SGSetChannelSettingsStateChanging, 1,
+ PyDoc_STR("(SGChannel c, UInt32 inFlags) -> (ComponentResult _rv)")},
+ {"SGInitChannel", (PyCFunction)Qt_SGInitChannel, 1,
+ PyDoc_STR("(SGChannel c, SeqGrabComponent owner) -> (ComponentResult _rv)")},
+ {"SGWriteSamples", (PyCFunction)Qt_SGWriteSamples, 1,
+ PyDoc_STR("(SGChannel c, Movie m, AliasHandle theFile) -> (ComponentResult _rv)")},
+ {"SGGetDataRate", (PyCFunction)Qt_SGGetDataRate, 1,
+ PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, long bytesPerSecond)")},
+ {"SGAlignChannelRect", (PyCFunction)Qt_SGAlignChannelRect, 1,
+ PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, Rect r)")},
+ {"SGPanelGetDitl", (PyCFunction)Qt_SGPanelGetDitl, 1,
+ PyDoc_STR("(SeqGrabComponent s) -> (ComponentResult _rv, Handle ditl)")},
+ {"SGPanelGetTitle", (PyCFunction)Qt_SGPanelGetTitle, 1,
+ PyDoc_STR("(SeqGrabComponent s, Str255 title) -> (ComponentResult _rv)")},
+ {"SGPanelCanRun", (PyCFunction)Qt_SGPanelCanRun, 1,
+ PyDoc_STR("(SeqGrabComponent s, SGChannel c) -> (ComponentResult _rv)")},
+ {"SGPanelInstall", (PyCFunction)Qt_SGPanelInstall, 1,
+ PyDoc_STR("(SeqGrabComponent s, SGChannel c, DialogPtr d, short itemOffset) -> (ComponentResult _rv)")},
+ {"SGPanelEvent", (PyCFunction)Qt_SGPanelEvent, 1,
+ PyDoc_STR("(SeqGrabComponent s, SGChannel c, DialogPtr d, short itemOffset, EventRecord theEvent) -> (ComponentResult _rv, short itemHit, Boolean handled)")},
+ {"SGPanelItem", (PyCFunction)Qt_SGPanelItem, 1,
+ PyDoc_STR("(SeqGrabComponent s, SGChannel c, DialogPtr d, short itemOffset, short itemNum) -> (ComponentResult _rv)")},
+ {"SGPanelRemove", (PyCFunction)Qt_SGPanelRemove, 1,
+ PyDoc_STR("(SeqGrabComponent s, SGChannel c, DialogPtr d, short itemOffset) -> (ComponentResult _rv)")},
+ {"SGPanelSetGrabber", (PyCFunction)Qt_SGPanelSetGrabber, 1,
+ PyDoc_STR("(SeqGrabComponent s, SeqGrabComponent sg) -> (ComponentResult _rv)")},
+ {"SGPanelSetResFile", (PyCFunction)Qt_SGPanelSetResFile, 1,
+ PyDoc_STR("(SeqGrabComponent s, short resRef) -> (ComponentResult _rv)")},
+ {"SGPanelGetSettings", (PyCFunction)Qt_SGPanelGetSettings, 1,
+ PyDoc_STR("(SeqGrabComponent s, SGChannel c, long flags) -> (ComponentResult _rv, UserData ud)")},
+ {"SGPanelSetSettings", (PyCFunction)Qt_SGPanelSetSettings, 1,
+ PyDoc_STR("(SeqGrabComponent s, SGChannel c, UserData ud, long flags) -> (ComponentResult _rv)")},
+ {"SGPanelValidateInput", (PyCFunction)Qt_SGPanelValidateInput, 1,
+ PyDoc_STR("(SeqGrabComponent s) -> (ComponentResult _rv, Boolean ok)")},
+ {"SGPanelGetDITLForSize", (PyCFunction)Qt_SGPanelGetDITLForSize, 1,
+ PyDoc_STR("(SeqGrabComponent s) -> (ComponentResult _rv, Handle ditl, Point requestedSize)")},
+ {"SGGetSrcVideoBounds", (PyCFunction)Qt_SGGetSrcVideoBounds, 1,
+ PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, Rect r)")},
+ {"SGSetVideoRect", (PyCFunction)Qt_SGSetVideoRect, 1,
+ PyDoc_STR("(SGChannel c, Rect r) -> (ComponentResult _rv)")},
+ {"SGGetVideoRect", (PyCFunction)Qt_SGGetVideoRect, 1,
+ PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, Rect r)")},
+ {"SGGetVideoCompressorType", (PyCFunction)Qt_SGGetVideoCompressorType, 1,
+ PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, OSType compressorType)")},
+ {"SGSetVideoCompressorType", (PyCFunction)Qt_SGSetVideoCompressorType, 1,
+ PyDoc_STR("(SGChannel c, OSType compressorType) -> (ComponentResult _rv)")},
+ {"SGSetVideoCompressor", (PyCFunction)Qt_SGSetVideoCompressor, 1,
+ PyDoc_STR("(SGChannel c, short depth, CompressorComponent compressor, CodecQ spatialQuality, CodecQ temporalQuality, long keyFrameRate) -> (ComponentResult _rv)")},
+ {"SGGetVideoCompressor", (PyCFunction)Qt_SGGetVideoCompressor, 1,
+ PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, short depth, CompressorComponent compressor, CodecQ spatialQuality, CodecQ temporalQuality, long keyFrameRate)")},
+ {"SGGetVideoDigitizerComponent", (PyCFunction)Qt_SGGetVideoDigitizerComponent, 1,
+ PyDoc_STR("(SGChannel c) -> (ComponentInstance _rv)")},
+ {"SGSetVideoDigitizerComponent", (PyCFunction)Qt_SGSetVideoDigitizerComponent, 1,
+ PyDoc_STR("(SGChannel c, ComponentInstance vdig) -> (ComponentResult _rv)")},
+ {"SGVideoDigitizerChanged", (PyCFunction)Qt_SGVideoDigitizerChanged, 1,
+ PyDoc_STR("(SGChannel c) -> (ComponentResult _rv)")},
+ {"SGGrabFrame", (PyCFunction)Qt_SGGrabFrame, 1,
+ PyDoc_STR("(SGChannel c, short bufferNum) -> (ComponentResult _rv)")},
+ {"SGGrabFrameComplete", (PyCFunction)Qt_SGGrabFrameComplete, 1,
+ PyDoc_STR("(SGChannel c, short bufferNum) -> (ComponentResult _rv, Boolean done)")},
+ {"SGCompressFrame", (PyCFunction)Qt_SGCompressFrame, 1,
+ PyDoc_STR("(SGChannel c, short bufferNum) -> (ComponentResult _rv)")},
+ {"SGSetCompressBuffer", (PyCFunction)Qt_SGSetCompressBuffer, 1,
+ PyDoc_STR("(SGChannel c, short depth, Rect compressSize) -> (ComponentResult _rv)")},
+ {"SGGetCompressBuffer", (PyCFunction)Qt_SGGetCompressBuffer, 1,
+ PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, short depth, Rect compressSize)")},
+ {"SGGetBufferInfo", (PyCFunction)Qt_SGGetBufferInfo, 1,
+ PyDoc_STR("(SGChannel c, short bufferNum) -> (ComponentResult _rv, PixMapHandle bufferPM, Rect bufferRect, GWorldPtr compressBuffer, Rect compressBufferRect)")},
+ {"SGSetUseScreenBuffer", (PyCFunction)Qt_SGSetUseScreenBuffer, 1,
+ PyDoc_STR("(SGChannel c, Boolean useScreenBuffer) -> (ComponentResult _rv)")},
+ {"SGGetUseScreenBuffer", (PyCFunction)Qt_SGGetUseScreenBuffer, 1,
+ PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, Boolean useScreenBuffer)")},
+ {"SGSetFrameRate", (PyCFunction)Qt_SGSetFrameRate, 1,
+ PyDoc_STR("(SGChannel c, Fixed frameRate) -> (ComponentResult _rv)")},
+ {"SGGetFrameRate", (PyCFunction)Qt_SGGetFrameRate, 1,
+ PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, Fixed frameRate)")},
+ {"SGSetPreferredPacketSize", (PyCFunction)Qt_SGSetPreferredPacketSize, 1,
+ PyDoc_STR("(SGChannel c, long preferredPacketSizeInBytes) -> (ComponentResult _rv)")},
+ {"SGGetPreferredPacketSize", (PyCFunction)Qt_SGGetPreferredPacketSize, 1,
+ PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, long preferredPacketSizeInBytes)")},
+ {"SGSetUserVideoCompressorList", (PyCFunction)Qt_SGSetUserVideoCompressorList, 1,
+ PyDoc_STR("(SGChannel c, Handle compressorTypes) -> (ComponentResult _rv)")},
+ {"SGGetUserVideoCompressorList", (PyCFunction)Qt_SGGetUserVideoCompressorList, 1,
+ PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, Handle compressorTypes)")},
+ {"SGSetSoundInputDriver", (PyCFunction)Qt_SGSetSoundInputDriver, 1,
+ PyDoc_STR("(SGChannel c, Str255 driverName) -> (ComponentResult _rv)")},
+ {"SGGetSoundInputDriver", (PyCFunction)Qt_SGGetSoundInputDriver, 1,
+ PyDoc_STR("(SGChannel c) -> (long _rv)")},
+ {"SGSoundInputDriverChanged", (PyCFunction)Qt_SGSoundInputDriverChanged, 1,
+ PyDoc_STR("(SGChannel c) -> (ComponentResult _rv)")},
+ {"SGSetSoundRecordChunkSize", (PyCFunction)Qt_SGSetSoundRecordChunkSize, 1,
+ PyDoc_STR("(SGChannel c, long seconds) -> (ComponentResult _rv)")},
+ {"SGGetSoundRecordChunkSize", (PyCFunction)Qt_SGGetSoundRecordChunkSize, 1,
+ PyDoc_STR("(SGChannel c) -> (long _rv)")},
+ {"SGSetSoundInputRate", (PyCFunction)Qt_SGSetSoundInputRate, 1,
+ PyDoc_STR("(SGChannel c, Fixed rate) -> (ComponentResult _rv)")},
+ {"SGGetSoundInputRate", (PyCFunction)Qt_SGGetSoundInputRate, 1,
+ PyDoc_STR("(SGChannel c) -> (Fixed _rv)")},
+ {"SGSetSoundInputParameters", (PyCFunction)Qt_SGSetSoundInputParameters, 1,
+ PyDoc_STR("(SGChannel c, short sampleSize, short numChannels, OSType compressionType) -> (ComponentResult _rv)")},
+ {"SGGetSoundInputParameters", (PyCFunction)Qt_SGGetSoundInputParameters, 1,
+ PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, short sampleSize, short numChannels, OSType compressionType)")},
+ {"SGSetAdditionalSoundRates", (PyCFunction)Qt_SGSetAdditionalSoundRates, 1,
+ PyDoc_STR("(SGChannel c, Handle rates) -> (ComponentResult _rv)")},
+ {"SGGetAdditionalSoundRates", (PyCFunction)Qt_SGGetAdditionalSoundRates, 1,
+ PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, Handle rates)")},
+ {"SGSetFontName", (PyCFunction)Qt_SGSetFontName, 1,
+ PyDoc_STR("(SGChannel c, StringPtr pstr) -> (ComponentResult _rv)")},
+ {"SGSetFontSize", (PyCFunction)Qt_SGSetFontSize, 1,
+ PyDoc_STR("(SGChannel c, short fontSize) -> (ComponentResult _rv)")},
+ {"SGSetTextForeColor", (PyCFunction)Qt_SGSetTextForeColor, 1,
+ PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, RGBColor theColor)")},
+ {"SGSetTextBackColor", (PyCFunction)Qt_SGSetTextBackColor, 1,
+ PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, RGBColor theColor)")},
+ {"SGSetJustification", (PyCFunction)Qt_SGSetJustification, 1,
+ PyDoc_STR("(SGChannel c, short just) -> (ComponentResult _rv)")},
+ {"SGGetTextReturnToSpaceValue", (PyCFunction)Qt_SGGetTextReturnToSpaceValue, 1,
+ PyDoc_STR("(SGChannel c) -> (ComponentResult _rv, short rettospace)")},
+ {"SGSetTextReturnToSpaceValue", (PyCFunction)Qt_SGSetTextReturnToSpaceValue, 1,
+ PyDoc_STR("(SGChannel c, short rettospace) -> (ComponentResult _rv)")},
+ {"QTVideoOutputGetCurrentClientName", (PyCFunction)Qt_QTVideoOutputGetCurrentClientName, 1,
+ PyDoc_STR("(QTVideoOutputComponent vo, Str255 str) -> (ComponentResult _rv)")},
+ {"QTVideoOutputSetClientName", (PyCFunction)Qt_QTVideoOutputSetClientName, 1,
+ PyDoc_STR("(QTVideoOutputComponent vo, Str255 str) -> (ComponentResult _rv)")},
+ {"QTVideoOutputGetClientName", (PyCFunction)Qt_QTVideoOutputGetClientName, 1,
+ PyDoc_STR("(QTVideoOutputComponent vo, Str255 str) -> (ComponentResult _rv)")},
+ {"QTVideoOutputBegin", (PyCFunction)Qt_QTVideoOutputBegin, 1,
+ PyDoc_STR("(QTVideoOutputComponent vo) -> (ComponentResult _rv)")},
+ {"QTVideoOutputEnd", (PyCFunction)Qt_QTVideoOutputEnd, 1,
+ PyDoc_STR("(QTVideoOutputComponent vo) -> (ComponentResult _rv)")},
+ {"QTVideoOutputSetDisplayMode", (PyCFunction)Qt_QTVideoOutputSetDisplayMode, 1,
+ PyDoc_STR("(QTVideoOutputComponent vo, long displayModeID) -> (ComponentResult _rv)")},
+ {"QTVideoOutputGetDisplayMode", (PyCFunction)Qt_QTVideoOutputGetDisplayMode, 1,
+ PyDoc_STR("(QTVideoOutputComponent vo) -> (ComponentResult _rv, long displayModeID)")},
+ {"QTVideoOutputGetGWorld", (PyCFunction)Qt_QTVideoOutputGetGWorld, 1,
+ PyDoc_STR("(QTVideoOutputComponent vo) -> (ComponentResult _rv, GWorldPtr gw)")},
+ {"QTVideoOutputGetIndSoundOutput", (PyCFunction)Qt_QTVideoOutputGetIndSoundOutput, 1,
+ PyDoc_STR("(QTVideoOutputComponent vo, long index) -> (ComponentResult _rv, Component outputComponent)")},
+ {"QTVideoOutputGetClock", (PyCFunction)Qt_QTVideoOutputGetClock, 1,
+ PyDoc_STR("(QTVideoOutputComponent vo) -> (ComponentResult _rv, ComponentInstance clock)")},
+ {"QTVideoOutputSetEchoPort", (PyCFunction)Qt_QTVideoOutputSetEchoPort, 1,
+ PyDoc_STR("(QTVideoOutputComponent vo, CGrafPtr echoPort) -> (ComponentResult _rv)")},
+ {"QTVideoOutputGetIndImageDecompressor", (PyCFunction)Qt_QTVideoOutputGetIndImageDecompressor, 1,
+ PyDoc_STR("(QTVideoOutputComponent vo, long index) -> (ComponentResult _rv, Component codec)")},
+ {"QTVideoOutputBaseSetEchoPort", (PyCFunction)Qt_QTVideoOutputBaseSetEchoPort, 1,
+ PyDoc_STR("(QTVideoOutputComponent vo, CGrafPtr echoPort) -> (ComponentResult _rv)")},
+ {"MediaSetChunkManagementFlags", (PyCFunction)Qt_MediaSetChunkManagementFlags, 1,
+ PyDoc_STR("(MediaHandler mh, UInt32 flags, UInt32 flagsMask) -> (ComponentResult _rv)")},
+ {"MediaGetChunkManagementFlags", (PyCFunction)Qt_MediaGetChunkManagementFlags, 1,
+ PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, UInt32 flags)")},
+ {"MediaSetPurgeableChunkMemoryAllowance", (PyCFunction)Qt_MediaSetPurgeableChunkMemoryAllowance, 1,
+ PyDoc_STR("(MediaHandler mh, Size allowance) -> (ComponentResult _rv)")},
+ {"MediaGetPurgeableChunkMemoryAllowance", (PyCFunction)Qt_MediaGetPurgeableChunkMemoryAllowance, 1,
+ PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, Size allowance)")},
+ {"MediaEmptyAllPurgeableChunks", (PyCFunction)Qt_MediaEmptyAllPurgeableChunks, 1,
+ PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv)")},
+ {"MediaSetHandlerCapabilities", (PyCFunction)Qt_MediaSetHandlerCapabilities, 1,
+ PyDoc_STR("(MediaHandler mh, long flags, long flagsMask) -> (ComponentResult _rv)")},
+ {"MediaIdle", (PyCFunction)Qt_MediaIdle, 1,
+ PyDoc_STR("(MediaHandler mh, TimeValue atMediaTime, long flagsIn, TimeRecord movieTime) -> (ComponentResult _rv, long flagsOut)")},
+ {"MediaGetMediaInfo", (PyCFunction)Qt_MediaGetMediaInfo, 1,
+ PyDoc_STR("(MediaHandler mh, Handle h) -> (ComponentResult _rv)")},
+ {"MediaPutMediaInfo", (PyCFunction)Qt_MediaPutMediaInfo, 1,
+ PyDoc_STR("(MediaHandler mh, Handle h) -> (ComponentResult _rv)")},
+ {"MediaSetActive", (PyCFunction)Qt_MediaSetActive, 1,
+ PyDoc_STR("(MediaHandler mh, Boolean enableMedia) -> (ComponentResult _rv)")},
+ {"MediaSetRate", (PyCFunction)Qt_MediaSetRate, 1,
+ PyDoc_STR("(MediaHandler mh, Fixed rate) -> (ComponentResult _rv)")},
+ {"MediaGGetStatus", (PyCFunction)Qt_MediaGGetStatus, 1,
+ PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, ComponentResult statusErr)")},
+ {"MediaTrackEdited", (PyCFunction)Qt_MediaTrackEdited, 1,
+ PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv)")},
+ {"MediaSetMediaTimeScale", (PyCFunction)Qt_MediaSetMediaTimeScale, 1,
+ PyDoc_STR("(MediaHandler mh, TimeScale newTimeScale) -> (ComponentResult _rv)")},
+ {"MediaSetMovieTimeScale", (PyCFunction)Qt_MediaSetMovieTimeScale, 1,
+ PyDoc_STR("(MediaHandler mh, TimeScale newTimeScale) -> (ComponentResult _rv)")},
+ {"MediaSetGWorld", (PyCFunction)Qt_MediaSetGWorld, 1,
+ PyDoc_STR("(MediaHandler mh, CGrafPtr aPort, GDHandle aGD) -> (ComponentResult _rv)")},
+ {"MediaSetDimensions", (PyCFunction)Qt_MediaSetDimensions, 1,
+ PyDoc_STR("(MediaHandler mh, Fixed width, Fixed height) -> (ComponentResult _rv)")},
+ {"MediaSetClip", (PyCFunction)Qt_MediaSetClip, 1,
+ PyDoc_STR("(MediaHandler mh, RgnHandle theClip) -> (ComponentResult _rv)")},
+ {"MediaGetTrackOpaque", (PyCFunction)Qt_MediaGetTrackOpaque, 1,
+ PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, Boolean trackIsOpaque)")},
+ {"MediaSetGraphicsMode", (PyCFunction)Qt_MediaSetGraphicsMode, 1,
+ PyDoc_STR("(MediaHandler mh, long mode, RGBColor opColor) -> (ComponentResult _rv)")},
+ {"MediaGetGraphicsMode", (PyCFunction)Qt_MediaGetGraphicsMode, 1,
+ PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, long mode, RGBColor opColor)")},
+ {"MediaGSetVolume", (PyCFunction)Qt_MediaGSetVolume, 1,
+ PyDoc_STR("(MediaHandler mh, short volume) -> (ComponentResult _rv)")},
+ {"MediaSetSoundBalance", (PyCFunction)Qt_MediaSetSoundBalance, 1,
+ PyDoc_STR("(MediaHandler mh, short balance) -> (ComponentResult _rv)")},
+ {"MediaGetSoundBalance", (PyCFunction)Qt_MediaGetSoundBalance, 1,
+ PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, short balance)")},
+ {"MediaGetNextBoundsChange", (PyCFunction)Qt_MediaGetNextBoundsChange, 1,
+ PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, TimeValue when)")},
+ {"MediaGetSrcRgn", (PyCFunction)Qt_MediaGetSrcRgn, 1,
+ PyDoc_STR("(MediaHandler mh, RgnHandle rgn, TimeValue atMediaTime) -> (ComponentResult _rv)")},
+ {"MediaPreroll", (PyCFunction)Qt_MediaPreroll, 1,
+ PyDoc_STR("(MediaHandler mh, TimeValue time, Fixed rate) -> (ComponentResult _rv)")},
+ {"MediaSampleDescriptionChanged", (PyCFunction)Qt_MediaSampleDescriptionChanged, 1,
+ PyDoc_STR("(MediaHandler mh, long index) -> (ComponentResult _rv)")},
+ {"MediaHasCharacteristic", (PyCFunction)Qt_MediaHasCharacteristic, 1,
+ PyDoc_STR("(MediaHandler mh, OSType characteristic) -> (ComponentResult _rv, Boolean hasIt)")},
+ {"MediaGetOffscreenBufferSize", (PyCFunction)Qt_MediaGetOffscreenBufferSize, 1,
+ PyDoc_STR("(MediaHandler mh, short depth, CTabHandle ctab) -> (ComponentResult _rv, Rect bounds)")},
+ {"MediaSetHints", (PyCFunction)Qt_MediaSetHints, 1,
+ PyDoc_STR("(MediaHandler mh, long hints) -> (ComponentResult _rv)")},
+ {"MediaGetName", (PyCFunction)Qt_MediaGetName, 1,
+ PyDoc_STR("(MediaHandler mh, Str255 name, long requestedLanguage) -> (ComponentResult _rv, long actualLanguage)")},
+ {"MediaForceUpdate", (PyCFunction)Qt_MediaForceUpdate, 1,
+ PyDoc_STR("(MediaHandler mh, long forceUpdateFlags) -> (ComponentResult _rv)")},
+ {"MediaGetDrawingRgn", (PyCFunction)Qt_MediaGetDrawingRgn, 1,
+ PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, RgnHandle partialRgn)")},
+ {"MediaGSetActiveSegment", (PyCFunction)Qt_MediaGSetActiveSegment, 1,
+ PyDoc_STR("(MediaHandler mh, TimeValue activeStart, TimeValue activeDuration) -> (ComponentResult _rv)")},
+ {"MediaInvalidateRegion", (PyCFunction)Qt_MediaInvalidateRegion, 1,
+ PyDoc_STR("(MediaHandler mh, RgnHandle invalRgn) -> (ComponentResult _rv)")},
+ {"MediaGetNextStepTime", (PyCFunction)Qt_MediaGetNextStepTime, 1,
+ PyDoc_STR("(MediaHandler mh, short flags, TimeValue mediaTimeIn, Fixed rate) -> (ComponentResult _rv, TimeValue mediaTimeOut)")},
+ {"MediaChangedNonPrimarySource", (PyCFunction)Qt_MediaChangedNonPrimarySource, 1,
+ PyDoc_STR("(MediaHandler mh, long inputIndex) -> (ComponentResult _rv)")},
+ {"MediaTrackReferencesChanged", (PyCFunction)Qt_MediaTrackReferencesChanged, 1,
+ PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv)")},
+ {"MediaReleaseSampleDataPointer", (PyCFunction)Qt_MediaReleaseSampleDataPointer, 1,
+ PyDoc_STR("(MediaHandler mh, long sampleNum) -> (ComponentResult _rv)")},
+ {"MediaTrackPropertyAtomChanged", (PyCFunction)Qt_MediaTrackPropertyAtomChanged, 1,
+ PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv)")},
+ {"MediaSetVideoParam", (PyCFunction)Qt_MediaSetVideoParam, 1,
+ PyDoc_STR("(MediaHandler mh, long whichParam) -> (ComponentResult _rv, unsigned short value)")},
+ {"MediaGetVideoParam", (PyCFunction)Qt_MediaGetVideoParam, 1,
+ PyDoc_STR("(MediaHandler mh, long whichParam) -> (ComponentResult _rv, unsigned short value)")},
+ {"MediaCompare", (PyCFunction)Qt_MediaCompare, 1,
+ PyDoc_STR("(MediaHandler mh, Media srcMedia, ComponentInstance srcMediaComponent) -> (ComponentResult _rv, Boolean isOK)")},
+ {"MediaGetClock", (PyCFunction)Qt_MediaGetClock, 1,
+ PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, ComponentInstance clock)")},
+ {"MediaSetSoundOutputComponent", (PyCFunction)Qt_MediaSetSoundOutputComponent, 1,
+ PyDoc_STR("(MediaHandler mh, Component outputComponent) -> (ComponentResult _rv)")},
+ {"MediaGetSoundOutputComponent", (PyCFunction)Qt_MediaGetSoundOutputComponent, 1,
+ PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, Component outputComponent)")},
+ {"MediaSetSoundLocalizationData", (PyCFunction)Qt_MediaSetSoundLocalizationData, 1,
+ PyDoc_STR("(MediaHandler mh, Handle data) -> (ComponentResult _rv)")},
+ {"MediaGetInvalidRegion", (PyCFunction)Qt_MediaGetInvalidRegion, 1,
+ PyDoc_STR("(MediaHandler mh, RgnHandle rgn) -> (ComponentResult _rv)")},
+ {"MediaSampleDescriptionB2N", (PyCFunction)Qt_MediaSampleDescriptionB2N, 1,
+ PyDoc_STR("(MediaHandler mh, SampleDescriptionHandle sampleDescriptionH) -> (ComponentResult _rv)")},
+ {"MediaSampleDescriptionN2B", (PyCFunction)Qt_MediaSampleDescriptionN2B, 1,
+ PyDoc_STR("(MediaHandler mh, SampleDescriptionHandle sampleDescriptionH) -> (ComponentResult _rv)")},
+ {"MediaFlushNonPrimarySourceData", (PyCFunction)Qt_MediaFlushNonPrimarySourceData, 1,
+ PyDoc_STR("(MediaHandler mh, long inputIndex) -> (ComponentResult _rv)")},
+ {"MediaGetURLLink", (PyCFunction)Qt_MediaGetURLLink, 1,
+ PyDoc_STR("(MediaHandler mh, Point displayWhere) -> (ComponentResult _rv, Handle urlLink)")},
+ {"MediaHitTestForTargetRefCon", (PyCFunction)Qt_MediaHitTestForTargetRefCon, 1,
+ PyDoc_STR("(MediaHandler mh, long flags, Point loc) -> (ComponentResult _rv, long targetRefCon)")},
+ {"MediaHitTestTargetRefCon", (PyCFunction)Qt_MediaHitTestTargetRefCon, 1,
+ PyDoc_STR("(MediaHandler mh, long targetRefCon, long flags, Point loc) -> (ComponentResult _rv, Boolean wasHit)")},
+ {"MediaDisposeTargetRefCon", (PyCFunction)Qt_MediaDisposeTargetRefCon, 1,
+ PyDoc_STR("(MediaHandler mh, long targetRefCon) -> (ComponentResult _rv)")},
+ {"MediaTargetRefConsEqual", (PyCFunction)Qt_MediaTargetRefConsEqual, 1,
+ PyDoc_STR("(MediaHandler mh, long firstRefCon, long secondRefCon) -> (ComponentResult _rv, Boolean equal)")},
+ {"MediaPrePrerollCancel", (PyCFunction)Qt_MediaPrePrerollCancel, 1,
+ PyDoc_STR("(MediaHandler mh, void * refcon) -> (ComponentResult _rv)")},
+ {"MediaEnterEmptyEdit", (PyCFunction)Qt_MediaEnterEmptyEdit, 1,
+ PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv)")},
+ {"MediaCurrentMediaQueuedData", (PyCFunction)Qt_MediaCurrentMediaQueuedData, 1,
+ PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, long milliSecs)")},
+ {"MediaGetEffectiveVolume", (PyCFunction)Qt_MediaGetEffectiveVolume, 1,
+ PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, short volume)")},
+ {"MediaGetSoundLevelMeteringEnabled", (PyCFunction)Qt_MediaGetSoundLevelMeteringEnabled, 1,
+ PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, Boolean enabled)")},
+ {"MediaSetSoundLevelMeteringEnabled", (PyCFunction)Qt_MediaSetSoundLevelMeteringEnabled, 1,
+ PyDoc_STR("(MediaHandler mh, Boolean enable) -> (ComponentResult _rv)")},
+ {"MediaGetEffectiveSoundBalance", (PyCFunction)Qt_MediaGetEffectiveSoundBalance, 1,
+ PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, short balance)")},
+ {"MediaSetScreenLock", (PyCFunction)Qt_MediaSetScreenLock, 1,
+ PyDoc_STR("(MediaHandler mh, Boolean lockIt) -> (ComponentResult _rv)")},
+ {"MediaGetErrorString", (PyCFunction)Qt_MediaGetErrorString, 1,
+ PyDoc_STR("(MediaHandler mh, ComponentResult theError, Str255 errorString) -> (ComponentResult _rv)")},
+ {"MediaGetSoundEqualizerBandLevels", (PyCFunction)Qt_MediaGetSoundEqualizerBandLevels, 1,
+ PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, UInt8 bandLevels)")},
+ {"MediaDoIdleActions", (PyCFunction)Qt_MediaDoIdleActions, 1,
+ PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv)")},
+ {"MediaSetSoundBassAndTreble", (PyCFunction)Qt_MediaSetSoundBassAndTreble, 1,
+ PyDoc_STR("(MediaHandler mh, short bass, short treble) -> (ComponentResult _rv)")},
+ {"MediaGetSoundBassAndTreble", (PyCFunction)Qt_MediaGetSoundBassAndTreble, 1,
+ PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, short bass, short treble)")},
+ {"MediaTimeBaseChanged", (PyCFunction)Qt_MediaTimeBaseChanged, 1,
+ PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv)")},
+ {"MediaMCIsPlayerEvent", (PyCFunction)Qt_MediaMCIsPlayerEvent, 1,
+ PyDoc_STR("(MediaHandler mh, EventRecord e) -> (ComponentResult _rv, Boolean handledIt)")},
+ {"MediaGetMediaLoadState", (PyCFunction)Qt_MediaGetMediaLoadState, 1,
+ PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, long mediaLoadState)")},
+ {"MediaVideoOutputChanged", (PyCFunction)Qt_MediaVideoOutputChanged, 1,
+ PyDoc_STR("(MediaHandler mh, ComponentInstance vout) -> (ComponentResult _rv)")},
+ {"MediaEmptySampleCache", (PyCFunction)Qt_MediaEmptySampleCache, 1,
+ PyDoc_STR("(MediaHandler mh, long sampleNum, long sampleCount) -> (ComponentResult _rv)")},
+ {"MediaGetPublicInfo", (PyCFunction)Qt_MediaGetPublicInfo, 1,
+ PyDoc_STR("(MediaHandler mh, OSType infoSelector, void * infoDataPtr) -> (ComponentResult _rv, Size ioDataSize)")},
+ {"MediaSetPublicInfo", (PyCFunction)Qt_MediaSetPublicInfo, 1,
+ PyDoc_STR("(MediaHandler mh, OSType infoSelector, void * infoDataPtr, Size dataSize) -> (ComponentResult _rv)")},
+ {"MediaRefConSetProperty", (PyCFunction)Qt_MediaRefConSetProperty, 1,
+ PyDoc_STR("(MediaHandler mh, long refCon, long propertyType, void * propertyValue) -> (ComponentResult _rv)")},
+ {"MediaRefConGetProperty", (PyCFunction)Qt_MediaRefConGetProperty, 1,
+ PyDoc_STR("(MediaHandler mh, long refCon, long propertyType, void * propertyValue) -> (ComponentResult _rv)")},
+ {"MediaNavigateTargetRefCon", (PyCFunction)Qt_MediaNavigateTargetRefCon, 1,
+ PyDoc_STR("(MediaHandler mh, long navigation) -> (ComponentResult _rv, long refCon)")},
+ {"MediaGGetIdleManager", (PyCFunction)Qt_MediaGGetIdleManager, 1,
+ PyDoc_STR("(MediaHandler mh) -> (ComponentResult _rv, IdleManager pim)")},
+ {"MediaGSetIdleManager", (PyCFunction)Qt_MediaGSetIdleManager, 1,
+ PyDoc_STR("(MediaHandler mh, IdleManager im) -> (ComponentResult _rv)")},
+ {"QTMIDIGetMIDIPorts", (PyCFunction)Qt_QTMIDIGetMIDIPorts, 1,
+ PyDoc_STR("(QTMIDIComponent ci) -> (ComponentResult _rv, QTMIDIPortListHandle inputPorts, QTMIDIPortListHandle outputPorts)")},
+ {"QTMIDIUseSendPort", (PyCFunction)Qt_QTMIDIUseSendPort, 1,
+ PyDoc_STR("(QTMIDIComponent ci, long portIndex, long inUse) -> (ComponentResult _rv)")},
+ {"QTMIDISendMIDI", (PyCFunction)Qt_QTMIDISendMIDI, 1,
+ PyDoc_STR("(QTMIDIComponent ci, long portIndex, MusicMIDIPacket mp) -> (ComponentResult _rv)")},
+ {"MusicGetPart", (PyCFunction)Qt_MusicGetPart, 1,
+ PyDoc_STR("(MusicComponent mc, long part) -> (ComponentResult _rv, long midiChannel, long polyphony)")},
+ {"MusicSetPart", (PyCFunction)Qt_MusicSetPart, 1,
+ PyDoc_STR("(MusicComponent mc, long part, long midiChannel, long polyphony) -> (ComponentResult _rv)")},
+ {"MusicSetPartInstrumentNumber", (PyCFunction)Qt_MusicSetPartInstrumentNumber, 1,
+ PyDoc_STR("(MusicComponent mc, long part, long instrumentNumber) -> (ComponentResult _rv)")},
+ {"MusicGetPartInstrumentNumber", (PyCFunction)Qt_MusicGetPartInstrumentNumber, 1,
+ PyDoc_STR("(MusicComponent mc, long part) -> (ComponentResult _rv)")},
+ {"MusicStorePartInstrument", (PyCFunction)Qt_MusicStorePartInstrument, 1,
+ PyDoc_STR("(MusicComponent mc, long part, long instrumentNumber) -> (ComponentResult _rv)")},
+ {"MusicGetPartAtomicInstrument", (PyCFunction)Qt_MusicGetPartAtomicInstrument, 1,
+ PyDoc_STR("(MusicComponent mc, long part, long flags) -> (ComponentResult _rv, AtomicInstrument ai)")},
+ {"MusicSetPartAtomicInstrument", (PyCFunction)Qt_MusicSetPartAtomicInstrument, 1,
+ PyDoc_STR("(MusicComponent mc, long part, AtomicInstrumentPtr aiP, long flags) -> (ComponentResult _rv)")},
+ {"MusicGetPartKnob", (PyCFunction)Qt_MusicGetPartKnob, 1,
+ PyDoc_STR("(MusicComponent mc, long part, long knobID) -> (ComponentResult _rv)")},
+ {"MusicSetPartKnob", (PyCFunction)Qt_MusicSetPartKnob, 1,
+ PyDoc_STR("(MusicComponent mc, long part, long knobID, long knobValue) -> (ComponentResult _rv)")},
+ {"MusicGetKnob", (PyCFunction)Qt_MusicGetKnob, 1,
+ PyDoc_STR("(MusicComponent mc, long knobID) -> (ComponentResult _rv)")},
+ {"MusicSetKnob", (PyCFunction)Qt_MusicSetKnob, 1,
+ PyDoc_STR("(MusicComponent mc, long knobID, long knobValue) -> (ComponentResult _rv)")},
+ {"MusicGetPartName", (PyCFunction)Qt_MusicGetPartName, 1,
+ PyDoc_STR("(MusicComponent mc, long part, StringPtr name) -> (ComponentResult _rv)")},
+ {"MusicSetPartName", (PyCFunction)Qt_MusicSetPartName, 1,
+ PyDoc_STR("(MusicComponent mc, long part, StringPtr name) -> (ComponentResult _rv)")},
+ {"MusicPlayNote", (PyCFunction)Qt_MusicPlayNote, 1,
+ PyDoc_STR("(MusicComponent mc, long part, long pitch, long velocity) -> (ComponentResult _rv)")},
+ {"MusicResetPart", (PyCFunction)Qt_MusicResetPart, 1,
+ PyDoc_STR("(MusicComponent mc, long part) -> (ComponentResult _rv)")},
+ {"MusicSetPartController", (PyCFunction)Qt_MusicSetPartController, 1,
+ PyDoc_STR("(MusicComponent mc, long part, MusicController controllerNumber, long controllerValue) -> (ComponentResult _rv)")},
+ {"MusicGetPartController", (PyCFunction)Qt_MusicGetPartController, 1,
+ PyDoc_STR("(MusicComponent mc, long part, MusicController controllerNumber) -> (ComponentResult _rv)")},
+ {"MusicGetInstrumentNames", (PyCFunction)Qt_MusicGetInstrumentNames, 1,
+ PyDoc_STR("(MusicComponent mc, long modifiableInstruments) -> (ComponentResult _rv, Handle instrumentNames, Handle instrumentCategoryLasts, Handle instrumentCategoryNames)")},
+ {"MusicGetDrumNames", (PyCFunction)Qt_MusicGetDrumNames, 1,
+ PyDoc_STR("(MusicComponent mc, long modifiableInstruments) -> (ComponentResult _rv, Handle instrumentNumbers, Handle instrumentNames)")},
+ {"MusicGetMasterTune", (PyCFunction)Qt_MusicGetMasterTune, 1,
+ PyDoc_STR("(MusicComponent mc) -> (ComponentResult _rv)")},
+ {"MusicSetMasterTune", (PyCFunction)Qt_MusicSetMasterTune, 1,
+ PyDoc_STR("(MusicComponent mc, long masterTune) -> (ComponentResult _rv)")},
+ {"MusicGetDeviceConnection", (PyCFunction)Qt_MusicGetDeviceConnection, 1,
+ PyDoc_STR("(MusicComponent mc, long index) -> (ComponentResult _rv, long id1, long id2)")},
+ {"MusicUseDeviceConnection", (PyCFunction)Qt_MusicUseDeviceConnection, 1,
+ PyDoc_STR("(MusicComponent mc, long id1, long id2) -> (ComponentResult _rv)")},
+ {"MusicGetKnobSettingStrings", (PyCFunction)Qt_MusicGetKnobSettingStrings, 1,
+ PyDoc_STR("(MusicComponent mc, long knobIndex, long isGlobal) -> (ComponentResult _rv, Handle settingsNames, Handle settingsCategoryLasts, Handle settingsCategoryNames)")},
+ {"MusicGetMIDIPorts", (PyCFunction)Qt_MusicGetMIDIPorts, 1,
+ PyDoc_STR("(MusicComponent mc) -> (ComponentResult _rv, long inputPortCount, long outputPortCount)")},
+ {"MusicSendMIDI", (PyCFunction)Qt_MusicSendMIDI, 1,
+ PyDoc_STR("(MusicComponent mc, long portIndex, MusicMIDIPacket mp) -> (ComponentResult _rv)")},
+ {"MusicSetOfflineTimeTo", (PyCFunction)Qt_MusicSetOfflineTimeTo, 1,
+ PyDoc_STR("(MusicComponent mc, long newTimeStamp) -> (ComponentResult _rv)")},
+ {"MusicGetInfoText", (PyCFunction)Qt_MusicGetInfoText, 1,
+ PyDoc_STR("(MusicComponent mc, long selector) -> (ComponentResult _rv, Handle textH, Handle styleH)")},
+ {"MusicGetInstrumentInfo", (PyCFunction)Qt_MusicGetInstrumentInfo, 1,
+ PyDoc_STR("(MusicComponent mc, long getInstrumentInfoFlags) -> (ComponentResult _rv, InstrumentInfoListHandle infoListH)")},
+ {"MusicTask", (PyCFunction)Qt_MusicTask, 1,
+ PyDoc_STR("(MusicComponent mc) -> (ComponentResult _rv)")},
+ {"MusicSetPartInstrumentNumberInterruptSafe", (PyCFunction)Qt_MusicSetPartInstrumentNumberInterruptSafe, 1,
+ PyDoc_STR("(MusicComponent mc, long part, long instrumentNumber) -> (ComponentResult _rv)")},
+ {"MusicSetPartSoundLocalization", (PyCFunction)Qt_MusicSetPartSoundLocalization, 1,
+ PyDoc_STR("(MusicComponent mc, long part, Handle data) -> (ComponentResult _rv)")},
+ {"MusicGenericConfigure", (PyCFunction)Qt_MusicGenericConfigure, 1,
+ PyDoc_STR("(MusicComponent mc, long mode, long flags, long baseResID) -> (ComponentResult _rv)")},
+ {"MusicGenericGetKnobList", (PyCFunction)Qt_MusicGenericGetKnobList, 1,
+ PyDoc_STR("(MusicComponent mc, long knobType) -> (ComponentResult _rv, GenericKnobDescriptionListHandle gkdlH)")},
+ {"MusicGenericSetResourceNumbers", (PyCFunction)Qt_MusicGenericSetResourceNumbers, 1,
+ PyDoc_STR("(MusicComponent mc, Handle resourceIDH) -> (ComponentResult _rv)")},
+ {"MusicDerivedMIDISend", (PyCFunction)Qt_MusicDerivedMIDISend, 1,
+ PyDoc_STR("(MusicComponent mc, MusicMIDIPacket packet) -> (ComponentResult _rv)")},
+ {"MusicDerivedOpenResFile", (PyCFunction)Qt_MusicDerivedOpenResFile, 1,
+ PyDoc_STR("(MusicComponent mc) -> (ComponentResult _rv)")},
+ {"MusicDerivedCloseResFile", (PyCFunction)Qt_MusicDerivedCloseResFile, 1,
+ PyDoc_STR("(MusicComponent mc, short resRefNum) -> (ComponentResult _rv)")},
+ {"NAUnregisterMusicDevice", (PyCFunction)Qt_NAUnregisterMusicDevice, 1,
+ PyDoc_STR("(NoteAllocator na, long index) -> (ComponentResult _rv)")},
+ {"NASaveMusicConfiguration", (PyCFunction)Qt_NASaveMusicConfiguration, 1,
+ PyDoc_STR("(NoteAllocator na) -> (ComponentResult _rv)")},
+ {"NAGetMIDIPorts", (PyCFunction)Qt_NAGetMIDIPorts, 1,
+ PyDoc_STR("(NoteAllocator na) -> (ComponentResult _rv, QTMIDIPortListHandle inputPorts, QTMIDIPortListHandle outputPorts)")},
+ {"NATask", (PyCFunction)Qt_NATask, 1,
+ PyDoc_STR("(NoteAllocator na) -> (ComponentResult _rv)")},
+ {"TuneSetHeader", (PyCFunction)Qt_TuneSetHeader, 1,
+ PyDoc_STR("(TunePlayer tp, unsigned long * header) -> (ComponentResult _rv)")},
+ {"TuneGetTimeBase", (PyCFunction)Qt_TuneGetTimeBase, 1,
+ PyDoc_STR("(TunePlayer tp) -> (ComponentResult _rv, TimeBase tb)")},
+ {"TuneSetTimeScale", (PyCFunction)Qt_TuneSetTimeScale, 1,
+ PyDoc_STR("(TunePlayer tp, TimeScale scale) -> (ComponentResult _rv)")},
+ {"TuneGetTimeScale", (PyCFunction)Qt_TuneGetTimeScale, 1,
+ PyDoc_STR("(TunePlayer tp) -> (ComponentResult _rv, TimeScale scale)")},
+ {"TuneInstant", (PyCFunction)Qt_TuneInstant, 1,
+ PyDoc_STR("(TunePlayer tp, unsigned long tunePosition) -> (ComponentResult _rv, unsigned long tune)")},
+ {"TuneStop", (PyCFunction)Qt_TuneStop, 1,
+ PyDoc_STR("(TunePlayer tp, long stopFlags) -> (ComponentResult _rv)")},
+ {"TuneSetVolume", (PyCFunction)Qt_TuneSetVolume, 1,
+ PyDoc_STR("(TunePlayer tp, Fixed volume) -> (ComponentResult _rv)")},
+ {"TuneGetVolume", (PyCFunction)Qt_TuneGetVolume, 1,
+ PyDoc_STR("(TunePlayer tp) -> (ComponentResult _rv)")},
+ {"TunePreroll", (PyCFunction)Qt_TunePreroll, 1,
+ PyDoc_STR("(TunePlayer tp) -> (ComponentResult _rv)")},
+ {"TuneUnroll", (PyCFunction)Qt_TuneUnroll, 1,
+ PyDoc_STR("(TunePlayer tp) -> (ComponentResult _rv)")},
+ {"TuneSetPartTranspose", (PyCFunction)Qt_TuneSetPartTranspose, 1,
+ PyDoc_STR("(TunePlayer tp, unsigned long part, long transpose, long velocityShift) -> (ComponentResult _rv)")},
+ {"TuneGetNoteAllocator", (PyCFunction)Qt_TuneGetNoteAllocator, 1,
+ PyDoc_STR("(TunePlayer tp) -> (NoteAllocator _rv)")},
+ {"TuneSetSofter", (PyCFunction)Qt_TuneSetSofter, 1,
+ PyDoc_STR("(TunePlayer tp, long softer) -> (ComponentResult _rv)")},
+ {"TuneTask", (PyCFunction)Qt_TuneTask, 1,
+ PyDoc_STR("(TunePlayer tp) -> (ComponentResult _rv)")},
+ {"TuneSetBalance", (PyCFunction)Qt_TuneSetBalance, 1,
+ PyDoc_STR("(TunePlayer tp, long balance) -> (ComponentResult _rv)")},
+ {"TuneSetSoundLocalization", (PyCFunction)Qt_TuneSetSoundLocalization, 1,
+ PyDoc_STR("(TunePlayer tp, Handle data) -> (ComponentResult _rv)")},
+ {"TuneSetHeaderWithSize", (PyCFunction)Qt_TuneSetHeaderWithSize, 1,
+ PyDoc_STR("(TunePlayer tp, unsigned long * header, unsigned long size) -> (ComponentResult _rv)")},
+ {"TuneSetPartMix", (PyCFunction)Qt_TuneSetPartMix, 1,
+ PyDoc_STR("(TunePlayer tp, unsigned long partNumber, long volume, long balance, long mixFlags) -> (ComponentResult _rv)")},
+ {"TuneGetPartMix", (PyCFunction)Qt_TuneGetPartMix, 1,
+ PyDoc_STR("(TunePlayer tp, unsigned long partNumber) -> (ComponentResult _rv, long volumeOut, long balanceOut, long mixFlagsOut)")},
+ {"AlignWindow", (PyCFunction)Qt_AlignWindow, 1,
+ PyDoc_STR("(WindowPtr wp, Boolean front) -> None")},
+ {"DragAlignedWindow", (PyCFunction)Qt_DragAlignedWindow, 1,
+ PyDoc_STR("(WindowPtr wp, Point startPt, Rect boundsRect) -> None")},
+ {"MoviesTask", (PyCFunction)Qt_MoviesTask, 1,
+ PyDoc_STR("(long maxMilliSecToUse) -> None")},
#endif /* __LP64__ */
- {NULL, NULL, 0}
+ {NULL, NULL, 0}
};
@@ -28000,90 +28000,90 @@ static PyMethodDef Qt_methods[] = {
void init_Qt(void)
{
- PyObject *m;
+ PyObject *m;
#ifndef __LP64__
- PyObject *d;
-
-
-
- PyMac_INIT_TOOLBOX_OBJECT_NEW(Track, TrackObj_New);
- PyMac_INIT_TOOLBOX_OBJECT_CONVERT(Track, TrackObj_Convert);
- PyMac_INIT_TOOLBOX_OBJECT_NEW(Movie, MovieObj_New);
- PyMac_INIT_TOOLBOX_OBJECT_CONVERT(Movie, MovieObj_Convert);
- PyMac_INIT_TOOLBOX_OBJECT_NEW(MovieController, MovieCtlObj_New);
- PyMac_INIT_TOOLBOX_OBJECT_CONVERT(MovieController, MovieCtlObj_Convert);
- PyMac_INIT_TOOLBOX_OBJECT_NEW(TimeBase, TimeBaseObj_New);
- PyMac_INIT_TOOLBOX_OBJECT_CONVERT(TimeBase, TimeBaseObj_Convert);
- PyMac_INIT_TOOLBOX_OBJECT_NEW(UserData, UserDataObj_New);
- PyMac_INIT_TOOLBOX_OBJECT_CONVERT(UserData, UserDataObj_Convert);
- PyMac_INIT_TOOLBOX_OBJECT_NEW(Media, MediaObj_New);
- PyMac_INIT_TOOLBOX_OBJECT_CONVERT(Media, MediaObj_Convert);
+ PyObject *d;
+
+
+
+ PyMac_INIT_TOOLBOX_OBJECT_NEW(Track, TrackObj_New);
+ PyMac_INIT_TOOLBOX_OBJECT_CONVERT(Track, TrackObj_Convert);
+ PyMac_INIT_TOOLBOX_OBJECT_NEW(Movie, MovieObj_New);
+ PyMac_INIT_TOOLBOX_OBJECT_CONVERT(Movie, MovieObj_Convert);
+ PyMac_INIT_TOOLBOX_OBJECT_NEW(MovieController, MovieCtlObj_New);
+ PyMac_INIT_TOOLBOX_OBJECT_CONVERT(MovieController, MovieCtlObj_Convert);
+ PyMac_INIT_TOOLBOX_OBJECT_NEW(TimeBase, TimeBaseObj_New);
+ PyMac_INIT_TOOLBOX_OBJECT_CONVERT(TimeBase, TimeBaseObj_Convert);
+ PyMac_INIT_TOOLBOX_OBJECT_NEW(UserData, UserDataObj_New);
+ PyMac_INIT_TOOLBOX_OBJECT_CONVERT(UserData, UserDataObj_Convert);
+ PyMac_INIT_TOOLBOX_OBJECT_NEW(Media, MediaObj_New);
+ PyMac_INIT_TOOLBOX_OBJECT_CONVERT(Media, MediaObj_Convert);
#endif /* __LP64__ */
- m = Py_InitModule("_Qt", Qt_methods);
+ m = Py_InitModule("_Qt", Qt_methods);
#ifndef __LP64__
- d = PyModule_GetDict(m);
- Qt_Error = PyMac_GetOSErrException();
- if (Qt_Error == NULL ||
- PyDict_SetItemString(d, "Error", Qt_Error) != 0)
- return;
- IdleManager_Type.ob_type = &PyType_Type;
- if (PyType_Ready(&IdleManager_Type) < 0) return;
- Py_INCREF(&IdleManager_Type);
- PyModule_AddObject(m, "IdleManager", (PyObject *)&IdleManager_Type);
- /* Backward-compatible name */
- Py_INCREF(&IdleManager_Type);
- PyModule_AddObject(m, "IdleManagerType", (PyObject *)&IdleManager_Type);
- MovieController_Type.ob_type = &PyType_Type;
- if (PyType_Ready(&MovieController_Type) < 0) return;
- Py_INCREF(&MovieController_Type);
- PyModule_AddObject(m, "MovieController", (PyObject *)&MovieController_Type);
- /* Backward-compatible name */
- Py_INCREF(&MovieController_Type);
- PyModule_AddObject(m, "MovieControllerType", (PyObject *)&MovieController_Type);
- TimeBase_Type.ob_type = &PyType_Type;
- if (PyType_Ready(&TimeBase_Type) < 0) return;
- Py_INCREF(&TimeBase_Type);
- PyModule_AddObject(m, "TimeBase", (PyObject *)&TimeBase_Type);
- /* Backward-compatible name */
- Py_INCREF(&TimeBase_Type);
- PyModule_AddObject(m, "TimeBaseType", (PyObject *)&TimeBase_Type);
- UserData_Type.ob_type = &PyType_Type;
- if (PyType_Ready(&UserData_Type) < 0) return;
- Py_INCREF(&UserData_Type);
- PyModule_AddObject(m, "UserData", (PyObject *)&UserData_Type);
- /* Backward-compatible name */
- Py_INCREF(&UserData_Type);
- PyModule_AddObject(m, "UserDataType", (PyObject *)&UserData_Type);
- Media_Type.ob_type = &PyType_Type;
- if (PyType_Ready(&Media_Type) < 0) return;
- Py_INCREF(&Media_Type);
- PyModule_AddObject(m, "Media", (PyObject *)&Media_Type);
- /* Backward-compatible name */
- Py_INCREF(&Media_Type);
- PyModule_AddObject(m, "MediaType", (PyObject *)&Media_Type);
- Track_Type.ob_type = &PyType_Type;
- if (PyType_Ready(&Track_Type) < 0) return;
- Py_INCREF(&Track_Type);
- PyModule_AddObject(m, "Track", (PyObject *)&Track_Type);
- /* Backward-compatible name */
- Py_INCREF(&Track_Type);
- PyModule_AddObject(m, "TrackType", (PyObject *)&Track_Type);
- Movie_Type.ob_type = &PyType_Type;
- if (PyType_Ready(&Movie_Type) < 0) return;
- Py_INCREF(&Movie_Type);
- PyModule_AddObject(m, "Movie", (PyObject *)&Movie_Type);
- /* Backward-compatible name */
- Py_INCREF(&Movie_Type);
- PyModule_AddObject(m, "MovieType", (PyObject *)&Movie_Type);
- SGOutput_Type.ob_type = &PyType_Type;
- if (PyType_Ready(&SGOutput_Type) < 0) return;
- Py_INCREF(&SGOutput_Type);
- PyModule_AddObject(m, "SGOutput", (PyObject *)&SGOutput_Type);
- /* Backward-compatible name */
- Py_INCREF(&SGOutput_Type);
- PyModule_AddObject(m, "SGOutputType", (PyObject *)&SGOutput_Type);
+ d = PyModule_GetDict(m);
+ Qt_Error = PyMac_GetOSErrException();
+ if (Qt_Error == NULL ||
+ PyDict_SetItemString(d, "Error", Qt_Error) != 0)
+ return;
+ IdleManager_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&IdleManager_Type) < 0) return;
+ Py_INCREF(&IdleManager_Type);
+ PyModule_AddObject(m, "IdleManager", (PyObject *)&IdleManager_Type);
+ /* Backward-compatible name */
+ Py_INCREF(&IdleManager_Type);
+ PyModule_AddObject(m, "IdleManagerType", (PyObject *)&IdleManager_Type);
+ MovieController_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&MovieController_Type) < 0) return;
+ Py_INCREF(&MovieController_Type);
+ PyModule_AddObject(m, "MovieController", (PyObject *)&MovieController_Type);
+ /* Backward-compatible name */
+ Py_INCREF(&MovieController_Type);
+ PyModule_AddObject(m, "MovieControllerType", (PyObject *)&MovieController_Type);
+ TimeBase_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&TimeBase_Type) < 0) return;
+ Py_INCREF(&TimeBase_Type);
+ PyModule_AddObject(m, "TimeBase", (PyObject *)&TimeBase_Type);
+ /* Backward-compatible name */
+ Py_INCREF(&TimeBase_Type);
+ PyModule_AddObject(m, "TimeBaseType", (PyObject *)&TimeBase_Type);
+ UserData_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&UserData_Type) < 0) return;
+ Py_INCREF(&UserData_Type);
+ PyModule_AddObject(m, "UserData", (PyObject *)&UserData_Type);
+ /* Backward-compatible name */
+ Py_INCREF(&UserData_Type);
+ PyModule_AddObject(m, "UserDataType", (PyObject *)&UserData_Type);
+ Media_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&Media_Type) < 0) return;
+ Py_INCREF(&Media_Type);
+ PyModule_AddObject(m, "Media", (PyObject *)&Media_Type);
+ /* Backward-compatible name */
+ Py_INCREF(&Media_Type);
+ PyModule_AddObject(m, "MediaType", (PyObject *)&Media_Type);
+ Track_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&Track_Type) < 0) return;
+ Py_INCREF(&Track_Type);
+ PyModule_AddObject(m, "Track", (PyObject *)&Track_Type);
+ /* Backward-compatible name */
+ Py_INCREF(&Track_Type);
+ PyModule_AddObject(m, "TrackType", (PyObject *)&Track_Type);
+ Movie_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&Movie_Type) < 0) return;
+ Py_INCREF(&Movie_Type);
+ PyModule_AddObject(m, "Movie", (PyObject *)&Movie_Type);
+ /* Backward-compatible name */
+ Py_INCREF(&Movie_Type);
+ PyModule_AddObject(m, "MovieType", (PyObject *)&Movie_Type);
+ SGOutput_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&SGOutput_Type) < 0) return;
+ Py_INCREF(&SGOutput_Type);
+ PyModule_AddObject(m, "SGOutput", (PyObject *)&SGOutput_Type);
+ /* Backward-compatible name */
+ Py_INCREF(&SGOutput_Type);
+ PyModule_AddObject(m, "SGOutputType", (PyObject *)&SGOutput_Type);
#endif /* __LP64__ */
}
diff --git a/Mac/Modules/res/_Resmodule.c b/Mac/Modules/res/_Resmodule.c
index 89fd02c..f5824b1 100644
--- a/Mac/Modules/res/_Resmodule.c
+++ b/Mac/Modules/res/_Resmodule.c
@@ -8,9 +8,9 @@
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
- PyErr_SetString(PyExc_NotImplementedError, \
- "Not available in this shared library/OS version"); \
- return NULL; \
+ PyErr_SetString(PyExc_NotImplementedError, \
+ "Not available in this shared library/OS version"); \
+ return NULL; \
}} while(0)
@@ -31,7 +31,7 @@ extern int _OptResObj_Convert(PyObject *, Handle *);
static void
PyMac_AutoDisposeHandle(Handle h)
{
- DisposeHandle(h);
+ DisposeHandle(h);
}
static PyObject *Res_Error;
@@ -43,531 +43,531 @@ PyTypeObject Resource_Type;
#define ResObj_Check(x) ((x)->ob_type == &Resource_Type || PyObject_TypeCheck((x), &Resource_Type))
typedef struct ResourceObject {
- PyObject_HEAD
- Handle ob_itself;
- void (*ob_freeit)(Handle ptr);
+ PyObject_HEAD
+ Handle ob_itself;
+ void (*ob_freeit)(Handle ptr);
} ResourceObject;
PyObject *ResObj_New(Handle itself)
{
- ResourceObject *it;
- if (itself == NULL) return PyMac_Error(resNotFound);
- it = PyObject_NEW(ResourceObject, &Resource_Type);
- if (it == NULL) return NULL;
- it->ob_itself = itself;
- it->ob_freeit = NULL;
- return (PyObject *)it;
+ ResourceObject *it;
+ if (itself == NULL) return PyMac_Error(resNotFound);
+ it = PyObject_NEW(ResourceObject, &Resource_Type);
+ if (it == NULL) return NULL;
+ it->ob_itself = itself;
+ it->ob_freeit = NULL;
+ return (PyObject *)it;
}
int ResObj_Convert(PyObject *v, Handle *p_itself)
{
- if (!ResObj_Check(v))
- {
- PyObject *tmp;
- if ( (tmp=PyObject_CallMethod(v, "as_Resource", "")) )
- {
- *p_itself = ((ResourceObject *)tmp)->ob_itself;
- Py_DECREF(tmp);
- return 1;
- }
- PyErr_Clear();
- }
- if (!ResObj_Check(v))
- {
- PyErr_SetString(PyExc_TypeError, "Resource required");
- return 0;
- }
- *p_itself = ((ResourceObject *)v)->ob_itself;
- return 1;
+ if (!ResObj_Check(v))
+ {
+ PyObject *tmp;
+ if ( (tmp=PyObject_CallMethod(v, "as_Resource", "")) )
+ {
+ *p_itself = ((ResourceObject *)tmp)->ob_itself;
+ Py_DECREF(tmp);
+ return 1;
+ }
+ PyErr_Clear();
+ }
+ if (!ResObj_Check(v))
+ {
+ PyErr_SetString(PyExc_TypeError, "Resource required");
+ return 0;
+ }
+ *p_itself = ((ResourceObject *)v)->ob_itself;
+ return 1;
}
static void ResObj_dealloc(ResourceObject *self)
{
- if (self->ob_freeit && self->ob_itself)
- {
- self->ob_freeit(self->ob_itself);
- }
- self->ob_itself = NULL;
- self->ob_type->tp_free((PyObject *)self);
+ if (self->ob_freeit && self->ob_itself)
+ {
+ self->ob_freeit(self->ob_itself);
+ }
+ self->ob_itself = NULL;
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *ResObj_HomeResFile(ResourceObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short _rv;
+ PyObject *_res = NULL;
+ short _rv;
#ifndef HomeResFile
- PyMac_PRECHECK(HomeResFile);
+ PyMac_PRECHECK(HomeResFile);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = HomeResFile(_self->ob_itself);
- {
- OSErr _err = ResError();
- if (_err != noErr) return PyMac_Error(_err);
- }
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = HomeResFile(_self->ob_itself);
+ {
+ OSErr _err = ResError();
+ if (_err != noErr) return PyMac_Error(_err);
+ }
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *ResObj_MacLoadResource(ResourceObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef MacLoadResource
- PyMac_PRECHECK(MacLoadResource);
+ PyMac_PRECHECK(MacLoadResource);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- MacLoadResource(_self->ob_itself);
- {
- OSErr _err = ResError();
- if (_err != noErr) return PyMac_Error(_err);
- }
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ MacLoadResource(_self->ob_itself);
+ {
+ OSErr _err = ResError();
+ if (_err != noErr) return PyMac_Error(_err);
+ }
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *ResObj_ReleaseResource(ResourceObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef ReleaseResource
- PyMac_PRECHECK(ReleaseResource);
+ PyMac_PRECHECK(ReleaseResource);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- ReleaseResource(_self->ob_itself);
- {
- OSErr _err = ResError();
- if (_err != noErr) return PyMac_Error(_err);
- }
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ ReleaseResource(_self->ob_itself);
+ {
+ OSErr _err = ResError();
+ if (_err != noErr) return PyMac_Error(_err);
+ }
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *ResObj_DetachResource(ResourceObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef DetachResource
- PyMac_PRECHECK(DetachResource);
+ PyMac_PRECHECK(DetachResource);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- DetachResource(_self->ob_itself);
- {
- OSErr _err = ResError();
- if (_err != noErr) return PyMac_Error(_err);
- }
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ DetachResource(_self->ob_itself);
+ {
+ OSErr _err = ResError();
+ if (_err != noErr) return PyMac_Error(_err);
+ }
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *ResObj_GetResAttrs(ResourceObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short _rv;
+ PyObject *_res = NULL;
+ short _rv;
#ifndef GetResAttrs
- PyMac_PRECHECK(GetResAttrs);
+ PyMac_PRECHECK(GetResAttrs);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetResAttrs(_self->ob_itself);
- {
- OSErr _err = ResError();
- if (_err != noErr) return PyMac_Error(_err);
- }
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetResAttrs(_self->ob_itself);
+ {
+ OSErr _err = ResError();
+ if (_err != noErr) return PyMac_Error(_err);
+ }
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *ResObj_GetResInfo(ResourceObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short theID;
- ResType theType;
- Str255 name;
+ PyObject *_res = NULL;
+ short theID;
+ ResType theType;
+ Str255 name;
#ifndef GetResInfo
- PyMac_PRECHECK(GetResInfo);
+ PyMac_PRECHECK(GetResInfo);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- GetResInfo(_self->ob_itself,
- &theID,
- &theType,
- name);
- {
- OSErr _err = ResError();
- if (_err != noErr) return PyMac_Error(_err);
- }
- _res = Py_BuildValue("hO&O&",
- theID,
- PyMac_BuildOSType, theType,
- PyMac_BuildStr255, name);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ GetResInfo(_self->ob_itself,
+ &theID,
+ &theType,
+ name);
+ {
+ OSErr _err = ResError();
+ if (_err != noErr) return PyMac_Error(_err);
+ }
+ _res = Py_BuildValue("hO&O&",
+ theID,
+ PyMac_BuildOSType, theType,
+ PyMac_BuildStr255, name);
+ return _res;
}
static PyObject *ResObj_SetResInfo(ResourceObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short theID;
- Str255 name;
+ PyObject *_res = NULL;
+ short theID;
+ Str255 name;
#ifndef SetResInfo
- PyMac_PRECHECK(SetResInfo);
+ PyMac_PRECHECK(SetResInfo);
#endif
- if (!PyArg_ParseTuple(_args, "hO&",
- &theID,
- PyMac_GetStr255, name))
- return NULL;
- SetResInfo(_self->ob_itself,
- theID,
- name);
- {
- OSErr _err = ResError();
- if (_err != noErr) return PyMac_Error(_err);
- }
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "hO&",
+ &theID,
+ PyMac_GetStr255, name))
+ return NULL;
+ SetResInfo(_self->ob_itself,
+ theID,
+ name);
+ {
+ OSErr _err = ResError();
+ if (_err != noErr) return PyMac_Error(_err);
+ }
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *ResObj_AddResource(ResourceObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ResType theType;
- short theID;
- Str255 name;
+ PyObject *_res = NULL;
+ ResType theType;
+ short theID;
+ Str255 name;
#ifndef AddResource
- PyMac_PRECHECK(AddResource);
+ PyMac_PRECHECK(AddResource);
#endif
- if (!PyArg_ParseTuple(_args, "O&hO&",
- PyMac_GetOSType, &theType,
- &theID,
- PyMac_GetStr255, name))
- return NULL;
- AddResource(_self->ob_itself,
- theType,
- theID,
- name);
- {
- OSErr _err = ResError();
- if (_err != noErr) return PyMac_Error(_err);
- }
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&hO&",
+ PyMac_GetOSType, &theType,
+ &theID,
+ PyMac_GetStr255, name))
+ return NULL;
+ AddResource(_self->ob_itself,
+ theType,
+ theID,
+ name);
+ {
+ OSErr _err = ResError();
+ if (_err != noErr) return PyMac_Error(_err);
+ }
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *ResObj_GetResourceSizeOnDisk(ResourceObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- long _rv;
+ PyObject *_res = NULL;
+ long _rv;
#ifndef GetResourceSizeOnDisk
- PyMac_PRECHECK(GetResourceSizeOnDisk);
+ PyMac_PRECHECK(GetResourceSizeOnDisk);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetResourceSizeOnDisk(_self->ob_itself);
- {
- OSErr _err = ResError();
- if (_err != noErr) return PyMac_Error(_err);
- }
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetResourceSizeOnDisk(_self->ob_itself);
+ {
+ OSErr _err = ResError();
+ if (_err != noErr) return PyMac_Error(_err);
+ }
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *ResObj_GetMaxResourceSize(ResourceObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- long _rv;
+ PyObject *_res = NULL;
+ long _rv;
#ifndef GetMaxResourceSize
- PyMac_PRECHECK(GetMaxResourceSize);
+ PyMac_PRECHECK(GetMaxResourceSize);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetMaxResourceSize(_self->ob_itself);
- {
- OSErr _err = ResError();
- if (_err != noErr) return PyMac_Error(_err);
- }
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetMaxResourceSize(_self->ob_itself);
+ {
+ OSErr _err = ResError();
+ if (_err != noErr) return PyMac_Error(_err);
+ }
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *ResObj_SetResAttrs(ResourceObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short attrs;
+ PyObject *_res = NULL;
+ short attrs;
#ifndef SetResAttrs
- PyMac_PRECHECK(SetResAttrs);
+ PyMac_PRECHECK(SetResAttrs);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &attrs))
- return NULL;
- SetResAttrs(_self->ob_itself,
- attrs);
- {
- OSErr _err = ResError();
- if (_err != noErr) return PyMac_Error(_err);
- }
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &attrs))
+ return NULL;
+ SetResAttrs(_self->ob_itself,
+ attrs);
+ {
+ OSErr _err = ResError();
+ if (_err != noErr) return PyMac_Error(_err);
+ }
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *ResObj_ChangedResource(ResourceObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef ChangedResource
- PyMac_PRECHECK(ChangedResource);
+ PyMac_PRECHECK(ChangedResource);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- ChangedResource(_self->ob_itself);
- {
- OSErr _err = ResError();
- if (_err != noErr) return PyMac_Error(_err);
- }
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ ChangedResource(_self->ob_itself);
+ {
+ OSErr _err = ResError();
+ if (_err != noErr) return PyMac_Error(_err);
+ }
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *ResObj_RemoveResource(ResourceObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef RemoveResource
- PyMac_PRECHECK(RemoveResource);
+ PyMac_PRECHECK(RemoveResource);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- RemoveResource(_self->ob_itself);
- {
- OSErr _err = ResError();
- if (_err != noErr) return PyMac_Error(_err);
- }
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ RemoveResource(_self->ob_itself);
+ {
+ OSErr _err = ResError();
+ if (_err != noErr) return PyMac_Error(_err);
+ }
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *ResObj_WriteResource(ResourceObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef WriteResource
- PyMac_PRECHECK(WriteResource);
+ PyMac_PRECHECK(WriteResource);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- WriteResource(_self->ob_itself);
- {
- OSErr _err = ResError();
- if (_err != noErr) return PyMac_Error(_err);
- }
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ WriteResource(_self->ob_itself);
+ {
+ OSErr _err = ResError();
+ if (_err != noErr) return PyMac_Error(_err);
+ }
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *ResObj_SetResourceSize(ResourceObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- long newSize;
+ PyObject *_res = NULL;
+ long newSize;
#ifndef SetResourceSize
- PyMac_PRECHECK(SetResourceSize);
+ PyMac_PRECHECK(SetResourceSize);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &newSize))
- return NULL;
- SetResourceSize(_self->ob_itself,
- newSize);
- {
- OSErr _err = ResError();
- if (_err != noErr) return PyMac_Error(_err);
- }
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &newSize))
+ return NULL;
+ SetResourceSize(_self->ob_itself,
+ newSize);
+ {
+ OSErr _err = ResError();
+ if (_err != noErr) return PyMac_Error(_err);
+ }
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *ResObj_GetNextFOND(ResourceObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Handle _rv;
+ PyObject *_res = NULL;
+ Handle _rv;
#ifndef GetNextFOND
- PyMac_PRECHECK(GetNextFOND);
+ PyMac_PRECHECK(GetNextFOND);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetNextFOND(_self->ob_itself);
- {
- OSErr _err = ResError();
- if (_err != noErr) return PyMac_Error(_err);
- }
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetNextFOND(_self->ob_itself);
+ {
+ OSErr _err = ResError();
+ if (_err != noErr) return PyMac_Error(_err);
+ }
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
#ifndef __LP64__
static PyObject *ResObj_as_Control(ResourceObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
- _res = CtlObj_New((ControlHandle)_self->ob_itself);
- return _res;
+ _res = CtlObj_New((ControlHandle)_self->ob_itself);
+ return _res;
}
static PyObject *ResObj_as_Menu(ResourceObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
- _res = MenuObj_New((MenuHandle)_self->ob_itself);
- return _res;
+ _res = MenuObj_New((MenuHandle)_self->ob_itself);
+ return _res;
}
#endif /* !__LP64__ */
static PyObject *ResObj_LoadResource(ResourceObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef LoadResource
- PyMac_PRECHECK(LoadResource);
+ PyMac_PRECHECK(LoadResource);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- LoadResource(_self->ob_itself);
- {
- OSErr _err = ResError();
- if (_err != noErr) return PyMac_Error(_err);
- }
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ LoadResource(_self->ob_itself);
+ {
+ OSErr _err = ResError();
+ if (_err != noErr) return PyMac_Error(_err);
+ }
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *ResObj_AutoDispose(ResourceObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
- int onoff, old = 0;
- if (!PyArg_ParseTuple(_args, "i", &onoff))
- return NULL;
- if ( _self->ob_freeit )
- old = 1;
- if ( onoff )
- _self->ob_freeit = PyMac_AutoDisposeHandle;
- else
- _self->ob_freeit = NULL;
- _res = Py_BuildValue("i", old);
- return _res;
+ int onoff, old = 0;
+ if (!PyArg_ParseTuple(_args, "i", &onoff))
+ return NULL;
+ if ( _self->ob_freeit )
+ old = 1;
+ if ( onoff )
+ _self->ob_freeit = PyMac_AutoDisposeHandle;
+ else
+ _self->ob_freeit = NULL;
+ _res = Py_BuildValue("i", old);
+ return _res;
}
static PyMethodDef ResObj_methods[] = {
- {"HomeResFile", (PyCFunction)ResObj_HomeResFile, 1,
- PyDoc_STR("() -> (short _rv)")},
- {"MacLoadResource", (PyCFunction)ResObj_MacLoadResource, 1,
- PyDoc_STR("() -> None")},
- {"ReleaseResource", (PyCFunction)ResObj_ReleaseResource, 1,
- PyDoc_STR("() -> None")},
- {"DetachResource", (PyCFunction)ResObj_DetachResource, 1,
- PyDoc_STR("() -> None")},
- {"GetResAttrs", (PyCFunction)ResObj_GetResAttrs, 1,
- PyDoc_STR("() -> (short _rv)")},
- {"GetResInfo", (PyCFunction)ResObj_GetResInfo, 1,
- PyDoc_STR("() -> (short theID, ResType theType, Str255 name)")},
- {"SetResInfo", (PyCFunction)ResObj_SetResInfo, 1,
- PyDoc_STR("(short theID, Str255 name) -> None")},
- {"AddResource", (PyCFunction)ResObj_AddResource, 1,
- PyDoc_STR("(ResType theType, short theID, Str255 name) -> None")},
- {"GetResourceSizeOnDisk", (PyCFunction)ResObj_GetResourceSizeOnDisk, 1,
- PyDoc_STR("() -> (long _rv)")},
- {"GetMaxResourceSize", (PyCFunction)ResObj_GetMaxResourceSize, 1,
- PyDoc_STR("() -> (long _rv)")},
- {"SetResAttrs", (PyCFunction)ResObj_SetResAttrs, 1,
- PyDoc_STR("(short attrs) -> None")},
- {"ChangedResource", (PyCFunction)ResObj_ChangedResource, 1,
- PyDoc_STR("() -> None")},
- {"RemoveResource", (PyCFunction)ResObj_RemoveResource, 1,
- PyDoc_STR("() -> None")},
- {"WriteResource", (PyCFunction)ResObj_WriteResource, 1,
- PyDoc_STR("() -> None")},
- {"SetResourceSize", (PyCFunction)ResObj_SetResourceSize, 1,
- PyDoc_STR("(long newSize) -> None")},
- {"GetNextFOND", (PyCFunction)ResObj_GetNextFOND, 1,
- PyDoc_STR("() -> (Handle _rv)")},
+ {"HomeResFile", (PyCFunction)ResObj_HomeResFile, 1,
+ PyDoc_STR("() -> (short _rv)")},
+ {"MacLoadResource", (PyCFunction)ResObj_MacLoadResource, 1,
+ PyDoc_STR("() -> None")},
+ {"ReleaseResource", (PyCFunction)ResObj_ReleaseResource, 1,
+ PyDoc_STR("() -> None")},
+ {"DetachResource", (PyCFunction)ResObj_DetachResource, 1,
+ PyDoc_STR("() -> None")},
+ {"GetResAttrs", (PyCFunction)ResObj_GetResAttrs, 1,
+ PyDoc_STR("() -> (short _rv)")},
+ {"GetResInfo", (PyCFunction)ResObj_GetResInfo, 1,
+ PyDoc_STR("() -> (short theID, ResType theType, Str255 name)")},
+ {"SetResInfo", (PyCFunction)ResObj_SetResInfo, 1,
+ PyDoc_STR("(short theID, Str255 name) -> None")},
+ {"AddResource", (PyCFunction)ResObj_AddResource, 1,
+ PyDoc_STR("(ResType theType, short theID, Str255 name) -> None")},
+ {"GetResourceSizeOnDisk", (PyCFunction)ResObj_GetResourceSizeOnDisk, 1,
+ PyDoc_STR("() -> (long _rv)")},
+ {"GetMaxResourceSize", (PyCFunction)ResObj_GetMaxResourceSize, 1,
+ PyDoc_STR("() -> (long _rv)")},
+ {"SetResAttrs", (PyCFunction)ResObj_SetResAttrs, 1,
+ PyDoc_STR("(short attrs) -> None")},
+ {"ChangedResource", (PyCFunction)ResObj_ChangedResource, 1,
+ PyDoc_STR("() -> None")},
+ {"RemoveResource", (PyCFunction)ResObj_RemoveResource, 1,
+ PyDoc_STR("() -> None")},
+ {"WriteResource", (PyCFunction)ResObj_WriteResource, 1,
+ PyDoc_STR("() -> None")},
+ {"SetResourceSize", (PyCFunction)ResObj_SetResourceSize, 1,
+ PyDoc_STR("(long newSize) -> None")},
+ {"GetNextFOND", (PyCFunction)ResObj_GetNextFOND, 1,
+ PyDoc_STR("() -> (Handle _rv)")},
#ifndef __LP64__
- {"as_Control", (PyCFunction)ResObj_as_Control, 1,
- PyDoc_STR("Return this resource/handle as a Control")},
- {"as_Menu", (PyCFunction)ResObj_as_Menu, 1,
- PyDoc_STR("Return this resource/handle as a Menu")},
+ {"as_Control", (PyCFunction)ResObj_as_Control, 1,
+ PyDoc_STR("Return this resource/handle as a Control")},
+ {"as_Menu", (PyCFunction)ResObj_as_Menu, 1,
+ PyDoc_STR("Return this resource/handle as a Menu")},
#endif /* !__LP64__ */
- {"LoadResource", (PyCFunction)ResObj_LoadResource, 1,
- PyDoc_STR("() -> None")},
- {"AutoDispose", (PyCFunction)ResObj_AutoDispose, 1,
- PyDoc_STR("(int)->int. Automatically DisposeHandle the object on Python object cleanup")},
- {NULL, NULL, 0}
+ {"LoadResource", (PyCFunction)ResObj_LoadResource, 1,
+ PyDoc_STR("() -> None")},
+ {"AutoDispose", (PyCFunction)ResObj_AutoDispose, 1,
+ PyDoc_STR("(int)->int. Automatically DisposeHandle the object on Python object cleanup")},
+ {NULL, NULL, 0}
};
static PyObject *ResObj_get_data(ResourceObject *self, void *closure)
{
- PyObject *res;
- char state;
+ PyObject *res;
+ char state;
+
+ state = HGetState(self->ob_itself);
+ HLock(self->ob_itself);
+ res = PyString_FromStringAndSize(
+ *self->ob_itself,
+ GetHandleSize(self->ob_itself));
+ HUnlock(self->ob_itself);
+ HSetState(self->ob_itself, state);
+ return res;
- state = HGetState(self->ob_itself);
- HLock(self->ob_itself);
- res = PyString_FromStringAndSize(
- *self->ob_itself,
- GetHandleSize(self->ob_itself));
- HUnlock(self->ob_itself);
- HSetState(self->ob_itself, state);
- return res;
-
}
static int ResObj_set_data(ResourceObject *self, PyObject *v, void *closure)
{
- char *data;
- long size;
-
- if ( v == NULL )
- return -1;
- if ( !PyString_Check(v) )
- return -1;
- size = PyString_Size(v);
- data = PyString_AsString(v);
- /* XXXX Do I need the GetState/SetState calls? */
- SetHandleSize(self->ob_itself, size);
- if ( MemError())
- return -1;
- HLock(self->ob_itself);
- memcpy((char *)*self->ob_itself, data, size);
- HUnlock(self->ob_itself);
- /* XXXX Should I do the Changed call immedeately? */
- return 0;
-
- return 0;
+ char *data;
+ long size;
+
+ if ( v == NULL )
+ return -1;
+ if ( !PyString_Check(v) )
+ return -1;
+ size = PyString_Size(v);
+ data = PyString_AsString(v);
+ /* XXXX Do I need the GetState/SetState calls? */
+ SetHandleSize(self->ob_itself, size);
+ if ( MemError())
+ return -1;
+ HLock(self->ob_itself);
+ memcpy((char *)*self->ob_itself, data, size);
+ HUnlock(self->ob_itself);
+ /* XXXX Should I do the Changed call immedeately? */
+ return 0;
+
+ return 0;
}
static PyObject *ResObj_get_size(ResourceObject *self, void *closure)
{
- return PyInt_FromLong(GetHandleSize(self->ob_itself));
+ return PyInt_FromLong(GetHandleSize(self->ob_itself));
}
#define ResObj_set_size NULL
static PyGetSetDef ResObj_getsetlist[] = {
- {"data", (getter)ResObj_get_data, (setter)ResObj_set_data, "The resource data"},
- {"size", (getter)ResObj_get_size, (setter)ResObj_set_size, "The length of the resource data"},
- {NULL, NULL, NULL, NULL},
+ {"data", (getter)ResObj_get_data, (setter)ResObj_set_data, "The resource data"},
+ {"size", (getter)ResObj_get_size, (setter)ResObj_set_size, "The length of the resource data"},
+ {NULL, NULL, NULL, NULL},
};
@@ -578,89 +578,89 @@ static PyGetSetDef ResObj_getsetlist[] = {
#define ResObj_hash NULL
static int ResObj_tp_init(PyObject *_self, PyObject *_args, PyObject *_kwds)
{
- char *srcdata = NULL;
- int srclen = 0;
- Handle itself;
- char *kw[] = {"itself", 0};
-
- if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, ResObj_Convert, &itself))
- {
- ((ResourceObject *)_self)->ob_itself = itself;
- return 0;
- }
- PyErr_Clear();
- if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "|s#", kw, &srcdata, &srclen)) return -1;
- if ((itself = NewHandle(srclen)) == NULL)
- {
- PyErr_NoMemory();
- return 0;
- }
- ((ResourceObject *)_self)->ob_itself = itself;
- if (srclen && srcdata)
- {
- HLock(itself);
- memcpy(*itself, srcdata, srclen);
- HUnlock(itself);
- }
- return 0;
+ char *srcdata = NULL;
+ int srclen = 0;
+ Handle itself;
+ char *kw[] = {"itself", 0};
+
+ if (PyArg_ParseTupleAndKeywords(_args, _kwds, "O&", kw, ResObj_Convert, &itself))
+ {
+ ((ResourceObject *)_self)->ob_itself = itself;
+ return 0;
+ }
+ PyErr_Clear();
+ if (!PyArg_ParseTupleAndKeywords(_args, _kwds, "|s#", kw, &srcdata, &srclen)) return -1;
+ if ((itself = NewHandle(srclen)) == NULL)
+ {
+ PyErr_NoMemory();
+ return 0;
+ }
+ ((ResourceObject *)_self)->ob_itself = itself;
+ if (srclen && srcdata)
+ {
+ HLock(itself);
+ memcpy(*itself, srcdata, srclen);
+ HUnlock(itself);
+ }
+ return 0;
}
#define ResObj_tp_alloc PyType_GenericAlloc
static PyObject *ResObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
- PyObject *self;
- if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
- ((ResourceObject *)self)->ob_itself = NULL;
- ((ResourceObject *)self)->ob_freeit = NULL;
- return self;
+ PyObject *self;
+ if ((self = type->tp_alloc(type, 0)) == NULL) return NULL;
+ ((ResourceObject *)self)->ob_itself = NULL;
+ ((ResourceObject *)self)->ob_freeit = NULL;
+ return self;
}
#define ResObj_tp_free PyObject_Del
PyTypeObject Resource_Type = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
- "_Res.Resource", /*tp_name*/
- sizeof(ResourceObject), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- /* methods */
- (destructor) ResObj_dealloc, /*tp_dealloc*/
- 0, /*tp_print*/
- (getattrfunc)0, /*tp_getattr*/
- (setattrfunc)0, /*tp_setattr*/
- (cmpfunc) ResObj_compare, /*tp_compare*/
- (reprfunc) ResObj_repr, /*tp_repr*/
- (PyNumberMethods *)0, /* tp_as_number */
- (PySequenceMethods *)0, /* tp_as_sequence */
- (PyMappingMethods *)0, /* tp_as_mapping */
- (hashfunc) ResObj_hash, /*tp_hash*/
- 0, /*tp_call*/
- 0, /*tp_str*/
- PyObject_GenericGetAttr, /*tp_getattro*/
- PyObject_GenericSetAttr, /*tp_setattro */
- 0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
- 0, /*tp_doc*/
- 0, /*tp_traverse*/
- 0, /*tp_clear*/
- 0, /*tp_richcompare*/
- 0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
- 0, /*tp_iternext*/
- ResObj_methods, /* tp_methods */
- 0, /*tp_members*/
- ResObj_getsetlist, /*tp_getset*/
- 0, /*tp_base*/
- 0, /*tp_dict*/
- 0, /*tp_descr_get*/
- 0, /*tp_descr_set*/
- 0, /*tp_dictoffset*/
- ResObj_tp_init, /* tp_init */
- ResObj_tp_alloc, /* tp_alloc */
- ResObj_tp_new, /* tp_new */
- ResObj_tp_free, /* tp_free */
+ PyObject_HEAD_INIT(NULL)
+ 0, /*ob_size*/
+ "_Res.Resource", /*tp_name*/
+ sizeof(ResourceObject), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ /* methods */
+ (destructor) ResObj_dealloc, /*tp_dealloc*/
+ 0, /*tp_print*/
+ (getattrfunc)0, /*tp_getattr*/
+ (setattrfunc)0, /*tp_setattr*/
+ (cmpfunc) ResObj_compare, /*tp_compare*/
+ (reprfunc) ResObj_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) ResObj_hash, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ PyObject_GenericGetAttr, /*tp_getattro*/
+ PyObject_GenericSetAttr, /*tp_setattro */
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
+ 0, /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ ResObj_methods, /* tp_methods */
+ 0, /*tp_members*/
+ ResObj_getsetlist, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ ResObj_tp_init, /* tp_init */
+ ResObj_tp_alloc, /* tp_alloc */
+ ResObj_tp_new, /* tp_new */
+ ResObj_tp_free, /* tp_free */
};
/* -------------------- End object type Resource -------------------- */
@@ -668,1027 +668,1027 @@ PyTypeObject Resource_Type = {
static PyObject *Res_CloseResFile(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short refNum;
+ PyObject *_res = NULL;
+ short refNum;
#ifndef CloseResFile
- PyMac_PRECHECK(CloseResFile);
+ PyMac_PRECHECK(CloseResFile);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &refNum))
- return NULL;
- CloseResFile(refNum);
- {
- OSErr _err = ResError();
- if (_err != noErr) return PyMac_Error(_err);
- }
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &refNum))
+ return NULL;
+ CloseResFile(refNum);
+ {
+ OSErr _err = ResError();
+ if (_err != noErr) return PyMac_Error(_err);
+ }
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Res_ResError(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
+ PyObject *_res = NULL;
+ OSErr _err;
#ifndef ResError
- PyMac_PRECHECK(ResError);
+ PyMac_PRECHECK(ResError);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = ResError();
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = ResError();
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Res_CurResFile(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short _rv;
+ PyObject *_res = NULL;
+ short _rv;
#ifndef CurResFile
- PyMac_PRECHECK(CurResFile);
+ PyMac_PRECHECK(CurResFile);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = CurResFile();
- {
- OSErr _err = ResError();
- if (_err != noErr) return PyMac_Error(_err);
- }
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = CurResFile();
+ {
+ OSErr _err = ResError();
+ if (_err != noErr) return PyMac_Error(_err);
+ }
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *Res_UseResFile(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short refNum;
+ PyObject *_res = NULL;
+ short refNum;
#ifndef UseResFile
- PyMac_PRECHECK(UseResFile);
+ PyMac_PRECHECK(UseResFile);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &refNum))
- return NULL;
- UseResFile(refNum);
- {
- OSErr _err = ResError();
- if (_err != noErr) return PyMac_Error(_err);
- }
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &refNum))
+ return NULL;
+ UseResFile(refNum);
+ {
+ OSErr _err = ResError();
+ if (_err != noErr) return PyMac_Error(_err);
+ }
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Res_CountTypes(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short _rv;
+ PyObject *_res = NULL;
+ short _rv;
#ifndef CountTypes
- PyMac_PRECHECK(CountTypes);
+ PyMac_PRECHECK(CountTypes);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = CountTypes();
- {
- OSErr _err = ResError();
- if (_err != noErr) return PyMac_Error(_err);
- }
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = CountTypes();
+ {
+ OSErr _err = ResError();
+ if (_err != noErr) return PyMac_Error(_err);
+ }
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *Res_Count1Types(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short _rv;
+ PyObject *_res = NULL;
+ short _rv;
#ifndef Count1Types
- PyMac_PRECHECK(Count1Types);
+ PyMac_PRECHECK(Count1Types);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = Count1Types();
- {
- OSErr _err = ResError();
- if (_err != noErr) return PyMac_Error(_err);
- }
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = Count1Types();
+ {
+ OSErr _err = ResError();
+ if (_err != noErr) return PyMac_Error(_err);
+ }
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *Res_GetIndType(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ResType theType;
- short index;
+ PyObject *_res = NULL;
+ ResType theType;
+ short index;
#ifndef GetIndType
- PyMac_PRECHECK(GetIndType);
+ PyMac_PRECHECK(GetIndType);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &index))
- return NULL;
- GetIndType(&theType,
- index);
- {
- OSErr _err = ResError();
- if (_err != noErr) return PyMac_Error(_err);
- }
- _res = Py_BuildValue("O&",
- PyMac_BuildOSType, theType);
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &index))
+ return NULL;
+ GetIndType(&theType,
+ index);
+ {
+ OSErr _err = ResError();
+ if (_err != noErr) return PyMac_Error(_err);
+ }
+ _res = Py_BuildValue("O&",
+ PyMac_BuildOSType, theType);
+ return _res;
}
static PyObject *Res_Get1IndType(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ResType theType;
- short index;
+ PyObject *_res = NULL;
+ ResType theType;
+ short index;
#ifndef Get1IndType
- PyMac_PRECHECK(Get1IndType);
+ PyMac_PRECHECK(Get1IndType);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &index))
- return NULL;
- Get1IndType(&theType,
- index);
- {
- OSErr _err = ResError();
- if (_err != noErr) return PyMac_Error(_err);
- }
- _res = Py_BuildValue("O&",
- PyMac_BuildOSType, theType);
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &index))
+ return NULL;
+ Get1IndType(&theType,
+ index);
+ {
+ OSErr _err = ResError();
+ if (_err != noErr) return PyMac_Error(_err);
+ }
+ _res = Py_BuildValue("O&",
+ PyMac_BuildOSType, theType);
+ return _res;
}
static PyObject *Res_SetResLoad(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean load;
+ PyObject *_res = NULL;
+ Boolean load;
#ifndef SetResLoad
- PyMac_PRECHECK(SetResLoad);
+ PyMac_PRECHECK(SetResLoad);
#endif
- if (!PyArg_ParseTuple(_args, "b",
- &load))
- return NULL;
- SetResLoad(load);
- {
- OSErr _err = ResError();
- if (_err != noErr) return PyMac_Error(_err);
- }
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "b",
+ &load))
+ return NULL;
+ SetResLoad(load);
+ {
+ OSErr _err = ResError();
+ if (_err != noErr) return PyMac_Error(_err);
+ }
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Res_CountResources(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short _rv;
- ResType theType;
+ PyObject *_res = NULL;
+ short _rv;
+ ResType theType;
#ifndef CountResources
- PyMac_PRECHECK(CountResources);
+ PyMac_PRECHECK(CountResources);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetOSType, &theType))
- return NULL;
- _rv = CountResources(theType);
- {
- OSErr _err = ResError();
- if (_err != noErr) return PyMac_Error(_err);
- }
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetOSType, &theType))
+ return NULL;
+ _rv = CountResources(theType);
+ {
+ OSErr _err = ResError();
+ if (_err != noErr) return PyMac_Error(_err);
+ }
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *Res_Count1Resources(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short _rv;
- ResType theType;
+ PyObject *_res = NULL;
+ short _rv;
+ ResType theType;
#ifndef Count1Resources
- PyMac_PRECHECK(Count1Resources);
+ PyMac_PRECHECK(Count1Resources);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetOSType, &theType))
- return NULL;
- _rv = Count1Resources(theType);
- {
- OSErr _err = ResError();
- if (_err != noErr) return PyMac_Error(_err);
- }
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetOSType, &theType))
+ return NULL;
+ _rv = Count1Resources(theType);
+ {
+ OSErr _err = ResError();
+ if (_err != noErr) return PyMac_Error(_err);
+ }
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *Res_GetIndResource(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Handle _rv;
- ResType theType;
- short index;
+ PyObject *_res = NULL;
+ Handle _rv;
+ ResType theType;
+ short index;
#ifndef GetIndResource
- PyMac_PRECHECK(GetIndResource);
+ PyMac_PRECHECK(GetIndResource);
#endif
- if (!PyArg_ParseTuple(_args, "O&h",
- PyMac_GetOSType, &theType,
- &index))
- return NULL;
- _rv = GetIndResource(theType,
- index);
- {
- OSErr _err = ResError();
- if (_err != noErr) return PyMac_Error(_err);
- }
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&h",
+ PyMac_GetOSType, &theType,
+ &index))
+ return NULL;
+ _rv = GetIndResource(theType,
+ index);
+ {
+ OSErr _err = ResError();
+ if (_err != noErr) return PyMac_Error(_err);
+ }
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *Res_Get1IndResource(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Handle _rv;
- ResType theType;
- short index;
+ PyObject *_res = NULL;
+ Handle _rv;
+ ResType theType;
+ short index;
#ifndef Get1IndResource
- PyMac_PRECHECK(Get1IndResource);
+ PyMac_PRECHECK(Get1IndResource);
#endif
- if (!PyArg_ParseTuple(_args, "O&h",
- PyMac_GetOSType, &theType,
- &index))
- return NULL;
- _rv = Get1IndResource(theType,
- index);
- {
- OSErr _err = ResError();
- if (_err != noErr) return PyMac_Error(_err);
- }
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&h",
+ PyMac_GetOSType, &theType,
+ &index))
+ return NULL;
+ _rv = Get1IndResource(theType,
+ index);
+ {
+ OSErr _err = ResError();
+ if (_err != noErr) return PyMac_Error(_err);
+ }
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *Res_GetResource(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Handle _rv;
- ResType theType;
- short theID;
+ PyObject *_res = NULL;
+ Handle _rv;
+ ResType theType;
+ short theID;
#ifndef GetResource
- PyMac_PRECHECK(GetResource);
+ PyMac_PRECHECK(GetResource);
#endif
- if (!PyArg_ParseTuple(_args, "O&h",
- PyMac_GetOSType, &theType,
- &theID))
- return NULL;
- _rv = GetResource(theType,
- theID);
- {
- OSErr _err = ResError();
- if (_err != noErr) return PyMac_Error(_err);
- }
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&h",
+ PyMac_GetOSType, &theType,
+ &theID))
+ return NULL;
+ _rv = GetResource(theType,
+ theID);
+ {
+ OSErr _err = ResError();
+ if (_err != noErr) return PyMac_Error(_err);
+ }
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *Res_Get1Resource(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Handle _rv;
- ResType theType;
- short theID;
+ PyObject *_res = NULL;
+ Handle _rv;
+ ResType theType;
+ short theID;
#ifndef Get1Resource
- PyMac_PRECHECK(Get1Resource);
+ PyMac_PRECHECK(Get1Resource);
#endif
- if (!PyArg_ParseTuple(_args, "O&h",
- PyMac_GetOSType, &theType,
- &theID))
- return NULL;
- _rv = Get1Resource(theType,
- theID);
- {
- OSErr _err = ResError();
- if (_err != noErr) return PyMac_Error(_err);
- }
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&h",
+ PyMac_GetOSType, &theType,
+ &theID))
+ return NULL;
+ _rv = Get1Resource(theType,
+ theID);
+ {
+ OSErr _err = ResError();
+ if (_err != noErr) return PyMac_Error(_err);
+ }
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *Res_GetNamedResource(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Handle _rv;
- ResType theType;
- Str255 name;
+ PyObject *_res = NULL;
+ Handle _rv;
+ ResType theType;
+ Str255 name;
#ifndef GetNamedResource
- PyMac_PRECHECK(GetNamedResource);
+ PyMac_PRECHECK(GetNamedResource);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- PyMac_GetOSType, &theType,
- PyMac_GetStr255, name))
- return NULL;
- _rv = GetNamedResource(theType,
- name);
- {
- OSErr _err = ResError();
- if (_err != noErr) return PyMac_Error(_err);
- }
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ PyMac_GetOSType, &theType,
+ PyMac_GetStr255, name))
+ return NULL;
+ _rv = GetNamedResource(theType,
+ name);
+ {
+ OSErr _err = ResError();
+ if (_err != noErr) return PyMac_Error(_err);
+ }
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *Res_Get1NamedResource(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Handle _rv;
- ResType theType;
- Str255 name;
+ PyObject *_res = NULL;
+ Handle _rv;
+ ResType theType;
+ Str255 name;
#ifndef Get1NamedResource
- PyMac_PRECHECK(Get1NamedResource);
+ PyMac_PRECHECK(Get1NamedResource);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- PyMac_GetOSType, &theType,
- PyMac_GetStr255, name))
- return NULL;
- _rv = Get1NamedResource(theType,
- name);
- {
- OSErr _err = ResError();
- if (_err != noErr) return PyMac_Error(_err);
- }
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ PyMac_GetOSType, &theType,
+ PyMac_GetStr255, name))
+ return NULL;
+ _rv = Get1NamedResource(theType,
+ name);
+ {
+ OSErr _err = ResError();
+ if (_err != noErr) return PyMac_Error(_err);
+ }
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *Res_UniqueID(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short _rv;
- ResType theType;
+ PyObject *_res = NULL;
+ short _rv;
+ ResType theType;
#ifndef UniqueID
- PyMac_PRECHECK(UniqueID);
+ PyMac_PRECHECK(UniqueID);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetOSType, &theType))
- return NULL;
- _rv = UniqueID(theType);
- {
- OSErr _err = ResError();
- if (_err != noErr) return PyMac_Error(_err);
- }
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetOSType, &theType))
+ return NULL;
+ _rv = UniqueID(theType);
+ {
+ OSErr _err = ResError();
+ if (_err != noErr) return PyMac_Error(_err);
+ }
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *Res_Unique1ID(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short _rv;
- ResType theType;
+ PyObject *_res = NULL;
+ short _rv;
+ ResType theType;
#ifndef Unique1ID
- PyMac_PRECHECK(Unique1ID);
+ PyMac_PRECHECK(Unique1ID);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetOSType, &theType))
- return NULL;
- _rv = Unique1ID(theType);
- {
- OSErr _err = ResError();
- if (_err != noErr) return PyMac_Error(_err);
- }
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetOSType, &theType))
+ return NULL;
+ _rv = Unique1ID(theType);
+ {
+ OSErr _err = ResError();
+ if (_err != noErr) return PyMac_Error(_err);
+ }
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *Res_UpdateResFile(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short refNum;
+ PyObject *_res = NULL;
+ short refNum;
#ifndef UpdateResFile
- PyMac_PRECHECK(UpdateResFile);
+ PyMac_PRECHECK(UpdateResFile);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &refNum))
- return NULL;
- UpdateResFile(refNum);
- {
- OSErr _err = ResError();
- if (_err != noErr) return PyMac_Error(_err);
- }
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &refNum))
+ return NULL;
+ UpdateResFile(refNum);
+ {
+ OSErr _err = ResError();
+ if (_err != noErr) return PyMac_Error(_err);
+ }
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Res_SetResPurge(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean install;
+ PyObject *_res = NULL;
+ Boolean install;
#ifndef SetResPurge
- PyMac_PRECHECK(SetResPurge);
+ PyMac_PRECHECK(SetResPurge);
#endif
- if (!PyArg_ParseTuple(_args, "b",
- &install))
- return NULL;
- SetResPurge(install);
- {
- OSErr _err = ResError();
- if (_err != noErr) return PyMac_Error(_err);
- }
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "b",
+ &install))
+ return NULL;
+ SetResPurge(install);
+ {
+ OSErr _err = ResError();
+ if (_err != noErr) return PyMac_Error(_err);
+ }
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Res_GetResFileAttrs(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short _rv;
- short refNum;
+ PyObject *_res = NULL;
+ short _rv;
+ short refNum;
#ifndef GetResFileAttrs
- PyMac_PRECHECK(GetResFileAttrs);
+ PyMac_PRECHECK(GetResFileAttrs);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &refNum))
- return NULL;
- _rv = GetResFileAttrs(refNum);
- {
- OSErr _err = ResError();
- if (_err != noErr) return PyMac_Error(_err);
- }
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &refNum))
+ return NULL;
+ _rv = GetResFileAttrs(refNum);
+ {
+ OSErr _err = ResError();
+ if (_err != noErr) return PyMac_Error(_err);
+ }
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *Res_SetResFileAttrs(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short refNum;
- short attrs;
+ PyObject *_res = NULL;
+ short refNum;
+ short attrs;
#ifndef SetResFileAttrs
- PyMac_PRECHECK(SetResFileAttrs);
+ PyMac_PRECHECK(SetResFileAttrs);
#endif
- if (!PyArg_ParseTuple(_args, "hh",
- &refNum,
- &attrs))
- return NULL;
- SetResFileAttrs(refNum,
- attrs);
- {
- OSErr _err = ResError();
- if (_err != noErr) return PyMac_Error(_err);
- }
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "hh",
+ &refNum,
+ &attrs))
+ return NULL;
+ SetResFileAttrs(refNum,
+ attrs);
+ {
+ OSErr _err = ResError();
+ if (_err != noErr) return PyMac_Error(_err);
+ }
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
#ifndef __LP64__
static PyObject *Res_OpenRFPerm(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short _rv;
- Str255 fileName;
- short vRefNum;
- SignedByte permission;
+ PyObject *_res = NULL;
+ short _rv;
+ Str255 fileName;
+ short vRefNum;
+ SignedByte permission;
#ifndef OpenRFPerm
- PyMac_PRECHECK(OpenRFPerm);
+ PyMac_PRECHECK(OpenRFPerm);
#endif
- if (!PyArg_ParseTuple(_args, "O&hb",
- PyMac_GetStr255, fileName,
- &vRefNum,
- &permission))
- return NULL;
- _rv = OpenRFPerm(fileName,
- vRefNum,
- permission);
- {
- OSErr _err = ResError();
- if (_err != noErr) return PyMac_Error(_err);
- }
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&hb",
+ PyMac_GetStr255, fileName,
+ &vRefNum,
+ &permission))
+ return NULL;
+ _rv = OpenRFPerm(fileName,
+ vRefNum,
+ permission);
+ {
+ OSErr _err = ResError();
+ if (_err != noErr) return PyMac_Error(_err);
+ }
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *Res_HOpenResFile(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short _rv;
- short vRefNum;
- long dirID;
- Str255 fileName;
- SignedByte permission;
+ PyObject *_res = NULL;
+ short _rv;
+ short vRefNum;
+ long dirID;
+ Str255 fileName;
+ SignedByte permission;
#ifndef HOpenResFile
- PyMac_PRECHECK(HOpenResFile);
+ PyMac_PRECHECK(HOpenResFile);
#endif
- if (!PyArg_ParseTuple(_args, "hlO&b",
- &vRefNum,
- &dirID,
- PyMac_GetStr255, fileName,
- &permission))
- return NULL;
- _rv = HOpenResFile(vRefNum,
- dirID,
- fileName,
- permission);
- {
- OSErr _err = ResError();
- if (_err != noErr) return PyMac_Error(_err);
- }
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "hlO&b",
+ &vRefNum,
+ &dirID,
+ PyMac_GetStr255, fileName,
+ &permission))
+ return NULL;
+ _rv = HOpenResFile(vRefNum,
+ dirID,
+ fileName,
+ permission);
+ {
+ OSErr _err = ResError();
+ if (_err != noErr) return PyMac_Error(_err);
+ }
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *Res_HCreateResFile(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short vRefNum;
- long dirID;
- Str255 fileName;
+ PyObject *_res = NULL;
+ short vRefNum;
+ long dirID;
+ Str255 fileName;
#ifndef HCreateResFile
- PyMac_PRECHECK(HCreateResFile);
+ PyMac_PRECHECK(HCreateResFile);
#endif
- if (!PyArg_ParseTuple(_args, "hlO&",
- &vRefNum,
- &dirID,
- PyMac_GetStr255, fileName))
- return NULL;
- HCreateResFile(vRefNum,
- dirID,
- fileName);
- {
- OSErr _err = ResError();
- if (_err != noErr) return PyMac_Error(_err);
- }
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "hlO&",
+ &vRefNum,
+ &dirID,
+ PyMac_GetStr255, fileName))
+ return NULL;
+ HCreateResFile(vRefNum,
+ dirID,
+ fileName);
+ {
+ OSErr _err = ResError();
+ if (_err != noErr) return PyMac_Error(_err);
+ }
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Res_FSpOpenResFile(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short _rv;
- FSSpec spec;
- SignedByte permission;
+ PyObject *_res = NULL;
+ short _rv;
+ FSSpec spec;
+ SignedByte permission;
#ifndef FSpOpenResFile
- PyMac_PRECHECK(FSpOpenResFile);
+ PyMac_PRECHECK(FSpOpenResFile);
#endif
- if (!PyArg_ParseTuple(_args, "O&b",
- PyMac_GetFSSpec, &spec,
- &permission))
- return NULL;
- _rv = FSpOpenResFile(&spec,
- permission);
- {
- OSErr _err = ResError();
- if (_err != noErr) return PyMac_Error(_err);
- }
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&b",
+ PyMac_GetFSSpec, &spec,
+ &permission))
+ return NULL;
+ _rv = FSpOpenResFile(&spec,
+ permission);
+ {
+ OSErr _err = ResError();
+ if (_err != noErr) return PyMac_Error(_err);
+ }
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *Res_FSpCreateResFile(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- FSSpec spec;
- OSType creator;
- OSType fileType;
- ScriptCode scriptTag;
+ PyObject *_res = NULL;
+ FSSpec spec;
+ OSType creator;
+ OSType fileType;
+ ScriptCode scriptTag;
#ifndef FSpCreateResFile
- PyMac_PRECHECK(FSpCreateResFile);
+ PyMac_PRECHECK(FSpCreateResFile);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&h",
- PyMac_GetFSSpec, &spec,
- PyMac_GetOSType, &creator,
- PyMac_GetOSType, &fileType,
- &scriptTag))
- return NULL;
- FSpCreateResFile(&spec,
- creator,
- fileType,
- scriptTag);
- {
- OSErr _err = ResError();
- if (_err != noErr) return PyMac_Error(_err);
- }
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&O&h",
+ PyMac_GetFSSpec, &spec,
+ PyMac_GetOSType, &creator,
+ PyMac_GetOSType, &fileType,
+ &scriptTag))
+ return NULL;
+ FSpCreateResFile(&spec,
+ creator,
+ fileType,
+ scriptTag);
+ {
+ OSErr _err = ResError();
+ if (_err != noErr) return PyMac_Error(_err);
+ }
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
#endif /* !__LP64__ */
static PyObject *Res_InsertResourceFile(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- SInt16 refNum;
- RsrcChainLocation where;
+ PyObject *_res = NULL;
+ OSErr _err;
+ SInt16 refNum;
+ RsrcChainLocation where;
#ifndef InsertResourceFile
- PyMac_PRECHECK(InsertResourceFile);
+ PyMac_PRECHECK(InsertResourceFile);
#endif
- if (!PyArg_ParseTuple(_args, "hh",
- &refNum,
- &where))
- return NULL;
- _err = InsertResourceFile(refNum,
- where);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "hh",
+ &refNum,
+ &where))
+ return NULL;
+ _err = InsertResourceFile(refNum,
+ where);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Res_DetachResourceFile(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- SInt16 refNum;
+ PyObject *_res = NULL;
+ OSErr _err;
+ SInt16 refNum;
#ifndef DetachResourceFile
- PyMac_PRECHECK(DetachResourceFile);
+ PyMac_PRECHECK(DetachResourceFile);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &refNum))
- return NULL;
- _err = DetachResourceFile(refNum);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &refNum))
+ return NULL;
+ _err = DetachResourceFile(refNum);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
#ifndef __LP64__
static PyObject *Res_FSpResourceFileAlreadyOpen(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- FSSpec resourceFile;
- Boolean inChain;
- SInt16 refNum;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ FSSpec resourceFile;
+ Boolean inChain;
+ SInt16 refNum;
#ifndef FSpResourceFileAlreadyOpen
- PyMac_PRECHECK(FSpResourceFileAlreadyOpen);
+ PyMac_PRECHECK(FSpResourceFileAlreadyOpen);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetFSSpec, &resourceFile))
- return NULL;
- _rv = FSpResourceFileAlreadyOpen(&resourceFile,
- &inChain,
- &refNum);
- {
- OSErr _err = ResError();
- if (_err != noErr) return PyMac_Error(_err);
- }
- _res = Py_BuildValue("bbh",
- _rv,
- inChain,
- refNum);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetFSSpec, &resourceFile))
+ return NULL;
+ _rv = FSpResourceFileAlreadyOpen(&resourceFile,
+ &inChain,
+ &refNum);
+ {
+ OSErr _err = ResError();
+ if (_err != noErr) return PyMac_Error(_err);
+ }
+ _res = Py_BuildValue("bbh",
+ _rv,
+ inChain,
+ refNum);
+ return _res;
}
static PyObject *Res_FSpOpenOrphanResFile(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- FSSpec spec;
- SignedByte permission;
- SInt16 refNum;
+ PyObject *_res = NULL;
+ OSErr _err;
+ FSSpec spec;
+ SignedByte permission;
+ SInt16 refNum;
#ifndef FSpOpenOrphanResFile
- PyMac_PRECHECK(FSpOpenOrphanResFile);
+ PyMac_PRECHECK(FSpOpenOrphanResFile);
#endif
- if (!PyArg_ParseTuple(_args, "O&b",
- PyMac_GetFSSpec, &spec,
- &permission))
- return NULL;
- _err = FSpOpenOrphanResFile(&spec,
- permission,
- &refNum);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("h",
- refNum);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&b",
+ PyMac_GetFSSpec, &spec,
+ &permission))
+ return NULL;
+ _err = FSpOpenOrphanResFile(&spec,
+ permission,
+ &refNum);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("h",
+ refNum);
+ return _res;
}
static PyObject *Res_GetTopResourceFile(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- SInt16 refNum;
+ PyObject *_res = NULL;
+ OSErr _err;
+ SInt16 refNum;
#ifndef GetTopResourceFile
- PyMac_PRECHECK(GetTopResourceFile);
+ PyMac_PRECHECK(GetTopResourceFile);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetTopResourceFile(&refNum);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("h",
- refNum);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetTopResourceFile(&refNum);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("h",
+ refNum);
+ return _res;
}
static PyObject *Res_GetNextResourceFile(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- SInt16 curRefNum;
- SInt16 nextRefNum;
+ PyObject *_res = NULL;
+ OSErr _err;
+ SInt16 curRefNum;
+ SInt16 nextRefNum;
#ifndef GetNextResourceFile
- PyMac_PRECHECK(GetNextResourceFile);
+ PyMac_PRECHECK(GetNextResourceFile);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &curRefNum))
- return NULL;
- _err = GetNextResourceFile(curRefNum,
- &nextRefNum);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("h",
- nextRefNum);
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &curRefNum))
+ return NULL;
+ _err = GetNextResourceFile(curRefNum,
+ &nextRefNum);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("h",
+ nextRefNum);
+ return _res;
}
#endif /* !__LP64__ */
static PyObject *Res_FSOpenResFile(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short _rv;
- FSRef ref;
- SignedByte permission;
+ PyObject *_res = NULL;
+ short _rv;
+ FSRef ref;
+ SignedByte permission;
#ifndef FSOpenResFile
- PyMac_PRECHECK(FSOpenResFile);
+ PyMac_PRECHECK(FSOpenResFile);
#endif
- if (!PyArg_ParseTuple(_args, "O&b",
- PyMac_GetFSRef, &ref,
- &permission))
- return NULL;
- _rv = FSOpenResFile(&ref,
- permission);
- {
- OSErr _err = ResError();
- if (_err != noErr) return PyMac_Error(_err);
- }
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&b",
+ PyMac_GetFSRef, &ref,
+ &permission))
+ return NULL;
+ _rv = FSOpenResFile(&ref,
+ permission);
+ {
+ OSErr _err = ResError();
+ if (_err != noErr) return PyMac_Error(_err);
+ }
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
#ifndef __LP64__
static PyObject *Res_FSCreateResFile(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- FSRef parentRef;
- UniChar *nameLength__in__;
- UniCharCount nameLength__len__;
- int nameLength__in_len__;
- FSRef newRef;
- FSSpec newSpec;
+ PyObject *_res = NULL;
+ FSRef parentRef;
+ UniChar *nameLength__in__;
+ UniCharCount nameLength__len__;
+ int nameLength__in_len__;
+ FSRef newRef;
+ FSSpec newSpec;
#ifndef FSCreateResFile
- PyMac_PRECHECK(FSCreateResFile);
+ PyMac_PRECHECK(FSCreateResFile);
#endif
- if (!PyArg_ParseTuple(_args, "O&u#",
- PyMac_GetFSRef, &parentRef,
- &nameLength__in__, &nameLength__in_len__))
- return NULL;
- nameLength__len__ = nameLength__in_len__;
- FSCreateResFile(&parentRef,
- nameLength__len__, nameLength__in__,
- 0,
- (FSCatalogInfo *)0,
- &newRef,
- &newSpec);
- {
- OSErr _err = ResError();
- if (_err != noErr) return PyMac_Error(_err);
- }
- _res = Py_BuildValue("O&O&",
- PyMac_BuildFSRef, &newRef,
- PyMac_BuildFSSpec, &newSpec);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&u#",
+ PyMac_GetFSRef, &parentRef,
+ &nameLength__in__, &nameLength__in_len__))
+ return NULL;
+ nameLength__len__ = nameLength__in_len__;
+ FSCreateResFile(&parentRef,
+ nameLength__len__, nameLength__in__,
+ 0,
+ (FSCatalogInfo *)0,
+ &newRef,
+ &newSpec);
+ {
+ OSErr _err = ResError();
+ if (_err != noErr) return PyMac_Error(_err);
+ }
+ _res = Py_BuildValue("O&O&",
+ PyMac_BuildFSRef, &newRef,
+ PyMac_BuildFSSpec, &newSpec);
+ return _res;
}
static PyObject *Res_FSResourceFileAlreadyOpen(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- FSRef resourceFileRef;
- Boolean inChain;
- SInt16 refNum;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ FSRef resourceFileRef;
+ Boolean inChain;
+ SInt16 refNum;
#ifndef FSResourceFileAlreadyOpen
- PyMac_PRECHECK(FSResourceFileAlreadyOpen);
+ PyMac_PRECHECK(FSResourceFileAlreadyOpen);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetFSRef, &resourceFileRef))
- return NULL;
- _rv = FSResourceFileAlreadyOpen(&resourceFileRef,
- &inChain,
- &refNum);
- {
- OSErr _err = ResError();
- if (_err != noErr) return PyMac_Error(_err);
- }
- _res = Py_BuildValue("bbh",
- _rv,
- inChain,
- refNum);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetFSRef, &resourceFileRef))
+ return NULL;
+ _rv = FSResourceFileAlreadyOpen(&resourceFileRef,
+ &inChain,
+ &refNum);
+ {
+ OSErr _err = ResError();
+ if (_err != noErr) return PyMac_Error(_err);
+ }
+ _res = Py_BuildValue("bbh",
+ _rv,
+ inChain,
+ refNum);
+ return _res;
}
static PyObject *Res_FSCreateResourceFile(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- FSRef parentRef;
- UniChar *nameLength__in__;
- UniCharCount nameLength__len__;
- int nameLength__in_len__;
- UniChar *forkNameLength__in__;
- UniCharCount forkNameLength__len__;
- int forkNameLength__in_len__;
- FSRef newRef;
- FSSpec newSpec;
+ PyObject *_res = NULL;
+ OSErr _err;
+ FSRef parentRef;
+ UniChar *nameLength__in__;
+ UniCharCount nameLength__len__;
+ int nameLength__in_len__;
+ UniChar *forkNameLength__in__;
+ UniCharCount forkNameLength__len__;
+ int forkNameLength__in_len__;
+ FSRef newRef;
+ FSSpec newSpec;
#ifndef FSCreateResourceFile
- PyMac_PRECHECK(FSCreateResourceFile);
+ PyMac_PRECHECK(FSCreateResourceFile);
#endif
- if (!PyArg_ParseTuple(_args, "O&u#u#",
- PyMac_GetFSRef, &parentRef,
- &nameLength__in__, &nameLength__in_len__,
- &forkNameLength__in__, &forkNameLength__in_len__))
- return NULL;
- nameLength__len__ = nameLength__in_len__;
- forkNameLength__len__ = forkNameLength__in_len__;
- _err = FSCreateResourceFile(&parentRef,
- nameLength__len__, nameLength__in__,
- 0,
- (FSCatalogInfo *)0,
- forkNameLength__len__, forkNameLength__in__,
- &newRef,
- &newSpec);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&O&",
- PyMac_BuildFSRef, &newRef,
- PyMac_BuildFSSpec, &newSpec);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&u#u#",
+ PyMac_GetFSRef, &parentRef,
+ &nameLength__in__, &nameLength__in_len__,
+ &forkNameLength__in__, &forkNameLength__in_len__))
+ return NULL;
+ nameLength__len__ = nameLength__in_len__;
+ forkNameLength__len__ = forkNameLength__in_len__;
+ _err = FSCreateResourceFile(&parentRef,
+ nameLength__len__, nameLength__in__,
+ 0,
+ (FSCatalogInfo *)0,
+ forkNameLength__len__, forkNameLength__in__,
+ &newRef,
+ &newSpec);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&O&",
+ PyMac_BuildFSRef, &newRef,
+ PyMac_BuildFSSpec, &newSpec);
+ return _res;
}
#endif /* __LP64__ */
static PyObject *Res_FSOpenResourceFile(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- FSRef ref;
- UniChar *forkNameLength__in__;
- UniCharCount forkNameLength__len__;
- int forkNameLength__in_len__;
- SignedByte permissions;
- ResFileRefNum refNum;
+ PyObject *_res = NULL;
+ OSErr _err;
+ FSRef ref;
+ UniChar *forkNameLength__in__;
+ UniCharCount forkNameLength__len__;
+ int forkNameLength__in_len__;
+ SignedByte permissions;
+ ResFileRefNum refNum;
#ifndef FSOpenResourceFile
- PyMac_PRECHECK(FSOpenResourceFile);
+ PyMac_PRECHECK(FSOpenResourceFile);
#endif
- if (!PyArg_ParseTuple(_args, "O&u#b",
- PyMac_GetFSRef, &ref,
- &forkNameLength__in__, &forkNameLength__in_len__,
- &permissions))
- return NULL;
- forkNameLength__len__ = forkNameLength__in_len__;
- _err = FSOpenResourceFile(&ref,
- forkNameLength__len__, forkNameLength__in__,
- permissions,
- &refNum);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("h",
- refNum);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&u#b",
+ PyMac_GetFSRef, &ref,
+ &forkNameLength__in__, &forkNameLength__in_len__,
+ &permissions))
+ return NULL;
+ forkNameLength__len__ = forkNameLength__in_len__;
+ _err = FSOpenResourceFile(&ref,
+ forkNameLength__len__, forkNameLength__in__,
+ permissions,
+ &refNum);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("h",
+ refNum);
+ return _res;
}
static PyObject *Res_Handle(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
- char *buf;
- int len;
- Handle h;
- ResourceObject *rv;
+ char *buf;
+ int len;
+ Handle h;
+ ResourceObject *rv;
- if (!PyArg_ParseTuple(_args, "s#", &buf, &len))
- return NULL;
- h = NewHandle(len);
- if ( h == NULL ) {
- PyErr_NoMemory();
- return NULL;
- }
- HLock(h);
- memcpy(*h, buf, len);
- HUnlock(h);
- rv = (ResourceObject *)ResObj_New(h);
- rv->ob_freeit = PyMac_AutoDisposeHandle;
- _res = (PyObject *)rv;
- return _res;
+ if (!PyArg_ParseTuple(_args, "s#", &buf, &len))
+ return NULL;
+ h = NewHandle(len);
+ if ( h == NULL ) {
+ PyErr_NoMemory();
+ return NULL;
+ }
+ HLock(h);
+ memcpy(*h, buf, len);
+ HUnlock(h);
+ rv = (ResourceObject *)ResObj_New(h);
+ rv->ob_freeit = PyMac_AutoDisposeHandle;
+ _res = (PyObject *)rv;
+ return _res;
}
static PyMethodDef Res_methods[] = {
- {"CloseResFile", (PyCFunction)Res_CloseResFile, 1,
- PyDoc_STR("(short refNum) -> None")},
- {"ResError", (PyCFunction)Res_ResError, 1,
- PyDoc_STR("() -> None")},
- {"CurResFile", (PyCFunction)Res_CurResFile, 1,
- PyDoc_STR("() -> (short _rv)")},
- {"UseResFile", (PyCFunction)Res_UseResFile, 1,
- PyDoc_STR("(short refNum) -> None")},
- {"CountTypes", (PyCFunction)Res_CountTypes, 1,
- PyDoc_STR("() -> (short _rv)")},
- {"Count1Types", (PyCFunction)Res_Count1Types, 1,
- PyDoc_STR("() -> (short _rv)")},
- {"GetIndType", (PyCFunction)Res_GetIndType, 1,
- PyDoc_STR("(short index) -> (ResType theType)")},
- {"Get1IndType", (PyCFunction)Res_Get1IndType, 1,
- PyDoc_STR("(short index) -> (ResType theType)")},
- {"SetResLoad", (PyCFunction)Res_SetResLoad, 1,
- PyDoc_STR("(Boolean load) -> None")},
- {"CountResources", (PyCFunction)Res_CountResources, 1,
- PyDoc_STR("(ResType theType) -> (short _rv)")},
- {"Count1Resources", (PyCFunction)Res_Count1Resources, 1,
- PyDoc_STR("(ResType theType) -> (short _rv)")},
- {"GetIndResource", (PyCFunction)Res_GetIndResource, 1,
- PyDoc_STR("(ResType theType, short index) -> (Handle _rv)")},
- {"Get1IndResource", (PyCFunction)Res_Get1IndResource, 1,
- PyDoc_STR("(ResType theType, short index) -> (Handle _rv)")},
- {"GetResource", (PyCFunction)Res_GetResource, 1,
- PyDoc_STR("(ResType theType, short theID) -> (Handle _rv)")},
- {"Get1Resource", (PyCFunction)Res_Get1Resource, 1,
- PyDoc_STR("(ResType theType, short theID) -> (Handle _rv)")},
- {"GetNamedResource", (PyCFunction)Res_GetNamedResource, 1,
- PyDoc_STR("(ResType theType, Str255 name) -> (Handle _rv)")},
- {"Get1NamedResource", (PyCFunction)Res_Get1NamedResource, 1,
- PyDoc_STR("(ResType theType, Str255 name) -> (Handle _rv)")},
- {"UniqueID", (PyCFunction)Res_UniqueID, 1,
- PyDoc_STR("(ResType theType) -> (short _rv)")},
- {"Unique1ID", (PyCFunction)Res_Unique1ID, 1,
- PyDoc_STR("(ResType theType) -> (short _rv)")},
- {"UpdateResFile", (PyCFunction)Res_UpdateResFile, 1,
- PyDoc_STR("(short refNum) -> None")},
- {"SetResPurge", (PyCFunction)Res_SetResPurge, 1,
- PyDoc_STR("(Boolean install) -> None")},
- {"GetResFileAttrs", (PyCFunction)Res_GetResFileAttrs, 1,
- PyDoc_STR("(short refNum) -> (short _rv)")},
- {"SetResFileAttrs", (PyCFunction)Res_SetResFileAttrs, 1,
- PyDoc_STR("(short refNum, short attrs) -> None")},
+ {"CloseResFile", (PyCFunction)Res_CloseResFile, 1,
+ PyDoc_STR("(short refNum) -> None")},
+ {"ResError", (PyCFunction)Res_ResError, 1,
+ PyDoc_STR("() -> None")},
+ {"CurResFile", (PyCFunction)Res_CurResFile, 1,
+ PyDoc_STR("() -> (short _rv)")},
+ {"UseResFile", (PyCFunction)Res_UseResFile, 1,
+ PyDoc_STR("(short refNum) -> None")},
+ {"CountTypes", (PyCFunction)Res_CountTypes, 1,
+ PyDoc_STR("() -> (short _rv)")},
+ {"Count1Types", (PyCFunction)Res_Count1Types, 1,
+ PyDoc_STR("() -> (short _rv)")},
+ {"GetIndType", (PyCFunction)Res_GetIndType, 1,
+ PyDoc_STR("(short index) -> (ResType theType)")},
+ {"Get1IndType", (PyCFunction)Res_Get1IndType, 1,
+ PyDoc_STR("(short index) -> (ResType theType)")},
+ {"SetResLoad", (PyCFunction)Res_SetResLoad, 1,
+ PyDoc_STR("(Boolean load) -> None")},
+ {"CountResources", (PyCFunction)Res_CountResources, 1,
+ PyDoc_STR("(ResType theType) -> (short _rv)")},
+ {"Count1Resources", (PyCFunction)Res_Count1Resources, 1,
+ PyDoc_STR("(ResType theType) -> (short _rv)")},
+ {"GetIndResource", (PyCFunction)Res_GetIndResource, 1,
+ PyDoc_STR("(ResType theType, short index) -> (Handle _rv)")},
+ {"Get1IndResource", (PyCFunction)Res_Get1IndResource, 1,
+ PyDoc_STR("(ResType theType, short index) -> (Handle _rv)")},
+ {"GetResource", (PyCFunction)Res_GetResource, 1,
+ PyDoc_STR("(ResType theType, short theID) -> (Handle _rv)")},
+ {"Get1Resource", (PyCFunction)Res_Get1Resource, 1,
+ PyDoc_STR("(ResType theType, short theID) -> (Handle _rv)")},
+ {"GetNamedResource", (PyCFunction)Res_GetNamedResource, 1,
+ PyDoc_STR("(ResType theType, Str255 name) -> (Handle _rv)")},
+ {"Get1NamedResource", (PyCFunction)Res_Get1NamedResource, 1,
+ PyDoc_STR("(ResType theType, Str255 name) -> (Handle _rv)")},
+ {"UniqueID", (PyCFunction)Res_UniqueID, 1,
+ PyDoc_STR("(ResType theType) -> (short _rv)")},
+ {"Unique1ID", (PyCFunction)Res_Unique1ID, 1,
+ PyDoc_STR("(ResType theType) -> (short _rv)")},
+ {"UpdateResFile", (PyCFunction)Res_UpdateResFile, 1,
+ PyDoc_STR("(short refNum) -> None")},
+ {"SetResPurge", (PyCFunction)Res_SetResPurge, 1,
+ PyDoc_STR("(Boolean install) -> None")},
+ {"GetResFileAttrs", (PyCFunction)Res_GetResFileAttrs, 1,
+ PyDoc_STR("(short refNum) -> (short _rv)")},
+ {"SetResFileAttrs", (PyCFunction)Res_SetResFileAttrs, 1,
+ PyDoc_STR("(short refNum, short attrs) -> None")},
#ifndef __LP64__
- {"OpenRFPerm", (PyCFunction)Res_OpenRFPerm, 1,
- PyDoc_STR("(Str255 fileName, short vRefNum, SignedByte permission) -> (short _rv)")},
- {"HOpenResFile", (PyCFunction)Res_HOpenResFile, 1,
- PyDoc_STR("(short vRefNum, long dirID, Str255 fileName, SignedByte permission) -> (short _rv)")},
- {"HCreateResFile", (PyCFunction)Res_HCreateResFile, 1,
- PyDoc_STR("(short vRefNum, long dirID, Str255 fileName) -> None")},
- {"FSpOpenResFile", (PyCFunction)Res_FSpOpenResFile, 1,
- PyDoc_STR("(FSSpec spec, SignedByte permission) -> (short _rv)")},
- {"FSpCreateResFile", (PyCFunction)Res_FSpCreateResFile, 1,
- PyDoc_STR("(FSSpec spec, OSType creator, OSType fileType, ScriptCode scriptTag) -> None")},
+ {"OpenRFPerm", (PyCFunction)Res_OpenRFPerm, 1,
+ PyDoc_STR("(Str255 fileName, short vRefNum, SignedByte permission) -> (short _rv)")},
+ {"HOpenResFile", (PyCFunction)Res_HOpenResFile, 1,
+ PyDoc_STR("(short vRefNum, long dirID, Str255 fileName, SignedByte permission) -> (short _rv)")},
+ {"HCreateResFile", (PyCFunction)Res_HCreateResFile, 1,
+ PyDoc_STR("(short vRefNum, long dirID, Str255 fileName) -> None")},
+ {"FSpOpenResFile", (PyCFunction)Res_FSpOpenResFile, 1,
+ PyDoc_STR("(FSSpec spec, SignedByte permission) -> (short _rv)")},
+ {"FSpCreateResFile", (PyCFunction)Res_FSpCreateResFile, 1,
+ PyDoc_STR("(FSSpec spec, OSType creator, OSType fileType, ScriptCode scriptTag) -> None")},
#endif /* !__LP64__ */
- {"InsertResourceFile", (PyCFunction)Res_InsertResourceFile, 1,
- PyDoc_STR("(SInt16 refNum, RsrcChainLocation where) -> None")},
- {"DetachResourceFile", (PyCFunction)Res_DetachResourceFile, 1,
- PyDoc_STR("(SInt16 refNum) -> None")},
+ {"InsertResourceFile", (PyCFunction)Res_InsertResourceFile, 1,
+ PyDoc_STR("(SInt16 refNum, RsrcChainLocation where) -> None")},
+ {"DetachResourceFile", (PyCFunction)Res_DetachResourceFile, 1,
+ PyDoc_STR("(SInt16 refNum) -> None")},
#ifndef __LP64__
- {"FSpResourceFileAlreadyOpen", (PyCFunction)Res_FSpResourceFileAlreadyOpen, 1,
- PyDoc_STR("(FSSpec resourceFile) -> (Boolean _rv, Boolean inChain, SInt16 refNum)")},
- {"FSpOpenOrphanResFile", (PyCFunction)Res_FSpOpenOrphanResFile, 1,
- PyDoc_STR("(FSSpec spec, SignedByte permission) -> (SInt16 refNum)")},
- {"GetTopResourceFile", (PyCFunction)Res_GetTopResourceFile, 1,
- PyDoc_STR("() -> (SInt16 refNum)")},
- {"GetNextResourceFile", (PyCFunction)Res_GetNextResourceFile, 1,
- PyDoc_STR("(SInt16 curRefNum) -> (SInt16 nextRefNum)")},
+ {"FSpResourceFileAlreadyOpen", (PyCFunction)Res_FSpResourceFileAlreadyOpen, 1,
+ PyDoc_STR("(FSSpec resourceFile) -> (Boolean _rv, Boolean inChain, SInt16 refNum)")},
+ {"FSpOpenOrphanResFile", (PyCFunction)Res_FSpOpenOrphanResFile, 1,
+ PyDoc_STR("(FSSpec spec, SignedByte permission) -> (SInt16 refNum)")},
+ {"GetTopResourceFile", (PyCFunction)Res_GetTopResourceFile, 1,
+ PyDoc_STR("() -> (SInt16 refNum)")},
+ {"GetNextResourceFile", (PyCFunction)Res_GetNextResourceFile, 1,
+ PyDoc_STR("(SInt16 curRefNum) -> (SInt16 nextRefNum)")},
#endif /* __LP64__ */
- {"FSOpenResFile", (PyCFunction)Res_FSOpenResFile, 1,
- PyDoc_STR("(FSRef ref, SignedByte permission) -> (short _rv)")},
+ {"FSOpenResFile", (PyCFunction)Res_FSOpenResFile, 1,
+ PyDoc_STR("(FSRef ref, SignedByte permission) -> (short _rv)")},
#ifndef __LP64__
- {"FSCreateResFile", (PyCFunction)Res_FSCreateResFile, 1,
- PyDoc_STR("(FSRef parentRef, Buffer nameLength) -> (FSRef newRef, FSSpec newSpec)")},
- {"FSResourceFileAlreadyOpen", (PyCFunction)Res_FSResourceFileAlreadyOpen, 1,
- PyDoc_STR("(FSRef resourceFileRef) -> (Boolean _rv, Boolean inChain, SInt16 refNum)")},
- {"FSCreateResourceFile", (PyCFunction)Res_FSCreateResourceFile, 1,
- PyDoc_STR("(FSRef parentRef, Buffer nameLength, Buffer forkNameLength) -> (FSRef newRef, FSSpec newSpec)")},
+ {"FSCreateResFile", (PyCFunction)Res_FSCreateResFile, 1,
+ PyDoc_STR("(FSRef parentRef, Buffer nameLength) -> (FSRef newRef, FSSpec newSpec)")},
+ {"FSResourceFileAlreadyOpen", (PyCFunction)Res_FSResourceFileAlreadyOpen, 1,
+ PyDoc_STR("(FSRef resourceFileRef) -> (Boolean _rv, Boolean inChain, SInt16 refNum)")},
+ {"FSCreateResourceFile", (PyCFunction)Res_FSCreateResourceFile, 1,
+ PyDoc_STR("(FSRef parentRef, Buffer nameLength, Buffer forkNameLength) -> (FSRef newRef, FSSpec newSpec)")},
#endif /* __LP64__ */
- {"FSOpenResourceFile", (PyCFunction)Res_FSOpenResourceFile, 1,
- PyDoc_STR("(FSRef ref, Buffer forkNameLength, SignedByte permissions) -> (SInt16 refNum)")},
- {"Handle", (PyCFunction)Res_Handle, 1,
- PyDoc_STR("Convert a string to a Handle object.\n\nResource() and Handle() are very similar, but objects created with Handle() are\nby default automatically DisposeHandle()d upon object cleanup. Use AutoDispose()\nto change this.\n")},
- {NULL, NULL, 0}
+ {"FSOpenResourceFile", (PyCFunction)Res_FSOpenResourceFile, 1,
+ PyDoc_STR("(FSRef ref, Buffer forkNameLength, SignedByte permissions) -> (SInt16 refNum)")},
+ {"Handle", (PyCFunction)Res_Handle, 1,
+ PyDoc_STR("Convert a string to a Handle object.\n\nResource() and Handle() are very similar, but objects created with Handle() are\nby default automatically DisposeHandle()d upon object cleanup. Use AutoDispose()\nto change this.\n")},
+ {NULL, NULL, 0}
};
@@ -1696,64 +1696,64 @@ static PyMethodDef Res_methods[] = {
/* Alternative version of ResObj_New, which returns None for null argument */
PyObject *OptResObj_New(Handle itself)
{
- if (itself == NULL) {
- Py_INCREF(Py_None);
- return Py_None;
- }
- return ResObj_New(itself);
+ if (itself == NULL) {
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
+ return ResObj_New(itself);
}
int OptResObj_Convert(PyObject *v, Handle *p_itself)
{
- PyObject *tmp;
-
- if ( v == Py_None ) {
- *p_itself = NULL;
- return 1;
- }
- if (ResObj_Check(v))
- {
- *p_itself = ((ResourceObject *)v)->ob_itself;
- return 1;
- }
- /* If it isn't a resource yet see whether it is convertible */
- if ( (tmp=PyObject_CallMethod(v, "as_Resource", "")) ) {
- *p_itself = ((ResourceObject *)tmp)->ob_itself;
- Py_DECREF(tmp);
- return 1;
- }
- PyErr_Clear();
- PyErr_SetString(PyExc_TypeError, "Resource required");
- return 0;
+ PyObject *tmp;
+
+ if ( v == Py_None ) {
+ *p_itself = NULL;
+ return 1;
+ }
+ if (ResObj_Check(v))
+ {
+ *p_itself = ((ResourceObject *)v)->ob_itself;
+ return 1;
+ }
+ /* If it isn't a resource yet see whether it is convertible */
+ if ( (tmp=PyObject_CallMethod(v, "as_Resource", "")) ) {
+ *p_itself = ((ResourceObject *)tmp)->ob_itself;
+ Py_DECREF(tmp);
+ return 1;
+ }
+ PyErr_Clear();
+ PyErr_SetString(PyExc_TypeError, "Resource required");
+ return 0;
}
void init_Res(void)
{
- PyObject *m;
- PyObject *d;
+ PyObject *m;
+ PyObject *d;
- PyMac_INIT_TOOLBOX_OBJECT_NEW(Handle, ResObj_New);
- PyMac_INIT_TOOLBOX_OBJECT_CONVERT(Handle, ResObj_Convert);
- PyMac_INIT_TOOLBOX_OBJECT_NEW(Handle, OptResObj_New);
- PyMac_INIT_TOOLBOX_OBJECT_CONVERT(Handle, OptResObj_Convert);
+ PyMac_INIT_TOOLBOX_OBJECT_NEW(Handle, ResObj_New);
+ PyMac_INIT_TOOLBOX_OBJECT_CONVERT(Handle, ResObj_Convert);
+ PyMac_INIT_TOOLBOX_OBJECT_NEW(Handle, OptResObj_New);
+ PyMac_INIT_TOOLBOX_OBJECT_CONVERT(Handle, OptResObj_Convert);
- m = Py_InitModule("_Res", Res_methods);
- d = PyModule_GetDict(m);
- Res_Error = PyMac_GetOSErrException();
- if (Res_Error == NULL ||
- PyDict_SetItemString(d, "Error", Res_Error) != 0)
- return;
- Resource_Type.ob_type = &PyType_Type;
- if (PyType_Ready(&Resource_Type) < 0) return;
- Py_INCREF(&Resource_Type);
- PyModule_AddObject(m, "Resource", (PyObject *)&Resource_Type);
- /* Backward-compatible name */
- Py_INCREF(&Resource_Type);
- PyModule_AddObject(m, "ResourceType", (PyObject *)&Resource_Type);
+ m = Py_InitModule("_Res", Res_methods);
+ d = PyModule_GetDict(m);
+ Res_Error = PyMac_GetOSErrException();
+ if (Res_Error == NULL ||
+ PyDict_SetItemString(d, "Error", Res_Error) != 0)
+ return;
+ Resource_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&Resource_Type) < 0) return;
+ Py_INCREF(&Resource_Type);
+ PyModule_AddObject(m, "Resource", (PyObject *)&Resource_Type);
+ /* Backward-compatible name */
+ Py_INCREF(&Resource_Type);
+ PyModule_AddObject(m, "ResourceType", (PyObject *)&Resource_Type);
}
/* ======================== End module _Res ========================= */
diff --git a/Mac/Modules/scrap/_Scrapmodule.c b/Mac/Modules/scrap/_Scrapmodule.c
index 14e3fd2..f24ed8b 100644
--- a/Mac/Modules/scrap/_Scrapmodule.c
+++ b/Mac/Modules/scrap/_Scrapmodule.c
@@ -10,9 +10,9 @@
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
- PyErr_SetString(PyExc_NotImplementedError, \
- "Not available in this shared library/OS version"); \
- return NULL; \
+ PyErr_SetString(PyExc_NotImplementedError, \
+ "Not available in this shared library/OS version"); \
+ return NULL; \
}} while(0)
@@ -27,199 +27,199 @@ PyTypeObject Scrap_Type;
#define ScrapObj_Check(x) ((x)->ob_type == &Scrap_Type || PyObject_TypeCheck((x), &Scrap_Type))
typedef struct ScrapObject {
- PyObject_HEAD
- ScrapRef ob_itself;
+ PyObject_HEAD
+ ScrapRef ob_itself;
} ScrapObject;
PyObject *ScrapObj_New(ScrapRef itself)
{
- ScrapObject *it;
- it = PyObject_NEW(ScrapObject, &Scrap_Type);
- if (it == NULL) return NULL;
- it->ob_itself = itself;
- return (PyObject *)it;
+ ScrapObject *it;
+ it = PyObject_NEW(ScrapObject, &Scrap_Type);
+ if (it == NULL) return NULL;
+ it->ob_itself = itself;
+ return (PyObject *)it;
}
int ScrapObj_Convert(PyObject *v, ScrapRef *p_itself)
{
- if (!ScrapObj_Check(v))
- {
- PyErr_SetString(PyExc_TypeError, "Scrap required");
- return 0;
- }
- *p_itself = ((ScrapObject *)v)->ob_itself;
- return 1;
+ if (!ScrapObj_Check(v))
+ {
+ PyErr_SetString(PyExc_TypeError, "Scrap required");
+ return 0;
+ }
+ *p_itself = ((ScrapObject *)v)->ob_itself;
+ return 1;
}
static void ScrapObj_dealloc(ScrapObject *self)
{
- /* Cleanup of self->ob_itself goes here */
- self->ob_type->tp_free((PyObject *)self);
+ /* Cleanup of self->ob_itself goes here */
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *ScrapObj_GetScrapFlavorFlags(ScrapObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- ScrapFlavorType flavorType;
- ScrapFlavorFlags flavorFlags;
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetOSType, &flavorType))
- return NULL;
- _err = GetScrapFlavorFlags(_self->ob_itself,
- flavorType,
- &flavorFlags);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- flavorFlags);
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ ScrapFlavorType flavorType;
+ ScrapFlavorFlags flavorFlags;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetOSType, &flavorType))
+ return NULL;
+ _err = GetScrapFlavorFlags(_self->ob_itself,
+ flavorType,
+ &flavorFlags);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ flavorFlags);
+ return _res;
}
static PyObject *ScrapObj_GetScrapFlavorSize(ScrapObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- ScrapFlavorType flavorType;
- Size byteCount;
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetOSType, &flavorType))
- return NULL;
- _err = GetScrapFlavorSize(_self->ob_itself,
- flavorType,
- &byteCount);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- byteCount);
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ ScrapFlavorType flavorType;
+ Size byteCount;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetOSType, &flavorType))
+ return NULL;
+ _err = GetScrapFlavorSize(_self->ob_itself,
+ flavorType,
+ &byteCount);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ byteCount);
+ return _res;
}
static PyObject *ScrapObj_GetScrapFlavorData(ScrapObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- ScrapFlavorType flavorType;
- Size byteCount;
-
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetOSType, &flavorType))
- return NULL;
- _err = GetScrapFlavorSize(_self->ob_itself,
- flavorType,
- &byteCount);
- if (_err != noErr) return PyMac_Error(_err);
- _res = PyString_FromStringAndSize(NULL, (int)byteCount);
- if ( _res == NULL ) return NULL;
- _err = GetScrapFlavorData(_self->ob_itself,
- flavorType,
- &byteCount,
- PyString_AS_STRING(_res));
- if (_err != noErr) {
- Py_XDECREF(_res);
- return PyMac_Error(_err);
- }
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ ScrapFlavorType flavorType;
+ Size byteCount;
+
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetOSType, &flavorType))
+ return NULL;
+ _err = GetScrapFlavorSize(_self->ob_itself,
+ flavorType,
+ &byteCount);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = PyString_FromStringAndSize(NULL, (int)byteCount);
+ if ( _res == NULL ) return NULL;
+ _err = GetScrapFlavorData(_self->ob_itself,
+ flavorType,
+ &byteCount,
+ PyString_AS_STRING(_res));
+ if (_err != noErr) {
+ Py_XDECREF(_res);
+ return PyMac_Error(_err);
+ }
+ return _res;
}
static PyObject *ScrapObj_PutScrapFlavor(ScrapObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- ScrapFlavorType flavorType;
- ScrapFlavorFlags flavorFlags;
- char *flavorData__in__;
- int flavorData__in_len__;
- if (!PyArg_ParseTuple(_args, "O&Ks#",
- PyMac_GetOSType, &flavorType,
- &flavorFlags,
- &flavorData__in__, &flavorData__in_len__))
- return NULL;
- _err = PutScrapFlavor(_self->ob_itself,
- flavorType,
- flavorFlags,
- (Size)flavorData__in_len__,
- flavorData__in__);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ ScrapFlavorType flavorType;
+ ScrapFlavorFlags flavorFlags;
+ char *flavorData__in__;
+ int flavorData__in_len__;
+ if (!PyArg_ParseTuple(_args, "O&Ks#",
+ PyMac_GetOSType, &flavorType,
+ &flavorFlags,
+ &flavorData__in__, &flavorData__in_len__))
+ return NULL;
+ _err = PutScrapFlavor(_self->ob_itself,
+ flavorType,
+ flavorFlags,
+ (Size)flavorData__in_len__,
+ flavorData__in__);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *ScrapObj_GetScrapFlavorCount(ScrapObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- UInt32 infoCount;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetScrapFlavorCount(_self->ob_itself,
- &infoCount);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- infoCount);
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ UInt32 infoCount;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetScrapFlavorCount(_self->ob_itself,
+ &infoCount);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ infoCount);
+ return _res;
}
static PyObject *ScrapObj_GetScrapFlavorInfoList(ScrapObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- PyObject *item;
- OSStatus _err;
- UInt32 infoCount;
- ScrapFlavorInfo *infolist = NULL;
- int i;
-
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetScrapFlavorCount(_self->ob_itself,
- &infoCount);
- if (_err != noErr) return PyMac_Error(_err);
- if (infoCount == 0) return Py_BuildValue("[]");
-
- if ((infolist = (ScrapFlavorInfo *)malloc(infoCount*sizeof(ScrapFlavorInfo))) == NULL )
- return PyErr_NoMemory();
-
- _err = GetScrapFlavorInfoList(_self->ob_itself, &infoCount, infolist);
- if (_err != noErr) {
- free(infolist);
- return NULL;
- }
- if ((_res = PyList_New(infoCount)) == NULL ) {
- free(infolist);
- return NULL;
- }
- for(i=0; i<infoCount; i++) {
- item = Py_BuildValue("O&l", PyMac_BuildOSType, infolist[i].flavorType,
- infolist[i].flavorFlags);
- if ( !item || PyList_SetItem(_res, i, item) < 0 ) {
- Py_DECREF(_res);
- free(infolist);
- return NULL;
- }
- }
- free(infolist);
- return _res;
+ PyObject *_res = NULL;
+ PyObject *item;
+ OSStatus _err;
+ UInt32 infoCount;
+ ScrapFlavorInfo *infolist = NULL;
+ int i;
+
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetScrapFlavorCount(_self->ob_itself,
+ &infoCount);
+ if (_err != noErr) return PyMac_Error(_err);
+ if (infoCount == 0) return Py_BuildValue("[]");
+
+ if ((infolist = (ScrapFlavorInfo *)malloc(infoCount*sizeof(ScrapFlavorInfo))) == NULL )
+ return PyErr_NoMemory();
+
+ _err = GetScrapFlavorInfoList(_self->ob_itself, &infoCount, infolist);
+ if (_err != noErr) {
+ free(infolist);
+ return NULL;
+ }
+ if ((_res = PyList_New(infoCount)) == NULL ) {
+ free(infolist);
+ return NULL;
+ }
+ for(i=0; i<infoCount; i++) {
+ item = Py_BuildValue("O&l", PyMac_BuildOSType, infolist[i].flavorType,
+ infolist[i].flavorFlags);
+ if ( !item || PyList_SetItem(_res, i, item) < 0 ) {
+ Py_DECREF(_res);
+ free(infolist);
+ return NULL;
+ }
+ }
+ free(infolist);
+ return _res;
}
static PyMethodDef ScrapObj_methods[] = {
- {"GetScrapFlavorFlags", (PyCFunction)ScrapObj_GetScrapFlavorFlags, 1,
- PyDoc_STR("(ScrapFlavorType flavorType) -> (ScrapFlavorFlags flavorFlags)")},
- {"GetScrapFlavorSize", (PyCFunction)ScrapObj_GetScrapFlavorSize, 1,
- PyDoc_STR("(ScrapFlavorType flavorType) -> (Size byteCount)")},
- {"GetScrapFlavorData", (PyCFunction)ScrapObj_GetScrapFlavorData, 1,
- PyDoc_STR("(ScrapFlavorType flavorType, Buffer destination) -> (Size byteCount)")},
- {"PutScrapFlavor", (PyCFunction)ScrapObj_PutScrapFlavor, 1,
- PyDoc_STR("(ScrapFlavorType flavorType, ScrapFlavorFlags flavorFlags, Size flavorSize, Buffer flavorData) -> None")},
- {"GetScrapFlavorCount", (PyCFunction)ScrapObj_GetScrapFlavorCount, 1,
- PyDoc_STR("() -> (UInt32 infoCount)")},
- {"GetScrapFlavorInfoList", (PyCFunction)ScrapObj_GetScrapFlavorInfoList, 1,
- PyDoc_STR("() -> ([(ScrapFlavorType, ScrapFlavorInfo), ...])")},
- {NULL, NULL, 0}
+ {"GetScrapFlavorFlags", (PyCFunction)ScrapObj_GetScrapFlavorFlags, 1,
+ PyDoc_STR("(ScrapFlavorType flavorType) -> (ScrapFlavorFlags flavorFlags)")},
+ {"GetScrapFlavorSize", (PyCFunction)ScrapObj_GetScrapFlavorSize, 1,
+ PyDoc_STR("(ScrapFlavorType flavorType) -> (Size byteCount)")},
+ {"GetScrapFlavorData", (PyCFunction)ScrapObj_GetScrapFlavorData, 1,
+ PyDoc_STR("(ScrapFlavorType flavorType, Buffer destination) -> (Size byteCount)")},
+ {"PutScrapFlavor", (PyCFunction)ScrapObj_PutScrapFlavor, 1,
+ PyDoc_STR("(ScrapFlavorType flavorType, ScrapFlavorFlags flavorFlags, Size flavorSize, Buffer flavorData) -> None")},
+ {"GetScrapFlavorCount", (PyCFunction)ScrapObj_GetScrapFlavorCount, 1,
+ PyDoc_STR("() -> (UInt32 infoCount)")},
+ {"GetScrapFlavorInfoList", (PyCFunction)ScrapObj_GetScrapFlavorInfoList, 1,
+ PyDoc_STR("() -> ([(ScrapFlavorType, ScrapFlavorInfo), ...])")},
+ {NULL, NULL, 0}
};
PyMethodChain ScrapObj_chain = { ScrapObj_methods, NULL };
static PyObject *ScrapObj_getattr(ScrapObject *self, char *name)
{
- return Py_FindMethodInChain(&ScrapObj_chain, (PyObject *)self, name);
+ return Py_FindMethodInChain(&ScrapObj_chain, (PyObject *)self, name);
}
#define ScrapObj_setattr NULL
@@ -231,107 +231,107 @@ static PyObject *ScrapObj_getattr(ScrapObject *self, char *name)
#define ScrapObj_hash NULL
PyTypeObject Scrap_Type = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
- "_Scrap.Scrap", /*tp_name*/
- sizeof(ScrapObject), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- /* methods */
- (destructor) ScrapObj_dealloc, /*tp_dealloc*/
- 0, /*tp_print*/
- (getattrfunc) ScrapObj_getattr, /*tp_getattr*/
- (setattrfunc) ScrapObj_setattr, /*tp_setattr*/
- (cmpfunc) ScrapObj_compare, /*tp_compare*/
- (reprfunc) ScrapObj_repr, /*tp_repr*/
- (PyNumberMethods *)0, /* tp_as_number */
- (PySequenceMethods *)0, /* tp_as_sequence */
- (PyMappingMethods *)0, /* tp_as_mapping */
- (hashfunc) ScrapObj_hash, /*tp_hash*/
+ PyObject_HEAD_INIT(NULL)
+ 0, /*ob_size*/
+ "_Scrap.Scrap", /*tp_name*/
+ sizeof(ScrapObject), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ /* methods */
+ (destructor) ScrapObj_dealloc, /*tp_dealloc*/
+ 0, /*tp_print*/
+ (getattrfunc) ScrapObj_getattr, /*tp_getattr*/
+ (setattrfunc) ScrapObj_setattr, /*tp_setattr*/
+ (cmpfunc) ScrapObj_compare, /*tp_compare*/
+ (reprfunc) ScrapObj_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) ScrapObj_hash, /*tp_hash*/
};
/* --------------------- End object type Scrap ---------------------- */
static PyObject *Scrap_LoadScrap(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = LoadScrap();
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = LoadScrap();
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Scrap_UnloadScrap(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = UnloadScrap();
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = UnloadScrap();
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Scrap_GetCurrentScrap(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- ScrapRef scrap;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetCurrentScrap(&scrap);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- ScrapObj_New, scrap);
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ ScrapRef scrap;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetCurrentScrap(&scrap);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ ScrapObj_New, scrap);
+ return _res;
}
static PyObject *Scrap_ClearCurrentScrap(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = ClearCurrentScrap();
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = ClearCurrentScrap();
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Scrap_CallInScrapPromises(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = CallInScrapPromises();
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = CallInScrapPromises();
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
#endif /* __LP64__ */
static PyMethodDef Scrap_methods[] = {
#ifndef __LP64__
- {"LoadScrap", (PyCFunction)Scrap_LoadScrap, 1,
- PyDoc_STR("() -> None")},
- {"UnloadScrap", (PyCFunction)Scrap_UnloadScrap, 1,
- PyDoc_STR("() -> None")},
- {"GetCurrentScrap", (PyCFunction)Scrap_GetCurrentScrap, 1,
- PyDoc_STR("() -> (ScrapRef scrap)")},
- {"ClearCurrentScrap", (PyCFunction)Scrap_ClearCurrentScrap, 1,
- PyDoc_STR("() -> None")},
- {"CallInScrapPromises", (PyCFunction)Scrap_CallInScrapPromises, 1,
- PyDoc_STR("() -> None")},
+ {"LoadScrap", (PyCFunction)Scrap_LoadScrap, 1,
+ PyDoc_STR("() -> None")},
+ {"UnloadScrap", (PyCFunction)Scrap_UnloadScrap, 1,
+ PyDoc_STR("() -> None")},
+ {"GetCurrentScrap", (PyCFunction)Scrap_GetCurrentScrap, 1,
+ PyDoc_STR("() -> (ScrapRef scrap)")},
+ {"ClearCurrentScrap", (PyCFunction)Scrap_ClearCurrentScrap, 1,
+ PyDoc_STR("() -> None")},
+ {"CallInScrapPromises", (PyCFunction)Scrap_CallInScrapPromises, 1,
+ PyDoc_STR("() -> None")},
#endif /* __LP64__ */
- {NULL, NULL, 0}
+ {NULL, NULL, 0}
};
@@ -339,25 +339,25 @@ static PyMethodDef Scrap_methods[] = {
void init_Scrap(void)
{
- PyObject *m;
+ PyObject *m;
#ifndef __LP64__
- PyObject *d;
+ PyObject *d;
#endif /* __LP64__ */
- m = Py_InitModule("_Scrap", Scrap_methods);
+ m = Py_InitModule("_Scrap", Scrap_methods);
#ifndef __LP64__
- d = PyModule_GetDict(m);
- Scrap_Error = PyMac_GetOSErrException();
- if (Scrap_Error == NULL ||
- PyDict_SetItemString(d, "Error", Scrap_Error) != 0)
- return;
- Scrap_Type.ob_type = &PyType_Type;
- Py_INCREF(&Scrap_Type);
- if (PyDict_SetItemString(d, "ScrapType", (PyObject *)&Scrap_Type) != 0)
- Py_FatalError("can't initialize ScrapType");
+ d = PyModule_GetDict(m);
+ Scrap_Error = PyMac_GetOSErrException();
+ if (Scrap_Error == NULL ||
+ PyDict_SetItemString(d, "Error", Scrap_Error) != 0)
+ return;
+ Scrap_Type.ob_type = &PyType_Type;
+ Py_INCREF(&Scrap_Type);
+ if (PyDict_SetItemString(d, "ScrapType", (PyObject *)&Scrap_Type) != 0)
+ Py_FatalError("can't initialize ScrapType");
#endif /* __LP64__ */
}
diff --git a/Mac/Modules/snd/_Sndihooks.c b/Mac/Modules/snd/_Sndihooks.c
index 74cad9b..254fc0c 100644
--- a/Mac/Modules/snd/_Sndihooks.c
+++ b/Mac/Modules/snd/_Sndihooks.c
@@ -35,13 +35,13 @@ PERFORMANCE OF THIS SOFTWARE.
#pragma options align=mac68k
struct SampleRateAvailable_arg {
- short numrates;
- Handle rates;
+ short numrates;
+ Handle rates;
};
struct SampleSizeAvailable_arg {
- short numsizes;
- Handle sizes;
+ short numsizes;
+ Handle sizes;
};
#pragma options align=reset
@@ -53,28 +53,28 @@ static PyObject *ErrorObject;
static int
PyMac_GetUFixed(PyObject *v, Fixed *f)
{
- double d;
- unsigned long uns;
-
- if( !PyArg_Parse(v, "d", &d))
- return 0;
- uns = (unsigned long)(d * 0x10000);
- *f = (Fixed)uns;
- return 1;
+ double d;
+ unsigned long uns;
+
+ if( !PyArg_Parse(v, "d", &d))
+ return 0;
+ uns = (unsigned long)(d * 0x10000);
+ *f = (Fixed)uns;
+ return 1;
}
/* Convert a Point to a Python object */
static PyObject *
PyMac_BuildUFixed(Fixed f)
{
- double d;
- unsigned long funs;
-
- funs = (unsigned long)f;
-
- d = funs;
- d = d / 0x10000;
- return Py_BuildValue("d", d);
+ double d;
+ unsigned long funs;
+
+ funs = (unsigned long)f;
+
+ d = funs;
+ d = d / 0x10000;
+ return Py_BuildValue("d", d);
}
@@ -86,19 +86,19 @@ static char sndih_getChannelAvailable__doc__[] =
static PyObject *
sndih_getChannelAvailable(self, args)
- PyObject *self; /* Not used */
- PyObject *args;
+ PyObject *self; /* Not used */
+ PyObject *args;
{
- long inRefNum;
- short nchannel;
- OSErr err;
-
- if (!PyArg_ParseTuple(args, "l", &inRefNum))
- return NULL;
-
- if( (err=SPBGetDeviceInfo(inRefNum, siChannelAvailable, (Ptr)&nchannel)) != noErr )
- return PyMac_Error(err);
- return Py_BuildValue("h", nchannel);
+ long inRefNum;
+ short nchannel;
+ OSErr err;
+
+ if (!PyArg_ParseTuple(args, "l", &inRefNum))
+ return NULL;
+
+ if( (err=SPBGetDeviceInfo(inRefNum, siChannelAvailable, (Ptr)&nchannel)) != noErr )
+ return PyMac_Error(err);
+ return Py_BuildValue("h", nchannel);
}
static char sndih_getNumberChannels__doc__[] =
@@ -107,19 +107,19 @@ static char sndih_getNumberChannels__doc__[] =
static PyObject *
sndih_getNumberChannels(self, args)
- PyObject *self; /* Not used */
- PyObject *args;
+ PyObject *self; /* Not used */
+ PyObject *args;
{
- long inRefNum;
- short nchannel;
- OSErr err;
-
- if (!PyArg_ParseTuple(args, "l", &inRefNum))
- return NULL;
-
- if( (err=SPBGetDeviceInfo(inRefNum, siNumberChannels, (Ptr)&nchannel)) != noErr )
- return PyMac_Error(err);
- return Py_BuildValue("h", nchannel);
+ long inRefNum;
+ short nchannel;
+ OSErr err;
+
+ if (!PyArg_ParseTuple(args, "l", &inRefNum))
+ return NULL;
+
+ if( (err=SPBGetDeviceInfo(inRefNum, siNumberChannels, (Ptr)&nchannel)) != noErr )
+ return PyMac_Error(err);
+ return Py_BuildValue("h", nchannel);
}
static char sndih_setNumberChannels__doc__[] =
@@ -128,20 +128,20 @@ static char sndih_setNumberChannels__doc__[] =
static PyObject *
sndih_setNumberChannels(self, args)
- PyObject *self; /* Not used */
- PyObject *args;
+ PyObject *self; /* Not used */
+ PyObject *args;
{
- long inRefNum;
- short nchannel;
- OSErr err;
-
- if (!PyArg_ParseTuple(args, "lh", &inRefNum, &nchannel))
- return NULL;
-
- if( (err=SPBSetDeviceInfo(inRefNum, siNumberChannels, (Ptr)&nchannel)) != noErr )
- return PyMac_Error(err);
- Py_INCREF(Py_None);
- return Py_None;
+ long inRefNum;
+ short nchannel;
+ OSErr err;
+
+ if (!PyArg_ParseTuple(args, "lh", &inRefNum, &nchannel))
+ return NULL;
+
+ if( (err=SPBSetDeviceInfo(inRefNum, siNumberChannels, (Ptr)&nchannel)) != noErr )
+ return PyMac_Error(err);
+ Py_INCREF(Py_None);
+ return Py_None;
}
static char sndih_getContinuous__doc__[] =
@@ -150,19 +150,19 @@ static char sndih_getContinuous__doc__[] =
static PyObject *
sndih_getContinuous(self, args)
- PyObject *self; /* Not used */
- PyObject *args;
+ PyObject *self; /* Not used */
+ PyObject *args;
{
- long inRefNum;
- short onoff;
- OSErr err;
-
- if (!PyArg_ParseTuple(args, "l", &inRefNum))
- return NULL;
-
- if( (err=SPBGetDeviceInfo(inRefNum, siContinuous, (Ptr)&onoff)) != noErr )
- return PyMac_Error(err);
- return Py_BuildValue("h", onoff);
+ long inRefNum;
+ short onoff;
+ OSErr err;
+
+ if (!PyArg_ParseTuple(args, "l", &inRefNum))
+ return NULL;
+
+ if( (err=SPBGetDeviceInfo(inRefNum, siContinuous, (Ptr)&onoff)) != noErr )
+ return PyMac_Error(err);
+ return Py_BuildValue("h", onoff);
}
static char sndih_setContinuous__doc__[] =
@@ -171,20 +171,20 @@ static char sndih_setContinuous__doc__[] =
static PyObject *
sndih_setContinuous(self, args)
- PyObject *self; /* Not used */
- PyObject *args;
+ PyObject *self; /* Not used */
+ PyObject *args;
{
- long inRefNum;
- short onoff;
- OSErr err;
-
- if (!PyArg_ParseTuple(args, "lh", &inRefNum, &onoff))
- return NULL;
-
- if( (err=SPBSetDeviceInfo(inRefNum, siContinuous, (Ptr)&onoff)) != noErr )
- return PyMac_Error(err);
- Py_INCREF(Py_None);
- return Py_None;
+ long inRefNum;
+ short onoff;
+ OSErr err;
+
+ if (!PyArg_ParseTuple(args, "lh", &inRefNum, &onoff))
+ return NULL;
+
+ if( (err=SPBSetDeviceInfo(inRefNum, siContinuous, (Ptr)&onoff)) != noErr )
+ return PyMac_Error(err);
+ Py_INCREF(Py_None);
+ return Py_None;
}
static char sndih_getInputSourceNames__doc__[] =
@@ -193,19 +193,19 @@ static char sndih_getInputSourceNames__doc__[] =
static PyObject *
sndih_getInputSourceNames(self, args)
- PyObject *self; /* Not used */
- PyObject *args;
+ PyObject *self; /* Not used */
+ PyObject *args;
{
- long inRefNum;
- Handle names;
- OSErr err;
-
- if (!PyArg_ParseTuple(args, "l", &inRefNum))
- return NULL;
-
- if( (err=SPBGetDeviceInfo(inRefNum, siInputSourceNames, (Ptr)&names)) != noErr )
- return PyMac_Error(err);
- return Py_BuildValue("O&", ResObj_New, names);
+ long inRefNum;
+ Handle names;
+ OSErr err;
+
+ if (!PyArg_ParseTuple(args, "l", &inRefNum))
+ return NULL;
+
+ if( (err=SPBGetDeviceInfo(inRefNum, siInputSourceNames, (Ptr)&names)) != noErr )
+ return PyMac_Error(err);
+ return Py_BuildValue("O&", ResObj_New, names);
}
static char sndih_getInputSource__doc__[] =
@@ -214,19 +214,19 @@ static char sndih_getInputSource__doc__[] =
static PyObject *
sndih_getInputSource(self, args)
- PyObject *self; /* Not used */
- PyObject *args;
+ PyObject *self; /* Not used */
+ PyObject *args;
{
- long inRefNum;
- short source;
- OSErr err;
-
- if (!PyArg_ParseTuple(args, "l", &inRefNum))
- return NULL;
-
- if( (err=SPBGetDeviceInfo(inRefNum, siInputSource, (Ptr)&source)) != noErr )
- return PyMac_Error(err);
- return Py_BuildValue("h", source);
+ long inRefNum;
+ short source;
+ OSErr err;
+
+ if (!PyArg_ParseTuple(args, "l", &inRefNum))
+ return NULL;
+
+ if( (err=SPBGetDeviceInfo(inRefNum, siInputSource, (Ptr)&source)) != noErr )
+ return PyMac_Error(err);
+ return Py_BuildValue("h", source);
}
static char sndih_setInputSource__doc__[] =
@@ -235,20 +235,20 @@ static char sndih_setInputSource__doc__[] =
static PyObject *
sndih_setInputSource(self, args)
- PyObject *self; /* Not used */
- PyObject *args;
+ PyObject *self; /* Not used */
+ PyObject *args;
{
- long inRefNum;
- short source;
- OSErr err;
-
- if (!PyArg_ParseTuple(args, "lh", &inRefNum, &source))
- return NULL;
-
- if( (err=SPBSetDeviceInfo(inRefNum, siInputSource, (Ptr)&source)) != noErr )
- return PyMac_Error(err);
- Py_INCREF(Py_None);
- return Py_None;
+ long inRefNum;
+ short source;
+ OSErr err;
+
+ if (!PyArg_ParseTuple(args, "lh", &inRefNum, &source))
+ return NULL;
+
+ if( (err=SPBSetDeviceInfo(inRefNum, siInputSource, (Ptr)&source)) != noErr )
+ return PyMac_Error(err);
+ Py_INCREF(Py_None);
+ return Py_None;
}
static char sndih_getPlayThruOnOff__doc__[] =
@@ -257,19 +257,19 @@ static char sndih_getPlayThruOnOff__doc__[] =
static PyObject *
sndih_getPlayThruOnOff(self, args)
- PyObject *self; /* Not used */
- PyObject *args;
+ PyObject *self; /* Not used */
+ PyObject *args;
{
- long inRefNum;
- short onoff;
- OSErr err;
-
- if (!PyArg_ParseTuple(args, "l", &inRefNum))
- return NULL;
-
- if( (err=SPBGetDeviceInfo(inRefNum, siPlayThruOnOff, (Ptr)&onoff)) != noErr )
- return PyMac_Error(err);
- return Py_BuildValue("h", onoff);
+ long inRefNum;
+ short onoff;
+ OSErr err;
+
+ if (!PyArg_ParseTuple(args, "l", &inRefNum))
+ return NULL;
+
+ if( (err=SPBGetDeviceInfo(inRefNum, siPlayThruOnOff, (Ptr)&onoff)) != noErr )
+ return PyMac_Error(err);
+ return Py_BuildValue("h", onoff);
}
static char sndih_setPlayThruOnOff__doc__[] =
@@ -278,20 +278,20 @@ static char sndih_setPlayThruOnOff__doc__[] =
static PyObject *
sndih_setPlayThruOnOff(self, args)
- PyObject *self; /* Not used */
- PyObject *args;
+ PyObject *self; /* Not used */
+ PyObject *args;
{
- long inRefNum;
- short onoff;
- OSErr err;
-
- if (!PyArg_ParseTuple(args, "lh", &inRefNum, &onoff))
- return NULL;
-
- if( (err=SPBSetDeviceInfo(inRefNum, siPlayThruOnOff, (Ptr)&onoff)) != noErr )
- return PyMac_Error(err);
- Py_INCREF(Py_None);
- return Py_None;
+ long inRefNum;
+ short onoff;
+ OSErr err;
+
+ if (!PyArg_ParseTuple(args, "lh", &inRefNum, &onoff))
+ return NULL;
+
+ if( (err=SPBSetDeviceInfo(inRefNum, siPlayThruOnOff, (Ptr)&onoff)) != noErr )
+ return PyMac_Error(err);
+ Py_INCREF(Py_None);
+ return Py_None;
}
static char sndih_getSampleRate__doc__[] =
@@ -300,19 +300,19 @@ static char sndih_getSampleRate__doc__[] =
static PyObject *
sndih_getSampleRate(self, args)
- PyObject *self; /* Not used */
- PyObject *args;
+ PyObject *self; /* Not used */
+ PyObject *args;
{
- long inRefNum;
- Fixed sample_rate;
- OSErr err;
-
- if (!PyArg_ParseTuple(args, "l", &inRefNum))
- return NULL;
-
- if( (err=SPBGetDeviceInfo(inRefNum, siSampleRate, (Ptr)&sample_rate)) != noErr )
- return PyMac_Error(err);
- return Py_BuildValue("O&", PyMac_BuildUFixed, sample_rate);
+ long inRefNum;
+ Fixed sample_rate;
+ OSErr err;
+
+ if (!PyArg_ParseTuple(args, "l", &inRefNum))
+ return NULL;
+
+ if( (err=SPBGetDeviceInfo(inRefNum, siSampleRate, (Ptr)&sample_rate)) != noErr )
+ return PyMac_Error(err);
+ return Py_BuildValue("O&", PyMac_BuildUFixed, sample_rate);
}
static char sndih_setSampleRate__doc__[] =
@@ -321,20 +321,20 @@ static char sndih_setSampleRate__doc__[] =
static PyObject *
sndih_setSampleRate(self, args)
- PyObject *self; /* Not used */
- PyObject *args;
+ PyObject *self; /* Not used */
+ PyObject *args;
{
- long inRefNum;
- Fixed sample_rate;
- OSErr err;
-
- if (!PyArg_ParseTuple(args, "lO&", &inRefNum, PyMac_GetUFixed, &sample_rate))
- return NULL;
-
- if( (err=SPBSetDeviceInfo(inRefNum, siSampleRate, (Ptr)&sample_rate)) != noErr )
- return PyMac_Error(err);
- Py_INCREF(Py_None);
- return Py_None;
+ long inRefNum;
+ Fixed sample_rate;
+ OSErr err;
+
+ if (!PyArg_ParseTuple(args, "lO&", &inRefNum, PyMac_GetUFixed, &sample_rate))
+ return NULL;
+
+ if( (err=SPBSetDeviceInfo(inRefNum, siSampleRate, (Ptr)&sample_rate)) != noErr )
+ return PyMac_Error(err);
+ Py_INCREF(Py_None);
+ return Py_None;
}
static char sndih_getSampleSize__doc__[] =
@@ -343,19 +343,19 @@ static char sndih_getSampleSize__doc__[] =
static PyObject *
sndih_getSampleSize(self, args)
- PyObject *self; /* Not used */
- PyObject *args;
+ PyObject *self; /* Not used */
+ PyObject *args;
{
- long inRefNum;
- short bits;
- OSErr err;
-
- if (!PyArg_ParseTuple(args, "l", &inRefNum))
- return NULL;
-
- if( (err=SPBGetDeviceInfo(inRefNum, siSampleSize, (Ptr)&bits)) != noErr )
- return PyMac_Error(err);
- return Py_BuildValue("h", bits);
+ long inRefNum;
+ short bits;
+ OSErr err;
+
+ if (!PyArg_ParseTuple(args, "l", &inRefNum))
+ return NULL;
+
+ if( (err=SPBGetDeviceInfo(inRefNum, siSampleSize, (Ptr)&bits)) != noErr )
+ return PyMac_Error(err);
+ return Py_BuildValue("h", bits);
}
static char sndih_setSampleSize__doc__[] =
@@ -364,20 +364,20 @@ static char sndih_setSampleSize__doc__[] =
static PyObject *
sndih_setSampleSize(self, args)
- PyObject *self; /* Not used */
- PyObject *args;
+ PyObject *self; /* Not used */
+ PyObject *args;
{
- long inRefNum;
- short size;
- OSErr err;
-
- if (!PyArg_ParseTuple(args, "lh", &inRefNum, &size))
- return NULL;
-
- if( (err=SPBSetDeviceInfo(inRefNum, siSampleSize, (Ptr)&size)) != noErr )
- return PyMac_Error(err);
- Py_INCREF(Py_None);
- return Py_None;
+ long inRefNum;
+ short size;
+ OSErr err;
+
+ if (!PyArg_ParseTuple(args, "lh", &inRefNum, &size))
+ return NULL;
+
+ if( (err=SPBSetDeviceInfo(inRefNum, siSampleSize, (Ptr)&size)) != noErr )
+ return PyMac_Error(err);
+ Py_INCREF(Py_None);
+ return Py_None;
}
static char sndih_getSampleSizeAvailable__doc__[] =
@@ -386,31 +386,31 @@ static char sndih_getSampleSizeAvailable__doc__[] =
static PyObject *
sndih_getSampleSizeAvailable(self, args)
- PyObject *self; /* Not used */
- PyObject *args;
+ PyObject *self; /* Not used */
+ PyObject *args;
{
- long inRefNum;
- struct SampleSizeAvailable_arg arg;
- OSErr err;
- PyObject *rsizes;
- short *fsizes;
- int i;
-
- arg.sizes = NULL;
- rsizes = NULL;
- if (!PyArg_ParseTuple(args, "l", &inRefNum))
- return NULL;
-
- if( (err=SPBGetDeviceInfo(inRefNum, siSampleSizeAvailable, (Ptr)&arg)) != noErr ) {
- return PyMac_Error(err);
- }
- fsizes = (short *)*(arg.sizes);
- /* Handle contains a list of rates */
- if( (rsizes = PyTuple_New(arg.numsizes)) == NULL)
- return NULL;
- for( i=0; i<arg.numsizes; i++ )
- PyTuple_SetItem(rsizes, i, PyInt_FromLong((long)fsizes[i]));
- return rsizes;
+ long inRefNum;
+ struct SampleSizeAvailable_arg arg;
+ OSErr err;
+ PyObject *rsizes;
+ short *fsizes;
+ int i;
+
+ arg.sizes = NULL;
+ rsizes = NULL;
+ if (!PyArg_ParseTuple(args, "l", &inRefNum))
+ return NULL;
+
+ if( (err=SPBGetDeviceInfo(inRefNum, siSampleSizeAvailable, (Ptr)&arg)) != noErr ) {
+ return PyMac_Error(err);
+ }
+ fsizes = (short *)*(arg.sizes);
+ /* Handle contains a list of rates */
+ if( (rsizes = PyTuple_New(arg.numsizes)) == NULL)
+ return NULL;
+ for( i=0; i<arg.numsizes; i++ )
+ PyTuple_SetItem(rsizes, i, PyInt_FromLong((long)fsizes[i]));
+ return rsizes;
}
static char sndih_getSampleRateAvailable__doc__[] =
@@ -419,94 +419,94 @@ static char sndih_getSampleRateAvailable__doc__[] =
static PyObject *
sndih_getSampleRateAvailable(self, args)
- PyObject *self; /* Not used */
- PyObject *args;
+ PyObject *self; /* Not used */
+ PyObject *args;
{
- long inRefNum;
- struct SampleRateAvailable_arg arg;
- OSErr err;
- PyObject *rrates, *obj;
- Fixed *frates;
- int i;
-
- arg.rates = NULL;
- rrates = NULL;
- if (!PyArg_ParseTuple(args, "l", &inRefNum))
- return NULL;
-
- if( (err=SPBGetDeviceInfo(inRefNum, siSampleRateAvailable, (Ptr)&arg)) != noErr ) {
- return PyMac_Error(err);
- }
- frates = (Fixed *)*(arg.rates);
- if( arg.numrates == 0 ) {
- /* The handle contains upper and lowerbound */
- rrates = Py_BuildValue("O&O&", frates[0], frates[1]);
- if (rrates == NULL) return NULL;
- } else {
- /* Handle contains a list of rates */
- if( (rrates = PyTuple_New(arg.numrates)) == NULL)
- return NULL;
- for( i=0; i<arg.numrates; i++ ) {
- if( (obj = Py_BuildValue("O&", PyMac_BuildUFixed, frates[i]))==NULL)
- goto out;
- PyTuple_SetItem(rrates, i, obj);
- }
- }
- return Py_BuildValue("hO", arg.numrates, rrates);
+ long inRefNum;
+ struct SampleRateAvailable_arg arg;
+ OSErr err;
+ PyObject *rrates, *obj;
+ Fixed *frates;
+ int i;
+
+ arg.rates = NULL;
+ rrates = NULL;
+ if (!PyArg_ParseTuple(args, "l", &inRefNum))
+ return NULL;
+
+ if( (err=SPBGetDeviceInfo(inRefNum, siSampleRateAvailable, (Ptr)&arg)) != noErr ) {
+ return PyMac_Error(err);
+ }
+ frates = (Fixed *)*(arg.rates);
+ if( arg.numrates == 0 ) {
+ /* The handle contains upper and lowerbound */
+ rrates = Py_BuildValue("O&O&", frates[0], frates[1]);
+ if (rrates == NULL) return NULL;
+ } else {
+ /* Handle contains a list of rates */
+ if( (rrates = PyTuple_New(arg.numrates)) == NULL)
+ return NULL;
+ for( i=0; i<arg.numrates; i++ ) {
+ if( (obj = Py_BuildValue("O&", PyMac_BuildUFixed, frates[i]))==NULL)
+ goto out;
+ PyTuple_SetItem(rrates, i, obj);
+ }
+ }
+ return Py_BuildValue("hO", arg.numrates, rrates);
out:
- Py_XDECREF(rrates);
- return NULL;
+ Py_XDECREF(rrates);
+ return NULL;
}
/* List of methods defined in the module */
static struct PyMethodDef sndih_methods[] = {
- {"getChannelAvailable", (PyCFunction)sndih_getChannelAvailable, METH_VARARGS, sndih_getChannelAvailable__doc__},
- {"getNumberChannels", (PyCFunction)sndih_getNumberChannels, METH_VARARGS, sndih_getNumberChannels__doc__},
- {"setNumberChannels", (PyCFunction)sndih_setNumberChannels, METH_VARARGS, sndih_setNumberChannels__doc__},
- {"getContinuous", (PyCFunction)sndih_getContinuous, METH_VARARGS, sndih_getContinuous__doc__},
- {"setContinuous", (PyCFunction)sndih_setContinuous, METH_VARARGS, sndih_setContinuous__doc__},
- {"getInputSourceNames", (PyCFunction)sndih_getInputSourceNames, METH_VARARGS, sndih_getInputSourceNames__doc__},
- {"getInputSource", (PyCFunction)sndih_getInputSource, METH_VARARGS, sndih_getInputSource__doc__},
- {"setInputSource", (PyCFunction)sndih_setInputSource, METH_VARARGS, sndih_setInputSource__doc__},
- {"getPlayThruOnOff", (PyCFunction)sndih_getPlayThruOnOff, METH_VARARGS, sndih_getPlayThruOnOff__doc__},
- {"setPlayThruOnOff", (PyCFunction)sndih_setPlayThruOnOff, METH_VARARGS, sndih_setPlayThruOnOff__doc__},
- {"getSampleRate", (PyCFunction)sndih_getSampleRate, METH_VARARGS, sndih_getSampleRate__doc__},
- {"setSampleRate", (PyCFunction)sndih_setSampleRate, METH_VARARGS, sndih_setSampleRate__doc__},
- {"getSampleSize", (PyCFunction)sndih_getSampleSize, METH_VARARGS, sndih_getSampleSize__doc__},
- {"setSampleSize", (PyCFunction)sndih_setSampleSize, METH_VARARGS, sndih_setSampleSize__doc__},
- {"getSampleSizeAvailable", (PyCFunction)sndih_getSampleSizeAvailable, METH_VARARGS, sndih_getSampleSizeAvailable__doc__},
- {"getSampleRateAvailable", (PyCFunction)sndih_getSampleRateAvailable, METH_VARARGS, sndih_getSampleRateAvailable__doc__},
-
- {NULL, (PyCFunction)NULL, 0, NULL} /* sentinel */
+ {"getChannelAvailable", (PyCFunction)sndih_getChannelAvailable, METH_VARARGS, sndih_getChannelAvailable__doc__},
+ {"getNumberChannels", (PyCFunction)sndih_getNumberChannels, METH_VARARGS, sndih_getNumberChannels__doc__},
+ {"setNumberChannels", (PyCFunction)sndih_setNumberChannels, METH_VARARGS, sndih_setNumberChannels__doc__},
+ {"getContinuous", (PyCFunction)sndih_getContinuous, METH_VARARGS, sndih_getContinuous__doc__},
+ {"setContinuous", (PyCFunction)sndih_setContinuous, METH_VARARGS, sndih_setContinuous__doc__},
+ {"getInputSourceNames", (PyCFunction)sndih_getInputSourceNames, METH_VARARGS, sndih_getInputSourceNames__doc__},
+ {"getInputSource", (PyCFunction)sndih_getInputSource, METH_VARARGS, sndih_getInputSource__doc__},
+ {"setInputSource", (PyCFunction)sndih_setInputSource, METH_VARARGS, sndih_setInputSource__doc__},
+ {"getPlayThruOnOff", (PyCFunction)sndih_getPlayThruOnOff, METH_VARARGS, sndih_getPlayThruOnOff__doc__},
+ {"setPlayThruOnOff", (PyCFunction)sndih_setPlayThruOnOff, METH_VARARGS, sndih_setPlayThruOnOff__doc__},
+ {"getSampleRate", (PyCFunction)sndih_getSampleRate, METH_VARARGS, sndih_getSampleRate__doc__},
+ {"setSampleRate", (PyCFunction)sndih_setSampleRate, METH_VARARGS, sndih_setSampleRate__doc__},
+ {"getSampleSize", (PyCFunction)sndih_getSampleSize, METH_VARARGS, sndih_getSampleSize__doc__},
+ {"setSampleSize", (PyCFunction)sndih_setSampleSize, METH_VARARGS, sndih_setSampleSize__doc__},
+ {"getSampleSizeAvailable", (PyCFunction)sndih_getSampleSizeAvailable, METH_VARARGS, sndih_getSampleSizeAvailable__doc__},
+ {"getSampleRateAvailable", (PyCFunction)sndih_getSampleRateAvailable, METH_VARARGS, sndih_getSampleRateAvailable__doc__},
+
+ {NULL, (PyCFunction)NULL, 0, NULL} /* sentinel */
};
/* Initialization function for the module (*must* be called initSndihooks) */
-static char Sndihooks_module_documentation[] =
+static char Sndihooks_module_documentation[] =
""
;
void
init_Sndihooks()
{
- PyObject *m, *d;
-
- /* Create the module and add the functions */
- m = Py_InitModule4("_Sndihooks", sndih_methods,
- Sndihooks_module_documentation,
- (PyObject*)NULL,PYTHON_API_VERSION);
-
- /* Add some symbolic constants to the module */
- d = PyModule_GetDict(m);
- ErrorObject = PyString_FromString("Sndihooks.error");
- PyDict_SetItemString(d, "error", ErrorObject);
-
- /* XXXX Add constants here */
-
- /* Check for errors */
- if (PyErr_Occurred())
- Py_FatalError("can't initialize module Sndihooks");
+ PyObject *m, *d;
+
+ /* Create the module and add the functions */
+ m = Py_InitModule4("_Sndihooks", sndih_methods,
+ Sndihooks_module_documentation,
+ (PyObject*)NULL,PYTHON_API_VERSION);
+
+ /* Add some symbolic constants to the module */
+ d = PyModule_GetDict(m);
+ ErrorObject = PyString_FromString("Sndihooks.error");
+ PyDict_SetItemString(d, "error", ErrorObject);
+
+ /* XXXX Add constants here */
+
+ /* Check for errors */
+ if (PyErr_Occurred())
+ Py_FatalError("can't initialize module Sndihooks");
}
diff --git a/Mac/Modules/snd/_Sndmodule.c b/Mac/Modules/snd/_Sndmodule.c
index 1f64629..d713efe 100644
--- a/Mac/Modules/snd/_Sndmodule.c
+++ b/Mac/Modules/snd/_Sndmodule.c
@@ -10,9 +10,9 @@
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
- PyErr_SetString(PyExc_NotImplementedError, \
- "Not available in this shared library/OS version"); \
- return NULL; \
+ PyErr_SetString(PyExc_NotImplementedError, \
+ "Not available in this shared library/OS version"); \
+ return NULL; \
}} while(0)
@@ -22,16 +22,16 @@
static int
SndCmd_Convert(PyObject *v, SndCommand *pc)
{
- int len;
- pc->param1 = 0;
- pc->param2 = 0;
- if (PyTuple_Check(v)) {
- if (PyArg_ParseTuple(v, "h|hl", &pc->cmd, &pc->param1, &pc->param2))
- return 1;
- PyErr_Clear();
- return PyArg_ParseTuple(v, "Hhs#", &pc->cmd, &pc->param1, &pc->param2, &len);
- }
- return PyArg_Parse(v, "H", &pc->cmd);
+ int len;
+ pc->param1 = 0;
+ pc->param2 = 0;
+ if (PyTuple_Check(v)) {
+ if (PyArg_ParseTuple(v, "h|hl", &pc->cmd, &pc->param1, &pc->param2))
+ return 1;
+ PyErr_Clear();
+ return PyArg_ParseTuple(v, "Hhs#", &pc->cmd, &pc->param1, &pc->param2, &len);
+ }
+ return PyArg_Parse(v, "H", &pc->cmd);
}
static pascal void SndCh_UserRoutine(SndChannelPtr chan, SndCommand *cmd); /* Forward */
@@ -46,156 +46,156 @@ static PyTypeObject SndChannel_Type;
#define SndCh_Check(x) ((x)->ob_type == &SndChannel_Type || PyObject_TypeCheck((x), &SndChannel_Type))
typedef struct SndChannelObject {
- PyObject_HEAD
- SndChannelPtr ob_itself;
- /* Members used to implement callbacks: */
- PyObject *ob_callback;
- long ob_A5;
- SndCommand ob_cmd;
+ PyObject_HEAD
+ SndChannelPtr ob_itself;
+ /* Members used to implement callbacks: */
+ PyObject *ob_callback;
+ long ob_A5;
+ SndCommand ob_cmd;
} SndChannelObject;
static PyObject *SndCh_New(SndChannelPtr itself)
{
- SndChannelObject *it;
- it = PyObject_NEW(SndChannelObject, &SndChannel_Type);
- if (it == NULL) return NULL;
- it->ob_itself = itself;
- it->ob_callback = NULL;
- it->ob_A5 = SetCurrentA5();
- return (PyObject *)it;
+ SndChannelObject *it;
+ it = PyObject_NEW(SndChannelObject, &SndChannel_Type);
+ if (it == NULL) return NULL;
+ it->ob_itself = itself;
+ it->ob_callback = NULL;
+ it->ob_A5 = SetCurrentA5();
+ return (PyObject *)it;
}
static void SndCh_dealloc(SndChannelObject *self)
{
- SndDisposeChannel(self->ob_itself, 1);
- Py_XDECREF(self->ob_callback);
- PyObject_Free((PyObject *)self);
+ SndDisposeChannel(self->ob_itself, 1);
+ Py_XDECREF(self->ob_callback);
+ PyObject_Free((PyObject *)self);
}
static PyObject *SndCh_SndDoCommand(SndChannelObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- SndCommand cmd;
- Boolean noWait;
- if (!PyArg_ParseTuple(_args, "O&b",
- SndCmd_Convert, &cmd,
- &noWait))
- return NULL;
- _err = SndDoCommand(_self->ob_itself,
- &cmd,
- noWait);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ SndCommand cmd;
+ Boolean noWait;
+ if (!PyArg_ParseTuple(_args, "O&b",
+ SndCmd_Convert, &cmd,
+ &noWait))
+ return NULL;
+ _err = SndDoCommand(_self->ob_itself,
+ &cmd,
+ noWait);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *SndCh_SndDoImmediate(SndChannelObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- SndCommand cmd;
- if (!PyArg_ParseTuple(_args, "O&",
- SndCmd_Convert, &cmd))
- return NULL;
- _err = SndDoImmediate(_self->ob_itself,
- &cmd);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ SndCommand cmd;
+ if (!PyArg_ParseTuple(_args, "O&",
+ SndCmd_Convert, &cmd))
+ return NULL;
+ _err = SndDoImmediate(_self->ob_itself,
+ &cmd);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *SndCh_SndPlay(SndChannelObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- SndListHandle sndHandle;
- Boolean async;
- if (!PyArg_ParseTuple(_args, "O&b",
- ResObj_Convert, &sndHandle,
- &async))
- return NULL;
- _err = SndPlay(_self->ob_itself,
- sndHandle,
- async);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ SndListHandle sndHandle;
+ Boolean async;
+ if (!PyArg_ParseTuple(_args, "O&b",
+ ResObj_Convert, &sndHandle,
+ &async))
+ return NULL;
+ _err = SndPlay(_self->ob_itself,
+ sndHandle,
+ async);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *SndCh_SndChannelStatus(SndChannelObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- short theLength;
- SCStatus theStatus__out__;
- if (!PyArg_ParseTuple(_args, "h",
- &theLength))
- return NULL;
- _err = SndChannelStatus(_self->ob_itself,
- theLength,
- &theStatus__out__);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("s#",
- (char *)&theStatus__out__, (int)sizeof(SCStatus));
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ short theLength;
+ SCStatus theStatus__out__;
+ if (!PyArg_ParseTuple(_args, "h",
+ &theLength))
+ return NULL;
+ _err = SndChannelStatus(_self->ob_itself,
+ theLength,
+ &theStatus__out__);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("s#",
+ (char *)&theStatus__out__, (int)sizeof(SCStatus));
+ return _res;
}
static PyObject *SndCh_SndGetInfo(SndChannelObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- OSType selector;
- void * infoPtr;
- if (!PyArg_ParseTuple(_args, "O&w",
- PyMac_GetOSType, &selector,
- &infoPtr))
- return NULL;
- _err = SndGetInfo(_self->ob_itself,
- selector,
- infoPtr);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ OSType selector;
+ void * infoPtr;
+ if (!PyArg_ParseTuple(_args, "O&w",
+ PyMac_GetOSType, &selector,
+ &infoPtr))
+ return NULL;
+ _err = SndGetInfo(_self->ob_itself,
+ selector,
+ infoPtr);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *SndCh_SndSetInfo(SndChannelObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- OSType selector;
- void * infoPtr;
- if (!PyArg_ParseTuple(_args, "O&w",
- PyMac_GetOSType, &selector,
- &infoPtr))
- return NULL;
- _err = SndSetInfo(_self->ob_itself,
- selector,
- infoPtr);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ OSType selector;
+ void * infoPtr;
+ if (!PyArg_ParseTuple(_args, "O&w",
+ PyMac_GetOSType, &selector,
+ &infoPtr))
+ return NULL;
+ _err = SndSetInfo(_self->ob_itself,
+ selector,
+ infoPtr);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyMethodDef SndCh_methods[] = {
- {"SndDoCommand", (PyCFunction)SndCh_SndDoCommand, 1,
- PyDoc_STR("(SndCommand cmd, Boolean noWait) -> None")},
- {"SndDoImmediate", (PyCFunction)SndCh_SndDoImmediate, 1,
- PyDoc_STR("(SndCommand cmd) -> None")},
- {"SndPlay", (PyCFunction)SndCh_SndPlay, 1,
- PyDoc_STR("(SndListHandle sndHandle, Boolean async) -> None")},
- {"SndChannelStatus", (PyCFunction)SndCh_SndChannelStatus, 1,
- PyDoc_STR("(short theLength) -> (SCStatus theStatus)")},
- {"SndGetInfo", (PyCFunction)SndCh_SndGetInfo, 1,
- PyDoc_STR("(OSType selector, void * infoPtr) -> None")},
- {"SndSetInfo", (PyCFunction)SndCh_SndSetInfo, 1,
- PyDoc_STR("(OSType selector, void * infoPtr) -> None")},
- {NULL, NULL, 0}
+ {"SndDoCommand", (PyCFunction)SndCh_SndDoCommand, 1,
+ PyDoc_STR("(SndCommand cmd, Boolean noWait) -> None")},
+ {"SndDoImmediate", (PyCFunction)SndCh_SndDoImmediate, 1,
+ PyDoc_STR("(SndCommand cmd) -> None")},
+ {"SndPlay", (PyCFunction)SndCh_SndPlay, 1,
+ PyDoc_STR("(SndListHandle sndHandle, Boolean async) -> None")},
+ {"SndChannelStatus", (PyCFunction)SndCh_SndChannelStatus, 1,
+ PyDoc_STR("(short theLength) -> (SCStatus theStatus)")},
+ {"SndGetInfo", (PyCFunction)SndCh_SndGetInfo, 1,
+ PyDoc_STR("(OSType selector, void * infoPtr) -> None")},
+ {"SndSetInfo", (PyCFunction)SndCh_SndSetInfo, 1,
+ PyDoc_STR("(OSType selector, void * infoPtr) -> None")},
+ {NULL, NULL, 0}
};
#define SndCh_getsetlist NULL
@@ -208,47 +208,47 @@ static PyMethodDef SndCh_methods[] = {
#define SndCh_hash NULL
static PyTypeObject SndChannel_Type = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
- "_Snd.SndChannel", /*tp_name*/
- sizeof(SndChannelObject), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- /* methods */
- (destructor) SndCh_dealloc, /*tp_dealloc*/
- 0, /*tp_print*/
- (getattrfunc)0, /*tp_getattr*/
- (setattrfunc)0, /*tp_setattr*/
- (cmpfunc) SndCh_compare, /*tp_compare*/
- (reprfunc) SndCh_repr, /*tp_repr*/
- (PyNumberMethods *)0, /* tp_as_number */
- (PySequenceMethods *)0, /* tp_as_sequence */
- (PyMappingMethods *)0, /* tp_as_mapping */
- (hashfunc) SndCh_hash, /*tp_hash*/
- 0, /*tp_call*/
- 0, /*tp_str*/
- PyObject_GenericGetAttr, /*tp_getattro*/
- PyObject_GenericSetAttr, /*tp_setattro */
- 0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT, /* tp_flags */
- 0, /*tp_doc*/
- 0, /*tp_traverse*/
- 0, /*tp_clear*/
- 0, /*tp_richcompare*/
- 0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
- 0, /*tp_iternext*/
- SndCh_methods, /* tp_methods */
- 0, /*tp_members*/
- SndCh_getsetlist, /*tp_getset*/
- 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*/
+ PyObject_HEAD_INIT(NULL)
+ 0, /*ob_size*/
+ "_Snd.SndChannel", /*tp_name*/
+ sizeof(SndChannelObject), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ /* methods */
+ (destructor) SndCh_dealloc, /*tp_dealloc*/
+ 0, /*tp_print*/
+ (getattrfunc)0, /*tp_getattr*/
+ (setattrfunc)0, /*tp_setattr*/
+ (cmpfunc) SndCh_compare, /*tp_compare*/
+ (reprfunc) SndCh_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) SndCh_hash, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ PyObject_GenericGetAttr, /*tp_getattro*/
+ PyObject_GenericSetAttr, /*tp_setattro */
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT, /* tp_flags */
+ 0, /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ SndCh_methods, /* tp_methods */
+ 0, /*tp_members*/
+ SndCh_getsetlist, /*tp_getset*/
+ 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 ------------------- */
@@ -261,89 +261,89 @@ static PyTypeObject SPB_Type;
#define SPBObj_Check(x) ((x)->ob_type == &SPB_Type || PyObject_TypeCheck((x), &SPB_Type))
typedef struct SPBObject {
- PyObject_HEAD
- /* Members used to implement callbacks: */
- PyObject *ob_completion;
- PyObject *ob_interrupt;
- PyObject *ob_thiscallback;
- long ob_A5;
- SPB ob_spb;
+ PyObject_HEAD
+ /* Members used to implement callbacks: */
+ PyObject *ob_completion;
+ PyObject *ob_interrupt;
+ PyObject *ob_thiscallback;
+ long ob_A5;
+ SPB ob_spb;
} SPBObject;
static PyObject *SPBObj_New(void)
{
- SPBObject *it;
- it = PyObject_NEW(SPBObject, &SPB_Type);
- if (it == NULL) return NULL;
- it->ob_completion = NULL;
- it->ob_interrupt = NULL;
- it->ob_thiscallback = NULL;
- it->ob_A5 = SetCurrentA5();
- memset((char *)&it->ob_spb, 0, sizeof(it->ob_spb));
- it->ob_spb.userLong = (long)it;
- return (PyObject *)it;
+ SPBObject *it;
+ it = PyObject_NEW(SPBObject, &SPB_Type);
+ if (it == NULL) return NULL;
+ it->ob_completion = NULL;
+ it->ob_interrupt = NULL;
+ it->ob_thiscallback = NULL;
+ it->ob_A5 = SetCurrentA5();
+ memset((char *)&it->ob_spb, 0, sizeof(it->ob_spb));
+ it->ob_spb.userLong = (long)it;
+ return (PyObject *)it;
}
static int SPBObj_Convert(PyObject *v, SPBPtr *p_itself)
{
- if (!SPBObj_Check(v))
- {
- PyErr_SetString(PyExc_TypeError, "SPB required");
- return 0;
- }
- *p_itself = &((SPBObject *)v)->ob_spb;
- return 1;
+ if (!SPBObj_Check(v))
+ {
+ PyErr_SetString(PyExc_TypeError, "SPB required");
+ return 0;
+ }
+ *p_itself = &((SPBObject *)v)->ob_spb;
+ return 1;
}
static void SPBObj_dealloc(SPBObject *self)
{
- /* Cleanup of self->ob_itself goes here */
- self->ob_spb.userLong = 0;
- self->ob_thiscallback = 0;
- Py_XDECREF(self->ob_completion);
- Py_XDECREF(self->ob_interrupt);
- PyObject_Free((PyObject *)self);
+ /* Cleanup of self->ob_itself goes here */
+ self->ob_spb.userLong = 0;
+ self->ob_thiscallback = 0;
+ Py_XDECREF(self->ob_completion);
+ Py_XDECREF(self->ob_interrupt);
+ PyObject_Free((PyObject *)self);
}
static PyMethodDef SPBObj_methods[] = {
- {NULL, NULL, 0}
+ {NULL, NULL, 0}
};
static PyObject *SPBObj_get_inRefNum(SPBObject *self, void *closure)
{
- return Py_BuildValue("l", self->ob_spb.inRefNum);
+ return Py_BuildValue("l", self->ob_spb.inRefNum);
}
static int SPBObj_set_inRefNum(SPBObject *self, PyObject *v, void *closure)
{
- return -1 + PyArg_Parse(v, "l", &self->ob_spb.inRefNum);
- return 0;
+ return -1 + PyArg_Parse(v, "l", &self->ob_spb.inRefNum);
+ return 0;
}
static PyObject *SPBObj_get_count(SPBObject *self, void *closure)
{
- return Py_BuildValue("l", self->ob_spb.count);
+ return Py_BuildValue("l", self->ob_spb.count);
}
static int SPBObj_set_count(SPBObject *self, PyObject *v, void *closure)
{
- return -1 + PyArg_Parse(v, "l", &self->ob_spb.count);
- return 0;
+ return -1 + PyArg_Parse(v, "l", &self->ob_spb.count);
+ return 0;
}
static PyObject *SPBObj_get_milliseconds(SPBObject *self, void *closure)
{
- return Py_BuildValue("l", self->ob_spb.milliseconds);
+ return Py_BuildValue("l", self->ob_spb.milliseconds);
}
static int SPBObj_set_milliseconds(SPBObject *self, PyObject *v, void *closure)
{
- return -1 + PyArg_Parse(v, "l", &self->ob_spb.milliseconds);
- return 0;
+ return -1 + PyArg_Parse(v, "l", &self->ob_spb.milliseconds);
+ return 0;
}
static PyObject *SPBObj_get_error(SPBObject *self, void *closure)
{
- return Py_BuildValue("h", self->ob_spb.error);
+ return Py_BuildValue("h", self->ob_spb.error);
}
#define SPBObj_set_error NULL
@@ -352,20 +352,20 @@ static PyObject *SPBObj_get_error(SPBObject *self, void *closure)
static int SPBObj_set_completionRoutine(SPBObject *self, PyObject *v, void *closure)
{
- self->ob_spb.completionRoutine = NewSICompletionUPP(SPB_completion);
- self->ob_completion = v;
- Py_INCREF(v);
- return 0;
- return 0;
+ self->ob_spb.completionRoutine = NewSICompletionUPP(SPB_completion);
+ self->ob_completion = v;
+ Py_INCREF(v);
+ return 0;
+ return 0;
}
static PyGetSetDef SPBObj_getsetlist[] = {
- {"inRefNum", (getter)SPBObj_get_inRefNum, (setter)SPBObj_set_inRefNum, NULL},
- {"count", (getter)SPBObj_get_count, (setter)SPBObj_set_count, NULL},
- {"milliseconds", (getter)SPBObj_get_milliseconds, (setter)SPBObj_set_milliseconds, NULL},
- {"error", (getter)SPBObj_get_error, (setter)SPBObj_set_error, NULL},
- {"completionRoutine", (getter)SPBObj_get_completionRoutine, (setter)SPBObj_set_completionRoutine, NULL},
- {NULL, NULL, NULL, NULL},
+ {"inRefNum", (getter)SPBObj_get_inRefNum, (setter)SPBObj_set_inRefNum, NULL},
+ {"count", (getter)SPBObj_get_count, (setter)SPBObj_set_count, NULL},
+ {"milliseconds", (getter)SPBObj_get_milliseconds, (setter)SPBObj_set_milliseconds, NULL},
+ {"error", (getter)SPBObj_get_error, (setter)SPBObj_set_error, NULL},
+ {"completionRoutine", (getter)SPBObj_get_completionRoutine, (setter)SPBObj_set_completionRoutine, NULL},
+ {NULL, NULL, NULL, NULL},
};
@@ -376,47 +376,47 @@ static PyGetSetDef SPBObj_getsetlist[] = {
#define SPBObj_hash NULL
static PyTypeObject SPB_Type = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
- "_Snd.SPB", /*tp_name*/
- sizeof(SPBObject), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- /* methods */
- (destructor) SPBObj_dealloc, /*tp_dealloc*/
- 0, /*tp_print*/
- (getattrfunc)0, /*tp_getattr*/
- (setattrfunc)0, /*tp_setattr*/
- (cmpfunc) SPBObj_compare, /*tp_compare*/
- (reprfunc) SPBObj_repr, /*tp_repr*/
- (PyNumberMethods *)0, /* tp_as_number */
- (PySequenceMethods *)0, /* tp_as_sequence */
- (PyMappingMethods *)0, /* tp_as_mapping */
- (hashfunc) SPBObj_hash, /*tp_hash*/
- 0, /*tp_call*/
- 0, /*tp_str*/
- PyObject_GenericGetAttr, /*tp_getattro*/
- PyObject_GenericSetAttr, /*tp_setattro */
- 0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT, /* tp_flags */
- 0, /*tp_doc*/
- 0, /*tp_traverse*/
- 0, /*tp_clear*/
- 0, /*tp_richcompare*/
- 0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
- 0, /*tp_iternext*/
- SPBObj_methods, /* tp_methods */
- 0, /*tp_members*/
- SPBObj_getsetlist, /*tp_getset*/
- 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*/
+ PyObject_HEAD_INIT(NULL)
+ 0, /*ob_size*/
+ "_Snd.SPB", /*tp_name*/
+ sizeof(SPBObject), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ /* methods */
+ (destructor) SPBObj_dealloc, /*tp_dealloc*/
+ 0, /*tp_print*/
+ (getattrfunc)0, /*tp_getattr*/
+ (setattrfunc)0, /*tp_setattr*/
+ (cmpfunc) SPBObj_compare, /*tp_compare*/
+ (reprfunc) SPBObj_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) SPBObj_hash, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ PyObject_GenericGetAttr, /*tp_getattro*/
+ PyObject_GenericSetAttr, /*tp_setattro */
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT, /* tp_flags */
+ 0, /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ SPBObj_methods, /* tp_methods */
+ 0, /*tp_members*/
+ SPBObj_getsetlist, /*tp_getset*/
+ 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 ----------------------- */
@@ -424,634 +424,634 @@ static PyTypeObject SPB_Type = {
static PyObject *Snd_SPB(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- _res = SPBObj_New(); return _res;
+ PyObject *_res = NULL;
+ _res = SPBObj_New(); return _res;
}
static PyObject *Snd_SysBeep(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short duration;
- if (!PyArg_ParseTuple(_args, "h",
- &duration))
- return NULL;
- SysBeep(duration);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ short duration;
+ if (!PyArg_ParseTuple(_args, "h",
+ &duration))
+ return NULL;
+ SysBeep(duration);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Snd_SndNewChannel(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- SndChannelPtr chan = 0;
- short synth;
- long init;
- PyObject* userRoutine;
- if (!PyArg_ParseTuple(_args, "hlO",
- &synth,
- &init,
- &userRoutine))
- return NULL;
- if (userRoutine != Py_None && !PyCallable_Check(userRoutine))
- {
- PyErr_SetString(PyExc_TypeError, "callback must be callable");
- goto userRoutine__error__;
- }
- _err = SndNewChannel(&chan,
- synth,
- init,
- NewSndCallBackUPP(SndCh_UserRoutine));
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- SndCh_New, chan);
- if (_res != NULL && userRoutine != Py_None)
- {
- SndChannelObject *p = (SndChannelObject *)_res;
- p->ob_itself->userInfo = (long)p;
- Py_INCREF(userRoutine);
- p->ob_callback = userRoutine;
- }
+ PyObject *_res = NULL;
+ OSErr _err;
+ SndChannelPtr chan = 0;
+ short synth;
+ long init;
+ PyObject* userRoutine;
+ if (!PyArg_ParseTuple(_args, "hlO",
+ &synth,
+ &init,
+ &userRoutine))
+ return NULL;
+ if (userRoutine != Py_None && !PyCallable_Check(userRoutine))
+ {
+ PyErr_SetString(PyExc_TypeError, "callback must be callable");
+ goto userRoutine__error__;
+ }
+ _err = SndNewChannel(&chan,
+ synth,
+ init,
+ NewSndCallBackUPP(SndCh_UserRoutine));
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ SndCh_New, chan);
+ if (_res != NULL && userRoutine != Py_None)
+ {
+ SndChannelObject *p = (SndChannelObject *)_res;
+ p->ob_itself->userInfo = (long)p;
+ Py_INCREF(userRoutine);
+ p->ob_callback = userRoutine;
+ }
userRoutine__error__: ;
- return _res;
+ return _res;
}
static PyObject *Snd_SndSoundManagerVersion(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- NumVersion _rv;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = SndSoundManagerVersion();
- _res = Py_BuildValue("O&",
- PyMac_BuildNumVersion, _rv);
- return _res;
+ PyObject *_res = NULL;
+ NumVersion _rv;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = SndSoundManagerVersion();
+ _res = Py_BuildValue("O&",
+ PyMac_BuildNumVersion, _rv);
+ return _res;
}
static PyObject *Snd_SndManagerStatus(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- short theLength;
- SMStatus theStatus__out__;
- if (!PyArg_ParseTuple(_args, "h",
- &theLength))
- return NULL;
- _err = SndManagerStatus(theLength,
- &theStatus__out__);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("s#",
- (char *)&theStatus__out__, (int)sizeof(SMStatus));
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ short theLength;
+ SMStatus theStatus__out__;
+ if (!PyArg_ParseTuple(_args, "h",
+ &theLength))
+ return NULL;
+ _err = SndManagerStatus(theLength,
+ &theStatus__out__);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("s#",
+ (char *)&theStatus__out__, (int)sizeof(SMStatus));
+ return _res;
}
static PyObject *Snd_SndGetSysBeepState(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short sysBeepState;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- SndGetSysBeepState(&sysBeepState);
- _res = Py_BuildValue("h",
- sysBeepState);
- return _res;
+ PyObject *_res = NULL;
+ short sysBeepState;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ SndGetSysBeepState(&sysBeepState);
+ _res = Py_BuildValue("h",
+ sysBeepState);
+ return _res;
}
static PyObject *Snd_SndSetSysBeepState(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- short sysBeepState;
- if (!PyArg_ParseTuple(_args, "h",
- &sysBeepState))
- return NULL;
- _err = SndSetSysBeepState(sysBeepState);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ short sysBeepState;
+ if (!PyArg_ParseTuple(_args, "h",
+ &sysBeepState))
+ return NULL;
+ _err = SndSetSysBeepState(sysBeepState);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Snd_GetSysBeepVolume(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- long level;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetSysBeepVolume(&level);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- level);
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ long level;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetSysBeepVolume(&level);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ level);
+ return _res;
}
static PyObject *Snd_SetSysBeepVolume(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- long level;
- if (!PyArg_ParseTuple(_args, "l",
- &level))
- return NULL;
- _err = SetSysBeepVolume(level);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ long level;
+ if (!PyArg_ParseTuple(_args, "l",
+ &level))
+ return NULL;
+ _err = SetSysBeepVolume(level);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Snd_GetDefaultOutputVolume(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- long level;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetDefaultOutputVolume(&level);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- level);
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ long level;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetDefaultOutputVolume(&level);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ level);
+ return _res;
}
static PyObject *Snd_SetDefaultOutputVolume(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- long level;
- if (!PyArg_ParseTuple(_args, "l",
- &level))
- return NULL;
- _err = SetDefaultOutputVolume(level);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ long level;
+ if (!PyArg_ParseTuple(_args, "l",
+ &level))
+ return NULL;
+ _err = SetDefaultOutputVolume(level);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Snd_GetSoundHeaderOffset(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- SndListHandle sndHandle;
- long offset;
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &sndHandle))
- return NULL;
- _err = GetSoundHeaderOffset(sndHandle,
- &offset);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- offset);
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ SndListHandle sndHandle;
+ long offset;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &sndHandle))
+ return NULL;
+ _err = GetSoundHeaderOffset(sndHandle,
+ &offset);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ offset);
+ return _res;
}
static PyObject *Snd_GetCompressionInfo(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- short compressionID;
- OSType format;
- short numChannels;
- short sampleSize;
- CompressionInfo cp__out__;
- if (!PyArg_ParseTuple(_args, "hO&hh",
- &compressionID,
- PyMac_GetOSType, &format,
- &numChannels,
- &sampleSize))
- return NULL;
- _err = GetCompressionInfo(compressionID,
- format,
- numChannels,
- sampleSize,
- &cp__out__);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("s#",
- (char *)&cp__out__, (int)sizeof(CompressionInfo));
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ short compressionID;
+ OSType format;
+ short numChannels;
+ short sampleSize;
+ CompressionInfo cp__out__;
+ if (!PyArg_ParseTuple(_args, "hO&hh",
+ &compressionID,
+ PyMac_GetOSType, &format,
+ &numChannels,
+ &sampleSize))
+ return NULL;
+ _err = GetCompressionInfo(compressionID,
+ format,
+ numChannels,
+ sampleSize,
+ &cp__out__);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("s#",
+ (char *)&cp__out__, (int)sizeof(CompressionInfo));
+ return _res;
}
static PyObject *Snd_SetSoundPreference(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- OSType theType;
- Str255 name;
- Handle settings;
- if (!PyArg_ParseTuple(_args, "O&O&",
- PyMac_GetOSType, &theType,
- ResObj_Convert, &settings))
- return NULL;
- _err = SetSoundPreference(theType,
- name,
- settings);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- PyMac_BuildStr255, name);
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ OSType theType;
+ Str255 name;
+ Handle settings;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ PyMac_GetOSType, &theType,
+ ResObj_Convert, &settings))
+ return NULL;
+ _err = SetSoundPreference(theType,
+ name,
+ settings);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildStr255, name);
+ return _res;
}
static PyObject *Snd_GetSoundPreference(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- OSType theType;
- Str255 name;
- Handle settings;
- if (!PyArg_ParseTuple(_args, "O&O&",
- PyMac_GetOSType, &theType,
- ResObj_Convert, &settings))
- return NULL;
- _err = GetSoundPreference(theType,
- name,
- settings);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- PyMac_BuildStr255, name);
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ OSType theType;
+ Str255 name;
+ Handle settings;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ PyMac_GetOSType, &theType,
+ ResObj_Convert, &settings))
+ return NULL;
+ _err = GetSoundPreference(theType,
+ name,
+ settings);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildStr255, name);
+ return _res;
}
static PyObject *Snd_GetCompressionName(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- OSType compressionType;
- Str255 compressionName;
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetOSType, &compressionType))
- return NULL;
- _err = GetCompressionName(compressionType,
- compressionName);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- PyMac_BuildStr255, compressionName);
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ OSType compressionType;
+ Str255 compressionName;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetOSType, &compressionType))
+ return NULL;
+ _err = GetCompressionName(compressionType,
+ compressionName);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildStr255, compressionName);
+ return _res;
}
static PyObject *Snd_SPBVersion(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- NumVersion _rv;
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = SPBVersion();
- _res = Py_BuildValue("O&",
- PyMac_BuildNumVersion, _rv);
- return _res;
+ PyObject *_res = NULL;
+ NumVersion _rv;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = SPBVersion();
+ _res = Py_BuildValue("O&",
+ PyMac_BuildNumVersion, _rv);
+ return _res;
}
static PyObject *Snd_SndRecord(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Point corner;
- OSType quality;
- SndListHandle sndHandle;
- if (!PyArg_ParseTuple(_args, "O&O&",
- PyMac_GetPoint, &corner,
- PyMac_GetOSType, &quality))
- return NULL;
- _err = SndRecord((ModalFilterUPP)0,
- corner,
- quality,
- &sndHandle);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- ResObj_New, sndHandle);
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Point corner;
+ OSType quality;
+ SndListHandle sndHandle;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ PyMac_GetPoint, &corner,
+ PyMac_GetOSType, &quality))
+ return NULL;
+ _err = SndRecord((ModalFilterUPP)0,
+ corner,
+ quality,
+ &sndHandle);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ ResObj_New, sndHandle);
+ return _res;
}
static PyObject *Snd_SPBSignInDevice(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- short deviceRefNum;
- Str255 deviceName;
- if (!PyArg_ParseTuple(_args, "hO&",
- &deviceRefNum,
- PyMac_GetStr255, deviceName))
- return NULL;
- _err = SPBSignInDevice(deviceRefNum,
- deviceName);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ short deviceRefNum;
+ Str255 deviceName;
+ if (!PyArg_ParseTuple(_args, "hO&",
+ &deviceRefNum,
+ PyMac_GetStr255, deviceName))
+ return NULL;
+ _err = SPBSignInDevice(deviceRefNum,
+ deviceName);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Snd_SPBSignOutDevice(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- short deviceRefNum;
- if (!PyArg_ParseTuple(_args, "h",
- &deviceRefNum))
- return NULL;
- _err = SPBSignOutDevice(deviceRefNum);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ short deviceRefNum;
+ if (!PyArg_ParseTuple(_args, "h",
+ &deviceRefNum))
+ return NULL;
+ _err = SPBSignOutDevice(deviceRefNum);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Snd_SPBGetIndexedDevice(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- short count;
- Str255 deviceName;
- Handle deviceIconHandle;
- if (!PyArg_ParseTuple(_args, "h",
- &count))
- return NULL;
- _err = SPBGetIndexedDevice(count,
- deviceName,
- &deviceIconHandle);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&O&",
- PyMac_BuildStr255, deviceName,
- ResObj_New, deviceIconHandle);
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ short count;
+ Str255 deviceName;
+ Handle deviceIconHandle;
+ if (!PyArg_ParseTuple(_args, "h",
+ &count))
+ return NULL;
+ _err = SPBGetIndexedDevice(count,
+ deviceName,
+ &deviceIconHandle);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&O&",
+ PyMac_BuildStr255, deviceName,
+ ResObj_New, deviceIconHandle);
+ return _res;
}
static PyObject *Snd_SPBOpenDevice(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- Str255 deviceName;
- short permission;
- long inRefNum;
- if (!PyArg_ParseTuple(_args, "O&h",
- PyMac_GetStr255, deviceName,
- &permission))
- return NULL;
- _err = SPBOpenDevice(deviceName,
- permission,
- &inRefNum);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- inRefNum);
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ Str255 deviceName;
+ short permission;
+ long inRefNum;
+ if (!PyArg_ParseTuple(_args, "O&h",
+ PyMac_GetStr255, deviceName,
+ &permission))
+ return NULL;
+ _err = SPBOpenDevice(deviceName,
+ permission,
+ &inRefNum);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ inRefNum);
+ return _res;
}
static PyObject *Snd_SPBCloseDevice(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- long inRefNum;
- if (!PyArg_ParseTuple(_args, "l",
- &inRefNum))
- return NULL;
- _err = SPBCloseDevice(inRefNum);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ long inRefNum;
+ if (!PyArg_ParseTuple(_args, "l",
+ &inRefNum))
+ return NULL;
+ _err = SPBCloseDevice(inRefNum);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Snd_SPBRecord(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- SPBPtr inParamPtr;
- Boolean asynchFlag;
- if (!PyArg_ParseTuple(_args, "O&b",
- SPBObj_Convert, &inParamPtr,
- &asynchFlag))
- return NULL;
- _err = SPBRecord(inParamPtr,
- asynchFlag);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ SPBPtr inParamPtr;
+ Boolean asynchFlag;
+ if (!PyArg_ParseTuple(_args, "O&b",
+ SPBObj_Convert, &inParamPtr,
+ &asynchFlag))
+ return NULL;
+ _err = SPBRecord(inParamPtr,
+ asynchFlag);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Snd_SPBPauseRecording(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- long inRefNum;
- if (!PyArg_ParseTuple(_args, "l",
- &inRefNum))
- return NULL;
- _err = SPBPauseRecording(inRefNum);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ long inRefNum;
+ if (!PyArg_ParseTuple(_args, "l",
+ &inRefNum))
+ return NULL;
+ _err = SPBPauseRecording(inRefNum);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Snd_SPBResumeRecording(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- long inRefNum;
- if (!PyArg_ParseTuple(_args, "l",
- &inRefNum))
- return NULL;
- _err = SPBResumeRecording(inRefNum);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ long inRefNum;
+ if (!PyArg_ParseTuple(_args, "l",
+ &inRefNum))
+ return NULL;
+ _err = SPBResumeRecording(inRefNum);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Snd_SPBStopRecording(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- long inRefNum;
- if (!PyArg_ParseTuple(_args, "l",
- &inRefNum))
- return NULL;
- _err = SPBStopRecording(inRefNum);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ long inRefNum;
+ if (!PyArg_ParseTuple(_args, "l",
+ &inRefNum))
+ return NULL;
+ _err = SPBStopRecording(inRefNum);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Snd_SPBGetRecordingStatus(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- long inRefNum;
- short recordingStatus;
- short meterLevel;
- unsigned long totalSamplesToRecord;
- unsigned long numberOfSamplesRecorded;
- unsigned long totalMsecsToRecord;
- unsigned long numberOfMsecsRecorded;
- if (!PyArg_ParseTuple(_args, "l",
- &inRefNum))
- return NULL;
- _err = SPBGetRecordingStatus(inRefNum,
- &recordingStatus,
- &meterLevel,
- &totalSamplesToRecord,
- &numberOfSamplesRecorded,
- &totalMsecsToRecord,
- &numberOfMsecsRecorded);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("hhllll",
- recordingStatus,
- meterLevel,
- totalSamplesToRecord,
- numberOfSamplesRecorded,
- totalMsecsToRecord,
- numberOfMsecsRecorded);
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ long inRefNum;
+ short recordingStatus;
+ short meterLevel;
+ unsigned long totalSamplesToRecord;
+ unsigned long numberOfSamplesRecorded;
+ unsigned long totalMsecsToRecord;
+ unsigned long numberOfMsecsRecorded;
+ if (!PyArg_ParseTuple(_args, "l",
+ &inRefNum))
+ return NULL;
+ _err = SPBGetRecordingStatus(inRefNum,
+ &recordingStatus,
+ &meterLevel,
+ &totalSamplesToRecord,
+ &numberOfSamplesRecorded,
+ &totalMsecsToRecord,
+ &numberOfMsecsRecorded);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("hhllll",
+ recordingStatus,
+ meterLevel,
+ totalSamplesToRecord,
+ numberOfSamplesRecorded,
+ totalMsecsToRecord,
+ numberOfMsecsRecorded);
+ return _res;
}
static PyObject *Snd_SPBGetDeviceInfo(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- long inRefNum;
- OSType infoType;
- void * infoData;
- if (!PyArg_ParseTuple(_args, "lO&w",
- &inRefNum,
- PyMac_GetOSType, &infoType,
- &infoData))
- return NULL;
- _err = SPBGetDeviceInfo(inRefNum,
- infoType,
- infoData);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ long inRefNum;
+ OSType infoType;
+ void * infoData;
+ if (!PyArg_ParseTuple(_args, "lO&w",
+ &inRefNum,
+ PyMac_GetOSType, &infoType,
+ &infoData))
+ return NULL;
+ _err = SPBGetDeviceInfo(inRefNum,
+ infoType,
+ infoData);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Snd_SPBSetDeviceInfo(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- long inRefNum;
- OSType infoType;
- void * infoData;
- if (!PyArg_ParseTuple(_args, "lO&w",
- &inRefNum,
- PyMac_GetOSType, &infoType,
- &infoData))
- return NULL;
- _err = SPBSetDeviceInfo(inRefNum,
- infoType,
- infoData);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ long inRefNum;
+ OSType infoType;
+ void * infoData;
+ if (!PyArg_ParseTuple(_args, "lO&w",
+ &inRefNum,
+ PyMac_GetOSType, &infoType,
+ &infoData))
+ return NULL;
+ _err = SPBSetDeviceInfo(inRefNum,
+ infoType,
+ infoData);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Snd_SPBMillisecondsToBytes(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- long inRefNum;
- long milliseconds;
- if (!PyArg_ParseTuple(_args, "l",
- &inRefNum))
- return NULL;
- _err = SPBMillisecondsToBytes(inRefNum,
- &milliseconds);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- milliseconds);
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ long inRefNum;
+ long milliseconds;
+ if (!PyArg_ParseTuple(_args, "l",
+ &inRefNum))
+ return NULL;
+ _err = SPBMillisecondsToBytes(inRefNum,
+ &milliseconds);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ milliseconds);
+ return _res;
}
static PyObject *Snd_SPBBytesToMilliseconds(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- long inRefNum;
- long byteCount;
- if (!PyArg_ParseTuple(_args, "l",
- &inRefNum))
- return NULL;
- _err = SPBBytesToMilliseconds(inRefNum,
- &byteCount);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- byteCount);
- return _res;
+ PyObject *_res = NULL;
+ OSErr _err;
+ long inRefNum;
+ long byteCount;
+ if (!PyArg_ParseTuple(_args, "l",
+ &inRefNum))
+ return NULL;
+ _err = SPBBytesToMilliseconds(inRefNum,
+ &byteCount);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ byteCount);
+ return _res;
}
#endif /* __LP64__ */
static PyMethodDef Snd_methods[] = {
#ifndef __LP64__
- {"SPB", (PyCFunction)Snd_SPB, 1,
- PyDoc_STR(NULL)},
- {"SysBeep", (PyCFunction)Snd_SysBeep, 1,
- PyDoc_STR("(short duration) -> None")},
- {"SndNewChannel", (PyCFunction)Snd_SndNewChannel, 1,
- PyDoc_STR("(short synth, long init, PyObject* userRoutine) -> (SndChannelPtr chan)")},
- {"SndSoundManagerVersion", (PyCFunction)Snd_SndSoundManagerVersion, 1,
- PyDoc_STR("() -> (NumVersion _rv)")},
- {"SndManagerStatus", (PyCFunction)Snd_SndManagerStatus, 1,
- PyDoc_STR("(short theLength) -> (SMStatus theStatus)")},
- {"SndGetSysBeepState", (PyCFunction)Snd_SndGetSysBeepState, 1,
- PyDoc_STR("() -> (short sysBeepState)")},
- {"SndSetSysBeepState", (PyCFunction)Snd_SndSetSysBeepState, 1,
- PyDoc_STR("(short sysBeepState) -> None")},
- {"GetSysBeepVolume", (PyCFunction)Snd_GetSysBeepVolume, 1,
- PyDoc_STR("() -> (long level)")},
- {"SetSysBeepVolume", (PyCFunction)Snd_SetSysBeepVolume, 1,
- PyDoc_STR("(long level) -> None")},
- {"GetDefaultOutputVolume", (PyCFunction)Snd_GetDefaultOutputVolume, 1,
- PyDoc_STR("() -> (long level)")},
- {"SetDefaultOutputVolume", (PyCFunction)Snd_SetDefaultOutputVolume, 1,
- PyDoc_STR("(long level) -> None")},
- {"GetSoundHeaderOffset", (PyCFunction)Snd_GetSoundHeaderOffset, 1,
- PyDoc_STR("(SndListHandle sndHandle) -> (long offset)")},
- {"GetCompressionInfo", (PyCFunction)Snd_GetCompressionInfo, 1,
- PyDoc_STR("(short compressionID, OSType format, short numChannels, short sampleSize) -> (CompressionInfo cp)")},
- {"SetSoundPreference", (PyCFunction)Snd_SetSoundPreference, 1,
- PyDoc_STR("(OSType theType, Handle settings) -> (Str255 name)")},
- {"GetSoundPreference", (PyCFunction)Snd_GetSoundPreference, 1,
- PyDoc_STR("(OSType theType, Handle settings) -> (Str255 name)")},
- {"GetCompressionName", (PyCFunction)Snd_GetCompressionName, 1,
- PyDoc_STR("(OSType compressionType) -> (Str255 compressionName)")},
- {"SPBVersion", (PyCFunction)Snd_SPBVersion, 1,
- PyDoc_STR("() -> (NumVersion _rv)")},
- {"SndRecord", (PyCFunction)Snd_SndRecord, 1,
- PyDoc_STR("(Point corner, OSType quality) -> (SndListHandle sndHandle)")},
- {"SPBSignInDevice", (PyCFunction)Snd_SPBSignInDevice, 1,
- PyDoc_STR("(short deviceRefNum, Str255 deviceName) -> None")},
- {"SPBSignOutDevice", (PyCFunction)Snd_SPBSignOutDevice, 1,
- PyDoc_STR("(short deviceRefNum) -> None")},
- {"SPBGetIndexedDevice", (PyCFunction)Snd_SPBGetIndexedDevice, 1,
- PyDoc_STR("(short count) -> (Str255 deviceName, Handle deviceIconHandle)")},
- {"SPBOpenDevice", (PyCFunction)Snd_SPBOpenDevice, 1,
- PyDoc_STR("(Str255 deviceName, short permission) -> (long inRefNum)")},
- {"SPBCloseDevice", (PyCFunction)Snd_SPBCloseDevice, 1,
- PyDoc_STR("(long inRefNum) -> None")},
- {"SPBRecord", (PyCFunction)Snd_SPBRecord, 1,
- PyDoc_STR("(SPBPtr inParamPtr, Boolean asynchFlag) -> None")},
- {"SPBPauseRecording", (PyCFunction)Snd_SPBPauseRecording, 1,
- PyDoc_STR("(long inRefNum) -> None")},
- {"SPBResumeRecording", (PyCFunction)Snd_SPBResumeRecording, 1,
- PyDoc_STR("(long inRefNum) -> None")},
- {"SPBStopRecording", (PyCFunction)Snd_SPBStopRecording, 1,
- PyDoc_STR("(long inRefNum) -> None")},
- {"SPBGetRecordingStatus", (PyCFunction)Snd_SPBGetRecordingStatus, 1,
- PyDoc_STR("(long inRefNum) -> (short recordingStatus, short meterLevel, unsigned long totalSamplesToRecord, unsigned long numberOfSamplesRecorded, unsigned long totalMsecsToRecord, unsigned long numberOfMsecsRecorded)")},
- {"SPBGetDeviceInfo", (PyCFunction)Snd_SPBGetDeviceInfo, 1,
- PyDoc_STR("(long inRefNum, OSType infoType, void * infoData) -> None")},
- {"SPBSetDeviceInfo", (PyCFunction)Snd_SPBSetDeviceInfo, 1,
- PyDoc_STR("(long inRefNum, OSType infoType, void * infoData) -> None")},
- {"SPBMillisecondsToBytes", (PyCFunction)Snd_SPBMillisecondsToBytes, 1,
- PyDoc_STR("(long inRefNum) -> (long milliseconds)")},
- {"SPBBytesToMilliseconds", (PyCFunction)Snd_SPBBytesToMilliseconds, 1,
- PyDoc_STR("(long inRefNum) -> (long byteCount)")},
+ {"SPB", (PyCFunction)Snd_SPB, 1,
+ PyDoc_STR(NULL)},
+ {"SysBeep", (PyCFunction)Snd_SysBeep, 1,
+ PyDoc_STR("(short duration) -> None")},
+ {"SndNewChannel", (PyCFunction)Snd_SndNewChannel, 1,
+ PyDoc_STR("(short synth, long init, PyObject* userRoutine) -> (SndChannelPtr chan)")},
+ {"SndSoundManagerVersion", (PyCFunction)Snd_SndSoundManagerVersion, 1,
+ PyDoc_STR("() -> (NumVersion _rv)")},
+ {"SndManagerStatus", (PyCFunction)Snd_SndManagerStatus, 1,
+ PyDoc_STR("(short theLength) -> (SMStatus theStatus)")},
+ {"SndGetSysBeepState", (PyCFunction)Snd_SndGetSysBeepState, 1,
+ PyDoc_STR("() -> (short sysBeepState)")},
+ {"SndSetSysBeepState", (PyCFunction)Snd_SndSetSysBeepState, 1,
+ PyDoc_STR("(short sysBeepState) -> None")},
+ {"GetSysBeepVolume", (PyCFunction)Snd_GetSysBeepVolume, 1,
+ PyDoc_STR("() -> (long level)")},
+ {"SetSysBeepVolume", (PyCFunction)Snd_SetSysBeepVolume, 1,
+ PyDoc_STR("(long level) -> None")},
+ {"GetDefaultOutputVolume", (PyCFunction)Snd_GetDefaultOutputVolume, 1,
+ PyDoc_STR("() -> (long level)")},
+ {"SetDefaultOutputVolume", (PyCFunction)Snd_SetDefaultOutputVolume, 1,
+ PyDoc_STR("(long level) -> None")},
+ {"GetSoundHeaderOffset", (PyCFunction)Snd_GetSoundHeaderOffset, 1,
+ PyDoc_STR("(SndListHandle sndHandle) -> (long offset)")},
+ {"GetCompressionInfo", (PyCFunction)Snd_GetCompressionInfo, 1,
+ PyDoc_STR("(short compressionID, OSType format, short numChannels, short sampleSize) -> (CompressionInfo cp)")},
+ {"SetSoundPreference", (PyCFunction)Snd_SetSoundPreference, 1,
+ PyDoc_STR("(OSType theType, Handle settings) -> (Str255 name)")},
+ {"GetSoundPreference", (PyCFunction)Snd_GetSoundPreference, 1,
+ PyDoc_STR("(OSType theType, Handle settings) -> (Str255 name)")},
+ {"GetCompressionName", (PyCFunction)Snd_GetCompressionName, 1,
+ PyDoc_STR("(OSType compressionType) -> (Str255 compressionName)")},
+ {"SPBVersion", (PyCFunction)Snd_SPBVersion, 1,
+ PyDoc_STR("() -> (NumVersion _rv)")},
+ {"SndRecord", (PyCFunction)Snd_SndRecord, 1,
+ PyDoc_STR("(Point corner, OSType quality) -> (SndListHandle sndHandle)")},
+ {"SPBSignInDevice", (PyCFunction)Snd_SPBSignInDevice, 1,
+ PyDoc_STR("(short deviceRefNum, Str255 deviceName) -> None")},
+ {"SPBSignOutDevice", (PyCFunction)Snd_SPBSignOutDevice, 1,
+ PyDoc_STR("(short deviceRefNum) -> None")},
+ {"SPBGetIndexedDevice", (PyCFunction)Snd_SPBGetIndexedDevice, 1,
+ PyDoc_STR("(short count) -> (Str255 deviceName, Handle deviceIconHandle)")},
+ {"SPBOpenDevice", (PyCFunction)Snd_SPBOpenDevice, 1,
+ PyDoc_STR("(Str255 deviceName, short permission) -> (long inRefNum)")},
+ {"SPBCloseDevice", (PyCFunction)Snd_SPBCloseDevice, 1,
+ PyDoc_STR("(long inRefNum) -> None")},
+ {"SPBRecord", (PyCFunction)Snd_SPBRecord, 1,
+ PyDoc_STR("(SPBPtr inParamPtr, Boolean asynchFlag) -> None")},
+ {"SPBPauseRecording", (PyCFunction)Snd_SPBPauseRecording, 1,
+ PyDoc_STR("(long inRefNum) -> None")},
+ {"SPBResumeRecording", (PyCFunction)Snd_SPBResumeRecording, 1,
+ PyDoc_STR("(long inRefNum) -> None")},
+ {"SPBStopRecording", (PyCFunction)Snd_SPBStopRecording, 1,
+ PyDoc_STR("(long inRefNum) -> None")},
+ {"SPBGetRecordingStatus", (PyCFunction)Snd_SPBGetRecordingStatus, 1,
+ PyDoc_STR("(long inRefNum) -> (short recordingStatus, short meterLevel, unsigned long totalSamplesToRecord, unsigned long numberOfSamplesRecorded, unsigned long totalMsecsToRecord, unsigned long numberOfMsecsRecorded)")},
+ {"SPBGetDeviceInfo", (PyCFunction)Snd_SPBGetDeviceInfo, 1,
+ PyDoc_STR("(long inRefNum, OSType infoType, void * infoData) -> None")},
+ {"SPBSetDeviceInfo", (PyCFunction)Snd_SPBSetDeviceInfo, 1,
+ PyDoc_STR("(long inRefNum, OSType infoType, void * infoData) -> None")},
+ {"SPBMillisecondsToBytes", (PyCFunction)Snd_SPBMillisecondsToBytes, 1,
+ PyDoc_STR("(long inRefNum) -> (long milliseconds)")},
+ {"SPBBytesToMilliseconds", (PyCFunction)Snd_SPBBytesToMilliseconds, 1,
+ PyDoc_STR("(long inRefNum) -> (long byteCount)")},
#endif /* __LP64__ */
- {NULL, NULL, 0}
+ {NULL, NULL, 0}
};
@@ -1061,62 +1061,62 @@ static PyMethodDef Snd_methods[] = {
static int
SndCh_CallCallBack(void *arg)
{
- SndChannelObject *p = (SndChannelObject *)arg;
- PyObject *args;
- PyObject *res;
- args = Py_BuildValue("(O(hhl))",
- p, p->ob_cmd.cmd, p->ob_cmd.param1, p->ob_cmd.param2);
- res = PyEval_CallObject(p->ob_callback, args);
- Py_DECREF(args);
- if (res == NULL)
- return -1;
- Py_DECREF(res);
- return 0;
+ SndChannelObject *p = (SndChannelObject *)arg;
+ PyObject *args;
+ PyObject *res;
+ args = Py_BuildValue("(O(hhl))",
+ p, p->ob_cmd.cmd, p->ob_cmd.param1, p->ob_cmd.param2);
+ res = PyEval_CallObject(p->ob_callback, args);
+ Py_DECREF(args);
+ if (res == NULL)
+ return -1;
+ Py_DECREF(res);
+ return 0;
}
/* Routine passed to NewSndChannel -- schedule a call to SndCh_CallCallBack */
static pascal void
SndCh_UserRoutine(SndChannelPtr chan, SndCommand *cmd)
{
- SndChannelObject *p = (SndChannelObject *)(chan->userInfo);
- if (p->ob_callback != NULL) {
- long A5 = SetA5(p->ob_A5);
- p->ob_cmd = *cmd;
- Py_AddPendingCall(SndCh_CallCallBack, (void *)p);
- SetA5(A5);
- }
+ SndChannelObject *p = (SndChannelObject *)(chan->userInfo);
+ if (p->ob_callback != NULL) {
+ long A5 = SetA5(p->ob_A5);
+ p->ob_cmd = *cmd;
+ Py_AddPendingCall(SndCh_CallCallBack, (void *)p);
+ SetA5(A5);
+ }
}
/* SPB callbacks - Schedule callbacks to Python */
static int
SPB_CallCallBack(void *arg)
{
- SPBObject *p = (SPBObject *)arg;
- PyObject *args;
- PyObject *res;
-
- if ( p->ob_thiscallback == 0 ) return 0;
- args = Py_BuildValue("(O)", p);
- res = PyEval_CallObject(p->ob_thiscallback, args);
- p->ob_thiscallback = 0;
- Py_DECREF(args);
- if (res == NULL)
- return -1;
- Py_DECREF(res);
- return 0;
+ SPBObject *p = (SPBObject *)arg;
+ PyObject *args;
+ PyObject *res;
+
+ if ( p->ob_thiscallback == 0 ) return 0;
+ args = Py_BuildValue("(O)", p);
+ res = PyEval_CallObject(p->ob_thiscallback, args);
+ p->ob_thiscallback = 0;
+ Py_DECREF(args);
+ if (res == NULL)
+ return -1;
+ Py_DECREF(res);
+ return 0;
}
static pascal void
SPB_completion(SPBPtr my_spb)
{
- SPBObject *p = (SPBObject *)(my_spb->userLong);
-
- if (p && p->ob_completion) {
- long A5 = SetA5(p->ob_A5);
- p->ob_thiscallback = p->ob_completion; /* Hope we cannot get two at the same time */
- Py_AddPendingCall(SPB_CallCallBack, (void *)p);
- SetA5(A5);
- }
+ SPBObject *p = (SPBObject *)(my_spb->userLong);
+
+ if (p && p->ob_completion) {
+ long A5 = SetA5(p->ob_A5);
+ p->ob_thiscallback = p->ob_completion; /* Hope we cannot get two at the same time */
+ Py_AddPendingCall(SPB_CallCallBack, (void *)p);
+ SetA5(A5);
+ }
}
#endif /* __LP64__ */
@@ -1124,38 +1124,38 @@ SPB_completion(SPBPtr my_spb)
void init_Snd(void)
{
- PyObject *m;
+ PyObject *m;
#ifndef __LP64__
- PyObject *d;
+ PyObject *d;
#endif /* __LP64__ */
- m = Py_InitModule("_Snd", Snd_methods);
+ m = Py_InitModule("_Snd", Snd_methods);
#ifndef __LP64__
- d = PyModule_GetDict(m);
- Snd_Error = PyMac_GetOSErrException();
- if (Snd_Error == NULL ||
- PyDict_SetItemString(d, "Error", Snd_Error) != 0)
- return;
- SndChannel_Type.ob_type = &PyType_Type;
- if (PyType_Ready(&SndChannel_Type) < 0) return;
- Py_INCREF(&SndChannel_Type);
- PyModule_AddObject(m, "SndChannel", (PyObject *)&SndChannel_Type);
- /* Backward-compatible name */
- Py_INCREF(&SndChannel_Type);
- PyModule_AddObject(m, "SndChannelType", (PyObject *)&SndChannel_Type);
- SPB_Type.ob_type = &PyType_Type;
- if (PyType_Ready(&SPB_Type) < 0) return;
- Py_INCREF(&SPB_Type);
+ d = PyModule_GetDict(m);
+ Snd_Error = PyMac_GetOSErrException();
+ if (Snd_Error == NULL ||
+ PyDict_SetItemString(d, "Error", Snd_Error) != 0)
+ return;
+ SndChannel_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&SndChannel_Type) < 0) return;
+ Py_INCREF(&SndChannel_Type);
+ PyModule_AddObject(m, "SndChannel", (PyObject *)&SndChannel_Type);
+ /* Backward-compatible name */
+ Py_INCREF(&SndChannel_Type);
+ PyModule_AddObject(m, "SndChannelType", (PyObject *)&SndChannel_Type);
+ SPB_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&SPB_Type) < 0) return;
+ Py_INCREF(&SPB_Type);
#if 0
- PyModule_AddObject(m, "SPB", (PyObject *)&SPB_Type);
+ PyModule_AddObject(m, "SPB", (PyObject *)&SPB_Type);
#endif
- /* Backward-compatible name */
- Py_INCREF(&SPB_Type);
- PyModule_AddObject(m, "SPBType", (PyObject *)&SPB_Type);
+ /* Backward-compatible name */
+ Py_INCREF(&SPB_Type);
+ PyModule_AddObject(m, "SPBType", (PyObject *)&SPB_Type);
#endif /* __LP64__ */
}
diff --git a/Mac/Modules/te/_TEmodule.c b/Mac/Modules/te/_TEmodule.c
index f182688..a998fc8 100644
--- a/Mac/Modules/te/_TEmodule.c
+++ b/Mac/Modules/te/_TEmodule.c
@@ -10,9 +10,9 @@
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
- PyErr_SetString(PyExc_NotImplementedError, \
- "Not available in this shared library/OS version"); \
- return NULL; \
+ PyErr_SetString(PyExc_NotImplementedError, \
+ "Not available in this shared library/OS version"); \
+ return NULL; \
}} while(0)
@@ -36,21 +36,21 @@ static PyObject *
TextStyle_New(TextStylePtr itself)
{
- return Py_BuildValue("lllO&", (long)itself->tsFont, (long)itself->tsFace, (long)itself->tsSize, QdRGB_New,
- &itself->tsColor);
+ return Py_BuildValue("lllO&", (long)itself->tsFont, (long)itself->tsFace, (long)itself->tsSize, QdRGB_New,
+ &itself->tsColor);
}
static int
TextStyle_Convert(PyObject *v, TextStylePtr p_itself)
{
- long font, face, size;
+ long font, face, size;
- if( !PyArg_ParseTuple(v, "lllO&", &font, &face, &size, QdRGB_Convert, &p_itself->tsColor) )
- return 0;
- p_itself->tsFont = (short)font;
- p_itself->tsFace = (Style)face;
- p_itself->tsSize = (short)size;
- return 1;
+ if( !PyArg_ParseTuple(v, "lllO&", &font, &face, &size, QdRGB_Convert, &p_itself->tsColor) )
+ return 0;
+ p_itself->tsFont = (short)font;
+ p_itself->tsFace = (Style)face;
+ p_itself->tsSize = (short)size;
+ return 1;
}
static PyObject *TE_Error;
@@ -62,917 +62,917 @@ PyTypeObject TE_Type;
#define TEObj_Check(x) ((x)->ob_type == &TE_Type || PyObject_TypeCheck((x), &TE_Type))
typedef struct TEObject {
- PyObject_HEAD
- TEHandle ob_itself;
+ PyObject_HEAD
+ TEHandle ob_itself;
} TEObject;
PyObject *TEObj_New(TEHandle itself)
{
- TEObject *it;
- if (itself == NULL) {
- PyErr_SetString(TE_Error,"Cannot create null TE");
- return NULL;
- }
- it = PyObject_NEW(TEObject, &TE_Type);
- if (it == NULL) return NULL;
- it->ob_itself = itself;
- return (PyObject *)it;
+ TEObject *it;
+ if (itself == NULL) {
+ PyErr_SetString(TE_Error,"Cannot create null TE");
+ return NULL;
+ }
+ it = PyObject_NEW(TEObject, &TE_Type);
+ if (it == NULL) return NULL;
+ it->ob_itself = itself;
+ return (PyObject *)it;
}
int TEObj_Convert(PyObject *v, TEHandle *p_itself)
{
- if (!TEObj_Check(v))
- {
- PyErr_SetString(PyExc_TypeError, "TE required");
- return 0;
- }
- *p_itself = ((TEObject *)v)->ob_itself;
- return 1;
+ if (!TEObj_Check(v))
+ {
+ PyErr_SetString(PyExc_TypeError, "TE required");
+ return 0;
+ }
+ *p_itself = ((TEObject *)v)->ob_itself;
+ return 1;
}
static void TEObj_dealloc(TEObject *self)
{
- TEDispose(self->ob_itself);
- self->ob_type->tp_free((PyObject *)self);
+ TEDispose(self->ob_itself);
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *TEObj_TESetText(TEObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- char *text__in__;
- long text__len__;
- int text__in_len__;
+ PyObject *_res = NULL;
+ char *text__in__;
+ long text__len__;
+ int text__in_len__;
#ifndef TESetText
- PyMac_PRECHECK(TESetText);
+ PyMac_PRECHECK(TESetText);
#endif
- if (!PyArg_ParseTuple(_args, "s#",
- &text__in__, &text__in_len__))
- return NULL;
- text__len__ = text__in_len__;
- TESetText(text__in__, text__len__,
- _self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "s#",
+ &text__in__, &text__in_len__))
+ return NULL;
+ text__len__ = text__in_len__;
+ TESetText(text__in__, text__len__,
+ _self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TEObj_TEGetText(TEObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CharsHandle _rv;
+ PyObject *_res = NULL;
+ CharsHandle _rv;
#ifndef TEGetText
- PyMac_PRECHECK(TEGetText);
+ PyMac_PRECHECK(TEGetText);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = TEGetText(_self->ob_itself);
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = TEGetText(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *TEObj_TEIdle(TEObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef TEIdle
- PyMac_PRECHECK(TEIdle);
+ PyMac_PRECHECK(TEIdle);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- TEIdle(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ TEIdle(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TEObj_TESetSelect(TEObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- long selStart;
- long selEnd;
+ PyObject *_res = NULL;
+ long selStart;
+ long selEnd;
#ifndef TESetSelect
- PyMac_PRECHECK(TESetSelect);
+ PyMac_PRECHECK(TESetSelect);
#endif
- if (!PyArg_ParseTuple(_args, "ll",
- &selStart,
- &selEnd))
- return NULL;
- TESetSelect(selStart,
- selEnd,
- _self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "ll",
+ &selStart,
+ &selEnd))
+ return NULL;
+ TESetSelect(selStart,
+ selEnd,
+ _self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TEObj_TEActivate(TEObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef TEActivate
- PyMac_PRECHECK(TEActivate);
+ PyMac_PRECHECK(TEActivate);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- TEActivate(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ TEActivate(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TEObj_TEDeactivate(TEObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef TEDeactivate
- PyMac_PRECHECK(TEDeactivate);
+ PyMac_PRECHECK(TEDeactivate);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- TEDeactivate(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ TEDeactivate(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TEObj_TEKey(TEObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CharParameter key;
+ PyObject *_res = NULL;
+ CharParameter key;
#ifndef TEKey
- PyMac_PRECHECK(TEKey);
+ PyMac_PRECHECK(TEKey);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &key))
- return NULL;
- TEKey(key,
- _self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &key))
+ return NULL;
+ TEKey(key,
+ _self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TEObj_TECut(TEObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef TECut
- PyMac_PRECHECK(TECut);
+ PyMac_PRECHECK(TECut);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- TECut(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ TECut(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TEObj_TECopy(TEObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef TECopy
- PyMac_PRECHECK(TECopy);
+ PyMac_PRECHECK(TECopy);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- TECopy(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ TECopy(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TEObj_TEPaste(TEObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef TEPaste
- PyMac_PRECHECK(TEPaste);
+ PyMac_PRECHECK(TEPaste);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- TEPaste(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ TEPaste(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TEObj_TEDelete(TEObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef TEDelete
- PyMac_PRECHECK(TEDelete);
+ PyMac_PRECHECK(TEDelete);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- TEDelete(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ TEDelete(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TEObj_TEInsert(TEObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- char *text__in__;
- long text__len__;
- int text__in_len__;
+ PyObject *_res = NULL;
+ char *text__in__;
+ long text__len__;
+ int text__in_len__;
#ifndef TEInsert
- PyMac_PRECHECK(TEInsert);
+ PyMac_PRECHECK(TEInsert);
#endif
- if (!PyArg_ParseTuple(_args, "s#",
- &text__in__, &text__in_len__))
- return NULL;
- text__len__ = text__in_len__;
- TEInsert(text__in__, text__len__,
- _self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "s#",
+ &text__in__, &text__in_len__))
+ return NULL;
+ text__len__ = text__in_len__;
+ TEInsert(text__in__, text__len__,
+ _self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TEObj_TESetAlignment(TEObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short just;
+ PyObject *_res = NULL;
+ short just;
#ifndef TESetAlignment
- PyMac_PRECHECK(TESetAlignment);
+ PyMac_PRECHECK(TESetAlignment);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &just))
- return NULL;
- TESetAlignment(just,
- _self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &just))
+ return NULL;
+ TESetAlignment(just,
+ _self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TEObj_TEUpdate(TEObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Rect rUpdate;
+ PyObject *_res = NULL;
+ Rect rUpdate;
#ifndef TEUpdate
- PyMac_PRECHECK(TEUpdate);
+ PyMac_PRECHECK(TEUpdate);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetRect, &rUpdate))
- return NULL;
- TEUpdate(&rUpdate,
- _self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetRect, &rUpdate))
+ return NULL;
+ TEUpdate(&rUpdate,
+ _self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TEObj_TEScroll(TEObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short dh;
- short dv;
+ PyObject *_res = NULL;
+ short dh;
+ short dv;
#ifndef TEScroll
- PyMac_PRECHECK(TEScroll);
+ PyMac_PRECHECK(TEScroll);
#endif
- if (!PyArg_ParseTuple(_args, "hh",
- &dh,
- &dv))
- return NULL;
- TEScroll(dh,
- dv,
- _self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "hh",
+ &dh,
+ &dv))
+ return NULL;
+ TEScroll(dh,
+ dv,
+ _self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TEObj_TESelView(TEObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef TESelView
- PyMac_PRECHECK(TESelView);
+ PyMac_PRECHECK(TESelView);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- TESelView(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ TESelView(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TEObj_TEPinScroll(TEObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short dh;
- short dv;
+ PyObject *_res = NULL;
+ short dh;
+ short dv;
#ifndef TEPinScroll
- PyMac_PRECHECK(TEPinScroll);
+ PyMac_PRECHECK(TEPinScroll);
#endif
- if (!PyArg_ParseTuple(_args, "hh",
- &dh,
- &dv))
- return NULL;
- TEPinScroll(dh,
- dv,
- _self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "hh",
+ &dh,
+ &dv))
+ return NULL;
+ TEPinScroll(dh,
+ dv,
+ _self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TEObj_TEAutoView(TEObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean fAuto;
+ PyObject *_res = NULL;
+ Boolean fAuto;
#ifndef TEAutoView
- PyMac_PRECHECK(TEAutoView);
+ PyMac_PRECHECK(TEAutoView);
#endif
- if (!PyArg_ParseTuple(_args, "b",
- &fAuto))
- return NULL;
- TEAutoView(fAuto,
- _self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "b",
+ &fAuto))
+ return NULL;
+ TEAutoView(fAuto,
+ _self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TEObj_TECalText(TEObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef TECalText
- PyMac_PRECHECK(TECalText);
+ PyMac_PRECHECK(TECalText);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- TECalText(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ TECalText(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TEObj_TEGetOffset(TEObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short _rv;
- Point pt;
+ PyObject *_res = NULL;
+ short _rv;
+ Point pt;
#ifndef TEGetOffset
- PyMac_PRECHECK(TEGetOffset);
+ PyMac_PRECHECK(TEGetOffset);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetPoint, &pt))
- return NULL;
- _rv = TEGetOffset(pt,
- _self->ob_itself);
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetPoint, &pt))
+ return NULL;
+ _rv = TEGetOffset(pt,
+ _self->ob_itself);
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *TEObj_TEGetPoint(TEObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Point _rv;
- short offset;
+ PyObject *_res = NULL;
+ Point _rv;
+ short offset;
#ifndef TEGetPoint
- PyMac_PRECHECK(TEGetPoint);
+ PyMac_PRECHECK(TEGetPoint);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &offset))
- return NULL;
- _rv = TEGetPoint(offset,
- _self->ob_itself);
- _res = Py_BuildValue("O&",
- PyMac_BuildPoint, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &offset))
+ return NULL;
+ _rv = TEGetPoint(offset,
+ _self->ob_itself);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildPoint, _rv);
+ return _res;
}
static PyObject *TEObj_TEClick(TEObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Point pt;
- Boolean fExtend;
+ PyObject *_res = NULL;
+ Point pt;
+ Boolean fExtend;
#ifndef TEClick
- PyMac_PRECHECK(TEClick);
+ PyMac_PRECHECK(TEClick);
#endif
- if (!PyArg_ParseTuple(_args, "O&b",
- PyMac_GetPoint, &pt,
- &fExtend))
- return NULL;
- TEClick(pt,
- fExtend,
- _self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&b",
+ PyMac_GetPoint, &pt,
+ &fExtend))
+ return NULL;
+ TEClick(pt,
+ fExtend,
+ _self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TEObj_TESetStyleHandle(TEObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- TEStyleHandle theHandle;
+ PyObject *_res = NULL;
+ TEStyleHandle theHandle;
#ifndef TESetStyleHandle
- PyMac_PRECHECK(TESetStyleHandle);
+ PyMac_PRECHECK(TESetStyleHandle);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &theHandle))
- return NULL;
- TESetStyleHandle(theHandle,
- _self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &theHandle))
+ return NULL;
+ TESetStyleHandle(theHandle,
+ _self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TEObj_TEGetStyleHandle(TEObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- TEStyleHandle _rv;
+ PyObject *_res = NULL;
+ TEStyleHandle _rv;
#ifndef TEGetStyleHandle
- PyMac_PRECHECK(TEGetStyleHandle);
+ PyMac_PRECHECK(TEGetStyleHandle);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = TEGetStyleHandle(_self->ob_itself);
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = TEGetStyleHandle(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *TEObj_TEGetStyle(TEObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short offset;
- TextStyle theStyle;
- short lineHeight;
- short fontAscent;
+ PyObject *_res = NULL;
+ short offset;
+ TextStyle theStyle;
+ short lineHeight;
+ short fontAscent;
#ifndef TEGetStyle
- PyMac_PRECHECK(TEGetStyle);
+ PyMac_PRECHECK(TEGetStyle);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &offset))
- return NULL;
- TEGetStyle(offset,
- &theStyle,
- &lineHeight,
- &fontAscent,
- _self->ob_itself);
- _res = Py_BuildValue("O&hh",
- TextStyle_New, &theStyle,
- lineHeight,
- fontAscent);
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &offset))
+ return NULL;
+ TEGetStyle(offset,
+ &theStyle,
+ &lineHeight,
+ &fontAscent,
+ _self->ob_itself);
+ _res = Py_BuildValue("O&hh",
+ TextStyle_New, &theStyle,
+ lineHeight,
+ fontAscent);
+ return _res;
}
static PyObject *TEObj_TEStylePaste(TEObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef TEStylePaste
- PyMac_PRECHECK(TEStylePaste);
+ PyMac_PRECHECK(TEStylePaste);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- TEStylePaste(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ TEStylePaste(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TEObj_TESetStyle(TEObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short mode;
- TextStyle newStyle;
- Boolean fRedraw;
+ PyObject *_res = NULL;
+ short mode;
+ TextStyle newStyle;
+ Boolean fRedraw;
#ifndef TESetStyle
- PyMac_PRECHECK(TESetStyle);
+ PyMac_PRECHECK(TESetStyle);
#endif
- if (!PyArg_ParseTuple(_args, "hO&b",
- &mode,
- TextStyle_Convert, &newStyle,
- &fRedraw))
- return NULL;
- TESetStyle(mode,
- &newStyle,
- fRedraw,
- _self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "hO&b",
+ &mode,
+ TextStyle_Convert, &newStyle,
+ &fRedraw))
+ return NULL;
+ TESetStyle(mode,
+ &newStyle,
+ fRedraw,
+ _self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TEObj_TEReplaceStyle(TEObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short mode;
- TextStyle oldStyle;
- TextStyle newStyle;
- Boolean fRedraw;
+ PyObject *_res = NULL;
+ short mode;
+ TextStyle oldStyle;
+ TextStyle newStyle;
+ Boolean fRedraw;
#ifndef TEReplaceStyle
- PyMac_PRECHECK(TEReplaceStyle);
+ PyMac_PRECHECK(TEReplaceStyle);
#endif
- if (!PyArg_ParseTuple(_args, "hO&O&b",
- &mode,
- TextStyle_Convert, &oldStyle,
- TextStyle_Convert, &newStyle,
- &fRedraw))
- return NULL;
- TEReplaceStyle(mode,
- &oldStyle,
- &newStyle,
- fRedraw,
- _self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "hO&O&b",
+ &mode,
+ TextStyle_Convert, &oldStyle,
+ TextStyle_Convert, &newStyle,
+ &fRedraw))
+ return NULL;
+ TEReplaceStyle(mode,
+ &oldStyle,
+ &newStyle,
+ fRedraw,
+ _self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TEObj_TEGetStyleScrapHandle(TEObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- StScrpHandle _rv;
+ PyObject *_res = NULL;
+ StScrpHandle _rv;
#ifndef TEGetStyleScrapHandle
- PyMac_PRECHECK(TEGetStyleScrapHandle);
+ PyMac_PRECHECK(TEGetStyleScrapHandle);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = TEGetStyleScrapHandle(_self->ob_itself);
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = TEGetStyleScrapHandle(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *TEObj_TEStyleInsert(TEObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- char *text__in__;
- long text__len__;
- int text__in_len__;
- StScrpHandle hST;
+ PyObject *_res = NULL;
+ char *text__in__;
+ long text__len__;
+ int text__in_len__;
+ StScrpHandle hST;
#ifndef TEStyleInsert
- PyMac_PRECHECK(TEStyleInsert);
+ PyMac_PRECHECK(TEStyleInsert);
#endif
- if (!PyArg_ParseTuple(_args, "s#O&",
- &text__in__, &text__in_len__,
- ResObj_Convert, &hST))
- return NULL;
- text__len__ = text__in_len__;
- TEStyleInsert(text__in__, text__len__,
- hST,
- _self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "s#O&",
+ &text__in__, &text__in_len__,
+ ResObj_Convert, &hST))
+ return NULL;
+ text__len__ = text__in_len__;
+ TEStyleInsert(text__in__, text__len__,
+ hST,
+ _self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TEObj_TEGetHeight(TEObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- long _rv;
- long endLine;
- long startLine;
+ PyObject *_res = NULL;
+ long _rv;
+ long endLine;
+ long startLine;
#ifndef TEGetHeight
- PyMac_PRECHECK(TEGetHeight);
+ PyMac_PRECHECK(TEGetHeight);
#endif
- if (!PyArg_ParseTuple(_args, "ll",
- &endLine,
- &startLine))
- return NULL;
- _rv = TEGetHeight(endLine,
- startLine,
- _self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "ll",
+ &endLine,
+ &startLine))
+ return NULL;
+ _rv = TEGetHeight(endLine,
+ startLine,
+ _self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *TEObj_TEContinuousStyle(TEObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- short mode;
- TextStyle aStyle;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ short mode;
+ TextStyle aStyle;
#ifndef TEContinuousStyle
- PyMac_PRECHECK(TEContinuousStyle);
+ PyMac_PRECHECK(TEContinuousStyle);
#endif
- if (!PyArg_ParseTuple(_args, "hO&",
- &mode,
- TextStyle_Convert, &aStyle))
- return NULL;
- _rv = TEContinuousStyle(&mode,
- &aStyle,
- _self->ob_itself);
- _res = Py_BuildValue("bhO&",
- _rv,
- mode,
- TextStyle_New, &aStyle);
- return _res;
+ if (!PyArg_ParseTuple(_args, "hO&",
+ &mode,
+ TextStyle_Convert, &aStyle))
+ return NULL;
+ _rv = TEContinuousStyle(&mode,
+ &aStyle,
+ _self->ob_itself);
+ _res = Py_BuildValue("bhO&",
+ _rv,
+ mode,
+ TextStyle_New, &aStyle);
+ return _res;
}
static PyObject *TEObj_TEUseStyleScrap(TEObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- long rangeStart;
- long rangeEnd;
- StScrpHandle newStyles;
- Boolean fRedraw;
+ PyObject *_res = NULL;
+ long rangeStart;
+ long rangeEnd;
+ StScrpHandle newStyles;
+ Boolean fRedraw;
#ifndef TEUseStyleScrap
- PyMac_PRECHECK(TEUseStyleScrap);
+ PyMac_PRECHECK(TEUseStyleScrap);
#endif
- if (!PyArg_ParseTuple(_args, "llO&b",
- &rangeStart,
- &rangeEnd,
- ResObj_Convert, &newStyles,
- &fRedraw))
- return NULL;
- TEUseStyleScrap(rangeStart,
- rangeEnd,
- newStyles,
- fRedraw,
- _self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "llO&b",
+ &rangeStart,
+ &rangeEnd,
+ ResObj_Convert, &newStyles,
+ &fRedraw))
+ return NULL;
+ TEUseStyleScrap(rangeStart,
+ rangeEnd,
+ newStyles,
+ fRedraw,
+ _self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TEObj_TENumStyles(TEObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- long _rv;
- long rangeStart;
- long rangeEnd;
+ PyObject *_res = NULL;
+ long _rv;
+ long rangeStart;
+ long rangeEnd;
#ifndef TENumStyles
- PyMac_PRECHECK(TENumStyles);
+ PyMac_PRECHECK(TENumStyles);
#endif
- if (!PyArg_ParseTuple(_args, "ll",
- &rangeStart,
- &rangeEnd))
- return NULL;
- _rv = TENumStyles(rangeStart,
- rangeEnd,
- _self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "ll",
+ &rangeStart,
+ &rangeEnd))
+ return NULL;
+ _rv = TENumStyles(rangeStart,
+ rangeEnd,
+ _self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *TEObj_TEFeatureFlag(TEObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short _rv;
- short feature;
- short action;
+ PyObject *_res = NULL;
+ short _rv;
+ short feature;
+ short action;
#ifndef TEFeatureFlag
- PyMac_PRECHECK(TEFeatureFlag);
+ PyMac_PRECHECK(TEFeatureFlag);
#endif
- if (!PyArg_ParseTuple(_args, "hh",
- &feature,
- &action))
- return NULL;
- _rv = TEFeatureFlag(feature,
- action,
- _self->ob_itself);
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "hh",
+ &feature,
+ &action))
+ return NULL;
+ _rv = TEFeatureFlag(feature,
+ action,
+ _self->ob_itself);
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *TEObj_TEGetHiliteRgn(TEObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
- RgnHandle region;
+ PyObject *_res = NULL;
+ OSErr _err;
+ RgnHandle region;
#ifndef TEGetHiliteRgn
- PyMac_PRECHECK(TEGetHiliteRgn);
+ PyMac_PRECHECK(TEGetHiliteRgn);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &region))
- return NULL;
- _err = TEGetHiliteRgn(region,
- _self->ob_itself);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &region))
+ return NULL;
+ _err = TEGetHiliteRgn(region,
+ _self->ob_itself);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TEObj_as_Resource(TEObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Handle _rv;
+ PyObject *_res = NULL;
+ Handle _rv;
#ifndef as_Resource
- PyMac_PRECHECK(as_Resource);
+ PyMac_PRECHECK(as_Resource);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = as_Resource(_self->ob_itself);
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = as_Resource(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyMethodDef TEObj_methods[] = {
- {"TESetText", (PyCFunction)TEObj_TESetText, 1,
- PyDoc_STR("(Buffer text) -> None")},
- {"TEGetText", (PyCFunction)TEObj_TEGetText, 1,
- PyDoc_STR("() -> (CharsHandle _rv)")},
- {"TEIdle", (PyCFunction)TEObj_TEIdle, 1,
- PyDoc_STR("() -> None")},
- {"TESetSelect", (PyCFunction)TEObj_TESetSelect, 1,
- PyDoc_STR("(long selStart, long selEnd) -> None")},
- {"TEActivate", (PyCFunction)TEObj_TEActivate, 1,
- PyDoc_STR("() -> None")},
- {"TEDeactivate", (PyCFunction)TEObj_TEDeactivate, 1,
- PyDoc_STR("() -> None")},
- {"TEKey", (PyCFunction)TEObj_TEKey, 1,
- PyDoc_STR("(CharParameter key) -> None")},
- {"TECut", (PyCFunction)TEObj_TECut, 1,
- PyDoc_STR("() -> None")},
- {"TECopy", (PyCFunction)TEObj_TECopy, 1,
- PyDoc_STR("() -> None")},
- {"TEPaste", (PyCFunction)TEObj_TEPaste, 1,
- PyDoc_STR("() -> None")},
- {"TEDelete", (PyCFunction)TEObj_TEDelete, 1,
- PyDoc_STR("() -> None")},
- {"TEInsert", (PyCFunction)TEObj_TEInsert, 1,
- PyDoc_STR("(Buffer text) -> None")},
- {"TESetAlignment", (PyCFunction)TEObj_TESetAlignment, 1,
- PyDoc_STR("(short just) -> None")},
- {"TEUpdate", (PyCFunction)TEObj_TEUpdate, 1,
- PyDoc_STR("(Rect rUpdate) -> None")},
- {"TEScroll", (PyCFunction)TEObj_TEScroll, 1,
- PyDoc_STR("(short dh, short dv) -> None")},
- {"TESelView", (PyCFunction)TEObj_TESelView, 1,
- PyDoc_STR("() -> None")},
- {"TEPinScroll", (PyCFunction)TEObj_TEPinScroll, 1,
- PyDoc_STR("(short dh, short dv) -> None")},
- {"TEAutoView", (PyCFunction)TEObj_TEAutoView, 1,
- PyDoc_STR("(Boolean fAuto) -> None")},
- {"TECalText", (PyCFunction)TEObj_TECalText, 1,
- PyDoc_STR("() -> None")},
- {"TEGetOffset", (PyCFunction)TEObj_TEGetOffset, 1,
- PyDoc_STR("(Point pt) -> (short _rv)")},
- {"TEGetPoint", (PyCFunction)TEObj_TEGetPoint, 1,
- PyDoc_STR("(short offset) -> (Point _rv)")},
- {"TEClick", (PyCFunction)TEObj_TEClick, 1,
- PyDoc_STR("(Point pt, Boolean fExtend) -> None")},
- {"TESetStyleHandle", (PyCFunction)TEObj_TESetStyleHandle, 1,
- PyDoc_STR("(TEStyleHandle theHandle) -> None")},
- {"TEGetStyleHandle", (PyCFunction)TEObj_TEGetStyleHandle, 1,
- PyDoc_STR("() -> (TEStyleHandle _rv)")},
- {"TEGetStyle", (PyCFunction)TEObj_TEGetStyle, 1,
- PyDoc_STR("(short offset) -> (TextStyle theStyle, short lineHeight, short fontAscent)")},
- {"TEStylePaste", (PyCFunction)TEObj_TEStylePaste, 1,
- PyDoc_STR("() -> None")},
- {"TESetStyle", (PyCFunction)TEObj_TESetStyle, 1,
- PyDoc_STR("(short mode, TextStyle newStyle, Boolean fRedraw) -> None")},
- {"TEReplaceStyle", (PyCFunction)TEObj_TEReplaceStyle, 1,
- PyDoc_STR("(short mode, TextStyle oldStyle, TextStyle newStyle, Boolean fRedraw) -> None")},
- {"TEGetStyleScrapHandle", (PyCFunction)TEObj_TEGetStyleScrapHandle, 1,
- PyDoc_STR("() -> (StScrpHandle _rv)")},
- {"TEStyleInsert", (PyCFunction)TEObj_TEStyleInsert, 1,
- PyDoc_STR("(Buffer text, StScrpHandle hST) -> None")},
- {"TEGetHeight", (PyCFunction)TEObj_TEGetHeight, 1,
- PyDoc_STR("(long endLine, long startLine) -> (long _rv)")},
- {"TEContinuousStyle", (PyCFunction)TEObj_TEContinuousStyle, 1,
- PyDoc_STR("(short mode, TextStyle aStyle) -> (Boolean _rv, short mode, TextStyle aStyle)")},
- {"TEUseStyleScrap", (PyCFunction)TEObj_TEUseStyleScrap, 1,
- PyDoc_STR("(long rangeStart, long rangeEnd, StScrpHandle newStyles, Boolean fRedraw) -> None")},
- {"TENumStyles", (PyCFunction)TEObj_TENumStyles, 1,
- PyDoc_STR("(long rangeStart, long rangeEnd) -> (long _rv)")},
- {"TEFeatureFlag", (PyCFunction)TEObj_TEFeatureFlag, 1,
- PyDoc_STR("(short feature, short action) -> (short _rv)")},
- {"TEGetHiliteRgn", (PyCFunction)TEObj_TEGetHiliteRgn, 1,
- PyDoc_STR("(RgnHandle region) -> None")},
- {"as_Resource", (PyCFunction)TEObj_as_Resource, 1,
- PyDoc_STR("() -> (Handle _rv)")},
- {NULL, NULL, 0}
+ {"TESetText", (PyCFunction)TEObj_TESetText, 1,
+ PyDoc_STR("(Buffer text) -> None")},
+ {"TEGetText", (PyCFunction)TEObj_TEGetText, 1,
+ PyDoc_STR("() -> (CharsHandle _rv)")},
+ {"TEIdle", (PyCFunction)TEObj_TEIdle, 1,
+ PyDoc_STR("() -> None")},
+ {"TESetSelect", (PyCFunction)TEObj_TESetSelect, 1,
+ PyDoc_STR("(long selStart, long selEnd) -> None")},
+ {"TEActivate", (PyCFunction)TEObj_TEActivate, 1,
+ PyDoc_STR("() -> None")},
+ {"TEDeactivate", (PyCFunction)TEObj_TEDeactivate, 1,
+ PyDoc_STR("() -> None")},
+ {"TEKey", (PyCFunction)TEObj_TEKey, 1,
+ PyDoc_STR("(CharParameter key) -> None")},
+ {"TECut", (PyCFunction)TEObj_TECut, 1,
+ PyDoc_STR("() -> None")},
+ {"TECopy", (PyCFunction)TEObj_TECopy, 1,
+ PyDoc_STR("() -> None")},
+ {"TEPaste", (PyCFunction)TEObj_TEPaste, 1,
+ PyDoc_STR("() -> None")},
+ {"TEDelete", (PyCFunction)TEObj_TEDelete, 1,
+ PyDoc_STR("() -> None")},
+ {"TEInsert", (PyCFunction)TEObj_TEInsert, 1,
+ PyDoc_STR("(Buffer text) -> None")},
+ {"TESetAlignment", (PyCFunction)TEObj_TESetAlignment, 1,
+ PyDoc_STR("(short just) -> None")},
+ {"TEUpdate", (PyCFunction)TEObj_TEUpdate, 1,
+ PyDoc_STR("(Rect rUpdate) -> None")},
+ {"TEScroll", (PyCFunction)TEObj_TEScroll, 1,
+ PyDoc_STR("(short dh, short dv) -> None")},
+ {"TESelView", (PyCFunction)TEObj_TESelView, 1,
+ PyDoc_STR("() -> None")},
+ {"TEPinScroll", (PyCFunction)TEObj_TEPinScroll, 1,
+ PyDoc_STR("(short dh, short dv) -> None")},
+ {"TEAutoView", (PyCFunction)TEObj_TEAutoView, 1,
+ PyDoc_STR("(Boolean fAuto) -> None")},
+ {"TECalText", (PyCFunction)TEObj_TECalText, 1,
+ PyDoc_STR("() -> None")},
+ {"TEGetOffset", (PyCFunction)TEObj_TEGetOffset, 1,
+ PyDoc_STR("(Point pt) -> (short _rv)")},
+ {"TEGetPoint", (PyCFunction)TEObj_TEGetPoint, 1,
+ PyDoc_STR("(short offset) -> (Point _rv)")},
+ {"TEClick", (PyCFunction)TEObj_TEClick, 1,
+ PyDoc_STR("(Point pt, Boolean fExtend) -> None")},
+ {"TESetStyleHandle", (PyCFunction)TEObj_TESetStyleHandle, 1,
+ PyDoc_STR("(TEStyleHandle theHandle) -> None")},
+ {"TEGetStyleHandle", (PyCFunction)TEObj_TEGetStyleHandle, 1,
+ PyDoc_STR("() -> (TEStyleHandle _rv)")},
+ {"TEGetStyle", (PyCFunction)TEObj_TEGetStyle, 1,
+ PyDoc_STR("(short offset) -> (TextStyle theStyle, short lineHeight, short fontAscent)")},
+ {"TEStylePaste", (PyCFunction)TEObj_TEStylePaste, 1,
+ PyDoc_STR("() -> None")},
+ {"TESetStyle", (PyCFunction)TEObj_TESetStyle, 1,
+ PyDoc_STR("(short mode, TextStyle newStyle, Boolean fRedraw) -> None")},
+ {"TEReplaceStyle", (PyCFunction)TEObj_TEReplaceStyle, 1,
+ PyDoc_STR("(short mode, TextStyle oldStyle, TextStyle newStyle, Boolean fRedraw) -> None")},
+ {"TEGetStyleScrapHandle", (PyCFunction)TEObj_TEGetStyleScrapHandle, 1,
+ PyDoc_STR("() -> (StScrpHandle _rv)")},
+ {"TEStyleInsert", (PyCFunction)TEObj_TEStyleInsert, 1,
+ PyDoc_STR("(Buffer text, StScrpHandle hST) -> None")},
+ {"TEGetHeight", (PyCFunction)TEObj_TEGetHeight, 1,
+ PyDoc_STR("(long endLine, long startLine) -> (long _rv)")},
+ {"TEContinuousStyle", (PyCFunction)TEObj_TEContinuousStyle, 1,
+ PyDoc_STR("(short mode, TextStyle aStyle) -> (Boolean _rv, short mode, TextStyle aStyle)")},
+ {"TEUseStyleScrap", (PyCFunction)TEObj_TEUseStyleScrap, 1,
+ PyDoc_STR("(long rangeStart, long rangeEnd, StScrpHandle newStyles, Boolean fRedraw) -> None")},
+ {"TENumStyles", (PyCFunction)TEObj_TENumStyles, 1,
+ PyDoc_STR("(long rangeStart, long rangeEnd) -> (long _rv)")},
+ {"TEFeatureFlag", (PyCFunction)TEObj_TEFeatureFlag, 1,
+ PyDoc_STR("(short feature, short action) -> (short _rv)")},
+ {"TEGetHiliteRgn", (PyCFunction)TEObj_TEGetHiliteRgn, 1,
+ PyDoc_STR("(RgnHandle region) -> None")},
+ {"as_Resource", (PyCFunction)TEObj_as_Resource, 1,
+ PyDoc_STR("() -> (Handle _rv)")},
+ {NULL, NULL, 0}
};
static PyObject *TEObj_get_destRect(TEObject *self, void *closure)
{
- return Py_BuildValue("O&", PyMac_BuildRect, &(*self->ob_itself)->destRect);
+ return Py_BuildValue("O&", PyMac_BuildRect, &(*self->ob_itself)->destRect);
}
#define TEObj_set_destRect NULL
static PyObject *TEObj_get_viewRect(TEObject *self, void *closure)
{
- return Py_BuildValue("O&", PyMac_BuildRect, &(*self->ob_itself)->viewRect);
+ return Py_BuildValue("O&", PyMac_BuildRect, &(*self->ob_itself)->viewRect);
}
#define TEObj_set_viewRect NULL
static PyObject *TEObj_get_selRect(TEObject *self, void *closure)
{
- return Py_BuildValue("O&", PyMac_BuildRect, &(*self->ob_itself)->selRect);
+ return Py_BuildValue("O&", PyMac_BuildRect, &(*self->ob_itself)->selRect);
}
#define TEObj_set_selRect NULL
static PyObject *TEObj_get_lineHeight(TEObject *self, void *closure)
{
- return Py_BuildValue("h", (*self->ob_itself)->lineHeight);
+ return Py_BuildValue("h", (*self->ob_itself)->lineHeight);
}
#define TEObj_set_lineHeight NULL
static PyObject *TEObj_get_fontAscent(TEObject *self, void *closure)
{
- return Py_BuildValue("h", (*self->ob_itself)->fontAscent);
+ return Py_BuildValue("h", (*self->ob_itself)->fontAscent);
}
#define TEObj_set_fontAscent NULL
static PyObject *TEObj_get_selPoint(TEObject *self, void *closure)
{
- return Py_BuildValue("O&", PyMac_BuildPoint, (*self->ob_itself)->selPoint);
+ return Py_BuildValue("O&", PyMac_BuildPoint, (*self->ob_itself)->selPoint);
}
#define TEObj_set_selPoint NULL
static PyObject *TEObj_get_selStart(TEObject *self, void *closure)
{
- return Py_BuildValue("h", (*self->ob_itself)->selStart);
+ return Py_BuildValue("h", (*self->ob_itself)->selStart);
}
#define TEObj_set_selStart NULL
static PyObject *TEObj_get_selEnd(TEObject *self, void *closure)
{
- return Py_BuildValue("h", (*self->ob_itself)->selEnd);
+ return Py_BuildValue("h", (*self->ob_itself)->selEnd);
}
#define TEObj_set_selEnd NULL
static PyObject *TEObj_get_active(TEObject *self, void *closure)
{
- return Py_BuildValue("h", (*self->ob_itself)->active);
+ return Py_BuildValue("h", (*self->ob_itself)->active);
}
#define TEObj_set_active NULL
static PyObject *TEObj_get_just(TEObject *self, void *closure)
{
- return Py_BuildValue("h", (*self->ob_itself)->just);
+ return Py_BuildValue("h", (*self->ob_itself)->just);
}
#define TEObj_set_just NULL
static PyObject *TEObj_get_teLength(TEObject *self, void *closure)
{
- return Py_BuildValue("h", (*self->ob_itself)->teLength);
+ return Py_BuildValue("h", (*self->ob_itself)->teLength);
}
#define TEObj_set_teLength NULL
static PyObject *TEObj_get_txFont(TEObject *self, void *closure)
{
- return Py_BuildValue("h", (*self->ob_itself)->txFont);
+ return Py_BuildValue("h", (*self->ob_itself)->txFont);
}
#define TEObj_set_txFont NULL
static PyObject *TEObj_get_txFace(TEObject *self, void *closure)
{
- return Py_BuildValue("h", (*self->ob_itself)->txFace);
+ return Py_BuildValue("h", (*self->ob_itself)->txFace);
}
#define TEObj_set_txFace NULL
static PyObject *TEObj_get_txMode(TEObject *self, void *closure)
{
- return Py_BuildValue("h", (*self->ob_itself)->txMode);
+ return Py_BuildValue("h", (*self->ob_itself)->txMode);
}
#define TEObj_set_txMode NULL
static PyObject *TEObj_get_txSize(TEObject *self, void *closure)
{
- return Py_BuildValue("h", (*self->ob_itself)->txSize);
+ return Py_BuildValue("h", (*self->ob_itself)->txSize);
}
#define TEObj_set_txSize NULL
static PyObject *TEObj_get_nLines(TEObject *self, void *closure)
{
- return Py_BuildValue("h", (*self->ob_itself)->nLines);
+ return Py_BuildValue("h", (*self->ob_itself)->nLines);
}
#define TEObj_set_nLines NULL
static PyGetSetDef TEObj_getsetlist[] = {
- {"destRect", (getter)TEObj_get_destRect, (setter)TEObj_set_destRect, "Destination rectangle"},
- {"viewRect", (getter)TEObj_get_viewRect, (setter)TEObj_set_viewRect, "Viewing rectangle"},
- {"selRect", (getter)TEObj_get_selRect, (setter)TEObj_set_selRect, "Selection rectangle"},
- {"lineHeight", (getter)TEObj_get_lineHeight, (setter)TEObj_set_lineHeight, "Height of a line"},
- {"fontAscent", (getter)TEObj_get_fontAscent, (setter)TEObj_set_fontAscent, "Ascent of a line"},
- {"selPoint", (getter)TEObj_get_selPoint, (setter)TEObj_set_selPoint, "Selection Point"},
- {"selStart", (getter)TEObj_get_selStart, (setter)TEObj_set_selStart, "Start of selection"},
- {"selEnd", (getter)TEObj_get_selEnd, (setter)TEObj_set_selEnd, "End of selection"},
- {"active", (getter)TEObj_get_active, (setter)TEObj_set_active, "TBD"},
- {"just", (getter)TEObj_get_just, (setter)TEObj_set_just, "Justification"},
- {"teLength", (getter)TEObj_get_teLength, (setter)TEObj_set_teLength, "TBD"},
- {"txFont", (getter)TEObj_get_txFont, (setter)TEObj_set_txFont, "Current font"},
- {"txFace", (getter)TEObj_get_txFace, (setter)TEObj_set_txFace, "Current font variant"},
- {"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"},
- {"nLines", (getter)TEObj_get_nLines, (setter)TEObj_set_nLines, "TBD"},
- {NULL, NULL, NULL, NULL},
+ {"destRect", (getter)TEObj_get_destRect, (setter)TEObj_set_destRect, "Destination rectangle"},
+ {"viewRect", (getter)TEObj_get_viewRect, (setter)TEObj_set_viewRect, "Viewing rectangle"},
+ {"selRect", (getter)TEObj_get_selRect, (setter)TEObj_set_selRect, "Selection rectangle"},
+ {"lineHeight", (getter)TEObj_get_lineHeight, (setter)TEObj_set_lineHeight, "Height of a line"},
+ {"fontAscent", (getter)TEObj_get_fontAscent, (setter)TEObj_set_fontAscent, "Ascent of a line"},
+ {"selPoint", (getter)TEObj_get_selPoint, (setter)TEObj_set_selPoint, "Selection Point"},
+ {"selStart", (getter)TEObj_get_selStart, (setter)TEObj_set_selStart, "Start of selection"},
+ {"selEnd", (getter)TEObj_get_selEnd, (setter)TEObj_set_selEnd, "End of selection"},
+ {"active", (getter)TEObj_get_active, (setter)TEObj_set_active, "TBD"},
+ {"just", (getter)TEObj_get_just, (setter)TEObj_set_just, "Justification"},
+ {"teLength", (getter)TEObj_get_teLength, (setter)TEObj_set_teLength, "TBD"},
+ {"txFont", (getter)TEObj_get_txFont, (setter)TEObj_set_txFont, "Current font"},
+ {"txFace", (getter)TEObj_get_txFace, (setter)TEObj_set_txFace, "Current font variant"},
+ {"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"},
+ {"nLines", (getter)TEObj_get_nLines, (setter)TEObj_set_nLines, "TBD"},
+ {NULL, NULL, NULL, NULL},
};
@@ -987,61 +987,61 @@ static PyGetSetDef TEObj_getsetlist[] = {
static PyObject *TEObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
- PyObject *_self;
- TEHandle itself;
- char *kw[] = {"itself", 0};
+ 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;
+ 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 = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
- "_TE.TE", /*tp_name*/
- sizeof(TEObject), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- /* methods */
- (destructor) TEObj_dealloc, /*tp_dealloc*/
- 0, /*tp_print*/
- (getattrfunc)0, /*tp_getattr*/
- (setattrfunc)0, /*tp_setattr*/
- (cmpfunc) TEObj_compare, /*tp_compare*/
- (reprfunc) TEObj_repr, /*tp_repr*/
- (PyNumberMethods *)0, /* tp_as_number */
- (PySequenceMethods *)0, /* tp_as_sequence */
- (PyMappingMethods *)0, /* tp_as_mapping */
- (hashfunc) TEObj_hash, /*tp_hash*/
- 0, /*tp_call*/
- 0, /*tp_str*/
- PyObject_GenericGetAttr, /*tp_getattro*/
- PyObject_GenericSetAttr, /*tp_setattro */
- 0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
- 0, /*tp_doc*/
- 0, /*tp_traverse*/
- 0, /*tp_clear*/
- 0, /*tp_richcompare*/
- 0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
- 0, /*tp_iternext*/
- TEObj_methods, /* tp_methods */
- 0, /*tp_members*/
- TEObj_getsetlist, /*tp_getset*/
- 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 */
+ PyObject_HEAD_INIT(NULL)
+ 0, /*ob_size*/
+ "_TE.TE", /*tp_name*/
+ sizeof(TEObject), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ /* methods */
+ (destructor) TEObj_dealloc, /*tp_dealloc*/
+ 0, /*tp_print*/
+ (getattrfunc)0, /*tp_getattr*/
+ (setattrfunc)0, /*tp_setattr*/
+ (cmpfunc) TEObj_compare, /*tp_compare*/
+ (reprfunc) TEObj_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) TEObj_hash, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ PyObject_GenericGetAttr, /*tp_getattro*/
+ PyObject_GenericSetAttr, /*tp_setattro */
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
+ 0, /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ TEObj_methods, /* tp_methods */
+ 0, /*tp_members*/
+ TEObj_getsetlist, /*tp_getset*/
+ 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 ----------------------- */
@@ -1049,257 +1049,257 @@ PyTypeObject TE_Type = {
static PyObject *TE_TEScrapHandle(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Handle _rv;
+ PyObject *_res = NULL;
+ Handle _rv;
#ifndef TEScrapHandle
- PyMac_PRECHECK(TEScrapHandle);
+ PyMac_PRECHECK(TEScrapHandle);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = TEScrapHandle();
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = TEScrapHandle();
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *TE_TEGetScrapLength(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- long _rv;
+ PyObject *_res = NULL;
+ long _rv;
#ifndef TEGetScrapLength
- PyMac_PRECHECK(TEGetScrapLength);
+ PyMac_PRECHECK(TEGetScrapLength);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = TEGetScrapLength();
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = TEGetScrapLength();
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *TE_TENew(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- TEHandle _rv;
- Rect destRect;
- Rect viewRect;
+ PyObject *_res = NULL;
+ TEHandle _rv;
+ Rect destRect;
+ Rect viewRect;
#ifndef TENew
- PyMac_PRECHECK(TENew);
+ PyMac_PRECHECK(TENew);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- PyMac_GetRect, &destRect,
- PyMac_GetRect, &viewRect))
- return NULL;
- _rv = TENew(&destRect,
- &viewRect);
- _res = Py_BuildValue("O&",
- TEObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ PyMac_GetRect, &destRect,
+ PyMac_GetRect, &viewRect))
+ return NULL;
+ _rv = TENew(&destRect,
+ &viewRect);
+ _res = Py_BuildValue("O&",
+ TEObj_New, _rv);
+ return _res;
}
static PyObject *TE_TETextBox(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- char *text__in__;
- long text__len__;
- int text__in_len__;
- Rect box;
- short just;
+ PyObject *_res = NULL;
+ char *text__in__;
+ long text__len__;
+ int text__in_len__;
+ Rect box;
+ short just;
#ifndef TETextBox
- PyMac_PRECHECK(TETextBox);
+ PyMac_PRECHECK(TETextBox);
#endif
- if (!PyArg_ParseTuple(_args, "s#O&h",
- &text__in__, &text__in_len__,
- PyMac_GetRect, &box,
- &just))
- return NULL;
- text__len__ = text__in_len__;
- TETextBox(text__in__, text__len__,
- &box,
- just);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "s#O&h",
+ &text__in__, &text__in_len__,
+ PyMac_GetRect, &box,
+ &just))
+ return NULL;
+ text__len__ = text__in_len__;
+ TETextBox(text__in__, text__len__,
+ &box,
+ just);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TE_TEStyleNew(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- TEHandle _rv;
- Rect destRect;
- Rect viewRect;
+ PyObject *_res = NULL;
+ TEHandle _rv;
+ Rect destRect;
+ Rect viewRect;
#ifndef TEStyleNew
- PyMac_PRECHECK(TEStyleNew);
+ PyMac_PRECHECK(TEStyleNew);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- PyMac_GetRect, &destRect,
- PyMac_GetRect, &viewRect))
- return NULL;
- _rv = TEStyleNew(&destRect,
- &viewRect);
- _res = Py_BuildValue("O&",
- TEObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ PyMac_GetRect, &destRect,
+ PyMac_GetRect, &viewRect))
+ return NULL;
+ _rv = TEStyleNew(&destRect,
+ &viewRect);
+ _res = Py_BuildValue("O&",
+ TEObj_New, _rv);
+ return _res;
}
static PyObject *TE_TESetScrapLength(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- long length;
+ PyObject *_res = NULL;
+ long length;
#ifndef TESetScrapLength
- PyMac_PRECHECK(TESetScrapLength);
+ PyMac_PRECHECK(TESetScrapLength);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &length))
- return NULL;
- TESetScrapLength(length);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &length))
+ return NULL;
+ TESetScrapLength(length);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TE_TEFromScrap(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
+ PyObject *_res = NULL;
+ OSErr _err;
#ifndef TEFromScrap
- PyMac_PRECHECK(TEFromScrap);
+ PyMac_PRECHECK(TEFromScrap);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = TEFromScrap();
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = TEFromScrap();
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TE_TEToScrap(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSErr _err;
+ PyObject *_res = NULL;
+ OSErr _err;
#ifndef TEToScrap
- PyMac_PRECHECK(TEToScrap);
+ PyMac_PRECHECK(TEToScrap);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = TEToScrap();
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = TEToScrap();
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TE_TEGetScrapHandle(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Handle _rv;
+ PyObject *_res = NULL;
+ Handle _rv;
#ifndef TEGetScrapHandle
- PyMac_PRECHECK(TEGetScrapHandle);
+ PyMac_PRECHECK(TEGetScrapHandle);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = TEGetScrapHandle();
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = TEGetScrapHandle();
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *TE_TESetScrapHandle(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Handle value;
+ PyObject *_res = NULL;
+ Handle value;
#ifndef TESetScrapHandle
- PyMac_PRECHECK(TESetScrapHandle);
+ PyMac_PRECHECK(TESetScrapHandle);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &value))
- return NULL;
- TESetScrapHandle(value);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &value))
+ return NULL;
+ TESetScrapHandle(value);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TE_LMGetWordRedraw(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- UInt8 _rv;
+ PyObject *_res = NULL;
+ UInt8 _rv;
#ifndef LMGetWordRedraw
- PyMac_PRECHECK(LMGetWordRedraw);
+ PyMac_PRECHECK(LMGetWordRedraw);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = LMGetWordRedraw();
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = LMGetWordRedraw();
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *TE_LMSetWordRedraw(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- UInt8 value;
+ PyObject *_res = NULL;
+ UInt8 value;
#ifndef LMSetWordRedraw
- PyMac_PRECHECK(LMSetWordRedraw);
+ PyMac_PRECHECK(LMSetWordRedraw);
#endif
- if (!PyArg_ParseTuple(_args, "b",
- &value))
- return NULL;
- LMSetWordRedraw(value);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "b",
+ &value))
+ return NULL;
+ LMSetWordRedraw(value);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *TE_as_TE(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- TEHandle _rv;
- Handle h;
+ PyObject *_res = NULL;
+ TEHandle _rv;
+ Handle h;
#ifndef as_TE
- PyMac_PRECHECK(as_TE);
+ PyMac_PRECHECK(as_TE);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &h))
- return NULL;
- _rv = as_TE(h);
- _res = Py_BuildValue("O&",
- TEObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &h))
+ return NULL;
+ _rv = as_TE(h);
+ _res = Py_BuildValue("O&",
+ TEObj_New, _rv);
+ return _res;
}
#endif /* __LP64__ */
static PyMethodDef TE_methods[] = {
#ifndef __LP64__
- {"TEScrapHandle", (PyCFunction)TE_TEScrapHandle, 1,
- PyDoc_STR("() -> (Handle _rv)")},
- {"TEGetScrapLength", (PyCFunction)TE_TEGetScrapLength, 1,
- PyDoc_STR("() -> (long _rv)")},
- {"TENew", (PyCFunction)TE_TENew, 1,
- PyDoc_STR("(Rect destRect, Rect viewRect) -> (TEHandle _rv)")},
- {"TETextBox", (PyCFunction)TE_TETextBox, 1,
- PyDoc_STR("(Buffer text, Rect box, short just) -> None")},
- {"TEStyleNew", (PyCFunction)TE_TEStyleNew, 1,
- PyDoc_STR("(Rect destRect, Rect viewRect) -> (TEHandle _rv)")},
- {"TESetScrapLength", (PyCFunction)TE_TESetScrapLength, 1,
- PyDoc_STR("(long length) -> None")},
- {"TEFromScrap", (PyCFunction)TE_TEFromScrap, 1,
- PyDoc_STR("() -> None")},
- {"TEToScrap", (PyCFunction)TE_TEToScrap, 1,
- PyDoc_STR("() -> None")},
- {"TEGetScrapHandle", (PyCFunction)TE_TEGetScrapHandle, 1,
- PyDoc_STR("() -> (Handle _rv)")},
- {"TESetScrapHandle", (PyCFunction)TE_TESetScrapHandle, 1,
- PyDoc_STR("(Handle value) -> None")},
- {"LMGetWordRedraw", (PyCFunction)TE_LMGetWordRedraw, 1,
- PyDoc_STR("() -> (UInt8 _rv)")},
- {"LMSetWordRedraw", (PyCFunction)TE_LMSetWordRedraw, 1,
- PyDoc_STR("(UInt8 value) -> None")},
- {"as_TE", (PyCFunction)TE_as_TE, 1,
- PyDoc_STR("(Handle h) -> (TEHandle _rv)")},
+ {"TEScrapHandle", (PyCFunction)TE_TEScrapHandle, 1,
+ PyDoc_STR("() -> (Handle _rv)")},
+ {"TEGetScrapLength", (PyCFunction)TE_TEGetScrapLength, 1,
+ PyDoc_STR("() -> (long _rv)")},
+ {"TENew", (PyCFunction)TE_TENew, 1,
+ PyDoc_STR("(Rect destRect, Rect viewRect) -> (TEHandle _rv)")},
+ {"TETextBox", (PyCFunction)TE_TETextBox, 1,
+ PyDoc_STR("(Buffer text, Rect box, short just) -> None")},
+ {"TEStyleNew", (PyCFunction)TE_TEStyleNew, 1,
+ PyDoc_STR("(Rect destRect, Rect viewRect) -> (TEHandle _rv)")},
+ {"TESetScrapLength", (PyCFunction)TE_TESetScrapLength, 1,
+ PyDoc_STR("(long length) -> None")},
+ {"TEFromScrap", (PyCFunction)TE_TEFromScrap, 1,
+ PyDoc_STR("() -> None")},
+ {"TEToScrap", (PyCFunction)TE_TEToScrap, 1,
+ PyDoc_STR("() -> None")},
+ {"TEGetScrapHandle", (PyCFunction)TE_TEGetScrapHandle, 1,
+ PyDoc_STR("() -> (Handle _rv)")},
+ {"TESetScrapHandle", (PyCFunction)TE_TESetScrapHandle, 1,
+ PyDoc_STR("(Handle value) -> None")},
+ {"LMGetWordRedraw", (PyCFunction)TE_LMGetWordRedraw, 1,
+ PyDoc_STR("() -> (UInt8 _rv)")},
+ {"LMSetWordRedraw", (PyCFunction)TE_LMSetWordRedraw, 1,
+ PyDoc_STR("(UInt8 value) -> None")},
+ {"as_TE", (PyCFunction)TE_as_TE, 1,
+ PyDoc_STR("(Handle h) -> (TEHandle _rv)")},
#endif /* __LP64__ */
- {NULL, NULL, 0}
+ {NULL, NULL, 0}
};
@@ -1307,31 +1307,31 @@ static PyMethodDef TE_methods[] = {
void init_TE(void)
{
- PyObject *m;
+ PyObject *m;
#ifndef __LP64__
- PyObject *d;
+ PyObject *d;
- PyMac_INIT_TOOLBOX_OBJECT_NEW(TEHandle, TEObj_New);
- PyMac_INIT_TOOLBOX_OBJECT_CONVERT(TEHandle, TEObj_Convert);
+ PyMac_INIT_TOOLBOX_OBJECT_NEW(TEHandle, TEObj_New);
+ PyMac_INIT_TOOLBOX_OBJECT_CONVERT(TEHandle, TEObj_Convert);
#endif /* __LP64__ */
- m = Py_InitModule("_TE", TE_methods);
+ m = Py_InitModule("_TE", TE_methods);
#ifndef __LP64__
- d = PyModule_GetDict(m);
- TE_Error = PyMac_GetOSErrException();
- if (TE_Error == NULL ||
- PyDict_SetItemString(d, "Error", TE_Error) != 0)
- return;
- TE_Type.ob_type = &PyType_Type;
- if (PyType_Ready(&TE_Type) < 0) return;
- Py_INCREF(&TE_Type);
- PyModule_AddObject(m, "TE", (PyObject *)&TE_Type);
- /* Backward-compatible name */
- Py_INCREF(&TE_Type);
- PyModule_AddObject(m, "TEType", (PyObject *)&TE_Type);
+ d = PyModule_GetDict(m);
+ TE_Error = PyMac_GetOSErrException();
+ if (TE_Error == NULL ||
+ PyDict_SetItemString(d, "Error", TE_Error) != 0)
+ return;
+ TE_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&TE_Type) < 0) return;
+ Py_INCREF(&TE_Type);
+ PyModule_AddObject(m, "TE", (PyObject *)&TE_Type);
+ /* Backward-compatible name */
+ Py_INCREF(&TE_Type);
+ PyModule_AddObject(m, "TEType", (PyObject *)&TE_Type);
#endif /* __LP64__ */
}
diff --git a/Mac/Modules/win/_Winmodule.c b/Mac/Modules/win/_Winmodule.c
index 87f7591..89233ed 100644
--- a/Mac/Modules/win/_Winmodule.c
+++ b/Mac/Modules/win/_Winmodule.c
@@ -9,9 +9,9 @@
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
- PyErr_SetString(PyExc_NotImplementedError, \
- "Not available in this shared library/OS version"); \
- return NULL; \
+ PyErr_SetString(PyExc_NotImplementedError, \
+ "Not available in this shared library/OS version"); \
+ return NULL; \
}} while(0)
@@ -36,7 +36,7 @@ extern int _WinObj_Convert(PyObject *, WindowRef *);
static void
PyMac_AutoDisposeWindow(WindowPtr w)
{
- DisposeWindow(w);
+ DisposeWindow(w);
}
static PyObject *Win_Error;
@@ -48,2522 +48,2522 @@ PyTypeObject Window_Type;
#define WinObj_Check(x) ((x)->ob_type == &Window_Type || PyObject_TypeCheck((x), &Window_Type))
typedef struct WindowObject {
- PyObject_HEAD
- WindowPtr ob_itself;
- void (*ob_freeit)(WindowPtr ptr);
+ PyObject_HEAD
+ WindowPtr ob_itself;
+ void (*ob_freeit)(WindowPtr ptr);
} WindowObject;
PyObject *WinObj_New(WindowPtr itself)
{
- WindowObject *it;
- if (itself == NULL) return PyMac_Error(resNotFound);
- /* XXXX Or should we use WhichWindow code here? */
- it = PyObject_NEW(WindowObject, &Window_Type);
- if (it == NULL) return NULL;
- it->ob_itself = itself;
- it->ob_freeit = NULL;
- if (GetWRefCon(itself) == 0)
- {
- SetWRefCon(itself, (long)it);
- it->ob_freeit = PyMac_AutoDisposeWindow;
- }
- return (PyObject *)it;
+ WindowObject *it;
+ if (itself == NULL) return PyMac_Error(resNotFound);
+ /* XXXX Or should we use WhichWindow code here? */
+ it = PyObject_NEW(WindowObject, &Window_Type);
+ if (it == NULL) return NULL;
+ it->ob_itself = itself;
+ it->ob_freeit = NULL;
+ if (GetWRefCon(itself) == 0)
+ {
+ SetWRefCon(itself, (long)it);
+ it->ob_freeit = PyMac_AutoDisposeWindow;
+ }
+ return (PyObject *)it;
}
int WinObj_Convert(PyObject *v, WindowPtr *p_itself)
{
- if (v == Py_None) { *p_itself = NULL; return 1; }
- if (PyInt_Check(v)) { *p_itself = (WindowPtr)PyInt_AsLong(v); return 1; }
+ if (v == Py_None) { *p_itself = NULL; return 1; }
+ if (PyInt_Check(v)) { *p_itself = (WindowPtr)PyInt_AsLong(v); return 1; }
- {
- DialogRef dlg;
- if (DlgObj_Convert(v, &dlg) && dlg) {
- *p_itself = GetDialogWindow(dlg);
- return 1;
- }
- PyErr_Clear();
- }
- if (!WinObj_Check(v))
- {
- PyErr_SetString(PyExc_TypeError, "Window required");
- return 0;
- }
- *p_itself = ((WindowObject *)v)->ob_itself;
- return 1;
+ {
+ DialogRef dlg;
+ if (DlgObj_Convert(v, &dlg) && dlg) {
+ *p_itself = GetDialogWindow(dlg);
+ return 1;
+ }
+ PyErr_Clear();
+ }
+ if (!WinObj_Check(v))
+ {
+ PyErr_SetString(PyExc_TypeError, "Window required");
+ return 0;
+ }
+ *p_itself = ((WindowObject *)v)->ob_itself;
+ return 1;
}
static void WinObj_dealloc(WindowObject *self)
{
- if (self->ob_freeit && self->ob_itself)
- {
- SetWRefCon(self->ob_itself, 0);
- self->ob_freeit(self->ob_itself);
- }
- self->ob_itself = NULL;
- self->ob_freeit = NULL;
- self->ob_type->tp_free((PyObject *)self);
+ if (self->ob_freeit && self->ob_itself)
+ {
+ SetWRefCon(self->ob_itself, 0);
+ self->ob_freeit(self->ob_itself);
+ }
+ self->ob_itself = NULL;
+ self->ob_freeit = NULL;
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *WinObj_GetWindowOwnerCount(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- UInt32 outCount;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ UInt32 outCount;
#ifndef GetWindowOwnerCount
- PyMac_PRECHECK(GetWindowOwnerCount);
+ PyMac_PRECHECK(GetWindowOwnerCount);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetWindowOwnerCount(_self->ob_itself,
- &outCount);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- outCount);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetWindowOwnerCount(_self->ob_itself,
+ &outCount);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ outCount);
+ return _res;
}
static PyObject *WinObj_CloneWindow(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
+ PyObject *_res = NULL;
+ OSStatus _err;
#ifndef CloneWindow
- PyMac_PRECHECK(CloneWindow);
+ PyMac_PRECHECK(CloneWindow);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = CloneWindow(_self->ob_itself);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = CloneWindow(_self->ob_itself);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_GetWindowRetainCount(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- ItemCount _rv;
+ PyObject *_res = NULL;
+ ItemCount _rv;
#ifndef GetWindowRetainCount
- PyMac_PRECHECK(GetWindowRetainCount);
+ PyMac_PRECHECK(GetWindowRetainCount);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetWindowRetainCount(_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetWindowRetainCount(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *WinObj_RetainWindow(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
+ PyObject *_res = NULL;
+ OSStatus _err;
#ifndef RetainWindow
- PyMac_PRECHECK(RetainWindow);
+ PyMac_PRECHECK(RetainWindow);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = RetainWindow(_self->ob_itself);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = RetainWindow(_self->ob_itself);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_ReleaseWindow(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
+ PyObject *_res = NULL;
+ OSStatus _err;
#ifndef ReleaseWindow
- PyMac_PRECHECK(ReleaseWindow);
+ PyMac_PRECHECK(ReleaseWindow);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = ReleaseWindow(_self->ob_itself);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = ReleaseWindow(_self->ob_itself);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_ReshapeCustomWindow(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
+ PyObject *_res = NULL;
+ OSStatus _err;
#ifndef ReshapeCustomWindow
- PyMac_PRECHECK(ReshapeCustomWindow);
+ PyMac_PRECHECK(ReshapeCustomWindow);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = ReshapeCustomWindow(_self->ob_itself);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = ReshapeCustomWindow(_self->ob_itself);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_GetWindowWidgetHilite(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowDefPartCode outHilite;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowDefPartCode outHilite;
#ifndef GetWindowWidgetHilite
- PyMac_PRECHECK(GetWindowWidgetHilite);
+ PyMac_PRECHECK(GetWindowWidgetHilite);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetWindowWidgetHilite(_self->ob_itself,
- &outHilite);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("h",
- outHilite);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetWindowWidgetHilite(_self->ob_itself,
+ &outHilite);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("h",
+ outHilite);
+ return _res;
}
static PyObject *WinObj_GetWindowClass(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowClass outClass;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowClass outClass;
#ifndef GetWindowClass
- PyMac_PRECHECK(GetWindowClass);
+ PyMac_PRECHECK(GetWindowClass);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetWindowClass(_self->ob_itself,
- &outClass);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- outClass);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetWindowClass(_self->ob_itself,
+ &outClass);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ outClass);
+ return _res;
}
static PyObject *WinObj_GetWindowAttributes(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowAttributes outAttributes;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowAttributes outAttributes;
#ifndef GetWindowAttributes
- PyMac_PRECHECK(GetWindowAttributes);
+ PyMac_PRECHECK(GetWindowAttributes);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetWindowAttributes(_self->ob_itself,
- &outAttributes);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- outAttributes);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetWindowAttributes(_self->ob_itself,
+ &outAttributes);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ outAttributes);
+ return _res;
}
static PyObject *WinObj_ChangeWindowAttributes(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowAttributes setTheseAttributes;
- WindowAttributes clearTheseAttributes;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowAttributes setTheseAttributes;
+ WindowAttributes clearTheseAttributes;
#ifndef ChangeWindowAttributes
- PyMac_PRECHECK(ChangeWindowAttributes);
+ PyMac_PRECHECK(ChangeWindowAttributes);
#endif
- if (!PyArg_ParseTuple(_args, "ll",
- &setTheseAttributes,
- &clearTheseAttributes))
- return NULL;
- _err = ChangeWindowAttributes(_self->ob_itself,
- setTheseAttributes,
- clearTheseAttributes);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "ll",
+ &setTheseAttributes,
+ &clearTheseAttributes))
+ return NULL;
+ _err = ChangeWindowAttributes(_self->ob_itself,
+ setTheseAttributes,
+ clearTheseAttributes);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_SetWindowClass(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowClass inWindowClass;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowClass inWindowClass;
#ifndef SetWindowClass
- PyMac_PRECHECK(SetWindowClass);
+ PyMac_PRECHECK(SetWindowClass);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &inWindowClass))
- return NULL;
- _err = SetWindowClass(_self->ob_itself,
- inWindowClass);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &inWindowClass))
+ return NULL;
+ _err = SetWindowClass(_self->ob_itself,
+ inWindowClass);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_SetWindowModality(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowModality inModalKind;
- WindowPtr inUnavailableWindow;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowModality inModalKind;
+ WindowPtr inUnavailableWindow;
#ifndef SetWindowModality
- PyMac_PRECHECK(SetWindowModality);
+ PyMac_PRECHECK(SetWindowModality);
#endif
- if (!PyArg_ParseTuple(_args, "lO&",
- &inModalKind,
- WinObj_Convert, &inUnavailableWindow))
- return NULL;
- _err = SetWindowModality(_self->ob_itself,
- inModalKind,
- inUnavailableWindow);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "lO&",
+ &inModalKind,
+ WinObj_Convert, &inUnavailableWindow))
+ return NULL;
+ _err = SetWindowModality(_self->ob_itself,
+ inModalKind,
+ inUnavailableWindow);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_GetWindowModality(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowModality outModalKind;
- WindowPtr outUnavailableWindow;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowModality outModalKind;
+ WindowPtr outUnavailableWindow;
#ifndef GetWindowModality
- PyMac_PRECHECK(GetWindowModality);
+ PyMac_PRECHECK(GetWindowModality);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetWindowModality(_self->ob_itself,
- &outModalKind,
- &outUnavailableWindow);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("lO&",
- outModalKind,
- WinObj_WhichWindow, outUnavailableWindow);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetWindowModality(_self->ob_itself,
+ &outModalKind,
+ &outUnavailableWindow);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("lO&",
+ outModalKind,
+ WinObj_WhichWindow, outUnavailableWindow);
+ return _res;
}
static PyObject *WinObj_SetWindowContentColor(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- RGBColor color;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ RGBColor color;
#ifndef SetWindowContentColor
- PyMac_PRECHECK(SetWindowContentColor);
+ PyMac_PRECHECK(SetWindowContentColor);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- QdRGB_Convert, &color))
- return NULL;
- _err = SetWindowContentColor(_self->ob_itself,
- &color);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ QdRGB_Convert, &color))
+ return NULL;
+ _err = SetWindowContentColor(_self->ob_itself,
+ &color);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_GetWindowContentColor(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- RGBColor color;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ RGBColor color;
#ifndef GetWindowContentColor
- PyMac_PRECHECK(GetWindowContentColor);
+ PyMac_PRECHECK(GetWindowContentColor);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetWindowContentColor(_self->ob_itself,
- &color);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- QdRGB_New, &color);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetWindowContentColor(_self->ob_itself,
+ &color);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ QdRGB_New, &color);
+ return _res;
}
static PyObject *WinObj_GetWindowContentPattern(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- PixPatHandle outPixPat;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ PixPatHandle outPixPat;
#ifndef GetWindowContentPattern
- PyMac_PRECHECK(GetWindowContentPattern);
+ PyMac_PRECHECK(GetWindowContentPattern);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &outPixPat))
- return NULL;
- _err = GetWindowContentPattern(_self->ob_itself,
- outPixPat);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &outPixPat))
+ return NULL;
+ _err = GetWindowContentPattern(_self->ob_itself,
+ outPixPat);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_SetWindowContentPattern(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- PixPatHandle pixPat;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ PixPatHandle pixPat;
#ifndef SetWindowContentPattern
- PyMac_PRECHECK(SetWindowContentPattern);
+ PyMac_PRECHECK(SetWindowContentPattern);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &pixPat))
- return NULL;
- _err = SetWindowContentPattern(_self->ob_itself,
- pixPat);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &pixPat))
+ return NULL;
+ _err = SetWindowContentPattern(_self->ob_itself,
+ pixPat);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_ScrollWindowRect(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- Rect inScrollRect;
- SInt16 inHPixels;
- SInt16 inVPixels;
- ScrollWindowOptions inOptions;
- RgnHandle outExposedRgn;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Rect inScrollRect;
+ SInt16 inHPixels;
+ SInt16 inVPixels;
+ ScrollWindowOptions inOptions;
+ RgnHandle outExposedRgn;
#ifndef ScrollWindowRect
- PyMac_PRECHECK(ScrollWindowRect);
-#endif
- if (!PyArg_ParseTuple(_args, "O&hhlO&",
- PyMac_GetRect, &inScrollRect,
- &inHPixels,
- &inVPixels,
- &inOptions,
- ResObj_Convert, &outExposedRgn))
- return NULL;
- _err = ScrollWindowRect(_self->ob_itself,
- &inScrollRect,
- inHPixels,
- inVPixels,
- inOptions,
- outExposedRgn);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(ScrollWindowRect);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&hhlO&",
+ PyMac_GetRect, &inScrollRect,
+ &inHPixels,
+ &inVPixels,
+ &inOptions,
+ ResObj_Convert, &outExposedRgn))
+ return NULL;
+ _err = ScrollWindowRect(_self->ob_itself,
+ &inScrollRect,
+ inHPixels,
+ inVPixels,
+ inOptions,
+ outExposedRgn);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_ScrollWindowRegion(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- RgnHandle inScrollRgn;
- SInt16 inHPixels;
- SInt16 inVPixels;
- ScrollWindowOptions inOptions;
- RgnHandle outExposedRgn;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ RgnHandle inScrollRgn;
+ SInt16 inHPixels;
+ SInt16 inVPixels;
+ ScrollWindowOptions inOptions;
+ RgnHandle outExposedRgn;
#ifndef ScrollWindowRegion
- PyMac_PRECHECK(ScrollWindowRegion);
-#endif
- if (!PyArg_ParseTuple(_args, "O&hhlO&",
- ResObj_Convert, &inScrollRgn,
- &inHPixels,
- &inVPixels,
- &inOptions,
- ResObj_Convert, &outExposedRgn))
- return NULL;
- _err = ScrollWindowRegion(_self->ob_itself,
- inScrollRgn,
- inHPixels,
- inVPixels,
- inOptions,
- outExposedRgn);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(ScrollWindowRegion);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&hhlO&",
+ ResObj_Convert, &inScrollRgn,
+ &inHPixels,
+ &inVPixels,
+ &inOptions,
+ ResObj_Convert, &outExposedRgn))
+ return NULL;
+ _err = ScrollWindowRegion(_self->ob_itself,
+ inScrollRgn,
+ inHPixels,
+ inVPixels,
+ inOptions,
+ outExposedRgn);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_ClipAbove(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef ClipAbove
- PyMac_PRECHECK(ClipAbove);
+ PyMac_PRECHECK(ClipAbove);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- ClipAbove(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ ClipAbove(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_PaintOne(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RgnHandle clobberedRgn;
+ PyObject *_res = NULL;
+ RgnHandle clobberedRgn;
#ifndef PaintOne
- PyMac_PRECHECK(PaintOne);
+ PyMac_PRECHECK(PaintOne);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &clobberedRgn))
- return NULL;
- PaintOne(_self->ob_itself,
- clobberedRgn);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &clobberedRgn))
+ return NULL;
+ PaintOne(_self->ob_itself,
+ clobberedRgn);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_PaintBehind(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RgnHandle clobberedRgn;
+ PyObject *_res = NULL;
+ RgnHandle clobberedRgn;
#ifndef PaintBehind
- PyMac_PRECHECK(PaintBehind);
+ PyMac_PRECHECK(PaintBehind);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &clobberedRgn))
- return NULL;
- PaintBehind(_self->ob_itself,
- clobberedRgn);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &clobberedRgn))
+ return NULL;
+ PaintBehind(_self->ob_itself,
+ clobberedRgn);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_CalcVis(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef CalcVis
- PyMac_PRECHECK(CalcVis);
+ PyMac_PRECHECK(CalcVis);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- CalcVis(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ CalcVis(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_CalcVisBehind(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RgnHandle clobberedRgn;
+ PyObject *_res = NULL;
+ RgnHandle clobberedRgn;
#ifndef CalcVisBehind
- PyMac_PRECHECK(CalcVisBehind);
+ PyMac_PRECHECK(CalcVisBehind);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &clobberedRgn))
- return NULL;
- CalcVisBehind(_self->ob_itself,
- clobberedRgn);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &clobberedRgn))
+ return NULL;
+ CalcVisBehind(_self->ob_itself,
+ clobberedRgn);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_BringToFront(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef BringToFront
- PyMac_PRECHECK(BringToFront);
+ PyMac_PRECHECK(BringToFront);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- BringToFront(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ BringToFront(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_SendBehind(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- WindowPtr behindWindow;
+ PyObject *_res = NULL;
+ WindowPtr behindWindow;
#ifndef SendBehind
- PyMac_PRECHECK(SendBehind);
+ PyMac_PRECHECK(SendBehind);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- WinObj_Convert, &behindWindow))
- return NULL;
- SendBehind(_self->ob_itself,
- behindWindow);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ WinObj_Convert, &behindWindow))
+ return NULL;
+ SendBehind(_self->ob_itself,
+ behindWindow);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_SelectWindow(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef SelectWindow
- PyMac_PRECHECK(SelectWindow);
+ PyMac_PRECHECK(SelectWindow);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- SelectWindow(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ SelectWindow(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_GetNextWindowOfClass(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- WindowPtr _rv;
- WindowClass inWindowClass;
- Boolean mustBeVisible;
+ PyObject *_res = NULL;
+ WindowPtr _rv;
+ WindowClass inWindowClass;
+ Boolean mustBeVisible;
#ifndef GetNextWindowOfClass
- PyMac_PRECHECK(GetNextWindowOfClass);
+ PyMac_PRECHECK(GetNextWindowOfClass);
#endif
- if (!PyArg_ParseTuple(_args, "lb",
- &inWindowClass,
- &mustBeVisible))
- return NULL;
- _rv = GetNextWindowOfClass(_self->ob_itself,
- inWindowClass,
- mustBeVisible);
- _res = Py_BuildValue("O&",
- WinObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "lb",
+ &inWindowClass,
+ &mustBeVisible))
+ return NULL;
+ _rv = GetNextWindowOfClass(_self->ob_itself,
+ inWindowClass,
+ mustBeVisible);
+ _res = Py_BuildValue("O&",
+ WinObj_New, _rv);
+ return _res;
}
static PyObject *WinObj_SetWindowAlternateTitle(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- CFStringRef inTitle;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ CFStringRef inTitle;
#ifndef SetWindowAlternateTitle
- PyMac_PRECHECK(SetWindowAlternateTitle);
+ PyMac_PRECHECK(SetWindowAlternateTitle);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CFStringRefObj_Convert, &inTitle))
- return NULL;
- _err = SetWindowAlternateTitle(_self->ob_itself,
- inTitle);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CFStringRefObj_Convert, &inTitle))
+ return NULL;
+ _err = SetWindowAlternateTitle(_self->ob_itself,
+ inTitle);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_CopyWindowAlternateTitle(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- CFStringRef outTitle;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ CFStringRef outTitle;
#ifndef CopyWindowAlternateTitle
- PyMac_PRECHECK(CopyWindowAlternateTitle);
+ PyMac_PRECHECK(CopyWindowAlternateTitle);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = CopyWindowAlternateTitle(_self->ob_itself,
- &outTitle);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- CFStringRefObj_New, outTitle);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = CopyWindowAlternateTitle(_self->ob_itself,
+ &outTitle);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ CFStringRefObj_New, outTitle);
+ return _res;
}
static PyObject *WinObj_HiliteWindow(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean fHilite;
+ PyObject *_res = NULL;
+ Boolean fHilite;
#ifndef HiliteWindow
- PyMac_PRECHECK(HiliteWindow);
+ PyMac_PRECHECK(HiliteWindow);
#endif
- if (!PyArg_ParseTuple(_args, "b",
- &fHilite))
- return NULL;
- HiliteWindow(_self->ob_itself,
- fHilite);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "b",
+ &fHilite))
+ return NULL;
+ HiliteWindow(_self->ob_itself,
+ fHilite);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_SetWRefCon(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- long data;
+ PyObject *_res = NULL;
+ long data;
#ifndef SetWRefCon
- PyMac_PRECHECK(SetWRefCon);
+ PyMac_PRECHECK(SetWRefCon);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &data))
- return NULL;
- SetWRefCon(_self->ob_itself,
- data);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &data))
+ return NULL;
+ SetWRefCon(_self->ob_itself,
+ data);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_GetWRefCon(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- long _rv;
+ PyObject *_res = NULL;
+ long _rv;
#ifndef GetWRefCon
- PyMac_PRECHECK(GetWRefCon);
+ PyMac_PRECHECK(GetWRefCon);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetWRefCon(_self->ob_itself);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetWRefCon(_self->ob_itself);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *WinObj_SetWindowPic(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- PicHandle pic;
+ PyObject *_res = NULL;
+ PicHandle pic;
#ifndef SetWindowPic
- PyMac_PRECHECK(SetWindowPic);
+ PyMac_PRECHECK(SetWindowPic);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &pic))
- return NULL;
- SetWindowPic(_self->ob_itself,
- pic);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &pic))
+ return NULL;
+ SetWindowPic(_self->ob_itself,
+ pic);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_GetWindowPic(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- PicHandle _rv;
+ PyObject *_res = NULL;
+ PicHandle _rv;
#ifndef GetWindowPic
- PyMac_PRECHECK(GetWindowPic);
+ PyMac_PRECHECK(GetWindowPic);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetWindowPic(_self->ob_itself);
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetWindowPic(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *WinObj_GetWVariant(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short _rv;
+ PyObject *_res = NULL;
+ short _rv;
#ifndef GetWVariant
- PyMac_PRECHECK(GetWVariant);
+ PyMac_PRECHECK(GetWVariant);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetWVariant(_self->ob_itself);
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetWVariant(_self->ob_itself);
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *WinObj_GetWindowFeatures(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- UInt32 outFeatures;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ UInt32 outFeatures;
#ifndef GetWindowFeatures
- PyMac_PRECHECK(GetWindowFeatures);
+ PyMac_PRECHECK(GetWindowFeatures);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetWindowFeatures(_self->ob_itself,
- &outFeatures);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- outFeatures);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetWindowFeatures(_self->ob_itself,
+ &outFeatures);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ outFeatures);
+ return _res;
}
static PyObject *WinObj_GetWindowRegion(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowRegionCode inRegionCode;
- RgnHandle ioWinRgn;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowRegionCode inRegionCode;
+ RgnHandle ioWinRgn;
#ifndef GetWindowRegion
- PyMac_PRECHECK(GetWindowRegion);
+ PyMac_PRECHECK(GetWindowRegion);
#endif
- if (!PyArg_ParseTuple(_args, "HO&",
- &inRegionCode,
- ResObj_Convert, &ioWinRgn))
- return NULL;
- _err = GetWindowRegion(_self->ob_itself,
- inRegionCode,
- ioWinRgn);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "HO&",
+ &inRegionCode,
+ ResObj_Convert, &ioWinRgn))
+ return NULL;
+ _err = GetWindowRegion(_self->ob_itself,
+ inRegionCode,
+ ioWinRgn);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_GetWindowStructureWidths(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- Rect outRect;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Rect outRect;
#ifndef GetWindowStructureWidths
- PyMac_PRECHECK(GetWindowStructureWidths);
+ PyMac_PRECHECK(GetWindowStructureWidths);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetWindowStructureWidths(_self->ob_itself,
- &outRect);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- PyMac_BuildRect, &outRect);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetWindowStructureWidths(_self->ob_itself,
+ &outRect);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildRect, &outRect);
+ return _res;
}
static PyObject *WinObj_BeginUpdate(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef BeginUpdate
- PyMac_PRECHECK(BeginUpdate);
+ PyMac_PRECHECK(BeginUpdate);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- BeginUpdate(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ BeginUpdate(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_EndUpdate(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef EndUpdate
- PyMac_PRECHECK(EndUpdate);
+ PyMac_PRECHECK(EndUpdate);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- EndUpdate(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ EndUpdate(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_InvalWindowRgn(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- RgnHandle region;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ RgnHandle region;
#ifndef InvalWindowRgn
- PyMac_PRECHECK(InvalWindowRgn);
+ PyMac_PRECHECK(InvalWindowRgn);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &region))
- return NULL;
- _err = InvalWindowRgn(_self->ob_itself,
- region);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &region))
+ return NULL;
+ _err = InvalWindowRgn(_self->ob_itself,
+ region);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_InvalWindowRect(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- Rect bounds;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Rect bounds;
#ifndef InvalWindowRect
- PyMac_PRECHECK(InvalWindowRect);
+ PyMac_PRECHECK(InvalWindowRect);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetRect, &bounds))
- return NULL;
- _err = InvalWindowRect(_self->ob_itself,
- &bounds);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetRect, &bounds))
+ return NULL;
+ _err = InvalWindowRect(_self->ob_itself,
+ &bounds);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_ValidWindowRgn(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- RgnHandle region;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ RgnHandle region;
#ifndef ValidWindowRgn
- PyMac_PRECHECK(ValidWindowRgn);
+ PyMac_PRECHECK(ValidWindowRgn);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &region))
- return NULL;
- _err = ValidWindowRgn(_self->ob_itself,
- region);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &region))
+ return NULL;
+ _err = ValidWindowRgn(_self->ob_itself,
+ region);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_ValidWindowRect(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- Rect bounds;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Rect bounds;
#ifndef ValidWindowRect
- PyMac_PRECHECK(ValidWindowRect);
+ PyMac_PRECHECK(ValidWindowRect);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetRect, &bounds))
- return NULL;
- _err = ValidWindowRect(_self->ob_itself,
- &bounds);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetRect, &bounds))
+ return NULL;
+ _err = ValidWindowRect(_self->ob_itself,
+ &bounds);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_DrawGrowIcon(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef DrawGrowIcon
- PyMac_PRECHECK(DrawGrowIcon);
+ PyMac_PRECHECK(DrawGrowIcon);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- DrawGrowIcon(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ DrawGrowIcon(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_SetWTitle(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Str255 title;
+ PyObject *_res = NULL;
+ Str255 title;
#ifndef SetWTitle
- PyMac_PRECHECK(SetWTitle);
+ PyMac_PRECHECK(SetWTitle);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetStr255, title))
- return NULL;
- SetWTitle(_self->ob_itself,
- title);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetStr255, title))
+ return NULL;
+ SetWTitle(_self->ob_itself,
+ title);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_GetWTitle(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Str255 title;
+ PyObject *_res = NULL;
+ Str255 title;
#ifndef GetWTitle
- PyMac_PRECHECK(GetWTitle);
+ PyMac_PRECHECK(GetWTitle);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- GetWTitle(_self->ob_itself,
- title);
- _res = Py_BuildValue("O&",
- PyMac_BuildStr255, title);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ GetWTitle(_self->ob_itself,
+ title);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildStr255, title);
+ return _res;
}
static PyObject *WinObj_SetWindowTitleWithCFString(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- CFStringRef inString;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ CFStringRef inString;
#ifndef SetWindowTitleWithCFString
- PyMac_PRECHECK(SetWindowTitleWithCFString);
+ PyMac_PRECHECK(SetWindowTitleWithCFString);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- CFStringRefObj_Convert, &inString))
- return NULL;
- _err = SetWindowTitleWithCFString(_self->ob_itself,
- inString);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ CFStringRefObj_Convert, &inString))
+ return NULL;
+ _err = SetWindowTitleWithCFString(_self->ob_itself,
+ inString);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_CopyWindowTitleAsCFString(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- CFStringRef outString;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ CFStringRef outString;
#ifndef CopyWindowTitleAsCFString
- PyMac_PRECHECK(CopyWindowTitleAsCFString);
+ PyMac_PRECHECK(CopyWindowTitleAsCFString);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = CopyWindowTitleAsCFString(_self->ob_itself,
- &outString);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- CFStringRefObj_New, outString);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = CopyWindowTitleAsCFString(_self->ob_itself,
+ &outString);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ CFStringRefObj_New, outString);
+ return _res;
}
static PyObject *WinObj_SetWindowProxyFSSpec(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- FSSpec inFile;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ FSSpec inFile;
#ifndef SetWindowProxyFSSpec
- PyMac_PRECHECK(SetWindowProxyFSSpec);
+ PyMac_PRECHECK(SetWindowProxyFSSpec);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetFSSpec, &inFile))
- return NULL;
- _err = SetWindowProxyFSSpec(_self->ob_itself,
- &inFile);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetFSSpec, &inFile))
+ return NULL;
+ _err = SetWindowProxyFSSpec(_self->ob_itself,
+ &inFile);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_GetWindowProxyFSSpec(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- FSSpec outFile;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ FSSpec outFile;
#ifndef GetWindowProxyFSSpec
- PyMac_PRECHECK(GetWindowProxyFSSpec);
+ PyMac_PRECHECK(GetWindowProxyFSSpec);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetWindowProxyFSSpec(_self->ob_itself,
- &outFile);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- PyMac_BuildFSSpec, &outFile);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetWindowProxyFSSpec(_self->ob_itself,
+ &outFile);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildFSSpec, &outFile);
+ return _res;
}
static PyObject *WinObj_SetWindowProxyAlias(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- AliasHandle inAlias;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ AliasHandle inAlias;
#ifndef SetWindowProxyAlias
- PyMac_PRECHECK(SetWindowProxyAlias);
+ PyMac_PRECHECK(SetWindowProxyAlias);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &inAlias))
- return NULL;
- _err = SetWindowProxyAlias(_self->ob_itself,
- inAlias);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &inAlias))
+ return NULL;
+ _err = SetWindowProxyAlias(_self->ob_itself,
+ inAlias);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_GetWindowProxyAlias(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- AliasHandle alias;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ AliasHandle alias;
#ifndef GetWindowProxyAlias
- PyMac_PRECHECK(GetWindowProxyAlias);
+ PyMac_PRECHECK(GetWindowProxyAlias);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetWindowProxyAlias(_self->ob_itself,
- &alias);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- ResObj_New, alias);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetWindowProxyAlias(_self->ob_itself,
+ &alias);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ ResObj_New, alias);
+ return _res;
}
static PyObject *WinObj_SetWindowProxyCreatorAndType(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- OSType fileCreator;
- OSType fileType;
- SInt16 vRefNum;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ OSType fileCreator;
+ OSType fileType;
+ SInt16 vRefNum;
#ifndef SetWindowProxyCreatorAndType
- PyMac_PRECHECK(SetWindowProxyCreatorAndType);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&h",
- PyMac_GetOSType, &fileCreator,
- PyMac_GetOSType, &fileType,
- &vRefNum))
- return NULL;
- _err = SetWindowProxyCreatorAndType(_self->ob_itself,
- fileCreator,
- fileType,
- vRefNum);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(SetWindowProxyCreatorAndType);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&h",
+ PyMac_GetOSType, &fileCreator,
+ PyMac_GetOSType, &fileType,
+ &vRefNum))
+ return NULL;
+ _err = SetWindowProxyCreatorAndType(_self->ob_itself,
+ fileCreator,
+ fileType,
+ vRefNum);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_GetWindowProxyIcon(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- IconRef outIcon;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ IconRef outIcon;
#ifndef GetWindowProxyIcon
- PyMac_PRECHECK(GetWindowProxyIcon);
+ PyMac_PRECHECK(GetWindowProxyIcon);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetWindowProxyIcon(_self->ob_itself,
- &outIcon);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- ResObj_New, outIcon);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetWindowProxyIcon(_self->ob_itself,
+ &outIcon);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ ResObj_New, outIcon);
+ return _res;
}
static PyObject *WinObj_SetWindowProxyIcon(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- IconRef icon;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ IconRef icon;
#ifndef SetWindowProxyIcon
- PyMac_PRECHECK(SetWindowProxyIcon);
+ PyMac_PRECHECK(SetWindowProxyIcon);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &icon))
- return NULL;
- _err = SetWindowProxyIcon(_self->ob_itself,
- icon);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &icon))
+ return NULL;
+ _err = SetWindowProxyIcon(_self->ob_itself,
+ icon);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_RemoveWindowProxy(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
+ PyObject *_res = NULL;
+ OSStatus _err;
#ifndef RemoveWindowProxy
- PyMac_PRECHECK(RemoveWindowProxy);
+ PyMac_PRECHECK(RemoveWindowProxy);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = RemoveWindowProxy(_self->ob_itself);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = RemoveWindowProxy(_self->ob_itself);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_BeginWindowProxyDrag(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- DragReference outNewDrag;
- RgnHandle outDragOutlineRgn;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ DragReference outNewDrag;
+ RgnHandle outDragOutlineRgn;
#ifndef BeginWindowProxyDrag
- PyMac_PRECHECK(BeginWindowProxyDrag);
+ PyMac_PRECHECK(BeginWindowProxyDrag);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &outDragOutlineRgn))
- return NULL;
- _err = BeginWindowProxyDrag(_self->ob_itself,
- &outNewDrag,
- outDragOutlineRgn);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- DragObj_New, outNewDrag);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &outDragOutlineRgn))
+ return NULL;
+ _err = BeginWindowProxyDrag(_self->ob_itself,
+ &outNewDrag,
+ outDragOutlineRgn);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ DragObj_New, outNewDrag);
+ return _res;
}
static PyObject *WinObj_EndWindowProxyDrag(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- DragReference theDrag;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ DragReference theDrag;
#ifndef EndWindowProxyDrag
- PyMac_PRECHECK(EndWindowProxyDrag);
+ PyMac_PRECHECK(EndWindowProxyDrag);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- DragObj_Convert, &theDrag))
- return NULL;
- _err = EndWindowProxyDrag(_self->ob_itself,
- theDrag);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ DragObj_Convert, &theDrag))
+ return NULL;
+ _err = EndWindowProxyDrag(_self->ob_itself,
+ theDrag);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_TrackWindowProxyFromExistingDrag(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- Point startPt;
- DragReference drag;
- RgnHandle inDragOutlineRgn;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Point startPt;
+ DragReference drag;
+ RgnHandle inDragOutlineRgn;
#ifndef TrackWindowProxyFromExistingDrag
- PyMac_PRECHECK(TrackWindowProxyFromExistingDrag);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&O&",
- PyMac_GetPoint, &startPt,
- DragObj_Convert, &drag,
- ResObj_Convert, &inDragOutlineRgn))
- return NULL;
- _err = TrackWindowProxyFromExistingDrag(_self->ob_itself,
- startPt,
- drag,
- inDragOutlineRgn);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(TrackWindowProxyFromExistingDrag);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&O&",
+ PyMac_GetPoint, &startPt,
+ DragObj_Convert, &drag,
+ ResObj_Convert, &inDragOutlineRgn))
+ return NULL;
+ _err = TrackWindowProxyFromExistingDrag(_self->ob_itself,
+ startPt,
+ drag,
+ inDragOutlineRgn);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_TrackWindowProxyDrag(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- Point startPt;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Point startPt;
#ifndef TrackWindowProxyDrag
- PyMac_PRECHECK(TrackWindowProxyDrag);
+ PyMac_PRECHECK(TrackWindowProxyDrag);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetPoint, &startPt))
- return NULL;
- _err = TrackWindowProxyDrag(_self->ob_itself,
- startPt);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetPoint, &startPt))
+ return NULL;
+ _err = TrackWindowProxyDrag(_self->ob_itself,
+ startPt);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_IsWindowModified(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
+ PyObject *_res = NULL;
+ Boolean _rv;
#ifndef IsWindowModified
- PyMac_PRECHECK(IsWindowModified);
+ PyMac_PRECHECK(IsWindowModified);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = IsWindowModified(_self->ob_itself);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = IsWindowModified(_self->ob_itself);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *WinObj_SetWindowModified(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- Boolean modified;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Boolean modified;
#ifndef SetWindowModified
- PyMac_PRECHECK(SetWindowModified);
+ PyMac_PRECHECK(SetWindowModified);
#endif
- if (!PyArg_ParseTuple(_args, "b",
- &modified))
- return NULL;
- _err = SetWindowModified(_self->ob_itself,
- modified);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "b",
+ &modified))
+ return NULL;
+ _err = SetWindowModified(_self->ob_itself,
+ modified);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_IsWindowPathSelectClick(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- EventRecord event;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ EventRecord event;
#ifndef IsWindowPathSelectClick
- PyMac_PRECHECK(IsWindowPathSelectClick);
+ PyMac_PRECHECK(IsWindowPathSelectClick);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetEventRecord, &event))
- return NULL;
- _rv = IsWindowPathSelectClick(_self->ob_itself,
- &event);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetEventRecord, &event))
+ return NULL;
+ _rv = IsWindowPathSelectClick(_self->ob_itself,
+ &event);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *WinObj_WindowPathSelect(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- MenuHandle menu;
- SInt32 outMenuResult;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ MenuHandle menu;
+ SInt32 outMenuResult;
#ifndef WindowPathSelect
- PyMac_PRECHECK(WindowPathSelect);
+ PyMac_PRECHECK(WindowPathSelect);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- MenuObj_Convert, &menu))
- return NULL;
- _err = WindowPathSelect(_self->ob_itself,
- menu,
- &outMenuResult);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- outMenuResult);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ MenuObj_Convert, &menu))
+ return NULL;
+ _err = WindowPathSelect(_self->ob_itself,
+ menu,
+ &outMenuResult);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ outMenuResult);
+ return _res;
}
static PyObject *WinObj_HiliteWindowFrameForDrag(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- Boolean hilited;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Boolean hilited;
#ifndef HiliteWindowFrameForDrag
- PyMac_PRECHECK(HiliteWindowFrameForDrag);
+ PyMac_PRECHECK(HiliteWindowFrameForDrag);
#endif
- if (!PyArg_ParseTuple(_args, "b",
- &hilited))
- return NULL;
- _err = HiliteWindowFrameForDrag(_self->ob_itself,
- hilited);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "b",
+ &hilited))
+ return NULL;
+ _err = HiliteWindowFrameForDrag(_self->ob_itself,
+ hilited);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_TransitionWindow(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowTransitionEffect inEffect;
- WindowTransitionAction inAction;
- Rect inRect;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowTransitionEffect inEffect;
+ WindowTransitionAction inAction;
+ Rect inRect;
#ifndef TransitionWindow
- PyMac_PRECHECK(TransitionWindow);
-#endif
- if (!PyArg_ParseTuple(_args, "llO&",
- &inEffect,
- &inAction,
- PyMac_GetRect, &inRect))
- return NULL;
- _err = TransitionWindow(_self->ob_itself,
- inEffect,
- inAction,
- &inRect);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(TransitionWindow);
+#endif
+ if (!PyArg_ParseTuple(_args, "llO&",
+ &inEffect,
+ &inAction,
+ PyMac_GetRect, &inRect))
+ return NULL;
+ _err = TransitionWindow(_self->ob_itself,
+ inEffect,
+ inAction,
+ &inRect);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_TransitionWindowAndParent(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowPtr inParentWindow;
- WindowTransitionEffect inEffect;
- WindowTransitionAction inAction;
- Rect inRect;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowPtr inParentWindow;
+ WindowTransitionEffect inEffect;
+ WindowTransitionAction inAction;
+ Rect inRect;
#ifndef TransitionWindowAndParent
- PyMac_PRECHECK(TransitionWindowAndParent);
-#endif
- if (!PyArg_ParseTuple(_args, "O&llO&",
- WinObj_Convert, &inParentWindow,
- &inEffect,
- &inAction,
- PyMac_GetRect, &inRect))
- return NULL;
- _err = TransitionWindowAndParent(_self->ob_itself,
- inParentWindow,
- inEffect,
- inAction,
- &inRect);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(TransitionWindowAndParent);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&llO&",
+ WinObj_Convert, &inParentWindow,
+ &inEffect,
+ &inAction,
+ PyMac_GetRect, &inRect))
+ return NULL;
+ _err = TransitionWindowAndParent(_self->ob_itself,
+ inParentWindow,
+ inEffect,
+ inAction,
+ &inRect);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_MacMoveWindow(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short hGlobal;
- short vGlobal;
- Boolean front;
+ PyObject *_res = NULL;
+ short hGlobal;
+ short vGlobal;
+ Boolean front;
#ifndef MacMoveWindow
- PyMac_PRECHECK(MacMoveWindow);
-#endif
- if (!PyArg_ParseTuple(_args, "hhb",
- &hGlobal,
- &vGlobal,
- &front))
- return NULL;
- MacMoveWindow(_self->ob_itself,
- hGlobal,
- vGlobal,
- front);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(MacMoveWindow);
+#endif
+ if (!PyArg_ParseTuple(_args, "hhb",
+ &hGlobal,
+ &vGlobal,
+ &front))
+ return NULL;
+ MacMoveWindow(_self->ob_itself,
+ hGlobal,
+ vGlobal,
+ front);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_SizeWindow(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short w;
- short h;
- Boolean fUpdate;
+ PyObject *_res = NULL;
+ short w;
+ short h;
+ Boolean fUpdate;
#ifndef SizeWindow
- PyMac_PRECHECK(SizeWindow);
-#endif
- if (!PyArg_ParseTuple(_args, "hhb",
- &w,
- &h,
- &fUpdate))
- return NULL;
- SizeWindow(_self->ob_itself,
- w,
- h,
- fUpdate);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(SizeWindow);
+#endif
+ if (!PyArg_ParseTuple(_args, "hhb",
+ &w,
+ &h,
+ &fUpdate))
+ return NULL;
+ SizeWindow(_self->ob_itself,
+ w,
+ h,
+ fUpdate);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_GrowWindow(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- long _rv;
- Point startPt;
- Rect bBox;
+ PyObject *_res = NULL;
+ long _rv;
+ Point startPt;
+ Rect bBox;
#ifndef GrowWindow
- PyMac_PRECHECK(GrowWindow);
+ PyMac_PRECHECK(GrowWindow);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- PyMac_GetPoint, &startPt,
- PyMac_GetRect, &bBox))
- return NULL;
- _rv = GrowWindow(_self->ob_itself,
- startPt,
- &bBox);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ PyMac_GetPoint, &startPt,
+ PyMac_GetRect, &bBox))
+ return NULL;
+ _rv = GrowWindow(_self->ob_itself,
+ startPt,
+ &bBox);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *WinObj_DragWindow(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Point startPt;
- Rect boundsRect;
+ PyObject *_res = NULL;
+ Point startPt;
+ Rect boundsRect;
#ifndef DragWindow
- PyMac_PRECHECK(DragWindow);
+ PyMac_PRECHECK(DragWindow);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- PyMac_GetPoint, &startPt,
- PyMac_GetRect, &boundsRect))
- return NULL;
- DragWindow(_self->ob_itself,
- startPt,
- &boundsRect);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ PyMac_GetPoint, &startPt,
+ PyMac_GetRect, &boundsRect))
+ return NULL;
+ DragWindow(_self->ob_itself,
+ startPt,
+ &boundsRect);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_ZoomWindow(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- WindowPartCode partCode;
- Boolean front;
+ PyObject *_res = NULL;
+ WindowPartCode partCode;
+ Boolean front;
#ifndef ZoomWindow
- PyMac_PRECHECK(ZoomWindow);
+ PyMac_PRECHECK(ZoomWindow);
#endif
- if (!PyArg_ParseTuple(_args, "hb",
- &partCode,
- &front))
- return NULL;
- ZoomWindow(_self->ob_itself,
- partCode,
- front);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "hb",
+ &partCode,
+ &front))
+ return NULL;
+ ZoomWindow(_self->ob_itself,
+ partCode,
+ front);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_IsWindowCollapsable(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
+ PyObject *_res = NULL;
+ Boolean _rv;
#ifndef IsWindowCollapsable
- PyMac_PRECHECK(IsWindowCollapsable);
+ PyMac_PRECHECK(IsWindowCollapsable);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = IsWindowCollapsable(_self->ob_itself);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = IsWindowCollapsable(_self->ob_itself);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *WinObj_IsWindowCollapsed(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
+ PyObject *_res = NULL;
+ Boolean _rv;
#ifndef IsWindowCollapsed
- PyMac_PRECHECK(IsWindowCollapsed);
+ PyMac_PRECHECK(IsWindowCollapsed);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = IsWindowCollapsed(_self->ob_itself);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = IsWindowCollapsed(_self->ob_itself);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *WinObj_CollapseWindow(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- Boolean collapse;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Boolean collapse;
#ifndef CollapseWindow
- PyMac_PRECHECK(CollapseWindow);
+ PyMac_PRECHECK(CollapseWindow);
#endif
- if (!PyArg_ParseTuple(_args, "b",
- &collapse))
- return NULL;
- _err = CollapseWindow(_self->ob_itself,
- collapse);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "b",
+ &collapse))
+ return NULL;
+ _err = CollapseWindow(_self->ob_itself,
+ collapse);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_GetWindowBounds(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowRegionCode regionCode;
- Rect globalBounds;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowRegionCode regionCode;
+ Rect globalBounds;
#ifndef GetWindowBounds
- PyMac_PRECHECK(GetWindowBounds);
+ PyMac_PRECHECK(GetWindowBounds);
#endif
- if (!PyArg_ParseTuple(_args, "H",
- &regionCode))
- return NULL;
- _err = GetWindowBounds(_self->ob_itself,
- regionCode,
- &globalBounds);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- PyMac_BuildRect, &globalBounds);
- return _res;
+ if (!PyArg_ParseTuple(_args, "H",
+ &regionCode))
+ return NULL;
+ _err = GetWindowBounds(_self->ob_itself,
+ regionCode,
+ &globalBounds);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildRect, &globalBounds);
+ return _res;
}
static PyObject *WinObj_ResizeWindow(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- Point inStartPoint;
- Rect inSizeConstraints;
- Rect outNewContentRect;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ Point inStartPoint;
+ Rect inSizeConstraints;
+ Rect outNewContentRect;
#ifndef ResizeWindow
- PyMac_PRECHECK(ResizeWindow);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- PyMac_GetPoint, &inStartPoint,
- PyMac_GetRect, &inSizeConstraints))
- return NULL;
- _rv = ResizeWindow(_self->ob_itself,
- inStartPoint,
- &inSizeConstraints,
- &outNewContentRect);
- _res = Py_BuildValue("bO&",
- _rv,
- PyMac_BuildRect, &outNewContentRect);
- return _res;
+ PyMac_PRECHECK(ResizeWindow);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ PyMac_GetPoint, &inStartPoint,
+ PyMac_GetRect, &inSizeConstraints))
+ return NULL;
+ _rv = ResizeWindow(_self->ob_itself,
+ inStartPoint,
+ &inSizeConstraints,
+ &outNewContentRect);
+ _res = Py_BuildValue("bO&",
+ _rv,
+ PyMac_BuildRect, &outNewContentRect);
+ return _res;
}
static PyObject *WinObj_SetWindowBounds(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowRegionCode regionCode;
- Rect globalBounds;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowRegionCode regionCode;
+ Rect globalBounds;
#ifndef SetWindowBounds
- PyMac_PRECHECK(SetWindowBounds);
+ PyMac_PRECHECK(SetWindowBounds);
#endif
- if (!PyArg_ParseTuple(_args, "HO&",
- &regionCode,
- PyMac_GetRect, &globalBounds))
- return NULL;
- _err = SetWindowBounds(_self->ob_itself,
- regionCode,
- &globalBounds);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "HO&",
+ &regionCode,
+ PyMac_GetRect, &globalBounds))
+ return NULL;
+ _err = SetWindowBounds(_self->ob_itself,
+ regionCode,
+ &globalBounds);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_RepositionWindow(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowPtr parentWindow;
- WindowPositionMethod method;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowPtr parentWindow;
+ WindowPositionMethod method;
#ifndef RepositionWindow
- PyMac_PRECHECK(RepositionWindow);
+ PyMac_PRECHECK(RepositionWindow);
#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- WinObj_Convert, &parentWindow,
- &method))
- return NULL;
- _err = RepositionWindow(_self->ob_itself,
- parentWindow,
- method);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&l",
+ WinObj_Convert, &parentWindow,
+ &method))
+ return NULL;
+ _err = RepositionWindow(_self->ob_itself,
+ parentWindow,
+ method);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_MoveWindowStructure(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- short hGlobal;
- short vGlobal;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ short hGlobal;
+ short vGlobal;
#ifndef MoveWindowStructure
- PyMac_PRECHECK(MoveWindowStructure);
+ PyMac_PRECHECK(MoveWindowStructure);
#endif
- if (!PyArg_ParseTuple(_args, "hh",
- &hGlobal,
- &vGlobal))
- return NULL;
- _err = MoveWindowStructure(_self->ob_itself,
- hGlobal,
- vGlobal);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "hh",
+ &hGlobal,
+ &vGlobal))
+ return NULL;
+ _err = MoveWindowStructure(_self->ob_itself,
+ hGlobal,
+ vGlobal);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_IsWindowInStandardState(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- Point inIdealSize;
- Rect outIdealStandardState;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ Point inIdealSize;
+ Rect outIdealStandardState;
#ifndef IsWindowInStandardState
- PyMac_PRECHECK(IsWindowInStandardState);
+ PyMac_PRECHECK(IsWindowInStandardState);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetPoint, &inIdealSize))
- return NULL;
- _rv = IsWindowInStandardState(_self->ob_itself,
- &inIdealSize,
- &outIdealStandardState);
- _res = Py_BuildValue("bO&",
- _rv,
- PyMac_BuildRect, &outIdealStandardState);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetPoint, &inIdealSize))
+ return NULL;
+ _rv = IsWindowInStandardState(_self->ob_itself,
+ &inIdealSize,
+ &outIdealStandardState);
+ _res = Py_BuildValue("bO&",
+ _rv,
+ PyMac_BuildRect, &outIdealStandardState);
+ return _res;
}
static PyObject *WinObj_ZoomWindowIdeal(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowPartCode inPartCode;
- Point ioIdealSize;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowPartCode inPartCode;
+ Point ioIdealSize;
#ifndef ZoomWindowIdeal
- PyMac_PRECHECK(ZoomWindowIdeal);
+ PyMac_PRECHECK(ZoomWindowIdeal);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &inPartCode))
- return NULL;
- _err = ZoomWindowIdeal(_self->ob_itself,
- inPartCode,
- &ioIdealSize);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- PyMac_BuildPoint, ioIdealSize);
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &inPartCode))
+ return NULL;
+ _err = ZoomWindowIdeal(_self->ob_itself,
+ inPartCode,
+ &ioIdealSize);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildPoint, ioIdealSize);
+ return _res;
}
static PyObject *WinObj_GetWindowIdealUserState(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- Rect outUserState;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Rect outUserState;
#ifndef GetWindowIdealUserState
- PyMac_PRECHECK(GetWindowIdealUserState);
+ PyMac_PRECHECK(GetWindowIdealUserState);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetWindowIdealUserState(_self->ob_itself,
- &outUserState);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- PyMac_BuildRect, &outUserState);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetWindowIdealUserState(_self->ob_itself,
+ &outUserState);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildRect, &outUserState);
+ return _res;
}
static PyObject *WinObj_SetWindowIdealUserState(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- Rect inUserState;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Rect inUserState;
#ifndef SetWindowIdealUserState
- PyMac_PRECHECK(SetWindowIdealUserState);
+ PyMac_PRECHECK(SetWindowIdealUserState);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetRect, &inUserState))
- return NULL;
- _err = SetWindowIdealUserState(_self->ob_itself,
- &inUserState);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetRect, &inUserState))
+ return NULL;
+ _err = SetWindowIdealUserState(_self->ob_itself,
+ &inUserState);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_GetWindowGreatestAreaDevice(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowRegionCode inRegion;
- GDHandle outGreatestDevice;
- Rect outGreatestDeviceRect;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowRegionCode inRegion;
+ GDHandle outGreatestDevice;
+ Rect outGreatestDeviceRect;
#ifndef GetWindowGreatestAreaDevice
- PyMac_PRECHECK(GetWindowGreatestAreaDevice);
-#endif
- if (!PyArg_ParseTuple(_args, "H",
- &inRegion))
- return NULL;
- _err = GetWindowGreatestAreaDevice(_self->ob_itself,
- inRegion,
- &outGreatestDevice,
- &outGreatestDeviceRect);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&O&",
- ResObj_New, outGreatestDevice,
- PyMac_BuildRect, &outGreatestDeviceRect);
- return _res;
+ PyMac_PRECHECK(GetWindowGreatestAreaDevice);
+#endif
+ if (!PyArg_ParseTuple(_args, "H",
+ &inRegion))
+ return NULL;
+ _err = GetWindowGreatestAreaDevice(_self->ob_itself,
+ inRegion,
+ &outGreatestDevice,
+ &outGreatestDeviceRect);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&O&",
+ ResObj_New, outGreatestDevice,
+ PyMac_BuildRect, &outGreatestDeviceRect);
+ return _res;
}
static PyObject *WinObj_ConstrainWindowToScreen(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowRegionCode inRegionCode;
- WindowConstrainOptions inOptions;
- Rect inScreenRect;
- Rect outStructure;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowRegionCode inRegionCode;
+ WindowConstrainOptions inOptions;
+ Rect inScreenRect;
+ Rect outStructure;
#ifndef ConstrainWindowToScreen
- PyMac_PRECHECK(ConstrainWindowToScreen);
-#endif
- if (!PyArg_ParseTuple(_args, "HlO&",
- &inRegionCode,
- &inOptions,
- PyMac_GetRect, &inScreenRect))
- return NULL;
- _err = ConstrainWindowToScreen(_self->ob_itself,
- inRegionCode,
- inOptions,
- &inScreenRect,
- &outStructure);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- PyMac_BuildRect, &outStructure);
- return _res;
+ PyMac_PRECHECK(ConstrainWindowToScreen);
+#endif
+ if (!PyArg_ParseTuple(_args, "HlO&",
+ &inRegionCode,
+ &inOptions,
+ PyMac_GetRect, &inScreenRect))
+ return NULL;
+ _err = ConstrainWindowToScreen(_self->ob_itself,
+ inRegionCode,
+ inOptions,
+ &inScreenRect,
+ &outStructure);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildRect, &outStructure);
+ return _res;
}
static PyObject *WinObj_HideWindow(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef HideWindow
- PyMac_PRECHECK(HideWindow);
+ PyMac_PRECHECK(HideWindow);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- HideWindow(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ HideWindow(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_MacShowWindow(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef MacShowWindow
- PyMac_PRECHECK(MacShowWindow);
+ PyMac_PRECHECK(MacShowWindow);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- MacShowWindow(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ MacShowWindow(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_ShowHide(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean showFlag;
+ PyObject *_res = NULL;
+ Boolean showFlag;
#ifndef ShowHide
- PyMac_PRECHECK(ShowHide);
+ PyMac_PRECHECK(ShowHide);
#endif
- if (!PyArg_ParseTuple(_args, "b",
- &showFlag))
- return NULL;
- ShowHide(_self->ob_itself,
- showFlag);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "b",
+ &showFlag))
+ return NULL;
+ ShowHide(_self->ob_itself,
+ showFlag);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_MacIsWindowVisible(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
+ PyObject *_res = NULL;
+ Boolean _rv;
#ifndef MacIsWindowVisible
- PyMac_PRECHECK(MacIsWindowVisible);
+ PyMac_PRECHECK(MacIsWindowVisible);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = MacIsWindowVisible(_self->ob_itself);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = MacIsWindowVisible(_self->ob_itself);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *WinObj_ShowSheetWindow(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowPtr inParentWindow;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowPtr inParentWindow;
#ifndef ShowSheetWindow
- PyMac_PRECHECK(ShowSheetWindow);
+ PyMac_PRECHECK(ShowSheetWindow);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- WinObj_Convert, &inParentWindow))
- return NULL;
- _err = ShowSheetWindow(_self->ob_itself,
- inParentWindow);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ WinObj_Convert, &inParentWindow))
+ return NULL;
+ _err = ShowSheetWindow(_self->ob_itself,
+ inParentWindow);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_HideSheetWindow(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
+ PyObject *_res = NULL;
+ OSStatus _err;
#ifndef HideSheetWindow
- PyMac_PRECHECK(HideSheetWindow);
+ PyMac_PRECHECK(HideSheetWindow);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = HideSheetWindow(_self->ob_itself);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = HideSheetWindow(_self->ob_itself);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_GetSheetWindowParent(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowPtr outParentWindow;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowPtr outParentWindow;
#ifndef GetSheetWindowParent
- PyMac_PRECHECK(GetSheetWindowParent);
+ PyMac_PRECHECK(GetSheetWindowParent);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = GetSheetWindowParent(_self->ob_itself,
- &outParentWindow);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- WinObj_WhichWindow, outParentWindow);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = GetSheetWindowParent(_self->ob_itself,
+ &outParentWindow);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ WinObj_WhichWindow, outParentWindow);
+ return _res;
}
static PyObject *WinObj_GetWindowPropertyAttributes(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- OSType propertyCreator;
- OSType propertyTag;
- UInt32 attributes;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ OSType propertyCreator;
+ OSType propertyTag;
+ UInt32 attributes;
#ifndef GetWindowPropertyAttributes
- PyMac_PRECHECK(GetWindowPropertyAttributes);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- PyMac_GetOSType, &propertyCreator,
- PyMac_GetOSType, &propertyTag))
- return NULL;
- _err = GetWindowPropertyAttributes(_self->ob_itself,
- propertyCreator,
- propertyTag,
- &attributes);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("l",
- attributes);
- return _res;
+ PyMac_PRECHECK(GetWindowPropertyAttributes);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ PyMac_GetOSType, &propertyCreator,
+ PyMac_GetOSType, &propertyTag))
+ return NULL;
+ _err = GetWindowPropertyAttributes(_self->ob_itself,
+ propertyCreator,
+ propertyTag,
+ &attributes);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ attributes);
+ return _res;
}
static PyObject *WinObj_ChangeWindowPropertyAttributes(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- OSType propertyCreator;
- OSType propertyTag;
- UInt32 attributesToSet;
- UInt32 attributesToClear;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ OSType propertyCreator;
+ OSType propertyTag;
+ UInt32 attributesToSet;
+ UInt32 attributesToClear;
#ifndef ChangeWindowPropertyAttributes
- PyMac_PRECHECK(ChangeWindowPropertyAttributes);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&ll",
- PyMac_GetOSType, &propertyCreator,
- PyMac_GetOSType, &propertyTag,
- &attributesToSet,
- &attributesToClear))
- return NULL;
- _err = ChangeWindowPropertyAttributes(_self->ob_itself,
- propertyCreator,
- propertyTag,
- attributesToSet,
- attributesToClear);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(ChangeWindowPropertyAttributes);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&ll",
+ PyMac_GetOSType, &propertyCreator,
+ PyMac_GetOSType, &propertyTag,
+ &attributesToSet,
+ &attributesToClear))
+ return NULL;
+ _err = ChangeWindowPropertyAttributes(_self->ob_itself,
+ propertyCreator,
+ propertyTag,
+ attributesToSet,
+ attributesToClear);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_TrackBox(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- Point thePt;
- WindowPartCode partCode;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ Point thePt;
+ WindowPartCode partCode;
#ifndef TrackBox
- PyMac_PRECHECK(TrackBox);
+ PyMac_PRECHECK(TrackBox);
#endif
- if (!PyArg_ParseTuple(_args, "O&h",
- PyMac_GetPoint, &thePt,
- &partCode))
- return NULL;
- _rv = TrackBox(_self->ob_itself,
- thePt,
- partCode);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&h",
+ PyMac_GetPoint, &thePt,
+ &partCode))
+ return NULL;
+ _rv = TrackBox(_self->ob_itself,
+ thePt,
+ partCode);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *WinObj_TrackGoAway(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- Point thePt;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ Point thePt;
#ifndef TrackGoAway
- PyMac_PRECHECK(TrackGoAway);
+ PyMac_PRECHECK(TrackGoAway);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetPoint, &thePt))
- return NULL;
- _rv = TrackGoAway(_self->ob_itself,
- thePt);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetPoint, &thePt))
+ return NULL;
+ _rv = TrackGoAway(_self->ob_itself,
+ thePt);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *WinObj_GetWindowPort(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CGrafPtr _rv;
+ PyObject *_res = NULL;
+ CGrafPtr _rv;
#ifndef GetWindowPort
- PyMac_PRECHECK(GetWindowPort);
+ PyMac_PRECHECK(GetWindowPort);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetWindowPort(_self->ob_itself);
- _res = Py_BuildValue("O&",
- GrafObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetWindowPort(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ GrafObj_New, _rv);
+ return _res;
}
static PyObject *WinObj_GetWindowStructurePort(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- CGrafPtr _rv;
+ PyObject *_res = NULL;
+ CGrafPtr _rv;
#ifndef GetWindowStructurePort
- PyMac_PRECHECK(GetWindowStructurePort);
+ PyMac_PRECHECK(GetWindowStructurePort);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetWindowStructurePort(_self->ob_itself);
- _res = Py_BuildValue("O&",
- GrafObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetWindowStructurePort(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ GrafObj_New, _rv);
+ return _res;
}
static PyObject *WinObj_GetWindowKind(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short _rv;
+ PyObject *_res = NULL;
+ short _rv;
#ifndef GetWindowKind
- PyMac_PRECHECK(GetWindowKind);
+ PyMac_PRECHECK(GetWindowKind);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetWindowKind(_self->ob_itself);
- _res = Py_BuildValue("h",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetWindowKind(_self->ob_itself);
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
}
static PyObject *WinObj_IsWindowHilited(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
+ PyObject *_res = NULL;
+ Boolean _rv;
#ifndef IsWindowHilited
- PyMac_PRECHECK(IsWindowHilited);
+ PyMac_PRECHECK(IsWindowHilited);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = IsWindowHilited(_self->ob_itself);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = IsWindowHilited(_self->ob_itself);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *WinObj_IsWindowUpdatePending(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
+ PyObject *_res = NULL;
+ Boolean _rv;
#ifndef IsWindowUpdatePending
- PyMac_PRECHECK(IsWindowUpdatePending);
+ PyMac_PRECHECK(IsWindowUpdatePending);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = IsWindowUpdatePending(_self->ob_itself);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = IsWindowUpdatePending(_self->ob_itself);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *WinObj_MacGetNextWindow(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- WindowPtr _rv;
+ PyObject *_res = NULL;
+ WindowPtr _rv;
#ifndef MacGetNextWindow
- PyMac_PRECHECK(MacGetNextWindow);
+ PyMac_PRECHECK(MacGetNextWindow);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = MacGetNextWindow(_self->ob_itself);
- _res = Py_BuildValue("O&",
- WinObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = MacGetNextWindow(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ WinObj_New, _rv);
+ return _res;
}
static PyObject *WinObj_GetWindowStandardState(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Rect rect;
+ PyObject *_res = NULL;
+ Rect rect;
#ifndef GetWindowStandardState
- PyMac_PRECHECK(GetWindowStandardState);
+ PyMac_PRECHECK(GetWindowStandardState);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- GetWindowStandardState(_self->ob_itself,
- &rect);
- _res = Py_BuildValue("O&",
- PyMac_BuildRect, &rect);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ GetWindowStandardState(_self->ob_itself,
+ &rect);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildRect, &rect);
+ return _res;
}
static PyObject *WinObj_GetWindowUserState(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Rect rect;
+ PyObject *_res = NULL;
+ Rect rect;
#ifndef GetWindowUserState
- PyMac_PRECHECK(GetWindowUserState);
+ PyMac_PRECHECK(GetWindowUserState);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- GetWindowUserState(_self->ob_itself,
- &rect);
- _res = Py_BuildValue("O&",
- PyMac_BuildRect, &rect);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ GetWindowUserState(_self->ob_itself,
+ &rect);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildRect, &rect);
+ return _res;
}
static PyObject *WinObj_SetWindowKind(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short kind;
+ PyObject *_res = NULL;
+ short kind;
#ifndef SetWindowKind
- PyMac_PRECHECK(SetWindowKind);
+ PyMac_PRECHECK(SetWindowKind);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &kind))
- return NULL;
- SetWindowKind(_self->ob_itself,
- kind);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &kind))
+ return NULL;
+ SetWindowKind(_self->ob_itself,
+ kind);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_SetWindowStandardState(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Rect rect;
+ PyObject *_res = NULL;
+ Rect rect;
#ifndef SetWindowStandardState
- PyMac_PRECHECK(SetWindowStandardState);
+ PyMac_PRECHECK(SetWindowStandardState);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetRect, &rect))
- return NULL;
- SetWindowStandardState(_self->ob_itself,
- &rect);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetRect, &rect))
+ return NULL;
+ SetWindowStandardState(_self->ob_itself,
+ &rect);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_SetWindowUserState(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Rect rect;
+ PyObject *_res = NULL;
+ Rect rect;
#ifndef SetWindowUserState
- PyMac_PRECHECK(SetWindowUserState);
+ PyMac_PRECHECK(SetWindowUserState);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetRect, &rect))
- return NULL;
- SetWindowUserState(_self->ob_itself,
- &rect);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetRect, &rect))
+ return NULL;
+ SetWindowUserState(_self->ob_itself,
+ &rect);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_SetPortWindowPort(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef SetPortWindowPort
- PyMac_PRECHECK(SetPortWindowPort);
+ PyMac_PRECHECK(SetPortWindowPort);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- SetPortWindowPort(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ SetPortWindowPort(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_GetWindowPortBounds(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Rect bounds;
+ PyObject *_res = NULL;
+ Rect bounds;
#ifndef GetWindowPortBounds
- PyMac_PRECHECK(GetWindowPortBounds);
+ PyMac_PRECHECK(GetWindowPortBounds);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- GetWindowPortBounds(_self->ob_itself,
- &bounds);
- _res = Py_BuildValue("O&",
- PyMac_BuildRect, &bounds);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ GetWindowPortBounds(_self->ob_itself,
+ &bounds);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildRect, &bounds);
+ return _res;
}
static PyObject *WinObj_IsWindowVisible(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
+ PyObject *_res = NULL;
+ Boolean _rv;
#ifndef IsWindowVisible
- PyMac_PRECHECK(IsWindowVisible);
+ PyMac_PRECHECK(IsWindowVisible);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = IsWindowVisible(_self->ob_itself);
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = IsWindowVisible(_self->ob_itself);
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *WinObj_GetWindowStructureRgn(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RgnHandle r;
+ PyObject *_res = NULL;
+ RgnHandle r;
#ifndef GetWindowStructureRgn
- PyMac_PRECHECK(GetWindowStructureRgn);
+ PyMac_PRECHECK(GetWindowStructureRgn);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &r))
- return NULL;
- GetWindowStructureRgn(_self->ob_itself,
- r);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &r))
+ return NULL;
+ GetWindowStructureRgn(_self->ob_itself,
+ r);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_GetWindowContentRgn(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RgnHandle r;
+ PyObject *_res = NULL;
+ RgnHandle r;
#ifndef GetWindowContentRgn
- PyMac_PRECHECK(GetWindowContentRgn);
+ PyMac_PRECHECK(GetWindowContentRgn);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &r))
- return NULL;
- GetWindowContentRgn(_self->ob_itself,
- r);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &r))
+ return NULL;
+ GetWindowContentRgn(_self->ob_itself,
+ r);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_GetWindowUpdateRgn(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RgnHandle r;
+ PyObject *_res = NULL;
+ RgnHandle r;
#ifndef GetWindowUpdateRgn
- PyMac_PRECHECK(GetWindowUpdateRgn);
+ PyMac_PRECHECK(GetWindowUpdateRgn);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &r))
- return NULL;
- GetWindowUpdateRgn(_self->ob_itself,
- r);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &r))
+ return NULL;
+ GetWindowUpdateRgn(_self->ob_itself,
+ r);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_GetNextWindow(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- WindowPtr _rv;
+ PyObject *_res = NULL;
+ WindowPtr _rv;
#ifndef GetNextWindow
- PyMac_PRECHECK(GetNextWindow);
+ PyMac_PRECHECK(GetNextWindow);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetNextWindow(_self->ob_itself);
- _res = Py_BuildValue("O&",
- WinObj_WhichWindow, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetNextWindow(_self->ob_itself);
+ _res = Py_BuildValue("O&",
+ WinObj_WhichWindow, _rv);
+ return _res;
}
static PyObject *WinObj_MoveWindow(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short hGlobal;
- short vGlobal;
- Boolean front;
+ PyObject *_res = NULL;
+ short hGlobal;
+ short vGlobal;
+ Boolean front;
#ifndef MoveWindow
- PyMac_PRECHECK(MoveWindow);
-#endif
- if (!PyArg_ParseTuple(_args, "hhb",
- &hGlobal,
- &vGlobal,
- &front))
- return NULL;
- MoveWindow(_self->ob_itself,
- hGlobal,
- vGlobal,
- front);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ PyMac_PRECHECK(MoveWindow);
+#endif
+ if (!PyArg_ParseTuple(_args, "hhb",
+ &hGlobal,
+ &vGlobal,
+ &front))
+ return NULL;
+ MoveWindow(_self->ob_itself,
+ hGlobal,
+ vGlobal,
+ front);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_ShowWindow(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
#ifndef ShowWindow
- PyMac_PRECHECK(ShowWindow);
+ PyMac_PRECHECK(ShowWindow);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- ShowWindow(_self->ob_itself);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ ShowWindow(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *WinObj_AutoDispose(WindowObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
- int onoff, old = 0;
- if (!PyArg_ParseTuple(_args, "i", &onoff))
- return NULL;
- if ( _self->ob_freeit )
- old = 1;
- if ( onoff )
- _self->ob_freeit = PyMac_AutoDisposeWindow;
- else
- _self->ob_freeit = NULL;
- _res = Py_BuildValue("i", old);
- return _res;
+ int onoff, old = 0;
+ if (!PyArg_ParseTuple(_args, "i", &onoff))
+ return NULL;
+ if ( _self->ob_freeit )
+ old = 1;
+ if ( onoff )
+ _self->ob_freeit = PyMac_AutoDisposeWindow;
+ else
+ _self->ob_freeit = NULL;
+ _res = Py_BuildValue("i", old);
+ return _res;
}
static PyMethodDef WinObj_methods[] = {
- {"GetWindowOwnerCount", (PyCFunction)WinObj_GetWindowOwnerCount, 1,
- PyDoc_STR("() -> (UInt32 outCount)")},
- {"CloneWindow", (PyCFunction)WinObj_CloneWindow, 1,
- PyDoc_STR("() -> None")},
- {"GetWindowRetainCount", (PyCFunction)WinObj_GetWindowRetainCount, 1,
- PyDoc_STR("() -> (ItemCount _rv)")},
- {"RetainWindow", (PyCFunction)WinObj_RetainWindow, 1,
- PyDoc_STR("() -> None")},
- {"ReleaseWindow", (PyCFunction)WinObj_ReleaseWindow, 1,
- PyDoc_STR("() -> None")},
- {"ReshapeCustomWindow", (PyCFunction)WinObj_ReshapeCustomWindow, 1,
- PyDoc_STR("() -> None")},
- {"GetWindowWidgetHilite", (PyCFunction)WinObj_GetWindowWidgetHilite, 1,
- PyDoc_STR("() -> (WindowDefPartCode outHilite)")},
- {"GetWindowClass", (PyCFunction)WinObj_GetWindowClass, 1,
- PyDoc_STR("() -> (WindowClass outClass)")},
- {"GetWindowAttributes", (PyCFunction)WinObj_GetWindowAttributes, 1,
- PyDoc_STR("() -> (WindowAttributes outAttributes)")},
- {"ChangeWindowAttributes", (PyCFunction)WinObj_ChangeWindowAttributes, 1,
- PyDoc_STR("(WindowAttributes setTheseAttributes, WindowAttributes clearTheseAttributes) -> None")},
- {"SetWindowClass", (PyCFunction)WinObj_SetWindowClass, 1,
- PyDoc_STR("(WindowClass inWindowClass) -> None")},
- {"SetWindowModality", (PyCFunction)WinObj_SetWindowModality, 1,
- PyDoc_STR("(WindowModality inModalKind, WindowPtr inUnavailableWindow) -> None")},
- {"GetWindowModality", (PyCFunction)WinObj_GetWindowModality, 1,
- PyDoc_STR("() -> (WindowModality outModalKind, WindowPtr outUnavailableWindow)")},
- {"SetWindowContentColor", (PyCFunction)WinObj_SetWindowContentColor, 1,
- PyDoc_STR("(RGBColor color) -> None")},
- {"GetWindowContentColor", (PyCFunction)WinObj_GetWindowContentColor, 1,
- PyDoc_STR("() -> (RGBColor color)")},
- {"GetWindowContentPattern", (PyCFunction)WinObj_GetWindowContentPattern, 1,
- PyDoc_STR("(PixPatHandle outPixPat) -> None")},
- {"SetWindowContentPattern", (PyCFunction)WinObj_SetWindowContentPattern, 1,
- PyDoc_STR("(PixPatHandle pixPat) -> None")},
- {"ScrollWindowRect", (PyCFunction)WinObj_ScrollWindowRect, 1,
- PyDoc_STR("(Rect inScrollRect, SInt16 inHPixels, SInt16 inVPixels, ScrollWindowOptions inOptions, RgnHandle outExposedRgn) -> None")},
- {"ScrollWindowRegion", (PyCFunction)WinObj_ScrollWindowRegion, 1,
- PyDoc_STR("(RgnHandle inScrollRgn, SInt16 inHPixels, SInt16 inVPixels, ScrollWindowOptions inOptions, RgnHandle outExposedRgn) -> None")},
- {"ClipAbove", (PyCFunction)WinObj_ClipAbove, 1,
- PyDoc_STR("() -> None")},
- {"PaintOne", (PyCFunction)WinObj_PaintOne, 1,
- PyDoc_STR("(RgnHandle clobberedRgn) -> None")},
- {"PaintBehind", (PyCFunction)WinObj_PaintBehind, 1,
- PyDoc_STR("(RgnHandle clobberedRgn) -> None")},
- {"CalcVis", (PyCFunction)WinObj_CalcVis, 1,
- PyDoc_STR("() -> None")},
- {"CalcVisBehind", (PyCFunction)WinObj_CalcVisBehind, 1,
- PyDoc_STR("(RgnHandle clobberedRgn) -> None")},
- {"BringToFront", (PyCFunction)WinObj_BringToFront, 1,
- PyDoc_STR("() -> None")},
- {"SendBehind", (PyCFunction)WinObj_SendBehind, 1,
- PyDoc_STR("(WindowPtr behindWindow) -> None")},
- {"SelectWindow", (PyCFunction)WinObj_SelectWindow, 1,
- PyDoc_STR("() -> None")},
- {"GetNextWindowOfClass", (PyCFunction)WinObj_GetNextWindowOfClass, 1,
- PyDoc_STR("(WindowClass inWindowClass, Boolean mustBeVisible) -> (WindowPtr _rv)")},
- {"SetWindowAlternateTitle", (PyCFunction)WinObj_SetWindowAlternateTitle, 1,
- PyDoc_STR("(CFStringRef inTitle) -> None")},
- {"CopyWindowAlternateTitle", (PyCFunction)WinObj_CopyWindowAlternateTitle, 1,
- PyDoc_STR("() -> (CFStringRef outTitle)")},
- {"HiliteWindow", (PyCFunction)WinObj_HiliteWindow, 1,
- PyDoc_STR("(Boolean fHilite) -> None")},
- {"SetWRefCon", (PyCFunction)WinObj_SetWRefCon, 1,
- PyDoc_STR("(long data) -> None")},
- {"GetWRefCon", (PyCFunction)WinObj_GetWRefCon, 1,
- PyDoc_STR("() -> (long _rv)")},
- {"SetWindowPic", (PyCFunction)WinObj_SetWindowPic, 1,
- PyDoc_STR("(PicHandle pic) -> None")},
- {"GetWindowPic", (PyCFunction)WinObj_GetWindowPic, 1,
- PyDoc_STR("() -> (PicHandle _rv)")},
- {"GetWVariant", (PyCFunction)WinObj_GetWVariant, 1,
- PyDoc_STR("() -> (short _rv)")},
- {"GetWindowFeatures", (PyCFunction)WinObj_GetWindowFeatures, 1,
- PyDoc_STR("() -> (UInt32 outFeatures)")},
- {"GetWindowRegion", (PyCFunction)WinObj_GetWindowRegion, 1,
- PyDoc_STR("(WindowRegionCode inRegionCode, RgnHandle ioWinRgn) -> None")},
- {"GetWindowStructureWidths", (PyCFunction)WinObj_GetWindowStructureWidths, 1,
- PyDoc_STR("() -> (Rect outRect)")},
- {"BeginUpdate", (PyCFunction)WinObj_BeginUpdate, 1,
- PyDoc_STR("() -> None")},
- {"EndUpdate", (PyCFunction)WinObj_EndUpdate, 1,
- PyDoc_STR("() -> None")},
- {"InvalWindowRgn", (PyCFunction)WinObj_InvalWindowRgn, 1,
- PyDoc_STR("(RgnHandle region) -> None")},
- {"InvalWindowRect", (PyCFunction)WinObj_InvalWindowRect, 1,
- PyDoc_STR("(Rect bounds) -> None")},
- {"ValidWindowRgn", (PyCFunction)WinObj_ValidWindowRgn, 1,
- PyDoc_STR("(RgnHandle region) -> None")},
- {"ValidWindowRect", (PyCFunction)WinObj_ValidWindowRect, 1,
- PyDoc_STR("(Rect bounds) -> None")},
- {"DrawGrowIcon", (PyCFunction)WinObj_DrawGrowIcon, 1,
- PyDoc_STR("() -> None")},
- {"SetWTitle", (PyCFunction)WinObj_SetWTitle, 1,
- PyDoc_STR("(Str255 title) -> None")},
- {"GetWTitle", (PyCFunction)WinObj_GetWTitle, 1,
- PyDoc_STR("() -> (Str255 title)")},
- {"SetWindowTitleWithCFString", (PyCFunction)WinObj_SetWindowTitleWithCFString, 1,
- PyDoc_STR("(CFStringRef inString) -> None")},
- {"CopyWindowTitleAsCFString", (PyCFunction)WinObj_CopyWindowTitleAsCFString, 1,
- PyDoc_STR("() -> (CFStringRef outString)")},
- {"SetWindowProxyFSSpec", (PyCFunction)WinObj_SetWindowProxyFSSpec, 1,
- PyDoc_STR("(FSSpec inFile) -> None")},
- {"GetWindowProxyFSSpec", (PyCFunction)WinObj_GetWindowProxyFSSpec, 1,
- PyDoc_STR("() -> (FSSpec outFile)")},
- {"SetWindowProxyAlias", (PyCFunction)WinObj_SetWindowProxyAlias, 1,
- PyDoc_STR("(AliasHandle inAlias) -> None")},
- {"GetWindowProxyAlias", (PyCFunction)WinObj_GetWindowProxyAlias, 1,
- PyDoc_STR("() -> (AliasHandle alias)")},
- {"SetWindowProxyCreatorAndType", (PyCFunction)WinObj_SetWindowProxyCreatorAndType, 1,
- PyDoc_STR("(OSType fileCreator, OSType fileType, SInt16 vRefNum) -> None")},
- {"GetWindowProxyIcon", (PyCFunction)WinObj_GetWindowProxyIcon, 1,
- PyDoc_STR("() -> (IconRef outIcon)")},
- {"SetWindowProxyIcon", (PyCFunction)WinObj_SetWindowProxyIcon, 1,
- PyDoc_STR("(IconRef icon) -> None")},
- {"RemoveWindowProxy", (PyCFunction)WinObj_RemoveWindowProxy, 1,
- PyDoc_STR("() -> None")},
- {"BeginWindowProxyDrag", (PyCFunction)WinObj_BeginWindowProxyDrag, 1,
- PyDoc_STR("(RgnHandle outDragOutlineRgn) -> (DragReference outNewDrag)")},
- {"EndWindowProxyDrag", (PyCFunction)WinObj_EndWindowProxyDrag, 1,
- PyDoc_STR("(DragReference theDrag) -> None")},
- {"TrackWindowProxyFromExistingDrag", (PyCFunction)WinObj_TrackWindowProxyFromExistingDrag, 1,
- PyDoc_STR("(Point startPt, DragReference drag, RgnHandle inDragOutlineRgn) -> None")},
- {"TrackWindowProxyDrag", (PyCFunction)WinObj_TrackWindowProxyDrag, 1,
- PyDoc_STR("(Point startPt) -> None")},
- {"IsWindowModified", (PyCFunction)WinObj_IsWindowModified, 1,
- PyDoc_STR("() -> (Boolean _rv)")},
- {"SetWindowModified", (PyCFunction)WinObj_SetWindowModified, 1,
- PyDoc_STR("(Boolean modified) -> None")},
- {"IsWindowPathSelectClick", (PyCFunction)WinObj_IsWindowPathSelectClick, 1,
- PyDoc_STR("(EventRecord event) -> (Boolean _rv)")},
- {"WindowPathSelect", (PyCFunction)WinObj_WindowPathSelect, 1,
- PyDoc_STR("(MenuHandle menu) -> (SInt32 outMenuResult)")},
- {"HiliteWindowFrameForDrag", (PyCFunction)WinObj_HiliteWindowFrameForDrag, 1,
- PyDoc_STR("(Boolean hilited) -> None")},
- {"TransitionWindow", (PyCFunction)WinObj_TransitionWindow, 1,
- PyDoc_STR("(WindowTransitionEffect inEffect, WindowTransitionAction inAction, Rect inRect) -> None")},
- {"TransitionWindowAndParent", (PyCFunction)WinObj_TransitionWindowAndParent, 1,
- PyDoc_STR("(WindowPtr inParentWindow, WindowTransitionEffect inEffect, WindowTransitionAction inAction, Rect inRect) -> None")},
- {"MacMoveWindow", (PyCFunction)WinObj_MacMoveWindow, 1,
- PyDoc_STR("(short hGlobal, short vGlobal, Boolean front) -> None")},
- {"SizeWindow", (PyCFunction)WinObj_SizeWindow, 1,
- PyDoc_STR("(short w, short h, Boolean fUpdate) -> None")},
- {"GrowWindow", (PyCFunction)WinObj_GrowWindow, 1,
- PyDoc_STR("(Point startPt, Rect bBox) -> (long _rv)")},
- {"DragWindow", (PyCFunction)WinObj_DragWindow, 1,
- PyDoc_STR("(Point startPt, Rect boundsRect) -> None")},
- {"ZoomWindow", (PyCFunction)WinObj_ZoomWindow, 1,
- PyDoc_STR("(WindowPartCode partCode, Boolean front) -> None")},
- {"IsWindowCollapsable", (PyCFunction)WinObj_IsWindowCollapsable, 1,
- PyDoc_STR("() -> (Boolean _rv)")},
- {"IsWindowCollapsed", (PyCFunction)WinObj_IsWindowCollapsed, 1,
- PyDoc_STR("() -> (Boolean _rv)")},
- {"CollapseWindow", (PyCFunction)WinObj_CollapseWindow, 1,
- PyDoc_STR("(Boolean collapse) -> None")},
- {"GetWindowBounds", (PyCFunction)WinObj_GetWindowBounds, 1,
- PyDoc_STR("(WindowRegionCode regionCode) -> (Rect globalBounds)")},
- {"ResizeWindow", (PyCFunction)WinObj_ResizeWindow, 1,
- PyDoc_STR("(Point inStartPoint, Rect inSizeConstraints) -> (Boolean _rv, Rect outNewContentRect)")},
- {"SetWindowBounds", (PyCFunction)WinObj_SetWindowBounds, 1,
- PyDoc_STR("(WindowRegionCode regionCode, Rect globalBounds) -> None")},
- {"RepositionWindow", (PyCFunction)WinObj_RepositionWindow, 1,
- PyDoc_STR("(WindowPtr parentWindow, WindowPositionMethod method) -> None")},
- {"MoveWindowStructure", (PyCFunction)WinObj_MoveWindowStructure, 1,
- PyDoc_STR("(short hGlobal, short vGlobal) -> None")},
- {"IsWindowInStandardState", (PyCFunction)WinObj_IsWindowInStandardState, 1,
- PyDoc_STR("(Point inIdealSize) -> (Boolean _rv, Rect outIdealStandardState)")},
- {"ZoomWindowIdeal", (PyCFunction)WinObj_ZoomWindowIdeal, 1,
- PyDoc_STR("(WindowPartCode inPartCode) -> (Point ioIdealSize)")},
- {"GetWindowIdealUserState", (PyCFunction)WinObj_GetWindowIdealUserState, 1,
- PyDoc_STR("() -> (Rect outUserState)")},
- {"SetWindowIdealUserState", (PyCFunction)WinObj_SetWindowIdealUserState, 1,
- PyDoc_STR("(Rect inUserState) -> None")},
- {"GetWindowGreatestAreaDevice", (PyCFunction)WinObj_GetWindowGreatestAreaDevice, 1,
- PyDoc_STR("(WindowRegionCode inRegion) -> (GDHandle outGreatestDevice, Rect outGreatestDeviceRect)")},
- {"ConstrainWindowToScreen", (PyCFunction)WinObj_ConstrainWindowToScreen, 1,
- PyDoc_STR("(WindowRegionCode inRegionCode, WindowConstrainOptions inOptions, Rect inScreenRect) -> (Rect outStructure)")},
- {"HideWindow", (PyCFunction)WinObj_HideWindow, 1,
- PyDoc_STR("() -> None")},
- {"MacShowWindow", (PyCFunction)WinObj_MacShowWindow, 1,
- PyDoc_STR("() -> None")},
- {"ShowHide", (PyCFunction)WinObj_ShowHide, 1,
- PyDoc_STR("(Boolean showFlag) -> None")},
- {"MacIsWindowVisible", (PyCFunction)WinObj_MacIsWindowVisible, 1,
- PyDoc_STR("() -> (Boolean _rv)")},
- {"ShowSheetWindow", (PyCFunction)WinObj_ShowSheetWindow, 1,
- PyDoc_STR("(WindowPtr inParentWindow) -> None")},
- {"HideSheetWindow", (PyCFunction)WinObj_HideSheetWindow, 1,
- PyDoc_STR("() -> None")},
- {"GetSheetWindowParent", (PyCFunction)WinObj_GetSheetWindowParent, 1,
- PyDoc_STR("() -> (WindowPtr outParentWindow)")},
- {"GetWindowPropertyAttributes", (PyCFunction)WinObj_GetWindowPropertyAttributes, 1,
- PyDoc_STR("(OSType propertyCreator, OSType propertyTag) -> (UInt32 attributes)")},
- {"ChangeWindowPropertyAttributes", (PyCFunction)WinObj_ChangeWindowPropertyAttributes, 1,
- PyDoc_STR("(OSType propertyCreator, OSType propertyTag, UInt32 attributesToSet, UInt32 attributesToClear) -> None")},
- {"TrackBox", (PyCFunction)WinObj_TrackBox, 1,
- PyDoc_STR("(Point thePt, WindowPartCode partCode) -> (Boolean _rv)")},
- {"TrackGoAway", (PyCFunction)WinObj_TrackGoAway, 1,
- PyDoc_STR("(Point thePt) -> (Boolean _rv)")},
- {"GetWindowPort", (PyCFunction)WinObj_GetWindowPort, 1,
- PyDoc_STR("() -> (CGrafPtr _rv)")},
- {"GetWindowStructurePort", (PyCFunction)WinObj_GetWindowStructurePort, 1,
- PyDoc_STR("() -> (CGrafPtr _rv)")},
- {"GetWindowKind", (PyCFunction)WinObj_GetWindowKind, 1,
- PyDoc_STR("() -> (short _rv)")},
- {"IsWindowHilited", (PyCFunction)WinObj_IsWindowHilited, 1,
- PyDoc_STR("() -> (Boolean _rv)")},
- {"IsWindowUpdatePending", (PyCFunction)WinObj_IsWindowUpdatePending, 1,
- PyDoc_STR("() -> (Boolean _rv)")},
- {"MacGetNextWindow", (PyCFunction)WinObj_MacGetNextWindow, 1,
- PyDoc_STR("() -> (WindowPtr _rv)")},
- {"GetWindowStandardState", (PyCFunction)WinObj_GetWindowStandardState, 1,
- PyDoc_STR("() -> (Rect rect)")},
- {"GetWindowUserState", (PyCFunction)WinObj_GetWindowUserState, 1,
- PyDoc_STR("() -> (Rect rect)")},
- {"SetWindowKind", (PyCFunction)WinObj_SetWindowKind, 1,
- PyDoc_STR("(short kind) -> None")},
- {"SetWindowStandardState", (PyCFunction)WinObj_SetWindowStandardState, 1,
- PyDoc_STR("(Rect rect) -> None")},
- {"SetWindowUserState", (PyCFunction)WinObj_SetWindowUserState, 1,
- PyDoc_STR("(Rect rect) -> None")},
- {"SetPortWindowPort", (PyCFunction)WinObj_SetPortWindowPort, 1,
- PyDoc_STR("() -> None")},
- {"GetWindowPortBounds", (PyCFunction)WinObj_GetWindowPortBounds, 1,
- PyDoc_STR("() -> (Rect bounds)")},
- {"IsWindowVisible", (PyCFunction)WinObj_IsWindowVisible, 1,
- PyDoc_STR("() -> (Boolean _rv)")},
- {"GetWindowStructureRgn", (PyCFunction)WinObj_GetWindowStructureRgn, 1,
- PyDoc_STR("(RgnHandle r) -> None")},
- {"GetWindowContentRgn", (PyCFunction)WinObj_GetWindowContentRgn, 1,
- PyDoc_STR("(RgnHandle r) -> None")},
- {"GetWindowUpdateRgn", (PyCFunction)WinObj_GetWindowUpdateRgn, 1,
- PyDoc_STR("(RgnHandle r) -> None")},
- {"GetNextWindow", (PyCFunction)WinObj_GetNextWindow, 1,
- PyDoc_STR("() -> (WindowPtr _rv)")},
- {"MoveWindow", (PyCFunction)WinObj_MoveWindow, 1,
- PyDoc_STR("(short hGlobal, short vGlobal, Boolean front) -> None")},
- {"ShowWindow", (PyCFunction)WinObj_ShowWindow, 1,
- PyDoc_STR("() -> None")},
- {"AutoDispose", (PyCFunction)WinObj_AutoDispose, 1,
- PyDoc_STR("(int)->int. Automatically DisposeHandle the object on Python object cleanup")},
- {NULL, NULL, 0}
+ {"GetWindowOwnerCount", (PyCFunction)WinObj_GetWindowOwnerCount, 1,
+ PyDoc_STR("() -> (UInt32 outCount)")},
+ {"CloneWindow", (PyCFunction)WinObj_CloneWindow, 1,
+ PyDoc_STR("() -> None")},
+ {"GetWindowRetainCount", (PyCFunction)WinObj_GetWindowRetainCount, 1,
+ PyDoc_STR("() -> (ItemCount _rv)")},
+ {"RetainWindow", (PyCFunction)WinObj_RetainWindow, 1,
+ PyDoc_STR("() -> None")},
+ {"ReleaseWindow", (PyCFunction)WinObj_ReleaseWindow, 1,
+ PyDoc_STR("() -> None")},
+ {"ReshapeCustomWindow", (PyCFunction)WinObj_ReshapeCustomWindow, 1,
+ PyDoc_STR("() -> None")},
+ {"GetWindowWidgetHilite", (PyCFunction)WinObj_GetWindowWidgetHilite, 1,
+ PyDoc_STR("() -> (WindowDefPartCode outHilite)")},
+ {"GetWindowClass", (PyCFunction)WinObj_GetWindowClass, 1,
+ PyDoc_STR("() -> (WindowClass outClass)")},
+ {"GetWindowAttributes", (PyCFunction)WinObj_GetWindowAttributes, 1,
+ PyDoc_STR("() -> (WindowAttributes outAttributes)")},
+ {"ChangeWindowAttributes", (PyCFunction)WinObj_ChangeWindowAttributes, 1,
+ PyDoc_STR("(WindowAttributes setTheseAttributes, WindowAttributes clearTheseAttributes) -> None")},
+ {"SetWindowClass", (PyCFunction)WinObj_SetWindowClass, 1,
+ PyDoc_STR("(WindowClass inWindowClass) -> None")},
+ {"SetWindowModality", (PyCFunction)WinObj_SetWindowModality, 1,
+ PyDoc_STR("(WindowModality inModalKind, WindowPtr inUnavailableWindow) -> None")},
+ {"GetWindowModality", (PyCFunction)WinObj_GetWindowModality, 1,
+ PyDoc_STR("() -> (WindowModality outModalKind, WindowPtr outUnavailableWindow)")},
+ {"SetWindowContentColor", (PyCFunction)WinObj_SetWindowContentColor, 1,
+ PyDoc_STR("(RGBColor color) -> None")},
+ {"GetWindowContentColor", (PyCFunction)WinObj_GetWindowContentColor, 1,
+ PyDoc_STR("() -> (RGBColor color)")},
+ {"GetWindowContentPattern", (PyCFunction)WinObj_GetWindowContentPattern, 1,
+ PyDoc_STR("(PixPatHandle outPixPat) -> None")},
+ {"SetWindowContentPattern", (PyCFunction)WinObj_SetWindowContentPattern, 1,
+ PyDoc_STR("(PixPatHandle pixPat) -> None")},
+ {"ScrollWindowRect", (PyCFunction)WinObj_ScrollWindowRect, 1,
+ PyDoc_STR("(Rect inScrollRect, SInt16 inHPixels, SInt16 inVPixels, ScrollWindowOptions inOptions, RgnHandle outExposedRgn) -> None")},
+ {"ScrollWindowRegion", (PyCFunction)WinObj_ScrollWindowRegion, 1,
+ PyDoc_STR("(RgnHandle inScrollRgn, SInt16 inHPixels, SInt16 inVPixels, ScrollWindowOptions inOptions, RgnHandle outExposedRgn) -> None")},
+ {"ClipAbove", (PyCFunction)WinObj_ClipAbove, 1,
+ PyDoc_STR("() -> None")},
+ {"PaintOne", (PyCFunction)WinObj_PaintOne, 1,
+ PyDoc_STR("(RgnHandle clobberedRgn) -> None")},
+ {"PaintBehind", (PyCFunction)WinObj_PaintBehind, 1,
+ PyDoc_STR("(RgnHandle clobberedRgn) -> None")},
+ {"CalcVis", (PyCFunction)WinObj_CalcVis, 1,
+ PyDoc_STR("() -> None")},
+ {"CalcVisBehind", (PyCFunction)WinObj_CalcVisBehind, 1,
+ PyDoc_STR("(RgnHandle clobberedRgn) -> None")},
+ {"BringToFront", (PyCFunction)WinObj_BringToFront, 1,
+ PyDoc_STR("() -> None")},
+ {"SendBehind", (PyCFunction)WinObj_SendBehind, 1,
+ PyDoc_STR("(WindowPtr behindWindow) -> None")},
+ {"SelectWindow", (PyCFunction)WinObj_SelectWindow, 1,
+ PyDoc_STR("() -> None")},
+ {"GetNextWindowOfClass", (PyCFunction)WinObj_GetNextWindowOfClass, 1,
+ PyDoc_STR("(WindowClass inWindowClass, Boolean mustBeVisible) -> (WindowPtr _rv)")},
+ {"SetWindowAlternateTitle", (PyCFunction)WinObj_SetWindowAlternateTitle, 1,
+ PyDoc_STR("(CFStringRef inTitle) -> None")},
+ {"CopyWindowAlternateTitle", (PyCFunction)WinObj_CopyWindowAlternateTitle, 1,
+ PyDoc_STR("() -> (CFStringRef outTitle)")},
+ {"HiliteWindow", (PyCFunction)WinObj_HiliteWindow, 1,
+ PyDoc_STR("(Boolean fHilite) -> None")},
+ {"SetWRefCon", (PyCFunction)WinObj_SetWRefCon, 1,
+ PyDoc_STR("(long data) -> None")},
+ {"GetWRefCon", (PyCFunction)WinObj_GetWRefCon, 1,
+ PyDoc_STR("() -> (long _rv)")},
+ {"SetWindowPic", (PyCFunction)WinObj_SetWindowPic, 1,
+ PyDoc_STR("(PicHandle pic) -> None")},
+ {"GetWindowPic", (PyCFunction)WinObj_GetWindowPic, 1,
+ PyDoc_STR("() -> (PicHandle _rv)")},
+ {"GetWVariant", (PyCFunction)WinObj_GetWVariant, 1,
+ PyDoc_STR("() -> (short _rv)")},
+ {"GetWindowFeatures", (PyCFunction)WinObj_GetWindowFeatures, 1,
+ PyDoc_STR("() -> (UInt32 outFeatures)")},
+ {"GetWindowRegion", (PyCFunction)WinObj_GetWindowRegion, 1,
+ PyDoc_STR("(WindowRegionCode inRegionCode, RgnHandle ioWinRgn) -> None")},
+ {"GetWindowStructureWidths", (PyCFunction)WinObj_GetWindowStructureWidths, 1,
+ PyDoc_STR("() -> (Rect outRect)")},
+ {"BeginUpdate", (PyCFunction)WinObj_BeginUpdate, 1,
+ PyDoc_STR("() -> None")},
+ {"EndUpdate", (PyCFunction)WinObj_EndUpdate, 1,
+ PyDoc_STR("() -> None")},
+ {"InvalWindowRgn", (PyCFunction)WinObj_InvalWindowRgn, 1,
+ PyDoc_STR("(RgnHandle region) -> None")},
+ {"InvalWindowRect", (PyCFunction)WinObj_InvalWindowRect, 1,
+ PyDoc_STR("(Rect bounds) -> None")},
+ {"ValidWindowRgn", (PyCFunction)WinObj_ValidWindowRgn, 1,
+ PyDoc_STR("(RgnHandle region) -> None")},
+ {"ValidWindowRect", (PyCFunction)WinObj_ValidWindowRect, 1,
+ PyDoc_STR("(Rect bounds) -> None")},
+ {"DrawGrowIcon", (PyCFunction)WinObj_DrawGrowIcon, 1,
+ PyDoc_STR("() -> None")},
+ {"SetWTitle", (PyCFunction)WinObj_SetWTitle, 1,
+ PyDoc_STR("(Str255 title) -> None")},
+ {"GetWTitle", (PyCFunction)WinObj_GetWTitle, 1,
+ PyDoc_STR("() -> (Str255 title)")},
+ {"SetWindowTitleWithCFString", (PyCFunction)WinObj_SetWindowTitleWithCFString, 1,
+ PyDoc_STR("(CFStringRef inString) -> None")},
+ {"CopyWindowTitleAsCFString", (PyCFunction)WinObj_CopyWindowTitleAsCFString, 1,
+ PyDoc_STR("() -> (CFStringRef outString)")},
+ {"SetWindowProxyFSSpec", (PyCFunction)WinObj_SetWindowProxyFSSpec, 1,
+ PyDoc_STR("(FSSpec inFile) -> None")},
+ {"GetWindowProxyFSSpec", (PyCFunction)WinObj_GetWindowProxyFSSpec, 1,
+ PyDoc_STR("() -> (FSSpec outFile)")},
+ {"SetWindowProxyAlias", (PyCFunction)WinObj_SetWindowProxyAlias, 1,
+ PyDoc_STR("(AliasHandle inAlias) -> None")},
+ {"GetWindowProxyAlias", (PyCFunction)WinObj_GetWindowProxyAlias, 1,
+ PyDoc_STR("() -> (AliasHandle alias)")},
+ {"SetWindowProxyCreatorAndType", (PyCFunction)WinObj_SetWindowProxyCreatorAndType, 1,
+ PyDoc_STR("(OSType fileCreator, OSType fileType, SInt16 vRefNum) -> None")},
+ {"GetWindowProxyIcon", (PyCFunction)WinObj_GetWindowProxyIcon, 1,
+ PyDoc_STR("() -> (IconRef outIcon)")},
+ {"SetWindowProxyIcon", (PyCFunction)WinObj_SetWindowProxyIcon, 1,
+ PyDoc_STR("(IconRef icon) -> None")},
+ {"RemoveWindowProxy", (PyCFunction)WinObj_RemoveWindowProxy, 1,
+ PyDoc_STR("() -> None")},
+ {"BeginWindowProxyDrag", (PyCFunction)WinObj_BeginWindowProxyDrag, 1,
+ PyDoc_STR("(RgnHandle outDragOutlineRgn) -> (DragReference outNewDrag)")},
+ {"EndWindowProxyDrag", (PyCFunction)WinObj_EndWindowProxyDrag, 1,
+ PyDoc_STR("(DragReference theDrag) -> None")},
+ {"TrackWindowProxyFromExistingDrag", (PyCFunction)WinObj_TrackWindowProxyFromExistingDrag, 1,
+ PyDoc_STR("(Point startPt, DragReference drag, RgnHandle inDragOutlineRgn) -> None")},
+ {"TrackWindowProxyDrag", (PyCFunction)WinObj_TrackWindowProxyDrag, 1,
+ PyDoc_STR("(Point startPt) -> None")},
+ {"IsWindowModified", (PyCFunction)WinObj_IsWindowModified, 1,
+ PyDoc_STR("() -> (Boolean _rv)")},
+ {"SetWindowModified", (PyCFunction)WinObj_SetWindowModified, 1,
+ PyDoc_STR("(Boolean modified) -> None")},
+ {"IsWindowPathSelectClick", (PyCFunction)WinObj_IsWindowPathSelectClick, 1,
+ PyDoc_STR("(EventRecord event) -> (Boolean _rv)")},
+ {"WindowPathSelect", (PyCFunction)WinObj_WindowPathSelect, 1,
+ PyDoc_STR("(MenuHandle menu) -> (SInt32 outMenuResult)")},
+ {"HiliteWindowFrameForDrag", (PyCFunction)WinObj_HiliteWindowFrameForDrag, 1,
+ PyDoc_STR("(Boolean hilited) -> None")},
+ {"TransitionWindow", (PyCFunction)WinObj_TransitionWindow, 1,
+ PyDoc_STR("(WindowTransitionEffect inEffect, WindowTransitionAction inAction, Rect inRect) -> None")},
+ {"TransitionWindowAndParent", (PyCFunction)WinObj_TransitionWindowAndParent, 1,
+ PyDoc_STR("(WindowPtr inParentWindow, WindowTransitionEffect inEffect, WindowTransitionAction inAction, Rect inRect) -> None")},
+ {"MacMoveWindow", (PyCFunction)WinObj_MacMoveWindow, 1,
+ PyDoc_STR("(short hGlobal, short vGlobal, Boolean front) -> None")},
+ {"SizeWindow", (PyCFunction)WinObj_SizeWindow, 1,
+ PyDoc_STR("(short w, short h, Boolean fUpdate) -> None")},
+ {"GrowWindow", (PyCFunction)WinObj_GrowWindow, 1,
+ PyDoc_STR("(Point startPt, Rect bBox) -> (long _rv)")},
+ {"DragWindow", (PyCFunction)WinObj_DragWindow, 1,
+ PyDoc_STR("(Point startPt, Rect boundsRect) -> None")},
+ {"ZoomWindow", (PyCFunction)WinObj_ZoomWindow, 1,
+ PyDoc_STR("(WindowPartCode partCode, Boolean front) -> None")},
+ {"IsWindowCollapsable", (PyCFunction)WinObj_IsWindowCollapsable, 1,
+ PyDoc_STR("() -> (Boolean _rv)")},
+ {"IsWindowCollapsed", (PyCFunction)WinObj_IsWindowCollapsed, 1,
+ PyDoc_STR("() -> (Boolean _rv)")},
+ {"CollapseWindow", (PyCFunction)WinObj_CollapseWindow, 1,
+ PyDoc_STR("(Boolean collapse) -> None")},
+ {"GetWindowBounds", (PyCFunction)WinObj_GetWindowBounds, 1,
+ PyDoc_STR("(WindowRegionCode regionCode) -> (Rect globalBounds)")},
+ {"ResizeWindow", (PyCFunction)WinObj_ResizeWindow, 1,
+ PyDoc_STR("(Point inStartPoint, Rect inSizeConstraints) -> (Boolean _rv, Rect outNewContentRect)")},
+ {"SetWindowBounds", (PyCFunction)WinObj_SetWindowBounds, 1,
+ PyDoc_STR("(WindowRegionCode regionCode, Rect globalBounds) -> None")},
+ {"RepositionWindow", (PyCFunction)WinObj_RepositionWindow, 1,
+ PyDoc_STR("(WindowPtr parentWindow, WindowPositionMethod method) -> None")},
+ {"MoveWindowStructure", (PyCFunction)WinObj_MoveWindowStructure, 1,
+ PyDoc_STR("(short hGlobal, short vGlobal) -> None")},
+ {"IsWindowInStandardState", (PyCFunction)WinObj_IsWindowInStandardState, 1,
+ PyDoc_STR("(Point inIdealSize) -> (Boolean _rv, Rect outIdealStandardState)")},
+ {"ZoomWindowIdeal", (PyCFunction)WinObj_ZoomWindowIdeal, 1,
+ PyDoc_STR("(WindowPartCode inPartCode) -> (Point ioIdealSize)")},
+ {"GetWindowIdealUserState", (PyCFunction)WinObj_GetWindowIdealUserState, 1,
+ PyDoc_STR("() -> (Rect outUserState)")},
+ {"SetWindowIdealUserState", (PyCFunction)WinObj_SetWindowIdealUserState, 1,
+ PyDoc_STR("(Rect inUserState) -> None")},
+ {"GetWindowGreatestAreaDevice", (PyCFunction)WinObj_GetWindowGreatestAreaDevice, 1,
+ PyDoc_STR("(WindowRegionCode inRegion) -> (GDHandle outGreatestDevice, Rect outGreatestDeviceRect)")},
+ {"ConstrainWindowToScreen", (PyCFunction)WinObj_ConstrainWindowToScreen, 1,
+ PyDoc_STR("(WindowRegionCode inRegionCode, WindowConstrainOptions inOptions, Rect inScreenRect) -> (Rect outStructure)")},
+ {"HideWindow", (PyCFunction)WinObj_HideWindow, 1,
+ PyDoc_STR("() -> None")},
+ {"MacShowWindow", (PyCFunction)WinObj_MacShowWindow, 1,
+ PyDoc_STR("() -> None")},
+ {"ShowHide", (PyCFunction)WinObj_ShowHide, 1,
+ PyDoc_STR("(Boolean showFlag) -> None")},
+ {"MacIsWindowVisible", (PyCFunction)WinObj_MacIsWindowVisible, 1,
+ PyDoc_STR("() -> (Boolean _rv)")},
+ {"ShowSheetWindow", (PyCFunction)WinObj_ShowSheetWindow, 1,
+ PyDoc_STR("(WindowPtr inParentWindow) -> None")},
+ {"HideSheetWindow", (PyCFunction)WinObj_HideSheetWindow, 1,
+ PyDoc_STR("() -> None")},
+ {"GetSheetWindowParent", (PyCFunction)WinObj_GetSheetWindowParent, 1,
+ PyDoc_STR("() -> (WindowPtr outParentWindow)")},
+ {"GetWindowPropertyAttributes", (PyCFunction)WinObj_GetWindowPropertyAttributes, 1,
+ PyDoc_STR("(OSType propertyCreator, OSType propertyTag) -> (UInt32 attributes)")},
+ {"ChangeWindowPropertyAttributes", (PyCFunction)WinObj_ChangeWindowPropertyAttributes, 1,
+ PyDoc_STR("(OSType propertyCreator, OSType propertyTag, UInt32 attributesToSet, UInt32 attributesToClear) -> None")},
+ {"TrackBox", (PyCFunction)WinObj_TrackBox, 1,
+ PyDoc_STR("(Point thePt, WindowPartCode partCode) -> (Boolean _rv)")},
+ {"TrackGoAway", (PyCFunction)WinObj_TrackGoAway, 1,
+ PyDoc_STR("(Point thePt) -> (Boolean _rv)")},
+ {"GetWindowPort", (PyCFunction)WinObj_GetWindowPort, 1,
+ PyDoc_STR("() -> (CGrafPtr _rv)")},
+ {"GetWindowStructurePort", (PyCFunction)WinObj_GetWindowStructurePort, 1,
+ PyDoc_STR("() -> (CGrafPtr _rv)")},
+ {"GetWindowKind", (PyCFunction)WinObj_GetWindowKind, 1,
+ PyDoc_STR("() -> (short _rv)")},
+ {"IsWindowHilited", (PyCFunction)WinObj_IsWindowHilited, 1,
+ PyDoc_STR("() -> (Boolean _rv)")},
+ {"IsWindowUpdatePending", (PyCFunction)WinObj_IsWindowUpdatePending, 1,
+ PyDoc_STR("() -> (Boolean _rv)")},
+ {"MacGetNextWindow", (PyCFunction)WinObj_MacGetNextWindow, 1,
+ PyDoc_STR("() -> (WindowPtr _rv)")},
+ {"GetWindowStandardState", (PyCFunction)WinObj_GetWindowStandardState, 1,
+ PyDoc_STR("() -> (Rect rect)")},
+ {"GetWindowUserState", (PyCFunction)WinObj_GetWindowUserState, 1,
+ PyDoc_STR("() -> (Rect rect)")},
+ {"SetWindowKind", (PyCFunction)WinObj_SetWindowKind, 1,
+ PyDoc_STR("(short kind) -> None")},
+ {"SetWindowStandardState", (PyCFunction)WinObj_SetWindowStandardState, 1,
+ PyDoc_STR("(Rect rect) -> None")},
+ {"SetWindowUserState", (PyCFunction)WinObj_SetWindowUserState, 1,
+ PyDoc_STR("(Rect rect) -> None")},
+ {"SetPortWindowPort", (PyCFunction)WinObj_SetPortWindowPort, 1,
+ PyDoc_STR("() -> None")},
+ {"GetWindowPortBounds", (PyCFunction)WinObj_GetWindowPortBounds, 1,
+ PyDoc_STR("() -> (Rect bounds)")},
+ {"IsWindowVisible", (PyCFunction)WinObj_IsWindowVisible, 1,
+ PyDoc_STR("() -> (Boolean _rv)")},
+ {"GetWindowStructureRgn", (PyCFunction)WinObj_GetWindowStructureRgn, 1,
+ PyDoc_STR("(RgnHandle r) -> None")},
+ {"GetWindowContentRgn", (PyCFunction)WinObj_GetWindowContentRgn, 1,
+ PyDoc_STR("(RgnHandle r) -> None")},
+ {"GetWindowUpdateRgn", (PyCFunction)WinObj_GetWindowUpdateRgn, 1,
+ PyDoc_STR("(RgnHandle r) -> None")},
+ {"GetNextWindow", (PyCFunction)WinObj_GetNextWindow, 1,
+ PyDoc_STR("() -> (WindowPtr _rv)")},
+ {"MoveWindow", (PyCFunction)WinObj_MoveWindow, 1,
+ PyDoc_STR("(short hGlobal, short vGlobal, Boolean front) -> None")},
+ {"ShowWindow", (PyCFunction)WinObj_ShowWindow, 1,
+ PyDoc_STR("() -> None")},
+ {"AutoDispose", (PyCFunction)WinObj_AutoDispose, 1,
+ PyDoc_STR("(int)->int. Automatically DisposeHandle the object on Python object cleanup")},
+ {NULL, NULL, 0}
};
#define WinObj_getsetlist NULL
@@ -2571,21 +2571,21 @@ static PyMethodDef WinObj_methods[] = {
static int WinObj_compare(WindowObject *self, WindowObject *other)
{
- if ( self->ob_itself > other->ob_itself ) return 1;
- if ( self->ob_itself < other->ob_itself ) return -1;
- return 0;
+ if ( self->ob_itself > other->ob_itself ) return 1;
+ if ( self->ob_itself < other->ob_itself ) return -1;
+ return 0;
}
static PyObject * WinObj_repr(WindowObject *self)
{
- char buf[100];
- sprintf(buf, "<Window object at 0x%8.8x for 0x%8.8x>", (unsigned)self, (unsigned)self->ob_itself);
- return PyString_FromString(buf);
+ char buf[100];
+ sprintf(buf, "<Window object at 0x%8.8x for 0x%8.8x>", (unsigned)self, (unsigned)self->ob_itself);
+ return PyString_FromString(buf);
}
static int WinObj_hash(WindowObject *self)
{
- return (int)self->ob_itself;
+ return (int)self->ob_itself;
}
#define WinObj_tp_init 0
@@ -2593,61 +2593,61 @@ static int WinObj_hash(WindowObject *self)
static PyObject *WinObj_tp_new(PyTypeObject *type, PyObject *_args, PyObject *_kwds)
{
- PyObject *_self;
- WindowPtr itself;
- char *kw[] = {"itself", 0};
+ 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;
+ 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 = {
- PyObject_HEAD_INIT(NULL)
- 0, /*ob_size*/
- "_Win.Window", /*tp_name*/
- sizeof(WindowObject), /*tp_basicsize*/
- 0, /*tp_itemsize*/
- /* methods */
- (destructor) WinObj_dealloc, /*tp_dealloc*/
- 0, /*tp_print*/
- (getattrfunc)0, /*tp_getattr*/
- (setattrfunc)0, /*tp_setattr*/
- (cmpfunc) WinObj_compare, /*tp_compare*/
- (reprfunc) WinObj_repr, /*tp_repr*/
- (PyNumberMethods *)0, /* tp_as_number */
- (PySequenceMethods *)0, /* tp_as_sequence */
- (PyMappingMethods *)0, /* tp_as_mapping */
- (hashfunc) WinObj_hash, /*tp_hash*/
- 0, /*tp_call*/
- 0, /*tp_str*/
- PyObject_GenericGetAttr, /*tp_getattro*/
- PyObject_GenericSetAttr, /*tp_setattro */
- 0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
- 0, /*tp_doc*/
- 0, /*tp_traverse*/
- 0, /*tp_clear*/
- 0, /*tp_richcompare*/
- 0, /*tp_weaklistoffset*/
- 0, /*tp_iter*/
- 0, /*tp_iternext*/
- WinObj_methods, /* tp_methods */
- 0, /*tp_members*/
- WinObj_getsetlist, /*tp_getset*/
- 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 */
+ PyObject_HEAD_INIT(NULL)
+ 0, /*ob_size*/
+ "_Win.Window", /*tp_name*/
+ sizeof(WindowObject), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ /* methods */
+ (destructor) WinObj_dealloc, /*tp_dealloc*/
+ 0, /*tp_print*/
+ (getattrfunc)0, /*tp_getattr*/
+ (setattrfunc)0, /*tp_setattr*/
+ (cmpfunc) WinObj_compare, /*tp_compare*/
+ (reprfunc) WinObj_repr, /*tp_repr*/
+ (PyNumberMethods *)0, /* tp_as_number */
+ (PySequenceMethods *)0, /* tp_as_sequence */
+ (PyMappingMethods *)0, /* tp_as_mapping */
+ (hashfunc) WinObj_hash, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ PyObject_GenericGetAttr, /*tp_getattro*/
+ PyObject_GenericSetAttr, /*tp_setattro */
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
+ 0, /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ WinObj_methods, /* tp_methods */
+ 0, /*tp_members*/
+ WinObj_getsetlist, /*tp_getset*/
+ 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 --------------------- */
@@ -2655,553 +2655,553 @@ PyTypeObject Window_Type = {
static PyObject *Win_GetNewCWindow(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- WindowPtr _rv;
- short windowID;
- WindowPtr behind;
+ PyObject *_res = NULL;
+ WindowPtr _rv;
+ short windowID;
+ WindowPtr behind;
#ifndef GetNewCWindow
- PyMac_PRECHECK(GetNewCWindow);
+ PyMac_PRECHECK(GetNewCWindow);
#endif
- if (!PyArg_ParseTuple(_args, "hO&",
- &windowID,
- WinObj_Convert, &behind))
- return NULL;
- _rv = GetNewCWindow(windowID,
- (void *)0,
- behind);
- _res = Py_BuildValue("O&",
- WinObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "hO&",
+ &windowID,
+ WinObj_Convert, &behind))
+ return NULL;
+ _rv = GetNewCWindow(windowID,
+ (void *)0,
+ behind);
+ _res = Py_BuildValue("O&",
+ WinObj_New, _rv);
+ return _res;
}
static PyObject *Win_NewWindow(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- WindowPtr _rv;
- Rect boundsRect;
- Str255 title;
- Boolean visible;
- short theProc;
- WindowPtr behind;
- Boolean goAwayFlag;
- long refCon;
+ PyObject *_res = NULL;
+ WindowPtr _rv;
+ Rect boundsRect;
+ Str255 title;
+ Boolean visible;
+ short theProc;
+ WindowPtr behind;
+ Boolean goAwayFlag;
+ long refCon;
#ifndef NewWindow
- PyMac_PRECHECK(NewWindow);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&bhO&bl",
- PyMac_GetRect, &boundsRect,
- PyMac_GetStr255, title,
- &visible,
- &theProc,
- WinObj_Convert, &behind,
- &goAwayFlag,
- &refCon))
- return NULL;
- _rv = NewWindow((void *)0,
- &boundsRect,
- title,
- visible,
- theProc,
- behind,
- goAwayFlag,
- refCon);
- _res = Py_BuildValue("O&",
- WinObj_New, _rv);
- return _res;
+ PyMac_PRECHECK(NewWindow);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&bhO&bl",
+ PyMac_GetRect, &boundsRect,
+ PyMac_GetStr255, title,
+ &visible,
+ &theProc,
+ WinObj_Convert, &behind,
+ &goAwayFlag,
+ &refCon))
+ return NULL;
+ _rv = NewWindow((void *)0,
+ &boundsRect,
+ title,
+ visible,
+ theProc,
+ behind,
+ goAwayFlag,
+ refCon);
+ _res = Py_BuildValue("O&",
+ WinObj_New, _rv);
+ return _res;
}
static PyObject *Win_GetNewWindow(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- WindowPtr _rv;
- short windowID;
- WindowPtr behind;
+ PyObject *_res = NULL;
+ WindowPtr _rv;
+ short windowID;
+ WindowPtr behind;
#ifndef GetNewWindow
- PyMac_PRECHECK(GetNewWindow);
+ PyMac_PRECHECK(GetNewWindow);
#endif
- if (!PyArg_ParseTuple(_args, "hO&",
- &windowID,
- WinObj_Convert, &behind))
- return NULL;
- _rv = GetNewWindow(windowID,
- (void *)0,
- behind);
- _res = Py_BuildValue("O&",
- WinObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "hO&",
+ &windowID,
+ WinObj_Convert, &behind))
+ return NULL;
+ _rv = GetNewWindow(windowID,
+ (void *)0,
+ behind);
+ _res = Py_BuildValue("O&",
+ WinObj_New, _rv);
+ return _res;
}
static PyObject *Win_NewCWindow(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- WindowPtr _rv;
- Rect boundsRect;
- Str255 title;
- Boolean visible;
- short procID;
- WindowPtr behind;
- Boolean goAwayFlag;
- long refCon;
+ PyObject *_res = NULL;
+ WindowPtr _rv;
+ Rect boundsRect;
+ Str255 title;
+ Boolean visible;
+ short procID;
+ WindowPtr behind;
+ Boolean goAwayFlag;
+ long refCon;
#ifndef NewCWindow
- PyMac_PRECHECK(NewCWindow);
-#endif
- if (!PyArg_ParseTuple(_args, "O&O&bhO&bl",
- PyMac_GetRect, &boundsRect,
- PyMac_GetStr255, title,
- &visible,
- &procID,
- WinObj_Convert, &behind,
- &goAwayFlag,
- &refCon))
- return NULL;
- _rv = NewCWindow((void *)0,
- &boundsRect,
- title,
- visible,
- procID,
- behind,
- goAwayFlag,
- refCon);
- _res = Py_BuildValue("O&",
- WinObj_New, _rv);
- return _res;
+ PyMac_PRECHECK(NewCWindow);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&O&bhO&bl",
+ PyMac_GetRect, &boundsRect,
+ PyMac_GetStr255, title,
+ &visible,
+ &procID,
+ WinObj_Convert, &behind,
+ &goAwayFlag,
+ &refCon))
+ return NULL;
+ _rv = NewCWindow((void *)0,
+ &boundsRect,
+ title,
+ visible,
+ procID,
+ behind,
+ goAwayFlag,
+ refCon);
+ _res = Py_BuildValue("O&",
+ WinObj_New, _rv);
+ return _res;
}
static PyObject *Win_CreateNewWindow(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- WindowClass windowClass;
- WindowAttributes attributes;
- Rect contentBounds;
- WindowPtr outWindow;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowClass windowClass;
+ WindowAttributes attributes;
+ Rect contentBounds;
+ WindowPtr outWindow;
#ifndef CreateNewWindow
- PyMac_PRECHECK(CreateNewWindow);
-#endif
- if (!PyArg_ParseTuple(_args, "llO&",
- &windowClass,
- &attributes,
- PyMac_GetRect, &contentBounds))
- return NULL;
- _err = CreateNewWindow(windowClass,
- attributes,
- &contentBounds,
- &outWindow);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- WinObj_New, outWindow);
- return _res;
+ PyMac_PRECHECK(CreateNewWindow);
+#endif
+ if (!PyArg_ParseTuple(_args, "llO&",
+ &windowClass,
+ &attributes,
+ PyMac_GetRect, &contentBounds))
+ return NULL;
+ _err = CreateNewWindow(windowClass,
+ attributes,
+ &contentBounds,
+ &outWindow);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ WinObj_New, outWindow);
+ return _res;
}
static PyObject *Win_CreateWindowFromResource(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- SInt16 resID;
- WindowPtr outWindow;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ SInt16 resID;
+ WindowPtr outWindow;
#ifndef CreateWindowFromResource
- PyMac_PRECHECK(CreateWindowFromResource);
+ PyMac_PRECHECK(CreateWindowFromResource);
#endif
- if (!PyArg_ParseTuple(_args, "h",
- &resID))
- return NULL;
- _err = CreateWindowFromResource(resID,
- &outWindow);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- WinObj_New, outWindow);
- return _res;
+ if (!PyArg_ParseTuple(_args, "h",
+ &resID))
+ return NULL;
+ _err = CreateWindowFromResource(resID,
+ &outWindow);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ WinObj_New, outWindow);
+ return _res;
}
static PyObject *Win_ShowFloatingWindows(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
+ PyObject *_res = NULL;
+ OSStatus _err;
#ifndef ShowFloatingWindows
- PyMac_PRECHECK(ShowFloatingWindows);
+ PyMac_PRECHECK(ShowFloatingWindows);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = ShowFloatingWindows();
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = ShowFloatingWindows();
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Win_HideFloatingWindows(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
+ PyObject *_res = NULL;
+ OSStatus _err;
#ifndef HideFloatingWindows
- PyMac_PRECHECK(HideFloatingWindows);
+ PyMac_PRECHECK(HideFloatingWindows);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = HideFloatingWindows();
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = HideFloatingWindows();
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Win_AreFloatingWindowsVisible(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
+ PyObject *_res = NULL;
+ Boolean _rv;
#ifndef AreFloatingWindowsVisible
- PyMac_PRECHECK(AreFloatingWindowsVisible);
+ PyMac_PRECHECK(AreFloatingWindowsVisible);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = AreFloatingWindowsVisible();
- _res = Py_BuildValue("b",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = AreFloatingWindowsVisible();
+ _res = Py_BuildValue("b",
+ _rv);
+ return _res;
}
static PyObject *Win_CheckUpdate(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- Boolean _rv;
- EventRecord theEvent;
+ PyObject *_res = NULL;
+ Boolean _rv;
+ EventRecord theEvent;
#ifndef CheckUpdate
- PyMac_PRECHECK(CheckUpdate);
+ PyMac_PRECHECK(CheckUpdate);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = CheckUpdate(&theEvent);
- _res = Py_BuildValue("bO&",
- _rv,
- PyMac_BuildEventRecord, &theEvent);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = CheckUpdate(&theEvent);
+ _res = Py_BuildValue("bO&",
+ _rv,
+ PyMac_BuildEventRecord, &theEvent);
+ return _res;
}
static PyObject *Win_MacFindWindow(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- WindowPartCode _rv;
- Point thePoint;
- WindowPtr window;
+ PyObject *_res = NULL;
+ WindowPartCode _rv;
+ Point thePoint;
+ WindowPtr window;
#ifndef MacFindWindow
- PyMac_PRECHECK(MacFindWindow);
+ PyMac_PRECHECK(MacFindWindow);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetPoint, &thePoint))
- return NULL;
- _rv = MacFindWindow(thePoint,
- &window);
- _res = Py_BuildValue("hO&",
- _rv,
- WinObj_WhichWindow, window);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetPoint, &thePoint))
+ return NULL;
+ _rv = MacFindWindow(thePoint,
+ &window);
+ _res = Py_BuildValue("hO&",
+ _rv,
+ WinObj_WhichWindow, window);
+ return _res;
}
static PyObject *Win_FrontWindow(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- WindowPtr _rv;
+ PyObject *_res = NULL;
+ WindowPtr _rv;
#ifndef FrontWindow
- PyMac_PRECHECK(FrontWindow);
+ PyMac_PRECHECK(FrontWindow);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = FrontWindow();
- _res = Py_BuildValue("O&",
- WinObj_WhichWindow, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = FrontWindow();
+ _res = Py_BuildValue("O&",
+ WinObj_WhichWindow, _rv);
+ return _res;
}
static PyObject *Win_FrontNonFloatingWindow(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- WindowPtr _rv;
+ PyObject *_res = NULL;
+ WindowPtr _rv;
#ifndef FrontNonFloatingWindow
- PyMac_PRECHECK(FrontNonFloatingWindow);
+ PyMac_PRECHECK(FrontNonFloatingWindow);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = FrontNonFloatingWindow();
- _res = Py_BuildValue("O&",
- WinObj_WhichWindow, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = FrontNonFloatingWindow();
+ _res = Py_BuildValue("O&",
+ WinObj_WhichWindow, _rv);
+ return _res;
}
static PyObject *Win_GetFrontWindowOfClass(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- WindowPtr _rv;
- WindowClass inWindowClass;
- Boolean mustBeVisible;
+ PyObject *_res = NULL;
+ WindowPtr _rv;
+ WindowClass inWindowClass;
+ Boolean mustBeVisible;
#ifndef GetFrontWindowOfClass
- PyMac_PRECHECK(GetFrontWindowOfClass);
+ PyMac_PRECHECK(GetFrontWindowOfClass);
#endif
- if (!PyArg_ParseTuple(_args, "lb",
- &inWindowClass,
- &mustBeVisible))
- return NULL;
- _rv = GetFrontWindowOfClass(inWindowClass,
- mustBeVisible);
- _res = Py_BuildValue("O&",
- WinObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "lb",
+ &inWindowClass,
+ &mustBeVisible))
+ return NULL;
+ _rv = GetFrontWindowOfClass(inWindowClass,
+ mustBeVisible);
+ _res = Py_BuildValue("O&",
+ WinObj_New, _rv);
+ return _res;
}
static PyObject *Win_FindWindowOfClass(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- Point where;
- WindowClass inWindowClass;
- WindowPtr outWindow;
- WindowPartCode outWindowPart;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Point where;
+ WindowClass inWindowClass;
+ WindowPtr outWindow;
+ WindowPartCode outWindowPart;
#ifndef FindWindowOfClass
- PyMac_PRECHECK(FindWindowOfClass);
-#endif
- if (!PyArg_ParseTuple(_args, "O&l",
- PyMac_GetPoint, &where,
- &inWindowClass))
- return NULL;
- _err = FindWindowOfClass(&where,
- inWindowClass,
- &outWindow,
- &outWindowPart);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&h",
- WinObj_WhichWindow, outWindow,
- outWindowPart);
- return _res;
+ PyMac_PRECHECK(FindWindowOfClass);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&l",
+ PyMac_GetPoint, &where,
+ &inWindowClass))
+ return NULL;
+ _err = FindWindowOfClass(&where,
+ inWindowClass,
+ &outWindow,
+ &outWindowPart);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&h",
+ WinObj_WhichWindow, outWindow,
+ outWindowPart);
+ return _res;
}
static PyObject *Win_CreateStandardWindowMenu(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- OptionBits inOptions;
- MenuHandle outMenu;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ OptionBits inOptions;
+ MenuHandle outMenu;
#ifndef CreateStandardWindowMenu
- PyMac_PRECHECK(CreateStandardWindowMenu);
+ PyMac_PRECHECK(CreateStandardWindowMenu);
#endif
- if (!PyArg_ParseTuple(_args, "l",
- &inOptions))
- return NULL;
- _err = CreateStandardWindowMenu(inOptions,
- &outMenu);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- MenuObj_New, outMenu);
- return _res;
+ if (!PyArg_ParseTuple(_args, "l",
+ &inOptions))
+ return NULL;
+ _err = CreateStandardWindowMenu(inOptions,
+ &outMenu);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ MenuObj_New, outMenu);
+ return _res;
}
static PyObject *Win_CollapseAllWindows(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- Boolean collapse;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Boolean collapse;
#ifndef CollapseAllWindows
- PyMac_PRECHECK(CollapseAllWindows);
+ PyMac_PRECHECK(CollapseAllWindows);
#endif
- if (!PyArg_ParseTuple(_args, "b",
- &collapse))
- return NULL;
- _err = CollapseAllWindows(collapse);
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, "b",
+ &collapse))
+ return NULL;
+ _err = CollapseAllWindows(collapse);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Win_GetAvailableWindowPositioningBounds(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
- GDHandle inDevice;
- Rect outAvailableRect;
+ PyObject *_res = NULL;
+ OSStatus _err;
+ GDHandle inDevice;
+ Rect outAvailableRect;
#ifndef GetAvailableWindowPositioningBounds
- PyMac_PRECHECK(GetAvailableWindowPositioningBounds);
+ PyMac_PRECHECK(GetAvailableWindowPositioningBounds);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- ResObj_Convert, &inDevice))
- return NULL;
- _err = GetAvailableWindowPositioningBounds(inDevice,
- &outAvailableRect);
- if (_err != noErr) return PyMac_Error(_err);
- _res = Py_BuildValue("O&",
- PyMac_BuildRect, &outAvailableRect);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &inDevice))
+ return NULL;
+ _err = GetAvailableWindowPositioningBounds(inDevice,
+ &outAvailableRect);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildRect, &outAvailableRect);
+ return _res;
}
static PyObject *Win_DisableScreenUpdates(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
+ PyObject *_res = NULL;
+ OSStatus _err;
#ifndef DisableScreenUpdates
- PyMac_PRECHECK(DisableScreenUpdates);
+ PyMac_PRECHECK(DisableScreenUpdates);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = DisableScreenUpdates();
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = DisableScreenUpdates();
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Win_EnableScreenUpdates(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- OSStatus _err;
+ PyObject *_res = NULL;
+ OSStatus _err;
#ifndef EnableScreenUpdates
- PyMac_PRECHECK(EnableScreenUpdates);
+ PyMac_PRECHECK(EnableScreenUpdates);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _err = EnableScreenUpdates();
- if (_err != noErr) return PyMac_Error(_err);
- Py_INCREF(Py_None);
- _res = Py_None;
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = EnableScreenUpdates();
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
}
static PyObject *Win_PinRect(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- long _rv;
- Rect theRect;
- Point thePt;
+ PyObject *_res = NULL;
+ long _rv;
+ Rect theRect;
+ Point thePt;
#ifndef PinRect
- PyMac_PRECHECK(PinRect);
+ PyMac_PRECHECK(PinRect);
#endif
- if (!PyArg_ParseTuple(_args, "O&O&",
- PyMac_GetRect, &theRect,
- PyMac_GetPoint, &thePt))
- return NULL;
- _rv = PinRect(&theRect,
- thePt);
- _res = Py_BuildValue("l",
- _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ PyMac_GetRect, &theRect,
+ PyMac_GetPoint, &thePt))
+ return NULL;
+ _rv = PinRect(&theRect,
+ thePt);
+ _res = Py_BuildValue("l",
+ _rv);
+ return _res;
}
static PyObject *Win_GetGrayRgn(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- RgnHandle _rv;
+ PyObject *_res = NULL;
+ RgnHandle _rv;
#ifndef GetGrayRgn
- PyMac_PRECHECK(GetGrayRgn);
+ PyMac_PRECHECK(GetGrayRgn);
#endif
- if (!PyArg_ParseTuple(_args, ""))
- return NULL;
- _rv = GetGrayRgn();
- _res = Py_BuildValue("O&",
- ResObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _rv = GetGrayRgn();
+ _res = Py_BuildValue("O&",
+ ResObj_New, _rv);
+ return _res;
}
static PyObject *Win_GetWindowFromPort(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- WindowPtr _rv;
- CGrafPtr port;
+ PyObject *_res = NULL;
+ WindowPtr _rv;
+ CGrafPtr port;
#ifndef GetWindowFromPort
- PyMac_PRECHECK(GetWindowFromPort);
+ PyMac_PRECHECK(GetWindowFromPort);
#endif
- if (!PyArg_ParseTuple(_args, "O&",
- GrafObj_Convert, &port))
- return NULL;
- _rv = GetWindowFromPort(port);
- _res = Py_BuildValue("O&",
- WinObj_New, _rv);
- return _res;
+ if (!PyArg_ParseTuple(_args, "O&",
+ GrafObj_Convert, &port))
+ return NULL;
+ _rv = GetWindowFromPort(port);
+ _res = Py_BuildValue("O&",
+ WinObj_New, _rv);
+ return _res;
}
static PyObject *Win_WhichWindow(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
+ PyObject *_res = NULL;
- long ptr;
+ long ptr;
- if ( !PyArg_ParseTuple(_args, "i", &ptr) )
- return NULL;
- _res = WinObj_WhichWindow((WindowPtr)ptr);
- return _res;
+ if ( !PyArg_ParseTuple(_args, "i", &ptr) )
+ return NULL;
+ _res = WinObj_WhichWindow((WindowPtr)ptr);
+ return _res;
}
static PyObject *Win_FindWindow(PyObject *_self, PyObject *_args)
{
- PyObject *_res = NULL;
- short _rv;
- Point thePoint;
- WindowPtr theWindow;
+ PyObject *_res = NULL;
+ short _rv;
+ Point thePoint;
+ WindowPtr theWindow;
#ifndef FindWindow
- PyMac_PRECHECK(FindWindow);
-#endif
- if (!PyArg_ParseTuple(_args, "O&",
- PyMac_GetPoint, &thePoint))
- return NULL;
- _rv = FindWindow(thePoint,
- &theWindow);
- _res = Py_BuildValue("hO&",
- _rv,
- WinObj_WhichWindow, theWindow);
- return _res;
+ PyMac_PRECHECK(FindWindow);
+#endif
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetPoint, &thePoint))
+ return NULL;
+ _rv = FindWindow(thePoint,
+ &theWindow);
+ _res = Py_BuildValue("hO&",
+ _rv,
+ WinObj_WhichWindow, theWindow);
+ return _res;
}
#endif /* __LP64__ */
static PyMethodDef Win_methods[] = {
#ifndef __LP64__
- {"GetNewCWindow", (PyCFunction)Win_GetNewCWindow, 1,
- PyDoc_STR("(short windowID, WindowPtr behind) -> (WindowPtr _rv)")},
- {"NewWindow", (PyCFunction)Win_NewWindow, 1,
- PyDoc_STR("(Rect boundsRect, Str255 title, Boolean visible, short theProc, WindowPtr behind, Boolean goAwayFlag, long refCon) -> (WindowPtr _rv)")},
- {"GetNewWindow", (PyCFunction)Win_GetNewWindow, 1,
- PyDoc_STR("(short windowID, WindowPtr behind) -> (WindowPtr _rv)")},
- {"NewCWindow", (PyCFunction)Win_NewCWindow, 1,
- PyDoc_STR("(Rect boundsRect, Str255 title, Boolean visible, short procID, WindowPtr behind, Boolean goAwayFlag, long refCon) -> (WindowPtr _rv)")},
- {"CreateNewWindow", (PyCFunction)Win_CreateNewWindow, 1,
- PyDoc_STR("(WindowClass windowClass, WindowAttributes attributes, Rect contentBounds) -> (WindowPtr outWindow)")},
- {"CreateWindowFromResource", (PyCFunction)Win_CreateWindowFromResource, 1,
- PyDoc_STR("(SInt16 resID) -> (WindowPtr outWindow)")},
- {"ShowFloatingWindows", (PyCFunction)Win_ShowFloatingWindows, 1,
- PyDoc_STR("() -> None")},
- {"HideFloatingWindows", (PyCFunction)Win_HideFloatingWindows, 1,
- PyDoc_STR("() -> None")},
- {"AreFloatingWindowsVisible", (PyCFunction)Win_AreFloatingWindowsVisible, 1,
- PyDoc_STR("() -> (Boolean _rv)")},
- {"CheckUpdate", (PyCFunction)Win_CheckUpdate, 1,
- PyDoc_STR("() -> (Boolean _rv, EventRecord theEvent)")},
- {"MacFindWindow", (PyCFunction)Win_MacFindWindow, 1,
- PyDoc_STR("(Point thePoint) -> (WindowPartCode _rv, WindowPtr window)")},
- {"FrontWindow", (PyCFunction)Win_FrontWindow, 1,
- PyDoc_STR("() -> (WindowPtr _rv)")},
- {"FrontNonFloatingWindow", (PyCFunction)Win_FrontNonFloatingWindow, 1,
- PyDoc_STR("() -> (WindowPtr _rv)")},
- {"GetFrontWindowOfClass", (PyCFunction)Win_GetFrontWindowOfClass, 1,
- PyDoc_STR("(WindowClass inWindowClass, Boolean mustBeVisible) -> (WindowPtr _rv)")},
- {"FindWindowOfClass", (PyCFunction)Win_FindWindowOfClass, 1,
- PyDoc_STR("(Point where, WindowClass inWindowClass) -> (WindowPtr outWindow, WindowPartCode outWindowPart)")},
- {"CreateStandardWindowMenu", (PyCFunction)Win_CreateStandardWindowMenu, 1,
- PyDoc_STR("(OptionBits inOptions) -> (MenuHandle outMenu)")},
- {"CollapseAllWindows", (PyCFunction)Win_CollapseAllWindows, 1,
- PyDoc_STR("(Boolean collapse) -> None")},
- {"GetAvailableWindowPositioningBounds", (PyCFunction)Win_GetAvailableWindowPositioningBounds, 1,
- PyDoc_STR("(GDHandle inDevice) -> (Rect outAvailableRect)")},
- {"DisableScreenUpdates", (PyCFunction)Win_DisableScreenUpdates, 1,
- PyDoc_STR("() -> None")},
- {"EnableScreenUpdates", (PyCFunction)Win_EnableScreenUpdates, 1,
- PyDoc_STR("() -> None")},
- {"PinRect", (PyCFunction)Win_PinRect, 1,
- PyDoc_STR("(Rect theRect, Point thePt) -> (long _rv)")},
- {"GetGrayRgn", (PyCFunction)Win_GetGrayRgn, 1,
- PyDoc_STR("() -> (RgnHandle _rv)")},
- {"GetWindowFromPort", (PyCFunction)Win_GetWindowFromPort, 1,
- PyDoc_STR("(CGrafPtr port) -> (WindowPtr _rv)")},
- {"WhichWindow", (PyCFunction)Win_WhichWindow, 1,
- PyDoc_STR("Resolve an integer WindowPtr address to a Window object")},
- {"FindWindow", (PyCFunction)Win_FindWindow, 1,
- PyDoc_STR("(Point thePoint) -> (short _rv, WindowPtr theWindow)")},
- {NULL, NULL, 0}
+ {"GetNewCWindow", (PyCFunction)Win_GetNewCWindow, 1,
+ PyDoc_STR("(short windowID, WindowPtr behind) -> (WindowPtr _rv)")},
+ {"NewWindow", (PyCFunction)Win_NewWindow, 1,
+ PyDoc_STR("(Rect boundsRect, Str255 title, Boolean visible, short theProc, WindowPtr behind, Boolean goAwayFlag, long refCon) -> (WindowPtr _rv)")},
+ {"GetNewWindow", (PyCFunction)Win_GetNewWindow, 1,
+ PyDoc_STR("(short windowID, WindowPtr behind) -> (WindowPtr _rv)")},
+ {"NewCWindow", (PyCFunction)Win_NewCWindow, 1,
+ PyDoc_STR("(Rect boundsRect, Str255 title, Boolean visible, short procID, WindowPtr behind, Boolean goAwayFlag, long refCon) -> (WindowPtr _rv)")},
+ {"CreateNewWindow", (PyCFunction)Win_CreateNewWindow, 1,
+ PyDoc_STR("(WindowClass windowClass, WindowAttributes attributes, Rect contentBounds) -> (WindowPtr outWindow)")},
+ {"CreateWindowFromResource", (PyCFunction)Win_CreateWindowFromResource, 1,
+ PyDoc_STR("(SInt16 resID) -> (WindowPtr outWindow)")},
+ {"ShowFloatingWindows", (PyCFunction)Win_ShowFloatingWindows, 1,
+ PyDoc_STR("() -> None")},
+ {"HideFloatingWindows", (PyCFunction)Win_HideFloatingWindows, 1,
+ PyDoc_STR("() -> None")},
+ {"AreFloatingWindowsVisible", (PyCFunction)Win_AreFloatingWindowsVisible, 1,
+ PyDoc_STR("() -> (Boolean _rv)")},
+ {"CheckUpdate", (PyCFunction)Win_CheckUpdate, 1,
+ PyDoc_STR("() -> (Boolean _rv, EventRecord theEvent)")},
+ {"MacFindWindow", (PyCFunction)Win_MacFindWindow, 1,
+ PyDoc_STR("(Point thePoint) -> (WindowPartCode _rv, WindowPtr window)")},
+ {"FrontWindow", (PyCFunction)Win_FrontWindow, 1,
+ PyDoc_STR("() -> (WindowPtr _rv)")},
+ {"FrontNonFloatingWindow", (PyCFunction)Win_FrontNonFloatingWindow, 1,
+ PyDoc_STR("() -> (WindowPtr _rv)")},
+ {"GetFrontWindowOfClass", (PyCFunction)Win_GetFrontWindowOfClass, 1,
+ PyDoc_STR("(WindowClass inWindowClass, Boolean mustBeVisible) -> (WindowPtr _rv)")},
+ {"FindWindowOfClass", (PyCFunction)Win_FindWindowOfClass, 1,
+ PyDoc_STR("(Point where, WindowClass inWindowClass) -> (WindowPtr outWindow, WindowPartCode outWindowPart)")},
+ {"CreateStandardWindowMenu", (PyCFunction)Win_CreateStandardWindowMenu, 1,
+ PyDoc_STR("(OptionBits inOptions) -> (MenuHandle outMenu)")},
+ {"CollapseAllWindows", (PyCFunction)Win_CollapseAllWindows, 1,
+ PyDoc_STR("(Boolean collapse) -> None")},
+ {"GetAvailableWindowPositioningBounds", (PyCFunction)Win_GetAvailableWindowPositioningBounds, 1,
+ PyDoc_STR("(GDHandle inDevice) -> (Rect outAvailableRect)")},
+ {"DisableScreenUpdates", (PyCFunction)Win_DisableScreenUpdates, 1,
+ PyDoc_STR("() -> None")},
+ {"EnableScreenUpdates", (PyCFunction)Win_EnableScreenUpdates, 1,
+ PyDoc_STR("() -> None")},
+ {"PinRect", (PyCFunction)Win_PinRect, 1,
+ PyDoc_STR("(Rect theRect, Point thePt) -> (long _rv)")},
+ {"GetGrayRgn", (PyCFunction)Win_GetGrayRgn, 1,
+ PyDoc_STR("() -> (RgnHandle _rv)")},
+ {"GetWindowFromPort", (PyCFunction)Win_GetWindowFromPort, 1,
+ PyDoc_STR("(CGrafPtr port) -> (WindowPtr _rv)")},
+ {"WhichWindow", (PyCFunction)Win_WhichWindow, 1,
+ PyDoc_STR("Resolve an integer WindowPtr address to a Window object")},
+ {"FindWindow", (PyCFunction)Win_FindWindow, 1,
+ PyDoc_STR("(Point thePoint) -> (short _rv, WindowPtr theWindow)")},
+ {NULL, NULL, 0}
#endif /* __LP64__ */
};
@@ -3213,51 +3213,51 @@ static PyMethodDef Win_methods[] = {
PyObject *
WinObj_WhichWindow(WindowPtr w)
{
- PyObject *it;
+ PyObject *it;
- if (w == NULL) {
- it = Py_None;
- Py_INCREF(it);
+ if (w == NULL) {
+ it = Py_None;
+ Py_INCREF(it);
+ } else {
+ it = (PyObject *) GetWRefCon(w);
+ if (it == NULL || !IsPointerValid((Ptr)it) || ((WindowObject *)it)->ob_itself != w || !WinObj_Check(it)) {
+ it = WinObj_New(w);
+ ((WindowObject *)it)->ob_freeit = NULL;
} else {
- it = (PyObject *) GetWRefCon(w);
- if (it == NULL || !IsPointerValid((Ptr)it) || ((WindowObject *)it)->ob_itself != w || !WinObj_Check(it)) {
- it = WinObj_New(w);
- ((WindowObject *)it)->ob_freeit = NULL;
- } else {
- Py_INCREF(it);
- }
+ Py_INCREF(it);
}
- return it;
+ }
+ return it;
}
#endif /* __LP64__ */
void init_Win(void)
{
- PyObject *m;
+ PyObject *m;
#ifndef __LP64__
- PyObject *d;
+ PyObject *d;
- PyMac_INIT_TOOLBOX_OBJECT_NEW(WindowPtr, WinObj_New);
- PyMac_INIT_TOOLBOX_OBJECT_NEW(WindowPtr, WinObj_WhichWindow);
- PyMac_INIT_TOOLBOX_OBJECT_CONVERT(WindowPtr, WinObj_Convert);
+ PyMac_INIT_TOOLBOX_OBJECT_NEW(WindowPtr, WinObj_New);
+ PyMac_INIT_TOOLBOX_OBJECT_NEW(WindowPtr, WinObj_WhichWindow);
+ PyMac_INIT_TOOLBOX_OBJECT_CONVERT(WindowPtr, WinObj_Convert);
#endif /* __LP64__ */
- m = Py_InitModule("_Win", Win_methods);
+ m = Py_InitModule("_Win", Win_methods);
#ifndef __LP64__
- d = PyModule_GetDict(m);
- Win_Error = PyMac_GetOSErrException();
- if (Win_Error == NULL ||
- PyDict_SetItemString(d, "Error", Win_Error) != 0)
- return;
- Window_Type.ob_type = &PyType_Type;
- if (PyType_Ready(&Window_Type) < 0) return;
- Py_INCREF(&Window_Type);
- PyModule_AddObject(m, "Window", (PyObject *)&Window_Type);
- /* Backward-compatible name */
- Py_INCREF(&Window_Type);
- PyModule_AddObject(m, "WindowType", (PyObject *)&Window_Type);
+ d = PyModule_GetDict(m);
+ Win_Error = PyMac_GetOSErrException();
+ if (Win_Error == NULL ||
+ PyDict_SetItemString(d, "Error", Win_Error) != 0)
+ return;
+ Window_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&Window_Type) < 0) return;
+ Py_INCREF(&Window_Type);
+ PyModule_AddObject(m, "Window", (PyObject *)&Window_Type);
+ /* Backward-compatible name */
+ Py_INCREF(&Window_Type);
+ PyModule_AddObject(m, "WindowType", (PyObject *)&Window_Type);
#endif /* __LP64__ */
}
diff --git a/Mac/Tools/pythonw.c b/Mac/Tools/pythonw.c
index 13df790..7f45ca9 100644
--- a/Mac/Tools/pythonw.c
+++ b/Mac/Tools/pythonw.c
@@ -37,8 +37,8 @@ extern char** environ;
* In a regular framework the structure is:
*
* Python.framework/Versions/2.7
- * /Python
- * /Resources/Python.app/Contents/MacOS/Python
+ * /Python
+ * /Resources/Python.app/Contents/MacOS/Python
*
* In a virtualenv style structure the expected
* structure is:
@@ -48,123 +48,123 @@ extern char** environ;
* /.Python <- the dylib
* /.Resources/Python.app/Contents/MacOS/Python
*
- * NOTE: virtualenv's are not an officially supported
+ * NOTE: virtualenv's are not an officially supported
* feature, support for that structure is provided as
* a convenience.
*/
static char* get_python_path(void)
{
- size_t len;
- Dl_info info;
- char* end;
- char* g_path;
-
- if (dladdr(Py_Initialize, &info) == 0) {
- return NULL;
- }
-
- len = strlen(info.dli_fname);
-
- g_path = malloc(len+60);
- if (g_path == NULL) {
- return NULL;
- }
-
- strcpy(g_path, info.dli_fname);
- end = g_path + len - 1;
- while (end != g_path && *end != '/') {
- end --;
- }
- end++;
- if (*end == '.') {
- end++;
- }
- strcpy(end, "Resources/Python.app/Contents/MacOS/" PYTHONFRAMEWORK);
-
- return g_path;
+ size_t len;
+ Dl_info info;
+ char* end;
+ char* g_path;
+
+ if (dladdr(Py_Initialize, &info) == 0) {
+ return NULL;
+ }
+
+ len = strlen(info.dli_fname);
+
+ g_path = malloc(len+60);
+ if (g_path == NULL) {
+ return NULL;
+ }
+
+ strcpy(g_path, info.dli_fname);
+ end = g_path + len - 1;
+ while (end != g_path && *end != '/') {
+ end --;
+ }
+ end++;
+ if (*end == '.') {
+ end++;
+ }
+ strcpy(end, "Resources/Python.app/Contents/MacOS/" PYTHONFRAMEWORK);
+
+ return g_path;
}
#ifdef HAVE_SPAWN_H
static void
setup_spawnattr(posix_spawnattr_t* spawnattr)
{
- size_t ocount;
- size_t count;
- cpu_type_t cpu_types[1];
- short flags = 0;
+ size_t ocount;
+ size_t count;
+ cpu_type_t cpu_types[1];
+ short flags = 0;
#ifdef __LP64__
- int ch;
+ int ch;
#endif
- if ((errno = posix_spawnattr_init(spawnattr)) != 0) {
- err(2, "posix_spawnattr_int");
- /* NOTREACHTED */
- }
+ if ((errno = posix_spawnattr_init(spawnattr)) != 0) {
+ err(2, "posix_spawnattr_int");
+ /* NOTREACHTED */
+ }
- count = 1;
+ count = 1;
- /* Run the real python executable using the same architure as this
- * executable, this allows users to controle the architecture using
- * "arch -ppc python"
- */
+ /* Run the real python executable using the same architure as this
+ * executable, this allows users to controle the architecture using
+ * "arch -ppc python"
+ */
#if defined(__ppc64__)
- cpu_types[0] = CPU_TYPE_POWERPC64;
+ cpu_types[0] = CPU_TYPE_POWERPC64;
#elif defined(__x86_64__)
- cpu_types[0] = CPU_TYPE_X86_64;
+ cpu_types[0] = CPU_TYPE_X86_64;
#elif defined(__ppc__)
- cpu_types[0] = CPU_TYPE_POWERPC;
+ cpu_types[0] = CPU_TYPE_POWERPC;
#elif defined(__i386__)
- cpu_types[0] = CPU_TYPE_X86;
+ cpu_types[0] = CPU_TYPE_X86;
#else
-# error "Unknown CPU"
+# error "Unknown CPU"
#endif
- if (posix_spawnattr_setbinpref_np(spawnattr, count,
- cpu_types, &ocount) == -1) {
- err(1, "posix_spawnattr_setbinpref");
- /* NOTREACHTED */
- }
- if (count != ocount) {
- fprintf(stderr, "posix_spawnattr_setbinpref failed to copy\n");
- exit(1);
- /* NOTREACHTED */
- }
-
-
- /*
- * Set flag that causes posix_spawn to behave like execv
- */
- flags |= POSIX_SPAWN_SETEXEC;
- if ((errno = posix_spawnattr_setflags(spawnattr, flags)) != 0) {
- err(1, "posix_spawnattr_setflags");
- /* NOTREACHTED */
- }
+ if (posix_spawnattr_setbinpref_np(spawnattr, count,
+ cpu_types, &ocount) == -1) {
+ err(1, "posix_spawnattr_setbinpref");
+ /* NOTREACHTED */
+ }
+ if (count != ocount) {
+ fprintf(stderr, "posix_spawnattr_setbinpref failed to copy\n");
+ exit(1);
+ /* NOTREACHTED */
+ }
+
+
+ /*
+ * Set flag that causes posix_spawn to behave like execv
+ */
+ flags |= POSIX_SPAWN_SETEXEC;
+ if ((errno = posix_spawnattr_setflags(spawnattr, flags)) != 0) {
+ err(1, "posix_spawnattr_setflags");
+ /* NOTREACHTED */
+ }
}
#endif
-int
+int
main(int argc, char **argv) {
- char* exec_path = get_python_path();
+ char* exec_path = get_python_path();
#ifdef HAVE_SPAWN_H
- /* We're weak-linking to posix-spawnv to ensure that
- * an executable build on 10.5 can work on 10.4.
- */
- if (posix_spawn != NULL) {
- posix_spawnattr_t spawnattr = NULL;
+ /* We're weak-linking to posix-spawnv to ensure that
+ * an executable build on 10.5 can work on 10.4.
+ */
+ if (posix_spawn != NULL) {
+ posix_spawnattr_t spawnattr = NULL;
- setup_spawnattr(&spawnattr);
- posix_spawn(NULL, exec_path, NULL,
- &spawnattr, argv, environ);
- err(1, "posix_spawn: %s", exec_path);
- }
+ setup_spawnattr(&spawnattr);
+ posix_spawn(NULL, exec_path, NULL,
+ &spawnattr, argv, environ);
+ err(1, "posix_spawn: %s", exec_path);
+ }
#endif
- execve(exec_path, argv, environ);
- err(1, "execve: %s", argv[0]);
- /* NOTREACHED */
+ execve(exec_path, argv, environ);
+ err(1, "execve: %s", argv[0]);
+ /* NOTREACHED */
}