[Python-checkins] python/dist/src/Mac/Modules/fm _Fmmodule.c,1.7,1.8 fmscan.py,1.12,1.13
jackjansen@users.sourceforge.net
jackjansen@users.sourceforge.net
2002年12月12日 02:32:23 -0800
Update of /cvsroot/python/python/dist/src/Mac/Modules/fm
In directory sc8-pr-cvs1:/tmp/cvs-serv21368/Modules/fm
Modified Files:
_Fmmodule.c fmscan.py
Log Message:
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).
Index: _Fmmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/fm/_Fmmodule.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** _Fmmodule.c 16 Aug 2002 09:09:26 -0000 1.7
--- _Fmmodule.c 12 Dec 2002 10:31:50 -0000 1.8
***************
*** 60,80 ****
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)
{
--- 60,63 ----
***************
*** 133,155 ****
}
- #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)
{
--- 116,119 ----
***************
*** 296,318 ****
}
- #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)
{
--- 260,263 ----
***************
*** 367,375 ****
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)")},
--- 312,315 ----
***************
*** 378,386 ****
{"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")},
--- 318,321 ----
***************
*** 401,409 ****
{"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)")},
--- 336,339 ----
Index: fmscan.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/fm/fmscan.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** fmscan.py 15 Aug 2002 21:48:14 -0000 1.12
--- fmscan.py 12 Dec 2002 10:31:51 -0000 1.13
***************
*** 43,46 ****
--- 43,50 ----
'SetAntiAliasedTextEnabled',
'IsAntiAliasedTextEnabled',
+ # OS8-only
+ 'InitFonts',
+ 'SetFontLock',
+ 'FlushFonts',
]
***************
*** 48,54 ****
return [
('#if !TARGET_API_MAC_CARBON', [
- 'InitFonts',
- 'SetFontLock',
- 'FlushFonts',
])]
def makeblacklisttypes(self):
--- 52,55 ----