diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 1997-08-15 14:38:05 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 1997-08-15 14:38:05 (GMT) |
commit | 8f0fab78cef6018beafa045df1c29fc89fa423d2 (patch) | |
tree | a669de8c7c57ed9ee592dd742fc3aa021fb39170 /Mac | |
parent | eaf3c9bed79cc6d509ac40fadaae93e5fcdcc0b9 (diff) | |
download | cpython-8f0fab78cef6018beafa045df1c29fc89fa423d2.zip cpython-8f0fab78cef6018beafa045df1c29fc89fa423d2.tar.gz cpython-8f0fab78cef6018beafa045df1c29fc89fa423d2.tar.bz2 |
Added support for WCTabHandle, AuxWinHandle, PixPatHandle: no reason
for blacklisting them.
Diffstat (limited to 'Mac')
-rw-r--r-- | Mac/Modules/win/Winmodule.c | 54 | ||||
-rw-r--r-- | Mac/Modules/win/winscan.py | 3 | ||||
-rw-r--r-- | Mac/Modules/win/winsupport.py | 7 |
3 files changed, 59 insertions, 5 deletions
diff --git a/Mac/Modules/win/Winmodule.c b/Mac/Modules/win/Winmodule.c index afac85f..7077b12 100644 --- a/Mac/Modules/win/Winmodule.c +++ b/Mac/Modules/win/Winmodule.c @@ -522,6 +522,22 @@ static PyObject *WinObj_TrackBox(_self, _args) return _res; } +static PyObject *WinObj_SetWinColor(_self, _args) + WindowObject *_self; + PyObject *_args; +{ + PyObject *_res = NULL; + WCTabHandle newColorTable; + if (!PyArg_ParseTuple(_args, "O&", + ResObj_Convert, &newColorTable)) + return NULL; + SetWinColor(_self->ob_itself, + newColorTable); + Py_INCREF(Py_None); + _res = Py_None; + return _res; +} + static PyObject *WinObj_GetWVariant(_self, _args) WindowObject *_self; PyObject *_args; @@ -588,6 +604,23 @@ static PyObject *WinObj_DragWindow(_self, _args) return _res; } +static PyObject *WinObj_GetAuxWin(_self, _args) + WindowObject *_self; + PyObject *_args; +{ + PyObject *_res = NULL; + Boolean _rv; + AuxWinHandle awHndl; + if (!PyArg_ParseTuple(_args, "")) + return NULL; + _rv = GetAuxWin(_self->ob_itself, + &awHndl); + _res = Py_BuildValue("bO&", + _rv, + ResObj_New, awHndl); + return _res; +} + static PyObject *WinObj_GetWindowPort(_self, _args) WindowObject *_self; PyObject *_args; @@ -894,6 +927,8 @@ static PyMethodDef WinObj_methods[] = { "(Point startPt, Rect bBox) -> (long _rv)"}, {"TrackBox", (PyCFunction)WinObj_TrackBox, 1, "(Point thePt, short partCode) -> (Boolean _rv)"}, + {"SetWinColor", (PyCFunction)WinObj_SetWinColor, 1, + "(WCTabHandle newColorTable) -> None"}, {"GetWVariant", (PyCFunction)WinObj_GetWVariant, 1, "() -> (short _rv)"}, {"SetWTitle", (PyCFunction)WinObj_SetWTitle, 1, @@ -902,6 +937,8 @@ static PyMethodDef WinObj_methods[] = { "(Point thePt) -> (Boolean _rv)"}, {"DragWindow", (PyCFunction)WinObj_DragWindow, 1, "(Point startPt, Rect boundsRect) -> None"}, + {"GetAuxWin", (PyCFunction)WinObj_GetAuxWin, 1, + "() -> (Boolean _rv, AuxWinHandle awHndl)"}, {"GetWindowPort", (PyCFunction)WinObj_GetWindowPort, 1, "() -> (CGrafPtr _rv)"}, {"SetPortWindowPort", (PyCFunction)WinObj_SetPortWindowPort, 1, @@ -1204,6 +1241,21 @@ static PyObject *Win_GetCWMgrPort(_self, _args) return _res; } +static PyObject *Win_SetDeskCPat(_self, _args) + PyObject *_self; + PyObject *_args; +{ + PyObject *_res = NULL; + PixPatHandle deskPixPat; + if (!PyArg_ParseTuple(_args, "O&", + ResObj_Convert, &deskPixPat)) + return NULL; + SetDeskCPat(deskPixPat); + Py_INCREF(Py_None); + _res = Py_None; + return _res; +} + static PyObject *Win_NewCWindow(_self, _args) PyObject *_self; PyObject *_args; @@ -1302,6 +1354,8 @@ static PyMethodDef Win_methods[] = { "(Rect theRect, Point thePt) -> (long _rv)"}, {"GetCWMgrPort", (PyCFunction)Win_GetCWMgrPort, 1, "() -> (CGrafPtr wMgrCPort)"}, + {"SetDeskCPat", (PyCFunction)Win_SetDeskCPat, 1, + "(PixPatHandle deskPixPat) -> None"}, {"NewCWindow", (PyCFunction)Win_NewCWindow, 1, "(Rect boundsRect, Str255 title, Boolean visible, short procID, WindowPtr behind, Boolean goAwayFlag, long refCon) -> (WindowPtr _rv)"}, {"GetNewCWindow", (PyCFunction)Win_GetNewCWindow, 1, diff --git a/Mac/Modules/win/winscan.py b/Mac/Modules/win/winscan.py index 2d332ad..cafe36f 100644 --- a/Mac/Modules/win/winscan.py +++ b/Mac/Modules/win/winscan.py @@ -37,9 +37,6 @@ class MyScanner(Scanner): def makeblacklisttypes(self): return [ 'ProcPtr', - 'WCTabHandle', - 'AuxWinHandle', - 'PixPatHandle', 'DragGrayRgnUPP', ] diff --git a/Mac/Modules/win/winsupport.py b/Mac/Modules/win/winsupport.py index 9aed179..5b1b45e 100644 --- a/Mac/Modules/win/winsupport.py +++ b/Mac/Modules/win/winsupport.py @@ -34,6 +34,9 @@ GrafPtr = OpaqueByValueType("GrafPtr", "GrafObj") RgnHandle = OpaqueByValueType("RgnHandle", "ResObj") PicHandle = OpaqueByValueType("PicHandle", "ResObj") +WCTabHandle = OpaqueByValueType("WCTabHandle", "ResObj") +AuxWinHandle = OpaqueByValueType("AuxWinHandle", "ResObj") +PixPatHandle = OpaqueByValueType("PixPatHandle", "ResObj") includestuff = includestuff + """ #include <%s>""" % MACHEADERFILE + """ @@ -100,8 +103,8 @@ functions = [] methods = [] execfile(INPUTFILE) -# Add a manual routine for converting integer WindowPtr's (as returned by -# various event routines) to a WindowObject. +# Add manual routines for converting integer WindowPtr's (as returned by +# various event routines) and Dialog objects to a WindowObject. whichwin_body = """ long ptr; |