TIP 706: Expose three Tk "In Context" functions via stubs table

Login
Author:		Francois Vogel <[email protected]>
State:		Final
Type:		Project
Vote:		Done
Vote-Summary:	Accepted 9/0/0
Votes-For:	AK, AN, FV, HO, JN, KW, MC, RA, SL
Votes-Against:	none
Votes-Present:	none
Created:	30-Nov-2024
Tcl-Version:	9.0.1
Tk-Version:	9.0.1
Tk-branch:	tip-706

Abstract

Recently, the revised text widget (see TIP #466) has been made available as a TEA package rtext. Its current state is it builds and tests OK on Windows, Linux, and macOS with XQuartz.

To make it build and test and build on macOS aqua as well, three functions need to be exposed in the stubs table:

This TIP proposes to expose these three functions in the stubs table.

Specification

The following functions will be exported via the stubs table:

    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)
    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)
    int Tk_MeasureCharsInContext(Tk_Font tkfont,
           const char *string, Tcl_Size numBytes, Tcl_Size rangeStart,
           Tcl_Size rangeLength, int maxPixels, int flags,
           int *lengthPtr)

The TK_ISOLATE_END flag will be made public as well since it may be used with Tk_MeasureCharsInContext.

Implementation

Implementation is available in the tip-706 branch of the Tk repository.

Copyright

This document has been placed in the public domain.