Commit e4349e83 authored by Jack Jansen's avatar Jack Jansen

Re-generated with OSStatus treated like OSErr (i.e. not returned, but raising

an exception when negative).
parent 1acb8740
...@@ -294,14 +294,14 @@ static PyObject *WinObj_GetWindowFeatures(_self, _args) ...@@ -294,14 +294,14 @@ static PyObject *WinObj_GetWindowFeatures(_self, _args)
PyObject *_args; PyObject *_args;
{ {
PyObject *_res = NULL; PyObject *_res = NULL;
OSStatus _rv; OSStatus _err;
UInt32 outFeatures; UInt32 outFeatures;
if (!PyArg_ParseTuple(_args, "")) if (!PyArg_ParseTuple(_args, ""))
return NULL; return NULL;
_rv = GetWindowFeatures(_self->ob_itself, _err = GetWindowFeatures(_self->ob_itself,
&outFeatures); &outFeatures);
_res = Py_BuildValue("ll", if (_err != noErr) return PyMac_Error(_err);
_rv, _res = Py_BuildValue("l",
outFeatures); outFeatures);
return _res; return _res;
} }
...@@ -311,18 +311,19 @@ static PyObject *WinObj_GetWindowRegion(_self, _args) ...@@ -311,18 +311,19 @@ static PyObject *WinObj_GetWindowRegion(_self, _args)
PyObject *_args; PyObject *_args;
{ {
PyObject *_res = NULL; PyObject *_res = NULL;
OSStatus _rv; OSStatus _err;
WindowRegionCode inRegionCode; WindowRegionCode inRegionCode;
RgnHandle ioWinRgn; RgnHandle ioWinRgn;
if (!PyArg_ParseTuple(_args, "hO&", if (!PyArg_ParseTuple(_args, "hO&",
&inRegionCode, &inRegionCode,
ResObj_Convert, &ioWinRgn)) ResObj_Convert, &ioWinRgn))
return NULL; return NULL;
_rv = GetWindowRegion(_self->ob_itself, _err = GetWindowRegion(_self->ob_itself,
inRegionCode, inRegionCode,
ioWinRgn); ioWinRgn);
_res = Py_BuildValue("l", if (_err != noErr) return PyMac_Error(_err);
_rv); Py_INCREF(Py_None);
_res = Py_None;
return _res; return _res;
} }
...@@ -503,15 +504,16 @@ static PyObject *WinObj_CollapseWindow(_self, _args) ...@@ -503,15 +504,16 @@ static PyObject *WinObj_CollapseWindow(_self, _args)
PyObject *_args; PyObject *_args;
{ {
PyObject *_res = NULL; PyObject *_res = NULL;
OSStatus _rv; OSStatus _err;
Boolean inCollapseIt; Boolean inCollapseIt;
if (!PyArg_ParseTuple(_args, "b", if (!PyArg_ParseTuple(_args, "b",
&inCollapseIt)) &inCollapseIt))
return NULL; return NULL;
_rv = CollapseWindow(_self->ob_itself, _err = CollapseWindow(_self->ob_itself,
inCollapseIt); inCollapseIt);
_res = Py_BuildValue("l", if (_err != noErr) return PyMac_Error(_err);
_rv); Py_INCREF(Py_None);
_res = Py_None;
return _res; return _res;
} }
...@@ -1070,9 +1072,9 @@ static PyMethodDef WinObj_methods[] = { ...@@ -1070,9 +1072,9 @@ static PyMethodDef WinObj_methods[] = {
{"HiliteWindow", (PyCFunction)WinObj_HiliteWindow, 1, {"HiliteWindow", (PyCFunction)WinObj_HiliteWindow, 1,
"(Boolean fHilite) -> None"}, "(Boolean fHilite) -> None"},
{"GetWindowFeatures", (PyCFunction)WinObj_GetWindowFeatures, 1, {"GetWindowFeatures", (PyCFunction)WinObj_GetWindowFeatures, 1,
"() -> (OSStatus _rv, UInt32 outFeatures)"}, "() -> (UInt32 outFeatures)"},
{"GetWindowRegion", (PyCFunction)WinObj_GetWindowRegion, 1, {"GetWindowRegion", (PyCFunction)WinObj_GetWindowRegion, 1,
"(WindowRegionCode inRegionCode, RgnHandle ioWinRgn) -> (OSStatus _rv)"}, "(WindowRegionCode inRegionCode, RgnHandle ioWinRgn) -> None"},
{"SetWRefCon", (PyCFunction)WinObj_SetWRefCon, 1, {"SetWRefCon", (PyCFunction)WinObj_SetWRefCon, 1,
"(long data) -> None"}, "(long data) -> None"},
{"GetWRefCon", (PyCFunction)WinObj_GetWRefCon, 1, {"GetWRefCon", (PyCFunction)WinObj_GetWRefCon, 1,
...@@ -1098,7 +1100,7 @@ static PyMethodDef WinObj_methods[] = { ...@@ -1098,7 +1100,7 @@ static PyMethodDef WinObj_methods[] = {
{"IsWindowCollapsed", (PyCFunction)WinObj_IsWindowCollapsed, 1, {"IsWindowCollapsed", (PyCFunction)WinObj_IsWindowCollapsed, 1,
"() -> (Boolean _rv)"}, "() -> (Boolean _rv)"},
{"CollapseWindow", (PyCFunction)WinObj_CollapseWindow, 1, {"CollapseWindow", (PyCFunction)WinObj_CollapseWindow, 1,
"(Boolean inCollapseIt) -> (OSStatus _rv)"}, "(Boolean inCollapseIt) -> None"},
{"MacMoveWindow", (PyCFunction)WinObj_MacMoveWindow, 1, {"MacMoveWindow", (PyCFunction)WinObj_MacMoveWindow, 1,
"(short hGlobal, short vGlobal, Boolean front) -> None"}, "(short hGlobal, short vGlobal, Boolean front) -> None"},
{"SizeWindow", (PyCFunction)WinObj_SizeWindow, 1, {"SizeWindow", (PyCFunction)WinObj_SizeWindow, 1,
...@@ -1475,14 +1477,15 @@ static PyObject *Win_CollapseAllWindows(_self, _args) ...@@ -1475,14 +1477,15 @@ static PyObject *Win_CollapseAllWindows(_self, _args)
PyObject *_args; PyObject *_args;
{ {
PyObject *_res = NULL; PyObject *_res = NULL;
OSStatus _rv; OSStatus _err;
Boolean inCollapseEm; Boolean inCollapseEm;
if (!PyArg_ParseTuple(_args, "b", if (!PyArg_ParseTuple(_args, "b",
&inCollapseEm)) &inCollapseEm))
return NULL; return NULL;
_rv = CollapseAllWindows(inCollapseEm); _err = CollapseAllWindows(inCollapseEm);
_res = Py_BuildValue("l", if (_err != noErr) return PyMac_Error(_err);
_rv); Py_INCREF(Py_None);
_res = Py_None;
return _res; return _res;
} }
...@@ -1584,7 +1587,7 @@ static PyMethodDef Win_methods[] = { ...@@ -1584,7 +1587,7 @@ static PyMethodDef Win_methods[] = {
{"ValidRgn", (PyCFunction)Win_ValidRgn, 1, {"ValidRgn", (PyCFunction)Win_ValidRgn, 1,
"(RgnHandle goodRgn) -> None"}, "(RgnHandle goodRgn) -> None"},
{"CollapseAllWindows", (PyCFunction)Win_CollapseAllWindows, 1, {"CollapseAllWindows", (PyCFunction)Win_CollapseAllWindows, 1,
"(Boolean inCollapseEm) -> (OSStatus _rv)"}, "(Boolean inCollapseEm) -> None"},
{"PinRect", (PyCFunction)Win_PinRect, 1, {"PinRect", (PyCFunction)Win_PinRect, 1,
"(Rect theRect, Point thePt) -> (long _rv)"}, "(Rect theRect, Point thePt) -> (long _rv)"},
{"GetGrayRgn", (PyCFunction)Win_GetGrayRgn, 1, {"GetGrayRgn", (PyCFunction)Win_GetGrayRgn, 1,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment