summaryrefslogtreecommitdiffstats
path: root/Mac
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>1996-04-10 14:48:19 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>1996-04-10 14:48:19 (GMT)
commit2b72417da0af053f6efc1b3574361744eb22d2a7 (patch)
tree2385a4dfc666a30489672c480c46794b0210be97 /Mac
parentfcdf4378acd50b94da0cf16187363f3bf5815d6a (diff)
downloadcpython-2b72417da0af053f6efc1b3574361744eb22d2a7.zip
cpython-2b72417da0af053f6efc1b3574361744eb22d2a7.tar.gz
cpython-2b72417da0af053f6efc1b3574361744eb22d2a7.tar.bz2
Replaced various dummy updateRegions by real arguments
Diffstat (limited to 'Mac')
-rw-r--r--Mac/Modules/ctl/Ctlmodule.c13
-rw-r--r--Mac/Modules/ctl/ctlgen.py2
-rw-r--r--Mac/Modules/ctl/ctlsupport.py2
-rw-r--r--Mac/Modules/dlg/Dlgmodule.c11
-rw-r--r--Mac/Modules/dlg/dlggen.py2
-rw-r--r--Mac/Modules/dlg/dlgsupport.py2
-rw-r--r--Mac/Modules/evt/Evtmodule.c3
-rw-r--r--Mac/Modules/evt/evtgen.py2
-rw-r--r--Mac/Modules/evt/evtsupport.py4
-rw-r--r--Mac/Modules/fm/Fmgen.py2
-rw-r--r--Mac/Modules/list/Listmodule.c11
-rw-r--r--Mac/Modules/list/listgen.py2
-rw-r--r--Mac/Modules/list/listsupport.py3
-rw-r--r--Mac/Modules/menu/Menumodule.c3
-rw-r--r--Mac/Modules/menu/menugen.py2
15 files changed, 43 insertions, 21 deletions
diff --git a/Mac/Modules/ctl/Ctlmodule.c b/Mac/Modules/ctl/Ctlmodule.c
index 2669113..bc690cd 100644
--- a/Mac/Modules/ctl/Ctlmodule.c
+++ b/Mac/Modules/ctl/Ctlmodule.c
@@ -40,6 +40,9 @@ extern int GrafObj_Convert(PyObject *, GrafPtr *);
extern PyObject *BMObj_New(BitMapPtr);
extern int BMObj_Convert(PyObject *, BitMapPtr *);
+extern PyObject *PMObj_New(PixMapHandle);
+extern int PMObj_Convert(PyObject *, PixMapHandle *);
+
extern PyObject *WinObj_WhichWindow(WindowPtr);
#include <Controls.h>
@@ -624,11 +627,13 @@ static PyObject *Ctl_UpdateControls(_self, _args)
{
PyObject *_res = NULL;
WindowPtr theWindow;
- if (!PyArg_ParseTuple(_args, "O&",
- WinObj_Convert, &theWindow))
+ RgnHandle updateRegion;
+ if (!PyArg_ParseTuple(_args, "O&O&",
+ WinObj_Convert, &theWindow,
+ ResObj_Convert, &updateRegion))
return NULL;
UpdateControls(theWindow,
- theWindow->visRgn);
+ updateRegion);
Py_INCREF(Py_None);
_res = Py_None;
return _res;
@@ -666,7 +671,7 @@ static PyMethodDef Ctl_methods[] = {
{"DrawControls", (PyCFunction)Ctl_DrawControls, 1,
"(WindowPtr theWindow) -> None"},
{"UpdateControls", (PyCFunction)Ctl_UpdateControls, 1,
- "(WindowPtr theWindow) -> None"},
+ "(WindowPtr theWindow, RgnHandle updateRegion) -> None"},
{"FindControl", (PyCFunction)Ctl_FindControl, 1,
"(Point thePoint, WindowPtr theWindow) -> (ControlPartCode _rv, ControlHandle theControl)"},
{NULL, NULL, 0}
diff --git a/Mac/Modules/ctl/ctlgen.py b/Mac/Modules/ctl/ctlgen.py
index 529097c..451253a 100644
--- a/Mac/Modules/ctl/ctlgen.py
+++ b/Mac/Modules/ctl/ctlgen.py
@@ -1,4 +1,4 @@
-# Generated from 'Sap:CodeWarrior7:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:Controls.h'
+# Generated from 'flap:CW8 Gold:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:Controls.h'
f = Function(ControlRef, 'NewControl',
(WindowRef, 'theWindow', InMode),
diff --git a/Mac/Modules/ctl/ctlsupport.py b/Mac/Modules/ctl/ctlsupport.py
index a8b45a5..c87922a 100644
--- a/Mac/Modules/ctl/ctlsupport.py
+++ b/Mac/Modules/ctl/ctlsupport.py
@@ -28,7 +28,7 @@ ControlHandle = OpaqueByValueType(OBJECTTYPE, OBJECTPREFIX)
ControlRef = ControlHandle
ExistingControlHandle = OpaqueByValueType(OBJECTTYPE, "CtlObj_WhichControl", "BUG")
-RgnHandle = FakeType("theWindow->visRgn") # XXX
+RgnHandle = OpaqueByValueType("RgnHandle", "ResObj")
ControlPartCode = Type("ControlPartCode", "h")
DragConstraint = Type("DragConstraint", "h")
diff --git a/Mac/Modules/dlg/Dlgmodule.c b/Mac/Modules/dlg/Dlgmodule.c
index 93de3e9..d09c41a 100644
--- a/Mac/Modules/dlg/Dlgmodule.c
+++ b/Mac/Modules/dlg/Dlgmodule.c
@@ -40,6 +40,9 @@ extern int GrafObj_Convert(PyObject *, GrafPtr *);
extern PyObject *BMObj_New(BitMapPtr);
extern int BMObj_Convert(PyObject *, BitMapPtr *);
+extern PyObject *PMObj_New(PixMapHandle);
+extern int PMObj_Convert(PyObject *, PixMapHandle *);
+
extern PyObject *WinObj_WhichWindow(WindowPtr);
#include <Dialogs.h>
@@ -173,10 +176,12 @@ static PyObject *DlgObj_UpdateDialog(_self, _args)
PyObject *_args;
{
PyObject *_res = NULL;
- if (!PyArg_ParseTuple(_args, ""))
+ RgnHandle updateRgn;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &updateRgn))
return NULL;
UpdateDialog(_self->ob_itself,
- _self->ob_itself->visRgn);
+ updateRgn);
Py_INCREF(Py_None);
_res = Py_None;
return _res;
@@ -481,7 +486,7 @@ static PyMethodDef DlgObj_methods[] = {
{"DrawDialog", (PyCFunction)DlgObj_DrawDialog, 1,
"() -> None"},
{"UpdateDialog", (PyCFunction)DlgObj_UpdateDialog, 1,
- "() -> None"},
+ "(RgnHandle updateRgn) -> None"},
{"GetDialogItem", (PyCFunction)DlgObj_GetDialogItem, 1,
"(short itemNo) -> (short itemType, Handle item, Rect box)"},
{"SetDialogItem", (PyCFunction)DlgObj_SetDialogItem, 1,
diff --git a/Mac/Modules/dlg/dlggen.py b/Mac/Modules/dlg/dlggen.py
index 3c1e669..b3f08ae 100644
--- a/Mac/Modules/dlg/dlggen.py
+++ b/Mac/Modules/dlg/dlggen.py
@@ -1,4 +1,4 @@
-# Generated from 'Sap:CodeWarrior7:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:Dialogs.h'
+# Generated from 'flap:CW8 Gold:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:Dialogs.h'
f = Function(DialogRef, 'NewDialog',
(NullStorage, 'wStorage', InMode),
diff --git a/Mac/Modules/dlg/dlgsupport.py b/Mac/Modules/dlg/dlgsupport.py
index cd255ef..ca4e0df 100644
--- a/Mac/Modules/dlg/dlgsupport.py
+++ b/Mac/Modules/dlg/dlgsupport.py
@@ -21,7 +21,7 @@ ModalFilterProcPtr = InputOnlyType("PyObject*", "O")
ModalFilterProcPtr.passInput = lambda name: "NewModalFilterProc(Dlg_PassFilterProc(%s))" % name
ModalFilterUPP = ModalFilterProcPtr
-RgnHandle = FakeType("_self->ob_itself->visRgn") # XXX
+RgnHandle = OpaqueByValueType("RgnHandle", "ResObj")
DITLMethod = Type("DITLMethod", "h")
diff --git a/Mac/Modules/evt/Evtmodule.c b/Mac/Modules/evt/Evtmodule.c
index 9078e9f..8aa8e7d 100644
--- a/Mac/Modules/evt/Evtmodule.c
+++ b/Mac/Modules/evt/Evtmodule.c
@@ -40,6 +40,9 @@ extern int GrafObj_Convert(PyObject *, GrafPtr *);
extern PyObject *BMObj_New(BitMapPtr);
extern int BMObj_Convert(PyObject *, BitMapPtr *);
+extern PyObject *PMObj_New(PixMapHandle);
+extern int PMObj_Convert(PyObject *, PixMapHandle *);
+
extern PyObject *WinObj_WhichWindow(WindowPtr);
#include <Events.h>
diff --git a/Mac/Modules/evt/evtgen.py b/Mac/Modules/evt/evtgen.py
index 2eda8ed..29f78d0 100644
--- a/Mac/Modules/evt/evtgen.py
+++ b/Mac/Modules/evt/evtgen.py
@@ -1,4 +1,4 @@
-# Generated from 'Sap:CodeWarrior7:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:Events.h'
+# Generated from 'flap:CW8 Gold:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:Events.h'
f = Function(UInt32, 'GetCaretTime',
)
diff --git a/Mac/Modules/evt/evtsupport.py b/Mac/Modules/evt/evtsupport.py
index 617eee4..0471a7e 100644
--- a/Mac/Modules/evt/evtsupport.py
+++ b/Mac/Modules/evt/evtsupport.py
@@ -24,7 +24,9 @@ from macsupport import *
#WindowPeek = OpaqueByValueType("WindowPeek", OBJECTPREFIX)
-RgnHandle = FakeType("(RgnHandle)0") # XXX
+RgnHandle = FakeType("(RgnHandle)0")
+# XXXX Should be next, but this will break a lot of code...
+# RgnHandle = OpaqueByValueType("RgnHandle", "OptResObj")
KeyMap = ArrayOutputBufferType("KeyMap")
MacOSEventKind = Type("MacOSEventKind", "h") # Old-style
diff --git a/Mac/Modules/fm/Fmgen.py b/Mac/Modules/fm/Fmgen.py
index 7d9203f..9f3f89c 100644
--- a/Mac/Modules/fm/Fmgen.py
+++ b/Mac/Modules/fm/Fmgen.py
@@ -1,4 +1,4 @@
-# Generated from 'flap:CodeWarrior:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:Fonts.h'
+# Generated from 'flap:CW8 Gold:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:Fonts.h'
f = Function(void, 'InitFonts',
)
diff --git a/Mac/Modules/list/Listmodule.c b/Mac/Modules/list/Listmodule.c
index 17f20b0..a276ea3 100644
--- a/Mac/Modules/list/Listmodule.c
+++ b/Mac/Modules/list/Listmodule.c
@@ -40,6 +40,9 @@ extern int GrafObj_Convert(PyObject *, GrafPtr *);
extern PyObject *BMObj_New(BitMapPtr);
extern int BMObj_Convert(PyObject *, BitMapPtr *);
+extern PyObject *PMObj_New(PixMapHandle);
+extern int PMObj_Convert(PyObject *, PixMapHandle *);
+
extern PyObject *WinObj_WhichWindow(WindowPtr);
#include <Lists.h>
@@ -299,9 +302,11 @@ static PyObject *ListObj_LUpdate(_self, _args)
PyObject *_args;
{
PyObject *_res = NULL;
- if (!PyArg_ParseTuple(_args, ""))
+ RgnHandle theRgn;
+ if (!PyArg_ParseTuple(_args, "O&",
+ ResObj_Convert, &theRgn))
return NULL;
- LUpdate((*_self->ob_itself)->port->visRgn,
+ LUpdate(theRgn,
_self->ob_itself);
Py_INCREF(Py_None);
_res = Py_None;
@@ -528,7 +533,7 @@ static PyMethodDef ListObj_methods[] = {
{"LAutoScroll", (PyCFunction)ListObj_LAutoScroll, 1,
"() -> None"},
{"LUpdate", (PyCFunction)ListObj_LUpdate, 1,
- "() -> None"},
+ "(RgnHandle theRgn) -> None"},
{"LActivate", (PyCFunction)ListObj_LActivate, 1,
"(Boolean act) -> None"},
{"LCellSize", (PyCFunction)ListObj_LCellSize, 1,
diff --git a/Mac/Modules/list/listgen.py b/Mac/Modules/list/listgen.py
index 9ee6ce6..85e0485 100644
--- a/Mac/Modules/list/listgen.py
+++ b/Mac/Modules/list/listgen.py
@@ -1,4 +1,4 @@
-# Generated from 'Sap:CodeWarrior7:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:Lists.h'
+# Generated from 'flap:CW8 Gold:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:Lists.h'
f = Function(ListRef, 'LNew',
(Rect_ptr, 'rView', InMode),
diff --git a/Mac/Modules/list/listsupport.py b/Mac/Modules/list/listsupport.py
index fa1e9c4..5d0c950 100644
--- a/Mac/Modules/list/listsupport.py
+++ b/Mac/Modules/list/listsupport.py
@@ -26,8 +26,7 @@ Cell = Point
VarOutBufferShortsize = VarHeapOutputBufferType('char', 'short', 's') # (buf, &len)
InBufferShortsize = VarInputBufferType('char', 'short', 's') # (buf, len)
-# For LUpdate, we alsways update the complete visible region.
-RgnHandle = FakeType("(*_self->ob_itself)->port->visRgn")
+RgnHandle = OpaqueByValueType("RgnHandle", "ResObj")
includestuff = includestuff + """
diff --git a/Mac/Modules/menu/Menumodule.c b/Mac/Modules/menu/Menumodule.c
index 07e1b88..cdd094c 100644
--- a/Mac/Modules/menu/Menumodule.c
+++ b/Mac/Modules/menu/Menumodule.c
@@ -40,6 +40,9 @@ extern int GrafObj_Convert(PyObject *, GrafPtr *);
extern PyObject *BMObj_New(BitMapPtr);
extern int BMObj_Convert(PyObject *, BitMapPtr *);
+extern PyObject *PMObj_New(PixMapHandle);
+extern int PMObj_Convert(PyObject *, PixMapHandle *);
+
extern PyObject *WinObj_WhichWindow(WindowPtr);
#include <Devices.h> /* Defines OpenDeskAcc in universal headers */
diff --git a/Mac/Modules/menu/menugen.py b/Mac/Modules/menu/menugen.py
index 7e27d5c..b5a60ce 100644
--- a/Mac/Modules/menu/menugen.py
+++ b/Mac/Modules/menu/menugen.py
@@ -1,4 +1,4 @@
-# Generated from 'Sap:CodeWarrior7:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:Menus.h'
+# Generated from 'flap:CW8 Gold:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:Menus.h'
f = Function(short, 'GetMBarHeight',
)