summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
Diffstat (limited to 'macosx')
-rw-r--r--macosx/GNUmakefile4
-rw-r--r--macosx/README4
-rw-r--r--macosx/Tk-Common.xcconfig6
-rw-r--r--macosx/Tk.xcode/project.pbxproj41
-rw-r--r--macosx/Tk.xcodeproj/project.pbxproj42
-rw-r--r--macosx/configure.ac2
-rw-r--r--macosx/tkMacOSX.h2
-rw-r--r--macosx/tkMacOSXBitmap.c5
-rw-r--r--macosx/tkMacOSXButton.c11
-rw-r--r--macosx/tkMacOSXClipboard.c8
-rw-r--r--macosx/tkMacOSXColor.c16
-rw-r--r--macosx/tkMacOSXConfig.c4
-rw-r--r--macosx/tkMacOSXCursor.c11
-rw-r--r--macosx/tkMacOSXDefault.h5
-rw-r--r--macosx/tkMacOSXDialog.c21
-rw-r--r--macosx/tkMacOSXDraw.c58
-rw-r--r--macosx/tkMacOSXEmbed.c3
-rw-r--r--macosx/tkMacOSXEvent.c28
-rw-r--r--macosx/tkMacOSXEvent.h23
-rw-r--r--macosx/tkMacOSXFont.c9
-rw-r--r--macosx/tkMacOSXHLEvents.c13
-rw-r--r--macosx/tkMacOSXImage.c26
-rw-r--r--macosx/tkMacOSXInit.c71
-rw-r--r--macosx/tkMacOSXInt.h8
-rw-r--r--macosx/tkMacOSXKeyboard.c6
-rw-r--r--macosx/tkMacOSXMenubutton.c2
-rw-r--r--macosx/tkMacOSXMenus.c15
-rw-r--r--macosx/tkMacOSXMouseEvent.c24
-rw-r--r--macosx/tkMacOSXNotify.c4
-rw-r--r--macosx/tkMacOSXPort.h34
-rw-r--r--macosx/tkMacOSXPrivate.h14
-rw-r--r--macosx/tkMacOSXRegion.c83
-rw-r--r--macosx/tkMacOSXScrlbr.c12
-rw-r--r--macosx/tkMacOSXServices.c5
-rw-r--r--macosx/tkMacOSXSubwindows.c15
-rw-r--r--macosx/tkMacOSXTest.c3
-rw-r--r--macosx/tkMacOSXWindowEvent.c4
-rw-r--r--macosx/tkMacOSXWm.c118
-rw-r--r--macosx/tkMacOSXXStubs.c184
-rw-r--r--macosx/ttkMacOSXTheme.c57
40 files changed, 554 insertions, 447 deletions
diff --git a/macosx/GNUmakefile b/macosx/GNUmakefile
index 97a11d3..2263e37 100644
--- a/macosx/GNUmakefile
+++ b/macosx/GNUmakefile
@@ -102,7 +102,7 @@ PROJECT := tk
PRODUCT_NAME := Tk
UNIX_DIR := ${CURDIR}/../unix
-VERSION := $(shell awk -F= '/^TK_VERSION/ {print $$2; nextfile}' ${UNIX_DIR}/configure.in)
+VERSION := $(shell awk -F= '/^TK_VERSION/ {print $$2; nextfile}' ${UNIX_DIR}/configure.ac)
TCL_VERSION := ${VERSION}
wish := wish
WISH = wish${VERSION}
@@ -180,7 +180,7 @@ ${objdir}/Makefile: ${UNIX_DIR}/Makefile.in ${UNIX_DIR}/configure \
mkdir -p "${OBJ_DIR}" && cd "${OBJ_DIR}" && \
if [ ${UNIX_DIR}/configure -nt config.status ]; then ${UNIX_DIR}/configure -C \
--prefix="${PREFIX}" --bindir="${BINDIR}" --libdir="${LIBDIR}" \
- --mandir="${MANDIR}" --enable-threads --enable-framework \
+ --mandir="${MANDIR}" --enable-framework \
--with-tcl="${TCL_DIR}" \
${CONFIGURE_ARGS} ${EXTRA_CONFIGURE_ARGS}; else ./config.status; fi
ifneq (${VERSION},${TCL_VERSION})
diff --git a/macosx/README b/macosx/README
index c21d445..4989ec7 100644
--- a/macosx/README
+++ b/macosx/README
@@ -169,12 +169,12 @@ newAppearance option: "aqua", "darkaqua", or "auto". If the appearance is set
to aqua or darkaqua then the window will be displayed with the corresponding
appearance independent of any preferences settings. If it is set to "auto"
the appearance will be determined by the preferences. This command can be
-used to opt out of Dark Mode on a per-window basis. It may be best to run the "update" command before setting the appearance property, to allow the event loop to run.
+used to opt out of Dark Mode on a per-window basis. It may be best to run the "update" command before setting the appearance property, to allow the event loop to run.
- To determine the current appearance of a window in macOS 10.14 (Mojave) and
higher, one can use the command:
- tk::unsupported::MacWindowStyle isdark window?
+ tk::unsupported::MacWindowStyle isdark
The boolean return value is true if the window is currently displayed with the
dark appearance.
diff --git a/macosx/Tk-Common.xcconfig b/macosx/Tk-Common.xcconfig
index 4ec1a52..6219135 100644
--- a/macosx/Tk-Common.xcconfig
+++ b/macosx/Tk-Common.xcconfig
@@ -36,11 +36,11 @@ MANDIR = $(PREFIX)/man
PER_ARCH_CFLAGS_ppc = -mcpu=G3 -mtune=G4 $(PER_ARCH_CFLAGS_ppc)
PREFIX = /usr/local
TCL_BUILD_DIR = $(OBJROOT)/../tcl/Tcl.build/$(CONFIGURATION)/Tcl.build/Objects
-TCL_CONFIGURE_ARGS = --enable-threads --enable-dtrace
+TCL_CONFIGURE_ARGS = --enable-dtrace
TCL_FRAMEWORK_DIR = $(SYMROOT)/../tcl/$(CONFIGURATION)
TCL_LIBRARY = $(LIBDIR)/tcl$(VERSION)
TCL_PACKAGE_PATH = "$(LIBDIR)"
TCL_DEFS = HAVE_TCL_CONFIG_H
TK_LIBRARY = $(LIBDIR)/tk$(VERSION)
-TK_DEFS = HAVE_TK_CONFIG_H
-VERSION = 8.6
+TK_DEFS = HAVE_TK_CONFIG_H TCL_NO_DEPRECATED
+VERSION = 8.7
diff --git a/macosx/Tk.xcode/project.pbxproj b/macosx/Tk.xcode/project.pbxproj
index 93143f7..9598af9 100644
--- a/macosx/Tk.xcode/project.pbxproj
+++ b/macosx/Tk.xcode/project.pbxproj
@@ -1043,7 +1043,6 @@
F966BBD208F27A3B005CB29B /* tkMacOSXEmbed.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = tkMacOSXEmbed.c; sourceTree = "<group>"; };
F966BBD308F27A3B005CB29B /* tkMacOSXEntry.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = tkMacOSXEntry.c; sourceTree = "<group>"; };
F966BBD408F27A3B005CB29B /* tkMacOSXEvent.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = tkMacOSXEvent.c; sourceTree = "<group>"; };
- F966BBD508F27A3B005CB29B /* tkMacOSXEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tkMacOSXEvent.h; sourceTree = "<group>"; };
F966BBD608F27A3B005CB29B /* tkMacOSXFont.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = tkMacOSXFont.c; sourceTree = "<group>"; };
F966BBD708F27A3B005CB29B /* tkMacOSXHLEvents.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = tkMacOSXHLEvents.c; sourceTree = "<group>"; };
F966BBD808F27A3B005CB29B /* tkMacOSXInit.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = tkMacOSXInit.c; sourceTree = "<group>"; };
@@ -1172,7 +1171,7 @@
F966BC6A08F27A3D005CB29B /* xmfbox.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = xmfbox.test; sourceTree = "<group>"; };
F966BC6C08F27A3D005CB29B /* aclocal.m4 */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = aclocal.m4; sourceTree = "<group>"; };
F966BC6D08F27A3D005CB29B /* configure */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = configure; sourceTree = "<group>"; };
- F966BC6E08F27A3D005CB29B /* configure.in */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = configure.in; sourceTree = "<group>"; };
+ F966BC6E08F27A3D005CB29B /* configure.ac */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = configure.ac; sourceTree = "<group>"; };
F966BC6F08F27A3D005CB29B /* install-sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = "install-sh"; sourceTree = "<group>"; };
F966BC7008F27A3D005CB29B /* installManPage */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = installManPage; sourceTree = "<group>"; };
F966BC7108F27A3D005CB29B /* Makefile.in */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 4; path = Makefile.in; sourceTree = "<group>"; };
@@ -1211,16 +1210,14 @@
F966BC9408F27A3D005CB29B /* aclocal.m4 */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = aclocal.m4; sourceTree = "<group>"; };
F966BC9508F27A3D005CB29B /* buildall.vc.bat */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = buildall.vc.bat; sourceTree = "<group>"; };
F966BC9608F27A3E005CB29B /* configure */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = configure; sourceTree = "<group>"; };
- F966BC9708F27A3E005CB29B /* configure.in */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = configure.in; sourceTree = "<group>"; };
+ F966BC9708F27A3E005CB29B /* configure.ac */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = configure.ac; sourceTree = "<group>"; };
F966BC9908F27A3E005CB29B /* Makefile.in */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 4; path = Makefile.in; sourceTree = "<group>"; };
F966BC9A08F27A3E005CB29B /* makefile.vc */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 4; path = makefile.vc; sourceTree = "<group>"; };
- F966BC9B08F27A3E005CB29B /* mkd.bat */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = mkd.bat; sourceTree = "<group>"; };
F966BC9C08F27A3E005CB29B /* nmakehlp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = nmakehlp.c; sourceTree = "<group>"; };
F966BCEE08F27A3E005CB29B /* tk.rc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = tk.rc; sourceTree = "<group>"; };
F966BCEF08F27A3E005CB29B /* tk_base.rc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = tk_base.rc; sourceTree = "<group>"; };
F966BCF208F27A3E005CB29B /* wish.rc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = wish.rc; sourceTree = "<group>"; };
F966BCF308F27A3E005CB29B /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = "<group>"; };
- F966BCF408F27A3E005CB29B /* rmd.bat */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = rmd.bat; sourceTree = "<group>"; };
F966BCF508F27A3F005CB29B /* rules.vc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = rules.vc; sourceTree = "<group>"; };
F966BCF608F27A3F005CB29B /* stubs.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = stubs.c; sourceTree = "<group>"; };
F966BCF708F27A3F005CB29B /* tcl.m4 */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = tcl.m4; sourceTree = "<group>"; };
@@ -1915,7 +1912,7 @@
F96D43CF08F272B7004A47F5 /* winTime.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = winTime.test; sourceTree = "<group>"; };
F96D43D108F272B8004A47F5 /* checkLibraryDoc.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = checkLibraryDoc.tcl; sourceTree = "<group>"; };
F96D43D208F272B8004A47F5 /* configure */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = configure; sourceTree = "<group>"; };
- F96D43D308F272B8004A47F5 /* configure.in */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = configure.in; sourceTree = "<group>"; };
+ F96D43D308F272B8004A47F5 /* configure.ac */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = configure.ac; sourceTree = "<group>"; };
F96D442208F272B8004A47F5 /* eolFix.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = eolFix.tcl; sourceTree = "<group>"; };
F96D442408F272B8004A47F5 /* fix_tommath_h.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = fix_tommath_h.tcl; sourceTree = "<group>"; };
F96D442508F272B8004A47F5 /* genStubs.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = genStubs.tcl; sourceTree = "<group>"; };
@@ -1940,7 +1937,7 @@
F96D443C08F272B9004A47F5 /* uniParse.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = uniParse.tcl; sourceTree = "<group>"; };
F96D444008F272B9004A47F5 /* aclocal.m4 */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = aclocal.m4; sourceTree = "<group>"; };
F96D444108F272B9004A47F5 /* configure */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = configure; sourceTree = "<group>"; };
- F96D444208F272B9004A47F5 /* configure.in */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = configure.in; sourceTree = "<group>"; };
+ F96D444208F272B9004A47F5 /* configure.ac */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = configure.ac; sourceTree = "<group>"; };
F96D444408F272B9004A47F5 /* Makefile.in */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 4; path = Makefile.in; sourceTree = "<group>"; };
F96D444508F272B9004A47F5 /* pkga.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pkga.c; sourceTree = "<group>"; };
F96D444608F272B9004A47F5 /* pkgb.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pkgb.c; sourceTree = "<group>"; };
@@ -1984,7 +1981,7 @@
F96D447108F272BA004A47F5 /* buildall.vc.bat */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = buildall.vc.bat; sourceTree = "<group>"; };
F96D447208F272BA004A47F5 /* cat.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cat.c; sourceTree = "<group>"; };
F96D447408F272BA004A47F5 /* configure */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = configure; sourceTree = "<group>"; };
- F96D447508F272BA004A47F5 /* configure.in */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = configure.in; sourceTree = "<group>"; };
+ F96D447508F272BA004A47F5 /* configure.ac */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = configure.ac; sourceTree = "<group>"; };
F96D447708F272BA004A47F5 /* Makefile.in */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 4; path = Makefile.in; sourceTree = "<group>"; };
F96D447808F272BA004A47F5 /* makefile.vc */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 4; path = makefile.vc; sourceTree = "<group>"; };
F96D447908F272BA004A47F5 /* nmakehlp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = nmakehlp.c; sourceTree = "<group>"; };
@@ -2586,7 +2583,6 @@
F966BBD208F27A3B005CB29B /* tkMacOSXEmbed.c */,
F966BBD308F27A3B005CB29B /* tkMacOSXEntry.c */,
F966BBD408F27A3B005CB29B /* tkMacOSXEvent.c */,
- F966BBD508F27A3B005CB29B /* tkMacOSXEvent.h */,
F966BBD608F27A3B005CB29B /* tkMacOSXFont.c */,
F93E5EFD09CF8711008FA367 /* tkMacOSXFont.h */,
F966BBD708F27A3B005CB29B /* tkMacOSXHLEvents.c */,
@@ -2740,7 +2736,7 @@
children = (
F966BC6C08F27A3D005CB29B /* aclocal.m4 */,
F966BC6D08F27A3D005CB29B /* configure */,
- F966BC6E08F27A3D005CB29B /* configure.in */,
+ F966BC6E08F27A3D005CB29B /* configure.ac */,
F966BC6F08F27A3D005CB29B /* install-sh */,
F966BC7008F27A3D005CB29B /* installManPage */,
F966BC7108F27A3D005CB29B /* Makefile.in */,
@@ -2787,10 +2783,9 @@
F966BC9408F27A3D005CB29B /* aclocal.m4 */,
F966BC9508F27A3D005CB29B /* buildall.vc.bat */,
F966BC9608F27A3E005CB29B /* configure */,
- F966BC9708F27A3E005CB29B /* configure.in */,
+ F966BC9708F27A3E005CB29B /* configure.ac */,
F966BC9908F27A3E005CB29B /* Makefile.in */,
F966BC9A08F27A3E005CB29B /* makefile.vc */,
- F966BC9B08F27A3E005CB29B /* mkd.bat */,
F966BC9C08F27A3E005CB29B /* nmakehlp.c */,
F966BC9D08F27A3E005CB29B /* rc */,
F966BCF308F27A3E005CB29B /* README */,
@@ -3722,7 +3717,7 @@
children = (
F96D43D108F272B8004A47F5 /* checkLibraryDoc.tcl */,
F96D43D208F272B8004A47F5 /* configure */,
- F96D43D308F272B8004A47F5 /* configure.in */,
+ F96D43D308F272B8004A47F5 /* configure.ac */,
F96D442208F272B8004A47F5 /* eolFix.tcl */,
F96D442408F272B8004A47F5 /* fix_tommath_h.tcl */,
F96D442508F272B8004A47F5 /* genStubs.tcl */,
@@ -3755,7 +3750,7 @@
children = (
F96D444008F272B9004A47F5 /* aclocal.m4 */,
F96D444108F272B9004A47F5 /* configure */,
- F96D444208F272B9004A47F5 /* configure.in */,
+ F96D444208F272B9004A47F5 /* configure.ac */,
F96D444308F272B9004A47F5 /* dltest */,
F96D444D08F272B9004A47F5 /* install-sh */,
F96D444E08F272B9004A47F5 /* installManPage */,
@@ -3816,7 +3811,7 @@
F96D447108F272BA004A47F5 /* buildall.vc.bat */,
F96D447208F272BA004A47F5 /* cat.c */,
F96D447408F272BA004A47F5 /* configure */,
- F96D447508F272BA004A47F5 /* configure.in */,
+ F96D447508F272BA004A47F5 /* configure.ac */,
F96D447708F272BA004A47F5 /* Makefile.in */,
F96D447808F272BA004A47F5 /* makefile.vc */,
F96D447908F272BA004A47F5 /* nmakehlp.c */,
@@ -3968,7 +3963,7 @@
);
inputPaths = (
"$(TCL_SRCROOT)/macosx/configure.ac",
- "$(TCL_SRCROOT)/unix/configure.in",
+ "$(TCL_SRCROOT)/unix/configure.ac",
"$(TCL_SRCROOT)/unix/tcl.m4",
"$(TCL_SRCROOT)/unix/aclocal.m4",
"$(TCL_SRCROOT)/unix/tclConfig.sh.in",
@@ -3981,7 +3976,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/bash;
- shellScript = "## tcl configure shell script phase\n\ncd \"${TCL_SRCROOT}\"/macosx &&\nif [ configure.ac -nt configure -o ../unix/configure.in -nt configure -o ../unix/tcl.m4 -nt configure -o ../unix/aclocal.m4 -nt configure ]; then\n echo \"Running autoconf & autoheader in tcl/macosx\"\n rm -rf autom4te.cache\n ${AUTOCONF:-${DEVELOPER_DIR}/usr/bin/autoconf} && ${AUTOHEADER:-${DEVELOPER_DIR}/usr/bin/autoheader} || exit $?\n rm -rf autom4te.cache\nfi\n\ncd \"${DERIVED_FILE_DIR}\" && mkdir -p tcl && cd tcl &&\nif [ \"${TCL_SRCROOT}\"/macosx/configure -nt config.status ]; then\n echo \"Configuring Tcl\"\n CC=$(xcrun -find ${GCC} || echo ${GCC})\n \"${TCL_SRCROOT}\"/macosx/configure --cache-file=../config.cache --prefix=${PREFIX} --bindir=${BINDIR} --libdir=${LIBDIR} --mandir=${MANDIR} --includedir=${INCLUDEDIR} --disable-shared CC=${CC} LD=${CC} ${CONFIGURE_ARGS}\nelse\n ./config.status\nfi\n";
+ shellScript = "## tcl configure shell script phase\n\ncd \"${TCL_SRCROOT}\"/macosx &&\nif [ configure.ac -nt configure -o ../unix/configure.ac -nt configure -o ../unix/tcl.m4 -nt configure -o ../unix/aclocal.m4 -nt configure ]; then\n echo \"Running autoconf & autoheader in tcl/macosx\"\n rm -rf autom4te.cache\n ${AUTOCONF:-${DEVELOPER_DIR}/usr/bin/autoconf} && ${AUTOHEADER:-${DEVELOPER_DIR}/usr/bin/autoheader} || exit $?\n rm -rf autom4te.cache\nfi\n\ncd \"${DERIVED_FILE_DIR}\" && mkdir -p tcl && cd tcl &&\nif [ \"${TCL_SRCROOT}\"/macosx/configure -nt config.status ]; then\n echo \"Configuring Tcl\"\n CC=$(xcrun -find ${GCC} || echo ${GCC})\n \"${TCL_SRCROOT}\"/macosx/configure --cache-file=../config.cache --prefix=${PREFIX} --bindir=${BINDIR} --libdir=${LIBDIR} --mandir=${MANDIR} --includedir=${INCLUDEDIR} --disable-shared CC=${CC} LD=${CC} ${CONFIGURE_ARGS}\nelse\n ./config.status\nfi\n";
showEnvVarsInLog = 0;
};
F9A5C5F608F651AB008AE941 /* Configure Tk */ = {
@@ -3991,7 +3986,7 @@
);
inputPaths = (
"$(TK_SRCROOT)/macosx/configure.ac",
- "$(TK_SRCROOT)/unix/configure.in",
+ "$(TK_SRCROOT)/unix/configure.ac",
"$(TK_SRCROOT)/unix/tcl.m4",
"$(TK_SRCROOT)/unix/aclocal.m4",
"$(TK_SRCROOT)/unix/tkConfig.sh.in",
@@ -4002,7 +3997,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/bash;
- shellScript = "## tk configure shell script phase\n\ncd \"${TK_SRCROOT}\"/macosx &&\nif [ configure.ac -nt configure -o ../unix/configure.in -nt configure -o ../unix/tcl.m4 -nt configure -o ../unix/aclocal.m4 -nt configure ]; then\n echo \"Running autoconf & autoheader in tk/macosx\"\n rm -rf autom4te.cache\n ${AUTOCONF:-${DEVELOPER_DIR}/usr/bin/autoconf} && ${AUTOHEADER:-${DEVELOPER_DIR}/usr/bin/autoheader} || exit $?\n rm -rf autom4te.cache\nfi\n\ncd \"${DERIVED_FILE_DIR}\" && mkdir -p tk && cd tk &&\nif [ \"${TK_SRCROOT}\"/macosx/configure -nt config.status ]; then\n echo \"Configuring Tk\"\n CC=$(xcrun -find ${GCC} || echo ${GCC})\n \"${TK_SRCROOT}\"/macosx/configure --cache-file=../config.cache --prefix=${PREFIX} --bindir=${BINDIR} --libdir=${LIBDIR} --mandir=${MANDIR} --includedir=${INCLUDEDIR} --disable-shared --enable-aqua --with-tcl=../tcl CC=${CC} LD=${CC} ${CONFIGURE_ARGS}\nelse\n ./config.status\nfi\n";
+ shellScript = "## tk configure shell script phase\n\ncd \"${TK_SRCROOT}\"/macosx &&\nif [ configure.ac -nt configure -o ../unix/configure.ac -nt configure -o ../unix/tcl.m4 -nt configure -o ../unix/aclocal.m4 -nt configure ]; then\n echo \"Running autoconf & autoheader in tk/macosx\"\n rm -rf autom4te.cache\n ${AUTOCONF:-${DEVELOPER_DIR}/usr/bin/autoconf} && ${AUTOHEADER:-${DEVELOPER_DIR}/usr/bin/autoheader} || exit $?\n rm -rf autom4te.cache\nfi\n\ncd \"${DERIVED_FILE_DIR}\" && mkdir -p tk && cd tk &&\nif [ \"${TK_SRCROOT}\"/macosx/configure -nt config.status ]; then\n echo \"Configuring Tk\"\n CC=$(xcrun -find ${GCC} || echo ${GCC})\n \"${TK_SRCROOT}\"/macosx/configure --cache-file=../config.cache --prefix=${PREFIX} --bindir=${BINDIR} --libdir=${LIBDIR} --mandir=${MANDIR} --includedir=${INCLUDEDIR} --disable-shared --enable-aqua --with-tcl=../tcl CC=${CC} LD=${CC} ${CONFIGURE_ARGS}\nelse\n ./config.status\nfi\n";
showEnvVarsInLog = 0;
};
F9FD30B40CC1AD070073837D /* Configure Tcl */ = {
@@ -4012,7 +4007,7 @@
);
inputPaths = (
"$(TCL_SRCROOT)/macosx/configure.ac",
- "$(TCL_SRCROOT)/unix/configure.in",
+ "$(TCL_SRCROOT)/unix/configure.ac",
"$(TCL_SRCROOT)/unix/tcl.m4",
"$(TCL_SRCROOT)/unix/aclocal.m4",
"$(TCL_SRCROOT)/unix/tclConfig.sh.in",
@@ -4025,7 +4020,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/bash;
- shellScript = "## tcl configure shell script phase\n\ncd \"${TCL_SRCROOT}\"/macosx &&\nif [ configure.ac -nt configure -o ../unix/configure.in -nt configure -o ../unix/tcl.m4 -nt configure -o ../unix/aclocal.m4 -nt configure ]; then\n echo \"Running autoconf & autoheader in tcl/macosx\"\n rm -rf autom4te.cache\n ${AUTOCONF:-${DEVELOPER_DIR}/usr/bin/autoconf} && ${AUTOHEADER:-${DEVELOPER_DIR}/usr/bin/autoheader} || exit $?\n rm -rf autom4te.cache\nfi\n\ncd \"${DERIVED_FILE_DIR}\" && mkdir -p tcl && cd tcl &&\nif [ \"${TCL_SRCROOT}\"/macosx/configure -nt config.status ]; then\n echo \"Configuring Tcl\"\n CC=$(xcrun -find ${GCC} || echo ${GCC})\n \"${TCL_SRCROOT}\"/macosx/configure --cache-file=../config.cache --prefix=${PREFIX} --bindir=${BINDIR} --libdir=${LIBDIR} --mandir=${MANDIR} --includedir=${INCLUDEDIR} --disable-shared CC=${CC} LD=${CC} ${CONFIGURE_ARGS}\nelse\n ./config.status\nfi\n";
+ shellScript = "## tcl configure shell script phase\n\ncd \"${TCL_SRCROOT}\"/macosx &&\nif [ configure.ac -nt configure -o ../unix/configure.ac -nt configure -o ../unix/tcl.m4 -nt configure -o ../unix/aclocal.m4 -nt configure ]; then\n echo \"Running autoconf & autoheader in tcl/macosx\"\n rm -rf autom4te.cache\n ${AUTOCONF:-${DEVELOPER_DIR}/usr/bin/autoconf} && ${AUTOHEADER:-${DEVELOPER_DIR}/usr/bin/autoheader} || exit $?\n rm -rf autom4te.cache\nfi\n\ncd \"${DERIVED_FILE_DIR}\" && mkdir -p tcl && cd tcl &&\nif [ \"${TCL_SRCROOT}\"/macosx/configure -nt config.status ]; then\n echo \"Configuring Tcl\"\n CC=$(xcrun -find ${GCC} || echo ${GCC})\n \"${TCL_SRCROOT}\"/macosx/configure --cache-file=../config.cache --prefix=${PREFIX} --bindir=${BINDIR} --libdir=${LIBDIR} --mandir=${MANDIR} --includedir=${INCLUDEDIR} --disable-shared CC=${CC} LD=${CC} ${CONFIGURE_ARGS}\nelse\n ./config.status\nfi\n";
showEnvVarsInLog = 0;
};
F9FD30B50CC1AD070073837D /* Configure Tk */ = {
@@ -4035,7 +4030,7 @@
);
inputPaths = (
"$(TK_SRCROOT)/macosx/configure.ac",
- "$(TK_SRCROOT)/unix/configure.in",
+ "$(TK_SRCROOT)/unix/configure.ac",
"$(TK_SRCROOT)/unix/tcl.m4",
"$(TK_SRCROOT)/unix/aclocal.m4",
"$(TK_SRCROOT)/unix/tkConfig.sh.in",
@@ -4046,7 +4041,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/bash;
- shellScript = "## tk configure shell script phase\n\ncd \"${TK_SRCROOT}\"/macosx &&\nif [ configure.ac -nt configure -o ../unix/configure.in -nt configure -o ../unix/tcl.m4 -nt configure -o ../unix/aclocal.m4 -nt configure ]; then\n echo \"Running autoconf & autoheader in tk/macosx\"\n rm -rf autom4te.cache\n ${AUTOCONF:-${DEVELOPER_DIR}/usr/bin/autoconf} && ${AUTOHEADER:-${DEVELOPER_DIR}/usr/bin/autoheader} || exit $?\n rm -rf autom4te.cache\nfi\n\ncd \"${DERIVED_FILE_DIR}\" && mkdir -p tk && cd tk &&\nif [ \"${TK_SRCROOT}\"/macosx/configure -nt config.status ]; then\n echo \"Configuring Tk\"\n CC=$(xcrun -find ${GCC} || echo ${GCC})\n PATH=\"${PATH}:/usr/X11R6/bin\" \"${TK_SRCROOT}\"/macosx/configure --cache-file=../config.cache --prefix=${PREFIX} --bindir=${BINDIR} --libdir=${LIBDIR} --mandir=${MANDIR} --includedir=${INCLUDEDIR} --disable-shared --enable-xft --with-tcl=../tcl CC=${CC} LD=${CC} ${CONFIGURE_ARGS}\nelse\n ./config.status\nfi";
+ shellScript = "## tk configure shell script phase\n\ncd \"${TK_SRCROOT}\"/macosx &&\nif [ configure.ac -nt configure -o ../unix/configure.ac -nt configure -o ../unix/tcl.m4 -nt configure -o ../unix/aclocal.m4 -nt configure ]; then\n echo \"Running autoconf & autoheader in tk/macosx\"\n rm -rf autom4te.cache\n ${AUTOCONF:-${DEVELOPER_DIR}/usr/bin/autoconf} && ${AUTOHEADER:-${DEVELOPER_DIR}/usr/bin/autoheader} || exit $?\n rm -rf autom4te.cache\nfi\n\ncd \"${DERIVED_FILE_DIR}\" && mkdir -p tk && cd tk &&\nif [ \"${TK_SRCROOT}\"/macosx/configure -nt config.status ]; then\n echo \"Configuring Tk\"\n CC=$(xcrun -find ${GCC} || echo ${GCC})\n PATH=\"${PATH}:/usr/X11R6/bin\" \"${TK_SRCROOT}\"/macosx/configure --cache-file=../config.cache --prefix=${PREFIX} --bindir=${BINDIR} --libdir=${LIBDIR} --mandir=${MANDIR} --includedir=${INCLUDEDIR} --disable-shared --enable-xft --with-tcl=../tcl CC=${CC} LD=${CC} ${CONFIGURE_ARGS}\nelse\n ./config.status\nfi";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
diff --git a/macosx/Tk.xcodeproj/project.pbxproj b/macosx/Tk.xcodeproj/project.pbxproj
index 53ebe3e..121c8a0 100644
--- a/macosx/Tk.xcodeproj/project.pbxproj
+++ b/macosx/Tk.xcodeproj/project.pbxproj
@@ -1043,7 +1043,6 @@
F966BBD208F27A3B005CB29B /* tkMacOSXEmbed.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = tkMacOSXEmbed.c; sourceTree = "<group>"; };
F966BBD308F27A3B005CB29B /* tkMacOSXEntry.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = tkMacOSXEntry.c; sourceTree = "<group>"; };
F966BBD408F27A3B005CB29B /* tkMacOSXEvent.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = tkMacOSXEvent.c; sourceTree = "<group>"; };
- F966BBD508F27A3B005CB29B /* tkMacOSXEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tkMacOSXEvent.h; sourceTree = "<group>"; };
F966BBD608F27A3B005CB29B /* tkMacOSXFont.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = tkMacOSXFont.c; sourceTree = "<group>"; };
F966BBD708F27A3B005CB29B /* tkMacOSXHLEvents.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = tkMacOSXHLEvents.c; sourceTree = "<group>"; };
F966BBD808F27A3B005CB29B /* tkMacOSXInit.c */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.objc; fileEncoding = 4; path = tkMacOSXInit.c; sourceTree = "<group>"; };
@@ -1172,7 +1171,7 @@
F966BC6A08F27A3D005CB29B /* xmfbox.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = xmfbox.test; sourceTree = "<group>"; };
F966BC6C08F27A3D005CB29B /* aclocal.m4 */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = aclocal.m4; sourceTree = "<group>"; };
F966BC6D08F27A3D005CB29B /* configure */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = configure; sourceTree = "<group>"; };
- F966BC6E08F27A3D005CB29B /* configure.in */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = configure.in; sourceTree = "<group>"; };
+ F966BC6E08F27A3D005CB29B /* configure.ac */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = configure.ac; sourceTree = "<group>"; };
F966BC6F08F27A3D005CB29B /* install-sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = "install-sh"; sourceTree = "<group>"; };
F966BC7008F27A3D005CB29B /* installManPage */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = installManPage; sourceTree = "<group>"; };
F966BC7108F27A3D005CB29B /* Makefile.in */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 4; path = Makefile.in; sourceTree = "<group>"; };
@@ -1211,16 +1210,14 @@
F966BC9408F27A3D005CB29B /* aclocal.m4 */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = aclocal.m4; sourceTree = "<group>"; };
F966BC9508F27A3D005CB29B /* buildall.vc.bat */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = buildall.vc.bat; sourceTree = "<group>"; };
F966BC9608F27A3E005CB29B /* configure */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = configure; sourceTree = "<group>"; };
- F966BC9708F27A3E005CB29B /* configure.in */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = configure.in; sourceTree = "<group>"; };
+ F966BC9708F27A3E005CB29B /* configure.ac */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = configure.ac; sourceTree = "<group>"; };
F966BC9908F27A3E005CB29B /* Makefile.in */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 4; path = Makefile.in; sourceTree = "<group>"; };
F966BC9A08F27A3E005CB29B /* makefile.vc */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 4; path = makefile.vc; sourceTree = "<group>"; };
- F966BC9B08F27A3E005CB29B /* mkd.bat */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = mkd.bat; sourceTree = "<group>"; };
F966BC9C08F27A3E005CB29B /* nmakehlp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = nmakehlp.c; sourceTree = "<group>"; };
F966BCEE08F27A3E005CB29B /* tk.rc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = tk.rc; sourceTree = "<group>"; };
F966BCEF08F27A3E005CB29B /* tk_base.rc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = tk_base.rc; sourceTree = "<group>"; };
F966BCF208F27A3E005CB29B /* wish.rc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = wish.rc; sourceTree = "<group>"; };
F966BCF308F27A3E005CB29B /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = "<group>"; };
- F966BCF408F27A3E005CB29B /* rmd.bat */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = rmd.bat; sourceTree = "<group>"; };
F966BCF508F27A3F005CB29B /* rules.vc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = rules.vc; sourceTree = "<group>"; };
F966BCF608F27A3F005CB29B /* stubs.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = stubs.c; sourceTree = "<group>"; };
F966BCF708F27A3F005CB29B /* tcl.m4 */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = tcl.m4; sourceTree = "<group>"; };
@@ -1915,7 +1912,7 @@
F96D43CF08F272B7004A47F5 /* winTime.test */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = winTime.test; sourceTree = "<group>"; };
F96D43D108F272B8004A47F5 /* checkLibraryDoc.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = checkLibraryDoc.tcl; sourceTree = "<group>"; };
F96D43D208F272B8004A47F5 /* configure */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = configure; sourceTree = "<group>"; };
- F96D43D308F272B8004A47F5 /* configure.in */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = configure.in; sourceTree = "<group>"; };
+ F96D43D308F272B8004A47F5 /* configure.ac */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = configure.ac; sourceTree = "<group>"; };
F96D442208F272B8004A47F5 /* eolFix.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = eolFix.tcl; sourceTree = "<group>"; };
F96D442408F272B8004A47F5 /* fix_tommath_h.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = fix_tommath_h.tcl; sourceTree = "<group>"; };
F96D442508F272B8004A47F5 /* genStubs.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = genStubs.tcl; sourceTree = "<group>"; };
@@ -1940,7 +1937,7 @@
F96D443C08F272B9004A47F5 /* uniParse.tcl */ = {isa = PBXFileReference; explicitFileType = text.script; fileEncoding = 4; path = uniParse.tcl; sourceTree = "<group>"; };
F96D444008F272B9004A47F5 /* aclocal.m4 */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = aclocal.m4; sourceTree = "<group>"; };
F96D444108F272B9004A47F5 /* configure */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = configure; sourceTree = "<group>"; };
- F96D444208F272B9004A47F5 /* configure.in */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = configure.in; sourceTree = "<group>"; };
+ F96D444208F272B9004A47F5 /* configure.ac */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = configure.ac; sourceTree = "<group>"; };
F96D444408F272B9004A47F5 /* Makefile.in */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 4; path = Makefile.in; sourceTree = "<group>"; };
F96D444508F272B9004A47F5 /* pkga.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pkga.c; sourceTree = "<group>"; };
F96D444608F272B9004A47F5 /* pkgb.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pkgb.c; sourceTree = "<group>"; };
@@ -1984,7 +1981,7 @@
F96D447108F272BA004A47F5 /* buildall.vc.bat */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = buildall.vc.bat; sourceTree = "<group>"; };
F96D447208F272BA004A47F5 /* cat.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cat.c; sourceTree = "<group>"; };
F96D447408F272BA004A47F5 /* configure */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = configure; sourceTree = "<group>"; };
- F96D447508F272BA004A47F5 /* configure.in */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = configure.in; sourceTree = "<group>"; };
+ F96D447508F272BA004A47F5 /* configure.ac */ = {isa = PBXFileReference; explicitFileType = text.script.sh; fileEncoding = 4; path = configure.ac; sourceTree = "<group>"; };
F96D447708F272BA004A47F5 /* Makefile.in */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 4; path = Makefile.in; sourceTree = "<group>"; };
F96D447808F272BA004A47F5 /* makefile.vc */ = {isa = PBXFileReference; explicitFileType = sourcecode.make; fileEncoding = 4; path = makefile.vc; sourceTree = "<group>"; };
F96D447908F272BA004A47F5 /* nmakehlp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = nmakehlp.c; sourceTree = "<group>"; };
@@ -2586,7 +2583,6 @@
F966BBD208F27A3B005CB29B /* tkMacOSXEmbed.c */,
F966BBD308F27A3B005CB29B /* tkMacOSXEntry.c */,
F966BBD408F27A3B005CB29B /* tkMacOSXEvent.c */,
- F966BBD508F27A3B005CB29B /* tkMacOSXEvent.h */,
F966BBD608F27A3B005CB29B /* tkMacOSXFont.c */,
F93E5EFD09CF8711008FA367 /* tkMacOSXFont.h */,
F966BBD708F27A3B005CB29B /* tkMacOSXHLEvents.c */,
@@ -2740,7 +2736,7 @@
children = (
F966BC6C08F27A3D005CB29B /* aclocal.m4 */,
F966BC6D08F27A3D005CB29B /* configure */,
- F966BC6E08F27A3D005CB29B /* configure.in */,
+ F966BC6E08F27A3D005CB29B /* configure.ac */,
F966BC6F08F27A3D005CB29B /* install-sh */,
F966BC7008F27A3D005CB29B /* installManPage */,
F966BC7108F27A3D005CB29B /* Makefile.in */,
@@ -2787,14 +2783,12 @@
F966BC9408F27A3D005CB29B /* aclocal.m4 */,
F966BC9508F27A3D005CB29B /* buildall.vc.bat */,
F966BC9608F27A3E005CB29B /* configure */,
- F966BC9708F27A3E005CB29B /* configure.in */,
+ F966BC9708F27A3E005CB29B /* configure.ac */,
F966BC9908F27A3E005CB29B /* Makefile.in */,
F966BC9A08F27A3E005CB29B /* makefile.vc */,
- F966BC9B08F27A3E005CB29B /* mkd.bat */,
F966BC9C08F27A3E005CB29B /* nmakehlp.c */,
F966BC9D08F27A3E005CB29B /* rc */,
F966BCF308F27A3E005CB29B /* README */,
- F966BCF408F27A3E005CB29B /* rmd.bat */,
F966BCF508F27A3F005CB29B /* rules.vc */,
F966BCF608F27A3F005CB29B /* stubs.c */,
F966BCF708F27A3F005CB29B /* tcl.m4 */,
@@ -3722,7 +3716,7 @@
children = (
F96D43D108F272B8004A47F5 /* checkLibraryDoc.tcl */,
F96D43D208F272B8004A47F5 /* configure */,
- F96D43D308F272B8004A47F5 /* configure.in */,
+ F96D43D308F272B8004A47F5 /* configure.ac */,
F96D442208F272B8004A47F5 /* eolFix.tcl */,
F96D442408F272B8004A47F5 /* fix_tommath_h.tcl */,
F96D442508F272B8004A47F5 /* genStubs.tcl */,
@@ -3755,7 +3749,7 @@
children = (
F96D444008F272B9004A47F5 /* aclocal.m4 */,
F96D444108F272B9004A47F5 /* configure */,
- F96D444208F272B9004A47F5 /* configure.in */,
+ F96D444208F272B9004A47F5 /* configure.ac */,
F96D444308F272B9004A47F5 /* dltest */,
F96D444D08F272B9004A47F5 /* install-sh */,
F96D444E08F272B9004A47F5 /* installManPage */,
@@ -3816,7 +3810,7 @@
F96D447108F272BA004A47F5 /* buildall.vc.bat */,
F96D447208F272BA004A47F5 /* cat.c */,
F96D447408F272BA004A47F5 /* configure */,
- F96D447508F272BA004A47F5 /* configure.in */,
+ F96D447508F272BA004A47F5 /* configure.ac */,
F96D447708F272BA004A47F5 /* Makefile.in */,
F96D447808F272BA004A47F5 /* makefile.vc */,
F96D447908F272BA004A47F5 /* nmakehlp.c */,
@@ -3971,7 +3965,7 @@
);
inputPaths = (
"$(TCL_SRCROOT)/macosx/configure.ac",
- "$(TCL_SRCROOT)/unix/configure.in",
+ "$(TCL_SRCROOT)/unix/configure.ac",
"$(TCL_SRCROOT)/unix/tcl.m4",
"$(TCL_SRCROOT)/unix/aclocal.m4",
"$(TCL_SRCROOT)/unix/tclConfig.sh.in",
@@ -3984,7 +3978,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/bash;
- shellScript = "## tcl configure shell script phase\n\ncd \"${TCL_SRCROOT}\"/macosx &&\nif [ configure.ac -nt configure -o ../unix/configure.in -nt configure -o ../unix/tcl.m4 -nt configure -o ../unix/aclocal.m4 -nt configure ]; then\n echo \"Running autoconf & autoheader in tcl/macosx\"\n rm -rf autom4te.cache\n ${AUTOCONF:-${DEVELOPER_DIR}/usr/bin/autoconf} && ${AUTOHEADER:-${DEVELOPER_DIR}/usr/bin/autoheader} || exit $?\n rm -rf autom4te.cache\nfi\n\ncd \"${DERIVED_FILE_DIR}\" && mkdir -p tcl && cd tcl &&\nif [ \"${TCL_SRCROOT}\"/macosx/configure -nt config.status ]; then\n echo \"Configuring Tcl\"\n CC=$(xcrun -find ${GCC} || echo ${GCC})\n \"${TCL_SRCROOT}\"/macosx/configure --cache-file=../config.cache --prefix=${PREFIX} --bindir=${BINDIR} --libdir=${LIBDIR} --mandir=${MANDIR} --includedir=${INCLUDEDIR} --disable-shared CC=${CC} LD=${CC} ${CONFIGURE_ARGS}\nelse\n ./config.status\nfi\n";
+ shellScript = "## tcl configure shell script phase\n\ncd \"${TCL_SRCROOT}\"/macosx &&\nif [ configure.ac -nt configure -o ../unix/configure.ac -nt configure -o ../unix/tcl.m4 -nt configure -o ../unix/aclocal.m4 -nt configure ]; then\n echo \"Running autoconf & autoheader in tcl/macosx\"\n rm -rf autom4te.cache\n ${AUTOCONF:-${DEVELOPER_DIR}/usr/bin/autoconf} && ${AUTOHEADER:-${DEVELOPER_DIR}/usr/bin/autoheader} || exit $?\n rm -rf autom4te.cache\nfi\n\ncd \"${DERIVED_FILE_DIR}\" && mkdir -p tcl && cd tcl &&\nif [ \"${TCL_SRCROOT}\"/macosx/configure -nt config.status ]; then\n echo \"Configuring Tcl\"\n CC=$(xcrun -find ${GCC} || echo ${GCC})\n \"${TCL_SRCROOT}\"/macosx/configure --cache-file=../config.cache --prefix=${PREFIX} --bindir=${BINDIR} --libdir=${LIBDIR} --mandir=${MANDIR} --includedir=${INCLUDEDIR} --disable-shared CC=${CC} LD=${CC} ${CONFIGURE_ARGS}\nelse\n ./config.status\nfi\n";
showEnvVarsInLog = 0;
};
F9A5C5F608F651AB008AE941 /* Configure Tk */ = {
@@ -3994,7 +3988,7 @@
);
inputPaths = (
"$(TK_SRCROOT)/macosx/configure.ac",
- "$(TK_SRCROOT)/unix/configure.in",
+ "$(TK_SRCROOT)/unix/configure.ac",
"$(TK_SRCROOT)/unix/tcl.m4",
"$(TK_SRCROOT)/unix/aclocal.m4",
"$(TK_SRCROOT)/unix/tkConfig.sh.in",
@@ -4005,7 +3999,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/bash;
- shellScript = "## tk configure shell script phase\n\ncd \"${TK_SRCROOT}\"/macosx &&\nif [ configure.ac -nt configure -o ../unix/configure.in -nt configure -o ../unix/tcl.m4 -nt configure -o ../unix/aclocal.m4 -nt configure ]; then\n echo \"Running autoconf & autoheader in tk/macosx\"\n rm -rf autom4te.cache\n ${AUTOCONF:-${DEVELOPER_DIR}/usr/bin/autoconf} && ${AUTOHEADER:-${DEVELOPER_DIR}/usr/bin/autoheader} || exit $?\n rm -rf autom4te.cache\nfi\n\ncd \"${DERIVED_FILE_DIR}\" && mkdir -p tk && cd tk &&\nif [ \"${TK_SRCROOT}\"/macosx/configure -nt config.status ]; then\n echo \"Configuring Tk\"\n CC=$(xcrun -find ${GCC} || echo ${GCC})\n \"${TK_SRCROOT}\"/macosx/configure --cache-file=../config.cache --prefix=${PREFIX} --bindir=${BINDIR} --libdir=${LIBDIR} --mandir=${MANDIR} --includedir=${INCLUDEDIR} --disable-shared --enable-aqua --with-tcl=../tcl CC=${CC} LD=${CC} ${CONFIGURE_ARGS}\nelse\n ./config.status\nfi\n";
+ shellScript = "## tk configure shell script phase\n\ncd \"${TK_SRCROOT}\"/macosx &&\nif [ configure.ac -nt configure -o ../unix/configure.ac -nt configure -o ../unix/tcl.m4 -nt configure -o ../unix/aclocal.m4 -nt configure ]; then\n echo \"Running autoconf & autoheader in tk/macosx\"\n rm -rf autom4te.cache\n ${AUTOCONF:-${DEVELOPER_DIR}/usr/bin/autoconf} && ${AUTOHEADER:-${DEVELOPER_DIR}/usr/bin/autoheader} || exit $?\n rm -rf autom4te.cache\nfi\n\ncd \"${DERIVED_FILE_DIR}\" && mkdir -p tk && cd tk &&\nif [ \"${TK_SRCROOT}\"/macosx/configure -nt config.status ]; then\n echo \"Configuring Tk\"\n CC=$(xcrun -find ${GCC} || echo ${GCC})\n \"${TK_SRCROOT}\"/macosx/configure --cache-file=../config.cache --prefix=${PREFIX} --bindir=${BINDIR} --libdir=${LIBDIR} --mandir=${MANDIR} --includedir=${INCLUDEDIR} --disable-shared --enable-aqua --with-tcl=../tcl CC=${CC} LD=${CC} ${CONFIGURE_ARGS}\nelse\n ./config.status\nfi\n";
showEnvVarsInLog = 0;
};
F9FD30B40CC1AD070073837D /* Configure Tcl */ = {
@@ -4015,7 +4009,7 @@
);
inputPaths = (
"$(TCL_SRCROOT)/macosx/configure.ac",
- "$(TCL_SRCROOT)/unix/configure.in",
+ "$(TCL_SRCROOT)/unix/configure.ac",
"$(TCL_SRCROOT)/unix/tcl.m4",
"$(TCL_SRCROOT)/unix/aclocal.m4",
"$(TCL_SRCROOT)/unix/tclConfig.sh.in",
@@ -4028,7 +4022,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/bash;
- shellScript = "## tcl configure shell script phase\n\ncd \"${TCL_SRCROOT}\"/macosx &&\nif [ configure.ac -nt configure -o ../unix/configure.in -nt configure -o ../unix/tcl.m4 -nt configure -o ../unix/aclocal.m4 -nt configure ]; then\n echo \"Running autoconf & autoheader in tcl/macosx\"\n rm -rf autom4te.cache\n ${AUTOCONF:-${DEVELOPER_DIR}/usr/bin/autoconf} && ${AUTOHEADER:-${DEVELOPER_DIR}/usr/bin/autoheader} || exit $?\n rm -rf autom4te.cache\nfi\n\ncd \"${DERIVED_FILE_DIR}\" && mkdir -p tcl && cd tcl &&\nif [ \"${TCL_SRCROOT}\"/macosx/configure -nt config.status ]; then\n echo \"Configuring Tcl\"\n CC=$(xcrun -find ${GCC} || echo ${GCC})\n \"${TCL_SRCROOT}\"/macosx/configure --cache-file=../config.cache --prefix=${PREFIX} --bindir=${BINDIR} --libdir=${LIBDIR} --mandir=${MANDIR} --includedir=${INCLUDEDIR} --disable-shared CC=${CC} LD=${CC} ${CONFIGURE_ARGS}\nelse\n ./config.status\nfi\n";
+ shellScript = "## tcl configure shell script phase\n\ncd \"${TCL_SRCROOT}\"/macosx &&\nif [ configure.ac -nt configure -o ../unix/configure.ac -nt configure -o ../unix/tcl.m4 -nt configure -o ../unix/aclocal.m4 -nt configure ]; then\n echo \"Running autoconf & autoheader in tcl/macosx\"\n rm -rf autom4te.cache\n ${AUTOCONF:-${DEVELOPER_DIR}/usr/bin/autoconf} && ${AUTOHEADER:-${DEVELOPER_DIR}/usr/bin/autoheader} || exit $?\n rm -rf autom4te.cache\nfi\n\ncd \"${DERIVED_FILE_DIR}\" && mkdir -p tcl && cd tcl &&\nif [ \"${TCL_SRCROOT}\"/macosx/configure -nt config.status ]; then\n echo \"Configuring Tcl\"\n CC=$(xcrun -find ${GCC} || echo ${GCC})\n \"${TCL_SRCROOT}\"/macosx/configure --cache-file=../config.cache --prefix=${PREFIX} --bindir=${BINDIR} --libdir=${LIBDIR} --mandir=${MANDIR} --includedir=${INCLUDEDIR} --disable-shared CC=${CC} LD=${CC} ${CONFIGURE_ARGS}\nelse\n ./config.status\nfi\n";
showEnvVarsInLog = 0;
};
F9FD30B50CC1AD070073837D /* Configure Tk */ = {
@@ -4038,7 +4032,7 @@
);
inputPaths = (
"$(TK_SRCROOT)/macosx/configure.ac",
- "$(TK_SRCROOT)/unix/configure.in",
+ "$(TK_SRCROOT)/unix/configure.ac",
"$(TK_SRCROOT)/unix/tcl.m4",
"$(TK_SRCROOT)/unix/aclocal.m4",
"$(TK_SRCROOT)/unix/tkConfig.sh.in",
@@ -4049,7 +4043,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/bash;
- shellScript = "## tk configure shell script phase\n\ncd \"${TK_SRCROOT}\"/macosx &&\nif [ configure.ac -nt configure -o ../unix/configure.in -nt configure -o ../unix/tcl.m4 -nt configure -o ../unix/aclocal.m4 -nt configure ]; then\n echo \"Running autoconf & autoheader in tk/macosx\"\n rm -rf autom4te.cache\n ${AUTOCONF:-${DEVELOPER_DIR}/usr/bin/autoconf} && ${AUTOHEADER:-${DEVELOPER_DIR}/usr/bin/autoheader} || exit $?\n rm -rf autom4te.cache\nfi\n\ncd \"${DERIVED_FILE_DIR}\" && mkdir -p tk && cd tk &&\nif [ \"${TK_SRCROOT}\"/macosx/configure -nt config.status ]; then\n echo \"Configuring Tk\"\n CC=$(xcrun -find ${GCC} || echo ${GCC})\n PATH=\"${PATH}:/usr/X11R6/bin\" \"${TK_SRCROOT}\"/macosx/configure --cache-file=../config.cache --prefix=${PREFIX} --bindir=${BINDIR} --libdir=${LIBDIR} --mandir=${MANDIR} --includedir=${INCLUDEDIR} --disable-shared --enable-xft --with-tcl=../tcl CC=${CC} LD=${CC} ${CONFIGURE_ARGS}\nelse\n ./config.status\nfi";
+ shellScript = "## tk configure shell script phase\n\ncd \"${TK_SRCROOT}\"/macosx &&\nif [ configure.ac -nt configure -o ../unix/configure.ac -nt configure -o ../unix/tcl.m4 -nt configure -o ../unix/aclocal.m4 -nt configure ]; then\n echo \"Running autoconf & autoheader in tk/macosx\"\n rm -rf autom4te.cache\n ${AUTOCONF:-${DEVELOPER_DIR}/usr/bin/autoconf} && ${AUTOHEADER:-${DEVELOPER_DIR}/usr/bin/autoheader} || exit $?\n rm -rf autom4te.cache\nfi\n\ncd \"${DERIVED_FILE_DIR}\" && mkdir -p tk && cd tk &&\nif [ \"${TK_SRCROOT}\"/macosx/configure -nt config.status ]; then\n echo \"Configuring Tk\"\n CC=$(xcrun -find ${GCC} || echo ${GCC})\n PATH=\"${PATH}:/usr/X11R6/bin\" \"${TK_SRCROOT}\"/macosx/configure --cache-file=../config.cache --prefix=${PREFIX} --bindir=${BINDIR} --libdir=${LIBDIR} --mandir=${MANDIR} --includedir=${INCLUDEDIR} --disable-shared --enable-xft --with-tcl=../tcl CC=${CC} LD=${CC} ${CONFIGURE_ARGS}\nelse\n ./config.status\nfi";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
diff --git a/macosx/configure.ac b/macosx/configure.ac
index 69573c5..41f39d6 100644
--- a/macosx/configure.ac
+++ b/macosx/configure.ac
@@ -8,4 +8,4 @@ dnl include the configure sources from ../unix:
m4_include(../unix/aclocal.m4)
m4_define(SC_USE_CONFIG_HEADERS)
-m4_include(../unix/configure.in)
+m4_include(../unix/configure.ac)
diff --git a/macosx/tkMacOSX.h b/macosx/tkMacOSX.h
index 05ea6c2..a9e3082 100644
--- a/macosx/tkMacOSX.h
+++ b/macosx/tkMacOSX.h
@@ -26,7 +26,7 @@
typedef int (Tk_MacOSXEmbedRegisterWinProc) (long winID, Tk_Window window);
typedef void* (Tk_MacOSXEmbedGetGrafPortProc) (Tk_Window window);
typedef int (Tk_MacOSXEmbedMakeContainerExistProc) (Tk_Window window);
-typedef void (Tk_MacOSXEmbedGetClipProc) (Tk_Window window, TkRegion rgn);
+typedef void (Tk_MacOSXEmbedGetClipProc) (Tk_Window window, Region rgn);
typedef void (Tk_MacOSXEmbedGetOffsetInParentProc) (Tk_Window window, void *ulCorner);
#include "tkPlatDecls.h"
diff --git a/macosx/tkMacOSXBitmap.c b/macosx/tkMacOSXBitmap.c
index 615192b..d75a164 100644
--- a/macosx/tkMacOSXBitmap.c
+++ b/macosx/tkMacOSXBitmap.c
@@ -44,7 +44,7 @@ static BuiltInIcon builtInIcons[] = {
{"stop", kAlertStopIcon},
{"note", kAlertNoteIcon},
{"caution", kAlertCautionIcon},
- {NULL}
+ {NULL, 0}
};
#define builtInIconSize 32
@@ -344,7 +344,7 @@ TkpGetNativeAppBitmap(
int
TkMacOSXIconBitmapObjCmd(
- ClientData clientData, /* Unused. */
+ ClientData dummy, /* Unused. */
Tcl_Interp *interp, /* Current interpreter. */
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
@@ -353,6 +353,7 @@ TkMacOSXIconBitmapObjCmd(
int i = 1, len, isNew, result = TCL_ERROR;
const char *name, *value;
IconBitmap ib, *iconBitmap;
+ (void)dummy;
if (objc != 6) {
Tcl_WrongNumArgs(interp, 1, objv, "name width height "
diff --git a/macosx/tkMacOSXButton.c b/macosx/tkMacOSXButton.c
index 8a121ee..865234f 100644
--- a/macosx/tkMacOSXButton.c
+++ b/macosx/tkMacOSXButton.c
@@ -95,6 +95,8 @@ static void PulseDefaultButtonProc(ClientData clientData);
const Tk_ClassProcs tkpButtonProcs = {
sizeof(Tk_ClassProcs), /* size */
TkButtonWorldChanged, /* worldChangedProc */
+ NULL,
+ NULL
};
static int bCount;
@@ -737,6 +739,7 @@ TkMacOSXDrawButton(
TkMacOSXDrawingContext dc;
DrawParams *dpPtr = &mbPtr->drawParams;
int useNewerHITools = 1;
+ (void)gc;
TkMacOSXComputeButtonParams(butPtr, &mbPtr->btnkind, &mbPtr->drawinfo);
@@ -822,6 +825,9 @@ ButtonBackgroundDrawCB(
Tk_Window tkwin = butPtr->tkwin;
Pixmap pixmap;
int usehlborder = 0;
+ (void)btnbounds;
+ (void)depth;
+ (void)isColorDev;
if (tkwin == NULL || !Tk_IsMapped(tkwin)) {
return;
@@ -873,6 +879,11 @@ ButtonContentDrawCB (
{
TkButton *butPtr = (TkButton *) ptr;
Tk_Window tkwin = butPtr->tkwin;
+ (void)btnbounds;
+ (void)kind;
+ (void)drawinfo;
+ (void)depth;
+ (void)isColorDev;
if (tkwin == NULL || !Tk_IsMapped(tkwin)) {
return;
diff --git a/macosx/tkMacOSXClipboard.c b/macosx/tkMacOSXClipboard.c
index 825cafa..a5665c7 100644
--- a/macosx/tkMacOSXClipboard.c
+++ b/macosx/tkMacOSXClipboard.c
@@ -185,6 +185,7 @@ XSetSelectionOwner(
Time time) /* The current time? */
{
TkDisplay *dispPtr = TkGetDisplayList();
+ (void)time;
if (dispPtr && selection == dispPtr->clipboardAtom) {
clipboardOwner = owner ? Tk_IdToWindow(display, owner) : NULL;
@@ -247,6 +248,8 @@ TkSelUpdateClipboard(
/* Info about the content. */
{
NSPasteboard *pb = [NSPasteboard generalPasteboard];
+ (void)winPtr;
+ (void)targetPtr;
changeCount = [pb addTypes:[NSArray arrayWithObject:NSStringPboardType]
owner:NSApp];
@@ -271,7 +274,7 @@ TkSelUpdateClipboard(
void
TkSelEventProc(
Tk_Window tkwin, /* Window for which event was targeted. */
- register XEvent *eventPtr) /* X event: either SelectionClear,
+ XEvent *eventPtr) /* X event: either SelectionClear,
* SelectionRequest, or SelectionNotify. */
{
if (eventPtr->type == SelectionClear) {
@@ -299,8 +302,9 @@ TkSelEventProc(
void
TkSelPropProc(
- register XEvent *eventPtr) /* X PropertyChange event. */
+ XEvent *eventPtr) /* X PropertyChange event. */
{
+ (void)eventPtr;
}
/*
diff --git a/macosx/tkMacOSXColor.c b/macosx/tkMacOSXColor.c
index 9b72732..3c40cfb 100644
--- a/macosx/tkMacOSXColor.c
+++ b/macosx/tkMacOSXColor.c
@@ -827,6 +827,7 @@ TkpGetColorByValue(
* desired color. */
{
TkColor *tkColPtr = ckalloc(sizeof(TkColor));
+ (void)tkwin;
tkColPtr->color.red = colorPtr->red;
tkColPtr->color.green = colorPtr->green;
@@ -858,6 +859,8 @@ XAllocColor(
Colormap map, /* Not used. */
XColor *colorPtr) /* XColor struct to modify. */
{
+ (void)map;
+
display->request++;
colorPtr->pixel = TkpGetPixel(colorPtr);
return 1;
@@ -871,6 +874,10 @@ XCreateColormap(
int alloc) /* Not used. */
{
static Colormap index = 1;
+ (void)display;
+ (void)window;
+ (void)visual;
+ (void)alloc;
/*
* Just return a new value each time.
@@ -883,6 +890,9 @@ XFreeColormap(
Display* display, /* Display. */
Colormap colormap) /* Colormap. */
{
+ (void)display;
+ (void)colormap;
+
return Success;
}
@@ -894,6 +904,12 @@ XFreeColors(
int npixels, /* Number of pixels. */
unsigned long planes) /* Number of pixel planes. */
{
+ (void)display;
+ (void)colormap;
+ (void)pixels;
+ (void)npixels;
+ (void)planes;
+
/*
* The Macintosh version of Tk uses TrueColor. Nothing
* needs to be done to release colors as there really is
diff --git a/macosx/tkMacOSXConfig.c b/macosx/tkMacOSXConfig.c
index 841fc54..34a1fc9 100644
--- a/macosx/tkMacOSXConfig.c
+++ b/macosx/tkMacOSXConfig.c
@@ -39,6 +39,10 @@ TkpGetSystemDefault(
const char *dbName, /* The option database name. */
const char *className) /* The name of the option class. */
{
+ (void)tkwin;
+ (void)dbName;
+ (void)className;
+
return NULL;
}
diff --git a/macosx/tkMacOSXCursor.c b/macosx/tkMacOSXCursor.c
index 894a44d..d5faa37 100644
--- a/macosx/tkMacOSXCursor.c
+++ b/macosx/tkMacOSXCursor.c
@@ -382,6 +382,7 @@ TkGetCursorByName(
TkMacOSXCursor *macCursorPtr = NULL;
const char **argv = NULL;
int argc;
+ (void)tkwin;
/*
* All cursor names are valid lists of one element (for
@@ -437,6 +438,16 @@ TkCreateCursorFromData(
XColor fgColor, /* Foreground color for cursor. */
XColor bgColor) /* Background color for cursor. */
{
+ (void)tkwin;
+ (void)source;
+ (void)mask;
+ (void)width;
+ (void)height;
+ (void)xHot;
+ (void)yHot;
+ (void)fgColor;
+ (void)bgColor;
+
return NULL;
}
diff --git a/macosx/tkMacOSXDefault.h b/macosx/tkMacOSXDefault.h
index 4e73ac9..efaaa91 100644
--- a/macosx/tkMacOSXDefault.h
+++ b/macosx/tkMacOSXDefault.h
@@ -192,6 +192,8 @@
#define DEF_ENTRY_INSERT_ON_TIME "600"
#define DEF_ENTRY_INSERT_WIDTH "1"
#define DEF_ENTRY_JUSTIFY "left"
+#define DEF_ENTRY_PLACEHOLDER ""
+#define DEF_ENTRY_PLACEHOLDERFG "#b3b3b3"
#define DEF_ENTRY_READONLY_BG_COLOR NORMAL_BG
#define DEF_ENTRY_READONLY_BG_MONO WHITE
#define DEF_ENTRY_RELIEF "sunken"
@@ -213,7 +215,9 @@
*/
#define DEF_FRAME_BG_COLOR NORMAL_BG
+#define DEF_FRAME_BG_IMAGE NULL
#define DEF_FRAME_BG_MONO WHITE
+#define DEF_FRAME_BG_TILE "0"
#define DEF_FRAME_BORDER_WIDTH "0"
#define DEF_FRAME_CLASS "Frame"
#define DEF_FRAME_COLORMAP ""
@@ -312,6 +316,7 @@
#define DEF_MENU_ACTIVE_BORDER_WIDTH "0"
#define DEF_MENU_ACTIVE_FG_COLOR "systemMenuActiveText"
#define DEF_MENU_ACTIVE_FG_MONO WHITE
+#define DEF_MENU_ACTIVE_RELIEF "flat"
#define DEF_MENU_BG_COLOR "systemMenu"
#define DEF_MENU_BG_MONO WHITE
#define DEF_MENU_BORDER_WIDTH "0"
diff --git a/macosx/tkMacOSXDialog.c b/macosx/tkMacOSXDialog.c
index 10a756d..455362a 100644
--- a/macosx/tkMacOSXDialog.c
+++ b/macosx/tkMacOSXDialog.c
@@ -198,6 +198,8 @@ getFileURL(
@implementation TKApplication(TKDialog)
- (BOOL)panel:(id)sender shouldEnableURL:(NSURL *)url {
+ (void)sender;
+ (void)url;
return YES;
}
@@ -1573,7 +1575,7 @@ Tk_MessageBoxObjCmd(
*----------------------------------------------------------------------
*/
-#include "tkMacOSXEvent.h"
+#include "tkMacOSXInt.h"
#include "tkMacOSXFont.h"
typedef struct FontchooserData {
@@ -1787,8 +1789,8 @@ FontchooserCget(
}
break;
case FontchooserVisible:
- resObj = Tcl_NewBooleanObj([[[NSFontManager sharedFontManager]
- fontPanel:NO] isVisible]);
+ resObj = Tcl_NewWideIntObj([[[NSFontManager sharedFontManager]
+ fontPanel:NO] isVisible] != 0);
break;
default:
resObj = Tcl_NewObj();
@@ -1986,6 +1988,8 @@ FontchooserShowCmd(
{
FontchooserData *fcdPtr = Tcl_GetAssocData(interp, "::tk::fontchooser",
NULL);
+ (void)objc;
+ (void)objv;
if (fcdPtr->parent == None) {
fcdPtr->parent = (Tk_Window) clientData;
@@ -2027,12 +2031,16 @@ FontchooserShowCmd(
static int
FontchooserHideCmd(
- ClientData clientData, /* Main window */
+ ClientData dummy, /* Main window */
Tcl_Interp *interp,
int objc,
Tcl_Obj *const objv[])
{
NSFontPanel *fp = [[NSFontManager sharedFontManager] fontPanel:NO];
+ (void)dummy;
+ (void)interp;
+ (void)objc;
+ (void)objv;
if ([fp isVisible]) {
[fp orderOut:NSApp];
@@ -2129,9 +2137,10 @@ DeleteFontchooserData(
MODULE_SCOPE int
TkInitFontchooser(
Tcl_Interp *interp,
- ClientData clientData)
+ ClientData dummy)
{
- FontchooserData *fcdPtr = ckalloc(sizeof(FontchooserData));
+ FontchooserData *fcdPtr = (FontchooserData *)ckalloc(sizeof(FontchooserData));
+ (void)dummy;
bzero(fcdPtr, sizeof(FontchooserData));
Tcl_SetAssocData(interp, "::tk::fontchooser", DeleteFontchooserData,
diff --git a/macosx/tkMacOSXDraw.c b/macosx/tkMacOSXDraw.c
index 1bf2572..82b433a 100644
--- a/macosx/tkMacOSXDraw.c
+++ b/macosx/tkMacOSXDraw.c
@@ -73,6 +73,7 @@ TkMacOSXInitCGDrawing(
int limit)
{
static Boolean initialized = FALSE;
+ (void)enable;
if (!initialized) {
initialized = TRUE;
@@ -866,6 +867,7 @@ XFillPolygon(
MacDrawable *macWin = (MacDrawable *) d;
TkMacOSXDrawingContext dc;
int i;
+ (void)shape;
display->request++;
if (!TkMacOSXSetupDrawingContext(d, gc, 1, &dc)) {
@@ -946,7 +948,6 @@ XDrawRectangle(
return Success;
}
-#ifdef TK_MACOSXDRAW_UNUSED
/*
*----------------------------------------------------------------------
*
@@ -971,7 +972,7 @@ XDrawRectangle(
*----------------------------------------------------------------------
*/
-void
+int
XDrawRectangles(
Display *display,
Drawable drawable,
@@ -985,8 +986,8 @@ XDrawRectangles(
int i, lw = gc->line_width;
display->request++;
- if (!TkMacOSXSetupDrawingContext(d, gc, 1, &dc)) {
- return;
+ if (!TkMacOSXSetupDrawingContext(drawable, gc, 1, &dc)) {
+ return BadDrawable;
}
if (dc.context) {
CGRect rect;
@@ -1004,8 +1005,8 @@ XDrawRectangles(
}
}
TkMacOSXRestoreDrawingContext(&dc);
+ return Success;
}
-#endif
/*
*----------------------------------------------------------------------
@@ -1176,7 +1177,6 @@ XDrawArc(
return Success;
}
-#ifdef TK_MACOSXDRAW_UNUSED
/*
*----------------------------------------------------------------------
*
@@ -1257,7 +1257,6 @@ XDrawArcs(
TkMacOSXRestoreDrawingContext(&dc);
return Success;
}
-#endif
/*
*----------------------------------------------------------------------
@@ -1338,7 +1337,6 @@ XFillArc(
return Success;
}
-#ifdef TK_MACOSXDRAW_UNUSED
/*
*----------------------------------------------------------------------
*
@@ -1355,7 +1353,7 @@ XFillArc(
*----------------------------------------------------------------------
*/
-void
+int
XFillArcs(
Display *display,
Drawable d,
@@ -1370,7 +1368,7 @@ XFillArcs(
display->request++;
if (!TkMacOSXSetupDrawingContext(d, gc, 1, &dc)) {
- return;
+ return BadDrawable;
}
if (dc.context) {
CGRect rect;
@@ -1418,25 +1416,8 @@ XFillArcs(
}
}
TkMacOSXRestoreDrawingContext(&dc);
+ return Success;
}
-#endif
-
-#ifdef TK_MACOSXDRAW_UNUSED
-/*
- *----------------------------------------------------------------------
- *
- * XMaxRequestSize --
- *
- *----------------------------------------------------------------------
- */
-
-long
-XMaxRequestSize(
- Display *display)
-{
- return (SHRT_MAX / 4);
-}
-#endif
/*
*----------------------------------------------------------------------
@@ -1463,7 +1444,7 @@ TkScrollWindow(
int x, int y, /* Position rectangle to be scrolled. */
int width, int height,
int dx, int dy, /* Distance rectangle should be moved. */
- TkRegion damageRgn) /* Region to accumulate damage in. */
+ Region damageRgn) /* Region to accumulate damage in. */
{
Drawable drawable = Tk_WindowId(tkwin);
MacDrawable *macDraw = (MacDrawable *) drawable;
@@ -1967,12 +1948,12 @@ ClipToGC(
{
if (gc && gc->clip_mask &&
((TkpClipMask *) gc->clip_mask)->type == TKP_CLIP_REGION) {
- TkRegion gcClip = ((TkpClipMask *) gc->clip_mask)->value.region;
+ Region gcClip = ((TkpClipMask *) gc->clip_mask)->value.region;
int xOffset = ((MacDrawable *) d)->xOff + gc->clip_x_origin;
int yOffset = ((MacDrawable *) d)->yOff + gc->clip_y_origin;
HIShapeRef clipRgn = *clipRgnPtr, gcClipRgn;
- TkMacOSXOffsetRegion(gcClip, xOffset, yOffset);
+ XOffsetRegion(gcClip, xOffset, yOffset);
gcClipRgn = TkMacOSXGetNativeRegion(gcClip);
if (clipRgn) {
*clipRgnPtr = HIShapeCreateIntersection(gcClipRgn, clipRgn);
@@ -1981,7 +1962,7 @@ ClipToGC(
*clipRgnPtr = HIShapeCreateCopy(gcClipRgn);
}
CFRelease(gcClipRgn);
- TkMacOSXOffsetRegion(gcClip, -xOffset, -yOffset);
+ XOffsetRegion(gcClip, -xOffset, -yOffset);
}
}
@@ -2057,7 +2038,7 @@ TkpDrawHighlightBorder (
/*
*----------------------------------------------------------------------
*
- * TkpDrawFrame --
+ * TkpDrawFrameEx --
*
* This procedure draws the rectangular frame area. If the user has
* requested themeing, it draws with the background theme.
@@ -2072,8 +2053,9 @@ TkpDrawHighlightBorder (
*/
void
-TkpDrawFrame(
+TkpDrawFrameEx(
Tk_Window tkwin,
+ Drawable drawable,
Tk_3DBorder border,
int highlightWidth,
int borderWidth,
@@ -2091,11 +2073,9 @@ TkpDrawFrame(
}
}
- Tk_Fill3DRectangle(tkwin, Tk_WindowId(tkwin),
- border, highlightWidth, highlightWidth,
- Tk_Width(tkwin) - 2 * highlightWidth,
- Tk_Height(tkwin) - 2 * highlightWidth,
- borderWidth, relief);
+ Tk_Fill3DRectangle(tkwin, drawable, border, highlightWidth,
+ highlightWidth, Tk_Width(tkwin) - 2 * highlightWidth,
+ Tk_Height(tkwin) - 2 * highlightWidth, borderWidth, relief);
}
/*
diff --git a/macosx/tkMacOSXEmbed.c b/macosx/tkMacOSXEmbed.c
index 6c4ac1f..ccd107a 100644
--- a/macosx/tkMacOSXEmbed.c
+++ b/macosx/tkMacOSXEmbed.c
@@ -596,7 +596,8 @@ TkpTestembedCmd(
if (containerPtr->parent == None) {
Tcl_DStringAppendElement(&dString, "");
} else if (all) {
- sprintf(buffer, "0x%lx", containerPtr->parent);
+ sprintf(buffer, "0x%" TCL_Z_MODIFIER "x",
+ (size_t) containerPtr->parent);
Tcl_DStringAppendElement(&dString, buffer);
} else {
Tcl_DStringAppendElement(&dString, "XXX");
diff --git a/macosx/tkMacOSXEvent.c b/macosx/tkMacOSXEvent.c
index b9c9b6a..af68eb6 100644
--- a/macosx/tkMacOSXEvent.c
+++ b/macosx/tkMacOSXEvent.c
@@ -12,7 +12,7 @@
*/
#include "tkMacOSXPrivate.h"
-#include "tkMacOSXEvent.h"
+#include "tkMacOSXInt.h"
#include "tkMacOSXDebug.h"
#include "tkMacOSXConstants.h"
@@ -110,9 +110,9 @@ enum {
/*
*----------------------------------------------------------------------
*
- * TkMacOSXFlushWindows --
+ * XSync --
*
- * This routine is a stub called by XSync, which is called during the Tk
+ * This routine is a stub called XSync, which is called during the Tk
* update command. The language specification does not require that the
* update command be synchronous but many of the tests implicitly assume
* that it is. It is definitely asynchronous on macOS since many idle
@@ -128,18 +128,24 @@ enum {
*----------------------------------------------------------------------
*/
-MODULE_SCOPE void
-TkMacOSXFlushWindows(void)
+int
+XSync(
+ Display *display,
+ Bool discard)
{
- if (Tk_GetNumMainWindows() == 0) {
- return;
+ (void)discard;
+
+ if (display) {
+ display->request++;
}
- while (Tcl_DoOneEvent(TCL_IDLE_EVENTS)){}
- for (NSWindow *w in [NSApp orderedWindows]) {
- [w display];
+ if (Tk_GetNumMainWindows() != 0) {
+ while (Tcl_DoOneEvent(TCL_IDLE_EVENTS)){}
+ for (NSWindow *w in [NSApp orderedWindows]) {
+ [w display];
+ }
}
+ return Success;
}
-
/*
* Local Variables:
diff --git a/macosx/tkMacOSXEvent.h b/macosx/tkMacOSXEvent.h
deleted file mode 100644
index 46d1585..0000000
--- a/macosx/tkMacOSXEvent.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * tkMacOSXEvent.h --
- *
- * Declarations of Macintosh specific functions for implementing the
- * Mac OS X Notifier.
- *
- * Copyright 2001-2009, Apple Inc.
- * Copyright (c) 2005-2009 Daniel A. Steffen <das@users.sourceforge.net>
- *
- * See the file "license.terms" for information on usage and redistribution
- * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
- */
-
-#ifndef _TKMACEVENT
-#define _TKMACEVENT
-
-#ifndef _TKMACINT
-#include "tkMacOSXInt.h"
-#endif
-
-MODULE_SCOPE void TkMacOSXFlushWindows(void);
-
-#endif
diff --git a/macosx/tkMacOSXFont.c b/macosx/tkMacOSXFont.c
index c8fce8b..6cc5da2 100644
--- a/macosx/tkMacOSXFont.c
+++ b/macosx/tkMacOSXFont.c
@@ -135,7 +135,7 @@ TkUtfToNSString(
Tcl_DString ds;
Tcl_DStringInit(&ds);
- Tcl_UtfToUniCharDString(source, numBytes, &ds);
+ Tcl_UtfToChar16DString(source, numBytes, &ds);
string = [[NSString alloc] initWithCharacters:(const unichar *)Tcl_DStringValue(&ds)
length:(Tcl_DStringLength(&ds)>>1)];
Tcl_DStringFree(&ds);
@@ -217,7 +217,7 @@ TkNSStringToUtf(
int *numBytes)
{
unsigned int code;
- int i;
+ size_t i;
char *ptr, *bytes = ckalloc(6*[string length] + 1);
ptr = bytes;
@@ -1262,6 +1262,7 @@ DrawCharsInContext(
if (!string) {
return;
}
+
context = drawingContext.context;
fg = TkMacOSXCreateCGColor(gc, gc->foreground);
attributes = [fontPtr->nsAttributes mutableCopy];
@@ -1415,8 +1416,8 @@ TkMacOSXFontDescriptionForNSFontAndNSFontAttributes(
NSStrikethroughStyleAttributeName];
objv[i++] = Tcl_NewStringObj(familyName, -1);
- objv[i++] = Tcl_NewIntObj([nsFont pointSize]);
-#define S(s) Tcl_NewStringObj(STRINGIFY(s),(int)(sizeof(STRINGIFY(s))-1))
+ objv[i++] = Tcl_NewWideIntObj([nsFont pointSize]);
+#define S(s) Tcl_NewStringObj(STRINGIFY(s), (int)(sizeof(STRINGIFY(s))-1))
objv[i++] = (traits & NSBoldFontMask) ? S(bold) : S(normal);
objv[i++] = (traits & NSItalicFontMask) ? S(italic) : S(roman);
if ([underline respondsToSelector:@selector(intValue)] &&
diff --git a/macosx/tkMacOSXHLEvents.c b/macosx/tkMacOSXHLEvents.c
index d15abde..f9c26c6 100644
--- a/macosx/tkMacOSXHLEvents.c
+++ b/macosx/tkMacOSXHLEvents.c
@@ -53,11 +53,11 @@ static void ProcessAppleEvent(ClientData clientData);
* Names of the procedures which can be used to process AppleEvents.
*/
-static const char *openDocumentProc = "::tk::mac::OpenDocument";
-static const char *launchURLProc = "::tk::mac::LaunchURL";
-static const char *printDocProc = "::tk::mac::PrintDocument";
-static const char *scriptFileProc = "::tk::mac::DoScriptFile";
-static const char *scriptTextProc = "::tk::mac::DoScriptText";
+static const char* openDocumentProc = "::tk::mac::OpenDocument";
+static const char* launchURLProc = "::tk::mac::LaunchURL";
+static const char* printDocProc = "::tk::mac::PrintDocument";
+static const char* scriptFileProc = "::tk::mac::DoScriptFile";
+static const char* scriptTextProc = "::tk::mac::DoScriptText";
#pragma mark TKApplication(TKHLEvents)
@@ -578,8 +578,7 @@ MissedAnyParameters(
typeWildCard, &returnedType, NULL, 0, &actualSize);
return (err != errAEDescNotFound);
-}
-
+}
/*
* Local Variables:
diff --git a/macosx/tkMacOSXImage.c b/macosx/tkMacOSXImage.c
index 2e576a5..a8c7922 100644
--- a/macosx/tkMacOSXImage.c
+++ b/macosx/tkMacOSXImage.c
@@ -21,6 +21,8 @@ int
_XInitImageFuncPtrs(
XImage *image)
{
+ (void)image;
+
return 0;
}
@@ -42,6 +44,9 @@ _XInitImageFuncPtrs(
*/
static void ReleaseData(void *info, const void *data, size_t size) {
+ (void)data;
+ (void)size;
+
ckfree(info);
}
@@ -176,6 +181,7 @@ XGetImage(
unsigned int scalefactor=1, scaled_height=height, scaled_width=width;
NSWindow *win = TkMacOSXDrawableWindow(drawable);
static enum {unknown, no, yes} has_retina = unknown;
+ (void)plane_mask;
if (win && has_retina == unknown) {
#ifdef __clang__
@@ -451,6 +457,7 @@ XCreateImage(
int bytes_per_line)
{
XImage *ximage;
+ (void)visual;
display->request++;
ximage = ckalloc(sizeof(XImage));
@@ -516,7 +523,7 @@ XCreateImage(
/*
*----------------------------------------------------------------------
*
- * TkPutImage, XPutImage --
+ * XPutImage --
*
* Copies a rectangular subimage of an XImage into a drawable. Currently
* this is only called by TkImgPhotoDisplay, using a Window as the
@@ -589,23 +596,6 @@ XPutImage(
TkMacOSXRestoreDrawingContext(&dc);
return Success;
}
-
-int
-TkPutImage(
- unsigned long *colors, /* Array of pixel values used by this image.
- * May be NULL. */
- int ncolors, /* Number of colors used, or 0. */
- Display *display,
- Drawable d, /* Destination drawable. */
- GC gc,
- XImage *image, /* Source image. */
- int src_x, int src_y, /* Offset of subimage. */
- int dest_x, int dest_y, /* Position of subimage origin in drawable. */
- unsigned int width, unsigned int height)
- /* Dimensions of subimage. */
-{
- return XPutImage(display, d, gc, image, src_x, src_y, dest_x, dest_y, width, height);
-}
/*
* Local Variables:
diff --git a/macosx/tkMacOSXInit.c b/macosx/tkMacOSXInit.c
index 551577e..aae315a 100644
--- a/macosx/tkMacOSXInit.c
+++ b/macosx/tkMacOSXInit.c
@@ -28,6 +28,13 @@ static char tkLibPath[PATH_MAX + 1] = "";
static char scriptPath[PATH_MAX + 1] = "";
+/*
+ * Forward declarations...
+ */
+
+static int TkMacOSXGetAppPathCmd(ClientData cd, Tcl_Interp *ip,
+ int objc, Tcl_Obj *const objv[]);
+
#pragma mark TKApplication(TKInit)
@implementation TKApplication
@@ -417,7 +424,8 @@ TkpInit(
TkMacOSXStandardAboutPanelObjCmd, NULL, NULL);
Tcl_CreateObjCommand(interp, "::tk::mac::iconBitmap",
TkMacOSXIconBitmapObjCmd, NULL, NULL);
- Tcl_CreateObjCommand(interp, "::tk::mac::GetAppPath", TkMacOSXGetAppPath, NULL, NULL);
+ Tcl_CreateObjCommand(interp, "::tk::mac::GetAppPath",
+ TkMacOSXGetAppPathCmd, NULL, NULL);
return TCL_OK;
}
@@ -457,11 +465,11 @@ TkpGetAppName(
}
Tcl_DStringAppend(namePtr, name, -1);
}
-
+
/*
*----------------------------------------------------------------------
*
- * TkMacOSXGetAppPath --
+ * TkMacOSXGetAppPathCmd --
*
* Returns the path of the Wish application bundle.
*
@@ -473,42 +481,39 @@ TkpGetAppName(
*
*----------------------------------------------------------------------
*/
-int TkMacOSXGetAppPath(
- ClientData cd,
- Tcl_Interp *ip,
- int objc,
- Tcl_Obj *const objv[])
-{
-
- CFURLRef mainBundleURL = CFBundleCopyBundleURL(CFBundleGetMainBundle());
-
-
- /*
- * Convert the URL reference into a string reference.
- */
-
- CFStringRef appPath = CFURLCopyFileSystemPath(mainBundleURL, kCFURLPOSIXPathStyle);
- /*
- * Get the system encoding method.
- */
-
- CFStringEncoding encodingMethod = CFStringGetSystemEncoding();
+static int
+TkMacOSXGetAppPathCmd(
+ ClientData ignored,
+ Tcl_Interp *interp,
+ int objc,
+ Tcl_Obj *const objv[])
+{
+ if (objc != 1) {
+ Tcl_WrongNumArgs(interp, 1, objv, NULL);
+ return TCL_ERROR;
+ }
- /*
- * Convert the string reference into a C string.
- */
+ /*
+ * Get the application path URL and convert it to a string path reference.
+ */
- char *path = (char *) CFStringGetCStringPtr(appPath, encodingMethod);
+ CFURLRef mainBundleURL = CFBundleCopyBundleURL(CFBundleGetMainBundle());
+ CFStringRef appPath =
+ CFURLCopyFileSystemPath(mainBundleURL, kCFURLPOSIXPathStyle);
- Tcl_SetResult(ip, path, NULL);
+ /*
+ * Convert (and copy) the string reference into a Tcl result.
+ */
- CFRelease(mainBundleURL);
- CFRelease(appPath);
- return TCL_OK;
+ Tcl_SetObjResult(interp, Tcl_NewStringObj(
+ CFStringGetCStringPtr(appPath, CFStringGetSystemEncoding()), -1));
+ CFRelease(mainBundleURL);
+ CFRelease(appPath);
+ return TCL_OK;
}
-
+
/*
*----------------------------------------------------------------------
*
@@ -575,7 +580,7 @@ TkMacOSXDefaultStartupScript(void)
CFURLRef scriptFldrURL;
char startupScript[PATH_MAX + 1];
- if (CFURLGetFileSystemRepresentation (appMainURL, true,
+ if (CFURLGetFileSystemRepresentation(appMainURL, true,
(unsigned char *) startupScript, PATH_MAX)) {
Tcl_SetStartupScript(Tcl_NewStringObj(startupScript,-1), NULL);
scriptFldrURL = CFURLCreateCopyDeletingLastPathComponent(NULL,
diff --git a/macosx/tkMacOSXInt.h b/macosx/tkMacOSXInt.h
index 9cb75d2..bd669c0 100644
--- a/macosx/tkMacOSXInt.h
+++ b/macosx/tkMacOSXInt.h
@@ -191,14 +191,10 @@ MODULE_SCOPE void TkpFreeGCCache(GC gc);
*/
MODULE_SCOPE void TkMacOSXDefaultStartupScript(void);
-#if 0
-MODULE_SCOPE int XSetClipRectangles(Display *d, GC gc, int clip_x_origin,
- int clip_y_origin, XRectangle* rectangles, int n, int ordering);
-#endif
MODULE_SCOPE void TkpClipDrawableToRect(Display *display, Drawable d, int x,
int y, int width, int height);
-MODULE_SCOPE void TkpRetainRegion(TkRegion r);
-MODULE_SCOPE void TkpReleaseRegion(TkRegion r);
+MODULE_SCOPE void TkpRetainRegion(Region r);
+MODULE_SCOPE void TkpReleaseRegion(Region r);
MODULE_SCOPE void TkpShiftButton(NSButton *button, NSPoint delta);
MODULE_SCOPE Bool TkpAppIsDrawing(void);
MODULE_SCOPE void TkpDisplayWindow(Tk_Window tkwin);
diff --git a/macosx/tkMacOSXKeyboard.c b/macosx/tkMacOSXKeyboard.c
index b2c78d3..e91dfe2 100644
--- a/macosx/tkMacOSXKeyboard.c
+++ b/macosx/tkMacOSXKeyboard.c
@@ -12,7 +12,7 @@
*/
#include "tkMacOSXPrivate.h"
-#include "tkMacOSXEvent.h"
+#include "tkMacOSXInt.h"
#include "tkMacOSXConstants.h"
/*
* A couple of simple definitions to make code a bit more self-explaining.
@@ -358,10 +358,10 @@ KeycodeToUnicode(
KeySym
XKeycodeToKeysym(
Display* display,
- KeyCode keycode,
+ unsigned int keycode,
int index)
{
- register Tcl_HashEntry *hPtr;
+ Tcl_HashEntry *hPtr;
int newKeycode;
UniChar newChar;
diff --git a/macosx/tkMacOSXMenubutton.c b/macosx/tkMacOSXMenubutton.c
index 53adb01..2e2838d 100644
--- a/macosx/tkMacOSXMenubutton.c
+++ b/macosx/tkMacOSXMenubutton.c
@@ -246,7 +246,7 @@ TkpDestroyMenuButton(
void
TkpComputeMenuButtonGeometry(butPtr)
- register TkMenuButton *butPtr; /* Widget record for menu button. */
+ TkMenuButton *butPtr; /* Widget record for menu button. */
{
int width, height, avgWidth, haveImage = 0, haveText = 0;
int txtWidth, txtHeight;
diff --git a/macosx/tkMacOSXMenus.c b/macosx/tkMacOSXMenus.c
index 1c033a4..82bcda7 100644
--- a/macosx/tkMacOSXMenus.c
+++ b/macosx/tkMacOSXMenus.c
@@ -322,19 +322,18 @@ static Tcl_Obj *
GetWidgetDemoPath(
Tcl_Interp *interp)
{
- Tcl_Obj *libpath, *result = NULL;
+ Tcl_Obj *result = NULL;
- libpath = Tcl_GetVar2Ex(interp, "tk_library", NULL, TCL_GLOBAL_ONLY);
- if (libpath) {
- Tcl_Obj *demo[2] = { Tcl_NewStringObj("demos", 5),
- Tcl_NewStringObj("widget", 6) };
+ if (Tcl_EvalEx(interp, "::tk::pkgconfig get demodir,runtime",
+ -1, TCL_EVAL_GLOBAL) == TCL_OK) {
+ Tcl_Obj *libpath, *demo[1] = { Tcl_NewStringObj("widget", 6) };
+ libpath = Tcl_GetObjResult(interp);
Tcl_IncrRefCount(libpath);
- result = Tcl_FSJoinToPath(libpath, 2, demo);
+ result = Tcl_FSJoinToPath(libpath, 1, demo);
Tcl_DecrRefCount(libpath);
- } else {
- Tcl_ResetResult(interp);
}
+ Tcl_ResetResult(interp);
return result;
}
diff --git a/macosx/tkMacOSXMouseEvent.c b/macosx/tkMacOSXMouseEvent.c
index 0ad8492..b18b4ef 100644
--- a/macosx/tkMacOSXMouseEvent.c
+++ b/macosx/tkMacOSXMouseEvent.c
@@ -13,7 +13,7 @@
#include "tkMacOSXPrivate.h"
#include "tkMacOSXWm.h"
-#include "tkMacOSXEvent.h"
+#include "tkMacOSXInt.h"
#include "tkMacOSXDebug.h"
#include "tkMacOSXConstants.h"
@@ -95,7 +95,7 @@ enum {
if (eventWindow) {
local = [theEvent locationInWindow];
global = [eventWindow tkConvertPointToScreen: local];
- tkwin = TkMacOSXGetCapture();
+ tkwin = TkpGetCapture();
if (tkwin) {
winPtr = (TkWindow *) tkwin;
eventWindow = TkMacOSXDrawableWindow(winPtr->window);
@@ -114,7 +114,7 @@ enum {
*/
global = [theEvent locationInWindow];
- tkwin = TkMacOSXGetCapture();
+ tkwin = TkpGetCapture();
if (tkwin) {
winPtr = (TkWindow *) tkwin;
eventWindow = TkMacOSXDrawableWindow(winPtr->window);
@@ -218,8 +218,10 @@ enum {
typeUInt32, NULL, sizeof(UInt32), NULL, &buttons);
if (err == noErr) {
- state |= (buttons & 0x1F) * Button1Mask;
- } else if (button <= Button5) {
+ state |= (buttons & 0x7F) * Button1Mask;
+ /* Handle buttons 8/9 */
+ state |= (buttons & 0x180) * (Button8Mask >> 7);
+ } else if (button <= Button9) {
switch (eventType) {
case NSLeftMouseDown:
case NSRightMouseDown:
@@ -396,10 +398,12 @@ ButtonModifiers2State(
unsigned int state;
/*
- * Tk on OSX supports at most 5 buttons.
+ * Tk on OSX supports at most 9 buttons.
*/
- state = (buttonState & 0x1F) * Button1Mask;
+ state = (buttonState & 0x7F) * Button1Mask;
+ /* Handle buttons 8/9 */
+ state |= (buttonState & 0x180) * (Button8Mask >> 7);
if (keyModifiers & alphaLock) {
state |= LockMask;
@@ -619,7 +623,7 @@ GenerateButtonEvent(
if ((medPtr->activeNonFloating == NULL)
|| ((!(TkpIsWindowFloating(medPtr->whichWin))
&& (medPtr->activeNonFloating != medPtr->whichWin))
- && TkMacOSXGetCapture() == NULL)) {
+ && TkpGetCapture() == NULL)) {
return false;
}
#endif
@@ -715,7 +719,7 @@ TkpSetCapture(
/*
*----------------------------------------------------------------------
*
- * TkMacOSXGetCapture --
+ * TkpGetCapture --
*
* Results:
* Returns the current grab window
@@ -727,7 +731,7 @@ TkpSetCapture(
*/
Tk_Window
-TkMacOSXGetCapture(void)
+TkpGetCapture(void)
{
return captureWinPtr;
}
diff --git a/macosx/tkMacOSXNotify.c b/macosx/tkMacOSXNotify.c
index afee942..098fe4c 100644
--- a/macosx/tkMacOSXNotify.c
+++ b/macosx/tkMacOSXNotify.c
@@ -14,7 +14,7 @@
*/
#include "tkMacOSXPrivate.h"
-#include "tkMacOSXEvent.h"
+#include "tkMacOSXInt.h"
#include "tkMacOSXConstants.h"
#include <tclInt.h>
#import <objc/objc-auto.h>
@@ -173,7 +173,7 @@ GetRunLoopMode(NSModalSession modalSession)
if (modalSession) {
runLoopMode = NSModalPanelRunLoopMode;
- } else if (TkMacOSXGetCapture()) {
+ } else if (TkpGetCapture()) {
runLoopMode = NSEventTrackingRunLoopMode;
}
if (!runLoopMode) {
diff --git a/macosx/tkMacOSXPort.h b/macosx/tkMacOSXPort.h
index 71797b0..cddeede 100644
--- a/macosx/tkMacOSXPort.h
+++ b/macosx/tkMacOSXPort.h
@@ -49,6 +49,9 @@
# include <inttypes.h>
#endif
#include <unistd.h>
+#if defined(__GNUC__) && !defined(__cplusplus)
+# pragma GCC diagnostic ignored "-Wc++-compat"
+#endif
#include <X11/Xlib.h>
#include <X11/cursorfont.h>
#include <X11/keysym.h>
@@ -108,26 +111,6 @@
#define REDO_KEYSYM_LOOKUP
/*
- * Defines for X functions that are used by Tk but are treated as
- * no-op functions on the Macintosh.
- */
-
-#undef XFlush
-#define XFlush(display) (0)
-#undef XFree
-#define XFree(data) (((data) != NULL) ? (ckfree(data),0) : 0)
-#undef XGrabServer
-#define XGrabServer(display) (0)
-#undef XNoOp
-#define XNoOp(display) (display->request++,0)
-#undef XUngrabServer
-#define XUngrabServer(display) (0)
-#undef XSynchronize
-#define XSynchronize(display, onoff) (display->request++,NULL)
-#undef XVisualIDFromVisual
-#define XVisualIDFromVisual(visual) (visual->visualid)
-
-/*
* The following functions are not used on the Mac, so we stub them out.
*/
@@ -137,17 +120,6 @@
#define TkpSync(display)
/*
- * TkMacOSXGetCapture is a legacy function used on the Mac. When fixing
- * [943d5ebe51], TkpGetCapture was added to the Windows port. Both
- * are actually the same feature and should bear the same name. However,
- * in order to avoid potential backwards incompatibilities, renaming
- * TkMacOSXGetCapture into TkpGetCapture in *PlatDecls.h shall not be
- * done in a patch release, therefore use a define here.
- */
-
-#define TkpGetCapture TkMacOSXGetCapture
-
-/*
* This macro stores a representation of the window handle in a string.
*/
diff --git a/macosx/tkMacOSXPrivate.h b/macosx/tkMacOSXPrivate.h
index 64a0cd3..7f291f1 100644
--- a/macosx/tkMacOSXPrivate.h
+++ b/macosx/tkMacOSXPrivate.h
@@ -115,9 +115,10 @@
* Macro abstracting use of TkMacOSXGetNamedSymbol to init named symbols.
*/
+#define UNINITIALISED_SYMBOL ((void*)(-1L))
#define TkMacOSXInitNamedSymbol(module, ret, symbol, ...) \
- static ret (* symbol)(__VA_ARGS__) = (void*)(-1L); \
- if (symbol == (void*)(-1L)) { \
+ static ret (* symbol)(__VA_ARGS__) = UNINITIALISED_SYMBOL; \
+ if (symbol == UNINITIALISED_SYMBOL) { \
symbol = TkMacOSXGetNamedSymbol(STRINGIFY(module), \
STRINGIFY(symbol)); \
}
@@ -143,10 +144,9 @@ MODULE_SCOPE long tkMacOSXMacOSXVersion;
* Prototypes for TkMacOSXRegion.c.
*/
-MODULE_SCOPE HIShapeRef TkMacOSXGetNativeRegion(TkRegion r);
-MODULE_SCOPE void TkMacOSXSetWithNativeRegion(TkRegion r,
+MODULE_SCOPE HIShapeRef TkMacOSXGetNativeRegion(Region r);
+MODULE_SCOPE void TkMacOSXSetWithNativeRegion(Region r,
HIShapeRef rgn);
-MODULE_SCOPE void TkMacOSXOffsetRegion(TkRegion r, short dx, short dy);
MODULE_SCOPE HIShapeRef TkMacOSXHIShapeCreateEmpty(void);
MODULE_SCOPE HIMutableShapeRef TkMacOSXHIShapeCreateMutableWithRect(
const CGRect *inRect);
@@ -430,9 +430,7 @@ VISIBILITY_HIDDEN
@end
#endif /* _TKMACPRIV */
-
-int TkMacOSXGetAppPath(ClientData cd, Tcl_Interp *ip, int objc, Tcl_Obj *const objv[]);
-
+
/*
* Local Variables:
* mode: objc
diff --git a/macosx/tkMacOSXRegion.c b/macosx/tkMacOSXRegion.c
index db19c94..0a5ff6d 100644
--- a/macosx/tkMacOSXRegion.c
+++ b/macosx/tkMacOSXRegion.c
@@ -17,7 +17,7 @@
/*
*----------------------------------------------------------------------
*
- * TkCreateRegion --
+ * XCreateRegion --
*
* Implements the equivelent of the X window function XCreateRegion. See
* Xwindow documentation for more details.
@@ -31,16 +31,16 @@
*----------------------------------------------------------------------
*/
-TkRegion
-TkCreateRegion(void)
+Region
+XCreateRegion(void)
{
- return (TkRegion) HIShapeCreateMutable();
+ return (Region) HIShapeCreateMutable();
}
/*
*----------------------------------------------------------------------
*
- * TkDestroyRegion --
+ * XDestroyRegion --
*
* Implements the equivelent of the X window function XDestroyRegion. See
* Xwindow documentation for more details.
@@ -55,8 +55,8 @@ TkCreateRegion(void)
*/
int
-TkDestroyRegion(
- TkRegion r)
+XDestroyRegion(
+ Region r)
{
if (r) {
CFRelease(r);
@@ -67,7 +67,7 @@ TkDestroyRegion(
/*
*----------------------------------------------------------------------
*
- * TkIntersectRegion --
+ * XIntersectRegion --
*
* Implements the equivalent of the X window function XIntersectRegion.
* See Xwindow documentation for more details.
@@ -82,10 +82,10 @@ TkDestroyRegion(
*/
int
-TkIntersectRegion(
- TkRegion sra,
- TkRegion srb,
- TkRegion dr_return)
+XIntersectRegion(
+ Region sra,
+ Region srb,
+ Region dr_return)
{
ChkErr(HIShapeIntersect, (HIShapeRef) sra, (HIShapeRef) srb,
(HIMutableShapeRef) dr_return);
@@ -95,7 +95,7 @@ TkIntersectRegion(
/*
*----------------------------------------------------------------------
*
- * TkSubtractRegion --
+ * XSubtractRegion --
*
* Implements the equivalent of the X window function XSubtractRegion.
* See X window documentation for more details.
@@ -110,10 +110,10 @@ TkIntersectRegion(
*/
int
-TkSubtractRegion(
- TkRegion sra,
- TkRegion srb,
- TkRegion dr_return)
+XSubtractRegion(
+ Region sra,
+ Region srb,
+ Region dr_return)
{
ChkErr(HIShapeDifference, (HIShapeRef) sra, (HIShapeRef) srb,
(HIMutableShapeRef) dr_return);
@@ -123,7 +123,7 @@ TkSubtractRegion(
/*
*----------------------------------------------------------------------
*
- * TkUnionRectWithRegion --
+ * XUnionRectWithRegion --
*
* Implements the equivelent of the X window function
* XUnionRectWithRegion. See Xwindow documentation for more details.
@@ -138,10 +138,10 @@ TkSubtractRegion(
*/
int
-TkUnionRectWithRegion(
+XUnionRectWithRegion(
XRectangle* rectangle,
- TkRegion src_region,
- TkRegion dest_region_return)
+ Region src_region,
+ Region dest_region_return)
{
const CGRect r = CGRectMake(rectangle->x, rectangle->y,
rectangle->width, rectangle->height);
@@ -177,7 +177,7 @@ TkUnionRectWithRegion(
static int
TkMacOSXIsEmptyRegion(
- TkRegion r)
+ Region r)
{
return HIShapeIsEmpty((HIMutableShapeRef) r) ? 1 : 0;
}
@@ -185,7 +185,7 @@ TkMacOSXIsEmptyRegion(
/*
*----------------------------------------------------------------------
*
- * TkRectInRegion --
+ * XRectInRegion --
*
* Implements the equivelent of the X window function XRectInRegion. See
* Xwindow documentation for more details.
@@ -201,8 +201,8 @@ TkMacOSXIsEmptyRegion(
*/
int
-TkRectInRegion(
- TkRegion region,
+XRectInRegion(
+ Region region,
int x,
int y,
unsigned int width,
@@ -221,7 +221,7 @@ TkRectInRegion(
/*
*----------------------------------------------------------------------
*
- * TkClipBox --
+ * XClipBox --
*
* Implements the equivelent of the X window function XClipBox. See
* Xwindow documentation for more details.
@@ -236,8 +236,8 @@ TkRectInRegion(
*/
int
-TkClipBox(
- TkRegion r,
+XClipBox(
+ Region r,
XRectangle *rect_return)
{
CGRect rect;
@@ -269,7 +269,7 @@ TkClipBox(
void
TkpBuildRegionFromAlphaData(
- TkRegion region, /* Region to update. */
+ Region region, /* Region to update. */
unsigned int x, /* Where in region to update. */
unsigned int y, /* Where in region to update. */
unsigned int width, /* Size of rectangle to update. */
@@ -310,7 +310,7 @@ TkpBuildRegionFromAlphaData(
rect.y = y + y1;
rect.width = end - x1;
rect.height = 1;
- TkUnionRectWithRegion(&rect, region, region);
+ XUnionRectWithRegion(&rect, region, region);
}
}
dataPtr += lineStride;
@@ -335,7 +335,7 @@ TkpBuildRegionFromAlphaData(
void
TkpRetainRegion(
- TkRegion r)
+ Region r)
{
CFRetain(r);
}
@@ -358,7 +358,7 @@ TkpRetainRegion(
void
TkpReleaseRegion(
- TkRegion r)
+ Region r)
{
CFRelease(r);
}
@@ -381,7 +381,7 @@ TkpReleaseRegion(
void
TkMacOSXSetEmptyRegion(
- TkRegion r)
+ Region r)
{
ChkErr(HIShapeSetEmpty, (HIMutableShapeRef) r);
}
@@ -404,7 +404,7 @@ TkMacOSXSetEmptyRegion(
HIShapeRef
TkMacOSXGetNativeRegion(
- TkRegion r)
+ Region r)
{
return (HIShapeRef) CFRetain(r);
}
@@ -427,7 +427,7 @@ TkMacOSXGetNativeRegion(
void
TkMacOSXSetWithNativeRegion(
- TkRegion r,
+ Region r,
HIShapeRef rgn)
{
ChkErr(TkMacOSXHIShapeSetWithShape, (HIMutableShapeRef) r, rgn);
@@ -436,7 +436,7 @@ TkMacOSXSetWithNativeRegion(
/*
*----------------------------------------------------------------------
*
- * TkMacOSXOffsetRegion --
+ * XOffsetRegion --
*
* Offsets region by given distances.
*
@@ -449,13 +449,14 @@ TkMacOSXSetWithNativeRegion(
*----------------------------------------------------------------------
*/
-void
-TkMacOSXOffsetRegion(
- TkRegion r,
- short dx,
- short dy)
+int
+XOffsetRegion(
+ Region r,
+ int dx,
+ int dy)
{
ChkErr(HIShapeOffset, (HIMutableShapeRef) r, dx, dy);
+ return Success;
}
/*
diff --git a/macosx/tkMacOSXScrlbr.c b/macosx/tkMacOSXScrlbr.c
index ce7ac58..dff6cc9 100644
--- a/macosx/tkMacOSXScrlbr.c
+++ b/macosx/tkMacOSXScrlbr.c
@@ -246,9 +246,9 @@ void
TkpDisplayScrollbar(
ClientData clientData) /* Information about window. */
{
- register TkScrollbar *scrollPtr = clientData;
+ TkScrollbar *scrollPtr = clientData;
MacScrollbar *msPtr = (MacScrollbar *) scrollPtr;
- register Tk_Window tkwin = scrollPtr->tkwin;
+ Tk_Window tkwin = scrollPtr->tkwin;
TkWindow *winPtr = (TkWindow *) tkwin;
TkMacOSXDrawingContext dc;
@@ -354,7 +354,7 @@ TkpDisplayScrollbar(
extern void
TkpComputeScrollbarGeometry(
- register TkScrollbar *scrollPtr)
+ TkScrollbar *scrollPtr)
/* Scrollbar whose geometry may have
* changed. */
{
@@ -484,7 +484,7 @@ TkpDestroyScrollbar(
void
TkpConfigureScrollbar(
- register TkScrollbar *scrollPtr)
+ TkScrollbar *scrollPtr)
{
/* empty */
}
@@ -509,7 +509,7 @@ TkpConfigureScrollbar(
int
TkpScrollbarPosition(
- register TkScrollbar *scrollPtr,
+ TkScrollbar *scrollPtr,
/* Scrollbar widget record. */
int x, int y) /* Coordinates within scrollPtr's window. */
{
@@ -519,7 +519,7 @@ TkpScrollbarPosition(
*/
int length, width, tmp;
- register const int inset = scrollPtr->inset;
+ const int inset = scrollPtr->inset;
if (scrollPtr->vertical) {
length = Tk_Height(scrollPtr->tkwin);
diff --git a/macosx/tkMacOSXServices.c b/macosx/tkMacOSXServices.c
index 0434f10..e92158f 100644
--- a/macosx/tkMacOSXServices.c
+++ b/macosx/tkMacOSXServices.c
@@ -43,8 +43,8 @@ ServicesEventProc(
- (void) provideService:(NSPasteboard *)pboard
userData:(NSString *)data
error:(NSString **)error;
-- (BOOL)writeSelectionToPasteboard:(NSPasteboard *)pboard
- types:(NSArray *)types;
+- (BOOL) writeSelectionToPasteboard:(NSPasteboard *)pboard
+ types:(NSArray *)types;
@end
@@ -131,6 +131,7 @@ ServicesEventProc(
@end
/*
+
* Instantiate a TkService object and register it with the NSApplication.
* This is called exactly one time from TkpInit.
*/
diff --git a/macosx/tkMacOSXSubwindows.c b/macosx/tkMacOSXSubwindows.c
index 5063fa3..5cbbbf1 100644
--- a/macosx/tkMacOSXSubwindows.c
+++ b/macosx/tkMacOSXSubwindows.c
@@ -615,7 +615,6 @@ XRaiseWindow(
return Success;
}
-#if 0
/*
*----------------------------------------------------------------------
*
@@ -632,7 +631,7 @@ XRaiseWindow(
*----------------------------------------------------------------------
*/
-void
+int
XLowerWindow(
Display *display, /* Display. */
Window window) /* Window. */
@@ -643,12 +642,12 @@ XLowerWindow(
if (Tk_IsTopLevel(macWin->winPtr) && !Tk_IsEmbedded(macWin->winPtr)) {
TkWmRestackToplevel(macWin->winPtr, Below, NULL);
} else {
- /*
+ /*
* TODO: this should generate damage
*/
}
+ return Success;
}
-#endif
/*
*----------------------------------------------------------------------
@@ -856,7 +855,7 @@ TkMacOSXUpdateClipRgn(
ChkErr(HIShapeIntersect,
win2Ptr->privatePtr->aboveVisRgn, rgn, rgn);
} else if (tkMacOSXEmbedHandler != NULL) {
- TkRegion r = TkCreateRegion();
+ Region r = XCreateRegion();
HIShapeRef visRgn;
tkMacOSXEmbedHandler->getClipProc((Tk_Window) winPtr, r);
@@ -947,7 +946,7 @@ TkMacOSXUpdateClipRgn(
*
* This function returns the Macintosh clipping region for the given
* window. The caller is responsible for disposing of the returned region
- * via TkDestroyRegion().
+ * via XDestroyRegion().
*
* Results:
* The region.
@@ -958,14 +957,14 @@ TkMacOSXUpdateClipRgn(
*----------------------------------------------------------------------
*/
-TkRegion
+Region
TkMacOSXVisableClipRgn(
TkWindow *winPtr)
{
if (winPtr->privatePtr->flags & TK_CLIP_INVALID) {
TkMacOSXUpdateClipRgn(winPtr);
}
- return (TkRegion) HIShapeCreateMutableCopy(winPtr->privatePtr->visRgn);
+ return (Region) HIShapeCreateMutableCopy(winPtr->privatePtr->visRgn);
}
/*
diff --git a/macosx/tkMacOSXTest.c b/macosx/tkMacOSXTest.c
index c353efe..59320a0 100644
--- a/macosx/tkMacOSXTest.c
+++ b/macosx/tkMacOSXTest.c
@@ -145,7 +145,7 @@ TkTestLogDisplay(void) {
/* ARGSUSED */
static int
PressButtonObjCmd(
- ClientData clientData,
+ ClientData dummy,
Tcl_Interp *interp,
int objc,
Tcl_Obj *const objv[])
@@ -157,6 +157,7 @@ PressButtonObjCmd(
NSArray *screens = [NSScreen screens];
CGFloat ScreenHeight = 0;
enum {X=1, Y};
+ (void)dummy;
if (screens && [screens count]) {
ScreenHeight = [[screens objectAtIndex:0] frame].size.height;
diff --git a/macosx/tkMacOSXWindowEvent.c b/macosx/tkMacOSXWindowEvent.c
index be3439f..d9ad52f 100644
--- a/macosx/tkMacOSXWindowEvent.c
+++ b/macosx/tkMacOSXWindowEvent.c
@@ -15,7 +15,7 @@
#include "tkMacOSXPrivate.h"
#include "tkMacOSXWm.h"
-#include "tkMacOSXEvent.h"
+#include "tkMacOSXInt.h"
#include "tkMacOSXDebug.h"
#include "tkMacOSXConstants.h"
@@ -903,7 +903,7 @@ RedisplayView(
ClientData clientdata)
{
NSView *view = (NSView *) clientdata;
-
+
/*
* Make sure that we are not trying to displaying a view that no longer
* exists. Must call [NSApp windows] because [NSApp orderedWindows] excludes
diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c
index ceb3f3f..4e53282 100644
--- a/macosx/tkMacOSXWm.c
+++ b/macosx/tkMacOSXWm.c
@@ -18,7 +18,7 @@
#include "tkMacOSXPrivate.h"
#include "tkScrollbar.h"
#include "tkMacOSXWm.h"
-#include "tkMacOSXEvent.h"
+#include "tkMacOSXInt.h"
#include "tkMacOSXDebug.h"
#include "tkMacOSXConstants.h"
@@ -1117,7 +1117,7 @@ Tk_WmObjCmd(
return TCL_ERROR;
}
if (objc == 2) {
- Tcl_SetObjResult(interp, Tcl_NewBooleanObj(wmTracing));
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(wmTracing != 0));
return TCL_OK;
}
return Tcl_GetBooleanFromObj(interp, objv[2], &wmTracing);
@@ -1241,7 +1241,7 @@ WmAspectCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
int numer1, denom1, numer2, denom2;
if ((objc != 3) && (objc != 7)) {
@@ -1253,10 +1253,10 @@ WmAspectCmd(
if (wmPtr->sizeHintsFlags & PAspect) {
Tcl_Obj *results[4];
- results[0] = Tcl_NewIntObj(wmPtr->minAspect.x);
- results[1] = Tcl_NewIntObj(wmPtr->minAspect.y);
- results[2] = Tcl_NewIntObj(wmPtr->maxAspect.x);
- results[3] = Tcl_NewIntObj(wmPtr->maxAspect.y);
+ results[0] = Tcl_NewWideIntObj(wmPtr->minAspect.x);
+ results[1] = Tcl_NewWideIntObj(wmPtr->minAspect.y);
+ results[2] = Tcl_NewWideIntObj(wmPtr->maxAspect.x);
+ results[3] = Tcl_NewWideIntObj(wmPtr->maxAspect.y);
Tcl_SetObjResult(interp, Tcl_NewListObj(4, results));
}
return TCL_OK;
@@ -1456,23 +1456,23 @@ WmGetAttribute(
result = Tcl_NewDoubleObj([macWindow alphaValue]);
break;
case WMATT_FULLSCREEN:
- result = Tcl_NewBooleanObj(wmPtr->flags & WM_FULLSCREEN);
+ result = Tcl_NewWideIntObj((wmPtr->flags & WM_FULLSCREEN) != 0);
break;
case WMATT_MODIFIED:
- result = Tcl_NewBooleanObj([macWindow isDocumentEdited]);
+ result = Tcl_NewWideIntObj([macWindow isDocumentEdited] != 0);
break;
case WMATT_NOTIFY:
- result = Tcl_NewBooleanObj(tkMacOSXWmAttrNotifyVal);
+ result = Tcl_NewWideIntObj(tkMacOSXWmAttrNotifyVal != 0);
break;
case WMATT_TITLEPATH:
result = Tcl_NewStringObj([[macWindow representedFilename] UTF8String],
-1);
break;
case WMATT_TOPMOST:
- result = Tcl_NewBooleanObj(wmPtr->flags & WM_TOPMOST);
+ result = Tcl_NewWideIntObj((wmPtr->flags & WM_TOPMOST) != 0);
break;
case WMATT_TRANSPARENT:
- result = Tcl_NewBooleanObj(wmPtr->flags & WM_TRANSPARENT);
+ result = Tcl_NewWideIntObj((wmPtr->flags & WM_TRANSPARENT) != 0);
break;
case WMATT_TYPE:
result = Tcl_NewStringObj("unsupported", -1);
@@ -1581,7 +1581,7 @@ WmClientCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
char *argv3;
int length;
@@ -1637,7 +1637,7 @@ WmColormapwindowsCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
TkWindow **cmapList, *winPtr2;
int i, windowObjc, gotToplevel = 0;
Tcl_Obj **windowObjv, *resultObj;
@@ -1726,7 +1726,7 @@ WmCommandCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
int len;
if ((objc != 3) && (objc != 4)) {
@@ -1783,7 +1783,7 @@ WmDeiconifyCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
NSWindow *win = TkMacOSXDrawableWindow(winPtr->window);
if (objc != 3) {
@@ -1862,7 +1862,7 @@ WmFocusmodelCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
static const char *const optionStrings[] = {
"active", "passive", NULL };
enum options {
@@ -1916,7 +1916,7 @@ WmForgetCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register Tk_Window frameWin = (Tk_Window) winPtr;
+ Tk_Window frameWin = (Tk_Window) winPtr;
if (Tk_IsTopLevel(frameWin)) {
MacDrawable *macWin;
@@ -1982,7 +1982,7 @@ WmFrameCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
Window window;
char buf[TCL_INTEGER_SPACE];
@@ -2024,7 +2024,7 @@ WmGeometryCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
NSWindow *win = TkMacOSXDrawableWindow(winPtr->window);
char xSign = '+', ySign = '+';
int width, height, x = wmPtr->x, y= wmPtr->y;
@@ -2095,7 +2095,7 @@ WmGridCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
int reqWidth, reqHeight, widthInc, heightInc;
const char *errorMsg;
@@ -2108,10 +2108,10 @@ WmGridCmd(
if (wmPtr->sizeHintsFlags & PBaseSize) {
Tcl_Obj *results[4];
- results[0] = Tcl_NewIntObj(wmPtr->reqGridWidth);
- results[1] = Tcl_NewIntObj(wmPtr->reqGridHeight);
- results[2] = Tcl_NewIntObj(wmPtr->widthInc);
- results[3] = Tcl_NewIntObj(wmPtr->heightInc);
+ results[0] = Tcl_NewWideIntObj(wmPtr->reqGridWidth);
+ results[1] = Tcl_NewWideIntObj(wmPtr->reqGridHeight);
+ results[2] = Tcl_NewWideIntObj(wmPtr->widthInc);
+ results[3] = Tcl_NewWideIntObj(wmPtr->heightInc);
Tcl_SetObjResult(interp, Tcl_NewListObj(4, results));
}
return TCL_OK;
@@ -2189,7 +2189,7 @@ WmGroupCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
Tk_Window tkwin2;
char *argv3;
int length;
@@ -2253,7 +2253,7 @@ WmIconbitmapCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
Pixmap pixmap;
char *str;
int len;
@@ -2322,7 +2322,7 @@ WmIconifyCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
if (objc != 3) {
Tcl_WrongNumArgs(interp, 2, objv, "window");
return TCL_ERROR;
@@ -2403,7 +2403,7 @@ WmIconmaskCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
Pixmap pixmap;
char *argv3;
@@ -2463,7 +2463,7 @@ WmIconnameCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
const char *argv3;
int length;
@@ -2534,7 +2534,7 @@ WmIconphotoCmd(
isDefault = 1;
if (objc == 4) {
Tcl_WrongNumArgs(interp, 2, objv,
- "window ?-default? image1 ?image2 ...?");
+ "window ?-default? image1 ?image2 ...?");
return TCL_ERROR;
}
}
@@ -2605,7 +2605,7 @@ WmIconpositionCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
int x, y;
if ((objc != 3) && (objc != 5)) {
@@ -2617,8 +2617,8 @@ WmIconpositionCmd(
if (wmPtr->hints.flags & IconPositionHint) {
Tcl_Obj *results[2];
- results[0] = Tcl_NewIntObj(wmPtr->hints.icon_x);
- results[1] = Tcl_NewIntObj(wmPtr->hints.icon_y);
+ results[0] = Tcl_NewWideIntObj(wmPtr->hints.icon_x);
+ results[1] = Tcl_NewWideIntObj(wmPtr->hints.icon_y);
Tcl_SetObjResult(interp, Tcl_NewListObj(2, results));
}
return TCL_OK;
@@ -2663,7 +2663,7 @@ WmIconwindowCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
Tk_Window tkwin2;
WmInfo *wmPtr2;
@@ -2766,8 +2766,8 @@ WmManageCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register Tk_Window frameWin = (Tk_Window) winPtr;
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ Tk_Window frameWin = (Tk_Window) winPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
if (!Tk_IsTopLevel(frameWin)) {
MacDrawable *macWin = (MacDrawable *) winPtr->window;
@@ -2830,7 +2830,7 @@ WmMaxsizeCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
int width, height;
if ((objc != 3) && (objc != 5)) {
@@ -2842,8 +2842,8 @@ WmMaxsizeCmd(
Tcl_Obj *results[2];
GetMaxSize(winPtr, &width, &height);
- results[0] = Tcl_NewIntObj(width);
- results[1] = Tcl_NewIntObj(height);
+ results[0] = Tcl_NewWideIntObj(width);
+ results[1] = Tcl_NewWideIntObj(height);
Tcl_SetObjResult(interp, Tcl_NewListObj(2, results));
return TCL_OK;
}
@@ -2884,7 +2884,7 @@ WmMinsizeCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
int width, height;
if ((objc != 3) && (objc != 5)) {
@@ -2896,8 +2896,8 @@ WmMinsizeCmd(
Tcl_Obj *results[2];
GetMinSize(winPtr, &width, &height);
- results[0] = Tcl_NewIntObj(width);
- results[1] = Tcl_NewIntObj(height);
+ results[0] = Tcl_NewWideIntObj(width);
+ results[1] = Tcl_NewWideIntObj(height);
Tcl_SetObjResult(interp, Tcl_NewListObj(2, results));
return TCL_OK;
}
@@ -2948,8 +2948,8 @@ WmOverrideredirectCmd(
}
if (objc == 3) {
- Tcl_SetObjResult(interp, Tcl_NewBooleanObj(
- Tk_Attributes((Tk_Window) winPtr)->override_redirect));
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(
+ Tk_Attributes((Tk_Window) winPtr)->override_redirect != 0));
return TCL_OK;
}
@@ -2987,7 +2987,7 @@ WmPositionfromCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
static const char *const optionStrings[] = {
"program", "user", NULL };
enum options {
@@ -3053,8 +3053,8 @@ WmProtocolCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
- register ProtocolHandler *protPtr, *prevPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
+ ProtocolHandler *protPtr, *prevPtr;
Atom protocol;
char *cmd;
int cmdLength;
@@ -3154,7 +3154,7 @@ WmResizableCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
int width, height;
UInt64 oldAttributes = wmPtr->attributes;
int oldFlags = wmPtr->flags;
@@ -3167,8 +3167,10 @@ WmResizableCmd(
if (objc == 3) {
Tcl_Obj *results[2];
- results[0] = Tcl_NewBooleanObj(!(wmPtr->flags & WM_WIDTH_NOT_RESIZABLE));
- results[1] = Tcl_NewBooleanObj(!(wmPtr->flags & WM_HEIGHT_NOT_RESIZABLE));
+ results[0] = Tcl_NewWideIntObj(
+ (wmPtr->flags & WM_WIDTH_NOT_RESIZABLE) == 0);
+ results[1] = Tcl_NewWideIntObj(
+ (wmPtr->flags & WM_HEIGHT_NOT_RESIZABLE) == 0);
Tcl_SetObjResult(interp, Tcl_NewListObj(2, results));
return TCL_OK;
}
@@ -3231,7 +3233,7 @@ WmSizefromCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
static const char *const optionStrings[] = {
"program", "user", NULL };
enum options {
@@ -3393,7 +3395,7 @@ WmStackorderCmd(
} else { /* OPT_ISBELOW */
result = index1 < index2;
}
- Tcl_SetObjResult(interp, Tcl_NewBooleanObj(result));
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj(result != 0));
return TCL_OK;
}
}
@@ -3423,7 +3425,7 @@ WmStateCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
static const char *const optionStrings[] = {
"normal", "iconic", "withdrawn", "zoomed", NULL };
enum options {
@@ -3543,7 +3545,7 @@ WmTitleCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
char *argv3;
int length;
@@ -3591,7 +3593,7 @@ WmTransientCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
Tk_Window master;
TkWindow *masterPtr, *w;
WmInfo *wmPtr2;
@@ -3719,7 +3721,7 @@ RemoveTransient(
if (wmPtr == NULL || wmPtr->master == NULL) {
return;
}
- masterPtr = (TkWindow*)wmPtr->master;
+ masterPtr = (TkWindow *) wmPtr->master;
wmPtr2 = masterPtr->wmInfoPtr;
if (wmPtr2 == NULL) {
return;
@@ -3771,7 +3773,7 @@ WmWithdrawCmd(
int objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
- register WmInfo *wmPtr = winPtr->wmInfoPtr;
+ WmInfo *wmPtr = winPtr->wmInfoPtr;
if (objc != 3) {
Tcl_WrongNumArgs(interp, 2, objv, "window");
diff --git a/macosx/tkMacOSXXStubs.c b/macosx/tkMacOSXXStubs.c
index 6aeec36..77d05c3 100644
--- a/macosx/tkMacOSXXStubs.c
+++ b/macosx/tkMacOSXXStubs.c
@@ -16,7 +16,7 @@
*/
#include "tkMacOSXPrivate.h"
-#include "tkMacOSXEvent.h"
+#include "tkMacOSXInt.h"
#include <IOKit/IOKitLib.h>
#include <IOKit/hidsystem/IOHIDShared.h>
@@ -640,6 +640,94 @@ XQueryColor(
return Success;
}
+Bool
+XTranslateCoordinates(
+ Display *display,
+ Window src_w,
+ Window dest_w,
+ int src_x,
+ int src_y,
+ int *dest_x_return,
+ int *dest_y_return,
+ Window *child_return)
+{
+ return 0;
+}
+
+int
+XSetCommand(
+ Display *display,
+ Window w,
+ char **argv,
+ int argc)
+{
+ return Success;
+}
+
+int
+XGetWindowAttributes(
+ Display *display,
+ Window w,
+ XWindowAttributes *window_attributes_return)
+{
+ return Success;
+}
+
+Status
+XGetWMColormapWindows(
+ Display *display,
+ Window w,
+ Window **windows_return,
+ int *count_return)
+{
+ return Success;
+}
+
+int
+XIconifyWindow(
+ Display *display,
+ Window w,
+ int screen_number)
+{
+ return Success;
+}
+
+XHostAddress *
+XListHosts(
+ Display *display,
+ int *nhosts_return,
+ Bool *state_return)
+{
+ return NULL;
+}
+
+int
+XLookupColor(
+ Display *display,
+ Colormap colormap,
+ _Xconst char *color_name,
+ XColor *exact_def_return,
+ XColor *screen_def_return)
+{
+ return Success;
+}
+
+int
+XNextEvent(
+ Display *display,
+ XEvent *event_return)
+{
+ return Success;
+}
+
+int
+XPutBackEvent(
+ Display *display,
+ XEvent *event)
+{
+ return Success;
+}
+
int
XQueryColors(
Display* display,
@@ -703,6 +791,37 @@ XGetWindowProperty(
}
int
+XWindowEvent(
+ Display *display,
+ Window w,
+ long event_mask,
+ XEvent *event_return)
+{
+ return Success;
+}
+
+int
+XWithdrawWindow(
+ Display *display,
+ Window w,
+ int screen_number)
+{
+ return Success;
+}
+
+int
+XmbLookupString(
+ XIC ic,
+ XKeyPressedEvent *event,
+ char *buffer_return,
+ int bytes_buffer,
+ KeySym *keysym_return,
+ Status *status_return)
+{
+ return Success;
+}
+
+int
XRefreshKeyboardMapping(
XMappingEvent *x)
{
@@ -739,24 +858,6 @@ XForceScreenSaver(
return Success;
}
-void
-Tk_FreeXId(
- Display *display,
- XID xid)
-{
- /* no-op function needed for stubs implementation. */
-}
-
-int
-XSync(
- Display *display,
- Bool discard)
-{
- TkMacOSXFlushWindows();
- display->request++;
- return 0;
-}
-
#if 0
int
XSetClipRectangles(
@@ -768,18 +869,18 @@ XSetClipRectangles(
int n,
int ordering)
{
- TkRegion clipRgn = TkCreateRegion();
+ Region clipRgn = XCreateRegion();
while (n--) {
XRectangle rect = *rectangles;
rect.x += clip_x_origin;
rect.y += clip_y_origin;
- TkUnionRectWithRegion(&rect, clipRgn, clipRgn);
+ XUnionRectWithRegion(&rect, clipRgn, clipRgn);
rectangles++;
}
- TkSetRegion(d, gc, clipRgn);
- TkDestroyRegion(clipRgn);
+ XSetRegion(d, gc, clipRgn);
+ XDestroyRegion(clipRgn);
return 1;
}
#endif
@@ -912,7 +1013,7 @@ XStringListToTextProperty(
XTextProperty *text_prop_return)
{
Debugger();
- return (Status) 0;
+ return Success;
}
void
@@ -931,7 +1032,25 @@ XCreateIC(XIM xim, ...)
return (XIC) 0;
}
-#undef XVisualIDFromVisual
+int
+XDeleteProperty(
+ Display *display,
+ Window w,
+ Atom property)
+{
+ return Success;
+}
+
+int
+XGetInputFocus(
+ Display *display,
+ Window *focus_return,
+ int *revert_to_return)
+{
+ display->request++;
+ return Success;
+}
+
VisualID
XVisualIDFromVisual(
Visual *visual)
@@ -939,7 +1058,6 @@ XVisualIDFromVisual(
return visual->visualid;
}
-#undef XSynchronize
XAfterFunction
XSynchronize(
Display *display,
@@ -949,7 +1067,6 @@ XSynchronize(
return NULL;
}
-#undef XUngrabServer
int
XUngrabServer(
Display *display)
@@ -957,7 +1074,14 @@ XUngrabServer(
return 0;
}
-#undef XNoOp
+int
+XFreeCursor(
+ Display *display,
+ Cursor cursor)
+{
+ return Success;
+}
+
int
XNoOp(
Display *display)
@@ -966,7 +1090,6 @@ XNoOp(
return 0;
}
-#undef XGrabServer
int
XGrabServer(
Display *display)
@@ -974,7 +1097,6 @@ XGrabServer(
return 0;
}
-#undef XFree
int
XFree(
void *data)
@@ -984,7 +1106,7 @@ XFree(
}
return 0;
}
-#undef XFlush
+
int
XFlush(
Display *display)
diff --git a/macosx/ttkMacOSXTheme.c b/macosx/ttkMacOSXTheme.c
index 7e8377e..83f48db 100644
--- a/macosx/ttkMacOSXTheme.c
+++ b/macosx/ttkMacOSXTheme.c
@@ -169,7 +169,7 @@ static inline CGRect BoxToRect(
*/
static Ttk_StateTable ThemeStateTable[] = {
- {kThemeStateActive, TTK_STATE_ALTERNATE | TTK_STATE_BACKGROUND},
+ {kThemeStateActive, TTK_STATE_ALTERNATE | TTK_STATE_BACKGROUND, 0},
{kThemeStateUnavailable, TTK_STATE_DISABLED, 0},
{kThemeStatePressed, TTK_STATE_PRESSED, 0},
{kThemeStateInactive, TTK_STATE_BACKGROUND, 0},
@@ -257,6 +257,7 @@ static void GetBackgroundColor(
{
TkWindow *winPtr = (TkWindow *) tkwin;
TkWindow *masterPtr = (TkWindow *) TkGetGeomMaster(tkwin);
+ (void)context;
while (masterPtr && masterPtr->privatePtr) {
if (masterPtr->privatePtr->flags & TTK_HAS_CONTRASTING_BG) {
@@ -1046,6 +1047,7 @@ static void DrawDarkSeparator(
NSColor *fillColor = [NSColor colorWithColorSpace: deviceRGB
components: fill
count:4];
+ (void)tkwin;
CGContextSetFillColorWithColor(context, CGCOLOR(fillColor));
CGContextFillRect(context, bounds);
@@ -1170,6 +1172,7 @@ static void DrawDarkListHeader(
{
NSColorSpace *deviceRGB = [NSColorSpace deviceRGBColorSpace];
NSColor *stroke;
+ (void)tkwin;
CGContextSetStrokeColorSpace(context, deviceRGB.CGColorSpace);
CGFloat x = bounds.origin.x, y = bounds.origin.y;
@@ -1231,7 +1234,7 @@ static ThemeButtonParams
ListHeaderParams =
{kThemeListHeaderButton, kThemeMetricListHeaderHeight};
static Ttk_StateTable ButtonValueTable[] = {
- {kThemeButtonOff, TTK_STATE_ALTERNATE | TTK_STATE_BACKGROUND},
+ {kThemeButtonOff, TTK_STATE_ALTERNATE | TTK_STATE_BACKGROUND, 0},
{kThemeButtonMixed, TTK_STATE_ALTERNATE, 0},
{kThemeButtonOn, TTK_STATE_SELECTED, 0},
{kThemeButtonOff, 0, 0}
@@ -1699,9 +1702,9 @@ typedef struct {
static Ttk_ElementOptionSpec EntryElementOptions[] = {
{"-background", TK_OPTION_BORDER,
- Tk_Offset(EntryElement, backgroundObj), ENTRY_DEFAULT_BACKGROUND},
+ offsetof(EntryElement, backgroundObj), ENTRY_DEFAULT_BACKGROUND},
{"-fieldbackground", TK_OPTION_BORDER,
- Tk_Offset(EntryElement, fieldbackgroundObj), ENTRY_DEFAULT_BACKGROUND},
+ offsetof(EntryElement, fieldbackgroundObj), ENTRY_DEFAULT_BACKGROUND},
{0}
};
@@ -2058,10 +2061,10 @@ typedef struct {
} TrackElement;
static Ttk_ElementOptionSpec TrackElementOptions[] = {
- {"-from", TK_OPTION_DOUBLE, Tk_Offset(TrackElement, fromObj)},
- {"-to", TK_OPTION_DOUBLE, Tk_Offset(TrackElement, toObj)},
- {"-value", TK_OPTION_DOUBLE, Tk_Offset(TrackElement, valueObj)},
- {"-orient", TK_OPTION_STRING, Tk_Offset(TrackElement, orientObj)},
+ {"-from", TK_OPTION_DOUBLE, offsetof(TrackElement, fromObj)},
+ {"-to", TK_OPTION_DOUBLE, offsetof(TrackElement, toObj)},
+ {"-value", TK_OPTION_DOUBLE, offsetof(TrackElement, valueObj)},
+ {"-orient", TK_OPTION_STRING, offsetof(TrackElement, orientObj)},
{0, 0, 0}
};
static void TrackElementSize(
@@ -2089,10 +2092,10 @@ static void TrackElementDraw(
{
TrackElementData *data = clientData;
TrackElement *elem = elementRecord;
- int orientation = TTK_ORIENT_HORIZONTAL;
+ Ttk_Orient orientation = TTK_ORIENT_HORIZONTAL;
double from = 0, to = 100, value = 0, factor;
- Ttk_GetOrientFromObj(NULL, elem->orientObj, &orientation);
+ TtkGetOrientFromObj(NULL, elem->orientObj, &orientation);
Tcl_GetDoubleFromObj(NULL, elem->fromObj, &from);
Tcl_GetDoubleFromObj(NULL, elem->toObj, &to);
Tcl_GetDoubleFromObj(NULL, elem->valueObj, &value);
@@ -2193,15 +2196,15 @@ typedef struct {
static Ttk_ElementOptionSpec PbarElementOptions[] = {
{"-orient", TK_OPTION_STRING,
- Tk_Offset(PbarElement, orientObj), "horizontal"},
+ offsetof(PbarElement, orientObj), "horizontal"},
{"-value", TK_OPTION_DOUBLE,
- Tk_Offset(PbarElement, valueObj), "0"},
+ offsetof(PbarElement, valueObj), "0"},
{"-maximum", TK_OPTION_DOUBLE,
- Tk_Offset(PbarElement, maximumObj), "100"},
+ offsetof(PbarElement, maximumObj), "100"},
{"-phase", TK_OPTION_INT,
- Tk_Offset(PbarElement, phaseObj), "0"},
+ offsetof(PbarElement, phaseObj), "0"},
{"-mode", TK_OPTION_STRING,
- Tk_Offset(PbarElement, modeObj), "determinate"},
+ offsetof(PbarElement, modeObj), "determinate"},
{0, 0, 0, 0}
};
static void PbarElementSize(
@@ -2227,10 +2230,10 @@ static void PbarElementDraw(
Ttk_State state)
{
PbarElement *pbar = elementRecord;
- int orientation = TTK_ORIENT_HORIZONTAL, phase = 0;
+ Ttk_Orient orientation = TTK_ORIENT_HORIZONTAL, phase = 0;
double value = 0, maximum = 100, factor;
- Ttk_GetOrientFromObj(NULL, pbar->orientObj, &orientation);
+ TtkGetOrientFromObj(NULL, pbar->orientObj, &orientation);
Tcl_GetDoubleFromObj(NULL, pbar->valueObj, &value);
Tcl_GetDoubleFromObj(NULL, pbar->maximumObj, &maximum);
Tcl_GetIntFromObj(NULL, pbar->phaseObj, &phase);
@@ -2290,7 +2293,7 @@ typedef struct
static Ttk_ElementOptionSpec ScrollbarElementOptions[] = {
{"-orient", TK_OPTION_STRING,
- Tk_Offset(ScrollbarElement, orientObj), "horizontal"},
+ offsetof(ScrollbarElement, orientObj), "horizontal"},
{0, 0, 0, 0}
};
static void TroughElementSize(
@@ -2302,10 +2305,10 @@ static void TroughElementSize(
Ttk_Padding *paddingPtr)
{
ScrollbarElement *scrollbar = elementRecord;
- int orientation = TTK_ORIENT_HORIZONTAL;
+ Ttk_Orient orientation = TTK_ORIENT_HORIZONTAL;
SInt32 thickness = 15;
- Ttk_GetOrientFromObj(NULL, scrollbar->orientObj, &orientation);
+ TtkGetOrientFromObj(NULL, scrollbar->orientObj, &orientation);
ChkErr(GetThemeMetric, kThemeMetricScrollBarWidth, &thickness);
if (orientation == TTK_ORIENT_HORIZONTAL) {
*minHeight = thickness;
@@ -2343,13 +2346,13 @@ static void TroughElementDraw(
Ttk_State state)
{
ScrollbarElement *scrollbar = elementRecord;
- int orientation = TTK_ORIENT_HORIZONTAL;
+ Ttk_Orient orientation = TTK_ORIENT_HORIZONTAL;
CGRect bounds = BoxToRect(d, b);
NSColorSpace *deviceRGB = [NSColorSpace deviceRGBColorSpace];
NSColor *troughColor;
CGFloat *rgba = TkMacOSXInDarkMode(tkwin) ? darkTrough : lightTrough;
- Ttk_GetOrientFromObj(NULL, scrollbar->orientObj, &orientation);
+ TtkGetOrientFromObj(NULL, scrollbar->orientObj, &orientation);
if (orientation == TTK_ORIENT_HORIZONTAL) {
bounds = CGRectInset(bounds, 0, 1);
} else {
@@ -2385,9 +2388,9 @@ static void ThumbElementSize(
Ttk_Padding *paddingPtr)
{
ScrollbarElement *scrollbar = elementRecord;
- int orientation = TTK_ORIENT_HORIZONTAL;
+ Ttk_Orient orientation = TTK_ORIENT_HORIZONTAL;
- Ttk_GetOrientFromObj(NULL, scrollbar->orientObj, &orientation);
+ TtkGetOrientFromObj(NULL, scrollbar->orientObj, &orientation);
if (orientation == TTK_ORIENT_VERTICAL) {
*minHeight = 18;
*minWidth = 8;
@@ -2406,9 +2409,9 @@ static void ThumbElementDraw(
Ttk_State state)
{
ScrollbarElement *scrollbar = elementRecord;
- int orientation = TTK_ORIENT_HORIZONTAL;
+ Ttk_Orient orientation = TTK_ORIENT_HORIZONTAL;
- Ttk_GetOrientFromObj(NULL, scrollbar->orientObj, &orientation);
+ TtkGetOrientFromObj(NULL, scrollbar->orientObj, &orientation);
/*
* In order to make ttk scrollbars work correctly it is necessary to be
@@ -2808,7 +2811,7 @@ typedef struct {
static Ttk_ElementOptionSpec FieldElementOptions[] = {
{"-fieldbackground", TK_OPTION_BORDER,
- Tk_Offset(FieldElement, backgroundObj), "white"},
+ offsetof(FieldElement, backgroundObj), "white"},
{NULL, 0, 0, NULL}
};