[Python-checkins] CVS: python/dist/src/Mac/Modules/mlte _Mltemodule.c,1.6,1.6.2.1 mltescan.py,1.5,1.5.12.1 mltesupport.py,1.6,1.6.10.1
Jack Jansen
jackjansen@users.sourceforge.net
Wed, 19 Dec 2001 07:10:18 -0800
- Previous message: [Python-checkins] CVS: python/dist/src/Mac/Modules/menu _Menumodule.c,1.5,1.5.2.1 menuscan.py,1.10,1.10.16.1 menusupport.py,1.13,1.13.2.1
- Next message: [Python-checkins] CVS: python/dist/src/Mac/Modules/qd _Qdmodule.c,1.6,1.6.2.1 qdscan.py,1.24,1.24.16.1 qdsupport.py,1.36,1.36.10.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/python/python/dist/src/Mac/Modules/mlte
In directory usw-pr-cvs1:/tmp/cvs-serv12554/Modules/mlte
Modified Files:
Tag: r22rc1-branch
_Mltemodule.c mltescan.py mltesupport.py
Log Message:
Merged Mac subtree into the 22c1 branch.
Index: _Mltemodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/mlte/_Mltemodule.c,v
retrieving revision 1.6
retrieving revision 1.6.2.1
diff -C2 -d -r1.6 -r1.6.2.1
*** _Mltemodule.c 2001/12/08 18:02:53 1.6
--- _Mltemodule.c 2001/12/19 15:10:16 1.6.2.1
***************
*** 6,11 ****
--- 6,15 ----
+ #ifdef _WIN32
+ #include "pywintoolbox.h"
+ #else
#include "macglue.h"
#include "pymactoolbox.h"
+ #endif
/* Macro to test whether a weak-loaded CFM function exists */
***************
*** 242,246 ****
}
! #if !TARGET_API_MAC_OSX
static PyObject *TXNObj_TXNTSMCheck(TXNObjectObject *_self, PyObject *_args)
--- 246,250 ----
}
! #if TARGET_API_MAC_OS8
static PyObject *TXNObj_TXNTSMCheck(TXNObjectObject *_self, PyObject *_args)
***************
*** 248,262 ****
PyObject *_res = NULL;
Boolean _rv;
! EventRecord iEvent;
#ifndef TXNTSMCheck
PyMac_PRECHECK(TXNTSMCheck);
#endif
! if (!PyArg_ParseTuple(_args, "O&",
! PyMac_GetEventRecord, &iEvent))
return NULL;
_rv = TXNTSMCheck(_self->ob_itself,
! &iEvent);
! _res = Py_BuildValue("b",
! _rv);
return _res;
}
--- 252,266 ----
PyObject *_res = NULL;
Boolean _rv;
! EventRecord ioEvent;
#ifndef TXNTSMCheck
PyMac_PRECHECK(TXNTSMCheck);
#endif
! if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = TXNTSMCheck(_self->ob_itself,
! &ioEvent);
! _res = Py_BuildValue("bO&",
! _rv,
! PyMac_BuildEventRecord, &ioEvent);
return _res;
}
***************
*** 607,612 ****
PyObject *_res = NULL;
OSStatus _err;
! UInt32 iStartOffset;
! UInt32 iEndOffset;
ItemCount oRunCount;
#ifndef TXNCountRunsInRange
--- 611,616 ----
PyObject *_res = NULL;
OSStatus _err;
! TXNOffset iStartOffset;
! TXNOffset iEndOffset;
ItemCount oRunCount;
#ifndef TXNCountRunsInRange
***************
*** 774,778 ****
PyObject *_res = NULL;
OSStatus _err;
! OSType iType;
OSType iResType;
TXNPermanentTextEncodingType iPermanentEncoding;
--- 778,782 ----
PyObject *_res = NULL;
OSStatus _err;
! TXNFileType iType;
OSType iResType;
TXNPermanentTextEncodingType iPermanentEncoding;
***************
*** 868,871 ****
--- 872,892 ----
}
+ static PyObject *TXNObj_TXNSetViewRect(TXNObjectObject *_self, PyObject *_args)
+ {
+ PyObject *_res = NULL;
+ Rect iViewRect;
+ #ifndef TXNSetViewRect
+ PyMac_PRECHECK(TXNSetViewRect);
+ #endif
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetRect, &iViewRect))
+ return NULL;
+ TXNSetViewRect(_self->ob_itself,
+ &iViewRect);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+ }
+
static PyObject *TXNObj_TXNAttachObjectToWindow(TXNObjectObject *_self, PyObject *_args)
{
***************
*** 1030,1033 ****
--- 1051,1159 ----
}
+ static PyObject *TXNObj_TXNPointToOffset(TXNObjectObject *_self, PyObject *_args)
+ {
+ PyObject *_res = NULL;
+ OSStatus _err;
+ Point iPoint;
+ TXNOffset oOffset;
+ #ifndef TXNPointToOffset
+ PyMac_PRECHECK(TXNPointToOffset);
+ #endif
+ if (!PyArg_ParseTuple(_args, "O&",
+ PyMac_GetPoint, &iPoint))
+ return NULL;
+ _err = TXNPointToOffset(_self->ob_itself,
+ iPoint,
+ &oOffset);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ oOffset);
+ return _res;
+ }
+
+ static PyObject *TXNObj_TXNOffsetToPoint(TXNObjectObject *_self, PyObject *_args)
+ {
+ PyObject *_res = NULL;
+ OSStatus _err;
+ TXNOffset iOffset;
+ Point oPoint;
+ #ifndef TXNOffsetToPoint
+ PyMac_PRECHECK(TXNOffsetToPoint);
+ #endif
+ if (!PyArg_ParseTuple(_args, "l",
+ &iOffset))
+ return NULL;
+ _err = TXNOffsetToPoint(_self->ob_itself,
+ iOffset,
+ &oPoint);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&",
+ PyMac_BuildPoint, oPoint);
+ return _res;
+ }
+
+ static PyObject *TXNObj_TXNGetLineCount(TXNObjectObject *_self, PyObject *_args)
+ {
+ PyObject *_res = NULL;
+ OSStatus _err;
+ ItemCount oLineTotal;
+ #ifndef TXNGetLineCount
+ PyMac_PRECHECK(TXNGetLineCount);
+ #endif
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ _err = TXNGetLineCount(_self->ob_itself,
+ &oLineTotal);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("l",
+ oLineTotal);
+ return _res;
+ }
+
+ static PyObject *TXNObj_TXNGetLineMetrics(TXNObjectObject *_self, PyObject *_args)
+ {
+ PyObject *_res = NULL;
+ OSStatus _err;
+ UInt32 iLineNumber;
+ Fixed oLineWidth;
+ Fixed oLineHeight;
+ #ifndef TXNGetLineMetrics
+ PyMac_PRECHECK(TXNGetLineMetrics);
+ #endif
+ if (!PyArg_ParseTuple(_args, "l",
+ &iLineNumber))
+ return NULL;
+ _err = TXNGetLineMetrics(_self->ob_itself,
+ iLineNumber,
+ &oLineWidth,
+ &oLineHeight);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("O&O&",
+ PyMac_BuildFixed, oLineWidth,
+ PyMac_BuildFixed, oLineHeight);
+ return _res;
+ }
+
+ static PyObject *TXNObj_TXNIsObjectAttachedToSpecificWindow(TXNObjectObject *_self, PyObject *_args)
+ {
+ PyObject *_res = NULL;
+ OSStatus _err;
+ WindowPtr iWindow;
+ Boolean oAttached;
+ #ifndef TXNIsObjectAttachedToSpecificWindow
+ PyMac_PRECHECK(TXNIsObjectAttachedToSpecificWindow);
+ #endif
+ if (!PyArg_ParseTuple(_args, "O&",
+ WinObj_Convert, &iWindow))
+ return NULL;
+ _err = TXNIsObjectAttachedToSpecificWindow(_self->ob_itself,
+ iWindow,
+ &oAttached);
+ if (_err != noErr) return PyMac_Error(_err);
+ _res = Py_BuildValue("b",
+ oAttached);
+ return _res;
+ }
+
static PyMethodDef TXNObj_methods[] = {
{"TXNDeleteObject", (PyCFunction)TXNObj_TXNDeleteObject, 1,
***************
*** 1044,1050 ****
"(EventRecord iEvent) -> None"},
! #if !TARGET_API_MAC_OSX
{"TXNTSMCheck", (PyCFunction)TXNObj_TXNTSMCheck, 1,
! "(EventRecord iEvent) -> (Boolean _rv)"},
#endif
{"TXNSelectAll", (PyCFunction)TXNObj_TXNSelectAll, 1,
--- 1170,1176 ----
"(EventRecord iEvent) -> None"},
! #if TARGET_API_MAC_OS8
{"TXNTSMCheck", (PyCFunction)TXNObj_TXNTSMCheck, 1,
! "() -> (Boolean _rv, EventRecord ioEvent)"},
#endif
{"TXNSelectAll", (PyCFunction)TXNObj_TXNSelectAll, 1,
***************
*** 1091,1095 ****
"(TXNOffset iStartOffset, TXNOffset iEndOffset) -> None"},
{"TXNCountRunsInRange", (PyCFunction)TXNObj_TXNCountRunsInRange, 1,
! "(UInt32 iStartOffset, UInt32 iEndOffset) -> (ItemCount oRunCount)"},
{"TXNDataSize", (PyCFunction)TXNObj_TXNDataSize, 1,
"() -> (ByteCount _rv)"},
--- 1217,1221 ----
"(TXNOffset iStartOffset, TXNOffset iEndOffset) -> None"},
{"TXNCountRunsInRange", (PyCFunction)TXNObj_TXNCountRunsInRange, 1,
! "(TXNOffset iStartOffset, TXNOffset iEndOffset) -> (ItemCount oRunCount)"},
{"TXNDataSize", (PyCFunction)TXNObj_TXNDataSize, 1,
"() -> (ByteCount _rv)"},
***************
*** 1105,1109 ****
"() -> (ItemCount _rv)"},
{"TXNSave", (PyCFunction)TXNObj_TXNSave, 1,
! "(OSType iType, OSType iResType, TXNPermanentTextEncodingType iPermanentEncoding, FSSpec iFileSpecification, SInt16 iDataReference, SInt16 iResourceReference) -> None"},
{"TXNRevert", (PyCFunction)TXNObj_TXNRevert, 1,
"() -> None"},
--- 1231,1235 ----
"() -> (ItemCount _rv)"},
{"TXNSave", (PyCFunction)TXNObj_TXNSave, 1,
! "(TXNFileType iType, OSType iResType, TXNPermanentTextEncodingType iPermanentEncoding, FSSpec iFileSpecification, SInt16 iDataReference, SInt16 iResourceReference) -> None"},
{"TXNRevert", (PyCFunction)TXNObj_TXNRevert, 1,
"() -> None"},
***************
*** 1114,1117 ****
--- 1240,1245 ----
{"TXNGetViewRect", (PyCFunction)TXNObj_TXNGetViewRect, 1,
"() -> (Rect oViewRect)"},
+ {"TXNSetViewRect", (PyCFunction)TXNObj_TXNSetViewRect, 1,
+ "(Rect iViewRect) -> None"},
{"TXNAttachObjectToWindow", (PyCFunction)TXNObj_TXNAttachObjectToWindow, 1,
"(GWorldPtr iWindow, Boolean iIsActualWindow) -> None"},
***************
*** 1128,1131 ****
--- 1256,1269 ----
{"TXNPrepareFontMenu", (PyCFunction)TXNObj_TXNPrepareFontMenu, 1,
"(TXNFontMenuObject iTXNFontMenuObject) -> None"},
+ {"TXNPointToOffset", (PyCFunction)TXNObj_TXNPointToOffset, 1,
+ "(Point iPoint) -> (TXNOffset oOffset)"},
+ {"TXNOffsetToPoint", (PyCFunction)TXNObj_TXNOffsetToPoint, 1,
+ "(TXNOffset iOffset) -> (Point oPoint)"},
+ {"TXNGetLineCount", (PyCFunction)TXNObj_TXNGetLineCount, 1,
+ "() -> (ItemCount oLineTotal)"},
+ {"TXNGetLineMetrics", (PyCFunction)TXNObj_TXNGetLineMetrics, 1,
+ "(UInt32 iLineNumber) -> (Fixed oLineWidth, Fixed oLineHeight)"},
+ {"TXNIsObjectAttachedToSpecificWindow", (PyCFunction)TXNObj_TXNIsObjectAttachedToSpecificWindow, 1,
+ "(WindowPtr iWindow) -> (Boolean oAttached)"},
{NULL, NULL, 0}
};
Index: mltescan.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/mlte/mltescan.py,v
retrieving revision 1.5
retrieving revision 1.5.12.1
diff -C2 -d -r1.5 -r1.5.12.1
*** mltescan.py 2001/08/03 15:34:29 1.5
--- mltescan.py 2001/12/19 15:10:16 1.5.12.1
***************
*** 78,82 ****
def makegreylist(self):
return [
! ('#if !TARGET_API_MAC_OSX', [
'TXNTSMCheck',
])]
--- 78,82 ----
def makegreylist(self):
return [
! ('#if TARGET_API_MAC_OS8', [
'TXNTSMCheck',
])]
***************
*** 95,99 ****
--- 95,106 ----
"TXNBackground", #TBD
"UniChar", #TBD
+ "UniCharCount", #TBD
+ "UniChar_ptr", #TBD
"TXNFindUPP",
+ "ATSUStyle", #TBD
+ "TXNActionKeyMapperProcPtr",
+ "TXNActionKeyMapperUPP",
+ "TXNTextBoxOptionsData",
+ "TXNCountOptions",
]
Index: mltesupport.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/mlte/mltesupport.py,v
retrieving revision 1.6
retrieving revision 1.6.10.1
diff -C2 -d -r1.6 -r1.6.10.1
*** mltesupport.py 2001/09/01 23:38:13 1.6
--- mltesupport.py 2001/12/19 15:10:16 1.6.10.1
***************
*** 126,129 ****
--- 126,130 ----
OptGWorldPtr = OpaqueByValueType("GWorldPtr", "OptGWorldObj")
MlteInBuffer = VarInputBufferType('void *', 'ByteCount', 'l')
+ CFStringRef = OpaqueByValueType("CFStringRef", "CFStringRefObj")
OptFSSpecPtr = OpaqueByValueType("FSSpec *", "OptFSSpecPtr")
- Previous message: [Python-checkins] CVS: python/dist/src/Mac/Modules/menu _Menumodule.c,1.5,1.5.2.1 menuscan.py,1.10,1.10.16.1 menusupport.py,1.13,1.13.2.1
- Next message: [Python-checkins] CVS: python/dist/src/Mac/Modules/qd _Qdmodule.c,1.6,1.6.2.1 qdscan.py,1.24,1.24.16.1 qdsupport.py,1.36,1.36.10.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]