diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 2002-12-12 10:31:54 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 2002-12-12 10:31:54 (GMT) |
commit | 6c7e326eaaa2d814e0d299054f78e5bd187489ab (patch) | |
tree | 5343213d9e164e76a47517111dd41b46f7fd4877 /Mac/Modules/fm | |
parent | 6bf45c67523a8e81963ce645979ac85f4f75ef33 (diff) | |
download | cpython-6c7e326eaaa2d814e0d299054f78e5bd187489ab.zip cpython-6c7e326eaaa2d814e0d299054f78e5bd187489ab.tar.gz cpython-6c7e326eaaa2d814e0d299054f78e5bd187489ab.tar.bz2 |
Getting rid of pre-Carbon (MacOS8) support. All code depending on
TARGET_API_MAC_OS8 (or !TARGET_API_MAC_CARBON) is gone. Also some
TARGET_API_MAC_OSX conditional code is gone, because it is no longer
used on OSX-only Python (only in MacPython-OS9).
Diffstat (limited to 'Mac/Modules/fm')
-rw-r--r-- | Mac/Modules/fm/_Fmmodule.c | 70 | ||||
-rw-r--r-- | Mac/Modules/fm/fmscan.py | 7 |
2 files changed, 4 insertions, 73 deletions
diff --git a/Mac/Modules/fm/_Fmmodule.c b/Mac/Modules/fm/_Fmmodule.c index 245dcb0..095fe3a 100644 --- a/Mac/Modules/fm/_Fmmodule.c +++ b/Mac/Modules/fm/_Fmmodule.c @@ -59,23 +59,6 @@ FMRec_Convert(PyObject *v, FMetricRec *p_itself) static PyObject *Fm_Error; -#if !TARGET_API_MAC_CARBON - -static PyObject *Fm_InitFonts(PyObject *_self, PyObject *_args) -{ - PyObject *_res = NULL; -#ifndef InitFonts - PyMac_PRECHECK(InitFonts); -#endif - if (!PyArg_ParseTuple(_args, "")) - return NULL; - InitFonts(); - Py_INCREF(Py_None); - _res = Py_None; - return _res; -} -#endif - static PyObject *Fm_GetFontName(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; @@ -132,25 +115,6 @@ static PyObject *Fm_RealFont(PyObject *_self, PyObject *_args) return _res; } -#if !TARGET_API_MAC_CARBON - -static PyObject *Fm_SetFontLock(PyObject *_self, PyObject *_args) -{ - PyObject *_res = NULL; - Boolean lockFlag; -#ifndef SetFontLock - PyMac_PRECHECK(SetFontLock); -#endif - if (!PyArg_ParseTuple(_args, "b", - &lockFlag)) - return NULL; - SetFontLock(lockFlag); - Py_INCREF(Py_None); - _res = Py_None; - return _res; -} -#endif - static PyObject *Fm_SetFScaleDisable(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; @@ -295,25 +259,6 @@ static PyObject *Fm_GetPreserveGlyph(PyObject *_self, PyObject *_args) return _res; } -#if !TARGET_API_MAC_CARBON - -static PyObject *Fm_FlushFonts(PyObject *_self, PyObject *_args) -{ - PyObject *_res = NULL; - OSErr _err; -#ifndef FlushFonts - PyMac_PRECHECK(FlushFonts); -#endif - if (!PyArg_ParseTuple(_args, "")) - return NULL; - _err = FlushFonts(); - if (_err != noErr) return PyMac_Error(_err); - Py_INCREF(Py_None); - _res = Py_None; - return _res; -} -#endif - static PyObject *Fm_GetSysFont(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; @@ -366,22 +311,12 @@ static PyObject *Fm_QDTextBounds(PyObject *_self, PyObject *_args) } static PyMethodDef Fm_methods[] = { - -#if !TARGET_API_MAC_CARBON - {"InitFonts", (PyCFunction)Fm_InitFonts, 1, - PyDoc_STR("() -> None")}, -#endif {"GetFontName", (PyCFunction)Fm_GetFontName, 1, PyDoc_STR("(short familyID) -> (Str255 name)")}, {"GetFNum", (PyCFunction)Fm_GetFNum, 1, PyDoc_STR("(Str255 name) -> (short familyID)")}, {"RealFont", (PyCFunction)Fm_RealFont, 1, PyDoc_STR("(short fontNum, short size) -> (Boolean _rv)")}, - -#if !TARGET_API_MAC_CARBON - {"SetFontLock", (PyCFunction)Fm_SetFontLock, 1, - PyDoc_STR("(Boolean lockFlag) -> None")}, -#endif {"SetFScaleDisable", (PyCFunction)Fm_SetFScaleDisable, 1, PyDoc_STR("(Boolean fscaleDisable) -> None")}, {"FontMetrics", (PyCFunction)Fm_FontMetrics, 1, @@ -400,11 +335,6 @@ static PyMethodDef Fm_methods[] = { PyDoc_STR("(Boolean preserveGlyph) -> None")}, {"GetPreserveGlyph", (PyCFunction)Fm_GetPreserveGlyph, 1, PyDoc_STR("() -> (Boolean _rv)")}, - -#if !TARGET_API_MAC_CARBON - {"FlushFonts", (PyCFunction)Fm_FlushFonts, 1, - PyDoc_STR("() -> None")}, -#endif {"GetSysFont", (PyCFunction)Fm_GetSysFont, 1, PyDoc_STR("() -> (short _rv)")}, {"GetAppFont", (PyCFunction)Fm_GetAppFont, 1, diff --git a/Mac/Modules/fm/fmscan.py b/Mac/Modules/fm/fmscan.py index 2364980..12fb52e 100644 --- a/Mac/Modules/fm/fmscan.py +++ b/Mac/Modules/fm/fmscan.py @@ -42,14 +42,15 @@ class MyScanner(Scanner): # Disabling them is the easiest path. 'SetAntiAliasedTextEnabled', 'IsAntiAliasedTextEnabled', + # OS8-only + 'InitFonts', + 'SetFontLock', + 'FlushFonts', ] def makegreylist(self): return [ ('#if !TARGET_API_MAC_CARBON', [ - 'InitFonts', - 'SetFontLock', - 'FlushFonts', ])] def makeblacklisttypes(self): return [ |