summaryrefslogtreecommitdiffstats
path: root/Mac
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2000-12-19 22:28:14 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2000-12-19 22:28:14 (GMT)
commit7ff3133a7fc9e6097a3674c55397a24a3f1f1e54 (patch)
tree3c56ffb29e3200890ed5108d6bb53ad67e6ef721 /Mac
parent32248655ee0c7d6909703a48e4128f4e2f3e4937 (diff)
downloadcpython-7ff3133a7fc9e6097a3674c55397a24a3f1f1e54.zip
cpython-7ff3133a7fc9e6097a3674c55397a24a3f1f1e54.tar.gz
cpython-7ff3133a7fc9e6097a3674c55397a24a3f1f1e54.tar.bz2
Regenerated so that NewGWorld is included.
Diffstat (limited to 'Mac')
-rw-r--r--Mac/Modules/qdoffs/Qdoffsmodule.c66
1 files changed, 66 insertions, 0 deletions
diff --git a/Mac/Modules/qdoffs/Qdoffsmodule.c b/Mac/Modules/qdoffs/Qdoffsmodule.c
index 4ffbd71..2caf6f3 100644
--- a/Mac/Modules/qdoffs/Qdoffsmodule.c
+++ b/Mac/Modules/qdoffs/Qdoffsmodule.c
@@ -147,6 +147,37 @@ PyTypeObject GWorld_Type = {
/* --------------------- End object type GWorld --------------------- */
+static PyObject *Qdoffs_NewGWorld(_self, _args)
+ PyObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ QDErr _err;
+ GWorldPtr offscreenGWorld;
+ short PixelDepth;
+ Rect boundsRect;
+ CTabHandle cTable;
+ GDHandle aGDevice;
+ GWorldFlags flags;
+ 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(_self, _args)
PyObject *_self;
PyObject *_args;
@@ -178,6 +209,37 @@ static PyObject *Qdoffs_UnlockPixels(_self, _args)
return _res;
}
+static PyObject *Qdoffs_UpdateGWorld(_self, _args)
+ PyObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ GWorldFlags _rv;
+ GWorldPtr offscreenGWorld;
+ short pixelDepth;
+ Rect boundsRect;
+ CTabHandle cTable;
+ GDHandle aGDevice;
+ GWorldFlags flags;
+ 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(_self, _args)
PyObject *_self;
PyObject *_args;
@@ -501,10 +563,14 @@ static PyObject *Qdoffs_PutPixMapBytes(_self, _args)
}
static PyMethodDef Qdoffs_methods[] = {
+ {"NewGWorld", (PyCFunction)Qdoffs_NewGWorld, 1,
+ "(short PixelDepth, Rect boundsRect, CTabHandle cTable, GDHandle aGDevice, GWorldFlags flags) -> (GWorldPtr offscreenGWorld)"},
{"LockPixels", (PyCFunction)Qdoffs_LockPixels, 1,
"(PixMapHandle pm) -> (Boolean _rv)"},
{"UnlockPixels", (PyCFunction)Qdoffs_UnlockPixels, 1,
"(PixMapHandle pm) -> None"},
+ {"UpdateGWorld", (PyCFunction)Qdoffs_UpdateGWorld, 1,
+ "(short pixelDepth, Rect boundsRect, CTabHandle cTable, GDHandle aGDevice, GWorldFlags flags) -> (GWorldFlags _rv, GWorldPtr offscreenGWorld)"},
{"GetGWorld", (PyCFunction)Qdoffs_GetGWorld, 1,
"() -> (CGrafPtr port, GDHandle gdh)"},
{"SetGWorld", (PyCFunction)Qdoffs_SetGWorld, 1,