diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 1996-04-16 14:32:01 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 1996-04-16 14:32:01 (GMT) |
commit | 19171a21fdff4f63ca35b3cafc96a86280d0539b (patch) | |
tree | ed68397e94c973b3f59b8b86893c351a5a1d9389 /Mac/Modules/te | |
parent | 90ecdf49dfa332b769741db14057db7320379f25 (diff) | |
download | cpython-19171a21fdff4f63ca35b3cafc96a86280d0539b.zip cpython-19171a21fdff4f63ca35b3cafc96a86280d0539b.tar.gz cpython-19171a21fdff4f63ca35b3cafc96a86280d0539b.tar.bz2 |
Added support for accessing a few more TERec members
Diffstat (limited to 'Mac/Modules/te')
-rw-r--r-- | Mac/Modules/te/TEmodule.c | 20 | ||||
-rw-r--r-- | Mac/Modules/te/tesupport.py | 20 |
2 files changed, 32 insertions, 8 deletions
diff --git a/Mac/Modules/te/TEmodule.c b/Mac/Modules/te/TEmodule.c index 9d14b09..4d025cf 100644 --- a/Mac/Modules/te/TEmodule.c +++ b/Mac/Modules/te/TEmodule.c @@ -808,28 +808,40 @@ static PyObject *TEObj_getattr(self, name) if( strcmp(name, "destRect") == 0 ) return Py_BuildValue("O&", PyMac_BuildRect, - (*self->ob_itself)->destRect); + &(*self->ob_itself)->destRect); if( strcmp(name, "viewRect") == 0 ) return Py_BuildValue("O&", PyMac_BuildRect, - (*self->ob_itself)->viewRect); + &(*self->ob_itself)->viewRect); if( strcmp(name, "selRect") == 0 ) return Py_BuildValue("O&", PyMac_BuildRect, - (*self->ob_itself)->selRect); + &(*self->ob_itself)->selRect); if( strcmp(name, "lineHeight") == 0 ) return Py_BuildValue("h", (*self->ob_itself)->lineHeight); if( strcmp(name, "fontAscent") == 0 ) return Py_BuildValue("h", (*self->ob_itself)->fontAscent); if( strcmp(name, "selPoint") == 0 ) return Py_BuildValue("O&", PyMac_BuildPoint, - (*self->ob_itself)->selPoint); + &(*self->ob_itself)->selPoint); if( strcmp(name, "selStart") == 0 ) return Py_BuildValue("h", (*self->ob_itself)->selStart); if( strcmp(name, "selEnd") == 0 ) return Py_BuildValue("h", (*self->ob_itself)->selEnd); if( strcmp(name, "active") == 0 ) return Py_BuildValue("h", (*self->ob_itself)->active); + if( strcmp(name, "just") == 0 ) + return Py_BuildValue("h", (*self->ob_itself)->just); if( strcmp(name, "teLength") == 0 ) return Py_BuildValue("h", (*self->ob_itself)->teLength); + if( strcmp(name, "txFont") == 0 ) + return Py_BuildValue("h", (*self->ob_itself)->txFont); + if( strcmp(name, "txFace") == 0 ) + return Py_BuildValue("h", (*self->ob_itself)->txFace); + if( strcmp(name, "txMode") == 0 ) + return Py_BuildValue("h", (*self->ob_itself)->txMode); + if( strcmp(name, "txSize") == 0 ) + return Py_BuildValue("h", (*self->ob_itself)->txSize); + if( strcmp(name, "nLines") == 0 ) + return Py_BuildValue("h", (*self->ob_itself)->nLines); return Py_FindMethodInChain(&TEObj_chain, (PyObject *)self, name); } diff --git a/Mac/Modules/te/tesupport.py b/Mac/Modules/te/tesupport.py index daadea0..7802ae9 100644 --- a/Mac/Modules/te/tesupport.py +++ b/Mac/Modules/te/tesupport.py @@ -91,28 +91,40 @@ class MyObjectDefinition(GlobalObjectDefinition): Output(""" if( strcmp(name, "destRect") == 0 ) return Py_BuildValue("O&", PyMac_BuildRect, - (*self->ob_itself)->destRect); + &(*self->ob_itself)->destRect); if( strcmp(name, "viewRect") == 0 ) return Py_BuildValue("O&", PyMac_BuildRect, - (*self->ob_itself)->viewRect); + &(*self->ob_itself)->viewRect); if( strcmp(name, "selRect") == 0 ) return Py_BuildValue("O&", PyMac_BuildRect, - (*self->ob_itself)->selRect); + &(*self->ob_itself)->selRect); if( strcmp(name, "lineHeight") == 0 ) return Py_BuildValue("h", (*self->ob_itself)->lineHeight); if( strcmp(name, "fontAscent") == 0 ) return Py_BuildValue("h", (*self->ob_itself)->fontAscent); if( strcmp(name, "selPoint") == 0 ) return Py_BuildValue("O&", PyMac_BuildPoint, - (*self->ob_itself)->selPoint); + &(*self->ob_itself)->selPoint); if( strcmp(name, "selStart") == 0 ) return Py_BuildValue("h", (*self->ob_itself)->selStart); if( strcmp(name, "selEnd") == 0 ) return Py_BuildValue("h", (*self->ob_itself)->selEnd); if( strcmp(name, "active") == 0 ) return Py_BuildValue("h", (*self->ob_itself)->active); + if( strcmp(name, "just") == 0 ) + return Py_BuildValue("h", (*self->ob_itself)->just); if( strcmp(name, "teLength") == 0 ) return Py_BuildValue("h", (*self->ob_itself)->teLength); + if( strcmp(name, "txFont") == 0 ) + return Py_BuildValue("h", (*self->ob_itself)->txFont); + if( strcmp(name, "txFace") == 0 ) + return Py_BuildValue("h", (*self->ob_itself)->txFace); + if( strcmp(name, "txMode") == 0 ) + return Py_BuildValue("h", (*self->ob_itself)->txMode); + if( strcmp(name, "txSize") == 0 ) + return Py_BuildValue("h", (*self->ob_itself)->txSize); + if( strcmp(name, "nLines") == 0 ) + return Py_BuildValue("h", (*self->ob_itself)->nLines); """) # From here on it's basically all boiler plate... |