summaryrefslogtreecommitdiffstats
path: root/doc/HWNDToWindow.3
Commit message (Expand)AuthorAgeFilesLines
* * doc/HWNDToWindow.3:ericm2000-09-071-2/+2
* * unix/mkLinks:ericm2000-04-241-0/+30
>1999-04-16 01:51:06 (GMT) commit03656f44f81469f459031fa3a4a7b09c8bc77712 (patch) tree31378e81bd58f8c726fc552d6b30cbf3ca07497b /unix parent404fc236f34304df53b7e44bc7971d786b87d453 (diff)downloadtk-03656f44f81469f459031fa3a4a7b09c8bc77712.zip
tk-03656f44f81469f459031fa3a4a7b09c8bc77712.tar.gz
tk-03656f44f81469f459031fa3a4a7b09c8bc77712.tar.bz2
* Merged 8.1 branch into the main trunk
Diffstat (limited to 'unix')
-rw-r--r--unix/Makefile.in227
-rw-r--r--unix/README12
-rw-r--r--unix/configure.in103
-rw-r--r--unix/mkLinks120
-rw-r--r--unix/tkAppInit.c13
-rw-r--r--unix/tkUnix.c6
-rw-r--r--unix/tkUnixButton.c49
-rw-r--r--unix/tkUnixConfig.c45
-rw-r--r--unix/tkUnixCursor.c19
-rw-r--r--unix/tkUnixDefault.h13
-rw-r--r--unix/tkUnixEmbed.c61
-rw-r--r--unix/tkUnixEvent.c112
-rw-r--r--unix/tkUnixFocus.c3
-rw-r--r--unix/tkUnixFont.c2770
-rw-r--r--unix/tkUnixInit.c12
-rw-r--r--unix/tkUnixInt.h7
-rw-r--r--unix/tkUnixKey.c90
-rw-r--r--unix/tkUnixMenu.c447
-rw-r--r--unix/tkUnixMenubu.c13
-rw-r--r--unix/tkUnixPort.h19
-rw-r--r--unix/tkUnixScale.c42
-rw-r--r--unix/tkUnixSelect.c85
-rw-r--r--unix/tkUnixSend.c107
-rw-r--r--unix/tkUnixWm.c320
-rw-r--r--unix/tkUnixXId.c7
25 files changed, 3420 insertions, 1282 deletions
diff --git a/unix/Makefile.in b/unix/Makefile.in
index a4af245..98dc87a 100644
--- a/unix/Makefile.in
+++ b/unix/Makefile.in
@@ -5,7 +5,7 @@
# "autoconf" program (constructs like "@foo@" will get replaced in the
# actual Makefile.
#
-# RCS: @(#) $Id: Makefile.in,v 1.13 1999/03/10 07:04:45 stanton Exp $
+# RCS: @(#) $Id: Makefile.in,v 1.14 1999/04/16 01:51:44 stanton Exp $
# Current Tk version; used in various names.
@@ -76,6 +76,7 @@ MANN_INSTALL_DIR = $(MAN_INSTALL_DIR)/mann
# for this version of Tk ("srcdir" will be replaced or has already
# been replaced by the configure script):
TCL_GENERIC_DIR = @TCL_SRC_DIR@/generic
+TCL_UNIX_DIR = @TCL_SRC_DIR@/unix
# The directory containing the Tcl library archive file appropriate
# for this version of Tk:
@@ -110,6 +111,7 @@ X11_INCLUDES = @XINCLUDES@
# can override it).
X11_LIB_SWITCHES = @XLIBSW@
+
# To turn off the security checks that disallow incoming sends when
# the X server appears to be insecure, reverse the comments on the
# following lines:
@@ -128,22 +130,6 @@ PROTO_FLAGS =
MEM_DEBUG_FLAGS =
#MEM_DEBUG_FLAGS = -DTCL_MEM_DEBUG
-# To enable support for stubs in Tcl.
-STUB_LIB_FILE = @STUB_LIB_FILE@
-
-TK_STUB_LIB_FILE = @TK_STUB_LIB_FILE@
-#TK_STUB_LIB_FILE = libtkstub.a
-
-TK_STUB_LIB_FLAG = @TK_STUB_LIB_FLAG@
-#TK_STUB_LIB_FLAG = -ltkstub
-
-
-
-# Libraries to use when linking. This definition is determined by the
-# configure script.
-LIBS = @TCL_BUILD_LIB_SPEC@ @LIBS@ $(X11_LIB_SWITCHES) @DL_LIBS@ @MATH_LIBS@ -lc
-
-
# If your X server is X11R4 or earlier, then you may wish to reverse
# the comment characters on the following two lines. This will enable
# extra code to speed up XStringToKeysym. In X11R5 and later releases
@@ -151,6 +137,12 @@ LIBS = @TCL_BUILD_LIB_SPEC@ @LIBS@ $(X11_LIB_SWITCHES) @DL_LIBS@ @MATH_LIBS@ -l
KEYSYM_FLAGS =
#KEYSYM_FLAGS = -DREDO_KEYSYM_LOOKUP
+# Tk does not used deprecated Tcl constructs so it should
+# compile fine with -DTCL_NO_DEPRECATED. To remove its own
+# set of deprecated code uncomment the second line.
+NO_DEPRECATED_FLAGS= -DTCL_NO_DEPRECATED
+#NO_DEPRECATED_FLAGS= -DTCL_NO_DEPRECATED -DTK_NO_DEPRECATED
+
# Some versions of make, like SGI's, use the following variable to
# determine which shell to use for executing commands:
SHELL = /bin/sh
@@ -172,15 +164,32 @@ INSTALL_DATA = ${INSTALL} -m 644
TK_SHLIB_CFLAGS = @TK_SHLIB_CFLAGS@
+# To enable support for stubs in Tcl.
+STUB_LIB_FILE = @STUB_LIB_FILE@
+
+TK_STUB_LIB_FILE = @TK_STUB_LIB_FILE@
+#TK_STUB_LIB_FILE = libtkstub.a
+
+TK_STUB_LIB_FLAG = @TK_STUB_LIB_FLAG@
+#TK_STUB_LIB_FLAG = -ltkstub
+
TK_LIB_FILE = @TK_LIB_FILE@
#TK_LIB_FILE = libtk.a
TK_LIB_FLAG = @TK_LIB_FLAG@
#TK_LIB_FLAG = -ltk
+TCL_LIB_SPEC = @TCL_BUILD_LIB_SPEC@
TK_EXP_FILE = @TK_EXP_FILE@
TK_BUILD_EXP_FILE = @TK_BUILD_EXP_FILE@
+TCL_STUB_FLAGS = @TCL_STUB_FLAGS@
+
+# Libraries to use when linking. This definition is determined by the
+# configure script.
+LIBS = @LIBS@ $(X11_LIB_SWITCHES) @DL_LIBS@ @MATH_LIBS@ -lc
+WISH_LIBS = $(TCL_LIB_SPEC) @LIBS@ $(X11_LIB_SWITCHES) @DL_LIBS@ @MATH_LIBS@ -lc
+
# The symbol below provides support for dynamic loading and shared
# libraries. See configure.in for a description of what it means.
# The values of the symbolis normally set by the configure script.
@@ -216,29 +225,28 @@ TOOL_DIR = @TCL_SRC_DIR@/tools
CC = @CC@
-CC_SWITCHES = ${CFLAGS} ${CFLAGS_WARNING} ${TK_SHLIB_CFLAGS} \
+
+CC_SWITCHES_NO_STUBS = ${CFLAGS} ${CFLAGS_WARNING} ${TK_SHLIB_CFLAGS} \
-I${UNIX_DIR} -I${GENERIC_DIR} \
-I${BMAP_DIR} -I${TCL_GENERIC_DIR} ${X11_INCLUDES} \
${AC_FLAGS} ${PROTO_FLAGS} \
-${SECURITY_FLAGS} ${MEM_DEBUG_FLAGS} ${KEYSYM_FLAGS}
+${SECURITY_FLAGS} ${MEM_DEBUG_FLAGS} ${KEYSYM_FLAGS} ${NO_DEPRECATED_FLAGS}
+
+CC_SWITCHES = ${CC_SWITCHES_NO_STUBS} ${TCL_STUB_FLAGS}
-STUB_CC_SWITCHES = ${CFLAGS} ${CFLAGS_WARNING} ${SHLIB_CFLAGS} \
--I${UNIX_DIR} -I${GENERIC_DIR} \
--I${BMAP_DIR} -I${TCL_GENERIC_DIR} ${X11_INCLUDES} \
-${AC_FLAGS} ${PROTO_FLAGS} \
-${SECURITY_FLAGS} ${MEM_DEBUG_FLAGS} ${KEYSYM_FLAGS} \
- -DTK_SHLIB_EXT=\"${SHLIB_SUFFIX}\"
DEPEND_SWITCHES = ${CFLAGS} -I${UNIX_DIR} -I${GENERIC_DIR} \
-I${BMAP_DIR} \
-I${TCL_GENERIC_DIR} ${X11_INCLUDES} \
${AC_FLAGS} ${PROTO_FLAGS} ${SECURITY_FLAGS} ${MEM_DEBUG_FLAGS} \
-${KEYSYM_FLAGS} -DTK_SHLIB_EXT=\"${SHLIB_SUFFIX}\"
+${KEYSYM_FLAGS}
WISH_OBJS = tkAppInit.o
-TKTEST_OBJS = tkTestInit.o tkTest.o tkSquare.o
+TCLTEST_OBJS = ${TCL_BIN_DIR}/tclTest.o ${TCL_BIN_DIR}/tclThreadTest.o \
+ ${TCL_BIN_DIR}/tclUnixTest.o
+TKTEST_OBJS = $(TCLTEST_OBJS) tkTestInit.o tkTest.o tkSquare.o
WIDGOBJS = tkButton.o tkEntry.o tkFrame.o tkListbox.o \
tkMenu.o tkMenubutton.o tkMenuDraw.o tkMessage.o tkScale.o \
@@ -253,19 +261,18 @@ IMAGEOBJS = tkImage.o tkImgBmap.o tkImgGIF.o tkImgPPM.o tkImgPhoto.o
TEXTOBJS = tkText.o tkTextBTree.o tkTextDisp.o tkTextImage.o tkTextIndex.o \
tkTextMark.o tkTextTag.o tkTextWind.o
-UNIXOBJS = tkUnix.o tkUnix3d.o tkUnixButton.o tkUnixColor.o tkUnixCursor.o \
- tkUnixDialog.o tkUnixDraw.o \
- tkUnixEmbed.o tkUnixEvent.o tkUnixFocus.o tkUnixFont.o tkUnixInit.o \
- tkUnixMenu.o tkUnixMenubu.o tkUnixScale.o tkUnixScrlbr.o \
- tkUnixSelect.o tkUnixSend.o tkUnixWm.o tkUnixXId.o tkStubInit.o
+UNIXOBJS = tkUnix.o tkUnix3d.o tkUnixButton.o tkUnixColor.o tkUnixConfig.o \
+ tkUnixCursor.o tkUnixDraw.o tkUnixEmbed.o tkUnixEvent.o \
+ tkUnixFocus.o tkUnixFont.o tkUnixInit.o tkUnixKey.o tkUnixMenu.o \
+ tkUnixMenubu.o tkUnixScale.o tkUnixScrlbr.o tkUnixSelect.o \
+ tkUnixSend.o tkUnixWm.o tkUnixXId.o tkStubInit.o tkStubLib.o
-STUB_LIB_OBJS = tkStubs.o tkIntStubs.o tkIntPlatStubs.o tkPlatStubs.o \
- tkIntXlibStubs.o tkStubLib.o
+STUB_LIB_OBJS = tkStubLib.o
OBJS = tk3d.o tkArgv.o tkAtom.o tkBind.o tkBitmap.o tkClipboard.o tkCmds.o \
tkColor.o tkConfig.o tkCursor.o tkError.o tkEvent.o \
tkFocus.o tkFont.o tkGet.o tkGC.o tkGeometry.o tkGrab.o tkGrid.o \
- tkMain.o tkOption.o tkPack.o tkPlace.o \
+ tkMain.o tkObj.o tkOldConfig.o tkOption.o tkPack.o tkPlace.o \
tkSelect.o tkUtil.o tkVisual.o tkWindow.o \
$(UNIXOBJS) $(WIDGOBJS) $(CANVOBJS) $(IMAGEOBJS) $(TEXTOBJS)
@@ -288,7 +295,7 @@ SRCS = \
$(GENERIC_DIR)/tkPack.c $(GENERIC_DIR)/tkPlace.c \
$(GENERIC_DIR)/tkSelect.c $(GENERIC_DIR)/tkUtil.c \
$(GENERIC_DIR)/tkVisual.c $(GENERIC_DIR)/tkWindow.c \
- $(GENERIC_DIR)/tkButton.c \
+ $(GENERIC_DIR)/tkButton.c $(GENERIC_DIR)/tkObj.c \
$(GENERIC_DIR)/tkEntry.c $(GENERIC_DIR)/tkFrame.c \
$(GENERIC_DIR)/tkListbox.c $(GENERIC_DIR)/tkMenu.c \
$(GENERIC_DIR)/tkMenubutton.c $(GENERIC_DIR)/tkMenuDraw.c \
@@ -308,18 +315,19 @@ SRCS = \
$(GENERIC_DIR)/tkTextImage.c \
$(GENERIC_DIR)/tkTextIndex.c $(GENERIC_DIR)/tkTextMark.c \
$(GENERIC_DIR)/tkTextTag.c $(GENERIC_DIR)/tkTextWind.c \
+ $(GENERIC_DIR)/tkOldConfig.c \
$(GENERIC_DIR)/tkSquare.c $(GENERIC_DIR)/tkTest.c \
- $(GENERIC_DIR)/tkStubs.c $(GENERIC_DIR)/tkIntStubs.c \
- $(GENERIC_DIR)/tkPlatStubs.c $(GENERIC_DIR)/tkIntPlatStubs.c \
- $(GENERIC_DIR)/tkIntXlibStubs.c $(GENERIC_DIR)/tkInitStubs.c \
+ $(GENERIC_DIR)/tkStubInit.c $(GENERIC_DIR)/tkStubLib.c \
$(UNIX_DIR)/tkAppInit.c $(UNIX_DIR)/tkUnix.c \
$(UNIX_DIR)/tkUnix3d.c \
$(UNIX_DIR)/tkUnixButton.c $(UNIX_DIR)/tkUnixColor.c \
+ $(UNIX_DIR)/tkUnixConfig.c \
$(UNIX_DIR)/tkUnixCursor.c \
- $(UNIX_DIR)/tkUnixDialog.c $(UNIX_DIR)/tkUnixDraw.c \
+ $(UNIX_DIR)/tkUnixDraw.c \
$(UNIX_DIR)/tkUnixEmbed.c $(UNIX_DIR)/tkUnixEvent.c \
$(UNIX_DIR)/tkUnixFocus.c \
$(UNIX_DIR)/tkUnixFont.c $(UNIX_DIR)/tkUnixInit.c \
+ $(UNIX_DIR)/tkUnixKey.c \
$(UNIX_DIR)/tkUnixMenu.c $(UNIX_DIR)/tkUnixMenubu.c \
$(UNIX_DIR)/tkUnixScale.c $(UNIX_DIR)/tkUnixScrlbr.c \
$(UNIX_DIR)/tkUnixSelect.c \
@@ -352,23 +360,26 @@ ${STUB_LIB_FILE}: ${STUB_LIB_OBJS}
# extensions. used for the Tcl Plugin. -- dl
tkLibObjs:
@echo ${OBJS}
+
# This targets actually build the objects needed for the lib in the above
# case
objs: ${OBJS}
wish: $(WISH_OBJS) $(TK_LIB_FILE) $(TK_STUB_LIB_FILE)
- $(CC) @LD_FLAGS@ $(WISH_OBJS) @TK_BUILD_LIB_SPEC@ $(LIBS) \
- $(TK_CC_SEARCH_FLAGS) -o wish
+ $(CC) @LD_FLAGS@ $(WISH_OBJS) \
+ @TK_BUILD_LIB_SPEC@ \
+ $(WISH_LIBS) $(TK_CC_SEARCH_FLAGS) -o wish
tktest: $(TKTEST_OBJS) $(TK_LIB_FILE)
- ${CC} @LD_FLAGS@ $(TKTEST_OBJS) @TK_BUILD_LIB_SPEC@ $(LIBS) \
- $(TK_CC_SEARCH_FLAGS) -o tktest
+ ${CC} @LD_FLAGS@ $(TKTEST_OBJS) \
+ @TK_BUILD_LIB_SPEC@ \
+ $(WISH_LIBS) $(TK_CC_SEARCH_FLAGS) -o tktest
xttest: test.o tkTest.o tkSquare.o $(TK_LIB_FILE)
${CC} @LD_FLAGS@ test.o tkTest.o tkSquare.o \
- @TK_BUILD_LIB_SPEC@ $(LIBS) \
- @TK_LD_SEARCH_FLAGS@ -lXt -o xttest
+ @TK_BUILD_LIB_SPEC@ \
+ $(WISH_LIBS) $(TK_LD_SEARCH_FLAGS) -lXt -o xttest
# Note, in the target below TCL_LIBRARY needs to be set or else
# "make test" won't work in the case where the compilation directory
@@ -380,10 +391,8 @@ test: tktest
SHLIB_PATH=`pwd`:${TCL_BIN_DIR}:${SHLIB_PATH}; \
export SHLIB_PATH; \
TCL_LIBRARY=@TCL_SRC_DIR@/library; export TCL_LIBRARY; \
- TK_LIBRARY=$(TOP_DIR)/library; export TK_LIBRARY; \
- ( echo cd $(TOP_DIR)/tests\; source all\; exit ) \
- | ./tktest -geometry +0+0
-
+ TK_LIBRARY=@TK_SRC_DIR@/library; export TK_LIBRARY; \
+ ./tktest $(TOP_DIR)/tests/all.tcl -geometry +0+0
# Useful target to launch a built tktest with the proper path,...
runtest:
@@ -392,7 +401,7 @@ runtest:
SHLIB_PATH=`pwd`:${TCL_BIN_DIR}:${SHLIB_PATH}; \
export SHLIB_PATH; \
TCL_LIBRARY=@TCL_SRC_DIR@/library; export TCL_LIBRARY; \
- TK_LIBRARY=$(TOP_DIR)/library; export TK_LIBRARY; \
+ TK_LIBRARY=@TK_SRC_DIR@/library; export TK_LIBRARY; \
./tktest
install: install-binaries install-libraries install-demos install-man
@@ -415,15 +424,15 @@ install-binaries: $(TK_LIB_FILE) $(TK_STUB_LIB_FILE) $(TK_BUILD_EXP_FILE) wish
@$(INSTALL_DATA) $(TK_LIB_FILE) $(LIB_INSTALL_DIR)/$(TK_LIB_FILE)
@(cd $(LIB_INSTALL_DIR); $(RANLIB) $(TK_LIB_FILE))
@chmod 555 $(LIB_INSTALL_DIR)/$(TK_LIB_FILE)
+ @echo "Installing wish"
+ @$(INSTALL_PROGRAM) wish $(BIN_INSTALL_DIR)/wish$(VERSION)
+ @echo "Installing tkConfig.sh"
+ @$(INSTALL_DATA) tkConfig.sh $(LIB_INSTALL_DIR)/tkConfig.sh
@if test "$(TK_BUILD_EXP_FILE)" != ""; then \
echo "Installing $(TK_EXP_FILE)"; \
$(INSTALL_DATA) $(TK_BUILD_EXP_FILE) \
$(LIB_INSTALL_DIR)/$(TK_EXP_FILE); \
fi
- @echo "Installing wish"
- @$(INSTALL_PROGRAM) wish $(BIN_INSTALL_DIR)/wish$(VERSION)
- @echo "Installing tkConfig.sh"
- @$(INSTALL_DATA) tkConfig.sh $(LIB_INSTALL_DIR)/tkConfig.sh
@if test "$(TK_STUB_LIB_FILE)" != "" ; then \
echo "Installing $(TK_STUB_LIB_FILE)"; \
$(INSTALL_DATA) $(STUB_LIB_FILE) \
@@ -441,9 +450,12 @@ install-libraries:
else true; \
fi; \
done;
- @echo "Installing tk.h"
- @$(INSTALL_DATA) $(GENERIC_DIR)/tk.h $(INCLUDE_INSTALL_DIR)/tk.h
- for i in $(SRC_DIR)/library/*.tcl $(SRC_DIR)/library/tclIndex $(SRC_DIR)/library/prolog.ps $(UNIX_DIR)/tkAppInit.c; \
+ @for i in $(GENERIC_DIR)/tk.h $(GENERIC_DIR)/tkDecls.h ; \
+ do \
+ echo "Installing $$i"; \
+ $(INSTALL_DATA) $$i $(INCLUDE_INSTALL_DIR); \
+ done;
+ for i in $(SRC_DIR)/library/*.tcl $(SRC_DIR)/library/tclIndex $(UNIX_DIR)/tkAppInit.c; \
do \
echo "Installing $$i"; \
$(INSTALL_DATA) $$i $(SCRIPT_INSTALL_DIR); \
@@ -549,19 +561,19 @@ tkTestInit.o: $(UNIX_DIR)/tkAppInit.c
rm -f tkAppInit.sav; \
mv tkAppInit.o tkAppInit.sav; \
fi;
- $(CC) -c $(CC_SWITCHES) -DTK_TEST $(UNIX_DIR)/tkAppInit.c
+ $(CC) -c $(CC_SWITCHES_NO_STUBS) -DTK_TEST $(UNIX_DIR)/tkAppInit.c
rm -f tkTestInit.o
mv tkAppInit.o tkTestInit.o
@if test -f tkAppInit.sav ; then \
mv tkAppInit.sav tkAppInit.o; \
fi;
+tkAppInit.o: $(UNIX_DIR)/tkAppInit.c
+ $(CC) -c $(CC_SWITCHES_NO_STUBS) $(UNIX_DIR)/tkAppInit.c
+
tk3d.o: $(GENERIC_DIR)/tk3d.c
$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tk3d.c
-tkAppInit.o: $(UNIX_DIR)/tkAppInit.c
- $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkAppInit.c
-
tkArgv.o: $(GENERIC_DIR)/tkArgv.c
$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkArgv.c
@@ -619,6 +631,12 @@ tkGrid.o: $(GENERIC_DIR)/tkGrid.c
tkMain.o: $(GENERIC_DIR)/tkMain.c
$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkMain.c
+tkObj.o: $(GENERIC_DIR)/tkObj.c
+ $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkObj.c
+
+tkOldConfig.o: $(GENERIC_DIR)/tkOldConfig.c
+ $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkOldConfig.c
+
tkOption.o: $(GENERIC_DIR)/tkOption.c
$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkOption.c
@@ -671,7 +689,7 @@ tkScrollbar.o: $(GENERIC_DIR)/tkScrollbar.c
$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkScrollbar.c
tkSquare.o: $(GENERIC_DIR)/tkSquare.c
- $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkSquare.c
+ $(CC) -c $(CC_SWITCHES_NO_STUBS) $(GENERIC_DIR)/tkSquare.c
tkCanvas.o: $(GENERIC_DIR)/tkCanvas.c
$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkCanvas.c
@@ -725,7 +743,7 @@ tkImgPhoto.o: $(GENERIC_DIR)/tkImgPhoto.c
$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkImgPhoto.c
tkTest.o: $(GENERIC_DIR)/tkTest.c
- $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkTest.c
+ $(CC) -c $(CC_SWITCHES_NO_STUBS) $(GENERIC_DIR)/tkTest.c
tkText.o: $(GENERIC_DIR)/tkText.c
$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkText.c
@@ -751,6 +769,15 @@ tkTextTag.o: $(GENERIC_DIR)/tkTextTag.c
tkTextWind.o: $(GENERIC_DIR)/tkTextWind.c
$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkTextWind.c
+tkStubInit.o: $(GENERIC_DIR)/tkStubInit.c
+ $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkStubInit.c
+
+# Stub library binaries, these must be compiled for use in a shared library
+# even though they will be placed in a static archive
+
+tkStubLib.o: $(GENERIC_DIR)/tkStubLib.c
+ $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkStubLib.c
+
tkUnix.o: $(UNIX_DIR)/tkUnix.c
$(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnix.c
@@ -763,12 +790,12 @@ tkUnixButton.o: $(UNIX_DIR)/tkUnixButton.c
tkUnixColor.o: $(UNIX_DIR)/tkUnixColor.c
$(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnixColor.c
+tkUnixConfig.o: $(UNIX_DIR)/tkUnixConfig.c
+ $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnixConfig.c
+
tkUnixCursor.o: $(UNIX_DIR)/tkUnixCursor.c
$(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnixCursor.c
-tkUnixDialog.o: $(UNIX_DIR)/tkUnixDialog.c
- $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnixDialog.c
-
tkUnixDraw.o: $(UNIX_DIR)/tkUnixDraw.c
$(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnixDraw.c
@@ -788,6 +815,9 @@ tkUnixInit.o: $(UNIX_DIR)/tkUnixInit.c $(GENERIC_DIR)/tkInitScript.h tkConfig.sh
$(CC) -c $(CC_SWITCHES) -DTK_LIBRARY=\"${TK_LIBRARY}\" \
$(UNIX_DIR)/tkUnixInit.c
+tkUnixKey.o: $(UNIX_DIR)/tkUnixKey.c
+ $(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnixKey.c
+
tkUnixMenu.o: $(UNIX_DIR)/tkUnixMenu.c
$(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnixMenu.c
@@ -812,35 +842,24 @@ tkUnixWm.o: $(UNIX_DIR)/tkUnixWm.c
tkUnixXId.o: $(UNIX_DIR)/tkUnixXId.c
$(CC) -c $(CC_SWITCHES) $(UNIX_DIR)/tkUnixXId.c
-tkStubInit.o: $(GENERIC_DIR)/tkStubInit.c
- $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkStubInit.c
-
-
-# Stub library binaries, these must be compiled for use in a shared library
-# even though they will be placed in a static archive
-
-tkStubs.o: $(GENERIC_DIR)/tkStubs.c
- $(CC) -c $(STUB_CC_SWITCHES) $(GENERIC_DIR)/tkStubs.c
-
-tkIntStubs.o: $(GENERIC_DIR)/tkIntStubs.c
- $(CC) -c $(STUB_CC_SWITCHES) $(GENERIC_DIR)/tkIntStubs.c
-
-tkPlatStubs.o: $(GENERIC_DIR)/tkPlatStubs.c
- $(CC) -c $(STUB_CC_SWITCHES) $(GENERIC_DIR)/tkPlatStubs.c
+.c.o:
+ $(CC) -c $(CC_SWITCHES) $<
-tkIntPlatStubs.o: $(GENERIC_DIR)/tkIntPlatStubs.c
- $(CC) -c $(STUB_CC_SWITCHES) $(GENERIC_DIR)/tkIntPlatStubs.c
+#
+# Target to check for proper usage of UCHAR macro.
+#
-tkIntXlibStubs.o: $(GENERIC_DIR)/tkIntXlibStubs.c
- $(CC) -c $(STUB_CC_SWITCHES) $(GENERIC_DIR)/tkIntXlibStubs.c
+checkuchar:
+ -egrep isalnum\|isalpha\|iscntrl\|isdigit\|islower\|isprint\|ispunct\|isspace\|isupper\|isxdigit\|toupper\|tolower $(SRCS) | grep -v UCHAR
-tkStubLib.o: $(GENERIC_DIR)/tkStubLib.c
- $(CC) -c $(STUB_CC_SWITCHES) $(GENERIC_DIR)/tkStubLib.c
+#
+# Target to make sure that only symbols with "Tk" prefixes are
+# exported.
+#
-.c.o:
- $(CC) -c $(CC_SWITCHES) $<
+checkexports: $(TK_LIB_FILE)
+ -nm -p $(TK_LIB_FILE) | awk '$$2 ~ /[TDB]/ { print $$3 }' | sort -n | grep -v '^[Tt]k'
-#
# Target to regenerate header files and stub files from the *.decls tables.
#
@@ -865,20 +884,7 @@ checkstubs:
if [ $$match -eq 0 ]; then echo $$i; fi \
done
-#
-# Target to check for proper usage of UCHAR macro.
-#
-checkuchar:
- -egrep isalnum\|isalpha\|iscntrl\|isdigit\|islower\|isprint\|ispunct\|isspace\|isupper\|isxdigit\|toupper\|tolower $(SRCS) | grep -v UCHAR
-
-#
-# Target to make sure that only symbols with "Tk" prefixes are
-# exported.
-#
-
-checkexports: $(TK_LIB_FILE)
- -nm -p $(TK_LIB_FILE) | awk '$$2 ~ /[TDB]/ { print $$3 }' | sort -n | grep -v '^[Tt]k'
#
# Target to create a proper Tk distribution from information in the
@@ -918,7 +924,8 @@ dist: $(UNIX_DIR)/configure
fi; \
done;)
mkdir $(DISTDIR)/generic
- cp -p $(GENERIC_DIR)/*.c $(GENERIC_DIR)/*.h $(DISTDIR)/generic
+ cp -p $(GENERIC_DIR)/*.c $(GENERIC_DIR)/*.h $(GENERIC_DIR)/prolog.ps \
+ $(DISTDIR)/generic
cp -p $(GENERIC_DIR)/README $(DISTDIR)/generic
cp -p $(TOP_DIR)/changes $(TOP_DIR)/README $(TOP_DIR)/license.terms \
$(DISTDIR)
@@ -955,7 +962,7 @@ dist: $(UNIX_DIR)/configure
cp -p $(TOP_DIR)/license.terms $(DISTDIR)/xlib/X11
mkdir $(DISTDIR)/library
cp -p $(TOP_DIR)/license.terms $(TOP_DIR)/library/*.tcl \
- $(TOP_DIR)/library/tclIndex $(TOP_DIR)/library/prolog.ps \
+ $(TOP_DIR)/library/tclIndex \
$(DISTDIR)/library
mkdir $(DISTDIR)/library/images
@(cd $(TOP_DIR); for i in library/images/* ; do \
@@ -986,10 +993,8 @@ dist: $(UNIX_DIR)/configure
$(TCLDIR)/doc/man.macros $(DISTDIR)/doc
mkdir $(DISTDIR)/tests
cp -p $(TOP_DIR)/license.terms $(TOP_DIR)/tests/*.test \
- $(TOP_DIR)/tests/visual $(TOP_DIR)/tests/*.tcl \
- $(TOP_DIR)/tests/README $(TOP_DIR)/tests/all \
- $(TOP_DIR)/tests/defs $(TOP_DIR)/tests/option.file* \
- $(DISTDIR)/tests
+ $(TOP_DIR)/tests/*.tcl $(TOP_DIR)/tests/README \
+ $(TOP_DIR)/tests/option.file* $(DISTDIR)/tests
#
# The following target can only be used for non-patch releases. Use
@@ -1002,7 +1007,7 @@ alldist: dist
$(DISTROOT)/$(ZIPNAME)
cd $(DISTROOT); tar cf $(DISTNAME).tar $(DISTNAME); \
gzip -9 -c $(DISTNAME).tar > $(DISTNAME).tar.gz; \
- compress $(DISTNAME).tar; zip -r8 $(ZIPNAME) $(DISTNAME)
+ compress $(DISTNAME).tar; zip -qr8 $(ZIPNAME) $(DISTNAME)
#
# The target below is similar to "alldist" except it works for patch
diff --git a/unix/README b/unix/README
index 80c6fc3..14d3d40 100644
--- a/unix/README
+++ b/unix/README
@@ -10,14 +10,14 @@ SGI, as well as PCs running Linux, BSDI, and SCO UNIX. To compile for
a PC running Windows, see the README file in the directory ../win. To
compile for a Macintosh, see the README file in the directory ../mac.
-RCS: @(#) $Id: README,v 1.3 1999/02/09 03:46:27 stanton Exp $
+RCS: @(#) $Id: README,v 1.4 1999/04/16 01:51:45 stanton Exp $
How To Compile And Install Tk:
------------------------------
-(a) Make sure that the Tcl 8.0 release is present in the directory
- ../../tcl8.0 (or else use the "--with-tcl" switch described below).
- This release of Tk will only work with Tcl 8.0. Also, be sure that
+(a) Make sure that the Tcl 8.1 release is present in the directory
+ ../../tcl8.1a2 (or else use the "--with-tcl" switch described below).
+ This release of Tk will only work with Tcl 8.1. Also, be sure that
you have configured Tcl before you configure Tk.
(b) Check for patches as described in ../README.
@@ -78,9 +78,9 @@ How To Compile And Install Tk:
TCL_LIBRARY environment variable as well (see the Tcl README file
for information on this). Note that installed versions of wish,
libtk.a, libtk.so, and the Tk library have a version number in their
- names, such as "wish8.0" or "libtk8.0.so"; to use the installed
+ names, such as "wish8.1" or "libtk8.1.so"; to use the installed
versions, either specify the version number or create a symbolic
- link (e.g. from "wish" to "wish8.0").
+ link (e.g. from "wish" to "wish8.1").
If you have trouble compiling Tk, read through the file
"porting.notes". It contains information that people have provided
diff --git a/unix/configure.in b/unix/configure.in
index 99b37c1..4e3f667 100644
--- a/unix/configure.in
+++ b/unix/configure.in
@@ -3,12 +3,12 @@ dnl This file is an input file used by the GNU "autoconf" program to
dnl generate the file "configure", which is run during Tk installation
dnl to configure the system for the local environment.
AC_INIT(../generic/tk.h)
-# RCS: @(#) $Id: configure.in,v 1.29 1999/03/22 21:32:16 redman Exp $
+# RCS: @(#) $Id: configure.in,v 1.30 1999/04/16 01:51:45 stanton Exp $
-TK_VERSION=8.0
+TK_VERSION=8.1
TK_MAJOR_VERSION=8
-TK_MINOR_VERSION=0
-TK_PATCH_LEVEL=".5"
+TK_MINOR_VERSION=1
+TK_PATCH_LEVEL=b3
VERSION=${TK_VERSION}
if test "${prefix}" = "NONE"; then
@@ -19,6 +19,10 @@ if test "${exec_prefix}" = "NONE"; then
fi
TK_SRC_DIR=`cd $srcdir/..; pwd`
+# Most of the checks here are duplicated from Tcl's configure.in
+# and should not be redone but rather simply used from the definitions
+# found in tclConfig.sh
+
AC_PROG_RANLIB
AC_ARG_ENABLE(gcc, [ --enable-gcc allow use of gcc if available],
[tk_ok=$enableval], [tk_ok=no])
@@ -31,6 +35,25 @@ fi
AC_C_CROSS
AC_HAVE_HEADERS(unistd.h limits.h)
+# Threads support
+AC_ARG_ENABLE(threads,[ --enable-threads enable Threads support],,enableval="no")
+
+if test "$enableval" = "yes"; then
+ AC_MSG_RESULT(Will compile with Threads support)
+ AC_DEFINE(TCL_THREADS)
+ AC_DEFINE(_REENTRANT)
+
+ AC_CHECK_LIB(pthread,pthread_mutex_init,tcl_ok=yes,tcl_ok=no)
+ if test "$tcl_ok" = "yes"; then
+ # The space is needed
+ THREADS_LIBS=" -lpthread"
+ else
+ AC_MSG_WARN("Don t know how to find pthread lib on your system - you must disable thread support or edit the LIBS in the Makefile...")
+ fi
+else
+ AC_MSG_RESULT(Will compile without Threads support (normal))
+fi
+
# set the warning flags depending on whether or not we are using gcc
if test "${GCC}" = "yes" ; then
# leave -Wimplicit-int out, the X libs generate so many of these warnings
@@ -61,10 +84,18 @@ fi
#--------------------------------------------------------------------
# See if there was a command-line option for where Tcl is; if
# not, assume that its top-level directory is a sibling of ours.
+# Try the patch-level-specific directory first, then the general one.
#--------------------------------------------------------------------
-AC_ARG_WITH(tcl, [ --with-tcl=DIR use Tcl 8.0 binaries from DIR],
- TCL_BIN_DIR=$withval, TCL_BIN_DIR=`cd ../../tcl8.0$TK_PATCH_LEVEL/unix; pwd`)
+
+if test -d ../../tcl8.1$TK_PATCH_LEVEL/unix; then
+ TCL_BIN_DEFAULT=../../tcl8.1$TK_PATCH_LEVEL/unix
+else
+ TCL_BIN_DEFAULT=../../tcl8.1/unix
+fi
+
+AC_ARG_WITH(tcl, [ --with-tcl=DIR use Tcl 8.1 binaries from DIR],
+ TCL_BIN_DIR=$withval, TCL_BIN_DIR=`cd $TCL_BIN_DEFAULT; pwd`)
if test ! -d $TCL_BIN_DIR; then
AC_MSG_ERROR(Tcl directory $TCL_BIN_DIR doesn't exist)
fi
@@ -168,6 +199,18 @@ AC_UID_T
AC_CHECK_HEADERS(sys/time.h)
AC_HEADER_TIME
+#-------------------------------------------
+# In OS/390 struct pwd has no pw_gecos field
+#-------------------------------------------
+
+AC_MSG_CHECKING([pw_gecos in struct pwd])
+AC_TRY_COMPILE([#include <pwd.h>],
+ [struct passwd pwd; pwd.pw_gecos;], tk_ok=yes, tk_ok=no)
+AC_MSG_RESULT($tk_ok)
+if test $tk_ok = yes; then
+ AC_DEFINE(HAVE_PW_GECOS)
+fi
+
#--------------------------------------------------------------------
# Locate the X11 header files and the X11 library archive. Try
# the ac_path_x macro first, but if it doesn't find the X stuff
@@ -312,6 +355,10 @@ if test "$tk_checkBoth" = 1; then
fi
AC_CHECK_FUNC(gethostbyname, , AC_CHECK_LIB(nsl, main, [LIBS="$LIBS -lnsl"]))
+# Add the threads support libraries
+
+LIBS="$LIBS$THREADS_LIBS"
+
#--------------------------------------------------------------------
# One more check related to the X libraries. The standard releases
# of Ultrix don't support the "xauth" mechanism, so send won't work
@@ -354,13 +401,6 @@ AC_CHECK_FUNC(sin, , MATH_LIBS="-lm")
AC_CHECK_LIB(ieee, main, [MATH_LIBS="-lieee $MATH_LIBS"])
#--------------------------------------------------------------------
-# If this system doesn't have a memmove procedure, use memcpy
-# instead.
-#--------------------------------------------------------------------
-
-AC_CHECK_FUNC(memmove, , [AC_DEFINE(memmove, memcpy)])
-
-#--------------------------------------------------------------------
# Figure out whether "char" is unsigned. If so, set a
# #define for __CHAR_UNSIGNED__.
#--------------------------------------------------------------------
@@ -403,19 +443,23 @@ fi
#--------------------------------------------------------------------
AC_ARG_ENABLE(shared,
- [ --enable-shared build libtk as a shared library],
- [ok=$enableval], [ok=no])
+ [ --enable-shared build libtk as a shared library (on by default)],
+ [ok=$enableval], [ok=yes])
if test "$ok" = "yes" -a "${SHLIB_SUFFIX}" != ""; then
TK_SHARED_BUILD=1
TK_SHLIB_CFLAGS="${SHLIB_CFLAGS}"
TK_LIB_FILE=libtk${TCL_SHARED_LIB_SUFFIX}
- MAKE_LIB='\${SHLIB_LD} -o \${TK_LIB_FILE} \${OBJS} \$(TK_LD_SEARCH_FLAGS) ${SHLIB_LD_LIBS}'
+ MAKE_LIB="\${SHLIB_LD} -o \${TK_LIB_FILE} \${OBJS} \$(TK_LD_SEARCH_FLAGS) ${TCL_BUILD_STUB_LIB_SPEC} \${LIBS}"
RANLIB=":"
+
+ TCL_STUB_FLAGS="-DUSE_TCL_STUBS"
else
TK_SHARED_BUILD=0
TK_SHLIB_CFLAGS=""
TK_LIB_FILE=libtk${TCL_UNSHARED_LIB_SUFFIX}
- MAKE_LIB='ar cr \${TK_LIB_FILE} \${OBJS}'
+ MAKE_LIB="ar cr \${TK_LIB_FILE} \${OBJS}"
+
+ TCL_STUB_FLAGS=""
fi
DBGX='${TK_DBGX}'
@@ -449,35 +493,26 @@ fi
# using tcl stub support.
#--------------------------------------------------------------------
-# Linking to the Tcl stub library is not supported until Tk is a fully
-# loadable extension.
+# For now, linking to Tcl stubs is not supported with Tk. It causes
+# too many problems with linking. When Tk is a fully loadable
+# extension, linking the the Tcl stubs will be supported.
-AC_MSG_RESULT(dynamic linking)
-TCL_BUILD_STUB_LIB_SPEC=""
-TCL_STUB_FLAGS=""
-#--------------------------------------------------------------------
-# The statements below define various symbols relating to Tcl
-# stub support.
-#--------------------------------------------------------------------
# Replace ${VERSION} with contents of ${TK_VERSION}
eval "STUB_LIB_FILE=libtkstub${TCL_UNSHARED_LIB_SUFFIX}"
-# Replace DBGX with TCL_DBGX
-eval "STUB_LIB_FILE=\"${STUB_LIB_FILE}\""
-
MAKE_STUB_LIB="ar cr \${STUB_LIB_FILE} \${STUB_LIB_OBJS}"
TK_STUB_LIB_FILE=${STUB_LIB_FILE}
if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
- TK_STUB_LIB_FLAG="-ltkstub${TK_VERSION}\${TCL_DBGX}"
+ TK_STUB_LIB_FLAG="-ltkstub${TK_VERSION}\${TK_DBGX}"
else
- TK_STUB_LIB_FLAG="-ltkstub`echo ${TK_VERSION} | tr -d .`\${TCL_DBGX}"
+ TK_STUB_LIB_FLAG="-ltkstub`echo ${TK_VERSION} | tr -d .`\${TK_DBGX}"
fi
TK_BUILD_STUB_LIB_SPEC="-L`pwd` ${TK_STUB_LIB_FLAG}"
-TL_STUB_LIB_SPEC="-L${exec_prefix}/lib ${TK_STUB_LIB_FLAG}"
+TK_STUB_LIB_SPEC="-L${exec_prefix}/lib ${TK_STUB_LIB_FLAG}"
TK_BUILD_STUB_LIB_PATH="`pwd`/${TK_STUB_LIB_FILE}"
TK_STUB_LIB_PATH="${exec_prefix}/lib/${TK_STUB_LIB_FILE}"
@@ -510,8 +545,8 @@ AC_SUBST(SHLIB_LD_LIBS)
AC_SUBST(SHLIB_SUFFIX)
AC_SUBST(SHLIB_VERSION)
AC_SUBST(TCL_BIN_DIR)
-AC_SUBST(TCL_BUILD_LIB_SPEC)
AC_SUBST(TCL_BUILD_STUB_LIB_SPEC)
+AC_SUBST(TCL_BUILD_LIB_SPEC)
AC_SUBST(TCL_DBGX)
AC_SUBST(TCL_LIB_FLAG)
AC_SUBST(TCL_SRC_DIR)
@@ -521,8 +556,6 @@ AC_SUBST(TK_CC_SEARCH_FLAGS)
AC_SUBST(TK_LD_SEARCH_FLAGS)
AC_SUBST(TK_LIB_FILE)
AC_SUBST(TK_LIB_FLAG)
-AC_SUBST(TK_BUILD_EXP_FILE)
-AC_SUBST(TK_EXP_FILE)
AC_SUBST(TK_LIB_SPEC)
AC_SUBST(TK_MAJOR_VERSION)
AC_SUBST(TK_MINOR_VERSION)
diff --git a/unix/mkLinks b/unix/mkLinks
index d817703..5b326b6 100644
--- a/unix/mkLinks
+++ b/unix/mkLinks
@@ -43,6 +43,26 @@ if test -r 3DBorder.3; then
rm -f Tk_3DVerticalBevel.3
ln 3DBorder.3 Tk_3DVerticalBevel.3
fi
+if test -r 3DBorder.3; then
+ rm -f Tk_Alloc3DBorderFromObj.3
+ ln 3DBorder.3 Tk_Alloc3DBorderFromObj.3
+fi
+if test -r GetBitmap.3; then
+ rm -f Tk_AllocBitmapFromObj.3
+ ln GetBitmap.3 Tk_AllocBitmapFromObj.3
+fi
+if test -r GetColor.3; then
+ rm -f Tk_AllocColorFromObj.3
+ ln GetColor.3 Tk_AllocColorFromObj.3
+fi
+if test -r GetCursor.3; then
+ rm -f Tk_AllocCursorFromObj.3
+ ln GetCursor.3 Tk_AllocCursorFromObj.3
+fi
+if test -r GetFont.3; then
+ rm -f Tk_AllocFontFromObj.3
+ ln GetFont.3 Tk_AllocFontFromObj.3
+fi
if test -r WindowId.3; then
rm -f Tk_Attributes.3
ln WindowId.3 Tk_Attributes.3
@@ -191,6 +211,10 @@ if test -r CrtItemType.3; then
rm -f Tk_CreateItemType.3
ln CrtItemType.3 Tk_CreateItemType.3
fi
+if test -r SetOptions.3; then
+ rm -f Tk_CreateOptionTable.3
+ ln SetOptions.3 Tk_CreateOptionTable.3
+fi
if test -r CrtPhImgFmt.3; then
rm -f Tk_CreatePhotoImageFormat.3
ln CrtPhImgFmt.3 Tk_CreatePhotoImageFormat.3
@@ -243,6 +267,10 @@ if test -r DeleteImg.3; then
rm -f Tk_DeleteImage.3
ln DeleteImg.3 Tk_DeleteImage.3
fi
+if test -r SetOptions.3; then
+ rm -f Tk_DeleteOptionTable.3
+ ln SetOptions.3 Tk_DeleteOptionTable.3
+fi
if test -r CrtSelHdlr.3; then
rm -f Tk_DeleteSelHandler.3
ln CrtSelHdlr.3 Tk_DeleteSelHandler.3
@@ -311,26 +339,50 @@ if test -r 3DBorder.3; then
rm -f Tk_Free3DBorder.3
ln 3DBorder.3 Tk_Free3DBorder.3
fi
+if test -r 3DBorder.3; then
+ rm -f Tk_Free3DBorderFromObj.3
+ ln 3DBorder.3 Tk_Free3DBorderFromObj.3
+fi
if test -r GetBitmap.3; then
rm -f Tk_FreeBitmap.3
ln GetBitmap.3 Tk_FreeBitmap.3
fi
+if test -r GetBitmap.3; then
+ rm -f Tk_FreeBitmapFromObj.3
+ ln GetBitmap.3 Tk_FreeBitmapFromObj.3
+fi
if test -r GetColor.3; then
rm -f Tk_FreeColor.3
ln GetColor.3 Tk_FreeColor.3
fi
+if test -r GetColor.3; then
+ rm -f Tk_FreeColorFromObj.3
+ ln GetColor.3 Tk_FreeColorFromObj.3
+fi
if test -r GetClrmap.3; then
rm -f Tk_FreeColormap.3
ln GetClrmap.3 Tk_FreeColormap.3
fi
+if test -r SetOptions.3; then
+ rm -f Tk_FreeConfigOptions.3
+ ln SetOptions.3 Tk_FreeConfigOptions.3
+fi
if test -r GetCursor.3; then
rm -f Tk_FreeCursor.3
ln GetCursor.3 Tk_FreeCursor.3
fi
+if test -r GetCursor.3; then
+ rm -f Tk_FreeCursorFromObj.3
+ ln GetCursor.3 Tk_FreeCursorFromObj.3
+fi
if test -r GetFont.3; then
rm -f Tk_FreeFont.3
ln GetFont.3 Tk_FreeFont.3
fi
+if test -r GetFont.3; then
+ rm -f Tk_FreeFontFromObj.3
+ ln GetFont.3 Tk_FreeFontFromObj.3
+fi
if test -r GetGC.3; then
rm -f Tk_FreeGC.3
ln GetGC.3 Tk_FreeGC.3
@@ -347,6 +399,10 @@ if test -r GetPixmap.3; then
rm -f Tk_FreePixmap.3
ln GetPixmap.3 Tk_FreePixmap.3
fi
+if test -r SetOptions.3; then
+ rm -f Tk_FreeSavedOptions.3
+ ln SetOptions.3 Tk_FreeSavedOptions.3
+fi
if test -r TextLayout.3; then
rm -f Tk_FreeTextLayout.3
ln TextLayout.3 Tk_FreeTextLayout.3
@@ -363,6 +419,10 @@ if test -r 3DBorder.3; then
rm -f Tk_Get3DBorder.3
ln 3DBorder.3 Tk_Get3DBorder.3
fi
+if test -r 3DBorder.3; then
+ rm -f Tk_Get3DBorderFromObj.3
+ ln 3DBorder.3 Tk_Get3DBorderFromObj.3
+fi
if test -r BindTable.3; then
rm -f Tk_GetAllBindings.3
ln BindTable.3 Tk_GetAllBindings.3
@@ -371,6 +431,10 @@ if test -r GetAnchor.3; then
rm -f Tk_GetAnchor.3
ln GetAnchor.3 Tk_GetAnchor.3
fi
+if test -r GetAnchor.3; then
+ rm -f Tk_GetAnchorFromObj.3
+ ln GetAnchor.3 Tk_GetAnchorFromObj.3
+fi
if test -r InternAtom.3; then
rm -f Tk_GetAtomName.3
ln InternAtom.3 Tk_GetAtomName.3
@@ -387,6 +451,10 @@ if test -r GetBitmap.3; then
rm -f Tk_GetBitmapFromData.3
ln GetBitmap.3 Tk_GetBitmapFromData.3
fi
+if test -r GetBitmap.3; then
+ rm -f Tk_GetBitmapFromObj.3
+ ln GetBitmap.3 Tk_GetBitmapFromObj.3
+fi
if test -r GetCapStyl.3; then
rm -f Tk_GetCapStyle.3
ln GetCapStyl.3 Tk_GetCapStyle.3
@@ -399,6 +467,10 @@ if test -r GetColor.3; then
rm -f Tk_GetColorByValue.3
ln GetColor.3 Tk_GetColorByValue.3
fi
+if test -r GetColor.3; then
+ rm -f Tk_GetColorFromObj.3
+ ln GetColor.3 Tk_GetColorFromObj.3
+fi
if test -r GetClrmap.3; then
rm -f Tk_GetColormap.3
ln GetClrmap.3 Tk_GetColormap.3
@@ -411,10 +483,18 @@ if test -r GetCursor.3; then
rm -f Tk_GetCursorFromData.3
ln GetCursor.3 Tk_GetCursorFromData.3
fi
+if test -r GetCursor.3; then
+ rm -f Tk_GetCursorFromObj.3
+ ln GetCursor.3 Tk_GetCursorFromObj.3
+fi
if test -r GetFont.3; then
rm -f Tk_GetFont.3
ln GetFont.3 Tk_GetFont.3
fi
+if test -r GetFont.3; then
+ rm -f Tk_GetFontFromObj.3
+ ln GetFont.3 Tk_GetFontFromObj.3
+fi
if test -r GetGC.3; then
rm -f Tk_GetGC.3
ln GetGC.3 Tk_GetGC.3
@@ -439,14 +519,34 @@ if test -r GetJustify.3; then
rm -f Tk_GetJustify.3
ln GetJustify.3 Tk_GetJustify.3
fi
+if test -r GetJustify.3; then
+ rm -f Tk_GetJustifyFromObj.3
+ ln GetJustify.3 Tk_GetJustifyFromObj.3
+fi
+if test -r GetPixels.3; then
+ rm -f Tk_GetMMFromObj.3
+ ln GetPixels.3 Tk_GetMMFromObj.3
+fi
if test -r GetOption.3; then
rm -f Tk_GetOption.3
ln GetOption.3 Tk_GetOption.3
fi
+if test -r SetOptions.3; then
+ rm -f Tk_GetOptionInfo.3
+ ln SetOptions.3 Tk_GetOptionInfo.3
+fi
+if test -r SetOptions.3; then
+ rm -f Tk_GetOptionValue.3
+ ln SetOptions.3 Tk_GetOptionValue.3
+fi
if test -r GetPixels.3; then
rm -f Tk_GetPixels.3
ln GetPixels.3 Tk_GetPixels.3
fi
+if test -r GetPixels.3; then
+ rm -f Tk_GetPixelsFromObj.3
+ ln GetPixels.3 Tk_GetPixelsFromObj.3
+fi
if test -r GetPixmap.3; then
rm -f Tk_GetPixmap.3
ln GetPixmap.3 Tk_GetPixmap.3
@@ -455,6 +555,10 @@ if test -r GetRelief.3; then
rm -f Tk_GetRelief.3
ln GetRelief.3 Tk_GetRelief.3
fi
+if test -r GetRelief.3; then
+ rm -f Tk_GetReliefFromObj.3
+ ln GetRelief.3 Tk_GetReliefFromObj.3
+fi
if test -r GetRootCrd.3; then
rm -f Tk_GetRootCoords.3
ln GetRootCrd.3 Tk_GetRootCoords.3
@@ -499,6 +603,10 @@ if test -r ImgChanged.3; then
rm -f Tk_ImageChanged.3
ln ImgChanged.3 Tk_ImageChanged.3
fi
+if test -r SetOptions.3; then
+ rm -f Tk_InitOptions.3
+ ln SetOptions.3 Tk_InitOptions.3
+fi
if test -r InternAtom.3; then
rm -f Tk_InternAtom.3
ln InternAtom.3 Tk_InternAtom.3
@@ -611,9 +719,9 @@ if test -r Name.3; then
rm -f Tk_NameToWindow.3
ln Name.3 Tk_NameToWindow.3
fi
-if test -r ConfigWidg.3; then
+if test -r SetOptions.3; then
rm -f Tk_Offset.3
- ln ConfigWidg.3 Tk_Offset.3
+ ln SetOptions.3 Tk_Offset.3
fi
if test -r OwnSelect.3; then
rm -f Tk_OwnSelection.3
@@ -691,6 +799,10 @@ if test -r Restack.3; then
rm -f Tk_RestackWindow.3
ln Restack.3 Tk_RestackWindow.3
fi
+if test -r SetOptions.3; then
+ rm -f Tk_RestoreSavedOptions.3
+ ln SetOptions.3 Tk_RestoreSavedOptions.3
+fi
if test -r RestrictEv.3; then
rm -f Tk_RestrictEvents.3
ln RestrictEv.3 Tk_RestrictEvents.3
@@ -723,6 +835,10 @@ if test -r GeomReq.3; then
rm -f Tk_SetInternalBorder.3
ln GeomReq.3 Tk_SetInternalBorder.3
fi
+if test -r SetOptions.3; then
+ rm -f Tk_SetOptions.3
+ ln SetOptions.3 Tk_SetOptions.3
+fi
if test -r ConfigWind.3; then
rm -f Tk_SetWindowBackground.3
ln ConfigWind.3 Tk_SetWindowBackground.3
diff --git a/unix/tkAppInit.c b/unix/tkAppInit.c
index 5591d98..cf283fb 100644
--- a/unix/tkAppInit.c
+++ b/unix/tkAppInit.c
@@ -5,15 +5,16 @@
* use in wish and similar Tk-based applications.
*
* Copyright (c) 1993 The Regents of the University of California.
- * Copyright (c) 1994 Sun Microsystems, Inc.
+ * Copyright (c) 1994-1997 Sun Microsystems, Inc.
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkAppInit.c,v 1.3 1999/02/04 20:57:18 stanton Exp $
+ * RCS: @(#) $Id: tkAppInit.c,v 1.4 1999/04/16 01:51:45 stanton Exp $
*/
#include "tk.h"
+#include "locale.h"
/*
* The following variable is a special hack that is needed in order for
@@ -24,6 +25,7 @@ extern int matherr();
int *tclDummyMathPtr = (int *) matherr;
#ifdef TK_TEST
+extern int Tcltest_Init _ANSI_ARGS_((Tcl_Interp *interp));
extern int Tktest_Init _ANSI_ARGS_((Tcl_Interp *interp));
#endif /* TK_TEST */
@@ -64,7 +66,7 @@ main(argc, argv)
*
* Results:
* Returns a standard Tcl completion code, and leaves an error
- * message in interp->result if an error occurs.
+ * message in the interp's result if an error occurs.
*
* Side effects:
* Depends on the startup script.
@@ -84,6 +86,11 @@ Tcl_AppInit(interp)
}
Tcl_StaticPackage(interp, "Tk", Tk_Init, Tk_SafeInit);
#ifdef TK_TEST
+ if (Tcltest_Init(interp) == TCL_ERROR) {
+ return TCL_ERROR;
+ }
+ Tcl_StaticPackage(interp, "Tcltest", Tcltest_Init,
+ (Tcl_PackageInitProc *) NULL);
if (Tktest_Init(interp) == TCL_ERROR) {
return TCL_ERROR;
}
diff --git a/unix/tkUnix.c b/unix/tkUnix.c
index b50ee42..769a0b7 100644
--- a/unix/tkUnix.c
+++ b/unix/tkUnix.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkUnix.c,v 1.3 1999/03/10 07:04:45 stanton Exp $
+ * RCS: @(#) $Id: tkUnix.c,v 1.4 1999/04/16 01:51:45 stanton Exp $
*/
#include <tkInt.h>
@@ -40,7 +40,8 @@ TkGetServerInfo(interp, tkwin)
Tk_Window tkwin; /* Token for window; this selects a
* particular display and server. */
{
- char buffer[50], buffer2[50];
+ char buffer[8 + TCL_INTEGER_SPACE * 2];
+ char buffer2[TCL_INTEGER_SPACE];
sprintf(buffer, "X%dR%d ", ProtocolVersion(Tk_Display(tkwin)),
ProtocolRevision(Tk_Display(tkwin)));
@@ -77,7 +78,6 @@ TkGetDefaultScreenName(interp, screenName)
}
return screenName;
}
-
/*
*----------------------------------------------------------------------
diff --git a/unix/tkUnixButton.c b/unix/tkUnixButton.c
index 29570d3..2d4cb25 100644
--- a/unix/tkUnixButton.c
+++ b/unix/tkUnixButton.c
@@ -4,12 +4,12 @@
* This file implements the Unix specific portion of the button
* widgets.
*
- * Copyright (c) 1996 by Sun Microsystems, Inc.
+ * Copyright (c) 1996-1997 by Sun Microsystems, Inc.
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkUnixButton.c,v 1.2 1998/09/14 18:23:55 stanton Exp $
+ * RCS: @(#) $Id: tkUnixButton.c,v 1.3 1999/04/16 01:51:45 stanton Exp $
*/
#include "tkButton.h"
@@ -85,12 +85,11 @@ TkpDisplayButton(clientData)
int x = 0; /* Initialization only needed to stop
* compiler warning. */
int y, relief;
- register Tk_Window tkwin = butPtr->tkwin;
+ Tk_Window tkwin = butPtr->tkwin;
int width, height;
- int offset; /* 0 means this is a label widget. 1 means
- * it is a flavor of button, so we offset
- * the text to make the button appear to
- * move up and down as the relief changes. */
+ int offset; /* 1 means this is a button widget, so we
+ * offset the text to make the button appear
+ * to move up and down as the relief changes. */
butPtr->flags &= ~REDRAW_PENDING;
if ((butPtr->tkwin == NULL) || !Tk_IsMapped(tkwin)) {
@@ -98,16 +97,16 @@ TkpDisplayButton(clientData)
}
border = butPtr->normalBorder;
- if ((butPtr->state == tkDisabledUid) && (butPtr->disabledFg != NULL)) {
+ if ((butPtr->state == STATE_DISABLED) && (butPtr->disabledFg != NULL)) {
gc = butPtr->disabledGC;
- } else if ((butPtr->state == tkActiveUid)
+ } else if ((butPtr->state == STATE_ACTIVE)
&& !Tk_StrictMotif(butPtr->tkwin)) {
gc = butPtr->activeTextGC;
border = butPtr->activeBorder;
} else {
gc = butPtr->normalTextGC;
}
- if ((butPtr->flags & SELECTED) && (butPtr->state != tkActiveUid)
+ if ((butPtr->flags & SELECTED) && (butPtr->state != STATE_ACTIVE)
&& (butPtr->selectBorder != NULL) && !butPtr->indicatorOn) {
border = butPtr->selectBorder;
}
@@ -141,7 +140,7 @@ TkpDisplayButton(clientData)
* Display image or bitmap or text for button.
*/
- if (butPtr->image != None) {
+ if (butPtr->image != NULL) {
Tk_SizeOfImage(butPtr->image, &width, &height);
imageOrBitmap:
@@ -213,7 +212,7 @@ TkpDisplayButton(clientData)
y -= dim/2;
if (dim > 2*butPtr->borderWidth) {
Tk_Draw3DRectangle(tkwin, pixmap, border, x, y, dim, dim,
- butPtr->borderWidth,
+ butPtr->borderWidth,
(butPtr->flags & SELECTED) ? TK_RELIEF_SUNKEN :
TK_RELIEF_RAISED);
x += butPtr->borderWidth;
@@ -222,7 +221,7 @@ TkpDisplayButton(clientData)
if (butPtr->flags & SELECTED) {
GC gc;
- gc = Tk_3DBorderGC(tkwin,(butPtr->selectBorder != NULL)
+ gc = Tk_3DBorderGC(tkwin, (butPtr->selectBorder != NULL)
? butPtr->selectBorder : butPtr->normalBorder,
TK_3D_FLAT_GC);
XFillRectangle(butPtr->display, pixmap, gc, x, y,
@@ -269,7 +268,7 @@ TkpDisplayButton(clientData)
* must temporarily modify the GC.
*/
- if ((butPtr->state == tkDisabledUid)
+ if ((butPtr->state == STATE_DISABLED)
&& ((butPtr->disabledFg == NULL) || (butPtr->image != NULL))) {
if ((butPtr->flags & SELECTED) && !butPtr->indicatorOn
&& (butPtr->selectBorder != NULL)) {
@@ -297,7 +296,8 @@ TkpDisplayButton(clientData)
if (relief != TK_RELIEF_FLAT) {
int inset = butPtr->highlightWidth;
- if (butPtr->defaultState == tkActiveUid) {
+
+ if (butPtr->defaultState == DEFAULT_ACTIVE) {
/*
* Draw the default ring with 2 pixels of space between the
* default ring and the button and the default ring and the
@@ -319,15 +319,14 @@ TkpDisplayButton(clientData)
Tk_Height(tkwin) - 2*inset, 2, TK_RELIEF_FLAT);
inset += 2;
- } else if (butPtr->defaultState == tkNormalUid) {
+ } else if (butPtr->defaultState == DEFAULT_NORMAL) {
/*
* Leave room for the default ring and write over any text or
* background color.
*/
Tk_Draw3DRectangle(tkwin, pixmap, butPtr->highlightBorder, 0,
- 0, Tk_Width(tkwin),
- Tk_Height(tkwin), 5, TK_RELIEF_FLAT);
+ 0, Tk_Width(tkwin), Tk_Height(tkwin), 5, TK_RELIEF_FLAT);
inset += 5;
}
@@ -339,7 +338,7 @@ TkpDisplayButton(clientData)
Tk_Width(tkwin) - 2*inset, Tk_Height(tkwin) - 2*inset,
butPtr->borderWidth, relief);
}
- if (butPtr->highlightWidth != 0) {
+ if (butPtr->highlightWidth > 0) {
GC gc;
if (butPtr->flags & GOT_FOCUS) {
@@ -354,7 +353,7 @@ TkpDisplayButton(clientData)
* padding space left for a default ring.
*/
- if (butPtr->defaultState == tkNormalUid) {
+ if (butPtr->defaultState == DEFAULT_NORMAL) {
TkDrawInsetFocusHighlight(tkwin, gc, butPtr->highlightWidth,
pixmap, 5);
} else {
@@ -398,16 +397,13 @@ TkpComputeButtonGeometry(butPtr)
int width, height, avgWidth;
Tk_FontMetrics fm;
- if (butPtr->highlightWidth < 0) {
- butPtr->highlightWidth = 0;
- }
butPtr->inset = butPtr->highlightWidth + butPtr->borderWidth;
/*
* Leave room for the default ring if needed.
*/
- if (butPtr->defaultState != tkDisabledUid) {
+ if (butPtr->defaultState != DEFAULT_DISABLED) {
butPtr->inset += 5;
}
butPtr->indicatorSpace = 0;
@@ -433,9 +429,10 @@ TkpComputeButtonGeometry(butPtr)
goto imageOrBitmap;
} else {
Tk_FreeTextLayout(butPtr->textLayout);
+
butPtr->textLayout = Tk_ComputeTextLayout(butPtr->tkfont,
- butPtr->text, -1, butPtr->wrapLength, butPtr->justify, 0,
- &butPtr->textWidth, &butPtr->textHeight);
+ Tcl_GetString(butPtr->textPtr), -1, butPtr->wrapLength,
+ butPtr->justify, 0, &butPtr->textWidth, &butPtr->textHeight);
width = butPtr->textWidth;
height = butPtr->textHeight;
diff --git a/unix/tkUnixConfig.c b/unix/tkUnixConfig.c
new file mode 100644
index 0000000..26f7dd1
--- /dev/null
+++ b/unix/tkUnixConfig.c
@@ -0,0 +1,45 @@
+/*
+ * tkUnixConfig.c --
+ *
+ * This module implements the Unix system defaults for
+ * the configuration package.
+ *
+ * Copyright (c) 1997 by Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * RCS: @(#) $Id: tkUnixConfig.c,v 1.2 1999/04/16 01:51:45 stanton Exp $
+ */
+
+#include "tk.h"
+#include "tkInt.h"
+
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TkpGetSystemDefault --
+ *
+ * Given a dbName and className for a configuration option,
+ * return a string representation of the option.
+ *
+ * Results:
+ * Returns a Tk_Uid that is the string identifier that identifies
+ * this option. Returns NULL if there are no system defaults
+ * that match this pair.
+ *
+ * Side effects:
+ * None, once the package is initialized.
+ *
+ *----------------------------------------------------------------------
+ */
+
+Tcl_Obj *
+TkpGetSystemDefault(tkwin, dbName, className)
+ Tk_Window tkwin; /* A window to use. */
+ char *dbName; /* The option database name. */
+ char *className; /* The name of the option class. */
+{
+ return NULL;
+}
diff --git a/unix/tkUnixCursor.c b/unix/tkUnixCursor.c