Commit 2b72417d authored by Jack Jansen's avatar Jack Jansen

Replaced various dummy updateRegions by real arguments

parent fcdf4378
...@@ -40,6 +40,9 @@ extern int GrafObj_Convert(PyObject *, GrafPtr *); ...@@ -40,6 +40,9 @@ extern int GrafObj_Convert(PyObject *, GrafPtr *);
extern PyObject *BMObj_New(BitMapPtr); extern PyObject *BMObj_New(BitMapPtr);
extern int BMObj_Convert(PyObject *, BitMapPtr *); extern int BMObj_Convert(PyObject *, BitMapPtr *);
extern PyObject *PMObj_New(PixMapHandle);
extern int PMObj_Convert(PyObject *, PixMapHandle *);
extern PyObject *WinObj_WhichWindow(WindowPtr); extern PyObject *WinObj_WhichWindow(WindowPtr);
#include <Controls.h> #include <Controls.h>
...@@ -624,11 +627,13 @@ static PyObject *Ctl_UpdateControls(_self, _args) ...@@ -624,11 +627,13 @@ static PyObject *Ctl_UpdateControls(_self, _args)
{ {
PyObject *_res = NULL; PyObject *_res = NULL;
WindowPtr theWindow; WindowPtr theWindow;
if (!PyArg_ParseTuple(_args, "O&", RgnHandle updateRegion;
WinObj_Convert, &theWindow)) if (!PyArg_ParseTuple(_args, "O&O&",
WinObj_Convert, &theWindow,
ResObj_Convert, &updateRegion))
return NULL; return NULL;
UpdateControls(theWindow, UpdateControls(theWindow,
theWindow->visRgn); updateRegion);
Py_INCREF(Py_None); Py_INCREF(Py_None);
_res = Py_None; _res = Py_None;
return _res; return _res;
...@@ -666,7 +671,7 @@ static PyMethodDef Ctl_methods[] = { ...@@ -666,7 +671,7 @@ static PyMethodDef Ctl_methods[] = {
{"DrawControls", (PyCFunction)Ctl_DrawControls, 1, {"DrawControls", (PyCFunction)Ctl_DrawControls, 1,
"(WindowPtr theWindow) -> None"}, "(WindowPtr theWindow) -> None"},
{"UpdateControls", (PyCFunction)Ctl_UpdateControls, 1, {"UpdateControls", (PyCFunction)Ctl_UpdateControls, 1,
"(WindowPtr theWindow) -> None"}, "(WindowPtr theWindow, RgnHandle updateRegion) -> None"},
{"FindControl", (PyCFunction)Ctl_FindControl, 1, {"FindControl", (PyCFunction)Ctl_FindControl, 1,
"(Point thePoint, WindowPtr theWindow) -> (ControlPartCode _rv, ControlHandle theControl)"}, "(Point thePoint, WindowPtr theWindow) -> (ControlPartCode _rv, ControlHandle theControl)"},
{NULL, NULL, 0} {NULL, NULL, 0}
......
# 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', f = Function(ControlRef, 'NewControl',
(WindowRef, 'theWindow', InMode), (WindowRef, 'theWindow', InMode),
......
...@@ -28,7 +28,7 @@ ControlHandle = OpaqueByValueType(OBJECTTYPE, OBJECTPREFIX) ...@@ -28,7 +28,7 @@ ControlHandle = OpaqueByValueType(OBJECTTYPE, OBJECTPREFIX)
ControlRef = ControlHandle ControlRef = ControlHandle
ExistingControlHandle = OpaqueByValueType(OBJECTTYPE, "CtlObj_WhichControl", "BUG") ExistingControlHandle = OpaqueByValueType(OBJECTTYPE, "CtlObj_WhichControl", "BUG")
RgnHandle = FakeType("theWindow->visRgn") # XXX RgnHandle = OpaqueByValueType("RgnHandle", "ResObj")
ControlPartCode = Type("ControlPartCode", "h") ControlPartCode = Type("ControlPartCode", "h")
DragConstraint = Type("DragConstraint", "h") DragConstraint = Type("DragConstraint", "h")
......
...@@ -40,6 +40,9 @@ extern int GrafObj_Convert(PyObject *, GrafPtr *); ...@@ -40,6 +40,9 @@ extern int GrafObj_Convert(PyObject *, GrafPtr *);
extern PyObject *BMObj_New(BitMapPtr); extern PyObject *BMObj_New(BitMapPtr);
extern int BMObj_Convert(PyObject *, BitMapPtr *); extern int BMObj_Convert(PyObject *, BitMapPtr *);
extern PyObject *PMObj_New(PixMapHandle);
extern int PMObj_Convert(PyObject *, PixMapHandle *);
extern PyObject *WinObj_WhichWindow(WindowPtr); extern PyObject *WinObj_WhichWindow(WindowPtr);
#include <Dialogs.h> #include <Dialogs.h>
...@@ -173,10 +176,12 @@ static PyObject *DlgObj_UpdateDialog(_self, _args) ...@@ -173,10 +176,12 @@ static PyObject *DlgObj_UpdateDialog(_self, _args)
PyObject *_args; PyObject *_args;
{ {
PyObject *_res = NULL; PyObject *_res = NULL;
if (!PyArg_ParseTuple(_args, "")) RgnHandle updateRgn;
if (!PyArg_ParseTuple(_args, "O&",
ResObj_Convert, &updateRgn))
return NULL; return NULL;
UpdateDialog(_self->ob_itself, UpdateDialog(_self->ob_itself,
_self->ob_itself->visRgn); updateRgn);
Py_INCREF(Py_None); Py_INCREF(Py_None);
_res = Py_None; _res = Py_None;
return _res; return _res;
...@@ -481,7 +486,7 @@ static PyMethodDef DlgObj_methods[] = { ...@@ -481,7 +486,7 @@ static PyMethodDef DlgObj_methods[] = {
{"DrawDialog", (PyCFunction)DlgObj_DrawDialog, 1, {"DrawDialog", (PyCFunction)DlgObj_DrawDialog, 1,
"() -> None"}, "() -> None"},
{"UpdateDialog", (PyCFunction)DlgObj_UpdateDialog, 1, {"UpdateDialog", (PyCFunction)DlgObj_UpdateDialog, 1,
"() -> None"}, "(RgnHandle updateRgn) -> None"},
{"GetDialogItem", (PyCFunction)DlgObj_GetDialogItem, 1, {"GetDialogItem", (PyCFunction)DlgObj_GetDialogItem, 1,
"(short itemNo) -> (short itemType, Handle item, Rect box)"}, "(short itemNo) -> (short itemType, Handle item, Rect box)"},
{"SetDialogItem", (PyCFunction)DlgObj_SetDialogItem, 1, {"SetDialogItem", (PyCFunction)DlgObj_SetDialogItem, 1,
......
# 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', f = Function(DialogRef, 'NewDialog',
(NullStorage, 'wStorage', InMode), (NullStorage, 'wStorage', InMode),
......
...@@ -21,7 +21,7 @@ ModalFilterProcPtr = InputOnlyType("PyObject*", "O") ...@@ -21,7 +21,7 @@ ModalFilterProcPtr = InputOnlyType("PyObject*", "O")
ModalFilterProcPtr.passInput = lambda name: "NewModalFilterProc(Dlg_PassFilterProc(%s))" % name ModalFilterProcPtr.passInput = lambda name: "NewModalFilterProc(Dlg_PassFilterProc(%s))" % name
ModalFilterUPP = ModalFilterProcPtr ModalFilterUPP = ModalFilterProcPtr
RgnHandle = FakeType("_self->ob_itself->visRgn") # XXX RgnHandle = OpaqueByValueType("RgnHandle", "ResObj")
DITLMethod = Type("DITLMethod", "h") DITLMethod = Type("DITLMethod", "h")
......
...@@ -40,6 +40,9 @@ extern int GrafObj_Convert(PyObject *, GrafPtr *); ...@@ -40,6 +40,9 @@ extern int GrafObj_Convert(PyObject *, GrafPtr *);
extern PyObject *BMObj_New(BitMapPtr); extern PyObject *BMObj_New(BitMapPtr);
extern int BMObj_Convert(PyObject *, BitMapPtr *); extern int BMObj_Convert(PyObject *, BitMapPtr *);
extern PyObject *PMObj_New(PixMapHandle);
extern int PMObj_Convert(PyObject *, PixMapHandle *);
extern PyObject *WinObj_WhichWindow(WindowPtr); extern PyObject *WinObj_WhichWindow(WindowPtr);
#include <Events.h> #include <Events.h>
......
# 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', f = Function(UInt32, 'GetCaretTime',
) )
......
...@@ -24,7 +24,9 @@ from macsupport import * ...@@ -24,7 +24,9 @@ from macsupport import *
#WindowPeek = OpaqueByValueType("WindowPeek", OBJECTPREFIX) #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") KeyMap = ArrayOutputBufferType("KeyMap")
MacOSEventKind = Type("MacOSEventKind", "h") # Old-style MacOSEventKind = Type("MacOSEventKind", "h") # Old-style
......
# 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', f = Function(void, 'InitFonts',
) )
......
...@@ -40,6 +40,9 @@ extern int GrafObj_Convert(PyObject *, GrafPtr *); ...@@ -40,6 +40,9 @@ extern int GrafObj_Convert(PyObject *, GrafPtr *);
extern PyObject *BMObj_New(BitMapPtr); extern PyObject *BMObj_New(BitMapPtr);
extern int BMObj_Convert(PyObject *, BitMapPtr *); extern int BMObj_Convert(PyObject *, BitMapPtr *);
extern PyObject *PMObj_New(PixMapHandle);
extern int PMObj_Convert(PyObject *, PixMapHandle *);
extern PyObject *WinObj_WhichWindow(WindowPtr); extern PyObject *WinObj_WhichWindow(WindowPtr);
#include <Lists.h> #include <Lists.h>
...@@ -299,9 +302,11 @@ static PyObject *ListObj_LUpdate(_self, _args) ...@@ -299,9 +302,11 @@ static PyObject *ListObj_LUpdate(_self, _args)
PyObject *_args; PyObject *_args;
{ {
PyObject *_res = NULL; PyObject *_res = NULL;
if (!PyArg_ParseTuple(_args, "")) RgnHandle theRgn;
if (!PyArg_ParseTuple(_args, "O&",
ResObj_Convert, &theRgn))
return NULL; return NULL;
LUpdate((*_self->ob_itself)->port->visRgn, LUpdate(theRgn,
_self->ob_itself); _self->ob_itself);
Py_INCREF(Py_None); Py_INCREF(Py_None);
_res = Py_None; _res = Py_None;
...@@ -528,7 +533,7 @@ static PyMethodDef ListObj_methods[] = { ...@@ -528,7 +533,7 @@ static PyMethodDef ListObj_methods[] = {
{"LAutoScroll", (PyCFunction)ListObj_LAutoScroll, 1, {"LAutoScroll", (PyCFunction)ListObj_LAutoScroll, 1,
"() -> None"}, "() -> None"},
{"LUpdate", (PyCFunction)ListObj_LUpdate, 1, {"LUpdate", (PyCFunction)ListObj_LUpdate, 1,
"() -> None"}, "(RgnHandle theRgn) -> None"},
{"LActivate", (PyCFunction)ListObj_LActivate, 1, {"LActivate", (PyCFunction)ListObj_LActivate, 1,
"(Boolean act) -> None"}, "(Boolean act) -> None"},
{"LCellSize", (PyCFunction)ListObj_LCellSize, 1, {"LCellSize", (PyCFunction)ListObj_LCellSize, 1,
......
# 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', f = Function(ListRef, 'LNew',
(Rect_ptr, 'rView', InMode), (Rect_ptr, 'rView', InMode),
......
...@@ -26,8 +26,7 @@ Cell = Point ...@@ -26,8 +26,7 @@ Cell = Point
VarOutBufferShortsize = VarHeapOutputBufferType('char', 'short', 's') # (buf, &len) VarOutBufferShortsize = VarHeapOutputBufferType('char', 'short', 's') # (buf, &len)
InBufferShortsize = VarInputBufferType('char', 'short', 's') # (buf, len) InBufferShortsize = VarInputBufferType('char', 'short', 's') # (buf, len)
# For LUpdate, we alsways update the complete visible region. RgnHandle = OpaqueByValueType("RgnHandle", "ResObj")
RgnHandle = FakeType("(*_self->ob_itself)->port->visRgn")
includestuff = includestuff + """ includestuff = includestuff + """
......
...@@ -40,6 +40,9 @@ extern int GrafObj_Convert(PyObject *, GrafPtr *); ...@@ -40,6 +40,9 @@ extern int GrafObj_Convert(PyObject *, GrafPtr *);
extern PyObject *BMObj_New(BitMapPtr); extern PyObject *BMObj_New(BitMapPtr);
extern int BMObj_Convert(PyObject *, BitMapPtr *); extern int BMObj_Convert(PyObject *, BitMapPtr *);
extern PyObject *PMObj_New(PixMapHandle);
extern int PMObj_Convert(PyObject *, PixMapHandle *);
extern PyObject *WinObj_WhichWindow(WindowPtr); extern PyObject *WinObj_WhichWindow(WindowPtr);
#include <Devices.h> /* Defines OpenDeskAcc in universal headers */ #include <Devices.h> /* Defines OpenDeskAcc in universal headers */
......
# 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', f = Function(short, 'GetMBarHeight',
) )
......
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