Commit d020f133 authored by Jack Jansen's avatar Jack Jansen

SetPort was missing, and the defs file needs the FOUR_CHAR_CODE define.

parent e7aaa6f8
...@@ -3833,6 +3833,36 @@ static PyObject *Qd_CharExtra(_self, _args) ...@@ -3833,6 +3833,36 @@ static PyObject *Qd_CharExtra(_self, _args)
return _res; return _res;
} }
static PyObject *Qd_SetPort(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
WindowPtr thePort;
if (!PyArg_ParseTuple(_args, "O&",
WinObj_Convert, &thePort))
return NULL;
SetPort(thePort);
Py_INCREF(Py_None);
_res = Py_None;
return _res;
}
static PyObject *Qd_OpenDeskAcc(_self, _args)
PyObject *_self;
PyObject *_args;
{
PyObject *_res = NULL;
Str255 name;
if (!PyArg_ParseTuple(_args, "O&",
PyMac_GetStr255, name))
return NULL;
OpenDeskAcc(name);
Py_INCREF(Py_None);
_res = Py_None;
return _res;
}
static PyObject *Qd_BitMap(_self, _args) static PyObject *Qd_BitMap(_self, _args)
PyObject *_self; PyObject *_self;
PyObject *_args; PyObject *_args;
...@@ -4277,6 +4307,10 @@ static PyMethodDef Qd_methods[] = { ...@@ -4277,6 +4307,10 @@ static PyMethodDef Qd_methods[] = {
"() -> (FontInfo info)"}, "() -> (FontInfo info)"},
{"CharExtra", (PyCFunction)Qd_CharExtra, 1, {"CharExtra", (PyCFunction)Qd_CharExtra, 1,
"(Fixed extra) -> None"}, "(Fixed extra) -> None"},
{"SetPort", (PyCFunction)Qd_SetPort, 1,
"(WindowPtr thePort) -> None"},
{"OpenDeskAcc", (PyCFunction)Qd_OpenDeskAcc, 1,
"(Str255 name) -> None"},
{"BitMap", (PyCFunction)Qd_BitMap, 1, {"BitMap", (PyCFunction)Qd_BitMap, 1,
"Take (string, int, Rect) argument and create BitMap"}, "Take (string, int, Rect) argument and create BitMap"},
{"RawBitMap", (PyCFunction)Qd_RawBitMap, 1, {"RawBitMap", (PyCFunction)Qd_RawBitMap, 1,
......
f = Function(void, 'GlobalToLocal',
(Point, 'thePoint', InOutMode),
)
functions.append(f)
f = Function(void, 'LocalToGlobal',
(Point, 'thePoint', InOutMode),
)
functions.append(f)
f = Function(void, 'SetPort', f = Function(void, 'SetPort',
(WindowPtr, 'thePort', InMode), (WindowPtr, 'thePort', InMode),
) )
functions.append(f) functions.append(f)
f = Function(void, 'ClipRect',
(Rect, 'r', InMode),
)
functions.append(f)
f = Function(void, 'EraseRect',
(Rect, 'r', InMode),
)
functions.append(f)
f = Function(void, 'OpenDeskAcc', f = Function(void, 'OpenDeskAcc',
(Str255, 'name', InMode), (Str255, 'name', InMode),
) )
......
...@@ -60,6 +60,10 @@ class MyScanner(Scanner): ...@@ -60,6 +60,10 @@ class MyScanner(Scanner):
## listname = "r_methods" ## listname = "r_methods"
return classname, listname return classname, listname
def writeinitialdefs(self):
self.defsfile.write("def FOUR_CHAR_CODE(x): return x\n")
def makeblacklistnames(self): def makeblacklistnames(self):
return [ return [
'InitGraf', 'InitGraf',
......
...@@ -302,7 +302,7 @@ Method = OSErrMethodGenerator ...@@ -302,7 +302,7 @@ Method = OSErrMethodGenerator
functions = [] functions = []
methods = [] methods = []
execfile(INPUTFILE) execfile(INPUTFILE)
#execfile(EXTRAFILE) execfile(EXTRAFILE)
# add the populated lists to the generator groups # add the populated lists to the generator groups
# (in a different wordl the scan program would generate this) # (in a different wordl the scan program would generate this)
......
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