diff options
Diffstat (limited to 'unix')
-rwxr-xr-x | unix/configure | 6 | ||||
-rw-r--r-- | unix/configure.in | 6 | ||||
-rw-r--r-- | unix/tkUnixFont.c | 107 |
3 files changed, 110 insertions, 9 deletions
diff --git a/unix/configure b/unix/configure index 3f644d0..9a3a53f 100755 --- a/unix/configure +++ b/unix/configure @@ -1339,7 +1339,7 @@ TK_MAJOR_VERSION=8 TK_MINOR_VERSION=5 TK_PATCH_LEVEL="a4" VERSION=${TK_VERSION} -LOCALES="cs de el en en_gb es fr it nl ru" +LOCALES="cs de el en en_gb eo es es_ES fr it nl pl pt ru" #-------------------------------------------------------------------- # Find and load the tclConfig.sh file @@ -8744,7 +8744,7 @@ _ACEOF LIBS="$LIBS -framework Carbon -framework IOKit" CFLAGS="$CFLAGS -fpascal-strings" TK_WINDOWINGSYSTEM=AQUA - if test "${enable_symbols+set}" = set; then + if test "${enable_symbols}" = yes; then cat >>confdefs.h <<\_ACEOF #define TK_MAC_DEBUG 1 @@ -9900,7 +9900,7 @@ echo "${ECHO_T}standard shared library" >&6 fi TK_SHLIB_LD_EXTRAS="-compatibility_version ${TK_VERSION} -current_version ${TK_VERSION}`echo ${TK_PATCH_LEVEL} | awk '{match($0, "\\\.[0-9]+"); print substr($0,RSTART,RLENGTH)}'`" - TK_SHLIB_LD_EXTRAS="${TK_SHLIB_LD_EXTRAS}"' -install_name ${DYLIB_INSTALL_DIR}/${TK_LIB_FILE} -seg1addr 0xb000000 -unexported_symbols_list $$(f=$(TCL_STUB_LIB_FILE).E && nm -gjp $(TCL_BIN_DIR)/$(TCL_STUB_LIB_FILE) | grep ^_ > $$f && echo $$f)' + TK_SHLIB_LD_EXTRAS="${TK_SHLIB_LD_EXTRAS}"' -install_name ${DYLIB_INSTALL_DIR}/${TK_LIB_FILE} -seg1addr 0xb000000 -unexported_symbols_list $$(f=$(TCL_STUB_LIB_FILE).E && nm -gjp $(TCL_BIN_DIR)/$(TCL_STUB_LIB_FILE) | grep ^_[^_] > $$f && echo $$f)' fi if test "$FRAMEWORK_BUILD" = "1" ; then diff --git a/unix/configure.in b/unix/configure.in index e073821..e7b77a0 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -3,7 +3,7 @@ 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. # -# RCS: @(#) $Id: configure.in,v 1.117 2006/03/16 13:59:12 dkf Exp $ +# RCS: @(#) $Id: configure.in,v 1.118 2006/03/22 00:21:19 das Exp $ AC_INIT([tk],[8.5]) AC_PREREQ(2.59) @@ -264,7 +264,7 @@ if test $tk_aqua = yes; then LIBS="$LIBS -framework Carbon -framework IOKit" CFLAGS="$CFLAGS -fpascal-strings" TK_WINDOWINGSYSTEM=AQUA - if test "${enable_symbols+set}" = set; then + if test "${enable_symbols}" = yes; then AC_DEFINE(TK_MAC_DEBUG, 1, [Are TkAqua debug messages enabled?]) fi else @@ -476,7 +476,7 @@ WISH_RSRC_FILE='wish$(VERSION).rsrc' if test "`uname -s`" = "Darwin" ; then SC_ENABLE_FRAMEWORK TK_SHLIB_LD_EXTRAS="-compatibility_version ${TK_VERSION} -current_version ${TK_VERSION}`echo ${TK_PATCH_LEVEL} | awk ['{match($0, "\\\.[0-9]+"); print substr($0,RSTART,RLENGTH)}']`" - TK_SHLIB_LD_EXTRAS="${TK_SHLIB_LD_EXTRAS}"' -install_name ${DYLIB_INSTALL_DIR}/${TK_LIB_FILE} -seg1addr 0xb000000 -unexported_symbols_list $$(f=$(TCL_STUB_LIB_FILE).E && nm -gjp $(TCL_BIN_DIR)/$(TCL_STUB_LIB_FILE) | grep ^_ > $$f && echo $$f)' + TK_SHLIB_LD_EXTRAS="${TK_SHLIB_LD_EXTRAS}"' -install_name ${DYLIB_INSTALL_DIR}/${TK_LIB_FILE} -seg1addr 0xb000000 -unexported_symbols_list $$(f=$(TCL_STUB_LIB_FILE).E && nm -gjp $(TCL_BIN_DIR)/$(TCL_STUB_LIB_FILE) | grep ^_[[^_]] > $$f && echo $$f)' fi if test "$FRAMEWORK_BUILD" = "1" ; then diff --git a/unix/tkUnixFont.c b/unix/tkUnixFont.c index 4caa7ea..e4718d8 100644 --- a/unix/tkUnixFont.c +++ b/unix/tkUnixFont.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkUnixFont.c,v 1.26 2006/02/07 11:20:01 dkf Exp $ + * RCS: @(#) $Id: tkUnixFont.c,v 1.27 2006/03/22 00:21:19 das Exp $ */ #include "tkUnixInt.h" @@ -1115,6 +1115,65 @@ Tk_MeasureChars( /* *--------------------------------------------------------------------------- * + * TkpMeasureCharsInContext -- + * + * Determine the number of bytes from the string that will fit in the + * given horizontal span. The measurement is done under the assumption + * that TkpDrawCharsInContext() will be used to actually display the + * characters. + * + * This one is almost the same as Tk_MeasureChars(), but with access to + * all the characters on the line for context. On X11 this context + * isn't consulted, so we just call Tk_MeasureChars(). + * + * Results: + * The return value is the number of bytes from source that + * fit into the span that extends from 0 to maxLength. *lengthPtr is + * filled with the x-coordinate of the right edge of the last + * character that did fit. + * + * Side effects: + * None. + * + *--------------------------------------------------------------------------- + */ + +int +TkpMeasureCharsInContext(tkfont, source, numBytes, rangeStart, rangeLength, + maxLength, flags, lengthPtr) + Tk_Font tkfont; /* Font in which characters will be drawn. */ + CONST char * source; /* UTF-8 string to be displayed. Need not be + * '\0' terminated. */ + int numBytes; /* Maximum number of bytes to consider from + * source string in all. */ + int rangeStart; /* Index of first byte to measure. */ + int rangeLength; /* Length of range to measure in bytes. */ + int maxLength; /* If >= 0, maxLength specifies the longest + * permissible line length; don't consider any + * character that would cross this x-position. + * If < 0, then line length is unbounded and the + * flags argument is ignored. */ + int flags; /* Various flag bits OR-ed together: + * TK_PARTIAL_OK means include the last char + * which only partially fit on this line. + * TK_WHOLE_WORDS means stop on a word boundary, + * if possible. TK_AT_LEAST_ONE means return at + * least one character even if no characters fit. + * TK_ISOLATE_END means that the last character + * should not be considered in context with the + * rest of the string (used for breaking + * lines). */ + int * lengthPtr; /* Filled with x-location just after the + * terminating character. */ +{ + (void) numBytes; /*unused*/ + return Tk_MeasureChars(tkfont, source + rangeStart, rangeLength, + maxLength, flags, lengthPtr); +} + +/* + *--------------------------------------------------------------------------- + * * Tk_DrawChars -- * * Draw a string of characters on the screen. Tk_DrawChars() expands @@ -1249,9 +1308,51 @@ Tk_DrawChars( (unsigned) (x - xStart), (unsigned) fontPtr->barHeight); } } + +/* + *--------------------------------------------------------------------------- + * + * TkpDrawCharsInContext -- + * + * Draw a string of characters on the screen like Tk_DrawChars(), but + * with access to all the characters on the line for context. On X11 + * this context isn't consulted, so we just call Tk_DrawChars(). + * + * Results: + * None. + * + * Side effects: + * Information gets drawn on the screen. + * + *--------------------------------------------------------------------------- + */ - - +void +TkpDrawCharsInContext(display, drawable, gc, tkfont, source, numBytes, + rangeStart, rangeLength, x, y) + Display * display; /* Display on which to draw. */ + Drawable drawable; /* Window or pixmap in which to draw. */ + GC gc; /* Graphics context for drawing characters. */ + Tk_Font tkfont; /* Font in which characters will be drawn; must + * be the same as font used in GC. */ + CONST char * source; /* UTF-8 string to be displayed. Need not be + * '\0' terminated. All Tk meta-characters + * (tabs, control characters, and newlines) + * should be stripped out of the string that is + * passed to this function. If they are not + * stripped out, they will be displayed as + * regular printing characters. */ + int numBytes; /* Number of bytes in string. */ + int rangeStart; /* Index of first byte to draw. */ + int rangeLength; /* Length of range to draw in bytes. */ + int x; int y; /* Coordinates at which to place origin of the + * whole (not just the range) string when + * drawing. */ +{ + (void) numBytes; /*unused*/ + Tk_DrawChars(display, drawable, gc, tkfont, + source + rangeStart, rangeLength, x, y); +} /* *------------------------------------------------------------------------- |