summaryrefslogtreecommitdiffstats
path: root/Mac/Modules/qd
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>1998-02-20 16:02:09 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>1998-02-20 16:02:09 (GMT)
commit21f96872f20080d5f07a72ea4141fac137ac9b15 (patch)
tree5a300f0e769bddbc7795b7bc955f9f84f3bc1f2e /Mac/Modules/qd
parentcbe6a53d1ffe76702a2873429f2c57f9609a7f48 (diff)
downloadcpython-21f96872f20080d5f07a72ea4141fac137ac9b15.zip
cpython-21f96872f20080d5f07a72ea4141fac137ac9b15.tar.gz
cpython-21f96872f20080d5f07a72ea4141fac137ac9b15.tar.bz2
Regenerated from Universal Headers 3.0.1. Some new calls are
blacklisted, because they are not available in classic 68k programs, and bgen doesn't have a way to put #ifdef/#endif in the generated code. For now we only implement calls that work on all three models.
Diffstat (limited to 'Mac/Modules/qd')
-rw-r--r--Mac/Modules/qd/Qdmodule.c52
-rw-r--r--Mac/Modules/qd/qdscan.py2
2 files changed, 46 insertions, 8 deletions
diff --git a/Mac/Modules/qd/Qdmodule.c b/Mac/Modules/qd/Qdmodule.c
index f294d31..0fb1a7b 100644
--- a/Mac/Modules/qd/Qdmodule.c
+++ b/Mac/Modules/qd/Qdmodule.c
@@ -3586,6 +3586,38 @@ static PyObject *Qd_GetIndPattern(_self, _args)
return _res;
}
+static PyObject *Qd_SlopeFromAngle(_self, _args)
+ PyObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ Fixed _rv;
+ short angle;
+ if (!PyArg_ParseTuple(_args, "h",
+ &angle))
+ return NULL;
+ _rv = SlopeFromAngle(angle);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildFixed, _rv);
+ return _res;
+}
+
+static PyObject *Qd_AngleFromSlope(_self, _args)
+ PyObject *_self;
+ PyObject *_args;
+{
+ PyObject *_res = NULL;
+ short _rv;
+ Fixed slope;
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetFixed, &slope))
+ return NULL;
+ _rv = AngleFromSlope(slope);
+ _res = Py_BuildValue("h",
+ _rv);
+ return _res;
+}
+
static PyObject *Qd_TextFont(_self, _args)
PyObject *_self;
PyObject *_args;
@@ -3606,7 +3638,7 @@ static PyObject *Qd_TextFace(_self, _args)
PyObject *_args;
{
PyObject *_res = NULL;
- short face;
+ Style face;
if (!PyArg_ParseTuple(_args, "h",
&face))
return NULL;
@@ -3666,8 +3698,8 @@ static PyObject *Qd_DrawChar(_self, _args)
PyObject *_args;
{
PyObject *_res = NULL;
- short ch;
- if (!PyArg_ParseTuple(_args, "h",
+ CharParameter ch;
+ if (!PyArg_ParseTuple(_args, "c",
&ch))
return NULL;
DrawChar(ch);
@@ -3721,8 +3753,8 @@ static PyObject *Qd_CharWidth(_self, _args)
{
PyObject *_res = NULL;
short _rv;
- short ch;
- if (!PyArg_ParseTuple(_args, "h",
+ CharParameter ch;
+ if (!PyArg_ParseTuple(_args, "c",
&ch))
return NULL;
_rv = CharWidth(ch);
@@ -4215,10 +4247,14 @@ static PyMethodDef Qd_methods[] = {
"() -> (short scrnHRes, short scrnVRes)"},
{"GetIndPattern", (PyCFunction)Qd_GetIndPattern, 1,
"(short patternListID, short index) -> (Pattern thePat)"},
+ {"SlopeFromAngle", (PyCFunction)Qd_SlopeFromAngle, 1,
+ "(short angle) -> (Fixed _rv)"},
+ {"AngleFromSlope", (PyCFunction)Qd_AngleFromSlope, 1,
+ "(Fixed slope) -> (short _rv)"},
{"TextFont", (PyCFunction)Qd_TextFont, 1,
"(short font) -> None"},
{"TextFace", (PyCFunction)Qd_TextFace, 1,
- "(short face) -> None"},
+ "(Style face) -> None"},
{"TextMode", (PyCFunction)Qd_TextMode, 1,
"(short mode) -> None"},
{"TextSize", (PyCFunction)Qd_TextSize, 1,
@@ -4226,13 +4262,13 @@ static PyMethodDef Qd_methods[] = {
{"SpaceExtra", (PyCFunction)Qd_SpaceExtra, 1,
"(Fixed extra) -> None"},
{"DrawChar", (PyCFunction)Qd_DrawChar, 1,
- "(short ch) -> None"},
+ "(CharParameter ch) -> None"},
{"DrawString", (PyCFunction)Qd_DrawString, 1,
"(Str255 s) -> None"},
{"DrawText", (PyCFunction)Qd_DrawText, 1,
"(Buffer textBuf, short firstByte, short byteCount) -> None"},
{"CharWidth", (PyCFunction)Qd_CharWidth, 1,
- "(short ch) -> (short _rv)"},
+ "(CharParameter ch) -> (short _rv)"},
{"StringWidth", (PyCFunction)Qd_StringWidth, 1,
"(Str255 s) -> (short _rv)"},
{"TextWidth", (PyCFunction)Qd_TextWidth, 1,
diff --git a/Mac/Modules/qd/qdscan.py b/Mac/Modules/qd/qdscan.py
index cd5409e..46adaaa 100644
--- a/Mac/Modules/qd/qdscan.py
+++ b/Mac/Modules/qd/qdscan.py
@@ -72,6 +72,8 @@ class MyScanner(Scanner):
'InitCPort',
'CloseCPort',
'BitMapToRegionGlue',
+ 'StdOpcode', # XXXX Missing from library...
+
]
def makeblacklisttypes(self):