Kaydet (Commit) b7abb18c authored tarafından Jack Jansen's avatar Jack Jansen

Added support for GrafPort object

üst 330381cb
...@@ -19,6 +19,8 @@ extern int ResObj_Convert(PyObject *, Handle *); ...@@ -19,6 +19,8 @@ extern int ResObj_Convert(PyObject *, Handle *);
extern PyObject *WinObj_New(WindowPtr); extern PyObject *WinObj_New(WindowPtr);
extern int WinObj_Convert(PyObject *, WindowPtr *); extern int WinObj_Convert(PyObject *, WindowPtr *);
extern PyTypeObject Window_Type;
#define WinObj_Check(x) ((x)->ob_type == &Window_Type)
extern PyObject *DlgObj_New(DialogPtr); extern PyObject *DlgObj_New(DialogPtr);
extern int DlgObj_Convert(PyObject *, DialogPtr *); extern int DlgObj_Convert(PyObject *, DialogPtr *);
...@@ -31,6 +33,9 @@ extern int MenuObj_Convert(PyObject *, MenuHandle *); ...@@ -31,6 +33,9 @@ extern int MenuObj_Convert(PyObject *, MenuHandle *);
extern PyObject *CtlObj_New(ControlHandle); extern PyObject *CtlObj_New(ControlHandle);
extern int CtlObj_Convert(PyObject *, ControlHandle *); extern int CtlObj_Convert(PyObject *, ControlHandle *);
extern PyObject *GrafObj_New(GrafPtr);
extern int GrafObj_Convert(PyObject *, GrafPtr *);
extern PyObject *WinObj_WhichWindow(WindowPtr); extern PyObject *WinObj_WhichWindow(WindowPtr);
#include <Windows.h> #include <Windows.h>
...@@ -412,6 +417,38 @@ static PyObject *WinObj_DrawNew(_self, _args) ...@@ -412,6 +417,38 @@ static PyObject *WinObj_DrawNew(_self, _args)
return _res; return _res;
} }
static PyObject *WinObj_PaintOne(_self, _args)
WindowObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
RgnHandle clobberedRgn;
if (!PyArg_ParseTuple(_args, "O&",
ResObj_Convert, &clobberedRgn))
return NULL;
PaintOne(_self->ob_itself,
clobberedRgn);
Py_INCREF(Py_None);
_res = Py_None;
return _res;
}
static PyObject *WinObj_PaintBehind(_self, _args)
WindowObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
RgnHandle clobberedRgn;
if (!PyArg_ParseTuple(_args, "O&",
ResObj_Convert, &clobberedRgn))
return NULL;
PaintBehind(_self->ob_itself,
clobberedRgn);
Py_INCREF(Py_None);
_res = Py_None;
return _res;
}
static PyObject *WinObj_CalcVis(_self, _args) static PyObject *WinObj_CalcVis(_self, _args)
WindowObject *_self; WindowObject *_self;
PyObject *_args; PyObject *_args;
...@@ -425,6 +462,22 @@ static PyObject *WinObj_CalcVis(_self, _args) ...@@ -425,6 +462,22 @@ static PyObject *WinObj_CalcVis(_self, _args)
return _res; return _res;
} }
static PyObject *WinObj_CalcVisBehind(_self, _args)
WindowObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
RgnHandle clobberedRgn;
if (!PyArg_ParseTuple(_args, "O&",
ResObj_Convert, &clobberedRgn))
return NULL;
CalcVisBehind(_self->ob_itself,
clobberedRgn);
Py_INCREF(Py_None);
_res = Py_None;
return _res;
}
static PyObject *WinObj_GrowWindow(_self, _args) static PyObject *WinObj_GrowWindow(_self, _args)
WindowObject *_self; WindowObject *_self;
PyObject *_args; PyObject *_args;
...@@ -531,6 +584,20 @@ static PyObject *WinObj_DragWindow(_self, _args) ...@@ -531,6 +584,20 @@ static PyObject *WinObj_DragWindow(_self, _args)
return _res; return _res;
} }
static PyObject *WinObj_GetWindowPort(_self, _args)
WindowObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
CGrafPtr _rv;
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = GetWindowPort(_self->ob_itself);
_res = Py_BuildValue("O&",
GrafObj_New, _rv);
return _res;
}
static PyObject *WinObj_SetPortWindowPort(_self, _args) static PyObject *WinObj_SetPortWindowPort(_self, _args)
WindowObject *_self; WindowObject *_self;
PyObject *_args; PyObject *_args;
...@@ -630,6 +697,54 @@ static PyObject *WinObj_GetWindowZoomFlag(_self, _args) ...@@ -630,6 +697,54 @@ static PyObject *WinObj_GetWindowZoomFlag(_self, _args)
return _res; return _res;
} }
static PyObject *WinObj_GetWindowStructureRgn(_self, _args)
WindowObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
RgnHandle r;
if (!PyArg_ParseTuple(_args, "O&",
ResObj_Convert, &r))
return NULL;
GetWindowStructureRgn(_self->ob_itself,
r);
Py_INCREF(Py_None);
_res = Py_None;
return _res;
}
static PyObject *WinObj_GetWindowContentRgn(_self, _args)
WindowObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
RgnHandle r;
if (!PyArg_ParseTuple(_args, "O&",
ResObj_Convert, &r))
return NULL;
GetWindowContentRgn(_self->ob_itself,
r);
Py_INCREF(Py_None);
_res = Py_None;
return _res;
}
static PyObject *WinObj_GetWindowUpdateRgn(_self, _args)
WindowObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
RgnHandle r;
if (!PyArg_ParseTuple(_args, "O&",
ResObj_Convert, &r))
return NULL;
GetWindowUpdateRgn(_self->ob_itself,
r);
Py_INCREF(Py_None);
_res = Py_None;
return _res;
}
static PyObject *WinObj_GetWindowTitleWidth(_self, _args) static PyObject *WinObj_GetWindowTitleWidth(_self, _args)
WindowObject *_self; WindowObject *_self;
PyObject *_args; PyObject *_args;
...@@ -763,8 +878,14 @@ static PyMethodDef WinObj_methods[] = { ...@@ -763,8 +878,14 @@ static PyMethodDef WinObj_methods[] = {
"() -> None"}, "() -> None"},
{"DrawNew", (PyCFunction)WinObj_DrawNew, 1, {"DrawNew", (PyCFunction)WinObj_DrawNew, 1,
"(Boolean update) -> None"}, "(Boolean update) -> None"},
{"PaintOne", (PyCFunction)WinObj_PaintOne, 1,
"(RgnHandle clobberedRgn) -> None"},
{"PaintBehind", (PyCFunction)WinObj_PaintBehind, 1,
"(RgnHandle clobberedRgn) -> None"},
{"CalcVis", (PyCFunction)WinObj_CalcVis, 1, {"CalcVis", (PyCFunction)WinObj_CalcVis, 1,
"() -> None"}, "() -> None"},
{"CalcVisBehind", (PyCFunction)WinObj_CalcVisBehind, 1,
"(RgnHandle clobberedRgn) -> None"},
{"GrowWindow", (PyCFunction)WinObj_GrowWindow, 1, {"GrowWindow", (PyCFunction)WinObj_GrowWindow, 1,
"(Point startPt, Rect bBox) -> (long _rv)"}, "(Point startPt, Rect bBox) -> (long _rv)"},
{"TrackBox", (PyCFunction)WinObj_TrackBox, 1, {"TrackBox", (PyCFunction)WinObj_TrackBox, 1,
...@@ -777,6 +898,8 @@ static PyMethodDef WinObj_methods[] = { ...@@ -777,6 +898,8 @@ static PyMethodDef WinObj_methods[] = {
"(Point thePt) -> (Boolean _rv)"}, "(Point thePt) -> (Boolean _rv)"},
{"DragWindow", (PyCFunction)WinObj_DragWindow, 1, {"DragWindow", (PyCFunction)WinObj_DragWindow, 1,
"(Point startPt, Rect boundsRect) -> None"}, "(Point startPt, Rect boundsRect) -> None"},
{"GetWindowPort", (PyCFunction)WinObj_GetWindowPort, 1,
"() -> (CGrafPtr _rv)"},
{"SetPortWindowPort", (PyCFunction)WinObj_SetPortWindowPort, 1, {"SetPortWindowPort", (PyCFunction)WinObj_SetPortWindowPort, 1,
"() -> None"}, "() -> None"},
{"GetWindowKind", (PyCFunction)WinObj_GetWindowKind, 1, {"GetWindowKind", (PyCFunction)WinObj_GetWindowKind, 1,
...@@ -791,6 +914,12 @@ static PyMethodDef WinObj_methods[] = { ...@@ -791,6 +914,12 @@ static PyMethodDef WinObj_methods[] = {
"() -> (Boolean _rv)"}, "() -> (Boolean _rv)"},
{"GetWindowZoomFlag", (PyCFunction)WinObj_GetWindowZoomFlag, 1, {"GetWindowZoomFlag", (PyCFunction)WinObj_GetWindowZoomFlag, 1,
"() -> (Boolean _rv)"}, "() -> (Boolean _rv)"},
{"GetWindowStructureRgn", (PyCFunction)WinObj_GetWindowStructureRgn, 1,
"(RgnHandle r) -> None"},
{"GetWindowContentRgn", (PyCFunction)WinObj_GetWindowContentRgn, 1,
"(RgnHandle r) -> None"},
{"GetWindowUpdateRgn", (PyCFunction)WinObj_GetWindowUpdateRgn, 1,
"(RgnHandle r) -> None"},
{"GetWindowTitleWidth", (PyCFunction)WinObj_GetWindowTitleWidth, 1, {"GetWindowTitleWidth", (PyCFunction)WinObj_GetWindowTitleWidth, 1,
"() -> (short _rv)"}, "() -> (short _rv)"},
{"GetNextWindow", (PyCFunction)WinObj_GetNextWindow, 1, {"GetNextWindow", (PyCFunction)WinObj_GetNextWindow, 1,
...@@ -833,6 +962,20 @@ PyTypeObject Window_Type = { ...@@ -833,6 +962,20 @@ PyTypeObject Window_Type = {
/* --------------------- End object type Window --------------------- */ /* --------------------- End object type Window --------------------- */
static PyObject *Win_GetGrayRgn(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
RgnHandle _rv;
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = GetGrayRgn();
_res = Py_BuildValue("O&",
ResObj_New, _rv);
return _res;
}
static PyObject *Win_InitWindows(_self, _args) static PyObject *Win_InitWindows(_self, _args)
PyObject *_self; PyObject *_self;
PyObject *_args; PyObject *_args;
...@@ -846,6 +989,20 @@ static PyObject *Win_InitWindows(_self, _args) ...@@ -846,6 +989,20 @@ static PyObject *Win_InitWindows(_self, _args)
return _res; return _res;
} }
static PyObject *Win_GetWMgrPort(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
GrafPtr wPort;
if (!PyArg_ParseTuple(_args, ""))
return NULL;
GetWMgrPort(&wPort);
_res = Py_BuildValue("O&",
GrafObj_New, wPort);
return _res;
}
static PyObject *Win_NewWindow(_self, _args) static PyObject *Win_NewWindow(_self, _args)
PyObject *_self; PyObject *_self;
PyObject *_args; PyObject *_args;
...@@ -930,6 +1087,21 @@ static PyObject *Win_InvalRect(_self, _args) ...@@ -930,6 +1087,21 @@ static PyObject *Win_InvalRect(_self, _args)
return _res; return _res;
} }
static PyObject *Win_InvalRgn(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
RgnHandle badRgn;
if (!PyArg_ParseTuple(_args, "O&",
ResObj_Convert, &badRgn))
return NULL;
InvalRgn(badRgn);
Py_INCREF(Py_None);
_res = Py_None;
return _res;
}
static PyObject *Win_ValidRect(_self, _args) static PyObject *Win_ValidRect(_self, _args)
PyObject *_self; PyObject *_self;
PyObject *_args; PyObject *_args;
...@@ -945,6 +1117,21 @@ static PyObject *Win_ValidRect(_self, _args) ...@@ -945,6 +1117,21 @@ static PyObject *Win_ValidRect(_self, _args)
return _res; return _res;
} }
static PyObject *Win_ValidRgn(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
RgnHandle goodRgn;
if (!PyArg_ParseTuple(_args, "O&",
ResObj_Convert, &goodRgn))
return NULL;
ValidRgn(goodRgn);
Py_INCREF(Py_None);
_res = Py_None;
return _res;
}
static PyObject *Win_CheckUpdate(_self, _args) static PyObject *Win_CheckUpdate(_self, _args)
PyObject *_self; PyObject *_self;
PyObject *_args; PyObject *_args;
...@@ -999,6 +1186,20 @@ static PyObject *Win_PinRect(_self, _args) ...@@ -999,6 +1186,20 @@ static PyObject *Win_PinRect(_self, _args)
return _res; return _res;
} }
static PyObject *Win_GetCWMgrPort(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
CGrafPtr wMgrCPort;
if (!PyArg_ParseTuple(_args, ""))
return NULL;
GetCWMgrPort(&wMgrCPort);
_res = Py_BuildValue("O&",
GrafObj_New, wMgrCPort);
return _res;
}
static PyObject *Win_NewCWindow(_self, _args) static PyObject *Win_NewCWindow(_self, _args)
PyObject *_self; PyObject *_self;
PyObject *_args; PyObject *_args;
...@@ -1069,8 +1270,12 @@ static PyObject *Win_WhichWindow(_self, _args) ...@@ -1069,8 +1270,12 @@ static PyObject *Win_WhichWindow(_self, _args)
} }
static PyMethodDef Win_methods[] = { static PyMethodDef Win_methods[] = {
{"GetGrayRgn", (PyCFunction)Win_GetGrayRgn, 1,
"() -> (RgnHandle _rv)"},
{"InitWindows", (PyCFunction)Win_InitWindows, 1, {"InitWindows", (PyCFunction)Win_InitWindows, 1,
"() -> None"}, "() -> None"},
{"GetWMgrPort", (PyCFunction)Win_GetWMgrPort, 1,
"() -> (GrafPtr wPort)"},
{"NewWindow", (PyCFunction)Win_NewWindow, 1, {"NewWindow", (PyCFunction)Win_NewWindow, 1,
"(Rect boundsRect, Str255 title, Boolean visible, short theProc, WindowPtr behind, Boolean goAwayFlag, long refCon) -> (WindowPtr _rv)"}, "(Rect boundsRect, Str255 title, Boolean visible, short theProc, WindowPtr behind, Boolean goAwayFlag, long refCon) -> (WindowPtr _rv)"},
{"GetNewWindow", (PyCFunction)Win_GetNewWindow, 1, {"GetNewWindow", (PyCFunction)Win_GetNewWindow, 1,
...@@ -1079,14 +1284,20 @@ static PyMethodDef Win_methods[] = { ...@@ -1079,14 +1284,20 @@ static PyMethodDef Win_methods[] = {
"() -> (WindowPtr _rv)"}, "() -> (WindowPtr _rv)"},
{"InvalRect", (PyCFunction)Win_InvalRect, 1, {"InvalRect", (PyCFunction)Win_InvalRect, 1,
"(Rect badRect) -> None"}, "(Rect badRect) -> None"},
{"InvalRgn", (PyCFunction)Win_InvalRgn, 1,
"(RgnHandle badRgn) -> None"},
{"ValidRect", (PyCFunction)Win_ValidRect, 1, {"ValidRect", (PyCFunction)Win_ValidRect, 1,
"(Rect goodRect) -> None"}, "(Rect goodRect) -> None"},
{"ValidRgn", (PyCFunction)Win_ValidRgn, 1,
"(RgnHandle goodRgn) -> None"},
{"CheckUpdate", (PyCFunction)Win_CheckUpdate, 1, {"CheckUpdate", (PyCFunction)Win_CheckUpdate, 1,
"() -> (Boolean _rv, EventRecord theEvent)"}, "() -> (Boolean _rv, EventRecord theEvent)"},
{"FindWindow", (PyCFunction)Win_FindWindow, 1, {"FindWindow", (PyCFunction)Win_FindWindow, 1,
"(Point thePoint) -> (short _rv, WindowPtr theWindow)"}, "(Point thePoint) -> (short _rv, WindowPtr theWindow)"},
{"PinRect", (PyCFunction)Win_PinRect, 1, {"PinRect", (PyCFunction)Win_PinRect, 1,
"(Rect theRect, Point thePt) -> (long _rv)"}, "(Rect theRect, Point thePt) -> (long _rv)"},
{"GetCWMgrPort", (PyCFunction)Win_GetCWMgrPort, 1,
"() -> (CGrafPtr wMgrCPort)"},
{"NewCWindow", (PyCFunction)Win_NewCWindow, 1, {"NewCWindow", (PyCFunction)Win_NewCWindow, 1,
"(Rect boundsRect, Str255 title, Boolean visible, short procID, WindowPtr behind, Boolean goAwayFlag, long refCon) -> (WindowPtr _rv)"}, "(Rect boundsRect, Str255 title, Boolean visible, short procID, WindowPtr behind, Boolean goAwayFlag, long refCon) -> (WindowPtr _rv)"},
{"GetNewCWindow", (PyCFunction)Win_GetNewCWindow, 1, {"GetNewCWindow", (PyCFunction)Win_GetNewCWindow, 1,
......
# These are inline-routines/defines, so we do them "by hand" # These are inline-routines/defines, so we do them "by hand"
# #
f = Method(CGrafPtr, 'GetWindowPort',
(WindowRef, 'theWindow', InMode),
)
methods.append(f)
f = Method(void, 'SetPortWindowPort', f = Method(void, 'SetPortWindowPort',
(WindowRef, 'theWindow', InMode), (WindowRef, 'theWindow', InMode),
) )
...@@ -38,25 +43,23 @@ f = Method(Boolean, 'GetWindowZoomFlag', ...@@ -38,25 +43,23 @@ f = Method(Boolean, 'GetWindowZoomFlag',
) )
methods.append(f) methods.append(f)
if 0: f = Method(void, 'GetWindowStructureRgn',
# Regions are not implemented yet.. (WindowRef, 'theWindow', InMode),
f = Method(void, 'GetWindowStructureRgn', (RgnHandle, 'r', InMode),
(WindowRef, 'theWindow', InMode), )
(RgnHandle, 'r', InMode), methods.append(f)
)
methods.append(f) f = Method(void, 'GetWindowContentRgn',
(WindowRef, 'theWindow', InMode),
f = Method(void, 'GetWindowContentRgn', (RgnHandle, 'r', InMode),
(WindowRef, 'theWindow', InMode), )
(RgnHandle, 'r', InMode), methods.append(f)
)
methods.append(f) f = Method(void, 'GetWindowUpdateRgn',
(WindowRef, 'theWindow', InMode),
f = Method(void, 'GetWindowUpdateRgn', (RgnHandle, 'r', InMode),
(WindowRef, 'theWindow', InMode), )
(RgnHandle, 'r', InMode), methods.append(f)
)
methods.append(f)
f = Method(short, 'GetWindowTitleWidth', f = Method(short, 'GetWindowTitleWidth',
(WindowRef, 'theWindow', InMode), (WindowRef, 'theWindow', InMode),
......
# Generated from 'Sap:CodeWarrior7:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:Windows.h' # Generated from 'Sap:CodeWarrior7:Metrowerks CodeWarrior:MacOS Support:Headers:Universal Headers:Windows.h'
f = Function(RgnHandle, 'GetGrayRgn',
)
functions.append(f)
f = Function(void, 'InitWindows', f = Function(void, 'InitWindows',
) )
functions.append(f) functions.append(f)
f = Function(void, 'GetWMgrPort',
(GrafPtr, 'wPort', OutMode),
)
functions.append(f)
f = Function(WindowRef, 'NewWindow', f = Function(WindowRef, 'NewWindow',
(NullStorage, 'wStorage', InMode), (NullStorage, 'wStorage', InMode),
(Rect_ptr, 'boundsRect', InMode), (Rect_ptr, 'boundsRect', InMode),
...@@ -104,11 +113,21 @@ f = Function(void, 'InvalRect', ...@@ -104,11 +113,21 @@ f = Function(void, 'InvalRect',
) )
functions.append(f) functions.append(f)
f = Function(void, 'InvalRgn',
(RgnHandle, 'badRgn', InMode),
)
functions.append(f)
f = Function(void, 'ValidRect', f = Function(void, 'ValidRect',
(Rect_ptr, 'goodRect', InMode), (Rect_ptr, 'goodRect', InMode),
) )
functions.append(f) functions.append(f)
f = Function(void, 'ValidRgn',
(RgnHandle, 'goodRgn', InMode),
)
functions.append(f)
f = Method(void, 'BeginUpdate', f = Method(void, 'BeginUpdate',
(WindowRef, 'theWindow', InMode), (WindowRef, 'theWindow', InMode),
) )
...@@ -162,11 +181,29 @@ f = Method(void, 'DrawNew', ...@@ -162,11 +181,29 @@ f = Method(void, 'DrawNew',
) )
methods.append(f) methods.append(f)
f = Method(void, 'PaintOne',
(WindowRef, 'window', InMode),
(RgnHandle, 'clobberedRgn', InMode),
)
methods.append(f)
f = Method(void, 'PaintBehind',
(WindowRef, 'startWindow', InMode),
(RgnHandle, 'clobberedRgn', InMode),
)
methods.append(f)
f = Method(void, 'CalcVis', f = Method(void, 'CalcVis',
(WindowRef, 'window', InMode), (WindowRef, 'window', InMode),
) )
methods.append(f) methods.append(f)
f = Method(void, 'CalcVisBehind',
(WindowRef, 'startWindow', InMode),
(RgnHandle, 'clobberedRgn', InMode),
)
methods.append(f)
f = Method(long, 'GrowWindow', f = Method(long, 'GrowWindow',
(WindowRef, 'theWindow', InMode), (WindowRef, 'theWindow', InMode),
(Point, 'startPt', InMode), (Point, 'startPt', InMode),
...@@ -193,6 +230,11 @@ f = Method(Boolean, 'TrackBox', ...@@ -193,6 +230,11 @@ f = Method(Boolean, 'TrackBox',
) )
methods.append(f) methods.append(f)
f = Function(void, 'GetCWMgrPort',
(CGrafPtr, 'wMgrCPort', OutMode),
)
functions.append(f)
f = Function(WindowRef, 'NewCWindow', f = Function(WindowRef, 'NewCWindow',
(NullStorage, 'wStorage', InMode), (NullStorage, 'wStorage', InMode),
(Rect_ptr, 'boundsRect', InMode), (Rect_ptr, 'boundsRect', InMode),
......
...@@ -36,13 +36,10 @@ class MyScanner(Scanner): ...@@ -36,13 +36,10 @@ class MyScanner(Scanner):
def makeblacklisttypes(self): def makeblacklisttypes(self):
return [ return [
'ProcPtr', 'ProcPtr',
'GrafPtr',
'CGrafPtr',
'RgnHandle',
## 'PicHandle',
'WCTabHandle', 'WCTabHandle',
'AuxWinHandle', 'AuxWinHandle',
'PixPatHandle', 'PixPatHandle',
'DragGrayRgnUPP',
] ]
def makerepairinstructions(self): def makerepairinstructions(self):
......
...@@ -29,9 +29,10 @@ WindowPtr = OpaqueByValueType(OBJECTTYPE, OBJECTPREFIX) ...@@ -29,9 +29,10 @@ WindowPtr = OpaqueByValueType(OBJECTTYPE, OBJECTPREFIX)
WindowRef = WindowPtr WindowRef = WindowPtr
WindowPeek = OpaqueByValueType("WindowPeek", OBJECTPREFIX) WindowPeek = OpaqueByValueType("WindowPeek", OBJECTPREFIX)
WindowPeek.passInput = lambda name: "(WindowPeek)(%s)" % name WindowPeek.passInput = lambda name: "(WindowPeek)(%s)" % name
CGrafPtr = WindowPtr CGrafPtr = OpaqueByValueType("CGrafPtr", "GrafObj")
GrafPtr = OpaqueByValueType("GrafPtr", "GrafObj")
#RgnHandle = OpaqueByValueType("RgnHandle", "RgnObj") RgnHandle = OpaqueByValueType("RgnHandle", "ResObj")
PicHandle = OpaqueByValueType("PicHandle", "ResObj") PicHandle = OpaqueByValueType("PicHandle", "ResObj")
includestuff = includestuff + """ includestuff = includestuff + """
...@@ -83,7 +84,6 @@ class MyObjectDefinition(GlobalObjectDefinition): ...@@ -83,7 +84,6 @@ class MyObjectDefinition(GlobalObjectDefinition):
""") """)
def outputFreeIt(self, itselfname): def outputFreeIt(self, itselfname):
Output("DisposeWindow(%s);", itselfname) Output("DisposeWindow(%s);", itselfname)
# From here on it's basically all boiler plate... # From here on it's basically all boiler plate...
# Create the generator groups and link them # Create the generator groups and link them
......
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