summaryrefslogtreecommitdiffstats
path: root/Mac/Modules/mlte
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2002-01-01 22:43:13 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2002-01-01 22:43:13 (GMT)
commit69ac361cb54c2134a13bd27b685ba8d01e3c9aa9 (patch)
treeda49c46b279405276b832ea916b0a3883eeb23bf /Mac/Modules/mlte
parentdcfc20282b8579577fb0aa3f8e5498b174150d81 (diff)
downloadcpython-69ac361cb54c2134a13bd27b685ba8d01e3c9aa9.zip
cpython-69ac361cb54c2134a13bd27b685ba8d01e3c9aa9.tar.gz
cpython-69ac361cb54c2134a13bd27b685ba8d01e3c9aa9.tar.bz2
Added some support for unicode arguments.
Diffstat (limited to 'Mac/Modules/mlte')
-rw-r--r--Mac/Modules/mlte/_Mltemodule.c27
-rw-r--r--Mac/Modules/mlte/mltescan.py3
-rw-r--r--Mac/Modules/mlte/mltesupport.py2
3 files changed, 29 insertions, 3 deletions
diff --git a/Mac/Modules/mlte/_Mltemodule.c b/Mac/Modules/mlte/_Mltemodule.c
index 4acc4b5..c159e07 100644
--- a/Mac/Modules/mlte/_Mltemodule.c
+++ b/Mac/Modules/mlte/_Mltemodule.c
@@ -1006,6 +1006,31 @@ static PyObject *TXNObj_TXNActivate(TXNObjectObject *_self, PyObject *_args)
return _res;
}
+static PyObject *TXNObj_TXNEchoMode(TXNObjectObject *_self, PyObject *_args)
+{
+ PyObject *_res = NULL;
+ OSStatus _err;
+ UniChar iEchoCharacter;
+ TextEncoding iEncoding;
+ Boolean iOn;
+#ifndef TXNEchoMode
+ PyMac_PRECHECK(TXNEchoMode);
+#endif
+ if (!PyArg_ParseTuple(_args, "hlb",
+ &iEchoCharacter,
+ &iEncoding,
+ &iOn))
+ return NULL;
+ _err = TXNEchoMode(_self->ob_itself,
+ iEchoCharacter,
+ iEncoding,
+ iOn);
+ if (_err != noErr) return PyMac_Error(_err);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+
static PyObject *TXNObj_TXNDoFontMenuSelection(TXNObjectObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
@@ -1251,6 +1276,8 @@ static PyMethodDef TXNObj_methods[] = {
"(TXNFrameID iTXNFrameID, WindowPtr iWindow, DragReference iDragReference, Boolean iDifferentObjectSameWindow) -> None"},
{"TXNActivate", (PyCFunction)TXNObj_TXNActivate, 1,
"(TXNFrameID iTXNFrameID, TXNScrollBarState iActiveState) -> None"},
+ {"TXNEchoMode", (PyCFunction)TXNObj_TXNEchoMode, 1,
+ "(UniChar iEchoCharacter, TextEncoding iEncoding, Boolean iOn) -> None"},
{"TXNDoFontMenuSelection", (PyCFunction)TXNObj_TXNDoFontMenuSelection, 1,
"(TXNFontMenuObject iTXNFontMenuObject, SInt16 iMenuID, SInt16 iMenuItem) -> None"},
{"TXNPrepareFontMenu", (PyCFunction)TXNObj_TXNPrepareFontMenu, 1,
diff --git a/Mac/Modules/mlte/mltescan.py b/Mac/Modules/mlte/mltescan.py
index c4b3d47..80c966e 100644
--- a/Mac/Modules/mlte/mltescan.py
+++ b/Mac/Modules/mlte/mltescan.py
@@ -93,9 +93,6 @@ MovieFileType = FOUR_CHAR_CODE('moov')
"TXNTypeAttributes", #TBD
"TXNMatchTextRecord", #TBD
"TXNBackground", #TBD
- "UniChar", #TBD
- "UniCharCount", #TBD
- "UniChar_ptr", #TBD
"TXNFindUPP",
"ATSUStyle", #TBD
"TXNActionKeyMapperProcPtr",
diff --git a/Mac/Modules/mlte/mltesupport.py b/Mac/Modules/mlte/mltesupport.py
index 3ce2463..e2f5767 100644
--- a/Mac/Modules/mlte/mltesupport.py
+++ b/Mac/Modules/mlte/mltesupport.py
@@ -129,6 +129,8 @@ CFStringRef = OpaqueByValueType("CFStringRef", "CFStringRefObj")
OptFSSpecPtr = OpaqueByValueType("FSSpec *", "OptFSSpecPtr")
OptRectPtr = OpaqueByValueType("Rect *", "OptRectPtr")
+
+UniChar = Type("UniChar", "h") # XXXX For now...
# ADD object type here
execfile("mltetypetest.py")