summaryrefslogtreecommitdiffstats
path: root/Mac/Modules/qdoffs
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2000-12-12 22:10:21 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2000-12-12 22:10:21 (GMT)
commit723ad8ae738e02a5b6f6f1d172cf297db1c11b26 (patch)
tree91ee498f2630c951058201fd7ede2bdb42409637 /Mac/Modules/qdoffs
parent8ed81303f68fe3be5b4afa77d1ffd03a066ba3dc (diff)
downloadcpython-723ad8ae738e02a5b6f6f1d172cf297db1c11b26.zip
cpython-723ad8ae738e02a5b6f6f1d172cf297db1c11b26.tar.gz
cpython-723ad8ae738e02a5b6f6f1d172cf297db1c11b26.tar.bz2
More toolbox modules adapted to Universal Headers 3.3.2.
Diffstat (limited to 'Mac/Modules/qdoffs')
-rw-r--r--Mac/Modules/qdoffs/Qdoffsmodule.c68
1 files changed, 1 insertions, 67 deletions
diff --git a/Mac/Modules/qdoffs/Qdoffsmodule.c b/Mac/Modules/qdoffs/Qdoffsmodule.c
index c0e05cd..4ffbd71 100644
--- a/Mac/Modules/qdoffs/Qdoffsmodule.c
+++ b/Mac/Modules/qdoffs/Qdoffsmodule.c
@@ -147,37 +147,6 @@ 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;
@@ -209,37 +178,6 @@ 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;
@@ -563,14 +501,10 @@ 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,
@@ -628,7 +562,7 @@ void initQdoffs()
Qdoffs_Error = PyMac_GetOSErrException();
if (Qdoffs_Error == NULL ||
PyDict_SetItemString(d, "Error", Qdoffs_Error) != 0)
- Py_FatalError("can't initialize Qdoffs.Error");
+ return;
GWorld_Type.ob_type = &PyType_Type;
Py_INCREF(&GWorld_Type);
if (PyDict_SetItemString(d, "GWorldType", (PyObject *)&GWorld_Type) != 0)