summaryrefslogtreecommitdiffstats
path: root/generic/tkTextDisp.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tkTextDisp.c')
-rw-r--r--generic/tkTextDisp.c49
1 files changed, 12 insertions, 37 deletions
diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c
index d14a000..779bc60 100644
--- a/generic/tkTextDisp.c
+++ b/generic/tkTextDisp.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkTextDisp.c,v 1.56 2006/03/22 00:21:17 das Exp $
+ * RCS: @(#) $Id: tkTextDisp.c,v 1.57 2006/03/24 14:58:00 das Exp $
*/
#include "tkPort.h"
@@ -23,6 +23,10 @@
#include "tkWinInt.h"
#endif
+#ifdef MAC_OSX_TK
+#include "tkMacOSXInt.h"
+#endif
+
/*
* "Calculations of line pixel heights and the size of the vertical
* scrollbar."
@@ -110,21 +114,6 @@
* pressing until the previous point gets implemented.
*/
-#ifdef MAC_OSX_TK
-#define TK_LAYOUT_WITH_BASE_CHUNKS 1
-#define TK_DRAW_IN_CONTEXT 1
-#endif
-
-#if TK_LAYOUT_WITH_BASE_CHUNKS && !TK_DRAW_IN_CONTEXT
-
-#ifdef MAC_OSX_TK
-#define TextStyle MacTextStyle
-#include "tkMacOSXInt.h" /* TkSetMacColor() */
-#undef TextStyle
-#endif
-
-#endif /* TK_LAYOUT_WITH_BASE_CHUNKS */
-
/*
* The following structure describes how to display a range of characters.
* The information is generated by scanning all of the tags associated with
@@ -8402,33 +8391,19 @@ IsSameFGStyle(
}
#if !TK_DRAW_IN_CONTEXT
-#ifdef MAC_OSX_TK
-
- /*
- * On Mac, color codes may specify symbolic values like "highlight
- * foreground", but we really need the actual values here to compare.
- * Maybe see also: "TIP #154: Add Named Colors to Tk".
- *
- * FIXME: We should have and use a generic function for this.
- */
-
- {
- RGBColor col1, col2;
- TkSetMacColor(style1->fgGC->foreground,&col1);
- TkSetMacColor(style2->fgGC->foreground,&col2);
- if (memcmp(&col1,&col2,sizeof(col1)) != 0) {
- return 0;
- }
- }
+ if (
+#ifdef MAC_OSX_TK
+ !TkMacOSXCompareColors(style1->fgGC->foreground,
+ style2->fgGC->foreground)
#else
-
- if (style1->fgGC->foreground != style2->fgGC->foreground) {
+ style1->fgGC->foreground != style2->fgGC->foreground
+#endif
+ ) {
return 0;
}
#endif
-#endif
sv1 = style1->sValuePtr;
sv2 = style2->sValuePtr;