diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 2003-12-03 23:20:13 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 2003-12-03 23:20:13 (GMT) |
commit | da6081fccb71541004e3f36f57a9c0971a969e3b (patch) | |
tree | 1e2beac551e87964061e6fd9bfca22b35f1c7f2a /Mac/Modules/mlte | |
parent | fe3fe4adb5c7a72bfec3c5b7b8ec5e42d8ccc625 (diff) | |
download | cpython-da6081fccb71541004e3f36f57a9c0971a969e3b.zip cpython-da6081fccb71541004e3f36f57a9c0971a969e3b.tar.gz cpython-da6081fccb71541004e3f36f57a9c0971a969e3b.tar.bz2 |
Ported to Universal Headers 3.4.2. Qd and Qt remain to be done.
Completely untested.
Diffstat (limited to 'Mac/Modules/mlte')
-rw-r--r-- | Mac/Modules/mlte/_Mltemodule.c | 61 | ||||
-rw-r--r-- | Mac/Modules/mlte/mltescan.py | 9 |
2 files changed, 31 insertions, 39 deletions
diff --git a/Mac/Modules/mlte/_Mltemodule.c b/Mac/Modules/mlte/_Mltemodule.c index 2c972e9f..0b37fe1 100644 --- a/Mac/Modules/mlte/_Mltemodule.c +++ b/Mac/Modules/mlte/_Mltemodule.c @@ -361,7 +361,7 @@ static PyObject *TXNObj_TXNGrowWindow(TXNObjectObject *_self, PyObject *_args) static PyObject *TXNObj_TXNZoomWindow(TXNObjectObject *_self, PyObject *_args) { PyObject *_res = NULL; - short iPart; + SInt16 iPart; #ifndef TXNZoomWindow PyMac_PRECHECK(TXNZoomWindow); #endif @@ -697,37 +697,6 @@ static PyObject *TXNObj_TXNSetDataFromFile(TXNObjectObject *_self, PyObject *_ar return _res; } -static PyObject *TXNObj_TXNSetData(TXNObjectObject *_self, PyObject *_args) -{ - PyObject *_res = NULL; - OSStatus _err; - TXNDataType iDataType; - void * *iDataPtr__in__; - ByteCount iDataPtr__len__; - int iDataPtr__in_len__; - TXNOffset iStartOffset; - TXNOffset iEndOffset; -#ifndef TXNSetData - PyMac_PRECHECK(TXNSetData); -#endif - if (!PyArg_ParseTuple(_args, "O&s#ll", - PyMac_GetOSType, &iDataType, - &iDataPtr__in__, &iDataPtr__in_len__, - &iStartOffset, - &iEndOffset)) - return NULL; - iDataPtr__len__ = iDataPtr__in_len__; - _err = TXNSetData(_self->ob_itself, - iDataType, - iDataPtr__in__, iDataPtr__len__, - iStartOffset, - iEndOffset); - if (_err != noErr) return PyMac_Error(_err); - Py_INCREF(Py_None); - _res = Py_None; - return _res; -} - static PyObject *TXNObj_TXNGetChangeCount(TXNObjectObject *_self, PyObject *_args) { PyObject *_res = NULL; @@ -1150,6 +1119,20 @@ static PyObject *TXNObj_TXNIsObjectAttachedToSpecificWindow(TXNObjectObject *_se return _res; } +static PyObject *TXNObj_TXNRecalcTextLayout(TXNObjectObject *_self, PyObject *_args) +{ + PyObject *_res = NULL; +#ifndef TXNRecalcTextLayout + PyMac_PRECHECK(TXNRecalcTextLayout); +#endif + if (!PyArg_ParseTuple(_args, "")) + return NULL; + TXNRecalcTextLayout(_self->ob_itself); + Py_INCREF(Py_None); + _res = Py_None; + return _res; +} + static PyMethodDef TXNObj_methods[] = { {"TXNDeleteObject", (PyCFunction)TXNObj_TXNDeleteObject, 1, PyDoc_STR("() -> None")}, @@ -1180,7 +1163,7 @@ static PyMethodDef TXNObj_methods[] = { {"TXNGrowWindow", (PyCFunction)TXNObj_TXNGrowWindow, 1, PyDoc_STR("(EventRecord iEvent) -> None")}, {"TXNZoomWindow", (PyCFunction)TXNObj_TXNZoomWindow, 1, - PyDoc_STR("(short iPart) -> None")}, + PyDoc_STR("(SInt16 iPart) -> None")}, {"TXNCanUndo", (PyCFunction)TXNObj_TXNCanUndo, 1, PyDoc_STR("() -> (Boolean _rv, TXNActionKey oTXNActionKey)")}, {"TXNUndo", (PyCFunction)TXNObj_TXNUndo, 1, @@ -1215,8 +1198,6 @@ static PyMethodDef TXNObj_methods[] = { PyDoc_STR("(TXNOffset iStartOffset, TXNOffset iEndOffset, TXNDataType iEncoding) -> (Handle oDataHandle)")}, {"TXNSetDataFromFile", (PyCFunction)TXNObj_TXNSetDataFromFile, 1, PyDoc_STR("(SInt16 iFileRefNum, OSType iFileType, ByteCount iFileLength, TXNOffset iStartOffset, TXNOffset iEndOffset) -> None")}, - {"TXNSetData", (PyCFunction)TXNObj_TXNSetData, 1, - PyDoc_STR("(TXNDataType iDataType, Buffer iDataPtr, TXNOffset iStartOffset, TXNOffset iEndOffset) -> None")}, {"TXNGetChangeCount", (PyCFunction)TXNObj_TXNGetChangeCount, 1, PyDoc_STR("() -> (ItemCount _rv)")}, {"TXNSave", (PyCFunction)TXNObj_TXNSave, 1, @@ -1257,6 +1238,8 @@ static PyMethodDef TXNObj_methods[] = { PyDoc_STR("(UInt32 iLineNumber) -> (Fixed oLineWidth, Fixed oLineHeight)")}, {"TXNIsObjectAttachedToSpecificWindow", (PyCFunction)TXNObj_TXNIsObjectAttachedToSpecificWindow, 1, PyDoc_STR("(WindowPtr iWindow) -> (Boolean oAttached)")}, + {"TXNRecalcTextLayout", (PyCFunction)TXNObj_TXNRecalcTextLayout, 1, + PyDoc_STR("() -> None")}, {NULL, NULL, 0} }; @@ -1493,7 +1476,7 @@ static PyObject *Mlte_TXNNewObject(PyObject *_self, PyObject *_args) OSStatus _err; FSSpec * iFileSpec; WindowPtr iWindow; - Rect * iFrame; + Rect iFrame; TXNFrameOptions iFrameOptions; TXNFrameType iFrameType; TXNFileType iFileType; @@ -1506,7 +1489,7 @@ static PyObject *Mlte_TXNNewObject(PyObject *_self, PyObject *_args) if (!PyArg_ParseTuple(_args, "O&O&O&llO&l", OptFSSpecPtr_Convert, &iFileSpec, WinObj_Convert, &iWindow, - OptRectPtr_Convert, &iFrame, + PyMac_GetRect, &iFrame, &iFrameOptions, &iFrameType, PyMac_GetOSType, &iFileType, @@ -1514,7 +1497,7 @@ static PyObject *Mlte_TXNNewObject(PyObject *_self, PyObject *_args) return NULL; _err = TXNNewObject(iFileSpec, iWindow, - iFrame, + &iFrame, iFrameOptions, iFrameType, iFileType, @@ -1656,7 +1639,7 @@ static PyObject *Mlte_TXNInitTextension(PyObject *_self, PyObject *_args) static PyMethodDef Mlte_methods[] = { {"TXNNewObject", (PyCFunction)Mlte_TXNNewObject, 1, - PyDoc_STR("(FSSpec * iFileSpec, WindowPtr iWindow, Rect * iFrame, TXNFrameOptions iFrameOptions, TXNFrameType iFrameType, TXNFileType iFileType, TXNPermanentTextEncodingType iPermanentEncoding) -> (TXNObject oTXNObject, TXNFrameID oTXNFrameID)")}, + PyDoc_STR("(FSSpec * iFileSpec, WindowPtr iWindow, Rect iFrame, TXNFrameOptions iFrameOptions, TXNFrameType iFrameType, TXNFileType iFileType, TXNPermanentTextEncodingType iPermanentEncoding) -> (TXNObject oTXNObject, TXNFrameID oTXNFrameID)")}, {"TXNTerminateTextension", (PyCFunction)Mlte_TXNTerminateTextension, 1, PyDoc_STR("() -> None")}, {"TXNIsScrapPastable", (PyCFunction)Mlte_TXNIsScrapPastable, 1, diff --git a/Mac/Modules/mlte/mltescan.py b/Mac/Modules/mlte/mltescan.py index 011d7bb..134bffa 100644 --- a/Mac/Modules/mlte/mltescan.py +++ b/Mac/Modules/mlte/mltescan.py @@ -52,6 +52,7 @@ kTXNEndOffset = 0x7FFFFFFF MovieFileType = FOUR_CHAR_CODE('moov') kTXNUseEncodingWordRulesMask = 0x80000000 kTXNFontSizeAttributeSize = 4 +normal = 0 """) def makeblacklistnames(self): @@ -94,10 +95,18 @@ kTXNFontSizeAttributeSize = 4 "TXNBackground", #TBD "TXNFindUPP", "ATSUStyle", #TBD + "TXNBackground_ptr", #TBD + "TXNControlData_ptr", #TBD + "TXNControlTag_ptr", #TBD + "TXNLongRect", #TBD + "TXNLongRect_ptr", #TBD + "TXNTypeAttributes_ptr", #TBD + "TXNActionKeyMapperProcPtr", "TXNActionKeyMapperUPP", "TXNTextBoxOptionsData", "TXNCountOptions", + "void_ptr", ] def makerepairinstructions(self): |