diff --git a/ChangeLog b/ChangeLog index f01946a9..941c5091 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3203,7 +3203,7 @@ a better first place to look now. 2009-03-25 Jan Nijtmans * doc/wish.1: Bring doc and demos in line with - * library/demos/hello: http://wiki.tcl.tk/812 + * library/demos/hello: https://wiki.tcl-lang.org/page/exec+magic * library/demos/rmt * library/demos/square * library/demos/tcolor diff --git a/README.md b/README.md index 2c27a642..4b63bed4 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # README: Tk -This is the **Tk 8.6.11** source distribution. +This is the **Tk 8.6.12** source distribution. You can get any source release of Tk from [our distribution site](https://sourceforge.net/projects/tcl/files/Tcl/). @@ -15,7 +15,7 @@ This directory contains the sources and documentation for Tk, a cross-platform GUI toolkit implemented with the Tcl scripting language. For details on features, incompatibilities, and potential problems with -this release, see [the Tcl/Tk 8.6 Web page](https://www.tcl.tk/software/tcltk/8.6.html) +this release, see [the Tcl/Tk 8.6 Web page](https://www.tcl-lang.org/software/tcltk/8.6.html) or refer to the "changes" file in this directory, which contains a historical record of all changes to Tk. diff --git a/changes b/changes index f8163aac..d25e2a9f 100644 --- a/changes +++ b/changes @@ -7842,3 +7842,64 @@ Tk Cocoa 2.0: More drawing internals refinements (culler,walzer) 2020-12-24 (bug)[6157a8] Aqua: file dialog -filetypes (davis,culler) - Released 8.6.11, Dec 31, 2020 - https://core.tcl-lang.org/tk/ for details + +2021-01-04 (bug)[19fb7a] Mac: [tk_messageBox] use proper icons (ericwb,culler) + +2021-01-11 (bug)[7beaed] ttk::bindMouseWheel syntax error (nemethi) + +2021-01-15 (new) support 4 new keycodes: CodeInput, SingleCandidate, + MultipleCandidate, PreviousCandidate (nijtmans) + +2021-01-18 (new) Portable keycodes: OE, oe, Ydiaeresis (nijtmans) + +2021-01-27 (bug)[bdcab8] Mac crash on non-BMP menu label (nab,culler) + +2021-02-07 (bug)[9e1312] to parent after child destroyed (leunissen) + +2021-02-10 (bug)[d3cd4c] more robust notebook processing (nemethi) + +2021-02-25 (bug)[234ee4] crash in [clipboard get] invalid encoding (nijtmans) + +2021-02-25 (bug)[be9cad] Poor trace housekeeping -> tkwait segfault (michael) + +2021-03-02 (bug)[1626ed] Mac: crash with dead key as menu accelerator (culler) + +2021-03-22 (bug)[9b6065] restore Tcl [update], see window-2.12 (leunissen) + +2021-04-07 (bug)[58222c] Mac: entry and spinbox bg colors (chavez,culler) + +2021-04-18 (bug)[34db75,ea876b] cursor motion in peer text (vogel) + +2021-04-26 (bug)[c97464] memleak in TkpDrawAngledChars (nab,culler) + +2021-04-29 Mac: explicit backing CALayer to fix rendering issues (culler) + +2021-05-02 Mac: respect key repeat system setting (culler) + +2021-05-10 (bug)[171ba7] crash when grab and focus are not coordinated (culler) + +2021-05-24 crash due to failed transient record housekeeping (culler) + +2021-05-25 (bug)[7bda98] Mac: bindings fire twice on app activation + +2021-06-03 (bug)[4401d3] Mac: improved support of pixel formats (chavez,culler) + +2021-06-03 (bug)[8ecc3e] Mac: window exposed by Mission Control (chavez,culler) + +2021-06-04 (bug)[099109] segfault reusing a container toplevel (culler) + +2021-06-22 (bug)[4efbfe] static package init order in wish (werner) + +2021-09-21 (bug)[033886] Win: hang in font loading (e-paine,vogel) + +2021-10-14 (bug)[8ebed3] multi-thread safety in Xft use (werner) + +2021-10-22 (new)[TIP 608] New virtual event <> (griffin) + +2021-10-27 (bug) file dialog compatibility with Mac OS 12 (culler) + +2021-10-29 (bug) Mac: stop crash when non-Tk windows go full screen (werner) + +2021-10-30 (bug)[6ea0b3] Mac: grab from menu makes dead window (culler) + +- Released 8.6.12, Nov 5, 2021 - https://core.tcl-lang.org/tk/ for details diff --git a/doc/3DBorder.3 b/doc/3DBorder.3 index f2f0eb8d..f589e669 100644 --- a/doc/3DBorder.3 +++ b/doc/3DBorder.3 @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH Tk_Alloc3DBorderFromObj 3 8.1 Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/BindTable.3 b/doc/BindTable.3 index 5130bfc4..772f39f4 100644 --- a/doc/BindTable.3 +++ b/doc/BindTable.3 @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH Tk_CreateBindingTable 3 4.0 Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/CanvPsY.3 b/doc/CanvPsY.3 index 5e104cec..f789d3c4 100644 --- a/doc/CanvPsY.3 +++ b/doc/CanvPsY.3 @@ -3,7 +3,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH Tk_CanvasPs 3 4.0 Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/CanvTkwin.3 b/doc/CanvTkwin.3 index 35349898..5cb29faf 100644 --- a/doc/CanvTkwin.3 +++ b/doc/CanvTkwin.3 @@ -3,7 +3,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH Tk_CanvasTkwin 3 4.1 Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/CanvTxtInfo.3 b/doc/CanvTxtInfo.3 index 92a2bc30..1dd23547 100644 --- a/doc/CanvTxtInfo.3 +++ b/doc/CanvTxtInfo.3 @@ -3,7 +3,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH Tk_CanvasTextInfo 3 4.0 Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/Clipboard.3 b/doc/Clipboard.3 index 30877774..cc09018d 100644 --- a/doc/Clipboard.3 +++ b/doc/Clipboard.3 @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH Tk_ClipboardClear 3 4.0 Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/ClrSelect.3 b/doc/ClrSelect.3 index c56f63c7..1b942b51 100644 --- a/doc/ClrSelect.3 +++ b/doc/ClrSelect.3 @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH Tk_ClearSelection 3 4.0 Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/ConfigWind.3 b/doc/ConfigWind.3 index 7c7adab5..3e833879 100644 --- a/doc/ConfigWind.3 +++ b/doc/ConfigWind.3 @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH Tk_ConfigureWindow 3 4.0 Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/CoordToWin.3 b/doc/CoordToWin.3 index 5fe96a6c..1ebd6816 100644 --- a/doc/CoordToWin.3 +++ b/doc/CoordToWin.3 @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH Tk_CoordsToWindow 3 "" Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/CrtCmHdlr.3 b/doc/CrtCmHdlr.3 index bcc94938..1ba6f63e 100644 --- a/doc/CrtCmHdlr.3 +++ b/doc/CrtCmHdlr.3 @@ -3,7 +3,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH Tk_CreateClientMessageHandler 3 "8.4" Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/CrtConsoleChan.3 b/doc/CrtConsoleChan.3 index 7fd8a6a1..d8e0740c 100644 --- a/doc/CrtConsoleChan.3 +++ b/doc/CrtConsoleChan.3 @@ -3,7 +3,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH Tk_InitConsoleChannels 3 8.5 Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/CrtErrHdlr.3 b/doc/CrtErrHdlr.3 index e506220f..e6ebafe9 100644 --- a/doc/CrtErrHdlr.3 +++ b/doc/CrtErrHdlr.3 @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH Tk_CreateErrorHandler 3 "" Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/CrtGenHdlr.3 b/doc/CrtGenHdlr.3 index 671d1055..1d6f3d55 100644 --- a/doc/CrtGenHdlr.3 +++ b/doc/CrtGenHdlr.3 @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH Tk_CreateGenericHandler 3 "" Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/CrtImgType.3 b/doc/CrtImgType.3 index ac8c9bb8..250f537a 100644 --- a/doc/CrtImgType.3 +++ b/doc/CrtImgType.3 @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH Tk_CreateImageType 3 8.5 Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/CrtItemType.3 b/doc/CrtItemType.3 index 005d2e28..f9198f3a 100644 --- a/doc/CrtItemType.3 +++ b/doc/CrtItemType.3 @@ -3,7 +3,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH Tk_CreateItemType 3 4.0 Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/CrtPhImgFmt.3 b/doc/CrtPhImgFmt.3 index c7e792a7..92f24419 100644 --- a/doc/CrtPhImgFmt.3 +++ b/doc/CrtPhImgFmt.3 @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" '\" Author: Paul Mackerras (paulus@cs.anu.edu.au), '\" Department of Computer Science, '\" Australian National University. diff --git a/doc/DeleteImg.3 b/doc/DeleteImg.3 index 507be723..eb6db1e4 100644 --- a/doc/DeleteImg.3 +++ b/doc/DeleteImg.3 @@ -3,7 +3,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH Tk_DeleteImage 3 4.0 Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/DrawFocHlt.3 b/doc/DrawFocHlt.3 index e2d15780..59cd0694 100644 --- a/doc/DrawFocHlt.3 +++ b/doc/DrawFocHlt.3 @@ -3,7 +3,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH Tk_DrawFocusHighlight 3 4.0 Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/EventHndlr.3 b/doc/EventHndlr.3 index d06de868..a2cbf8d1 100644 --- a/doc/EventHndlr.3 +++ b/doc/EventHndlr.3 @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH Tk_CreateEventHandler 3 "" Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/FreeXId.3 b/doc/FreeXId.3 index dd1d141e..56c7804c 100644 --- a/doc/FreeXId.3 +++ b/doc/FreeXId.3 @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH Tk_FreeXId 3 4.0 Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/GeomReq.3 b/doc/GeomReq.3 index 895f6838..76705212 100644 --- a/doc/GeomReq.3 +++ b/doc/GeomReq.3 @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH Tk_GeometryRequest 3 "8.4" Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/GetAnchor.3 b/doc/GetAnchor.3 index 6526772b..5d41ad65 100644 --- a/doc/GetAnchor.3 +++ b/doc/GetAnchor.3 @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH Tk_GetAnchorFromObj 3 8.1 Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/GetBitmap.3 b/doc/GetBitmap.3 index c4ac44ef..88418c7f 100644 --- a/doc/GetBitmap.3 +++ b/doc/GetBitmap.3 @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH Tk_AllocBitmapFromObj 3 8.1 Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/GetCapStyl.3 b/doc/GetCapStyl.3 index 28f1a1ce..4e5d1d57 100644 --- a/doc/GetCapStyl.3 +++ b/doc/GetCapStyl.3 @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH Tk_GetCapStyle 3 "" Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/GetClrmap.3 b/doc/GetClrmap.3 index 9e6da12b..4b72b6cf 100644 --- a/doc/GetClrmap.3 +++ b/doc/GetClrmap.3 @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH Tk_GetColormap 3 4.0 Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/GetDash.3 b/doc/GetDash.3 index d1eeb705..20874241 100644 --- a/doc/GetDash.3 +++ b/doc/GetDash.3 @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH Tk_GetDash 3 8.3 Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/GetGC.3 b/doc/GetGC.3 index 44e06fb0..6ee63a93 100644 --- a/doc/GetGC.3 +++ b/doc/GetGC.3 @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH Tk_GetGC 3 "" Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/GetHINSTANCE.3 b/doc/GetHINSTANCE.3 index de380511..980b374a 100644 --- a/doc/GetHINSTANCE.3 +++ b/doc/GetHINSTANCE.3 @@ -1,7 +1,7 @@ '\" '\" Copyright (c) 1998-2000 by Scriptics Corporation. '\" All rights reserved. -'\" +'\" .TH Tk_GetHISTANCE 3 "" Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/GetHWND.3 b/doc/GetHWND.3 index 1a5ec2d0..15d2ff06 100644 --- a/doc/GetHWND.3 +++ b/doc/GetHWND.3 @@ -1,7 +1,7 @@ '\" '\" Copyright (c) 1998-2000 by Scriptics Corporation. '\" All rights reserved. -'\" +'\" .TH HWND 3 8.0 Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/GetImage.3 b/doc/GetImage.3 index f2407bc1..744f9ac8 100644 --- a/doc/GetImage.3 +++ b/doc/GetImage.3 @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH Tk_GetImage 3 4.0 Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/GetJoinStl.3 b/doc/GetJoinStl.3 index a717b72e..616719c9 100644 --- a/doc/GetJoinStl.3 +++ b/doc/GetJoinStl.3 @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH Tk_GetJoinStyle 3 "" Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/GetJustify.3 b/doc/GetJustify.3 index b51cb8d1..2e871cb9 100644 --- a/doc/GetJustify.3 +++ b/doc/GetJustify.3 @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH Tk_GetJustifyFromObj 3 8.1 Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/GetOption.3 b/doc/GetOption.3 index 81846adf..799786d6 100644 --- a/doc/GetOption.3 +++ b/doc/GetOption.3 @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH Tk_GetOption 3 "" Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/GetPixels.3 b/doc/GetPixels.3 index e7a90437..6c31af90 100644 --- a/doc/GetPixels.3 +++ b/doc/GetPixels.3 @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH Tk_GetPixelsFromObj 3 8.1 Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/GetPixmap.3 b/doc/GetPixmap.3 index 927c75c4..65fae2de 100644 --- a/doc/GetPixmap.3 +++ b/doc/GetPixmap.3 @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH Tk_GetPixmap 3 4.0 Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/GetRelief.3 b/doc/GetRelief.3 index 6e8681a9..59796629 100644 --- a/doc/GetRelief.3 +++ b/doc/GetRelief.3 @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH Tk_GetReliefFromObj 3 8.1 Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/GetRootCrd.3 b/doc/GetRootCrd.3 index a9d2cd93..20520ea9 100644 --- a/doc/GetRootCrd.3 +++ b/doc/GetRootCrd.3 @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH Tk_GetRootCoords 3 "" Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/GetScroll.3 b/doc/GetScroll.3 index 2615301a..43aaa48e 100644 --- a/doc/GetScroll.3 +++ b/doc/GetScroll.3 @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH Tk_GetScrollInfo 3 8.0 Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/GetSelect.3 b/doc/GetSelect.3 index 8c30a2bb..11e837e7 100644 --- a/doc/GetSelect.3 +++ b/doc/GetSelect.3 @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH Tk_GetSelection 3 4.0 Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/GetUid.3 b/doc/GetUid.3 index 06b466ac..2cd95ad0 100644 --- a/doc/GetUid.3 +++ b/doc/GetUid.3 @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH Tk_GetUid 3 "" Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/GetVRoot.3 b/doc/GetVRoot.3 index a65ef787..7e6003a1 100644 --- a/doc/GetVRoot.3 +++ b/doc/GetVRoot.3 @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH Tk_GetVRootGeometry 3 4.0 Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/GetVisual.3 b/doc/GetVisual.3 index fe3d50ce..fc6b6f8a 100644 --- a/doc/GetVisual.3 +++ b/doc/GetVisual.3 @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH Tk_GetVisual 3 4.0 Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/Grab.3 b/doc/Grab.3 index 1dba2df7..27412207 100644 --- a/doc/Grab.3 +++ b/doc/Grab.3 @@ -1,7 +1,7 @@ '\" '\" Copyright (c) 1998-2000 by Scriptics Corporation. '\" All rights reserved. -'\" +'\" .TH Tk_Grab 3 "" Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/HWNDToWindow.3 b/doc/HWNDToWindow.3 index 97950994..a2e5a6c9 100644 --- a/doc/HWNDToWindow.3 +++ b/doc/HWNDToWindow.3 @@ -1,7 +1,7 @@ '\" '\" Copyright (c) 1998-2000 by Scriptics Corporation. '\" All rights reserved. -'\" +'\" .TH Tk_HWNDToWindow 3 "" Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/HandleEvent.3 b/doc/HandleEvent.3 index 38b5660c..af3fde6c 100644 --- a/doc/HandleEvent.3 +++ b/doc/HandleEvent.3 @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH Tk_HandleEvent 3 "" Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/IdToWindow.3 b/doc/IdToWindow.3 index f6e397db..f8ce1f9f 100644 --- a/doc/IdToWindow.3 +++ b/doc/IdToWindow.3 @@ -3,7 +3,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH Tk_IdToWindow 3 4.0 Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/ImgChanged.3 b/doc/ImgChanged.3 index 6d8ae91f..69ba43c8 100644 --- a/doc/ImgChanged.3 +++ b/doc/ImgChanged.3 @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH Tk_ImageChanged 3 4.0 Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/Inactive.3 b/doc/Inactive.3 index 0d2a1b7a..42ae5b80 100644 --- a/doc/Inactive.3 +++ b/doc/Inactive.3 @@ -1,7 +1,7 @@ '\" '\" Copyright (c) 1998-2000 by Scriptics Corporation. '\" All rights reserved. -'\" +'\" .TH Tk_GetUserInactiveTime 3 8.5 Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/InternAtom.3 b/doc/InternAtom.3 index a16eee12..e6756a56 100644 --- a/doc/InternAtom.3 +++ b/doc/InternAtom.3 @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH Tk_InternAtom 3 "" Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/MainLoop.3 b/doc/MainLoop.3 index ed4d0eae..770f254f 100644 --- a/doc/MainLoop.3 +++ b/doc/MainLoop.3 @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH Tk_MainLoop 3 "" Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/MainWin.3 b/doc/MainWin.3 index c3af3e7a..94bd7e28 100644 --- a/doc/MainWin.3 +++ b/doc/MainWin.3 @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH Tk_MainWindow 3 7.0 Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/MaintGeom.3 b/doc/MaintGeom.3 index a509b0b1..d6418b59 100644 --- a/doc/MaintGeom.3 +++ b/doc/MaintGeom.3 @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH Tk_MaintainGeometry 3 4.0 Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/ManageGeom.3 b/doc/ManageGeom.3 index fd2fac9b..4d7ac53e 100644 --- a/doc/ManageGeom.3 +++ b/doc/ManageGeom.3 @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH Tk_ManageGeometry 3 4.0 Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/MoveToplev.3 b/doc/MoveToplev.3 index 00bbaa5f..f67627f8 100644 --- a/doc/MoveToplev.3 +++ b/doc/MoveToplev.3 @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH Tk_MoveToplevelWindow 3 "" Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/Name.3 b/doc/Name.3 index 4b9c5bc4..1653cf50 100644 --- a/doc/Name.3 +++ b/doc/Name.3 @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH Tk_Name 3 "" Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/OwnSelect.3 b/doc/OwnSelect.3 index ed9bcab3..0e16eac3 100644 --- a/doc/OwnSelect.3 +++ b/doc/OwnSelect.3 @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH Tk_OwnSelection 3 4.0 Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/ParseArgv.3 b/doc/ParseArgv.3 index 7749d924..4d85d151 100644 --- a/doc/ParseArgv.3 +++ b/doc/ParseArgv.3 @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH Tk_ParseArgv 3 "" Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/QWinEvent.3 b/doc/QWinEvent.3 index caa5026c..9c43ce55 100644 --- a/doc/QWinEvent.3 +++ b/doc/QWinEvent.3 @@ -3,7 +3,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH Tk_QueueWindowEvent 3 7.5 Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/Restack.3 b/doc/Restack.3 index 2b9097f9..5cd02eb4 100644 --- a/doc/Restack.3 +++ b/doc/Restack.3 @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH Tk_RestackWindow 3 "" Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/RestrictEv.3 b/doc/RestrictEv.3 index 22014a72..8b3af07a 100644 --- a/doc/RestrictEv.3 +++ b/doc/RestrictEv.3 @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH Tk_RestrictEvents 3 "" Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/SetAppName.3 b/doc/SetAppName.3 index 39788506..91516a0a 100644 --- a/doc/SetAppName.3 +++ b/doc/SetAppName.3 @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH Tk_SetAppName 3 4.0 Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/SetCaret.3 b/doc/SetCaret.3 index fd63f182..24cc18c9 100644 --- a/doc/SetCaret.3 +++ b/doc/SetCaret.3 @@ -3,7 +3,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH Tk_SetCaretPos 3 8.4 Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/SetClass.3 b/doc/SetClass.3 index 707975dd..0ea81bb7 100644 --- a/doc/SetClass.3 +++ b/doc/SetClass.3 @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH Tk_SetClass 3 "" Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/SetClassProcs.3 b/doc/SetClassProcs.3 index 99eb81c3..389d21bf 100644 --- a/doc/SetClassProcs.3 +++ b/doc/SetClassProcs.3 @@ -3,7 +3,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH Tk_SetClassProcs 3 8.4 Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/SetGrid.3 b/doc/SetGrid.3 index 28e428b6..ea32afb8 100644 --- a/doc/SetGrid.3 +++ b/doc/SetGrid.3 @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH Tk_SetGrid 3 4.0 Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/SetOptions.3 b/doc/SetOptions.3 index 2a37de71..a35522f2 100644 --- a/doc/SetOptions.3 +++ b/doc/SetOptions.3 @@ -3,7 +3,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH Tk_SetOptions 3 8.1 Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/SetVisual.3 b/doc/SetVisual.3 index 6d3fd83e..a5b9efd2 100644 --- a/doc/SetVisual.3 +++ b/doc/SetVisual.3 @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH Tk_SetWindowVisual 3 4.0 Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/StrictMotif.3 b/doc/StrictMotif.3 index 4319d538..ec9319f2 100644 --- a/doc/StrictMotif.3 +++ b/doc/StrictMotif.3 @@ -3,7 +3,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH Tk_StrictMotif 3 4.0 Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/TkInitStubs.3 b/doc/TkInitStubs.3 index 04f5611e..57ec9e6e 100644 --- a/doc/TkInitStubs.3 +++ b/doc/TkInitStubs.3 @@ -3,7 +3,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH Tk_InitStubs 3 8.4 Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/Tk_Init.3 b/doc/Tk_Init.3 index 7bc46dd2..fc293182 100644 --- a/doc/Tk_Init.3 +++ b/doc/Tk_Init.3 @@ -3,7 +3,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH Tk_Init 3 8.0 Tk "Tk Library Procedures" .so man.macros .BS diff --git a/doc/bell.n b/doc/bell.n index 21c4f1b2..3e8d1121 100644 --- a/doc/bell.n +++ b/doc/bell.n @@ -5,7 +5,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH bell n 8.4 Tk "Tk Built-In Commands" .so man.macros .BS diff --git a/doc/bindtags.n b/doc/bindtags.n index dc3973be..51c2ca9c 100644 --- a/doc/bindtags.n +++ b/doc/bindtags.n @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH bindtags n 4.0 Tk "Tk Built-In Commands" .so man.macros .BS diff --git a/doc/bitmap.n b/doc/bitmap.n index ead33112..17519133 100644 --- a/doc/bitmap.n +++ b/doc/bitmap.n @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH bitmap n 4.0 Tk "Tk Built-In Commands" .so man.macros .BS diff --git a/doc/chooseColor.n b/doc/chooseColor.n index 015b17d3..3fa6de3f 100644 --- a/doc/chooseColor.n +++ b/doc/chooseColor.n @@ -3,7 +3,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH tk_chooseColor n 4.2 Tk "Tk Built-In Commands" .so man.macros .BS diff --git a/doc/console.n b/doc/console.n index 86dbd465..40b74266 100644 --- a/doc/console.n +++ b/doc/console.n @@ -3,7 +3,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH console n 8.4 Tk "Tk Built-In Commands" .so man.macros .BS diff --git a/doc/cursors.n b/doc/cursors.n index 1662de46..a7287552 100644 --- a/doc/cursors.n +++ b/doc/cursors.n @@ -1,9 +1,9 @@ '\" '\" Copyright (c) 1998-2000 by Scriptics Corporation. '\" All rights reserved. -'\" +'\" '\" Copyright (c) 2006-2007 Daniel A. Steffen -'\" +'\" .TH cursors n 8.3 Tk "Tk Built-In Commands" .so man.macros .BS diff --git a/doc/destroy.n b/doc/destroy.n index 3d4743a0..b10c6798 100644 --- a/doc/destroy.n +++ b/doc/destroy.n @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH destroy n "" Tk "Tk Built-In Commands" .so man.macros .BS diff --git a/doc/dialog.n b/doc/dialog.n index d2031d37..e4938d25 100644 --- a/doc/dialog.n +++ b/doc/dialog.n @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH tk_dialog n 4.1 Tk "Tk Built-In Commands" .so man.macros .BS diff --git a/doc/entry.n b/doc/entry.n index dc2f8965..713929b5 100644 --- a/doc/entry.n +++ b/doc/entry.n @@ -5,7 +5,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH entry n 8.3 Tk "Tk Built-In Commands" .so man.macros .BS diff --git a/doc/event.n b/doc/event.n index 9ab48e5b..afb5e4c5 100644 --- a/doc/event.n +++ b/doc/event.n @@ -343,6 +343,15 @@ This is sent to all widgets when the ttk theme changed. The ttk widgets listen to this event and redisplay themselves when it fires. The legacy widgets ignore this event. .TP +\fB<>\fR +. +This event is sent to all widgets when a font is changed, for example, +by the use of [font configure]. The user_data field (%d) will have the +value "FontChanged". For other system wide changes, this event will +be sent to all widgets, and the user_data field will indicate the +cause of the change. NOTE: all tk and ttk widgets already handle this +event internally. +.TP \fB<>\fR This is sent to a widget when the focus enters the widget because of a user-driven diff --git a/doc/focus.n b/doc/focus.n index 4b8bb2a3..e3efcd36 100644 --- a/doc/focus.n +++ b/doc/focus.n @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH focus n 4.0 Tk "Tk Built-In Commands" .so man.macros .BS diff --git a/doc/focusNext.n b/doc/focusNext.n index ffcf971b..3283d4b1 100644 --- a/doc/focusNext.n +++ b/doc/focusNext.n @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH tk_focusNext n 4.0 Tk "Tk Built-In Commands" .so man.macros .BS diff --git a/doc/fontchooser.n b/doc/fontchooser.n index bdd51c7f..65aa8e7e 100644 --- a/doc/fontchooser.n +++ b/doc/fontchooser.n @@ -3,7 +3,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH fontchooser n "" Tk "Tk Built-In Commands" .so man.macros .BS diff --git a/doc/grab.n b/doc/grab.n index c45e26ae..cee3ce7a 100644 --- a/doc/grab.n +++ b/doc/grab.n @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH grab n "" Tk "Tk Built-In Commands" .so man.macros .BS diff --git a/doc/grid.n b/doc/grid.n index 5a175c75..dc69deb3 100644 --- a/doc/grid.n +++ b/doc/grid.n @@ -296,7 +296,7 @@ to be returned. .TP \fBgrid content \fIwindow\fR ?\fI\-option value\fR? . -Synonym for . \fBgrid slaves \fIwindow\fR ?\fI\-option value\fR? +Synonym for \fBgrid slaves \fIwindow\fR ?\fI\-option value\fR?. .VE "TIP 581" .SH "RELATIVE PLACEMENT" .PP diff --git a/doc/image.n b/doc/image.n index fd51cc06..70f5acf6 100644 --- a/doc/image.n +++ b/doc/image.n @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH image n 4.0 Tk "Tk Built-In Commands" .so man.macros .BS diff --git a/doc/keysyms.n b/doc/keysyms.n index d5822a6f..162fa905 100644 --- a/doc/keysyms.n +++ b/doc/keysyms.n @@ -1,5 +1,5 @@ '\" -'\" Copyright (c) 1998-2000 by Scriptics Corporation. +'\" Copyright (c) 1998-2000 Scriptics Corporation. '\" All rights reserved. '\" .TH keysyms n 8.3 Tk "Tk Built-In Commands" @@ -214,6 +214,8 @@ udiaeresis 252 0xFC yacute 253 0xFD thorn 254 0xFE ydiaeresis 255 0xFF +.CE +.CS Aogonek 417 0x1A1 breve 418 0x1A2 Lstroke 419 0x1A3 @@ -223,8 +225,6 @@ Scaron 425 0x1A9 Scedilla 426 0x1AA Tcaron 427 0x1AB Zacute 428 0x1AC -.CE -.CS Zcaron 430 0x1AE Zabovedot 431 0x1AF aogonek 433 0x1B1 @@ -394,6 +394,8 @@ kana_WA 1244 0x4DC kana_N 1245 0x4DD voicedsound 1246 0x4DE semivoicedsound 1247 0x4DF +.CE +.CS Arabic_comma 1452 0x5AC Arabic_semicolon 1467 0x5BB Arabic_question_mark 1471 0x5BF @@ -429,8 +431,6 @@ Arabic_qaf 1506 0x5E2 Arabic_kaf 1507 0x5E3 Arabic_lam 1508 0x5E4 Arabic_meem 1509 0x5E5 -.CE -.CS Arabic_noon 1510 0x5E6 Arabic_ha 1511 0x5E7 Arabic_waw 1512 0x5E8 @@ -456,6 +456,7 @@ Cyrillic_lje 1705 0x6A9 Cyrillic_nje 1706 0x6AA Serbian_tshe 1707 0x6AB Macedonia_kje 1708 0x6AC +Ukrainian_ghe_with_upturn 1709 0x6AD Byelorussian_shortu 1710 0x6AE Cyrillic_dzhe 1711 0x6AF numerosign 1712 0x6B0 @@ -471,6 +472,7 @@ Cyrillic_LJE 1721 0x6B9 Cyrillic_NJE 1722 0x6BA Serbian_TSHE 1723 0x6BB Macedonia_KJE 1724 0x6BC +Ukrainian_GHE_WITH_UPTURN 1725 0x6BD Byelorussian_SHORTU 1726 0x6BE Cyrillic_DZHE 1727 0x6BF Cyrillic_yu 1728 0x6C0 @@ -610,6 +612,8 @@ Greek_phi 2038 0x7F6 Greek_chi 2039 0x7F7 Greek_psi 2040 0x7F8 Greek_omega 2041 0x7F9 +.CE +.CS leftradical 2209 0x8A1 topleftradical 2210 0x8A2 horizconnector 2211 0x8A3 @@ -633,8 +637,6 @@ botvertsummationconnector 2228 0x8B4 toprightsummation 2229 0x8B5 botrightsummation 2230 0x8B6 rightmiddlesummation 2231 0x8B7 -.CE -.CS lessthanequal 2236 0x8BC notequal 2237 0x8BD greaterthanequal 2238 0x8BE @@ -728,6 +730,7 @@ rightsinglequotemark 2769 0xAD1 leftdoublequotemark 2770 0xAD2 rightdoublequotemark 2771 0xAD3 prescription 2772 0xAD4 +permille 2773 0xAD5 minutes 2774 0xAD6 seconds 2775 0xAD7 latincross 2777 0xAD9 @@ -815,6 +818,11 @@ hebrew_qoph 3319 0xCF7 hebrew_resh 3320 0xCF8 hebrew_shin 3321 0xCF9 hebrew_taw 3322 0xCFA +OE 5052 0x13BC +oe 5053 0x13BD +Ydiaeresis 5054 0x13BE +.CE +.CS BackSpace 65288 0xFF08 Tab 65289 0xFF09 Linefeed 65290 0xFF0A @@ -841,6 +849,10 @@ Kana_Lock 65325 0xFF2D Kana_Shift 65326 0xFF2E Eisu_Shift 65327 0xFF2F Eisu_toggle 65328 0xFF30 +Codeinput 65335 0xFF37 +SingleCandidate 65340 0xFF3C +MultipleCandidate 65341 0xFF3D +PreviousCandidate 65342 0xFF3E Home 65360 0xFF50 Left 65361 0xFF51 Up 65362 0xFF52 @@ -852,8 +864,6 @@ End 65367 0xFF57 Begin 65368 0xFF58 Win_L 65371 0xFF5B Win_R 65372 0xFF5C -.CE -.CS App 65373 0xFF5D Select 65376 0xFF60 Print 65377 0xFF61 @@ -953,6 +963,34 @@ Super_R 65516 0xFFEC Hyper_L 65517 0xFFED Hyper_R 65518 0xFFEE Delete 65535 0xFFFF +.CE +.CS +XF86Switch_VT_1 269024769 0x1008FE01 +XF86Switch_VT_2 269024770 0x1008FE02 +XF86Switch_VT_3 269024771 0x1008FE03 +XF86Switch_VT_4 269024772 0x1008FE04 +XF86Switch_VT_5 269024773 0x1008FE05 +XF86Switch_VT_6 269024774 0x1008FE06 +XF86Switch_VT_7 269024775 0x1008FE07 +XF86Switch_VT_8 269024776 0x1008FE08 +XF86Switch_VT_9 269024777 0x1008FE09 +XF86Switch_VT_10 269024778 0x1008FE0A +XF86Switch_VT_11 269024779 0x1008FE0B +XF86Switch_VT_12 269024780 0x1008FE0C +XF86Ungrab 269024800 0x1008FE20 +XF86ClearGrab 269024801 0x1008FE21 +XF86Next_VMode 269024802 0x1008FE22 +XF86Prev_VMode 269024803 0x1008FE23 +XF86LogWindowTree 269024804 0x1008FE24 +XF86LogGrabInfo 269024805 0x1008FE25 +XF86ModeLock 269025025 0x1008FF01 +XF86MonBrightnessUp 269025026 0x1008FF02 +XF86MonBrightnessDown 269025027 0x1008FF03 +XF86KbdLightOnOff 269025028 0x1008FF04 +XF86KbdBrightnessUp 269025029 0x1008FF05 +XF86KbdBrightnessDown 269025030 0x1008FF06 +XF86MonBrightnessCycle 269025031 0x1008FF07 +XF86Standby 269025040 0x1008FF10 XF86AudioLowerVolume 269025041 0x1008FF11 XF86AudioMute 269025042 0x1008FF12 XF86AudioRaiseVolume 269025043 0x1008FF13 @@ -960,6 +998,156 @@ XF86AudioPlay 269025044 0x1008FF14 XF86AudioStop 269025045 0x1008FF15 XF86AudioPrev 269025046 0x1008FF16 XF86AudioNext 269025047 0x1008FF17 +XF86HomePage 269025048 0x1008FF18 +XF86Mail 269025049 0x1008FF19 +XF86Start 269025050 0x1008FF1A +XF86Search 269025051 0x1008FF1B +XF86AudioRecord 269025052 0x1008FF1C +XF86Calculator 269025053 0x1008FF1D +XF86Memo 269025054 0x1008FF1E +XF86ToDoList 269025055 0x1008FF1F +XF86Calendar 269025056 0x1008FF20 +XF86PowerDown 269025057 0x1008FF21 +XF86ContrastAdjust 269025058 0x1008FF22 +XF86RockerUp 269025059 0x1008FF23 +XF86RockerDown 269025060 0x1008FF24 +XF86RockerEnter 269025061 0x1008FF25 +XF86Back 269025062 0x1008FF26 +XF86Forward 269025063 0x1008FF27 +XF86Stop 269025064 0x1008FF28 +XF86Refresh 269025065 0x1008FF29 +XF86PowerOff 269025066 0x1008FF2A +XF86WakeUp 269025067 0x1008FF2B +XF86Eject 269025068 0x1008FF2C +XF86ScreenSaver 269025069 0x1008FF2D +XF86WWW 269025070 0x1008FF2E +XF86Sleep 269025071 0x1008FF2F +XF86Favorites 269025072 0x1008FF30 +XF86AudioPause 269025073 0x1008FF31 +XF86AudioMedia 269025074 0x1008FF32 +XF86MyComputer 269025075 0x1008FF33 +XF86VendorHome 269025076 0x1008FF34 +XF86LightBulb 269025077 0x1008FF35 +XF86Shop 269025078 0x1008FF36 +XF86History 269025079 0x1008FF37 +XF86OpenURL 269025080 0x1008FF38 +XF86AddFavorite 269025081 0x1008FF39 +XF86HotLinks 269025082 0x1008FF3A +XF86BrightnessAdjust 269025083 0x1008FF3B +XF86Finance 269025084 0x1008FF3C +XF86Community 269025085 0x1008FF3D +XF86AudioRewind 269025086 0x1008FF3E +XF86BackForward 269025087 0x1008FF3F +XF86Launch0 269025088 0x1008FF40 +XF86Launch1 269025089 0x1008FF41 +XF86Launch2 269025090 0x1008FF42 +XF86Launch3 269025091 0x1008FF43 +XF86Launch4 269025092 0x1008FF44 +XF86Launch5 269025093 0x1008FF45 +XF86Launch6 269025094 0x1008FF46 +XF86Launch7 269025095 0x1008FF47 +XF86Launch8 269025096 0x1008FF48 +XF86Launch9 269025097 0x1008FF49 +XF86LaunchA 269025098 0x1008FF4A +XF86LaunchB 269025099 0x1008FF4B +XF86LaunchC 269025100 0x1008FF4C +XF86LaunchD 269025101 0x1008FF4D +XF86LaunchE 269025102 0x1008FF4E +XF86LaunchF 269025103 0x1008FF4F +XF86ApplicationLeft 269025104 0x1008FF50 +XF86ApplicationRight 269025105 0x1008FF51 +XF86Book 269025106 0x1008FF52 +XF86CD 269025107 0x1008FF53 +XF86Calculater 269025108 0x1008FF54 +XF86Clear 269025109 0x1008FF55 +XF86Close 269025110 0x1008FF56 +XF86Copy 269025111 0x1008FF57 +XF86Cut 269025112 0x1008FF58 +XF86Display 269025113 0x1008FF59 +XF86DOS 269025114 0x1008FF5A +XF86Documents 269025115 0x1008FF5B +XF86Excel 269025116 0x1008FF5C +XF86Explorer 269025117 0x1008FF5D +XF86Game 269025118 0x1008FF5E +XF86Go 269025119 0x1008FF5F +XF86iTouch 269025120 0x1008FF60 +XF86LogOff 269025121 0x1008FF61 +XF86Market 269025122 0x1008FF62 +XF86Meeting 269025123 0x1008FF63 +XF86MenuKB 269025125 0x1008FF65 +XF86MenuPB 269025126 0x1008FF66 +XF86MySites 269025127 0x1008FF67 +XF86New 269025128 0x1008FF68 +XF86News 269025129 0x1008FF69 +XF86OfficeHome 269025130 0x1008FF6A +XF86Open 269025131 0x1008FF6B +XF86Option 269025132 0x1008FF6C +XF86Paste 269025133 0x1008FF6D +XF86Phone 269025134 0x1008FF6E +XF86Q 269025136 0x1008FF70 +XF86Reply 269025138 0x1008FF72 +XF86Reload 269025139 0x1008FF73 +XF86RotateWindows 269025140 0x1008FF74 +XF86RotationPB 269025141 0x1008FF75 +XF86RotationKB 269025142 0x1008FF76 +XF86Save 269025143 0x1008FF77 +XF86ScrollUp 269025144 0x1008FF78 +XF86ScrollDown 269025145 0x1008FF79 +XF86ScrollClick 269025146 0x1008FF7A +XF86Send 269025147 0x1008FF7B +XF86Spell 269025148 0x1008FF7C +XF86SplitScreen 269025149 0x1008FF7D +XF86Support 269025150 0x1008FF7E +XF86TaskPane 269025151 0x1008FF7F +XF86Terminal 269025152 0x1008FF80 +XF86Tools 269025153 0x1008FF81 +XF86Travel 269025154 0x1008FF82 +XF86UserPB 269025156 0x1008FF84 +XF86User1KB 269025157 0x1008FF85 +XF86User2KB 269025158 0x1008FF86 +XF86Video 269025159 0x1008FF87 +XF86WheelButton 269025160 0x1008FF88 +XF86Word 269025161 0x1008FF89 +XF86Xfer 269025162 0x1008FF8A +XF86ZoomIn 269025163 0x1008FF8B +XF86ZoomOut 269025164 0x1008FF8C +XF86Away 269025165 0x1008FF8D +XF86Messenger 269025166 0x1008FF8E +XF86WebCam 269025167 0x1008FF8F +XF86MailForward 269025168 0x1008FF90 +XF86Pictures 269025169 0x1008FF91 +XF86Music 269025170 0x1008FF92 +XF86Battery 269025171 0x1008FF93 +XF86Bluetooth 269025172 0x1008FF94 +XF86WLAN 269025173 0x1008FF95 +XF86UWB 269025174 0x1008FF96 +XF86AudioForward 269025175 0x1008FF97 +XF86AudioRepeat 269025176 0x1008FF98 +XF86AudioRandomPlay 269025177 0x1008FF99 +XF86Subtitle 269025178 0x1008FF9A +XF86AudioCycleTrack 269025179 0x1008FF9B +XF86CycleAngle 269025180 0x1008FF9C +XF86FrameBack 269025181 0x1008FF9D +XF86FrameForward 269025182 0x1008FF9E +XF86Time 269025183 0x1008FF9F +XF86Select 269025184 0x1008FFA0 +XF86View 269025185 0x1008FFA1 +XF86TopMenu 269025186 0x1008FFA2 +XF86Red 269025187 0x1008FFA3 +XF86Green 269025188 0x1008FFA4 +XF86Yellow 269025189 0x1008FFA5 +XF86Blue 269025190 0x1008FFA6 +XF86Suspend 269025191 0x1008FFA7 +XF86Hibernate 269025192 0x1008FFA8 +XF86TouchpadToggle 269025193 0x1008FFA9 +XF86TouchpadOn 269025200 0x1008FFB0 +XF86TouchpadOff 269025201 0x1008FFB1 +XF86AudioMicMute 269025202 0x1008FFB2 +XF86Keyboard 269025203 0x1008FFB3 +XF86WWAN 269025204 0x1008FFB4 +XF86RFKill 269025205 0x1008FFB5 +XF86AudioPreset 269025206 0x1008FFB6 +XF86RotationLockToggle 269025207 0x1008FFB7 .CE .SH "SEE ALSO" bind(n), event(n) diff --git a/doc/label.n b/doc/label.n index f2ba88c1..107175ec 100644 --- a/doc/label.n +++ b/doc/label.n @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH label n 4.0 Tk "Tk Built-In Commands" .so man.macros .BS diff --git a/doc/lower.n b/doc/lower.n index 8159a8b7..d0b05513 100644 --- a/doc/lower.n +++ b/doc/lower.n @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH lower n 3.3 Tk "Tk Built-In Commands" .so man.macros .BS diff --git a/doc/menu.n b/doc/menu.n index e08448af..ed0d33d5 100644 --- a/doc/menu.n +++ b/doc/menu.n @@ -267,7 +267,7 @@ toplevels are automatically appended after all the Tk-defined items and a separator. The Window menu on the Mac also allows toggling the window into a fullscreen state, and managing a tabbed window interface (multiple windows grouped into a single window) if supported by that -version of the operating system. +version of the operating system. .PP When Tk sees a .menubar.help menu on the Macintosh, the menu's contents are appended to the standard Help menu of the user's menubar whenever diff --git a/doc/menubar.n b/doc/menubar.n index 023bf37d..c3be85de 100644 --- a/doc/menubar.n +++ b/doc/menubar.n @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH tk_menuBar n "" Tk "Tk Built-In Commands" .so man.macros .BS diff --git a/doc/menubutton.n b/doc/menubutton.n index 08b52a06..1f596cee 100644 --- a/doc/menubutton.n +++ b/doc/menubutton.n @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH menubutton n 4.0 Tk "Tk Built-In Commands" .so man.macros .BS diff --git a/doc/message.n b/doc/message.n index bd635ac6..280c0729 100644 --- a/doc/message.n +++ b/doc/message.n @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH message n 4.0 Tk "Tk Built-In Commands" .so man.macros .BS diff --git a/doc/option.n b/doc/option.n index 2763d645..60420101 100644 --- a/doc/option.n +++ b/doc/option.n @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH option n "" Tk "Tk Built-In Commands" .so man.macros .BS diff --git a/doc/optionMenu.n b/doc/optionMenu.n index 42275ce1..eff6e864 100644 --- a/doc/optionMenu.n +++ b/doc/optionMenu.n @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH tk_optionMenu n 4.0 Tk "Tk Built-In Commands" .so man.macros .BS diff --git a/doc/pack-old.n b/doc/pack-old.n index 217dba9e..5ef5da17 100644 --- a/doc/pack-old.n +++ b/doc/pack-old.n @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH pack-old n 4.0 Tk "Tk Built-In Commands" .so man.macros .BS diff --git a/doc/pack.n b/doc/pack.n index 3ee14dd9..a82db6ca 100644 --- a/doc/pack.n +++ b/doc/pack.n @@ -159,7 +159,7 @@ If \fIwindow\fR has no content then an empty string is returned. .TP \fBpack content \fIwindow\fR . -Synonym for . \fBpack slaves \fIwindow\fR +Synonym for \fBpack slaves \fIwindow\fR. .VE "TIP 581" .SH "THE PACKER ALGORITHM" .PP diff --git a/doc/palette.n b/doc/palette.n index 085c4c61..6a04450b 100644 --- a/doc/palette.n +++ b/doc/palette.n @@ -3,7 +3,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH tk_setPalette n 4.0 Tk "Tk Built-In Commands" .so man.macros .BS diff --git a/doc/photo.n b/doc/photo.n index 0fe0c61b..84cf6181 100644 --- a/doc/photo.n +++ b/doc/photo.n @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" '\" Author: Paul Mackerras (paulus@cs.anu.edu.au), '\" Department of Computer Science, '\" Australian National University. diff --git a/doc/place.n b/doc/place.n index 6a30c555..c86579c2 100644 --- a/doc/place.n +++ b/doc/place.n @@ -198,7 +198,7 @@ If there is no content for \fIwindow\fR then an empty string is returned. .TP \fBplace content \fIwindow\fR . -Synonym for . \fBplace slaves \fIwindow\fR +Synonym for \fBplace slaves \fIwindow\fR. .VE "TIP 581" .PP If the configuration of a window has been retrieved with diff --git a/doc/popup.n b/doc/popup.n index 0d32362c..6e6fd95f 100644 --- a/doc/popup.n +++ b/doc/popup.n @@ -3,7 +3,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH tk_popup n 4.0 Tk "Tk Built-In Commands" .so man.macros .BS diff --git a/doc/raise.n b/doc/raise.n index c8feb71d..77410013 100644 --- a/doc/raise.n +++ b/doc/raise.n @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH raise n 3.3 Tk "Tk Built-In Commands" .so man.macros .BS diff --git a/doc/scale.n b/doc/scale.n index b1f19810..d6407a02 100644 --- a/doc/scale.n +++ b/doc/scale.n @@ -78,7 +78,7 @@ specified by the \fB\-activebackground\fR option. .OP \-tickinterval tickInterval TickInterval Must be a real value. Determines the spacing between numerical -tick marks displayed below or to the left of the slider. The values will all be displayed with the same number of decimal places, which will be enough to ensure they are all accurate to within 20% of a tick interval. +tick marks displayed below or to the left of the slider. The values will all be displayed with the same number of decimal places, which will be enough to ensure they are all accurate to within 20% of a tick interval. If 0, no tick marks will be displayed. .OP \-to to To Specifies a real value corresponding diff --git a/doc/scrollbar.n b/doc/scrollbar.n index 4d148afa..4b1d4bae 100644 --- a/doc/scrollbar.n +++ b/doc/scrollbar.n @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH scrollbar n 4.1 Tk "Tk Built-In Commands" .so man.macros .BS diff --git a/doc/send.n b/doc/send.n index 2a683d5f..e33a5046 100644 --- a/doc/send.n +++ b/doc/send.n @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH send n 4.0 Tk "Tk Built-In Commands" .so man.macros .BS diff --git a/doc/spinbox.n b/doc/spinbox.n index ad7123bf..a2e7d05d 100644 --- a/doc/spinbox.n +++ b/doc/spinbox.n @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH spinbox n 8.4 Tk "Tk Built-In Commands" .so man.macros .BS diff --git a/doc/text.n b/doc/text.n index ca46ee2a..73add925 100644 --- a/doc/text.n +++ b/doc/text.n @@ -1350,7 +1350,7 @@ are empty strings. \fIpathName \fBimage \fIoption \fR?\fIarg arg ...\fR? . This command is used to manipulate embedded images. The behavior of the -command depends on the \fIoption\fR argument that follows the \fBtag\fR +command depends on the \fIoption\fR argument that follows the \fBimage\fR argument. The following forms of the command are currently supported: .RS .TP @@ -2031,7 +2031,7 @@ In the descriptions below, is dependent on the value of the \fBtcl_wordchars\fR variable. See \fBtclvars\fR(n). .IP [1] -Clicking mouse button 1 positions the insertion cursor just before the +Clicking mouse button 1 positions the insertion cursor at the closest edge of the character underneath the mouse cursor, sets the input focus to this widget, and clears any selection in the widget. Dragging with mouse button 1 strokes out a selection between the insertion cursor and the character under the diff --git a/doc/tk.n b/doc/tk.n index 1165b67c..43ce64dd 100644 --- a/doc/tk.n +++ b/doc/tk.n @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH tk n 8.4 Tk "Tk Built-In Commands" .so man.macros .BS diff --git a/doc/tk_mac.n b/doc/tk_mac.n index f42fa660..2ce13743 100644 --- a/doc/tk_mac.n +++ b/doc/tk_mac.n @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH tk::mac n 8.6 Tk "Tk Built-In Commands" .so man.macros .BS @@ -48,10 +48,10 @@ the command is absent, no action will be taken. .TP \fB::tk::mac::DoScriptFile\fR . -The default Apple Event handler for AEDoScriptHandler. This command +The default Apple Event handler for AEDoScriptHandler. This command executes a Tcl file when an AppleScript sends a .QW "do script" -command to Wish with a file path as a parameter. +command to Wish with a file path as a parameter. .TP \fB::tk::mac::DoScriptText\fR . @@ -131,7 +131,7 @@ If a proc of this name is defined it is the default Apple Event handler for kAEPrintDocuments, .QW pdoc , the Apple Event sent when your application is asked to print a -document. It takes a single absolute file path as an argument. +document. It takes a single absolute file path as an argument. .TP \fB::tk::mac::Quit\fR . @@ -165,15 +165,15 @@ set). .TP \fB::tk::mac::PerformService\fR . -Executes a Tcl procedure called from the macOS -.QW Services +Executes a Tcl procedure called from the macOS +.QW Services menu in the Application menu item. The .QW Services menu item allows for inter-application communication; data from one application, such as selected text, can be sent to another application for processing, for example to Safari as a search item for Google, or to TextEdit to be appended to a file. An example of the proc is below, -and should be rewritten in an application script for customization: +and should be rewritten in an application script for customization: .RS .PP .CS @@ -184,7 +184,7 @@ proc ::tk::mac::PerformService {} { .CE .RE Note that the mechanism for retrieving the data is from the clipboard; -there is no other supported way to obtain the data. If the Services +there is no other supported way to obtain the data. If the Services process is not desired, the NSServices keys can be deleted from the application's Info.plist file. The underlying code supporting this command also allows the text, entry and ttk::entry widgets to access @@ -203,7 +203,7 @@ URL, although it can defined as such. Wish includes a stub URL scheme of .QW foo:// in the CFBundleURLSchemes key of its Info.plist file; this should be customized for the specific URL -scheme the developer wants to support. +scheme the developer wants to support. .TP \fB::tk::mac::GetAppPath\fR . diff --git a/doc/tkvars.n b/doc/tkvars.n index a80fd54f..5ffa40a2 100644 --- a/doc/tkvars.n +++ b/doc/tkvars.n @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH tkvars n 4.1 Tk "Tk Built-In Commands" .so man.macros .BS @@ -26,7 +26,7 @@ plus other files containing procedures that implement default behaviors for widgets. .RS .PP -The initial value of \fBtcl_library\fR is set when Tk is added to +The initial value of \fBtk_library\fR is set when Tk is added to an interpreter; this is done by searching several different directories until one is found that contains an appropriate Tk startup script. If the \fBTK_LIBRARY\fR environment variable exists, then diff --git a/doc/tkwait.n b/doc/tkwait.n index a31aee7f..82d51ba0 100644 --- a/doc/tkwait.n +++ b/doc/tkwait.n @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH tkwait n "" Tk "Tk Built-In Commands" .so man.macros .BS diff --git a/doc/toplevel.n b/doc/toplevel.n index 84fab14f..95fab5b8 100644 --- a/doc/toplevel.n +++ b/doc/toplevel.n @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH toplevel n 8.4 Tk "Tk Built-In Commands" .so man.macros .BS @@ -29,7 +29,9 @@ and border. Specifies a class for the window. This class will be used when querying the option database for the window's other options, and it will also be used later for -other purposes such as bindings. +other purposes such as bindings. Some window managers display the +class name for windows in their dock while some others display the +window title. The \fB\-class\fR option may not be changed with the \fBconfigure\fR widget command. .OP \-colormap colormap Colormap diff --git a/doc/ttk_Theme.3 b/doc/ttk_Theme.3 index 8031b8a9..a42dd382 100644 --- a/doc/ttk_Theme.3 +++ b/doc/ttk_Theme.3 @@ -3,7 +3,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH Ttk_CreateTheme 3 8.5 Tk "Tk Themed Widget" .so man.macros .BS diff --git a/doc/ttk_scale.n b/doc/ttk_scale.n index aa851b93..32686a6e 100644 --- a/doc/ttk_scale.n +++ b/doc/ttk_scale.n @@ -99,7 +99,7 @@ The class name for a \fBttk::scale\fP is \fBTScale\fP. .PP Dynamic states: \fBactive\fP. .PP -\fBTProgressbar\fP styling options configurable with \fBttk::style\fP +\fBTScale\fP styling options configurable with \fBttk::style\fP are: .PP \fB\-background\fP \fIcolor\fP diff --git a/doc/ttk_style.n b/doc/ttk_style.n index 0de33111..5d7b5d1a 100644 --- a/doc/ttk_style.n +++ b/doc/ttk_style.n @@ -134,7 +134,7 @@ as \fB\-expand\fR 1). \fB\-sticky\fR \fB[\fInswe\fB]\fR Specifies the actual parcel position and size inside the allocated parcel. If specified as an empty string then the actual parcel is centered in -the allocated parcel. Default is \fBnswe\fR. +the allocated parcel. Default is \fBnswe\fR. .\" -unit should remain undocumented for now (dubious usefulness) .\" .TP .\" \fB\-unit\fR \fIboolean\fR diff --git a/doc/winfo.n b/doc/winfo.n index a833e31e..fed5c399 100644 --- a/doc/winfo.n +++ b/doc/winfo.n @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH winfo n 4.3 Tk "Tk Built-In Commands" .so man.macros .BS diff --git a/doc/wish.1 b/doc/wish.1 index 93ade0d3..f7d97d94 100644 --- a/doc/wish.1 +++ b/doc/wish.1 @@ -4,7 +4,7 @@ '\" '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. -'\" +'\" .TH wish 1 8.0 Tk "Tk Applications" .so man.macros .BS @@ -77,7 +77,7 @@ If there exists a file in the home directory of the user, \fBwish\fR evaluates the file as a Tcl script just before reading the first command from standard input. .PP -If arguments to \fBwish\fR do specify a \fIfileName\fR, then +If arguments to \fBwish\fR do specify a \fIfileName\fR, then \fIfileName\fR is treated as the name of a script file. \fBWish\fR will evaluate the script in \fIfileName\fR (which presumably creates a user interface), then it will respond to events diff --git a/doc/wm.n b/doc/wm.n index 9ab90f51..5bb1c610 100644 --- a/doc/wm.n +++ b/doc/wm.n @@ -120,7 +120,7 @@ color with some alpha, e.g. .PP On X11, the following attributes may be set. These are not supported by all window managers, and will have no effect under older WMs. -.\" See http://www.freedesktop.org/Standards/wm-spec +.\" See https://www.freedesktop.org/wiki/Specifications/wm-spec/ .TP \fB\-type\fR .VS 8.6 @@ -494,7 +494,7 @@ other contexts. At the script level the command will accept only the first image passed in the parameters as support for multiple sizes/resolutions on macOS is outside Tk's scope. Developers should use the largest icon they can support -(preferably 512 pixels) to ensure smooth rendering on the Mac. +(preferably 512 pixels) to ensure smooth rendering on the Mac. .RE .TP \fBwm iconposition \fIwindow\fR ?\fIx y\fR? diff --git a/generic/ks_names.h b/generic/ks_names.h index 35773905..8d3702d7 100644 --- a/generic/ks_names.h +++ b/generic/ks_names.h @@ -20,7 +20,6 @@ { "Scroll_Lock", 0xFF14 }, { "Sys_Req", 0xFF15 }, { "Escape", 0xFF1B }, -{ "Delete", 0xFFFF }, { "Multi_key", 0xFF20 }, { "Kanji", 0xFF21 }, { "Muhenkan", 0xFF22 }, @@ -39,6 +38,10 @@ { "Kana_Shift", 0xFF2E }, { "Eisu_Shift", 0xFF2F }, { "Eisu_toggle", 0xFF30 }, +{ "Codeinput", 0xFF37 }, +{ "SingleCandidate", 0xFF3C }, +{ "MultipleCandidate", 0xFF3D }, +{ "PreviousCandidate", 0xFF3E }, { "Home", 0xFF50 }, { "Left", 0xFF51 }, { "Up", 0xFF52 }, @@ -66,6 +69,10 @@ { "Break", 0xFF6B }, { "Mode_switch", 0xFF7E }, { "script_switch", 0xFF7E }, +{ "kana_switch", 0xFF7E }, +{ "Arabic_switch", 0xFF7E }, +{ "Greek_switch", 0xFF7E }, +{ "Hebrew_switch", 0xFF7E }, { "Num_Lock", 0xFF7F }, { "KP_Space", 0xFF80 }, { "KP_Tab", 0xFF89 }, @@ -87,7 +94,6 @@ { "KP_Begin", 0xFF9D }, { "KP_Insert", 0xFF9E }, { "KP_Delete", 0xFF9F }, -{ "KP_Equal", 0xFFBD }, { "KP_Multiply", 0xFFAA }, { "KP_Add", 0xFFAB }, { "KP_Separator", 0xFFAC }, @@ -104,6 +110,7 @@ { "KP_7", 0xFFB7 }, { "KP_8", 0xFFB8 }, { "KP_9", 0xFFB9 }, +{ "KP_Equal", 0xFFBD }, { "F1", 0xFFBE }, { "F2", 0xFFBF }, { "F3", 0xFFC0 }, @@ -178,6 +185,7 @@ { "Super_R", 0xFFEC }, { "Hyper_L", 0xFFED }, { "Hyper_R", 0xFFEE }, +{ "Delete", 0xFFFF }, { "space", 0x20 }, { "exclam", 0x21 }, { "quotedbl", 0x22 }, @@ -490,6 +498,9 @@ { "uogonek", 0x3F9 }, { "utilde", 0x3FD }, { "umacron", 0x3FE }, +{ "OE", 0x13BC }, +{ "oe", 0x13BD }, +{ "Ydiaeresis", 0x13BE }, { "overline", 0x47E }, { "kana_fullstop", 0x4A1 }, { "kana_openingbracket", 0x4A2 }, @@ -559,7 +570,6 @@ { "kana_N", 0x4DD }, { "voicedsound", 0x4DE }, { "semivoicedsound", 0x4DF }, -{ "kana_switch", 0xFF7E }, { "Arabic_comma", 0x5AC }, { "Arabic_semicolon", 0x5BB }, { "Arabic_question_mark", 0x5BF }, @@ -609,7 +619,6 @@ { "Arabic_kasra", 0x5F0 }, { "Arabic_shadda", 0x5F1 }, { "Arabic_sukun", 0x5F2 }, -{ "Arabic_switch", 0xFF7E }, { "Serbian_dje", 0x6A1 }, { "Macedonia_gje", 0x6A2 }, { "Cyrillic_io", 0x6A3 }, @@ -795,7 +804,6 @@ { "Greek_chi", 0x7F7 }, { "Greek_psi", 0x7F8 }, { "Greek_omega", 0x7F9 }, -{ "Greek_switch", 0xFF7E }, { "leftradical", 0x8A1 }, { "topleftradical", 0x8A2 }, { "horizconnector", 0x8A3 }, @@ -1011,7 +1019,6 @@ { "hebrew_shin", 0xCF9 }, { "hebrew_taw", 0xCFA }, { "hebrew_taf", 0xCFA }, -{ "Hebrew_switch", 0xFF7E }, { "XF86ModeLock", 0x1008FF01 }, { "XF86MonBrightnessUp", 0x1008FF02 }, { "XF86MonBrightnessDown", 0x1008FF03 }, diff --git a/generic/tk.h b/generic/tk.h index af8e5ca1..d3c24663 100644 --- a/generic/tk.h +++ b/generic/tk.h @@ -75,10 +75,10 @@ extern "C" { #define TK_MAJOR_VERSION 8 #define TK_MINOR_VERSION 6 #define TK_RELEASE_LEVEL TCL_FINAL_RELEASE -#define TK_RELEASE_SERIAL 11 +#define TK_RELEASE_SERIAL 12 #define TK_VERSION "8.6" -#define TK_PATCH_LEVEL "8.6.11" +#define TK_PATCH_LEVEL "8.6.12" /* * A special definition used to allow this header file to be included from @@ -93,6 +93,9 @@ extern "C" { #ifndef RC_INVOKED #if !defined(_XLIB_H) && !defined(_X11_XLIB_H_) +#if defined(__GNUC__) && !defined(__cplusplus) +# pragma GCC diagnostic ignored "-Wc++-compat" +#endif # include # ifdef MAC_OSX_TK # include diff --git a/generic/tkArgv.c b/generic/tkArgv.c index 6c2c5c58..8fe85146 100644 --- a/generic/tkArgv.c +++ b/generic/tkArgv.c @@ -67,12 +67,12 @@ Tk_ParseArgv( int flags) /* Or'ed combination of various flag bits, * such as TK_ARGV_NO_DEFAULTS. */ { - register const Tk_ArgvInfo *infoPtr; + const Tk_ArgvInfo *infoPtr; /* Pointer to the current entry in the table * of argument descriptions. */ const Tk_ArgvInfo *matchPtr;/* Descriptor that matches current argument. */ const char *curArg; /* Current argument */ - register char c; /* Second character of current arg (used for + char c; /* Second character of current arg (used for * quick check for matching; use 2nd char. * because first char. will almost always be * '-'). */ @@ -338,7 +338,7 @@ PrintUsage( * this word, then don't generate information * for default options. */ { - register const Tk_ArgvInfo *infoPtr; + const Tk_ArgvInfo *infoPtr; size_t width, i, numSpaces; Tcl_Obj *message; diff --git a/generic/tkAtom.c b/generic/tkAtom.c index 2491fb23..475f9d2a 100644 --- a/generic/tkAtom.c +++ b/generic/tkAtom.c @@ -154,11 +154,11 @@ Tk_GetAtomName( if (mustFree) { XFree(mustFree); } - name = Tcl_GetHashKey(&dispPtr->nameTable, hPtr); + name = (const char *)Tcl_GetHashKey(&dispPtr->nameTable, hPtr); hPtr = Tcl_CreateHashEntry(&dispPtr->atomTable, INT2PTR(atom), &isNew); Tcl_SetHashValue(hPtr, name); } - return Tcl_GetHashValue(hPtr); + return (const char *)Tcl_GetHashValue(hPtr); } /* @@ -200,7 +200,7 @@ AtomInit( name = atomNameArray[atom - 1]; hPtr = Tcl_CreateHashEntry(&dispPtr->nameTable, name, &isNew); Tcl_SetHashValue(hPtr, INT2PTR(atom)); - name = Tcl_GetHashKey(&dispPtr->nameTable, hPtr); + name = (const char *)Tcl_GetHashKey(&dispPtr->nameTable, hPtr); hPtr = Tcl_CreateHashEntry(&dispPtr->atomTable, INT2PTR(atom), &isNew); Tcl_SetHashValue(hPtr, name); } diff --git a/generic/tkBind.c b/generic/tkBind.c index ad592992..7873d299 100644 --- a/generic/tkBind.c +++ b/generic/tkBind.c @@ -793,6 +793,7 @@ static Time CurrentTimeInMilliSecs(void) { Tcl_Time now; + Tcl_GetTime(&now); return ((Time) now.sec)*1000 + ((Time) now.usec)/1000; } @@ -946,6 +947,7 @@ FreePatSeqEntry( PSEntry *entry) { PSEntry *next = PSList_Next(entry); + PSModMaskArr_Free(&entry->lastModMaskArr); ckfree(entry); return next; @@ -1621,7 +1623,7 @@ Tk_CreateBinding( ClientData object, /* Token for object with which binding is associated. */ const char *eventString, /* String describing event sequence that triggers binding. */ const char *script, /* Contains Tcl script to execute when binding triggers. */ - int append) /* 0 means replace any existing binding for eventString; + int append) /* 0 means replace any existing binding for eventString; * 1 means append to that binding. If the existing binding is * for a callback function and not a Tcl command string, the * existing binding will always be replaced. */ @@ -4490,13 +4492,13 @@ NameToWindow( * * DoWarp -- * - * Perform Warping of X pointer. Executed as an idle handler only. + * Perform warping of mouse pointer. Executed as an idle handler only. * * Results: * None * * Side effects: - * X Pointer will move to a new location. + * Mouse pointer moves to a new location. * *------------------------------------------------------------------------- */ @@ -4505,7 +4507,7 @@ static void DoWarp( ClientData clientData) { - TkDisplay *dispPtr = clientData; + TkDisplay *dispPtr = (TkDisplay *)clientData; assert(clientData); @@ -4610,7 +4612,7 @@ FindSequence( * associated. For virtual event table, NULL. */ const char *eventString, /* String description of pattern to match on. See user * documentation for details. */ - int create, /* 0 means don't create the entry if it doesn't already exist. + int create, /* 0 means don't create the entry if it doesn't already exist. * 1 means create. */ int allowVirtual, /* 0 means that virtual events are not allowed in the sequence. * 1 otherwise. */ diff --git a/generic/tkBitmap.c b/generic/tkBitmap.c index 54bab696..ccc97a46 100644 --- a/generic/tkBitmap.c +++ b/generic/tkBitmap.c @@ -167,7 +167,7 @@ Tk_AllocBitmapFromObj( if (objPtr->typePtr != &tkBitmapObjType) { InitBitmapObj(objPtr); } - bitmapPtr = objPtr->internalRep.twoPtrValue.ptr1; + bitmapPtr = (TkBitmap *)objPtr->internalRep.twoPtrValue.ptr1; /* * If the object currently points to a TkBitmap, see if it's the one we @@ -197,7 +197,7 @@ Tk_AllocBitmapFromObj( */ if (bitmapPtr != NULL) { - TkBitmap *firstBitmapPtr = Tcl_GetHashValue(bitmapPtr->nameHashPtr); + TkBitmap *firstBitmapPtr = (TkBitmap *)Tcl_GetHashValue(bitmapPtr->nameHashPtr); FreeBitmapObj(objPtr); for (bitmapPtr = firstBitmapPtr; bitmapPtr != NULL; @@ -307,7 +307,7 @@ GetBitmap( Pixmap bitmap; int isNew, width = 0, height = 0, dummy2; TkDisplay *dispPtr = ((TkWindow *) tkwin)->dispPtr; - ThreadSpecificData *tsdPtr = + ThreadSpecificData *tsdPtr = (ThreadSpecificData *) Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); if (!dispPtr->bitmapInit) { @@ -317,7 +317,7 @@ GetBitmap( nameHashPtr = Tcl_CreateHashEntry(&dispPtr->bitmapNameTable, string, &isNew); if (!isNew) { - existingBitmapPtr = Tcl_GetHashValue(nameHashPtr); + existingBitmapPtr = (TkBitmap *)Tcl_GetHashValue(nameHashPtr); for (bitmapPtr = existingBitmapPtr; bitmapPtr != NULL; bitmapPtr = bitmapPtr->nextPtr) { if ((Tk_Display(tkwin) == bitmapPtr->display) && @@ -395,7 +395,7 @@ GetBitmap( goto error; } } else { - predefPtr = Tcl_GetHashValue(predefHashPtr); + predefPtr = (TkPredefBitmap *)Tcl_GetHashValue(predefHashPtr); width = predefPtr->width; height = predefPtr->height; if (predefPtr->native) { @@ -407,7 +407,7 @@ GetBitmap( } else { bitmap = XCreateBitmapFromData(Tk_Display(tkwin), RootWindowOfScreen(Tk_Screen(tkwin)), - predefPtr->source, (unsigned)width, (unsigned)height); + (const char *)predefPtr->source, (unsigned)width, (unsigned)height); } } } @@ -416,7 +416,7 @@ GetBitmap( * Add information about this bitmap to our database. */ - bitmapPtr = ckalloc(sizeof(TkBitmap)); + bitmapPtr = (TkBitmap *)ckalloc(sizeof(TkBitmap)); bitmapPtr->bitmap = bitmap; bitmapPtr->width = width; bitmapPtr->height = height; @@ -474,7 +474,7 @@ Tk_DefineBitmap( int isNew; Tcl_HashEntry *predefHashPtr; TkPredefBitmap *predefPtr; - ThreadSpecificData *tsdPtr = + ThreadSpecificData *tsdPtr = (ThreadSpecificData *) Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); /* @@ -497,7 +497,7 @@ Tk_DefineBitmap( Tcl_SetErrorCode(interp, "TK", "BITMAP", "EXISTS", NULL); return TCL_ERROR; } - predefPtr = ckalloc(sizeof(TkPredefBitmap)); + predefPtr = (TkPredefBitmap *)ckalloc(sizeof(TkPredefBitmap)); predefPtr->source = source; predefPtr->width = width; predefPtr->height = height; @@ -540,7 +540,7 @@ Tk_NameOfBitmap( if (idHashPtr == NULL) { goto unknown; } - bitmapPtr = Tcl_GetHashValue(idHashPtr); + bitmapPtr = (TkBitmap *)Tcl_GetHashValue(idHashPtr); return bitmapPtr->nameHashPtr->key.string; } @@ -582,7 +582,7 @@ Tk_SizeOfBitmap( if (idHashPtr == NULL) { goto unknownBitmap; } - bitmapPtr = Tcl_GetHashValue(idHashPtr); + bitmapPtr = (TkBitmap *)Tcl_GetHashValue(idHashPtr); *widthPtr = bitmapPtr->width; *heightPtr = bitmapPtr->height; } @@ -612,14 +612,13 @@ FreeBitmap( { TkBitmap *prevPtr; - bitmapPtr->resourceRefCount--; - if (bitmapPtr->resourceRefCount > 0) { + if (bitmapPtr->resourceRefCount-- > 1) { return; } Tk_FreePixmap(bitmapPtr->display, bitmapPtr->bitmap); Tcl_DeleteHashEntry(bitmapPtr->idHashPtr); - prevPtr = Tcl_GetHashValue(bitmapPtr->nameHashPtr); + prevPtr = (TkBitmap *)Tcl_GetHashValue(bitmapPtr->nameHashPtr); if (prevPtr == bitmapPtr) { if (bitmapPtr->nextPtr == NULL) { Tcl_DeleteHashEntry(bitmapPtr->nameHashPtr); @@ -671,7 +670,7 @@ Tk_FreeBitmap( if (idHashPtr == NULL) { Tcl_Panic("Tk_FreeBitmap received unknown bitmap argument"); } - FreeBitmap(Tcl_GetHashValue(idHashPtr)); + FreeBitmap((TkBitmap *)Tcl_GetHashValue(idHashPtr)); } /* @@ -735,7 +734,7 @@ static void FreeBitmapObj( Tcl_Obj *objPtr) /* The object we are releasing. */ { - TkBitmap *bitmapPtr = objPtr->internalRep.twoPtrValue.ptr1; + TkBitmap *bitmapPtr = (TkBitmap *)objPtr->internalRep.twoPtrValue.ptr1; if (bitmapPtr != NULL) { bitmapPtr->objRefCount--; @@ -770,7 +769,7 @@ DupBitmapObjProc( Tcl_Obj *srcObjPtr, /* The object we are copying from. */ Tcl_Obj *dupObjPtr) /* The object we are copying to. */ { - TkBitmap *bitmapPtr = srcObjPtr->internalRep.twoPtrValue.ptr1; + TkBitmap *bitmapPtr = (TkBitmap *)srcObjPtr->internalRep.twoPtrValue.ptr1; dupObjPtr->typePtr = srcObjPtr->typePtr; dupObjPtr->internalRep.twoPtrValue.ptr1 = bitmapPtr; @@ -806,7 +805,6 @@ DupBitmapObjProc( *---------------------------------------------------------------------- */ - /* ARGSUSED */ Pixmap Tk_GetBitmapFromData( Tcl_Interp *interp, /* Interpreter to use for error reporting. */ @@ -820,20 +818,20 @@ Tk_GetBitmapFromData( char string[16 + TCL_INTEGER_SPACE]; char *name; TkDisplay *dispPtr = ((TkWindow *) tkwin)->dispPtr; - ThreadSpecificData *tsdPtr = + ThreadSpecificData *tsdPtr = (ThreadSpecificData *) Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); if (!tsdPtr->initialized) { BitmapInit(dispPtr); } - nameKey.source = source; + nameKey.source = (const char *)source; nameKey.width = width; nameKey.height = height; dataHashPtr = Tcl_CreateHashEntry(&dispPtr->bitmapDataTable, (char *) &nameKey, &isNew); if (!isNew) { - name = Tcl_GetHashValue(dataHashPtr); + name = (char *)Tcl_GetHashValue(dataHashPtr); } else { dispPtr->bitmapAutoNumber++; sprintf(string, "_tk%d", dispPtr->bitmapAutoNumber); @@ -911,7 +909,7 @@ GetBitmapFromObj( InitBitmapObj(objPtr); } - bitmapPtr = objPtr->internalRep.twoPtrValue.ptr1; + bitmapPtr = (TkBitmap *)objPtr->internalRep.twoPtrValue.ptr1; if (bitmapPtr != NULL) { if ((bitmapPtr->resourceRefCount > 0) && (Tk_Display(tkwin) == bitmapPtr->display)) { @@ -932,7 +930,7 @@ GetBitmapFromObj( * more TkBitmap structures. See if any of them will work. */ - for (bitmapPtr = Tcl_GetHashValue(hashPtr); bitmapPtr != NULL; + for (bitmapPtr = (TkBitmap *)Tcl_GetHashValue(hashPtr); bitmapPtr != NULL; bitmapPtr = bitmapPtr->nextPtr) { if (Tk_Display(tkwin) == bitmapPtr->display) { objPtr->internalRep.twoPtrValue.ptr1 = bitmapPtr; @@ -1012,7 +1010,7 @@ BitmapInit( * or NULL if unavailable. */ { Tcl_Interp *dummy; - ThreadSpecificData *tsdPtr = + ThreadSpecificData *tsdPtr = (ThreadSpecificData *) Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); /* @@ -1150,7 +1148,7 @@ TkDebugBitmap( resultPtr = Tcl_NewObj(); hashPtr = Tcl_FindHashEntry(&dispPtr->bitmapNameTable, name); if (hashPtr != NULL) { - bitmapPtr = Tcl_GetHashValue(hashPtr); + bitmapPtr = (TkBitmap *)Tcl_GetHashValue(hashPtr); if (bitmapPtr == NULL) { Tcl_Panic("TkDebugBitmap found empty hash table entry"); } @@ -1190,7 +1188,7 @@ TkDebugBitmap( Tcl_HashTable * TkGetBitmapPredefTable(void) { - ThreadSpecificData *tsdPtr = + ThreadSpecificData *tsdPtr = (ThreadSpecificData *) Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); return &tsdPtr->predefBitmapTable; diff --git a/generic/tkBusy.c b/generic/tkBusy.c index 1e4e91f9..6f58c527 100644 --- a/generic/tkBusy.c +++ b/generic/tkBusy.c @@ -340,7 +340,7 @@ DestroyBusy( RefWinEventProc, busyPtr); if (busyPtr->tkBusy != NULL) { - Tk_FreeConfigOptions(data, busyPtr->optionTable, busyPtr->tkBusy); + Tk_FreeConfigOptions((char *)data, busyPtr->optionTable, busyPtr->tkBusy); Tk_DeleteEventHandler(busyPtr->tkBusy, StructureNotifyMask, BusyEventProc, busyPtr); Tk_ManageGeometry(busyPtr->tkBusy, NULL, busyPtr); diff --git a/generic/tkButton.c b/generic/tkButton.c index 3c15bf64..2c7d7d27 100644 --- a/generic/tkButton.c +++ b/generic/tkButton.c @@ -104,8 +104,13 @@ static const Tk_OptionSpec labelOptionSpecs[] = { NULL, 0, -1, 0, "-foreground", 0}, {TK_OPTION_FONT, "-font", "font", "Font", DEF_BUTTON_FONT, -1, Tk_Offset(TkButton, tkfont), 0, 0, 0}, +#ifdef DEF_LABEL_FG + {TK_OPTION_COLOR, "-foreground", "foreground", "Foreground", + DEF_LABEL_FG, -1, Tk_Offset(TkButton, normalFg), 0, 0, 0}, +#else {TK_OPTION_COLOR, "-foreground", "foreground", "Foreground", DEF_BUTTON_FG, -1, Tk_Offset(TkButton, normalFg), 0, 0, 0}, +#endif {TK_OPTION_STRING, "-height", "height", "Height", DEF_BUTTON_HEIGHT, Tk_Offset(TkButton, heightPtr), -1, 0, 0, 0}, {TK_OPTION_BORDER, "-highlightbackground", "highlightBackground", @@ -1036,7 +1041,7 @@ DestroyButton( static int ConfigureButton( Tcl_Interp *interp, /* Used for error reporting. */ - register TkButton *butPtr, /* Information about widget; may or may + TkButton *butPtr, /* Information about widget; may or may * not already have values for some fields. */ int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument values. */ @@ -1612,7 +1617,7 @@ ButtonVarProc( const char *name2, /* Second part of variable name. */ int flags) /* Information about what happened. */ { - register TkButton *butPtr = clientData; + TkButton *butPtr = clientData; const char *value; Tcl_Obj *valuePtr; @@ -1817,7 +1822,7 @@ ButtonImageProc( * <= 0). */ int imgWidth, int imgHeight)/* New dimensions of image. */ { - register TkButton *butPtr = clientData; + TkButton *butPtr = clientData; if (butPtr->tkwin != NULL) { TkpComputeButtonGeometry(butPtr); @@ -1855,7 +1860,7 @@ ButtonSelectImageProc( * <= 0). */ int imgWidth, int imgHeight)/* New dimensions of image. */ { - register TkButton *butPtr = clientData; + TkButton *butPtr = clientData; #ifdef MAC_OSX_TK if (butPtr->tkwin != NULL) { @@ -1902,7 +1907,7 @@ ButtonTristateImageProc( * <= 0). */ int imgWidth, int imgHeight)/* New dimensions of image. */ { - register TkButton *butPtr = clientData; + TkButton *butPtr = clientData; #ifdef MAC_OSX_TK if (butPtr->tkwin != NULL) { diff --git a/generic/tkCanvUtil.c b/generic/tkCanvUtil.c index 1feef73e..65af3da0 100644 --- a/generic/tkCanvUtil.c +++ b/generic/tkCanvUtil.c @@ -332,7 +332,7 @@ Tk_CanvasSetOffset( * redisplaying the canvas. */ Tk_TSOffset *offset) /* Offset (may be NULL pointer)*/ { - register TkCanvas *canvasPtr = Canvas(canvas); + TkCanvas *canvasPtr = Canvas(canvas); int flags = 0; int x = - canvasPtr->drawableXOrigin; int y = - canvasPtr->drawableYOrigin; @@ -406,7 +406,7 @@ Tk_CanvasTagsParseProc( char *widgRec, /* Pointer to record for item. */ int offset) /* Offset into item (ignored). */ { - register Tk_Item *itemPtr = (Tk_Item *) widgRec; + Tk_Item *itemPtr = (Tk_Item *) widgRec; int argc, i; const char **argv; Tk_Uid *newPtr; @@ -474,7 +474,7 @@ Tk_CanvasTagsPrintProc( * information about how to reclaim storage * for return string. */ { - register Tk_Item *itemPtr = (Tk_Item *) widgRec; + Tk_Item *itemPtr = (Tk_Item *) widgRec; if (itemPtr->numTags == 0) { *freeProcPtr = NULL; @@ -733,7 +733,7 @@ TkSmoothParseProc( char *widgRec, /* Pointer to record for item. */ int offset) /* Offset into item. */ { - register const Tk_SmoothMethod **smoothPtr = + const Tk_SmoothMethod **smoothPtr = (const Tk_SmoothMethod **) (widgRec + offset); const Tk_SmoothMethod *smooth = NULL; int b; @@ -826,7 +826,7 @@ TkSmoothPrintProc( * information about how to reclaim storage * for return string. */ { - register const Tk_SmoothMethod *smoothPtr = + const Tk_SmoothMethod *smoothPtr = * (Tk_SmoothMethod **) (widgRec + offset); return smoothPtr ? smoothPtr->name : "0"; diff --git a/generic/tkCanvas.c b/generic/tkCanvas.c index 2ce5e50c..0e4e8721 100644 --- a/generic/tkCanvas.c +++ b/generic/tkCanvas.c @@ -2450,6 +2450,10 @@ DisplayCanvas( Tk_Item *itemPtr; Pixmap pixmap; int screenX1, screenX2, screenY1, screenY2, width, height; +#ifdef MAC_OSX_TK + TkWindow *winPtr; + MacDrawable *macWin; +#endif if (canvasPtr->tkwin == NULL) { return; @@ -2464,8 +2468,8 @@ DisplayCanvas( * If drawing is disabled, all we need to do is * clear the REDRAW_PENDING flag. */ - TkWindow *winPtr = (TkWindow *)(canvasPtr->tkwin); - MacDrawable *macWin = winPtr->privatePtr; + winPtr = (TkWindow *)(canvasPtr->tkwin); + macWin = winPtr->privatePtr; if (macWin && (macWin->flags & TK_DO_NOT_DRAW)){ canvasPtr->flags &= ~REDRAW_PENDING; return; diff --git a/generic/tkClipboard.c b/generic/tkClipboard.c index 703ef416..e800da98 100644 --- a/generic/tkClipboard.c +++ b/generic/tkClipboard.c @@ -134,22 +134,22 @@ ClipboardAppHandler( char *buffer, /* Place to store converted selection. */ int maxBytes) /* Maximum # of bytes to store at buffer. */ { - TkDisplay *dispPtr = clientData; - size_t length; + TkDisplay *dispPtr = (TkDisplay *)clientData; + int length; const char *p; p = dispPtr->clipboardAppPtr->winPtr->nameUid; length = strlen(p); - length -= offset; - if (length <= 0) { + if (length <= offset) { return 0; } - if (length > (size_t) maxBytes) { + length -= offset; + if (length > maxBytes) { length = maxBytes; } memcpy(buffer, p, length); buffer[length] = 0; - return (int)length; + return length; } /* @@ -708,7 +708,13 @@ ClipboardGetProc( * used). */ const char *portion) /* New information to be appended. */ { - Tcl_DStringAppend((Tcl_DString *) clientData, portion, -1); + Tcl_Encoding utf8 = Tcl_GetEncoding(NULL, "utf-8"); + Tcl_DString ds; + + Tcl_ExternalToUtfDString(utf8, portion, -1, &ds); + Tcl_DStringAppend((Tcl_DString *) clientData, Tcl_DStringValue(&ds), Tcl_DStringLength(&ds)); + Tcl_DStringFree(&ds); + Tcl_FreeEncoding(utf8); return TCL_OK; } diff --git a/generic/tkCmds.c b/generic/tkCmds.c index 193c3d6f..c5f0a506 100644 --- a/generic/tkCmds.c +++ b/generic/tkCmds.c @@ -1120,14 +1120,16 @@ Tk_TkwaitObjCmd( static char * WaitVariableProc( ClientData clientData, /* Pointer to integer to set to 1. */ - TCL_UNUSED(Tcl_Interp *), /* Interpreter containing variable. */ - TCL_UNUSED(const char *), /* Name of variable. */ + Tcl_Interp *interp, /* Interpreter containing variable. */ + const char *name1, /* Name of variable. */ TCL_UNUSED(const char *), /* Second part of variable name. */ TCL_UNUSED(int)) /* Information about what happened. */ { int *donePtr = (int *)clientData; *donePtr = 1; + Tcl_UntraceVar(interp, name1, TCL_TRACE_WRITES|TCL_TRACE_UNSETS, + WaitVariableProc, clientData); return NULL; } diff --git a/generic/tkColor.c b/generic/tkColor.c index f6650f94..6b6405ad 100644 --- a/generic/tkColor.c +++ b/generic/tkColor.c @@ -128,7 +128,7 @@ Tk_AllocColorFromObj( */ if (tkColPtr != NULL) { - TkColor *firstColorPtr = Tcl_GetHashValue(tkColPtr->hashPtr); + TkColor *firstColorPtr = (TkColor *)Tcl_GetHashValue(tkColPtr->hashPtr); FreeColorObj(objPtr); for (tkColPtr = firstColorPtr; tkColPtr != NULL; @@ -203,7 +203,7 @@ Tk_GetColor( nameHashPtr = Tcl_CreateHashEntry(&dispPtr->colorNameTable, name, &isNew); if (!isNew) { - existingColPtr = Tcl_GetHashValue(nameHashPtr); + existingColPtr = (TkColor *)Tcl_GetHashValue(nameHashPtr); for (tkColPtr = existingColPtr; tkColPtr != NULL; tkColPtr = tkColPtr->nextPtr) { if ((tkColPtr->screen == Tk_Screen(tkwin)) @@ -314,7 +314,7 @@ Tk_GetColorByValue( valueHashPtr = Tcl_CreateHashEntry(&dispPtr->colorValueTable, (char *) &valueKey, &isNew); if (!isNew) { - tkColPtr = Tcl_GetHashValue(valueHashPtr); + tkColPtr = (TkColor *)Tcl_GetHashValue(valueHashPtr); tkColPtr->resourceRefCount++; return &tkColPtr->color; } @@ -363,12 +363,12 @@ const char * Tk_NameOfColor( XColor *colorPtr) /* Color whose name is desired. */ { - register TkColor *tkColPtr = (TkColor *) colorPtr; + TkColor *tkColPtr = (TkColor *) colorPtr; if (tkColPtr->magic==COLOR_MAGIC && tkColPtr->type==TK_COLOR_BY_NAME) { return tkColPtr->hashPtr->key.string; } else { - ThreadSpecificData *tsdPtr = + ThreadSpecificData *tsdPtr = (ThreadSpecificData *) Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); sprintf(tsdPtr->rgbString, "#%04x%04x%04x", colorPtr->red, @@ -480,8 +480,7 @@ Tk_FreeColor( Tcl_Panic("Tk_FreeColor called with bogus color"); } - tkColPtr->resourceRefCount--; - if (tkColPtr->resourceRefCount > 0) { + if (tkColPtr->resourceRefCount-- > 1) { return; } @@ -497,7 +496,7 @@ Tk_FreeColor( } TkpFreeColor(tkColPtr); - prevPtr = Tcl_GetHashValue(tkColPtr->hashPtr); + prevPtr = (TkColor *)Tcl_GetHashValue(tkColPtr->hashPtr); if (prevPtr == tkColPtr) { if (tkColPtr->nextPtr == NULL) { Tcl_DeleteHashEntry(tkColPtr->hashPtr); @@ -584,11 +583,10 @@ static void FreeColorObj( Tcl_Obj *objPtr) /* The object we are releasing. */ { - TkColor *tkColPtr = objPtr->internalRep.twoPtrValue.ptr1; + TkColor *tkColPtr = (TkColor *)objPtr->internalRep.twoPtrValue.ptr1; if (tkColPtr != NULL) { - tkColPtr->objRefCount--; - if ((tkColPtr->objRefCount == 0) + if ((tkColPtr->objRefCount-- <= 1) && (tkColPtr->resourceRefCount == 0)) { ckfree(tkColPtr); } @@ -619,7 +617,7 @@ DupColorObjProc( Tcl_Obj *srcObjPtr, /* The object we are copying from. */ Tcl_Obj *dupObjPtr) /* The object we are copying to. */ { - TkColor *tkColPtr = srcObjPtr->internalRep.twoPtrValue.ptr1; + TkColor *tkColPtr = (TkColor *)srcObjPtr->internalRep.twoPtrValue.ptr1; dupObjPtr->typePtr = srcObjPtr->typePtr; dupObjPtr->internalRep.twoPtrValue.ptr1 = tkColPtr; @@ -669,7 +667,7 @@ Tk_GetColorFromObj( * map. If it is, we are done. */ - tkColPtr = objPtr->internalRep.twoPtrValue.ptr1; + tkColPtr = (TkColor *)objPtr->internalRep.twoPtrValue.ptr1; if ((tkColPtr != NULL) && (tkColPtr->resourceRefCount > 0) && (Tk_Screen(tkwin) == tkColPtr->screen) @@ -695,7 +693,7 @@ Tk_GetColorFromObj( if (hashPtr == NULL) { goto error; } - for (tkColPtr = Tcl_GetHashValue(hashPtr); + for (tkColPtr = (TkColor *)Tcl_GetHashValue(hashPtr); (tkColPtr != NULL); tkColPtr = tkColPtr->nextPtr) { if ((Tk_Screen(tkwin) == tkColPtr->screen) && (Tk_Colormap(tkwin) == tkColPtr->colormap)) { @@ -811,7 +809,7 @@ TkDebugColor( resultPtr = Tcl_NewObj(); hashPtr = Tcl_FindHashEntry(&dispPtr->colorNameTable, name); if (hashPtr != NULL) { - TkColor *tkColPtr = Tcl_GetHashValue(hashPtr); + TkColor *tkColPtr = (TkColor *)Tcl_GetHashValue(hashPtr); if (tkColPtr == NULL) { Tcl_Panic("TkDebugColor found empty hash table entry"); diff --git a/generic/tkConfig.c b/generic/tkConfig.c index 65e28a6b..6a0ffd82 100644 --- a/generic/tkConfig.c +++ b/generic/tkConfig.c @@ -664,7 +664,7 @@ DoObjConfig( if (internalPtr != NULL) { if (valuePtr != NULL) { value = Tcl_GetStringFromObj(valuePtr, &length); - newStr = ckalloc(length + 1); + newStr = (char *)ckalloc(length + 1); strcpy(newStr, value); } else { newStr = NULL; @@ -1400,7 +1400,7 @@ Tk_RestoreSavedOptions( = savePtr->items[i].valuePtr; } if (specPtr->internalOffset >= 0) { - register char *ptr = (char *) &savePtr->items[i].internalForm; + char *ptr = (char *) &savePtr->items[i].internalForm; CLANG_ASSERT(internalPtr); switch (specPtr->type) { diff --git a/generic/tkCursor.c b/generic/tkCursor.c index 21c713a3..902472b3 100644 --- a/generic/tkCursor.c +++ b/generic/tkCursor.c @@ -100,7 +100,7 @@ Tk_AllocCursorFromObj( if (objPtr->typePtr != &tkCursorObjType) { InitCursorObj(objPtr); } - cursorPtr = objPtr->internalRep.twoPtrValue.ptr1; + cursorPtr = (TkCursor *)objPtr->internalRep.twoPtrValue.ptr1; /* * If the object currently points to a TkCursor, see if it's the one we @@ -129,7 +129,7 @@ Tk_AllocCursorFromObj( */ if (cursorPtr != NULL) { - TkCursor *firstCursorPtr = Tcl_GetHashValue(cursorPtr->hashPtr); + TkCursor *firstCursorPtr = (TkCursor *)Tcl_GetHashValue(cursorPtr->hashPtr); FreeCursorObj(objPtr); for (cursorPtr = firstCursorPtr; cursorPtr != NULL; @@ -229,7 +229,7 @@ TkcGetCursor( * details on legal syntax. */ { Tcl_HashEntry *nameHashPtr; - register TkCursor *cursorPtr; + TkCursor *cursorPtr; TkCursor *existingCursorPtr = NULL; int isNew; TkDisplay *dispPtr = ((TkWindow *) tkwin)->dispPtr; @@ -241,7 +241,7 @@ TkcGetCursor( nameHashPtr = Tcl_CreateHashEntry(&dispPtr->cursorNameTable, string, &isNew); if (!isNew) { - existingCursorPtr = Tcl_GetHashValue(nameHashPtr); + existingCursorPtr = (TkCursor *)Tcl_GetHashValue(nameHashPtr); for (cursorPtr = existingCursorPtr; cursorPtr != NULL; cursorPtr = cursorPtr->nextPtr) { if (Tk_Display(tkwin) == cursorPtr->display) { @@ -320,7 +320,7 @@ Tk_GetCursorFromData( { DataKey dataKey; Tcl_HashEntry *dataHashPtr; - register TkCursor *cursorPtr; + TkCursor *cursorPtr; int isNew; XColor fgColor, bgColor; TkDisplay *dispPtr = ((TkWindow *) tkwin)->dispPtr; @@ -341,7 +341,7 @@ Tk_GetCursorFromData( dataHashPtr = Tcl_CreateHashEntry(&dispPtr->cursorDataTable, (char *) &dataKey, &isNew); if (!isNew) { - cursorPtr = Tcl_GetHashValue(dataHashPtr); + cursorPtr = (TkCursor *)Tcl_GetHashValue(dataHashPtr); cursorPtr->resourceRefCount++; return cursorPtr->cursor; } @@ -432,7 +432,7 @@ Tk_NameOfCursor( if (idHashPtr == NULL) { goto printid; } - cursorPtr = Tcl_GetHashValue(idHashPtr); + cursorPtr = (TkCursor *)Tcl_GetHashValue(idHashPtr); if (cursorPtr->otherTable != &dispPtr->cursorNameTable) { goto printid; } @@ -463,13 +463,12 @@ FreeCursor( { TkCursor *prevPtr; - cursorPtr->resourceRefCount--; - if (cursorPtr->resourceRefCount > 0) { + if (cursorPtr->resourceRefCount-- > 1) { return; } Tcl_DeleteHashEntry(cursorPtr->idHashPtr); - prevPtr = Tcl_GetHashValue(cursorPtr->hashPtr); + prevPtr = (TkCursor *)Tcl_GetHashValue(cursorPtr->hashPtr); if (prevPtr == cursorPtr) { if (cursorPtr->nextPtr == NULL) { Tcl_DeleteHashEntry(cursorPtr->hashPtr); @@ -522,7 +521,7 @@ Tk_FreeCursor( if (idHashPtr == NULL) { Tcl_Panic("Tk_FreeCursor received unknown cursor argument"); } - FreeCursor(Tcl_GetHashValue(idHashPtr)); + FreeCursor((TkCursor *)Tcl_GetHashValue(idHashPtr)); } /* @@ -587,11 +586,10 @@ static void FreeCursorObj( Tcl_Obj *objPtr) /* The object we are releasing. */ { - TkCursor *cursorPtr = objPtr->internalRep.twoPtrValue.ptr1; + TkCursor *cursorPtr = (TkCursor *)objPtr->internalRep.twoPtrValue.ptr1; if (cursorPtr != NULL) { - cursorPtr->objRefCount--; - if ((cursorPtr->objRefCount == 0) + if ((cursorPtr->objRefCount-- <= 1) && (cursorPtr->resourceRefCount == 0)) { ckfree(cursorPtr); } @@ -622,7 +620,7 @@ DupCursorObjProc( Tcl_Obj *srcObjPtr, /* The object we are copying from. */ Tcl_Obj *dupObjPtr) /* The object we are copying to. */ { - TkCursor *cursorPtr = srcObjPtr->internalRep.twoPtrValue.ptr1; + TkCursor *cursorPtr = (TkCursor *)srcObjPtr->internalRep.twoPtrValue.ptr1; dupObjPtr->typePtr = srcObjPtr->typePtr; dupObjPtr->internalRep.twoPtrValue.ptr1 = cursorPtr; @@ -707,7 +705,7 @@ GetCursorFromObj( * cached is the one that is needed. */ - cursorPtr = objPtr->internalRep.twoPtrValue.ptr1; + cursorPtr = (TkCursor *)objPtr->internalRep.twoPtrValue.ptr1; if ((cursorPtr != NULL) && (Tk_Display(tkwin) == cursorPtr->display)) { return cursorPtr; } @@ -722,7 +720,7 @@ GetCursorFromObj( if (hashPtr == NULL) { goto error; } - for (cursorPtr = Tcl_GetHashValue(hashPtr); + for (cursorPtr = (TkCursor *)Tcl_GetHashValue(hashPtr); cursorPtr != NULL; cursorPtr = cursorPtr->nextPtr) { if (Tk_Display(tkwin) == cursorPtr->display) { FreeCursorObj(objPtr); @@ -857,7 +855,7 @@ TkDebugCursor( resultPtr = Tcl_NewObj(); hashPtr = Tcl_FindHashEntry(&dispPtr->cursorNameTable, name); if (hashPtr != NULL) { - cursorPtr = Tcl_GetHashValue(hashPtr); + cursorPtr = (TkCursor *)Tcl_GetHashValue(hashPtr); if (cursorPtr == NULL) { Tcl_Panic("TkDebugCursor found empty hash table entry"); } diff --git a/generic/tkEntry.c b/generic/tkEntry.c index 4ffb48b3..a6684c79 100644 --- a/generic/tkEntry.c +++ b/generic/tkEntry.c @@ -477,7 +477,7 @@ Tk_EntryObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - register Entry *entryPtr; + Entry *entryPtr; Tk_OptionTable optionTable; Tk_Window tkwin; char *tmp; @@ -3234,11 +3234,11 @@ EntryTextVarProc( static int EntryValidate( - register Entry *entryPtr, /* Entry that needs validation. */ - register char *cmd) /* Validation command (NULL-terminated + Entry *entryPtr, /* Entry that needs validation. */ + char *cmd) /* Validation command (NULL-terminated * string). */ { - register Tcl_Interp *interp = entryPtr->interp; + Tcl_Interp *interp = entryPtr->interp; int code, isOK; code = Tcl_EvalEx(interp, cmd, -1, TCL_EVAL_GLOBAL | TCL_EVAL_DIRECT); @@ -3294,7 +3294,7 @@ EntryValidate( static int EntryValidateChange( - register Entry *entryPtr, /* Entry that needs validation. */ + Entry *entryPtr, /* Entry that needs validation. */ const char *change, /* Characters to be added/deleted * (NUL-terminated string). */ const char *newValue, /* Potential new value of entry string */ @@ -3437,8 +3437,8 @@ EntryValidateChange( static void ExpandPercents( - register Entry *entryPtr, /* Entry that needs validation. */ - register const char *before, + Entry *entryPtr, /* Entry that needs validation. */ + const char *before, /* Command containing percent expressions to * be replaced. */ const char *change, /* Characters to added/deleted (NUL-terminated @@ -3452,7 +3452,7 @@ ExpandPercents( int spaceNeeded, cvtFlags; /* Used to substitute string as proper Tcl * list element. */ int number, length; - register const char *string; + const char *string; int ch; char numStorage[2*TCL_INTEGER_SPACE]; @@ -3607,8 +3607,8 @@ Tk_SpinboxObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - register Entry *entryPtr; - register Spinbox *sbPtr; + Entry *entryPtr; + Spinbox *sbPtr; Tk_OptionTable optionTable; Tk_Window tkwin; char *tmp; @@ -4285,8 +4285,8 @@ GetSpinboxElement( static int SpinboxInvoke( - register Tcl_Interp *interp,/* Current interpreter. */ - register Spinbox *sbPtr, /* Spinbox to invoke. */ + Tcl_Interp *interp,/* Current interpreter. */ + Spinbox *sbPtr, /* Spinbox to invoke. */ int element) /* Element to invoke, either the "up" or * "down" button. */ { diff --git a/generic/tkError.c b/generic/tkError.c index 277d7f0e..6ff54759 100644 --- a/generic/tkError.c +++ b/generic/tkError.c @@ -107,7 +107,7 @@ Tk_CreateErrorHandler( * Create the handler record. */ - errorPtr = ckalloc(sizeof(TkErrorHandler)); + errorPtr = (TkErrorHandler *)ckalloc(sizeof(TkErrorHandler)); errorPtr->dispPtr = dispPtr; errorPtr->firstRequest = NextRequest(display); errorPtr->lastRequest = (unsigned) -1; diff --git a/generic/tkFileFilter.c b/generic/tkFileFilter.c index 8588d70c..c8dbc52f 100644 --- a/generic/tkFileFilter.c +++ b/generic/tkFileFilter.c @@ -164,7 +164,7 @@ TkFreeFileFilters( FileFilterClause *clausePtr; GlobPattern *globPtr; MacFileType *mfPtr; - register void *toFree; /* A pointer that we are about to free. */ + void *toFree; /* A pointer that we are about to free. */ for (filterPtr = flistPtr->filters; filterPtr != NULL; ) { for (clausePtr = filterPtr->clauses; clausePtr != NULL; ) { diff --git a/generic/tkFocus.c b/generic/tkFocus.c index 4d46e4b1..8066afd2 100644 --- a/generic/tkFocus.c +++ b/generic/tkFocus.c @@ -113,8 +113,8 @@ Tk_FocusObjCmd( static const char *const focusOptions[] = { "-displayof", "-force", "-lastfor", NULL }; - Tk_Window tkwin = clientData; - TkWindow *winPtr = clientData; + Tk_Window tkwin = (Tk_Window)clientData; + TkWindow *winPtr = (TkWindow *)clientData; TkWindow *newPtr, *topLevelPtr; ToplevelFocusInfo *tlFocusPtr; const char *windowName; @@ -415,7 +415,7 @@ TkFocusFilterEvent( } } if (tlFocusPtr == NULL) { - tlFocusPtr = ckalloc(sizeof(ToplevelFocusInfo)); + tlFocusPtr = (ToplevelFocusInfo *)ckalloc(sizeof(ToplevelFocusInfo)); tlFocusPtr->topLevelPtr = tlFocusPtr->focusWinPtr = winPtr; tlFocusPtr->nextPtr = winPtr->mainPtr->tlFocusPtr; winPtr->mainPtr->tlFocusPtr = tlFocusPtr; @@ -622,7 +622,7 @@ TkSetFocusWin( } } if (tlFocusPtr == NULL) { - tlFocusPtr = ckalloc(sizeof(ToplevelFocusInfo)); + tlFocusPtr = (ToplevelFocusInfo *)ckalloc(sizeof(ToplevelFocusInfo)); tlFocusPtr->topLevelPtr = topLevelPtr; tlFocusPtr->nextPtr = winPtr->mainPtr->tlFocusPtr; winPtr->mainPtr->tlFocusPtr = tlFocusPtr; @@ -807,7 +807,7 @@ TkFocusKeyEvent( void TkFocusDeadWindow( - register TkWindow *winPtr) /* Information about the window that is being + TkWindow *winPtr) /* Information about the window that is being * deleted. */ { ToplevelFocusInfo *tlFocusPtr, *prevPtr; @@ -961,7 +961,7 @@ FocusMapProc( ClientData clientData, /* Toplevel window. */ XEvent *eventPtr) /* Information about event. */ { - TkWindow *winPtr = clientData; + TkWindow *winPtr = (TkWindow *)clientData; DisplayFocusInfo *displayFocusPtr; if (eventPtr->type == VisibilityNotify) { @@ -1015,7 +1015,7 @@ FindDisplayFocusInfo( * The record doesn't exist yet. Make a new one. */ - displayFocusPtr = ckalloc(sizeof(DisplayFocusInfo)); + displayFocusPtr = (DisplayFocusInfo *)ckalloc(sizeof(DisplayFocusInfo)); displayFocusPtr->dispPtr = dispPtr; displayFocusPtr->focusWinPtr = NULL; displayFocusPtr->focusOnMapPtr = NULL; @@ -1143,7 +1143,7 @@ TkFocusSplit( * Move focus to new toplevel. */ - ToplevelFocusInfo *newTlFocusPtr = ckalloc(sizeof(ToplevelFocusInfo)); + ToplevelFocusInfo *newTlFocusPtr = (ToplevelFocusInfo *)ckalloc(sizeof(ToplevelFocusInfo)); newTlFocusPtr->topLevelPtr = winPtr; newTlFocusPtr->focusWinPtr = tlFocusPtr->focusWinPtr; diff --git a/generic/tkFont.c b/generic/tkFont.c index 3e4044f4..71008bce 100644 --- a/generic/tkFont.c +++ b/generic/tkFont.c @@ -897,6 +897,7 @@ RecomputeWidgets( { Tk_ClassWorldChangedProc *proc = Tk_GetClassProc(winPtr->classProcsPtr, worldChangedProc); + TkWindow *tkwinPtr; if (proc != NULL) { proc(winPtr->instanceData); @@ -912,18 +913,25 @@ RecomputeWidgets( * * However, the additional overhead of the recursive calls may become a * performance problem if typical usage alters such that -font'ed widgets - * appear high in the heirarchy, causing deep recursion. This could happen - * with text widgets, or more likely with the (not yet existant) labeled - * frame widget. With these widgets it is possible, even likely, that a - * -font'ed widget (text or labeled frame) will not be a leaf node, but + * appear high in the hierarchy, causing deep recursion. This could happen + * with text widgets, or more likely with the labelframe + * widget. With these widgets it is possible, even likely, that a + * -font'ed widget (text or labelframe) will not be a leaf node, but * will instead have many descendants. If this is ever found to cause a * performance problem, it may be worth investigating an iterative version * of the code below. */ - for (winPtr=winPtr->childList ; winPtr!=NULL ; winPtr=winPtr->nextPtr) { - RecomputeWidgets(winPtr); + for (tkwinPtr=winPtr->childList ; tkwinPtr!=NULL ; tkwinPtr=tkwinPtr->nextPtr) { + RecomputeWidgets(tkwinPtr); } + + /* + * Broadcast font change virtually for mega-widget layout managers. + * Do this after the font change has been propagated to core widgets. + */ + TkSendVirtualEvent((Tk_Window)winPtr, "TkWorldChanged", + Tcl_NewStringObj("FontChanged",-1)); } /* @@ -3780,7 +3788,7 @@ NewChunk( if (layoutPtr->numChunks == maxChunks) { maxChunks *= 2; s = Tk_Offset(TextLayout, chunks) + (maxChunks * sizeof(LayoutChunk)); - layoutPtr = ckrealloc(layoutPtr, s); + layoutPtr = (TextLayout *)ckrealloc(layoutPtr, s); *layoutPtrPtr = layoutPtr; *maxPtr = maxChunks; diff --git a/generic/tkFrame.c b/generic/tkFrame.c index 54ba8e8d..b5c20e89 100644 --- a/generic/tkFrame.c +++ b/generic/tkFrame.c @@ -741,7 +741,7 @@ FrameWidgetObjCmd( enum options { FRAME_CGET, FRAME_CONFIGURE }; - register Frame *framePtr = clientData; + Frame *framePtr = clientData; int result = TCL_OK, index; int c, i, length; Tcl_Obj *objPtr; @@ -859,8 +859,8 @@ static void DestroyFrame( void *memPtr) /* Info about frame widget. */ { - register Frame *framePtr = memPtr; - register Labelframe *labelframePtr = memPtr; + Frame *framePtr = memPtr; + Labelframe *labelframePtr = memPtr; if (framePtr->type == TYPE_LABELFRAME) { Tk_FreeTextLayout(labelframePtr->textLayout); @@ -896,7 +896,7 @@ static void DestroyFramePartly( Frame *framePtr) /* Info about frame widget. */ { - register Labelframe *labelframePtr = (Labelframe *) framePtr; + Labelframe *labelframePtr = (Labelframe *) framePtr; if (framePtr->type == TYPE_LABELFRAME && labelframePtr->labelWin != NULL) { Tk_DeleteEventHandler(labelframePtr->labelWin, StructureNotifyMask, @@ -936,7 +936,7 @@ DestroyFramePartly( static int ConfigureFrame( Tcl_Interp *interp, /* Used for error reporting. */ - register Frame *framePtr, /* Information about widget; may or may not + Frame *framePtr, /* Information about widget; may or may not * already have values for some fields. */ int objc, /* Number of valid entries in objv. */ Tcl_Obj *const objv[]) /* Arguments. */ @@ -1263,7 +1263,7 @@ FrameWorldChanged( static void ComputeFrameGeometry( - register Frame *framePtr) /* Information about widget. */ + Frame *framePtr) /* Information about widget. */ { int otherWidth, otherHeight, otherWidthT, otherHeightT, padding; int maxWidth, maxHeight; @@ -1412,8 +1412,8 @@ static void DisplayFrame( ClientData clientData) /* Information about widget. */ { - register Frame *framePtr = clientData; - register Tk_Window tkwin = framePtr->tkwin; + Frame *framePtr = clientData; + Tk_Window tkwin = framePtr->tkwin; int bdX1, bdY1, bdX2, bdY2, hlWidth; Pixmap pixmap; TkRegion clipRegion = NULL; @@ -1635,9 +1635,9 @@ DisplayFrame( static void FrameEventProc( ClientData clientData, /* Information about window. */ - register XEvent *eventPtr) /* Information about event. */ + XEvent *eventPtr) /* Information about event. */ { - register Frame *framePtr = clientData; + Frame *framePtr = clientData; if ((eventPtr->type == Expose) && (eventPtr->xexpose.count == 0)) { goto redraw; diff --git a/generic/tkGC.c b/generic/tkGC.c index c424e301..8744ec42 100644 --- a/generic/tkGC.c +++ b/generic/tkGC.c @@ -66,17 +66,17 @@ static void GCInit(TkDisplay *dispPtr); GC Tk_GetGC( Tk_Window tkwin, /* Window in which GC will be used. */ - register unsigned long valueMask, + unsigned long valueMask, /* 1 bits correspond to values specified in * *valuesPtr; other values are set from * defaults. */ - register XGCValues *valuePtr) + XGCValues *valuePtr) /* Values are specified here for bits set in * valueMask. */ { ValueKey valueKey; Tcl_HashEntry *valueHashPtr, *idHashPtr; - register TkGC *gcPtr; + TkGC *gcPtr; int isNew; Drawable d, freeDrawable; TkDisplay *dispPtr = ((TkWindow *) tkwin)->dispPtr; @@ -218,7 +218,7 @@ Tk_GetGC( valueHashPtr = Tcl_CreateHashEntry(&dispPtr->gcValueTable, (char *) &valueKey, &isNew); if (!isNew) { - gcPtr = Tcl_GetHashValue(valueHashPtr); + gcPtr = (TkGC *)Tcl_GetHashValue(valueHashPtr); gcPtr->refCount++; return gcPtr->gc; } @@ -228,7 +228,7 @@ Tk_GetGC( * and add a new structure to the database. */ - gcPtr = ckalloc(sizeof(TkGC)); + gcPtr = (TkGC *)ckalloc(sizeof(TkGC)); /* * Find or make a drawable to use to specify the screen and depth of the @@ -291,7 +291,7 @@ Tk_FreeGC( GC gc) /* Graphics context to be released. */ { Tcl_HashEntry *idHashPtr; - register TkGC *gcPtr; + TkGC *gcPtr; TkDisplay *dispPtr = TkGetDisplay(display); if (!dispPtr->gcInit) { @@ -311,9 +311,8 @@ Tk_FreeGC( if (idHashPtr == NULL) { Tcl_Panic("Tk_FreeGC received unknown gc argument"); } - gcPtr = Tcl_GetHashValue(idHashPtr); - gcPtr->refCount--; - if (gcPtr->refCount == 0) { + gcPtr = (TkGC *)Tcl_GetHashValue(idHashPtr); + if (gcPtr->refCount-- <= 1) { XFreeGC(gcPtr->display, gcPtr->gc); Tcl_DeleteHashEntry(gcPtr->valueHashPtr); Tcl_DeleteHashEntry(idHashPtr); @@ -348,7 +347,7 @@ TkGCCleanup( for (entryPtr = Tcl_FirstHashEntry(&dispPtr->gcIdTable, &search); entryPtr != NULL; entryPtr = Tcl_NextHashEntry(&search)) { - gcPtr = Tcl_GetHashValue(entryPtr); + gcPtr = (TkGC *)Tcl_GetHashValue(entryPtr); XFreeGC(gcPtr->display, gcPtr->gc); Tcl_DeleteHashEntry(gcPtr->valueHashPtr); diff --git a/generic/tkImgGIF.c b/generic/tkImgGIF.c index 76e48d4d..ab4bc370 100644 --- a/generic/tkImgGIF.c +++ b/generic/tkImgGIF.c @@ -1035,13 +1035,13 @@ ReadImage( { unsigned char initialCodeSize; int xpos = 0, ypos = 0, pass = 0, i, count; - register unsigned char *pixelPtr; + unsigned char *pixelPtr; static const int interlaceStep[] = { 8, 8, 4, 2 }; static const int interlaceStart[] = { 0, 4, 2, 1 }; unsigned short prefix[(1 << MAX_LWZ_BITS)]; unsigned char append[(1 << MAX_LWZ_BITS)]; unsigned char stack[(1 << MAX_LWZ_BITS)*2]; - register unsigned char *top; + unsigned char *top; int codeSize, clearCode, inCode, endCode, oldCode, maxCode; int code, firstCode, v; @@ -1425,7 +1425,7 @@ Mread( size_t numChunks, /* number of chunks */ MFile *handle) /* mmdecode "file" handle */ { - register int i, c; + int i, c; int count = chunkSize * numChunks; for (i=0; ihashTable + hSize; - register long i; - register long m1 = -1; + int *hashTablePtr = statePtr->hashTable + hSize; + long i; + long m1 = -1; i = hSize - 16; do { /* might use Sys V memset(3) here */ diff --git a/generic/tkImgPNG.c b/generic/tkImgPNG.c index 07b4f8ba..03bb4f8c 100644 --- a/generic/tkImgPNG.c +++ b/generic/tkImgPNG.c @@ -1708,9 +1708,9 @@ UnfilterLine( PNGImage *pngPtr) { unsigned char *thisLine = - Tcl_GetByteArrayFromObj(pngPtr->thisLineObj, NULL); + Tcl_GetByteArrayFromObj(pngPtr->thisLineObj, (int *)NULL); unsigned char *lastLine = - Tcl_GetByteArrayFromObj(pngPtr->lastLineObj, NULL); + Tcl_GetByteArrayFromObj(pngPtr->lastLineObj, (int *)NULL); #define PNG_FILTER_NONE 0 #define PNG_FILTER_SUB 1 @@ -1840,7 +1840,7 @@ DecodeLine( int colStep = 1; /* Column increment each pass */ int pixStep = 0; /* extra pixelPtr increment each pass */ unsigned char lastPixel[6]; - unsigned char *p = Tcl_GetByteArrayFromObj(pngPtr->thisLineObj, NULL); + unsigned char *p = Tcl_GetByteArrayFromObj(pngPtr->thisLineObj, (int *)NULL); p++; if (UnfilterLine(interp, pngPtr) == TCL_ERROR) { @@ -2237,14 +2237,14 @@ ApplyAlpha( PNGImage *pngPtr) { if (pngPtr->alpha != 1.0) { - register unsigned char *p = pngPtr->block.pixelPtr; + unsigned char *p = pngPtr->block.pixelPtr; unsigned char *endPtr = p + pngPtr->blockLen; int offset = pngPtr->block.offset[3]; p += offset; if (16 == pngPtr->bitDepth) { - register unsigned int channel; + unsigned int channel; while (p < endPtr) { channel = (unsigned int) diff --git a/generic/tkImgPhInstance.c b/generic/tkImgPhInstance.c index a40ee7f1..37ee3d91 100644 --- a/generic/tkImgPhInstance.c +++ b/generic/tkImgPhInstance.c @@ -31,7 +31,7 @@ extern int _XInitImageFuncPtrs(XImage *image); * Forward declarations */ -#ifndef TKPUTIMAGE_CAN_BLEND +#ifndef TK_CAN_RENDER_RGBA static void BlendComplexAlpha(XImage *bgImg, PhotoInstance *iPtr, int xOffset, int yOffset, int width, int height); #endif @@ -409,7 +409,7 @@ TkImgPhotoGet( * *---------------------------------------------------------------------- */ -#ifndef TKPUTIMAGE_CAN_BLEND +#ifndef TK_CAN_RENDER_RGBA #ifndef _WIN32 #define GetRValue(rgb) (UCHAR(((rgb) & red_mask) >> red_shift)) #define GetGValue(rgb) (UCHAR(((rgb) & green_mask) >> green_shift)) @@ -575,7 +575,7 @@ BlendComplexAlpha( } #undef ALPHA_BLEND } -#endif /* TKPUTIMAGE_CAN_BLEND */ +#endif /* TK_CAN_RENDER_RGBA */ /* *---------------------------------------------------------------------- @@ -607,7 +607,7 @@ TkImgPhotoDisplay( * to imageX and imageY. */ { PhotoInstance *instancePtr = clientData; -#ifndef TKPUTIMAGE_CAN_BLEND +#ifndef TK_CAN_RENDER_RGBA XVisualInfo visInfo = instancePtr->visualInfo; #endif @@ -620,9 +620,10 @@ TkImgPhotoDisplay( return; } -#ifdef TKPUTIMAGE_CAN_BLEND +#ifdef TK_CAN_RENDER_RGBA + /* - * If TkPutImage can handle RGBA Ximages directly there is + * We can use TkpPutRGBAImage to render RGBA Ximages directly so there is * no need to call XGetImage or to do the Porter-Duff compositing by hand. */ @@ -631,11 +632,12 @@ TkImgPhotoDisplay( (unsigned int)instancePtr->width, (unsigned int)instancePtr->height, 0, (unsigned int)(4 * instancePtr->width)); - TkPutImage(NULL, 0, display, drawable, instancePtr->gc, + TkpPutRGBAImage(display, drawable, instancePtr->gc, photo, imageX, imageY, drawableX, drawableY, (unsigned int) width, (unsigned int) height); photo->data = NULL; XDestroyImage(photo); + #else if ((instancePtr->masterPtr->flags & COMPLEX_ALPHA) diff --git a/generic/tkInt.h b/generic/tkInt.h index a98b6d68..fe8f16ec 100644 --- a/generic/tkInt.h +++ b/generic/tkInt.h @@ -679,6 +679,10 @@ typedef struct TkMainInfo { struct TkMainInfo *nextPtr; /* Next in list of all main windows managed by * this process. */ Tcl_HashTable busyTable; /* Information used by [tk busy] command. */ + Tcl_ObjCmdProc *tclUpdateObjProc; + /* Saved Tcl [update] command, used to restore + * Tcl's version of [update] after Tk is shut + * down */ } TkMainInfo; /* @@ -1037,7 +1041,7 @@ MODULE_SCOPE const char *const tkWebColors[20]; #endif /* - * Support for Clang Static Analyzer + * Support for Clang Static Analyzer */ #if defined(PURIFY) && defined(__clang__) @@ -1198,9 +1202,6 @@ MODULE_SCOPE int Tk_SelectionObjCmd(ClientData clientData, MODULE_SCOPE int Tk_SendObjCmd(ClientData clientData, Tcl_Interp *interp,int objc, Tcl_Obj *const objv[]); -MODULE_SCOPE int Tk_SendObjCmd(ClientData clientData, - Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[]); MODULE_SCOPE int Tk_SpinboxObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); @@ -1322,7 +1323,8 @@ MODULE_SCOPE void TkUnixSetXftClipRegion(TkRegion clipRegion); # define c_class class #endif -#if TCL_UTF_MAX > 4 +/* Tcl 8.6 has a different definition of Tcl_UniChar than other Tcl versions for TCL_UTF_MAX > 3 */ +#if TCL_UTF_MAX > (3 + (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 6)) # define TkUtfToUniChar Tcl_UtfToUniChar # define TkUniCharToUtf Tcl_UniCharToUtf # define TkUtfPrev Tcl_UtfPrev diff --git a/generic/tkListbox.c b/generic/tkListbox.c index 514b349b..cba8954c 100644 --- a/generic/tkListbox.c +++ b/generic/tkListbox.c @@ -478,7 +478,7 @@ Tk_ListboxObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - register Listbox *listPtr; + Listbox *listPtr; Tk_Window tkwin; ListboxOptionTables *optionTables; @@ -607,7 +607,7 @@ ListboxWidgetObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Arguments as Tcl_Obj's. */ { - register Listbox *listPtr = clientData; + Listbox *listPtr = clientData; int cmdIndex, index; int result = TCL_OK; Tcl_Obj *objPtr; @@ -1082,7 +1082,7 @@ ListboxBboxSubCmd( Listbox *listPtr, /* Information about the listbox */ int index) /* Index of the element to get bbox info on */ { - register Tk_Window tkwin = listPtr->tkwin; + Tk_Window tkwin = listPtr->tkwin; int lastVisibleIndex; /* @@ -1446,7 +1446,7 @@ static void DestroyListbox( void *memPtr) /* Info about listbox widget. */ { - register Listbox *listPtr = memPtr; + Listbox *listPtr = memPtr; Tcl_HashEntry *entry; Tcl_HashSearch search; @@ -1555,7 +1555,7 @@ DestroyListboxOptionTables( static int ConfigureListbox( Tcl_Interp *interp, /* Used for error reporting. */ - register Listbox *listPtr, /* Information about widget; may or may not + Listbox *listPtr, /* Information about widget; may or may not * already have values for some fields. */ int objc, /* Number of valid entries in argv. */ Tcl_Obj *const objv[]) /* Arguments. */ @@ -1715,7 +1715,7 @@ ConfigureListbox( static int ConfigureListboxItem( Tcl_Interp *interp, /* Used for error reporting. */ - register Listbox *listPtr, /* Information about widget; may or may not + Listbox *listPtr, /* Information about widget; may or may not * already have values for some fields. */ ItemAttr *attrs, /* Information about the item to configure */ int objc, /* Number of valid entries in argv. */ @@ -1837,8 +1837,8 @@ static void DisplayListbox( ClientData clientData) /* Information about window. */ { - register Listbox *listPtr = clientData; - register Tk_Window tkwin = listPtr->tkwin; + Listbox *listPtr = clientData; + Tk_Window tkwin = listPtr->tkwin; GC gc; int i, limit, x, y, prevSelected, freeGC, stringLen; Tk_FontMetrics fm; @@ -2317,7 +2317,7 @@ ListboxComputeGeometry( static int ListboxInsertSubCmd( - register Listbox *listPtr, /* Listbox that is to get the new elements. */ + Listbox *listPtr, /* Listbox that is to get the new elements. */ int index, /* Add the new elements before this * element. */ int objc, /* Number of new elements to add. */ @@ -2433,7 +2433,7 @@ ListboxInsertSubCmd( static int ListboxDeleteSubCmd( - register Listbox *listPtr, /* Listbox widget to modify. */ + Listbox *listPtr, /* Listbox widget to modify. */ int first, /* Index of first element to delete. */ int last) /* Index of last element to delete. */ { @@ -2828,7 +2828,7 @@ GetListboxIndex( static void ChangeListboxView( - register Listbox *listPtr, /* Information about widget. */ + Listbox *listPtr, /* Information about widget. */ int index) /* Index of element in listPtr that should now * appear at the top of the listbox. */ { @@ -2863,7 +2863,7 @@ ChangeListboxView( static void ChangeListboxOffset( - register Listbox *listPtr, /* Information about widget. */ + Listbox *listPtr, /* Information about widget. */ int offset) /* Desired new "xOffset" for listbox. */ { int maxOffset; @@ -2911,7 +2911,7 @@ ChangeListboxOffset( static void ListboxScanTo( - register Listbox *listPtr, /* Information about widget. */ + Listbox *listPtr, /* Information about widget. */ int x, /* X-coordinate to use for scan operation. */ int y) /* Y-coordinate to use for scan operation. */ { @@ -2978,7 +2978,7 @@ ListboxScanTo( static int NearestListboxElement( - register Listbox *listPtr, /* Information about widget. */ + Listbox *listPtr, /* Information about widget. */ int y) /* Y-coordinate in listPtr's window. */ { int index; @@ -3019,7 +3019,7 @@ NearestListboxElement( static int ListboxSelect( - register Listbox *listPtr, /* Information about widget. */ + Listbox *listPtr, /* Information about widget. */ int first, /* Index of first element to select or * deselect. */ int last, /* Index of last element to select or @@ -3120,7 +3120,7 @@ ListboxFetchSelection( * not including terminating NULL * character. */ { - register Listbox *listPtr = clientData; + Listbox *listPtr = clientData; Tcl_DString selection; int length, count, needNewline, stringLen, i; Tcl_Obj *curElement; @@ -3196,7 +3196,7 @@ static void ListboxLostSelection( ClientData clientData) /* Information about listbox widget. */ { - register Listbox *listPtr = clientData; + Listbox *listPtr = clientData; if ((listPtr->exportSelection) && (!Tcl_IsSafe(listPtr->interp)) && (listPtr->nElements > 0)) { @@ -3248,7 +3248,7 @@ GenerateListboxSelectEvent( static void EventuallyRedrawRange( - register Listbox *listPtr, /* Information about widget. */ + Listbox *listPtr, /* Information about widget. */ int first, /* Index of first element in list that needs * to be redrawn. */ int last) /* Index of last element in list that needs to @@ -3256,7 +3256,7 @@ EventuallyRedrawRange( * just bracket a range. */ { /* - * We don't have to register a redraw callback if one is already pending, + * We don't have to a redraw callback if one is already pending, * or if the window doesn't exist, or if the window isn't mapped. */ @@ -3291,7 +3291,7 @@ EventuallyRedrawRange( static void ListboxUpdateVScrollbar( - register Listbox *listPtr) /* Information about widget. */ + Listbox *listPtr) /* Information about widget. */ { char firstStr[TCL_DOUBLE_SPACE], lastStr[TCL_DOUBLE_SPACE]; double first, last; @@ -3361,7 +3361,7 @@ ListboxUpdateVScrollbar( static void ListboxUpdateHScrollbar( - register Listbox *listPtr) /* Information about widget. */ + Listbox *listPtr) /* Information about widget. */ { char firstStr[TCL_DOUBLE_SPACE], lastStr[TCL_DOUBLE_SPACE]; int result, windowWidth; @@ -3642,7 +3642,7 @@ MigrateHashEntries( *---------------------------------------------------------------------- */ static int GetMaxOffset( - register Listbox *listPtr) + Listbox *listPtr) { int maxOffset; diff --git a/generic/tkMacWinMenu.c b/generic/tkMacWinMenu.c index ab92fec8..7749c6d0 100644 --- a/generic/tkMacWinMenu.c +++ b/generic/tkMacWinMenu.c @@ -67,7 +67,7 @@ PreprocessMenu( do { finished = 1; for (index = 0; index < menuPtr->numEntries; index++) { - register TkMenuEntry *entryPtr = menuPtr->entries[index]; + TkMenuEntry *entryPtr = menuPtr->entries[index]; if ((entryPtr->type == CASCADE_ENTRY) && (entryPtr->namePtr != NULL) diff --git a/generic/tkMenu.c b/generic/tkMenu.c index 1cd7a168..18f59a8b 100644 --- a/generic/tkMenu.c +++ b/generic/tkMenu.c @@ -406,7 +406,7 @@ Tk_MenuObjCmd( { Tk_Window tkwin = clientData; Tk_Window newWin; - register TkMenu *menuPtr; + TkMenu *menuPtr; TkMenuReferences *menuRefPtr; int i, index, toplevel; const char *windowName; @@ -617,8 +617,8 @@ MenuWidgetObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument strings. */ { - register TkMenu *menuPtr = clientData; - register TkMenuEntry *mePtr; + TkMenu *menuPtr = clientData; + TkMenuEntry *mePtr; int result = TCL_OK; int option; ThreadSpecificData *tsdPtr = @@ -1385,7 +1385,7 @@ static void DestroyMenuEntry( void *memPtr) /* Pointer to entry to be freed. */ { - register TkMenuEntry *mePtr = memPtr; + TkMenuEntry *mePtr = memPtr; TkMenu *menuPtr = mePtr->menuPtr; if (menuPtr->postedCascade == mePtr) { @@ -1519,7 +1519,7 @@ MenuWorldChanged( static int ConfigureMenu( Tcl_Interp *interp, /* Used for error reporting. */ - register TkMenu *menuPtr, /* Information about widget; may or may not + TkMenu *menuPtr, /* Information about widget; may or may not * already have values for some fields. */ int objc, /* Number of valid entries in argv. */ Tcl_Obj *const objv[]) /* Arguments. */ @@ -1901,7 +1901,7 @@ PostProcessEntry( static int ConfigureMenuEntry( - register TkMenuEntry *mePtr,/* Information about menu entry; may or may + TkMenuEntry *mePtr,/* Information about menu entry; may or may * not already have values for some fields. */ int objc, /* Number of valid entries in argv. */ Tcl_Obj *const objv[]) /* Arguments. */ @@ -2589,11 +2589,11 @@ MenuVarProc( int TkActivateMenuEntry( - register TkMenu *menuPtr, /* Menu in which to activate. */ + TkMenu *menuPtr, /* Menu in which to activate. */ int index) /* Index of entry to activate, or -1 to * deactivate all entries. */ { - register TkMenuEntry *mePtr; + TkMenuEntry *mePtr; int result = TCL_OK; if (menuPtr->active >= 0) { diff --git a/generic/tkMenuDraw.c b/generic/tkMenuDraw.c index 89f4a2b8..3851a066 100644 --- a/generic/tkMenuDraw.c +++ b/generic/tkMenuDraw.c @@ -483,8 +483,8 @@ TkRecomputeMenu( void TkEventuallyRedrawMenu( - register TkMenu *menuPtr, /* Information about menu to redraw. */ - register TkMenuEntry *mePtr)/* Entry to redraw. NULL means redraw all the + TkMenu *menuPtr, /* Information about menu to redraw. */ + TkMenuEntry *mePtr)/* Entry to redraw. NULL means redraw all the * entries in the menu. */ { int i; @@ -586,7 +586,7 @@ TkMenuSelectImageProc( * <=0). */ int imgWidth, int imgHeight)/* New dimensions of image. */ { - register TkMenuEntry *mePtr = clientData; + TkMenuEntry *mePtr = clientData; if ((mePtr->entryFlags & ENTRY_SELECTED) && !(mePtr->menuPtr->menuFlags & REDRAW_PENDING)) { @@ -615,9 +615,9 @@ static void DisplayMenu( ClientData clientData) /* Information about widget. */ { - register TkMenu *menuPtr = clientData; - register TkMenuEntry *mePtr; - register Tk_Window tkwin = menuPtr->tkwin; + TkMenu *menuPtr = clientData; + TkMenuEntry *mePtr; + Tk_Window tkwin = menuPtr->tkwin; int index, strictMotif; Tk_Font tkfont; Tk_FontMetrics menuMetrics; @@ -824,7 +824,7 @@ TkMenuImageProc( * <=0). */ int imgWidth, int imgHeight)/* New dimensions of image. */ { - register TkMenu *menuPtr = ((TkMenuEntry *) clientData)->menuPtr; + TkMenu *menuPtr = ((TkMenuEntry *) clientData)->menuPtr; if ((menuPtr->tkwin != NULL) && !(menuPtr->menuFlags & RESIZE_PENDING)) { menuPtr->menuFlags |= RESIZE_PENDING; @@ -882,8 +882,8 @@ int TkPostSubmenu( Tcl_Interp *interp, /* Used for invoking sub-commands and * reporting errors. */ - register TkMenu *menuPtr, /* Information about menu as a whole. */ - register TkMenuEntry *mePtr)/* Info about submenu that is to be posted. + TkMenu *menuPtr, /* Information about menu as a whole. */ + TkMenuEntry *mePtr)/* Info about submenu that is to be posted. * NULL means make sure that no submenu is * posted. */ { diff --git a/generic/tkMenubutton.c b/generic/tkMenubutton.c index 2228a2e8..5f4f40fa 100644 --- a/generic/tkMenubutton.c +++ b/generic/tkMenubutton.c @@ -217,7 +217,7 @@ Tk_MenubuttonObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - register TkMenuButton *mbPtr; + TkMenuButton *mbPtr; Tk_OptionTable optionTable; Tk_Window tkwin; @@ -347,7 +347,7 @@ MenuButtonWidgetObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument objects. */ { - register TkMenuButton *mbPtr = clientData; + TkMenuButton *mbPtr = clientData; int result, index; Tcl_Obj *objPtr; @@ -422,7 +422,7 @@ static void DestroyMenuButton( char *memPtr) /* Info about button widget. */ { - register TkMenuButton *mbPtr = (TkMenuButton *) memPtr; + TkMenuButton *mbPtr = (TkMenuButton *) memPtr; TkpDestroyMenuButton(mbPtr); if (mbPtr->flags & REDRAW_PENDING) { @@ -490,7 +490,7 @@ DestroyMenuButton( static int ConfigureMenuButton( Tcl_Interp *interp, /* Used for error reporting. */ - register TkMenuButton *mbPtr, + TkMenuButton *mbPtr, /* Information about widget; may or may not * already have values for some fields. */ int objc, /* Number of valid entries in objv. */ @@ -877,7 +877,7 @@ MenuButtonTextVarProc( const char *name2, /* Second part of variable name. */ int flags) /* Information about what happened. */ { - register TkMenuButton *mbPtr = clientData; + TkMenuButton *mbPtr = clientData; const char *value; unsigned len; @@ -964,7 +964,7 @@ MenuButtonImageProc( * 0). */ int imgWidth, int imgHeight)/* New dimensions of image. */ { - register TkMenuButton *mbPtr = clientData; + TkMenuButton *mbPtr = clientData; if (mbPtr->tkwin != NULL) { TkpComputeMenuButtonGeometry(mbPtr); diff --git a/generic/tkMessage.c b/generic/tkMessage.c index 1a3c6de9..cc67b463 100644 --- a/generic/tkMessage.c +++ b/generic/tkMessage.c @@ -219,7 +219,7 @@ Tk_MessageObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument strings. */ { - register Message *msgPtr; + Message *msgPtr; Tk_OptionTable optionTable; Tk_Window tkwin; @@ -306,7 +306,7 @@ MessageWidgetObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument strings. */ { - register Message *msgPtr = clientData; + Message *msgPtr = clientData; static const char *const optionStrings[] = { "cget", "configure", NULL }; enum options { MESSAGE_CGET, MESSAGE_CONFIGURE }; int index; @@ -384,7 +384,7 @@ static void DestroyMessage( char *memPtr) /* Info about message widget. */ { - register Message *msgPtr = (Message *) memPtr; + Message *msgPtr = (Message *) memPtr; msgPtr->flags |= MESSAGE_DELETED; @@ -437,7 +437,7 @@ DestroyMessage( static int ConfigureMessage( Tcl_Interp *interp, /* Used for error reporting. */ - register Message *msgPtr, /* Information about widget; may or may not + Message *msgPtr, /* Information about widget; may or may not * already have values for some fields. */ int objc, /* Number of valid entries in argv. */ Tcl_Obj *const objv[], /* Arguments. */ @@ -582,7 +582,7 @@ MessageWorldChanged( static void ComputeMessageGeometry( - register Message *msgPtr) /* Information about window. */ + Message *msgPtr) /* Information about window. */ { int width, inc, height; int thisWidth, thisHeight, maxWidth; @@ -666,8 +666,8 @@ static void DisplayMessage( ClientData clientData) /* Information about window. */ { - register Message *msgPtr = clientData; - register Tk_Window tkwin = msgPtr->tkwin; + Message *msgPtr = clientData; + Tk_Window tkwin = msgPtr->tkwin; int x, y; int borderWidth = msgPtr->highlightWidth; @@ -835,7 +835,7 @@ MessageTextVarProc( const char *name2, /* Second part of variable name. */ int flags) /* Information about what happened. */ { - register Message *msgPtr = clientData; + Message *msgPtr = clientData; const char *value; /* diff --git a/generic/tkObj.c b/generic/tkObj.c index 716c7e17..1552d113 100644 --- a/generic/tkObj.c +++ b/generic/tkObj.c @@ -929,13 +929,13 @@ SetWindowFromAny( static void DupWindowInternalRep( - register Tcl_Obj *srcPtr, - register Tcl_Obj *copyPtr) + Tcl_Obj *srcPtr, + Tcl_Obj *copyPtr) { - register WindowRep *oldPtr, *newPtr; + WindowRep *oldPtr, *newPtr; - oldPtr = srcPtr->internalRep.twoPtrValue.ptr1; - newPtr = ckalloc(sizeof(WindowRep)); + oldPtr = (WindowRep *)srcPtr->internalRep.twoPtrValue.ptr1; + newPtr = (WindowRep *)ckalloc(sizeof(WindowRep)); newPtr->tkwin = oldPtr->tkwin; newPtr->mainPtr = oldPtr->mainPtr; newPtr->epoch = oldPtr->epoch; @@ -997,7 +997,7 @@ TkNewWindowObj( SetWindowFromAny(NULL, objPtr); - winPtr = objPtr->internalRep.twoPtrValue.ptr1; + winPtr = (WindowRep *)objPtr->internalRep.twoPtrValue.ptr1; winPtr->tkwin = tkwin; winPtr->mainPtr = mainPtr; winPtr->epoch = mainPtr->deletionEpoch; diff --git a/generic/tkPointer.c b/generic/tkPointer.c index cc674016..7753c362 100644 --- a/generic/tkPointer.c +++ b/generic/tkPointer.c @@ -495,7 +495,7 @@ TkPointerDeadWindow( Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); if (winPtr == tsdPtr->lastWinPtr) { - tsdPtr->lastWinPtr = NULL; + tsdPtr->lastWinPtr = TkGetContainer(winPtr); } if (winPtr == tsdPtr->grabWinPtr) { tsdPtr->grabWinPtr = NULL; diff --git a/generic/tkScale.c b/generic/tkScale.c index 825f6616..fa2a5d59 100644 --- a/generic/tkScale.c +++ b/generic/tkScale.c @@ -253,7 +253,7 @@ Tk_ScaleObjCmd( int objc, /* Number of arguments. */ Tcl_Obj *const objv[]) /* Argument values. */ { - register TkScale *scalePtr; + TkScale *scalePtr; Tk_OptionTable optionTable; Tk_Window tkwin; @@ -542,7 +542,7 @@ static void DestroyScale( char *memPtr) /* Info about scale widget. */ { - register TkScale *scalePtr = (TkScale *) memPtr; + TkScale *scalePtr = (TkScale *) memPtr; scalePtr->flags |= SCALE_DELETED; @@ -599,7 +599,7 @@ DestroyScale( static int ConfigureScale( Tcl_Interp *interp, /* Used for error reporting. */ - register TkScale *scalePtr, /* Information about widget; may or may not + TkScale *scalePtr, /* Information about widget; may or may not * already have values for some fields. */ int objc, /* Number of valid entries in objv. */ Tcl_Obj *const objv[]) /* Argument values. */ @@ -1017,7 +1017,7 @@ ComputeFormat( static void ComputeScaleGeometry( - register TkScale *scalePtr) /* Information about widget. */ + TkScale *scalePtr) /* Information about widget. */ { char valueString[TCL_DOUBLE_SPACE]; int tmp, valuePixels, tickPixels, x, y, extraSpace; @@ -1246,7 +1246,7 @@ ScaleCmdDeletedProc( void TkEventuallyRedrawScale( - register TkScale *scalePtr, /* Information about widget. */ + TkScale *scalePtr, /* Information about widget. */ int what) /* What to redraw: REDRAW_SLIDER or * REDRAW_ALL. */ { @@ -1344,7 +1344,7 @@ ScaleVarProc( const char *name2, /* Second part of variable name. */ int flags) /* Information about what happened. */ { - register TkScale *scalePtr = clientData; + TkScale *scalePtr = clientData; const char *resultStr; double value; Tcl_Obj *valuePtr; @@ -1439,7 +1439,7 @@ ScaleVarProc( void TkScaleSetValue( - register TkScale *scalePtr, /* Info about widget. */ + TkScale *scalePtr, /* Info about widget. */ double value, /* New value for scale. Gets adjusted if it's * off the scale. */ int setVar, /* Non-zero means reflect new value through to @@ -1497,7 +1497,7 @@ TkScaleSetValue( static void ScaleSetVariable( - register TkScale *scalePtr) /* Info about widget. */ + TkScale *scalePtr) /* Info about widget. */ { if (scalePtr->varNamePtr != NULL) { char string[TCL_DOUBLE_SPACE]; @@ -1533,7 +1533,7 @@ ScaleSetVariable( double TkScalePixelToValue( - register TkScale *scalePtr, /* Information about widget. */ + TkScale *scalePtr, /* Information about widget. */ int x, int y) /* Coordinates of point within window. */ { double value, pixelRange; @@ -1591,7 +1591,7 @@ TkScalePixelToValue( int TkScaleValueToPixel( - register TkScale *scalePtr, /* Information about widget. */ + TkScale *scalePtr, /* Information about widget. */ double value) /* Reading of the widget. */ { int y, pixelRange; diff --git a/generic/tkSelect.c b/generic/tkSelect.c index 9584be41..ef636da3 100644 --- a/generic/tkSelect.c +++ b/generic/tkSelect.c @@ -1191,7 +1191,7 @@ TkSelInit( * Using UTF8_STRING instead of the XA_UTF8_STRING macro allows us to * support older X servers that didn't have UTF8_STRING yet. This is * necessary on Unix systems. For more information, see: - * http://www.cl.cam.ac.uk/~mgk25/unicode.html#x11 + * https://www.cl.cam.ac.uk/~mgk25/unicode.html#x11 */ #if !defined(_WIN32) @@ -1325,7 +1325,7 @@ HandleTclCommand( char *buffer, /* Place to store converted selection. */ int maxBytes) /* Maximum # of bytes to store at buffer. */ { - CommandInfo *cmdInfoPtr = clientData; + CommandInfo *cmdInfoPtr = (CommandInfo *)clientData; int length; Tcl_Obj *command; const char *string; @@ -1399,12 +1399,12 @@ HandleTclCommand( cmdInfoPtr->charOffset += Tcl_NumUtfChars(string, -1); cmdInfoPtr->buffer[0] = '\0'; } else { - int ch; + Tcl_UniChar ch = 0; p = string; string += count; numChars = 0; while (p < string) { - p += TkUtfToUniChar(p, &ch); + p += Tcl_UtfToUniChar(p, &ch); numChars++; } cmdInfoPtr->charOffset += numChars; diff --git a/generic/tkSquare.c b/generic/tkSquare.c index e92c03c8..61f86c5c 100644 --- a/generic/tkSquare.c +++ b/generic/tkSquare.c @@ -581,7 +581,7 @@ SquareDestroy( static void KeepInWindow( - register Square *squarePtr) /* Pointer to widget record. */ + Square *squarePtr) /* Pointer to widget record. */ { int i, bd, relief; int borderWidth, size; diff --git a/generic/tkStubLib.c b/generic/tkStubLib.c index ea48894c..0400bfaf 100644 --- a/generic/tkStubLib.c +++ b/generic/tkStubLib.c @@ -80,7 +80,7 @@ Tk_InitStubs( ClientData clientData = NULL; const char *actualVersion = tclStubsPtr->tcl_PkgRequireEx(interp, packageName, version, 0, &clientData); - const TkStubs *stubsPtr = clientData; + const TkStubs *stubsPtr = (const TkStubs *)clientData; if (actualVersion == NULL) { return NULL; diff --git a/generic/tkStyle.c b/generic/tkStyle.c index 1289f14b..14bae661 100644 --- a/generic/tkStyle.c +++ b/generic/tkStyle.c @@ -1402,14 +1402,10 @@ Tk_AllocStyleFromObj( Tcl_Obj *objPtr) /* Object containing name of the style to * retrieve. */ { - Style *stylePtr; - if (objPtr->typePtr != &styleObjType) { SetStyleFromAny(interp, objPtr); } - stylePtr = objPtr->internalRep.twoPtrValue.ptr1; - - return (Tk_Style) stylePtr; + return (Tk_Style)objPtr->internalRep.twoPtrValue.ptr1; } /* @@ -1439,7 +1435,7 @@ Tk_GetStyleFromObj( SetStyleFromAny(NULL, objPtr); } - return objPtr->internalRep.twoPtrValue.ptr1; + return (Tk_Style)objPtr->internalRep.twoPtrValue.ptr1; } /* diff --git a/generic/tkText.c b/generic/tkText.c index c41fc674..90ec575f 100644 --- a/generic/tkText.c +++ b/generic/tkText.c @@ -3297,7 +3297,7 @@ DeleteIndexRange( TkTextSetYView(tPtr, &indexTmp, 0); } } else { - TkTextMakeByteIndex(sharedTextPtr->tree, tPtr, line, + TkTextMakeByteIndex(sharedTextPtr->tree, NULL, line, byteIndex, &indexTmp); /* * line may be before -startline of tPtr and must be @@ -3306,20 +3306,12 @@ DeleteIndexRange( * would be displayed. * There is no need to worry about -endline however, * because the view will only be reset if the deletion - * involves the TOP line of the screen + * involves the TOP line of the screen. That said, + * the following call adjusts to both. */ - if (tPtr->start != NULL) { - int start; - TkTextIndex indexStart; + TkTextIndexAdjustToStartEnd(tPtr, &indexTmp, 0); - start = TkBTreeLinesTo(NULL, tPtr->start); - TkTextMakeByteIndex(sharedTextPtr->tree, NULL, start, - 0, &indexStart); - if (TkTextIndexCmp(&indexTmp, &indexStart) < 0) { - indexTmp = indexStart; - } - } TkTextSetYView(tPtr, &indexTmp, 0); } } diff --git a/generic/tkText.h b/generic/tkText.h index 9a9495a3..9898462d 100644 --- a/generic/tkText.h +++ b/generic/tkText.h @@ -1160,6 +1160,8 @@ MODULE_SCOPE int TkTextYviewCmd(TkText *textPtr, Tcl_Interp *interp, MODULE_SCOPE void TkTextWinFreeClient(Tcl_HashEntry *hPtr, TkTextEmbWindowClient *client); MODULE_SCOPE void TkTextRunAfterSyncCmd(ClientData clientData); +MODULE_SCOPE int TkTextIndexAdjustToStartEnd(TkText *textPtr, + TkTextIndex *indexPtr, int err); #endif /* _TKTEXT */ /* diff --git a/generic/tkTextBTree.c b/generic/tkTextBTree.c index 7832992b..1b65cbca 100644 --- a/generic/tkTextBTree.c +++ b/generic/tkTextBTree.c @@ -1727,6 +1727,26 @@ TkBTreeFindPixelLine( } pixels -= linePtr->pixels[2 * pixelReference]; } + + /* + * Check for any start/end offset for this text widget. + */ + + if (textPtr->start != NULL) { + int lineBoundary = TkBTreeLinesTo(NULL, textPtr->start); + + if (TkBTreeLinesTo(NULL, linePtr) < lineBoundary) { + linePtr = TkBTreeFindLine(tree, NULL, lineBoundary); + } + } + if (textPtr->end != NULL) { + int lineBoundary = TkBTreeLinesTo(NULL, textPtr->end); + + if (TkBTreeLinesTo(NULL, linePtr) > lineBoundary) { + linePtr = TkBTreeFindLine(tree, NULL, lineBoundary); + } + } + if (pixelOffset != NULL && linePtr != NULL) { *pixelOffset = pixels; } diff --git a/generic/tkTextImage.c b/generic/tkTextImage.c index bc0da0af..776eb04a 100644 --- a/generic/tkTextImage.c +++ b/generic/tkTextImage.c @@ -284,7 +284,7 @@ TkTextImageCmd( for (hPtr = Tcl_FirstHashEntry(&textPtr->sharedTextPtr->imageTable, &search); hPtr != NULL; hPtr = Tcl_NextHashEntry(&search)) { Tcl_ListObjAppendElement(NULL, resultObj, Tcl_NewStringObj( - Tcl_GetHashKey(&textPtr->sharedTextPtr->markTable, hPtr), -1)); + (const char *)Tcl_GetHashKey(&textPtr->sharedTextPtr->markTable, hPtr), -1)); } Tcl_SetObjResult(interp, resultObj); return TCL_OK; @@ -764,9 +764,9 @@ EmbImageBboxProc( * index corresponding to the image's position in the text. * * Results: - * The return value is 1 if there is an embedded image by the given name - * in the text widget, 0 otherwise. If the image exists, *indexPtr is - * filled in with its index. + * The return value is TCL_OK if there is an embedded image by the given + * name in the text widget, TCL_ERROR otherwise. If the image exists, + * *indexPtr is filled in with its index. * * Side effects: * None. @@ -784,18 +784,29 @@ TkTextImageIndex( TkTextSegment *eiPtr; if (textPtr == NULL) { - return 0; + return TCL_ERROR; } hPtr = Tcl_FindHashEntry(&textPtr->sharedTextPtr->imageTable, name); if (hPtr == NULL) { - return 0; + return TCL_ERROR; } eiPtr = (TkTextSegment *)Tcl_GetHashValue(hPtr); indexPtr->tree = textPtr->sharedTextPtr->tree; indexPtr->linePtr = eiPtr->body.ei.linePtr; indexPtr->byteIndex = TkTextSegToOffset(eiPtr, indexPtr->linePtr); - return 1; + + /* + * If indexPtr refers to somewhere outside the -startline/-endline + * range limits of the widget, error out since the image indeed is not + * reachable from this text widget (it may be reachable from a peer). + */ + + if (TkTextIndexAdjustToStartEnd(textPtr, indexPtr, 1) == TCL_ERROR) { + return TCL_ERROR; + } + + return TCL_OK; } /* diff --git a/generic/tkTextIndex.c b/generic/tkTextIndex.c index 16283899..e6632d0b 100644 --- a/generic/tkTextIndex.c +++ b/generic/tkTextIndex.c @@ -480,7 +480,7 @@ TkTextMakeCharIndex( TkTextSegment *segPtr; char *p, *start, *end; int index, offset; - int ch; + Tcl_UniChar ch = 0; indexPtr->tree = tree; if (lineIndex < 0) { @@ -527,7 +527,7 @@ TkTextMakeCharIndex( return indexPtr; } charIndex--; - offset = TkUtfToUniChar(p, &ch); + offset = Tcl_UtfToUniChar(p, &ch); index += offset; } } else { @@ -761,11 +761,11 @@ GetIndex( goto done; } - if (TkTextWindowIndex(textPtr, string, indexPtr) != 0) { + if (TkTextWindowIndex(textPtr, string, indexPtr) == TCL_OK) { goto done; } - if (TkTextImageIndex(textPtr, string, indexPtr) != 0) { + if (TkTextImageIndex(textPtr, string, indexPtr) == TCL_OK) { goto done; } @@ -917,7 +917,7 @@ GetIndex( *endOfBase = 0; result = TkTextWindowIndex(textPtr, Tcl_DStringValue(©), indexPtr); *endOfBase = c; - if (result != 0) { + if (result == TCL_OK) { goto gotBase; } } @@ -954,7 +954,7 @@ GetIndex( *endOfBase = 0; result = TkTextImageIndex(textPtr, Tcl_DStringValue(©), indexPtr); *endOfBase = c; - if (result != 0) { + if (result == TCL_OK) { goto gotBase; } } @@ -997,6 +997,7 @@ GetIndex( if (indexPtr->linePtr == NULL) { Tcl_Panic("Bad index created"); } + TkTextIndexAdjustToStartEnd(textPtr, indexPtr, 0); return TCL_OK; error: @@ -1006,6 +1007,67 @@ GetIndex( return TCL_ERROR; } +/* + *--------------------------------------------------------------------------- + * + * TkTextIndexAdjustToStartEnd -- + * + * Adjust indexPtr to the -startline/-endline range, or just check + * if indexPtr is out of this range. + * + * Results: + * The return value is a standard Tcl return result. If check is true, + * return TCL_ERROR if indexPtr is outside the -startline/-endline + * range (indexPtr is not modified). + * If check is false, adjust indexPtr to -startline/-endline. + * + * Side effects: + * None. + * + *--------------------------------------------------------------------------- + */ + +int +TkTextIndexAdjustToStartEnd( + TkText *textPtr, + TkTextIndex *indexPtr, /* Pointer to index. */ + int check) /* 1 means only check indexPtr against + * the -startline/-endline range + * 0 means adjust to this range */ +{ + int bound; + TkTextIndex indexBound; + + if (!textPtr) { + return TCL_OK; + } + if (textPtr->start != NULL) { + bound = TkBTreeLinesTo(NULL, textPtr->start); + TkTextMakeByteIndex(textPtr->sharedTextPtr->tree, NULL, bound, 0, + &indexBound); + if (TkTextIndexCmp(indexPtr, &indexBound) < 0) { + if (check) { + return TCL_ERROR; + } + TkTextMakeByteIndex(textPtr->sharedTextPtr->tree, NULL, bound, 0, + indexPtr); + } + } + if (textPtr->end != NULL) { + bound = TkBTreeLinesTo(NULL, textPtr->end); + TkTextMakeByteIndex(textPtr->sharedTextPtr->tree, NULL, bound, 0, + &indexBound); + if (TkTextIndexCmp(indexPtr, &indexBound) > 0) { + if (check) { + return TCL_ERROR; + } + TkTextMakeByteIndex(textPtr->sharedTextPtr->tree, NULL, bound, 0, + indexPtr); + } + } + return TCL_OK; +} + /* *--------------------------------------------------------------------------- * diff --git a/generic/tkTextMark.c b/generic/tkTextMark.c index dcd7008c..f77e6b40 100644 --- a/generic/tkTextMark.c +++ b/generic/tkTextMark.c @@ -434,8 +434,6 @@ TkTextMarkNameToIndex( TkTextIndex *indexPtr) /* Index information gets stored here. */ { TkTextSegment *segPtr; - TkTextIndex index; - int start, end; if (textPtr == NULL) { return TCL_ERROR; @@ -456,28 +454,17 @@ TkTextMarkNameToIndex( } TkTextMarkSegToIndex(textPtr, segPtr, indexPtr); - /* If indexPtr refers to somewhere outside the -startline/-endline + /* + * If indexPtr refers to somewhere outside the -startline/-endline * range limits of the widget, error out since the mark indeed is not * reachable from this text widget (it may be reachable from a peer) * (bug 1630271). */ - if (textPtr->start != NULL) { - start = TkBTreeLinesTo(NULL, textPtr->start); - TkTextMakeByteIndex(textPtr->sharedTextPtr->tree, NULL, start, 0, - &index); - if (TkTextIndexCmp(indexPtr, &index) < 0) { - return TCL_ERROR; - } - } - if (textPtr->end != NULL) { - end = TkBTreeLinesTo(NULL, textPtr->end); - TkTextMakeByteIndex(textPtr->sharedTextPtr->tree, NULL, end, 0, - &index); - if (TkTextIndexCmp(indexPtr, &index) > 0) { - return TCL_ERROR; - } + if (TkTextIndexAdjustToStartEnd(textPtr, indexPtr, 1) == TCL_ERROR) { + return TCL_ERROR; } + return TCL_OK; } diff --git a/generic/tkTextWind.c b/generic/tkTextWind.c index c9f34e43..fdd5378f 100644 --- a/generic/tkTextWind.c +++ b/generic/tkTextWind.c @@ -1320,9 +1320,9 @@ EmbWinDelayedUnmap( * index corresponding to the window's position in the text. * * Results: - * The return value is 1 if there is an embedded window by the given name - * in the text widget, 0 otherwise. If the window exists, *indexPtr is - * filled in with its index. + * The return value is TCL_OK if there is an embedded window by the given + * name in the text widget, TCL_ERROR otherwise. If the window exists, + * *indexPtr is filled in with its index. * * Side effects: * None. @@ -1340,19 +1340,30 @@ TkTextWindowIndex( TkTextSegment *ewPtr; if (textPtr == NULL) { - return 0; + return TCL_ERROR; } hPtr = Tcl_FindHashEntry(&textPtr->sharedTextPtr->windowTable, name); if (hPtr == NULL) { - return 0; + return TCL_ERROR; } ewPtr = (TkTextSegment *)Tcl_GetHashValue(hPtr); indexPtr->tree = textPtr->sharedTextPtr->tree; indexPtr->linePtr = ewPtr->body.ew.linePtr; indexPtr->byteIndex = TkTextSegToOffset(ewPtr, indexPtr->linePtr); - return 1; + + /* + * If indexPtr refers to somewhere outside the -startline/-endline + * range limits of the widget, error out since the window indeed is not + * reachable from this text widget (it may be reachable from a peer). + */ + + if (TkTextIndexAdjustToStartEnd(textPtr, indexPtr, 1) == TCL_ERROR) { + return TCL_ERROR; + } + + return TCL_OK; } /* diff --git a/generic/tkTrig.c b/generic/tkTrig.c index a2bf4562..2e11db02 100644 --- a/generic/tkTrig.c +++ b/generic/tkTrig.c @@ -39,9 +39,9 @@ double TkLineToPoint( - double end1Ptr[2], /* Coordinates of first end-point of line. */ - double end2Ptr[2], /* Coordinates of second end-point of line. */ - double pointPtr[2]) /* Points to coords for point. */ + double end1Ptr[], /* Coordinates of first end-point of line. */ + double end2Ptr[], /* Coordinates of second end-point of line. */ + double pointPtr[]) /* Points to coords for point. */ { double x, y; @@ -143,11 +143,11 @@ TkLineToPoint( int TkLineToArea( - double end1Ptr[2], /* X and y coordinates for one endpoint of + double end1Ptr[], /* X and y coordinates for one endpoint of * line. */ - double end2Ptr[2], /* X and y coordinates for other endpoint of + double end2Ptr[], /* X and y coordinates for other endpoint of * line. */ - double rectPtr[4]) /* Points to coords for rectangle, in the + double rectPtr[]) /* Points to coords for rectangle, in the * order x1, y1, x2, y2. X1 must be no larger * than x2, and y1 no larger than y2. */ { @@ -440,7 +440,7 @@ TkPolygonToPoint( * intersect a ray extending vertically * upwards from the point to infinity. */ int count; - register double *pPtr; + double *pPtr; /* * Iterate through all of the edges in the polygon, updating bestDist and @@ -588,7 +588,7 @@ TkPolygonToArea( * polygon: x0, y0, x1, y1, ... The polygon * may be self-intersecting. */ int numPoints, /* Total number of points at *polyPtr. */ - register double *rectPtr) /* Points to coords for rectangle, in the + double *rectPtr) /* Points to coords for rectangle, in the * order x1, y1, x2, y2. X1 and y1 must be * lower-left corner. */ { @@ -596,7 +596,7 @@ TkPolygonToArea( * outside, 1 means inside, won't ever be * 0). */ int count; - register double *pPtr; + double *pPtr; /* * Iterate over all of the edges of the polygon and test them against the @@ -655,14 +655,14 @@ TkPolygonToArea( /* ARGSUSED */ double TkOvalToPoint( - double ovalPtr[4], /* Pointer to array of four coordinates (x1, + double ovalPtr[], /* Pointer to array of four coordinates (x1, * y1, x2, y2) defining oval's bounding * box. */ double width, /* Width of outline for oval. */ int filled, /* Non-zero means oval should be treated as * filled; zero means only consider * outline. */ - double pointPtr[2]) /* Coordinates of point. */ + double pointPtr[]) /* Coordinates of point. */ { double xDelta, yDelta, scaledDistance, distToOutline, distToCenter; double xDiam, yDiam; @@ -751,11 +751,11 @@ TkOvalToPoint( int TkOvalToArea( - register double *ovalPtr, /* Points to coordinates defining the + double *ovalPtr, /* Points to coordinates defining the * bounding rectangle for the oval: x1, y1, * x2, y2. X1 must be less than x2 and y1 less * than y2. */ - register double *rectPtr) /* Points to coords for rectangle, in the + double *rectPtr) /* Points to coords for rectangle, in the * order x1, y1, x2, y2. X1 and y1 must be * lower-left corner. */ { @@ -870,7 +870,7 @@ TkOvalToArea( /* ARGSUSED */ void TkIncludePoint( - register Tk_Item *itemPtr, /* Item whose bounding box is being + Tk_Item *itemPtr, /* Item whose bounding box is being * calculated. */ double *pointPtr) /* Address of two doubles giving x and y * coordinates of point. */ @@ -919,7 +919,7 @@ TkBezierScreenPoints( double control[], /* Array of coordinates for four control * points: x0, y0, x1, y1, ... x3 y3. */ int numSteps, /* Number of curve points to generate. */ - register XPoint *xPointPtr) /* Where to put new points. */ + XPoint *xPointPtr) /* Where to put new points. */ { int i; double u, u2, u3, t, t2, t3; @@ -965,7 +965,7 @@ TkBezierPoints( double control[], /* Array of coordinates for four control * points: x0, y0, x1, y1, ... x3 y3. */ int numSteps, /* Number of curve points to generate. */ - register double *coordPtr) /* Where to put new points. */ + double *coordPtr) /* Where to put new points. */ { int i; double u, u2, u3, t, t2, t3; diff --git a/generic/tkUndo.c b/generic/tkUndo.c index c66905d4..7494332d 100644 --- a/generic/tkUndo.c +++ b/generic/tkUndo.c @@ -94,7 +94,7 @@ TkUndoInsertSeparator( TkUndoAtom *separator; if (*stack!=NULL && (*stack)->type!=TK_UNDO_SEPARATOR) { - separator = ckalloc(sizeof(TkUndoAtom)); + separator = (TkUndoAtom *)ckalloc(sizeof(TkUndoAtom)); separator->type = TK_UNDO_SEPARATOR; TkUndoPushStack(stack,separator); return 1; @@ -181,7 +181,7 @@ TkUndoPushAction( { TkUndoAtom *atom; - atom = ckalloc(sizeof(TkUndoAtom)); + atom = (TkUndoAtom *)ckalloc(sizeof(TkUndoAtom)); atom->type = TK_UNDO_ACTION; atom->apply = apply; atom->revert = revert; @@ -237,7 +237,7 @@ TkUndoMakeCmdSubAtom( Tcl_Panic("NULL command and actionScript in TkUndoMakeCmdSubAtom"); } - atom = ckalloc(sizeof(TkUndoSubAtom)); + atom = (TkUndoSubAtom *)ckalloc(sizeof(TkUndoSubAtom)); atom->command = command; atom->funcPtr = NULL; atom->clientData = NULL; @@ -299,7 +299,7 @@ TkUndoMakeSubAtom( Tcl_Panic("NULL funcPtr in TkUndoMakeSubAtom"); } - atom = ckalloc(sizeof(TkUndoSubAtom)); + atom = (TkUndoSubAtom *)ckalloc(sizeof(TkUndoSubAtom)); atom->command = NULL; atom->funcPtr = funcPtr; atom->clientData = clientData; @@ -341,7 +341,7 @@ TkUndoInitStack( { TkUndoRedoStack *stack; /* An Undo/Redo stack */ - stack = ckalloc(sizeof(TkUndoRedoStack)); + stack = (TkUndoRedoStack *)ckalloc(sizeof(TkUndoRedoStack)); stack->undoStack = NULL; stack->redoStack = NULL; stack->interp = interp; diff --git a/generic/tkUtil.c b/generic/tkUtil.c index 00ac7bea..3cc8dbf0 100644 --- a/generic/tkUtil.c +++ b/generic/tkUtil.c @@ -57,8 +57,7 @@ TkStateParseProc( int flags = PTR2INT(clientData); size_t length; Tcl_Obj *msgObj; - - register Tk_State *statePtr = (Tk_State *) (widgRec + offset); + Tk_State *statePtr = (Tk_State *) (widgRec + offset); if (value == NULL || *value == 0) { *statePtr = TK_STATE_NULL; @@ -134,7 +133,7 @@ TkStatePrintProc( * information about how to reclaim storage * for return string. */ { - register Tk_State *statePtr = (Tk_State *) (widgRec + offset); + Tk_State *statePtr = (Tk_State *) (widgRec + offset); switch (*statePtr) { case TK_STATE_NORMAL: @@ -179,8 +178,7 @@ TkOrientParseProc( { int c; size_t length; - - register int *orientPtr = (int *) (widgRec + offset); + int *orientPtr = (int *) (widgRec + offset); if (value == NULL || *value == 0) { *orientPtr = 0; @@ -237,7 +235,7 @@ TkOrientPrintProc( * information about how to reclaim storage * for return string. */ { - register int *statePtr = (int *) (widgRec + offset); + int *statePtr = (int *) (widgRec + offset); if (*statePtr) { return "vertical"; @@ -424,7 +422,7 @@ TkOffsetPrintProc( if (offsetPtr->flags >= INT_MAX) { return "end"; } - p = ckalloc(32); + p = (char *)ckalloc(32); sprintf(p, "%d", offsetPtr->flags & ~TK_OFFSET_INDEX); *freeProcPtr = TCL_DYNAMIC; return p; @@ -454,7 +452,7 @@ TkOffsetPrintProc( return "se"; } } - q = p = ckalloc(32); + q = p = (char *)ckalloc(32); if (offsetPtr->flags & TK_OFFSET_RELATIVE) { *q++ = '#'; } @@ -519,7 +517,7 @@ TkPixelPrintProc( Tcl_FreeProc **freeProcPtr) /* not used */ { double *doublePtr = (double *) (widgRec + offset); - char *p = ckalloc(24); + char *p = (char *)ckalloc(24); Tcl_PrintDouble(NULL, *doublePtr, p); *freeProcPtr = TCL_DYNAMIC; @@ -1088,7 +1086,7 @@ TkBackgroundEvalObjv( Tcl_Command TkMakeEnsemble( Tcl_Interp *interp, - const char *namespace, + const char *namesp, const char *name, ClientData clientData, const TkEnsemble map[]) @@ -1105,11 +1103,11 @@ TkMakeEnsemble( Tcl_DStringInit(&ds); - namespacePtr = Tcl_FindNamespace(interp, namespace, NULL, 0); + namespacePtr = Tcl_FindNamespace(interp, namesp, NULL, 0); if (namespacePtr == NULL) { - namespacePtr = Tcl_CreateNamespace(interp, namespace, NULL, NULL); + namespacePtr = Tcl_CreateNamespace(interp, namesp, NULL, NULL); if (namespacePtr == NULL) { - Tcl_Panic("failed to create namespace \"%s\"", namespace); + Tcl_Panic("failed to create namespace \"%s\"", namesp); } } @@ -1125,8 +1123,8 @@ TkMakeEnsemble( } Tcl_DStringSetLength(&ds, 0); - Tcl_DStringAppend(&ds, namespace, -1); - if (!(strlen(namespace) == 2 && namespace[1] == ':')) { + Tcl_DStringAppend(&ds, namesp, -1); + if (!(strlen(namesp) == 2 && namesp[1] == ':')) { Tcl_DStringAppend(&ds, "::", -1); } Tcl_DStringAppend(&ds, name, -1); @@ -1188,11 +1186,13 @@ TkSendVirtualEvent( event.general.xany.display = Tk_Display(target); event.virt.name = Tk_GetUid(eventName); event.virt.user_data = detail; + if (detail) Tcl_IncrRefCount(detail); // Event code will DecrRefCount Tk_QueueWindowEvent(&event.general, TCL_QUEUE_TAIL); } -#if TCL_UTF_MAX <= 4 +/* Tcl 8.6 has a different definition of Tcl_UniChar than other Tcl versions for TCL_UTF_MAX > 3 */ +#if TCL_UTF_MAX <= (3 + (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION == 6)) /* *--------------------------------------------------------------------------- * @@ -1221,11 +1221,11 @@ TkUtfToUniChar( Tcl_UniChar uniChar = 0; int len = Tcl_UtfToUniChar(src, &uniChar); - if ((sizeof(Tcl_UniChar) == 2) && ((uniChar & 0xFC00) == 0xD800)) { + if ((uniChar & 0xFC00) == 0xD800) { Tcl_UniChar low = uniChar; - /* This can only happen if Tcl is compiled with TCL_UTF_MAX=4, - * or when a high surrogate character is detected in UTF-8 form */ - int len2 = Tcl_UtfToUniChar(src+len, &low); + /* This can only happen if sizeof(Tcl_UniChar)== 2 and src points + * to a character > U+FFFF */ + size_t len2 = Tcl_UtfToUniChar(src+len, &low); if ((low & 0xFC00) == 0xDC00) { *chPtr = (((uniChar & 0x3FF) << 10) | (low & 0x3FF)) + 0x10000; return len + len2; @@ -1256,7 +1256,7 @@ TkUtfToUniChar( int TkUniCharToUtf(int ch, char *buf) { - if ((sizeof(Tcl_UniChar) == 2) && (((unsigned)(ch - 0x10000) <= 0xFFFFF))) { + if ((unsigned)(ch - 0x10000) <= 0xFFFFF) { /* Spit out a 4-byte UTF-8 character or 2 x 3-byte UTF-8 characters, depending on Tcl * version and/or TCL_UTF_MAX build value */ int len = Tcl_UniCharToUtf(0xD800 | ((ch - 0x10000) >> 10), buf); @@ -1333,7 +1333,6 @@ TkUtfAtIndex( return p; } #endif - /* * Local Variables: * mode: c diff --git a/generic/tkVisual.c b/generic/tkVisual.c index 567c5520..93244996 100644 --- a/generic/tkVisual.c +++ b/generic/tkVisual.c @@ -96,10 +96,10 @@ Tk_GetVisual( * Tk_FreeColormap. */ { Tk_Window tkwin2; - XVisualInfo template, *visInfoList, *bestPtr; + XVisualInfo templ, *visInfoList, *bestPtr; long mask; Visual *visual; - ptrdiff_t length; + size_t length; int c, numVisuals, prio, bestPrio, i; const char *p; const VisualDictionary *dictPtr; @@ -137,20 +137,20 @@ Tk_GetVisual( for (cmapPtr = dispPtr->cmapPtr; cmapPtr != NULL; cmapPtr = cmapPtr->nextPtr) { if (cmapPtr->colormap == *colormapPtr) { - cmapPtr->refCount += 1; + cmapPtr->refCount++; break; } } } return visual; } - template.depth = Tk_Depth(tkwin2); - template.c_class = visual->c_class; - template.red_mask = visual->red_mask; - template.green_mask = visual->green_mask; - template.blue_mask = visual->blue_mask; - template.colormap_size = visual->map_entries; - template.bits_per_rgb = visual->bits_per_rgb; + templ.depth = Tk_Depth(tkwin2); + templ.c_class = visual->c_class; + templ.red_mask = visual->red_mask; + templ.green_mask = visual->green_mask; + templ.blue_mask = visual->blue_mask; + templ.colormap_size = visual->map_entries; + templ.bits_per_rgb = visual->bits_per_rgb; mask = VisualDepthMask|VisualClassMask|VisualRedMaskMask |VisualGreenMaskMask|VisualBlueMaskMask|VisualColormapSizeMask |VisualBitsPerRGBMask; @@ -178,7 +178,7 @@ Tk_GetVisual( Tcl_SetErrorCode(interp, "TK", "VALUE", "VISUALID", NULL); return NULL; } - template.visualid = visualId; + templ.visualid = visualId; mask = VisualIDMask; } else { /* @@ -192,16 +192,15 @@ Tk_GetVisual( } } length = p - string; - template.c_class = -1; + templ.c_class = -1; for (dictPtr = visualNames; dictPtr->name != NULL; dictPtr++) { - if ((dictPtr->name[0] == c) && (length >= dictPtr->minLength) - && (strncmp(string, dictPtr->name, - (size_t) length) == 0)) { - template.c_class = dictPtr->c_class; + if ((dictPtr->name[0] == c) && (length >= (size_t)dictPtr->minLength) + && (strncmp(string, dictPtr->name, length) == 0)) { + templ.c_class = dictPtr->c_class; break; } } - if (template.c_class == -1) { + if (templ.c_class == -1) { Tcl_Obj *msgObj = Tcl_ObjPrintf( "unknown or ambiguous visual name \"%s\": class must be ", string); @@ -218,8 +217,8 @@ Tk_GetVisual( p++; } if (*p == 0) { - template.depth = 10000; - } else if (Tcl_GetInt(interp, p, &template.depth) != TCL_OK) { + templ.depth = 10000; + } else if (Tcl_GetInt(interp, p, &templ.depth) != TCL_OK) { return NULL; } if (c == 'b') { @@ -234,9 +233,9 @@ Tk_GetVisual( * an error if there are none that match. */ - template.screen = Tk_ScreenNumber(tkwin); + templ.screen = Tk_ScreenNumber(tkwin); mask |= VisualScreenMask; - visInfoList = XGetVisualInfo(Tk_Display(tkwin), mask, &template, + visInfoList = XGetVisualInfo(Tk_Display(tkwin), mask, &templ, &numVisuals); if (visInfoList == NULL) { Tcl_SetObjResult(interp, Tcl_NewStringObj( @@ -286,11 +285,11 @@ Tk_GetVisual( goto newBest; } if (visInfoList[i].depth < bestPtr->depth) { - if (visInfoList[i].depth >= template.depth) { + if (visInfoList[i].depth >= templ.depth) { goto newBest; } } else if (visInfoList[i].depth > bestPtr->depth) { - if (bestPtr->depth < template.depth) { + if (bestPtr->depth < templ.depth) { goto newBest; } } else { @@ -324,11 +323,11 @@ Tk_GetVisual( cmapPtr = cmapPtr->nextPtr) { if (cmapPtr->shareable && (cmapPtr->visual == visual)) { *colormapPtr = cmapPtr->colormap; - cmapPtr->refCount += 1; + cmapPtr->refCount++; goto done; } } - cmapPtr = ckalloc(sizeof(TkColormap)); + cmapPtr = (TkColormap *)ckalloc(sizeof(TkColormap)); cmapPtr->colormap = XCreateColormap(Tk_Display(tkwin), RootWindowOfScreen(Tk_Screen(tkwin)), visual, AllocNone); @@ -383,7 +382,7 @@ Tk_GetColormap( */ if (strcmp(string, "new") == 0) { - cmapPtr = ckalloc(sizeof(TkColormap)); + cmapPtr = (TkColormap *)ckalloc(sizeof(TkColormap)); cmapPtr->colormap = XCreateColormap(Tk_Display(tkwin), RootWindowOfScreen(Tk_Screen(tkwin)), Tk_Visual(tkwin), AllocNone); @@ -427,7 +426,7 @@ Tk_GetColormap( for (cmapPtr = dispPtr->cmapPtr; cmapPtr != NULL; cmapPtr = cmapPtr->nextPtr) { if (cmapPtr->colormap == colormap) { - cmapPtr->refCount += 1; + cmapPtr->refCount++; } } return colormap; @@ -476,8 +475,7 @@ Tk_FreeColormap( for (prevPtr = NULL, cmapPtr = dispPtr->cmapPtr; cmapPtr != NULL; prevPtr = cmapPtr, cmapPtr = cmapPtr->nextPtr) { if (cmapPtr->colormap == colormap) { - cmapPtr->refCount -= 1; - if (cmapPtr->refCount == 0) { + if (cmapPtr->refCount-- <= 1) { XFreeColormap(display, colormap); if (prevPtr == NULL) { dispPtr->cmapPtr = cmapPtr->nextPtr; @@ -534,7 +532,7 @@ Tk_PreserveColormap( for (cmapPtr = dispPtr->cmapPtr; cmapPtr != NULL; cmapPtr = cmapPtr->nextPtr) { if (cmapPtr->colormap == colormap) { - cmapPtr->refCount += 1; + cmapPtr->refCount++; return; } } diff --git a/generic/tkWindow.c b/generic/tkWindow.c index 92c40180..f48e4695 100644 --- a/generic/tkWindow.c +++ b/generic/tkWindow.c @@ -93,6 +93,7 @@ static const XSetWindowAttributes defAtts= { #define PASSMAINWINDOW 2 #define WINMACONLY 4 #define USEINITPROC 8 +#define SAVEUPDATECMD 16 /* better only be one of these! */ typedef int (TkInitProc)(Tcl_Interp *interp, ClientData clientData); typedef struct { @@ -126,7 +127,7 @@ static const TkCmd commands[] = { {"selection", Tk_SelectionObjCmd, PASSMAINWINDOW}, {"tk", (Tcl_ObjCmdProc *)(void *)TkInitTkCmd, USEINITPROC|PASSMAINWINDOW|ISSAFE}, {"tkwait", Tk_TkwaitObjCmd, PASSMAINWINDOW|ISSAFE}, - {"update", Tk_UpdateObjCmd, PASSMAINWINDOW|ISSAFE}, + {"update", Tk_UpdateObjCmd, PASSMAINWINDOW|ISSAFE|SAVEUPDATECMD}, {"winfo", Tk_WinfoObjCmd, PASSMAINWINDOW|ISSAFE}, {"wm", Tk_WmObjCmd, PASSMAINWINDOW}, @@ -316,8 +317,8 @@ CreateTopLevelWindow( * parent. */ unsigned int flags) /* Additional flags to set on the window. */ { - register TkWindow *winPtr; - register TkDisplay *dispPtr; + TkWindow *winPtr; + TkDisplay *dispPtr; int screenId; ThreadSpecificData *tsdPtr = Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); @@ -419,7 +420,7 @@ GetScreen( * DISPLAY envariable. */ int *screenPtr) /* Where to store screen number. */ { - register TkDisplay *dispPtr; + TkDisplay *dispPtr; const char *p; int screenId; size_t length; @@ -620,7 +621,7 @@ TkAllocWindow( * inherit visual information. NULL means use * screen defaults instead of inheriting. */ { - register TkWindow *winPtr = ckalloc(sizeof(TkWindow)); + TkWindow *winPtr = ckalloc(sizeof(TkWindow)); winPtr->display = dispPtr->display; winPtr->dispPtr = dispPtr; @@ -701,7 +702,7 @@ TkAllocWindow( static int NameWindow( Tcl_Interp *interp, /* Interpreter to use for error reporting. */ - register TkWindow *winPtr, /* Window that is to be named and inserted. */ + TkWindow *winPtr, /* Window that is to be named and inserted. */ TkWindow *parentPtr, /* Pointer to logical parent for winPtr (used * for naming, options, etc.). */ const char *name) /* Name for winPtr; must be unique among @@ -832,9 +833,9 @@ TkCreateMainWindow( Tk_Window tkwin; int dummy, isSafe; Tcl_HashEntry *hPtr; - register TkMainInfo *mainPtr; - register TkWindow *winPtr; - register const TkCmd *cmdPtr; + TkMainInfo *mainPtr; + TkWindow *winPtr; + const TkCmd *cmdPtr; ClientData clientData; ThreadSpecificData *tsdPtr = Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); @@ -880,6 +881,7 @@ TkCreateMainWindow( Tcl_InitHashTable(&mainPtr->imageTable, TCL_STRING_KEYS); mainPtr->strictMotif = 0; mainPtr->alwaysShowSelection = 0; + mainPtr->tclUpdateObjProc = NULL; if (Tcl_LinkVar(interp, "tk_strictMotif", (char *) &mainPtr->strictMotif, TCL_LINK_BOOLEAN) != TCL_OK) { Tcl_ResetResult(interp); @@ -919,6 +921,8 @@ TkCreateMainWindow( isSafe = Tcl_IsSafe(interp); for (cmdPtr = commands; cmdPtr->name != NULL; cmdPtr++) { + Tcl_CmdInfo cmdInfo; + if (cmdPtr->objProc == NULL) { Tcl_Panic("TkCreateMainWindow: builtin command with NULL string and object procs"); } @@ -938,6 +942,11 @@ TkCreateMainWindow( } else { clientData = NULL; } + if ((cmdPtr->flags & SAVEUPDATECMD) && + Tcl_GetCommandInfo(interp, cmdPtr->name, &cmdInfo) && + cmdInfo.isNativeObjectProc && !cmdInfo.objClientData && !cmdInfo.deleteProc) { + mainPtr->tclUpdateObjProc = cmdInfo.objProc; + } if (cmdPtr->flags & USEINITPROC) { ((TkInitProc *)(void *)cmdPtr->objProc)(interp, clientData); } else { @@ -1272,7 +1281,7 @@ Tk_DestroyWindow( /* * Some cleanup needs to be done immediately, rather than later, because - * it needs information that will be destoyed before we get to the main + * it needs information that will be destroyed before we get to the main * cleanup point. For example, TkFocusDeadWindow needs to access the * parentPtr field from a window, but if a Destroy event handler deletes * the window's parent this field will be NULL before the main cleanup @@ -1488,7 +1497,7 @@ Tk_DestroyWindow( winPtr->mainPtr->deletionEpoch++; } if (winPtr->mainPtr->refCount-- <= 1) { - register const TkCmd *cmdPtr; + const TkCmd *cmdPtr; /* * We just deleted the last window in the application. Delete the @@ -1502,10 +1511,20 @@ Tk_DestroyWindow( */ if ((winPtr->mainPtr->interp != NULL) && - !Tcl_InterpDeleted(winPtr->mainPtr->interp)) { + !Tcl_InterpDeleted(winPtr->mainPtr->interp)) { for (cmdPtr = commands; cmdPtr->name != NULL; cmdPtr++) { - Tcl_CreateObjCommand(winPtr->mainPtr->interp, cmdPtr->name, - TkDeadAppObjCmd, NULL, NULL); + if ((cmdPtr->flags & SAVEUPDATECMD) && + winPtr->mainPtr->tclUpdateObjProc != NULL) { + /* Restore Tcl's version of [update] */ + Tcl_CreateObjCommand(winPtr->mainPtr->interp, + cmdPtr->name, + winPtr->mainPtr->tclUpdateObjProc, + NULL, NULL); + } else { + Tcl_CreateObjCommand(winPtr->mainPtr->interp, + cmdPtr->name, TkDeadAppObjCmd, + NULL, NULL); + } } Tcl_CreateObjCommand(winPtr->mainPtr->interp, "send", TkDeadAppObjCmd, NULL, NULL); @@ -1675,7 +1694,7 @@ void Tk_MakeWindowExist( Tk_Window tkwin) /* Token for window. */ { - register TkWindow *winPtr = (TkWindow *) tkwin; + TkWindow *winPtr = (TkWindow *) tkwin; TkWindow *winPtr2; Window parent; Tcl_HashEntry *hPtr; @@ -1784,7 +1803,7 @@ void Tk_UnmapWindow( Tk_Window tkwin) /* Token for window to unmap. */ { - register TkWindow *winPtr = (TkWindow *) tkwin; + TkWindow *winPtr = (TkWindow *) tkwin; if (!(winPtr->flags & TK_MAPPED) || (winPtr->flags & TK_ALREADY_DEAD)) { return; @@ -1821,7 +1840,7 @@ Tk_ConfigureWindow( * are to be used. */ XWindowChanges *valuePtr) /* New values. */ { - register TkWindow *winPtr = (TkWindow *) tkwin; + TkWindow *winPtr = (TkWindow *) tkwin; if (valueMask & CWX) { winPtr->changes.x = valuePtr->x; @@ -1857,7 +1876,7 @@ Tk_MoveWindow( Tk_Window tkwin, /* Window to move. */ int x, int y) /* New location for window (within parent). */ { - register TkWindow *winPtr = (TkWindow *) tkwin; + TkWindow *winPtr = (TkWindow *) tkwin; winPtr->changes.x = x; winPtr->changes.y = y; @@ -1875,7 +1894,7 @@ Tk_ResizeWindow( Tk_Window tkwin, /* Window to resize. */ int width, int height) /* New dimensions for window. */ { - register TkWindow *winPtr = (TkWindow *) tkwin; + TkWindow *winPtr = (TkWindow *) tkwin; winPtr->changes.width = (unsigned) width; winPtr->changes.height = (unsigned) height; @@ -1895,7 +1914,7 @@ Tk_MoveResizeWindow( int x, int y, /* New location for window (within parent). */ int width, int height) /* New dimensions for window. */ { - register TkWindow *winPtr = (TkWindow *) tkwin; + TkWindow *winPtr = (TkWindow *) tkwin; winPtr->changes.x = x; winPtr->changes.y = y; @@ -1916,7 +1935,7 @@ Tk_SetWindowBorderWidth( Tk_Window tkwin, /* Window to modify. */ int width) /* New border width for window. */ { - register TkWindow *winPtr = (TkWindow *) tkwin; + TkWindow *winPtr = (TkWindow *) tkwin; winPtr->changes.border_width = width; if (winPtr->window != None) { @@ -1934,10 +1953,10 @@ Tk_ChangeWindowAttributes( Tk_Window tkwin, /* Window to manipulate. */ unsigned long valueMask, /* OR'ed combination of bits, indicating which * fields of *attsPtr are to be used. */ - register XSetWindowAttributes *attsPtr) + XSetWindowAttributes *attsPtr) /* New values for some attributes. */ { - register TkWindow *winPtr = (TkWindow *) tkwin; + TkWindow *winPtr = (TkWindow *) tkwin; if (valueMask & CWBackPixmap) { winPtr->atts.background_pixmap = attsPtr->background_pixmap; @@ -2000,7 +2019,7 @@ Tk_SetWindowBackground( unsigned long pixel) /* Pixel value to use for window's * background. */ { - register TkWindow *winPtr = (TkWindow *) tkwin; + TkWindow *winPtr = (TkWindow *) tkwin; winPtr->atts.background_pixel = pixel; @@ -2017,7 +2036,7 @@ Tk_SetWindowBackgroundPixmap( Tk_Window tkwin, /* Window to manipulate. */ Pixmap pixmap) /* Pixmap to use for window's background. */ { - register TkWindow *winPtr = (TkWindow *) tkwin; + TkWindow *winPtr = (TkWindow *) tkwin; winPtr->atts.background_pixmap = pixmap; @@ -2035,7 +2054,7 @@ Tk_SetWindowBorder( Tk_Window tkwin, /* Window to manipulate. */ unsigned long pixel) /* Pixel value to use for window's border. */ { - register TkWindow *winPtr = (TkWindow *) tkwin; + TkWindow *winPtr = (TkWindow *) tkwin; winPtr->atts.border_pixel = pixel; @@ -2052,7 +2071,7 @@ Tk_SetWindowBorderPixmap( Tk_Window tkwin, /* Window to manipulate. */ Pixmap pixmap) /* Pixmap to use for window's border. */ { - register TkWindow *winPtr = (TkWindow *) tkwin; + TkWindow *winPtr = (TkWindow *) tkwin; winPtr->atts.border_pixmap = pixmap; @@ -2070,7 +2089,7 @@ Tk_DefineCursor( Tk_Window tkwin, /* Window to manipulate. */ Tk_Cursor cursor) /* Cursor to use for window (may be None). */ { - register TkWindow *winPtr = (TkWindow *) tkwin; + TkWindow *winPtr = (TkWindow *) tkwin; #if defined(MAC_OSX_TK) winPtr->atts.cursor = (XCursor) cursor; @@ -2097,7 +2116,7 @@ Tk_SetWindowColormap( Tk_Window tkwin, /* Window to manipulate. */ Colormap colormap) /* Colormap to use for window. */ { - register TkWindow *winPtr = (TkWindow *) tkwin; + TkWindow *winPtr = (TkWindow *) tkwin; winPtr->atts.colormap = colormap; @@ -2139,7 +2158,7 @@ Tk_SetWindowVisual( int depth, /* New depth for window. */ Colormap colormap) /* An appropriate colormap for the visual. */ { - register TkWindow *winPtr = (TkWindow *) tkwin; + TkWindow *winPtr = (TkWindow *) tkwin; if (winPtr->window != None) { /* Too late! */ @@ -2182,7 +2201,7 @@ Tk_SetWindowVisual( void TkDoConfigureNotify( - register TkWindow *winPtr) /* Window whose configuration was just + TkWindow *winPtr) /* Window whose configuration was just * changed. */ { XEvent event; @@ -2228,7 +2247,7 @@ Tk_SetClass( Tk_Window tkwin, /* Token for window to assign class. */ const char *className) /* New class for tkwin. */ { - register TkWindow *winPtr = (TkWindow *) tkwin; + TkWindow *winPtr = (TkWindow *) tkwin; winPtr->classUid = Tk_GetUid(className); if (winPtr->flags & TK_WIN_MANAGED) { @@ -2261,7 +2280,7 @@ Tk_SetClassProcs( const Tk_ClassProcs *procs, /* Class procs structure. */ ClientData instanceData) /* Data to be passed to class functions. */ { - register TkWindow *winPtr = (TkWindow *) tkwin; + TkWindow *winPtr = (TkWindow *) tkwin; winPtr->classProcsPtr = procs; winPtr->instanceData = instanceData; diff --git a/generic/ttk/ttkGenStubs.tcl b/generic/ttk/ttkGenStubs.tcl index 6aabd613..af8a2a5f 100644 --- a/generic/ttk/ttkGenStubs.tcl +++ b/generic/ttk/ttkGenStubs.tcl @@ -4,7 +4,7 @@ # interface. # # -# Copyright (c) 1998-1999 by Scriptics Corporation. +# Copyright (c) 1998-1999 Scriptics Corporation. # Copyright (c) 2007 Daniel A. Steffen # # See the file "license.terms" for information on usage and redistribution @@ -248,8 +248,9 @@ proc genStubs::rewriteFile {file text} { return } set in [open ${file} r] + fconfigure $in -eofchar "\032 {}" -encoding utf-8 set out [open ${file}.new w] - fconfigure $out -translation lf + fconfigure $out -translation lf -encoding utf-8 while {![eof $in]} { set line [gets $in] @@ -688,7 +689,7 @@ proc genStubs::makeInit {name decl index} { # have the interface name, the declaration, and # the index appended. # guardProc The proc to invoke to add guards. It will have -# the slot status and text appended. +# the slot status and text appended. # textVar The variable to use for output. # skipString The string to emit if a slot is skipped. This # string will be subst'ed in the loop so "$i" can @@ -973,7 +974,7 @@ proc genStubs::init {} { set outDir [lindex $argv 0] foreach file [lrange $argv 1 end] { - source $file + source -encoding utf-8 $file } foreach name [lsort [array names interfaces]] { diff --git a/generic/ttk/ttkWidget.c b/generic/ttk/ttkWidget.c index 0cfc1198..f5bfb4d1 100644 --- a/generic/ttk/ttkWidget.c +++ b/generic/ttk/ttkWidget.c @@ -8,10 +8,6 @@ #include "ttkTheme.h" #include "ttkWidget.h" -#ifdef MAC_OSX_TK -#define TK_NO_DOUBLE_BUFFERING 1 -#endif - /*------------------------------------------------------------------------ * +++ Internal helper routines. */ diff --git a/library/demos/cscroll.tcl b/library/demos/cscroll.tcl index d210c7df..c88bfa9f 100644 --- a/library/demos/cscroll.tcl +++ b/library/demos/cscroll.tcl @@ -114,7 +114,7 @@ if {[tk windowingsystem] eq "x11" && ![package vsatisfies [package provide Tk] 8 # Support for mousewheels on Linux/Unix commonly comes through mapping # the wheel to the extended buttons. If you have a mousewheel, find # Linux configuration info at: - # http://linuxreviews.org/howtos/xfree/mouse/ + # https://linuxreviews.org/HOWTO_change_the_mouse_speed_in_X bind $c { if {!$tk_strictMotif} { %W yview scroll -5 units diff --git a/library/demos/menu.tcl b/library/demos/menu.tcl index 62991f3e..244361d0 100644 --- a/library/demos/menu.tcl +++ b/library/demos/menu.tcl @@ -134,6 +134,8 @@ menu $m -tearoff 0 foreach i {{An entry} {Another entry} {Does nothing} {Does almost nothing} {Make life meaningful}} { $m add command -label $i -command [list puts "You invoked \"$i\""] } +set emojiLabel [encoding convertfrom utf-8 "\xF0\x9F\x98\x8D Make friends"] +$m add command -label $emojiLabel -command [list puts "Menu labels can include non-BMP characters."] $m entryconfigure "Does almost nothing" -bitmap questhead -compound left \ -command [list \ tk_dialog $w.compound {Compound Menu Entry} \ diff --git a/library/demos/widget b/library/demos/widget index 58da12fd..13b8d0eb 100644 --- a/library/demos/widget +++ b/library/demos/widget @@ -624,7 +624,7 @@ proc showCode w { wm title $top [mc "Demo code: %s" [file join $tk_demoDirectory $file]] wm iconname $top $file set id [open [file join $tk_demoDirectory $file]] - fconfigure $id -encoding utf-8 -eofchar \032 + fconfigure $id -encoding utf-8 -eofchar "\032 {}" $top.f.text delete 1.0 end $top.f.text insert 1.0 [read $id] $top.f.text mark set insert 1.0 diff --git a/library/fontchooser.tcl b/library/fontchooser.tcl index 9d49c574..fb6c6d3b 100644 --- a/library/fontchooser.tcl +++ b/library/fontchooser.tcl @@ -247,6 +247,7 @@ proc ::tk::fontchooser::Create {} { grid $S(W).lfonts x $S(W).lstyles x $S(W).lsizes x ^ -in $outer -sticky news grid $WE x $WS - - x ^ -in $outer -sticky news -pady {15 30} grid configure $bbox -sticky n + grid rowconfigure $outer 2 -weight 1 grid columnconfigure $outer {1 3 5} -minsize $minsize(gap) grid columnconfigure $outer {0 2 4} -weight 1 grid columnconfigure $outer 0 -minsize $minsize(fonts) diff --git a/library/icons.tcl b/library/icons.tcl index e53a1bdf..87af75a4 100644 --- a/library/icons.tcl +++ b/library/icons.tcl @@ -4,7 +4,7 @@ # were provided by the Tango Desktop project which provides a # unified set of high quality icons licensed under the # Creative Commons Attribution Share-Alike license -# (http://creativecommons.org/licenses/by-sa/3.0/) +# (https://creativecommons.org/licenses/by-sa/3.0/) # # See http://tango.freedesktop.org/Tango_Desktop_Project # diff --git a/library/listbox.tcl b/library/listbox.tcl index 9e628a83..44abfb94 100644 --- a/library/listbox.tcl +++ b/library/listbox.tcl @@ -214,7 +214,7 @@ if {[tk windowingsystem] eq "x11"} { # Support for mousewheels on Linux/Unix commonly comes through mapping # the wheel to the extended buttons. If you have a mousewheel, find # Linux configuration info at: - # http://linuxreviews.org/howtos/xfree/mouse/ + # https://linuxreviews.org/HOWTO_change_the_mouse_speed_in_X bind Listbox <4> { if {!$tk_strictMotif} { %W yview scroll -5 units @@ -296,7 +296,7 @@ proc ::tk::ListboxMotion {w el} { } extended { set i $Priv(listboxPrev) - if {$i eq ""} { + if {$i < 0} { set i $el $w selection set $el } diff --git a/library/menu.tcl b/library/menu.tcl index c4991f81..823fd693 100644 --- a/library/menu.tcl +++ b/library/menu.tcl @@ -6,7 +6,7 @@ # # Copyright (c) 1992-1994 The Regents of the University of California. # Copyright (c) 1994-1997 Sun Microsystems, Inc. -# Copyright (c) 1998-1999 by Scriptics Corporation. +# Copyright (c) 1998-1999 Scriptics Corporation. # Copyright (c) 2007 Daniel A. Steffen # # See the file "license.terms" for information on usage and redistribution @@ -269,8 +269,8 @@ proc ::tk::MbPost {w {x {}} {y {}}} { MenuUnpost {} } if {$::tk_strictMotif} { - set Priv(cursor) [$w cget -cursor] - $w configure -cursor arrow + set Priv(cursor) [$w cget -cursor] + $w configure -cursor arrow } if {[tk windowingsystem] ne "aqua"} { set Priv(relief) [$w cget -relief] @@ -343,7 +343,7 @@ proc ::tk::MenuUnpost menu { $menu unpost set Priv(postedMb) {} if {$::tk_strictMotif} { - $mb configure -cursor $Priv(cursor) + $mb configure -cursor $Priv(cursor) } if {[tk windowingsystem] ne "aqua"} { $mb configure -relief $Priv(relief) @@ -475,7 +475,7 @@ proc ::tk::MbButtonUp w { proc ::tk::MenuMotion {menu x y state} { variable ::tk::Priv if {$menu eq $Priv(window)} { - set activeindex [$menu index active] + set active [$menu index active] if {[$menu cget -type] eq "menubar"} { if {[info exists Priv(focus)] && $menu ne $Priv(focus)} { $menu activate @$x,$y @@ -485,24 +485,24 @@ proc ::tk::MenuMotion {menu x y state} { $menu activate @$x,$y GenerateMenuSelect $menu } - set index [$menu index @$x,$y] - if {[info exists Priv(menuActivated)] \ - && $index ne "none" \ - && $index ne $activeindex} { - set mode [option get $menu clickToFocus ClickToFocus] - if {[string is false $mode]} { - set delay [expr {[$menu cget -type] eq "menubar" ? 0 : 50}] - if {[$menu type $index] eq "cascade"} { - # Catch these postcascade commands since the menu could be - # destroyed before they run. - set Priv(menuActivatedTimer) \ - [after $delay "catch {$menu postcascade active}"] - } else { - set Priv(menuDeactivatedTimer) \ - [after $delay "catch {$menu postcascade none}"] - } - } - } + set index [$menu index @$x,$y] + if {[info exists Priv(menuActivated)] \ + && $index ne "none" \ + && $index ne $active} { + set mode [option get $menu clickToFocus ClickToFocus] + if {[string is false $mode]} { + set delay [expr {[$menu cget -type] eq "menubar" ? 0 : 50}] + if {[$menu type $index] eq "cascade"} { + # Catch these postcascade commands since the menu could be + # destroyed before they run. + set Priv(menuActivatedTimer) \ + [after $delay "catch {$menu postcascade active}"] + } else { + set Priv(menuDeactivatedTimer) \ + [after $delay "catch {$menu postcascade none}"] + } + } + } } } @@ -525,13 +525,13 @@ proc ::tk::MenuButtonDown menu { variable ::tk::Priv if {![winfo viewable $menu]} { - return + return } if {[$menu index active] eq "none"} { - if {[$menu cget -type] ne "menubar" } { - set Priv(window) {} - } - return + if {[$menu cget -type] ne "menubar" } { + set Priv(window) {} + } + return } $menu postcascade active if {$Priv(postedMb) ne "" && [winfo viewable $Priv(postedMb)]} { @@ -552,7 +552,7 @@ proc ::tk::MenuButtonDown menu { if {[$menu type active] eq "cascade"} { set Priv(menuActivated) 1 } - } + } # Don't update grab information if the grab window isn't changing. # Otherwise, we'll get an error when we unpost the menus and @@ -893,7 +893,7 @@ proc ::tk::MenuFind {w char} { foreach child $windowlist { # Don't descend into other toplevels. - if {[winfo toplevel $w] ne [winfo toplevel $child]} { + if {[winfo toplevel $w] ne [winfo toplevel $child]} { continue } if {[winfo class $child] eq "Menu" && \ @@ -919,7 +919,7 @@ proc ::tk::MenuFind {w char} { foreach child $windowlist { # Don't descend into other toplevels. - if {[winfo toplevel $w] ne [winfo toplevel $child]} { + if {[winfo toplevel $w] ne [winfo toplevel $child]} { continue } switch -- [winfo class $child] { @@ -941,7 +941,7 @@ proc ::tk::MenuFind {w char} { } } } - return {} + return "" } # ::tk::TraverseToMenu -- @@ -1115,7 +1115,7 @@ proc ::tk::MenuFindName {menu s} { } set last [$menu index last] if {$last eq "none"} { - return + return "" } for {set i 0} {$i <= $last} {incr i} { if {![catch {$menu entrycget $i -label} label]} { @@ -1186,7 +1186,7 @@ if {[tk windowingsystem] eq "aqua"} { # if we go offscreen to the top, show as 'below' if {$y < [winfo vrooty $button]} { set y [expr {[winfo vrooty $button] + [winfo rooty $button]\ - + [winfo reqheight $button]}] + + [winfo reqheight $button]}] } set entry {} } @@ -1340,14 +1340,12 @@ proc ::tk_menuSetFocus {menu} { proc ::tk::GenerateMenuSelect {menu} { variable ::tk::Priv - if {$Priv(activeMenu) eq $menu \ - && $Priv(activeItem) eq [$menu index active]} { - return + if {$Priv(activeMenu) ne $menu \ + || $Priv(activeItem) ne [$menu index active]} { + set Priv(activeMenu) $menu + set Priv(activeItem) [$menu index active] + event generate $menu <> } - - set Priv(activeMenu) $menu - set Priv(activeItem) [$menu index active] - event generate $menu <> } # ::tk_popup -- @@ -1369,7 +1367,7 @@ proc ::tk_popup {menu x y {entry {}}} { } tk::PostOverPoint $menu $x $y $entry if {[tk windowingsystem] eq "x11" && [winfo viewable $menu]} { - tk::SaveGrabInfo $menu + tk::SaveGrabInfo $menu grab -global $menu set Priv(popup) $menu set Priv(window) $menu diff --git a/library/tearoff.tcl b/library/tearoff.tcl index dece4dff..96e275f2 100644 --- a/library/tearoff.tcl +++ b/library/tearoff.tcl @@ -79,11 +79,11 @@ proc ::tk::TearOffMenu {w {x 0} {y 0}} { } if {[tk windowingsystem] eq "win32"} { - # [Bug 3181181]: Find the toplevel window for the menu - set parent [winfo toplevel $parent] - while {[winfo class $parent] eq "Menu"} { - set parent [winfo toplevel [winfo parent $parent]] - } + # [Bug 3181181]: Find the toplevel window for the menu + set parent [winfo toplevel $parent] + while {[winfo class $parent] eq "Menu"} { + set parent [winfo toplevel [winfo parent $parent]] + } wm transient $menu [winfo toplevel $parent] wm attributes $menu -toolwindow 1 } @@ -135,7 +135,7 @@ proc ::tk::MenuDup {src dst type} { } eval $cmd set last [$src index last] - if {$last eq "none"} { + if {$last eq "none" || $last < 0} { return } for {set i [$src cget -tearoff]} {$i <= $last} {incr i} { diff --git a/library/text.tcl b/library/text.tcl index ec8f3d35..d1f9b864 100644 --- a/library/text.tcl +++ b/library/text.tcl @@ -499,7 +499,7 @@ if {[tk windowingsystem] eq "x11"} { # Support for mousewheels on Linux/Unix commonly comes through mapping # the wheel to the extended buttons. If you have a mousewheel, find # Linux configuration info at: - # http://linuxreviews.org/howtos/xfree/mouse/ + # https://linuxreviews.org/HOWTO_change_the_mouse_speed_in_X bind Text <4> { if {!$tk_strictMotif} { %W yview scroll -50 pixels diff --git a/library/tk.tcl b/library/tk.tcl index 0715489d..5bb3be71 100644 --- a/library/tk.tcl +++ b/library/tk.tcl @@ -11,7 +11,7 @@ # this file, and for a DISCLAIMER OF ALL WARRANTIES. # Verify that we have Tk binary and script components from the same release -package require -exact Tk 8.6.11 +package require -exact Tk 8.6.12 # Create a ::tk namespace namespace eval ::tk { @@ -460,7 +460,7 @@ switch -exact -- [tk windowingsystem] { event add <> # Official bindings - # See http://support.apple.com/kb/HT1343 + # See https://support.apple.com/en-us/HT201236 event add <> event add <> event add <> diff --git a/library/ttk/aquaTheme.tcl b/library/ttk/aquaTheme.tcl index 3ccdd70d..876423ff 100644 --- a/library/ttk/aquaTheme.tcl +++ b/library/ttk/aquaTheme.tcl @@ -42,6 +42,9 @@ namespace eval ttk::theme::aqua { # so we only need to specify !focus.) # Entry + ttk::style configure TEntry \ + -foreground systemTextColor \ + -background systemTextBackgroundColor ttk::style map TEntry \ -foreground { disabled systemDisabledControlTextColor @@ -60,6 +63,9 @@ namespace eval ttk::theme::aqua { } # Spinbox + ttk::style configure TSpinbox \ + -foreground systemTextColor \ + -background systemTextBackgroundColor ttk::style map TSpinbox \ -foreground { disabled systemDisabledControlTextColor diff --git a/library/ttk/menubutton.tcl b/library/ttk/menubutton.tcl index a245df81..a0f70c99 100644 --- a/library/ttk/menubutton.tcl +++ b/library/ttk/menubutton.tcl @@ -83,9 +83,8 @@ if {[tk windowingsystem] eq "aqua"} { set mw [winfo reqwidth $menu] set bw [winfo width $mb] set dF [expr {[winfo width $mb] - [winfo reqwidth $menu] - $menuPad}] - set entry "" set entry [::tk::MenuFindName $menu [$mb cget -text]] - if {$entry eq ""} { + if {$entry < 0} { set entry 0 } set x [winfo rootx $mb] @@ -124,25 +123,24 @@ if {[tk windowingsystem] eq "aqua"} { incr mh 6 incr mw 16 } - set entry {} set entry [::tk::MenuFindName $menu [$mb cget -text]] - if {$entry eq {}} { + if {$entry < 0} { set entry 0 } set x [winfo rootx $mb] set y [winfo rooty $mb] switch [$mb cget -direction] { above { - set entry {} + set entry "" incr y -$mh # if we go offscreen to the top, show as 'below' if {$y < [winfo vrooty $mb]} { set y [expr {[winfo vrooty $mb] + [winfo rooty $mb]\ - + [winfo reqheight $mb]}] + + [winfo reqheight $mb]}] } } below { - set entry {} + set entry "" incr y $bh # if we go offscreen to the bottom, show as 'above' if {($y + $mh) > ([winfo vrooty $mb] + [winfo vrootheight $mb])} { @@ -196,7 +194,7 @@ proc ttk::menubutton::Pulldown {mb} { $mb state pressed $mb configure -cursor [$menu cget -cursor] foreach {x y entry} [PostPosition $mb $menu] { break } - if {$entry ne {}} { + if {$entry >= 0} { $menu post $x $y $entry } else { $menu post $x $y @@ -228,7 +226,7 @@ proc ttk::menubutton::TransferGrab {mb} { # proc ttk::menubutton::FindMenuEntry {menu s} { set last [$menu index last] - if {$last eq "none" || $last eq ""} { + if {$last eq "none" || $last < 0} { return "" } for {set i 0} {$i <= $last} {incr i} { diff --git a/library/ttk/notebook.tcl b/library/ttk/notebook.tcl index c5340a5c..518c6f53 100644 --- a/library/ttk/notebook.tcl +++ b/library/ttk/notebook.tcl @@ -57,11 +57,13 @@ proc ttk::notebook::Press {w x y} { # Select the next/previous tab in the list. # proc ttk::notebook::CycleTab {w dir} { - if {[$w index end] != 0} { - set current [$w index current] - set select [expr {($current + $dir) % [$w index end]}] - while {[$w tab $select -state] != "normal" && ($select != $current)} { - set select [expr {($select + $dir) % [$w index end]}] + set current [$w index current] + if {$current >= 0} { + set tabCount [$w index end] + set select [expr {($current + $dir) % $tabCount}] + set step [expr {$dir > 0 ? 1 : -1}] + while {[$w tab $select -state] ne "normal" && ($select != $current)} { + set select [expr {($select + $step) % $tabCount}] } if {$select != $current} { ActivateTab $w $select diff --git a/library/ttk/scrollbar.tcl b/library/ttk/scrollbar.tcl index 12134507..8be9887d 100644 --- a/library/ttk/scrollbar.tcl +++ b/library/ttk/scrollbar.tcl @@ -29,8 +29,6 @@ switch [tk windowingsystem] { x11 { lappend eventList \ - # For tk 8.7, the event list will be extended by - # } } foreach event $eventList { diff --git a/library/ttk/utils.tcl b/library/ttk/utils.tcl index c23ecb4e..25719149 100644 --- a/library/ttk/utils.tcl +++ b/library/ttk/utils.tcl @@ -303,19 +303,14 @@ proc ttk::bindMouseWheel {bindtag callback} { } if {[tk windowingsystem] eq "aqua"} { bind $bindtag "$callback \[expr {-%D}\]" - bind $bindtag "$callback \[expr {-10*%D}\]" + bind $bindtag "$callback \[expr {-10 * %D}\]" } else { - bind $bindtag "$callback \[expr {-%D/120}\]" + bind $bindtag "$callback \[expr {-%D / 120}\]" } } ## Mousewheel bindings for standard scrollable widgets. # -# Usage: [ttk::copyBindings TtkScrollable $bindtag] -# -# $bindtag should be for a widget that supports the -# standard scrollbar protocol. -# if {[tk windowingsystem] eq "x11"} { bind TtkScrollable { %W yview scroll -5 units } @@ -325,18 +320,18 @@ if {[tk windowingsystem] eq "x11"} { } if {[tk windowingsystem] eq "aqua"} { bind TtkScrollable \ - { %W yview scroll [expr {-(%D)}] units } + { %W yview scroll [expr {-%D}] units } bind TtkScrollable \ - { %W xview scroll [expr {-(%D)}] units } + { %W xview scroll [expr {-%D}] units } bind TtkScrollable \ - { %W yview scroll [expr {-10 * (%D)}] units } + { %W yview scroll [expr {-10 * %D}] units } bind TtkScrollable \ - { %W xview scroll [expr {-10 * (%D)}] units } + { %W xview scroll [expr {-10 * %D}] units } } else { bind TtkScrollable \ - { %W yview scroll [expr {-(%D / 120)}] units } + { %W yview scroll [expr {-%D / 120}] units } bind TtkScrollable \ - { %W xview scroll [expr {-(%D / 120)}] units } + { %W xview scroll [expr {-%D / 120}] units } } #*EOF* diff --git a/macosx/Credits.html.in b/macosx/Credits.html.in index cc409b1f..1c14367c 100644 --- a/macosx/Credits.html.in +++ b/macosx/Credits.html.in @@ -5,8 +5,8 @@

Tcl and Tk are distributed under a modified BSD license:
- - https:www.tcl.tk/software/tcltk/license.html + + https://www.tcl-lang.org/software/tcltk/license.html