diff options
Diffstat (limited to 'Mac/Modules/te/tesupport.py')
-rw-r--r-- | Mac/Modules/te/tesupport.py | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/Mac/Modules/te/tesupport.py b/Mac/Modules/te/tesupport.py index eda089c..daadea0 100644 --- a/Mac/Modules/te/tesupport.py +++ b/Mac/Modules/te/tesupport.py @@ -86,6 +86,34 @@ class MyObjectDefinition(GlobalObjectDefinition): }""") def outputFreeIt(self, itselfname): Output("TEDispose(%s);", itselfname) + + def outputGetattrHook(self): + Output(""" + if( strcmp(name, "destRect") == 0 ) + return Py_BuildValue("O&", PyMac_BuildRect, + (*self->ob_itself)->destRect); + if( strcmp(name, "viewRect") == 0 ) + return Py_BuildValue("O&", PyMac_BuildRect, + (*self->ob_itself)->viewRect); + if( strcmp(name, "selRect") == 0 ) + return Py_BuildValue("O&", PyMac_BuildRect, + (*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); + 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, "teLength") == 0 ) + return Py_BuildValue("h", (*self->ob_itself)->teLength); + """) # From here on it's basically all boiler plate... |