diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 1996-01-15 14:39:56 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 1996-01-15 14:39:56 (GMT) |
commit | 61f3df4543751f98d02c86b03aa97b72bc80992f (patch) | |
tree | 482e6976d3f4f8fffa1391f1ca81f8b46f5b28b8 /Mac/Modules | |
parent | 79fb732d5e3a2d309a92ca7a2771422ef2d41a9b (diff) | |
download | cpython-61f3df4543751f98d02c86b03aa97b72bc80992f.zip cpython-61f3df4543751f98d02c86b03aa97b72bc80992f.tar.gz cpython-61f3df4543751f98d02c86b03aa97b72bc80992f.tar.bz2 |
Added rgbFgColor and a few other members of CGrafPort
Diffstat (limited to 'Mac/Modules')
-rw-r--r-- | Mac/Modules/qd/Qdmodule.c | 22 | ||||
-rw-r--r-- | Mac/Modules/qd/qdsupport.py | 22 |
2 files changed, 32 insertions, 12 deletions
diff --git a/Mac/Modules/qd/Qdmodule.c b/Mac/Modules/qd/Qdmodule.c index fd70eec..54176f3 100644 --- a/Mac/Modules/qd/Qdmodule.c +++ b/Mac/Modules/qd/Qdmodule.c @@ -163,10 +163,26 @@ static PyObject *GrafObj_getattr(self, name) return Py_BuildValue("h", itself_color->chExtra); if ( strcmp(name, "pnLocHFrac") == 0 ) return Py_BuildValue("h", itself_color->pnLocHFrac); + if ( strcmp(name, "bkPixPat") == 0 ) + return Py_BuildValue("O&", ResObj_New, (Handle)itself_color->bkPixPat); + if ( strcmp(name, "rgbFgColor") == 0 ) + return Py_BuildValue("O&", QdRGB_New, &itself_color->rgbFgColor); + if ( strcmp(name, "rgbBkColor") == 0 ) + return Py_BuildValue("O&", QdRGB_New, &itself_color->rgbBkColor); + if ( strcmp(name, "pnPixPat") == 0 ) + return Py_BuildValue("O&", ResObj_New, (Handle)itself_color->pnPixPat); + if ( strcmp(name, "fillPixPat") == 0 ) + return Py_BuildValue("O&", ResObj_New, (Handle)itself_color->fillPixPat); } else { /* Mono-only attributes */ if ( strcmp(name, "portBits") == 0 ) return BMObj_New(&self->ob_itself->portBits); + if ( strcmp(name, "bkPat") == 0 ) + return Py_BuildValue("s#", (char *)&self->ob_itself->bkPat, sizeof(Pattern)); + if ( strcmp(name, "fillPat") == 0 ) + return Py_BuildValue("s#", (char *)&self->ob_itself->fillPat, sizeof(Pattern)); + if ( strcmp(name, "pnPat") == 0 ) + return Py_BuildValue("s#", (char *)&self->ob_itself->pnPat, sizeof(Pattern)); } /* ** Accessible for both color/mono windows. @@ -183,18 +199,12 @@ static PyObject *GrafObj_getattr(self, name) return Py_BuildValue("O&", ResObj_New, (Handle)self->ob_itself->visRgn); if ( strcmp(name, "clipRgn") == 0 ) return Py_BuildValue("O&", ResObj_New, (Handle)self->ob_itself->clipRgn); - if ( strcmp(name, "bkPat") == 0 ) - return Py_BuildValue("s#", (char *)&self->ob_itself->bkPat, sizeof(Pattern)); - if ( strcmp(name, "fillPat") == 0 ) - return Py_BuildValue("s#", (char *)&self->ob_itself->fillPat, sizeof(Pattern)); if ( strcmp(name, "pnLoc") == 0 ) return Py_BuildValue("O&", PyMac_BuildPoint, self->ob_itself->pnLoc); if ( strcmp(name, "pnSize") == 0 ) return Py_BuildValue("O&", PyMac_BuildPoint, self->ob_itself->pnSize); if ( strcmp(name, "pnMode") == 0 ) return Py_BuildValue("h", self->ob_itself->pnMode); - if ( strcmp(name, "pnPat") == 0 ) - return Py_BuildValue("s#", (char *)&self->ob_itself->pnPat, sizeof(Pattern)); if ( strcmp(name, "pnVis") == 0 ) return Py_BuildValue("h", self->ob_itself->pnVis); if ( strcmp(name, "txFont") == 0 ) diff --git a/Mac/Modules/qd/qdsupport.py b/Mac/Modules/qd/qdsupport.py index e40e2f5..39d9895 100644 --- a/Mac/Modules/qd/qdsupport.py +++ b/Mac/Modules/qd/qdsupport.py @@ -165,10 +165,26 @@ class MyGRObjectDefinition(GlobalObjectDefinition): return Py_BuildValue("h", itself_color->chExtra); if ( strcmp(name, "pnLocHFrac") == 0 ) return Py_BuildValue("h", itself_color->pnLocHFrac); + if ( strcmp(name, "bkPixPat") == 0 ) + return Py_BuildValue("O&", ResObj_New, (Handle)itself_color->bkPixPat); + if ( strcmp(name, "rgbFgColor") == 0 ) + return Py_BuildValue("O&", QdRGB_New, &itself_color->rgbFgColor); + if ( strcmp(name, "rgbBkColor") == 0 ) + return Py_BuildValue("O&", QdRGB_New, &itself_color->rgbBkColor); + if ( strcmp(name, "pnPixPat") == 0 ) + return Py_BuildValue("O&", ResObj_New, (Handle)itself_color->pnPixPat); + if ( strcmp(name, "fillPixPat") == 0 ) + return Py_BuildValue("O&", ResObj_New, (Handle)itself_color->fillPixPat); } else { /* Mono-only attributes */ if ( strcmp(name, "portBits") == 0 ) return BMObj_New(&self->ob_itself->portBits); + if ( strcmp(name, "bkPat") == 0 ) + return Py_BuildValue("s#", (char *)&self->ob_itself->bkPat, sizeof(Pattern)); + if ( strcmp(name, "fillPat") == 0 ) + return Py_BuildValue("s#", (char *)&self->ob_itself->fillPat, sizeof(Pattern)); + if ( strcmp(name, "pnPat") == 0 ) + return Py_BuildValue("s#", (char *)&self->ob_itself->pnPat, sizeof(Pattern)); } /* ** Accessible for both color/mono windows. @@ -185,18 +201,12 @@ class MyGRObjectDefinition(GlobalObjectDefinition): return Py_BuildValue("O&", ResObj_New, (Handle)self->ob_itself->visRgn); if ( strcmp(name, "clipRgn") == 0 ) return Py_BuildValue("O&", ResObj_New, (Handle)self->ob_itself->clipRgn); - if ( strcmp(name, "bkPat") == 0 ) - return Py_BuildValue("s#", (char *)&self->ob_itself->bkPat, sizeof(Pattern)); - if ( strcmp(name, "fillPat") == 0 ) - return Py_BuildValue("s#", (char *)&self->ob_itself->fillPat, sizeof(Pattern)); if ( strcmp(name, "pnLoc") == 0 ) return Py_BuildValue("O&", PyMac_BuildPoint, self->ob_itself->pnLoc); if ( strcmp(name, "pnSize") == 0 ) return Py_BuildValue("O&", PyMac_BuildPoint, self->ob_itself->pnSize); if ( strcmp(name, "pnMode") == 0 ) return Py_BuildValue("h", self->ob_itself->pnMode); - if ( strcmp(name, "pnPat") == 0 ) - return Py_BuildValue("s#", (char *)&self->ob_itself->pnPat, sizeof(Pattern)); if ( strcmp(name, "pnVis") == 0 ) return Py_BuildValue("h", self->ob_itself->pnVis); if ( strcmp(name, "txFont") == 0 ) |