[Python-checkins] CVS: python/dist/src/Mac/Modules/fm _Fmmodule.c,1.4,1.4.4.1 fmscan.py,1.9,1.9.20.1 fmsupport.py,1.4,1.4.14.1
Jack Jansen
jackjansen@users.sourceforge.net
Wed, 27 Feb 2002 15:13:08 -0800
- Previous message: [Python-checkins] CVS: python/dist/src/Mac/Modules/drag _Dragmodule.c,1.6,1.6.4.1 dragsupport.py,1.8,1.8.14.1
- Next message: [Python-checkins] CVS: python/dist/src/Mac/Modules/menu _Menumodule.c,1.7,1.7.4.1 menuedit.py,1.8,1.8.20.1 menuscan.py,1.11,1.11.4.1 menusupport.py,1.14,1.14.4.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/python/python/dist/src/Mac/Modules/fm
In directory usw-pr-cvs1:/tmp/cvs-serv1728/fm
Modified Files:
Tag: release22-maint
_Fmmodule.c fmscan.py fmsupport.py
Log Message:
Backport of 1.5:
Today's Carbon Toolbox addition: QDTextBounds()
Index: _Fmmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/fm/_Fmmodule.c,v
retrieving revision 1.4
retrieving revision 1.4.4.1
diff -C2 -d -r1.4 -r1.4.4.1
*** _Fmmodule.c 18 Dec 2001 15:37:47 -0000 1.4
--- _Fmmodule.c 27 Feb 2002 23:13:04 -0000 1.4.4.1
***************
*** 294,297 ****
--- 294,315 ----
}
+ static PyObject *Fm_QDTextBounds(PyObject *_self, PyObject *_args)
+ {
+ PyObject *_res = NULL;
+ char *inText__in__;
+ int inText__len__;
+ int inText__in_len__;
+ Rect bounds;
+ if (!PyArg_ParseTuple(_args, "s#",
+ &inText__in__, &inText__in_len__))
+ return NULL;
+ inText__len__ = inText__in_len__;
+ QDTextBounds(inText__len__, inText__in__,
+ &bounds);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildRect, &bounds);
+ return _res;
+ }
+
static PyMethodDef Fm_methods[] = {
***************
*** 338,341 ****
--- 356,361 ----
{"GetAppFont", (PyCFunction)Fm_GetAppFont, 1,
"() -> (short _rv)"},
+ {"QDTextBounds", (PyCFunction)Fm_QDTextBounds, 1,
+ "(Buffer inText) -> (Rect bounds)"},
{NULL, NULL, 0}
};
Index: fmscan.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/fm/fmscan.py,v
retrieving revision 1.9
retrieving revision 1.9.20.1
diff -C2 -d -r1.9 -r1.9.20.1
*** fmscan.py 20 Jun 2001 21:29:19 -0000 1.9
--- fmscan.py 27 Feb 2002 23:13:06 -0000 1.9.20.1
***************
*** 55,59 ****
"FMInput_ptr", # Not needed for now
"FMOutPtr", # Ditto
! "void_ptr", # Don't know how to do this right now
"FontInfo", # Ditto
]
--- 55,59 ----
"FMInput_ptr", # Not needed for now
"FMOutPtr", # Ditto
! ## "void_ptr", # Don't know how to do this right now
"FontInfo", # Ditto
]
***************
*** 63,66 ****
--- 63,68 ----
([('Str255', '*', 'InMode')], [('Str255', '*', 'OutMode')]),
([('FMetricRecPtr', 'theMetrics', 'InMode')], [('FMetricRecPtr', 'theMetrics', 'OutMode')]),
+ ([('short', 'byteCount', 'InMode'), ('void_ptr', 'textAddr', 'InMode'),],
+ [('TextBuffer', 'inText', 'InMode')]),
]
Index: fmsupport.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/fm/fmsupport.py,v
retrieving revision 1.4
retrieving revision 1.4.14.1
diff -C2 -d -r1.4 -r1.4.14.1
*** fmsupport.py 23 Aug 2001 13:48:38 -0000 1.4
--- fmsupport.py 27 Feb 2002 23:13:06 -0000 1.4.14.1
***************
*** 19,22 ****
--- 19,29 ----
# Create the type objects
+ class RevVarInputBufferType(VarInputBufferType):
+ def passInput(self, name):
+ return "%s__len__, %s__in__" % (name, name)
+
+ TextBuffer = RevVarInputBufferType()
+
+
includestuff = includestuff + """
#ifdef WITHOUT_FRAMEWORKS
- Previous message: [Python-checkins] CVS: python/dist/src/Mac/Modules/drag _Dragmodule.c,1.6,1.6.4.1 dragsupport.py,1.8,1.8.14.1
- Next message: [Python-checkins] CVS: python/dist/src/Mac/Modules/menu _Menumodule.c,1.7,1.7.4.1 menuedit.py,1.8,1.8.20.1 menuscan.py,1.11,1.11.4.1 menusupport.py,1.14,1.14.4.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]