summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordas <das>2006-03-24 14:58:00 (GMT)
committerdas <das>2006-03-24 14:58:00 (GMT)
commit870bc114d9c7780cfe7af2f8f430c232602db6c8 (patch)
tree08e05421fec5d0674503f27d0f1901dea3ffec28 /generic
parent489d54fcecc142a1feb7d87c793d721875294291 (diff)
downloadtk-870bc114d9c7780cfe7af2f8f430c232602db6c8.zip
tk-870bc114d9c7780cfe7af2f8f430c232602db6c8.tar.gz
tk-870bc114d9c7780cfe7af2f8f430c232602db6c8.tar.bz2
* generic/tkTextDisp.c: moved #ifdef MAC_OSX_TK code added by
* macosx/tkMacOSXColor.c: Patch #638966 into platform specific * macosx/tkMacOSXInt.h: files. * macosx/tkMacOSX.h: cleaned up & rationalized order of * macosx/tkMacOSXBitmap.c: #includes of tk and carbon headers. * macosx/tkMacOSXButton.c: * macosx/tkMacOSXCarbonEvents.c: * macosx/tkMacOSXClipboard.c: * macosx/tkMacOSXColor.c: * macosx/tkMacOSXConfig.c: * macosx/tkMacOSXCursor.c: * macosx/tkMacOSXDialog.c: * macosx/tkMacOSXDraw.c: * macosx/tkMacOSXEmbed.c: * macosx/tkMacOSXEntry.c: * macosx/tkMacOSXEvent.c: * macosx/tkMacOSXEvent.h: * macosx/tkMacOSXFont.h: * macosx/tkMacOSXHLEvents.c: * macosx/tkMacOSXInit.c: * macosx/tkMacOSXInt.h: * macosx/tkMacOSXKeyEvent.c: * macosx/tkMacOSXKeyboard.c: * macosx/tkMacOSXMenu.c: * macosx/tkMacOSXMenubutton.c: * macosx/tkMacOSXMenus.c: * macosx/tkMacOSXMouseEvent.c: * macosx/tkMacOSXRegion.c: * macosx/tkMacOSXScale.c: * macosx/tkMacOSXScrlbr.c: * macosx/tkMacOSXSend.c: * macosx/tkMacOSXSubwindows.c: * macosx/tkMacOSXWindowEvent.c: * macosx/tkMacOSXWm.c: * macosx/tkMacOSXWm.h: * macosx/tkMacOSXXStubs.c:
Diffstat (limited to 'generic')
-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;