From: Francois V. <fvo...@fr...> - 2024-12-01 11:46:31
|
In Tk, the macOS platform is the only one for which TK_DRAW_IN_CONTEXT is defined, leading to the InContext measuring/drawing functions being called. I can't tell why exactly, it must be due to mac-specificities of some kind, it's a different way of measuring/drawing characters than on other platforms. On Windows and Linux, Tk does not use any InContext functions(*). No context is actually used when measuring or drawing a string. If they would be called, the InContext functions just call the out-of-context variants (I have documented this in my proposed implementation in the tip-706 branch). /(*) Tk_UnderlineCharsInContext() actually is called by Tk_UnderlineChars() on all platforms, however Tk_UnderlineCharsInContext() just makes two calls to Tk_MeasureCharsInContext(), which on Linux and Windows is Tk_MeasureChars(), so the statement "On Windows and Linux, Tk does not use any InContext functions" can really be seen as true./ F. Le 01/12/2024 à 03:54, Marc Culler a écrit : > I don't know the answer, but I suspect that they are needed on all > platforms but only (currently) used on macOS. The difference from the > ones without the context in the name seems to be how end of line > markers are handled. > > - Marc > > On Sat, Nov 30, 2024 at 8:35 PM Kevin Walzer <kw...@co...> wrote: > > I'm curious - why are these functions needed on macOS and not > X11/Windows? > > On 11/30/24 10:52 AM, Francois Vogel wrote: > > Hi all, > > > > This is to let you know that I have written a new TIP: > > > > https://core.tcl-lang.org/tips/doc/trunk/tip/706.md > > > > The goal is to expose 3 Tk functions in the stubs table. This is > > needed to let rtext (the revised text widget as a TEA package) > build > > and link under macOS aqua. About rtext: > > > > https://chiselapp.com/user/fvogel/repository/rtext > > > > Comments, thoughts, all welcome. Depending on the feedback I > get, vote > > will be triggered in possibly less than a week. > > > > Regards, > > > > Francois > > > > > > > > _______________________________________________ > > Tcl-Core mailing list > > Tcl...@li... > > https://lists.sourceforge.net/lists/listinfo/tcl-core > _______________________________________________ > Tcl-Core mailing list > Tcl...@li... > https://lists.sourceforge.net/lists/listinfo/tcl-core > > > > _______________________________________________ > Tcl-Core mailing list > Tcl...@li... > https://lists.sourceforge.net/lists/listinfo/tcl-core |