summaryrefslogtreecommitdiffstats
path: root/Mac/Modules/te/tesupport.py
diff options
context:
space:
mode:
Diffstat (limited to 'Mac/Modules/te/tesupport.py')
-rw-r--r--Mac/Modules/te/tesupport.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/Mac/Modules/te/tesupport.py b/Mac/Modules/te/tesupport.py
index 5512be0..6cb96e2 100644
--- a/Mac/Modules/te/tesupport.py
+++ b/Mac/Modules/te/tesupport.py
@@ -32,7 +32,11 @@ TextStyle = OpaqueType("TextStyle", "TextStyle")
TextStyle_ptr = TextStyle
includestuff = includestuff + """
-#include <%s>""" % MACHEADERFILE + """
+#ifdef WITHOUT_FRAMEWORKS
+#include <TextEdit.h>
+#else
+#include <Carbon/Carbon.h>
+#endif
#ifdef USE_TOOLBOX_OBJECT_GLUE
extern PyObject *_TEObj_New(TEHandle);
@@ -49,8 +53,7 @@ extern int _TEObj_Convert(PyObject *, TEHandle *);
** Parse/generate TextStyle records
*/
static PyObject *
-TextStyle_New(itself)
- TextStylePtr itself;
+TextStyle_New(TextStylePtr itself)
{
return Py_BuildValue("lllO&", (long)itself->tsFont, (long)itself->tsFace, (long)itself->tsSize, QdRGB_New,
@@ -58,9 +61,7 @@ TextStyle_New(itself)
}
static int
-TextStyle_Convert(v, p_itself)
- PyObject *v;
- TextStylePtr p_itself;
+TextStyle_Convert(PyObject *v, TextStylePtr p_itself)
{
long font, face, size;
@@ -74,8 +75,8 @@ TextStyle_Convert(v, p_itself)
"""
initstuff = initstuff + """
- PyMac_INIT_TOOLBOX_OBJECT_NEW(TEObj_New);
- PyMac_INIT_TOOLBOX_OBJECT_CONVERT(TEObj_Convert);
+ PyMac_INIT_TOOLBOX_OBJECT_NEW(TEHandle, TEObj_New);
+ PyMac_INIT_TOOLBOX_OBJECT_CONVERT(TEHandle, TEObj_Convert);
"""
class TEMethodGenerator(OSErrMethodGenerator):