Index: .github/workflows/linux-build.yml ================================================================== --- .github/workflows/linux-build.yml +++ .github/workflows/linux-build.yml @@ -3,10 +3,11 @@ push: branches: - "main" - "core-8-branch" - "core-8-6-branch" + - "tip-706" tags: - "core-**" permissions: contents: read defaults: Index: .github/workflows/mac-build.yml ================================================================== --- .github/workflows/mac-build.yml +++ .github/workflows/mac-build.yml @@ -3,10 +3,11 @@ push: branches: - "main" - "core-8-branch" - "core-8-6-branch" + - "tip-706" tags: - "core-**" permissions: contents: read env: Index: .github/workflows/win-build.yml ================================================================== --- .github/workflows/win-build.yml +++ .github/workflows/win-build.yml @@ -3,10 +3,11 @@ push: branches: - "main" - "core-8-branch" - "core-8-6-branch" + - "tip-706" tags: - "core-**" permissions: contents: read env: Index: doc/MeasureChar.3 ================================================================== --- doc/MeasureChar.3 +++ doc/MeasureChar.3 @@ -6,24 +6,32 @@ '\" .TH Tk_MeasureChars 3 8.1 Tk "Tk Library Procedures" .so man.macros .BS .SH NAME -Tk_MeasureChars, Tk_TextWidth, Tk_DrawChars, Tk_UnderlineChars \- routines to measure and display simple single-line strings. +Tk_MeasureChars, Tk_MeasureCharsInContext, Tk_TextWidth, Tk_DrawChars, Tk_DrawCharsInContext, +Tk_UnderlineChars, Tk_UnderlineCharsInContext \- routines to measure and display simple single-line strings. .SH SYNOPSIS .nf \fB#include \fR .sp int \fBTk_MeasureChars\fR(\fItkfont, string, numBytes, maxPixels, flags, lengthPtr\fR) .sp +int +\fBTk_MeasureCharsInContext\fR(\fItkfont, string, numBytes, rangeStart, rangeLength, maxPixels, flags, lengthPtr\fR) +.sp int \fBTk_TextWidth\fR(\fItkfont, string, numBytes\fR) .sp \fBTk_DrawChars\fR(\fIdisplay, drawable, gc, tkfont, string, numBytes, x, y\fR) .sp +\fBTk_DrawCharsInContext\fR(\fIdisplay, drawable, gc, tkfont, string, numBytes, rangeStart, rangeLength, x, y\fR) +.sp \fBTk_UnderlineChars\fR(\fIdisplay, drawable, gc, tkfont, string, x, y, firstByte, lastByte\fR) +.sp +\fBTk_UnderlineCharsInContext\fR(\fIdisplay, drawable, gc, tkfont, string, numBytes, x, y, firstByte, lastByte\fR) .fi .SH ARGUMENTS .AS "const char" firstChar .AP Tk_Font tkfont in Token for font in which text is to be drawn or measured. Must have been @@ -50,10 +58,13 @@ characters could fit in the length given by \fImaxPixels\fR. If \fBTK_AT_LEAST_ONE\fR is set and \fBTK_WHOLE_WORDS\fR is also set, it means that if not even one word fits on the line, return the first few letters of the word that did fit; if not even one letter of the word fit, then the first letter will still be returned. +\fBTK_ISOLATE_END\fR means that the last character should not be considered in +context with the rest of the string (used for breaking lines, with the +Tk_*InContext variants of the functions only). .AP int *lengthPtr out Filled with the number of pixels occupied by the number of characters returned as the result of \fBTk_MeasureChars\fR. .AP Display *display in Display on which to draw. @@ -70,10 +81,14 @@ \fIstring\fR. Underlining begins at the left edge of this character. .AP int lastByte in The index of the first byte of the last character up to which the underline will be drawn. The character specified by \fIlastByte\fR will not itself be underlined. +.AP Tcl_Size rangeStart in +Index of first byte to draw or to measure. +.AP Tcl_Size rangeLength in +Length of range to draw or to measure, in bytes. .BE .SH DESCRIPTION .PP These routines are for measuring and displaying simple single-font, single-line strings. To measure and display single-font, multi-line, @@ -119,9 +134,16 @@ given \fIstring\fR. It does not draw the characters (which are assumed to have been displayed previously by \fBTk_DrawChars\fR); it just draws the underline. This procedure is used to underline a few characters without having to construct an underlined font. To produce natively underlined text, the appropriate underlined font should be constructed and used. +.PP +\fBTk_MeasureCharsInContext\fR, \fBTk_DrawCharsInContext\fR, +\fBTk_UnderlineCharsInContext\fR are variants of respectively +\fBTk_MeasureChars\fR, \fBTk_DrawChars\fR and \fBTk_UnderlineChars\fR, +but with access to all the characters on the line for context. Except +on macOS, this context isn't actually consulted (meaning the out of +context variants are called). .SH "SEE ALSO" font(n), FontId(3) .SH KEYWORDS font, measurement Index: generic/tk.decls ================================================================== --- generic/tk.decls +++ generic/tk.decls @@ -1064,10 +1064,30 @@ XColor *lightColorPtr) } declare 290 { Window Tk_MakeWindow(Tk_Window tkwin, Window parent) } + +# TIP#706 +declare 291 { + void Tk_UnderlineCharsInContext(Display *display, + Drawable drawable, GC gc, Tk_Font tkfont, + const char *string, Tcl_Size numBytes, int x, int y, + Tcl_Size firstByte, Tcl_Size lastByte) +} +declare 292 { + void Tk_DrawCharsInContext(Display * display, + Drawable drawable, GC gc, Tk_Font tkfont, + const char *string, Tcl_Size numBytes, Tcl_Size rangeStart, + Tcl_Size rangeLength, int x, int y) +} +declare 293 { + int Tk_MeasureCharsInContext(Tk_Font tkfont, + const char *string, Tcl_Size numBytes, Tcl_Size rangeStart, + Tcl_Size rangeLength, int maxPixels, int flags, + int *lengthPtr) +} # Define the platform specific public Tk interface. These functions are # only available on the designated platform. Index: generic/tk.h ================================================================== --- generic/tk.h +++ generic/tk.h @@ -561,10 +561,11 @@ */ #define TK_WHOLE_WORDS 1 #define TK_AT_LEAST_ONE 2 #define TK_PARTIAL_OK 4 +#define TK_ISOLATE_END 32 /* * Flags passed to Tk_ComputeTextLayout: */ Index: generic/tkDecls.h ================================================================== --- generic/tkDecls.h +++ generic/tkDecls.h @@ -886,10 +886,26 @@ EXTERN void Tk_Get3DBorderColors(Tk_3DBorder border, XColor *bgColorPtr, XColor *darkColorPtr, XColor *lightColorPtr); /* 290 */ EXTERN Window Tk_MakeWindow(Tk_Window tkwin, Window parent); +/* 291 */ +EXTERN void Tk_UnderlineCharsInContext(Display *display, + Drawable drawable, GC gc, Tk_Font tkfont, + const char *string, Tcl_Size numBytes, int x, + int y, Tcl_Size firstByte, Tcl_Size lastByte); +/* 292 */ +EXTERN void Tk_DrawCharsInContext(Display *display, + Drawable drawable, GC gc, Tk_Font tkfont, + const char *string, Tcl_Size numBytes, + Tcl_Size rangeStart, Tcl_Size rangeLength, + int x, int y); +/* 293 */ +EXTERN int Tk_MeasureCharsInContext(Tk_Font tkfont, + const char *string, Tcl_Size numBytes, + Tcl_Size rangeStart, Tcl_Size rangeLength, + int maxPixels, int flags, int *lengthPtr); typedef struct { const struct TkPlatStubs *tkPlatStubs; const struct TkIntStubs *tkIntStubs; const struct TkIntPlatStubs *tkIntPlatStubs; @@ -1189,10 +1205,13 @@ int (*tk_UseWindow) (Tcl_Interp *interp, Tk_Window tkwin, const char *string); /* 286 */ void (*tk_MakeContainer) (Tk_Window tkwin); /* 287 */ Tk_Window (*tk_GetOtherWindow) (Tk_Window tkwin); /* 288 */ void (*tk_Get3DBorderColors) (Tk_3DBorder border, XColor *bgColorPtr, XColor *darkColorPtr, XColor *lightColorPtr); /* 289 */ Window (*tk_MakeWindow) (Tk_Window tkwin, Window parent); /* 290 */ + void (*tk_UnderlineCharsInContext) (Display *display, Drawable drawable, GC gc, Tk_Font tkfont, const char *string, Tcl_Size numBytes, int x, int y, Tcl_Size firstByte, Tcl_Size lastByte); /* 291 */ + void (*tk_DrawCharsInContext) (Display *display, Drawable drawable, GC gc, Tk_Font tkfont, const char *string, Tcl_Size numBytes, Tcl_Size rangeStart, Tcl_Size rangeLength, int x, int y); /* 292 */ + int (*tk_MeasureCharsInContext) (Tk_Font tkfont, const char *string, Tcl_Size numBytes, Tcl_Size rangeStart, Tcl_Size rangeLength, int maxPixels, int flags, int *lengthPtr); /* 293 */ } TkStubs; extern const TkStubs *tkStubsPtr; #ifdef __cplusplus @@ -1768,10 +1787,16 @@ (tkStubsPtr->tk_GetOtherWindow) /* 288 */ #define Tk_Get3DBorderColors \ (tkStubsPtr->tk_Get3DBorderColors) /* 289 */ #define Tk_MakeWindow \ (tkStubsPtr->tk_MakeWindow) /* 290 */ +#define Tk_UnderlineCharsInContext \ + (tkStubsPtr->tk_UnderlineCharsInContext) /* 291 */ +#define Tk_DrawCharsInContext \ + (tkStubsPtr->tk_DrawCharsInContext) /* 292 */ +#define Tk_MeasureCharsInContext \ + (tkStubsPtr->tk_MeasureCharsInContext) /* 293 */ #endif /* defined(USE_TK_STUBS) */ /* !END!: Do not edit above this line. */ Index: generic/tkFont.c ================================================================== --- generic/tkFont.c +++ generic/tkFont.c @@ -1853,11 +1853,11 @@ } /* *--------------------------------------------------------------------------- * - * Tk_UnderlineChars, TkUnderlineCharsInContext -- + * Tk_UnderlineChars, Tk_UnderlineCharsInContext -- * * These procedures draw an underline for a given range of characters in * a given string. They don't draw the characters (which are assumed to * have been displayed previously); they just draw the underline. These * procedures would mainly be used to quickly underline a few characters @@ -1889,16 +1889,16 @@ * string is drawn. */ Tcl_Size firstByte, /* Index of first byte of first character. */ Tcl_Size lastByte) /* Index of first byte after the last * character. */ { - TkUnderlineCharsInContext(display, drawable, gc, tkfont, string, + Tk_UnderlineCharsInContext(display, drawable, gc, tkfont, string, lastByte, x, y, firstByte, lastByte); } void -TkUnderlineCharsInContext( +Tk_UnderlineCharsInContext( Display *display, /* Display on which to draw. */ Drawable drawable, /* Window or pixmap in which to draw. */ GC gc, /* Graphics context for actually drawing * line. */ Tk_Font tkfont, /* Font used in GC; must have been allocated @@ -1914,13 +1914,13 @@ * character. */ { TkFont *fontPtr = (TkFont *) tkfont; int startX, endX; - TkpMeasureCharsInContext(tkfont, string, numBytes, 0, firstByte, -1, 0, + Tk_MeasureCharsInContext(tkfont, string, numBytes, 0, firstByte, -1, 0, &startX); - TkpMeasureCharsInContext(tkfont, string, numBytes, 0, lastByte, -1, 0, + Tk_MeasureCharsInContext(tkfont, string, numBytes, 0, lastByte, -1, 0, &endX); XFillRectangle(display, drawable, gc, x + startX, y + fontPtr->underlinePos, (unsigned) (endX - startX), (unsigned) fontPtr->underlineHeight); @@ -2340,11 +2340,11 @@ if (lastChar < numDisplayChars) { numDisplayChars = lastChar; } lastByte = Tcl_UtfAtIndex(chunkPtr->start, numDisplayChars); #ifdef TK_DRAW_IN_CONTEXT - TkpDrawCharsInContext(display, drawable, gc, layoutPtr->tkfont, + Tk_DrawCharsInContext(display, drawable, gc, layoutPtr->tkfont, chunkPtr->start, chunkPtr->numBytes, firstByte - chunkPtr->start, lastByte - firstByte, x+chunkPtr->x, y+chunkPtr->y); #else /* !TK_DRAW_IN_CONTEXT */ Tk_DrawChars(display, drawable, gc, layoutPtr->tkfont, firstByte, @@ -2413,11 +2413,11 @@ lastByte = Tcl_UtfAtIndex(chunkPtr->start, numDisplayChars); #ifdef TK_DRAW_IN_CONTEXT dx = cosA * (chunkPtr->x) + sinA * (chunkPtr->y); dy = -sinA * (chunkPtr->x) + cosA * (chunkPtr->y); if (angle == 0.0) { - TkpDrawCharsInContext(display, drawable, gc, + Tk_DrawCharsInContext(display, drawable, gc, layoutPtr->tkfont, chunkPtr->start, chunkPtr->numBytes, firstByte - chunkPtr->start, lastByte - firstByte, (int)(x + dx), (int)(y + dy)); } else { TkpDrawAngledCharsInContext(display, drawable, gc, Index: generic/tkInt.h ================================================================== --- generic/tkInt.h +++ generic/tkInt.h @@ -989,18 +989,10 @@ #define TK_GRAB_NONE 0 #define TK_GRAB_IN_TREE 1 #define TK_GRAB_ANCESTOR 2 #define TK_GRAB_EXCLUDED 3 -/* - * Additional flag for TkpMeasureCharsInContext. Coordinate with other flags - * for this routine, but don't make public until TkpMeasureCharsInContext is - * made public, too. - */ - -#define TK_ISOLATE_END 32 - /* * The macro below is used to modify a "char" value (e.g. by casting it to an * unsigned character) so that it can be used safely with macros such as * isspace(). */ @@ -1234,26 +1226,14 @@ MODULE_SCOPE int TkParsePadAmount(Tcl_Interp *interp, Tk_Window tkwin, Tcl_Obj *objPtr, int *pad1Ptr, int *pad2Ptr); MODULE_SCOPE void TkFocusSplit(TkWindow *winPtr); MODULE_SCOPE void TkFocusJoin(TkWindow *winPtr); -MODULE_SCOPE void TkpDrawCharsInContext(Display * display, - Drawable drawable, GC gc, Tk_Font tkfont, - const char *source, Tcl_Size numBytes, Tcl_Size rangeStart, - Tcl_Size rangeLength, int x, int y); MODULE_SCOPE void TkpDrawAngledCharsInContext(Display * display, Drawable drawable, GC gc, Tk_Font tkfont, const char *source, Tcl_Size numBytes, Tcl_Size rangeStart, Tcl_Size rangeLength, double x, double y, double angle); -MODULE_SCOPE int TkpMeasureCharsInContext(Tk_Font tkfont, - const char *source, Tcl_Size numBytes, Tcl_Size rangeStart, - Tcl_Size rangeLength, int maxLength, int flags, - int *lengthPtr); -MODULE_SCOPE void TkUnderlineCharsInContext(Display *display, - Drawable drawable, GC gc, Tk_Font tkfont, - const char *string, Tcl_Size numBytes, int x, int y, - Tcl_Size firstByte, Tcl_Size lastByte); MODULE_SCOPE void TkpGetFontAttrsForChar(Tk_Window tkwin, Tk_Font tkfont, int c, struct TkFontAttributes *faPtr); MODULE_SCOPE void TkpDrawFrameEx(Tk_Window tkwin, Drawable drawable, Tk_3DBorder border, int highlightWidth, int borderWidth, int relief); Index: generic/tkStubInit.c ================================================================== --- generic/tkStubInit.c +++ generic/tkStubInit.c @@ -1239,10 +1239,13 @@ Tk_UseWindow, /* 286 */ Tk_MakeContainer, /* 287 */ Tk_GetOtherWindow, /* 288 */ Tk_Get3DBorderColors, /* 289 */ Tk_MakeWindow, /* 290 */ + Tk_UnderlineCharsInContext, /* 291 */ + Tk_DrawCharsInContext, /* 292 */ + Tk_MeasureCharsInContext, /* 293 */ }; /* !END!: Do not edit above this line. */ Index: generic/tkTextDisp.c ================================================================== --- generic/tkTextDisp.c +++ generic/tkTextDisp.c @@ -8054,27 +8054,27 @@ } if (len <= 0) { return; } - TkpDrawCharsInContext(display, dst, stylePtr->fgGC, sValuePtr->tkfont, + Tk_DrawCharsInContext(display, dst, stylePtr->fgGC, sValuePtr->tkfont, string, numBytes, start, len, ciPtr->baseChunkPtr->x + xDisplacement, y + baseline - sValuePtr->offset); if (sValuePtr->underline) { - TkUnderlineCharsInContext(display, dst, stylePtr->ulGC, + Tk_UnderlineCharsInContext(display, dst, stylePtr->ulGC, sValuePtr->tkfont, string, numBytes, ciPtr->baseChunkPtr->x + xDisplacement, y + baseline - sValuePtr->offset, start, start+len); } if (sValuePtr->overstrike) { Tk_FontMetrics fm; Tk_GetFontMetrics(sValuePtr->tkfont, &fm); - TkUnderlineCharsInContext(display, dst, stylePtr->ovGC, + Tk_UnderlineCharsInContext(display, dst, stylePtr->ovGC, sValuePtr->tkfont, string, numBytes, ciPtr->baseChunkPtr->x + xDisplacement, y + baseline - sValuePtr->offset - fm.descent - (fm.ascent * 3) / 10, start, start+len); @@ -8716,11 +8716,11 @@ if ((maxX >= 0) && (curX >= maxX)) { break; } #ifdef TK_DRAW_IN_CONTEXT - start += TkpMeasureCharsInContext(tkfont, source, maxBytes, + start += Tk_MeasureCharsInContext(tkfont, source, maxBytes, start - source, special - start, maxX >= 0 ? maxX - curX : -1, flags, &width); #else (void) maxBytes; start += Tk_MeasureChars(tkfont, start, special - start, @@ -9000,11 +9000,11 @@ * Compare the foreground attributes of two styles. Specifically must * consider: foreground color, font, font style and font decorations, * elide, "offset" and foreground stipple. Do *not* consider: background * color, border, relief or background stipple. * - * If we use TkpDrawCharsInContext(), we also don't need to check + * If we use Tk_DrawCharsInContext(), we also don't need to check * foreground color, font decorations, elide, offset and foreground * stipple, so all that is left is font (including font size and font * style) and "offset". * * Results: Index: macosx/tkMacOSXFont.c ================================================================== --- macosx/tkMacOSXFont.c +++ macosx/tkMacOSXFont.c @@ -952,11 +952,11 @@ * the given horizontal span. The measurement is done under the * assumption that Tk_DrawChars() will be used to actually display the * characters. * * With ATSUI we need the line context to do this right, so we have the - * actual implementation in TkpMeasureCharsInContext(). + * actual implementation in Tk_MeasureCharsInContext(). * * 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. @@ -990,22 +990,22 @@ * means return at least one character even if * no characters fit. */ int *lengthPtr) /* Filled with x-location just after the * terminating character. */ { - return TkpMeasureCharsInContext(tkfont, source, numBytes, 0, numBytes, + return Tk_MeasureCharsInContext(tkfont, source, numBytes, 0, numBytes, maxLength, flags, lengthPtr); } /* *--------------------------------------------------------------------------- * - * TkpMeasureCharsInContext -- + * Tk_MeasureCharsInContext -- * * 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 + * that Tk_DrawCharsInContext() 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. * @@ -1019,11 +1019,11 @@ * *--------------------------------------------------------------------------- */ int -TkpMeasureCharsInContext( +Tk_MeasureCharsInContext( Tk_Font tkfont, /* Font in which characters will be drawn. */ const char * source, /* UTF-8 string to be displayed. Need not be * '\0' terminated. */ Tcl_Size numBytes, /* Maximum number of bytes to consider from * source string in all. */ @@ -1265,11 +1265,11 @@ } /* *--------------------------------------------------------------------------- * - * TkpDrawCharsInContext -- + * Tk_DrawCharsInContext -- * * Draw a string of characters on the screen like Tk_DrawChars(), with * access to all the characters on the line for context. * * Results: @@ -1283,11 +1283,11 @@ * *--------------------------------------------------------------------------- */ void -TkpDrawCharsInContext( +Tk_DrawCharsInContext( 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. */ Index: unix/tkUnixFont.c ================================================================== --- unix/tkUnixFont.c +++ unix/tkUnixFont.c @@ -1000,11 +1000,11 @@ } /* *--------------------------------------------------------------------------- * - * TkpMeasureCharsInContext -- + * Tk_MeasureCharsInContext -- * * 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. @@ -1023,11 +1023,11 @@ * *--------------------------------------------------------------------------- */ int -TkpMeasureCharsInContext( +Tk_MeasureCharsInContext( Tk_Font tkfont, /* Font in which characters will be drawn. */ const char *source, /* UTF-8 string to be displayed. Need not be * '\0' terminated. */ TCL_UNUSED(Tcl_Size), /* Maximum number of bytes to consider from * source string in all. */ @@ -1191,18 +1191,18 @@ } /* *--------------------------------------------------------------------------- * - * TkpDrawCharsInContext -- + * Tk_DrawCharsInContext -- * * 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(). * * Note: TK_DRAW_IN_CONTEXT being currently defined only on macOS, this - * function is unused (and possibly unfinished). See [7655f65ae7]. + * function is unused. * * Results: * None. * * Side effects: @@ -1210,11 +1210,11 @@ * *--------------------------------------------------------------------------- */ void -TkpDrawCharsInContext( +Tk_DrawCharsInContext( 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. */ Index: unix/tkUnixRFont.c ================================================================== --- unix/tkUnixRFont.c +++ unix/tkUnixRFont.c @@ -828,11 +828,11 @@ *lengthPtr = curX; return curByte; } int -TkpMeasureCharsInContext( +Tk_MeasureCharsInContext( Tk_Font tkfont, const char *source, TCL_UNUSED(Tcl_Size), Tcl_Size rangeStart, Tcl_Size rangeLength, @@ -1346,18 +1346,18 @@ } /* *--------------------------------------------------------------------------- * - * TkpDrawCharsInContext -- + * Tk_DrawCharsInContext -- * * 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(). * * Note: TK_DRAW_IN_CONTEXT being currently defined only on macOS, this - * function is unused (and possibly unfinished). See [7655f65ae7]. + * function is unused. * * Results: * None. * * Side effects: @@ -1365,11 +1365,11 @@ * *--------------------------------------------------------------------------- */ void -TkpDrawCharsInContext( +Tk_DrawCharsInContext( 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. */ Index: win/tkWinFont.c ================================================================== --- win/tkWinFont.c +++ win/tkWinFont.c @@ -986,11 +986,11 @@ } /* *--------------------------------------------------------------------------- * - * TkpMeasureCharsInContext -- + * Tk_MeasureCharsInContext -- * * 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. @@ -1009,11 +1009,11 @@ * *--------------------------------------------------------------------------- */ int -TkpMeasureCharsInContext( +Tk_MeasureCharsInContext( Tk_Font tkfont, /* Font in which characters will be drawn. */ const char *source, /* UTF-8 string to be displayed. Need not be * '\0' terminated. */ TCL_UNUSED(Tcl_Size), /* Maximum number of bytes to consider from * source string in all. */ @@ -1353,18 +1353,18 @@ } /* *--------------------------------------------------------------------------- * - * TkpDrawCharsInContext -- + * Tk_DrawCharsInContext -- * * Draw a string of characters on the screen like Tk_DrawChars(), but * with access to all the characters on the line for context. On Windows * this context isn't consulted, so we just call Tk_DrawChars(). * * Note: TK_DRAW_IN_CONTEXT being currently defined only on macOS, this - * function is unused (and possibly unfinished). See [7655f65ae7]. + * function is unused. * * Results: * None. * * Side effects: @@ -1372,11 +1372,11 @@ * *--------------------------------------------------------------------------- */ void -TkpDrawCharsInContext( +Tk_DrawCharsInContext( 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. */