summaryrefslogtreecommitdiffstats
path: root/Mac/Modules/win
diff options
context:
space:
mode:
Diffstat (limited to 'Mac/Modules/win')
-rw-r--r--Mac/Modules/win/Winmodule.c9
-rw-r--r--Mac/Modules/win/wingen.py73
-rw-r--r--Mac/Modules/win/winscan.py8
-rw-r--r--Mac/Modules/win/winsupport.py4
4 files changed, 51 insertions, 43 deletions
diff --git a/Mac/Modules/win/Winmodule.c b/Mac/Modules/win/Winmodule.c
index fc89803..7d6de73 100644
--- a/Mac/Modules/win/Winmodule.c
+++ b/Mac/Modules/win/Winmodule.c
@@ -346,7 +346,7 @@ static PyObject *WinObj_ClipAbove(_self, _args)
PyObject *_res = NULL;
if (!PyArg_ParseTuple(_args, ""))
return NULL;
- ClipAbove((WindowPeek)(_self->ob_itself));
+ ClipAbove(_self->ob_itself);
Py_INCREF(Py_None);
_res = Py_None;
return _res;
@@ -359,7 +359,7 @@ static PyObject *WinObj_SaveOld(_self, _args)
PyObject *_res = NULL;
if (!PyArg_ParseTuple(_args, ""))
return NULL;
- SaveOld((WindowPeek)(_self->ob_itself));
+ SaveOld(_self->ob_itself);
Py_INCREF(Py_None);
_res = Py_None;
return _res;
@@ -374,7 +374,7 @@ static PyObject *WinObj_DrawNew(_self, _args)
if (!PyArg_ParseTuple(_args, "b",
&update))
return NULL;
- DrawNew((WindowPeek)(_self->ob_itself),
+ DrawNew(_self->ob_itself,
update);
Py_INCREF(Py_None);
_res = Py_None;
@@ -388,7 +388,7 @@ static PyObject *WinObj_CalcVis(_self, _args)
PyObject *_res = NULL;
if (!PyArg_ParseTuple(_args, ""))
return NULL;
- CalcVis((WindowPeek)(_self->ob_itself));
+ CalcVis(_self->ob_itself);
Py_INCREF(Py_None);
_res = Py_None;
return _res;
@@ -871,4 +871,3 @@ void initWin()
/* ========================= End module Win ========================= */
-
diff --git a/Mac/Modules/win/wingen.py b/Mac/Modules/win/wingen.py
index 0abf6e0..f0f7633 100644
--- a/Mac/Modules/win/wingen.py
+++ b/Mac/Modules/win/wingen.py
@@ -1,69 +1,69 @@
-# Generated from 'D:Development:THINK C:Mac #includes:Apple #includes:Windows.h'
+# Generated from 'Moes:CW5 GOLD \304:Metrowerks C/C++ \304:Headers \304:Universal Headers 2.0a3 \304:Windows.h'
f = Function(void, 'InitWindows',
)
functions.append(f)
-f = Function(WindowPtr, 'NewWindow',
+f = Function(WindowRef, 'NewWindow',
(NullStorage, 'wStorage', InMode),
(Rect_ptr, 'boundsRect', InMode),
(ConstStr255Param, 'title', InMode),
(Boolean, 'visible', InMode),
(short, 'theProc', InMode),
- (WindowPtr, 'behind', InMode),
+ (WindowRef, 'behind', InMode),
(Boolean, 'goAwayFlag', InMode),
(long, 'refCon', InMode),
)
functions.append(f)
-f = Function(WindowPtr, 'GetNewWindow',
+f = Function(WindowRef, 'GetNewWindow',
(short, 'windowID', InMode),
(NullStorage, 'wStorage', InMode),
- (WindowPtr, 'behind', InMode),
+ (WindowRef, 'behind', InMode),
)
functions.append(f)
f = Method(void, 'GetWTitle',
- (WindowPtr, 'theWindow', InMode),
+ (WindowRef, 'theWindow', InMode),
(Str255, 'title', OutMode),
)
methods.append(f)
f = Method(void, 'SelectWindow',
- (WindowPtr, 'theWindow', InMode),
+ (WindowRef, 'theWindow', InMode),
)
methods.append(f)
f = Method(void, 'HideWindow',
- (WindowPtr, 'theWindow', InMode),
+ (WindowRef, 'theWindow', InMode),
)
methods.append(f)
f = Method(void, 'ShowWindow',
- (WindowPtr, 'theWindow', InMode),
+ (WindowRef, 'theWindow', InMode),
)
methods.append(f)
f = Method(void, 'ShowHide',
- (WindowPtr, 'theWindow', InMode),
+ (WindowRef, 'theWindow', InMode),
(Boolean, 'showFlag', InMode),
)
methods.append(f)
f = Method(void, 'HiliteWindow',
- (WindowPtr, 'theWindow', InMode),
+ (WindowRef, 'theWindow', InMode),
(Boolean, 'fHilite', InMode),
)
methods.append(f)
f = Method(void, 'BringToFront',
- (WindowPtr, 'theWindow', InMode),
+ (WindowRef, 'theWindow', InMode),
)
methods.append(f)
f = Method(void, 'SendBehind',
- (WindowPtr, 'theWindow', InMode),
- (WindowPtr, 'behindWindow', InMode),
+ (WindowRef, 'theWindow', InMode),
+ (WindowRef, 'behindWindow', InMode),
)
methods.append(f)
@@ -72,12 +72,12 @@ f = Function(ExistingWindowPtr, 'FrontWindow',
functions.append(f)
f = Method(void, 'DrawGrowIcon',
- (WindowPtr, 'theWindow', InMode),
+ (WindowRef, 'theWindow', InMode),
)
methods.append(f)
f = Method(void, 'MoveWindow',
- (WindowPtr, 'theWindow', InMode),
+ (WindowRef, 'theWindow', InMode),
(short, 'hGlobal', InMode),
(short, 'vGlobal', InMode),
(Boolean, 'front', InMode),
@@ -85,7 +85,7 @@ f = Method(void, 'MoveWindow',
methods.append(f)
f = Method(void, 'SizeWindow',
- (WindowPtr, 'theWindow', InMode),
+ (WindowRef, 'theWindow', InMode),
(short, 'w', InMode),
(short, 'h', InMode),
(Boolean, 'fUpdate', InMode),
@@ -93,7 +93,7 @@ f = Method(void, 'SizeWindow',
methods.append(f)
f = Method(void, 'ZoomWindow',
- (WindowPtr, 'theWindow', InMode),
+ (WindowRef, 'theWindow', InMode),
(short, 'partCode', InMode),
(Boolean, 'front', InMode),
)
@@ -110,23 +110,23 @@ f = Function(void, 'ValidRect',
functions.append(f)
f = Method(void, 'BeginUpdate',
- (WindowPtr, 'theWindow', InMode),
+ (WindowRef, 'theWindow', InMode),
)
methods.append(f)
f = Method(void, 'EndUpdate',
- (WindowPtr, 'theWindow', InMode),
+ (WindowRef, 'theWindow', InMode),
)
methods.append(f)
f = Method(void, 'SetWRefCon',
- (WindowPtr, 'theWindow', InMode),
+ (WindowRef, 'theWindow', InMode),
(long, 'data', InMode),
)
methods.append(f)
f = Method(long, 'GetWRefCon',
- (WindowPtr, 'theWindow', InMode),
+ (WindowRef, 'theWindow', InMode),
)
methods.append(f)
@@ -136,28 +136,28 @@ f = Function(Boolean, 'CheckUpdate',
functions.append(f)
f = Method(void, 'ClipAbove',
- (WindowPeek, 'window', InMode),
+ (WindowRef, 'window', InMode),
)
methods.append(f)
f = Method(void, 'SaveOld',
- (WindowPeek, 'window', InMode),
+ (WindowRef, 'window', InMode),
)
methods.append(f)
f = Method(void, 'DrawNew',
- (WindowPeek, 'window', InMode),
+ (WindowRef, 'window', InMode),
(Boolean, 'update', InMode),
)
methods.append(f)
f = Method(void, 'CalcVis',
- (WindowPeek, 'window', InMode),
+ (WindowRef, 'window', InMode),
)
methods.append(f)
f = Method(long, 'GrowWindow',
- (WindowPtr, 'theWindow', InMode),
+ (WindowRef, 'theWindow', InMode),
(Point, 'startPt', InMode),
(Rect_ptr, 'bBox', InMode),
)
@@ -176,53 +176,52 @@ f = Function(long, 'PinRect',
functions.append(f)
f = Method(Boolean, 'TrackBox',
- (WindowPtr, 'theWindow', InMode),
+ (WindowRef, 'theWindow', InMode),
(Point, 'thePt', InMode),
(short, 'partCode', InMode),
)
methods.append(f)
-f = Function(WindowPtr, 'NewCWindow',
+f = Function(WindowRef, 'NewCWindow',
(NullStorage, 'wStorage', InMode),
(Rect_ptr, 'boundsRect', InMode),
(ConstStr255Param, 'title', InMode),
(Boolean, 'visible', InMode),
(short, 'procID', InMode),
- (WindowPtr, 'behind', InMode),
+ (WindowRef, 'behind', InMode),
(Boolean, 'goAwayFlag', InMode),
(long, 'refCon', InMode),
)
functions.append(f)
-f = Function(WindowPtr, 'GetNewCWindow',
+f = Function(WindowRef, 'GetNewCWindow',
(short, 'windowID', InMode),
(NullStorage, 'wStorage', InMode),
- (WindowPtr, 'behind', InMode),
+ (WindowRef, 'behind', InMode),
)
functions.append(f)
f = Method(short, 'GetWVariant',
- (WindowPtr, 'theWindow', InMode),
+ (WindowRef, 'theWindow', InMode),
)
methods.append(f)
f = Method(void, 'SetWTitle',
- (WindowPtr, 'theWindow', InMode),
+ (WindowRef, 'theWindow', InMode),
(ConstStr255Param, 'title', InMode),
)
methods.append(f)
f = Method(Boolean, 'TrackGoAway',
- (WindowPtr, 'theWindow', InMode),
+ (WindowRef, 'theWindow', InMode),
(Point, 'thePt', InMode),
)
methods.append(f)
f = Method(void, 'DragWindow',
- (WindowPtr, 'theWindow', InMode),
+ (WindowRef, 'theWindow', InMode),
(Point, 'startPt', InMode),
(Rect_ptr, 'boundsRect', InMode),
)
methods.append(f)
-
diff --git a/Mac/Modules/win/winscan.py b/Mac/Modules/win/winscan.py
index 8d089a3..e9ac5af 100644
--- a/Mac/Modules/win/winscan.py
+++ b/Mac/Modules/win/winscan.py
@@ -1,4 +1,6 @@
# Scan an Apple header file, generating a Python file of generator calls.
+import addpack
+addpack.addpack(':Tools:bgen:bgen')
from scantools import Scanner
@@ -20,7 +22,7 @@ class MyScanner(Scanner):
listname = "functions"
if arglist:
t, n, m = arglist[0]
- if t in ("WindowPtr", "WindowPeek") and m == "InMode":
+ if t in ("WindowPtr", "WindowPeek", "WindowRef") and m == "InMode":
classname = "Method"
listname = "methods"
return classname, listname
@@ -62,9 +64,13 @@ class MyScanner(Scanner):
([("WindowPtr", "*", "OutMode")],
[("ExistingWindowPtr", "*", "*")]),
+ ([("WindowRef", "*", "OutMode")], # Same, but other style headerfiles
+ [("ExistingWindowPtr", "*", "*")]),
([("WindowPtr", "FrontWindow", "ReturnMode")],
[("ExistingWindowPtr", "*", "*")]),
+ ([("WindowRef", "FrontWindow", "ReturnMode")], # Ditto
+ [("ExistingWindowPtr", "*", "*")]),
]
if __name__ == "__main__":
diff --git a/Mac/Modules/win/winsupport.py b/Mac/Modules/win/winsupport.py
index a7f1ebd..6f085f7 100644
--- a/Mac/Modules/win/winsupport.py
+++ b/Mac/Modules/win/winsupport.py
@@ -5,6 +5,9 @@
import string
+import addpack
+addpack.addpack(':Tools:bgen:bgen')
+
# Declarations that change for each manager
MACHEADERFILE = 'Windows.h' # The Apple header file
MODNAME = 'Win' # The name of the module
@@ -22,6 +25,7 @@ from macsupport import *
# Create the type objects
WindowPtr = OpaqueByValueType(OBJECTTYPE, OBJECTPREFIX)
+WindowRef = WindowPtr
WindowPeek = OpaqueByValueType("WindowPeek", OBJECTPREFIX)
WindowPeek.passInput = lambda name: "(WindowPeek)(%s)" % name