summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog40
-rw-r--r--generic/tkTextDisp.c49
-rw-r--r--macosx/tkMacOSX.h5
-rw-r--r--macosx/tkMacOSXBitmap.c12
-rw-r--r--macosx/tkMacOSXButton.c6
-rw-r--r--macosx/tkMacOSXCarbonEvents.c3
-rw-r--r--macosx/tkMacOSXClipboard.c6
-rw-r--r--macosx/tkMacOSXColor.c34
-rw-r--r--macosx/tkMacOSXConfig.c3
-rw-r--r--macosx/tkMacOSXCursor.c6
-rw-r--r--macosx/tkMacOSXDialog.c5
-rw-r--r--macosx/tkMacOSXDraw.c9
-rw-r--r--macosx/tkMacOSXEmbed.c9
-rw-r--r--macosx/tkMacOSXEntry.c4
-rw-r--r--macosx/tkMacOSXEvent.c4
-rw-r--r--macosx/tkMacOSXEvent.h7
-rw-r--r--macosx/tkMacOSXFont.h4
-rw-r--r--macosx/tkMacOSXHLEvents.c5
-rw-r--r--macosx/tkMacOSXInit.c5
-rw-r--r--macosx/tkMacOSXInt.h20
-rw-r--r--macosx/tkMacOSXKeyEvent.c3
-rw-r--r--macosx/tkMacOSXKeyboard.c6
-rw-r--r--macosx/tkMacOSXMenu.c9
-rw-r--r--macosx/tkMacOSXMenubutton.c5
-rw-r--r--macosx/tkMacOSXMenus.c11
-rw-r--r--macosx/tkMacOSXMouseEvent.c8
-rw-r--r--macosx/tkMacOSXRegion.c11
-rw-r--r--macosx/tkMacOSXScale.c6
-rw-r--r--macosx/tkMacOSXScrlbr.c9
-rw-r--r--macosx/tkMacOSXSend.c9
-rw-r--r--macosx/tkMacOSXSubwindows.c8
-rw-r--r--macosx/tkMacOSXWindowEvent.c3
-rw-r--r--macosx/tkMacOSXWm.c5
-rw-r--r--macosx/tkMacOSXWm.h6
-rw-r--r--macosx/tkMacOSXXStubs.c14
35 files changed, 146 insertions, 203 deletions
diff --git a/ChangeLog b/ChangeLog
index 3d9ffab..7dd0976 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,43 @@
+2006-03-24 Daniel Steffen <das@users.sourceforge.net>
+
+ * 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:
+
2006-03-23 Reinhard Max <max@tclers.tk>
* unix/tkUnixRFont.c (TkpMeasureCharsInContext): Copied over from
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;
diff --git a/macosx/tkMacOSX.h b/macosx/tkMacOSX.h
index 89e6641..1fb92f4 100644
--- a/macosx/tkMacOSX.h
+++ b/macosx/tkMacOSX.h
@@ -9,17 +9,18 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacOSX.h,v 1.3 2005/02/24 00:41:04 das Exp $
+ * RCS: @(#) $Id: tkMacOSX.h,v 1.4 2006/03/24 14:58:00 das Exp $
*/
#ifndef _TKMAC
#define _TKMAC
-#include <Carbon/Carbon.h>
#ifndef _TK
#include "tk.h"
#endif
+#include <Carbon/Carbon.h>
+
/*
* Structures and function types for handling Netscape-type in process
* embedding where Tk does not control the top-level
diff --git a/macosx/tkMacOSXBitmap.c b/macosx/tkMacOSXBitmap.c
index 0f6f319..369759e 100644
--- a/macosx/tkMacOSXBitmap.c
+++ b/macosx/tkMacOSXBitmap.c
@@ -9,21 +9,11 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacOSXBitmap.c,v 1.3 2005/05/14 20:48:14 das Exp $
+ * RCS: @(#) $Id: tkMacOSXBitmap.c,v 1.4 2006/03/24 14:58:01 das Exp $
*/
-#include "tkPort.h"
-#include "tk.h"
#include "tkMacOSXInt.h"
-#include <Carbon/Carbon.h>
-/*
-#include <Icons.h>
-#include <Dialogs.h>
-#include <Resources.h>
-#include <Strings.h>
-*/
-
/*
* Depending on the resource type there are different ways to
* draw native icons.
diff --git a/macosx/tkMacOSXButton.c b/macosx/tkMacOSXButton.c
index ed75502..aa53cdb 100644
--- a/macosx/tkMacOSXButton.c
+++ b/macosx/tkMacOSXButton.c
@@ -10,11 +10,11 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacOSXButton.c,v 1.17 2006/03/22 00:21:17 das Exp $
+ * RCS: @(#) $Id: tkMacOSXButton.c,v 1.18 2006/03/24 14:58:01 das Exp $
*/
-#include "tkButton.h"
#include "tkMacOSXInt.h"
+#include "tkButton.h"
#include "tkMacOSXFont.h"
#include "tkMacOSXDebug.h"
@@ -28,8 +28,6 @@
#define DEF_INSET_TOP 2
#define DEF_INSET_BOTTOM 4
-#include <Carbon/Carbon.h>
-
/*
* Some defines used to control what type of control is drawn.
*/
diff --git a/macosx/tkMacOSXCarbonEvents.c b/macosx/tkMacOSXCarbonEvents.c
index def8bd8..28bd3ef 100644
--- a/macosx/tkMacOSXCarbonEvents.c
+++ b/macosx/tkMacOSXCarbonEvents.c
@@ -60,10 +60,9 @@
* software in accordance with the terms specified in this
* license.
*
- * RCS: @(#) $Id: tkMacOSXCarbonEvents.c,v 1.9 2006/01/10 05:37:51 das Exp $
+ * RCS: @(#) $Id: tkMacOSXCarbonEvents.c,v 1.10 2006/03/24 14:58:01 das Exp $
*/
-#include "tkInt.h"
#include "tkMacOSXInt.h"
#include "tkMacOSXEvent.h"
#include "tkMacOSXDebug.h"
diff --git a/macosx/tkMacOSXClipboard.c b/macosx/tkMacOSXClipboard.c
index 941e7ad..e31afd6 100644
--- a/macosx/tkMacOSXClipboard.c
+++ b/macosx/tkMacOSXClipboard.c
@@ -9,17 +9,13 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacOSXClipboard.c,v 1.5 2004/02/16 00:19:42 wolfsuit Exp $
+ * RCS: @(#) $Id: tkMacOSXClipboard.c,v 1.6 2006/03/24 14:58:01 das Exp $
*/
-#include "tkInt.h"
-#include "tkPort.h"
#include "tkMacOSXInt.h"
#include "tkSelect.h"
-#include <Carbon/Carbon.h>
-
/*
*----------------------------------------------------------------------
*
diff --git a/macosx/tkMacOSXColor.c b/macosx/tkMacOSXColor.c
index fb4017c..78d80e1 100644
--- a/macosx/tkMacOSXColor.c
+++ b/macosx/tkMacOSXColor.c
@@ -12,12 +12,11 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacOSXColor.c,v 1.3 2003/07/03 18:47:03 wolfsuit Exp $
+ * RCS: @(#) $Id: tkMacOSXColor.c,v 1.4 2006/03/24 14:58:01 das Exp $
*/
-#include <tkColor.h>
#include "tkMacOSXInt.h"
-#include <Carbon/Carbon.h>
+#include "tkColor.h"
/*
* Default Auxillary Control Record for all controls. This is cached once
@@ -104,6 +103,35 @@ TkSetMacColor(
/*
*----------------------------------------------------------------------
*
+ * TkMacOSXCompareColors --
+ *
+ * On Mac, color codes may specify symbolic values like "highlight
+ * foreground", but we really need the actual values to compare.
+ * Maybe see also: "TIP #154: Add Named Colors to Tk".
+ *
+ * Results:
+ * Returns true if both colors are the same, false otherwise.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+int
+TkMacOSXCompareColors(
+ unsigned long c1,
+ unsigned long c2)
+{
+ RGBColor col1, col2;
+ return TkSetMacColor(c1,&col1) &&
+ TkSetMacColor(c1,&col2) &&
+ !memcmp(&col1,&col2,sizeof(col1));
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
* Stub functions --
*
* These functions are just stubs for functions that either
diff --git a/macosx/tkMacOSXConfig.c b/macosx/tkMacOSXConfig.c
index a89d51f..fa1e62e 100644
--- a/macosx/tkMacOSXConfig.c
+++ b/macosx/tkMacOSXConfig.c
@@ -10,10 +10,9 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacOSXConfig.c,v 1.2 2002/08/31 06:12:29 das Exp $
+ * RCS: @(#) $Id: tkMacOSXConfig.c,v 1.3 2006/03/24 14:58:01 das Exp $
*/
-#include "tk.h"
#include "tkInt.h"
diff --git a/macosx/tkMacOSXCursor.c b/macosx/tkMacOSXCursor.c
index ffcc739..b7d4eba 100644
--- a/macosx/tkMacOSXCursor.c
+++ b/macosx/tkMacOSXCursor.c
@@ -9,15 +9,11 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacOSXCursor.c,v 1.6 2005/09/10 14:53:20 das Exp $
+ * RCS: @(#) $Id: tkMacOSXCursor.c,v 1.7 2006/03/24 14:58:01 das Exp $
*/
-#include "tkPort.h"
-#include "tkInt.h"
#include "tkMacOSXInt.h"
-#include <Carbon/Carbon.h>
-
/*
* There are three different ways to set the cursor on the Mac.
* The default theme cursors (listed in cursorNames below),
diff --git a/macosx/tkMacOSXDialog.c b/macosx/tkMacOSXDialog.c
index a9c6cbf..4040791 100644
--- a/macosx/tkMacOSXDialog.c
+++ b/macosx/tkMacOSXDialog.c
@@ -9,12 +9,9 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacOSXDialog.c,v 1.18 2005/11/27 02:36:14 das Exp $
+ * RCS: @(#) $Id: tkMacOSXDialog.c,v 1.19 2006/03/24 14:58:01 das Exp $
*/
-#include <Carbon/Carbon.h>
-#include "tkPort.h"
-#include "tkInt.h"
#include "tkMacOSXInt.h"
#include "tkFileFilter.h"
diff --git a/macosx/tkMacOSXDraw.c b/macosx/tkMacOSXDraw.c
index 7b5fdea..5aae7d4 100644
--- a/macosx/tkMacOSXDraw.c
+++ b/macosx/tkMacOSXDraw.c
@@ -11,17 +11,10 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacOSXDraw.c,v 1.9 2006/03/02 20:45:20 hobbs Exp $
+ * RCS: @(#) $Id: tkMacOSXDraw.c,v 1.10 2006/03/24 14:58:01 das Exp $
*/
-#include "tkInt.h"
-#include "X11/X.h"
-#include "X11/Xlib.h"
-#include <stdio.h>
-
-#include <Carbon/Carbon.h>
#include "tkMacOSXInt.h"
-#include "tkPort.h"
#include "tkMacOSXDebug.h"
#ifndef PI
diff --git a/macosx/tkMacOSXEmbed.c b/macosx/tkMacOSXEmbed.c
index 7ed29e8..d6358f9 100644
--- a/macosx/tkMacOSXEmbed.c
+++ b/macosx/tkMacOSXEmbed.c
@@ -14,16 +14,9 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacOSXEmbed.c,v 1.4 2005/01/09 18:28:06 chengyemao Exp $
+ * RCS: @(#) $Id: tkMacOSXEmbed.c,v 1.5 2006/03/24 14:58:01 das Exp $
*/
-#include "tkInt.h"
-#include "tkPort.h"
-#include "X11/X.h"
-#include "X11/Xlib.h"
-#include <stdio.h>
-
-#include <Carbon/Carbon.h>
#include "tkMacOSXInt.h"
/*
diff --git a/macosx/tkMacOSXEntry.c b/macosx/tkMacOSXEntry.c
index 5b5597f..c8f047a 100644
--- a/macosx/tkMacOSXEntry.c
+++ b/macosx/tkMacOSXEntry.c
@@ -50,11 +50,9 @@
* software in accordance with the terms specified in this
* license.
*
- * RCS: @(#) $Id: tkMacOSXEntry.c,v 1.5 2005/11/27 02:36:15 das Exp $
+ * RCS: @(#) $Id: tkMacOSXEntry.c,v 1.6 2006/03/24 14:58:01 das Exp $
*/
-#include "tk.h"
-#include "tkInt.h"
#include "tkMacOSXInt.h"
#include "tkMacOSXDefault.h"
#include "tkEntry.h"
diff --git a/macosx/tkMacOSXEvent.c b/macosx/tkMacOSXEvent.c
index f029805..ba749a6 100644
--- a/macosx/tkMacOSXEvent.c
+++ b/macosx/tkMacOSXEvent.c
@@ -9,11 +9,9 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacOSXEvent.c,v 1.8 2005/11/27 02:36:15 das Exp $
+ * RCS: @(#) $Id: tkMacOSXEvent.c,v 1.9 2006/03/24 14:58:01 das Exp $
*/
-#include <stdio.h>
-
#include "tkMacOSXInt.h"
#include "tkMacOSXEvent.h"
#include "tkMacOSXDebug.h"
diff --git a/macosx/tkMacOSXEvent.h b/macosx/tkMacOSXEvent.h
index c52e1ec..4b78ca3 100644
--- a/macosx/tkMacOSXEvent.h
+++ b/macosx/tkMacOSXEvent.h
@@ -50,14 +50,17 @@
* software in accordance with the terms specified in this
* license.
*
- * RCS: @(#) $Id: tkMacOSXEvent.h,v 1.7 2005/12/01 06:24:16 hobbs Exp $
+ * RCS: @(#) $Id: tkMacOSXEvent.h,v 1.8 2006/03/24 14:58:01 das Exp $
*/
#ifndef _TKMACEVENT
#define _TKMACEVENT
+#ifndef _TK
+#include "tk.h"
+#endif
+
#include <Carbon/Carbon.h>
-#include <tcl.h>
typedef struct {
int stopProcessing;
diff --git a/macosx/tkMacOSXFont.h b/macosx/tkMacOSXFont.h
index ad16185..ae9f5f4 100644
--- a/macosx/tkMacOSXFont.h
+++ b/macosx/tkMacOSXFont.h
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacOSXFont.h,v 1.1 2006/03/22 00:21:18 das Exp $
+ * RCS: @(#) $Id: tkMacOSXFont.h,v 1.2 2006/03/24 14:58:01 das Exp $
*/
#ifndef TKMACOSXFONT_H
@@ -17,6 +17,8 @@
#include "tkFont.h"
+#include <Carbon/Carbon.h>
+
/*
* Switches
*/
diff --git a/macosx/tkMacOSXHLEvents.c b/macosx/tkMacOSXHLEvents.c
index 6fc5ea1..ccc823c 100644
--- a/macosx/tkMacOSXHLEvents.c
+++ b/macosx/tkMacOSXHLEvents.c
@@ -10,14 +10,11 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacOSXHLEvents.c,v 1.9 2005/08/09 07:39:20 das Exp $
+ * RCS: @(#) $Id: tkMacOSXHLEvents.c,v 1.10 2006/03/24 14:58:01 das Exp $
*/
-#include "tkMacOSXPort.h"
#include "tkMacOSXInt.h"
-#include <Carbon/Carbon.h>
-
/*
* This is a Tcl_Event structure that the Quit AppleEvent handler
* uses to schedule the tkReallyKillMe function.
diff --git a/macosx/tkMacOSXInit.c b/macosx/tkMacOSXInit.c
index aefde49..12c3a6f 100644
--- a/macosx/tkMacOSXInit.c
+++ b/macosx/tkMacOSXInit.c
@@ -10,12 +10,13 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacOSXInit.c,v 1.18 2006/01/10 05:37:51 das Exp $
+ * RCS: @(#) $Id: tkMacOSXInit.c,v 1.19 2006/03/24 14:58:01 das Exp $
*/
-#include "tkInt.h"
#include "tkMacOSXInt.h"
+
#include "tclInt.h" /* for Tcl_GetStartupScript() & Tcl_SetStartupScript() */
+
#include <sys/stat.h>
#include <mach-o/dyld.h>
#include <mach-o/getsect.h>
diff --git a/macosx/tkMacOSXInt.h b/macosx/tkMacOSXInt.h
index efe0829..8fd36a8 100644
--- a/macosx/tkMacOSXInt.h
+++ b/macosx/tkMacOSXInt.h
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacOSXInt.h,v 1.13 2005/12/08 05:04:15 das Exp $
+ * RCS: @(#) $Id: tkMacOSXInt.h,v 1.14 2006/03/24 14:58:01 das Exp $
*/
#ifndef _TKMACINT
@@ -19,6 +19,10 @@
#include "tkInt.h"
#endif
+#define TextStyle MacTextStyle
+#include <Carbon/Carbon.h>
+#undef TextStyle
+
/*
* Include platform specific public interfaces.
*/
@@ -27,12 +31,6 @@
#include "tkMacOSX.h"
#endif
-#ifndef _TKPORT
-#include "tkPort.h"
-#endif
-
-#include <Carbon/Carbon.h>
-
struct TkWindowPrivate {
TkWindow *winPtr; /* Ptr to tk window or NULL if Pixmap */
CGrafPtr grafPtr;
@@ -120,6 +118,13 @@ MODULE_SCOPE TkMacOSXEmbedHandler *gMacEmbedHandler;
#define TK_BOTH_CHANGED 3
/*
+ * Defines for tkTextDisp.c
+ */
+
+#define TK_LAYOUT_WITH_BASE_CHUNKS 1
+#define TK_DRAW_IN_CONTEXT 1
+
+/*
* Variables shared among various Mac Tk modules but are not
* exported to the outside world.
*/
@@ -162,6 +167,7 @@ MODULE_SCOPE void TkMacOSXDefaultStartupScript(void);
MODULE_SCOPE int TkMacOSXGenerateFocusEvent( Window window, int activeFlag);
MODULE_SCOPE WindowClass TkMacOSXWindowClass(TkWindow *winPtr);
MODULE_SCOPE void* TkMacOSXGetNamedSymbol(const char* module, const char* symbol);
+MODULE_SCOPE int TkMacOSXCompareColors(unsigned long c1, unsigned long c2);
/* Macro to abstract common use of TkMacOSXGetNamedSymbol to initialize named symbols */
#define TkMacOSXInitNamedSymbol(module, ret, symbol, ...) \
diff --git a/macosx/tkMacOSXKeyEvent.c b/macosx/tkMacOSXKeyEvent.c
index bd3fa4b..d76de1e 100644
--- a/macosx/tkMacOSXKeyEvent.c
+++ b/macosx/tkMacOSXKeyEvent.c
@@ -50,11 +50,10 @@
* software in accordance with the terms specified in this
* license.
*
- * RCS: @(#) $Id: tkMacOSXKeyEvent.c,v 1.12 2005/11/27 02:36:15 das Exp $
+ * RCS: @(#) $Id: tkMacOSXKeyEvent.c,v 1.13 2006/03/24 14:58:01 das Exp $
*/
#include "tkMacOSXInt.h"
-#include "tkPort.h"
#include "tkMacOSXEvent.h"
typedef struct {
diff --git a/macosx/tkMacOSXKeyboard.c b/macosx/tkMacOSXKeyboard.c
index af28c4b..0a39b06 100644
--- a/macosx/tkMacOSXKeyboard.c
+++ b/macosx/tkMacOSXKeyboard.c
@@ -9,13 +9,9 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacOSXKeyboard.c,v 1.18 2005/05/14 20:48:15 das Exp $
+ * RCS: @(#) $Id: tkMacOSXKeyboard.c,v 1.19 2006/03/24 14:58:01 das Exp $
*/
-#include "tkInt.h"
-#include "X11/Xlib.h"
-#include "X11/keysym.h"
-#include <Carbon/Carbon.h>
#include "tkMacOSXInt.h"
#include "tkMacOSXEvent.h" /* TkMacOSXKeycodeToUnicode() FIXME: That
* function should probably move here. */
diff --git a/macosx/tkMacOSXMenu.c b/macosx/tkMacOSXMenu.c
index eaef5f1..35f63a7 100644
--- a/macosx/tkMacOSXMenu.c
+++ b/macosx/tkMacOSXMenu.c
@@ -9,22 +9,17 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacOSXMenu.c,v 1.25 2006/01/10 05:37:51 das Exp $
+ * RCS: @(#) $Id: tkMacOSXMenu.c,v 1.26 2006/03/24 14:58:01 das Exp $
*/
+
#include "tkMacOSXInt.h"
#include "tkMenubutton.h"
#include "tkMenu.h"
#include "tkColor.h"
-#include "tkMacOSXInt.h"
-#undef Status
#define USE_TK_MDEF
//#define USE_ATSU
-#include <Carbon/Carbon.h>
-#include "tkMacOSXDebug.h"
-#include <CoreFoundation/CFString.h>
-
/*
#ifdef TK_MAC_DEBUG
#define TK_MAC_DEBUG_MENUS
diff --git a/macosx/tkMacOSXMenubutton.c b/macosx/tkMacOSXMenubutton.c
index ef1ec4e..106df35 100644
--- a/macosx/tkMacOSXMenubutton.c
+++ b/macosx/tkMacOSXMenubutton.c
@@ -10,13 +10,12 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacOSXMenubutton.c,v 1.9 2006/03/22 00:21:18 das Exp $
+ * RCS: @(#) $Id: tkMacOSXMenubutton.c,v 1.10 2006/03/24 14:58:01 das Exp $
*/
-#include <Carbon/Carbon.h>
+#include "tkMacOSXInt.h"
#include "tkMenu.h"
#include "tkMenubutton.h"
-#include "tkMacOSXInt.h"
#include "tkMacOSXFont.h"
#include "tkMacOSXDebug.h"
diff --git a/macosx/tkMacOSXMenus.c b/macosx/tkMacOSXMenus.c
index 6f8c2c3..95702a5 100644
--- a/macosx/tkMacOSXMenus.c
+++ b/macosx/tkMacOSXMenus.c
@@ -10,20 +10,11 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacOSXMenus.c,v 1.9 2005/11/27 06:53:13 das Exp $
+ * RCS: @(#) $Id: tkMacOSXMenus.c,v 1.10 2006/03/24 14:58:01 das Exp $
*/
-#include "tk.h"
-#include "tkInt.h"
#include "tkMacOSXInt.h"
-/*
- * The define Status defined by Xlib.h conflicts with the function Status
- * defined by Devices.h. We undefine it here to compile.
- */
-#undef Status
-#include <Carbon/Carbon.h>
-
#if !defined(MAC_OS_X_VERSION_10_3) || \
(MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_3)
/* Define constants only available on Mac OS X 10.3 or later */
diff --git a/macosx/tkMacOSXMouseEvent.c b/macosx/tkMacOSXMouseEvent.c
index b5f7a06..366903c 100644
--- a/macosx/tkMacOSXMouseEvent.c
+++ b/macosx/tkMacOSXMouseEvent.c
@@ -54,15 +54,11 @@
* software in accordance with the terms specified in this
* license.
*
- * RCS: @(#) $Id: tkMacOSXMouseEvent.c,v 1.16 2005/12/13 03:44:34 das Exp $
+ * RCS: @(#) $Id: tkMacOSXMouseEvent.c,v 1.17 2006/03/24 14:58:01 das Exp $
*/
-#include "tkInt.h"
-#include <X11/X.h>
-#include <X11/Xlib.h>
-#include "tkMacOSXEvent.h"
#include "tkMacOSXInt.h"
-#include "tkPort.h"
+#include "tkMacOSXEvent.h"
#include "tkMacOSXDebug.h"
#if !defined(MAC_OS_X_VERSION_10_3) || \
diff --git a/macosx/tkMacOSXRegion.c b/macosx/tkMacOSXRegion.c
index 2dbfde0..62b3efe 100644
--- a/macosx/tkMacOSXRegion.c
+++ b/macosx/tkMacOSXRegion.c
@@ -9,19 +9,10 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacOSXRegion.c,v 1.4 2004/10/26 14:16:12 dkf Exp $
+ * RCS: @(#) $Id: tkMacOSXRegion.c,v 1.5 2006/03/24 14:58:01 das Exp $
*/
-#include "tkInt.h"
#include "tkMacOSXInt.h"
-#include "X11/X.h"
-#include "X11/Xlib.h"
-
-#include <Carbon/Carbon.h>
-/*
-#include <Windows.h>
-#include <QDOffscreen.h>
-*/
/*
* Temporary region that can be reused.
diff --git a/macosx/tkMacOSXScale.c b/macosx/tkMacOSXScale.c
index f00d729..b50be70 100644
--- a/macosx/tkMacOSXScale.c
+++ b/macosx/tkMacOSXScale.c
@@ -10,13 +10,11 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacOSXScale.c,v 1.6 2005/09/10 14:53:21 das Exp $
+ * RCS: @(#) $Id: tkMacOSXScale.c,v 1.7 2006/03/24 14:58:01 das Exp $
*/
-#include "tkScale.h"
-#include "tkInt.h"
-#include <Carbon/Carbon.h>
#include "tkMacOSXInt.h"
+#include "tkScale.h"
/*
* Defines used in this file.
diff --git a/macosx/tkMacOSXScrlbr.c b/macosx/tkMacOSXScrlbr.c
index bd6dceb..8243b00 100644
--- a/macosx/tkMacOSXScrlbr.c
+++ b/macosx/tkMacOSXScrlbr.c
@@ -11,16 +11,15 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacOSXScrlbr.c,v 1.17 2005/12/08 07:50:14 das Exp $
+ * RCS: @(#) $Id: tkMacOSXScrlbr.c,v 1.18 2006/03/24 14:58:01 das Exp $
*/
-#include "tkScrollbar.h"
#include "tkMacOSXInt.h"
-#include "tclInt.h" /* for TclServiceIdle() */
+#include "tkScrollbar.h"
+#include "tkMacOSXDebug.h"
-#include <Carbon/Carbon.h>
+#include "tclInt.h" /* for TclServiceIdle() */
-#include "tkMacOSXDebug.h"
/*
* The following definitions should really be in MacOS
* header files. They are included here as this is the only
diff --git a/macosx/tkMacOSXSend.c b/macosx/tkMacOSXSend.c
index adc0a8e..c9ef484 100644
--- a/macosx/tkMacOSXSend.c
+++ b/macosx/tkMacOSXSend.c
@@ -32,15 +32,10 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacOSXSend.c,v 1.4 2006/03/16 10:04:49 das Exp $
+ * RCS: @(#) $Id: tkMacOSXSend.c,v 1.5 2006/03/24 14:58:01 das Exp $
*/
-#include <Carbon/Carbon.h>
-/*
-#include <Gestalt.h>
-*/
-#include "tkPort.h"
-#include "tkInt.h"
+#include "tkMacOSXInt.h"
MODULE_SCOPE int Tk_SendObjCmd _ANSI_ARGS_((ClientData clientData,
Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]));
diff --git a/macosx/tkMacOSXSubwindows.c b/macosx/tkMacOSXSubwindows.c
index 3fcee67..82ca23c 100644
--- a/macosx/tkMacOSXSubwindows.c
+++ b/macosx/tkMacOSXSubwindows.c
@@ -9,15 +9,9 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacOSXSubwindows.c,v 1.11 2006/02/09 19:08:50 das Exp $
+ * RCS: @(#) $Id: tkMacOSXSubwindows.c,v 1.12 2006/03/24 14:58:01 das Exp $
*/
-#include "tkInt.h"
-#include "X11/X.h"
-#include "X11/Xlib.h"
-#include <stdio.h>
-
-#include <Carbon/Carbon.h>
#include "tkMacOSXInt.h"
#include "tkMacOSXDebug.h"
#include "tkMacOSXWm.h"
diff --git a/macosx/tkMacOSXWindowEvent.c b/macosx/tkMacOSXWindowEvent.c
index 8b84b69..1996305 100644
--- a/macosx/tkMacOSXWindowEvent.c
+++ b/macosx/tkMacOSXWindowEvent.c
@@ -54,11 +54,10 @@
* software in accordance with the terms specified in this
* license.
*
- * RCS: @(#) $Id: tkMacOSXWindowEvent.c,v 1.10 2006/02/09 19:08:50 das Exp $
+ * RCS: @(#) $Id: tkMacOSXWindowEvent.c,v 1.11 2006/03/24 14:58:01 das Exp $
*/
#include "tkMacOSXInt.h"
-#include "tkPort.h"
#include "tkMacOSXWm.h"
#include "tkMacOSXEvent.h"
#include "tkMacOSXDebug.h"
diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c
index 10d1288..d2b0066 100644
--- a/macosx/tkMacOSXWm.c
+++ b/macosx/tkMacOSXWm.c
@@ -12,12 +12,9 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacOSXWm.c,v 1.23 2006/03/13 18:19:18 dgp Exp $
+ * RCS: @(#) $Id: tkMacOSXWm.c,v 1.24 2006/03/24 14:58:01 das Exp $
*/
-#include <Carbon/Carbon.h>
-#include "tkPort.h"
-#include "tkInt.h"
#include "tkMacOSXInt.h"
#include "tkScrollbar.h"
#include "tkMacOSXWm.h"
diff --git a/macosx/tkMacOSXWm.h b/macosx/tkMacOSXWm.h
index a66e3d2..7382dcf 100644
--- a/macosx/tkMacOSXWm.h
+++ b/macosx/tkMacOSXWm.h
@@ -50,17 +50,13 @@
* software in accordance with the terms specified in this
* license.
*
- * RCS: @(#) $Id: tkMacOSXWm.h,v 1.5 2006/03/13 18:19:18 dgp Exp $
+ * RCS: @(#) $Id: tkMacOSXWm.h,v 1.6 2006/03/24 14:58:01 das Exp $
*/
#ifndef _TKMACWM
#define _TKMACWM
-#include <Carbon/Carbon.h>
-#include "tkPort.h"
-#include "tkInt.h"
#include "tkMacOSXInt.h"
-#include "tkScrollbar.h"
/*
* A data structure of the following type holds information for
diff --git a/macosx/tkMacOSXXStubs.c b/macosx/tkMacOSXXStubs.c
index b47f41c..a556531 100644
--- a/macosx/tkMacOSXXStubs.c
+++ b/macosx/tkMacOSXXStubs.c
@@ -12,22 +12,10 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacOSXXStubs.c,v 1.14 2005/12/01 06:24:16 hobbs Exp $
+ * RCS: @(#) $Id: tkMacOSXXStubs.c,v 1.15 2006/03/24 14:58:01 das Exp $
*/
-#include "tkInt.h"
-#include <X11/X.h>
-#include <X11/Xlib.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <pthread.h>
-#include <sys/types.h>
-
-#include <X11/Xatom.h>
-
-#include <Carbon/Carbon.h>
#include "tkMacOSXInt.h"
-#include "tkPort.h"
#include "tkMacOSXEvent.h"
#include <IOKit/IOKitLib.h>