diff options
Diffstat (limited to 'Mac')
-rw-r--r-- | Mac/Modules/win/_Winmodule.c | 4 | ||||
-rw-r--r-- | Mac/Modules/win/winscan.py | 7 |
2 files changed, 9 insertions, 2 deletions
diff --git a/Mac/Modules/win/_Winmodule.c b/Mac/Modules/win/_Winmodule.c index 250e4ed..30301e0 100644 --- a/Mac/Modules/win/_Winmodule.c +++ b/Mac/Modules/win/_Winmodule.c @@ -3112,7 +3112,7 @@ static PyObject *Win_CreateNewWindow(PyObject *_self, PyObject *_args) &outWindow); if (_err != noErr) return PyMac_Error(_err); _res = Py_BuildValue("O&", - WinObj_WhichWindow, outWindow); + WinObj_New, outWindow); return _res; } @@ -3132,7 +3132,7 @@ static PyObject *Win_CreateWindowFromResource(PyObject *_self, PyObject *_args) &outWindow); if (_err != noErr) return PyMac_Error(_err); _res = Py_BuildValue("O&", - WinObj_WhichWindow, outWindow); + WinObj_New, outWindow); return _res; } diff --git a/Mac/Modules/win/winscan.py b/Mac/Modules/win/winscan.py index c6ba7ec..cfe3eb3 100644 --- a/Mac/Modules/win/winscan.py +++ b/Mac/Modules/win/winscan.py @@ -136,6 +136,13 @@ class MyScanner(Scanner): ([("void", "wStorage", "OutMode")], [("NullStorage", "*", "InMode")]), + # match FindWindowOfClass + ([("WindowRef", "outWindow", "OutMode"), ("WindowPartCode", "outWindowPart", "OutMode")], + [("ExistingWindowPtr", "*", "OutMode"), ("WindowPartCode", "outWindowPart", "OutMode")]), + # then match CreateNewWindow and CreateWindowFromResource + ([("WindowRef", "outWindow", "OutMode")], + [("WindowRef", "*", "*")]), + ([("WindowPtr", "*", "OutMode")], [("ExistingWindowPtr", "*", "*")]), ([("WindowRef", "*", "OutMode")], # Same, but other style headerfiles |